1 2014-02-12 Tom Tromey <tromey@redhat.com>
3 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5 * tracepoint.c (cmd_qtstatus): Likewise.
7 2014-02-12 Tom Tromey <tromey@redhat.com>
9 * remote-utils.c (monitor_output): Pass explicit length to
12 2014-02-12 Tom Tromey <tromey@redhat.com>
14 * tracepoint.c: Include rsp-low.h.
15 * server.c: Include rsp-low.h.
16 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
17 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
19 * remote-utils.c: Include rsp-low.h.
20 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
21 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
22 (convert_int_to_ascii, convert_ascii_to_int): Move to
24 * regcache.c: Include rsp-low.h.
25 * ax.c: Include rsp-low.h.
26 * Makefile.in (SFILES): Add common/rsp-low.c.
28 (rsp-low.o): New target.
30 2014-02-12 Tom Tromey <tromey@redhat.com>
32 * utils.h (pulongest, plongest, phex_nz): Don't declare.
33 Include print-utils.h.
34 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
35 (plongest, thirty_two, phex_nz): Remove.
36 * Makefile.in (SFILES): Add common/print-utils.c.
37 (OBS): Add print-utils.o.
38 (print-utils-ipa.o): New target.
39 (print-utils.o): New target.
40 (IPA_OBJS): Add print-utils-ipa.o.
42 2014-02-06 Tom Tromey <tromey@redhat.com>
44 * Makefile.in (SFILES): Fix indentation.
46 2014-02-05 Doug Evans <dje@google.com>
48 * linux-low.c (linux_wait_for_event): Improve comment.
49 (linux_wait_1): Keep current_inferior in sync with event_child.
51 2014-01-22 Doug Evans <dje@google.com>
53 * gdbthread.h (gdb_id_to_thread): Delete, unused.
55 2014-01-22 Doug Evans <dje@google.com>
57 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
58 * configure: Regenerate.
59 * config.in: Regenerate.
60 * Makefile.in (SFILES): Add debug.c.
64 * linux-aarch64-low.c (*): Update all debugging printfs to use
65 debug_printf instead of fprintf.
66 * linux-arm-low.c (*): Ditto.
67 * linux-cris-low.c (*): Ditto.
68 * linux-crisv32-low.c (*): Ditto.
69 * linux-m32r-low.c (*): Ditto.
70 * linux-sparc-low.c (*): Ditto.
71 * linux-x86.c (*): Ditto.
72 * linux-low.c (*): Ditto.
73 (linux_wait_1): Add calls to debug_enter, debug_exit.
74 (linux_wait): Remove redundant debugging printf.
75 (stop_all_lwps): Add calls to debug_enter, debug_exit.
76 (linux_resume, unstop_all_lwps): Ditto.
77 * mem-break.c (*): Update all debugging printfs to use
78 debug_printf instead of fprintf.
79 * remote-utils.c (*): Ditto.
80 * thread-db.c (*): Ditto.
81 * server.c #include <ctype.h>, "gdb_vecs.h".
82 (debug_threads): Moved to debug.c.
83 (*): Update all debugging printfs to use debug_printf instead of
85 (start_inferior): Replace call to fflush with call to debug_flush.
86 (monitor_show_help): Mention set debug-format.
87 (parse_debug_format_options): New function.
88 (handle_monitor_command): Handle "monitor set debug-format".
89 (gdbserver_usage): Mention --debug-format.
90 (main): Parse --debug-format.
91 * server.h (debug_threads): Declaration moved to debug.h.
93 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
94 trace_debug_1 that uses debug_printf.
95 (tracepoint_look_up_symbols): Update all debugging printfs to use
96 debug_printf instead of fprintf.
98 2014-01-20 Baruch Siach <baruch@tkos.co.il>
100 * linux-xtensa-low.c: Include asm/ptrace.h instead of
103 2014-01-17 Pedro Alves <palves@redhat.com>
106 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
107 defined after including gdb_proc_service.h.
109 2014-01-16 Doug Evans <dje@google.com>
111 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
114 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
116 * target.h (target_ops) <read_btrace>: Change parameters and
117 return type to allow error reporting.
118 * server.c (handle_qxfer_btrace): Support delta reads. Pass
119 trace reading errors on.
120 * linux-low.c (linux_low_read_btrace): Pass trace reading
122 (linux_low_disable_btrace): New.
124 2014-01-15 Doug Evans <dje@google.com>
126 * inferiors.c (thread_id_to_gdb_id): Delete.
127 * inferiors.h (thread_id_to_gdb_id): Delete.
129 2014-01-13 Eli Zaretskii <eliz@gnu.org>
131 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
132 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
135 2014-01-08 Pedro Alves <palves@redhat.com>
137 * server.c (handle_status): Don't discard previous queued stop
138 replies or thread's pending status here.
139 (main) <disconnection>: Do it here instead.
141 2014-01-08 Pedro Alves <palves@redhat.com>
143 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
144 * server.c (visit_actioned_threads, handle_pending_status): New
146 (handle_v_cont): Factor out parts to ...
147 (resume): ... this new function. If in all-stop, and a thread
148 being resumed has a pending status, report it without actually
150 (myresume): Adjust to use the new 'resume' function.
151 (clear_pending_status_callback, set_pending_status_callback)
152 (find_status_pending_thread_callback): New functions.
153 (handle_status): Handle the case of multiple threads having
154 interesting statuses to report. Report threads' real last signal
155 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
156 with an interesting thread to report the status for, instead of
157 always reporting the status of the first thread.
159 2014-01-01 Joel Brobecker <brobecker@adacore.com>
161 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
162 * gdbreplay.c (gdbreplay_version): Likewise.
164 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
166 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
167 iov.iov_len with the real length in use.
169 2013-12-13 Joel Brobecker <brobecker@adacore.com>
171 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
172 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
173 for all targets that use win32-low.c.
174 * win32-low.c (win32_ensure_ntdll_loaded): New function.
175 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
177 2013-12-13 Pedro Alves <palves@redhat.com>
179 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
180 if equal to TARGET_WAITKIND_LOADED.
181 * win32-low.c (cached_status): New static global.
182 (win32_wait): Add declaration.
183 (do_initial_child_stuff): Flush all initial pending debug events
184 up to the initial breakpoint.
185 (win32_wait): If CACHED_STATUS was set, return that instead
186 of doing a real wait. Remove the code resuming the execution
187 of the inferior after receiving a TARGET_WAITKIND_LOADED event
188 during the initial phase. Also remove the code changing
189 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
190 TARGET_WAITKIND_STOPPED.
192 2013-12-11 Yao Qi <yao@codesourcery.com>
194 * notif.c (handle_notif_ack): Return 0 if no notification
197 2013-11-20 Doug Evans <dje@google.com>
199 * linux-low.c (linux_set_resume_request): Fix comment.
201 2013-11-20 Doug Evans <dje@google.com>
203 * linux-low.c (resume_status_pending_p): Tweak comment.
205 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
207 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
208 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
209 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
210 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
211 (srv_amd64_regobj): Add amd64-mpx.o.
212 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
213 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
214 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
215 * i387-fp.c (num_pl_bnd_register) Added constant.
216 (num_pl_bnd_cfg_registers) Added constant.
217 (struct i387_xsave) Added reserved area and MPX fields.
218 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
219 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
221 (tdesc_i386_mpx_linux): Add MPX amd64 target.
222 (init_registers_amd64_mpx_linux): Declare new function.
223 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
224 (x86_64_regmap): Add MPX registers.
225 (x86_linux_read_description): Add MPX case.
226 (initialize_low_arch): Initialize MPX targets.
228 2013-11-18 Tom Tromey <tromey@redhat.com>
230 * configure: Rebuild.
231 * configure.ac: Don't check for stdlib.h.
232 * gdbreplay.c: Unconditionally include stdlib.h.
234 2013-11-18 Tom Tromey <tromey@redhat.com>
236 * config.in: Rebuild.
237 * configure: Rebuild.
238 * configure.ac: Don't use AC_HEADER_DIRENT.
240 2013-11-18 Tom Tromey <tromey@redhat.com>
242 * server.h: Don't check HAVE_STRING_H.
243 * gdbreplay.c: Don't check HAVE_STRING_H.
244 * configure: Rebuild.
246 2013-11-18 Tom Tromey <tromey@redhat.com>
248 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
251 2013-11-08 Tom Tromey <tromey@redhat.com>
253 * configure, config.in: Rebuild.
254 * configure.ac: Remove unused configury.
256 2013-11-08 Tom Tromey <tromey@redhat.com>
258 * acinclude.m4: Include common.m4, codeset.m4.
259 * configure, config.in: Rebuild.
260 * configure.ac: Use GDB_AC_COMMON.
262 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
264 * linux-s390-low.c (HWCAP_S390_TE): New define.
265 (s390_arch_setup): Consider the TE field in the HWCAP for
266 determining 'have_regset_tdb'.
268 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
271 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
274 2013-10-02 Pedro Alves <palves@redhat.com>
276 * server.c (process_serial_event): Don't output "GDBserver
277 exiting" if GDB is connected through stdio.
278 * target.c (mywait): Likewise, be silent if GDB is connected
281 2013-10-01 Joel Brobecker <brobecker@adacore.com>
283 * lynx-low.c (lynx_add_threads_after_attach): New function.
284 (lynx_attach): Remove call to add_thread. Add call to
285 lynx_add_threads_after_attach instead.
287 2013-09-28 Mike Frysinger <vapier@gentoo.org>
289 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
290 * config.in, configure: Regenerated.
292 2013-09-18 Yao Qi <yao@codesourcery.com>
295 * server.c (start_inferior): Clear 'resume_info'.
297 2013-09-16 Jiong Wang <jiwang@tilera.com>
299 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
302 2013-09-16 Jiong Wang <jiwang@tilera.com>
304 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
305 linux-tile-low.o to srv_tgtobj.
307 2013-09-16 Will Newton <will.newton@linaro.org>
309 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
312 2013-09-06 Pedro Alves <palves@redhat.com>
314 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
315 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
316 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
317 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
318 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
319 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
321 2013-09-06 Pedro Alves <palves@redhat.com>
323 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
324 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
326 2013-09-06 Pedro Alves <palves@redhat.com>
328 * linux-amd64-ipa.c: Include tracepoint.h.
329 * linux-i386-ipa.c: Include tracepoint.h.
331 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
333 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
334 (ps_get_thread_area): New function.
336 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
338 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
339 (initialize_low_arch): Call init_registers_crisv32 rather than
340 init_register_crisv32.
342 2013-09-05 Pedro Alves <palves@redhat.com>
344 * server.h (handle_vFile, hostio_last_error_from_errno): Move
346 * hostio.h: ... this new file.
347 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
348 win32-low.c: Include hostio.h.
350 2013-09-05 Pedro Alves <palves@redhat.com>
352 * server.h (gdb_client_data, handler_func, callback_handler_func)
353 (delete_file_handler, add_file_handler, append_callback_event)
354 (delete_callback_event, start_event_loop, initialize_event_loop):
355 Move to event-loop.h and include it.
356 * event-loop.h: New file.
358 2013-09-05 Pedro Alves <palves@redhat.com>
360 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
361 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
362 (loaded_dll, unloaded_dll): Move to ...
363 * dll.h: ... this new file.
364 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
366 2013-09-05 Pedro Alves <palves@redhat.com>
368 * server.h (current_process, get_thread_process, all_processes)
369 (add_inferior_to_list, for_each_inferior, current_inferior)
370 (remove_inferior, add_process, remove_process, find_process_pid)
371 (have_started_inferiors_p, have_attached_inferiors_p)
372 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
373 (clear_inferiors, find_inferior, find_inferior_id)
374 (inferior_target_data, set_inferior_target_data)
375 (inferior_regcache_data, set_inferior_regcache_data): Move to
376 inferiors.h, and include it.
377 * inferiors.h: New file.
379 2013-09-05 Pedro Alves <palves@redhat.com>
381 * server.h (struct emit_ops, current_insn_ptr, emit_error):
385 2013-09-05 Pedro Alves <palves@redhat.com>
387 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
389 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
390 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
391 (handle_tracepoint_general_set, handle_tracepoint_query)
392 (tracepoint_finished_step, tracepoint_was_hit)
393 (release_while_stepping_state_list, current_traceframe)
394 (in_readonly_region, traceframe_read_mem)
395 (fetch_traceframe_registers, traceframe_read_sdata)
396 (traceframe_read_info, struct fast_tpoint_collect_status)
397 (fast_tracepoint_collecting, force_unlock_trace_buffer)
398 (handle_tracepoit_bkpts, initialize_low_tracepoint)
399 (supply_fast_tracepoint_registers)
400 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
401 (ipa_tdesc, claim_trampoline_space)
402 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
403 (agent_mem_read, agent_get_trace_state_variable_value)
404 (agent_set_trace_state_variable_value, agent_tsv_read)
405 (agent_mem_read_string, get_raw_reg_func_addr)
406 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
407 * tracepoint.h: ... this new file.
409 2013-09-05 Pedro Alves <palves@redhat.com>
411 * server.h (perror_with_name, error, fatal, warning, paddress)
412 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
416 2013-09-05 Pedro Alves <palves@redhat.com>
418 * server.h (remote_debug, noack_mode, transport_is_reliable)
419 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
420 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
421 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
422 (write_enn, initialize_async_io, enable_async_io)
423 (disable_async_io, check_remote_input_interrupt_request)
424 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
425 (dead_thread_notify, prepare_resume_reply)
426 (decode_address_to_semicolon, decode_address, decode_m_packet)
427 (decode_M_packet, decode_X_packet, decode_xfer_write)
428 (decode_search_memory_packet, unhexify, hexify)
429 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
430 (look_up_one_symbol, relocate_instruction)
431 (monitor_output): Move to remote-utils.h, and include it.
432 * remote-utils.h: New file.
434 2013-09-05 Pedro Alves <palves@redhat.com>
436 * server.h (_): Delete.
438 2013-09-02 Pedro Alves <palves@redhat.com>
440 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
441 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
443 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
445 2013-09-02 Pierre Muller <muller@sourceware.org>
447 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
448 or WriteProcessMemory complete successfully and handle
449 ERROR_PARTIAL_COPY error.
451 2013-09-02 Pedro Alves <palves@redhat.com>
453 * server.c (gdb_read_memory): Return -1 on traceframe memory read
454 error instead of EIO.
456 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
459 * linux-low.c: Include filestuff.h.
460 (linux_create_inferior) <pid == 0>: Call close_most_fds.
461 * lynx-low.c: Include filestuff.h.
462 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
463 * server.c: Include filestuff.h.
464 (main): Call notice_open_fds.
465 * spu-low.c: Include filestuff.h.
466 (spu_create_inferior) <pid == 0>: Call close_most_fds.
468 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
470 * Makefile.in: Explain why ../target and ../nat are not
471 listed as include file search paths.
472 (linux-waitpid.o): New object file rule.
473 * configure.srv (srv_native_linux_obj): New variable.
474 Replace all occurrences of linux native object files with
475 $srv_native_linux_obj.
476 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
477 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
478 (linux_enable_event_reporting): Remove declaration.
479 (my_waitpid): Moved to common/linux-waitpid.c.
480 (linux_wait_for_event): Pass ptid when calling
481 linux_enable_event_reporting.
482 (linux_supports_tracefork_flag): Remove.
483 (linux_enable_event_reporting): Likewise.
484 (linux_tracefork_grandchild): Remove.
485 (STACK_SIZE): Moved to common/linux-ptrace.c.
486 (linux_tracefork_child): Remove.
487 (linux_test_for_tracefork): Remove.
488 (linux_look_up_symbols): Call linux_supports_traceclone.
489 (initialize_low): Remove call to linux_test_for_tracefork.
490 * linux-low.h (PTRACE_TYPE_ARG3): Move to
491 common/linux-ptrace.h.
492 (PTRACE_TYPE_ARG4): Likewise.
493 Include linux-ptrace.h.
495 2013-08-21 Pedro Alves <palves@redhat.com>
497 * config.in: Renegerate.
499 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
501 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
502 (SFILES): Remove $(srcdir)/common/target-common.c and
503 add $(srcdir)/target/waitstatus.c.
504 (OBS): Remove target-common.o and add waitstatus.o.
505 (server_h): Remove $(srcdir)/../common/target-common.h and
506 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
507 and $(srcdir)/../target/waitstatus.h.
508 (target-common.o): Remove.
509 (waitstatus.o): New target object file.
510 * target.h: Do not include target-common.h and
511 include target/resume.h, target/wait.h and
514 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
516 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
518 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
519 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
521 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
522 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
524 2013-07-27 Jie Zhang <jie@codesourcery.com>
525 Daniel Jacobowitz <dan@codesourcery.com>
526 Yao Qi <yao@codesourcery.com>
528 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
529 (mips-linux-watch.o): New rule.
530 (mips_linux_watch_h): New variable.
531 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
533 * linux-mips-low.c: Include mips-linux-watch.h.
534 (struct arch_process_info, struct arch_lwp_info): New.
535 (update_watch_registers_callback): New function.
536 (mips_linux_new_process, mips_linux_new_thread) New functions.
537 (mips_linux_prepare_to_resume, mips_insert_point): New
539 (mips_remove_point, mips_stopped_by_watchpoint): New
541 (rsp_bp_type_to_target_hw_bp_type): New function.
542 (mips_stopped_data_address): New function.
543 (the_low_target): Add watchpoint support functions.
545 2013-07-27 Yao Qi <yao@codesourcery.com>
547 * i386-low.c: Include break-common.h.
548 (enum target_hw_bp_type): Remove.
550 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
552 * Makefile.in (SFILES): /common/target-common.c.
553 (OBS): Add target-common.o.
554 (server_h): Add $(srcdir)/../common/target-common.h.
555 (target-common.o): New target.
556 * server.c (queue_stop_reply_callback): Free
557 status string after use.
558 * target.c (target_waitstatus_to_string): Remove.
559 * target.h: Include target-common.h.
560 (resume_kind): Likewise.
561 (target_waitkind): Likewise.
562 (target_waitstatus): Likewise.
563 (TARGET_WNOHANG): Likewise.
565 2013-07-04 Yao Qi <yao@codesourcery.com>
567 * Makefile.in (host_alias): Use @host_noncanonical@.
568 (target_alias): Use @target_noncanonical@.
569 * configure.ac: Use ACX_NONCANONICAL_TARGET and
570 ACX_NONCANONICAL_HOST.
571 * configure: Regenerated.
574 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
576 * configure.ac (version_host, version_target): Set and AC_SUBST them.
577 * configure: Rebuild.
578 * Makefile.in (version_host, version_target): Get from configure.
579 (version.c): Use $(version_host) and $(version_target).
581 2013-07-03 Pedro Alves <palves@redhat.com>
583 * Makefile.in (config.status): Depend on development.sh.
584 * acinclude.m4: Include libmcheck.m4.
585 * configure: Regenerate.
587 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
589 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
590 attribute inside the parentheses.
591 (winapi_DebugSetProcessKillOnExit): Ditto.
592 (winapi_DebugBreakProcess): Ditto.
593 (winapi_GenerateConsoleCtrlEvent): Ditto.
595 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
597 * notif.h (notif_event): Add a dummy member to avoid compiler
600 2013-07-01 Pedro Alves <palves@redhat.com>
602 * hostio.c (HOSTIO_PATH_MAX): Define.
603 (require_filename, handle_open, handle_unlink, handle_readlink):
606 2013-07-01 Pedro Alves <palves@redhat.com>
608 * server.h: Include "pathmax.h".
609 * linux-low.c: Don't include sys/param.h.
610 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
612 * win32-low.c: Don't include sys/param.h.
613 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
615 2013-07-01 Pedro Alves <palves@redhat.com>
617 * event-loop.c: Don't check HAVE_UNISTD_H before including
619 * gdbreplay.c: Likewise.
620 * remote-utils.c: Likewise.
621 * server.c: Likewise.
622 * configure.ac: Don't check for unistd.h.
623 * configure: Regenerate.
625 2013-06-28 Tom Tromey <tromey@redhat.com>
627 * Makefile.in (version.c): Use version.in, not
630 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
632 * configure.ac (version_host, version_target): Set and AC_SUBST them.
633 * configure: Rebuild.
634 * Makefile.in (version_host, version_target): Get from configure.
635 (version.c): Use $(version_host) and $(version_target).
637 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
639 Fix trace-status to output user name without trailing colon.
640 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
642 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
644 Fix trace-status to output proper start-time and stop-time.
645 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
646 output start time and stop time in hex as gdb expects.
648 2013-06-26 Pedro Alves <pedro@codesourcery.com>
650 * tracepoint.c (build_traceframe_info_xml): Output trace state
651 variables present in the trace buffer.
653 2013-06-24 Tom Tromey <tromey@redhat.com>
655 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
658 * gdbreplay.c: Include version.h.
659 (version, host_name): Don't declare.
660 * server.h: Include version.h.
661 (version, host_name): Don't declare.
663 2013-06-12 Pedro Alves <palves@redhat.com>
665 * linux-x86-low.c (linux_is_elf64): Delete global.
666 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
667 with local linux_pid_exe_is_elf_64_file use.
669 2013-06-11 Pedro Alves <palves@redhat.com>
671 * linux-low.c (regset_disabled, disable_regset): New functions.
672 (regsets_fetch_inferior_registers)
673 (regsets_store_inferior_registers): Use them.
674 (initialize_regsets_info); Don't allocate the disabled_regsets
676 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
679 2013-06-11 Pedro Alves <palves@redhat.com>
681 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
684 2013-06-11 Pedro Alves <palves@redhat.com>
686 * linux-x86-low.c (initialize_low_arch): Call
687 init_registers_x32_avx_linux.
689 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
691 Fix compatibility with Android Bionic.
692 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
695 2013-06-07 Pedro Alves <palves@redhat.com>
698 * Makefile.in (OBS): Add tdesc.o.
699 (IPA_OBJS): Add tdesc-ipa.o.
700 (tdesc-ipa.o): New rule.
701 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
703 * linux-low.c (new_inferior): Delete.
704 (disabled_regsets, num_regsets): Delete.
705 (linux_add_process): Adjust to set the new per-process
707 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
708 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
709 was a stop. When calling arch_setup, switch the current inferior
710 to the thread that got an event.
711 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
712 (regsets_fetch_inferior_registers)
713 (regsets_store_inferior_registers): New regsets_info parameter.
715 (linux_register_in_regsets): New regs_info parameter. Adjust to
717 (register_addr, fetch_register, store_register): New usrregs_info
718 parameter. Adjust to use it.
719 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
720 parameter regs_info. Adjust to use it.
721 (linux_fetch_registers): Get the current inferior's regs_info, and
723 (linux_store_registers): Ditto.
724 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
725 (initialize_low): Don't initialize the target_regsets here. Call
727 * linux-low.h (target_regsets): Delete declaration.
728 (struct regsets_info): New.
729 (struct usrregs_info): New.
730 (struct regs_info): New.
731 (struct process_info_private) <new_inferior>: New field.
732 (struct linux_target_ops): Delete the num_regs, regmap, and
733 regset_bitmap fields. New field regs_info.
734 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
735 * i387-fp.c (num_xmm_registers): Delete.
736 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
737 calls to new interface.
738 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
739 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
740 Infer the number of xmm registers from the regcache's target
742 * i387-fp.h (num_xmm_registers): Delete.
743 * inferiors.c (add_thread): Don't install the thread's regcache
745 * proc-service.c (gregset_info): Fetch the current inferior's
746 regs_info. Adjust to use it.
747 * regcache.c: Include tdesc.h.
748 (register_bytes, reg_defs, num_registers)
749 (gdbserver_expedite_regs): Delete.
750 (get_thread_regcache): If the thread doesn't have a regcache yet,
751 create one, instead of aborting gdbserver.
752 (regcache_invalidate_one): Rename to ...
753 (regcache_invalidate_thread): ... this.
754 (regcache_invalidate_one): New.
755 (regcache_invalidate): Only invalidate registers of the current
757 (init_register_cache): Add target_desc parameter, and use it.
758 (new_register_cache): Ditto. Assert the target description has a
759 non zero registers_size.
760 (regcache_cpy): Add assertions. Adjust.
761 (realloc_register_cache, set_register_cache): Delete.
762 (registers_to_string, registers_from_string): Adjust.
763 (find_register_by_name, find_regno, find_register_by_number)
764 (register_cache_size): Add target_desc parameter, and use it.
765 (free_register_cache_thread, free_register_cache_thread_one)
766 (regcache_release, register_cache_size): New.
767 (register_size): Add target_desc parameter, and use it.
768 (register_data, supply_register, supply_register_zeroed)
769 (supply_regblock, supply_register_by_name, collect_register)
770 (collect_register_as_string, collect_register_by_name): Adjust.
771 * regcache.h (struct target_desc): Forward declare.
772 (struct regcache) <tdesc>: New field.
773 (init_register_cache, new_register_cache): Add target_desc
775 (regcache_invalidate_thread): Declare.
776 (regcache_invalidate_one): Delete declaration.
777 (regcache_release): Declare.
778 (find_register_by_number, register_cache_size, register_size)
779 (find_regno): Add target_desc parameter.
780 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
782 * remote-utils.c: Include tdesc.h.
783 (outreg, prepare_resume_reply): Adjust.
784 * server.c: Include tdesc.h.
785 (gdbserver_xmltarget): Delete declaration.
786 (get_features_xml, process_serial_event): Adjust.
787 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
789 (struct process_info) <tdesc>: New field.
790 (ipa_tdesc): Declare.
793 * tracepoint.c: Include tdesc.h.
794 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
795 (get_context_regcache): Adjust to pass ipa_tdesc down.
796 (do_action_at_tracepoint): Adjust to get the register cache size
797 from the context regcache's description.
798 (traceframe_walk_blocks): Adjust to get the register cache size
799 from the current trace frame's description.
800 (traceframe_get_pc): Adjust to get current trace frame's
801 description and pass it down.
802 (gdb_collect): Adjust to get the register cache size from the
804 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
805 (gdbserver_xmltarget): Delete.
806 (initialize_low_tracepoint): Set the ipa's target description.
807 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
808 (initialize_low_tracepoint): Set the ipa's target description.
809 * linux-x86-low.c: Include tdesc.h.
810 [__x86_64__] (is_64bit_tdesc): New.
811 (ps_get_thread_area, x86_get_thread_area): Use it.
812 (i386_cannot_store_register): Rename to ...
813 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
814 (i386_cannot_fetch_register): Rename to ...
815 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
816 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
818 (target_regsets): Rename to ...
819 (x86_regsets): ... this.
820 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
822 (x86_siginfo_fixup): Use is_64bit_tdesc.
823 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
824 (tdesc_x32_avx_linux, tdesc_x32_linux)
825 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
827 (x86_linux_update_xmltarget): Delete.
828 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
829 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
830 (AMD64_LINUX_USER64_CS): New.
831 (x86_linux_read_description): New, based on
832 x86_linux_update_xmltarget.
833 (same_process_callback): New.
834 (x86_arch_setup_process_callback): New.
835 (x86_linux_update_xmltarget): New.
836 (x86_regsets_info): New.
837 (amd64_linux_regs_info): New.
838 (i386_linux_usrregs_info): New.
839 (i386_linux_regs_info): New.
840 (x86_linux_regs_info): New.
841 (x86_arch_setup): Reimplement.
842 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
843 (x86_emit_ops): Ditto.
844 (the_low_target): Adjust. Install x86_linux_regs_info,
845 x86_cannot_fetch_register, and x86_cannot_store_register.
846 (initialize_low_arch): New.
847 * linux-ia64-low.c (tdesc_ia64): Declare.
848 (ia64_fetch_register): Adjust.
849 (ia64_usrregs_info, regs_info): New globals.
850 (ia64_regs_info): New function.
851 (the_low_target): Adjust.
852 (initialize_low_arch): New function.
853 * linux-sparc-low.c (tdesc_sparc64): Declare.
854 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
856 (sparc_arch_setup): New function.
857 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
858 (the_low_target): Adjust.
859 (initialize_low_arch): New function.
860 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
861 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
862 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
863 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
864 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
865 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
866 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
867 (tdesc_powerpc_isa205_vsx64l): Declare.
868 (ppc_cannot_store_register, ppc_collect_ptrace_register)
869 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
870 (ppc_set_pc, ppc_get_hwcap): Adjust.
871 (ppc_usrregs_info): Forward declare.
872 (!__powerpc64__) ppc_regmap_adjusted: New global.
873 (ppc_arch_setup): Adjust to the current process'es target
875 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
876 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
877 (ppc_store_evrregset): Adjust.
878 (target_regsets): Rename to ...
879 (ppc_regsets): ... this, and make static.
880 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
881 (ppc_regs_info): New function.
882 (the_low_target): Adjust.
883 (initialize_low_arch): New function.
884 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
885 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
886 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
887 (tdesc_s390x_linux64v2): Declare.
888 (s390_collect_ptrace_register, s390_supply_ptrace_register)
889 (s390_fill_gregset, s390_store_last_break): Adjust.
890 (target_regsets): Rename to ...
891 (s390_regsets): ... this, and make static.
892 (s390_get_pc, s390_set_pc): Adjust.
893 (s390_get_hwcap): New target_desc parameter, and use it.
894 [__s390x__] (have_hwcap_s390_high_gprs): New global.
895 (s390_arch_setup): Adjust to set the current process'es target
896 description. Don't adjust the regmap.
897 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
898 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
899 (regs_info_3264): New globals.
900 (s390_regs_info): New function.
901 (the_low_target): Adjust.
902 (initialize_low_arch): New function.
903 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
904 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
905 [__mips64] (init_registers_mips_linux)
906 (init_registers_mips_dsp_linux): Delete defines.
907 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
908 (have_dsp): New global.
909 (mips_read_description): New, based on mips_arch_setup.
910 (mips_arch_setup): Reimplement.
911 (get_usrregs_info): New function.
912 (mips_cannot_fetch_register, mips_cannot_store_register)
913 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
914 (mips_fill_fpregset, mips_store_fpregset): Adjust.
915 (target_regsets): Rename to ...
916 (mips_regsets): ... this, and make static.
917 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
918 (dsp_regs_info, regs_info): New globals.
919 (mips_regs_info): New function.
920 (the_low_target): Adjust.
921 (initialize_low_arch): New function.
922 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
923 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
925 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
926 (arm_read_description): New, with bits factored from
928 (arm_arch_setup): Reimplement.
929 (target_regsets): Rename to ...
930 (arm_regsets): ... this, and make static.
931 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
932 (arm_regs_info): New function.
933 (the_low_target): Adjust.
934 (initialize_low_arch): New function.
935 * linux-m68k-low.c (tdesc_m68k): Declare.
936 (target_regsets): Rename to ...
937 (m68k_regsets): ... this, and make static.
938 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
939 (m68k_regs_info): New function.
940 (m68k_arch_setup): New function.
941 (the_low_target): Adjust.
942 (initialize_low_arch): New function.
943 * linux-sh-low.c (tdesc_sharch): Declare.
944 (target_regsets): Rename to ...
945 (sh_regsets): ... this, and make static.
946 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
947 (sh_regs_info, sh_arch_setup): New functions.
948 (the_low_target): Adjust.
949 (initialize_low_arch): New function.
950 * linux-bfin-low.c (tdesc_bfin): Declare.
951 (bfin_arch_setup): New function.
952 (bfin_usrregs_info, regs_info): New globals.
953 (bfin_regs_info): New function.
954 (the_low_target): Adjust.
955 (initialize_low_arch): New function.
956 * linux-cris-low.c (tdesc_cris): Declare.
957 (cris_arch_setup): New function.
958 (cris_usrregs_info, regs_info): New globals.
959 (cris_regs_info): New function.
960 (the_low_target): Adjust.
961 (initialize_low_arch): New function.
962 * linux-cris-low.c (tdesc_crisv32): Declare.
963 (cris_arch_setup): New function.
964 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
965 (cris_regs_info): New function.
966 (the_low_target): Adjust.
967 (initialize_low_arch): New function.
968 * linux-m32r-low.c (tdesc_m32r): Declare.
969 (m32r_arch_setup): New function.
970 (m32r_usrregs_info, regs_info): New globals.
971 (m32r_regs_info): Adjust.
972 (initialize_low_arch): New function.
973 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
974 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
975 (tic6x_usrregs_info): Forward declare.
976 (tic6x_read_description): New function, based on ...
977 (tic6x_arch_setup): ... this. Reimplement.
978 (target_regsets): Rename to ...
979 (tic6x_regsets): ... this, and make static.
980 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
981 (tic6x_regs_info): New function.
982 (the_low_target): Adjust.
983 (initialize_low_arch): New function.
984 * linux-xtensa-low.c (tdesc_xtensa): Declare.
985 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
986 (target_regsets): Rename to ...
987 (xtensa_regsets): ... this, and make static.
988 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
990 (xtensa_arch_setup, xtensa_regs_info): New functions.
991 (the_low_target): Adjust.
992 (initialize_low_arch): New function.
993 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
994 (nios2_arch_setup): Set the current process'es tdesc.
995 (target_regsets): Rename to ...
996 (nios2_regsets): ... this.
997 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
998 (nios2_regs_info): New function.
999 (the_low_target): Adjust.
1000 (initialize_low_arch): New function.
1001 * linux-aarch64-low.c (tdesc_aarch64): Declare.
1002 (aarch64_arch_setup): Set the current process'es tdesc.
1003 (target_regsets): Rename to ...
1004 (aarch64_regsets): ... this.
1005 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
1006 (aarch64_regs_info): New function.
1007 (the_low_target): Adjust.
1008 (initialize_low_arch): New function.
1009 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
1011 (target_regsets): Rename to ...
1012 (tile_regsets): ... this.
1013 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
1014 (tile_regs_info): New function.
1015 (tile_arch_setup): Set the current process'es tdesc.
1016 (the_low_target): Adjust.
1017 (initialize_low_arch): New function.
1018 * spu-low.c (tdesc_spu): Declare.
1019 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
1020 * win32-arm-low.c (tdesc_arm): Declare.
1021 (arm_arch_setup): New function.
1022 (the_low_target): Install arm_arch_setup instead of
1024 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
1025 (init_windows_x86): Rename to ...
1026 (i386_arch_setup): ... this. Set `win32_tdesc'.
1027 (the_low_target): Adjust.
1028 * win32-low.c (win32_tdesc): New global.
1029 (child_add_thread): Don't create the thread cache here.
1030 (do_initial_child_stuff): Set the new process'es tdesc.
1031 * win32-low.h (struct target_desc): Forward declare.
1032 (win32_tdesc): Declare.
1033 * lynx-i386-low.c (tdesc_i386): Declare global.
1034 (lynx_i386_arch_setup): Set `lynx_tdesc'.
1035 * lynx-low.c (lynx_tdesc): New global.
1036 (lynx_add_process): Set the new process'es tdesc.
1037 * lynx-low.h (struct target_desc): Forward declare.
1038 (lynx_tdesc): Declare global.
1039 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
1040 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
1041 * nto-low.c (nto_tdesc): New global.
1042 (do_attach): Set the new process'es tdesc.
1043 * nto-low.h (struct target_desc): Forward declare.
1044 (nto_tdesc): Declare.
1045 * nto-x86-low.c (tdesc_i386): Declare.
1046 (nto_x86_arch_setup): Set `nto_tdesc'.
1048 2013-06-04 Gary Benson <gbenson@redhat.com>
1050 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
1051 to qSupported response when appropriate.
1052 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
1053 with nonzero-length annex.
1054 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
1055 arguments supplied in annex.
1057 2013-05-31 Doug Evans <dje@google.com>
1060 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
1061 64 bits in 64-cross-32 environment.
1063 2013-05-28 Pedro Alves <palves@redhat.com>
1065 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
1066 (aarch64-without-fpu.c): Delete rule.
1067 * configure.srv (aarch64*-*-linux*): Remove references to
1068 aarch64-without-fpu.o and aarch64-without-fpu.xml.
1069 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
1072 2013-05-24 Pedro Alves <palves@redhat.com>
1074 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
1075 instead of strchr/decode_address. Error if the range isn't split
1076 with a ','. Don't assume there's be a ':' in the action.
1078 2013-05-23 Yao Qi <yao@codesourcery.com>
1079 Pedro Alves <palves@redhat.com>
1081 * linux-low.c (lwp_in_step_range): New function.
1082 (linux_wait_1): If the thread was range stepping and stopped
1083 outside the stepping range, report the stop to GDB. Otherwise,
1084 continue stepping. Add range stepping debug output.
1085 (linux_set_resume_request): Copy the step range from the resume
1087 (linux_supports_range_stepping): New.
1088 (linux_target_ops) <supports_range_stepping>: Set to
1089 linux_supports_range_stepping.
1090 * linux-low.h (struct linux_target_ops)
1091 <supports_range_stepping>: New field.
1092 (struct lwp_info) <step_range_start, step_range_end>: New fields.
1093 * linux-x86-low.c (x86_supports_range_stepping): New.
1094 (the_low_target) <supports_range_stepping>: Set to
1095 x86_supports_range_stepping.
1096 * server.c (handle_v_cont): Handle 'r' action.
1097 (handle_v_requests): Append ";r" if the target supports range
1099 * target.h (struct thread_resume) <step_range_start,
1100 step_range_end>: New fields.
1101 (struct target_ops) <supports_range_stepping>:
1103 (target_supports_range_stepping): New macro.
1105 2013-05-17 Joel Brobecker <brobecker@adacore.com>
1107 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
1108 confusion in comment.
1110 2013-05-17 Joel Brobecker <brobecker@adacore.com>
1112 * lynx-low.c (struct process_info_private): New type.
1113 (lynx_add_process): New function.
1114 (lynx_create_inferior, lynx_attach): Replace calls to
1115 add_process by calls to lynx_add_process.
1116 (lynx_resume): If PTID is null, then try using
1117 current_process()->private->last_wait_event_ptid.
1119 (lynx_clear_inferiors): Delete. The contents of that function
1120 has been inlined in lynx_mourn;
1121 (lynx_wait_1): Save the ptid in the process's private data.
1122 (lynx_mourn): Free the process' private data. Replace call
1123 to lynx_clear_inferiors by call to clear_inferiors.
1125 2013-05-17 Yao Qi <yao@codesourcery.com>
1127 * i386-low.c (i386_length_and_rw_bits): Move the comment to
1130 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
1132 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
1133 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
1134 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
1135 PT_TEXT_END_ADDR guards. Update comments.
1136 (linux_target_op) <read_offsets>: Conditionally define to
1137 linux_read_offsets if the target is UCLIBC and if it defines
1138 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
1140 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
1141 Andrew Jenner <andrew@codesourcery.com>
1143 * Makefile.in (SFILES): Add linux-nios2-low.c.
1144 (clean): Add action to delete nios2-linux.c.
1145 (nios2-linux.c): New rule.
1146 * configure.srv: Add nios2*-*-linux*.
1147 * linux-nios2-low.c: New.
1149 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
1151 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
1153 2013-04-25 Hui Zhu <hui@codesourcery.com>
1156 * ax.c (ax_printf): Add fflush.
1158 2013-04-22 Tom Tromey <tromey@redhat.com>
1160 * Makefile.in (SFILES): Add filestuff.c.
1161 (OBS): Add filestuff.o.
1162 (filestuff.o): New target.
1163 * config.in, configure: Rebuild.
1164 * configure.ac: Check for fdwalk, pipe2.
1166 2013-04-17 Pedro Alves <palves@redhat.com>
1168 * configure.ac (USE_THREAD_DB): Delete variable.
1169 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
1170 Don't AC_SUBST USE_THREAD_DB.
1171 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
1172 * config.in, configure: Regenerate.
1174 2013-04-16 Pedro Alves <palves@redhat.com>
1176 * linux-low.h (struct lwp_info) <thread_known>: Move under
1177 the USE_THREAD_DB #ifdef.
1179 2013-04-16 Pedro Alves <palves@redhat.com>
1181 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
1182 (linux-low.o): Delete rule.
1183 * linux-low.h: Always include "gdb_thread_db.h" instead of
1184 conditionally including thread_db.h.
1185 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
1188 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1190 * Makefile.in (install-only): Fix make install regression.
1192 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
1194 Convert man pages to texinfo, new gdbinit.5 texinfo page.
1195 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
1197 * gdbserver.1: Remove.
1199 2013-03-22 Pedro Alves <palves@redhat.com>
1201 * linux-low.c (handle_extended_wait): Don't call
1202 linux_enable_event_reporting.
1204 2013-03-15 Tony Theodore <tonyt@logyst.com>
1207 * Makefile.in (SHELL): Use @SHELL@.
1209 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
1211 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
1214 2013-03-13 Joel Brobecker <brobecker@adacore.com>
1216 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
1217 Remove extraneous NULL element.
1219 2013-03-13 Yao Qi <yao@codesourcery.com>
1221 * tracepoint.c (traceframe_read_tsv): Look for the last matched
1222 'V' block in trace frame.
1224 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1226 * target.h (struct target_ops): Add btrace ops.
1227 (target_supports_btrace): New macro.
1228 (target_enable_btrace): New macro.
1229 (target_disable_btrace): New macro.
1230 (target_read_btrace): New macro.
1231 * gdbthread.h (struct thread_info): Add btrace field.
1232 * server.c: Include btrace-common.h.
1233 (handle_btrace_general_set): New function.
1234 (handle_btrace_enable): New function.
1235 (handle_btrace_disable): New function.
1236 (handle_general_set): Call handle_btrace_general_set.
1237 (handle_qxfer_btrace): New function.
1238 (struct qxfer qxfer_packets[]): Add btrace entry.
1239 * inferiors.c (remove_thread): Disable btrace.
1240 * linux-low: Include linux-btrace.h.
1241 (linux_low_enable_btrace): New function.
1242 (linux_low_read_btrace): New function.
1243 (linux_target_ops): Add btrace ops.
1244 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
1245 Add srv_linux_btrace=yes.
1246 (x86_64-*-linux*): Add linux-btrace.o.
1247 Add srv_linux_btrace=yes.
1248 * configure.ac: Define HAVE_LINUX_BTRACE.
1249 * config.in: Regenerated.
1250 * configure: Regenerated.
1252 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1254 * server.c (handle_qxfer): Preserve error message if -3 is
1256 (qxfer): Document the -3 return value.
1258 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1260 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
1261 (linux_btrace_h): New variable.
1262 (linux-btrace.o): New rule.
1264 2013-03-08 Stan Shebs <stan@codesourcery.com>
1265 Hafiz Abid Qadeer <abidh@codesourcery.com>
1267 * tracepoint.c (trace_buffer_size): New global.
1268 (DEFAULT_TRACE_BUFFER_SIZE): New define.
1269 (init_trace_buffer): Change to one-argument function. Allocate
1270 trace buffer memory.
1271 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
1272 handle QTBuffer:size packet.
1273 (cmd_bigqtbuffer_size): New function.
1274 (initialize_tracepoint): Call init_trace_buffer with
1275 DEFAULT_TRACE_BUFFER_SIZE.
1276 * server.c (handle_query): Add QTBuffer:size in the
1279 2013-03-07 Yao Qi <yao@codesourcery.com>
1281 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
1282 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
1284 (cmd_qtsp): Adjust condition. Do post increment.
1285 Set cur_action and cur_step_action back to 0.
1287 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
1290 * linux-low.c (linux_write_memory): Return early success if LEN is
1293 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
1295 * configure.srv: Add x86_64-*-cygwin* as target.
1297 2013-02-28 Tom Tromey <tromey@redhat.com>
1299 * configure.ac: Invoke AC_SYS_LARGEFILE.
1300 * configure, config.in: Rebuild.
1302 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
1304 * win32-low.c: Throughout, fix format strings and casts of
1305 printf-like functions to avoid type related warnings on all
1307 (get_child_debug_event): Print dwDebugEventCode as hex since
1308 that's how it's usually documented.
1310 2013-02-28 Yao Qi <yao@codesourcery.com>
1312 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
1315 2013-02-27 Jiong Wang <jiwang@tilera.com>
1317 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
1318 (reg-tilegx32.c): New rule.
1319 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
1320 * linux-tile-low.c (tile_arch_setup): New function. Invoke
1321 different register info initializer according to elf class.
1322 (init_registers_tilgx32): New function. The tilegx32 register info
1324 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
1325 (tile_store_gregset): Likewise.
1327 2013-02-27 Yao Qi <yao@codesourcery.com>
1329 * server.c (process_point_options): Print debug message when
1330 debug_threads is true.
1332 2013-02-26 Yao Qi <yao@codesourcery.com>
1334 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
1336 2013-02-19 Pedro Alves <palves@redhat.com>
1337 Kai Tietz <ktietz@redhat.com>
1341 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
1342 instead of strtoul to extract address from packet.
1343 (process_serial_event) <'z'>: Likewise.
1345 2013-02-18 Yao Qi <yao@codesourcery.com>
1347 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
1349 2013-02-14 Pedro Alves <palves@redhat.com>
1353 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
1354 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
1356 2013-02-14 Pedro Alves <palves@redhat.com>
1358 * tracepoint.c (cmd_qtdpsrc): Use savestring.
1360 2013-02-14 Pedro Alves <palves@redhat.com>
1362 * tracepoint.c (save_string): Delete.
1363 (add_tracepoint_action): Use savestring instead of save_string.
1365 2013-02-12 Pedro Alves <palves@redhat.com>
1367 * linux-xtensa-low.c: Ditto.
1368 * xtensa-xtregs.c: Ditto.
1370 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
1372 * thread-db.c (thread_db_get_tls_address): NULL pointer check
1375 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1377 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
1378 aarch64_num_wp_regs and aarch64_num_bp_regs to
1379 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
1381 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1383 * linux-aarch64-low.c (ps_get_thread_area): Replace
1384 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
1386 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
1387 Marcus Shawcroft <marcus.shawcroft@arm.com>
1388 Nigel Stephens <nigel.stephens@arm.com>
1389 Yufeng Zhang <yufeng.zhang@arm.com>
1391 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
1392 (aarch64.c, aarch64-without-fpu.c): New targets.
1393 * configure.srv (aarch64*-*-linux*): New.
1394 * linux-aarch64-low.c: New file.
1396 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1398 * linux-low.c (handle_extended_wait, linux_create_inferior)
1399 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
1400 (dequeue_one_deferred_signal, linux_resume_one_thread)
1401 (fetch_register, linux_write_memory, linux_enable_event_reporting)
1402 (linux_tracefork_grandchild, linux_test_for_tracefork)
1403 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
1404 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
1405 where the argument is 0.
1407 2013-01-25 Yao Qi <yao@codesourcery.com>
1409 * event-loop.c: Include "queue.h".
1410 (gdb_event_p): New typedef.
1411 (struct gdb_event) <next_event>: Remove.
1412 (event_queue): Change to QUEUE(gdb_event_p).
1413 (async_queue_event): Remove.
1414 (gdb_event_xfree): New.
1415 (initialize_event_loop): New.
1416 (process_event): Use API from QUEUE.
1417 (wait_for_event): Likewise.
1418 * server.c (main): Call initialize_event_loop.
1419 * server.h (initialize_event_loop): Declare.
1421 2013-01-18 Yao Qi <yao@codesourcery.com>
1423 * ax.h (struct eval_agent_expr_context): New.
1424 (gdb_eval_agent_expr): Update declaration.
1425 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
1426 TFRAME. Add new argument CTX.
1427 * server.h (struct eval_agent_expr_context): Declare.
1428 (agent_mem_read, agent_tsv_read): Update declaration.
1429 (agent_mem_read_string): Likewise.
1430 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
1431 (add_traceframe_block): Add new argument TPOINT.
1432 Increase TPOINT->traceframe_usage.
1433 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
1434 eval_tracepoint_agent_expr.
1435 (condition_true_at_tracepoint): Likewise.
1436 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
1437 (agent_mem_read_string, agent_tsv_read): Likewise.
1439 2013-01-16 Yao Qi <yao@codesourcery.com>
1441 * linux-low.c (linux_resume_one_lwp): Don't check
1442 'lwp->bp_reinsert != 0'.
1444 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1445 Pedro Alves <palves@redhat.com>
1447 * lynx-low.c (ptrace_request_to_str): Define a temporary
1448 macro and use it to simplify this function's implementation.
1450 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1452 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
1455 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1457 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
1459 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1461 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
1463 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1465 * lynx-low.c (lynx_resume): Use the resume_info parameter
1466 to determine the ptid for the lynx_ptrace call, unless
1467 it is equal to minus_one_ptid, in which case we use the
1468 ptid of the current_inferior.
1469 (lynx_wait_1): After having received a thread create/exit
1470 event, resume the inferior's execution using the signaling
1471 thread's ptid, rather than the old ptid.
1473 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1475 * lynx-low.c (lynx_resume): Delete variable ret.
1477 2013-01-01 Joel Brobecker <brobecker@adacore.com>
1479 * gdbreplay.c (gdbreplay_version): Update copyright year.
1480 * server.c (gdbserver_version): Likewise.
1482 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1484 * lynx-low.c (lynx_wait_1): Add debug trace before adding
1487 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1489 * lynx-low.c (ptrace_request_to_str): Add handling for
1492 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1494 * lynx-low.c (lynx_attach): Delete variable new_process.
1496 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1498 * lynx-low.c (lynx_create_inferior): Delete variable
1501 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1503 * lynx-low.c (ptrace_request_to_str): Do not handle
1504 PTRACE_GETTHREADLIST if this macro does not exist.
1506 2012-12-15 Yao Qi <yao@codesourcery.com>
1508 * Makefile.in (OBS): Add notif.o.
1509 * notif.c, notif.h: New.
1510 * server.c: Include "notif.h".
1511 (struct vstop_notif) <next>: Remove.
1513 (queue_stop_reply): Update.
1514 (push_event, send_next_stop_reply): Remove.
1515 (discard_queued_stop_replies): Update.
1516 (notif_stop): New variable.
1517 (handle_v_stopped): Remove.
1518 (handle_v_requests): Don't call handle_v_stopped. Call
1519 handle_ack_notif instead.
1520 (queue_stop_reply_callback): Call notif_event_enque instead
1521 of queue_stop_reply.
1522 (handle_status): Don't call send_next_stop_reply, call
1523 notif_write_event instead.
1524 (kill_inferior_callback): Likewise.
1525 (detach_or_kill_inferior_callback): Likewise.
1526 (main): Call initialize_notif.
1527 (process_serial_event): Call QUEUE_is_empty.
1528 (handle_target_event): Call notif_push instead of push event.
1529 * server.h (push_event): Remove declaration.
1531 2012-12-10 Tom Tromey <tromey@redhat.com>
1533 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
1534 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
1537 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
1538 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
1539 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
1540 (amd64-linux-ipa.o, ax.o): Rewrite.
1541 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
1542 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
1543 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
1544 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
1545 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
1546 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
1547 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
1548 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
1549 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
1550 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
1551 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
1552 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
1553 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
1554 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
1555 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
1556 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
1557 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
1558 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
1559 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
1560 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
1561 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
1562 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
1563 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
1564 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
1565 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
1566 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
1567 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
1568 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
1569 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
1570 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
1571 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
1572 (reg-tilegx.o): Remove.
1573 (all_object_files): New macro.
1574 Include .deps files.
1575 * aclocal.m4, configure: Rebuild.
1576 * acinclude.m4: Include depstand.m4, lead-dot.m4.
1577 * configure.ac: Invoke ZW_CREATE_DEPDIR,
1578 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
1580 2012-12-05 Tom Tromey <tromey@redhat.com>
1583 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
1585 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
1587 * configure.ac: Check for linux/perf_event.h.
1588 * config.in: Regenerated.
1589 * configure: Regenerated.
1591 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
1593 * hostio.c (handle_readlink): Decrease buffer size
1594 parameter passed to readlink by one byte.
1596 2012-11-26 Yao Qi <yao@codesourcery.com>
1598 * configure.ac (build_warnings): Append '-Wempty-body'.
1599 * configure: Regenerated.
1600 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
1603 2012-11-15 Pierre Muller <muller@sourceware.org>
1605 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
1606 * config.in: Regenerate.
1607 * configure: Regenerate.
1608 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
1609 Use "gdb_wait.h" header instead of <sys/wait.h> header.
1610 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1611 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
1613 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
1614 instead of <sys/wait.h> header.
1615 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1617 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
1619 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
1620 (various make rules): Remove -DGDBSERVER
1622 2012-11-09 Yao Qi <yao@codesourcery.com>
1624 * spu-low.c (current_ptid): Move it to ..
1625 * gdbthread.h: ... here. New.
1626 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
1627 * server.c (myresume, process_serial_event): Likewise.
1628 * thread-db.c (thread_db_find_new_threads): Likewise.
1629 * tracepoint.c (run_inferior_command): Likewise.
1631 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
1633 * server.c (handle_search_memory_1): Include access length in
1636 2012-09-05 Michael Brandt <michael.brandt@axis.com>
1638 * linux-crisv32-low.c: Fix compile errors.
1640 2012-09-04 Yao Qi <yao@codesourcery.com>
1642 * tracepoint.c (cmd_qtsv): Adjust debug message.
1643 Don't check CUR_TPOINT.
1645 2012-08-28 Yao Qi <yao@codesourcery.com>
1647 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
1648 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
1649 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
1650 Remove declarations of xmalloc, xreallloc, xstrdup and
1652 * Makefile.in (libiberty_h): New.
1653 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
1654 (linux-bfin-low.o): Append dependency 'libiberty.h'.
1656 2012-08-23 Yao Qi <yao@codesourcery.com>
1658 * server.h: Remove declaration of 'xsnprintf'.
1660 2012-08-22 Keith Seitz <keiths@redhat.com>
1662 * server.h: Include build-gnulib-gbserver/config.h.
1663 * gdbreplay.c: Likewise.
1665 2012-08-08 Doug Evans <dje@google.com>
1667 * Makefile.in (SFILES): Add gdb_vecs.c.
1668 (OBS): Add gdb_vecs.o.
1669 (gdb_vecs_h, host_defs_h): New variables.
1670 (thread-db.o): Add $(gdb_vecs_h) dependency.
1671 (gdb_vecs.o): New rule.
1672 * thread-db.c: #include "gdb_vecs.h".
1673 (thread_db_load_search): Use a vector to iterate over path elements.
1674 Handle text appearing after "$pdir".
1676 * configure.ac: Add check for strstr.
1677 * config.in: Regenerate.
1678 * configure: Regenerate.
1680 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
1682 * hostio.c (handle_pread): If pread fails, fall back to attempting
1684 (handle_pwrite): Likewise for pwrite.
1686 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
1688 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
1689 between unsupported TYPE and unimplementable ADDR/LEN combination.
1690 (arm_insert_point): Act on new return value.
1692 2012-07-31 Pedro Alves <palves@redhat.com>
1694 * server.c (process_point_options): Only skip tokens if we find
1695 one that is unrecognized. Don't treat 'X' specially while
1696 skipping unrecognized tokens.
1698 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
1700 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
1701 to 4-byte-align HW breakpoint addresses for Thumb.
1703 2012-07-27 Yao Qi <yao@codesourcery.com>
1707 * server.h: Declare gdb_agent_about_to_close.
1708 * target.c (kill_inferior): Include "agent.h".
1709 New. Send command 'kill'.
1710 * target.h (kill_inferior): Removed macro.
1711 * tracepoint.c (gdb_agent_about_to_close): New.
1712 (gdb_agent_helper_thread): Handle command 'close'.
1713 Wait endlessly until the inferior stops.
1714 Install gdb_agent_remove_socket to atexit hook.
1715 (agent_socket_name): New static variable.
1716 (gdb_agent_socket_init): Replace local variable 'name' with
1717 'agent_socket_name'.
1718 (gdb_agent_remove_socket): New.
1720 2012-07-27 Yao Qi <yao@codesourcery.com>
1722 * server.c (process_point_options): Stop at 'X' when parsing.
1724 2012-07-19 Michael Eager <eager@eagercon.com>
1726 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
1728 * linux-x86-low.c (x86_insert_point, x86_remove_point):
1729 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
1730 hardware breakpoint.
1732 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1734 * gdbserver/linux-low.c (initialize_low): Call
1735 linux_ptrace_init_warnings.
1737 2012-07-02 Doug Evans <dje@google.com>
1739 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
1742 2012-07-02 Stan Shebs <stan@codesourcery.com>
1744 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
1745 (ax.o): Add it to build rule.
1747 (OBS): Add format.o.
1748 (IPA_OBS): Add format.o.
1749 * server.c (handle_query): Claim support for breakpoint commands.
1750 (process_point_options): Add command case.
1751 (process_serial_event): Leave running if there are printfs in
1753 * mem-break.h (any_persistent_commands): Declare.
1754 (add_breakpoint_commands): Declare.
1755 (gdb_no_commands_at_breakpoint): Declare.
1756 (run_breakpoint_commands): Declare.
1757 * mem-break.c (struct point_command_list): New struct.
1758 (struct breakpoint): New field command_list.
1759 (any_persistent_commands): New function.
1760 (add_commands_to_breakpoint): New function.
1761 (add_breakpoint_commands): New function.
1762 (gdb_no_commands_at_breakpoint): New function.
1763 (run_breakpoint_commands): New function.
1764 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
1766 * ax.c: Include format.h.
1767 (ax_printf): New function.
1768 (gdb_eval_agent_expr): Add printf opcode.
1770 2012-06-13 Yao Qi <yao@codesourcery.com>
1772 * server.c (start_inferior): Remove duplicated writes to fields
1773 'last_resume_kind' and 'last_status' of 'current_inferior'.
1775 2012-06-12 Yao Qi <yao@codesourcery.com>
1776 Pedro Alves <palves@redhat.com>
1778 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
1780 * server.c (handle_v_cont): Extend comment.
1782 2012-06-11 Yao Qi <yao@codesourcery.com>
1784 * linux-low.c (linux_attach): Add 'static'.
1786 2012-06-06 Yao Qi <yao@codesourcery.com>
1788 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
1790 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1792 Fix gcc -flto compilation warning.
1793 * server.c (main): Make variable multi_mode and attach volatile.
1795 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1797 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
1798 if the platform doesn't know about it.
1800 2012-05-30 Jeff Kenton <jkenton@tilera.com>
1802 * Makefile.in (SFILES): Add linux-tile-low.c.
1803 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
1804 * configure.srv: Handle tilegx-*-linux*.
1805 * linux-tile-low.c: New file.
1807 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1809 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
1811 2012-05-24 Pedro Alves <palves@redhat.com>
1815 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
1817 2012-05-24 Pedro Alves <palves@redhat.com>
1821 Replace target_signal with gdb_signal throughout.
1823 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
1825 * linux-low.c (linux_store_registers): Avoid the copying sequence
1826 when no data has been retrieved by ptrace.
1828 2012-05-22 Will Deacon <will.deacon@arm.com>
1830 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
1831 Include asm/ptrace.h.
1832 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
1835 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
1837 * linux-low.c (linux_store_registers): Don't re-retrieve data
1838 with ptrace that has already been obtained from /proc. Always
1839 copy any data retrieved with ptrace to the buffer supplied.
1841 2012-05-11 Yao Qi <yao@codesourcery.com>
1842 Pedro Alves <palves@redhat.com>
1844 * linux-low.c (enum stopping_threads_kind): New.
1845 (stopping_threads): Change type to `enum stopping_threads_kind'.
1846 (handle_extended_wait): If stopping and suspending threads, leave
1847 the new_lwp suspended too.
1848 (linux_wait_for_event): Adjust.
1849 (stop_all_lwps): Set `stopping_threads' to
1850 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
1851 whether we're suspending threads or just stopping them. Assert no
1854 2012-04-29 Yao Qi <yao@codesourcery.com>
1856 * server.h: Move some code to ...
1857 * gdbthread.h: ... here. New.
1858 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
1859 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
1860 (nto-low.o, win32-low.o): Likewise.
1861 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
1862 * regcache.c, remote-utils.c, server.c: Likewise.
1863 * target.c, tracepoint.c, win32-low.c: Likewise.
1865 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1867 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
1868 (PTRACE_ARG4_TYPE): Likewise.
1869 (PTRACE_XFER_TYPE): Likewise.
1870 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
1871 ptrace to PTRACE_ARG3_TYPE.
1872 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
1873 (PTRACE_ARG4_TYPE): Likewise.
1874 (PTRACE_XFER_TYPE): Likewise.
1875 (linux_detach_one_lwp): Cast fourth argument of
1876 ptrace to long then PTRACE_ARG4_TYPE.
1877 (regsets_fetch_inferior_registers): Cast third argument of
1878 ptrace to long then PTRACE_ARG3_TYPE.
1879 (regsets_store_inferior_registers): Likewise.
1881 2012-04-20 Pedro Alves <palves@redhat.com>
1883 * configure: Regenerate.
1885 2012-04-19 Pedro Alves <palves@redhat.com>
1887 * Makefile.in (GNULIB_BUILDDIR): New.
1888 (LIBGNU, INCGNU, GNULIB_H): Adjust.
1889 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
1890 (all, install-only, uninstall, clean-info, all-lib, clean): No
1891 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
1892 (maintainer-clean realclean distclean): Use subdir_do.
1894 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
1895 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
1896 * acinclude.m4: Include acx_configure_dir.m4.
1897 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
1898 calls. Call AC_PROG_RANLIB. Configure gnulib using
1901 (GNULIB_STDINT_H): Adjust.
1902 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
1903 * gdbreplay.c: Include build-gnulib/config.h.
1904 * server.h: Likewise.
1905 * aclocal.m4: Regenerate.
1906 * config.in: Regenerate.
1907 * configure: Regenerate.
1909 2012-04-19 Pedro Alves <palves@redhat.com>
1911 * Makefile.in (LIBGNU, INCGNU): Adjust.
1912 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
1913 (all, install-only, uninstall, clean-info, all-lib, clean)
1914 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
1915 * configure.ac: Adjust AC_OUTPUT output.
1916 * aclocal.m4: Regenerate.
1917 * configure: Regenerate.
1919 2012-04-19 Pedro Alves <palves@redhat.com>
1921 * Makefile.in (generated_files): New.
1922 (server_h): Remove the explicit dependency on config.h, and depend
1923 on $generated_files.
1925 2012-04-19 Pedro Alves <palves@redhat.com>
1927 * Makefile.in (INCGNU): Add -Ignulib.
1929 2012-04-19 Pedro Alves <palves@redhat.com>
1931 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
1932 (INCGNU): ... this, and spell out -I here.
1933 (GNULIB_LIB): Rename to ...
1935 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
1937 2012-04-19 Pedro Alves <palves@redhat.com>
1939 * config.in: Regenerate.
1941 2012-04-19 Pedro Alves <palves@redhat.com>
1943 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
1944 * server.h (memmem): Remove declaration.
1945 * config.in: Regenerate.
1946 * configure: Regenerate.
1948 2012-04-19 Yao Qi <yao@codesourcery.com>
1950 * Makefile.in (SFILES): Add common/vec.c.
1954 2012-04-19 Yao Qi <yao@codesourcery.com>
1956 * remote-utils.c (prepare_resume_reply): Replace with macro
1957 target_core_of_thread.
1958 * server.c (handle_qxfer_threads_proper): Likewise.
1959 * target.h (traget_core_of_thread): New macro.
1961 2012-04-18 Pedro Alves <palves@redhat.com>
1963 * aclocal.m4: Regenerate.
1964 * configure: Regenerate.
1966 2012-04-16 Yao Qi <yao@codesourcery.com>
1968 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
1969 duplicated on address.
1971 2012-04-16 Yao Qi <yao@codesourcery.com>
1973 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
1974 (struct tracepoint_action_ops) <send>: New field.
1975 (m_tracepoint_action_send, r_tracepoint_action_send): New.
1976 (agent_expr_send, x_tracepoint_action_send): New.
1977 (l_tracepoint_action_send): New.
1978 (cmd_qtdp): Download and install tracepoint
1979 according to `use_agent'.
1980 (run_inferior_command): Add one more parameter `len'.
1982 (tracepoint_send_agent): New.
1983 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
1985 2012-04-16 Yao Qi <yao@codesourcery.com>
1987 * tracepoint.c (download_tracepoints): Moved to ...
1988 (cmd_qtstart): ... here.
1990 2012-04-14 Yao Qi <yao@codesourcery.com>
1992 * tracepoint.c: Include inttypes.h.
1993 (struct collect_memory_action): Use sized types.
1994 (struct tracepoint): Likewise.
1995 (cmd_qtdp, stop_tracing): Update print specifiers.
1996 (cmd_qtp, response_tracepoint): Likewise.
1997 (collect_data_at_tracepoint): Likewise.
1998 (collect_data_at_step): Likewise.
2000 2012-04-14 Yao Qi <yao@codesourcery.com>
2002 Import gnulib module inttypes.
2003 * aclocal.m4, config.in, configure: Regenerated.
2005 2012-04-14 Yao Qi <yao@codesourcery.com>
2007 * Makefile.in (maintainer-clean, realclean, distclean): Remove
2008 Makefile and config.status at last.
2010 2012-04-13 Yao Qi <yao@codesourcery.com>
2012 * tracepoint.c: Include stdint.h unconditionally.
2014 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2016 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
2017 on BFD_HAVE_SYS_PROCFS_TYPE.
2018 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
2019 * configure: Regenerate.
2020 * config.in: Likewise.
2022 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
2024 * Makefile.in (clean): Also remove x32.c x32-linux.c
2025 x32-avx.c x32-avx-linux.c.
2026 (x32.o): New target.
2028 (x32-linux.o): Likewise.
2029 (x32-linux.c): Likewise.
2030 (x32-avx.o): Likewise.
2031 (x32-avx.c): Likewise.
2032 (x32-avx-linux.o): Likewise.
2033 (x32-avx-linux.c): Likewise.
2035 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
2036 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
2037 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
2038 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
2039 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
2040 i386/x32-avx-linux.xml.
2042 * linux-x86-low.c (init_registers_x32_linux): New prototype.
2043 (init_registers_x32_avx_linux): Likwise.
2044 (x86_linux_update_xmltarget): Call init_registers_x32_linux
2045 or init_registers_x32_avx_linux if linux_is_elf64 is false.
2047 2012-04-13 Pedro Alves <palves@redhat.com>
2049 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
2050 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
2051 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
2052 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
2055 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
2057 * linux-x86-low.c (compat_x32_clock_t): New.
2058 (compat_x32_siginfo_t): Likewise.
2059 (compat_x32_siginfo_from_siginfo): Likewise.
2060 (siginfo_from_compat_x32_siginfo): Likewise.
2061 (linux_is_elf64): Likewise.
2062 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
2063 and siginfo_from_compat_x32_siginfo for x32.
2064 (x86_arch_setup): Set linux_is_elf64.
2066 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
2069 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
2071 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
2072 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
2073 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
2074 compatible with process.
2076 2012-04-12 Yao Qi <yao@codesourcery.com>
2078 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
2079 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
2080 (install-only, install-info, clean): Handle sub dir gnulib.
2081 (all-lib, am--refresh): New targets.
2082 (memmem.o): Remove target.
2083 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
2084 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
2085 (AC_REPLACE_FUNCS): Remove memmem.
2086 Invoke gl_INIT and AM_INIT_AUTOMAKE.
2087 (AC_OUTPUT): Generate Makefile in gnulib/.
2088 * aclocal.m4, config.in, configure: Regenerated.
2090 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
2092 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
2094 2012-04-05 Pedro Alves <palves@redhat.com>
2096 -Werror=strict-aliasing
2098 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
2101 2012-04-04 Pedro Alves <palves@redhat.com>
2103 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
2104 (sparc_store_gregset_from_stack, sparc_store_gregset)
2105 (sparc_breakpoint_at): Fix formatting.
2107 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2109 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
2111 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
2112 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
2113 * config.in: Regenerate.
2114 * configure: Likewise.
2116 2012-03-29 Pedro Alves <palves@redhat.com>
2118 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
2119 Correct ptrace arguments.
2121 2012-03-28 Pedro Alves <palves@redhat.com>
2123 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
2124 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
2125 (IA64_FR1_REGNUM): New defines.
2126 (ia64_fetch_register): New.
2127 (the_low_target): Install it.
2128 * linux-low.h (struct linux_target_ops) <fetch_register>: New
2130 * linux-low.c (linux_fetch_registers): Try the
2131 the_low_target.fetch_register hook first.
2133 * linux-arm-low.c (the_low_target): Adjust.
2134 * linux-bfin-low.c (the_low_target): Adjust.
2135 * linux-cris-low.c (the_low_target): Adjust.
2136 * linux-crisv32-low.c (the_low_target): Adjust.
2137 * linux-m32r-low.c (the_low_target): Adjust.
2138 * linux-m68k-low.c (the_low_target): Adjust.
2139 * linux-mips-low.c (the_low_target): Adjust.
2140 * linux-ppc-low.c (the_low_target): Adjust.
2141 * linux-s390-low.c (the_low_target): Adjust.
2142 * linux-sh-low.c (the_low_target): Adjust.
2143 * linux-sparc-low.c (the_low_target): Adjust.
2144 * linux-tic6x-low.c (the_low_target): Adjust.
2145 * linux-x86-low.c (the_low_target): Adjust.
2146 * linux-xtensa-low.c (the_low_target): Adjust.
2148 2012-03-26 Pedro Alves <palves@redhat.com>
2150 * server.c (handle_qxfer_libraries): Don't bail early if
2151 the_target->qxfer_libraries_svr4 is not NULL.
2153 2012-03-26 Pedro Alves <palves@redhat.com>
2155 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
2157 2012-03-23 Pedro Alves <palves@redhat.com>
2159 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
2160 "library-list-svr4" element's start tag when the the DSO list is
2163 2012-03-23 Pedro Alves <palves@redhat.com>
2165 * linux-low.c (read_one_ptr): Read the inferior's pointer through
2166 a variable whose type size is the same as the inferior's pointer
2169 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
2171 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
2173 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
2174 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2175 * linux-low.h: Include <signal.h>.
2176 (struct siginfo): Remove forward declaration.
2177 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
2180 2012-03-21 Mike Frysinger <vapier@gentoo.org>
2182 * .gitignore: Ignore more files.
2184 2012-03-19 Pedro Alves <palves@redhat.com>
2185 Jan Kratochvil <jan.kratochvil@redhat.com>
2187 * server.c (cont_thread, general_thread): Add describing comments.
2188 (start_inferior): Clear `cont_thread'.
2189 (handle_v_cont): Don't set `cont_thread' if resuming all threads
2192 2012-03-15 Yao Qi <yao@codesourcery.com>
2194 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
2196 (cmd_qtdp): ... here.
2198 2012-03-15 Yao Qi <yao@codesourcery.com>
2200 * tracepoint.c (struct tracepoint_action_ops): New.
2201 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
2202 (m_tracepoint_action_download): New.
2203 (r_tracepoint_action_download): New.
2204 (x_tracepoint_action_download): New.
2205 (l_tracepoint_action_download): New.
2206 (add_tracepoint_action): Install `action->ops' according type.
2207 (download_tracepoint_1): Move code `download' function pointer
2208 of various tracepoint_action_ops.
2210 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
2212 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
2213 linux_ptrace_attach_warnings.
2215 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
2217 * Makefile.in (linux-ptrace.o): New.
2218 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
2219 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
2220 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
2221 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
2222 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
2224 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
2226 2012-03-08 Yao Qi <yao@codesourcery.com>
2227 Pedro Alves <palves@redhat.com>
2229 Fix PR server/13392.
2230 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
2232 * tracepoint.c (remove_tracepoint): New.
2233 (cmd_qtdp): Call remove_tracepoint when failed to install.
2235 2012-03-07 Pedro Alves <palves@redhat.com>
2237 * linux-low.c (get_detach_signal): New.
2238 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
2239 Pass on pending signals to PTRACE_DETACH. Check the result of the
2241 * server.c (program_signals, program_signals_p): New.
2242 (handle_general_set): Handle QProgramSignals.
2243 * server.h (program_signals, program_signals_p): Declare.
2245 2012-03-05 Pedro Alves <palves@redhat.com>
2246 Jan Kratochvil <jan.kratochvil@redhat.com>
2248 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
2251 2012-03-03 Yao Qi <yao@codesourcery.com>
2253 * tracepoint.c (tracepoint_look_up_symbols): Update call to
2254 agent_look_up_symbols.
2256 2012-03-03 Yao Qi <yao@codesourcery.com>
2258 * Makefile.in (linux-low.o): Keep dependence on agent.h.
2259 (linux-x86-low.o): Likewise.
2260 * server.h: Remove in_process_agent_loaded.
2261 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
2265 2012-03-03 Yao Qi <yao@codesourcery.com>
2267 * tracepoint.c (gdb_agent_capability): New global.
2268 (in_process_agent_loaded_ust): Renamed to
2269 `in_process_agent_supports_ust'.
2271 (in_process_agent_supports_ust): Call agent_capability_check.
2272 (clear_installed_tracepoints): Assert that agent supports
2275 2012-03-03 Yao Qi <yao@codesourcery.com>
2277 * linux-low.c (linux_supports_agent): New.
2278 (linux_target_ops): Initialize field `supports_agent' with
2279 linux_supports_agent.
2280 * target.h (struct target_ops) <supports_agent>: New.
2281 (target_supports_agent): New macro.
2282 * server.c (handle_general_set): Handle packet 'QAgent'.
2283 (handle_query): Send `QAgent+'.
2284 * Makefile.in (server.o): Depends on agent.h.
2286 2012-03-03 Yao Qi <yao@codesourcery.com>
2288 * Makefile.in (OBS): Add agent.o.
2289 Add new rule for agent.o.
2290 Track dependence of tracepoint.c on agent.h.
2291 * tracepoint.c (run_inferior_command_1):
2292 (run_inferior_command): Call agent_run_command.
2293 (gdb_ust_connect_sync_socket): Deleted. Move it to
2295 (resume_thread, stop_thread): Likewise.
2296 (gdb_ust_socket_init): Renamed to ...
2297 (gdb_agent_socket_init): ... New.
2298 (gdb_ust_thread): Renamed to ...
2299 (gdb_agent_helper_thread): ... New.
2300 (gdb_ust_init): Move some code to ...
2301 (gdb_agent_init): ... here. New.
2302 [HAVE_UST]: Call gdb_ust_init.
2303 (initialize_tracepoint_ftlib): Call gdb_agent_init.
2304 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
2305 * config.in, configure: Regenerated.
2307 2012-03-02 Pedro Alves <palves@redhat.com>
2309 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
2310 * linux-low.c (struct simple_pid_list): New.
2311 (stopped_pids): New a struct simple_pid_list pointer.
2312 (add_to_pid_list, pull_pid_from_list): New.
2313 (handle_extended_wait): Don't assume the first signal new children
2314 report is SIGSTOP. Adjust call to pull_pid_from_list.
2315 (linux_wait_for_lwp): Adjust.
2317 2012-03-02 Yao Qi <yao@codesourcery.com>
2319 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
2322 2012-03-02 Yao Qi <yao@codesourcery.com>
2324 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
2325 `stop_pc' and `tpoint'. Update caller.
2327 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
2329 * linux-low.h (linux_target_ops): Add regset_bitmap member.
2330 * linux-low.c (use_linux_regsets): New macro.
2331 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
2332 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
2333 (linux_register_in_regsets): New function.
2334 (usr_fetch_inferior_registers): Skip registers covered by
2336 (usr_store_inferior_registers): Likewise.
2337 (usr_fetch_inferior_registers): New macro.
2338 (usr_store_inferior_registers): Likewise.
2339 (linux_fetch_registers): Handle mixed regset/non-regset targets.
2340 (linux_store_registers): Likewise.
2341 * linux-mips-low.c (init_registers_mips_dsp_linux): New
2343 (init_registers_mips64_dsp_linux): Likewise.
2344 (init_registers_mips_linux): New macro.
2345 (init_registers_mips_dsp_linux): Likewise.
2346 (mips_dsp_num_regs): Likewise.
2347 (DSP_BASE, DSP_CONTROL): New fallback macros.
2348 (mips_base_regs): New macro.
2349 (mips_regmap): Use it. Fix the size.
2350 (mips_dsp_regmap): New variable.
2351 (mips_dsp_regset_bitmap): Likewise.
2352 (mips_arch_setup): New function.
2353 (mips_cannot_fetch_register): Use the_low_target.regmap rather
2355 (mips_cannot_store_register): Likewise.
2356 (the_low_target): Update .arch_setup, .num_regs and .regmap
2357 initializers. Add .regset_bitmap initializer.
2358 * linux-arm-low.c (the_low_target): Add .regset_bitmap
2360 * linux-bfin-low.c (the_low_target): Likewise.
2361 * linux-cris-low.c (the_low_target): Likewise.
2362 * linux-crisv32-low.c (the_low_target): Likewise.
2363 * linux-ia64-low.c (the_low_target): Likewise.
2364 * linux-m32r-low.c (the_low_target): Likewise.
2365 * linux-m68k-low.c (the_low_target): Likewise.
2366 * linux-ppc-low.c (the_low_target): Likewise.
2367 * linux-s390-low.c (the_low_target): Likewise.
2368 * linux-sh-low.c (the_low_target): Likewise.
2369 * linux-sparc-low.c (the_low_target): Likewise.
2370 * linux-tic6x-low.c (the_low_target): Likewise.
2371 * linux-x86-low.c (the_low_target): Likewise.
2372 * linux-xtensa-low.c (the_low_target): Likewise.
2373 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
2374 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
2375 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
2377 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
2378 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
2380 2012-02-29 Yao Qi <yao@codesourcery.com>
2381 Pedro Alves <palves@redhat.com>
2383 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
2384 `step_over_finished' is true.
2386 2012-02-27 Pedro Alves <palves@redhat.com>
2388 * linux-low.c (pid_is_stopped): Delete, moved to common/.
2389 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
2391 2012-02-27 Pedro Alves <palves@redhat.com>
2394 * linux-low.c (pid_is_stopped): New.
2395 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
2397 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
2399 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
2402 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
2404 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
2406 2012-02-24 Luis Machado <lgustavo@codesourcery>
2408 * server.c (handle_query): Advertise support for target-side
2409 breakpoint condition evaluation.
2410 (process_point_options): New function.
2411 (process_serial_event): When inserting a breakpoint, check for
2412 a target-side condition that should be evaluated.
2414 * mem-break.c: Include regcache.h and ax.h.
2415 (point_cond_list_t): New data structure.
2416 (breakpoint) <cond_list>: New field.
2417 (find_gdb_breakpoint_at): Make non-static.
2418 (delete_gdb_breakpoint_at): Clear any target-side
2420 (clear_gdb_breakpoint_conditions): New function.
2421 (add_condition_to_breakpoint): Likewise.
2422 (add_breakpoint_condition): Likewise.
2423 (gdb_condition_true_at_breakpoint): Likewise.
2424 (gdb_breakpoint_here): Return result directly instead
2425 of going through a local variable.
2427 * mem-break.h (find_gdb_breakpoint_at): New prototype.
2428 (clear_gdb_breakpoint_conditions): Likewise.
2429 (add_breakpoint_condition): Likewise.
2430 (gdb_condition_true_at_breakpoint): Likewise.
2432 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
2433 (need_step_over_p): Take target-side breakpoint condition into
2436 2012-02-24 Luis Machado <lgustavo@codesourcery>
2438 * server.h: Include tracepoint.h.
2439 (agent_mem_read, agent_get_trace_state_variable_value,
2440 agent_set_trace_state_variable_value,
2441 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
2442 get_set_tsv_func_addr): New prototypes.
2444 * ax.h: New include file.
2445 * ax.c: New source file.
2447 * tracepoint.c: Include ax.h.
2448 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
2449 agent_expr, eval_result_type): Move to ax.h.
2450 (parse_agent_expr): Rename to ...
2451 (gdb_parse_agent_expr): ... this, make it non-static and move
2453 (unparse_agent_expr) Rename to ...
2454 (gdb_unparse_agent_expr): ... this, make it non-static and move
2456 (eval_agent_expr): Rename to ...
2457 (eval_tracepoint_agent_expr): ... this.
2458 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
2459 forward declarations.
2460 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
2461 (agent_get_trace_state_variable_value): New function.
2462 (agent_set_trace_state_variable_value): New function.
2463 (cmd_qtdp): Call gdb_parse_agent_expr (...).
2464 (response_tracepoint): Call gdb_unparse_agent_expr (...).
2465 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
2466 (condition_true_at_tracepoint): Likewise.
2467 (parse_agent_expr): Rename to ...
2468 (gdb_parse_agent_expr): ... this and move to ax.c.
2469 (unparse_agent_expr): Rename to ...
2470 (gdb_unparse_agent_expr): ... this and move to ax.c.
2471 (gdb_agent_op_name): Move to ax.c.
2472 (eval_agent_expr): Rename to ...
2473 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
2475 (eval_tracepoint_agent_expr): New function.
2476 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
2478 (current_insn_ptr, emit_error, struct bytecode_address): Move to
2480 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
2481 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
2482 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
2483 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
2484 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
2485 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
2486 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
2487 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
2488 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
2489 (compile_bytecodes): Remove forward declaration.
2490 (is_goto_target): Move to ax.c.
2491 (compile_bytecodes): Move to ax.c and call
2492 agent_get_trace_state_variable_value (...) and
2493 agent_set_trace_state_variable_value (...).
2495 * Makefile.in: Update ax.c and IPA dependencies.
2497 2012-02-24 Pedro Alves <palves@redhat.com>
2499 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
2500 (cmd_bigqtbuffer_circular): ... this. Only handle
2501 'QTBuffer:circular:'.
2502 (handle_tracepoint_general_set): Adjust.
2504 2012-02-16 Yao Qi <yao@codesourcery.com>
2506 * inferiors.c: Move code to ...
2507 * dll.c: .... here. New.
2508 * server.h: Declare clear_dlls.
2509 * Makefile.in (SFILES): Add dll.c.
2513 2012-02-11 Yao Qi <yao@codesourcery.com>
2515 * server.c: (handle_monitor_command): Add a new parameter
2517 (handle_query): Update caller.
2519 2012-02-09 Joel Brobecker <brobecker@adacore.com>
2521 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
2522 * configure, config.in: Regenerate.
2523 * hostio.c: Provide an alternate implementation if HAVE_READLINK
2526 2012-02-02 Pedro Alves <palves@redhat.com>
2528 Try SIGKILL first, then PTRACE_KILL.
2529 * linux-low.c (linux_kill_one_lwp): New.
2530 (linux_kill_one_lwp): Rename to ...
2531 (kill_one_lwp_callback): ... this. Use the new
2534 2012-02-02 Pedro Alves <palves@redhat.com>
2536 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
2539 2012-01-27 Pedro Alves <palves@redhat.com>
2541 * linux-low.c (linux_child_pid_to_exec_file): Delete.
2542 (elf_64_file_p): Make static.
2543 (linux_pid_exe_is_elf_64_file): New.
2544 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
2545 Delete declarations.
2546 (linux_pid_exe_is_elf_64_file): Declare.
2547 * linux-x86-low.c (x86_arch_setup): Use
2548 linux_pid_exe_is_elf_64_file.
2550 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2552 * linux-low.c (linux_wait_for_event_1): Rename to ...
2553 (linux_wait_for_event): ... here and merge it with former
2554 linux_wait_for_event - new variable wait_ptid, use it.
2555 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
2557 2012-01-23 Pedro Alves <palves@redhat.com>
2559 * server.c (main): Avoid yet another case of infinite loop while
2560 detaching/killing after a longjmp.
2562 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2565 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
2567 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
2569 * hostio.c (handle_readlink): New function.
2570 (handle_vFile): Call it to handle "vFile:readlink" packets.
2572 2012-01-20 Pedro Alves <palves@redhat.com>
2573 Ulrich Weigand <ulrich.weigand@linaro.org>
2575 * server.c (handle_v_requests): Only support vAttach and vRun to
2576 start multiple processes when in extended protocol mode.
2578 2012-01-17 Pedro Alves <palves@redhat.com>
2580 * tracepoint.c (initialize_tracepoint): Use mmap instead of
2581 memalign plus mprotect to allocate the scratch buffer.
2583 2012-01-13 Pedro Alves <palves@redhat.com>
2585 * server.c (attach_inferior): Clear `cont_thread'.
2587 2012-01-13 Pedro Alves <palves@redhat.com>
2589 * server.c (main): Avoid infinite loop while detaching/killing
2592 2012-01-09 Doug Evans <dje@google.com>
2594 * server.c (start_inferior): Set last_ptid in --wrapper case.
2596 2012-01-06 Yao Qi <yao@codesourcery.com>
2598 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
2600 [IN_PROCESS_AGENT] (debug_agent): New global variable.
2602 2012-01-04 Yao Qi <yao@codesourcery.com>
2604 * tracepoint.c (cmd_qtdp): Print debug message
2605 for static tracepoint.
2607 2012-01-04 Yao Qi <yao@codesourcery.com>
2609 * tracepoint.c (trace_vdebug): Differentiate debug message
2610 between gdbserver and IPA.
2612 2012-01-03 Yao Qi <yao@codesourcery.com>
2614 * tracepoint.c (tracepoint_was_hit): Don't collect for
2617 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2619 * terminal.h: Reformat copyright header.
2621 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2623 * server.c (gdbserver_version): Update copyright year.
2624 * gdbreplay.c (gdbreplay_version): Likewise.
2626 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
2628 * linux-low.c (linux_create_inferior): Put empty if clause for write.
2631 2011-12-18 Hui Zhu <teawater@gmail.com>
2632 * linux-low.c (linux_create_inferior): Save return value to ret.
2634 2011-12-18 Hui Zhu <teawater@gmail.com>
2636 * linux-low.c (linux_create_inferior): Save return value to ret.
2638 2011-12-16 Doug Evans <dje@google.com>
2640 * linux-low.c (linux_create_inferior): If stdio connection,
2641 redirect stdin from /dev/null, stdout to stderr.
2642 * remote-utils.c (remote_is_stdio): New static global.
2643 (remote_connection_is_stdio): New function.
2644 (remote_prepare): Handle stdio connection.
2645 (remote_open): Ditto.
2646 (remote_close): Don't close stdin for stdio connections.
2647 (read_prim,write_prim): New functions. Replace all calls to
2648 read/write to these.
2649 * server.c (main): Watch for "-" argument. Move call to
2650 remote_prepare before start_inferior.
2651 * server.h (STDIO_CONNECTION_NAME): New macro.
2652 (remote_connection_is_stdio): Declare.
2654 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
2655 in debugging output.
2657 2011-12-15 Yao Qi <yao@codesourcery.com>
2659 * tracepoint.c: Include sys/syscall.h.
2660 (gdb_ust_thread): Remove preprocessor conditional.
2662 2011-12-14 Pedro Alves <pedro@codesourcery.com>
2664 * linux-low.c (linux_detach_one_lwp): Call
2665 the_low_target.prepare_to_resume before detaching.
2667 2011-12-14 Yao Qi <yao@codesourcery.com>
2669 * tracepoint.c (gdb_ust_thread): Don't ignore return value
2672 2011-12-14 Yao Qi <yao@codesourcery.com>
2674 * i386-low.c (i386_low_stopped_data_address): Initialize local
2677 2011-12-13 Pedro Alves <pedro@codesourcery.com>
2681 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
2682 DR_CONTROL unless necessary. Extend comments.
2683 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
2684 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
2686 2011-12-13 Yao Qi <yao@codesourcery.com>
2688 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
2690 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
2692 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
2694 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
2695 Print new debug message for such case.
2697 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2699 Fix overlapping memcpy.
2700 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
2701 the read_inferior_memory transfer.
2702 (delete_fast_tracepoint_jump): New variable buf. Use it for the
2703 write_inferior_memory transfer.
2704 (set_fast_tracepoint_jump): New variable buf. Use it for the
2705 read_inferior_memory and write_inferior_memory transfers.
2706 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
2707 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
2708 Use it for the write_inferior_memory transfer.
2709 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
2712 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2714 * linux-low.c (fetch_register, store_register): Make code
2715 consistent, fix formatting.
2717 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2719 * linux-low.c (usr_store_inferior_registers): Factor out code
2720 to handle individual registers into...
2721 (store_register): ... this new function.
2723 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
2725 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
2726 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
2727 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
2728 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
2729 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
2730 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
2731 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
2732 (srv_xmlfiles): Add new XML files.
2734 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
2736 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
2737 (init_registers_s390_linux32v1): Add prototype.
2738 (init_registers_s390_linux32v2): Likewise.
2739 (init_registers_s390_linux64v1): Likewise.
2740 (init_registers_s390_linux64v2): Likewise.
2741 (init_registers_s390x_linux64v1): Likewise.
2742 (init_registers_s390x_linux64v2): Likewise.
2743 (s390_num_regs): Increment to 52.
2744 (s390_regmap): Add orig_r2 register.
2745 (s390_num_regs_3264): Increment to 68.
2746 (s390_regmap_3264): Add orig_r2 register.
2747 (s390_collect_ptrace_register): Handle orig_r2 register.
2748 (s390_supply_ptrace_register): Likewise.
2749 (s390_fill_last_break): New function.
2750 (s390_store_last_break): Likewise.
2751 (s390_fill_system_call): New function.
2752 (s390_store_system_call): Likewise.
2753 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
2755 (s390_check_regset): New function.
2756 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
2757 NT_S390_SYSTEM_CALL regsets and use appropriate description.
2758 Update target_regsets for available register sets.
2760 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
2761 Jan Kratochvil <jan.kratochvil@redhat.com>
2763 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
2764 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
2766 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
2767 * linux-low.h (struct process_info_private): New member r_debug.
2768 * server.c (handle_qxfer_libraries): Call
2769 the_target->qxfer_libraries_svr4.
2770 (handle_qxfer_libraries_svr4): New function.
2771 (qxfer_packets): New entry "libraries-svr4".
2772 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
2773 * target.h (struct target_ops): New member qxfer_libraries_svr4.
2774 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
2775 PACKET_qXfer_libraries_svr4.
2777 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
2779 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
2780 PSW address/mask between 8-byte and 16-byte formats.
2781 (s390_supply_ptrace_register): Likewise.
2782 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
2783 basic addressing mode bit.
2785 2011-11-24 Stan Shebs <stan@codesourcery.com>
2787 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
2789 2011-11-17 Stan Shebs <stan@codesourcery.com>
2791 * tracepoint.c (struct tracepoint): New field traceframe_usage.
2792 (tracing_start_time): New global.
2793 (tracing_stop_time): New global.
2794 (tracing_user_name): New global.
2795 (tracing_notes): New global.
2796 (tracing_stop_note): New global.
2797 (cmd_qtstart): Set traceframe_usage, start_time.
2798 (stop_tracing): Set stop_time.
2799 (cmd_qtstatus): Report additional status.
2800 (cmd_qtp): New function.
2801 (handle_tracepoint_query): Call it.
2802 (cmd_qtnotes): New function.
2803 (handle_tracepoint_general_set): Call it.
2804 (get_timestamp): Rename from tsv_get_timestamp.
2806 2011-11-14 Stan Shebs <stan@codesourcery.com>
2807 Kwok Cheung Yeung <kcy@codesourcery.com>
2809 * linux-x86-low.c (small_jump_insn): New.
2810 (i386_install_fast_tracepoint_jump_pad): Add arguments for
2811 trampoline and error message, build a trampoline and issue a small
2812 jump instruction to it.
2813 (x86_install_fast_tracepoint_jump_pad): Add arguments for
2814 trampoline and error message.
2815 (x86_get_min_fast_tracepoint_insn_len): New.
2816 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
2817 * linux-low.h (struct linux_target_ops): Add arguments to
2818 install_fast_tracepoint_jump_pad operation, add new operation.
2819 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
2821 (linux_get_min_fast_tracepoint_insn_len): New function.
2822 (linux_target_op): Add new operation.
2823 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
2824 (gdb_trampoline_buffer_end): Ditto.
2825 (gdb_trampoline_buffer_error): Ditto.
2826 (struct ipa_sym_addresses): Add fields for new IPA variables.
2827 (symbol_list): Add entries for new IPA variables.
2828 (struct tracepoint): Add fields to hold the address range of the
2829 trampoline used by the tracepoint.
2830 (trampoline_buffer_head): New static variable.
2831 (trampoline_buffer_tail): Ditto.
2832 (claim_trampoline_space): New function.
2833 (have_fast_tracepoint_trampoline_buffer): New function.
2834 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
2836 (install_fast_tracepoint): Ditto, also add error buffer argument.
2837 (cmd_qtminftpilen): New function.
2838 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
2839 (fast_tracepoint_from_trampoline_address): New function.
2840 (fast_tracepoint_collecting): Handle trampoline as part of jump
2842 (set_trampoline_buffer_space): New function.
2843 (initialize_tracepoint): Initialize new IPA variables.
2844 * target.h (struct target_ops): Add arguments to
2845 install_fast_tracepoint_jump_pad operation, add new
2846 get_min_fast_tracepoint_insn_len operation.
2847 (target_get_min_fast_tracepoint_insn_len): New.
2848 (install_fast_tracepoint_jump_pad): Add arguments.
2849 * server.h (IPA_BUFSIZ): Define.
2850 * linux-i386-ipa.c: Include extra header files.
2851 (initialize_fast_tracepoint_trampoline_buffer): New function.
2852 (initialize_low_tracepoint): Call it.
2853 * server.h (set_trampoline_buffer_space): Declare.
2854 (claim_trampoline_space): Ditto.
2855 (have_fast_tracepoint_trampoline_buffer): Ditto.
2857 2011-11-14 Yao Qi <yao@codesourcery.com>
2859 * server.c (handle_query): Handle InstallInTrace for qSupported.
2860 * tracepoint.c (add_tracepoint): Sort list.
2861 (install_tracepoint, download_tracepoint): New.
2862 (cmd_qtdp): Call them to install and download tracepoints.
2863 (sort_tracepoints): Removed.
2864 (cmd_qtstart): Update.
2866 2011-11-14 Yao Qi <yao@codesourcery.com>
2868 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
2869 * mem-break.h: Declare.
2870 * tracepoint.c (cmd_qtstart): Move some code to ...
2871 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
2873 (download_tracepoints): Move some code to ...
2874 (download_tracepoint_1): ... here. New.
2876 2011-11-08 Yao Qi <yao@codesourcery.com>
2878 * remote-utils.c (relocate_instruction): A comment fix.
2880 2011-11-07 Joel Brobecker <brobecker@adacore.com>
2882 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
2883 (i386_dr_low_get_control, i386_dr_low_get_status): Use
2884 dr_status_mirror and dr_control_mirror from debug_reg_state.
2885 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
2886 (i386_initial_stuff): Remove use of deleted globals.
2887 (i386_get_thread_context, i386_set_thread_context,
2888 i386_thread_added): Use dr_status_mirror and dr_control_mirror
2889 from debug_reg_state.
2891 2011-11-05 Yao Qi <yao@codesourcery.com>
2893 * tracepoint.c (gdb_collect): Loop over tracepoints of same
2894 address as TPOINT's.
2896 2011-11-02 Stan Shebs <stan@codesourcery.com>
2898 * tracepoint.c (agent_mem_read_string): New function.
2899 (eval_agent_expr): Call it for tracenz.
2900 * server.c (handle_query): Report support for tracenz.
2902 2011-11-02 Yao Qi <yao@codesourcery.com>
2904 * tracepoint.c (cmd_qtstart): Remove unused local variables.
2906 2011-11-02 Yao Qi <yao@codesourcery.com>
2908 * target.h: Fix a typo in comment.
2910 2011-10-31 Pedro Alves <pedro@codesourcery.com>
2912 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
2913 clobber the breakpoints' shadows with fast tracepoint jumps.
2914 * mem-break.h (check_mem_write): Add `myaddr' parameter.
2915 * target.c (write_inferior_memory): Also pass MYADDR down to
2918 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
2920 * configure.ac: Check support for personality routine.
2921 * configure: Regenerate.
2922 * config.in: Likewise.
2923 * linux-low.c: Include <sys/personality.h>.
2924 Define ADDR_NO_RANDOMIZE if necessary.
2925 (linux_create_inferior): Disable address space randomization when
2926 forking inferior, if requested.
2927 (linux_supports_disable_randomization): New function.
2928 (linux_target_ops): Install it.
2929 * server.h (disable_randomization): Declare.
2930 * server.c (disable_randomization): New global variable.
2931 (handle_general_set): Handle QDisableRandomization.
2932 (handle_query): Likewise for qSupported.
2933 (main): Support --disable-randomization and --no-disable-randomization
2934 command line arguments.
2935 * target.h (struct target_ops): Add supports_disable_randomization.
2936 (target_supports_disable_randomization): New macro.
2938 2011-09-29 Mike Frysinger <vapier@gentoo.org>
2940 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
2942 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
2943 [!PT_GETDSBT] (target_loadmap): New definition.
2944 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
2945 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
2946 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
2947 and PT_GETDSBT to LINUX_LOADMAP.
2948 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
2949 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
2951 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2953 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
2954 (arm_linux_hwbp_cap): New static variable.
2955 (arm_linux_get_hwbp_cap): Replace by ...
2956 (arm_linux_init_hwbp_cap): ... this new function.
2957 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
2958 (arm_linux_get_hw_watchpoint_count): Likewise.
2959 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2960 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
2961 (arm_prepare_to_resume): Use perror_with_name instead of error.
2963 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2965 * linux-arm-low.c: Include <signal.h>.
2966 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
2967 (struct arm_linux_hwbp_cap): New data type.
2968 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
2969 (struct arm_linux_hw_breakpoint): New data type.
2970 (MAX_BPTS, MAX_WPTS): Define.
2971 (struct arch_process_info, struct arch_lwp_info): New data types.
2972 (arm_linux_get_hwbp_cap): New function.
2973 (arm_linux_get_hw_breakpoint_count): Likewise.
2974 (arm_linux_get_hw_watchpoint_count): Likewise.
2975 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2976 (arm_hwbp_control_initialize): Likewise.
2977 (arm_hwbp_control_is_enabled): Likewise.
2978 (arm_hwbp_control_is_initialized): Likewise.
2979 (arm_hwbp_control_disable): Likewise.
2980 (arm_linux_hw_breakpoint_equal): Likewise.
2981 (arm_linux_hw_point_initialize): Likewise.
2982 (struct update_registers_data): New data structure.
2983 (update_registers_callback: New function.
2984 (arm_insert_point): Likewise.
2985 (arm_remove_point): Likewise.
2986 (arm_stopped_by_watchpoint): Likewise.
2987 (arm_stopped_data_address): Likewise.
2988 (arm_new_process): Likewise.
2989 (arm_new_thread): Likewise.
2990 (arm_prepare_to_resume): Likewise.
2991 (the_low_target): Register arm_insert_point, arm_remove_point,
2992 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
2993 arm_new_thread, and arm_prepare_to_resume.
2995 2011-09-15 Stan Shebs <stan@codesourcery.com>
2997 * server.h (struct emit_ops): Add compare-goto fields.
2998 * tracepoint.c (gdb_agent_op_sizes): New table.
2999 (emit_eq_goto): New function.
3000 (emit_ne_goto): New function.
3001 (emit_lt_goto): New function.
3002 (emit_le_goto): New function.
3003 (emit_gt_goto): New function.
3004 (emit_ge_goto): New function.
3005 (is_goto_target): New function.
3006 (compile_bytecodes): Recognize special cases of compare-goto
3007 combinations and call specialized emitters for them.
3008 * linux-x86-low.c (amd64_emit_eq_goto): New function.
3009 (amd64_emit_ne_goto): New function.
3010 (amd64_emit_lt_goto): New function.
3011 (amd64_emit_le_goto): New function.
3012 (amd64_emit_gt_goto): New function.
3013 (amd64_emit_ge_goto): New function.
3014 (amd64_emit_ops): Add the new functions.
3015 (i386_emit_eq_goto): New function.
3016 (i386_emit_ne_goto): New function.
3017 (i386_emit_lt_goto): New function.
3018 (i386_emit_le_goto): New function.
3019 (i386_emit_gt_goto): New function.
3020 (i386_emit_ge_goto): New function.
3021 (i386_emit_ops): Add the new functions.
3023 2011-09-08 Stan Shebs <stan@codesourcery.com>
3025 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
3026 (i386_emit_epilogue): Restore %ebx.
3028 2011-08-31 Jie Zhang <jzhang918@gmail.com>
3030 * server.c (step_thread): Remove definition.
3031 (process_serial_event): Don't handle Hs.
3032 * server.h (step_thread): Remove declaration.
3033 * target.c (set_desired_inferior): Remove use of step_thread.
3035 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
3037 * linux-low.c: Include linux-procfs.h.
3038 (linux_attach_lwp_1): Update comments.
3039 (linux_attach): Scan for existing threads when attaching to a
3040 process that is the tgid.
3041 * Makefile.in: Update dependencies.
3043 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
3045 * configure.srv: Add linux-procfs.o dependencies.
3047 2011-08-14 Yao Qi <yao@codesourcery.com>
3049 * target.h (struct target_ops): Fix indent.
3050 * win32-low.c (win32_target_ops): Fix comment.
3052 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
3053 Yao Qi <yao@codesourcery.com>
3055 * Makefile.in (clean): Remove tic6x-*.c files.
3056 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
3057 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
3058 (tic6x-c64xp-linux.c): Likewise.
3059 * configure.srv: Add support for tic6x-*-uclinux.
3060 * linux-tic6x-low.c: New.
3061 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
3063 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
3064 Yao Qi <yao@codesourcery.com>
3066 * target.h (struct target_ops): Add read_loadmap.
3067 * linux-low.c (struct target_loadseg): New type.
3068 (struct target_loadmap): New type.
3069 (linux_read_loadmap): New function.
3070 (linux_target_ops): Add linux_read_loadmap.
3071 * server.c (handle_query): Support qXfer:fdpic:read packet.
3072 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
3075 2011-08-05 Eli Zaretskii <eliz@gnu.org>
3077 * win32-low.c: Include <stdint.h>.
3079 2011-07-22 Pedro Alves <pedro@codesourcery.com>
3081 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
3082 to the inferior here.
3083 (i386_remove_aligned_watchpoint): Ditto.
3084 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
3085 fit part of the watchpoint in the debug registers.
3086 (i386_update_inferior_debug_regs): New.
3087 (i386_low_insert_watchpoint): Work on a local mirror of the debug
3088 registers, and only update the inferior on success.
3089 (i386_low_remove_watchpoint): Ditto.
3091 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
3093 * linux-low.c (compare_ints, unique, list_threads, show_process,
3094 linux_core_of_thread): Delete.
3095 (linux_target_ops): Change linux_core_of_thread to
3096 linux_common_core_of_thread.
3097 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
3098 * utils.c (malloc_failure): Change type of argument.
3099 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
3100 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
3101 common/linux-osdata.c, common/ptid.c and common/buffer.c.
3102 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
3103 (IPA_OBJS): Add common-utils-ipa.o.
3104 (ptid_h, linux_osdata_h): New macros.
3105 (server_h): Add common/common-utils.h, common/xml-utils.h,
3106 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
3108 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
3109 ptid.o, buffer.o): New rules.
3110 (linux-low.o): Add common/linux-osdata.h as a dependency.
3111 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
3112 * configure.ac: Add AC_HEADER_DIRENT check.
3113 * config.in: Regenerate.
3114 * configure: Regenerate.
3115 * remote-utils.c (xml_escape_text): Delete.
3116 (buffer_grow, buffer_free, buffer_init, buffer_finish,
3117 buffer_xml_printf): Move to common/buffer.c.
3118 * server.c (main): Remove call to initialize_inferiors.
3119 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
3120 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
3121 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
3122 internal_error, gdb_assert, gdb_assert_fail): Delete.
3123 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
3124 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
3126 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
3127 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
3128 initialize_inferiors): Delete.
3130 2011-07-20 Pedro Alves <pedro@codesourcery.com>
3132 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
3135 2011-05-31 Pedro Alves <pedro@codesourcery.com>
3137 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
3139 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
3141 2011-05-26 Yao Qi <yao@codesourcery.com>
3143 * Makefile.in (thread-db.o): Track dependence to
3144 common/gdb_thread_db.h.
3145 * thread-db.c: include gdb_thread_db.h from right place.
3147 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
3149 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
3150 __FILE__ and __LINE__ to internal_error.
3152 2011-05-13 Doug Evans <dje@google.com>
3154 * thread-db.c (try_thread_db_load_from_sdir): New function.
3155 (try_thread_db_load_from_dir): New function.
3156 (thread_db_load_search): Handle $sdir, ignore $pdir.
3157 Remove trying of system directories if search of
3158 libthread-db-search-path fails, that is now done via $sdir.
3160 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
3162 * server.c (handle_query): Add EnableDisableTracepoints to the list
3163 of supported features.
3164 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
3166 (cmd_qtenable_disable): New.
3167 (cmd_qtstart): Install tracepoints even if disabled.
3168 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
3169 receiving a QTEnable or QTDisable packet.
3170 (gdb_collect): Skip data collection if fast tracepoint is disabled.
3171 (ust_marker_to_static_tracepoint): Do not ignore disabled static
3173 (gdb_probe): Skip data collection if static tracepoint is disabled.
3175 2011-05-10 Doug Evans <dje@google.com>
3177 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
3179 2011-05-04 Doug Evans <dje@google.com>
3181 * linux-low.c (linux_join): Skip process lookup.
3182 * spu-low.c (spu_join): Ditto.
3183 * server.c (join_inferiors_callback): Delete.
3184 (process_serial_event): For 'D' packet (detach) call join_inferior
3187 2011-05-04 Joseph Myers <joseph@codesourcery.com>
3189 * README: Don't mention xscale*-*-linux*.
3190 * configure.srv (xscale*-*-linux*): Don't handle target.
3192 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
3194 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
3196 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
3197 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
3198 (i386_emit_void_call_2): Likewise.
3200 2011-04-26 Yao Qi <yao@codesourcery.com>
3202 * linux-low.c: Move common macros to linux-ptrace.h.
3203 Include linux-ptrace.h.
3204 * Makefile.in (linux_ptrace_h): New.
3205 (linux-low.o): Depends on linux-ptrace.h.
3207 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3209 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
3210 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
3211 (remote_prepare): New function with most of the TCP code from ...
3212 (remote_open): ... here. Detect PORT here unconditionally. Move also
3213 setting transport_is_reliable.
3214 * server.c (run_once): New variable.
3215 (gdbserver_usage): Document it.
3216 (main): Set run_once for `--once'. Call remote_prepare. Exit after
3217 the first run if RUN_ONCE.
3218 * server.h (run_once, remote_prepare): New declarations.
3220 2011-04-19 Tom Tromey <tromey@redhat.com>
3222 * win32-low.c (handle_load_dll): Remove duplicate "the".
3224 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
3226 Remove support for old Cygwin 1.5 versions.
3227 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
3228 function to avoid warning.
3229 (win32_add_one_solib): Use cygwin_conv_path function to avoid
3232 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
3234 * gdbserver/server.h (Macro _): Define it if not available.
3236 2011-03-14 Michael Snyder <msnyder@vmware.com>
3238 * hostio.c (handle_close): Remove unnecessary null test.
3240 2011-03-10 Joel Brobecker <brobecker@adacore.com>
3242 * Makefile.in (maintainer-clean realclean distclean): Remove
3243 "make ... subdir_do" command.
3245 2011-03-10 Michael Snyder <msnyder@vmware.com>
3247 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
3249 * server.c (handle_v_run): Free alloced buffer on early return.
3251 2011-03-09 Yao Qi <yao@codesourcery.com>
3254 2011-03-04 Yao Qi <yao@codesourcery.com>
3256 * Makefile.in: Remove GNU make feature --directory.
3258 2011-03-05 Yao Qi <yao@codesourcery.com>
3260 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
3261 (subdir_do): New make target. Copied from gdb/Makefile.
3262 (maintainer-clean, realclean, distclean, clean): Call corresponding
3263 make targets in common/Makefile.
3265 2011-02-11 Yao Qi <yao@codesourcery.com>
3267 * configure.ac: Call AC_PROG_RANLIB.
3268 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3269 * configure: Regenerate.
3271 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3273 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
3275 2011-03-06 Yao Qi <yao@codesourcery.com>
3277 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
3279 2011-03-05 Yao Qi <yao@codesourcery.com>
3281 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
3282 (subdir_do): New make target. Copied from gdb/Makefile.
3283 (maintainer-clean, realclean, distclean, clean): Call corresponding
3284 make targets in common/Makefile.
3286 2011-03-04 Yao Qi <yao@codesourcery.com>
3288 * Makefile.in: Remove GNU make feature --directory.
3290 2011-03-04 Michael Snyder <msnyder@vmware.com>
3292 * server.c (queue_stop_reply): Call xmalloc not malloc.
3294 2011-03-02 Michael Snyder <msnyder@vmware.com>
3296 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
3298 2011-02-28 Michael Snyder <msnyder@vmware.com>
3300 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
3301 (cmd_qtframe): Ditto.
3302 (cmd_qtbuffer): Ditto.
3303 (cmd_bigqtbuffer): Ditto.
3305 * utils.c (decimal2str): Initialize 'width' to nine, then
3308 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3310 * hostio.c (require_data): Free *data, not data.
3312 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3314 * hostio.c (require_data): Use free, not xfree.
3316 2011-02-27 Michael Snyder <msnyder@vmware.com>
3318 * server.c (handle_query): Discard unused value.
3320 * hostio.c (require_data): Free malloc memory before returning
3323 2011-02-26 Michael Snyder <msnyder@vmware.com>
3325 * linux-low.c (list_threads): Call closedir for dirent.
3327 2011-02-27 Michael Snyder <msnyder@vmware.com>
3329 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
3330 a case statement falls through.
3332 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
3334 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
3337 2011-02-26 Michael Snyder <msnyder@vmware.com>
3339 * utils.c (decimal2str): Eliminate dead code and dead param.
3340 (pulongest): Drop dead param from call to decimal2str.
3343 2011-02-24 Joel Brobecker <brobecker@adacore.com>
3345 Revert the following patch (not approved yet):
3346 2011-02-21 Hui Zhu <teawater@gmail.com>
3347 * tracepoint.c (tp_printf): New function.
3348 (eval_agent_expr): Handle gdb_agent_op_printf.
3350 2011-02-21 Hui Zhu <teawater@gmail.com>
3352 * tracepoint.c (tp_printf): New function.
3353 (eval_agent_expr): Handle gdb_agent_op_printf.
3355 2011-02-18 Tom Tromey <tromey@redhat.com>
3357 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
3358 (tracepoint.o): Likewise.
3359 * tracepoint.c (enum gdb_agent_op): Use ax.def.
3360 (gdb_agent_op_names): Likewise.
3362 2011-02-18 Tom Tromey <tromey@redhat.com>
3364 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
3365 gdb_agent_op_rot>: New constants.
3366 (gdb_agent_op_names): Add pick and roll.
3367 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
3370 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3372 * aclocal.m4: Regenerated with aclocal-1.11.1.
3374 2011-02-14 Pedro Alves <pedro@codesourcery.com>
3376 * server.c (handle_qxfer_traceframe_info): New.
3377 (qxfer_packets): Register "traceframe-info".
3378 (handle_query): Report support for qXfer:traceframe-info:read+.
3379 * tracepoint.c (match_blocktype): New.
3380 (traceframe_find_block_type): Rename to ...
3381 (traceframe_walk_blocks): ... this. Add callback filter argument,
3383 (traceframe_find_block_type): New, reimplemented on top of
3384 traceframe_walk_blocks.
3385 (build_traceframe_info_xml): New.
3386 (traceframe_read_info): New.
3387 * server.h (traceframe_read_info): Declare.
3389 2011-02-11 Yao Qi <yao@codesourcery.com>
3391 * configure.ac: Call AC_PROG_RANLIB.
3392 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3393 * configure: Regenerate.
3395 2011-02-07 Pedro Alves <pedro@codesourcery.com>
3397 * server.c (gdb_read_memory): Change return semantics to allow
3399 (handle_search_memory_1): Adjust.
3400 (process_serial_event) <'m' packet>: Handle partial transfers.
3401 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
3403 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3405 * regcache.c (init_register_cache): Initialize
3406 regcache->register_status.
3407 (free_register_cache): Release regcache->register_status.
3408 (regcache_cpy): Copy register_status.
3409 (registers_to_string): Print 'x's for unavailable registers.
3410 (supply_register): Mark the register's status valid or
3411 unavailable, depending on whether a buffer was passed in or not.
3412 (supply_register_zeroed): New.
3413 (supply_regblock): Mark the registers' status valid or
3414 unavailable, depending on whether a buffer was passed in or not.
3415 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
3416 (struct regcache): New `register_status' field.
3417 (supply_register_zeroed): Declare.
3418 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
3419 supply_register_zeroed, rather than passing a NULL buffer to
3421 * tracepoint.c (fetch_traceframe_registers): Update comment.
3423 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3425 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
3428 2011-01-25 Pedro Alves <pedro@codesourcery.com>
3430 * server.h (decode_xfer_write): Change prototype.
3431 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
3432 and don't extract the annex here.
3433 * server.c (decode_xfer_read): Remove `annex' parameter,
3434 and don't extract the annex here.
3436 (struct qxfer): New.
3437 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
3438 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
3439 (handle_qxfer_statictrace): New functions, abstracted out from
3440 handle_query, and made to use the struct qxfer interface.
3441 (handle_threads_qxfer_proper): Rename to ...
3442 (handle_qxfer_threads_proper): ... this.
3443 (handle_threads_qxfer): Rename to ...
3444 (handle_qxfer_threads): ... this. Adjust.
3445 (qxfer_packets): New array.
3446 (handle_qxfer): New function.
3447 (handle_query): Use handle_qxfer.
3449 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
3451 * gdbreplay.c: Shorten lines of >= 80 columns.
3452 * linux-low.c: Ditto.
3453 * linux-ppc-low.c: Ditto.
3454 * linux-s390-low.c: Ditto.
3455 * linux-sparc-low.c: Ditto.
3456 * linux-x86-low.c: Ditto.
3457 * linux-xtensa-low.c: Ditto.
3458 * mem-break.c: Ditto.
3460 * regcache.h: Ditto.
3461 * remote-utils.c: Ditto.
3464 * thread-db.c: Ditto.
3465 * tracepoint.c: Ditto.
3467 * win32-low.h: Ditto.
3469 2011-01-05 Joel Brobecker <brobecker@adacore.com>
3471 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
3474 2011-01-01 Joel Brobecker <brobecker@adacore.com>
3476 * server.c (gdbserver_version): Update copyright year in version
3478 * gdbreplay.c (gdbreplay_version): Ditto.
3480 2010-12-29 Jie Zhang <jie.zhang@analog.com>
3482 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
3483 * linux-bfin-low.c: New file.
3484 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
3485 PT_DATA_ADDR for BFIN targets.
3486 * Makefile.in (SFILES): Add linux-bfin-low.c.
3487 (clean): Remove reg-bfin.c.
3488 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
3489 * README: Mention supported Blackfin targets.
3491 2010-12-23 Mike Frysinger <vapier@gentoo.org>
3493 * .gitignore: New file.
3495 2010-11-16 Mike Frysinger <vapier@gentoo.org>
3497 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
3499 2010-10-22 Jie Zhang <jie@codesourcery.com>
3501 * Makefile.in: Add FLAGS_TO_PASS variable.
3502 (install): Remove dependency of install-only and recursively
3503 invoke make for install-only.
3505 2010-10-04 Doug Evans <dje@google.com>
3507 * Makefile.in (uninstall): Use $(DESTDIR).
3509 2010-09-24 Pedro Alves <pedro@codesourcery.com>
3513 * linux-x86-low.c (compat_siginfo_from_siginfo)
3514 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
3515 si_code is < 0. Check for si_code == SI_TIMER before checking for
3518 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3520 * lynx-i386-low.c: New file.
3521 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
3523 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3525 * lynx-low.c (ptrace_request_to_str): Remove handling for
3526 request values that have been removed in LynxOS 5.x.
3528 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3530 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
3533 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
3535 * configure.ac: Add --enable-inprocess-agent option.
3536 * configure: Rebuilt.
3538 2010-09-06 Yao Qi <yao@codesourcery.com>
3540 * linux-low.c (linux_kill): Remove unused variable.
3541 (linux_stabilize_threads): Likewise.
3542 * server.c (start_inferior): Likewise.
3543 (queue_stop_reply_callback): Likewise.
3544 * tracepoint.c (do_action_at_tracepoint): Likewise.
3546 2010-09-06 Yao Qi <yao@codesourcery.com>
3548 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
3551 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3553 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
3555 2010-09-06 Pedro Alves <pedro@codesourcery.com>
3557 * Makefile.in (install-only): Replace $IPA_DEPFILES with
3560 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3562 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
3563 gdbserver/lynx-ppc-low.c: New files.
3564 * Makefile.in (lynx_low_h): New variable.
3565 (lynx-low.o, lynx-ppc-low.o): New rules.
3566 * configure.ac: On LynxOS, link with -lnetinet.
3567 * configure.srv: Add handling of powerpc-*-lynxos* targets.
3568 * configure: regenerate.
3570 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3572 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
3573 * configure.ac: Add check for vasprintf and vsnprintf.
3574 * configure, config.in: Regenerate.
3575 * server.h (vasprintf, vsnprintf): Add conditional declarations.
3577 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3579 * gdbreplay.c: Move include of alloca.h up, next to include of
3581 * server.h: Add include of malloc.h.
3582 * mem-break.c: Remove include of malloc.h.
3583 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
3585 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3587 * Makefile.in (memmem.o): Build with -Wno-error.
3589 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3591 * utils.c (xsnprintf): Make non-static.
3592 * server.h: Add xsnprintf declaration.
3593 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
3594 replace calls to snprintf by calls to xsnprintf throughout.
3596 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3598 * configure.ac: Add configure check for alloca.
3599 * configure, config.in: Regenerate.
3600 * server.h: Include alloca.h if it exists.
3601 * gdbreplay.c: Include alloca.h if it exists.
3603 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3605 * linux-low.c (__SIGRTMIN): Define if not already defined.
3606 (linux_create_inferior): Check for __ANDROID__ rather than
3608 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
3609 are already deferred.
3610 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
3611 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
3612 stopped and already has a pending signal to report.
3613 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
3614 a pending signal to report or is moving out of a jump pad.
3615 (linux_init_signals): Check for __ANDROID__ rather than
3618 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3620 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
3621 debug_threads check. Avoid a linear search when not doing debug
3624 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3626 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
3627 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
3628 (struct file_handler) <fd>: Change type to gdb_fildes_t.
3629 (process_event): Change local fd's type to gdb_fildes_t.
3630 (create_file_handler): Adjust prototype.
3631 (delete_file_handler): Adjust prototype.
3632 (handle_file_event): Adjust prototype. Use pfildes.
3633 (create_file_event): Adjsut prototype.
3634 * remote-utils.c (remote_desc, listen_desc): Change type to
3636 * server.h: New gdb_fildes_t typedef.
3637 [USE_WIN32API]: Include winsock2.h.
3638 (delete_file_handler, add_file_handler): Adjust prototypes.
3640 * utils.c (pfildes): New.
3642 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3644 * configure.ac (build_warnings): Add -Wno-char-subscripts.
3645 * configure: Regenerate.
3647 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3649 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
3650 (linux_done_accessing_memory): ... this.
3651 (linux_target_ops): Adjust.
3652 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
3653 * nto-low.c (nto_target_ops): Adjust comment.
3654 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
3655 * spu-low.c (spu_target_ops): Adjust comment.
3656 * target.h (target_ops): Rename unprepare_to_access_memory field
3657 to done_accessing_memory.
3658 (unprepare_to_access_memory): Rename to ...
3659 (done_accessing_memory): ... this.
3661 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3663 * linux-low.c (linux_prepare_to_access_memory): New.
3664 (linux_unprepare_to_access_memory): New.
3665 (linux_target_ops): Install them.
3666 * server.c (read_memory): Rename to ...
3667 (gdb_read_memory): ... this. Use
3668 prepare_to_access_memory/prepare_to_access_memory.
3669 (write_memory): Rename to ...
3670 (gdb_write_memory): ... this. Use
3671 prepare_to_access_memory/prepare_to_access_memory.
3672 (handle_search_memory_1): Adjust.
3673 (process_serial_event): Adjust.
3674 * target.h (struct target_ops): New fields
3675 prepare_to_access_memory and unprepare_to_access_memory.
3676 (prepare_to_access_memory, unprepare_to_access_memory): New.
3677 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
3678 prepare_to_access_memory/prepare_to_access_memory.
3679 * nto-low.c (nto_target_ops): Adjust.
3680 * spu-low.c (spu_target_ops): Adjust.
3681 * win32-low.c (win32_target_ops): Adjust.
3683 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3685 * Makefile.in (WARN_CFLAGS): Get it from configure.
3686 (WERROR_CFLAGS): New.
3687 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
3688 * configure.ac: Introduce --enable-werror, which adds -Werror to
3689 the compiler command line. Enabled by default. Disable with
3690 --disable-werror. Add -Wdeclaration-after-statement
3691 Wpointer-arith and -Wformat-nonliteral to warning flags.
3692 * configure: Regenerate.
3694 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3696 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
3698 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3700 * gdbreplay.c (remote_error): New.
3702 (expect): Use gdbchar. Check for error reading from GDB.
3703 Clarify sync error output.
3704 (play): Check for errors writing to GDB.
3705 * linux-low.c (sigchld_handler): Really ignore `write' errors.
3706 * remote-utils.c (getpkt): Check for errors writing to the remote
3709 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3711 * linux-low.c (linux_wait_1): Move non-debugging code out of
3712 `debug_threads' control.
3714 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3716 * linux-low.c (linux_wait_1): Don't set last_status here.
3717 * server.c (push_event, queue_stop_reply_callback): Assert we're
3718 not pushing a TARGET_WAITKIND_IGNORE event.
3719 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
3720 (myresume, handle_target_event): Set the thread's last_resume_kind
3721 and last_status from the target returned status.
3723 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3727 * linux-x86-low.c (update_debug_registers_callback): New.
3728 (i386_dr_low_set_addr): Use it.
3729 (i386_dr_low_get_addr): New.
3730 (i386_dr_low_set_control): Use update_debug_registers_callback.
3731 (i386_dr_low_get_control): New.
3732 (i386_dr_low_get_status): Adjust.
3733 * linux-low.c (linux_stop_lwp): New.
3734 * linux-low.h (linux_stop_lwp): Declare.
3736 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
3737 argument instead of a i386_debug_reg_state.
3738 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
3739 a i386_debug_reg_state.
3740 (i386_insert_aligned_watchpoint): Adjust.
3741 (i386_remove_aligned_watchpoint): Adjust.
3742 (i386_low_stopped_data_address): Read the debug registers from the
3743 inferior instead of from the mirrors.
3744 * i386-low.h (struct i386_debug_reg_state): Extend comment.
3745 (i386_dr_low_get_addr): Declare.
3746 (i386_dr_low_get_control): Declare.
3747 (i386_dr_low_get_status): Change prototype.
3749 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
3750 (i386_dr_low_get_addr): New.
3751 (i386_dr_low_get_control): New.
3752 (i386_dr_low_get_status): Adjust prototype. Return
3754 (i386_initial_stuff): Clear dr_status_mirror and
3756 (i386_get_thread_context): Adjust.
3757 (i386_set_thread_context): Adjust.
3758 (i386_thread_added): Adjust.
3760 2010-08-24 Pedro Alves <pedro@codesourcery.com>
3762 * linux-low.h (linux_thread_area): Delete declaration.
3764 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
3766 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
3767 after its termination.
3769 2010-08-09 Pedro Alves <pedro@codesourcery.com>
3771 * linux-low.c (gdb_wants_lwp_stopped): Delete.
3772 (gdb_wants_all_stopped): Delete.
3773 (linux_wait_1): Don't call them.
3774 * server.c (handle_v_cont): Tag all threads as want-stopped.
3775 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
3776 stopped as "client-wants-stopped".
3778 2010-07-31 Pedro Alves <pedro@codesourcery.com>
3780 * Makefile.in (signals_h): New.
3781 (server_h): Depend on it.
3782 (server.o): Don't depend on $(signals_def).
3783 (signals.o): Depend on $(signals_def).
3785 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
3787 * Makefile.in (signals_def): New.
3788 (server_h): Append include/gdb/signals.h and signals_def.
3789 (server.o): Append signals_def.
3791 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3793 * server.c (handle_target_event): Use target_signal_to_host for
3794 resume_info.sig initialization.
3795 * target.h (struct thread_resume) <sig>: New comment.
3797 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
3799 * server.c (handle_query): strcpy() the returned string from paddress()
3800 instead of sprintf().
3801 * utils.c (paddress): Return phex_nz().
3803 2010-07-07 Joel Brobecker <brobecker@adacore.com>
3805 * server.c (handle_v_cont): Call mourn_inferior if process
3807 (myresume): Likewise.
3809 2010-07-01 Pedro Alves <pedro@codesourcery.com>
3811 Static tracepoints, and integration with UST.
3813 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
3814 * mem-break.c (uninsert_all_breakpoints)
3815 (reinsert_all_breakpoints): New.
3816 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
3817 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
3818 (gdb_agent_ust_loaded, helper_thread_id)
3819 (gdb_agent_helper_thread_id): New macros.
3820 (struct ipa_sym_addresses): Add addr_ust_loaded,
3821 addr_helper_thread_id, addr_cmd_buf.
3822 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
3823 (in_process_agent_loaded_ust): New.
3824 (write_e_ust_not_loaded): New.
3825 (maybe_write_ipa_ust_not_loaded): New.
3826 (struct collect_static_trace_data_action): New.
3827 (enum tracepoint_type) <static_tracepoint>: New.
3828 (struct tracepoint) <handle>: Mention static tracepoints.
3829 (struct static_tracepoint_ctx): New.
3830 (CMD_BUF_SIZE): New.
3831 (add_tracepoint_action): Handle static tracepoint actions.
3832 (unprobe_marker_at): New.
3833 (clear_installed_tracepoints): Handle static tracepoints.
3834 (cmd_qtdp): Handle static tracepoints.
3835 (probe_marker_at): New.
3836 (cmd_qtstart): Handle static tracepoints.
3837 (response_tracepoint): Handle static tracepoints.
3838 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
3839 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
3840 (get_context_regcache): Handle static tracepoints.
3841 (do_action_at_tracepoint): Handle static tracepoint actions.
3842 (traceframe_find_block_type): Handle static trace data blocks.
3843 (traceframe_read_sdata): New.
3844 (download_tracepoints): Download static tracepoint actions.
3845 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
3846 (GDB_PROBE_NAME): New.
3851 (ust_marker_to_static_tracepoint): New.
3853 (collect_ust_data_at_tracepoint): New.
3854 (gdb_ust_probe): New.
3855 (UNIX_PATH_MAX, SOCK_DIR): New.
3856 (gdb_ust_connect_sync_socket): New.
3857 (resume_thread, stop_thread): New.
3858 (run_inferior_command): New.
3859 (init_named_socket): New.
3860 (gdb_ust_socket_init): New.
3861 (cstr_to_hexstr): New.
3863 (first_marker, next_marker): New.
3864 (response_ust_marker): New.
3865 (cmd_qtfstm, cmd_qtsstm): New.
3866 (unprobe_marker_at, probe_marker_at): New.
3867 (cmd_qtstmat, gdb_ust_thread): New.
3868 (gdb_ust_init): New.
3869 (initialize_tracepoint_ftlib): Call gdb_ust_init.
3870 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
3872 (x86_64_st_collect_regmap): New.
3873 (X86_64_NUM_ST_COLLECT_GREGS): New.
3874 (AMD64_RIP_REGNUM): New.
3875 (supply_static_tracepoint_registers): New.
3876 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
3878 (i386_st_collect_regmap): New.
3879 (i386_NUM_ST_COLLECT_GREGS): New.
3880 (supply_static_tracepoint_registers): New.
3881 * server.c (handle_query): Handle qXfer:statictrace:read.
3882 <qSupported>: Report support for StaticTracepoints, and
3883 qXfer:statictrace:read features.
3884 * server.h (traceframe_read_sdata)
3885 (supply_static_tracepoint_registers): Declare.
3886 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
3887 (unpack_varlen_hex): Include in IPA build.
3888 * Makefile.in (ustlibs, ustinc): New.
3889 (IPA_OBJS): Add remote-utils-ipa.o.
3890 ($(IPA_LIB)): Link -ldl and -lpthread.
3892 (IPAGENT_CFLAGS): Add UST_CFLAGS.
3893 * config.in, configure: Regenerate.
3895 2010-06-20 Ian Lance Taylor <iant@google.com>
3896 Pedro Alves <pedro@codesourcery.com>
3898 * linux-x86-low.c (always_true): Delete.
3899 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
3900 trying to fool the compiler with always_true.
3902 2010-06-20 Pedro Alves <pedro@codesourcery.com>
3904 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
3905 conditions in gdbserver.
3907 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
3909 * spu-low.c (spu_read_memory): Wrap around local store limit.
3910 (spu_write_memory): Likewise.
3912 2010-06-15 Pedro Alves <pedro@codesourcery.com>
3914 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
3915 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
3917 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
3919 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
3920 uses with LONGEST uses.
3922 2010-06-14 Stan Shebs <stan@codesourcery.com>
3923 Pedro Alves <pedro@codesourcery.com>
3927 * linux-x86-low.c: Include limits.h.
3932 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
3933 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
3934 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
3935 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
3936 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
3937 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
3938 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
3939 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
3940 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
3941 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
3942 (amd64_emit_void_call_2): New.
3943 (amd64_emit_ops): New.
3944 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
3945 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
3946 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
3947 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
3948 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
3949 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
3950 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
3951 (i386_emit_call, i386_emit_reg, i386_emit_pop)
3952 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
3953 (i386_emit_stack_adjust, i386_emit_int_call_1)
3954 (i386_emit_void_call_2): New.
3955 (i386_emit_ops): New.
3956 (x86_emit_ops): New.
3957 (the_low_target): Install x86_emit_ops.
3958 * server.h (struct emit_ops): New.
3959 (get_raw_reg_func_addr): Declare.
3960 (current_insn_ptr, emit_error): Declare.
3961 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
3962 (set_trace_state_variable_value): New defines.
3963 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
3964 addr_get_trace_state_variable_value and
3965 addr_set_trace_state_variable_value.
3966 (symbol_list): New fields for get_raw_reg,
3967 get_trace_state_variable_value and set_trace_state_variable_value.
3968 (condfn): New typedef.
3969 (struct tracepoint): New field `compiled_cond'.
3970 (do_action_at_tracepoint): Clear compiled_cond.
3971 (get_trace_state_variable_value, set_trace_state_variable_value):
3973 (condition_true_at_tracepoint): If there's a compiled condition,
3975 (current_insn_ptr, emit_error): New globals.
3976 (struct bytecode_address): New.
3977 (get_raw_reg_func_addr): New.
3978 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
3979 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
3980 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
3981 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
3982 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
3983 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
3984 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
3985 (compile_tracepoint_condition, compile_bytecodes): New.
3986 * target.h (emit_ops): Forward declare.
3987 (struct target_ops): New field emit_ops.
3988 (target_emit_ops): New.
3989 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
3990 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
3991 * linux-low.c (linux_emit_ops): New.
3992 (linux_target_ops): Install it.
3993 * linux-low.h (struct linux_target_ops): New field emit_ops.
3995 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
3997 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
3998 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
4000 2010-06-01 Pedro Alves <pedro@codesourcery.com>
4001 Stan Shebs <stan@codesourcery.com>
4003 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
4004 (all): Depend on $(extra_libraries).
4005 (install-only): Install the IPA.
4006 (IPA_OBJS, IPA_LIB): New.
4007 (clean): Remove the IPA lib.
4008 (IPAGENT_CFLAGS): New.
4009 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
4010 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
4011 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
4012 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
4013 * configure.ac: Check for atomic builtins support in the compiler.
4014 (IPA_DEPFILES, extra_libraries): Define.
4015 * configure.srv (ipa_obj): Add description.
4016 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
4017 (i[34567]86-*-linux*): Set ipa_obj.
4018 (x86_64-*-linux*): Set ipa_obj.
4019 * linux-low.c (stabilizing_threads): New.
4020 (supports_fast_tracepoints): New.
4021 (linux_detach): Stabilize threads before detaching.
4022 (handle_tracepoints): Handle internal tracing breakpoints. Assert
4023 the lwp is either not stabilizing, or is moving out of a jump pad.
4024 (linux_fast_tracepoint_collecting): New.
4025 (maybe_move_out_of_jump_pad): New.
4026 (enqueue_one_deferred_signal): New.
4027 (dequeue_one_deferred_signal): New.
4028 (linux_wait_for_event_1): If moving out of a jump pad, defer
4029 pending signals to later.
4030 (linux_stabilize_threads): New.
4031 (linux_wait_1): Check if threads need moving out of jump pads, and
4033 (stuck_in_jump_pad_callback): New.
4034 (move_out_of_jump_pad_callback): New.
4036 (linux_resume_one_lwp): Handle moving out of jump pads.
4037 (linux_set_resume_request): Dequeue deferred signals.
4038 (need_step_over_p): Also step over fast tracepoint jumps.
4039 (start_step_over): Also uninsert fast tracepoint jumps.
4040 (finish_step_over): Also reinsert fast tracepoint jumps.
4041 (linux_install_fast_tracepoint_jump): New.
4042 (linux_target_ops): Install linux_stabilize_threads and
4043 linux_install_fast_tracepoint_jump_pad.
4044 * linux-low.h (linux_target_ops) <get_thread_area,
4045 install_fast_tracepoint_jump_pad>: New fields.
4046 (struct lwp_info) <collecting_fast_tracepoint,
4047 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
4048 (linux_get_thread_area): Declare.
4049 * linux-x86-low.c (jump_insn): New.
4050 (x86_get_thread_area): New.
4051 (append_insns): New.
4053 (amd64_install_fast_tracepoint_jump_pad): New.
4054 (i386_install_fast_tracepoint_jump_pad): New.
4055 (x86_install_fast_tracepoint_jump_pad): New.
4056 (the_low_target): Install x86_get_thread_area and
4057 x86_install_fast_tracepoint_jump_pad.
4058 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
4059 (struct fast_tracepoint_jump): New.
4060 (fast_tracepoint_jump_insn): New.
4061 (fast_tracepoint_jump_shadow): New.
4062 (find_fast_tracepoint_jump_at): New.
4063 (fast_tracepoint_jump_here): New.
4064 (delete_fast_tracepoint_jump): New.
4065 (set_fast_tracepoint_jump): New.
4066 (uninsert_fast_tracepoint_jumps_at): New.
4067 (reinsert_fast_tracepoint_jumps_at): New.
4068 (set_breakpoint_at): Use write_inferior_memory.
4069 (uninsert_raw_breakpoint): Use write_inferior_memory.
4070 (check_mem_read): Mask out fast tracepoint jumps.
4071 (check_mem_write): Mask out fast tracepoint jumps.
4072 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
4073 (set_fast_tracepoint_jump): Declare.
4074 (delete_fast_tracepoint_jump)
4075 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
4076 (reinsert_fast_tracepoint_jumps_at): Declare.
4077 * regcache.c: Don't compile many functions when building the
4078 in-process agent library.
4079 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
4080 the register buffer in the heap.
4081 (free_register_cache): If the register buffer isn't owned by the
4082 regcache, don't free it.
4083 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
4084 pre-existing register caches.
4085 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
4087 (convert_ascii_to_int): : Constify `from' parameter type.
4088 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
4089 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
4090 the needed buffer in-place.
4091 (relocate_instruction): New.
4092 * server.c (handle_query) <qSymbols>: If the target supports
4093 tracepoints, give it a chance of looking up symbols. Report
4094 support for fast tracepoints.
4095 (handle_status): Stabilize threads.
4096 (process_serial_event): Adjust.
4097 * server.h (struct fast_tracepoint_jump): Forward declare.
4098 (struct process_info) <fast_tracepoint_jumps>: New field.
4099 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
4100 (decode_X_packet, decode_M_packet): Adjust.
4101 (relocate_instruction): Declare.
4102 (in_process_agent_loaded): Declare.
4103 (tracepoint_look_up_symbols): Declare.
4104 (struct fast_tpoint_collect_status): Declare.
4105 (fast_tracepoint_collecting): Declare.
4106 (force_unlock_trace_buffer): Declare.
4107 (handle_tracepoint_bkpts): Declare.
4108 (initialize_low_tracepoint)
4109 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
4110 * target.h (struct target_ops) <stabilize_threads,
4111 install_fast_tracepoint_jump_pad>: New fields.
4112 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
4113 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
4114 [HAVE_STDINT_H]: Include stdint.h.
4115 (trace_debug_1): Rename to ...
4116 (trace_vdebug): ... this.
4117 (trace_debug): Rename to ...
4118 (trace_debug_1): ... this. Add `level' parameter.
4120 (ATTR_USED, ATTR_NOINLINE): New.
4121 (IP_AGENT_EXPORT): New.
4122 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4123 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
4124 (about_to_request_buffer_space, trace_buffer_is_full)
4125 (stopping_tracepoint, expr_eval_result, error_tracepoint)
4126 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
4127 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
4128 (traceframe_write_count, traceframes_created)
4129 (trace_state_variables)
4130 New renaming defines.
4131 (struct ipa_sym_addresses): New.
4132 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
4134 (ipa_sym_addrs): New.
4135 (all_tracepoint_symbols_looked_up): New.
4136 (in_process_agent_loaded): New.
4137 (write_e_ipa_not_loaded): New.
4138 (maybe_write_ipa_not_loaded): New.
4139 (tracepoint_look_up_symbols): New.
4140 (debug_threads) [IN_PROCESS_AGENT]: New.
4141 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
4142 (UNKNOWN_SIDE_EFFECTS): New.
4143 (stop_tracing): New.
4144 (flush_trace_buffer): New.
4145 (stop_tracing_bkpt): New.
4146 (flush_trace_buffer_bkpt): New.
4147 (read_inferior_integer): New.
4148 (read_inferior_uinteger): New.
4149 (read_inferior_data_pointer): New.
4150 (write_inferior_data_pointer): New.
4151 (write_inferior_integer): New.
4152 (write_inferior_uinteger): New.
4153 (struct collect_static_trace_data_action): Delete.
4154 (enum tracepoint_type): New.
4155 (struct tracepoint) <type>: New field `type'.
4156 <actions_str, step_actions, step_actions_str>: Only include in
4158 <orig_size, obj_addr_on_target, adjusted_insn_addr>
4159 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
4160 (tracepoints): Use IP_AGENT_EXPORT.
4161 (last_tracepoint): Don't include in the IPA.
4162 (stopping_tracepoint): Use IP_AGENT_EXPORT.
4163 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
4164 (alloced_trace_state_variables): New.
4165 (trace_state_variables): Use IP_AGENT_EXPORT.
4166 (traceframe_t): Delete unused variable.
4167 (circular_trace_buffer): Don't include in the IPA.
4168 (trace_buffer_start): Delete.
4169 (struct trace_buffer_control): New.
4170 (trace_buffer_free): Delete.
4171 (struct ipa_trace_buffer_control): New.
4172 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
4173 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
4175 (trace_buffer_ctrl): New.
4176 (TRACE_BUFFER_CTRL_CURR): New.
4177 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
4178 Reimplement as macros.
4179 (trace_buffer_wrap): Delete.
4180 (traceframe_write_count, traceframe_read_count)
4181 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
4182 (struct tracepoint_hit_ctx) <type>: New field.
4183 (struct fast_tracepoint_ctx): New.
4184 (memory_barrier): New.
4186 (record_tracepoint_error): Update atomically in the IPA.
4187 (clear_inferior_trace_buffer): New.
4188 (about_to_request_buffer_space): New.
4189 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
4190 updating the same buffer.
4191 (add_tracepoint): Default the tracepoint's type to trap
4192 tracepoint, and orig_size to -1.
4193 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
4195 (create_trace_state_variable): New parameter `gdb'. Handle it.
4196 (clear_installed_tracepoints): Clear fast tracepoint jumps.
4197 (cmd_qtdp): Handle fast tracepoints.
4199 (max_jump_pad_size): New.
4200 (gdb_jump_pad_head): New.
4201 (get_jump_space_head): New.
4202 (claim_jump_space): New.
4203 (sort_tracepoints): New.
4204 (MAX_JUMP_SIZE): New.
4205 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
4207 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
4208 support. Upload fast traceframes, and delete internal IPA
4210 (stop_tracing_handler): New.
4211 (flush_trace_buffer_handler): New.
4212 (cmd_qtstop): Upload fast tracepoints.
4213 (response_tracepoint): Handle fast tracepoints.
4214 (tracepoint_finished_step): Upload fast traceframes. Set the
4215 tracepoint hit context's tracepoint type.
4216 (handle_tracepoint_bkpts): New.
4217 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
4218 type. Add comment about fast tracepoints.
4219 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
4220 non-existing action_str field.
4221 (get_context_regcache): Handle fast tracepoints.
4222 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
4224 (fast_tracepoint_from_jump_pad_address): New.
4225 (fast_tracepoint_from_ipa_tpoint_address): New.
4226 (collecting_t): New.
4227 (force_unlock_trace_buffer): New.
4228 (fast_tracepoint_collecting): New.
4231 (write_inferior_data_ptr): New.
4232 (target_tp_heap): New.
4233 (target_malloc): New.
4234 (download_agent_expr): New.
4236 (download_tracepoints): New.
4237 (download_trace_state_variables): New.
4238 (upload_fast_traceframes): New.
4239 (IPA_FIRST_TRACEFRAME): New.
4240 (IPA_NEXT_TRACEFRAME_1): New.
4241 (IPA_NEXT_TRACEFRAME): New.
4242 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
4243 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
4244 (gdb_jump_pad_buffer_end): New.
4245 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
4246 (initialize_tracepoint): Adjust.
4247 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
4248 buffer. Initialize the low module.
4249 * utils.c (PREFIX, TOOLNAME): New.
4250 (malloc_failure): Use PREFIX.
4251 (error): In the IPA, an error causes an exit.
4252 (fatal, warning): Use PREFIX.
4253 (internal_error): Use TOOLNAME.
4254 (NUMCELLS): Increase to 10.
4255 * configure, config.in: Regenerate.
4257 2010-06-01 Pedro Alves <pedro@codesourcery.com>
4259 * server.c (handle_query) <qSupported>: Do two passes over the
4260 qSupported string to avoid nesting strtok.
4262 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4264 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
4266 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
4268 * configure: Regenerate.
4269 * proc-service.list: New.
4271 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4273 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
4276 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
4278 * gdbreplay.c (remote_open): Check error return from socket() call by
4279 its equality to -1 not by it being negative.
4280 * remote-utils.c (remote_open): Likewise.
4282 2010-05-23 Pedro Alves <pedro@codesourcery.com>
4284 * config.h: Regenerate.
4286 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
4288 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
4289 doesn't provide PTRACE_GET_THREAD_AREA.
4291 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
4293 * linux-m68k-low.c: Include <asm/ptrace.h>
4294 (ps_get_thread_area): Implement.
4296 2010-05-03 Doug Evans <dje@google.com>
4298 * event-loop.c (struct callback_event): New struct.
4299 (callback_list): New global.
4300 (append_callback_event, delete_callback_event): New functions.
4301 (process_callback): New function.
4302 (start_event_loop): Call it.
4303 * remote-utils.c (NOT_SCHEDULED): Define.
4304 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
4305 moved out of readchar.
4306 (readchar): Rewrite. Call reschedule before returning.
4307 (reset_readchar): New function.
4308 (remote_close): Call it.
4309 (process_remaining, reschedule): New functions.
4310 * server.h (callback_handler_func): New typedef.
4311 (append_callback_event, delete_callback_event): Declare.
4313 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4315 * proc-service.c (ps_pglobal_lookup): Use
4316 thread_db_look_up_one_symbol.
4317 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
4318 parameter. Use it instead of all_symbols_looked_up.
4319 * server.h (struct process_info) <all_symbols_looked_up>: Delete
4321 (all_symbols_looked_up): Don't declare.
4322 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
4323 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
4325 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
4326 Set all_symbols_looked_up here.
4327 (thread_db_look_up_one_symbol): New.
4328 (thread_db_get_tls_address): Adjust.
4329 (thread_db_load_search, try_thread_db_load_1): Always allocate the
4330 thread_db object on the heap, and tentatively set it in the
4332 (thread_db_init): Don't set all_symbols_looked_up here.
4333 * linux-low.h (thread_db_look_up_one_symbol): Declare.
4335 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4337 * linux-low.c (linux_kill, linux_detach): Adjust.
4338 (status_pending_p_callback): Remove redundant statement. Check
4339 for !TARGET_WAITIKIND_IGNORE, instead of
4340 TARGET_WAITKIND_STOPPED.
4341 (handle_tracepoints): Make sure LWP is locked. Adjust.
4342 (linux_wait_for_event_1): Adjust.
4343 (linux_cancel_breakpoints): New.
4344 (unsuspend_one_lwp): New.
4345 (unsuspend_all_lwps): New.
4346 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
4347 (send_sigstop_callback): Change return type to int, add new
4348 `except' parameter and handle it.
4349 (suspend_and_send_sigstop_callback): New.
4350 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
4351 pass them down. If SUSPEND, also increment the lwp's suspend
4353 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
4354 (need_step_over_p): Don't consider suspended LWPs.
4355 (start_step_over): Adjust.
4356 (proceed_one_lwp): Change return type to int, add new `except'
4357 parameter and handle it.
4358 (unsuspend_and_proceed_one_lwp): New.
4359 (proceed_all_lwps): Use find_inferior instead of
4361 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
4362 also decrement the suspend count of LWPs. Pass `except' down,
4363 instead of hacking its suspend count.
4364 (linux_pause_all): Add `freeze' parameter. Adjust.
4365 (linux_unpause_all): New.
4366 (linux_target_ops): Install linux_unpause_all.
4367 * server.c (handle_status): Adjust.
4368 * target.h (struct target_ops): New fields `unpause_all' and
4369 `cancel_breakpoints'. Add new parameter to `pause_all'.
4370 (pause_all): Add new `freeze' parameter.
4372 (cancel_breakpoints): New.
4373 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
4375 (cmd_qtstart): Pause threads.
4376 (stop_tracing): Pause threads, and cancel breakpoints.
4377 * win32-low.c (win32_target_ops): Adjust.
4379 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4381 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
4382 the inferior right away from here...
4383 (linux_wait_1): ... to here, and adjust to check the thread's
4384 last_resume_kind instead of the lwp's step or stop_expected flags.
4386 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4388 * README: Use consistent `GDB' and `GDBserver' spellings.
4390 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4392 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
4393 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
4394 (linux_detach_one_lwp): Assume the lwp is stopped.
4395 (any_thread_of): Delete.
4396 (linux_detach): Stop all lwps here. Don't blindly delete all
4398 (delete_lwp_callback): New.
4399 (linux_mourn): Delete all lwps of the process that is gone.
4400 (linux_wait_1): Don't delete the last lwp of the process here.
4401 * mem-break.h (mark_breakpoints_out): Declare.
4402 * mem-break.c (mark_breakpoints_out): New.
4403 (free_all_breakpoints): Use it.
4404 * server.c (handle_target_event): If the process is gone, mark
4406 * thread-db.c (struct thread_db) <create_bp>: New field.
4407 (thread_db_enable_reporting): Fix prototype. Store a thread event
4408 breakpoint reference in the thread_db struct.
4409 (thread_db_load_search): Clear the thread_db object.
4410 (try_thread_db_load_1): Ditto.
4411 (switch_to_process): New.
4412 (disable_thread_event_reporting): Use it.
4413 (remove_thread_event_breakpoints): New.
4414 (thread_db_detach, thread_db_mourn): Use it.
4416 2010-05-01 Pedro Alves <pedro@codesourcery.com>
4418 * linux-low.c (linux_enable_event_reporting): New.
4419 (linux_wait_for_event_1, handle_extended_wait): Use it.
4421 2010-04-30 Pedro Alves <pedro@codesourcery.com>
4423 * linux-low.c (linux_kill_one_lwp, linux_kill)
4424 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
4425 (send_sigstop): Take an lwp_info as parameter instead. Queue a
4426 SIGSTOP even if the LWP is stopped.
4427 (send_sigstop_callback): New.
4428 (stop_all_lwps): Use send_sigstop_callback instead.
4429 (linux_resume_one_thread): Adjust.
4430 (proceed_one_lwp): Still proceed an LWP that the client has
4431 requested to stop, if we haven't reported it as stopped yet. Make
4432 sure that LWPs the client want stopped, have a pending SIGSTOP.
4434 2010-04-26 Doug Evans <dje@google.com>
4436 * server.c (handle_general_set): Make static.
4438 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
4439 Print received char after testing for error/eof instead of before.
4440 (input_interrupt): Tweak comment.
4442 2010-04-23 Doug Evans <dje@google.com>
4444 * server.c (start_inferior): Print inferior argv if --debug.
4446 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
4448 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
4449 * nto-x86-low.c: Include server.h
4451 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
4453 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
4454 be consistent with other sources of this directory.
4455 (init_registers_amd64): Correct name of source file of this function
4458 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4460 * configure.srv (x86_64-*-mingw*): New configuration for Windows
4463 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4465 * win32-i386-low.c: Add 64-bit support.
4466 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
4467 (init_registers_amd64): Declare.
4468 (mappings): Add 64-bit version of array.
4469 (init_windows_x86): New function.
4470 (the_low_target): Change init_arch field to init_windows_x86.
4472 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4474 * win32-low.c: Adapt to support also 64-bit architecture.
4475 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
4476 (get_image_name): Use SIZE_T type for local variable `done'.
4477 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
4478 (toolhelp_get_dll_name): Idem.
4479 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
4480 Use uintptr_t typecast to avoid warning.
4481 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
4482 (handle_exception): Use phex_nz to avoid warning.
4483 (win32_wait): Remove unused local variable `process'.
4485 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4487 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
4490 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
4492 * configure.ac: Use `ws2_32' library for srv_mingw.
4493 * configure: Regenerate.
4494 * gdbreplay.c: Include winsock2.h instead of winsock.h.
4495 * remote-utils.c: Likewise.
4497 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
4499 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
4500 if __x86_64__ is defined.
4502 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4504 * configure: Regenerate.
4506 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4508 * server.c (handle_query): Handle 'qGetTIBAddr' query.
4509 * target.h (target_ops): New get_tib_address field.
4510 * win32-low.h (win32_thread_info): Add thread_local_base field.
4511 * win32-low.c (child_add_thread): Add tlb argument.
4512 Set thread_local_base field to TLB.
4513 (get_child_debug_event): Adapt to child_add_thread change.
4514 (win32_get_tib_address): New function.
4515 (win32_target_ops): Set get_tib_address field to
4516 win32_get_tib_address.
4517 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
4519 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4521 * linux-low.c (linux_mourn): Also remove the process.
4522 * server.c (handle_target_event): Don't remove the process here.
4523 * nto-low.c (nto_mourn): New.
4524 (nto_target_ops): Install it.
4525 * spu-low.c (spu_mourn): New.
4526 (spu_target_ops): Install it.
4527 * win32-low.c (win32_mourn): New.
4528 (win32_target_ops): Install it.
4530 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4532 * server.h (buffer_xml_printf): Remove redundant `;'.
4534 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4536 * regcache.c (set_register_cache): Invalidate regcaches before
4537 changing the register cache layout.
4538 (regcache_invalidate_one): Allow a NULL regcache.
4539 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
4540 regcaches before changing the register cache layout or the target
4543 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
4545 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
4546 variable warning on Linux/x86-64.
4548 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4550 GDBserver disconnected tracing support.
4552 * linux-low.c (linux_remove_process): Delete.
4553 (add_lwp): Don't set last_resume_kind here.
4554 (linux_kill): Use `mourn'.
4555 (linux_detach): Use `thread_db_detach', and `mourn'.
4557 (linux_attach_lwp_1): Adjust comment.
4558 (linux_attach): last_resume_kind moved the thread_info; adjust.
4559 (status_pending_p_callback): Adjust.
4560 (linux_wait_for_event_1): Adjust.
4561 (count_events_callback, select_singlestep_lwp_callback)
4562 (select_event_lwp_callback, cancel_breakpoints_callback)
4563 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
4564 (proceed_one_lwp): Adjust.
4565 (linux_async): Add debug output.
4566 (linux_thread_stopped): New.
4567 (linux_pause_all): New.
4568 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
4570 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
4571 (thread_db_free): Delete declaration.
4572 (thread_db_detach, thread_db_mourn): Declare.
4573 * thread-db.c (thread_db_init): Use thread_db_mourn.
4574 (thread_db_free): Delete, split in two.
4575 (disable_thread_event_reporting): New.
4576 (thread_db_detach): New.
4577 (thread_db_mourn): New.
4579 * server.h (struct thread_info) <last_resume_kind>: New field.
4580 <attached>: Add comment.
4581 <gdb_detached>: New field.
4582 (handler_func): Change return type to int.
4583 (handle_serial_event, handle_target_event): Ditto.
4584 (gdb_connected): Declare.
4586 (disconnected_tracing): Declare.
4587 (stop_tracing): Declare.
4589 * server.c (handle_query) <qSupported>: Report support for
4590 disconnected tracing.
4591 (queue_stop_reply_callback): Account for running threads.
4592 (gdb_wants_thread_stopped): New.
4593 (gdb_wants_all_threads_stopped): New.
4594 (gdb_reattached_process): New.
4595 (handle_status): Clear the `gdb_detached' flag of all processes.
4596 In all-stop, stop all threads.
4597 (main): Be sure to leave tfind mode. Handle disconnected tracing.
4598 (process_serial_event): If the remote connection breaks, or if an
4599 exit was forced with "monitor exit", force an event loop exit.
4600 Handle disconnected tracing on detach.
4601 (handle_serial_event): Adjust.
4602 (handle_target_event): If GDB isn't connected, forward events back
4603 to the inferior, unless the last process exited, in which case,
4604 exit gdbserver. Adjust interface.
4606 * remote-utils.c (remote_open): Don't block in accept. Instead
4607 register an event loop source on the listen socket file
4608 descriptor. Refactor bits into ...
4609 (listen_desc): ... this new global.
4610 (gdb_connected): ... this new function.
4611 (enable_async_notification): ... this new function.
4612 (handle_accept_event): ... this new function.
4613 (remote_close): Clear remote_desc.
4615 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
4617 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
4619 (mourn_inferior): Define.
4620 (target_process_qsupported): Avoid the dangling else problem.
4621 (thread_stopped): Define.
4622 (pause_all): Define.
4623 (target_waitstatus_to_string): Declare.
4624 * target.c (target_waitstatus_to_string): New.
4626 * tracepoint.c (tracing): Make extern.
4627 (disconnected_tracing): New.
4628 (stop_tracing): Make extern. Handle tracing stops due to GDB
4630 (cmd_qtdisconnected): New.
4631 (cmd_qtstatus): Report disconnected tracing status in trace reply.
4632 (handle_tracepoint_general_set): Handle QTDisconnected.
4634 * event-loop.c (event_handler_func): Change return type to int.
4635 (process_event): Bail out if the event handler wants the event
4637 (handle_file_event): Ditto.
4638 (start_event_loop): Bail out if the event handler wants the event
4641 * nto-low.c (nto_target_ops): Adjust.
4642 * spu-low.c (spu_wait): Don't remove the process here.
4643 (spu_target_ops): Adjust.
4644 * win32-low.c (win32_wait): Don't remove the process here.
4645 (win32_target_ops): Adjust.
4647 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4649 * regcache.c (realloc_register_cache): Invalidate inferior's
4650 regcache before recreating it.
4652 2010-04-09 Pedro Alves <pedro@codesourcery.com>
4654 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
4656 2010-04-09 Stan Shebs <stan@codesourcery.com>
4657 Pedro Alves <pedro@codesourcery.com>
4659 * server.h (LONGEST): New.
4660 (struct thread_info) <while_stepping>: New field.
4661 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
4663 (initialize_tracepoint, handle_tracepoint_general_set)
4664 (handle_tracepoint_query, tracepoint_finished_step)
4665 (tracepoint_was_hit, release_while_stepping_state_list):
4666 (current_traceframe): Declare.
4667 * server.c (handle_general_set): Handle tracepoint packets.
4669 (write_memory): New.
4670 (handle_search_memory_1): Use read_memory.
4671 (handle_query): Report support for conditional tracepoints, trace
4672 state variables, and tracepoint sources. Handle tracepoint
4674 (main): Initialize the tracepoints module.
4675 (process_serial_event): Handle traceframe reads/writes.
4677 * linux-low.c (handle_tracepoints): New.
4678 (linux_wait_1): Call it.
4679 (linux_resume_one_lwp): Handle while-stepping.
4680 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
4681 (linux_target_ops): Install them.
4682 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
4684 * linux-x86-low.c (x86_supports_tracepoints): New.
4685 (the_low_target). Install it.
4687 * mem-break.h (delete_breakpoint): Declare.
4688 * mem-break.c (delete_breakpoint): Make external.
4690 * target.h (struct target_ops): Add `supports_tracepoints',
4691 `read_pc', and `write_pc' fields.
4692 (target_supports_tracepoints): Define.
4693 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
4696 * regcache.h (struct regcache) <registers_owned>: New field.
4697 (init_register_cache, regcache_cpy): Declare.
4698 (regcache_read_pc, regcache_write_pc): Declare.
4699 (register_cache_size): Declare.
4700 (supply_regblock): Declare.
4701 * regcache.c (init_register_cache): New.
4702 (new_register_cache): Use it.
4703 (regcache_cpy): New.
4704 (register_cache_size): New.
4705 (supply_regblock): New.
4706 (regcache_read_pc, regcache_write_pc): New.
4708 * tracepoint.c: New.
4710 * Makefile.in (OBS): Add tracepoint.o.
4711 (tracepoint.o): New rule.
4713 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
4715 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
4717 (i386-mmx.c): Likewise.
4718 (i386-mmx-linux.o): Likewise.
4719 (i386-mmx-linux.c): Likewise.
4721 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
4722 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
4723 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
4724 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
4726 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
4727 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
4728 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
4730 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
4732 * Makefile.in (clean): Updated.
4734 (i386-avx.c): Likewise.
4735 (i386-avx-linux.o): Likewise.
4736 (i386-avx-linux.c): Likewise.
4737 (amd64-avx.o): Likewise.
4738 (amd64-avx.c): Likewise.
4739 (amd64-avx-linux.o): Likewise.
4740 (amd64-avx-linux.c): Likewise.
4742 * configure.srv (srv_i386_regobj): Add i386-avx.o.
4743 (srv_i386_linux_regobj): Add i386-avx-linux.o.
4744 (srv_amd64_regobj): Add amd64-avx.o.
4745 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
4746 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
4747 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
4748 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
4749 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
4750 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
4751 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
4753 * i387-fp.c: Include "i386-xstate.h".
4755 (i387_cache_to_xsave): Likewise.
4756 (i387_xsave_to_cache): Likewise.
4757 (x86_xcr0): Likewise.
4759 * i387-fp.h (i387_cache_to_xsave): Likewise.
4760 (i387_xsave_to_cache): Likewise.
4761 (x86_xcr0): Likewise.
4763 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
4764 * linux-crisv32-low.c (target_regsets): Likewise.
4765 * linux-m68k-low.c (target_regsets): Likewise.
4766 * linux-mips-low.c (target_regsets): Likewise.
4767 * linux-ppc-low.c (target_regsets): Likewise.
4768 * linux-s390-low.c (target_regsets): Likewise.
4769 * linux-sh-low.c (target_regsets): Likewise.
4770 * linux-sparc-low.c (target_regsets): Likewise.
4771 * linux-xtensa-low.c (target_regsets): Likewise.
4773 * linux-low.c: Include <sys/uio.h>.
4774 (regsets_fetch_inferior_registers): Support nt_type.
4775 (regsets_store_inferior_registers): Likewise.
4776 (linux_process_qsupported): New.
4777 (linux_target_ops): Add linux_process_qsupported.
4779 * linux-low.h (regset_info): Add nt_type.
4780 (linux_target_ops): Add process_qsupported.
4782 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
4784 (init_registers_i386_avx_linux): New.
4785 (init_registers_amd64_avx_linux): Likewise.
4786 (xmltarget_i386_linux_no_xml): Likewise.
4787 (xmltarget_amd64_linux_no_xml): Likewise.
4788 (PTRACE_GETREGSET): Likewise.
4789 (PTRACE_SETREGSET): Likewise.
4790 (x86_fill_xstateregset): Likewise.
4791 (x86_store_xstateregset): Likewise.
4792 (use_xml): Likewise.
4793 (x86_linux_update_xmltarget): Likewise.
4794 (x86_linux_process_qsupported): Likewise.
4795 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
4796 (x86_arch_setup): Don't call init_registers_amd64_linux nor
4797 init_registers_i386_linux here. Call
4798 x86_linux_update_xmltarget.
4799 (the_low_target): Add x86_linux_process_qsupported.
4801 * server.c (handle_query): Call target_process_qsupported.
4803 * target.h (target_ops): Add process_qsupported.
4804 (target_process_qsupported): New.
4806 2010-04-03 Pedro Alves <pedro@codesourcery.com>
4808 * inferiors.c (add_thread): Set last_status kind to
4809 TARGET_WAITKIND_IGNORE.
4810 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
4811 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
4812 (linux_wait_1): Move `thread' local definition to block that uses
4813 it. Don't NULL initialize `event_child'.
4814 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
4815 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
4816 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
4818 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4820 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
4821 an extended waitstatus, or by a watchpoint.
4822 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
4823 thread was stepping or has been stopped by a watchpoint.
4825 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4827 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
4828 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
4829 of another, then delete the previous, and validate all
4831 (validate_inserted_breakpoint): New.
4832 (delete_disabled_breakpoints): New.
4833 (validate_breakpoints): New.
4834 (check_mem_read): Validate breakpoints before trusting their
4835 shadow. Delete disabled breakpoints.
4836 (check_mem_write): Validate breakpoints before trusting they
4837 should be inserted. Delete disabled breakpoints.
4838 * mem-break.h (validate_breakpoints):
4839 * server.c (handle_query): Validate breakpoints when we see a
4842 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4844 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
4845 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
4846 if we could tell there's a GDB breakpoint at stop_pc.
4847 (need_step_over_p): Don't do a step over if we find a GDB
4848 breakpoint at the resume PC.
4850 * mem-break.c (struct raw_breakpoint): New.
4851 (enum bkpt_type): New type `gdb_breakpoint'.
4852 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
4853 fields. New field `raw'.
4854 (find_raw_breakpoint_at): New.
4855 (set_raw_breakpoint_at): Handle refcounting. Create a raw
4857 (set_breakpoint_at): Adjust.
4858 (delete_raw_breakpoint): New.
4859 (release_breakpoint): New.
4860 (delete_breakpoint): Rename to...
4861 (delete_breakpoint_1): ... this. Add proc parameter. Use
4862 release_breakpoint. Return ENOENT.
4863 (delete_breakpoint): Reimplement.
4864 (find_breakpoint_at): Delete.
4865 (find_gdb_breakpoint_at): New.
4866 (delete_breakpoint_at): Delete.
4867 (set_gdb_breakpoint_at): New.
4868 (delete_gdb_breakpoint_at): New.
4869 (gdb_breakpoint_here): New.
4870 (set_reinsert_breakpoint): Use release_breakpoint.
4871 (uninsert_breakpoint): Rename to ...
4872 (uninsert_raw_breakpoint): ... this.
4873 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
4874 (reinsert_raw_breakpoint): Change parameter type to
4876 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
4878 (check_breakpoints): Adjust. Use release_breakpoint.
4879 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
4880 (breakpoint_inserted_here): Ditto.
4881 (check_mem_read): Adjust to iterate over raw breakpoints instead.
4882 Don't trust the breakpoint's shadow if it is not inserted.
4883 (check_mem_write): Adjust to iterate over raw breakpoints instead.
4884 (delete_all_breakpoints): Adjust.
4885 (free_all_breakpoints): Mark all breakpoints as uninserted, and
4886 use delete_breakpoint_1.
4888 * mem-break.h (breakpoints_supported): Delete declaration.
4889 (set_gdb_breakpoint_at): Declare.
4890 (gdb_breakpoint_here): Declare.
4891 (delete_breakpoint_at): Delete.
4892 (delete_gdb_breakpoint_at): Declare.
4894 * server.h (struct raw_breakpoint): Forward declare.
4895 (struct process_info): New field `raw_breakpoints'.
4897 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
4900 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4902 * linux-low.c (status_pending_p_callback): Fix comment.
4903 (linux_wait_for_event_1): Move most of the internal breakpoint
4904 handling from here...
4905 (linux_wait_1): ... to here.
4906 (count_events_callback): New.
4907 (select_singlestep_lwp_callback): New.
4908 (select_event_lwp_callback): New.
4909 (cancel_breakpoints_callback): New.
4910 (select_event_lwp): New.
4911 (linux_wait_1): Simplify internal breakpoint handling. Give equal
4912 priority to all LWPs that have had events that should be reported
4913 to the client. Cancel breakpoints when about to reporting the
4914 event to the client, not while stopping lwps. No longer cancel
4915 finished single-steps here.
4916 (cancel_finished_single_step): Delete.
4917 (cancel_finished_single_steps): Delete.
4919 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4921 * mem-break.c (enum bkpt_type): New.
4922 (struct breakpoint): New field `type'.
4923 (set_breakpoint_at): Change return type to struct breakpoint
4924 pointer. Set type to `other_breakpoint' by default.
4925 (delete_breakpoint): Rewrite, supporting more than one breakpoint
4926 in the breakpoint list.
4927 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
4928 (reinsert_breakpoint): Rename to ...
4929 (reinsert_raw_breakpoint): ... this.
4930 (reinsert_breakpoints_at): Adjust.
4931 * mem-break.h (struct breakpoint): Declare.
4932 (set_breakpoint_at): Change return type to struct breakpoint
4935 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4937 * server.c (handle_query): Assign, not compare.
4939 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4941 Teach linux gdbserver to step-over-breakpoints.
4943 * linux-low.c (can_hardware_single_step): New.
4944 (supports_breakpoints): New.
4945 (handle_extended_wait): If stopping threads, read the stop pc of
4948 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
4949 low target doesn't support retrieving the PC.
4950 (add_lwp): Set last_resume_kind to resume_continue.
4951 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
4952 (linux_attach): Don't clear stop_expected. Set the lwp's
4953 last_resume_kind to resume_stop.
4954 (linux_detach_one_lwp): Don't check for removed breakpoints.
4955 (check_removed_breakpoint): Delete.
4956 (status_pending_p): Rename to ...
4957 (status_pending_p_callback): ... this. Don't check for removed
4958 breakpoints. Don't consider threads that are stopped from GDB's
4960 (linux_wait_for_lwp): Always read the stop_pc here.
4961 (cancel_breakpoint): New.
4962 (step_over_bkpt): New global.
4963 (linux_wait_for_event_1): Implement stepping over breakpoints.
4964 (gdb_wants_lwp_stopped): New.
4965 (gdb_wants_all_stopped): New.
4966 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
4967 single-step traps here. Store the thread's last reported target
4969 (send_sigstop): Don't clear stop_expected. Always set it,
4971 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
4972 (cancel_finished_single_step): New.
4973 (cancel_finished_single_steps): New.
4974 (wait_for_sigstop): Don't cancel finished single-step traps here.
4975 (linux_resume_one_lwp): Don't check for removed breakpoints.
4976 Don't set `step' on non-hardware step archs.
4977 (linux_set_resume_request): Ignore resume_stop requests if already
4978 stopping or stopped. Set the lwp's last_resume_kind.
4979 (resume_status_pending_p): Don't check for removed breakpoints.
4980 (need_step_over_p): New.
4981 (start_step_over): New.
4982 (finish_step_over): New.
4983 (linux_resume_one_thread): Always queue a sigstop for resume_stop
4984 requests. Clear the thread's last reported target waitstatus.
4985 Don't use the `suspended' flag. Don't consider pending breakpoints.
4986 (linux_resume): Start a step-over if necessary.
4987 (proceed_one_lwp): New.
4988 (proceed_all_lwps): New.
4989 (unstop_all_lwps): New.
4990 * linux-low.h (struct lwp_info): Rewrite comment for the
4991 `suspended' flag. Add the `stop_pc' field. Delete the
4992 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
4993 Add `'last_resume_kind' and `need_step_over' fields.
4994 * inferiors.c (struct thread_info): Delete, moved elsewhere.
4995 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
4996 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
4997 (set_raw_breakpoint_at): New.
4998 (set_breakpoint_at): Rewrite to use it.
4999 (reinsert_breakpoint_handler): Delete.
5000 (set_reinsert_breakpoint): New.
5001 (reinsert_breakpoint_by_bp): Delete.
5002 (delete_reinsert_breakpoints): New.
5003 (uninsert_breakpoint): Rewrite.
5004 (uninsert_breakpoints_at): New.
5005 (reinsert_breakpoint): Rewrite.
5006 (reinsert_breakpoints_at): New.
5007 (check_breakpoints): Rewrite.
5008 (breakpoint_here): New.
5009 (breakpoint_inserted_here): New.
5010 (check_mem_read): Adjust.
5011 * mem-break.h (breakpoints_supported, breakpoint_here)
5012 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
5013 (reinsert_breakpoint_by_bp): Delete declaration.
5014 (delete_reinsert_breakpoints): Declare.
5015 (reinsert_breakpoint): Delete declaration.
5016 (reinsert_breakpoints_at): Declare.
5017 (uninsert_breakpoint): Delete declaration.
5018 (uninsert_breakpoints_at): Declare.
5019 (check_breakpoints): Adjust prototype.
5020 * server.h: Adjust include order.
5021 (struct thread_info): Declare here. Add a `last_status' field.
5023 2010-03-23 Michael Snyder <msnyder@vmware.com>
5025 * server.c (crc32): New function.
5026 (handle_query): Add handling for 'qCRC:' request.
5028 2010-03-23 Pedro Alves <pedro@codesourcery.com>
5030 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
5031 lwp had been stopped by a watchpoint.
5033 2010-03-16 Pedro Alves <pedro@codesourcery.com>
5035 * server.h (internal_error): Declare.
5036 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
5037 * utils.c (internal_error): New function.
5039 2010-03-15 Andreas Schwab <schwab@redhat.com>
5041 * configure.srv: Fix typo setting srv_regobj.
5043 2010-03-15 Pedro Alves <pedro@codesourcery.com>
5045 * linux-low.c (fetch_register): Avoid passing a non string literal
5047 (usr_store_inferior_registers): Ditto.
5049 2010-03-14 Pedro Alves <pedro@codesourcery.com>
5051 * linux-low.c (linux_write_memory): Bail out early if peeking
5054 2010-03-14 Pedro Alves <pedro@codesourcery.com>
5056 * linux-low.h (struct lwp_info): New fields
5057 `stopped_by_watchpoint' and `stopped_data_address'.
5058 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
5059 here, and cache them in the lwp object.
5060 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
5062 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
5064 (linux_stopped_by_watchpoint): Rewrite.
5065 (linux_stopped_data_address): Rewrite.
5067 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
5069 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
5070 switching the current inferior, not before.
5072 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
5074 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
5075 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
5076 i386-linux.c and amd64-linux.c.
5077 (reg-i386.o): Removed.
5078 (reg-i386.c): Likewise.
5079 (reg-i386-linux.o): Likewise.
5080 (reg-i386-linux.c): Likewise.
5081 (reg-x86-64.o): Likewise.
5082 (reg-x86-64.c): Likewise.
5083 (reg-x86-64-linux.o): Likewise.
5084 (reg-x86-64-linux.c): Likewise.
5087 (i386-linux.o): Likewise.
5088 (i386-linux.c): Likewise.
5089 (amd64.o): Likewise.
5090 (amd64.c): Likewise.
5091 (amd64-linux.o): Likewise.
5092 (amd64-linux.c): Likewise.
5094 * configure.srv (srv_i386_regobj): New.
5095 (srv_i386_linux_regobj): Likewise.
5096 (srv_amd64_regobj): Likewise.
5097 (srv_amd64_linux_regobj): Likewise.
5098 (srv_i386_32bit_xmlfiles): Likewise.
5099 (srv_i386_64bit_xmlfiles): Likewise.
5100 (srv_i386_xmlfiles): Likewise.
5101 (srv_amd64_xmlfiles): Likewise.
5102 (srv_i386_linux_xmlfiles): Likewise.
5103 (srv_amd64_linux_xmlfiles): Likewise.
5104 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
5105 srv_xmlfiles to $srv_i386_xmlfiles.
5106 (i[34567]86-*-mingw32ce*): Likewise.
5107 (i[34567]86-*-mingw*): Likewise.
5108 (i[34567]86-*-nto*): Likewise.
5109 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
5110 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
5111 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
5112 (x86_64-*-linux*): Likewise.
5114 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
5115 (init_registers_amd64_linux): New.
5116 (x86_arch_setup): Replace init_registers_x86_64_linux with
5117 init_registers_amd64_linux.
5119 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
5121 * configure.ac: Check for libdl. If it is not available link against
5122 static libthread_db.
5123 * configure: Regenerate.
5125 2010-02-22 Pedro Alves <pedro@codesourcery.com>
5129 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
5130 handing a read watchpoint.
5131 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
5133 2010-02-12 Doug Evans <dje@google.com>
5135 * linux-low.c (linux_supports_tracefork_flag): Document.
5136 (linux_look_up_symbols): Add comment.
5138 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
5140 * regcache.c (supply_register): Clear regcache if buf is NULL.
5142 2010-02-02 Nicolas Roche <roche@sourceware.org>
5143 Joel Brobecker <brobecker@adacore.com>
5145 * inferiors.c (find_inferior): Add function documentation.
5146 (unloaded_dll): Handle the case where the unloaded dll has not
5147 been previously registered in the dll list.
5149 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
5151 * linux-arm-low.c (thumb_breakpoint_len): Delete.
5152 (thumb2_breakpoint): New.
5153 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
5155 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5157 * linux-low.c (get_stop_pc): Check for SIGTRAP.
5158 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
5161 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5163 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
5165 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5167 * linux-s390-low.c (s390_collect_ptrace_register)
5168 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
5170 2010-01-21 Doug Evans <dje@google.com>
5172 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
5173 (PTRACE_ARG4_TYPE): New macro.
5174 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
5175 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
5176 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
5177 (usr_store_inferior_registers): Ditto.
5178 (linux_read_memory, linux_write_memory): Ditto.
5179 (linux_test_for_tracefork): Ditto.
5181 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
5182 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
5184 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5186 * proc-service.c (ps_lgetregs): Don't refetch registers from the
5189 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5191 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
5192 prototype to take a regcache. Adjust.
5194 2010-01-20 Pedro Alves <pedro@codesourcery.com>
5196 * regcache.h (struct thread_info): Forward declare.
5197 (struct regcache): New.
5198 (new_register_cache): Adjust prototype.
5199 (get_thread_regcache): Declare.
5200 (free_register_cache): Adjust prototype.
5201 (registers_to_string, registers_from_string): Ditto.
5202 (supply_register, supply_register_by_name, collect_register)
5203 (collect_register_as_string, collect_register_by_name): Ditto.
5204 * regcache.c (struct inferior_regcache_data): Delete.
5205 (get_regcache): Rename to ...
5206 (get_thread_regcache): ... this. Adjust. Switch inferior before
5208 (regcache_invalidate_one): Adjust.
5209 (regcache_invalidate): Fix prototype.
5210 (new_register_cache): Return the new register cache.
5211 (free_register_cache): Change prototype.
5212 (realloc_register_cache): Adjust.
5213 (registers_to_string): Change prototype to take a regcache. Adjust.
5214 (registers_from_string): Ditto.
5215 (register_data): Ditto.
5216 (supply_register): Ditto.
5217 (supply_register_by_name): Ditto.
5218 (collect_register): Ditto.
5219 (collect_register_as_string): Ditto.
5220 (collect_register_by_name): Ditto.
5221 * server.c (process_serial_event): Adjust.
5222 * linux-low.h (regset_fill_func, regset_store_func): Change
5224 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
5226 * linux-low.c (get_stop_pc): Adjust.
5227 (check_removed_breakpoint): Adjust.
5228 (linux_wait_for_event): Adjust.
5229 (linux_resume_one_lwp): Adjust.
5230 (fetch_register): Add regcache parameter. Adjust.
5231 (usr_store_inferior_registers): Ditto.
5232 (regsets_fetch_inferior_registers): Ditto.
5233 (regsets_store_inferior_registers): Ditto.
5234 (linux_fetch_registers, linux_store_registers): Ditto.
5235 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
5237 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
5239 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
5240 prototype to take a regcache.
5241 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
5242 * remote-utils.c (convert_ascii_to_int, outreg)
5243 (prepare_resume_reply): Change prototype to take a regcache.
5245 * target.h (struct target_ops) <fetch_registers, store_registers>:
5246 Change prototype to take a regcache.
5247 (fetch_inferior_registers, store_inferior_registers): Change
5248 prototype to take a regcache. Adjust.
5249 * proc-service.c (ps_lgetregs): Adjust.
5250 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
5251 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
5252 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
5253 take a regcache. Adjust.
5254 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
5255 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
5256 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
5257 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
5258 * linux-cris-low.c (cris_get_pc, cris_set_pc)
5259 (cris_cannot_fetch_register):
5260 (cris_breakpoint_at): Change prototype to take a regcache.
5262 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
5263 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
5264 to take a regcache. Adjust.
5265 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
5267 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
5268 take a regcache. Adjust.
5269 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
5270 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
5271 (m68k_set_pc): Change prototype to take a regcache. Adjust.
5272 * linux-mips-low.c (mips_get_pc):
5273 (mips_set_pc): Change prototype to take a regcache. Adjust.
5274 (mips_reinsert_addr): Adjust.
5275 (mips_collect_register): Change prototype to take a regcache.
5277 (mips_supply_register):
5278 (mips_collect_register_32bit, mips_supply_register_32bit)
5279 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
5280 (mips_store_fpregset): Ditto.
5281 * linux-ppc-low.c (ppc_supply_ptrace_register)
5282 (ppc_supply_ptrace_register): Ditto.
5283 (parse_spufs_run): Adjust.
5284 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
5285 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
5286 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
5287 take a regcache. Adjust.
5288 * linux-s390-low.c (s390_collect_ptrace_register)
5289 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
5290 (s390_set_pc): Change prototype to take a regcache. Adjust.
5291 (s390_arch_setup): Adjust.
5292 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
5293 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
5294 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5295 (sparc_fill_gregset, sparc_store_gregset_from_stack)
5296 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
5298 (sparc_breakpoint_at): Adjust.
5299 * linux-xtensa-low.c (xtensa_fill_gregset):
5300 (xtensa_store_gregset):
5301 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
5302 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
5303 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
5304 prototype to take a regcache. Adjust.
5305 * win32-arm-low.c (arm_fetch_inferior_register)
5306 (arm_store_inferior_register): Change prototype to take a
5308 * win32-i386-low.c (i386_fetch_inferior_register)
5309 (i386_store_inferior_register): Change prototype to take a
5311 * win32-low.c (child_fetch_inferior_registers)
5312 (child_store_inferior_registers): Change prototype to take a
5314 (win32_wait): Adjust.
5315 (win32_fetch_inferior_registers): Change prototype to take a
5317 (win32_store_inferior_registers): Adjust.
5318 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
5319 store_inferior_register>: Change prototype to take a regcache.
5321 2010-01-20 Doug Evans <dje@google.com>
5323 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
5325 (linux_wait_for_event1, linux_init_signals): Ditto.
5326 (W_STOPCODE): Provide definition if missing.
5328 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
5330 * linux-low.c (linux_core_of_thread): New.
5331 (compare_ints, show_process, list_threads): New.
5332 (linux_qxfer_osdata): Report threads and cores.
5333 (linux_target_op): Register linux_core_of_thread.
5334 * remote-utils.c (prepare_resume_reply): Report the core.
5335 (buffer_xml_printf): Support %d specifier.
5336 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
5338 (handle_query): Handle qXfer:threads. Announce availability
5340 * target.h (struct target_ops): New field core_of_thread.
5342 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
5344 * Makefile.in (clean): Remove new generated files.
5345 (reg-s390.o, reg-s390.c): Remove rules.
5346 (reg-s390x.o, reg-s390x.c): Likewise.
5347 (s390-linux32.o, s390-linux32.c): Add rules.
5348 (s390-linux64.o, s390-linux64.c): Likewise.
5349 (s390x-linux64.o, s390x-linux64.c): Likewise.
5350 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
5351 * linux-s390-low.c: Include <elf.h>.
5352 (HWCAP_S390_HIGH_GPRS): Define if undefined.
5353 (init_registers_s390): Remove prototype.
5354 (init_registers_s390x): Likewise.
5355 (init_registers_s390_linux32): Add prototype.
5356 (init_registers_s390_linux64): Likewise.
5357 (init_registers_s390x_linux64): Likewise.
5358 (s390_num_regs_3264): New define.
5359 (s390_regmap_3264): New global variable.
5360 (s390_cannot_fetch_register): Remove obsolete check.
5361 (s390_cannot_store_register): Likewise.
5362 (s390_collect_ptrace_register): Handle upper/lower register halves.
5363 (s390_supply_ptrace_register): Likewise.
5364 (s390_fill_gregset): Update to register number changes.
5365 (s390_get_hwcap): New routine.
5366 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
5367 Install appropriate regmap and register set.
5369 2010-01-01 Joel Brobecker <brobecker@adacore.com>
5371 * server.c (gdbserver_version): Update copyright year to 2010.
5372 * gdbreplay.c (gdbreplay_version): Likewise.
5374 2009-12-28 Doug Evans <dje@google.com>
5376 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
5377 elf/external.h. Include <elf.h> instead but only if necessary.
5379 2009-12-28 Pedro Alves <pedro@codesourcery.com>
5381 * linux-low.c (linux_remove_process): Remove `detaching'
5382 parameter. Don't release/detach from thread_db here.
5383 (linux_kill): Release/detach from thread_db here, ...
5384 (linux_detach): ... and here, before actually detaching.
5385 (linux_wait_1): ... and here, when a process exits.
5386 * thread-db.c (any_thread_of): New.
5387 (thread_db_free): Switch the current inferior to a thread of the
5390 2009-12-21 Doug Evans <dje@google.com>
5392 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
5394 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
5395 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
5396 warning ifndef __NR_tkill. Move setting of errno there too.
5397 Delete unnecessary resetting of errno after syscall.
5398 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
5400 * configure.ac: Check for dladdr.
5401 * config.in: Regenerate.
5402 * configure: Regenerate.
5403 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
5404 (try_thread_db_load): Update.
5406 * linux-low.c (my_waitpid): Delete unnecessary prototype.
5408 2009-12-18 Doug Evans <dje@google.com>
5410 * event-loop.c: Include unistd.h if it exists.
5412 * linux-low.c (my_waitpid): Move definition away from being in
5413 between linux_tracefork_child/linux_test_for_tracefork.
5415 * gdb_proc_service.h (psaddr_t): Fix type.
5416 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
5417 signature to match glibc.
5419 2009-12-16 Doug Evans <dje@google.com>
5421 * linux-low.c (linux_read_memory): Fix argument to read.
5423 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5425 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
5426 events, don't leave current_inferior pointing at null.
5428 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5430 * win32-low.c (LOG): Delete.
5431 (OUTMSG): Output to stderr.
5432 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
5433 on compile time LOG macro.
5434 (win32_wait): Fix debug output.
5436 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5438 * win32-low.c (win32_add_one_solib): If the dll name is
5439 "ntdll.dll", prepend the system directory to the dll path.
5441 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
5443 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
5445 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
5446 Vladimir Prus <vladimir@codesourcery.com>
5448 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
5449 * configure.ac: Check for __mcoldfire__ and set
5450 gdb_cv_m68k_is_coldfire.
5451 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
5452 reg-cf.o and reg-m68k.o.
5453 * configure: Regenerated.
5455 2009-11-16 Pedro Alves <pedro@codesourcery.com>
5457 * linux-low.c (linux_remove_process): Add `detaching' parameter.
5458 Pass it to thread_db_free.
5459 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
5460 proper `detaching' argument to linux_remove_process.
5461 * linux-low.h (thread_db_free): Add `detaching' parameter.
5462 * thread-db.c (thread_db_init): Pass false as `detaching' argument
5464 (thread_db_free): Add `detaching' parameter. Only
5465 call td_ta_clear_event if detaching from process.
5467 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
5469 * thread-db.c (thread_db_free): Fix typo.
5471 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
5474 * thread-db.c (thread_db_free): Call td_ta_clear_event.
5476 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
5478 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
5479 with an i686 compiler.
5480 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
5482 * configure: Rebuilt.
5484 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
5488 * server.c (handle_search_memory_1): Correct read_addr initialization
5489 in loop for searching subsequent chunks.
5491 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
5493 * configure.ac: New --with-libthread-db option.
5494 * thread-db.c: Allow direct dependence on libthread_db.
5495 (thread_db_free): Adjust.
5496 * config.in: Regenerate.
5497 * configure: Likewise.
5499 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
5502 * thread-db.c (attach_thread): New function.
5503 (maybe_attach_thread): Return success/failure.
5504 (find_new_threads_callback): Adjust.
5505 (thread_db_find_new_threads): Loop until no new threads.
5507 2009-10-13 Pedro Alves <pedro@codesourcery.com>
5509 * proc-service.c (ps_lgetregs): Formatting.
5511 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
5513 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
5514 * configure.ac: Adjust.
5515 * linux-low.h (struct process_info_private): Move members to struct
5517 (thread_db_free, thread_db_handle_monitor_command): New prototype.
5518 * linux-low.c (linux_remove_process): Adjust.
5519 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
5520 * server.c (handle_query): Move code ...
5521 (handle_monitor_command): ... here. New function.
5522 * target.h (struct target_ops): New member.
5523 * thread-db.c (struct thread_db): New.
5524 (libthread_db_search_path): New variable.
5525 (thread_db_create_event, thread_db_enable_reporting)
5526 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
5527 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
5528 (try_thread_db_load_1, dladdr_to_soname): New functions.
5529 (try_thread_db_load, thread_db_load_search): New functions.
5530 (thread_db_init): Search for libthread_db.
5531 (thread_db_free): New function.
5532 (thread_db_handle_monitor_command): Likewise.
5533 * config.in: Regenerate.
5534 * configure: Regenerate.
5536 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5538 * spu-low.c (spu_kill): Wait for inferior to terminate.
5539 Call clear_inferiors.
5540 (spu_detach): Call clear_inferiors.
5542 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5544 * aclocal.m4: Regenerate.
5545 * config.in: Likewise.
5546 * configure: Likewise.
5548 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5550 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
5551 (parse_spufs_run): New function.
5552 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
5553 (ppc_breakpoint_at): Handle SPU breakpoints.
5555 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5557 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
5558 (SPUFS_MAGIC): Define.
5559 (spu_enumerate_spu_ids): New function.
5560 (linux_qxfer_spu): New function.
5561 (linux_target_ops): Install linux_qxfer_spu.
5563 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5565 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
5566 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
5567 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
5568 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
5569 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
5570 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
5571 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
5572 (init_registers_powerpc_cell32l): Add prototype.
5573 (init_registers_powerpc_cell64l): Likewise.
5574 (ppc_arch_setup): Detect Cell/B.E. architecture.
5576 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5578 * Makefile.in (datarootdir): New variable.
5580 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5582 * linux-low.c (linux_write_memory): Update debugging output.
5583 * Makefile.in (clean): Add new descriptions.
5584 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
5585 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
5586 * configure.srv: Add new files for arm*-*-linux*.
5587 * linux-arm-low.c: Add new declarations.
5588 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
5589 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
5590 (HWCAP_VFPv3D16): New.
5591 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
5592 instead of __IWMMXT__.
5593 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
5594 (arm_arch_setup): New.
5595 (target_regsets): Remove #ifdef. Add VFP regset.
5596 (the_low_target): Use arm_arch_setup.
5598 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5600 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
5601 the main thread again.
5603 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
5605 Adding Neutrino gdbserver.
5606 * configure: Regenerated.
5607 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
5608 * configure.srv (i[34567]86-*-nto*): New target.
5609 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
5610 * remote-utils.c [__QNX__]: Include sys/iomgr.h
5611 (nto_comctrl) [__QNX__]: New function.
5612 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
5614 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
5616 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
5619 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
5620 Pedro Alves <pedro@codesourcery.com>
5622 * win32-i386-low.c (i386_get_thread_context): Handle systems that
5623 don't support CONTEXT_EXTENDED_REGISTERS.
5624 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
5625 (the_low_target): Install them.
5626 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
5627 failing with ERROR_PIPE_NOT_CONNECTED.
5629 2009-06-30 Doug Evans <dje@google.com>
5630 Pierre Muller <muller@ics.u-strasbg.fr>
5632 Add h/w watchpoint support to x86-linux, win32-i386.
5633 * Makefile.in (SFILES): Add i386-low.c
5634 (i386_low_h): Define.
5635 (i386-low.o): Add dependencies.
5636 (linux-x86-low.o): Add i386-low.h dependency.
5637 (win32-i386-low.o): Ditto.
5638 * i386-low.c: New file.
5639 * i386-low.h: New file.
5640 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
5641 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
5642 * linux-low.c (linux_add_process): Initialize arch_private.
5643 (linux_remove_process): Free arch_private.
5644 (add_lwp): Initialize arch_private.
5645 (delete_lwp): Free arch_private.
5646 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
5648 * linux-low.h (process_info_private): New member arch_private.
5649 (lwp_info): New member arch_private.
5650 (linux_target_ops): New members new_process, new_thread,
5652 (ptid_of): New macro.
5653 * linux-x86-low.c: Include stddef.h, i386-low.h.
5654 (arch_process_info): New struct.
5655 (arch_lwp_info): New struct.
5656 (x86_linux_dr_get, x86_linux_dr_set): New functions.
5657 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5658 (i386_dr_low_get_status): New function.
5659 (x86_insert_point, x86_remove_point): New functions.
5660 (x86_stopped_by_watchpoint): New function.
5661 (x86_stopped_data_address): New function.
5662 (x86_linux_new_process, x86_linux_new_thread): New functions.
5663 (x86_linux_prepare_to_resume): New function.
5664 (the_low_target): Add entries for insert_point, remove_point,
5665 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
5667 * server.c (debug_hw_points): New global.
5668 (monitor_show_help): Document set debug-hw-points.
5669 (handle_query): Process "set debug-hw-points".
5670 * server.h (debug_hw_points): Declare.
5671 (paddress): Declare.
5672 * utils.c (NUMCELLS, CELLSIZE): New macros.
5673 (get_sell, xsnprintf, paddress): New functions.
5674 * win32-arm-low.c (the_low_target): Add entries for insert_point,
5675 remove_point, stopped_by_watchpoint, stopped_data_address.
5676 * win32-i386-low.c: Include i386-low.h.
5677 (debug_reg_state): Replaces dr.
5678 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5679 (i386_dr_low_get_status): New function.
5680 (i386_insert_point, i386_remove_point): New functions.
5681 (i386_stopped_by_watchpoint): New function.
5682 (i386_stopped_data_address): New function.
5683 (i386_initial_stuff): Update.
5684 (get_thread_context,set_thread_context,i386_thread_added): Update.
5685 (the_low_target): Add entries for insert_point,
5686 remove_point, stopped_by_watchpoint, stopped_data_address.
5687 * win32-low.c (win32_insert_watchpoint): New function.
5688 (win32_remove_watchpoint): New function.
5689 (win32_stopped_by_watchpoint): New function.
5690 (win32_stopped_data_address): New function.
5691 (win32_target_ops): Add entries for insert_watchpoint,
5692 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
5693 * win32-low.h (win32_target_ops): New members insert_point,
5694 remove_point, stopped_by_watchpoint, stopped_data_address.
5696 2009-06-25 Pedro Alves <pedro@codesourcery.com>
5698 * server.c (process_serial_event): Re-return unsupported, not
5699 error, if the type isn't recognized. Re-allow supporting only
5700 insert or remove packets. Also call require_running for
5701 breakpoints. Add missing break statement to default case. Tidy.
5702 * target.h (struct target_ops): Rename insert_watchpoint to
5703 insert_point, and remove_watchpoint to remove_point.
5705 * linux-low.h (struct linux_target_ops): Likewise.
5706 * linux-low.c (linux_insert_watchpoint): Rename to ...
5707 (linux_insert_point): ... this. Adjust.
5708 (linux_remove_watchpoint): Rename to ...
5709 (linux_remove_point): ... this. Adjust.
5710 (linux_target_ops): Adjust.
5711 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
5712 (cris_insert_point): ... this.
5713 (cris_remove_watchpoint): Rename to ...
5714 (cris_remove_point): ... this.
5715 (the_low_target): Adjust.
5717 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
5719 * server.c (handle_v_kill): Pass signal_pid to
5720 kill_inferior if multi_process is zero.
5722 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
5724 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
5725 * target.h (target_ops): Comment for *_watchpoint to make it clear
5726 the functions can get types '0' and '1'.
5728 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
5730 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
5731 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
5732 * regcache.c (get_regcache): Likewise.
5733 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
5734 * win32-low.c (child_fetch_inferior_registers): Remove check for
5737 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
5738 Pedro Alves <pedro@codesourcery.com>
5740 * target.h (struct target_ops) <supports_multi_process>: New
5742 (target_supports_multi_process): New.
5743 * server.c (handle_query): Even if GDB reports support, only
5744 enable multi-process if the target also supports it. Report
5745 multi-process support only if the target backend supports it.
5746 * linux-low.c (linux_supports_multi_process): New function.
5747 (linux_target_ops): Install it as target_supports_multi_process
5750 2009-05-24 Doug Evans <dje@google.com>
5752 Global renaming of find_thread_pid to find_thread_ptid.
5753 * server.h (find_thread_ptid): Renamed from find_thread_pid.
5754 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
5755 All callers updated.
5757 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
5758 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
5761 * linux-low.c (get_stop_pc): Print pc if debug_threads.
5762 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
5763 (linux_resume_one_lwp): Ditto.
5765 2009-05-23 Doug Evans <dje@google.com>
5767 * linux-low.c (linux_resume_one_lwp): Change type of first arg
5768 from struct inferior_list_entry * to struct lwp_info *.
5769 All callers updated.
5771 2009-05-13 Doug Evans <dje@google.com>
5773 * linux-x86-low.c: Don't include assert.h.
5774 (x86_siginfo_fixup): Use fatal, not assert.
5775 (x86_arch_setup): Fix comment.
5777 2009-05-12 Doug Evans <dje@google.com>
5779 Biarch support for i386/amd64 gdbserver.
5780 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
5781 Add linux-x86-low.c.
5782 (linux-i386-low.o, linux-x86-64-low.o): Delete.
5783 (linux-x86-low.o): Add.
5784 * linux-x86-64-low.c: Delete.
5785 * linux-i386-low.c: Delete.
5786 * linux-x86-low.c: New file.
5787 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
5789 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
5791 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
5792 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
5793 (linux_child_pid_to_exec_file): New function.
5794 (elf_64_header_p, elf_64_file_p): New functions.
5795 (siginfo_fixup): New function.
5796 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
5797 give target a chance to convert layout.
5798 * linux-low.h (linux_target_ops): New member siginfo_fixup.
5799 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
5801 2009-05-07 Doug Evans <dje@google.com>
5803 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
5804 (regsets_store_inferior_registers): Ditto.
5806 2009-05-06 Pedro Alves <pedro@codesourcery.com>
5810 * linux-low.c (must_set_ptrace_flags): Delete.
5811 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
5813 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
5814 `lwp->must_set_ptrace_flags' instead.
5815 (linux_wait_for_event_1): Set ptrace options here.
5816 (linux_wait_1): ... not here.
5818 2009-04-30 Doug Evans <dje@google.com>
5820 * inferiors.c (started_inferior_callback): New function.
5821 (attached_inferior_callback): New function.
5822 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
5823 * server.c (print_started_pid, print_attached_pid): New functions.
5824 (detach_or_kill_for_exit): New function.
5825 (main): Call it instead of for_each_inferior (kill_inferior_callback).
5826 * server.h (have_started_inferiors_p): Declare.
5827 (have_attached_inferiors_p): Declare.
5829 * inferiors.c (remove_process): Fix memory leak, free process.
5830 * linux-low.c (linux_remove_process): New function.
5831 (linux_kill): Call it instead of remove_process.
5832 (linux_detach, linux_wait_1): Ditto.
5834 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
5836 * configure.srv: Add x86 Windows CE target.
5838 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5840 * inferiors.c (get_thread_process): Make global.
5841 * server.h (get_thread_process): Add prototype.
5842 * thread-db.c (find_one_thread): Use get_thread_process
5843 instead of current_process.
5844 (thread_db_get_tls_address): Do not crash if called when
5845 thread layer is not yet initialized.
5847 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5849 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
5850 * spu-low.c (current_tid): Rename to ...
5851 (current_ptid): ... this.
5852 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
5853 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
5854 ptid_get_lwp (current_ptid) instead of current_tid.
5855 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
5856 instead of current_tid. Use find_process_pid to verify pid
5857 argument is valid. Pass proper argument to remove_process.
5858 (spu_thread_alive): Compare current_ptid instead of current_tid.
5859 (spu_resume): Likewise.
5861 2009-04-02 Pedro Alves <pedro@codesourcery.com>
5863 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
5866 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5868 Implement the multiprocess extensions, and add linux multiprocess
5871 * server.h (ULONGEST): Declare.
5872 (struct ptid, ptid_t): New.
5873 (minus_one_ptid, null_ptid): Declare.
5874 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5875 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
5876 (struct inferior_list_entry): Change `id' type from unsigned from
5878 (struct sym_cache, struct breakpoint, struct
5879 process_info_private): Forward declare.
5880 (struct process_info): Declare.
5881 (current_process): Declare.
5882 (all_processes): Declare.
5883 (initialize_inferiors): Declare.
5884 (add_thread): Adjust to use ptid_t.
5885 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
5886 (add_process, remove_process, find_thread_pid): Declare.
5887 (find_inferior_id): Adjust to use ptid_t.
5888 (cont_thread, general_thread, step_thread): Change type to ptid_t.
5889 (multi_process): Declare.
5890 (push_event): Adjust to use ptid_t.
5891 (read_ptid, write_ptid): Declare.
5892 (prepare_resume_reply): Adjust to use ptid_t.
5893 (clear_symbol_cache): Declare.
5894 * inferiors.c (all_processes): New.
5895 (null_ptid, minus_one_ptid): New.
5896 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5897 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
5898 (add_thread): Change unsigned long to ptid. Remove gdb_id
5900 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
5901 (gdb_id_to_thread): Rename to ...
5902 (find_thread_pid): ... this. Change unsigned long to ptid.
5903 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
5904 (loaded_dll, pull_pid_from_list): Adjust.
5905 (add_process, remove_process, find_process_pid)
5906 (get_thread_process, current_process, initialize_inferiors): New.
5907 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
5908 (struct target_waitstatus) <related_pid>: Ditto.
5909 (struct target_ops) <kill, detach>: Add `pid' argument. Change
5911 (struct target_ops) <join>: Add `pid' argument.
5912 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
5913 (struct target_ops) <wait>: Add `ptid' field. Change return type
5915 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
5916 (mywait): Add `ptid' argument. Change return type to ptid_t.
5917 (target_pid_to_str): Declare.
5918 * target.c (set_desired_inferior): Adjust to use ptids.
5919 (mywait): Add new `ptid' argument. Adjust.
5920 (target_pid_to_str): New.
5921 * mem-break.h (free_all_breakpoints): Declare.
5922 * mem-break.c (breakpoints): Delelete.
5923 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
5924 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
5925 to use per-process breakpoint list.
5926 (free_all_breakpoints): New.
5927 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
5928 (symbol_cache, all_symbols_looked_up): Delete.
5930 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
5932 (prepare_resume_reply): Change ptid argument's type from unsigned
5933 long to ptid_t. Adjust. Implement W;process and X;process.
5934 (free_sym_cache, clear_symbol_cache): New.
5935 (look_up_one_symbol): Adjust to per-process symbol cache. *
5936 * server.c (cont_thread, general_thread, step_thread): Change type
5939 (multi_process): New.
5940 (last_ptid): Change type to ptid_t.
5941 (struct vstop_notif) <ptid>: Change type to ptid_t.
5942 (queue_stop_reply, push_event): Change `ptid' argument's type to
5944 (discard_queued_stop_replies): Add `pid' argument.
5945 (start_inferior): Adjust to use ptids. Adjust to mywait interface
5946 changes. Don't reference the `attached' global.
5947 (attach_inferior): Adjust to mywait interface changes.
5948 (handle_query): Adjust to use ptids. Parse GDB's qSupported
5949 features. Handle and report "multiprocess+". Handle
5951 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
5953 (handle_v_kill): New.
5954 (handle_v_stopped): Adjust to use target_pid_to_str.
5955 (handle_v_requests): Allow multiple attaches and runs when
5956 multiprocess extensions are in effect. Handle "vKill".
5957 (myresume): Adjust to use ptids.
5958 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
5959 (handle_status): Adjust to discard_queued_stop_replies interface
5961 (first_thread_of, kill_inferior_callback)
5962 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
5963 (main): Call initialize_inferiors. Adjust to use ptids, killing
5964 and detaching from all inferiors. Handle multiprocess packet
5966 * linux-low.h: Include gdb_proc_service.h.
5967 (struct process_info_private): New.
5968 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
5969 <lwpid_of>: Use ptid_get_lwp.
5970 (get_lwp_thread): Adjust.
5971 (struct lwp_info): Add `dead' member.
5972 (find_lwp_pid): Declare.
5973 * linux-low.c (thread_db_active): Delete.
5974 (new_inferior): Adjust comment.
5975 (inferior_pid): Delete.
5976 (linux_add_process): New.
5977 (handle_extended_wait): Adjust.
5978 (add_lwp): Change unsigned long to ptid.
5979 (linux_create_inferior): Add process to processes table. Adjust
5980 to use ptids. Don't set new_inferior here.
5981 (linux_attach_lwp): Rename to ...
5982 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
5983 it. Adjust to use ptids.
5984 (linux_attach_lwp): New.
5985 (linux_attach): Add process to processes table. Don't set
5987 (struct counter): New.
5988 (second_thread_of_pid_p, last_thread_of_process_p): New.
5989 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
5991 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
5992 processes. Remove process from process table.
5993 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
5994 to multiple processes.
5995 (any_thread_of): New.
5996 (linux_detach): Add `pid' argument, and handle it. Remove process
5997 from processes table.
5998 (linux_join): Add `pid' argument. Handle it.
5999 (linux_thread_alive): Change unsighed long argument to ptid_t.
6000 Consider dead lwps as not being alive.
6001 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
6002 threads we're not interested in.
6003 (same_lwp, find_lwp_pid): New.
6004 (linux_wait_for_lwp): Change `pid' argument's type from int to
6006 (linux_wait_for_event): Rename to ...
6007 (linux_wait_for_event_1): ... this. Change `pid' argument's type
6008 from int to ptid_t. Adjust.
6009 (linux_wait_for_event): New.
6010 (linux_wait_1): Add `ptid' argument. Change return type to
6011 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
6012 that exit from the process table.
6013 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
6015 (mark_lwp_dead): New.
6016 (wait_for_sigstop): Adjust to use ptids. If a process exits while
6017 stopping all threads, mark its main lwp as dead.
6018 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
6020 (fetch_register, usr_store_inferior_registers)
6021 (regsets_fetch_inferior_registers)
6022 (regsets_store_inferior_registers, linux_read_memory)
6023 (linux_write_memory): Inline `inferior_pid'.
6024 (linux_look_up_symbols): Adjust to use per-process
6026 (linux_request_interrupt): Adjust to use ptids.
6027 (linux_read_auxv): Inline `inferior_pid'.
6028 (initialize_low): Don't reference thread_db_active.
6029 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
6030 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
6031 (ps_getpid): Return the pid of the current inferior.
6032 * thread-db.c (proc_handle, thread_agent): Delete.
6033 (thread_db_create_event, thread_db_enable_reporting): Adjust to
6035 (find_one_thread): Change argument type to ptid_t. Adjust to
6037 (maybe_attach_thread): Adjust to per-process data and ptids.
6038 (thread_db_find_new_threads): Ditto.
6039 (thread_db_init): Ditto.
6040 * spu-low.c (spu_create_inferior, spu_attach): Add process to
6041 processes table. Adjust to use ptids.
6042 (spu_kill, spu_detach): Adjust interface. Remove process from
6044 (spu_join, spu_thread_alive): Adjust interface.
6045 (spu_wait): Adjust interface. Remove process from processes
6046 table. Adjust to use ptids.
6047 * win32-low.c (current_inferior_tid): Delete.
6048 (current_inferior_ptid): New.
6049 (debug_event_ptid): New.
6050 (thread_rec): Take a ptid. Adjust.
6051 (child_add_thread): Add `pid' argument. Adjust to use ptids.
6052 (child_delete_thread): Ditto.
6053 (do_initial_child_stuff): Add `attached' argument. Add process to
6055 (child_fetch_inferior_registers, child_store_inferior_registers):
6057 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
6058 (win32_attach): Pass 1 to do_initial_child_stuff.
6059 (win32_kill): Adjust interface. Remove process from processes
6061 (win32_detach): Ditto.
6062 (win32_join): Adjust interface.
6063 (win32_thread_alive): Take a ptid.
6064 (win32_resume): Adjust to use ptids.
6065 (get_child_debug_event): Ditto.
6066 (win32_wait): Adjust interface. Remove exiting process from
6069 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6071 Non-stop mode support.
6073 * server.h (non_stop): Declare.
6074 (gdb_client_data, handler_func): Declare.
6075 (delete_file_handler, add_file_handler, start_event_loop):
6077 (handle_serial_event, handle_target_event, push_event)
6078 (putpkt_notif): Declare.
6079 * target.h (enum resume_kind): New.
6080 (struct thread_resume): Replace `step' field by `kind' field.
6081 (TARGET_WNOHANG): Define.
6082 (struct target_ops) <wait>: Add `options' argument.
6083 <supports_non_stop, async, start_non_stop>: New fields.
6084 (target_supports_non_stop, target_async): New.
6085 (start_non_stop): Declare.
6086 (mywait): Add `options' argument.
6087 * target.c (mywait): Add `options' argument. Print child exit
6089 (start_non_stop): New.
6090 * server.c (non_stop, own_buf, mem_buf): New globals.
6091 (struct vstop_notif): New.
6092 (notif_queue): New global.
6093 (queue_stop_reply, push_event, discard_queued_stop_replies)
6094 (send_next_stop_reply): New.
6095 (start_inferior): Adjust to use resume_kind. Adjust to mywait
6097 (attach_inferior): In non-stop mode, don't wait for the target
6099 (handle_general_set): Handle QNonStop.
6100 (handle_query): When handling qC, return the current general
6101 thread, instead of the first thread of the list.
6102 (handle_query): If the backend supports non-stop mode, include
6103 QNonStop+ in the qSupported query response.
6104 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
6106 (handle_v_attach, handle_v_run): Handle non-stop mode.
6107 (handle_v_stopped): New.
6108 (handle_v_requests): Report support for vCont;t. Handle vStopped.
6109 (myresume): Adjust to use resume_kind. Handle non-stop.
6110 (queue_stop_reply_callback): New.
6111 (handle_status): Handle non-stop mode.
6112 (main): Clear non_stop flag on reconnection. Use the event-loop.
6113 Refactor serial protocol handling from here ...
6114 (process_serial_event): ... to this new function. When GDB
6115 selects any thread, select one here. In non-stop mode, wait until
6116 GDB acks all pending events before exiting.
6117 (handle_serial_event, handle_target_event): New.
6118 * remote-utils.c (remote_open): Install remote_desc in the event
6120 (remote_close): Remove remote_desc from the event loop.
6121 (putpkt_binary): Rename to...
6122 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
6123 (putpkt_binary): New as wrapper around putpkt_binary_1.
6124 (putpkt_notif): New.
6125 (prepare_resume_reply): In non-stop mode, don't change the
6127 * event-loop.c: New.
6128 * Makefile.in (OBJ): Add event-loop.o.
6129 (event-loop.o): New rule.
6131 * linux-low.h (pid_of): Moved here.
6133 (get_lwp_thread): Use lwpid_of.
6134 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
6135 * linux-low.c (pid_of): Delete.
6136 (inferior_pid): Use lwpid_of.
6137 (linux_event_pipe): New.
6138 (target_is_async_p): New.
6140 (handle_extended_wait): Use lwpid_of.
6141 (add_lwp): Don't set lwpid field.
6142 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
6143 (linux_kill_one_lwp): If killing a running lwp, stop it first.
6144 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
6145 (linux_detach_one_lwp): If detaching from a running lwp, stop it
6146 first. Adjust to linux_wait_for_event interface changes. Use
6148 (linux_detach): Don't delete the main lwp here.
6149 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
6150 (status_pending_p): Don't consider explicitly suspended lwps.
6151 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
6152 pointer. Add OPTIONS argument. Change return type to int. Use
6153 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
6154 (linux_wait_for_event): Take an integer pid instead of a lwp_info
6155 pointer. Add status pointer argument. Return a pid instead of a
6156 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
6157 changes. In non-stop mode, don't switch to a random thread.
6158 (linux_wait): Rename to...
6159 (linux_wait_1): ... this. Add target_options argument, and handle
6160 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
6161 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
6162 clean exit and signal exit code. Don't stop all threads in
6163 non-stop mode. In all-stop mode, only stop all threads when
6164 reporting a stop to GDB. Handle explicit thread stop requests.
6165 (async_file_flush, async_file_mark): New.
6167 (send_sigstop): Use lwpid_of.
6168 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
6169 interface changes. In non-stop mode, don't switch to a random
6171 (linux_resume_one_lwp): Use lwpid_of.
6172 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
6173 (linux_resume_one_thread): ... this. Handle resume_stop. In
6174 non-stop mode, don't look for pending flag in all threads.
6175 (resume_status_pending_p): Don't consider explicitly suspended
6177 (my_waitpid): Reimplement. Emulate __WALL.
6178 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
6180 (sigchld_handler, linux_supports_non_stop, linux_async)
6181 (linux_start_non_stop): New.
6182 (linux_target_ops): Register linux_supports_non_stop, linux_async
6183 and linux_start_non_stop.
6184 (initialize_low): Install SIGCHLD handler.
6185 * thread-db.c (thread_db_create_event, find_one_thread)
6186 (thread_db_get_tls_address): Use lwpid_of.
6187 * win32-low.c (win32_detach): Adjust to use resume_kind.
6188 (win32_wait): Add `options' argument.
6189 * spu-low.c (spu_resume): Adjust to use resume_kind.
6190 (spu_wait): Add `options' argument.
6192 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6194 Decouple target code from remote protocol.
6196 * target.h (enum target_waitkind): New.
6197 (struct target_waitstatus): New.
6198 (struct target_ops) <wait>: Return an unsigned long. Take a
6199 target_waitstatus pointer instead of a char pointer.
6201 * target.c (mywait): Change prototype to return an unsigned long.
6202 Take a target_waitstatus pointer instead of a char pointer. Adjust.
6203 * server.h (thread_from_wait, old_thread_from_wait): Delete
6205 (prepare_resume_reply): Change prototype to take a
6207 * server.c (thread_from_wait, old_thread_from_wait): Delete.
6208 (last_status, last_ptid): New.
6209 (start_inferior): Remove "statusptr" argument. Adjust. Return a
6210 pid instead of a signal.
6211 (attach_inferior): Remove "status" and "signal" parameters.
6213 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
6215 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
6216 (handle_v_requests, myresume): Remove "status" and "signal"
6218 (handle_status): New.
6219 (main): Delete local `status'. Adjust.
6220 * remote-utils.c: Include target.h.
6221 (prepare_resume_reply): Change prototype to take a
6222 target_waitstatus. Adjust.
6224 * linux-low.c (linux_wait): Adjust to new target_ops->wait
6226 * spu-low.c (spu_wait): Adjust.
6227 * win32-low.c (enum target_waitkind, struct target_waitstatus):
6229 (win32_wait): Adjust.
6231 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6233 * target.h (struct thread_resume): Delete leave_stopped member.
6234 (struct target_ops): Add a `n' argument to the `resume' callback.
6235 * server.c (start_inferior): Adjust.
6236 (handle_v_cont, myresume): Adjust.
6237 * linux-low.c (check_removed_breakpoint): Adjust to resume
6238 interface change, and to removed leave_stopped field.
6239 (resume_ptr): Delete.
6240 (struct thread_resume_array): New.
6241 (linux_set_resume_request): Add new `arg' parameter. Adjust to
6242 resume interface change.
6243 (linux_continue_one_thread, linux_queue_one_thread)
6244 (resume_status_pending_p): Check if the resume field is NULL
6245 instead of checking the leave_stopped member.
6246 (linux_resume): Adjust to the target resume interface change.
6247 * spu-low.c (spu_resume): Adjust to the target resume interface
6249 * win32-low.c (win32_detach, win32_resume): Ditto.
6251 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6253 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
6255 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
6257 (linux_continue_one_thread): Only preserve the stepping flag if
6258 there's a pending breakpoint.
6260 2009-03-31 Pedro Alves <pedro@codesourcery.com>
6262 * server.c (main): After the inferior having exited, call
6263 remote_close before exiting gdbserver.
6265 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
6267 Fix size of FPSCR in Power 7 processors.
6268 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
6269 (PPC_FEATURE_HAS_DFP): New #define.
6270 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
6273 2009-03-23 Pedro Alves <pedro@codesourcery.com>
6275 * server.c (handle_query) Whitespace and formatting.
6277 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6279 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
6280 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
6281 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
6282 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
6283 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
6284 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
6285 Makefile.in, configure.ac: Fix whitespace throughout.
6286 * configure: Regenerate.
6288 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6290 * inferiors.c (find_inferior): Make it safe for the callback
6291 function to delete the currently iterated inferior.
6293 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6295 * Makefile.in (linuw_low_h): Move higher.
6296 (thread-db.o): Depend on $(linux_low_h).
6298 2009-03-17 Pedro Alves <pedro@codesourcery.com>
6300 Rename "process" to "lwp" throughout.
6302 * linux-low.c (all_processes): Rename to...
6303 (all_lwps): ... this.
6304 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
6305 (add_process): Rename to ...
6306 (add_lwp): ... this. Adjust.
6307 (linux_create_inferior): Adjust.
6308 (linux_attach_lwp): Adjust.
6309 (linux_attach): Adjust.
6310 (linux_kill_one_process): Rename to ...
6311 (linux_kill_one_lwp): ... this. Adjust.
6312 (linux_kill): Adjust.
6313 (linux_detach_one_process): Rename to ...
6314 (linux_detach_one_lwp): ... this. Adjust.
6315 (linux_detach): Adjust.
6316 (check_removed_breakpoint): Adjust.
6317 (status_pending_p): Adjust.
6318 (linux_wait_for_process): Rename to ...
6319 (linux_wait_for_lwp): ... this. Adjust.
6320 (linux_wait_for_event): Adjust.
6321 (send_sigstop): Adjust.
6322 (wait_for_sigstop): Adjust.
6323 (stop_all_processes): Rename to ...
6324 (stop_all_lwps): ... this.
6325 (linux_resume_one_process): Rename to ...
6326 (linux_resume_one_lwp): ... this. Adjust.
6327 (linux_set_resume_request, linux_continue_one_thread)
6328 (linux_queue_one_thread, resume_status_pending_p)
6329 (usr_store_inferior_registers, regsets_store_inferior_registers)
6330 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
6332 * linux-low.h (get_process): Rename to ...
6333 (get_lwp): ... this. Adjust.
6334 (get_thread_process): Rename to ...
6335 (get_thread_lwp): ... this. Adjust.
6336 (get_process_thread): Rename to ...
6337 (get_lwp_thread): ... this. Adjust.
6338 (struct process_info): Rename to ...
6339 (struct lwp_info): ... this.
6340 (all_processes): Rename to ...
6341 (all_lwps): ... this.
6342 * proc-service.c (ps_lgetregs): Adjust.
6343 * thread-db.c (thread_db_create_event, find_one_thread)
6344 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
6346 2009-03-14 Pedro Alves <pedro@codesourcery.com>
6348 * server.c (handle_query): Handle "qAttached".
6350 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
6352 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
6353 GPLv3, update license URL.
6355 2009-03-01 Doug Evans <dje@google.com>
6357 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
6358 (server_h): Add gdb_signals.h.
6359 (signals.o): Update.
6360 * server.h (target_signal_from_host,target_signal_to_host_p)
6361 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
6363 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
6365 * remote-utils.c (getpkt): Also generate remote-debug
6366 information if noack_mode is set.
6368 2009-02-06 Pedro Alves <pedro@codesourcery.com>
6370 * server.c (handle_query): Report qXfer:siginfo:read and
6371 qXfer:siginfo:write as supported and handle them.
6372 * target.h (struct target_ops) <qxfer_siginfo>: New field.
6373 * linux-low.c (linux_xfer_siginfo): New.
6374 (linux_target_ops): Set it.
6376 2009-01-26 Pedro Alves <pedro@codesourcery.com>
6378 * server.c (gdbserver_usage): Mention --remote-debug.
6379 (main): Accept '--remote-debug' switch.
6381 2009-01-18 Doug Evans <dje@google.com>
6383 * regcache.c (new_register_cache): No need to check result of xcalloc.
6384 * server.c (handle_search_memory): Back out calls to xmalloc,
6385 result is checked and error is returned to user upon failure.
6386 (handle_query): Ditto. Add more checks for result of malloc.
6387 (handle_v_cont): Check result of malloc, report error back to
6389 (handle_v_run): Ditto. Call freeargv.
6390 * server.h (freeargv): Declare.
6391 * utils.c (freeargv): New fn.
6393 2009-01-15 Doug Evans <dje@google.com>
6395 * gdbreplay.c (perror_with_name): Make arg const char *.
6396 * server.h (target_signal_to_name): Make return type const char *.
6397 * thread-db.c (thread_db_err_str): Make return type const char *.
6398 * utils.c (perror_with_name): Make arg const char *.
6400 2009-01-14 Pedro Alves <pedro@codesourcery.com>
6402 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
6403 when handling a EXIT_PROCESS_DEBUG_EVENT.
6405 2009-01-06 Joel Brobecker <brobecker@adacore.com>
6407 * gdbreplay.c (gdbreplay_version): Update copyright year.
6408 * server.c (gdbserver_version): Likewise.
6410 2009-01-05 Doug Evans <dje@google.com>
6412 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
6413 (handle_extended_wait): Improve comment.
6415 2008-12-13 Doug Evans <dje@google.com>
6417 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
6418 * server.h (ATTR_MALLOC): New macro.
6419 (xmalloc,xcalloc,xstrdup): Declare.
6420 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
6421 * inferiors.c: Ditto.
6422 * linux-low.c: Ditto.
6423 * mem-break.c: Ditto.
6424 * regcache.c: Ditto.
6425 * remote-utils.c: Ditto.
6428 * win32-low.c: Ditto.
6430 2008-12-12 Doug Evans <dje@google.com>
6432 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
6433 in debugging printf.
6435 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
6437 2008-12-09 Doug Evans <dje@google.com>
6439 * linux-low.h (struct process_info): Delete member tid, unused.
6440 * thread-db.c (find_one_thread): Update.
6441 (maybe_attach_thread): Update.
6443 2008-12-02 Pedro Alves <pedro@codesourcery.com>
6445 * target.h (struct target_ops): Add qxfer_osdata member.
6446 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
6448 (linux_qxfer_osdata): New functions.
6449 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
6451 * server.c (handle_query): Handle "qXfer:osdata:read:".
6452 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
6453 (buffer_xml_printf): New functions.
6454 * server.h (struct buffer): New.
6455 (buffer_grow_str, buffer_grow_str0): New macros.
6456 (buffer_grow, buffer_free, buffer_init, buffer_finish)
6457 (buffer_xml_printf): Declare.
6459 2008-11-24 Doug Evans <dje@google.com>
6461 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
6463 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
6465 * server.c (handle_v_run): Always use the supplied argument list.
6467 2008-11-19 Bob Wilson <bob.wilson@acm.org>
6469 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
6470 (xtensa_regmap_table): Add entry for scompare1.
6472 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
6474 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
6475 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
6476 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
6477 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
6478 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
6479 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
6480 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
6481 XML target descriptions.
6482 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
6483 when inferior is running on an ISA 2.05 or later processor. Add
6484 special case to return offset for full 64-bit slot of FPSCR when
6487 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
6489 * Makefile.in (SFILES, clean): Added sparc64 files.
6490 (reg-sparc64.o, reg-sparc64.c): New.
6491 * configure.srv (sparc*-*-linux*): New configuration.
6492 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
6493 syscall arguments for SPARC.
6494 (regsets_store_inferior_registers): Likewise.
6495 * linux-sparc-low.c: New file.
6497 2008-10-21 Doug Evans <dje@google.com>
6499 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
6500 (READLINE_DIR,READLINE_DEP): Delete.
6501 (INTERNAL_CFLAGS): Update.
6502 (LINTFLAGS): Update.
6504 2008-10-10 Pedro Alves <pedro@codesourcery.com>
6506 * server.c (handle_v_run): If GDB didn't specify an argv, use the
6507 whole argv from the last run, not just argv[0].
6509 2008-09-08 Pedro Alves <pedro@codesourcery.com>
6511 * regcache.c (new_register_cache): Return NULL if the register
6512 cache size isn't known yet.
6513 (free_register_cache): Avoid dereferencing a NULL regcache.
6515 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6517 * configure.srv: Merge MIPS and MIPS64.
6519 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
6521 * Makefile.in (uninstall): Apply $(EXEEXT) too.
6523 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
6525 * Makefile.in: Add required vsx dependencies.
6527 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
6528 Declare init_registers_powerpc_vsx32l.
6529 Declare init_registers_powerpc_vsx64l.
6530 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
6531 (ppc_arch_setup): Check for VSX in hwcap.
6532 (ppc_fill_vsxregset): New function.
6533 (ppc_store_vsxregset): New function.
6534 Add new VSX entry in regset_info target_regsets.
6536 * configure.srv: Add new VSX dependencies.
6538 2008-08-12 Pedro Alves <pedro@codesourcery.com>
6540 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
6541 (remote_open): Set or clear transport_is_reliable.
6542 (putpkt_binary): Don't expect acks in noack mode.
6543 (getpkt): Don't send ack/nac in noack mode.
6544 * server.c (handle_general_set): Handle QStartNoAckMode.
6545 (handle_query): If connected by tcp pass QStartNoAckMode+ in
6547 (main): Reset noack_mode on every connection.
6548 * server.h (noack_mode): Declare.
6550 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6552 * Makefile.in (GDBREPLAY_OBS): New variable.
6553 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
6555 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
6556 Daniel Jacobowitz <dan@codesourcery.com>
6558 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
6559 (usr_store_inferior_registers): Likewise.
6560 (regsets_store_inferior_registers): Likewise.
6562 2008-07-31 Rolf Jansen <rj@surtec.com>
6563 Pedro Alves <pedro@codesourcery.com>
6565 * configure.ac: Check for memmem declaration.
6566 * server.c [HAVE_MALLOC_H]: Include malloc.h.
6567 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
6568 (disable_packet_qfThreadInfo): Unconditionally compile.
6569 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
6570 * configure, config.in: Regenerate.
6572 2008-07-28 Doug Kwan <dougkwan@google.com>
6574 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
6575 (linux_write_memory): Remove declaration of errno.
6577 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
6579 * linux-low.c (handle_extended_wait): Do not use "status"
6580 variable uninitialized.
6582 2008-07-07 Pedro Alves <pedro@codesourcery.com>
6584 * server.c (handle_v_attach): Inhibit reporting dll changes.
6586 2008-06-27 Pedro Alves <pedro@codesourcery.com>
6588 * remote-utils.c (prepare_resume_reply): If requested, don't
6589 output "thread:TID" in the T stop reply.
6591 * server.c (disable_packet_vCont, disable_packet_Tthread)
6592 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
6593 (handle_query): If requested, disable support for qC, qfThreadInfo
6595 (handle_v_requests): If requested, disable support for vCont.
6596 (gdbserver_show_disableable): New.
6597 (main): Handle --disable-packet and --disable-packet=LIST.
6599 * server.h (disable_packet_vCont, disable_packet_Tthread)
6600 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
6602 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
6604 * server.c (gdbserver_usage): Mention --version.
6606 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
6608 * Makefile.in (gdbreplay.o): New rule.
6610 2008-06-06 Joseph Myers <joseph@codesourcery.com>
6612 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
6613 message, not gdbserver.
6615 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
6616 Nathan Sidwell <nathan@codesourcery.com>
6617 Joseph Myers <joseph@codesourcery.com>
6619 * acinclude.m4: Include ../../config/acx.m4.
6620 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
6621 * configure, config.in: Regenerate.
6622 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
6623 * server.c (gdbserver_version): Print PKGVERSION.
6624 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
6625 (main): Adjust gdbserver_usage calls.
6626 * gdbreplay.c (version, host_name): Add declarations.
6627 (gdbreplay_version, gdbreplay_usage): New.
6628 (main): Accept --version and --help options.
6630 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
6632 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
6633 (arm_breakpoint_at): Handle Thumb.
6634 (the_low_target): Add comment.
6636 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
6638 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
6640 2008-05-09 Doug Evans <dje@google.com>
6642 * server.h (decode_search_memory_packet): Declare.
6643 * remote-utils.c (decode_search_memory_packet): New fn.
6644 * server.c (handle_search_memory_1): New fn.
6645 (handle_search_memory): New fn.
6646 (handle_query): Process qSearch:memory packets.
6648 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6650 * regcache.c (registers_length): Remove.
6651 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
6652 full register packet.
6653 * regcache.h (registers_length): Remove prototype.
6654 * server.h (PBUFSIZ): Define to 16384.
6656 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
6658 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
6659 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
6660 powerpc-64l.o, and powerpc-altivec64l.o.
6661 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
6662 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
6663 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
6664 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
6665 rs6000/power-linux.xml, and rs6000/power64-linux.xml
6668 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
6669 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
6670 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
6671 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
6672 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
6673 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
6674 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
6675 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
6676 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
6677 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
6680 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
6681 (init_registers_powerpc_32l): ... this new prototype.
6682 (init_registers_powerpc_32): Remove, replace by ...
6683 (init_registers_powerpc_altivec32l): ... this new prototype.
6684 (init_registers_powerpc_e500): Remove, replace by ...
6685 (init_registers_powerpc_e500l): ... this new prototype.
6686 (init_registers_ppc64): Remove, replace by ...
6687 (init_registers_powerpc_64l): ... this new prototype.
6688 (init_registers_powerpc_64): Remove, replace by ...
6689 (init_registers_powerpc_altivec64l): ... this new prototype.
6690 (ppc_num_regs): Set to 73.
6691 (PT_ORIG_R3, PT_TRAP): Define if necessary.
6692 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
6693 (ppc_cannot_store_register): Handle orig_r3 and trap.
6694 (ppc_arch_setup): Update init_registers_... calls.
6695 (ppc_fill_gregset): Handle orig_r3 and trap.
6697 * inferiors.c (clear_inferiors): Reset current_inferior.
6699 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
6701 * acinclude.m4: Add override.m4.
6702 * configure: Regenerate.
6704 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6706 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
6707 initial call to init_register_ppc64.
6709 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6711 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
6712 single powerpc*-*-linux* case.
6713 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
6715 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
6717 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
6718 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
6720 * linux-ppc-low.c: Include <elf.h>.
6721 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
6722 (ppc_hwcap): New global variable.
6723 (ppc_regmap): Remove __SPE__ #ifdef sections.
6724 (ppc_regmap_e500): New global variable.
6725 (ppc_cannot_store_register): Update __SPE__ special case.
6726 (ppc_get_hwcap): New function.
6727 (ppc_arch_setup): Use it to determine whether inferior supports
6728 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
6729 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
6730 Do not access registers if target does not support AltiVec.
6731 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
6732 Do not access registers if target does not support SPE.
6733 (target_regsets): Unconditionally include AltiVec and SPE regsets.
6735 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
6737 * linux-low.c (disabled_regsets, num_regsets): New.
6738 (use_regsets_p): Delete.
6739 (linux_wait_for_process): Clear disabled_regsets.
6740 (regsets_fetch_inferior_registers): Check and set it.
6741 (regsets_store_inferior_registers): Likewise.
6742 (linux_fetch_registers, linux_store_registers): Do not use
6744 (initialize_low): Allocate disabled_regsets.
6746 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
6748 * Makefile.in (LIBOBJS): New.
6750 (memmem.o): New rule.
6751 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
6752 * configure: Regenerated.
6754 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
6756 * server.c (handle_query): Never return "unsupported" for
6757 qXfer:features:read queries.
6759 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
6761 * server.c (get_features_xml): Fix inverted condition.
6762 (handle_query): Always support qXfer:feature:read.
6764 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
6766 * server.c (wrapper_argv): New.
6767 (start_inferior): Handle wrapper_argv. If set, expect an extra
6769 (gdbserver_usage): Document --wrapper.
6770 (main): Parse --wrapper.
6772 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6774 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
6775 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
6776 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
6777 (ppc_set_pc): Likewise.
6778 (ppc_arch_setup): New function.
6779 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
6780 of collect_register.
6781 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6783 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6785 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
6786 instead of linux-ppc64-low.o.
6787 * linux-ppc64-low.c: Remove file.
6788 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
6789 (linux-ppc64-low.o): Remove rule.
6791 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
6792 (init_registers_powerpc_64): Likewise.
6793 (ppc_regmap): Conditionally define depending on __powerpc64__.
6794 (ppc_cannot_store_register): Do not special-case "fpscr" when
6795 compiled on __powerpc64__.
6796 (ppc_collect_ptrace_register): New function.
6797 (ppc_supply_ptrace_register): New function.
6798 (ppc_breakpoint): Change type to "unsigned int".
6799 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
6800 (the_low_target): Conditionally provide initializers for the
6801 arch_setup member depending on __powerpc64__. Install
6802 collect_ptrace_register and supply_ptrace_register members.
6804 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6806 * regcache.h (gdbserver_xmltarget): Add extern declaration.
6807 * server.c (gdbserver_xmltarget): Define.
6808 (get_features_xml): Use it to replace "target.xml" and arch_string.
6810 * configure.srv: Remove srv_xmltarget. Add XML files that were
6811 mentioned there to srv_xmlfiles instead. Remove conditional tests
6812 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
6813 srv_xmlfiles and srv_regobj to include all possible choices.
6814 * configure.ac (srv_xmltarget): Remove.
6815 (srv_xmlfiles): Do not add "target.xml".
6816 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
6817 checks for supplementary target information.
6818 * configure: Regenerate.
6819 * Makefile.in (XML_TARGET): Remove.
6820 (target.xml): Remove rule.
6821 (clean): Do not clean up target.xml.
6822 (.PRECIOUS): Do not mention target.xml.
6824 * target.h (struct target_ops): Remove arch_string member.
6825 * linux-low.c (linux_arch_string): Remove.
6826 (linux_target_ops): Remove arch_string initializer.
6827 * linux-low.h (struct linux_target_ops): Remove arch_string member.
6828 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
6829 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
6830 * spu-low.c (spu_arch_string): Remove.
6831 (spu_target_ops): Remove arch_string initializer.
6832 * win32-low.c (win32_arch_string): Remove.
6833 (win32_target_ops): Remove arch_string initializer.
6834 * win32-low.h (struct win32_target_ops): Remove arch_string member.
6835 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
6836 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
6838 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6840 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
6841 by collect_ptrace_register and supply_ptrace_register hooks.
6842 * linux-low.c (fetch_register): Use supply_ptrace_register callback
6843 instead of checking for the_low_target.left_pad_xfer.
6844 (usr_store_inferior_registers): Use collect_ptrace_register callback
6845 instead of checking for the_low_target.left_pad_xfer.
6847 * linux-s390-low.c (s390_collect_ptrace_register): New function.
6848 (s390_supply_ptrace_register): Likewise.
6849 (s390_fill_gregset): Call s390_collect_ptrace_register.
6850 (the_low_target): Update.
6852 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
6853 (ppc_supply_ptrace_register): Likewise.
6854 (the_low_target): Update.
6856 * linux-i386-low.c (the_low_target): Update.
6857 * linux-x86-64-low.c (the_low_target): Update.
6859 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6861 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
6862 reg-s390.o and reg-s390x.o.
6864 * linux-low.c (new_inferior): New global variable.
6865 (linux_create_inferior, linux_attach): Set it.
6866 (linux_wait_for_process): Call the_low_target.arch_setup after the
6867 target has stopped for the first time.
6868 (initialize_low): Do not call the_low_target.arch_setup.
6870 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
6871 (s390_set_pc): Likewise.
6872 (s390_arch_setup): New function.
6873 (the_low_target): Use s390_arch_setup as arch_setup routine.
6875 * regcache.c (realloc_register_cache): New function.
6876 (set_register_cache): Call it for each existing regcache.
6878 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6880 * server.h (init_registers): Remove prototype.
6882 * linux-low.h (struct linux_target_ops): Add arch_setup field.
6883 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
6884 instead of init_registers ().
6885 * linux-arm-low.c (init_registers_arm): Add prototype.
6886 (init_registers_arm_with_iwmmxt): Likewise.
6887 (the_low_target): Add initializer for arch_setup field.
6888 * linux-cris-low.c (init_registers_cris): Add prototype.
6889 (the_low_target): Add initializer for arch_setup field.
6890 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
6891 (the_low_target): Add initializer for arch_setup field.
6892 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
6893 (the_low_target): Add initializer for arch_setup field.
6894 * linux-ia64-low.c (init_registers_ia64): Add prototype.
6895 (the_low_target): Add initializer for arch_setup field.
6896 * linux-m32r-low.c (init_registers_m32r): Add prototype.
6897 (the_low_target): Add initializer for arch_setup field.
6898 * linux-m68k-low.c (init_registers_m68k): Add prototype.
6899 (the_low_target): Add initializer for arch_setup field.
6900 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
6901 (init_registers_mips64_linux): Likewise.
6902 (the_low_target): Add initializer for arch_setup field.
6903 * linux-ppc-low.c (init_registers_ppc): Add prototype.
6904 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
6905 (the_low_target): Add initializer for arch_setup field.
6906 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
6907 (init_registers_powerpc_64): Likewise.
6908 (the_low_target): Add initializer for arch_setup field.
6909 * linux-s390-low.c (init_registers_s390): Add prototype.
6910 (init_registers_s390x): Likewise.
6911 (the_low_target): Add initializer for arch_setup field.
6912 * linux-sh-low.c (init_registers_sh): Add prototype.
6913 (the_low_target): Add initializer for arch_setup field.
6914 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
6915 (the_low_target): Add initializer for arch_setup field.
6916 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
6917 (the_low_target): Add initializer for arch_setup field.
6919 * win32-low.h (struct win32_target_ops): Add arch_setup field.
6920 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
6921 instead of init_registers ().
6922 * win32-arm-low.c (init_registers_arm): Add prototype.
6923 (the_low_target): Add initializer for arch_setup field.
6924 * win32-i386-low.c (init_registers_i386): Add prototype.
6925 (the_low_target): Add initializer for arch_setup field.
6927 * spu-low.c (init_registers_spu): Add prototype.
6928 (initialize_low): Call initialie_registers_spu () instead of
6929 initialize_registers ().
6931 2008-02-19 Pedro Alves <pedro@codesourcery.com>
6933 * server.c (handle_v_requests): When handling the vRun and vAttach
6934 packets, if already debugging a process, don't kill it. Return an
6937 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
6939 * server.c (handle_query): Correct length check.
6941 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
6943 * win32-low.c (do_initial_child_stuff): Add process handle
6944 parameter. Set current_process_handle and current_process_id from the
6945 parameters. Clear globals.
6946 (win32_create_inferior): Don't set current_process_handle and
6947 current_process_id here. Instead pass them on the call to
6948 do_initial_child_stuff.
6949 (win32_attach): Likewise.
6950 (win32_clear_inferiors): New.
6951 (win32_kill): Don't close the current process handle or the
6952 current thread handle here. Instead call win32_clear_inferiors.
6953 (win32_detach): Don't open a new handle to the process. Call
6954 win32_clear_inferiors.
6955 (win32_join): Don't rely on current_process_handle; open a new
6956 handle using the process id.
6957 (win32_wait): Call win32_clear_inferiors when the inferior process
6960 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
6962 * server.c (monitor_show_help): Add "exit".
6964 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
6966 * Makefile.in (SFILES): Add linux-xtensa-low.c.
6967 (clean): Add reg-xtensa.c.
6968 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
6969 * configure.srv (xtensa*-*-linux*) New target.
6970 * linux-xtensa-low.c: New.
6971 * xtensa-xtregs.c: New.
6973 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
6975 * hostio.c: Don't include errno.h.
6976 (errno_to_fileio_errno): Move to hostio-errno.
6977 * hostio.c: (hostio_error): Remove the error parameter. Defer the
6978 error number outputting to the target->hostio_last_error callback.
6979 (hostio_packet_error): Use FILEIO_EINVAL directly.
6980 (handle_open, handle_pread, hostio_error, handle_unlink): Update
6981 calls to hostio_error.
6982 * hostio-errno.c: New.
6983 * server.h (hostio_last_error_from_errno): Declare.
6984 * target.h (target_ops): Add hostio_last_error member.
6985 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
6986 as hostio_last_error handler.
6987 * spu-low.c (spu_target_ops): Likewise.
6988 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
6989 (wince_hostio_last_error): New functions.
6990 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
6991 as hostio_last_error handler.
6992 (win32_target_ops) [!_WIN32_WCE]: Register
6993 hostio_last_error_from_errno as hostio_last_error handler.
6994 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
6995 (hostio-errno.o): New rule.
6996 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
6997 * configure.srv (srv_hostio_err_objs): New variable. Default to
6999 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
7000 * configure: Regenerate.
7002 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7004 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
7005 (linux_kill, linux_detach): Clean up the process list.
7006 * remote-utils.c (remote_open): Improve port number parsing.
7007 (putpkt_binary, input_interrupt): Only send interrupts if the target
7009 * server.c (extended_protocol): Make static.
7010 (attached): Define earlier.
7011 (exit_requested, response_needed, program_argv): New variables.
7012 (target_running): New.
7013 (start_inferior): Clear attached here.
7014 (attach_inferior): Set attached here.
7015 (require_running): Define.
7016 (handle_query): Use require_running and target_running. Implement
7018 (handle_v_attach, handle_v_run): New.
7019 (handle_v_requests): Use require_running. Handle vAttach and vRun.
7020 (gdbserver_usage): Update.
7021 (main): Redo argument parsing. Handle --debug and --multi. Handle
7022 --attach along with other options or after the port. Save
7023 program_argv. Support no initial program. Resynchronize
7024 communication with GDB after an error. Handle "monitor exit".
7025 Use require_running and target_running. Always allow the extended
7026 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
7027 restart in extended mode.
7028 * README: Refer to the GDB manual. Update --attach usage.
7030 2007-12-20 Andreas Schwab <schwab@suse.de>
7032 * linux-low.c (STACK_SIZE): Define.
7033 (linux_tracefork_child): Use it. Use __clone2 on ia64.
7034 (linux_test_for_tracefork): Likewise.
7036 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
7038 * linux-low.c (linux_wait_for_event): Update messages. Do not
7039 reinsert auto-delete breakpoints.
7040 * mem-break.c (struct breakpoint): Change return type of handler to
7042 (set_breakpoint_at): Update handler type.
7043 (reinsert_breakpoint_handler): Return 1 instead of calling
7045 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
7047 (check_breakpoints): Delete auto-delete breakpoints and return 2.
7048 * mem-break.h (set_breakpoint_at): Update handler type.
7049 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
7050 * win32-low.c (auto_delete_breakpoint): New.
7051 (get_child_debug_event): Use it.
7053 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
7055 * configure.ac: Check for pread and pwrite.
7056 * hostio.c (handle_pread): Fall back to lseek and read.
7057 (handle_pwrite): Fall back to lseek and write.
7058 * config.in, configure: Regenerated.
7060 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
7062 * server.c (myresume): Add own_buf argument.
7063 (main): Update calls.
7065 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
7067 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
7068 * remote-utils.c (remote_open): Do not call disable_async_io.
7069 (block_async_io): Delete.
7070 (unblock_async_io): Make static.
7071 (initialize_async_io): New.
7072 * server.c (handle_v_cont): Handle async I/O here.
7073 (myresume): Likewise. Move other common resume tasks here...
7074 (main): ... from here. Call initialize_async_io. Disable async
7075 I/O before the main loop.
7076 * server.h (initialize_async_io): Declare.
7077 (block_async_io, unblock_async_io): Delete prototypes.
7078 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
7080 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
7082 * remote-utils.c (readchar): Allow binary data in received messages.
7084 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7086 * win32-low.c (attaching): New global.
7087 (win32_create_inferior): Clear the `attaching' global.
7088 (win32_attach): Set the `attaching' global.
7089 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
7090 attaching. Only set a breakpoint at the entry point if not
7093 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7095 * server.c (main): Don't report dll events on the initial
7096 connection on attaches.
7098 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7100 * server.c (main): Relax numerical bases supported for the pid of
7101 the --attach command line argument.
7103 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7105 * win32-low.c (win32_attach): Call OpenProcess before
7106 DebugActiveProcess, not after. Add last error output to error
7109 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7111 * win32-low.c (win32_get_thread_context)
7112 (win32_set_thread_context): New functions.
7113 (thread_rec): Use win32_get_thread_context.
7114 (continue_one_thread, win32_resume): Use win32_set_thread_context.
7115 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
7118 2007-12-03 Leo Zayas
7119 Pedro Alves <pedro_alves@portugalmail.pt>
7121 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
7123 (child_add_thread): Minor cleanup.
7124 (child_continue): Resume artificially suspended threads before
7125 calling ContinueDebugEvent.
7126 (suspend_one_thread): New.
7127 (fake_breakpoint_event): New.
7128 (get_child_debug_event): Change return type to int. Check here if
7129 gdb sent an interrupt request. If a soft interrupt was requested,
7130 fake a breakpoint event. Return 0 if there is no event to handle,
7132 (win32_wait): Don't check here if gdb sent an interrupt request.
7133 Ensure there is a valid event to handle.
7134 (win32_request_interrupt): Add soft interruption method as last
7137 2007-12-03 Leo Zayas
7138 Pedro Alves <pedro_alves@portugalmail.pt>
7140 * win32-low.h (win32_thread_info): Add descriptions to the
7141 structure members. Replace `suspend_count' counter by a
7143 * win32-low.c (thread_rec): Update condition of when to get the
7144 context from the inferior. Rely on ContextFlags being set if it
7145 has already been retrieved. Only suspend the inferior thread if
7146 we haven't already. Warn if that fails.
7147 (continue_one_thread): s/suspend_count/suspended/. Only call
7148 ResumeThread once. Warn if that fails.
7150 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
7152 * win32-low.c (win32_wait): Don't read from the inferior when it
7155 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
7157 * Makefile.in (win32_low_h): New variable.
7158 (win32-low.o): Add dependency on $(win32_low_h).
7159 (win32-arm-low.o, win32-i386-low.o): New rules.
7161 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
7163 * hostio.c: Correct copyright year.
7165 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
7167 * Makefile.in (OBS): Add hostio.o.
7168 (hostio.o): New rule.
7169 * server.h (handle_vFile): Declare.
7170 * hostio.c: New file.
7171 * server.c (handle_v_requests): Take packet_len and new_packet_len
7172 for binary packets. Call handle_vFile.
7173 (main): Update call to handle_v_requests.
7175 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
7177 * linux-low.c: Include <sched.h>.
7179 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
7181 * linux-low.c (linux_tracefork_grandchild): New.
7182 (linux_tracefork_child): Use clone.
7183 (linux_test_for_tracefork): Use clone; allocate and free a stack.
7185 2007-10-31 Joel Brobecker <brobecker@adacore.com>
7187 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
7189 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
7191 * linux-low.c (handle_extended_wait): Handle unexpected signals.
7193 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
7195 * inferiors.c (change_inferior_id): Delete.
7196 (add_pid_to_list, pull_pid_from_list): New.
7197 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
7198 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
7199 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
7200 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
7201 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
7202 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
7203 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
7204 (using_threads): Always set to 1.
7205 (handle_extended_wait): New.
7206 (add_process): Do not set TID.
7207 (linux_create_inferior): Set must_set_ptrace_flags.
7208 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
7209 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
7210 (linux_thread_alive): Rename TID argument to LWPID.
7211 (linux_wait_for_process): Handle unknown processes. Do not use TID.
7212 (linux_wait_for_event): Do not use TID or check using_threads. Update
7213 call to dead_thread_notify. Call handle_extended_wait.
7214 (linux_create_inferior): Use PTRACE_SETOPTIONS.
7215 (send_sigstop): Delete sigstop_sent.
7216 (wait_for_sigstop): Avoid TID.
7217 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
7218 (linux_test_for_tracefork): New.
7219 (linux_lookup_signals): Use thread_db_active and
7220 linux_supports_tracefork_flag.
7221 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
7222 * linux-low.h (get_process_thread): Avoid TID.
7223 (struct process_ifo): Move thread_known and tid to the end. Remove
7225 (linux_attach_lwp, thread_db_init): Update prototypes.
7226 * server.h (change_inferior_id): Delete prototype.
7227 (add_pid_to_list, pull_pid_from_list): New prototypes.
7228 * thread-db.c (thread_db_use_events): New.
7229 (find_first_thread): Rename to...
7230 (find_one_thread): ...this. Update callers and messages. Do not
7231 call fatal. Check thread_db_use_events. Do not call
7232 change_inferior_id or new_thread_notify.
7233 (maybe_attach_thread): Update. Do not call new_thread_notify.
7234 (thread_db_init): Set thread_db_use_events. Check use_events.
7235 * utils.c (fatal, warning): Correct message prefix.
7237 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
7239 * Makefile.in (clean): Remove new files.
7240 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
7241 (powerpc-64.o, powerpc-64.c): New rules.
7242 * configure.srv: Use alternate register sets for powerpc64-*-linux*
7243 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
7245 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
7247 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
7248 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
7249 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
7250 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
7251 (target_regsets): Add AltiVec and SPE register sets.
7252 * configure.ac: Check for AltiVec and SPE.
7253 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
7254 (ppc_fill_vrregset, ppc_store_vrregset): New.
7255 (target_regsets): Add AltiVec register set.
7256 * configure: Regenerated.
7258 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
7260 * linux-low.c (O_LARGEFILE): Define.
7261 (linux_read_memory): Use /proc/PID/mem.
7262 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
7263 * configure, config.in: Regenerated.
7265 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7267 * linux-low.c (linux_wait_for_event): Do not pass signals while
7270 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
7272 * win32-low.c (create_process): New.
7273 (win32_create_inferior): Use create_process instead of
7274 CreateProcess. If create_process failed retry appending an ".exe"
7275 suffix. Store the GetLastError result immediatelly after
7276 create_process calls and use it on the call to error.
7278 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
7280 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
7282 2007-08-23 Joel Brobecker <brobecker@adacore.com>
7284 * configure.ac: Switch license to GPLv3.
7286 2007-08-01 Michael Snyder <msnyder@access-company.com>
7288 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
7290 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
7292 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
7294 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
7295 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
7296 CloseToolhelp32Snapshot.
7297 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
7298 CloseToolhelp32Snapshot.
7300 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
7302 * server.c (main): Check for inferior exit before main loop.
7304 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
7306 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
7307 instead of on tmp_desc.
7309 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
7310 Daniel Jacobowitz <dan@codesourcery.com>
7312 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
7313 (add_thread): Minor cleanups.
7314 (clear_inferiors): Move lower in the file. Clear the DLL
7316 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
7317 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
7318 (xml_escape_text): New.
7319 * server.c (handle_query): Handle qXfer:libraries:read. Report it
7321 (handle_v_cont): Report errors.
7322 (gdbserver_version): Update.
7323 (main): Correct size of own_buf. Do not report initial DLL events.
7324 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
7325 (unloaded_dll, xml_escape_text): New.
7326 * win32-low.c (enum target_waitkind): Update comments.
7327 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
7328 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
7329 (win32_EnumProcessModules, win32_GetModuleInformation)
7330 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
7331 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
7332 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
7333 (win32_Module32First, win32_Module32Next, load_toolhelp)
7334 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
7335 (get_child_debug_event): Handle DLL events.
7336 (win32_wait): Likewise.
7338 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7340 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
7341 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
7343 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7345 * win32-low.c (handle_output_debug_string): Ignore event if not
7348 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7350 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
7352 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
7354 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
7356 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
7358 * inferiors.c (change_inferior_id): Add comment.
7359 * linux-low.c (check_removed_breakpoint): Add an early
7360 prototype. Improve debug output.
7361 (linux_attach): Doc update.
7362 (linux_detach_one_process, linux_detach): Clean up before releasing
7364 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
7365 * linux-low.h (struct process_info): Doc improvement.
7366 * mem-break.c (delete_all_breakpoints): New.
7367 * mem-break.h (delete_all_breakpoints): New prototype.
7368 * thread-db.c (find_first_thread): New.
7369 (thread_db_create_event): Call it instead of
7370 thread_db_find_new_threads. Clean up unused variables.
7371 (maybe_attach_thread): Remove first thread handling.
7372 (thread_db_find_new_threads): Use find_first_thread.
7373 (thread_db_get_tls_address): Likewise.
7375 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
7377 * thread-db.c (thread_db_find_new_threads): Add prototype.
7378 (thread_db_create_event): Check for the main thread before adding
7380 (maybe_attach_thread): Only enable event reporting if TID == 0.
7381 (thread_db_get_tls_address): Check for new threads.
7383 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
7385 * linux-low.c (linux_create_inferior): Try execv before execvp.
7386 * spu-low.c (spu_create_inferior): Likewise.
7388 2007-06-13 Mike Frysinger <vapier@gentoo.org>
7390 * linux-low.c (linux_create_inferior): Change execv to execvp.
7391 * spu-low.c (spu_create_inferior): Likewies.
7393 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
7395 * Makefile.in (clean): Clean new files instead of deleted ones.
7396 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
7397 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
7399 * configure.srv: Specify XML files and new regformats for MIPS and
7401 * linux-mips-low.c (mips_num_regs): Set to only used registers.
7402 (mips_regmap): Do not fetch $0. Remove unused registers. Add
7403 an entry for the restart register.
7404 (mips_cannot_fetch_register, mips_cannot_store_register)
7405 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
7406 register names to match the XML descriptions.
7407 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
7408 restart register instead of $0.
7410 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7411 Markus Deuling <deuling@de.ibm.com>
7413 * remote-utils.c (decode_xfer_write): New function.
7414 * server.h (decode_xfer_write): Add prototype.
7415 * server.c (handle_query): Add PACKET_LEN argument. Support
7416 qXfer:spu:read and qXfer:spu:write packets.
7417 (main): Pass packet_len to handle_query.
7418 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
7419 * target.h (target_ops): Add qxfer_spu.
7421 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7423 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
7424 accessing non-seekable spufs files.
7426 2007-05-16 Markus Deuling <deuling@de.ibm.com>
7428 * server.c (handle_query): Add reply for qC packet.
7430 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7431 Leo Zayas <lerele@champenstudios@com>
7433 * server.h (check_remote_input_interrupt_request): New function.
7434 * remote_utils.c (INVALID_DESCRIPTOR): New define.
7435 (remote_desc): Initialize with INVALID_DESCRIPTOR.
7436 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
7437 (check_remote_input_interrupt_request): New function.
7438 * server.h (check_remote_input_interrupt_request): Declare.
7439 * win32-low.c (winapi_DebugBreakProcess,
7440 winapi_GenerateConsoleCtrlEvent): New typedefs.
7441 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
7443 (win32_wait): Check for remote interrupt request
7444 with check_remote_input_interrupt_request.
7445 (win32_request_interrupt): New function.
7446 (win32_target_op): Set request_interrupt to win32_request_interrupt.
7448 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7450 * win32-low.c (debug_registers_changed,
7451 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
7452 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
7453 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
7454 (thread_rec): Get context using the low target.
7455 (child_add_thread): Call thread_added on the low target,
7456 which does the same thing.
7458 (do_initial_child_stuff): Remove debug registers references.
7459 Set context using the low target. Resume threads after
7460 setting the contexts.
7461 (child_continue): Remove dead variable. Remove debug
7462 registers references.
7463 (child_fetch_inferior_registers): Go through the low target.
7464 (do_child_store_inferior_registers): Remove.
7465 (child_store_inferior_registers): Go through the low target.
7466 (win32_resume): Remove debug registers references.
7467 Set context using the low target.
7468 (handle_exception): Change return type to void. Don't record
7469 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
7470 first chance exception.
7471 (get_child_debug_event): Change return type to void. Remove
7472 goto loop. Always return after waiting for debug event.
7473 (win32_wait): Convert to switch statement. Handle spurious
7476 * win32-i386-low.c (debug_registers_changed,
7477 debug_registers_used): New.
7478 (initial_stuff): Rename to ...
7479 (i386_initial_stuff): ... this. Clear debug registers
7481 (store_debug_registers): Delete.
7482 (i386_get_thread_context): New.
7483 (load_debug_registers): Delete.
7484 (i386_set_thread_context): New.
7485 (i386_thread_added): New.
7486 (single_step): Rename to ...
7487 (i386_single_step): ... this.
7488 (do_fetch_inferior_registers): Rename to ...
7489 (i386_fetch_inferior_register): ... this.
7490 (i386_store_inferior_register): New.
7491 (the_low_target): Adapt to new interface.
7493 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
7494 (arm_get_thread_context): New.
7495 (arm_set_thread_context): New.
7497 (do_fetch_inferior_registers): Rename to ...
7498 (arm_fetch_inferior_register): ... this.
7499 (arm_store_inferior_register): New.
7500 (arm_wince_breakpoint): Reimplement as unsigned long.
7501 (arm_wince_breakpoint_len): Define.
7502 (the_low_target): Adapt to new interface.
7504 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
7505 load_debug_registers. Add get_thread_context, set_thread_context,
7506 thread_added and store_inferior_register. Rename
7507 fetch_inferior_registers to fetch_inferior_register.
7508 (regptr): Remove declaration.
7510 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7512 * linux-low.c (linux_detach): Change return type to int. Return 0.
7513 * spu-low.c (spu_detach): Likewise.
7515 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7517 * target.h (target_ops): Change return type of detach to int.
7519 (join_inferior): New.
7520 * server.c (main): Don't skip detach support on mingw32.
7521 If the inferior doesn't support detaching return error.
7522 Call join_inferior instead of using waitpid.
7523 * linux-low.c (linux_join): New.
7524 (linux_target_op): Add linux_join.
7525 * spu-low.c (spu_join): New.
7526 (spu_target_ops): Add spu_join.
7527 * win32-low.c (win32_detach): Adapt to new interface.
7528 Reopen current_process_handle before detaching. Issue a child
7529 resume before detaching.
7531 (win32_target_op): Add win32_join.
7533 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7535 * win32-low.c (win32-attach): Fix return value.
7536 * target.h (target_ops): Describe ATTACH return values.
7538 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7540 * win32-low.c (GETPROCADDRESS): Define.
7541 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
7542 (winapi_DebugSetProcessKillOnExit): Likewise.
7543 (win32_create_inferior): Force usage of ansi CreateProcessA.
7544 (win32_attach): Use GETPROCADDRESS.
7545 (win32_detach): Likewise.
7547 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7549 * win32-low.c (win32_wait): Don't use WSTOPSIG.
7551 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
7553 * win32-low.c: Commit leftover changes from 2007-03-29.
7555 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7557 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
7558 fields short instead of int. Add explicit padding.
7559 (i387_cache_to_fsave): Remove unnecessary casts.
7560 (i387_fsave_to_cache): Doc fix.
7561 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
7563 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7565 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
7566 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
7568 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7570 * configure.srv (arm*-*-mingw32ce*): Move near the other
7573 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7575 * configure.ac: Add errno checking.
7576 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
7577 sys/file.h and malloc.h.
7578 (AC_CHECK_DECLS): Add perror.
7579 (srv_mingwce): Handle.
7580 * configure.srv (i[34567]86-*-cygwin*): Add
7581 win32-i386-low.o to srv_tgtobj.
7582 (i[34567]86-*-mingw*): Likewise.
7583 (arm*-*-mingw32ce*): Add case.
7584 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7585 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
7586 [__MINGW32CE__] (strerror): New function.
7587 [__MINGW32CE__] (errno): Define to GetLastError.
7588 [__MINGW32CE__] (COUNTOF): New macro.
7589 (remote_open): Remove extra close call.
7590 * mem-break.c (delete_breakpoint_at): New function.
7591 * mem-break.h (delete_breakpoint_at): Declare.
7592 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7593 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
7594 [USE_WIN32API] (read, write): Add char* casts.
7595 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
7596 * server.h: Include wincecompat.h on Windows CE.
7597 [HAVE_ERRNO_H]: Check.
7598 (perror): Declare if not declared.
7599 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
7600 (perror_with_name): Remove errno declaration.
7601 * wincecompat.h: New.
7602 * wincecompat.c: New.
7604 * win32-arm-low.c: New.
7605 * win32-i386-low.c: New.
7606 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
7607 (OUTMSG2): Make it safe.
7609 (COUNTOF): New macro.
7610 (NUM_REGS): Get it from the low target.
7611 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
7612 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
7613 (thread_rec): Let low target handle debug registers.
7614 (child_add_thread): Likewise.
7615 (child_init_thread_list): Likewise.
7616 (continue_one_thread): Likewise.
7618 (do_child_fetch_inferior_registers): Move to ...
7619 * win32-i386-low.c: ... here, and rename to ...
7620 (do_fetch_inferior_registers): ... this.
7621 * win32-low.c (child_fetch_inferior_registers):
7622 Go through the low target.
7623 (do_child_store_inferior_registers): Use regptr.
7624 (strwinerror): New function.
7625 (win32_create_inferior): Handle Windows CE.
7626 Use strwinerror instead of strerror on Windows error
7627 codes. Add program to the error output.
7628 Don't close the main thread handle on Windows CE.
7629 (win32_attach): Use coredll.dll on Windows CE.
7630 (win32_kill): Close current process and current
7632 (win32_detach): Use coredll.dll on Windows CE.
7633 (win32_resume): Let low target handle debug registers, and
7635 (handle_exception): Add/Remove initial breakpoint. Avoid
7636 non-existant WSTOPSIG on Windows CE.
7637 (win32_read_inferior_memory): Cast to remove warning.
7638 (win32_arch_string): Go through the low target.
7639 (initialize_low): Call set_breakpoint_data with the low
7640 target's breakpoint.
7641 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
7642 FOP_REGNUM, mappings): Move to ...
7643 * win32-i386-low.c: ... here.
7644 * win32-low.c (win32_thread_info): Move to ...
7645 * win32-low.h: ... here.
7646 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
7647 win32-arm-low.c and wincecompat.c.
7648 (all:): Add $EXEEXT.
7649 (install-only:): Likewise.
7650 (gdbserver:): Likewise.
7651 (gdbreplay:): Likewise.
7652 * config.in: Regenerate.
7653 * configure: Regenerate.
7655 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7657 * win32-low.c: Rename typedef thread_info to
7658 win32_thread_info throughout.
7660 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7662 * win32-i386-low.c: Rename to ...
7663 * win32-low.c: ... this.
7664 * configure.srv: Replace win32-i386-low.o with win32-low.o.
7665 * Makefile.in: Likewise.
7667 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
7669 * remote-utils.c (monitor_output): Constify msg parameter.
7670 * server.h (monitor_output): Likewise.
7671 * win32-i386-low.c (handle_output_debug_string): New.
7672 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
7673 handle_output_debug_string.
7674 (get_child_debug_event): Likewise.
7676 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
7678 * server.c (main): Correct strtoul check.
7680 2007-03-27 Jon Ringle <jon@ringle.org>
7682 * linux-low.c: Check __ARCH_HAS_MMU__ also.
7684 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
7686 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
7688 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
7690 * terminal.h: Check HAVE_SGTTY_H.
7692 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
7694 * remote-utils.c (remote_open): Print out the assigned port number.
7696 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
7698 * remote-utils.c (monitor_output): New function.
7699 * server.c (debug_threads): Define here.
7700 (monitor_show_help): New function.
7701 (handle_query): Handle qRcmd.
7702 (main): Do not handle 'd' packet.
7703 * server.h (debug_threads, remote_debug, monitor_output): Declare.
7704 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
7707 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7709 * Makefile.in (EXEEXT): New.
7710 (clean): Use $(EXEEXT).
7712 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7714 * target.h (target_ops): Rename send_signal to request_interrupt,
7715 and remove enum target_signal parameter.
7716 * linux-low.c (linux_request_interrupt): Rename from
7717 linux_send_signal, and always send SIGINT.
7718 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
7719 and always send SIGINT.
7720 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
7722 (input_interrupt): Likewise.
7724 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7726 * server.c (get_features_xml): Check if target implemented
7728 * win32-i386-low.c (win32_arch_string): New.
7729 (win32_target_ops): Add win32_arch_string as arch_string member.
7731 2007-02-22 Markus Deuling <deuling@de.ibm.com>
7733 * spu-low.c (spu_arch_string): New.
7734 (spu_target_ops): Add spu_arch_string.
7736 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
7738 * remote-utils.c: Remove HAVE_TERMINAL_H check.
7739 * configure.ac: Do not check for terminal.h.
7740 * configure, config.in: Regenerated.
7742 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7744 * Makefile.in (OBS): Add $(XML_BUILTIN).
7745 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
7747 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
7748 (arm-with-iwmmxt.c): New.
7749 * config.in, configure: Regenerate.
7750 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
7751 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
7752 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
7753 (arm*-*-linux*): Add iWMMXt and regset support.
7754 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
7755 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
7756 (arm_store_wmmxregset, target_regsets): New.
7757 * server.c (get_features_xml): Take annex argument. Check builtin
7759 (handle_query): Handle multiple annexes.
7761 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7763 * remote-utils.c [USE_WIN32API] (read, write): Define.
7764 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
7767 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
7769 * linux-i386-low.c (the_low_target): Set arch_string.
7770 * linux-x86-64-low.c (the_low_target): Likewise.
7771 * linux-low.c (linux_arch_string): New.
7772 (linux_target_ops): Add it.
7773 * linux-low.h (struct linux_target_ops): Add arch_string.
7774 * server.c (write_qxfer_response): Use const void * for DATA.
7775 (get_features_xml): New.
7776 (handle_query): Handle qXfer:features:read. Report it for qSupported.
7777 * target.h (struct target_ops): Add arch_string method.
7779 2007-01-03 Denis Pilat <denis.pilat@st.com>
7780 Daniel Jacobowitz <dan@codesourcery.com>
7782 * linux-low.c (linux_kill): Handle being called with no threads.
7783 * win32-i386-low.c (win32_kill): Likewise.
7784 (get_child_debug_event): Clear current_process_handle.
7786 2006-12-30 Denis PILAT <denis.pilat@st.com>
7787 Daniel Jacobowitz <dan@codesourcery.com>
7789 * remote-utils.c (remote_open): Check the type of specified
7790 serial port devices before opening them.
7791 * server.c (main): Kill the inferior if an error occurs during
7792 the first remote_open.
7794 2006-12-05 Markus Deuling <deuling@de.ibm.com>
7796 * README: Update supported targets.
7798 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
7800 * Makefile.in (clean): Remove reg-mips64.c.
7801 (reg-mips64.c, reg-mips64.o): New rules.
7802 * configure.srv: Handle mips64. Include regset support for mips.
7803 * linux-mips-low.c (union mips_register): New.
7804 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
7805 (mips_breakpoint, mips_breakpoint_at): Use int.
7806 (mips_collect_register, mips_supply_register)
7807 (mips_collect_register_32bit, mips_supply_register_32bit)
7808 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7809 (mips_store_fpregset, target_regsets): New.
7810 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
7812 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
7814 * configure.srv: Add target "spu*-*-*".
7815 * Makefile.in (clean): Remove reg-spu.c.
7816 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
7817 * spu-low.c: New file.
7819 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7821 * configure.ac: Correct td_thr_tls_get_addr test.
7822 * configure: Regenerated.
7824 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7826 * linux-low.c (linux_wait_for_event): Reformat. Use the
7828 * remote-utils.c (decode_address_to_semicolon): New.
7829 * server.c (pass_signals, handle_general_set): New.
7830 (handle_query): Mention QPassSignals for qSupported.
7831 (main): Call handle_general_set.
7832 * server.h (pass_signals, decode_address_to_semicolon): New.
7834 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
7836 * server.c (handle_query): Correct error handling for read_auxv.
7838 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
7840 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
7841 and srv_linux_thread_db to yes.
7842 * linux-s390-low.c (s390_fill_gregset): New function.
7843 (target_regsets): Define data structure.
7845 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
7847 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
7848 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
7849 * config.in, configure: Regenerated.
7850 * inferiors.c (gdb_id_to_thread): New function.
7851 (gdb_id_to_thread_id): Use it.
7852 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
7853 * linux-low.h (struct process_info): Add th member.
7854 (thread_db_get_tls_address): New prototype.
7855 * remote-utils.c (decode_address): Make non-static.
7856 * server.c (handle_query): Handle qGetTLSAddr.
7857 * server.h (gdb_id_to_thread, decode_address): New prototypes.
7858 * target.h (struct target_ops): Add get_tls_address.
7859 * thread-db.c (maybe_attach_thread): Save the thread handle.
7860 (thread_db_get_tls_address): New.
7862 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
7864 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
7865 (linux_resume_one_process): Take a siginfo_t *. Update all
7866 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
7867 (struct pending_signals): Add a siginfo_t.
7868 (linux_wait_for_process): Always set last_status.
7869 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
7870 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
7871 * linux-low.h (struct process_info): Add last_status.
7873 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
7875 * remote-utils.c (try_rle): New function.
7876 (putpkt_binary): Use it.
7878 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
7880 * Makefile.in (clean): Clean reg-x86-64-linux.c.
7881 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
7882 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
7883 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
7884 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
7887 2006-08-08 Richard Sandiford <richard@codesourcery.com>
7889 * server.c (terminal_fd): New variable.
7890 (old_foreground_pgrp): Likewise.
7891 (restore_old_foreground_pgrp): New function.
7892 (start_inferior): Record the terminal file descriptor in terminal_fd
7893 and its original foreground group in old_foreground_pgrp. Register
7894 restore_old_foreground_pgrp with atexit().
7896 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
7898 * server.c (handle_query): Correct qPart to qXfer.
7900 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
7902 * configure.ac: Check for more headers which are missing on
7903 Windows. Automatically supply -lwsock32 and USE_WIN32API.
7904 * configure.srv: Add Cygwin and mingw32.
7905 * remote-utils.c: Don't include headers unconditionally which
7906 are missing on mingw32. Include <winsock.h> for mingw32.
7907 (remote_open): Adjust for mingw32 support. Flush
7908 standard error after writing to it.
7909 (remote_close, putpkt_binary, input_interrupt, block_async_io)
7910 (unblock_async_io, enable_async_io, disable_async_io)
7911 (readchar, getpkt): Update for Winsock support.
7912 (prepare_resume_reply): Expect a protocol signal number.
7913 * server.c: Disable <sys/wait.h> on mingw32.
7914 (start_inferior): Adjust for mingw32 support. Flush
7915 standard error after writing to it.
7916 (attach_inferior): Likewise. Use protocol signal
7918 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
7920 * win32-i386-low.c: New file.
7921 * Makefile.in (XM_CLIBS): Set.
7922 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
7923 (win32-i386-low.o): New dependency rule.
7924 * linux-low.c (linux_wait): Use target signal numbers.
7925 * target.h (struct target_ops): Doc fix.
7926 * server.h (target_signal_to_name): New prototype.
7927 * gdbreplay.c: Don't include headers unconditionally which
7928 are missing on mingw32. Include <winsock.h> for mingw32.
7929 (remote_close, remote_open): Adjust for Winsock support.
7930 * configure, config.in: Regenerated.
7932 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7934 * server.c (decode_xfer_read, write_qxfer_response): New.
7935 (handle_query): Take a packet length argument. Handle
7936 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
7937 the qSupported response.
7938 (main): Update call to handle_query.
7940 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
7942 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
7943 (putpkt_binary): Renamed from putpkt and adjusted for binary
7945 (putpkt): New wrapper for putpkt_binary.
7946 (readchar): Don't mask off the high bit.
7947 (decode_X_packet): New function.
7948 * server.c (main): Call putpkt_binary if a handler sets the packet
7949 length. Save the length of the incoming packet. Handle 'X'.
7950 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
7952 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
7954 * server.c (handle_query): Handle qSupported.
7956 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7958 * remote-utils.c (all_symbols_looked_up): New variable.
7959 (look_up_one_symbol): Check it.
7960 * server.h (look_up_one_symbol): New declaration.
7961 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
7963 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7965 * Makefile.in (linux-arm-low.o): Update dependencies.
7966 * linux-arm-low.c: Include "gdb_proc_service.h".
7967 (PTRACE_GET_THREAD_AREA): Define.
7968 (ps_get_thread_area): New function.
7970 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
7972 * configure.srv (m68k*-*-uclinux*): New target.
7973 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
7974 (linux_resume_one_process): Remove extraneous cast.
7975 (linux_read_offsets): New.
7976 (linux_target_op): Add linux_read_offsets on mmuless systems.
7977 * server.c (handle_query): Add qOffsets logic.
7978 * target.h (struct target_ops): Add read_offsets.
7980 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7982 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
7983 (PTRACE_GET_THREAD_AREA): Define.
7984 (ps_get_thread_area): New function.
7985 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
7986 (linux-x86-64-low.o): Update.
7988 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7990 * configure.ac: Remove checks for prfpregset_t.
7991 * gdb_proc_service.h: New file.
7992 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
7993 new "gdb_proc_service.h".
7994 * proc-service.c: Likewise.
7995 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
7996 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
7997 * Makefile.in (gdb_proc_service_h): Updated.
7998 * configure, config.in: Regenerated.
8000 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
8002 * remote-utils.c (prepare_resume_reply): Move declaration
8003 of gdb_id_from_wait to the top of the block.
8005 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
8007 * linux-low.c (regsets_store_inferior_registers): Read the regset
8008 from the target before filling it.
8010 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
8012 * server.c (attach_inferior): Return SIGTRAP for a successful
8015 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8017 * Makefile.in (OBS): Add version.o.
8018 (STAGESTUFF): Delete.
8019 (version.o): Add dependencies.
8020 (version.c): Replace rule.
8021 (clean): Remove version.c.
8022 * server.c (gdbserver_version): New.
8023 (gdbserver_usage): Use printf.
8024 (main): Handle --version and --help.
8025 * server.h (version, host_name): Add declarations.
8027 2005-12-23 Eli Zaretskii <eliz@gnu.org>
8039 * linux-x86-64-low.c:
8042 * linux-ppc64-low.c:
8051 * linux-crisv32-low.c:
8063 * gdbserver.1: Add (C) after Copyright. Update the FSF
8066 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
8068 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
8069 (arm_breakpoint_at): Recognize both breakpoints.
8070 (the_low_target): Use the correct breakpoint instruction.
8072 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
8074 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
8075 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
8076 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
8077 (the_low_target): Update.
8079 2005-10-25 Andreas Schwab <schwab@suse.de>
8081 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
8083 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
8084 (ia64_num_regs): Reduce to 462.
8086 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
8088 * acinclude.m4: Correct quoting.
8089 * aclocal.m4: Regenerated.
8091 Suggested by SZOKOVACS Robert <szo@ies.hu>:
8092 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
8093 (thread_db_init): Call thread_db_err_str.
8094 * configure.ac: Check for TD_VERSION.
8095 * config.in, configure: Regenerated.
8097 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8099 * server.h (error, fatal, warning): Add ATTR_FORMAT.
8101 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8103 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
8104 is not available. Define HAVE_PTRACE_GETREGS if it is.
8105 * config.in, configure: Regenerated.
8106 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
8107 * linux-i386-low.c, linux-m68k-low.c: Update to use
8108 HAVE_PTRACE_GETREGS.
8109 * linux-low.c (regsets_fetch_inferior_registers)
8110 (regsets_store_inferior_registers): Only return 0 if we processed
8112 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
8113 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
8115 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8117 * inferiors.c (struct thread_info): Add gdb_id.
8118 (add_thread): Add gdb_id argument.
8119 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
8120 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
8121 calls to add_thread.
8122 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
8123 * server.c (handle_query): Use thread_to_gdb_id.
8124 (handle_v_cont, main): Use gdb_id_to_thread_id.
8125 * server.h (add_thread): Update prototype.
8126 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
8129 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8131 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
8132 left-padded registers.
8133 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
8134 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
8136 2005-07-01 Steve Ellcey <sje@cup.hp.com>
8138 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
8139 * configure: Regenerate.
8140 * config.in: Regenerate.
8141 * server.h (NEED_DECLARATION_STRERROR):
8142 Replace with !HAVE_DECL_STRERROR.
8144 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
8146 * linux-low.c (linux_wait, linux_send_signal): Don't test
8147 an unsigned long variable for > 0 if it could be MAX_ULONG.
8148 * server.c (myresume): Likewise.
8149 * target.c (set_desired_inferior): Likewise.
8151 2005-06-13 Mark Kettenis <kettenis@gnu.org>
8153 * configure.ac: Simplify and improve check for socklen_t.
8154 * configure, config.in: Regenerate.
8156 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
8158 * acconfig.h: Remove.
8159 * configure.ac: Add a test for socklen_t. Use three-argument
8160 AC_DEFINE throughout.
8161 * config.in: Regenerated using autoheader 2.59.
8162 * configure: Regenerated.
8164 * gdbreplay.c (socklen_t): Provide a default.
8165 (remote_open): Use socklen_t.
8166 * remote-utils.c (socklen_t): Provide a default.
8167 (remote_open): Use socklen_t.
8168 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
8171 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
8173 * linux-low.c (linux_read_memory, linux_write_memory)
8174 (linux_read_auxv): Likewise.
8175 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
8176 (check_mem_write): Likewise.
8177 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
8179 * regcache.c (struct inferior_rgcache_data, registers_to_string)
8180 (registers_from_string, register_data): Likewise.
8181 * server.c (handle_query, main): Likewise.
8182 * server.h (convert_ascii_to_int, convert_int_to_ascii)
8183 (decode_M_packet): Likewise.
8184 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
8185 * target.h (struct target_ops): Update read_memory, write_memory,
8187 (read_inferior_memory, write_inferior_memory): Update.
8188 * linux-low.h (struct linux_target_ops): Change type of breakpoint
8190 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
8191 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
8192 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
8193 linux-s390-low.c, linux-sh-low.c: Update for changes in
8194 read_inferior_memory and the_low_target->breakpoint.
8196 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
8198 * Makefile.in (SFILES): Add linux-ppc64-low.c.
8199 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
8200 * configure.srv: Add powerpc64-*-linux*.
8201 * linux-ppc64-low.c: New file.
8203 2005-05-23 Orjan Friberg <orjanf@axis.com>
8205 * linux-cris-low.c: New file with support for CRIS.
8206 * linux-crisv32-low.c: Ditto for CRISv32.
8207 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
8208 (clean): Add reg-cris.c and reg-crisv32.c.
8209 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
8210 reg-crisv32.o, and reg-crisv32.c to make rules.
8211 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
8214 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
8216 * linux-low.c (fetch_register): Ensure buffer size is a multiple
8217 of sizeof (PTRACE_XFER_TYPE).
8218 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
8220 2005-05-12 Orjan Friberg <orjanf@axis.com>
8222 * target.h (struct target_ops): Add insert_watchpoint,
8223 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
8224 pointers for hardware watchpoint support.
8225 * linux-low.h (struct linux_target_ops): Ditto.
8226 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
8227 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
8228 to linux_target_ops.
8229 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
8231 * server.c (main): Recognize 'Z' and 'z' packets.
8233 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
8235 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
8236 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
8237 (the_low_target): Add new members.
8239 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
8241 * proc-service.c (ps_lgetregs): Search all_processes instead of
8244 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
8246 * server.c (start_inferior): Change return type to int.
8247 (attach_inferior): Change sigptr to int *.
8248 (handle_v_cont, handle_v_requests): Change signal to int *.
8249 (main): Change signal to int.
8251 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
8253 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
8254 * configure.srv: Add m32r*-*-linux*.
8255 * linux-m32r-low.c: New file.
8257 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
8259 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
8261 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
8263 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
8264 Take unsigned long arguments for PIDs.
8265 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
8266 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
8267 (wait_for_sigstop, linux_resume_one_process)
8268 (regsets_fetch_inferior_registers, linux_send_signal)
8269 (linux_read_auxv): Likewise. Update the types of variables holding
8270 PIDs. Update format string specifiers.
8271 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
8272 * remote-utils.c (prepare_resume_reply): Likewise.
8273 * server.c (cont_thread, general_thread, step_thread)
8274 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
8276 (handle_query): Update format specifiers.
8277 (handle_v_cont, main): Use strtoul for thread IDs.
8278 * server.h (struct inferior_list_entry): Use unsigned long for ID.
8279 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
8280 (general_thread, step_thread, thread_from_wait)
8281 (old_thread_from_wait): Update.
8282 * target.h (struct thread_resume): Use unsigned long for THREAD.
8283 (struct target_ops): Use unsigned long for arguments to attach and
8286 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
8288 * acinclude.m4: Include bfd/bfd.m4 directly.
8289 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
8290 <agriffis@toolchain.org>.
8291 * aclocal.m4, configure: Regenerated.
8293 2005-01-07 Andrew Cagney <cagney@gnu.org>
8295 * configure.ac: Rename configure.in, require autoconf 2.59.
8296 * configure: Re-generate.
8298 2004-12-08 Daniel Jacobowitz <dan@debian.org>
8300 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
8302 * aclocal.m4: Regenerated.
8303 * configure: Regenerated.
8305 2004-11-21 Andreas Schwab <schwab@suse.de>
8307 * linux-m68k-low.c (m68k_num_gregs): Define.
8308 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
8309 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
8310 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
8311 (m68k_breakpoint_at): New. Add to the_low_target.
8313 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
8314 srv_linux_thread_db to yes.
8316 2004-10-20 Joel Brobecker <brobecker@gnat.com>
8318 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
8319 (ARCH_SET_FS): Likewise.
8320 (ARCH_GET_FS): Likewise.
8321 (ARCH_GET_GS): Likewise.
8323 2004-10-16 Daniel Jacobowitz <dan@debian.org>
8325 * linux-i386-low.c (ps_get_thread_area): New.
8326 * linux-x86-64-low.c (ps_get_thread_area): New.
8327 * linux-low.c: Include <sys/syscall.h>.
8328 (linux_kill_one_process): Don't kill the first thread here.
8329 (linux_kill): Kill the first thread here.
8330 (kill_lwp): New function.
8331 (send_sigstop, linux_send_signal): Use it.
8332 * proc-service.c: Clean up #ifdefs.
8333 (fpregset_info): Delete.
8334 (ps_lgetregs): Update and enable implementation.
8335 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
8337 * remote-utils.c (struct sym_cache, symbol_cache): New.
8338 (input_interrupt): Print a clearer message.
8339 (async_io_enabled): New variable.
8340 (enable_async_io, disable_async_io): Use it. Update comments.
8341 (look_up_one_symbol): Use the symbol cache.
8342 * thread-db.c (thread_db_look_up_symbols): New function.
8343 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
8345 2004-10-16 Daniel Jacobowitz <dan@debian.org>
8347 * configure.in: Test for -rdynamic.
8348 * configure: Regenerated.
8349 * Makefile (INTERNAL_LDFLAGS): New.
8350 (gdbserver, gdbreplay): Use it.
8352 2004-09-02 Andrew Cagney <cagney@gnu.org>
8354 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
8356 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
8358 * linux-low.c (linux_wait): Clear all_processes list also.
8360 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8362 * linux-low.c: Include <errno.h>. Remove extern declaration of
8365 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8367 * gdbreplay.c, server.h, utils.c: Update copyright years.
8369 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8371 * server.c (main): Print child status or termination signal from
8372 variable 'signal', not 'sig'.
8374 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8376 * linux-low.c (linux_read_memory): Change return type to
8377 int. Check for and return error from ptrace().
8378 * target.c (read_inferior_memory): Change return type to int. Pass
8379 back return status from the_target->read_memory().
8380 * target.h (struct target_ops): Adapt *read_memory() prototype.
8382 (read_inferior_memory): Adapt prototype.
8383 * server.c (main): Return an error packet if
8384 read_inferior_memory() returns an error.
8386 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
8388 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
8389 Unify with other clean targets.
8391 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8393 * server.c (handle_v_cont): Call set_desired_inferior.
8395 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8397 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
8399 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8401 * linux-low.c (linux_wait): Unblock async I/O.
8402 (linux_resume): Block and enable async I/O.
8403 * remote-utils.c (block_async_io, unblock_async_io): New functions.
8404 * server.h (block_async_io, unblock_async_io): Add prototypes.
8406 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8408 * remote-utils.c (remote_open): Print a status notice after
8410 * server.c (attach_inferior): Print a status notice after
8413 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8415 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
8417 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
8419 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
8421 * server.c, target.h: Update copyright years.
8423 2004-02-25 Roland McGrath <roland@redhat.com>
8425 * target.h (struct target_ops): New member `read_auxv'.
8426 * server.c (handle_query): Handle qPart:auxv:read: query using that.
8427 * linux-low.c (linux_read_auxv): New function.
8428 (linux_target_ops): Initialize `read_auxv' member to that.
8430 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8432 Committed by Jim Blandy <jimb@redhat.com>.
8434 * linux-s390-low.c (s390_num_regs): Update.
8435 (s390_regmap): Remove control registers. Use __s390x__ predefine
8436 instead of GPR_SIZE to distiguish s390 and s390x targets.
8438 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
8440 * linux-low.c: Update copyright year.
8441 (check_removed_breakpoint): Clear pending_is_breakpoint.
8442 (linux_set_resume_request, linux_queue_one_thread)
8443 (resume_status_pending_p): New functions.
8444 (linux_continue_one_thread): Use process->resume.
8445 (linux_resume): Only resume threads if there are no pending events.
8446 * linux-low.h (struct process_info): Add resume request
8449 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
8451 * regcache.c (new_register_cache): Clear the allocated register
8452 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
8454 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
8456 * linux-low.c (linux_resume): Take a struct thread_resume *
8458 (linux_wait): Update call.
8459 (resume_ptr): New static variable.
8460 (linux_continue_one_thread): Renamed from
8461 linux_continue_one_process. Use resume_ptr.
8462 (linux_resume): Use linux_continue_one_thread.
8463 * server.c (handle_v_cont, handle_v_requests): New functions.
8464 (myresume): New function.
8465 (main): Handle 'v' case.
8466 * target.h (struct thread_resume): New type.
8467 (struct target_ops): Change argument of "resume" to struct
8469 (myresume): Delete macro.
8471 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
8473 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
8474 (uninstall): Support DESTDIR.
8476 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
8478 * configure.srv: Add xscale*linux copy of arm*linux entry.
8480 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
8482 * linux-arm-low.c (arm_reinsert_addr): New function.
8483 (the_low_target): Add arm_reinsert_addr.
8485 2003-07-08 Mark Kettenis <kettenis@gnu.org>
8487 * mem-break.c: Remove whitespace at end of file.
8489 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8491 * configure.in: Check whether we need to prototype strerror.
8492 * server.h: Optionally prototype strerror.
8493 * gdbreplay.c (perror_with_name): Use strerror.
8494 * linux-low.c (linux_attach_lwp): Use strerror.
8495 * utils.c (perror_with_name): Use strerror.
8496 * config.in, configure: Regenerated.
8498 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8500 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
8501 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
8503 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
8505 * Makefile.in (SFILES): Update.
8506 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
8507 low-sun3.c: Remove files.
8509 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
8511 * linux-low.c: Move comment to linux_thread_alive where it belonged.
8512 (linux_detach_one_process, linux_detach): New functions.
8513 (linux_target_ops): Add linux_detach.
8514 * server.c (main): Handle 'D' packet.
8515 * target.h (struct target_ops): Add "detach" member.
8516 (detach_inferior): Define.
8518 2003-06-13 Mark Kettenis <kettenis@gnu.org>
8520 From Kelley Cook <kelleycook@wideopenwest.com>:
8521 * configure.srv: Accept i[34567]86 variants.
8523 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
8525 * linux-low.c (linux_wait_for_event): Correct comment typos.
8526 (linux_resume_one_process): Call check_removed_breakpoint.
8527 (linux_send_signal): New function.
8528 (linux_target_ops): Add linux_send_signal.
8529 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
8531 * target.h (struct target_ops): Add send_signal.
8533 2003-05-29 Jim Blandy <jimb@redhat.com>
8535 * linux-low.c (usr_store_inferior_registers): Transfer buf in
8536 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
8537 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
8538 away part of the register's value.
8540 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
8542 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
8543 (linux_wait_for_event, linux_init_signals): Likewise.
8545 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
8547 * configure.in: Check for stdlib.h.
8548 * configure: Regenerated.
8549 * config.in: Regenerated.
8551 2003-01-04 Andreas Schwab <schwab@suse.de>
8553 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
8555 2003-01-02 Andrew Cagney <ac131313@redhat.com>
8557 * Makefile.in: Remove obsolete code.
8559 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
8561 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
8562 defined(PT_FPR0_HI).
8564 2002-11-17 Stuart Hughes <seh@zee2.com>
8566 * linux-arm-low.c (arm_num_regs): Increase.
8567 (arm_regmap): Include status register.
8569 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
8571 * linux-low.c (register_addr): Remove incorrect -1 check.
8573 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
8575 * linux-low.c (linux_create_inferior): Call setpgid. Return
8577 (unstopped_p, linux_signal_pid): Remove.
8578 (linux_target_ops): Remove linux_signal_pid.
8579 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
8580 global instead of target method.
8581 * target.h (struct target_ops): Remove signal_pid. Update comment
8582 for create_inferior.
8583 * server.c (signal_pid): New variable.
8584 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
8585 gdbserver. Set the child to be the foreground process group.
8586 (attach_inferior): Set signal_pid.
8588 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
8590 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
8592 2002-08-20 Jim Blandy <jimb@redhat.com>
8594 * Makefile.in (LDFLAGS): Allow the configure script to establish a
8597 2002-08-01 Andrew Cagney <cagney@redhat.com>
8599 * Makefile.in: Make chill references obsolete.
8601 2002-07-24 Kevin Buettner <kevinb@redhat.com>
8603 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
8604 * configure: Regenerate.
8605 * config.in: Regenerate.
8607 2002-07-09 David O'Brien <obrien@FreeBSD.org>
8609 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
8610 (perror_with_name, remote_close, remote_open, expect, play): Static.
8612 2002-07-04 Michal Ludvig <mludvig@suse.cz>
8614 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
8615 byte offsets instead of an array of indexes.
8616 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
8618 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
8620 * regcache.c: Add comment.
8622 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
8624 * thread-db.c: New file.
8625 * proc-service.c: New file.
8626 * acinclude.m4: New file.
8627 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
8628 proc-service.o, and thread-db.o.
8629 (linux-low.o): Add USE_THREAD_DB.
8630 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
8631 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
8632 * aclocal.m4: Regenerated.
8633 * config.in: Regenerated.
8634 * configure: Regenerated.
8635 * configure.in: Check for proc_service.h, sys/procfs.h,
8636 thread_db.h, and linux/elf.h headrs.
8637 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
8638 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
8639 Check for -lthread_db and thread support.
8640 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
8641 PowerPC, and SuperH.
8642 * i387-fp.c: Constify arguments.
8643 * i387-fp.h: Likewise.
8644 * inferiors.c: (struct thread_info): Renamed from
8645 `struct inferior_info'. Remove PID member. Use generic inferior
8646 list header. All uses updated.
8647 (inferiors, signal_pid): Removed.
8648 (all_threads): New variable.
8649 (get_thread): Define.
8650 (add_inferior_to_list): New function.
8651 (for_each_inferior): New function.
8652 (change_inferior_id): New function.
8653 (add_inferior): Removed.
8654 (remove_inferior): New function.
8655 (add_thread): New function.
8656 (free_one_thread): New function.
8657 (remove_thread): New function.
8658 (clear_inferiors): Use for_each_inferior and free_one_thread.
8659 (find_inferior): New function.
8660 (find_inferior_id): New function.
8661 (inferior_target_data): Update argument type.
8662 (set_inferior_target_data): Likewise.
8663 (inferior_regcache_data): Likewise.
8664 (set_inferior_regcache_data): Likewise.
8665 * linux-low.c (linux_bp_reinsert): Remove.
8666 (all_processes, stopping_threads, using_thrads)
8667 (struct pending_signals, debug_threads, pid_of): New.
8668 (inferior_pid): Replace with macro.
8669 (struct inferior_linux_data): Remove.
8670 (get_stop_pc, add_process): New functions.
8671 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
8672 Use add_process and add_thread.
8673 (linux_attach_lwp): New function, based on old linux_attach. Use
8674 add_process and add_thread. Set stop_expected for new threads.
8675 (linux_attach): New function.
8676 (linux_kill_one_process): New function.
8677 (linux_kill): Kill all LWPs.
8678 (linux_thread_alive): Use find_inferior_id.
8679 (check_removed_breakpoints, status_pending_p): New functions.
8680 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
8681 Update. Use WNOHANG. Wait for cloned processes also. Update process
8682 struct for the found process.
8683 (linux_wait_for_event): New function.
8684 (linux_wait): Use it. Support LWPs.
8685 (send_sigstop, wait_for_sigstop, stop_all_processes)
8686 (linux_resume_one_process, linux_continue_one_process): New functions.
8687 (linux_resume): Support LWPs.
8688 (REGISTER_RAW_SIZE): Remove.
8689 (fetch_register): Use register_size instead. Call supply_register.
8690 (usr_store_inferior_registers): Likewise. Call collect_register.
8692 (regsets_fetch_inferior_registers): Improve error message.
8693 (regsets_store_inferior_registers): Add debugging.
8694 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
8695 (unstopped_p, linux_signal_pid): New functions.
8696 (linux_target_ops): Add linux_signal_pid.
8697 (linux_init_signals): New function.
8698 (initialize_low): Call it. Initialize using_threads.
8699 * regcache.c (inferior_regcache_data): Add valid
8701 (get_regcache): Fetch registers lazily. Add fetch argument
8702 and update all callers.
8703 (regcache_invalidate_one, regcache_invalidate): New
8705 (new_register_cache): Renamed from create_register_cache.
8706 Return the new regcache.
8707 (free_register_cache): Change argument to a void *.
8708 (registers_to_string, registers_from_string): Call get_regcache
8709 with fetch flag set.
8710 (register_data): Make static. Pass fetch flag to get_regcache.
8711 (supply_register): Call get_regcache with fetch flag clear.
8712 (collect_register): Call get_regcache with fetch flag set.
8713 (collect_register_as_string): New function.
8714 * regcache.h: Update.
8715 * remote-utils.c (putpkt): Flush after debug output and use
8717 Handle input interrupts while waiting for an ACK.
8718 (input_interrupt): Use signal_pid method.
8719 (getpkt): Flush after debug output and use stderr.
8720 (outreg): Use collect_register_as_string.
8721 (new_thread_notify, dead_thread_notify): New functions.
8722 (prepare_resume_reply): Check using_threads. Set thread_from_wait
8724 (look_up_one_symbol): Flush after debug output.
8725 * server.c (step_thread, server_waiting): New variables.
8726 (start_inferior): Don't use signal_pid. Update call to mywait.
8727 (attach_inferior): Update call to mywait.
8728 (handle_query): Handle qfThreadInfo and qsThreadInfo.
8729 (main): Don't fetch/store registers explicitly. Use
8730 set_desired_inferior. Support proposed ``Hs'' packet. Update
8733 (struct inferior_list, struct_inferior_list_entry): New.
8734 * target.c (set_desired_inferior): New.
8735 (write_inferior_memory): Constify.
8736 (mywait): New function.
8738 (struct target_ops): New signal_pid method.
8739 (mywait): Removed macro, added prototype.
8741 * linux-low.h (regset_func): Removed.
8742 (regset_fill_func, regset_store_func): New.
8743 (enum regset_type): New.
8744 (struct regset_info): Add type field. Use new operation types.
8745 (struct linux_target_ops): stop_pc renamed to get_pc.
8746 Add decr_pc_after_break and breakpoint_at.
8747 (get_process, get_thread_proess, get_process_thread)
8748 (strut process_info, all_processes, linux_attach_lwp)
8749 (thread_db_init): New.
8751 * linux-arm-low.c (arm_get_pc, arm_set_pc,
8752 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
8753 (the_low_target): Add new members.
8754 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
8755 (i386_store_fpxregset): Constify.
8756 (target_regsets): Add new kind identifier.
8757 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
8758 (i386_set_pc): Add debugging.
8759 (i386_breakpoint_at): New function.
8760 (the_low_target): Add new members.
8761 * linux-mips-low.c (mips_get_pc, mips_set_pc)
8762 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
8763 (mips_breakpoint_at): New.
8764 (the_low_target): Add new members.
8765 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
8766 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
8767 (the_low_target): Add new members.
8768 * linux-sh-low.c (sh_get_pc, sh_set_pc)
8769 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
8770 (the_low_target): Add new members.
8771 * linux-x86-64-low.c (target_regsets): Add new kind
8774 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
8776 From Martin Pool <mbp@samba.org>:
8777 * server.c (gdbserver_usage): New function.
8780 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
8782 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
8785 2002-05-04 Andrew Cagney <ac131313@redhat.com>
8787 * Makefile.in: Remove obsolete code.
8789 2002-04-24 Michal Ludvig <mludvig@suse.cz>
8791 * linux-low.c (regsets_fetch_inferior_registers),
8792 (regsets_store_inferior_registers): Removed cast to int from
8794 * regcache.h: Added declaration of struct inferior_info.
8796 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8798 * inferiors.c (struct inferior_info): Add regcache_data.
8799 (add_inferior): Call create_register_cache.
8800 (clear_inferiors): Call free_register_cache.
8801 (inferior_regcache_data, set_inferior_regcache_data): New functions.
8802 * regcache.c (struct inferior_regcache_data): New.
8803 (registers): Remove.
8804 (get_regcache): New function.
8805 (create_register_cache, free_register_cache): New functions.
8806 (set_register_cache): Don't initialize the register cache here.
8807 (registers_to_string, registers_from_string, register_data): Call
8809 * regcache.h: Add prototypes.
8810 * server.h: Likewise.
8812 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8814 * mem-break.c: New file.
8815 * mem-break.h: New file.
8816 * Makefile.in: Add mem-break.o rule; update server.h
8818 * inferiors.c (struct inferior_info): Add target_data
8820 (clear_inferiors): Free target_data member if set.
8821 (inferior_target_data, set_inferior_target_data): New functions.
8822 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
8823 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
8824 * linux-low.c (linux_bp_reinsert): New variable.
8825 (struct inferior_linux_data): New.
8826 (linux_create_inferior): Use set_inferior_target_data.
8827 (linux_attach): Likewise. Call add_inferior.
8828 (linux_wait_for_one_inferior): New function.
8829 (linux_wait): Call it.
8830 (linux_write_memory): Add const.
8831 (initialize_low): Call set_breakpoint_data.
8832 * linux-low.h (struct linux_target_ops): Add breakpoint
8834 * server.c (attach_inferior): Remove extra add_inferior
8836 * server.h: Include mem-break.h. Update inferior.c
8838 * target.c (read_inferior_memory)
8839 (write_inferior_memory): New functions.
8840 * target.h (read_inferior_memory)
8841 (write_inferior_memory): Change macros to prototypes.
8842 (struct target_ops): Update comments. Add const to write_memory
8845 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
8847 * linux-low.c (usr_store_inferior_registers): Support
8848 registers which are allowed to fail to store.
8849 * linux-low.h (linux_target_ops): Likewise.
8850 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
8851 (ppc_cannot_store_register): FPSCR may not be storable.
8853 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8855 * server.h: Include <string.h> if HAVE_STRING_H.
8856 * ChangeLog: Correct paths in last ChangeLog entry.
8858 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8860 * linux-low.h: Remove obsolete prototypes.
8861 (struct linux_target_ops): New.
8862 (extern the_low_target): New.
8863 * linux-low.c (num_regs, regmap): Remove declarations.
8864 (register_addr): Use the_low_target explicitly.
8865 (fetch_register): Likewise.
8866 (usr_fetch_inferior_registers): Likewise.
8867 (usr_store_inferior_registers): Likewise.
8868 * linux-arm-low.c (num_regs): Remove.
8869 (arm_num_regs): Define.
8870 (arm_regmap): Renamed from regmap, made static.
8871 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
8873 (arm_cannot_store_register): Renamed from cannot_store_register,
8875 (the_low_target): New.
8876 * linux-i386-low.c (num_regs): Remove.
8877 (i386_num_regs): Define.
8878 (i386_regmap): Renamed from regmap, made static.
8879 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
8881 (i386_cannot_store_register): Renamed from cannot_store_register,
8883 (the_low_target): New.
8884 * linux-ia64-low.c (num_regs): Remove.
8885 (ia64_num_regs): Define.
8886 (ia64_regmap): Renamed from regmap, made static.
8887 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
8889 (ia64_cannot_store_register): Renamed from cannot_store_register,
8891 (the_low_target): New.
8892 * linux-m68k-low.c (num_regs): Remove.
8893 (m68k_num_regs): Define.
8894 (m68k_regmap): Renamed from regmap, made static.
8895 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
8897 (m68k_cannot_store_register): Renamed from cannot_store_register,
8899 (the_low_target): New.
8900 * linux-mips-low.c (num_regs): Remove.
8901 (mips_num_regs): Define.
8902 (mips_regmap): Renamed from regmap, made static.
8903 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
8905 (mips_cannot_store_register): Renamed from cannot_store_register,
8907 (the_low_target): New.
8908 * linux-ppc-low.c (num_regs): Remove.
8909 (ppc_num_regs): Define.
8910 (ppc_regmap): Renamed from regmap, made static.
8911 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
8913 (ppc_cannot_store_register): Renamed from cannot_store_register,
8915 (the_low_target): New.
8916 * linux-s390-low.c (num_regs): Remove.
8917 (s390_num_regs): Define.
8918 (s390_regmap): Renamed from regmap, made static.
8919 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
8921 (s390_cannot_store_register): Renamed from cannot_store_register,
8923 (the_low_target): New.
8924 * linux-sh-low.c (num_regs): Remove.
8925 (sh_num_regs): Define.
8926 (sh_regmap): Renamed from regmap, made static.
8927 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
8929 (sh_cannot_store_register): Renamed from cannot_store_register,
8931 (the_low_target): New.
8932 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
8933 (the_low_target): New.
8935 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8937 * Makefile.in: Add stamp-h target.
8938 * configure.in: Create stamp-h.
8939 * configure: Regenerated.
8941 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8943 * inferiors.c: New file.
8944 * target.c: New file.
8945 * target.h: New file.
8946 * Makefile.in: Add target.o and inferiors.o. Update
8948 * linux-low.c (inferior_pid): New static variable,
8949 moved from server.c.
8950 (linux_create_inferior): Renamed from create_inferior.
8951 Call add_inferior. Return 0 on success instead of a PID.
8952 (linux_attach): Renamed from myattach.
8953 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
8954 (linux_thread_alive): Renamed from mythread_alive.
8955 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
8957 (linux_resume): Renamed from myresume. Add missing ``return 0''.
8958 (regsets_store_inferior_registers): Correct error message.
8959 Add missing ``return 0''.
8960 (linux_fetch_registers): Renamed from fetch_inferior_registers.
8961 (linux_store_registers): Renamed from store_inferior_registers.
8962 (linux_read_memory): Renamed from read_inferior_memory.
8963 (linux_write_memory): Renamed from write_inferior_memory.
8964 (linux_target_ops): New structure.
8965 (initialize_low): Call set_target_ops ().
8966 * remote-utils.c (unhexify): New function.
8967 (hexify): New function.
8968 (input_interrupt): Send signals to ``signal_pid''.
8969 * server.c (inferior_pid): Remove.
8970 (start_inferior): Update create_inferior call.
8971 (attach_inferior): Call add_inferior.
8972 (handle_query): New function.
8973 (main): Call handle_query for `q' packets.
8974 * server.h: Include "target.h". Remove obsolete prototypes.
8975 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
8977 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8979 * Makefile.in: Add WARN_CFLAGS. Update configury
8981 * configure.in: Check for <string.h>
8982 * configure: Regenerate.
8983 * config.in: Regenerate.
8984 * gdbreplay.c: Include needed system headers.
8985 (remote_open): Remove strchr prototype.
8986 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
8987 * regcache.c (supply_register): Change buf argument to const void *.
8988 (supply_register_by_name): Likewise.
8989 (collect_register): Change buf argument to void *.
8990 (collect_register_by_name): Likewise.
8991 * regcache.h: Add missing prototypes.
8992 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
8993 * server.c (handle_query): New function.
8994 (attached): New static variable, moved out of main.
8995 (main): Quiet longjmp clobber warnings.
8996 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
8997 * utils.c (error): Remove NORETURN.