1 2014-02-19 Doug Evans <dje@google.com>
3 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4 * inferiors.c (add_thread): Change result type to struct thread_info *.
6 (add_lwp): Call add_thread here instead of in callers.
8 * linux-low.h (get_lwp_thread): Rewrite.
9 (struct lwp_info): New member "thread".
11 2014-02-19 Doug Evans <dje@google.com>
13 * linux-low.c (add_lwp): Change result to struct lwp_info *.
16 2014-02-19 Doug Evans <dje@google.com>
18 * inferiors.c (add_thread): Fix whitespace.
20 2014-02-19 Doug Evans <dje@google.com>
22 * dll.c (clear_dlls): Replace accessing list implemention details
24 * gdbthread.h (get_first_thread): Declare.
25 * inferiors.c (for_each_inferior_with_data): New function.
26 (get_first_thread): New function.
27 (find_thread_ptid): Simplify.
28 (get_first_inferior): New function.
30 (one_inferior_p): New function.
31 (clear_inferior_list): New function.
32 (clear_inferiors): Update.
33 * inferiors.h (for_each_inferior_with_data): Declare.
34 (clear_inferior_list): Declare.
35 (one_inferior_p): Declare.
36 (get_first_inferior): Declare.
37 * linux-low.c (linux_wait_for_event): Replace accessing list
38 implemention details with API function.
39 * server.c (target_running): Ditto.
40 (accumulate_file_name_length): New function.
41 (emit_dll_description): New function.
42 (handle_qxfer_libraries): Replace accessing list implemention
43 details with API function.
44 (handle_qxfer_threads_worker): New function.
45 (handle_qxfer_threads_proper): Replace accessing list implemention
46 details with API function.
47 (handle_query): Ditto.
48 (visit_actioned_threads_callback_ftype): New typedef.
49 (visit_actioned_threads_data): New struct.
50 (visit_actioned_threads): Rewrite to be find_inferior callback.
51 (resume): Call find_inferior.
52 (handle_status): Replace accessing list implemention
53 details with API function.
54 (process_serial_event): Replace accessing list implemention details
56 * target.c (set_desired_inferior): Replace accessing list implemention
57 details with API function.
58 * tracepoint.c (same_process_p): New function.
59 (gdb_agent_about_to_close): Replace accessing list implemention
60 details with API function.
61 * win32-low.c (child_delete_thread): Replace accessing list
62 implemention details with API function.
63 (match_dll_by_basename): New function.
64 (dll_is_loaded_by_basename): New function.
65 (win32_ensure_ntdll_loaded): Replace accessing list implemention
66 details call to dll_is_loaded_by_basename.
68 2014-02-19 Doug Evans <dje@google.com>
70 * dll.h (struct dll_info): Add comment.
71 * gdbthread.h (struct thread_info): Add comment.
72 (current_ptid): Simplify.
73 * inferiors.c (add_process): Update.
74 (remove_process): Update.
75 * inferiors.h (struct process_info): Rename member "head" to "entry".
76 * linux-low.c (delete_lwp): Update.
78 (last_thread_of_process_p): Update.
79 (kill_one_lwp_callback, linux_kill): Update.
80 (status_pending_p_callback): Update.
81 (wait_for_sigstop): Update. Simplify read of ptid.
82 (start_step_over): Update.
83 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
84 (get_lwp_thread): Update.
85 (struct lwp_info): Rename member "head" to "entry".
86 * regcache.h (inferior_list_entry): Delete.
87 * server.c (kill_inferior_callback): Update.
88 (detach_or_kill_inferior_callback): Update.
89 (print_started_pid): Update.
90 (print_attached_pid): Update.
91 (process_serial_event): Simplify read of ptid.
92 * thread-db.c (thread_db_create_event): Update.
93 (thread_db_get_tls_address): Update.
94 * win32-low.c (current_inferior_ptid): Simplify.
96 2014-02-19 Tom Tromey <tromey@redhat.com>
98 * target.h (struct target_ops) <supports_btrace>: Add target_ops
100 (target_supports_btrace): Update.
102 2014-02-14 Yao Qi <yao@codesourcery.com>
104 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
105 (rsp-low-ipa.o): New target.
107 2014-02-12 Tom Tromey <tromey@redhat.com>
109 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
110 convert_ascii_to_int.
111 * regcache.c (registers_to_string): Likewise.
112 * remote-utils.c (decode_M_packet): Likewise.
113 * server.c (process_serial_event): Likewise.
115 2014-02-12 Tom Tromey <tromey@redhat.com>
117 * server.c (handle_query, handle_v_run): Use hex2bin, not
119 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
121 2014-02-12 Tom Tromey <tromey@redhat.com>
123 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
124 convert_int_to_ascii.
125 * regcache.c (registers_to_string, collect_register_as_string):
127 * remote-utils.c (look_up_one_symbol, relocate_instruction):
129 * server.c (process_serial_event): Likewise.
130 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
131 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
133 2014-02-12 Tom Tromey <tromey@redhat.com>
135 * remote-utils.c (look_up_one_symbol, monitor_output): Use
137 * tracepoint.c (cmd_qtstatus): Likewise.
139 2014-02-12 Tom Tromey <tromey@redhat.com>
141 * remote-utils.c (monitor_output): Pass explicit length to
144 2014-02-12 Tom Tromey <tromey@redhat.com>
146 * tracepoint.c: Include rsp-low.h.
147 * server.c: Include rsp-low.h.
148 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
149 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
151 * remote-utils.c: Include rsp-low.h.
152 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
153 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
154 (convert_int_to_ascii, convert_ascii_to_int): Move to
156 * regcache.c: Include rsp-low.h.
157 * ax.c: Include rsp-low.h.
158 * Makefile.in (SFILES): Add common/rsp-low.c.
159 (OBS): Add rsp-low.o.
160 (rsp-low.o): New target.
162 2014-02-12 Tom Tromey <tromey@redhat.com>
164 * utils.h (pulongest, plongest, phex_nz): Don't declare.
165 Include print-utils.h.
166 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
167 (plongest, thirty_two, phex_nz): Remove.
168 * Makefile.in (SFILES): Add common/print-utils.c.
169 (OBS): Add print-utils.o.
170 (print-utils-ipa.o): New target.
171 (print-utils.o): New target.
172 (IPA_OBJS): Add print-utils-ipa.o.
174 2014-02-06 Tom Tromey <tromey@redhat.com>
176 * Makefile.in (SFILES): Fix indentation.
178 2014-02-05 Doug Evans <dje@google.com>
180 * linux-low.c (linux_wait_for_event): Improve comment.
181 (linux_wait_1): Keep current_inferior in sync with event_child.
183 2014-01-22 Doug Evans <dje@google.com>
185 * gdbthread.h (gdb_id_to_thread): Delete, unused.
187 2014-01-22 Doug Evans <dje@google.com>
189 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
190 * configure: Regenerate.
191 * config.in: Regenerate.
192 * Makefile.in (SFILES): Add debug.c.
196 * linux-aarch64-low.c (*): Update all debugging printfs to use
197 debug_printf instead of fprintf.
198 * linux-arm-low.c (*): Ditto.
199 * linux-cris-low.c (*): Ditto.
200 * linux-crisv32-low.c (*): Ditto.
201 * linux-m32r-low.c (*): Ditto.
202 * linux-sparc-low.c (*): Ditto.
203 * linux-x86.c (*): Ditto.
204 * linux-low.c (*): Ditto.
205 (linux_wait_1): Add calls to debug_enter, debug_exit.
206 (linux_wait): Remove redundant debugging printf.
207 (stop_all_lwps): Add calls to debug_enter, debug_exit.
208 (linux_resume, unstop_all_lwps): Ditto.
209 * mem-break.c (*): Update all debugging printfs to use
210 debug_printf instead of fprintf.
211 * remote-utils.c (*): Ditto.
212 * thread-db.c (*): Ditto.
213 * server.c #include <ctype.h>, "gdb_vecs.h".
214 (debug_threads): Moved to debug.c.
215 (*): Update all debugging printfs to use debug_printf instead of
217 (start_inferior): Replace call to fflush with call to debug_flush.
218 (monitor_show_help): Mention set debug-format.
219 (parse_debug_format_options): New function.
220 (handle_monitor_command): Handle "monitor set debug-format".
221 (gdbserver_usage): Mention --debug-format.
222 (main): Parse --debug-format.
223 * server.h (debug_threads): Declaration moved to debug.h.
225 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
226 trace_debug_1 that uses debug_printf.
227 (tracepoint_look_up_symbols): Update all debugging printfs to use
228 debug_printf instead of fprintf.
230 2014-01-20 Baruch Siach <baruch@tkos.co.il>
232 * linux-xtensa-low.c: Include asm/ptrace.h instead of
235 2014-01-17 Pedro Alves <palves@redhat.com>
238 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
239 defined after including gdb_proc_service.h.
241 2014-01-16 Doug Evans <dje@google.com>
243 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
246 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
248 * target.h (target_ops) <read_btrace>: Change parameters and
249 return type to allow error reporting.
250 * server.c (handle_qxfer_btrace): Support delta reads. Pass
251 trace reading errors on.
252 * linux-low.c (linux_low_read_btrace): Pass trace reading
254 (linux_low_disable_btrace): New.
256 2014-01-15 Doug Evans <dje@google.com>
258 * inferiors.c (thread_id_to_gdb_id): Delete.
259 * inferiors.h (thread_id_to_gdb_id): Delete.
261 2014-01-13 Eli Zaretskii <eliz@gnu.org>
263 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
264 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
267 2014-01-08 Pedro Alves <palves@redhat.com>
269 * server.c (handle_status): Don't discard previous queued stop
270 replies or thread's pending status here.
271 (main) <disconnection>: Do it here instead.
273 2014-01-08 Pedro Alves <palves@redhat.com>
275 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
276 * server.c (visit_actioned_threads, handle_pending_status): New
278 (handle_v_cont): Factor out parts to ...
279 (resume): ... this new function. If in all-stop, and a thread
280 being resumed has a pending status, report it without actually
282 (myresume): Adjust to use the new 'resume' function.
283 (clear_pending_status_callback, set_pending_status_callback)
284 (find_status_pending_thread_callback): New functions.
285 (handle_status): Handle the case of multiple threads having
286 interesting statuses to report. Report threads' real last signal
287 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
288 with an interesting thread to report the status for, instead of
289 always reporting the status of the first thread.
291 2014-01-01 Joel Brobecker <brobecker@adacore.com>
293 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
294 * gdbreplay.c (gdbreplay_version): Likewise.
296 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
298 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
299 iov.iov_len with the real length in use.
301 2013-12-13 Joel Brobecker <brobecker@adacore.com>
303 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
304 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
305 for all targets that use win32-low.c.
306 * win32-low.c (win32_ensure_ntdll_loaded): New function.
307 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
309 2013-12-13 Pedro Alves <palves@redhat.com>
311 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
312 if equal to TARGET_WAITKIND_LOADED.
313 * win32-low.c (cached_status): New static global.
314 (win32_wait): Add declaration.
315 (do_initial_child_stuff): Flush all initial pending debug events
316 up to the initial breakpoint.
317 (win32_wait): If CACHED_STATUS was set, return that instead
318 of doing a real wait. Remove the code resuming the execution
319 of the inferior after receiving a TARGET_WAITKIND_LOADED event
320 during the initial phase. Also remove the code changing
321 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
322 TARGET_WAITKIND_STOPPED.
324 2013-12-11 Yao Qi <yao@codesourcery.com>
326 * notif.c (handle_notif_ack): Return 0 if no notification
329 2013-11-20 Doug Evans <dje@google.com>
331 * linux-low.c (linux_set_resume_request): Fix comment.
333 2013-11-20 Doug Evans <dje@google.com>
335 * linux-low.c (resume_status_pending_p): Tweak comment.
337 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
339 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
340 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
341 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
342 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
343 (srv_amd64_regobj): Add amd64-mpx.o.
344 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
345 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
346 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
347 * i387-fp.c (num_pl_bnd_register) Added constant.
348 (num_pl_bnd_cfg_registers) Added constant.
349 (struct i387_xsave) Added reserved area and MPX fields.
350 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
351 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
353 (tdesc_i386_mpx_linux): Add MPX amd64 target.
354 (init_registers_amd64_mpx_linux): Declare new function.
355 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
356 (x86_64_regmap): Add MPX registers.
357 (x86_linux_read_description): Add MPX case.
358 (initialize_low_arch): Initialize MPX targets.
360 2013-11-18 Tom Tromey <tromey@redhat.com>
362 * configure: Rebuild.
363 * configure.ac: Don't check for stdlib.h.
364 * gdbreplay.c: Unconditionally include stdlib.h.
366 2013-11-18 Tom Tromey <tromey@redhat.com>
368 * config.in: Rebuild.
369 * configure: Rebuild.
370 * configure.ac: Don't use AC_HEADER_DIRENT.
372 2013-11-18 Tom Tromey <tromey@redhat.com>
374 * server.h: Don't check HAVE_STRING_H.
375 * gdbreplay.c: Don't check HAVE_STRING_H.
376 * configure: Rebuild.
378 2013-11-18 Tom Tromey <tromey@redhat.com>
380 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
383 2013-11-08 Tom Tromey <tromey@redhat.com>
385 * configure, config.in: Rebuild.
386 * configure.ac: Remove unused configury.
388 2013-11-08 Tom Tromey <tromey@redhat.com>
390 * acinclude.m4: Include common.m4, codeset.m4.
391 * configure, config.in: Rebuild.
392 * configure.ac: Use GDB_AC_COMMON.
394 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
396 * linux-s390-low.c (HWCAP_S390_TE): New define.
397 (s390_arch_setup): Consider the TE field in the HWCAP for
398 determining 'have_regset_tdb'.
400 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
403 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
406 2013-10-02 Pedro Alves <palves@redhat.com>
408 * server.c (process_serial_event): Don't output "GDBserver
409 exiting" if GDB is connected through stdio.
410 * target.c (mywait): Likewise, be silent if GDB is connected
413 2013-10-01 Joel Brobecker <brobecker@adacore.com>
415 * lynx-low.c (lynx_add_threads_after_attach): New function.
416 (lynx_attach): Remove call to add_thread. Add call to
417 lynx_add_threads_after_attach instead.
419 2013-09-28 Mike Frysinger <vapier@gentoo.org>
421 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
422 * config.in, configure: Regenerated.
424 2013-09-18 Yao Qi <yao@codesourcery.com>
427 * server.c (start_inferior): Clear 'resume_info'.
429 2013-09-16 Jiong Wang <jiwang@tilera.com>
431 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
434 2013-09-16 Jiong Wang <jiwang@tilera.com>
436 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
437 linux-tile-low.o to srv_tgtobj.
439 2013-09-16 Will Newton <will.newton@linaro.org>
441 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
444 2013-09-06 Pedro Alves <palves@redhat.com>
446 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
447 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
448 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
449 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
450 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
451 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
453 2013-09-06 Pedro Alves <palves@redhat.com>
455 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
456 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
458 2013-09-06 Pedro Alves <palves@redhat.com>
460 * linux-amd64-ipa.c: Include tracepoint.h.
461 * linux-i386-ipa.c: Include tracepoint.h.
463 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
465 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
466 (ps_get_thread_area): New function.
468 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
470 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
471 (initialize_low_arch): Call init_registers_crisv32 rather than
472 init_register_crisv32.
474 2013-09-05 Pedro Alves <palves@redhat.com>
476 * server.h (handle_vFile, hostio_last_error_from_errno): Move
478 * hostio.h: ... this new file.
479 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
480 win32-low.c: Include hostio.h.
482 2013-09-05 Pedro Alves <palves@redhat.com>
484 * server.h (gdb_client_data, handler_func, callback_handler_func)
485 (delete_file_handler, add_file_handler, append_callback_event)
486 (delete_callback_event, start_event_loop, initialize_event_loop):
487 Move to event-loop.h and include it.
488 * event-loop.h: New file.
490 2013-09-05 Pedro Alves <palves@redhat.com>
492 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
493 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
494 (loaded_dll, unloaded_dll): Move to ...
495 * dll.h: ... this new file.
496 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
498 2013-09-05 Pedro Alves <palves@redhat.com>
500 * server.h (current_process, get_thread_process, all_processes)
501 (add_inferior_to_list, for_each_inferior, current_inferior)
502 (remove_inferior, add_process, remove_process, find_process_pid)
503 (have_started_inferiors_p, have_attached_inferiors_p)
504 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
505 (clear_inferiors, find_inferior, find_inferior_id)
506 (inferior_target_data, set_inferior_target_data)
507 (inferior_regcache_data, set_inferior_regcache_data): Move to
508 inferiors.h, and include it.
509 * inferiors.h: New file.
511 2013-09-05 Pedro Alves <palves@redhat.com>
513 * server.h (struct emit_ops, current_insn_ptr, emit_error):
517 2013-09-05 Pedro Alves <palves@redhat.com>
519 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
521 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
522 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
523 (handle_tracepoint_general_set, handle_tracepoint_query)
524 (tracepoint_finished_step, tracepoint_was_hit)
525 (release_while_stepping_state_list, current_traceframe)
526 (in_readonly_region, traceframe_read_mem)
527 (fetch_traceframe_registers, traceframe_read_sdata)
528 (traceframe_read_info, struct fast_tpoint_collect_status)
529 (fast_tracepoint_collecting, force_unlock_trace_buffer)
530 (handle_tracepoit_bkpts, initialize_low_tracepoint)
531 (supply_fast_tracepoint_registers)
532 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
533 (ipa_tdesc, claim_trampoline_space)
534 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
535 (agent_mem_read, agent_get_trace_state_variable_value)
536 (agent_set_trace_state_variable_value, agent_tsv_read)
537 (agent_mem_read_string, get_raw_reg_func_addr)
538 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
539 * tracepoint.h: ... this new file.
541 2013-09-05 Pedro Alves <palves@redhat.com>
543 * server.h (perror_with_name, error, fatal, warning, paddress)
544 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
548 2013-09-05 Pedro Alves <palves@redhat.com>
550 * server.h (remote_debug, noack_mode, transport_is_reliable)
551 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
552 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
553 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
554 (write_enn, initialize_async_io, enable_async_io)
555 (disable_async_io, check_remote_input_interrupt_request)
556 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
557 (dead_thread_notify, prepare_resume_reply)
558 (decode_address_to_semicolon, decode_address, decode_m_packet)
559 (decode_M_packet, decode_X_packet, decode_xfer_write)
560 (decode_search_memory_packet, unhexify, hexify)
561 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
562 (look_up_one_symbol, relocate_instruction)
563 (monitor_output): Move to remote-utils.h, and include it.
564 * remote-utils.h: New file.
566 2013-09-05 Pedro Alves <palves@redhat.com>
568 * server.h (_): Delete.
570 2013-09-02 Pedro Alves <palves@redhat.com>
572 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
573 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
575 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
577 2013-09-02 Pierre Muller <muller@sourceware.org>
579 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
580 or WriteProcessMemory complete successfully and handle
581 ERROR_PARTIAL_COPY error.
583 2013-09-02 Pedro Alves <palves@redhat.com>
585 * server.c (gdb_read_memory): Return -1 on traceframe memory read
586 error instead of EIO.
588 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
591 * linux-low.c: Include filestuff.h.
592 (linux_create_inferior) <pid == 0>: Call close_most_fds.
593 * lynx-low.c: Include filestuff.h.
594 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
595 * server.c: Include filestuff.h.
596 (main): Call notice_open_fds.
597 * spu-low.c: Include filestuff.h.
598 (spu_create_inferior) <pid == 0>: Call close_most_fds.
600 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
602 * Makefile.in: Explain why ../target and ../nat are not
603 listed as include file search paths.
604 (linux-waitpid.o): New object file rule.
605 * configure.srv (srv_native_linux_obj): New variable.
606 Replace all occurrences of linux native object files with
607 $srv_native_linux_obj.
608 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
609 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
610 (linux_enable_event_reporting): Remove declaration.
611 (my_waitpid): Moved to common/linux-waitpid.c.
612 (linux_wait_for_event): Pass ptid when calling
613 linux_enable_event_reporting.
614 (linux_supports_tracefork_flag): Remove.
615 (linux_enable_event_reporting): Likewise.
616 (linux_tracefork_grandchild): Remove.
617 (STACK_SIZE): Moved to common/linux-ptrace.c.
618 (linux_tracefork_child): Remove.
619 (linux_test_for_tracefork): Remove.
620 (linux_look_up_symbols): Call linux_supports_traceclone.
621 (initialize_low): Remove call to linux_test_for_tracefork.
622 * linux-low.h (PTRACE_TYPE_ARG3): Move to
623 common/linux-ptrace.h.
624 (PTRACE_TYPE_ARG4): Likewise.
625 Include linux-ptrace.h.
627 2013-08-21 Pedro Alves <palves@redhat.com>
629 * config.in: Renegerate.
631 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
633 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
634 (SFILES): Remove $(srcdir)/common/target-common.c and
635 add $(srcdir)/target/waitstatus.c.
636 (OBS): Remove target-common.o and add waitstatus.o.
637 (server_h): Remove $(srcdir)/../common/target-common.h and
638 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
639 and $(srcdir)/../target/waitstatus.h.
640 (target-common.o): Remove.
641 (waitstatus.o): New target object file.
642 * target.h: Do not include target-common.h and
643 include target/resume.h, target/wait.h and
646 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
648 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
650 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
651 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
653 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
654 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
656 2013-07-27 Jie Zhang <jie@codesourcery.com>
657 Daniel Jacobowitz <dan@codesourcery.com>
658 Yao Qi <yao@codesourcery.com>
660 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
661 (mips-linux-watch.o): New rule.
662 (mips_linux_watch_h): New variable.
663 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
665 * linux-mips-low.c: Include mips-linux-watch.h.
666 (struct arch_process_info, struct arch_lwp_info): New.
667 (update_watch_registers_callback): New function.
668 (mips_linux_new_process, mips_linux_new_thread) New functions.
669 (mips_linux_prepare_to_resume, mips_insert_point): New
671 (mips_remove_point, mips_stopped_by_watchpoint): New
673 (rsp_bp_type_to_target_hw_bp_type): New function.
674 (mips_stopped_data_address): New function.
675 (the_low_target): Add watchpoint support functions.
677 2013-07-27 Yao Qi <yao@codesourcery.com>
679 * i386-low.c: Include break-common.h.
680 (enum target_hw_bp_type): Remove.
682 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
684 * Makefile.in (SFILES): /common/target-common.c.
685 (OBS): Add target-common.o.
686 (server_h): Add $(srcdir)/../common/target-common.h.
687 (target-common.o): New target.
688 * server.c (queue_stop_reply_callback): Free
689 status string after use.
690 * target.c (target_waitstatus_to_string): Remove.
691 * target.h: Include target-common.h.
692 (resume_kind): Likewise.
693 (target_waitkind): Likewise.
694 (target_waitstatus): Likewise.
695 (TARGET_WNOHANG): Likewise.
697 2013-07-04 Yao Qi <yao@codesourcery.com>
699 * Makefile.in (host_alias): Use @host_noncanonical@.
700 (target_alias): Use @target_noncanonical@.
701 * configure.ac: Use ACX_NONCANONICAL_TARGET and
702 ACX_NONCANONICAL_HOST.
703 * configure: Regenerated.
706 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
708 * configure.ac (version_host, version_target): Set and AC_SUBST them.
709 * configure: Rebuild.
710 * Makefile.in (version_host, version_target): Get from configure.
711 (version.c): Use $(version_host) and $(version_target).
713 2013-07-03 Pedro Alves <palves@redhat.com>
715 * Makefile.in (config.status): Depend on development.sh.
716 * acinclude.m4: Include libmcheck.m4.
717 * configure: Regenerate.
719 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
721 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
722 attribute inside the parentheses.
723 (winapi_DebugSetProcessKillOnExit): Ditto.
724 (winapi_DebugBreakProcess): Ditto.
725 (winapi_GenerateConsoleCtrlEvent): Ditto.
727 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
729 * notif.h (notif_event): Add a dummy member to avoid compiler
732 2013-07-01 Pedro Alves <palves@redhat.com>
734 * hostio.c (HOSTIO_PATH_MAX): Define.
735 (require_filename, handle_open, handle_unlink, handle_readlink):
738 2013-07-01 Pedro Alves <palves@redhat.com>
740 * server.h: Include "pathmax.h".
741 * linux-low.c: Don't include sys/param.h.
742 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
744 * win32-low.c: Don't include sys/param.h.
745 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
747 2013-07-01 Pedro Alves <palves@redhat.com>
749 * event-loop.c: Don't check HAVE_UNISTD_H before including
751 * gdbreplay.c: Likewise.
752 * remote-utils.c: Likewise.
753 * server.c: Likewise.
754 * configure.ac: Don't check for unistd.h.
755 * configure: Regenerate.
757 2013-06-28 Tom Tromey <tromey@redhat.com>
759 * Makefile.in (version.c): Use version.in, not
762 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
764 * configure.ac (version_host, version_target): Set and AC_SUBST them.
765 * configure: Rebuild.
766 * Makefile.in (version_host, version_target): Get from configure.
767 (version.c): Use $(version_host) and $(version_target).
769 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
771 Fix trace-status to output user name without trailing colon.
772 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
774 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
776 Fix trace-status to output proper start-time and stop-time.
777 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
778 output start time and stop time in hex as gdb expects.
780 2013-06-26 Pedro Alves <pedro@codesourcery.com>
782 * tracepoint.c (build_traceframe_info_xml): Output trace state
783 variables present in the trace buffer.
785 2013-06-24 Tom Tromey <tromey@redhat.com>
787 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
790 * gdbreplay.c: Include version.h.
791 (version, host_name): Don't declare.
792 * server.h: Include version.h.
793 (version, host_name): Don't declare.
795 2013-06-12 Pedro Alves <palves@redhat.com>
797 * linux-x86-low.c (linux_is_elf64): Delete global.
798 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
799 with local linux_pid_exe_is_elf_64_file use.
801 2013-06-11 Pedro Alves <palves@redhat.com>
803 * linux-low.c (regset_disabled, disable_regset): New functions.
804 (regsets_fetch_inferior_registers)
805 (regsets_store_inferior_registers): Use them.
806 (initialize_regsets_info); Don't allocate the disabled_regsets
808 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
811 2013-06-11 Pedro Alves <palves@redhat.com>
813 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
816 2013-06-11 Pedro Alves <palves@redhat.com>
818 * linux-x86-low.c (initialize_low_arch): Call
819 init_registers_x32_avx_linux.
821 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
823 Fix compatibility with Android Bionic.
824 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
827 2013-06-07 Pedro Alves <palves@redhat.com>
830 * Makefile.in (OBS): Add tdesc.o.
831 (IPA_OBJS): Add tdesc-ipa.o.
832 (tdesc-ipa.o): New rule.
833 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
835 * linux-low.c (new_inferior): Delete.
836 (disabled_regsets, num_regsets): Delete.
837 (linux_add_process): Adjust to set the new per-process
839 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
840 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
841 was a stop. When calling arch_setup, switch the current inferior
842 to the thread that got an event.
843 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
844 (regsets_fetch_inferior_registers)
845 (regsets_store_inferior_registers): New regsets_info parameter.
847 (linux_register_in_regsets): New regs_info parameter. Adjust to
849 (register_addr, fetch_register, store_register): New usrregs_info
850 parameter. Adjust to use it.
851 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
852 parameter regs_info. Adjust to use it.
853 (linux_fetch_registers): Get the current inferior's regs_info, and
855 (linux_store_registers): Ditto.
856 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
857 (initialize_low): Don't initialize the target_regsets here. Call
859 * linux-low.h (target_regsets): Delete declaration.
860 (struct regsets_info): New.
861 (struct usrregs_info): New.
862 (struct regs_info): New.
863 (struct process_info_private) <new_inferior>: New field.
864 (struct linux_target_ops): Delete the num_regs, regmap, and
865 regset_bitmap fields. New field regs_info.
866 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
867 * i387-fp.c (num_xmm_registers): Delete.
868 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
869 calls to new interface.
870 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
871 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
872 Infer the number of xmm registers from the regcache's target
874 * i387-fp.h (num_xmm_registers): Delete.
875 * inferiors.c (add_thread): Don't install the thread's regcache
877 * proc-service.c (gregset_info): Fetch the current inferior's
878 regs_info. Adjust to use it.
879 * regcache.c: Include tdesc.h.
880 (register_bytes, reg_defs, num_registers)
881 (gdbserver_expedite_regs): Delete.
882 (get_thread_regcache): If the thread doesn't have a regcache yet,
883 create one, instead of aborting gdbserver.
884 (regcache_invalidate_one): Rename to ...
885 (regcache_invalidate_thread): ... this.
886 (regcache_invalidate_one): New.
887 (regcache_invalidate): Only invalidate registers of the current
889 (init_register_cache): Add target_desc parameter, and use it.
890 (new_register_cache): Ditto. Assert the target description has a
891 non zero registers_size.
892 (regcache_cpy): Add assertions. Adjust.
893 (realloc_register_cache, set_register_cache): Delete.
894 (registers_to_string, registers_from_string): Adjust.
895 (find_register_by_name, find_regno, find_register_by_number)
896 (register_cache_size): Add target_desc parameter, and use it.
897 (free_register_cache_thread, free_register_cache_thread_one)
898 (regcache_release, register_cache_size): New.
899 (register_size): Add target_desc parameter, and use it.
900 (register_data, supply_register, supply_register_zeroed)
901 (supply_regblock, supply_register_by_name, collect_register)
902 (collect_register_as_string, collect_register_by_name): Adjust.
903 * regcache.h (struct target_desc): Forward declare.
904 (struct regcache) <tdesc>: New field.
905 (init_register_cache, new_register_cache): Add target_desc
907 (regcache_invalidate_thread): Declare.
908 (regcache_invalidate_one): Delete declaration.
909 (regcache_release): Declare.
910 (find_register_by_number, register_cache_size, register_size)
911 (find_regno): Add target_desc parameter.
912 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
914 * remote-utils.c: Include tdesc.h.
915 (outreg, prepare_resume_reply): Adjust.
916 * server.c: Include tdesc.h.
917 (gdbserver_xmltarget): Delete declaration.
918 (get_features_xml, process_serial_event): Adjust.
919 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
921 (struct process_info) <tdesc>: New field.
922 (ipa_tdesc): Declare.
925 * tracepoint.c: Include tdesc.h.
926 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
927 (get_context_regcache): Adjust to pass ipa_tdesc down.
928 (do_action_at_tracepoint): Adjust to get the register cache size
929 from the context regcache's description.
930 (traceframe_walk_blocks): Adjust to get the register cache size
931 from the current trace frame's description.
932 (traceframe_get_pc): Adjust to get current trace frame's
933 description and pass it down.
934 (gdb_collect): Adjust to get the register cache size from the
936 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
937 (gdbserver_xmltarget): Delete.
938 (initialize_low_tracepoint): Set the ipa's target description.
939 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
940 (initialize_low_tracepoint): Set the ipa's target description.
941 * linux-x86-low.c: Include tdesc.h.
942 [__x86_64__] (is_64bit_tdesc): New.
943 (ps_get_thread_area, x86_get_thread_area): Use it.
944 (i386_cannot_store_register): Rename to ...
945 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
946 (i386_cannot_fetch_register): Rename to ...
947 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
948 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
950 (target_regsets): Rename to ...
951 (x86_regsets): ... this.
952 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
954 (x86_siginfo_fixup): Use is_64bit_tdesc.
955 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
956 (tdesc_x32_avx_linux, tdesc_x32_linux)
957 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
959 (x86_linux_update_xmltarget): Delete.
960 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
961 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
962 (AMD64_LINUX_USER64_CS): New.
963 (x86_linux_read_description): New, based on
964 x86_linux_update_xmltarget.
965 (same_process_callback): New.
966 (x86_arch_setup_process_callback): New.
967 (x86_linux_update_xmltarget): New.
968 (x86_regsets_info): New.
969 (amd64_linux_regs_info): New.
970 (i386_linux_usrregs_info): New.
971 (i386_linux_regs_info): New.
972 (x86_linux_regs_info): New.
973 (x86_arch_setup): Reimplement.
974 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
975 (x86_emit_ops): Ditto.
976 (the_low_target): Adjust. Install x86_linux_regs_info,
977 x86_cannot_fetch_register, and x86_cannot_store_register.
978 (initialize_low_arch): New.
979 * linux-ia64-low.c (tdesc_ia64): Declare.
980 (ia64_fetch_register): Adjust.
981 (ia64_usrregs_info, regs_info): New globals.
982 (ia64_regs_info): New function.
983 (the_low_target): Adjust.
984 (initialize_low_arch): New function.
985 * linux-sparc-low.c (tdesc_sparc64): Declare.
986 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
988 (sparc_arch_setup): New function.
989 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
990 (the_low_target): Adjust.
991 (initialize_low_arch): New function.
992 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
993 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
994 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
995 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
996 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
997 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
998 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
999 (tdesc_powerpc_isa205_vsx64l): Declare.
1000 (ppc_cannot_store_register, ppc_collect_ptrace_register)
1001 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
1002 (ppc_set_pc, ppc_get_hwcap): Adjust.
1003 (ppc_usrregs_info): Forward declare.
1004 (!__powerpc64__) ppc_regmap_adjusted: New global.
1005 (ppc_arch_setup): Adjust to the current process'es target
1007 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
1008 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
1009 (ppc_store_evrregset): Adjust.
1010 (target_regsets): Rename to ...
1011 (ppc_regsets): ... this, and make static.
1012 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
1013 (ppc_regs_info): New function.
1014 (the_low_target): Adjust.
1015 (initialize_low_arch): New function.
1016 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
1017 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
1018 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
1019 (tdesc_s390x_linux64v2): Declare.
1020 (s390_collect_ptrace_register, s390_supply_ptrace_register)
1021 (s390_fill_gregset, s390_store_last_break): Adjust.
1022 (target_regsets): Rename to ...
1023 (s390_regsets): ... this, and make static.
1024 (s390_get_pc, s390_set_pc): Adjust.
1025 (s390_get_hwcap): New target_desc parameter, and use it.
1026 [__s390x__] (have_hwcap_s390_high_gprs): New global.
1027 (s390_arch_setup): Adjust to set the current process'es target
1028 description. Don't adjust the regmap.
1029 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
1030 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
1031 (regs_info_3264): New globals.
1032 (s390_regs_info): New function.
1033 (the_low_target): Adjust.
1034 (initialize_low_arch): New function.
1035 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
1036 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
1037 [__mips64] (init_registers_mips_linux)
1038 (init_registers_mips_dsp_linux): Delete defines.
1039 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
1040 (have_dsp): New global.
1041 (mips_read_description): New, based on mips_arch_setup.
1042 (mips_arch_setup): Reimplement.
1043 (get_usrregs_info): New function.
1044 (mips_cannot_fetch_register, mips_cannot_store_register)
1045 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
1046 (mips_fill_fpregset, mips_store_fpregset): Adjust.
1047 (target_regsets): Rename to ...
1048 (mips_regsets): ... this, and make static.
1049 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
1050 (dsp_regs_info, regs_info): New globals.
1051 (mips_regs_info): New function.
1052 (the_low_target): Adjust.
1053 (initialize_low_arch): New function.
1054 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
1055 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
1057 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
1058 (arm_read_description): New, with bits factored from
1060 (arm_arch_setup): Reimplement.
1061 (target_regsets): Rename to ...
1062 (arm_regsets): ... this, and make static.
1063 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
1064 (arm_regs_info): New function.
1065 (the_low_target): Adjust.
1066 (initialize_low_arch): New function.
1067 * linux-m68k-low.c (tdesc_m68k): Declare.
1068 (target_regsets): Rename to ...
1069 (m68k_regsets): ... this, and make static.
1070 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
1071 (m68k_regs_info): New function.
1072 (m68k_arch_setup): New function.
1073 (the_low_target): Adjust.
1074 (initialize_low_arch): New function.
1075 * linux-sh-low.c (tdesc_sharch): Declare.
1076 (target_regsets): Rename to ...
1077 (sh_regsets): ... this, and make static.
1078 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
1079 (sh_regs_info, sh_arch_setup): New functions.
1080 (the_low_target): Adjust.
1081 (initialize_low_arch): New function.
1082 * linux-bfin-low.c (tdesc_bfin): Declare.
1083 (bfin_arch_setup): New function.
1084 (bfin_usrregs_info, regs_info): New globals.
1085 (bfin_regs_info): New function.
1086 (the_low_target): Adjust.
1087 (initialize_low_arch): New function.
1088 * linux-cris-low.c (tdesc_cris): Declare.
1089 (cris_arch_setup): New function.
1090 (cris_usrregs_info, regs_info): New globals.
1091 (cris_regs_info): New function.
1092 (the_low_target): Adjust.
1093 (initialize_low_arch): New function.
1094 * linux-cris-low.c (tdesc_crisv32): Declare.
1095 (cris_arch_setup): New function.
1096 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
1097 (cris_regs_info): New function.
1098 (the_low_target): Adjust.
1099 (initialize_low_arch): New function.
1100 * linux-m32r-low.c (tdesc_m32r): Declare.
1101 (m32r_arch_setup): New function.
1102 (m32r_usrregs_info, regs_info): New globals.
1103 (m32r_regs_info): Adjust.
1104 (initialize_low_arch): New function.
1105 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
1106 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
1107 (tic6x_usrregs_info): Forward declare.
1108 (tic6x_read_description): New function, based on ...
1109 (tic6x_arch_setup): ... this. Reimplement.
1110 (target_regsets): Rename to ...
1111 (tic6x_regsets): ... this, and make static.
1112 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
1113 (tic6x_regs_info): New function.
1114 (the_low_target): Adjust.
1115 (initialize_low_arch): New function.
1116 * linux-xtensa-low.c (tdesc_xtensa): Declare.
1117 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
1118 (target_regsets): Rename to ...
1119 (xtensa_regsets): ... this, and make static.
1120 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
1122 (xtensa_arch_setup, xtensa_regs_info): New functions.
1123 (the_low_target): Adjust.
1124 (initialize_low_arch): New function.
1125 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
1126 (nios2_arch_setup): Set the current process'es tdesc.
1127 (target_regsets): Rename to ...
1128 (nios2_regsets): ... this.
1129 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
1130 (nios2_regs_info): New function.
1131 (the_low_target): Adjust.
1132 (initialize_low_arch): New function.
1133 * linux-aarch64-low.c (tdesc_aarch64): Declare.
1134 (aarch64_arch_setup): Set the current process'es tdesc.
1135 (target_regsets): Rename to ...
1136 (aarch64_regsets): ... this.
1137 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
1138 (aarch64_regs_info): New function.
1139 (the_low_target): Adjust.
1140 (initialize_low_arch): New function.
1141 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
1143 (target_regsets): Rename to ...
1144 (tile_regsets): ... this.
1145 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
1146 (tile_regs_info): New function.
1147 (tile_arch_setup): Set the current process'es tdesc.
1148 (the_low_target): Adjust.
1149 (initialize_low_arch): New function.
1150 * spu-low.c (tdesc_spu): Declare.
1151 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
1152 * win32-arm-low.c (tdesc_arm): Declare.
1153 (arm_arch_setup): New function.
1154 (the_low_target): Install arm_arch_setup instead of
1156 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
1157 (init_windows_x86): Rename to ...
1158 (i386_arch_setup): ... this. Set `win32_tdesc'.
1159 (the_low_target): Adjust.
1160 * win32-low.c (win32_tdesc): New global.
1161 (child_add_thread): Don't create the thread cache here.
1162 (do_initial_child_stuff): Set the new process'es tdesc.
1163 * win32-low.h (struct target_desc): Forward declare.
1164 (win32_tdesc): Declare.
1165 * lynx-i386-low.c (tdesc_i386): Declare global.
1166 (lynx_i386_arch_setup): Set `lynx_tdesc'.
1167 * lynx-low.c (lynx_tdesc): New global.
1168 (lynx_add_process): Set the new process'es tdesc.
1169 * lynx-low.h (struct target_desc): Forward declare.
1170 (lynx_tdesc): Declare global.
1171 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
1172 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
1173 * nto-low.c (nto_tdesc): New global.
1174 (do_attach): Set the new process'es tdesc.
1175 * nto-low.h (struct target_desc): Forward declare.
1176 (nto_tdesc): Declare.
1177 * nto-x86-low.c (tdesc_i386): Declare.
1178 (nto_x86_arch_setup): Set `nto_tdesc'.
1180 2013-06-04 Gary Benson <gbenson@redhat.com>
1182 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
1183 to qSupported response when appropriate.
1184 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
1185 with nonzero-length annex.
1186 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
1187 arguments supplied in annex.
1189 2013-05-31 Doug Evans <dje@google.com>
1192 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
1193 64 bits in 64-cross-32 environment.
1195 2013-05-28 Pedro Alves <palves@redhat.com>
1197 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
1198 (aarch64-without-fpu.c): Delete rule.
1199 * configure.srv (aarch64*-*-linux*): Remove references to
1200 aarch64-without-fpu.o and aarch64-without-fpu.xml.
1201 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
1204 2013-05-24 Pedro Alves <palves@redhat.com>
1206 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
1207 instead of strchr/decode_address. Error if the range isn't split
1208 with a ','. Don't assume there's be a ':' in the action.
1210 2013-05-23 Yao Qi <yao@codesourcery.com>
1211 Pedro Alves <palves@redhat.com>
1213 * linux-low.c (lwp_in_step_range): New function.
1214 (linux_wait_1): If the thread was range stepping and stopped
1215 outside the stepping range, report the stop to GDB. Otherwise,
1216 continue stepping. Add range stepping debug output.
1217 (linux_set_resume_request): Copy the step range from the resume
1219 (linux_supports_range_stepping): New.
1220 (linux_target_ops) <supports_range_stepping>: Set to
1221 linux_supports_range_stepping.
1222 * linux-low.h (struct linux_target_ops)
1223 <supports_range_stepping>: New field.
1224 (struct lwp_info) <step_range_start, step_range_end>: New fields.
1225 * linux-x86-low.c (x86_supports_range_stepping): New.
1226 (the_low_target) <supports_range_stepping>: Set to
1227 x86_supports_range_stepping.
1228 * server.c (handle_v_cont): Handle 'r' action.
1229 (handle_v_requests): Append ";r" if the target supports range
1231 * target.h (struct thread_resume) <step_range_start,
1232 step_range_end>: New fields.
1233 (struct target_ops) <supports_range_stepping>:
1235 (target_supports_range_stepping): New macro.
1237 2013-05-17 Joel Brobecker <brobecker@adacore.com>
1239 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
1240 confusion in comment.
1242 2013-05-17 Joel Brobecker <brobecker@adacore.com>
1244 * lynx-low.c (struct process_info_private): New type.
1245 (lynx_add_process): New function.
1246 (lynx_create_inferior, lynx_attach): Replace calls to
1247 add_process by calls to lynx_add_process.
1248 (lynx_resume): If PTID is null, then try using
1249 current_process()->private->last_wait_event_ptid.
1251 (lynx_clear_inferiors): Delete. The contents of that function
1252 has been inlined in lynx_mourn;
1253 (lynx_wait_1): Save the ptid in the process's private data.
1254 (lynx_mourn): Free the process' private data. Replace call
1255 to lynx_clear_inferiors by call to clear_inferiors.
1257 2013-05-17 Yao Qi <yao@codesourcery.com>
1259 * i386-low.c (i386_length_and_rw_bits): Move the comment to
1262 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
1264 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
1265 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
1266 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
1267 PT_TEXT_END_ADDR guards. Update comments.
1268 (linux_target_op) <read_offsets>: Conditionally define to
1269 linux_read_offsets if the target is UCLIBC and if it defines
1270 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
1272 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
1273 Andrew Jenner <andrew@codesourcery.com>
1275 * Makefile.in (SFILES): Add linux-nios2-low.c.
1276 (clean): Add action to delete nios2-linux.c.
1277 (nios2-linux.c): New rule.
1278 * configure.srv: Add nios2*-*-linux*.
1279 * linux-nios2-low.c: New.
1281 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
1283 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
1285 2013-04-25 Hui Zhu <hui@codesourcery.com>
1288 * ax.c (ax_printf): Add fflush.
1290 2013-04-22 Tom Tromey <tromey@redhat.com>
1292 * Makefile.in (SFILES): Add filestuff.c.
1293 (OBS): Add filestuff.o.
1294 (filestuff.o): New target.
1295 * config.in, configure: Rebuild.
1296 * configure.ac: Check for fdwalk, pipe2.
1298 2013-04-17 Pedro Alves <palves@redhat.com>
1300 * configure.ac (USE_THREAD_DB): Delete variable.
1301 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
1302 Don't AC_SUBST USE_THREAD_DB.
1303 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
1304 * config.in, configure: Regenerate.
1306 2013-04-16 Pedro Alves <palves@redhat.com>
1308 * linux-low.h (struct lwp_info) <thread_known>: Move under
1309 the USE_THREAD_DB #ifdef.
1311 2013-04-16 Pedro Alves <palves@redhat.com>
1313 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
1314 (linux-low.o): Delete rule.
1315 * linux-low.h: Always include "gdb_thread_db.h" instead of
1316 conditionally including thread_db.h.
1317 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
1320 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1322 * Makefile.in (install-only): Fix make install regression.
1324 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
1326 Convert man pages to texinfo, new gdbinit.5 texinfo page.
1327 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
1329 * gdbserver.1: Remove.
1331 2013-03-22 Pedro Alves <palves@redhat.com>
1333 * linux-low.c (handle_extended_wait): Don't call
1334 linux_enable_event_reporting.
1336 2013-03-15 Tony Theodore <tonyt@logyst.com>
1339 * Makefile.in (SHELL): Use @SHELL@.
1341 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
1343 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
1346 2013-03-13 Joel Brobecker <brobecker@adacore.com>
1348 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
1349 Remove extraneous NULL element.
1351 2013-03-13 Yao Qi <yao@codesourcery.com>
1353 * tracepoint.c (traceframe_read_tsv): Look for the last matched
1354 'V' block in trace frame.
1356 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1358 * target.h (struct target_ops): Add btrace ops.
1359 (target_supports_btrace): New macro.
1360 (target_enable_btrace): New macro.
1361 (target_disable_btrace): New macro.
1362 (target_read_btrace): New macro.
1363 * gdbthread.h (struct thread_info): Add btrace field.
1364 * server.c: Include btrace-common.h.
1365 (handle_btrace_general_set): New function.
1366 (handle_btrace_enable): New function.
1367 (handle_btrace_disable): New function.
1368 (handle_general_set): Call handle_btrace_general_set.
1369 (handle_qxfer_btrace): New function.
1370 (struct qxfer qxfer_packets[]): Add btrace entry.
1371 * inferiors.c (remove_thread): Disable btrace.
1372 * linux-low: Include linux-btrace.h.
1373 (linux_low_enable_btrace): New function.
1374 (linux_low_read_btrace): New function.
1375 (linux_target_ops): Add btrace ops.
1376 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
1377 Add srv_linux_btrace=yes.
1378 (x86_64-*-linux*): Add linux-btrace.o.
1379 Add srv_linux_btrace=yes.
1380 * configure.ac: Define HAVE_LINUX_BTRACE.
1381 * config.in: Regenerated.
1382 * configure: Regenerated.
1384 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1386 * server.c (handle_qxfer): Preserve error message if -3 is
1388 (qxfer): Document the -3 return value.
1390 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1392 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
1393 (linux_btrace_h): New variable.
1394 (linux-btrace.o): New rule.
1396 2013-03-08 Stan Shebs <stan@codesourcery.com>
1397 Hafiz Abid Qadeer <abidh@codesourcery.com>
1399 * tracepoint.c (trace_buffer_size): New global.
1400 (DEFAULT_TRACE_BUFFER_SIZE): New define.
1401 (init_trace_buffer): Change to one-argument function. Allocate
1402 trace buffer memory.
1403 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
1404 handle QTBuffer:size packet.
1405 (cmd_bigqtbuffer_size): New function.
1406 (initialize_tracepoint): Call init_trace_buffer with
1407 DEFAULT_TRACE_BUFFER_SIZE.
1408 * server.c (handle_query): Add QTBuffer:size in the
1411 2013-03-07 Yao Qi <yao@codesourcery.com>
1413 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
1414 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
1416 (cmd_qtsp): Adjust condition. Do post increment.
1417 Set cur_action and cur_step_action back to 0.
1419 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
1422 * linux-low.c (linux_write_memory): Return early success if LEN is
1425 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
1427 * configure.srv: Add x86_64-*-cygwin* as target.
1429 2013-02-28 Tom Tromey <tromey@redhat.com>
1431 * configure.ac: Invoke AC_SYS_LARGEFILE.
1432 * configure, config.in: Rebuild.
1434 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
1436 * win32-low.c: Throughout, fix format strings and casts of
1437 printf-like functions to avoid type related warnings on all
1439 (get_child_debug_event): Print dwDebugEventCode as hex since
1440 that's how it's usually documented.
1442 2013-02-28 Yao Qi <yao@codesourcery.com>
1444 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
1447 2013-02-27 Jiong Wang <jiwang@tilera.com>
1449 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
1450 (reg-tilegx32.c): New rule.
1451 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
1452 * linux-tile-low.c (tile_arch_setup): New function. Invoke
1453 different register info initializer according to elf class.
1454 (init_registers_tilgx32): New function. The tilegx32 register info
1456 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
1457 (tile_store_gregset): Likewise.
1459 2013-02-27 Yao Qi <yao@codesourcery.com>
1461 * server.c (process_point_options): Print debug message when
1462 debug_threads is true.
1464 2013-02-26 Yao Qi <yao@codesourcery.com>
1466 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
1468 2013-02-19 Pedro Alves <palves@redhat.com>
1469 Kai Tietz <ktietz@redhat.com>
1473 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
1474 instead of strtoul to extract address from packet.
1475 (process_serial_event) <'z'>: Likewise.
1477 2013-02-18 Yao Qi <yao@codesourcery.com>
1479 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
1481 2013-02-14 Pedro Alves <palves@redhat.com>
1485 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
1486 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
1488 2013-02-14 Pedro Alves <palves@redhat.com>
1490 * tracepoint.c (cmd_qtdpsrc): Use savestring.
1492 2013-02-14 Pedro Alves <palves@redhat.com>
1494 * tracepoint.c (save_string): Delete.
1495 (add_tracepoint_action): Use savestring instead of save_string.
1497 2013-02-12 Pedro Alves <palves@redhat.com>
1499 * linux-xtensa-low.c: Ditto.
1500 * xtensa-xtregs.c: Ditto.
1502 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
1504 * thread-db.c (thread_db_get_tls_address): NULL pointer check
1507 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1509 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
1510 aarch64_num_wp_regs and aarch64_num_bp_regs to
1511 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
1513 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1515 * linux-aarch64-low.c (ps_get_thread_area): Replace
1516 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
1518 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
1519 Marcus Shawcroft <marcus.shawcroft@arm.com>
1520 Nigel Stephens <nigel.stephens@arm.com>
1521 Yufeng Zhang <yufeng.zhang@arm.com>
1523 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
1524 (aarch64.c, aarch64-without-fpu.c): New targets.
1525 * configure.srv (aarch64*-*-linux*): New.
1526 * linux-aarch64-low.c: New file.
1528 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1530 * linux-low.c (handle_extended_wait, linux_create_inferior)
1531 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
1532 (dequeue_one_deferred_signal, linux_resume_one_thread)
1533 (fetch_register, linux_write_memory, linux_enable_event_reporting)
1534 (linux_tracefork_grandchild, linux_test_for_tracefork)
1535 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
1536 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
1537 where the argument is 0.
1539 2013-01-25 Yao Qi <yao@codesourcery.com>
1541 * event-loop.c: Include "queue.h".
1542 (gdb_event_p): New typedef.
1543 (struct gdb_event) <next_event>: Remove.
1544 (event_queue): Change to QUEUE(gdb_event_p).
1545 (async_queue_event): Remove.
1546 (gdb_event_xfree): New.
1547 (initialize_event_loop): New.
1548 (process_event): Use API from QUEUE.
1549 (wait_for_event): Likewise.
1550 * server.c (main): Call initialize_event_loop.
1551 * server.h (initialize_event_loop): Declare.
1553 2013-01-18 Yao Qi <yao@codesourcery.com>
1555 * ax.h (struct eval_agent_expr_context): New.
1556 (gdb_eval_agent_expr): Update declaration.
1557 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
1558 TFRAME. Add new argument CTX.
1559 * server.h (struct eval_agent_expr_context): Declare.
1560 (agent_mem_read, agent_tsv_read): Update declaration.
1561 (agent_mem_read_string): Likewise.
1562 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
1563 (add_traceframe_block): Add new argument TPOINT.
1564 Increase TPOINT->traceframe_usage.
1565 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
1566 eval_tracepoint_agent_expr.
1567 (condition_true_at_tracepoint): Likewise.
1568 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
1569 (agent_mem_read_string, agent_tsv_read): Likewise.
1571 2013-01-16 Yao Qi <yao@codesourcery.com>
1573 * linux-low.c (linux_resume_one_lwp): Don't check
1574 'lwp->bp_reinsert != 0'.
1576 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1577 Pedro Alves <palves@redhat.com>
1579 * lynx-low.c (ptrace_request_to_str): Define a temporary
1580 macro and use it to simplify this function's implementation.
1582 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1584 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
1587 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1589 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
1591 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1593 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
1595 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1597 * lynx-low.c (lynx_resume): Use the resume_info parameter
1598 to determine the ptid for the lynx_ptrace call, unless
1599 it is equal to minus_one_ptid, in which case we use the
1600 ptid of the current_inferior.
1601 (lynx_wait_1): After having received a thread create/exit
1602 event, resume the inferior's execution using the signaling
1603 thread's ptid, rather than the old ptid.
1605 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1607 * lynx-low.c (lynx_resume): Delete variable ret.
1609 2013-01-01 Joel Brobecker <brobecker@adacore.com>
1611 * gdbreplay.c (gdbreplay_version): Update copyright year.
1612 * server.c (gdbserver_version): Likewise.
1614 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1616 * lynx-low.c (lynx_wait_1): Add debug trace before adding
1619 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1621 * lynx-low.c (ptrace_request_to_str): Add handling for
1624 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1626 * lynx-low.c (lynx_attach): Delete variable new_process.
1628 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1630 * lynx-low.c (lynx_create_inferior): Delete variable
1633 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1635 * lynx-low.c (ptrace_request_to_str): Do not handle
1636 PTRACE_GETTHREADLIST if this macro does not exist.
1638 2012-12-15 Yao Qi <yao@codesourcery.com>
1640 * Makefile.in (OBS): Add notif.o.
1641 * notif.c, notif.h: New.
1642 * server.c: Include "notif.h".
1643 (struct vstop_notif) <next>: Remove.
1645 (queue_stop_reply): Update.
1646 (push_event, send_next_stop_reply): Remove.
1647 (discard_queued_stop_replies): Update.
1648 (notif_stop): New variable.
1649 (handle_v_stopped): Remove.
1650 (handle_v_requests): Don't call handle_v_stopped. Call
1651 handle_ack_notif instead.
1652 (queue_stop_reply_callback): Call notif_event_enque instead
1653 of queue_stop_reply.
1654 (handle_status): Don't call send_next_stop_reply, call
1655 notif_write_event instead.
1656 (kill_inferior_callback): Likewise.
1657 (detach_or_kill_inferior_callback): Likewise.
1658 (main): Call initialize_notif.
1659 (process_serial_event): Call QUEUE_is_empty.
1660 (handle_target_event): Call notif_push instead of push event.
1661 * server.h (push_event): Remove declaration.
1663 2012-12-10 Tom Tromey <tromey@redhat.com>
1665 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
1666 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
1669 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
1670 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
1671 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
1672 (amd64-linux-ipa.o, ax.o): Rewrite.
1673 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
1674 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
1675 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
1676 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
1677 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
1678 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
1679 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
1680 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
1681 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
1682 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
1683 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
1684 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
1685 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
1686 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
1687 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
1688 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
1689 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
1690 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
1691 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
1692 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
1693 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
1694 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
1695 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
1696 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
1697 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
1698 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
1699 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
1700 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
1701 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
1702 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
1703 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
1704 (reg-tilegx.o): Remove.
1705 (all_object_files): New macro.
1706 Include .deps files.
1707 * aclocal.m4, configure: Rebuild.
1708 * acinclude.m4: Include depstand.m4, lead-dot.m4.
1709 * configure.ac: Invoke ZW_CREATE_DEPDIR,
1710 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
1712 2012-12-05 Tom Tromey <tromey@redhat.com>
1715 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
1717 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
1719 * configure.ac: Check for linux/perf_event.h.
1720 * config.in: Regenerated.
1721 * configure: Regenerated.
1723 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
1725 * hostio.c (handle_readlink): Decrease buffer size
1726 parameter passed to readlink by one byte.
1728 2012-11-26 Yao Qi <yao@codesourcery.com>
1730 * configure.ac (build_warnings): Append '-Wempty-body'.
1731 * configure: Regenerated.
1732 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
1735 2012-11-15 Pierre Muller <muller@sourceware.org>
1737 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
1738 * config.in: Regenerate.
1739 * configure: Regenerate.
1740 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
1741 Use "gdb_wait.h" header instead of <sys/wait.h> header.
1742 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1743 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
1745 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
1746 instead of <sys/wait.h> header.
1747 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1749 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
1751 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
1752 (various make rules): Remove -DGDBSERVER
1754 2012-11-09 Yao Qi <yao@codesourcery.com>
1756 * spu-low.c (current_ptid): Move it to ..
1757 * gdbthread.h: ... here. New.
1758 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
1759 * server.c (myresume, process_serial_event): Likewise.
1760 * thread-db.c (thread_db_find_new_threads): Likewise.
1761 * tracepoint.c (run_inferior_command): Likewise.
1763 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
1765 * server.c (handle_search_memory_1): Include access length in
1768 2012-09-05 Michael Brandt <michael.brandt@axis.com>
1770 * linux-crisv32-low.c: Fix compile errors.
1772 2012-09-04 Yao Qi <yao@codesourcery.com>
1774 * tracepoint.c (cmd_qtsv): Adjust debug message.
1775 Don't check CUR_TPOINT.
1777 2012-08-28 Yao Qi <yao@codesourcery.com>
1779 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
1780 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
1781 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
1782 Remove declarations of xmalloc, xreallloc, xstrdup and
1784 * Makefile.in (libiberty_h): New.
1785 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
1786 (linux-bfin-low.o): Append dependency 'libiberty.h'.
1788 2012-08-23 Yao Qi <yao@codesourcery.com>
1790 * server.h: Remove declaration of 'xsnprintf'.
1792 2012-08-22 Keith Seitz <keiths@redhat.com>
1794 * server.h: Include build-gnulib-gbserver/config.h.
1795 * gdbreplay.c: Likewise.
1797 2012-08-08 Doug Evans <dje@google.com>
1799 * Makefile.in (SFILES): Add gdb_vecs.c.
1800 (OBS): Add gdb_vecs.o.
1801 (gdb_vecs_h, host_defs_h): New variables.
1802 (thread-db.o): Add $(gdb_vecs_h) dependency.
1803 (gdb_vecs.o): New rule.
1804 * thread-db.c: #include "gdb_vecs.h".
1805 (thread_db_load_search): Use a vector to iterate over path elements.
1806 Handle text appearing after "$pdir".
1808 * configure.ac: Add check for strstr.
1809 * config.in: Regenerate.
1810 * configure: Regenerate.
1812 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
1814 * hostio.c (handle_pread): If pread fails, fall back to attempting
1816 (handle_pwrite): Likewise for pwrite.
1818 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
1820 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
1821 between unsupported TYPE and unimplementable ADDR/LEN combination.
1822 (arm_insert_point): Act on new return value.
1824 2012-07-31 Pedro Alves <palves@redhat.com>
1826 * server.c (process_point_options): Only skip tokens if we find
1827 one that is unrecognized. Don't treat 'X' specially while
1828 skipping unrecognized tokens.
1830 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
1832 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
1833 to 4-byte-align HW breakpoint addresses for Thumb.
1835 2012-07-27 Yao Qi <yao@codesourcery.com>
1839 * server.h: Declare gdb_agent_about_to_close.
1840 * target.c (kill_inferior): Include "agent.h".
1841 New. Send command 'kill'.
1842 * target.h (kill_inferior): Removed macro.
1843 * tracepoint.c (gdb_agent_about_to_close): New.
1844 (gdb_agent_helper_thread): Handle command 'close'.
1845 Wait endlessly until the inferior stops.
1846 Install gdb_agent_remove_socket to atexit hook.
1847 (agent_socket_name): New static variable.
1848 (gdb_agent_socket_init): Replace local variable 'name' with
1849 'agent_socket_name'.
1850 (gdb_agent_remove_socket): New.
1852 2012-07-27 Yao Qi <yao@codesourcery.com>
1854 * server.c (process_point_options): Stop at 'X' when parsing.
1856 2012-07-19 Michael Eager <eager@eagercon.com>
1858 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
1860 * linux-x86-low.c (x86_insert_point, x86_remove_point):
1861 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
1862 hardware breakpoint.
1864 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1866 * gdbserver/linux-low.c (initialize_low): Call
1867 linux_ptrace_init_warnings.
1869 2012-07-02 Doug Evans <dje@google.com>
1871 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
1874 2012-07-02 Stan Shebs <stan@codesourcery.com>
1876 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
1877 (ax.o): Add it to build rule.
1879 (OBS): Add format.o.
1880 (IPA_OBS): Add format.o.
1881 * server.c (handle_query): Claim support for breakpoint commands.
1882 (process_point_options): Add command case.
1883 (process_serial_event): Leave running if there are printfs in
1885 * mem-break.h (any_persistent_commands): Declare.
1886 (add_breakpoint_commands): Declare.
1887 (gdb_no_commands_at_breakpoint): Declare.
1888 (run_breakpoint_commands): Declare.
1889 * mem-break.c (struct point_command_list): New struct.
1890 (struct breakpoint): New field command_list.
1891 (any_persistent_commands): New function.
1892 (add_commands_to_breakpoint): New function.
1893 (add_breakpoint_commands): New function.
1894 (gdb_no_commands_at_breakpoint): New function.
1895 (run_breakpoint_commands): New function.
1896 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
1898 * ax.c: Include format.h.
1899 (ax_printf): New function.
1900 (gdb_eval_agent_expr): Add printf opcode.
1902 2012-06-13 Yao Qi <yao@codesourcery.com>
1904 * server.c (start_inferior): Remove duplicated writes to fields
1905 'last_resume_kind' and 'last_status' of 'current_inferior'.
1907 2012-06-12 Yao Qi <yao@codesourcery.com>
1908 Pedro Alves <palves@redhat.com>
1910 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
1912 * server.c (handle_v_cont): Extend comment.
1914 2012-06-11 Yao Qi <yao@codesourcery.com>
1916 * linux-low.c (linux_attach): Add 'static'.
1918 2012-06-06 Yao Qi <yao@codesourcery.com>
1920 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
1922 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1924 Fix gcc -flto compilation warning.
1925 * server.c (main): Make variable multi_mode and attach volatile.
1927 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1929 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
1930 if the platform doesn't know about it.
1932 2012-05-30 Jeff Kenton <jkenton@tilera.com>
1934 * Makefile.in (SFILES): Add linux-tile-low.c.
1935 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
1936 * configure.srv: Handle tilegx-*-linux*.
1937 * linux-tile-low.c: New file.
1939 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1941 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
1943 2012-05-24 Pedro Alves <palves@redhat.com>
1947 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
1949 2012-05-24 Pedro Alves <palves@redhat.com>
1953 Replace target_signal with gdb_signal throughout.
1955 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
1957 * linux-low.c (linux_store_registers): Avoid the copying sequence
1958 when no data has been retrieved by ptrace.
1960 2012-05-22 Will Deacon <will.deacon@arm.com>
1962 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
1963 Include asm/ptrace.h.
1964 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
1967 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
1969 * linux-low.c (linux_store_registers): Don't re-retrieve data
1970 with ptrace that has already been obtained from /proc. Always
1971 copy any data retrieved with ptrace to the buffer supplied.
1973 2012-05-11 Yao Qi <yao@codesourcery.com>
1974 Pedro Alves <palves@redhat.com>
1976 * linux-low.c (enum stopping_threads_kind): New.
1977 (stopping_threads): Change type to `enum stopping_threads_kind'.
1978 (handle_extended_wait): If stopping and suspending threads, leave
1979 the new_lwp suspended too.
1980 (linux_wait_for_event): Adjust.
1981 (stop_all_lwps): Set `stopping_threads' to
1982 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
1983 whether we're suspending threads or just stopping them. Assert no
1986 2012-04-29 Yao Qi <yao@codesourcery.com>
1988 * server.h: Move some code to ...
1989 * gdbthread.h: ... here. New.
1990 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
1991 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
1992 (nto-low.o, win32-low.o): Likewise.
1993 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
1994 * regcache.c, remote-utils.c, server.c: Likewise.
1995 * target.c, tracepoint.c, win32-low.c: Likewise.
1997 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1999 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
2000 (PTRACE_ARG4_TYPE): Likewise.
2001 (PTRACE_XFER_TYPE): Likewise.
2002 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
2003 ptrace to PTRACE_ARG3_TYPE.
2004 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
2005 (PTRACE_ARG4_TYPE): Likewise.
2006 (PTRACE_XFER_TYPE): Likewise.
2007 (linux_detach_one_lwp): Cast fourth argument of
2008 ptrace to long then PTRACE_ARG4_TYPE.
2009 (regsets_fetch_inferior_registers): Cast third argument of
2010 ptrace to long then PTRACE_ARG3_TYPE.
2011 (regsets_store_inferior_registers): Likewise.
2013 2012-04-20 Pedro Alves <palves@redhat.com>
2015 * configure: Regenerate.
2017 2012-04-19 Pedro Alves <palves@redhat.com>
2019 * Makefile.in (GNULIB_BUILDDIR): New.
2020 (LIBGNU, INCGNU, GNULIB_H): Adjust.
2021 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
2022 (all, install-only, uninstall, clean-info, all-lib, clean): No
2023 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
2024 (maintainer-clean realclean distclean): Use subdir_do.
2026 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
2027 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
2028 * acinclude.m4: Include acx_configure_dir.m4.
2029 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
2030 calls. Call AC_PROG_RANLIB. Configure gnulib using
2033 (GNULIB_STDINT_H): Adjust.
2034 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
2035 * gdbreplay.c: Include build-gnulib/config.h.
2036 * server.h: Likewise.
2037 * aclocal.m4: Regenerate.
2038 * config.in: Regenerate.
2039 * configure: Regenerate.
2041 2012-04-19 Pedro Alves <palves@redhat.com>
2043 * Makefile.in (LIBGNU, INCGNU): Adjust.
2044 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
2045 (all, install-only, uninstall, clean-info, all-lib, clean)
2046 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
2047 * configure.ac: Adjust AC_OUTPUT output.
2048 * aclocal.m4: Regenerate.
2049 * configure: Regenerate.
2051 2012-04-19 Pedro Alves <palves@redhat.com>
2053 * Makefile.in (generated_files): New.
2054 (server_h): Remove the explicit dependency on config.h, and depend
2055 on $generated_files.
2057 2012-04-19 Pedro Alves <palves@redhat.com>
2059 * Makefile.in (INCGNU): Add -Ignulib.
2061 2012-04-19 Pedro Alves <palves@redhat.com>
2063 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
2064 (INCGNU): ... this, and spell out -I here.
2065 (GNULIB_LIB): Rename to ...
2067 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
2069 2012-04-19 Pedro Alves <palves@redhat.com>
2071 * config.in: Regenerate.
2073 2012-04-19 Pedro Alves <palves@redhat.com>
2075 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
2076 * server.h (memmem): Remove declaration.
2077 * config.in: Regenerate.
2078 * configure: Regenerate.
2080 2012-04-19 Yao Qi <yao@codesourcery.com>
2082 * Makefile.in (SFILES): Add common/vec.c.
2086 2012-04-19 Yao Qi <yao@codesourcery.com>
2088 * remote-utils.c (prepare_resume_reply): Replace with macro
2089 target_core_of_thread.
2090 * server.c (handle_qxfer_threads_proper): Likewise.
2091 * target.h (traget_core_of_thread): New macro.
2093 2012-04-18 Pedro Alves <palves@redhat.com>
2095 * aclocal.m4: Regenerate.
2096 * configure: Regenerate.
2098 2012-04-16 Yao Qi <yao@codesourcery.com>
2100 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
2101 duplicated on address.
2103 2012-04-16 Yao Qi <yao@codesourcery.com>
2105 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
2106 (struct tracepoint_action_ops) <send>: New field.
2107 (m_tracepoint_action_send, r_tracepoint_action_send): New.
2108 (agent_expr_send, x_tracepoint_action_send): New.
2109 (l_tracepoint_action_send): New.
2110 (cmd_qtdp): Download and install tracepoint
2111 according to `use_agent'.
2112 (run_inferior_command): Add one more parameter `len'.
2114 (tracepoint_send_agent): New.
2115 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
2117 2012-04-16 Yao Qi <yao@codesourcery.com>
2119 * tracepoint.c (download_tracepoints): Moved to ...
2120 (cmd_qtstart): ... here.
2122 2012-04-14 Yao Qi <yao@codesourcery.com>
2124 * tracepoint.c: Include inttypes.h.
2125 (struct collect_memory_action): Use sized types.
2126 (struct tracepoint): Likewise.
2127 (cmd_qtdp, stop_tracing): Update print specifiers.
2128 (cmd_qtp, response_tracepoint): Likewise.
2129 (collect_data_at_tracepoint): Likewise.
2130 (collect_data_at_step): Likewise.
2132 2012-04-14 Yao Qi <yao@codesourcery.com>
2134 Import gnulib module inttypes.
2135 * aclocal.m4, config.in, configure: Regenerated.
2137 2012-04-14 Yao Qi <yao@codesourcery.com>
2139 * Makefile.in (maintainer-clean, realclean, distclean): Remove
2140 Makefile and config.status at last.
2142 2012-04-13 Yao Qi <yao@codesourcery.com>
2144 * tracepoint.c: Include stdint.h unconditionally.
2146 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2148 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
2149 on BFD_HAVE_SYS_PROCFS_TYPE.
2150 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
2151 * configure: Regenerate.
2152 * config.in: Likewise.
2154 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
2156 * Makefile.in (clean): Also remove x32.c x32-linux.c
2157 x32-avx.c x32-avx-linux.c.
2158 (x32.o): New target.
2160 (x32-linux.o): Likewise.
2161 (x32-linux.c): Likewise.
2162 (x32-avx.o): Likewise.
2163 (x32-avx.c): Likewise.
2164 (x32-avx-linux.o): Likewise.
2165 (x32-avx-linux.c): Likewise.
2167 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
2168 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
2169 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
2170 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
2171 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
2172 i386/x32-avx-linux.xml.
2174 * linux-x86-low.c (init_registers_x32_linux): New prototype.
2175 (init_registers_x32_avx_linux): Likwise.
2176 (x86_linux_update_xmltarget): Call init_registers_x32_linux
2177 or init_registers_x32_avx_linux if linux_is_elf64 is false.
2179 2012-04-13 Pedro Alves <palves@redhat.com>
2181 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
2182 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
2183 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
2184 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
2187 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
2189 * linux-x86-low.c (compat_x32_clock_t): New.
2190 (compat_x32_siginfo_t): Likewise.
2191 (compat_x32_siginfo_from_siginfo): Likewise.
2192 (siginfo_from_compat_x32_siginfo): Likewise.
2193 (linux_is_elf64): Likewise.
2194 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
2195 and siginfo_from_compat_x32_siginfo for x32.
2196 (x86_arch_setup): Set linux_is_elf64.
2198 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
2201 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
2203 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
2204 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
2205 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
2206 compatible with process.
2208 2012-04-12 Yao Qi <yao@codesourcery.com>
2210 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
2211 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
2212 (install-only, install-info, clean): Handle sub dir gnulib.
2213 (all-lib, am--refresh): New targets.
2214 (memmem.o): Remove target.
2215 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
2216 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
2217 (AC_REPLACE_FUNCS): Remove memmem.
2218 Invoke gl_INIT and AM_INIT_AUTOMAKE.
2219 (AC_OUTPUT): Generate Makefile in gnulib/.
2220 * aclocal.m4, config.in, configure: Regenerated.
2222 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
2224 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
2226 2012-04-05 Pedro Alves <palves@redhat.com>
2228 -Werror=strict-aliasing
2230 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
2233 2012-04-04 Pedro Alves <palves@redhat.com>
2235 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
2236 (sparc_store_gregset_from_stack, sparc_store_gregset)
2237 (sparc_breakpoint_at): Fix formatting.
2239 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2241 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
2243 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
2244 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
2245 * config.in: Regenerate.
2246 * configure: Likewise.
2248 2012-03-29 Pedro Alves <palves@redhat.com>
2250 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
2251 Correct ptrace arguments.
2253 2012-03-28 Pedro Alves <palves@redhat.com>
2255 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
2256 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
2257 (IA64_FR1_REGNUM): New defines.
2258 (ia64_fetch_register): New.
2259 (the_low_target): Install it.
2260 * linux-low.h (struct linux_target_ops) <fetch_register>: New
2262 * linux-low.c (linux_fetch_registers): Try the
2263 the_low_target.fetch_register hook first.
2265 * linux-arm-low.c (the_low_target): Adjust.
2266 * linux-bfin-low.c (the_low_target): Adjust.
2267 * linux-cris-low.c (the_low_target): Adjust.
2268 * linux-crisv32-low.c (the_low_target): Adjust.
2269 * linux-m32r-low.c (the_low_target): Adjust.
2270 * linux-m68k-low.c (the_low_target): Adjust.
2271 * linux-mips-low.c (the_low_target): Adjust.
2272 * linux-ppc-low.c (the_low_target): Adjust.
2273 * linux-s390-low.c (the_low_target): Adjust.
2274 * linux-sh-low.c (the_low_target): Adjust.
2275 * linux-sparc-low.c (the_low_target): Adjust.
2276 * linux-tic6x-low.c (the_low_target): Adjust.
2277 * linux-x86-low.c (the_low_target): Adjust.
2278 * linux-xtensa-low.c (the_low_target): Adjust.
2280 2012-03-26 Pedro Alves <palves@redhat.com>
2282 * server.c (handle_qxfer_libraries): Don't bail early if
2283 the_target->qxfer_libraries_svr4 is not NULL.
2285 2012-03-26 Pedro Alves <palves@redhat.com>
2287 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
2289 2012-03-23 Pedro Alves <palves@redhat.com>
2291 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
2292 "library-list-svr4" element's start tag when the the DSO list is
2295 2012-03-23 Pedro Alves <palves@redhat.com>
2297 * linux-low.c (read_one_ptr): Read the inferior's pointer through
2298 a variable whose type size is the same as the inferior's pointer
2301 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
2303 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
2305 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
2306 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2307 * linux-low.h: Include <signal.h>.
2308 (struct siginfo): Remove forward declaration.
2309 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
2312 2012-03-21 Mike Frysinger <vapier@gentoo.org>
2314 * .gitignore: Ignore more files.
2316 2012-03-19 Pedro Alves <palves@redhat.com>
2317 Jan Kratochvil <jan.kratochvil@redhat.com>
2319 * server.c (cont_thread, general_thread): Add describing comments.
2320 (start_inferior): Clear `cont_thread'.
2321 (handle_v_cont): Don't set `cont_thread' if resuming all threads
2324 2012-03-15 Yao Qi <yao@codesourcery.com>
2326 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
2328 (cmd_qtdp): ... here.
2330 2012-03-15 Yao Qi <yao@codesourcery.com>
2332 * tracepoint.c (struct tracepoint_action_ops): New.
2333 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
2334 (m_tracepoint_action_download): New.
2335 (r_tracepoint_action_download): New.
2336 (x_tracepoint_action_download): New.
2337 (l_tracepoint_action_download): New.
2338 (add_tracepoint_action): Install `action->ops' according type.
2339 (download_tracepoint_1): Move code `download' function pointer
2340 of various tracepoint_action_ops.
2342 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
2344 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
2345 linux_ptrace_attach_warnings.
2347 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
2349 * Makefile.in (linux-ptrace.o): New.
2350 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
2351 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
2352 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
2353 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
2354 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
2356 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
2358 2012-03-08 Yao Qi <yao@codesourcery.com>
2359 Pedro Alves <palves@redhat.com>
2361 Fix PR server/13392.
2362 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
2364 * tracepoint.c (remove_tracepoint): New.
2365 (cmd_qtdp): Call remove_tracepoint when failed to install.
2367 2012-03-07 Pedro Alves <palves@redhat.com>
2369 * linux-low.c (get_detach_signal): New.
2370 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
2371 Pass on pending signals to PTRACE_DETACH. Check the result of the
2373 * server.c (program_signals, program_signals_p): New.
2374 (handle_general_set): Handle QProgramSignals.
2375 * server.h (program_signals, program_signals_p): Declare.
2377 2012-03-05 Pedro Alves <palves@redhat.com>
2378 Jan Kratochvil <jan.kratochvil@redhat.com>
2380 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
2383 2012-03-03 Yao Qi <yao@codesourcery.com>
2385 * tracepoint.c (tracepoint_look_up_symbols): Update call to
2386 agent_look_up_symbols.
2388 2012-03-03 Yao Qi <yao@codesourcery.com>
2390 * Makefile.in (linux-low.o): Keep dependence on agent.h.
2391 (linux-x86-low.o): Likewise.
2392 * server.h: Remove in_process_agent_loaded.
2393 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
2397 2012-03-03 Yao Qi <yao@codesourcery.com>
2399 * tracepoint.c (gdb_agent_capability): New global.
2400 (in_process_agent_loaded_ust): Renamed to
2401 `in_process_agent_supports_ust'.
2403 (in_process_agent_supports_ust): Call agent_capability_check.
2404 (clear_installed_tracepoints): Assert that agent supports
2407 2012-03-03 Yao Qi <yao@codesourcery.com>
2409 * linux-low.c (linux_supports_agent): New.
2410 (linux_target_ops): Initialize field `supports_agent' with
2411 linux_supports_agent.
2412 * target.h (struct target_ops) <supports_agent>: New.
2413 (target_supports_agent): New macro.
2414 * server.c (handle_general_set): Handle packet 'QAgent'.
2415 (handle_query): Send `QAgent+'.
2416 * Makefile.in (server.o): Depends on agent.h.
2418 2012-03-03 Yao Qi <yao@codesourcery.com>
2420 * Makefile.in (OBS): Add agent.o.
2421 Add new rule for agent.o.
2422 Track dependence of tracepoint.c on agent.h.
2423 * tracepoint.c (run_inferior_command_1):
2424 (run_inferior_command): Call agent_run_command.
2425 (gdb_ust_connect_sync_socket): Deleted. Move it to
2427 (resume_thread, stop_thread): Likewise.
2428 (gdb_ust_socket_init): Renamed to ...
2429 (gdb_agent_socket_init): ... New.
2430 (gdb_ust_thread): Renamed to ...
2431 (gdb_agent_helper_thread): ... New.
2432 (gdb_ust_init): Move some code to ...
2433 (gdb_agent_init): ... here. New.
2434 [HAVE_UST]: Call gdb_ust_init.
2435 (initialize_tracepoint_ftlib): Call gdb_agent_init.
2436 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
2437 * config.in, configure: Regenerated.
2439 2012-03-02 Pedro Alves <palves@redhat.com>
2441 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
2442 * linux-low.c (struct simple_pid_list): New.
2443 (stopped_pids): New a struct simple_pid_list pointer.
2444 (add_to_pid_list, pull_pid_from_list): New.
2445 (handle_extended_wait): Don't assume the first signal new children
2446 report is SIGSTOP. Adjust call to pull_pid_from_list.
2447 (linux_wait_for_lwp): Adjust.
2449 2012-03-02 Yao Qi <yao@codesourcery.com>
2451 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
2454 2012-03-02 Yao Qi <yao@codesourcery.com>
2456 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
2457 `stop_pc' and `tpoint'. Update caller.
2459 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
2461 * linux-low.h (linux_target_ops): Add regset_bitmap member.
2462 * linux-low.c (use_linux_regsets): New macro.
2463 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
2464 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
2465 (linux_register_in_regsets): New function.
2466 (usr_fetch_inferior_registers): Skip registers covered by
2468 (usr_store_inferior_registers): Likewise.
2469 (usr_fetch_inferior_registers): New macro.
2470 (usr_store_inferior_registers): Likewise.
2471 (linux_fetch_registers): Handle mixed regset/non-regset targets.
2472 (linux_store_registers): Likewise.
2473 * linux-mips-low.c (init_registers_mips_dsp_linux): New
2475 (init_registers_mips64_dsp_linux): Likewise.
2476 (init_registers_mips_linux): New macro.
2477 (init_registers_mips_dsp_linux): Likewise.
2478 (mips_dsp_num_regs): Likewise.
2479 (DSP_BASE, DSP_CONTROL): New fallback macros.
2480 (mips_base_regs): New macro.
2481 (mips_regmap): Use it. Fix the size.
2482 (mips_dsp_regmap): New variable.
2483 (mips_dsp_regset_bitmap): Likewise.
2484 (mips_arch_setup): New function.
2485 (mips_cannot_fetch_register): Use the_low_target.regmap rather
2487 (mips_cannot_store_register): Likewise.
2488 (the_low_target): Update .arch_setup, .num_regs and .regmap
2489 initializers. Add .regset_bitmap initializer.
2490 * linux-arm-low.c (the_low_target): Add .regset_bitmap
2492 * linux-bfin-low.c (the_low_target): Likewise.
2493 * linux-cris-low.c (the_low_target): Likewise.
2494 * linux-crisv32-low.c (the_low_target): Likewise.
2495 * linux-ia64-low.c (the_low_target): Likewise.
2496 * linux-m32r-low.c (the_low_target): Likewise.
2497 * linux-m68k-low.c (the_low_target): Likewise.
2498 * linux-ppc-low.c (the_low_target): Likewise.
2499 * linux-s390-low.c (the_low_target): Likewise.
2500 * linux-sh-low.c (the_low_target): Likewise.
2501 * linux-sparc-low.c (the_low_target): Likewise.
2502 * linux-tic6x-low.c (the_low_target): Likewise.
2503 * linux-x86-low.c (the_low_target): Likewise.
2504 * linux-xtensa-low.c (the_low_target): Likewise.
2505 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
2506 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
2507 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
2509 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
2510 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
2512 2012-02-29 Yao Qi <yao@codesourcery.com>
2513 Pedro Alves <palves@redhat.com>
2515 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
2516 `step_over_finished' is true.
2518 2012-02-27 Pedro Alves <palves@redhat.com>
2520 * linux-low.c (pid_is_stopped): Delete, moved to common/.
2521 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
2523 2012-02-27 Pedro Alves <palves@redhat.com>
2526 * linux-low.c (pid_is_stopped): New.
2527 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
2529 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
2531 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
2534 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
2536 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
2538 2012-02-24 Luis Machado <lgustavo@codesourcery>
2540 * server.c (handle_query): Advertise support for target-side
2541 breakpoint condition evaluation.
2542 (process_point_options): New function.
2543 (process_serial_event): When inserting a breakpoint, check for
2544 a target-side condition that should be evaluated.
2546 * mem-break.c: Include regcache.h and ax.h.
2547 (point_cond_list_t): New data structure.
2548 (breakpoint) <cond_list>: New field.
2549 (find_gdb_breakpoint_at): Make non-static.
2550 (delete_gdb_breakpoint_at): Clear any target-side
2552 (clear_gdb_breakpoint_conditions): New function.
2553 (add_condition_to_breakpoint): Likewise.
2554 (add_breakpoint_condition): Likewise.
2555 (gdb_condition_true_at_breakpoint): Likewise.
2556 (gdb_breakpoint_here): Return result directly instead
2557 of going through a local variable.
2559 * mem-break.h (find_gdb_breakpoint_at): New prototype.
2560 (clear_gdb_breakpoint_conditions): Likewise.
2561 (add_breakpoint_condition): Likewise.
2562 (gdb_condition_true_at_breakpoint): Likewise.
2564 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
2565 (need_step_over_p): Take target-side breakpoint condition into
2568 2012-02-24 Luis Machado <lgustavo@codesourcery>
2570 * server.h: Include tracepoint.h.
2571 (agent_mem_read, agent_get_trace_state_variable_value,
2572 agent_set_trace_state_variable_value,
2573 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
2574 get_set_tsv_func_addr): New prototypes.
2576 * ax.h: New include file.
2577 * ax.c: New source file.
2579 * tracepoint.c: Include ax.h.
2580 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
2581 agent_expr, eval_result_type): Move to ax.h.
2582 (parse_agent_expr): Rename to ...
2583 (gdb_parse_agent_expr): ... this, make it non-static and move
2585 (unparse_agent_expr) Rename to ...
2586 (gdb_unparse_agent_expr): ... this, make it non-static and move
2588 (eval_agent_expr): Rename to ...
2589 (eval_tracepoint_agent_expr): ... this.
2590 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
2591 forward declarations.
2592 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
2593 (agent_get_trace_state_variable_value): New function.
2594 (agent_set_trace_state_variable_value): New function.
2595 (cmd_qtdp): Call gdb_parse_agent_expr (...).
2596 (response_tracepoint): Call gdb_unparse_agent_expr (...).
2597 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
2598 (condition_true_at_tracepoint): Likewise.
2599 (parse_agent_expr): Rename to ...
2600 (gdb_parse_agent_expr): ... this and move to ax.c.
2601 (unparse_agent_expr): Rename to ...
2602 (gdb_unparse_agent_expr): ... this and move to ax.c.
2603 (gdb_agent_op_name): Move to ax.c.
2604 (eval_agent_expr): Rename to ...
2605 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
2607 (eval_tracepoint_agent_expr): New function.
2608 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
2610 (current_insn_ptr, emit_error, struct bytecode_address): Move to
2612 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
2613 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
2614 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
2615 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
2616 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
2617 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
2618 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
2619 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
2620 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
2621 (compile_bytecodes): Remove forward declaration.
2622 (is_goto_target): Move to ax.c.
2623 (compile_bytecodes): Move to ax.c and call
2624 agent_get_trace_state_variable_value (...) and
2625 agent_set_trace_state_variable_value (...).
2627 * Makefile.in: Update ax.c and IPA dependencies.
2629 2012-02-24 Pedro Alves <palves@redhat.com>
2631 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
2632 (cmd_bigqtbuffer_circular): ... this. Only handle
2633 'QTBuffer:circular:'.
2634 (handle_tracepoint_general_set): Adjust.
2636 2012-02-16 Yao Qi <yao@codesourcery.com>
2638 * inferiors.c: Move code to ...
2639 * dll.c: .... here. New.
2640 * server.h: Declare clear_dlls.
2641 * Makefile.in (SFILES): Add dll.c.
2645 2012-02-11 Yao Qi <yao@codesourcery.com>
2647 * server.c: (handle_monitor_command): Add a new parameter
2649 (handle_query): Update caller.
2651 2012-02-09 Joel Brobecker <brobecker@adacore.com>
2653 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
2654 * configure, config.in: Regenerate.
2655 * hostio.c: Provide an alternate implementation if HAVE_READLINK
2658 2012-02-02 Pedro Alves <palves@redhat.com>
2660 Try SIGKILL first, then PTRACE_KILL.
2661 * linux-low.c (linux_kill_one_lwp): New.
2662 (linux_kill_one_lwp): Rename to ...
2663 (kill_one_lwp_callback): ... this. Use the new
2666 2012-02-02 Pedro Alves <palves@redhat.com>
2668 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
2671 2012-01-27 Pedro Alves <palves@redhat.com>
2673 * linux-low.c (linux_child_pid_to_exec_file): Delete.
2674 (elf_64_file_p): Make static.
2675 (linux_pid_exe_is_elf_64_file): New.
2676 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
2677 Delete declarations.
2678 (linux_pid_exe_is_elf_64_file): Declare.
2679 * linux-x86-low.c (x86_arch_setup): Use
2680 linux_pid_exe_is_elf_64_file.
2682 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2684 * linux-low.c (linux_wait_for_event_1): Rename to ...
2685 (linux_wait_for_event): ... here and merge it with former
2686 linux_wait_for_event - new variable wait_ptid, use it.
2687 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
2689 2012-01-23 Pedro Alves <palves@redhat.com>
2691 * server.c (main): Avoid yet another case of infinite loop while
2692 detaching/killing after a longjmp.
2694 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2697 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
2699 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
2701 * hostio.c (handle_readlink): New function.
2702 (handle_vFile): Call it to handle "vFile:readlink" packets.
2704 2012-01-20 Pedro Alves <palves@redhat.com>
2705 Ulrich Weigand <ulrich.weigand@linaro.org>
2707 * server.c (handle_v_requests): Only support vAttach and vRun to
2708 start multiple processes when in extended protocol mode.
2710 2012-01-17 Pedro Alves <palves@redhat.com>
2712 * tracepoint.c (initialize_tracepoint): Use mmap instead of
2713 memalign plus mprotect to allocate the scratch buffer.
2715 2012-01-13 Pedro Alves <palves@redhat.com>
2717 * server.c (attach_inferior): Clear `cont_thread'.
2719 2012-01-13 Pedro Alves <palves@redhat.com>
2721 * server.c (main): Avoid infinite loop while detaching/killing
2724 2012-01-09 Doug Evans <dje@google.com>
2726 * server.c (start_inferior): Set last_ptid in --wrapper case.
2728 2012-01-06 Yao Qi <yao@codesourcery.com>
2730 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
2732 [IN_PROCESS_AGENT] (debug_agent): New global variable.
2734 2012-01-04 Yao Qi <yao@codesourcery.com>
2736 * tracepoint.c (cmd_qtdp): Print debug message
2737 for static tracepoint.
2739 2012-01-04 Yao Qi <yao@codesourcery.com>
2741 * tracepoint.c (trace_vdebug): Differentiate debug message
2742 between gdbserver and IPA.
2744 2012-01-03 Yao Qi <yao@codesourcery.com>
2746 * tracepoint.c (tracepoint_was_hit): Don't collect for
2749 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2751 * terminal.h: Reformat copyright header.
2753 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2755 * server.c (gdbserver_version): Update copyright year.
2756 * gdbreplay.c (gdbreplay_version): Likewise.
2758 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
2760 * linux-low.c (linux_create_inferior): Put empty if clause for write.
2763 2011-12-18 Hui Zhu <teawater@gmail.com>
2764 * linux-low.c (linux_create_inferior): Save return value to ret.
2766 2011-12-18 Hui Zhu <teawater@gmail.com>
2768 * linux-low.c (linux_create_inferior): Save return value to ret.
2770 2011-12-16 Doug Evans <dje@google.com>
2772 * linux-low.c (linux_create_inferior): If stdio connection,
2773 redirect stdin from /dev/null, stdout to stderr.
2774 * remote-utils.c (remote_is_stdio): New static global.
2775 (remote_connection_is_stdio): New function.
2776 (remote_prepare): Handle stdio connection.
2777 (remote_open): Ditto.
2778 (remote_close): Don't close stdin for stdio connections.
2779 (read_prim,write_prim): New functions. Replace all calls to
2780 read/write to these.
2781 * server.c (main): Watch for "-" argument. Move call to
2782 remote_prepare before start_inferior.
2783 * server.h (STDIO_CONNECTION_NAME): New macro.
2784 (remote_connection_is_stdio): Declare.
2786 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
2787 in debugging output.
2789 2011-12-15 Yao Qi <yao@codesourcery.com>
2791 * tracepoint.c: Include sys/syscall.h.
2792 (gdb_ust_thread): Remove preprocessor conditional.
2794 2011-12-14 Pedro Alves <pedro@codesourcery.com>
2796 * linux-low.c (linux_detach_one_lwp): Call
2797 the_low_target.prepare_to_resume before detaching.
2799 2011-12-14 Yao Qi <yao@codesourcery.com>
2801 * tracepoint.c (gdb_ust_thread): Don't ignore return value
2804 2011-12-14 Yao Qi <yao@codesourcery.com>
2806 * i386-low.c (i386_low_stopped_data_address): Initialize local
2809 2011-12-13 Pedro Alves <pedro@codesourcery.com>
2813 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
2814 DR_CONTROL unless necessary. Extend comments.
2815 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
2816 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
2818 2011-12-13 Yao Qi <yao@codesourcery.com>
2820 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
2822 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
2824 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
2826 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
2827 Print new debug message for such case.
2829 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2831 Fix overlapping memcpy.
2832 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
2833 the read_inferior_memory transfer.
2834 (delete_fast_tracepoint_jump): New variable buf. Use it for the
2835 write_inferior_memory transfer.
2836 (set_fast_tracepoint_jump): New variable buf. Use it for the
2837 read_inferior_memory and write_inferior_memory transfers.
2838 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
2839 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
2840 Use it for the write_inferior_memory transfer.
2841 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
2844 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2846 * linux-low.c (fetch_register, store_register): Make code
2847 consistent, fix formatting.
2849 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2851 * linux-low.c (usr_store_inferior_registers): Factor out code
2852 to handle individual registers into...
2853 (store_register): ... this new function.
2855 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
2857 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
2858 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
2859 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
2860 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
2861 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
2862 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
2863 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
2864 (srv_xmlfiles): Add new XML files.
2866 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
2868 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
2869 (init_registers_s390_linux32v1): Add prototype.
2870 (init_registers_s390_linux32v2): Likewise.
2871 (init_registers_s390_linux64v1): Likewise.
2872 (init_registers_s390_linux64v2): Likewise.
2873 (init_registers_s390x_linux64v1): Likewise.
2874 (init_registers_s390x_linux64v2): Likewise.
2875 (s390_num_regs): Increment to 52.
2876 (s390_regmap): Add orig_r2 register.
2877 (s390_num_regs_3264): Increment to 68.
2878 (s390_regmap_3264): Add orig_r2 register.
2879 (s390_collect_ptrace_register): Handle orig_r2 register.
2880 (s390_supply_ptrace_register): Likewise.
2881 (s390_fill_last_break): New function.
2882 (s390_store_last_break): Likewise.
2883 (s390_fill_system_call): New function.
2884 (s390_store_system_call): Likewise.
2885 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
2887 (s390_check_regset): New function.
2888 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
2889 NT_S390_SYSTEM_CALL regsets and use appropriate description.
2890 Update target_regsets for available register sets.
2892 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
2893 Jan Kratochvil <jan.kratochvil@redhat.com>
2895 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
2896 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
2898 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
2899 * linux-low.h (struct process_info_private): New member r_debug.
2900 * server.c (handle_qxfer_libraries): Call
2901 the_target->qxfer_libraries_svr4.
2902 (handle_qxfer_libraries_svr4): New function.
2903 (qxfer_packets): New entry "libraries-svr4".
2904 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
2905 * target.h (struct target_ops): New member qxfer_libraries_svr4.
2906 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
2907 PACKET_qXfer_libraries_svr4.
2909 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
2911 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
2912 PSW address/mask between 8-byte and 16-byte formats.
2913 (s390_supply_ptrace_register): Likewise.
2914 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
2915 basic addressing mode bit.
2917 2011-11-24 Stan Shebs <stan@codesourcery.com>
2919 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
2921 2011-11-17 Stan Shebs <stan@codesourcery.com>
2923 * tracepoint.c (struct tracepoint): New field traceframe_usage.
2924 (tracing_start_time): New global.
2925 (tracing_stop_time): New global.
2926 (tracing_user_name): New global.
2927 (tracing_notes): New global.
2928 (tracing_stop_note): New global.
2929 (cmd_qtstart): Set traceframe_usage, start_time.
2930 (stop_tracing): Set stop_time.
2931 (cmd_qtstatus): Report additional status.
2932 (cmd_qtp): New function.
2933 (handle_tracepoint_query): Call it.
2934 (cmd_qtnotes): New function.
2935 (handle_tracepoint_general_set): Call it.
2936 (get_timestamp): Rename from tsv_get_timestamp.
2938 2011-11-14 Stan Shebs <stan@codesourcery.com>
2939 Kwok Cheung Yeung <kcy@codesourcery.com>
2941 * linux-x86-low.c (small_jump_insn): New.
2942 (i386_install_fast_tracepoint_jump_pad): Add arguments for
2943 trampoline and error message, build a trampoline and issue a small
2944 jump instruction to it.
2945 (x86_install_fast_tracepoint_jump_pad): Add arguments for
2946 trampoline and error message.
2947 (x86_get_min_fast_tracepoint_insn_len): New.
2948 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
2949 * linux-low.h (struct linux_target_ops): Add arguments to
2950 install_fast_tracepoint_jump_pad operation, add new operation.
2951 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
2953 (linux_get_min_fast_tracepoint_insn_len): New function.
2954 (linux_target_op): Add new operation.
2955 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
2956 (gdb_trampoline_buffer_end): Ditto.
2957 (gdb_trampoline_buffer_error): Ditto.
2958 (struct ipa_sym_addresses): Add fields for new IPA variables.
2959 (symbol_list): Add entries for new IPA variables.
2960 (struct tracepoint): Add fields to hold the address range of the
2961 trampoline used by the tracepoint.
2962 (trampoline_buffer_head): New static variable.
2963 (trampoline_buffer_tail): Ditto.
2964 (claim_trampoline_space): New function.
2965 (have_fast_tracepoint_trampoline_buffer): New function.
2966 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
2968 (install_fast_tracepoint): Ditto, also add error buffer argument.
2969 (cmd_qtminftpilen): New function.
2970 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
2971 (fast_tracepoint_from_trampoline_address): New function.
2972 (fast_tracepoint_collecting): Handle trampoline as part of jump
2974 (set_trampoline_buffer_space): New function.
2975 (initialize_tracepoint): Initialize new IPA variables.
2976 * target.h (struct target_ops): Add arguments to
2977 install_fast_tracepoint_jump_pad operation, add new
2978 get_min_fast_tracepoint_insn_len operation.
2979 (target_get_min_fast_tracepoint_insn_len): New.
2980 (install_fast_tracepoint_jump_pad): Add arguments.
2981 * server.h (IPA_BUFSIZ): Define.
2982 * linux-i386-ipa.c: Include extra header files.
2983 (initialize_fast_tracepoint_trampoline_buffer): New function.
2984 (initialize_low_tracepoint): Call it.
2985 * server.h (set_trampoline_buffer_space): Declare.
2986 (claim_trampoline_space): Ditto.
2987 (have_fast_tracepoint_trampoline_buffer): Ditto.
2989 2011-11-14 Yao Qi <yao@codesourcery.com>
2991 * server.c (handle_query): Handle InstallInTrace for qSupported.
2992 * tracepoint.c (add_tracepoint): Sort list.
2993 (install_tracepoint, download_tracepoint): New.
2994 (cmd_qtdp): Call them to install and download tracepoints.
2995 (sort_tracepoints): Removed.
2996 (cmd_qtstart): Update.
2998 2011-11-14 Yao Qi <yao@codesourcery.com>
3000 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
3001 * mem-break.h: Declare.
3002 * tracepoint.c (cmd_qtstart): Move some code to ...
3003 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
3005 (download_tracepoints): Move some code to ...
3006 (download_tracepoint_1): ... here. New.
3008 2011-11-08 Yao Qi <yao@codesourcery.com>
3010 * remote-utils.c (relocate_instruction): A comment fix.
3012 2011-11-07 Joel Brobecker <brobecker@adacore.com>
3014 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
3015 (i386_dr_low_get_control, i386_dr_low_get_status): Use
3016 dr_status_mirror and dr_control_mirror from debug_reg_state.
3017 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
3018 (i386_initial_stuff): Remove use of deleted globals.
3019 (i386_get_thread_context, i386_set_thread_context,
3020 i386_thread_added): Use dr_status_mirror and dr_control_mirror
3021 from debug_reg_state.
3023 2011-11-05 Yao Qi <yao@codesourcery.com>
3025 * tracepoint.c (gdb_collect): Loop over tracepoints of same
3026 address as TPOINT's.
3028 2011-11-02 Stan Shebs <stan@codesourcery.com>
3030 * tracepoint.c (agent_mem_read_string): New function.
3031 (eval_agent_expr): Call it for tracenz.
3032 * server.c (handle_query): Report support for tracenz.
3034 2011-11-02 Yao Qi <yao@codesourcery.com>
3036 * tracepoint.c (cmd_qtstart): Remove unused local variables.
3038 2011-11-02 Yao Qi <yao@codesourcery.com>
3040 * target.h: Fix a typo in comment.
3042 2011-10-31 Pedro Alves <pedro@codesourcery.com>
3044 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
3045 clobber the breakpoints' shadows with fast tracepoint jumps.
3046 * mem-break.h (check_mem_write): Add `myaddr' parameter.
3047 * target.c (write_inferior_memory): Also pass MYADDR down to
3050 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
3052 * configure.ac: Check support for personality routine.
3053 * configure: Regenerate.
3054 * config.in: Likewise.
3055 * linux-low.c: Include <sys/personality.h>.
3056 Define ADDR_NO_RANDOMIZE if necessary.
3057 (linux_create_inferior): Disable address space randomization when
3058 forking inferior, if requested.
3059 (linux_supports_disable_randomization): New function.
3060 (linux_target_ops): Install it.
3061 * server.h (disable_randomization): Declare.
3062 * server.c (disable_randomization): New global variable.
3063 (handle_general_set): Handle QDisableRandomization.
3064 (handle_query): Likewise for qSupported.
3065 (main): Support --disable-randomization and --no-disable-randomization
3066 command line arguments.
3067 * target.h (struct target_ops): Add supports_disable_randomization.
3068 (target_supports_disable_randomization): New macro.
3070 2011-09-29 Mike Frysinger <vapier@gentoo.org>
3072 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
3074 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
3075 [!PT_GETDSBT] (target_loadmap): New definition.
3076 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
3077 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
3078 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
3079 and PT_GETDSBT to LINUX_LOADMAP.
3080 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
3081 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
3083 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
3085 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
3086 (arm_linux_hwbp_cap): New static variable.
3087 (arm_linux_get_hwbp_cap): Replace by ...
3088 (arm_linux_init_hwbp_cap): ... this new function.
3089 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
3090 (arm_linux_get_hw_watchpoint_count): Likewise.
3091 (arm_linux_get_hw_watchpoint_max_length): Likewise.
3092 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
3093 (arm_prepare_to_resume): Use perror_with_name instead of error.
3095 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
3097 * linux-arm-low.c: Include <signal.h>.
3098 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
3099 (struct arm_linux_hwbp_cap): New data type.
3100 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
3101 (struct arm_linux_hw_breakpoint): New data type.
3102 (MAX_BPTS, MAX_WPTS): Define.
3103 (struct arch_process_info, struct arch_lwp_info): New data types.
3104 (arm_linux_get_hwbp_cap): New function.
3105 (arm_linux_get_hw_breakpoint_count): Likewise.
3106 (arm_linux_get_hw_watchpoint_count): Likewise.
3107 (arm_linux_get_hw_watchpoint_max_length): Likewise.
3108 (arm_hwbp_control_initialize): Likewise.
3109 (arm_hwbp_control_is_enabled): Likewise.
3110 (arm_hwbp_control_is_initialized): Likewise.
3111 (arm_hwbp_control_disable): Likewise.
3112 (arm_linux_hw_breakpoint_equal): Likewise.
3113 (arm_linux_hw_point_initialize): Likewise.
3114 (struct update_registers_data): New data structure.
3115 (update_registers_callback: New function.
3116 (arm_insert_point): Likewise.
3117 (arm_remove_point): Likewise.
3118 (arm_stopped_by_watchpoint): Likewise.
3119 (arm_stopped_data_address): Likewise.
3120 (arm_new_process): Likewise.
3121 (arm_new_thread): Likewise.
3122 (arm_prepare_to_resume): Likewise.
3123 (the_low_target): Register arm_insert_point, arm_remove_point,
3124 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
3125 arm_new_thread, and arm_prepare_to_resume.
3127 2011-09-15 Stan Shebs <stan@codesourcery.com>
3129 * server.h (struct emit_ops): Add compare-goto fields.
3130 * tracepoint.c (gdb_agent_op_sizes): New table.
3131 (emit_eq_goto): New function.
3132 (emit_ne_goto): New function.
3133 (emit_lt_goto): New function.
3134 (emit_le_goto): New function.
3135 (emit_gt_goto): New function.
3136 (emit_ge_goto): New function.
3137 (is_goto_target): New function.
3138 (compile_bytecodes): Recognize special cases of compare-goto
3139 combinations and call specialized emitters for them.
3140 * linux-x86-low.c (amd64_emit_eq_goto): New function.
3141 (amd64_emit_ne_goto): New function.
3142 (amd64_emit_lt_goto): New function.
3143 (amd64_emit_le_goto): New function.
3144 (amd64_emit_gt_goto): New function.
3145 (amd64_emit_ge_goto): New function.
3146 (amd64_emit_ops): Add the new functions.
3147 (i386_emit_eq_goto): New function.
3148 (i386_emit_ne_goto): New function.
3149 (i386_emit_lt_goto): New function.
3150 (i386_emit_le_goto): New function.
3151 (i386_emit_gt_goto): New function.
3152 (i386_emit_ge_goto): New function.
3153 (i386_emit_ops): Add the new functions.
3155 2011-09-08 Stan Shebs <stan@codesourcery.com>
3157 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
3158 (i386_emit_epilogue): Restore %ebx.
3160 2011-08-31 Jie Zhang <jzhang918@gmail.com>
3162 * server.c (step_thread): Remove definition.
3163 (process_serial_event): Don't handle Hs.
3164 * server.h (step_thread): Remove declaration.
3165 * target.c (set_desired_inferior): Remove use of step_thread.
3167 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
3169 * linux-low.c: Include linux-procfs.h.
3170 (linux_attach_lwp_1): Update comments.
3171 (linux_attach): Scan for existing threads when attaching to a
3172 process that is the tgid.
3173 * Makefile.in: Update dependencies.
3175 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
3177 * configure.srv: Add linux-procfs.o dependencies.
3179 2011-08-14 Yao Qi <yao@codesourcery.com>
3181 * target.h (struct target_ops): Fix indent.
3182 * win32-low.c (win32_target_ops): Fix comment.
3184 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
3185 Yao Qi <yao@codesourcery.com>
3187 * Makefile.in (clean): Remove tic6x-*.c files.
3188 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
3189 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
3190 (tic6x-c64xp-linux.c): Likewise.
3191 * configure.srv: Add support for tic6x-*-uclinux.
3192 * linux-tic6x-low.c: New.
3193 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
3195 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
3196 Yao Qi <yao@codesourcery.com>
3198 * target.h (struct target_ops): Add read_loadmap.
3199 * linux-low.c (struct target_loadseg): New type.
3200 (struct target_loadmap): New type.
3201 (linux_read_loadmap): New function.
3202 (linux_target_ops): Add linux_read_loadmap.
3203 * server.c (handle_query): Support qXfer:fdpic:read packet.
3204 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
3207 2011-08-05 Eli Zaretskii <eliz@gnu.org>
3209 * win32-low.c: Include <stdint.h>.
3211 2011-07-22 Pedro Alves <pedro@codesourcery.com>
3213 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
3214 to the inferior here.
3215 (i386_remove_aligned_watchpoint): Ditto.
3216 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
3217 fit part of the watchpoint in the debug registers.
3218 (i386_update_inferior_debug_regs): New.
3219 (i386_low_insert_watchpoint): Work on a local mirror of the debug
3220 registers, and only update the inferior on success.
3221 (i386_low_remove_watchpoint): Ditto.
3223 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
3225 * linux-low.c (compare_ints, unique, list_threads, show_process,
3226 linux_core_of_thread): Delete.
3227 (linux_target_ops): Change linux_core_of_thread to
3228 linux_common_core_of_thread.
3229 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
3230 * utils.c (malloc_failure): Change type of argument.
3231 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
3232 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
3233 common/linux-osdata.c, common/ptid.c and common/buffer.c.
3234 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
3235 (IPA_OBJS): Add common-utils-ipa.o.
3236 (ptid_h, linux_osdata_h): New macros.
3237 (server_h): Add common/common-utils.h, common/xml-utils.h,
3238 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
3240 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
3241 ptid.o, buffer.o): New rules.
3242 (linux-low.o): Add common/linux-osdata.h as a dependency.
3243 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
3244 * configure.ac: Add AC_HEADER_DIRENT check.
3245 * config.in: Regenerate.
3246 * configure: Regenerate.
3247 * remote-utils.c (xml_escape_text): Delete.
3248 (buffer_grow, buffer_free, buffer_init, buffer_finish,
3249 buffer_xml_printf): Move to common/buffer.c.
3250 * server.c (main): Remove call to initialize_inferiors.
3251 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
3252 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
3253 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
3254 internal_error, gdb_assert, gdb_assert_fail): Delete.
3255 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
3256 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
3258 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
3259 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
3260 initialize_inferiors): Delete.
3262 2011-07-20 Pedro Alves <pedro@codesourcery.com>
3264 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
3267 2011-05-31 Pedro Alves <pedro@codesourcery.com>
3269 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
3271 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
3273 2011-05-26 Yao Qi <yao@codesourcery.com>
3275 * Makefile.in (thread-db.o): Track dependence to
3276 common/gdb_thread_db.h.
3277 * thread-db.c: include gdb_thread_db.h from right place.
3279 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
3281 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
3282 __FILE__ and __LINE__ to internal_error.
3284 2011-05-13 Doug Evans <dje@google.com>
3286 * thread-db.c (try_thread_db_load_from_sdir): New function.
3287 (try_thread_db_load_from_dir): New function.
3288 (thread_db_load_search): Handle $sdir, ignore $pdir.
3289 Remove trying of system directories if search of
3290 libthread-db-search-path fails, that is now done via $sdir.
3292 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
3294 * server.c (handle_query): Add EnableDisableTracepoints to the list
3295 of supported features.
3296 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
3298 (cmd_qtenable_disable): New.
3299 (cmd_qtstart): Install tracepoints even if disabled.
3300 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
3301 receiving a QTEnable or QTDisable packet.
3302 (gdb_collect): Skip data collection if fast tracepoint is disabled.
3303 (ust_marker_to_static_tracepoint): Do not ignore disabled static
3305 (gdb_probe): Skip data collection if static tracepoint is disabled.
3307 2011-05-10 Doug Evans <dje@google.com>
3309 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
3311 2011-05-04 Doug Evans <dje@google.com>
3313 * linux-low.c (linux_join): Skip process lookup.
3314 * spu-low.c (spu_join): Ditto.
3315 * server.c (join_inferiors_callback): Delete.
3316 (process_serial_event): For 'D' packet (detach) call join_inferior
3319 2011-05-04 Joseph Myers <joseph@codesourcery.com>
3321 * README: Don't mention xscale*-*-linux*.
3322 * configure.srv (xscale*-*-linux*): Don't handle target.
3324 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
3326 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
3328 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
3329 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
3330 (i386_emit_void_call_2): Likewise.
3332 2011-04-26 Yao Qi <yao@codesourcery.com>
3334 * linux-low.c: Move common macros to linux-ptrace.h.
3335 Include linux-ptrace.h.
3336 * Makefile.in (linux_ptrace_h): New.
3337 (linux-low.o): Depends on linux-ptrace.h.
3339 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3341 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
3342 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
3343 (remote_prepare): New function with most of the TCP code from ...
3344 (remote_open): ... here. Detect PORT here unconditionally. Move also
3345 setting transport_is_reliable.
3346 * server.c (run_once): New variable.
3347 (gdbserver_usage): Document it.
3348 (main): Set run_once for `--once'. Call remote_prepare. Exit after
3349 the first run if RUN_ONCE.
3350 * server.h (run_once, remote_prepare): New declarations.
3352 2011-04-19 Tom Tromey <tromey@redhat.com>
3354 * win32-low.c (handle_load_dll): Remove duplicate "the".
3356 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
3358 Remove support for old Cygwin 1.5 versions.
3359 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
3360 function to avoid warning.
3361 (win32_add_one_solib): Use cygwin_conv_path function to avoid
3364 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
3366 * gdbserver/server.h (Macro _): Define it if not available.
3368 2011-03-14 Michael Snyder <msnyder@vmware.com>
3370 * hostio.c (handle_close): Remove unnecessary null test.
3372 2011-03-10 Joel Brobecker <brobecker@adacore.com>
3374 * Makefile.in (maintainer-clean realclean distclean): Remove
3375 "make ... subdir_do" command.
3377 2011-03-10 Michael Snyder <msnyder@vmware.com>
3379 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
3381 * server.c (handle_v_run): Free alloced buffer on early return.
3383 2011-03-09 Yao Qi <yao@codesourcery.com>
3386 2011-03-04 Yao Qi <yao@codesourcery.com>
3388 * Makefile.in: Remove GNU make feature --directory.
3390 2011-03-05 Yao Qi <yao@codesourcery.com>
3392 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
3393 (subdir_do): New make target. Copied from gdb/Makefile.
3394 (maintainer-clean, realclean, distclean, clean): Call corresponding
3395 make targets in common/Makefile.
3397 2011-02-11 Yao Qi <yao@codesourcery.com>
3399 * configure.ac: Call AC_PROG_RANLIB.
3400 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3401 * configure: Regenerate.
3403 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3405 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
3407 2011-03-06 Yao Qi <yao@codesourcery.com>
3409 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
3411 2011-03-05 Yao Qi <yao@codesourcery.com>
3413 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
3414 (subdir_do): New make target. Copied from gdb/Makefile.
3415 (maintainer-clean, realclean, distclean, clean): Call corresponding
3416 make targets in common/Makefile.
3418 2011-03-04 Yao Qi <yao@codesourcery.com>
3420 * Makefile.in: Remove GNU make feature --directory.
3422 2011-03-04 Michael Snyder <msnyder@vmware.com>
3424 * server.c (queue_stop_reply): Call xmalloc not malloc.
3426 2011-03-02 Michael Snyder <msnyder@vmware.com>
3428 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
3430 2011-02-28 Michael Snyder <msnyder@vmware.com>
3432 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
3433 (cmd_qtframe): Ditto.
3434 (cmd_qtbuffer): Ditto.
3435 (cmd_bigqtbuffer): Ditto.
3437 * utils.c (decimal2str): Initialize 'width' to nine, then
3440 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3442 * hostio.c (require_data): Free *data, not data.
3444 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3446 * hostio.c (require_data): Use free, not xfree.
3448 2011-02-27 Michael Snyder <msnyder@vmware.com>
3450 * server.c (handle_query): Discard unused value.
3452 * hostio.c (require_data): Free malloc memory before returning
3455 2011-02-26 Michael Snyder <msnyder@vmware.com>
3457 * linux-low.c (list_threads): Call closedir for dirent.
3459 2011-02-27 Michael Snyder <msnyder@vmware.com>
3461 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
3462 a case statement falls through.
3464 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
3466 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
3469 2011-02-26 Michael Snyder <msnyder@vmware.com>
3471 * utils.c (decimal2str): Eliminate dead code and dead param.
3472 (pulongest): Drop dead param from call to decimal2str.
3475 2011-02-24 Joel Brobecker <brobecker@adacore.com>
3477 Revert the following patch (not approved yet):
3478 2011-02-21 Hui Zhu <teawater@gmail.com>
3479 * tracepoint.c (tp_printf): New function.
3480 (eval_agent_expr): Handle gdb_agent_op_printf.
3482 2011-02-21 Hui Zhu <teawater@gmail.com>
3484 * tracepoint.c (tp_printf): New function.
3485 (eval_agent_expr): Handle gdb_agent_op_printf.
3487 2011-02-18 Tom Tromey <tromey@redhat.com>
3489 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
3490 (tracepoint.o): Likewise.
3491 * tracepoint.c (enum gdb_agent_op): Use ax.def.
3492 (gdb_agent_op_names): Likewise.
3494 2011-02-18 Tom Tromey <tromey@redhat.com>
3496 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
3497 gdb_agent_op_rot>: New constants.
3498 (gdb_agent_op_names): Add pick and roll.
3499 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
3502 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3504 * aclocal.m4: Regenerated with aclocal-1.11.1.
3506 2011-02-14 Pedro Alves <pedro@codesourcery.com>
3508 * server.c (handle_qxfer_traceframe_info): New.
3509 (qxfer_packets): Register "traceframe-info".
3510 (handle_query): Report support for qXfer:traceframe-info:read+.
3511 * tracepoint.c (match_blocktype): New.
3512 (traceframe_find_block_type): Rename to ...
3513 (traceframe_walk_blocks): ... this. Add callback filter argument,
3515 (traceframe_find_block_type): New, reimplemented on top of
3516 traceframe_walk_blocks.
3517 (build_traceframe_info_xml): New.
3518 (traceframe_read_info): New.
3519 * server.h (traceframe_read_info): Declare.
3521 2011-02-11 Yao Qi <yao@codesourcery.com>
3523 * configure.ac: Call AC_PROG_RANLIB.
3524 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3525 * configure: Regenerate.
3527 2011-02-07 Pedro Alves <pedro@codesourcery.com>
3529 * server.c (gdb_read_memory): Change return semantics to allow
3531 (handle_search_memory_1): Adjust.
3532 (process_serial_event) <'m' packet>: Handle partial transfers.
3533 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
3535 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3537 * regcache.c (init_register_cache): Initialize
3538 regcache->register_status.
3539 (free_register_cache): Release regcache->register_status.
3540 (regcache_cpy): Copy register_status.
3541 (registers_to_string): Print 'x's for unavailable registers.
3542 (supply_register): Mark the register's status valid or
3543 unavailable, depending on whether a buffer was passed in or not.
3544 (supply_register_zeroed): New.
3545 (supply_regblock): Mark the registers' status valid or
3546 unavailable, depending on whether a buffer was passed in or not.
3547 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
3548 (struct regcache): New `register_status' field.
3549 (supply_register_zeroed): Declare.
3550 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
3551 supply_register_zeroed, rather than passing a NULL buffer to
3553 * tracepoint.c (fetch_traceframe_registers): Update comment.
3555 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3557 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
3560 2011-01-25 Pedro Alves <pedro@codesourcery.com>
3562 * server.h (decode_xfer_write): Change prototype.
3563 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
3564 and don't extract the annex here.
3565 * server.c (decode_xfer_read): Remove `annex' parameter,
3566 and don't extract the annex here.
3568 (struct qxfer): New.
3569 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
3570 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
3571 (handle_qxfer_statictrace): New functions, abstracted out from
3572 handle_query, and made to use the struct qxfer interface.
3573 (handle_threads_qxfer_proper): Rename to ...
3574 (handle_qxfer_threads_proper): ... this.
3575 (handle_threads_qxfer): Rename to ...
3576 (handle_qxfer_threads): ... this. Adjust.
3577 (qxfer_packets): New array.
3578 (handle_qxfer): New function.
3579 (handle_query): Use handle_qxfer.
3581 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
3583 * gdbreplay.c: Shorten lines of >= 80 columns.
3584 * linux-low.c: Ditto.
3585 * linux-ppc-low.c: Ditto.
3586 * linux-s390-low.c: Ditto.
3587 * linux-sparc-low.c: Ditto.
3588 * linux-x86-low.c: Ditto.
3589 * linux-xtensa-low.c: Ditto.
3590 * mem-break.c: Ditto.
3592 * regcache.h: Ditto.
3593 * remote-utils.c: Ditto.
3596 * thread-db.c: Ditto.
3597 * tracepoint.c: Ditto.
3599 * win32-low.h: Ditto.
3601 2011-01-05 Joel Brobecker <brobecker@adacore.com>
3603 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
3606 2011-01-01 Joel Brobecker <brobecker@adacore.com>
3608 * server.c (gdbserver_version): Update copyright year in version
3610 * gdbreplay.c (gdbreplay_version): Ditto.
3612 2010-12-29 Jie Zhang <jie.zhang@analog.com>
3614 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
3615 * linux-bfin-low.c: New file.
3616 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
3617 PT_DATA_ADDR for BFIN targets.
3618 * Makefile.in (SFILES): Add linux-bfin-low.c.
3619 (clean): Remove reg-bfin.c.
3620 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
3621 * README: Mention supported Blackfin targets.
3623 2010-12-23 Mike Frysinger <vapier@gentoo.org>
3625 * .gitignore: New file.
3627 2010-11-16 Mike Frysinger <vapier@gentoo.org>
3629 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
3631 2010-10-22 Jie Zhang <jie@codesourcery.com>
3633 * Makefile.in: Add FLAGS_TO_PASS variable.
3634 (install): Remove dependency of install-only and recursively
3635 invoke make for install-only.
3637 2010-10-04 Doug Evans <dje@google.com>
3639 * Makefile.in (uninstall): Use $(DESTDIR).
3641 2010-09-24 Pedro Alves <pedro@codesourcery.com>
3645 * linux-x86-low.c (compat_siginfo_from_siginfo)
3646 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
3647 si_code is < 0. Check for si_code == SI_TIMER before checking for
3650 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3652 * lynx-i386-low.c: New file.
3653 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
3655 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3657 * lynx-low.c (ptrace_request_to_str): Remove handling for
3658 request values that have been removed in LynxOS 5.x.
3660 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3662 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
3665 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
3667 * configure.ac: Add --enable-inprocess-agent option.
3668 * configure: Rebuilt.
3670 2010-09-06 Yao Qi <yao@codesourcery.com>
3672 * linux-low.c (linux_kill): Remove unused variable.
3673 (linux_stabilize_threads): Likewise.
3674 * server.c (start_inferior): Likewise.
3675 (queue_stop_reply_callback): Likewise.
3676 * tracepoint.c (do_action_at_tracepoint): Likewise.
3678 2010-09-06 Yao Qi <yao@codesourcery.com>
3680 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
3683 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3685 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
3687 2010-09-06 Pedro Alves <pedro@codesourcery.com>
3689 * Makefile.in (install-only): Replace $IPA_DEPFILES with
3692 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3694 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
3695 gdbserver/lynx-ppc-low.c: New files.
3696 * Makefile.in (lynx_low_h): New variable.
3697 (lynx-low.o, lynx-ppc-low.o): New rules.
3698 * configure.ac: On LynxOS, link with -lnetinet.
3699 * configure.srv: Add handling of powerpc-*-lynxos* targets.
3700 * configure: regenerate.
3702 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3704 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
3705 * configure.ac: Add check for vasprintf and vsnprintf.
3706 * configure, config.in: Regenerate.
3707 * server.h (vasprintf, vsnprintf): Add conditional declarations.
3709 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3711 * gdbreplay.c: Move include of alloca.h up, next to include of
3713 * server.h: Add include of malloc.h.
3714 * mem-break.c: Remove include of malloc.h.
3715 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
3717 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3719 * Makefile.in (memmem.o): Build with -Wno-error.
3721 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3723 * utils.c (xsnprintf): Make non-static.
3724 * server.h: Add xsnprintf declaration.
3725 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
3726 replace calls to snprintf by calls to xsnprintf throughout.
3728 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3730 * configure.ac: Add configure check for alloca.
3731 * configure, config.in: Regenerate.
3732 * server.h: Include alloca.h if it exists.
3733 * gdbreplay.c: Include alloca.h if it exists.
3735 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3737 * linux-low.c (__SIGRTMIN): Define if not already defined.
3738 (linux_create_inferior): Check for __ANDROID__ rather than
3740 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
3741 are already deferred.
3742 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
3743 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
3744 stopped and already has a pending signal to report.
3745 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
3746 a pending signal to report or is moving out of a jump pad.
3747 (linux_init_signals): Check for __ANDROID__ rather than
3750 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3752 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
3753 debug_threads check. Avoid a linear search when not doing debug
3756 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3758 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
3759 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
3760 (struct file_handler) <fd>: Change type to gdb_fildes_t.
3761 (process_event): Change local fd's type to gdb_fildes_t.
3762 (create_file_handler): Adjust prototype.
3763 (delete_file_handler): Adjust prototype.
3764 (handle_file_event): Adjust prototype. Use pfildes.
3765 (create_file_event): Adjsut prototype.
3766 * remote-utils.c (remote_desc, listen_desc): Change type to
3768 * server.h: New gdb_fildes_t typedef.
3769 [USE_WIN32API]: Include winsock2.h.
3770 (delete_file_handler, add_file_handler): Adjust prototypes.
3772 * utils.c (pfildes): New.
3774 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3776 * configure.ac (build_warnings): Add -Wno-char-subscripts.
3777 * configure: Regenerate.
3779 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3781 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
3782 (linux_done_accessing_memory): ... this.
3783 (linux_target_ops): Adjust.
3784 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
3785 * nto-low.c (nto_target_ops): Adjust comment.
3786 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
3787 * spu-low.c (spu_target_ops): Adjust comment.
3788 * target.h (target_ops): Rename unprepare_to_access_memory field
3789 to done_accessing_memory.
3790 (unprepare_to_access_memory): Rename to ...
3791 (done_accessing_memory): ... this.
3793 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3795 * linux-low.c (linux_prepare_to_access_memory): New.
3796 (linux_unprepare_to_access_memory): New.
3797 (linux_target_ops): Install them.
3798 * server.c (read_memory): Rename to ...
3799 (gdb_read_memory): ... this. Use
3800 prepare_to_access_memory/prepare_to_access_memory.
3801 (write_memory): Rename to ...
3802 (gdb_write_memory): ... this. Use
3803 prepare_to_access_memory/prepare_to_access_memory.
3804 (handle_search_memory_1): Adjust.
3805 (process_serial_event): Adjust.
3806 * target.h (struct target_ops): New fields
3807 prepare_to_access_memory and unprepare_to_access_memory.
3808 (prepare_to_access_memory, unprepare_to_access_memory): New.
3809 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
3810 prepare_to_access_memory/prepare_to_access_memory.
3811 * nto-low.c (nto_target_ops): Adjust.
3812 * spu-low.c (spu_target_ops): Adjust.
3813 * win32-low.c (win32_target_ops): Adjust.
3815 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3817 * Makefile.in (WARN_CFLAGS): Get it from configure.
3818 (WERROR_CFLAGS): New.
3819 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
3820 * configure.ac: Introduce --enable-werror, which adds -Werror to
3821 the compiler command line. Enabled by default. Disable with
3822 --disable-werror. Add -Wdeclaration-after-statement
3823 Wpointer-arith and -Wformat-nonliteral to warning flags.
3824 * configure: Regenerate.
3826 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3828 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
3830 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3832 * gdbreplay.c (remote_error): New.
3834 (expect): Use gdbchar. Check for error reading from GDB.
3835 Clarify sync error output.
3836 (play): Check for errors writing to GDB.
3837 * linux-low.c (sigchld_handler): Really ignore `write' errors.
3838 * remote-utils.c (getpkt): Check for errors writing to the remote
3841 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3843 * linux-low.c (linux_wait_1): Move non-debugging code out of
3844 `debug_threads' control.
3846 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3848 * linux-low.c (linux_wait_1): Don't set last_status here.
3849 * server.c (push_event, queue_stop_reply_callback): Assert we're
3850 not pushing a TARGET_WAITKIND_IGNORE event.
3851 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
3852 (myresume, handle_target_event): Set the thread's last_resume_kind
3853 and last_status from the target returned status.
3855 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3859 * linux-x86-low.c (update_debug_registers_callback): New.
3860 (i386_dr_low_set_addr): Use it.
3861 (i386_dr_low_get_addr): New.
3862 (i386_dr_low_set_control): Use update_debug_registers_callback.
3863 (i386_dr_low_get_control): New.
3864 (i386_dr_low_get_status): Adjust.
3865 * linux-low.c (linux_stop_lwp): New.
3866 * linux-low.h (linux_stop_lwp): Declare.
3868 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
3869 argument instead of a i386_debug_reg_state.
3870 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
3871 a i386_debug_reg_state.
3872 (i386_insert_aligned_watchpoint): Adjust.
3873 (i386_remove_aligned_watchpoint): Adjust.
3874 (i386_low_stopped_data_address): Read the debug registers from the
3875 inferior instead of from the mirrors.
3876 * i386-low.h (struct i386_debug_reg_state): Extend comment.
3877 (i386_dr_low_get_addr): Declare.
3878 (i386_dr_low_get_control): Declare.
3879 (i386_dr_low_get_status): Change prototype.
3881 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
3882 (i386_dr_low_get_addr): New.
3883 (i386_dr_low_get_control): New.
3884 (i386_dr_low_get_status): Adjust prototype. Return
3886 (i386_initial_stuff): Clear dr_status_mirror and
3888 (i386_get_thread_context): Adjust.
3889 (i386_set_thread_context): Adjust.
3890 (i386_thread_added): Adjust.
3892 2010-08-24 Pedro Alves <pedro@codesourcery.com>
3894 * linux-low.h (linux_thread_area): Delete declaration.
3896 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
3898 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
3899 after its termination.
3901 2010-08-09 Pedro Alves <pedro@codesourcery.com>
3903 * linux-low.c (gdb_wants_lwp_stopped): Delete.
3904 (gdb_wants_all_stopped): Delete.
3905 (linux_wait_1): Don't call them.
3906 * server.c (handle_v_cont): Tag all threads as want-stopped.
3907 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
3908 stopped as "client-wants-stopped".
3910 2010-07-31 Pedro Alves <pedro@codesourcery.com>
3912 * Makefile.in (signals_h): New.
3913 (server_h): Depend on it.
3914 (server.o): Don't depend on $(signals_def).
3915 (signals.o): Depend on $(signals_def).
3917 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
3919 * Makefile.in (signals_def): New.
3920 (server_h): Append include/gdb/signals.h and signals_def.
3921 (server.o): Append signals_def.
3923 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3925 * server.c (handle_target_event): Use target_signal_to_host for
3926 resume_info.sig initialization.
3927 * target.h (struct thread_resume) <sig>: New comment.
3929 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
3931 * server.c (handle_query): strcpy() the returned string from paddress()
3932 instead of sprintf().
3933 * utils.c (paddress): Return phex_nz().
3935 2010-07-07 Joel Brobecker <brobecker@adacore.com>
3937 * server.c (handle_v_cont): Call mourn_inferior if process
3939 (myresume): Likewise.
3941 2010-07-01 Pedro Alves <pedro@codesourcery.com>
3943 Static tracepoints, and integration with UST.
3945 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
3946 * mem-break.c (uninsert_all_breakpoints)
3947 (reinsert_all_breakpoints): New.
3948 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
3949 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
3950 (gdb_agent_ust_loaded, helper_thread_id)
3951 (gdb_agent_helper_thread_id): New macros.
3952 (struct ipa_sym_addresses): Add addr_ust_loaded,
3953 addr_helper_thread_id, addr_cmd_buf.
3954 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
3955 (in_process_agent_loaded_ust): New.
3956 (write_e_ust_not_loaded): New.
3957 (maybe_write_ipa_ust_not_loaded): New.
3958 (struct collect_static_trace_data_action): New.
3959 (enum tracepoint_type) <static_tracepoint>: New.
3960 (struct tracepoint) <handle>: Mention static tracepoints.
3961 (struct static_tracepoint_ctx): New.
3962 (CMD_BUF_SIZE): New.
3963 (add_tracepoint_action): Handle static tracepoint actions.
3964 (unprobe_marker_at): New.
3965 (clear_installed_tracepoints): Handle static tracepoints.
3966 (cmd_qtdp): Handle static tracepoints.
3967 (probe_marker_at): New.
3968 (cmd_qtstart): Handle static tracepoints.
3969 (response_tracepoint): Handle static tracepoints.
3970 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
3971 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
3972 (get_context_regcache): Handle static tracepoints.
3973 (do_action_at_tracepoint): Handle static tracepoint actions.
3974 (traceframe_find_block_type): Handle static trace data blocks.
3975 (traceframe_read_sdata): New.
3976 (download_tracepoints): Download static tracepoint actions.
3977 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
3978 (GDB_PROBE_NAME): New.
3983 (ust_marker_to_static_tracepoint): New.
3985 (collect_ust_data_at_tracepoint): New.
3986 (gdb_ust_probe): New.
3987 (UNIX_PATH_MAX, SOCK_DIR): New.
3988 (gdb_ust_connect_sync_socket): New.
3989 (resume_thread, stop_thread): New.
3990 (run_inferior_command): New.
3991 (init_named_socket): New.
3992 (gdb_ust_socket_init): New.
3993 (cstr_to_hexstr): New.
3995 (first_marker, next_marker): New.
3996 (response_ust_marker): New.
3997 (cmd_qtfstm, cmd_qtsstm): New.
3998 (unprobe_marker_at, probe_marker_at): New.
3999 (cmd_qtstmat, gdb_ust_thread): New.
4000 (gdb_ust_init): New.
4001 (initialize_tracepoint_ftlib): Call gdb_ust_init.
4002 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
4004 (x86_64_st_collect_regmap): New.
4005 (X86_64_NUM_ST_COLLECT_GREGS): New.
4006 (AMD64_RIP_REGNUM): New.
4007 (supply_static_tracepoint_registers): New.
4008 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
4010 (i386_st_collect_regmap): New.
4011 (i386_NUM_ST_COLLECT_GREGS): New.
4012 (supply_static_tracepoint_registers): New.
4013 * server.c (handle_query): Handle qXfer:statictrace:read.
4014 <qSupported>: Report support for StaticTracepoints, and
4015 qXfer:statictrace:read features.
4016 * server.h (traceframe_read_sdata)
4017 (supply_static_tracepoint_registers): Declare.
4018 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
4019 (unpack_varlen_hex): Include in IPA build.
4020 * Makefile.in (ustlibs, ustinc): New.
4021 (IPA_OBJS): Add remote-utils-ipa.o.
4022 ($(IPA_LIB)): Link -ldl and -lpthread.
4024 (IPAGENT_CFLAGS): Add UST_CFLAGS.
4025 * config.in, configure: Regenerate.
4027 2010-06-20 Ian Lance Taylor <iant@google.com>
4028 Pedro Alves <pedro@codesourcery.com>
4030 * linux-x86-low.c (always_true): Delete.
4031 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
4032 trying to fool the compiler with always_true.
4034 2010-06-20 Pedro Alves <pedro@codesourcery.com>
4036 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
4037 conditions in gdbserver.
4039 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
4041 * spu-low.c (spu_read_memory): Wrap around local store limit.
4042 (spu_write_memory): Likewise.
4044 2010-06-15 Pedro Alves <pedro@codesourcery.com>
4046 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
4047 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
4049 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
4051 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
4052 uses with LONGEST uses.
4054 2010-06-14 Stan Shebs <stan@codesourcery.com>
4055 Pedro Alves <pedro@codesourcery.com>
4059 * linux-x86-low.c: Include limits.h.
4064 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
4065 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
4066 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
4067 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
4068 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
4069 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
4070 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
4071 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
4072 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
4073 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
4074 (amd64_emit_void_call_2): New.
4075 (amd64_emit_ops): New.
4076 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
4077 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
4078 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
4079 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
4080 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
4081 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
4082 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
4083 (i386_emit_call, i386_emit_reg, i386_emit_pop)
4084 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
4085 (i386_emit_stack_adjust, i386_emit_int_call_1)
4086 (i386_emit_void_call_2): New.
4087 (i386_emit_ops): New.
4088 (x86_emit_ops): New.
4089 (the_low_target): Install x86_emit_ops.
4090 * server.h (struct emit_ops): New.
4091 (get_raw_reg_func_addr): Declare.
4092 (current_insn_ptr, emit_error): Declare.
4093 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
4094 (set_trace_state_variable_value): New defines.
4095 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
4096 addr_get_trace_state_variable_value and
4097 addr_set_trace_state_variable_value.
4098 (symbol_list): New fields for get_raw_reg,
4099 get_trace_state_variable_value and set_trace_state_variable_value.
4100 (condfn): New typedef.
4101 (struct tracepoint): New field `compiled_cond'.
4102 (do_action_at_tracepoint): Clear compiled_cond.
4103 (get_trace_state_variable_value, set_trace_state_variable_value):
4105 (condition_true_at_tracepoint): If there's a compiled condition,
4107 (current_insn_ptr, emit_error): New globals.
4108 (struct bytecode_address): New.
4109 (get_raw_reg_func_addr): New.
4110 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
4111 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
4112 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
4113 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
4114 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
4115 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
4116 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
4117 (compile_tracepoint_condition, compile_bytecodes): New.
4118 * target.h (emit_ops): Forward declare.
4119 (struct target_ops): New field emit_ops.
4120 (target_emit_ops): New.
4121 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
4122 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
4123 * linux-low.c (linux_emit_ops): New.
4124 (linux_target_ops): Install it.
4125 * linux-low.h (struct linux_target_ops): New field emit_ops.
4127 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
4129 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
4130 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
4132 2010-06-01 Pedro Alves <pedro@codesourcery.com>
4133 Stan Shebs <stan@codesourcery.com>
4135 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
4136 (all): Depend on $(extra_libraries).
4137 (install-only): Install the IPA.
4138 (IPA_OBJS, IPA_LIB): New.
4139 (clean): Remove the IPA lib.
4140 (IPAGENT_CFLAGS): New.
4141 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
4142 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
4143 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
4144 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
4145 * configure.ac: Check for atomic builtins support in the compiler.
4146 (IPA_DEPFILES, extra_libraries): Define.
4147 * configure.srv (ipa_obj): Add description.
4148 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
4149 (i[34567]86-*-linux*): Set ipa_obj.
4150 (x86_64-*-linux*): Set ipa_obj.
4151 * linux-low.c (stabilizing_threads): New.
4152 (supports_fast_tracepoints): New.
4153 (linux_detach): Stabilize threads before detaching.
4154 (handle_tracepoints): Handle internal tracing breakpoints. Assert
4155 the lwp is either not stabilizing, or is moving out of a jump pad.
4156 (linux_fast_tracepoint_collecting): New.
4157 (maybe_move_out_of_jump_pad): New.
4158 (enqueue_one_deferred_signal): New.
4159 (dequeue_one_deferred_signal): New.
4160 (linux_wait_for_event_1): If moving out of a jump pad, defer
4161 pending signals to later.
4162 (linux_stabilize_threads): New.
4163 (linux_wait_1): Check if threads need moving out of jump pads, and
4165 (stuck_in_jump_pad_callback): New.
4166 (move_out_of_jump_pad_callback): New.
4168 (linux_resume_one_lwp): Handle moving out of jump pads.
4169 (linux_set_resume_request): Dequeue deferred signals.
4170 (need_step_over_p): Also step over fast tracepoint jumps.
4171 (start_step_over): Also uninsert fast tracepoint jumps.
4172 (finish_step_over): Also reinsert fast tracepoint jumps.
4173 (linux_install_fast_tracepoint_jump): New.
4174 (linux_target_ops): Install linux_stabilize_threads and
4175 linux_install_fast_tracepoint_jump_pad.
4176 * linux-low.h (linux_target_ops) <get_thread_area,
4177 install_fast_tracepoint_jump_pad>: New fields.
4178 (struct lwp_info) <collecting_fast_tracepoint,
4179 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
4180 (linux_get_thread_area): Declare.
4181 * linux-x86-low.c (jump_insn): New.
4182 (x86_get_thread_area): New.
4183 (append_insns): New.
4185 (amd64_install_fast_tracepoint_jump_pad): New.
4186 (i386_install_fast_tracepoint_jump_pad): New.
4187 (x86_install_fast_tracepoint_jump_pad): New.
4188 (the_low_target): Install x86_get_thread_area and
4189 x86_install_fast_tracepoint_jump_pad.
4190 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
4191 (struct fast_tracepoint_jump): New.
4192 (fast_tracepoint_jump_insn): New.
4193 (fast_tracepoint_jump_shadow): New.
4194 (find_fast_tracepoint_jump_at): New.
4195 (fast_tracepoint_jump_here): New.
4196 (delete_fast_tracepoint_jump): New.
4197 (set_fast_tracepoint_jump): New.
4198 (uninsert_fast_tracepoint_jumps_at): New.
4199 (reinsert_fast_tracepoint_jumps_at): New.
4200 (set_breakpoint_at): Use write_inferior_memory.
4201 (uninsert_raw_breakpoint): Use write_inferior_memory.
4202 (check_mem_read): Mask out fast tracepoint jumps.
4203 (check_mem_write): Mask out fast tracepoint jumps.
4204 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
4205 (set_fast_tracepoint_jump): Declare.
4206 (delete_fast_tracepoint_jump)
4207 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
4208 (reinsert_fast_tracepoint_jumps_at): Declare.
4209 * regcache.c: Don't compile many functions when building the
4210 in-process agent library.
4211 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
4212 the register buffer in the heap.
4213 (free_register_cache): If the register buffer isn't owned by the
4214 regcache, don't free it.
4215 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
4216 pre-existing register caches.
4217 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
4219 (convert_ascii_to_int): : Constify `from' parameter type.
4220 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
4221 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
4222 the needed buffer in-place.
4223 (relocate_instruction): New.
4224 * server.c (handle_query) <qSymbols>: If the target supports
4225 tracepoints, give it a chance of looking up symbols. Report
4226 support for fast tracepoints.
4227 (handle_status): Stabilize threads.
4228 (process_serial_event): Adjust.
4229 * server.h (struct fast_tracepoint_jump): Forward declare.
4230 (struct process_info) <fast_tracepoint_jumps>: New field.
4231 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
4232 (decode_X_packet, decode_M_packet): Adjust.
4233 (relocate_instruction): Declare.
4234 (in_process_agent_loaded): Declare.
4235 (tracepoint_look_up_symbols): Declare.
4236 (struct fast_tpoint_collect_status): Declare.
4237 (fast_tracepoint_collecting): Declare.
4238 (force_unlock_trace_buffer): Declare.
4239 (handle_tracepoint_bkpts): Declare.
4240 (initialize_low_tracepoint)
4241 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
4242 * target.h (struct target_ops) <stabilize_threads,
4243 install_fast_tracepoint_jump_pad>: New fields.
4244 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
4245 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
4246 [HAVE_STDINT_H]: Include stdint.h.
4247 (trace_debug_1): Rename to ...
4248 (trace_vdebug): ... this.
4249 (trace_debug): Rename to ...
4250 (trace_debug_1): ... this. Add `level' parameter.
4252 (ATTR_USED, ATTR_NOINLINE): New.
4253 (IP_AGENT_EXPORT): New.
4254 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4255 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
4256 (about_to_request_buffer_space, trace_buffer_is_full)
4257 (stopping_tracepoint, expr_eval_result, error_tracepoint)
4258 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
4259 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
4260 (traceframe_write_count, traceframes_created)
4261 (trace_state_variables)
4262 New renaming defines.
4263 (struct ipa_sym_addresses): New.
4264 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
4266 (ipa_sym_addrs): New.
4267 (all_tracepoint_symbols_looked_up): New.
4268 (in_process_agent_loaded): New.
4269 (write_e_ipa_not_loaded): New.
4270 (maybe_write_ipa_not_loaded): New.
4271 (tracepoint_look_up_symbols): New.
4272 (debug_threads) [IN_PROCESS_AGENT]: New.
4273 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
4274 (UNKNOWN_SIDE_EFFECTS): New.
4275 (stop_tracing): New.
4276 (flush_trace_buffer): New.
4277 (stop_tracing_bkpt): New.
4278 (flush_trace_buffer_bkpt): New.
4279 (read_inferior_integer): New.
4280 (read_inferior_uinteger): New.
4281 (read_inferior_data_pointer): New.
4282 (write_inferior_data_pointer): New.
4283 (write_inferior_integer): New.
4284 (write_inferior_uinteger): New.
4285 (struct collect_static_trace_data_action): Delete.
4286 (enum tracepoint_type): New.
4287 (struct tracepoint) <type>: New field `type'.
4288 <actions_str, step_actions, step_actions_str>: Only include in
4290 <orig_size, obj_addr_on_target, adjusted_insn_addr>
4291 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
4292 (tracepoints): Use IP_AGENT_EXPORT.
4293 (last_tracepoint): Don't include in the IPA.
4294 (stopping_tracepoint): Use IP_AGENT_EXPORT.
4295 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
4296 (alloced_trace_state_variables): New.
4297 (trace_state_variables): Use IP_AGENT_EXPORT.
4298 (traceframe_t): Delete unused variable.
4299 (circular_trace_buffer): Don't include in the IPA.
4300 (trace_buffer_start): Delete.
4301 (struct trace_buffer_control): New.
4302 (trace_buffer_free): Delete.
4303 (struct ipa_trace_buffer_control): New.
4304 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
4305 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
4307 (trace_buffer_ctrl): New.
4308 (TRACE_BUFFER_CTRL_CURR): New.
4309 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
4310 Reimplement as macros.
4311 (trace_buffer_wrap): Delete.
4312 (traceframe_write_count, traceframe_read_count)
4313 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
4314 (struct tracepoint_hit_ctx) <type>: New field.
4315 (struct fast_tracepoint_ctx): New.
4316 (memory_barrier): New.
4318 (record_tracepoint_error): Update atomically in the IPA.
4319 (clear_inferior_trace_buffer): New.
4320 (about_to_request_buffer_space): New.
4321 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
4322 updating the same buffer.
4323 (add_tracepoint): Default the tracepoint's type to trap
4324 tracepoint, and orig_size to -1.
4325 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
4327 (create_trace_state_variable): New parameter `gdb'. Handle it.
4328 (clear_installed_tracepoints): Clear fast tracepoint jumps.
4329 (cmd_qtdp): Handle fast tracepoints.
4331 (max_jump_pad_size): New.
4332 (gdb_jump_pad_head): New.
4333 (get_jump_space_head): New.
4334 (claim_jump_space): New.
4335 (sort_tracepoints): New.
4336 (MAX_JUMP_SIZE): New.
4337 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
4339 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
4340 support. Upload fast traceframes, and delete internal IPA
4342 (stop_tracing_handler): New.
4343 (flush_trace_buffer_handler): New.
4344 (cmd_qtstop): Upload fast tracepoints.
4345 (response_tracepoint): Handle fast tracepoints.
4346 (tracepoint_finished_step): Upload fast traceframes. Set the
4347 tracepoint hit context's tracepoint type.
4348 (handle_tracepoint_bkpts): New.
4349 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
4350 type. Add comment about fast tracepoints.
4351 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
4352 non-existing action_str field.
4353 (get_context_regcache): Handle fast tracepoints.
4354 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
4356 (fast_tracepoint_from_jump_pad_address): New.
4357 (fast_tracepoint_from_ipa_tpoint_address): New.
4358 (collecting_t): New.
4359 (force_unlock_trace_buffer): New.
4360 (fast_tracepoint_collecting): New.
4363 (write_inferior_data_ptr): New.
4364 (target_tp_heap): New.
4365 (target_malloc): New.
4366 (download_agent_expr): New.
4368 (download_tracepoints): New.
4369 (download_trace_state_variables): New.
4370 (upload_fast_traceframes): New.
4371 (IPA_FIRST_TRACEFRAME): New.
4372 (IPA_NEXT_TRACEFRAME_1): New.
4373 (IPA_NEXT_TRACEFRAME): New.
4374 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
4375 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
4376 (gdb_jump_pad_buffer_end): New.
4377 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
4378 (initialize_tracepoint): Adjust.
4379 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
4380 buffer. Initialize the low module.
4381 * utils.c (PREFIX, TOOLNAME): New.
4382 (malloc_failure): Use PREFIX.
4383 (error): In the IPA, an error causes an exit.
4384 (fatal, warning): Use PREFIX.
4385 (internal_error): Use TOOLNAME.
4386 (NUMCELLS): Increase to 10.
4387 * configure, config.in: Regenerate.
4389 2010-06-01 Pedro Alves <pedro@codesourcery.com>
4391 * server.c (handle_query) <qSupported>: Do two passes over the
4392 qSupported string to avoid nesting strtok.
4394 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4396 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
4398 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
4400 * configure: Regenerate.
4401 * proc-service.list: New.
4403 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4405 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
4408 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
4410 * gdbreplay.c (remote_open): Check error return from socket() call by
4411 its equality to -1 not by it being negative.
4412 * remote-utils.c (remote_open): Likewise.
4414 2010-05-23 Pedro Alves <pedro@codesourcery.com>
4416 * config.h: Regenerate.
4418 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
4420 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
4421 doesn't provide PTRACE_GET_THREAD_AREA.
4423 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
4425 * linux-m68k-low.c: Include <asm/ptrace.h>
4426 (ps_get_thread_area): Implement.
4428 2010-05-03 Doug Evans <dje@google.com>
4430 * event-loop.c (struct callback_event): New struct.
4431 (callback_list): New global.
4432 (append_callback_event, delete_callback_event): New functions.
4433 (process_callback): New function.
4434 (start_event_loop): Call it.
4435 * remote-utils.c (NOT_SCHEDULED): Define.
4436 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
4437 moved out of readchar.
4438 (readchar): Rewrite. Call reschedule before returning.
4439 (reset_readchar): New function.
4440 (remote_close): Call it.
4441 (process_remaining, reschedule): New functions.
4442 * server.h (callback_handler_func): New typedef.
4443 (append_callback_event, delete_callback_event): Declare.
4445 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4447 * proc-service.c (ps_pglobal_lookup): Use
4448 thread_db_look_up_one_symbol.
4449 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
4450 parameter. Use it instead of all_symbols_looked_up.
4451 * server.h (struct process_info) <all_symbols_looked_up>: Delete
4453 (all_symbols_looked_up): Don't declare.
4454 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
4455 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
4457 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
4458 Set all_symbols_looked_up here.
4459 (thread_db_look_up_one_symbol): New.
4460 (thread_db_get_tls_address): Adjust.
4461 (thread_db_load_search, try_thread_db_load_1): Always allocate the
4462 thread_db object on the heap, and tentatively set it in the
4464 (thread_db_init): Don't set all_symbols_looked_up here.
4465 * linux-low.h (thread_db_look_up_one_symbol): Declare.
4467 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4469 * linux-low.c (linux_kill, linux_detach): Adjust.
4470 (status_pending_p_callback): Remove redundant statement. Check
4471 for !TARGET_WAITIKIND_IGNORE, instead of
4472 TARGET_WAITKIND_STOPPED.
4473 (handle_tracepoints): Make sure LWP is locked. Adjust.
4474 (linux_wait_for_event_1): Adjust.
4475 (linux_cancel_breakpoints): New.
4476 (unsuspend_one_lwp): New.
4477 (unsuspend_all_lwps): New.
4478 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
4479 (send_sigstop_callback): Change return type to int, add new
4480 `except' parameter and handle it.
4481 (suspend_and_send_sigstop_callback): New.
4482 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
4483 pass them down. If SUSPEND, also increment the lwp's suspend
4485 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
4486 (need_step_over_p): Don't consider suspended LWPs.
4487 (start_step_over): Adjust.
4488 (proceed_one_lwp): Change return type to int, add new `except'
4489 parameter and handle it.
4490 (unsuspend_and_proceed_one_lwp): New.
4491 (proceed_all_lwps): Use find_inferior instead of
4493 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
4494 also decrement the suspend count of LWPs. Pass `except' down,
4495 instead of hacking its suspend count.
4496 (linux_pause_all): Add `freeze' parameter. Adjust.
4497 (linux_unpause_all): New.
4498 (linux_target_ops): Install linux_unpause_all.
4499 * server.c (handle_status): Adjust.
4500 * target.h (struct target_ops): New fields `unpause_all' and
4501 `cancel_breakpoints'. Add new parameter to `pause_all'.
4502 (pause_all): Add new `freeze' parameter.
4504 (cancel_breakpoints): New.
4505 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
4507 (cmd_qtstart): Pause threads.
4508 (stop_tracing): Pause threads, and cancel breakpoints.
4509 * win32-low.c (win32_target_ops): Adjust.
4511 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4513 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
4514 the inferior right away from here...
4515 (linux_wait_1): ... to here, and adjust to check the thread's
4516 last_resume_kind instead of the lwp's step or stop_expected flags.
4518 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4520 * README: Use consistent `GDB' and `GDBserver' spellings.
4522 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4524 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
4525 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
4526 (linux_detach_one_lwp): Assume the lwp is stopped.
4527 (any_thread_of): Delete.
4528 (linux_detach): Stop all lwps here. Don't blindly delete all
4530 (delete_lwp_callback): New.
4531 (linux_mourn): Delete all lwps of the process that is gone.
4532 (linux_wait_1): Don't delete the last lwp of the process here.
4533 * mem-break.h (mark_breakpoints_out): Declare.
4534 * mem-break.c (mark_breakpoints_out): New.
4535 (free_all_breakpoints): Use it.
4536 * server.c (handle_target_event): If the process is gone, mark
4538 * thread-db.c (struct thread_db) <create_bp>: New field.
4539 (thread_db_enable_reporting): Fix prototype. Store a thread event
4540 breakpoint reference in the thread_db struct.
4541 (thread_db_load_search): Clear the thread_db object.
4542 (try_thread_db_load_1): Ditto.
4543 (switch_to_process): New.
4544 (disable_thread_event_reporting): Use it.
4545 (remove_thread_event_breakpoints): New.
4546 (thread_db_detach, thread_db_mourn): Use it.
4548 2010-05-01 Pedro Alves <pedro@codesourcery.com>
4550 * linux-low.c (linux_enable_event_reporting): New.
4551 (linux_wait_for_event_1, handle_extended_wait): Use it.
4553 2010-04-30 Pedro Alves <pedro@codesourcery.com>
4555 * linux-low.c (linux_kill_one_lwp, linux_kill)
4556 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
4557 (send_sigstop): Take an lwp_info as parameter instead. Queue a
4558 SIGSTOP even if the LWP is stopped.
4559 (send_sigstop_callback): New.
4560 (stop_all_lwps): Use send_sigstop_callback instead.
4561 (linux_resume_one_thread): Adjust.
4562 (proceed_one_lwp): Still proceed an LWP that the client has
4563 requested to stop, if we haven't reported it as stopped yet. Make
4564 sure that LWPs the client want stopped, have a pending SIGSTOP.
4566 2010-04-26 Doug Evans <dje@google.com>
4568 * server.c (handle_general_set): Make static.
4570 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
4571 Print received char after testing for error/eof instead of before.
4572 (input_interrupt): Tweak comment.
4574 2010-04-23 Doug Evans <dje@google.com>
4576 * server.c (start_inferior): Print inferior argv if --debug.
4578 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
4580 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
4581 * nto-x86-low.c: Include server.h
4583 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
4585 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
4586 be consistent with other sources of this directory.
4587 (init_registers_amd64): Correct name of source file of this function
4590 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4592 * configure.srv (x86_64-*-mingw*): New configuration for Windows
4595 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4597 * win32-i386-low.c: Add 64-bit support.
4598 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
4599 (init_registers_amd64): Declare.
4600 (mappings): Add 64-bit version of array.
4601 (init_windows_x86): New function.
4602 (the_low_target): Change init_arch field to init_windows_x86.
4604 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4606 * win32-low.c: Adapt to support also 64-bit architecture.
4607 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
4608 (get_image_name): Use SIZE_T type for local variable `done'.
4609 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
4610 (toolhelp_get_dll_name): Idem.
4611 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
4612 Use uintptr_t typecast to avoid warning.
4613 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
4614 (handle_exception): Use phex_nz to avoid warning.
4615 (win32_wait): Remove unused local variable `process'.
4617 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4619 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
4622 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
4624 * configure.ac: Use `ws2_32' library for srv_mingw.
4625 * configure: Regenerate.
4626 * gdbreplay.c: Include winsock2.h instead of winsock.h.
4627 * remote-utils.c: Likewise.
4629 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
4631 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
4632 if __x86_64__ is defined.
4634 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4636 * configure: Regenerate.
4638 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4640 * server.c (handle_query): Handle 'qGetTIBAddr' query.
4641 * target.h (target_ops): New get_tib_address field.
4642 * win32-low.h (win32_thread_info): Add thread_local_base field.
4643 * win32-low.c (child_add_thread): Add tlb argument.
4644 Set thread_local_base field to TLB.
4645 (get_child_debug_event): Adapt to child_add_thread change.
4646 (win32_get_tib_address): New function.
4647 (win32_target_ops): Set get_tib_address field to
4648 win32_get_tib_address.
4649 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
4651 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4653 * linux-low.c (linux_mourn): Also remove the process.
4654 * server.c (handle_target_event): Don't remove the process here.
4655 * nto-low.c (nto_mourn): New.
4656 (nto_target_ops): Install it.
4657 * spu-low.c (spu_mourn): New.
4658 (spu_target_ops): Install it.
4659 * win32-low.c (win32_mourn): New.
4660 (win32_target_ops): Install it.
4662 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4664 * server.h (buffer_xml_printf): Remove redundant `;'.
4666 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4668 * regcache.c (set_register_cache): Invalidate regcaches before
4669 changing the register cache layout.
4670 (regcache_invalidate_one): Allow a NULL regcache.
4671 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
4672 regcaches before changing the register cache layout or the target
4675 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
4677 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
4678 variable warning on Linux/x86-64.
4680 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4682 GDBserver disconnected tracing support.
4684 * linux-low.c (linux_remove_process): Delete.
4685 (add_lwp): Don't set last_resume_kind here.
4686 (linux_kill): Use `mourn'.
4687 (linux_detach): Use `thread_db_detach', and `mourn'.
4689 (linux_attach_lwp_1): Adjust comment.
4690 (linux_attach): last_resume_kind moved the thread_info; adjust.
4691 (status_pending_p_callback): Adjust.
4692 (linux_wait_for_event_1): Adjust.
4693 (count_events_callback, select_singlestep_lwp_callback)
4694 (select_event_lwp_callback, cancel_breakpoints_callback)
4695 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
4696 (proceed_one_lwp): Adjust.
4697 (linux_async): Add debug output.
4698 (linux_thread_stopped): New.
4699 (linux_pause_all): New.
4700 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
4702 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
4703 (thread_db_free): Delete declaration.
4704 (thread_db_detach, thread_db_mourn): Declare.
4705 * thread-db.c (thread_db_init): Use thread_db_mourn.
4706 (thread_db_free): Delete, split in two.
4707 (disable_thread_event_reporting): New.
4708 (thread_db_detach): New.
4709 (thread_db_mourn): New.
4711 * server.h (struct thread_info) <last_resume_kind>: New field.
4712 <attached>: Add comment.
4713 <gdb_detached>: New field.
4714 (handler_func): Change return type to int.
4715 (handle_serial_event, handle_target_event): Ditto.
4716 (gdb_connected): Declare.
4718 (disconnected_tracing): Declare.
4719 (stop_tracing): Declare.
4721 * server.c (handle_query) <qSupported>: Report support for
4722 disconnected tracing.
4723 (queue_stop_reply_callback): Account for running threads.
4724 (gdb_wants_thread_stopped): New.
4725 (gdb_wants_all_threads_stopped): New.
4726 (gdb_reattached_process): New.
4727 (handle_status): Clear the `gdb_detached' flag of all processes.
4728 In all-stop, stop all threads.
4729 (main): Be sure to leave tfind mode. Handle disconnected tracing.
4730 (process_serial_event): If the remote connection breaks, or if an
4731 exit was forced with "monitor exit", force an event loop exit.
4732 Handle disconnected tracing on detach.
4733 (handle_serial_event): Adjust.
4734 (handle_target_event): If GDB isn't connected, forward events back
4735 to the inferior, unless the last process exited, in which case,
4736 exit gdbserver. Adjust interface.
4738 * remote-utils.c (remote_open): Don't block in accept. Instead
4739 register an event loop source on the listen socket file
4740 descriptor. Refactor bits into ...
4741 (listen_desc): ... this new global.
4742 (gdb_connected): ... this new function.
4743 (enable_async_notification): ... this new function.
4744 (handle_accept_event): ... this new function.
4745 (remote_close): Clear remote_desc.
4747 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
4749 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
4751 (mourn_inferior): Define.
4752 (target_process_qsupported): Avoid the dangling else problem.
4753 (thread_stopped): Define.
4754 (pause_all): Define.
4755 (target_waitstatus_to_string): Declare.
4756 * target.c (target_waitstatus_to_string): New.
4758 * tracepoint.c (tracing): Make extern.
4759 (disconnected_tracing): New.
4760 (stop_tracing): Make extern. Handle tracing stops due to GDB
4762 (cmd_qtdisconnected): New.
4763 (cmd_qtstatus): Report disconnected tracing status in trace reply.
4764 (handle_tracepoint_general_set): Handle QTDisconnected.
4766 * event-loop.c (event_handler_func): Change return type to int.
4767 (process_event): Bail out if the event handler wants the event
4769 (handle_file_event): Ditto.
4770 (start_event_loop): Bail out if the event handler wants the event
4773 * nto-low.c (nto_target_ops): Adjust.
4774 * spu-low.c (spu_wait): Don't remove the process here.
4775 (spu_target_ops): Adjust.
4776 * win32-low.c (win32_wait): Don't remove the process here.
4777 (win32_target_ops): Adjust.
4779 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4781 * regcache.c (realloc_register_cache): Invalidate inferior's
4782 regcache before recreating it.
4784 2010-04-09 Pedro Alves <pedro@codesourcery.com>
4786 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
4788 2010-04-09 Stan Shebs <stan@codesourcery.com>
4789 Pedro Alves <pedro@codesourcery.com>
4791 * server.h (LONGEST): New.
4792 (struct thread_info) <while_stepping>: New field.
4793 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
4795 (initialize_tracepoint, handle_tracepoint_general_set)
4796 (handle_tracepoint_query, tracepoint_finished_step)
4797 (tracepoint_was_hit, release_while_stepping_state_list):
4798 (current_traceframe): Declare.
4799 * server.c (handle_general_set): Handle tracepoint packets.
4801 (write_memory): New.
4802 (handle_search_memory_1): Use read_memory.
4803 (handle_query): Report support for conditional tracepoints, trace
4804 state variables, and tracepoint sources. Handle tracepoint
4806 (main): Initialize the tracepoints module.
4807 (process_serial_event): Handle traceframe reads/writes.
4809 * linux-low.c (handle_tracepoints): New.
4810 (linux_wait_1): Call it.
4811 (linux_resume_one_lwp): Handle while-stepping.
4812 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
4813 (linux_target_ops): Install them.
4814 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
4816 * linux-x86-low.c (x86_supports_tracepoints): New.
4817 (the_low_target). Install it.
4819 * mem-break.h (delete_breakpoint): Declare.
4820 * mem-break.c (delete_breakpoint): Make external.
4822 * target.h (struct target_ops): Add `supports_tracepoints',
4823 `read_pc', and `write_pc' fields.
4824 (target_supports_tracepoints): Define.
4825 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
4828 * regcache.h (struct regcache) <registers_owned>: New field.
4829 (init_register_cache, regcache_cpy): Declare.
4830 (regcache_read_pc, regcache_write_pc): Declare.
4831 (register_cache_size): Declare.
4832 (supply_regblock): Declare.
4833 * regcache.c (init_register_cache): New.
4834 (new_register_cache): Use it.
4835 (regcache_cpy): New.
4836 (register_cache_size): New.
4837 (supply_regblock): New.
4838 (regcache_read_pc, regcache_write_pc): New.
4840 * tracepoint.c: New.
4842 * Makefile.in (OBS): Add tracepoint.o.
4843 (tracepoint.o): New rule.
4845 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
4847 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
4849 (i386-mmx.c): Likewise.
4850 (i386-mmx-linux.o): Likewise.
4851 (i386-mmx-linux.c): Likewise.
4853 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
4854 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
4855 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
4856 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
4858 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
4859 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
4860 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
4862 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
4864 * Makefile.in (clean): Updated.
4866 (i386-avx.c): Likewise.
4867 (i386-avx-linux.o): Likewise.
4868 (i386-avx-linux.c): Likewise.
4869 (amd64-avx.o): Likewise.
4870 (amd64-avx.c): Likewise.
4871 (amd64-avx-linux.o): Likewise.
4872 (amd64-avx-linux.c): Likewise.
4874 * configure.srv (srv_i386_regobj): Add i386-avx.o.
4875 (srv_i386_linux_regobj): Add i386-avx-linux.o.
4876 (srv_amd64_regobj): Add amd64-avx.o.
4877 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
4878 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
4879 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
4880 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
4881 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
4882 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
4883 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
4885 * i387-fp.c: Include "i386-xstate.h".
4887 (i387_cache_to_xsave): Likewise.
4888 (i387_xsave_to_cache): Likewise.
4889 (x86_xcr0): Likewise.
4891 * i387-fp.h (i387_cache_to_xsave): Likewise.
4892 (i387_xsave_to_cache): Likewise.
4893 (x86_xcr0): Likewise.
4895 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
4896 * linux-crisv32-low.c (target_regsets): Likewise.
4897 * linux-m68k-low.c (target_regsets): Likewise.
4898 * linux-mips-low.c (target_regsets): Likewise.
4899 * linux-ppc-low.c (target_regsets): Likewise.
4900 * linux-s390-low.c (target_regsets): Likewise.
4901 * linux-sh-low.c (target_regsets): Likewise.
4902 * linux-sparc-low.c (target_regsets): Likewise.
4903 * linux-xtensa-low.c (target_regsets): Likewise.
4905 * linux-low.c: Include <sys/uio.h>.
4906 (regsets_fetch_inferior_registers): Support nt_type.
4907 (regsets_store_inferior_registers): Likewise.
4908 (linux_process_qsupported): New.
4909 (linux_target_ops): Add linux_process_qsupported.
4911 * linux-low.h (regset_info): Add nt_type.
4912 (linux_target_ops): Add process_qsupported.
4914 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
4916 (init_registers_i386_avx_linux): New.
4917 (init_registers_amd64_avx_linux): Likewise.
4918 (xmltarget_i386_linux_no_xml): Likewise.
4919 (xmltarget_amd64_linux_no_xml): Likewise.
4920 (PTRACE_GETREGSET): Likewise.
4921 (PTRACE_SETREGSET): Likewise.
4922 (x86_fill_xstateregset): Likewise.
4923 (x86_store_xstateregset): Likewise.
4924 (use_xml): Likewise.
4925 (x86_linux_update_xmltarget): Likewise.
4926 (x86_linux_process_qsupported): Likewise.
4927 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
4928 (x86_arch_setup): Don't call init_registers_amd64_linux nor
4929 init_registers_i386_linux here. Call
4930 x86_linux_update_xmltarget.
4931 (the_low_target): Add x86_linux_process_qsupported.
4933 * server.c (handle_query): Call target_process_qsupported.
4935 * target.h (target_ops): Add process_qsupported.
4936 (target_process_qsupported): New.
4938 2010-04-03 Pedro Alves <pedro@codesourcery.com>
4940 * inferiors.c (add_thread): Set last_status kind to
4941 TARGET_WAITKIND_IGNORE.
4942 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
4943 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
4944 (linux_wait_1): Move `thread' local definition to block that uses
4945 it. Don't NULL initialize `event_child'.
4946 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
4947 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
4948 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
4950 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4952 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
4953 an extended waitstatus, or by a watchpoint.
4954 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
4955 thread was stepping or has been stopped by a watchpoint.
4957 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4959 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
4960 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
4961 of another, then delete the previous, and validate all
4963 (validate_inserted_breakpoint): New.
4964 (delete_disabled_breakpoints): New.
4965 (validate_breakpoints): New.
4966 (check_mem_read): Validate breakpoints before trusting their
4967 shadow. Delete disabled breakpoints.
4968 (check_mem_write): Validate breakpoints before trusting they
4969 should be inserted. Delete disabled breakpoints.
4970 * mem-break.h (validate_breakpoints):
4971 * server.c (handle_query): Validate breakpoints when we see a
4974 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4976 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
4977 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
4978 if we could tell there's a GDB breakpoint at stop_pc.
4979 (need_step_over_p): Don't do a step over if we find a GDB
4980 breakpoint at the resume PC.
4982 * mem-break.c (struct raw_breakpoint): New.
4983 (enum bkpt_type): New type `gdb_breakpoint'.
4984 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
4985 fields. New field `raw'.
4986 (find_raw_breakpoint_at): New.
4987 (set_raw_breakpoint_at): Handle refcounting. Create a raw
4989 (set_breakpoint_at): Adjust.
4990 (delete_raw_breakpoint): New.
4991 (release_breakpoint): New.
4992 (delete_breakpoint): Rename to...
4993 (delete_breakpoint_1): ... this. Add proc parameter. Use
4994 release_breakpoint. Return ENOENT.
4995 (delete_breakpoint): Reimplement.
4996 (find_breakpoint_at): Delete.
4997 (find_gdb_breakpoint_at): New.
4998 (delete_breakpoint_at): Delete.
4999 (set_gdb_breakpoint_at): New.
5000 (delete_gdb_breakpoint_at): New.
5001 (gdb_breakpoint_here): New.
5002 (set_reinsert_breakpoint): Use release_breakpoint.
5003 (uninsert_breakpoint): Rename to ...
5004 (uninsert_raw_breakpoint): ... this.
5005 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
5006 (reinsert_raw_breakpoint): Change parameter type to
5008 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
5010 (check_breakpoints): Adjust. Use release_breakpoint.
5011 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
5012 (breakpoint_inserted_here): Ditto.
5013 (check_mem_read): Adjust to iterate over raw breakpoints instead.
5014 Don't trust the breakpoint's shadow if it is not inserted.
5015 (check_mem_write): Adjust to iterate over raw breakpoints instead.
5016 (delete_all_breakpoints): Adjust.
5017 (free_all_breakpoints): Mark all breakpoints as uninserted, and
5018 use delete_breakpoint_1.
5020 * mem-break.h (breakpoints_supported): Delete declaration.
5021 (set_gdb_breakpoint_at): Declare.
5022 (gdb_breakpoint_here): Declare.
5023 (delete_breakpoint_at): Delete.
5024 (delete_gdb_breakpoint_at): Declare.
5026 * server.h (struct raw_breakpoint): Forward declare.
5027 (struct process_info): New field `raw_breakpoints'.
5029 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
5032 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5034 * linux-low.c (status_pending_p_callback): Fix comment.
5035 (linux_wait_for_event_1): Move most of the internal breakpoint
5036 handling from here...
5037 (linux_wait_1): ... to here.
5038 (count_events_callback): New.
5039 (select_singlestep_lwp_callback): New.
5040 (select_event_lwp_callback): New.
5041 (cancel_breakpoints_callback): New.
5042 (select_event_lwp): New.
5043 (linux_wait_1): Simplify internal breakpoint handling. Give equal
5044 priority to all LWPs that have had events that should be reported
5045 to the client. Cancel breakpoints when about to reporting the
5046 event to the client, not while stopping lwps. No longer cancel
5047 finished single-steps here.
5048 (cancel_finished_single_step): Delete.
5049 (cancel_finished_single_steps): Delete.
5051 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5053 * mem-break.c (enum bkpt_type): New.
5054 (struct breakpoint): New field `type'.
5055 (set_breakpoint_at): Change return type to struct breakpoint
5056 pointer. Set type to `other_breakpoint' by default.
5057 (delete_breakpoint): Rewrite, supporting more than one breakpoint
5058 in the breakpoint list.
5059 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
5060 (reinsert_breakpoint): Rename to ...
5061 (reinsert_raw_breakpoint): ... this.
5062 (reinsert_breakpoints_at): Adjust.
5063 * mem-break.h (struct breakpoint): Declare.
5064 (set_breakpoint_at): Change return type to struct breakpoint
5067 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5069 * server.c (handle_query): Assign, not compare.
5071 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5073 Teach linux gdbserver to step-over-breakpoints.
5075 * linux-low.c (can_hardware_single_step): New.
5076 (supports_breakpoints): New.
5077 (handle_extended_wait): If stopping threads, read the stop pc of
5080 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
5081 low target doesn't support retrieving the PC.
5082 (add_lwp): Set last_resume_kind to resume_continue.
5083 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
5084 (linux_attach): Don't clear stop_expected. Set the lwp's
5085 last_resume_kind to resume_stop.
5086 (linux_detach_one_lwp): Don't check for removed breakpoints.
5087 (check_removed_breakpoint): Delete.
5088 (status_pending_p): Rename to ...
5089 (status_pending_p_callback): ... this. Don't check for removed
5090 breakpoints. Don't consider threads that are stopped from GDB's
5092 (linux_wait_for_lwp): Always read the stop_pc here.
5093 (cancel_breakpoint): New.
5094 (step_over_bkpt): New global.
5095 (linux_wait_for_event_1): Implement stepping over breakpoints.
5096 (gdb_wants_lwp_stopped): New.
5097 (gdb_wants_all_stopped): New.
5098 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
5099 single-step traps here. Store the thread's last reported target
5101 (send_sigstop): Don't clear stop_expected. Always set it,
5103 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
5104 (cancel_finished_single_step): New.
5105 (cancel_finished_single_steps): New.
5106 (wait_for_sigstop): Don't cancel finished single-step traps here.
5107 (linux_resume_one_lwp): Don't check for removed breakpoints.
5108 Don't set `step' on non-hardware step archs.
5109 (linux_set_resume_request): Ignore resume_stop requests if already
5110 stopping or stopped. Set the lwp's last_resume_kind.
5111 (resume_status_pending_p): Don't check for removed breakpoints.
5112 (need_step_over_p): New.
5113 (start_step_over): New.
5114 (finish_step_over): New.
5115 (linux_resume_one_thread): Always queue a sigstop for resume_stop
5116 requests. Clear the thread's last reported target waitstatus.
5117 Don't use the `suspended' flag. Don't consider pending breakpoints.
5118 (linux_resume): Start a step-over if necessary.
5119 (proceed_one_lwp): New.
5120 (proceed_all_lwps): New.
5121 (unstop_all_lwps): New.
5122 * linux-low.h (struct lwp_info): Rewrite comment for the
5123 `suspended' flag. Add the `stop_pc' field. Delete the
5124 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
5125 Add `'last_resume_kind' and `need_step_over' fields.
5126 * inferiors.c (struct thread_info): Delete, moved elsewhere.
5127 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
5128 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
5129 (set_raw_breakpoint_at): New.
5130 (set_breakpoint_at): Rewrite to use it.
5131 (reinsert_breakpoint_handler): Delete.
5132 (set_reinsert_breakpoint): New.
5133 (reinsert_breakpoint_by_bp): Delete.
5134 (delete_reinsert_breakpoints): New.
5135 (uninsert_breakpoint): Rewrite.
5136 (uninsert_breakpoints_at): New.
5137 (reinsert_breakpoint): Rewrite.
5138 (reinsert_breakpoints_at): New.
5139 (check_breakpoints): Rewrite.
5140 (breakpoint_here): New.
5141 (breakpoint_inserted_here): New.
5142 (check_mem_read): Adjust.
5143 * mem-break.h (breakpoints_supported, breakpoint_here)
5144 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
5145 (reinsert_breakpoint_by_bp): Delete declaration.
5146 (delete_reinsert_breakpoints): Declare.
5147 (reinsert_breakpoint): Delete declaration.
5148 (reinsert_breakpoints_at): Declare.
5149 (uninsert_breakpoint): Delete declaration.
5150 (uninsert_breakpoints_at): Declare.
5151 (check_breakpoints): Adjust prototype.
5152 * server.h: Adjust include order.
5153 (struct thread_info): Declare here. Add a `last_status' field.
5155 2010-03-23 Michael Snyder <msnyder@vmware.com>
5157 * server.c (crc32): New function.
5158 (handle_query): Add handling for 'qCRC:' request.
5160 2010-03-23 Pedro Alves <pedro@codesourcery.com>
5162 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
5163 lwp had been stopped by a watchpoint.
5165 2010-03-16 Pedro Alves <pedro@codesourcery.com>
5167 * server.h (internal_error): Declare.
5168 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
5169 * utils.c (internal_error): New function.
5171 2010-03-15 Andreas Schwab <schwab@redhat.com>
5173 * configure.srv: Fix typo setting srv_regobj.
5175 2010-03-15 Pedro Alves <pedro@codesourcery.com>
5177 * linux-low.c (fetch_register): Avoid passing a non string literal
5179 (usr_store_inferior_registers): Ditto.
5181 2010-03-14 Pedro Alves <pedro@codesourcery.com>
5183 * linux-low.c (linux_write_memory): Bail out early if peeking
5186 2010-03-14 Pedro Alves <pedro@codesourcery.com>
5188 * linux-low.h (struct lwp_info): New fields
5189 `stopped_by_watchpoint' and `stopped_data_address'.
5190 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
5191 here, and cache them in the lwp object.
5192 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
5194 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
5196 (linux_stopped_by_watchpoint): Rewrite.
5197 (linux_stopped_data_address): Rewrite.
5199 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
5201 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
5202 switching the current inferior, not before.
5204 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
5206 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
5207 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
5208 i386-linux.c and amd64-linux.c.
5209 (reg-i386.o): Removed.
5210 (reg-i386.c): Likewise.
5211 (reg-i386-linux.o): Likewise.
5212 (reg-i386-linux.c): Likewise.
5213 (reg-x86-64.o): Likewise.
5214 (reg-x86-64.c): Likewise.
5215 (reg-x86-64-linux.o): Likewise.
5216 (reg-x86-64-linux.c): Likewise.
5219 (i386-linux.o): Likewise.
5220 (i386-linux.c): Likewise.
5221 (amd64.o): Likewise.
5222 (amd64.c): Likewise.
5223 (amd64-linux.o): Likewise.
5224 (amd64-linux.c): Likewise.
5226 * configure.srv (srv_i386_regobj): New.
5227 (srv_i386_linux_regobj): Likewise.
5228 (srv_amd64_regobj): Likewise.
5229 (srv_amd64_linux_regobj): Likewise.
5230 (srv_i386_32bit_xmlfiles): Likewise.
5231 (srv_i386_64bit_xmlfiles): Likewise.
5232 (srv_i386_xmlfiles): Likewise.
5233 (srv_amd64_xmlfiles): Likewise.
5234 (srv_i386_linux_xmlfiles): Likewise.
5235 (srv_amd64_linux_xmlfiles): Likewise.
5236 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
5237 srv_xmlfiles to $srv_i386_xmlfiles.
5238 (i[34567]86-*-mingw32ce*): Likewise.
5239 (i[34567]86-*-mingw*): Likewise.
5240 (i[34567]86-*-nto*): Likewise.
5241 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
5242 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
5243 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
5244 (x86_64-*-linux*): Likewise.
5246 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
5247 (init_registers_amd64_linux): New.
5248 (x86_arch_setup): Replace init_registers_x86_64_linux with
5249 init_registers_amd64_linux.
5251 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
5253 * configure.ac: Check for libdl. If it is not available link against
5254 static libthread_db.
5255 * configure: Regenerate.
5257 2010-02-22 Pedro Alves <pedro@codesourcery.com>
5261 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
5262 handing a read watchpoint.
5263 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
5265 2010-02-12 Doug Evans <dje@google.com>
5267 * linux-low.c (linux_supports_tracefork_flag): Document.
5268 (linux_look_up_symbols): Add comment.
5270 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
5272 * regcache.c (supply_register): Clear regcache if buf is NULL.
5274 2010-02-02 Nicolas Roche <roche@sourceware.org>
5275 Joel Brobecker <brobecker@adacore.com>
5277 * inferiors.c (find_inferior): Add function documentation.
5278 (unloaded_dll): Handle the case where the unloaded dll has not
5279 been previously registered in the dll list.
5281 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
5283 * linux-arm-low.c (thumb_breakpoint_len): Delete.
5284 (thumb2_breakpoint): New.
5285 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
5287 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5289 * linux-low.c (get_stop_pc): Check for SIGTRAP.
5290 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
5293 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5295 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
5297 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5299 * linux-s390-low.c (s390_collect_ptrace_register)
5300 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
5302 2010-01-21 Doug Evans <dje@google.com>
5304 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
5305 (PTRACE_ARG4_TYPE): New macro.
5306 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
5307 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
5308 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
5309 (usr_store_inferior_registers): Ditto.
5310 (linux_read_memory, linux_write_memory): Ditto.
5311 (linux_test_for_tracefork): Ditto.
5313 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
5314 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
5316 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5318 * proc-service.c (ps_lgetregs): Don't refetch registers from the
5321 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5323 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
5324 prototype to take a regcache. Adjust.
5326 2010-01-20 Pedro Alves <pedro@codesourcery.com>
5328 * regcache.h (struct thread_info): Forward declare.
5329 (struct regcache): New.
5330 (new_register_cache): Adjust prototype.
5331 (get_thread_regcache): Declare.
5332 (free_register_cache): Adjust prototype.
5333 (registers_to_string, registers_from_string): Ditto.
5334 (supply_register, supply_register_by_name, collect_register)
5335 (collect_register_as_string, collect_register_by_name): Ditto.
5336 * regcache.c (struct inferior_regcache_data): Delete.
5337 (get_regcache): Rename to ...
5338 (get_thread_regcache): ... this. Adjust. Switch inferior before
5340 (regcache_invalidate_one): Adjust.
5341 (regcache_invalidate): Fix prototype.
5342 (new_register_cache): Return the new register cache.
5343 (free_register_cache): Change prototype.
5344 (realloc_register_cache): Adjust.
5345 (registers_to_string): Change prototype to take a regcache. Adjust.
5346 (registers_from_string): Ditto.
5347 (register_data): Ditto.
5348 (supply_register): Ditto.
5349 (supply_register_by_name): Ditto.
5350 (collect_register): Ditto.
5351 (collect_register_as_string): Ditto.
5352 (collect_register_by_name): Ditto.
5353 * server.c (process_serial_event): Adjust.
5354 * linux-low.h (regset_fill_func, regset_store_func): Change
5356 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
5358 * linux-low.c (get_stop_pc): Adjust.
5359 (check_removed_breakpoint): Adjust.
5360 (linux_wait_for_event): Adjust.
5361 (linux_resume_one_lwp): Adjust.
5362 (fetch_register): Add regcache parameter. Adjust.
5363 (usr_store_inferior_registers): Ditto.
5364 (regsets_fetch_inferior_registers): Ditto.
5365 (regsets_store_inferior_registers): Ditto.
5366 (linux_fetch_registers, linux_store_registers): Ditto.
5367 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
5369 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
5371 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
5372 prototype to take a regcache.
5373 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
5374 * remote-utils.c (convert_ascii_to_int, outreg)
5375 (prepare_resume_reply): Change prototype to take a regcache.
5377 * target.h (struct target_ops) <fetch_registers, store_registers>:
5378 Change prototype to take a regcache.
5379 (fetch_inferior_registers, store_inferior_registers): Change
5380 prototype to take a regcache. Adjust.
5381 * proc-service.c (ps_lgetregs): Adjust.
5382 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
5383 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
5384 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
5385 take a regcache. Adjust.
5386 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
5387 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
5388 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
5389 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
5390 * linux-cris-low.c (cris_get_pc, cris_set_pc)
5391 (cris_cannot_fetch_register):
5392 (cris_breakpoint_at): Change prototype to take a regcache.
5394 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
5395 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
5396 to take a regcache. Adjust.
5397 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
5399 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
5400 take a regcache. Adjust.
5401 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
5402 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
5403 (m68k_set_pc): Change prototype to take a regcache. Adjust.
5404 * linux-mips-low.c (mips_get_pc):
5405 (mips_set_pc): Change prototype to take a regcache. Adjust.
5406 (mips_reinsert_addr): Adjust.
5407 (mips_collect_register): Change prototype to take a regcache.
5409 (mips_supply_register):
5410 (mips_collect_register_32bit, mips_supply_register_32bit)
5411 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
5412 (mips_store_fpregset): Ditto.
5413 * linux-ppc-low.c (ppc_supply_ptrace_register)
5414 (ppc_supply_ptrace_register): Ditto.
5415 (parse_spufs_run): Adjust.
5416 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
5417 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
5418 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
5419 take a regcache. Adjust.
5420 * linux-s390-low.c (s390_collect_ptrace_register)
5421 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
5422 (s390_set_pc): Change prototype to take a regcache. Adjust.
5423 (s390_arch_setup): Adjust.
5424 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
5425 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
5426 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5427 (sparc_fill_gregset, sparc_store_gregset_from_stack)
5428 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
5430 (sparc_breakpoint_at): Adjust.
5431 * linux-xtensa-low.c (xtensa_fill_gregset):
5432 (xtensa_store_gregset):
5433 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
5434 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
5435 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
5436 prototype to take a regcache. Adjust.
5437 * win32-arm-low.c (arm_fetch_inferior_register)
5438 (arm_store_inferior_register): Change prototype to take a
5440 * win32-i386-low.c (i386_fetch_inferior_register)
5441 (i386_store_inferior_register): Change prototype to take a
5443 * win32-low.c (child_fetch_inferior_registers)
5444 (child_store_inferior_registers): Change prototype to take a
5446 (win32_wait): Adjust.
5447 (win32_fetch_inferior_registers): Change prototype to take a
5449 (win32_store_inferior_registers): Adjust.
5450 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
5451 store_inferior_register>: Change prototype to take a regcache.
5453 2010-01-20 Doug Evans <dje@google.com>
5455 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
5457 (linux_wait_for_event1, linux_init_signals): Ditto.
5458 (W_STOPCODE): Provide definition if missing.
5460 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
5462 * linux-low.c (linux_core_of_thread): New.
5463 (compare_ints, show_process, list_threads): New.
5464 (linux_qxfer_osdata): Report threads and cores.
5465 (linux_target_op): Register linux_core_of_thread.
5466 * remote-utils.c (prepare_resume_reply): Report the core.
5467 (buffer_xml_printf): Support %d specifier.
5468 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
5470 (handle_query): Handle qXfer:threads. Announce availability
5472 * target.h (struct target_ops): New field core_of_thread.
5474 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
5476 * Makefile.in (clean): Remove new generated files.
5477 (reg-s390.o, reg-s390.c): Remove rules.
5478 (reg-s390x.o, reg-s390x.c): Likewise.
5479 (s390-linux32.o, s390-linux32.c): Add rules.
5480 (s390-linux64.o, s390-linux64.c): Likewise.
5481 (s390x-linux64.o, s390x-linux64.c): Likewise.
5482 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
5483 * linux-s390-low.c: Include <elf.h>.
5484 (HWCAP_S390_HIGH_GPRS): Define if undefined.
5485 (init_registers_s390): Remove prototype.
5486 (init_registers_s390x): Likewise.
5487 (init_registers_s390_linux32): Add prototype.
5488 (init_registers_s390_linux64): Likewise.
5489 (init_registers_s390x_linux64): Likewise.
5490 (s390_num_regs_3264): New define.
5491 (s390_regmap_3264): New global variable.
5492 (s390_cannot_fetch_register): Remove obsolete check.
5493 (s390_cannot_store_register): Likewise.
5494 (s390_collect_ptrace_register): Handle upper/lower register halves.
5495 (s390_supply_ptrace_register): Likewise.
5496 (s390_fill_gregset): Update to register number changes.
5497 (s390_get_hwcap): New routine.
5498 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
5499 Install appropriate regmap and register set.
5501 2010-01-01 Joel Brobecker <brobecker@adacore.com>
5503 * server.c (gdbserver_version): Update copyright year to 2010.
5504 * gdbreplay.c (gdbreplay_version): Likewise.
5506 2009-12-28 Doug Evans <dje@google.com>
5508 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
5509 elf/external.h. Include <elf.h> instead but only if necessary.
5511 2009-12-28 Pedro Alves <pedro@codesourcery.com>
5513 * linux-low.c (linux_remove_process): Remove `detaching'
5514 parameter. Don't release/detach from thread_db here.
5515 (linux_kill): Release/detach from thread_db here, ...
5516 (linux_detach): ... and here, before actually detaching.
5517 (linux_wait_1): ... and here, when a process exits.
5518 * thread-db.c (any_thread_of): New.
5519 (thread_db_free): Switch the current inferior to a thread of the
5522 2009-12-21 Doug Evans <dje@google.com>
5524 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
5526 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
5527 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
5528 warning ifndef __NR_tkill. Move setting of errno there too.
5529 Delete unnecessary resetting of errno after syscall.
5530 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
5532 * configure.ac: Check for dladdr.
5533 * config.in: Regenerate.
5534 * configure: Regenerate.
5535 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
5536 (try_thread_db_load): Update.
5538 * linux-low.c (my_waitpid): Delete unnecessary prototype.
5540 2009-12-18 Doug Evans <dje@google.com>
5542 * event-loop.c: Include unistd.h if it exists.
5544 * linux-low.c (my_waitpid): Move definition away from being in
5545 between linux_tracefork_child/linux_test_for_tracefork.
5547 * gdb_proc_service.h (psaddr_t): Fix type.
5548 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
5549 signature to match glibc.
5551 2009-12-16 Doug Evans <dje@google.com>
5553 * linux-low.c (linux_read_memory): Fix argument to read.
5555 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5557 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
5558 events, don't leave current_inferior pointing at null.
5560 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5562 * win32-low.c (LOG): Delete.
5563 (OUTMSG): Output to stderr.
5564 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
5565 on compile time LOG macro.
5566 (win32_wait): Fix debug output.
5568 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5570 * win32-low.c (win32_add_one_solib): If the dll name is
5571 "ntdll.dll", prepend the system directory to the dll path.
5573 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
5575 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
5577 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
5578 Vladimir Prus <vladimir@codesourcery.com>
5580 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
5581 * configure.ac: Check for __mcoldfire__ and set
5582 gdb_cv_m68k_is_coldfire.
5583 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
5584 reg-cf.o and reg-m68k.o.
5585 * configure: Regenerated.
5587 2009-11-16 Pedro Alves <pedro@codesourcery.com>
5589 * linux-low.c (linux_remove_process): Add `detaching' parameter.
5590 Pass it to thread_db_free.
5591 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
5592 proper `detaching' argument to linux_remove_process.
5593 * linux-low.h (thread_db_free): Add `detaching' parameter.
5594 * thread-db.c (thread_db_init): Pass false as `detaching' argument
5596 (thread_db_free): Add `detaching' parameter. Only
5597 call td_ta_clear_event if detaching from process.
5599 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
5601 * thread-db.c (thread_db_free): Fix typo.
5603 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
5606 * thread-db.c (thread_db_free): Call td_ta_clear_event.
5608 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
5610 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
5611 with an i686 compiler.
5612 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
5614 * configure: Rebuilt.
5616 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
5620 * server.c (handle_search_memory_1): Correct read_addr initialization
5621 in loop for searching subsequent chunks.
5623 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
5625 * configure.ac: New --with-libthread-db option.
5626 * thread-db.c: Allow direct dependence on libthread_db.
5627 (thread_db_free): Adjust.
5628 * config.in: Regenerate.
5629 * configure: Likewise.
5631 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
5634 * thread-db.c (attach_thread): New function.
5635 (maybe_attach_thread): Return success/failure.
5636 (find_new_threads_callback): Adjust.
5637 (thread_db_find_new_threads): Loop until no new threads.
5639 2009-10-13 Pedro Alves <pedro@codesourcery.com>
5641 * proc-service.c (ps_lgetregs): Formatting.
5643 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
5645 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
5646 * configure.ac: Adjust.
5647 * linux-low.h (struct process_info_private): Move members to struct
5649 (thread_db_free, thread_db_handle_monitor_command): New prototype.
5650 * linux-low.c (linux_remove_process): Adjust.
5651 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
5652 * server.c (handle_query): Move code ...
5653 (handle_monitor_command): ... here. New function.
5654 * target.h (struct target_ops): New member.
5655 * thread-db.c (struct thread_db): New.
5656 (libthread_db_search_path): New variable.
5657 (thread_db_create_event, thread_db_enable_reporting)
5658 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
5659 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
5660 (try_thread_db_load_1, dladdr_to_soname): New functions.
5661 (try_thread_db_load, thread_db_load_search): New functions.
5662 (thread_db_init): Search for libthread_db.
5663 (thread_db_free): New function.
5664 (thread_db_handle_monitor_command): Likewise.
5665 * config.in: Regenerate.
5666 * configure: Regenerate.
5668 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5670 * spu-low.c (spu_kill): Wait for inferior to terminate.
5671 Call clear_inferiors.
5672 (spu_detach): Call clear_inferiors.
5674 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5676 * aclocal.m4: Regenerate.
5677 * config.in: Likewise.
5678 * configure: Likewise.
5680 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5682 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
5683 (parse_spufs_run): New function.
5684 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
5685 (ppc_breakpoint_at): Handle SPU breakpoints.
5687 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5689 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
5690 (SPUFS_MAGIC): Define.
5691 (spu_enumerate_spu_ids): New function.
5692 (linux_qxfer_spu): New function.
5693 (linux_target_ops): Install linux_qxfer_spu.
5695 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5697 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
5698 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
5699 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
5700 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
5701 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
5702 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
5703 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
5704 (init_registers_powerpc_cell32l): Add prototype.
5705 (init_registers_powerpc_cell64l): Likewise.
5706 (ppc_arch_setup): Detect Cell/B.E. architecture.
5708 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5710 * Makefile.in (datarootdir): New variable.
5712 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5714 * linux-low.c (linux_write_memory): Update debugging output.
5715 * Makefile.in (clean): Add new descriptions.
5716 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
5717 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
5718 * configure.srv: Add new files for arm*-*-linux*.
5719 * linux-arm-low.c: Add new declarations.
5720 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
5721 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
5722 (HWCAP_VFPv3D16): New.
5723 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
5724 instead of __IWMMXT__.
5725 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
5726 (arm_arch_setup): New.
5727 (target_regsets): Remove #ifdef. Add VFP regset.
5728 (the_low_target): Use arm_arch_setup.
5730 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5732 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
5733 the main thread again.
5735 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
5737 Adding Neutrino gdbserver.
5738 * configure: Regenerated.
5739 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
5740 * configure.srv (i[34567]86-*-nto*): New target.
5741 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
5742 * remote-utils.c [__QNX__]: Include sys/iomgr.h
5743 (nto_comctrl) [__QNX__]: New function.
5744 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
5746 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
5748 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
5751 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
5752 Pedro Alves <pedro@codesourcery.com>
5754 * win32-i386-low.c (i386_get_thread_context): Handle systems that
5755 don't support CONTEXT_EXTENDED_REGISTERS.
5756 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
5757 (the_low_target): Install them.
5758 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
5759 failing with ERROR_PIPE_NOT_CONNECTED.
5761 2009-06-30 Doug Evans <dje@google.com>
5762 Pierre Muller <muller@ics.u-strasbg.fr>
5764 Add h/w watchpoint support to x86-linux, win32-i386.
5765 * Makefile.in (SFILES): Add i386-low.c
5766 (i386_low_h): Define.
5767 (i386-low.o): Add dependencies.
5768 (linux-x86-low.o): Add i386-low.h dependency.
5769 (win32-i386-low.o): Ditto.
5770 * i386-low.c: New file.
5771 * i386-low.h: New file.
5772 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
5773 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
5774 * linux-low.c (linux_add_process): Initialize arch_private.
5775 (linux_remove_process): Free arch_private.
5776 (add_lwp): Initialize arch_private.
5777 (delete_lwp): Free arch_private.
5778 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
5780 * linux-low.h (process_info_private): New member arch_private.
5781 (lwp_info): New member arch_private.
5782 (linux_target_ops): New members new_process, new_thread,
5784 (ptid_of): New macro.
5785 * linux-x86-low.c: Include stddef.h, i386-low.h.
5786 (arch_process_info): New struct.
5787 (arch_lwp_info): New struct.
5788 (x86_linux_dr_get, x86_linux_dr_set): New functions.
5789 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5790 (i386_dr_low_get_status): New function.
5791 (x86_insert_point, x86_remove_point): New functions.
5792 (x86_stopped_by_watchpoint): New function.
5793 (x86_stopped_data_address): New function.
5794 (x86_linux_new_process, x86_linux_new_thread): New functions.
5795 (x86_linux_prepare_to_resume): New function.
5796 (the_low_target): Add entries for insert_point, remove_point,
5797 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
5799 * server.c (debug_hw_points): New global.
5800 (monitor_show_help): Document set debug-hw-points.
5801 (handle_query): Process "set debug-hw-points".
5802 * server.h (debug_hw_points): Declare.
5803 (paddress): Declare.
5804 * utils.c (NUMCELLS, CELLSIZE): New macros.
5805 (get_sell, xsnprintf, paddress): New functions.
5806 * win32-arm-low.c (the_low_target): Add entries for insert_point,
5807 remove_point, stopped_by_watchpoint, stopped_data_address.
5808 * win32-i386-low.c: Include i386-low.h.
5809 (debug_reg_state): Replaces dr.
5810 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5811 (i386_dr_low_get_status): New function.
5812 (i386_insert_point, i386_remove_point): New functions.
5813 (i386_stopped_by_watchpoint): New function.
5814 (i386_stopped_data_address): New function.
5815 (i386_initial_stuff): Update.
5816 (get_thread_context,set_thread_context,i386_thread_added): Update.
5817 (the_low_target): Add entries for insert_point,
5818 remove_point, stopped_by_watchpoint, stopped_data_address.
5819 * win32-low.c (win32_insert_watchpoint): New function.
5820 (win32_remove_watchpoint): New function.
5821 (win32_stopped_by_watchpoint): New function.
5822 (win32_stopped_data_address): New function.
5823 (win32_target_ops): Add entries for insert_watchpoint,
5824 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
5825 * win32-low.h (win32_target_ops): New members insert_point,
5826 remove_point, stopped_by_watchpoint, stopped_data_address.
5828 2009-06-25 Pedro Alves <pedro@codesourcery.com>
5830 * server.c (process_serial_event): Re-return unsupported, not
5831 error, if the type isn't recognized. Re-allow supporting only
5832 insert or remove packets. Also call require_running for
5833 breakpoints. Add missing break statement to default case. Tidy.
5834 * target.h (struct target_ops): Rename insert_watchpoint to
5835 insert_point, and remove_watchpoint to remove_point.
5837 * linux-low.h (struct linux_target_ops): Likewise.
5838 * linux-low.c (linux_insert_watchpoint): Rename to ...
5839 (linux_insert_point): ... this. Adjust.
5840 (linux_remove_watchpoint): Rename to ...
5841 (linux_remove_point): ... this. Adjust.
5842 (linux_target_ops): Adjust.
5843 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
5844 (cris_insert_point): ... this.
5845 (cris_remove_watchpoint): Rename to ...
5846 (cris_remove_point): ... this.
5847 (the_low_target): Adjust.
5849 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
5851 * server.c (handle_v_kill): Pass signal_pid to
5852 kill_inferior if multi_process is zero.
5854 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
5856 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
5857 * target.h (target_ops): Comment for *_watchpoint to make it clear
5858 the functions can get types '0' and '1'.
5860 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
5862 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
5863 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
5864 * regcache.c (get_regcache): Likewise.
5865 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
5866 * win32-low.c (child_fetch_inferior_registers): Remove check for
5869 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
5870 Pedro Alves <pedro@codesourcery.com>
5872 * target.h (struct target_ops) <supports_multi_process>: New
5874 (target_supports_multi_process): New.
5875 * server.c (handle_query): Even if GDB reports support, only
5876 enable multi-process if the target also supports it. Report
5877 multi-process support only if the target backend supports it.
5878 * linux-low.c (linux_supports_multi_process): New function.
5879 (linux_target_ops): Install it as target_supports_multi_process
5882 2009-05-24 Doug Evans <dje@google.com>
5884 Global renaming of find_thread_pid to find_thread_ptid.
5885 * server.h (find_thread_ptid): Renamed from find_thread_pid.
5886 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
5887 All callers updated.
5889 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
5890 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
5893 * linux-low.c (get_stop_pc): Print pc if debug_threads.
5894 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
5895 (linux_resume_one_lwp): Ditto.
5897 2009-05-23 Doug Evans <dje@google.com>
5899 * linux-low.c (linux_resume_one_lwp): Change type of first arg
5900 from struct inferior_list_entry * to struct lwp_info *.
5901 All callers updated.
5903 2009-05-13 Doug Evans <dje@google.com>
5905 * linux-x86-low.c: Don't include assert.h.
5906 (x86_siginfo_fixup): Use fatal, not assert.
5907 (x86_arch_setup): Fix comment.
5909 2009-05-12 Doug Evans <dje@google.com>
5911 Biarch support for i386/amd64 gdbserver.
5912 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
5913 Add linux-x86-low.c.
5914 (linux-i386-low.o, linux-x86-64-low.o): Delete.
5915 (linux-x86-low.o): Add.
5916 * linux-x86-64-low.c: Delete.
5917 * linux-i386-low.c: Delete.
5918 * linux-x86-low.c: New file.
5919 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
5921 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
5923 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
5924 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
5925 (linux_child_pid_to_exec_file): New function.
5926 (elf_64_header_p, elf_64_file_p): New functions.
5927 (siginfo_fixup): New function.
5928 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
5929 give target a chance to convert layout.
5930 * linux-low.h (linux_target_ops): New member siginfo_fixup.
5931 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
5933 2009-05-07 Doug Evans <dje@google.com>
5935 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
5936 (regsets_store_inferior_registers): Ditto.
5938 2009-05-06 Pedro Alves <pedro@codesourcery.com>
5942 * linux-low.c (must_set_ptrace_flags): Delete.
5943 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
5945 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
5946 `lwp->must_set_ptrace_flags' instead.
5947 (linux_wait_for_event_1): Set ptrace options here.
5948 (linux_wait_1): ... not here.
5950 2009-04-30 Doug Evans <dje@google.com>
5952 * inferiors.c (started_inferior_callback): New function.
5953 (attached_inferior_callback): New function.
5954 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
5955 * server.c (print_started_pid, print_attached_pid): New functions.
5956 (detach_or_kill_for_exit): New function.
5957 (main): Call it instead of for_each_inferior (kill_inferior_callback).
5958 * server.h (have_started_inferiors_p): Declare.
5959 (have_attached_inferiors_p): Declare.
5961 * inferiors.c (remove_process): Fix memory leak, free process.
5962 * linux-low.c (linux_remove_process): New function.
5963 (linux_kill): Call it instead of remove_process.
5964 (linux_detach, linux_wait_1): Ditto.
5966 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
5968 * configure.srv: Add x86 Windows CE target.
5970 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5972 * inferiors.c (get_thread_process): Make global.
5973 * server.h (get_thread_process): Add prototype.
5974 * thread-db.c (find_one_thread): Use get_thread_process
5975 instead of current_process.
5976 (thread_db_get_tls_address): Do not crash if called when
5977 thread layer is not yet initialized.
5979 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5981 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
5982 * spu-low.c (current_tid): Rename to ...
5983 (current_ptid): ... this.
5984 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
5985 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
5986 ptid_get_lwp (current_ptid) instead of current_tid.
5987 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
5988 instead of current_tid. Use find_process_pid to verify pid
5989 argument is valid. Pass proper argument to remove_process.
5990 (spu_thread_alive): Compare current_ptid instead of current_tid.
5991 (spu_resume): Likewise.
5993 2009-04-02 Pedro Alves <pedro@codesourcery.com>
5995 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
5998 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6000 Implement the multiprocess extensions, and add linux multiprocess
6003 * server.h (ULONGEST): Declare.
6004 (struct ptid, ptid_t): New.
6005 (minus_one_ptid, null_ptid): Declare.
6006 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
6007 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
6008 (struct inferior_list_entry): Change `id' type from unsigned from
6010 (struct sym_cache, struct breakpoint, struct
6011 process_info_private): Forward declare.
6012 (struct process_info): Declare.
6013 (current_process): Declare.
6014 (all_processes): Declare.
6015 (initialize_inferiors): Declare.
6016 (add_thread): Adjust to use ptid_t.
6017 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
6018 (add_process, remove_process, find_thread_pid): Declare.
6019 (find_inferior_id): Adjust to use ptid_t.
6020 (cont_thread, general_thread, step_thread): Change type to ptid_t.
6021 (multi_process): Declare.
6022 (push_event): Adjust to use ptid_t.
6023 (read_ptid, write_ptid): Declare.
6024 (prepare_resume_reply): Adjust to use ptid_t.
6025 (clear_symbol_cache): Declare.
6026 * inferiors.c (all_processes): New.
6027 (null_ptid, minus_one_ptid): New.
6028 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
6029 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
6030 (add_thread): Change unsigned long to ptid. Remove gdb_id
6032 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
6033 (gdb_id_to_thread): Rename to ...
6034 (find_thread_pid): ... this. Change unsigned long to ptid.
6035 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
6036 (loaded_dll, pull_pid_from_list): Adjust.
6037 (add_process, remove_process, find_process_pid)
6038 (get_thread_process, current_process, initialize_inferiors): New.
6039 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
6040 (struct target_waitstatus) <related_pid>: Ditto.
6041 (struct target_ops) <kill, detach>: Add `pid' argument. Change
6043 (struct target_ops) <join>: Add `pid' argument.
6044 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
6045 (struct target_ops) <wait>: Add `ptid' field. Change return type
6047 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
6048 (mywait): Add `ptid' argument. Change return type to ptid_t.
6049 (target_pid_to_str): Declare.
6050 * target.c (set_desired_inferior): Adjust to use ptids.
6051 (mywait): Add new `ptid' argument. Adjust.
6052 (target_pid_to_str): New.
6053 * mem-break.h (free_all_breakpoints): Declare.
6054 * mem-break.c (breakpoints): Delelete.
6055 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
6056 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
6057 to use per-process breakpoint list.
6058 (free_all_breakpoints): New.
6059 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
6060 (symbol_cache, all_symbols_looked_up): Delete.
6062 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
6064 (prepare_resume_reply): Change ptid argument's type from unsigned
6065 long to ptid_t. Adjust. Implement W;process and X;process.
6066 (free_sym_cache, clear_symbol_cache): New.
6067 (look_up_one_symbol): Adjust to per-process symbol cache. *
6068 * server.c (cont_thread, general_thread, step_thread): Change type
6071 (multi_process): New.
6072 (last_ptid): Change type to ptid_t.
6073 (struct vstop_notif) <ptid>: Change type to ptid_t.
6074 (queue_stop_reply, push_event): Change `ptid' argument's type to
6076 (discard_queued_stop_replies): Add `pid' argument.
6077 (start_inferior): Adjust to use ptids. Adjust to mywait interface
6078 changes. Don't reference the `attached' global.
6079 (attach_inferior): Adjust to mywait interface changes.
6080 (handle_query): Adjust to use ptids. Parse GDB's qSupported
6081 features. Handle and report "multiprocess+". Handle
6083 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
6085 (handle_v_kill): New.
6086 (handle_v_stopped): Adjust to use target_pid_to_str.
6087 (handle_v_requests): Allow multiple attaches and runs when
6088 multiprocess extensions are in effect. Handle "vKill".
6089 (myresume): Adjust to use ptids.
6090 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
6091 (handle_status): Adjust to discard_queued_stop_replies interface
6093 (first_thread_of, kill_inferior_callback)
6094 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
6095 (main): Call initialize_inferiors. Adjust to use ptids, killing
6096 and detaching from all inferiors. Handle multiprocess packet
6098 * linux-low.h: Include gdb_proc_service.h.
6099 (struct process_info_private): New.
6100 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
6101 <lwpid_of>: Use ptid_get_lwp.
6102 (get_lwp_thread): Adjust.
6103 (struct lwp_info): Add `dead' member.
6104 (find_lwp_pid): Declare.
6105 * linux-low.c (thread_db_active): Delete.
6106 (new_inferior): Adjust comment.
6107 (inferior_pid): Delete.
6108 (linux_add_process): New.
6109 (handle_extended_wait): Adjust.
6110 (add_lwp): Change unsigned long to ptid.
6111 (linux_create_inferior): Add process to processes table. Adjust
6112 to use ptids. Don't set new_inferior here.
6113 (linux_attach_lwp): Rename to ...
6114 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
6115 it. Adjust to use ptids.
6116 (linux_attach_lwp): New.
6117 (linux_attach): Add process to processes table. Don't set
6119 (struct counter): New.
6120 (second_thread_of_pid_p, last_thread_of_process_p): New.
6121 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
6123 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
6124 processes. Remove process from process table.
6125 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
6126 to multiple processes.
6127 (any_thread_of): New.
6128 (linux_detach): Add `pid' argument, and handle it. Remove process
6129 from processes table.
6130 (linux_join): Add `pid' argument. Handle it.
6131 (linux_thread_alive): Change unsighed long argument to ptid_t.
6132 Consider dead lwps as not being alive.
6133 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
6134 threads we're not interested in.
6135 (same_lwp, find_lwp_pid): New.
6136 (linux_wait_for_lwp): Change `pid' argument's type from int to
6138 (linux_wait_for_event): Rename to ...
6139 (linux_wait_for_event_1): ... this. Change `pid' argument's type
6140 from int to ptid_t. Adjust.
6141 (linux_wait_for_event): New.
6142 (linux_wait_1): Add `ptid' argument. Change return type to
6143 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
6144 that exit from the process table.
6145 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
6147 (mark_lwp_dead): New.
6148 (wait_for_sigstop): Adjust to use ptids. If a process exits while
6149 stopping all threads, mark its main lwp as dead.
6150 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
6152 (fetch_register, usr_store_inferior_registers)
6153 (regsets_fetch_inferior_registers)
6154 (regsets_store_inferior_registers, linux_read_memory)
6155 (linux_write_memory): Inline `inferior_pid'.
6156 (linux_look_up_symbols): Adjust to use per-process
6158 (linux_request_interrupt): Adjust to use ptids.
6159 (linux_read_auxv): Inline `inferior_pid'.
6160 (initialize_low): Don't reference thread_db_active.
6161 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
6162 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
6163 (ps_getpid): Return the pid of the current inferior.
6164 * thread-db.c (proc_handle, thread_agent): Delete.
6165 (thread_db_create_event, thread_db_enable_reporting): Adjust to
6167 (find_one_thread): Change argument type to ptid_t. Adjust to
6169 (maybe_attach_thread): Adjust to per-process data and ptids.
6170 (thread_db_find_new_threads): Ditto.
6171 (thread_db_init): Ditto.
6172 * spu-low.c (spu_create_inferior, spu_attach): Add process to
6173 processes table. Adjust to use ptids.
6174 (spu_kill, spu_detach): Adjust interface. Remove process from
6176 (spu_join, spu_thread_alive): Adjust interface.
6177 (spu_wait): Adjust interface. Remove process from processes
6178 table. Adjust to use ptids.
6179 * win32-low.c (current_inferior_tid): Delete.
6180 (current_inferior_ptid): New.
6181 (debug_event_ptid): New.
6182 (thread_rec): Take a ptid. Adjust.
6183 (child_add_thread): Add `pid' argument. Adjust to use ptids.
6184 (child_delete_thread): Ditto.
6185 (do_initial_child_stuff): Add `attached' argument. Add process to
6187 (child_fetch_inferior_registers, child_store_inferior_registers):
6189 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
6190 (win32_attach): Pass 1 to do_initial_child_stuff.
6191 (win32_kill): Adjust interface. Remove process from processes
6193 (win32_detach): Ditto.
6194 (win32_join): Adjust interface.
6195 (win32_thread_alive): Take a ptid.
6196 (win32_resume): Adjust to use ptids.
6197 (get_child_debug_event): Ditto.
6198 (win32_wait): Adjust interface. Remove exiting process from
6201 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6203 Non-stop mode support.
6205 * server.h (non_stop): Declare.
6206 (gdb_client_data, handler_func): Declare.
6207 (delete_file_handler, add_file_handler, start_event_loop):
6209 (handle_serial_event, handle_target_event, push_event)
6210 (putpkt_notif): Declare.
6211 * target.h (enum resume_kind): New.
6212 (struct thread_resume): Replace `step' field by `kind' field.
6213 (TARGET_WNOHANG): Define.
6214 (struct target_ops) <wait>: Add `options' argument.
6215 <supports_non_stop, async, start_non_stop>: New fields.
6216 (target_supports_non_stop, target_async): New.
6217 (start_non_stop): Declare.
6218 (mywait): Add `options' argument.
6219 * target.c (mywait): Add `options' argument. Print child exit
6221 (start_non_stop): New.
6222 * server.c (non_stop, own_buf, mem_buf): New globals.
6223 (struct vstop_notif): New.
6224 (notif_queue): New global.
6225 (queue_stop_reply, push_event, discard_queued_stop_replies)
6226 (send_next_stop_reply): New.
6227 (start_inferior): Adjust to use resume_kind. Adjust to mywait
6229 (attach_inferior): In non-stop mode, don't wait for the target
6231 (handle_general_set): Handle QNonStop.
6232 (handle_query): When handling qC, return the current general
6233 thread, instead of the first thread of the list.
6234 (handle_query): If the backend supports non-stop mode, include
6235 QNonStop+ in the qSupported query response.
6236 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
6238 (handle_v_attach, handle_v_run): Handle non-stop mode.
6239 (handle_v_stopped): New.
6240 (handle_v_requests): Report support for vCont;t. Handle vStopped.
6241 (myresume): Adjust to use resume_kind. Handle non-stop.
6242 (queue_stop_reply_callback): New.
6243 (handle_status): Handle non-stop mode.
6244 (main): Clear non_stop flag on reconnection. Use the event-loop.
6245 Refactor serial protocol handling from here ...
6246 (process_serial_event): ... to this new function. When GDB
6247 selects any thread, select one here. In non-stop mode, wait until
6248 GDB acks all pending events before exiting.
6249 (handle_serial_event, handle_target_event): New.
6250 * remote-utils.c (remote_open): Install remote_desc in the event
6252 (remote_close): Remove remote_desc from the event loop.
6253 (putpkt_binary): Rename to...
6254 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
6255 (putpkt_binary): New as wrapper around putpkt_binary_1.
6256 (putpkt_notif): New.
6257 (prepare_resume_reply): In non-stop mode, don't change the
6259 * event-loop.c: New.
6260 * Makefile.in (OBJ): Add event-loop.o.
6261 (event-loop.o): New rule.
6263 * linux-low.h (pid_of): Moved here.
6265 (get_lwp_thread): Use lwpid_of.
6266 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
6267 * linux-low.c (pid_of): Delete.
6268 (inferior_pid): Use lwpid_of.
6269 (linux_event_pipe): New.
6270 (target_is_async_p): New.
6272 (handle_extended_wait): Use lwpid_of.
6273 (add_lwp): Don't set lwpid field.
6274 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
6275 (linux_kill_one_lwp): If killing a running lwp, stop it first.
6276 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
6277 (linux_detach_one_lwp): If detaching from a running lwp, stop it
6278 first. Adjust to linux_wait_for_event interface changes. Use
6280 (linux_detach): Don't delete the main lwp here.
6281 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
6282 (status_pending_p): Don't consider explicitly suspended lwps.
6283 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
6284 pointer. Add OPTIONS argument. Change return type to int. Use
6285 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
6286 (linux_wait_for_event): Take an integer pid instead of a lwp_info
6287 pointer. Add status pointer argument. Return a pid instead of a
6288 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
6289 changes. In non-stop mode, don't switch to a random thread.
6290 (linux_wait): Rename to...
6291 (linux_wait_1): ... this. Add target_options argument, and handle
6292 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
6293 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
6294 clean exit and signal exit code. Don't stop all threads in
6295 non-stop mode. In all-stop mode, only stop all threads when
6296 reporting a stop to GDB. Handle explicit thread stop requests.
6297 (async_file_flush, async_file_mark): New.
6299 (send_sigstop): Use lwpid_of.
6300 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
6301 interface changes. In non-stop mode, don't switch to a random
6303 (linux_resume_one_lwp): Use lwpid_of.
6304 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
6305 (linux_resume_one_thread): ... this. Handle resume_stop. In
6306 non-stop mode, don't look for pending flag in all threads.
6307 (resume_status_pending_p): Don't consider explicitly suspended
6309 (my_waitpid): Reimplement. Emulate __WALL.
6310 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
6312 (sigchld_handler, linux_supports_non_stop, linux_async)
6313 (linux_start_non_stop): New.
6314 (linux_target_ops): Register linux_supports_non_stop, linux_async
6315 and linux_start_non_stop.
6316 (initialize_low): Install SIGCHLD handler.
6317 * thread-db.c (thread_db_create_event, find_one_thread)
6318 (thread_db_get_tls_address): Use lwpid_of.
6319 * win32-low.c (win32_detach): Adjust to use resume_kind.
6320 (win32_wait): Add `options' argument.
6321 * spu-low.c (spu_resume): Adjust to use resume_kind.
6322 (spu_wait): Add `options' argument.
6324 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6326 Decouple target code from remote protocol.
6328 * target.h (enum target_waitkind): New.
6329 (struct target_waitstatus): New.
6330 (struct target_ops) <wait>: Return an unsigned long. Take a
6331 target_waitstatus pointer instead of a char pointer.
6333 * target.c (mywait): Change prototype to return an unsigned long.
6334 Take a target_waitstatus pointer instead of a char pointer. Adjust.
6335 * server.h (thread_from_wait, old_thread_from_wait): Delete
6337 (prepare_resume_reply): Change prototype to take a
6339 * server.c (thread_from_wait, old_thread_from_wait): Delete.
6340 (last_status, last_ptid): New.
6341 (start_inferior): Remove "statusptr" argument. Adjust. Return a
6342 pid instead of a signal.
6343 (attach_inferior): Remove "status" and "signal" parameters.
6345 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
6347 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
6348 (handle_v_requests, myresume): Remove "status" and "signal"
6350 (handle_status): New.
6351 (main): Delete local `status'. Adjust.
6352 * remote-utils.c: Include target.h.
6353 (prepare_resume_reply): Change prototype to take a
6354 target_waitstatus. Adjust.
6356 * linux-low.c (linux_wait): Adjust to new target_ops->wait
6358 * spu-low.c (spu_wait): Adjust.
6359 * win32-low.c (enum target_waitkind, struct target_waitstatus):
6361 (win32_wait): Adjust.
6363 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6365 * target.h (struct thread_resume): Delete leave_stopped member.
6366 (struct target_ops): Add a `n' argument to the `resume' callback.
6367 * server.c (start_inferior): Adjust.
6368 (handle_v_cont, myresume): Adjust.
6369 * linux-low.c (check_removed_breakpoint): Adjust to resume
6370 interface change, and to removed leave_stopped field.
6371 (resume_ptr): Delete.
6372 (struct thread_resume_array): New.
6373 (linux_set_resume_request): Add new `arg' parameter. Adjust to
6374 resume interface change.
6375 (linux_continue_one_thread, linux_queue_one_thread)
6376 (resume_status_pending_p): Check if the resume field is NULL
6377 instead of checking the leave_stopped member.
6378 (linux_resume): Adjust to the target resume interface change.
6379 * spu-low.c (spu_resume): Adjust to the target resume interface
6381 * win32-low.c (win32_detach, win32_resume): Ditto.
6383 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6385 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
6387 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
6389 (linux_continue_one_thread): Only preserve the stepping flag if
6390 there's a pending breakpoint.
6392 2009-03-31 Pedro Alves <pedro@codesourcery.com>
6394 * server.c (main): After the inferior having exited, call
6395 remote_close before exiting gdbserver.
6397 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
6399 Fix size of FPSCR in Power 7 processors.
6400 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
6401 (PPC_FEATURE_HAS_DFP): New #define.
6402 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
6405 2009-03-23 Pedro Alves <pedro@codesourcery.com>
6407 * server.c (handle_query) Whitespace and formatting.
6409 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6411 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
6412 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
6413 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
6414 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
6415 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
6416 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
6417 Makefile.in, configure.ac: Fix whitespace throughout.
6418 * configure: Regenerate.
6420 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6422 * inferiors.c (find_inferior): Make it safe for the callback
6423 function to delete the currently iterated inferior.
6425 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6427 * Makefile.in (linuw_low_h): Move higher.
6428 (thread-db.o): Depend on $(linux_low_h).
6430 2009-03-17 Pedro Alves <pedro@codesourcery.com>
6432 Rename "process" to "lwp" throughout.
6434 * linux-low.c (all_processes): Rename to...
6435 (all_lwps): ... this.
6436 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
6437 (add_process): Rename to ...
6438 (add_lwp): ... this. Adjust.
6439 (linux_create_inferior): Adjust.
6440 (linux_attach_lwp): Adjust.
6441 (linux_attach): Adjust.
6442 (linux_kill_one_process): Rename to ...
6443 (linux_kill_one_lwp): ... this. Adjust.
6444 (linux_kill): Adjust.
6445 (linux_detach_one_process): Rename to ...
6446 (linux_detach_one_lwp): ... this. Adjust.
6447 (linux_detach): Adjust.
6448 (check_removed_breakpoint): Adjust.
6449 (status_pending_p): Adjust.
6450 (linux_wait_for_process): Rename to ...
6451 (linux_wait_for_lwp): ... this. Adjust.
6452 (linux_wait_for_event): Adjust.
6453 (send_sigstop): Adjust.
6454 (wait_for_sigstop): Adjust.
6455 (stop_all_processes): Rename to ...
6456 (stop_all_lwps): ... this.
6457 (linux_resume_one_process): Rename to ...
6458 (linux_resume_one_lwp): ... this. Adjust.
6459 (linux_set_resume_request, linux_continue_one_thread)
6460 (linux_queue_one_thread, resume_status_pending_p)
6461 (usr_store_inferior_registers, regsets_store_inferior_registers)
6462 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
6464 * linux-low.h (get_process): Rename to ...
6465 (get_lwp): ... this. Adjust.
6466 (get_thread_process): Rename to ...
6467 (get_thread_lwp): ... this. Adjust.
6468 (get_process_thread): Rename to ...
6469 (get_lwp_thread): ... this. Adjust.
6470 (struct process_info): Rename to ...
6471 (struct lwp_info): ... this.
6472 (all_processes): Rename to ...
6473 (all_lwps): ... this.
6474 * proc-service.c (ps_lgetregs): Adjust.
6475 * thread-db.c (thread_db_create_event, find_one_thread)
6476 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
6478 2009-03-14 Pedro Alves <pedro@codesourcery.com>
6480 * server.c (handle_query): Handle "qAttached".
6482 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
6484 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
6485 GPLv3, update license URL.
6487 2009-03-01 Doug Evans <dje@google.com>
6489 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
6490 (server_h): Add gdb_signals.h.
6491 (signals.o): Update.
6492 * server.h (target_signal_from_host,target_signal_to_host_p)
6493 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
6495 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
6497 * remote-utils.c (getpkt): Also generate remote-debug
6498 information if noack_mode is set.
6500 2009-02-06 Pedro Alves <pedro@codesourcery.com>
6502 * server.c (handle_query): Report qXfer:siginfo:read and
6503 qXfer:siginfo:write as supported and handle them.
6504 * target.h (struct target_ops) <qxfer_siginfo>: New field.
6505 * linux-low.c (linux_xfer_siginfo): New.
6506 (linux_target_ops): Set it.
6508 2009-01-26 Pedro Alves <pedro@codesourcery.com>
6510 * server.c (gdbserver_usage): Mention --remote-debug.
6511 (main): Accept '--remote-debug' switch.
6513 2009-01-18 Doug Evans <dje@google.com>
6515 * regcache.c (new_register_cache): No need to check result of xcalloc.
6516 * server.c (handle_search_memory): Back out calls to xmalloc,
6517 result is checked and error is returned to user upon failure.
6518 (handle_query): Ditto. Add more checks for result of malloc.
6519 (handle_v_cont): Check result of malloc, report error back to
6521 (handle_v_run): Ditto. Call freeargv.
6522 * server.h (freeargv): Declare.
6523 * utils.c (freeargv): New fn.
6525 2009-01-15 Doug Evans <dje@google.com>
6527 * gdbreplay.c (perror_with_name): Make arg const char *.
6528 * server.h (target_signal_to_name): Make return type const char *.
6529 * thread-db.c (thread_db_err_str): Make return type const char *.
6530 * utils.c (perror_with_name): Make arg const char *.
6532 2009-01-14 Pedro Alves <pedro@codesourcery.com>
6534 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
6535 when handling a EXIT_PROCESS_DEBUG_EVENT.
6537 2009-01-06 Joel Brobecker <brobecker@adacore.com>
6539 * gdbreplay.c (gdbreplay_version): Update copyright year.
6540 * server.c (gdbserver_version): Likewise.
6542 2009-01-05 Doug Evans <dje@google.com>
6544 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
6545 (handle_extended_wait): Improve comment.
6547 2008-12-13 Doug Evans <dje@google.com>
6549 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
6550 * server.h (ATTR_MALLOC): New macro.
6551 (xmalloc,xcalloc,xstrdup): Declare.
6552 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
6553 * inferiors.c: Ditto.
6554 * linux-low.c: Ditto.
6555 * mem-break.c: Ditto.
6556 * regcache.c: Ditto.
6557 * remote-utils.c: Ditto.
6560 * win32-low.c: Ditto.
6562 2008-12-12 Doug Evans <dje@google.com>
6564 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
6565 in debugging printf.
6567 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
6569 2008-12-09 Doug Evans <dje@google.com>
6571 * linux-low.h (struct process_info): Delete member tid, unused.
6572 * thread-db.c (find_one_thread): Update.
6573 (maybe_attach_thread): Update.
6575 2008-12-02 Pedro Alves <pedro@codesourcery.com>
6577 * target.h (struct target_ops): Add qxfer_osdata member.
6578 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
6580 (linux_qxfer_osdata): New functions.
6581 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
6583 * server.c (handle_query): Handle "qXfer:osdata:read:".
6584 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
6585 (buffer_xml_printf): New functions.
6586 * server.h (struct buffer): New.
6587 (buffer_grow_str, buffer_grow_str0): New macros.
6588 (buffer_grow, buffer_free, buffer_init, buffer_finish)
6589 (buffer_xml_printf): Declare.
6591 2008-11-24 Doug Evans <dje@google.com>
6593 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
6595 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
6597 * server.c (handle_v_run): Always use the supplied argument list.
6599 2008-11-19 Bob Wilson <bob.wilson@acm.org>
6601 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
6602 (xtensa_regmap_table): Add entry for scompare1.
6604 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
6606 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
6607 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
6608 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
6609 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
6610 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
6611 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
6612 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
6613 XML target descriptions.
6614 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
6615 when inferior is running on an ISA 2.05 or later processor. Add
6616 special case to return offset for full 64-bit slot of FPSCR when
6619 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
6621 * Makefile.in (SFILES, clean): Added sparc64 files.
6622 (reg-sparc64.o, reg-sparc64.c): New.
6623 * configure.srv (sparc*-*-linux*): New configuration.
6624 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
6625 syscall arguments for SPARC.
6626 (regsets_store_inferior_registers): Likewise.
6627 * linux-sparc-low.c: New file.
6629 2008-10-21 Doug Evans <dje@google.com>
6631 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
6632 (READLINE_DIR,READLINE_DEP): Delete.
6633 (INTERNAL_CFLAGS): Update.
6634 (LINTFLAGS): Update.
6636 2008-10-10 Pedro Alves <pedro@codesourcery.com>
6638 * server.c (handle_v_run): If GDB didn't specify an argv, use the
6639 whole argv from the last run, not just argv[0].
6641 2008-09-08 Pedro Alves <pedro@codesourcery.com>
6643 * regcache.c (new_register_cache): Return NULL if the register
6644 cache size isn't known yet.
6645 (free_register_cache): Avoid dereferencing a NULL regcache.
6647 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6649 * configure.srv: Merge MIPS and MIPS64.
6651 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
6653 * Makefile.in (uninstall): Apply $(EXEEXT) too.
6655 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
6657 * Makefile.in: Add required vsx dependencies.
6659 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
6660 Declare init_registers_powerpc_vsx32l.
6661 Declare init_registers_powerpc_vsx64l.
6662 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
6663 (ppc_arch_setup): Check for VSX in hwcap.
6664 (ppc_fill_vsxregset): New function.
6665 (ppc_store_vsxregset): New function.
6666 Add new VSX entry in regset_info target_regsets.
6668 * configure.srv: Add new VSX dependencies.
6670 2008-08-12 Pedro Alves <pedro@codesourcery.com>
6672 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
6673 (remote_open): Set or clear transport_is_reliable.
6674 (putpkt_binary): Don't expect acks in noack mode.
6675 (getpkt): Don't send ack/nac in noack mode.
6676 * server.c (handle_general_set): Handle QStartNoAckMode.
6677 (handle_query): If connected by tcp pass QStartNoAckMode+ in
6679 (main): Reset noack_mode on every connection.
6680 * server.h (noack_mode): Declare.
6682 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6684 * Makefile.in (GDBREPLAY_OBS): New variable.
6685 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
6687 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
6688 Daniel Jacobowitz <dan@codesourcery.com>
6690 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
6691 (usr_store_inferior_registers): Likewise.
6692 (regsets_store_inferior_registers): Likewise.
6694 2008-07-31 Rolf Jansen <rj@surtec.com>
6695 Pedro Alves <pedro@codesourcery.com>
6697 * configure.ac: Check for memmem declaration.
6698 * server.c [HAVE_MALLOC_H]: Include malloc.h.
6699 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
6700 (disable_packet_qfThreadInfo): Unconditionally compile.
6701 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
6702 * configure, config.in: Regenerate.
6704 2008-07-28 Doug Kwan <dougkwan@google.com>
6706 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
6707 (linux_write_memory): Remove declaration of errno.
6709 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
6711 * linux-low.c (handle_extended_wait): Do not use "status"
6712 variable uninitialized.
6714 2008-07-07 Pedro Alves <pedro@codesourcery.com>
6716 * server.c (handle_v_attach): Inhibit reporting dll changes.
6718 2008-06-27 Pedro Alves <pedro@codesourcery.com>
6720 * remote-utils.c (prepare_resume_reply): If requested, don't
6721 output "thread:TID" in the T stop reply.
6723 * server.c (disable_packet_vCont, disable_packet_Tthread)
6724 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
6725 (handle_query): If requested, disable support for qC, qfThreadInfo
6727 (handle_v_requests): If requested, disable support for vCont.
6728 (gdbserver_show_disableable): New.
6729 (main): Handle --disable-packet and --disable-packet=LIST.
6731 * server.h (disable_packet_vCont, disable_packet_Tthread)
6732 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
6734 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
6736 * server.c (gdbserver_usage): Mention --version.
6738 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
6740 * Makefile.in (gdbreplay.o): New rule.
6742 2008-06-06 Joseph Myers <joseph@codesourcery.com>
6744 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
6745 message, not gdbserver.
6747 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
6748 Nathan Sidwell <nathan@codesourcery.com>
6749 Joseph Myers <joseph@codesourcery.com>
6751 * acinclude.m4: Include ../../config/acx.m4.
6752 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
6753 * configure, config.in: Regenerate.
6754 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
6755 * server.c (gdbserver_version): Print PKGVERSION.
6756 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
6757 (main): Adjust gdbserver_usage calls.
6758 * gdbreplay.c (version, host_name): Add declarations.
6759 (gdbreplay_version, gdbreplay_usage): New.
6760 (main): Accept --version and --help options.
6762 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
6764 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
6765 (arm_breakpoint_at): Handle Thumb.
6766 (the_low_target): Add comment.
6768 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
6770 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
6772 2008-05-09 Doug Evans <dje@google.com>
6774 * server.h (decode_search_memory_packet): Declare.
6775 * remote-utils.c (decode_search_memory_packet): New fn.
6776 * server.c (handle_search_memory_1): New fn.
6777 (handle_search_memory): New fn.
6778 (handle_query): Process qSearch:memory packets.
6780 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6782 * regcache.c (registers_length): Remove.
6783 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
6784 full register packet.
6785 * regcache.h (registers_length): Remove prototype.
6786 * server.h (PBUFSIZ): Define to 16384.
6788 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
6790 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
6791 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
6792 powerpc-64l.o, and powerpc-altivec64l.o.
6793 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
6794 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
6795 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
6796 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
6797 rs6000/power-linux.xml, and rs6000/power64-linux.xml
6800 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
6801 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
6802 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
6803 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
6804 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
6805 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
6806 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
6807 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
6808 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
6809 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
6812 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
6813 (init_registers_powerpc_32l): ... this new prototype.
6814 (init_registers_powerpc_32): Remove, replace by ...
6815 (init_registers_powerpc_altivec32l): ... this new prototype.
6816 (init_registers_powerpc_e500): Remove, replace by ...
6817 (init_registers_powerpc_e500l): ... this new prototype.
6818 (init_registers_ppc64): Remove, replace by ...
6819 (init_registers_powerpc_64l): ... this new prototype.
6820 (init_registers_powerpc_64): Remove, replace by ...
6821 (init_registers_powerpc_altivec64l): ... this new prototype.
6822 (ppc_num_regs): Set to 73.
6823 (PT_ORIG_R3, PT_TRAP): Define if necessary.
6824 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
6825 (ppc_cannot_store_register): Handle orig_r3 and trap.
6826 (ppc_arch_setup): Update init_registers_... calls.
6827 (ppc_fill_gregset): Handle orig_r3 and trap.
6829 * inferiors.c (clear_inferiors): Reset current_inferior.
6831 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
6833 * acinclude.m4: Add override.m4.
6834 * configure: Regenerate.
6836 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6838 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
6839 initial call to init_register_ppc64.
6841 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6843 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
6844 single powerpc*-*-linux* case.
6845 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
6847 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
6849 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
6850 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
6852 * linux-ppc-low.c: Include <elf.h>.
6853 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
6854 (ppc_hwcap): New global variable.
6855 (ppc_regmap): Remove __SPE__ #ifdef sections.
6856 (ppc_regmap_e500): New global variable.
6857 (ppc_cannot_store_register): Update __SPE__ special case.
6858 (ppc_get_hwcap): New function.
6859 (ppc_arch_setup): Use it to determine whether inferior supports
6860 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
6861 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
6862 Do not access registers if target does not support AltiVec.
6863 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
6864 Do not access registers if target does not support SPE.
6865 (target_regsets): Unconditionally include AltiVec and SPE regsets.
6867 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
6869 * linux-low.c (disabled_regsets, num_regsets): New.
6870 (use_regsets_p): Delete.
6871 (linux_wait_for_process): Clear disabled_regsets.
6872 (regsets_fetch_inferior_registers): Check and set it.
6873 (regsets_store_inferior_registers): Likewise.
6874 (linux_fetch_registers, linux_store_registers): Do not use
6876 (initialize_low): Allocate disabled_regsets.
6878 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
6880 * Makefile.in (LIBOBJS): New.
6882 (memmem.o): New rule.
6883 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
6884 * configure: Regenerated.
6886 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
6888 * server.c (handle_query): Never return "unsupported" for
6889 qXfer:features:read queries.
6891 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
6893 * server.c (get_features_xml): Fix inverted condition.
6894 (handle_query): Always support qXfer:feature:read.
6896 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
6898 * server.c (wrapper_argv): New.
6899 (start_inferior): Handle wrapper_argv. If set, expect an extra
6901 (gdbserver_usage): Document --wrapper.
6902 (main): Parse --wrapper.
6904 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6906 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
6907 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
6908 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
6909 (ppc_set_pc): Likewise.
6910 (ppc_arch_setup): New function.
6911 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
6912 of collect_register.
6913 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6915 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6917 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
6918 instead of linux-ppc64-low.o.
6919 * linux-ppc64-low.c: Remove file.
6920 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
6921 (linux-ppc64-low.o): Remove rule.
6923 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
6924 (init_registers_powerpc_64): Likewise.
6925 (ppc_regmap): Conditionally define depending on __powerpc64__.
6926 (ppc_cannot_store_register): Do not special-case "fpscr" when
6927 compiled on __powerpc64__.
6928 (ppc_collect_ptrace_register): New function.
6929 (ppc_supply_ptrace_register): New function.
6930 (ppc_breakpoint): Change type to "unsigned int".
6931 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
6932 (the_low_target): Conditionally provide initializers for the
6933 arch_setup member depending on __powerpc64__. Install
6934 collect_ptrace_register and supply_ptrace_register members.
6936 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6938 * regcache.h (gdbserver_xmltarget): Add extern declaration.
6939 * server.c (gdbserver_xmltarget): Define.
6940 (get_features_xml): Use it to replace "target.xml" and arch_string.
6942 * configure.srv: Remove srv_xmltarget. Add XML files that were
6943 mentioned there to srv_xmlfiles instead. Remove conditional tests
6944 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
6945 srv_xmlfiles and srv_regobj to include all possible choices.
6946 * configure.ac (srv_xmltarget): Remove.
6947 (srv_xmlfiles): Do not add "target.xml".
6948 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
6949 checks for supplementary target information.
6950 * configure: Regenerate.
6951 * Makefile.in (XML_TARGET): Remove.
6952 (target.xml): Remove rule.
6953 (clean): Do not clean up target.xml.
6954 (.PRECIOUS): Do not mention target.xml.
6956 * target.h (struct target_ops): Remove arch_string member.
6957 * linux-low.c (linux_arch_string): Remove.
6958 (linux_target_ops): Remove arch_string initializer.
6959 * linux-low.h (struct linux_target_ops): Remove arch_string member.
6960 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
6961 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
6962 * spu-low.c (spu_arch_string): Remove.
6963 (spu_target_ops): Remove arch_string initializer.
6964 * win32-low.c (win32_arch_string): Remove.
6965 (win32_target_ops): Remove arch_string initializer.
6966 * win32-low.h (struct win32_target_ops): Remove arch_string member.
6967 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
6968 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
6970 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6972 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
6973 by collect_ptrace_register and supply_ptrace_register hooks.
6974 * linux-low.c (fetch_register): Use supply_ptrace_register callback
6975 instead of checking for the_low_target.left_pad_xfer.
6976 (usr_store_inferior_registers): Use collect_ptrace_register callback
6977 instead of checking for the_low_target.left_pad_xfer.
6979 * linux-s390-low.c (s390_collect_ptrace_register): New function.
6980 (s390_supply_ptrace_register): Likewise.
6981 (s390_fill_gregset): Call s390_collect_ptrace_register.
6982 (the_low_target): Update.
6984 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
6985 (ppc_supply_ptrace_register): Likewise.
6986 (the_low_target): Update.
6988 * linux-i386-low.c (the_low_target): Update.
6989 * linux-x86-64-low.c (the_low_target): Update.
6991 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6993 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
6994 reg-s390.o and reg-s390x.o.
6996 * linux-low.c (new_inferior): New global variable.
6997 (linux_create_inferior, linux_attach): Set it.
6998 (linux_wait_for_process): Call the_low_target.arch_setup after the
6999 target has stopped for the first time.
7000 (initialize_low): Do not call the_low_target.arch_setup.
7002 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
7003 (s390_set_pc): Likewise.
7004 (s390_arch_setup): New function.
7005 (the_low_target): Use s390_arch_setup as arch_setup routine.
7007 * regcache.c (realloc_register_cache): New function.
7008 (set_register_cache): Call it for each existing regcache.
7010 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7012 * server.h (init_registers): Remove prototype.
7014 * linux-low.h (struct linux_target_ops): Add arch_setup field.
7015 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
7016 instead of init_registers ().
7017 * linux-arm-low.c (init_registers_arm): Add prototype.
7018 (init_registers_arm_with_iwmmxt): Likewise.
7019 (the_low_target): Add initializer for arch_setup field.
7020 * linux-cris-low.c (init_registers_cris): Add prototype.
7021 (the_low_target): Add initializer for arch_setup field.
7022 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
7023 (the_low_target): Add initializer for arch_setup field.
7024 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
7025 (the_low_target): Add initializer for arch_setup field.
7026 * linux-ia64-low.c (init_registers_ia64): Add prototype.
7027 (the_low_target): Add initializer for arch_setup field.
7028 * linux-m32r-low.c (init_registers_m32r): Add prototype.
7029 (the_low_target): Add initializer for arch_setup field.
7030 * linux-m68k-low.c (init_registers_m68k): Add prototype.
7031 (the_low_target): Add initializer for arch_setup field.
7032 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
7033 (init_registers_mips64_linux): Likewise.
7034 (the_low_target): Add initializer for arch_setup field.
7035 * linux-ppc-low.c (init_registers_ppc): Add prototype.
7036 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
7037 (the_low_target): Add initializer for arch_setup field.
7038 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
7039 (init_registers_powerpc_64): Likewise.
7040 (the_low_target): Add initializer for arch_setup field.
7041 * linux-s390-low.c (init_registers_s390): Add prototype.
7042 (init_registers_s390x): Likewise.
7043 (the_low_target): Add initializer for arch_setup field.
7044 * linux-sh-low.c (init_registers_sh): Add prototype.
7045 (the_low_target): Add initializer for arch_setup field.
7046 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
7047 (the_low_target): Add initializer for arch_setup field.
7048 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
7049 (the_low_target): Add initializer for arch_setup field.
7051 * win32-low.h (struct win32_target_ops): Add arch_setup field.
7052 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
7053 instead of init_registers ().
7054 * win32-arm-low.c (init_registers_arm): Add prototype.
7055 (the_low_target): Add initializer for arch_setup field.
7056 * win32-i386-low.c (init_registers_i386): Add prototype.
7057 (the_low_target): Add initializer for arch_setup field.
7059 * spu-low.c (init_registers_spu): Add prototype.
7060 (initialize_low): Call initialie_registers_spu () instead of
7061 initialize_registers ().
7063 2008-02-19 Pedro Alves <pedro@codesourcery.com>
7065 * server.c (handle_v_requests): When handling the vRun and vAttach
7066 packets, if already debugging a process, don't kill it. Return an
7069 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
7071 * server.c (handle_query): Correct length check.
7073 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
7075 * win32-low.c (do_initial_child_stuff): Add process handle
7076 parameter. Set current_process_handle and current_process_id from the
7077 parameters. Clear globals.
7078 (win32_create_inferior): Don't set current_process_handle and
7079 current_process_id here. Instead pass them on the call to
7080 do_initial_child_stuff.
7081 (win32_attach): Likewise.
7082 (win32_clear_inferiors): New.
7083 (win32_kill): Don't close the current process handle or the
7084 current thread handle here. Instead call win32_clear_inferiors.
7085 (win32_detach): Don't open a new handle to the process. Call
7086 win32_clear_inferiors.
7087 (win32_join): Don't rely on current_process_handle; open a new
7088 handle using the process id.
7089 (win32_wait): Call win32_clear_inferiors when the inferior process
7092 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
7094 * server.c (monitor_show_help): Add "exit".
7096 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
7098 * Makefile.in (SFILES): Add linux-xtensa-low.c.
7099 (clean): Add reg-xtensa.c.
7100 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
7101 * configure.srv (xtensa*-*-linux*) New target.
7102 * linux-xtensa-low.c: New.
7103 * xtensa-xtregs.c: New.
7105 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
7107 * hostio.c: Don't include errno.h.
7108 (errno_to_fileio_errno): Move to hostio-errno.
7109 * hostio.c: (hostio_error): Remove the error parameter. Defer the
7110 error number outputting to the target->hostio_last_error callback.
7111 (hostio_packet_error): Use FILEIO_EINVAL directly.
7112 (handle_open, handle_pread, hostio_error, handle_unlink): Update
7113 calls to hostio_error.
7114 * hostio-errno.c: New.
7115 * server.h (hostio_last_error_from_errno): Declare.
7116 * target.h (target_ops): Add hostio_last_error member.
7117 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
7118 as hostio_last_error handler.
7119 * spu-low.c (spu_target_ops): Likewise.
7120 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
7121 (wince_hostio_last_error): New functions.
7122 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
7123 as hostio_last_error handler.
7124 (win32_target_ops) [!_WIN32_WCE]: Register
7125 hostio_last_error_from_errno as hostio_last_error handler.
7126 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
7127 (hostio-errno.o): New rule.
7128 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
7129 * configure.srv (srv_hostio_err_objs): New variable. Default to
7131 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
7132 * configure: Regenerate.
7134 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7136 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
7137 (linux_kill, linux_detach): Clean up the process list.
7138 * remote-utils.c (remote_open): Improve port number parsing.
7139 (putpkt_binary, input_interrupt): Only send interrupts if the target
7141 * server.c (extended_protocol): Make static.
7142 (attached): Define earlier.
7143 (exit_requested, response_needed, program_argv): New variables.
7144 (target_running): New.
7145 (start_inferior): Clear attached here.
7146 (attach_inferior): Set attached here.
7147 (require_running): Define.
7148 (handle_query): Use require_running and target_running. Implement
7150 (handle_v_attach, handle_v_run): New.
7151 (handle_v_requests): Use require_running. Handle vAttach and vRun.
7152 (gdbserver_usage): Update.
7153 (main): Redo argument parsing. Handle --debug and --multi. Handle
7154 --attach along with other options or after the port. Save
7155 program_argv. Support no initial program. Resynchronize
7156 communication with GDB after an error. Handle "monitor exit".
7157 Use require_running and target_running. Always allow the extended
7158 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
7159 restart in extended mode.
7160 * README: Refer to the GDB manual. Update --attach usage.
7162 2007-12-20 Andreas Schwab <schwab@suse.de>
7164 * linux-low.c (STACK_SIZE): Define.
7165 (linux_tracefork_child): Use it. Use __clone2 on ia64.
7166 (linux_test_for_tracefork): Likewise.
7168 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
7170 * linux-low.c (linux_wait_for_event): Update messages. Do not
7171 reinsert auto-delete breakpoints.
7172 * mem-break.c (struct breakpoint): Change return type of handler to
7174 (set_breakpoint_at): Update handler type.
7175 (reinsert_breakpoint_handler): Return 1 instead of calling
7177 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
7179 (check_breakpoints): Delete auto-delete breakpoints and return 2.
7180 * mem-break.h (set_breakpoint_at): Update handler type.
7181 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
7182 * win32-low.c (auto_delete_breakpoint): New.
7183 (get_child_debug_event): Use it.
7185 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
7187 * configure.ac: Check for pread and pwrite.
7188 * hostio.c (handle_pread): Fall back to lseek and read.
7189 (handle_pwrite): Fall back to lseek and write.
7190 * config.in, configure: Regenerated.
7192 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
7194 * server.c (myresume): Add own_buf argument.
7195 (main): Update calls.
7197 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
7199 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
7200 * remote-utils.c (remote_open): Do not call disable_async_io.
7201 (block_async_io): Delete.
7202 (unblock_async_io): Make static.
7203 (initialize_async_io): New.
7204 * server.c (handle_v_cont): Handle async I/O here.
7205 (myresume): Likewise. Move other common resume tasks here...
7206 (main): ... from here. Call initialize_async_io. Disable async
7207 I/O before the main loop.
7208 * server.h (initialize_async_io): Declare.
7209 (block_async_io, unblock_async_io): Delete prototypes.
7210 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
7212 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
7214 * remote-utils.c (readchar): Allow binary data in received messages.
7216 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7218 * win32-low.c (attaching): New global.
7219 (win32_create_inferior): Clear the `attaching' global.
7220 (win32_attach): Set the `attaching' global.
7221 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
7222 attaching. Only set a breakpoint at the entry point if not
7225 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7227 * server.c (main): Don't report dll events on the initial
7228 connection on attaches.
7230 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7232 * server.c (main): Relax numerical bases supported for the pid of
7233 the --attach command line argument.
7235 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7237 * win32-low.c (win32_attach): Call OpenProcess before
7238 DebugActiveProcess, not after. Add last error output to error
7241 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7243 * win32-low.c (win32_get_thread_context)
7244 (win32_set_thread_context): New functions.
7245 (thread_rec): Use win32_get_thread_context.
7246 (continue_one_thread, win32_resume): Use win32_set_thread_context.
7247 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
7250 2007-12-03 Leo Zayas
7251 Pedro Alves <pedro_alves@portugalmail.pt>
7253 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
7255 (child_add_thread): Minor cleanup.
7256 (child_continue): Resume artificially suspended threads before
7257 calling ContinueDebugEvent.
7258 (suspend_one_thread): New.
7259 (fake_breakpoint_event): New.
7260 (get_child_debug_event): Change return type to int. Check here if
7261 gdb sent an interrupt request. If a soft interrupt was requested,
7262 fake a breakpoint event. Return 0 if there is no event to handle,
7264 (win32_wait): Don't check here if gdb sent an interrupt request.
7265 Ensure there is a valid event to handle.
7266 (win32_request_interrupt): Add soft interruption method as last
7269 2007-12-03 Leo Zayas
7270 Pedro Alves <pedro_alves@portugalmail.pt>
7272 * win32-low.h (win32_thread_info): Add descriptions to the
7273 structure members. Replace `suspend_count' counter by a
7275 * win32-low.c (thread_rec): Update condition of when to get the
7276 context from the inferior. Rely on ContextFlags being set if it
7277 has already been retrieved. Only suspend the inferior thread if
7278 we haven't already. Warn if that fails.
7279 (continue_one_thread): s/suspend_count/suspended/. Only call
7280 ResumeThread once. Warn if that fails.
7282 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
7284 * win32-low.c (win32_wait): Don't read from the inferior when it
7287 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
7289 * Makefile.in (win32_low_h): New variable.
7290 (win32-low.o): Add dependency on $(win32_low_h).
7291 (win32-arm-low.o, win32-i386-low.o): New rules.
7293 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
7295 * hostio.c: Correct copyright year.
7297 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
7299 * Makefile.in (OBS): Add hostio.o.
7300 (hostio.o): New rule.
7301 * server.h (handle_vFile): Declare.
7302 * hostio.c: New file.
7303 * server.c (handle_v_requests): Take packet_len and new_packet_len
7304 for binary packets. Call handle_vFile.
7305 (main): Update call to handle_v_requests.
7307 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
7309 * linux-low.c: Include <sched.h>.
7311 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
7313 * linux-low.c (linux_tracefork_grandchild): New.
7314 (linux_tracefork_child): Use clone.
7315 (linux_test_for_tracefork): Use clone; allocate and free a stack.
7317 2007-10-31 Joel Brobecker <brobecker@adacore.com>
7319 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
7321 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
7323 * linux-low.c (handle_extended_wait): Handle unexpected signals.
7325 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
7327 * inferiors.c (change_inferior_id): Delete.
7328 (add_pid_to_list, pull_pid_from_list): New.
7329 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
7330 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
7331 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
7332 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
7333 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
7334 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
7335 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
7336 (using_threads): Always set to 1.
7337 (handle_extended_wait): New.
7338 (add_process): Do not set TID.
7339 (linux_create_inferior): Set must_set_ptrace_flags.
7340 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
7341 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
7342 (linux_thread_alive): Rename TID argument to LWPID.
7343 (linux_wait_for_process): Handle unknown processes. Do not use TID.
7344 (linux_wait_for_event): Do not use TID or check using_threads. Update
7345 call to dead_thread_notify. Call handle_extended_wait.
7346 (linux_create_inferior): Use PTRACE_SETOPTIONS.
7347 (send_sigstop): Delete sigstop_sent.
7348 (wait_for_sigstop): Avoid TID.
7349 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
7350 (linux_test_for_tracefork): New.
7351 (linux_lookup_signals): Use thread_db_active and
7352 linux_supports_tracefork_flag.
7353 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
7354 * linux-low.h (get_process_thread): Avoid TID.
7355 (struct process_ifo): Move thread_known and tid to the end. Remove
7357 (linux_attach_lwp, thread_db_init): Update prototypes.
7358 * server.h (change_inferior_id): Delete prototype.
7359 (add_pid_to_list, pull_pid_from_list): New prototypes.
7360 * thread-db.c (thread_db_use_events): New.
7361 (find_first_thread): Rename to...
7362 (find_one_thread): ...this. Update callers and messages. Do not
7363 call fatal. Check thread_db_use_events. Do not call
7364 change_inferior_id or new_thread_notify.
7365 (maybe_attach_thread): Update. Do not call new_thread_notify.
7366 (thread_db_init): Set thread_db_use_events. Check use_events.
7367 * utils.c (fatal, warning): Correct message prefix.
7369 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
7371 * Makefile.in (clean): Remove new files.
7372 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
7373 (powerpc-64.o, powerpc-64.c): New rules.
7374 * configure.srv: Use alternate register sets for powerpc64-*-linux*
7375 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
7377 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
7379 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
7380 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
7381 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
7382 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
7383 (target_regsets): Add AltiVec and SPE register sets.
7384 * configure.ac: Check for AltiVec and SPE.
7385 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
7386 (ppc_fill_vrregset, ppc_store_vrregset): New.
7387 (target_regsets): Add AltiVec register set.
7388 * configure: Regenerated.
7390 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
7392 * linux-low.c (O_LARGEFILE): Define.
7393 (linux_read_memory): Use /proc/PID/mem.
7394 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
7395 * configure, config.in: Regenerated.
7397 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7399 * linux-low.c (linux_wait_for_event): Do not pass signals while
7402 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
7404 * win32-low.c (create_process): New.
7405 (win32_create_inferior): Use create_process instead of
7406 CreateProcess. If create_process failed retry appending an ".exe"
7407 suffix. Store the GetLastError result immediatelly after
7408 create_process calls and use it on the call to error.
7410 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
7412 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
7414 2007-08-23 Joel Brobecker <brobecker@adacore.com>
7416 * configure.ac: Switch license to GPLv3.
7418 2007-08-01 Michael Snyder <msnyder@access-company.com>
7420 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
7422 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
7424 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
7426 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
7427 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
7428 CloseToolhelp32Snapshot.
7429 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
7430 CloseToolhelp32Snapshot.
7432 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
7434 * server.c (main): Check for inferior exit before main loop.
7436 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
7438 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
7439 instead of on tmp_desc.
7441 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
7442 Daniel Jacobowitz <dan@codesourcery.com>
7444 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
7445 (add_thread): Minor cleanups.
7446 (clear_inferiors): Move lower in the file. Clear the DLL
7448 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
7449 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
7450 (xml_escape_text): New.
7451 * server.c (handle_query): Handle qXfer:libraries:read. Report it
7453 (handle_v_cont): Report errors.
7454 (gdbserver_version): Update.
7455 (main): Correct size of own_buf. Do not report initial DLL events.
7456 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
7457 (unloaded_dll, xml_escape_text): New.
7458 * win32-low.c (enum target_waitkind): Update comments.
7459 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
7460 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
7461 (win32_EnumProcessModules, win32_GetModuleInformation)
7462 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
7463 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
7464 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
7465 (win32_Module32First, win32_Module32Next, load_toolhelp)
7466 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
7467 (get_child_debug_event): Handle DLL events.
7468 (win32_wait): Likewise.
7470 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7472 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
7473 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
7475 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7477 * win32-low.c (handle_output_debug_string): Ignore event if not
7480 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7482 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
7484 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
7486 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
7488 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
7490 * inferiors.c (change_inferior_id): Add comment.
7491 * linux-low.c (check_removed_breakpoint): Add an early
7492 prototype. Improve debug output.
7493 (linux_attach): Doc update.
7494 (linux_detach_one_process, linux_detach): Clean up before releasing
7496 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
7497 * linux-low.h (struct process_info): Doc improvement.
7498 * mem-break.c (delete_all_breakpoints): New.
7499 * mem-break.h (delete_all_breakpoints): New prototype.
7500 * thread-db.c (find_first_thread): New.
7501 (thread_db_create_event): Call it instead of
7502 thread_db_find_new_threads. Clean up unused variables.
7503 (maybe_attach_thread): Remove first thread handling.
7504 (thread_db_find_new_threads): Use find_first_thread.
7505 (thread_db_get_tls_address): Likewise.
7507 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
7509 * thread-db.c (thread_db_find_new_threads): Add prototype.
7510 (thread_db_create_event): Check for the main thread before adding
7512 (maybe_attach_thread): Only enable event reporting if TID == 0.
7513 (thread_db_get_tls_address): Check for new threads.
7515 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
7517 * linux-low.c (linux_create_inferior): Try execv before execvp.
7518 * spu-low.c (spu_create_inferior): Likewise.
7520 2007-06-13 Mike Frysinger <vapier@gentoo.org>
7522 * linux-low.c (linux_create_inferior): Change execv to execvp.
7523 * spu-low.c (spu_create_inferior): Likewies.
7525 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
7527 * Makefile.in (clean): Clean new files instead of deleted ones.
7528 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
7529 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
7531 * configure.srv: Specify XML files and new regformats for MIPS and
7533 * linux-mips-low.c (mips_num_regs): Set to only used registers.
7534 (mips_regmap): Do not fetch $0. Remove unused registers. Add
7535 an entry for the restart register.
7536 (mips_cannot_fetch_register, mips_cannot_store_register)
7537 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
7538 register names to match the XML descriptions.
7539 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
7540 restart register instead of $0.
7542 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7543 Markus Deuling <deuling@de.ibm.com>
7545 * remote-utils.c (decode_xfer_write): New function.
7546 * server.h (decode_xfer_write): Add prototype.
7547 * server.c (handle_query): Add PACKET_LEN argument. Support
7548 qXfer:spu:read and qXfer:spu:write packets.
7549 (main): Pass packet_len to handle_query.
7550 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
7551 * target.h (target_ops): Add qxfer_spu.
7553 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7555 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
7556 accessing non-seekable spufs files.
7558 2007-05-16 Markus Deuling <deuling@de.ibm.com>
7560 * server.c (handle_query): Add reply for qC packet.
7562 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7563 Leo Zayas <lerele@champenstudios@com>
7565 * server.h (check_remote_input_interrupt_request): New function.
7566 * remote_utils.c (INVALID_DESCRIPTOR): New define.
7567 (remote_desc): Initialize with INVALID_DESCRIPTOR.
7568 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
7569 (check_remote_input_interrupt_request): New function.
7570 * server.h (check_remote_input_interrupt_request): Declare.
7571 * win32-low.c (winapi_DebugBreakProcess,
7572 winapi_GenerateConsoleCtrlEvent): New typedefs.
7573 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
7575 (win32_wait): Check for remote interrupt request
7576 with check_remote_input_interrupt_request.
7577 (win32_request_interrupt): New function.
7578 (win32_target_op): Set request_interrupt to win32_request_interrupt.
7580 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7582 * win32-low.c (debug_registers_changed,
7583 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
7584 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
7585 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
7586 (thread_rec): Get context using the low target.
7587 (child_add_thread): Call thread_added on the low target,
7588 which does the same thing.
7590 (do_initial_child_stuff): Remove debug registers references.
7591 Set context using the low target. Resume threads after
7592 setting the contexts.
7593 (child_continue): Remove dead variable. Remove debug
7594 registers references.
7595 (child_fetch_inferior_registers): Go through the low target.
7596 (do_child_store_inferior_registers): Remove.
7597 (child_store_inferior_registers): Go through the low target.
7598 (win32_resume): Remove debug registers references.
7599 Set context using the low target.
7600 (handle_exception): Change return type to void. Don't record
7601 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
7602 first chance exception.
7603 (get_child_debug_event): Change return type to void. Remove
7604 goto loop. Always return after waiting for debug event.
7605 (win32_wait): Convert to switch statement. Handle spurious
7608 * win32-i386-low.c (debug_registers_changed,
7609 debug_registers_used): New.
7610 (initial_stuff): Rename to ...
7611 (i386_initial_stuff): ... this. Clear debug registers
7613 (store_debug_registers): Delete.
7614 (i386_get_thread_context): New.
7615 (load_debug_registers): Delete.
7616 (i386_set_thread_context): New.
7617 (i386_thread_added): New.
7618 (single_step): Rename to ...
7619 (i386_single_step): ... this.
7620 (do_fetch_inferior_registers): Rename to ...
7621 (i386_fetch_inferior_register): ... this.
7622 (i386_store_inferior_register): New.
7623 (the_low_target): Adapt to new interface.
7625 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
7626 (arm_get_thread_context): New.
7627 (arm_set_thread_context): New.
7629 (do_fetch_inferior_registers): Rename to ...
7630 (arm_fetch_inferior_register): ... this.
7631 (arm_store_inferior_register): New.
7632 (arm_wince_breakpoint): Reimplement as unsigned long.
7633 (arm_wince_breakpoint_len): Define.
7634 (the_low_target): Adapt to new interface.
7636 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
7637 load_debug_registers. Add get_thread_context, set_thread_context,
7638 thread_added and store_inferior_register. Rename
7639 fetch_inferior_registers to fetch_inferior_register.
7640 (regptr): Remove declaration.
7642 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7644 * linux-low.c (linux_detach): Change return type to int. Return 0.
7645 * spu-low.c (spu_detach): Likewise.
7647 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7649 * target.h (target_ops): Change return type of detach to int.
7651 (join_inferior): New.
7652 * server.c (main): Don't skip detach support on mingw32.
7653 If the inferior doesn't support detaching return error.
7654 Call join_inferior instead of using waitpid.
7655 * linux-low.c (linux_join): New.
7656 (linux_target_op): Add linux_join.
7657 * spu-low.c (spu_join): New.
7658 (spu_target_ops): Add spu_join.
7659 * win32-low.c (win32_detach): Adapt to new interface.
7660 Reopen current_process_handle before detaching. Issue a child
7661 resume before detaching.
7663 (win32_target_op): Add win32_join.
7665 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7667 * win32-low.c (win32-attach): Fix return value.
7668 * target.h (target_ops): Describe ATTACH return values.
7670 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7672 * win32-low.c (GETPROCADDRESS): Define.
7673 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
7674 (winapi_DebugSetProcessKillOnExit): Likewise.
7675 (win32_create_inferior): Force usage of ansi CreateProcessA.
7676 (win32_attach): Use GETPROCADDRESS.
7677 (win32_detach): Likewise.
7679 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7681 * win32-low.c (win32_wait): Don't use WSTOPSIG.
7683 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
7685 * win32-low.c: Commit leftover changes from 2007-03-29.
7687 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7689 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
7690 fields short instead of int. Add explicit padding.
7691 (i387_cache_to_fsave): Remove unnecessary casts.
7692 (i387_fsave_to_cache): Doc fix.
7693 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
7695 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7697 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
7698 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
7700 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7702 * configure.srv (arm*-*-mingw32ce*): Move near the other
7705 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7707 * configure.ac: Add errno checking.
7708 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
7709 sys/file.h and malloc.h.
7710 (AC_CHECK_DECLS): Add perror.
7711 (srv_mingwce): Handle.
7712 * configure.srv (i[34567]86-*-cygwin*): Add
7713 win32-i386-low.o to srv_tgtobj.
7714 (i[34567]86-*-mingw*): Likewise.
7715 (arm*-*-mingw32ce*): Add case.
7716 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7717 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
7718 [__MINGW32CE__] (strerror): New function.
7719 [__MINGW32CE__] (errno): Define to GetLastError.
7720 [__MINGW32CE__] (COUNTOF): New macro.
7721 (remote_open): Remove extra close call.
7722 * mem-break.c (delete_breakpoint_at): New function.
7723 * mem-break.h (delete_breakpoint_at): Declare.
7724 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7725 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
7726 [USE_WIN32API] (read, write): Add char* casts.
7727 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
7728 * server.h: Include wincecompat.h on Windows CE.
7729 [HAVE_ERRNO_H]: Check.
7730 (perror): Declare if not declared.
7731 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
7732 (perror_with_name): Remove errno declaration.
7733 * wincecompat.h: New.
7734 * wincecompat.c: New.
7736 * win32-arm-low.c: New.
7737 * win32-i386-low.c: New.
7738 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
7739 (OUTMSG2): Make it safe.
7741 (COUNTOF): New macro.
7742 (NUM_REGS): Get it from the low target.
7743 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
7744 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
7745 (thread_rec): Let low target handle debug registers.
7746 (child_add_thread): Likewise.
7747 (child_init_thread_list): Likewise.
7748 (continue_one_thread): Likewise.
7750 (do_child_fetch_inferior_registers): Move to ...
7751 * win32-i386-low.c: ... here, and rename to ...
7752 (do_fetch_inferior_registers): ... this.
7753 * win32-low.c (child_fetch_inferior_registers):
7754 Go through the low target.
7755 (do_child_store_inferior_registers): Use regptr.
7756 (strwinerror): New function.
7757 (win32_create_inferior): Handle Windows CE.
7758 Use strwinerror instead of strerror on Windows error
7759 codes. Add program to the error output.
7760 Don't close the main thread handle on Windows CE.
7761 (win32_attach): Use coredll.dll on Windows CE.
7762 (win32_kill): Close current process and current
7764 (win32_detach): Use coredll.dll on Windows CE.
7765 (win32_resume): Let low target handle debug registers, and
7767 (handle_exception): Add/Remove initial breakpoint. Avoid
7768 non-existant WSTOPSIG on Windows CE.
7769 (win32_read_inferior_memory): Cast to remove warning.
7770 (win32_arch_string): Go through the low target.
7771 (initialize_low): Call set_breakpoint_data with the low
7772 target's breakpoint.
7773 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
7774 FOP_REGNUM, mappings): Move to ...
7775 * win32-i386-low.c: ... here.
7776 * win32-low.c (win32_thread_info): Move to ...
7777 * win32-low.h: ... here.
7778 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
7779 win32-arm-low.c and wincecompat.c.
7780 (all:): Add $EXEEXT.
7781 (install-only:): Likewise.
7782 (gdbserver:): Likewise.
7783 (gdbreplay:): Likewise.
7784 * config.in: Regenerate.
7785 * configure: Regenerate.
7787 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7789 * win32-low.c: Rename typedef thread_info to
7790 win32_thread_info throughout.
7792 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7794 * win32-i386-low.c: Rename to ...
7795 * win32-low.c: ... this.
7796 * configure.srv: Replace win32-i386-low.o with win32-low.o.
7797 * Makefile.in: Likewise.
7799 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
7801 * remote-utils.c (monitor_output): Constify msg parameter.
7802 * server.h (monitor_output): Likewise.
7803 * win32-i386-low.c (handle_output_debug_string): New.
7804 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
7805 handle_output_debug_string.
7806 (get_child_debug_event): Likewise.
7808 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
7810 * server.c (main): Correct strtoul check.
7812 2007-03-27 Jon Ringle <jon@ringle.org>
7814 * linux-low.c: Check __ARCH_HAS_MMU__ also.
7816 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
7818 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
7820 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
7822 * terminal.h: Check HAVE_SGTTY_H.
7824 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
7826 * remote-utils.c (remote_open): Print out the assigned port number.
7828 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
7830 * remote-utils.c (monitor_output): New function.
7831 * server.c (debug_threads): Define here.
7832 (monitor_show_help): New function.
7833 (handle_query): Handle qRcmd.
7834 (main): Do not handle 'd' packet.
7835 * server.h (debug_threads, remote_debug, monitor_output): Declare.
7836 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
7839 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7841 * Makefile.in (EXEEXT): New.
7842 (clean): Use $(EXEEXT).
7844 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7846 * target.h (target_ops): Rename send_signal to request_interrupt,
7847 and remove enum target_signal parameter.
7848 * linux-low.c (linux_request_interrupt): Rename from
7849 linux_send_signal, and always send SIGINT.
7850 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
7851 and always send SIGINT.
7852 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
7854 (input_interrupt): Likewise.
7856 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7858 * server.c (get_features_xml): Check if target implemented
7860 * win32-i386-low.c (win32_arch_string): New.
7861 (win32_target_ops): Add win32_arch_string as arch_string member.
7863 2007-02-22 Markus Deuling <deuling@de.ibm.com>
7865 * spu-low.c (spu_arch_string): New.
7866 (spu_target_ops): Add spu_arch_string.
7868 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
7870 * remote-utils.c: Remove HAVE_TERMINAL_H check.
7871 * configure.ac: Do not check for terminal.h.
7872 * configure, config.in: Regenerated.
7874 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7876 * Makefile.in (OBS): Add $(XML_BUILTIN).
7877 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
7879 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
7880 (arm-with-iwmmxt.c): New.
7881 * config.in, configure: Regenerate.
7882 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
7883 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
7884 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
7885 (arm*-*-linux*): Add iWMMXt and regset support.
7886 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
7887 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
7888 (arm_store_wmmxregset, target_regsets): New.
7889 * server.c (get_features_xml): Take annex argument. Check builtin
7891 (handle_query): Handle multiple annexes.
7893 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7895 * remote-utils.c [USE_WIN32API] (read, write): Define.
7896 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
7899 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
7901 * linux-i386-low.c (the_low_target): Set arch_string.
7902 * linux-x86-64-low.c (the_low_target): Likewise.
7903 * linux-low.c (linux_arch_string): New.
7904 (linux_target_ops): Add it.
7905 * linux-low.h (struct linux_target_ops): Add arch_string.
7906 * server.c (write_qxfer_response): Use const void * for DATA.
7907 (get_features_xml): New.
7908 (handle_query): Handle qXfer:features:read. Report it for qSupported.
7909 * target.h (struct target_ops): Add arch_string method.
7911 2007-01-03 Denis Pilat <denis.pilat@st.com>
7912 Daniel Jacobowitz <dan@codesourcery.com>
7914 * linux-low.c (linux_kill): Handle being called with no threads.
7915 * win32-i386-low.c (win32_kill): Likewise.
7916 (get_child_debug_event): Clear current_process_handle.
7918 2006-12-30 Denis PILAT <denis.pilat@st.com>
7919 Daniel Jacobowitz <dan@codesourcery.com>
7921 * remote-utils.c (remote_open): Check the type of specified
7922 serial port devices before opening them.
7923 * server.c (main): Kill the inferior if an error occurs during
7924 the first remote_open.
7926 2006-12-05 Markus Deuling <deuling@de.ibm.com>
7928 * README: Update supported targets.
7930 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
7932 * Makefile.in (clean): Remove reg-mips64.c.
7933 (reg-mips64.c, reg-mips64.o): New rules.
7934 * configure.srv: Handle mips64. Include regset support for mips.
7935 * linux-mips-low.c (union mips_register): New.
7936 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
7937 (mips_breakpoint, mips_breakpoint_at): Use int.
7938 (mips_collect_register, mips_supply_register)
7939 (mips_collect_register_32bit, mips_supply_register_32bit)
7940 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7941 (mips_store_fpregset, target_regsets): New.
7942 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
7944 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
7946 * configure.srv: Add target "spu*-*-*".
7947 * Makefile.in (clean): Remove reg-spu.c.
7948 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
7949 * spu-low.c: New file.
7951 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7953 * configure.ac: Correct td_thr_tls_get_addr test.
7954 * configure: Regenerated.
7956 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7958 * linux-low.c (linux_wait_for_event): Reformat. Use the
7960 * remote-utils.c (decode_address_to_semicolon): New.
7961 * server.c (pass_signals, handle_general_set): New.
7962 (handle_query): Mention QPassSignals for qSupported.
7963 (main): Call handle_general_set.
7964 * server.h (pass_signals, decode_address_to_semicolon): New.
7966 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
7968 * server.c (handle_query): Correct error handling for read_auxv.
7970 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
7972 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
7973 and srv_linux_thread_db to yes.
7974 * linux-s390-low.c (s390_fill_gregset): New function.
7975 (target_regsets): Define data structure.
7977 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
7979 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
7980 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
7981 * config.in, configure: Regenerated.
7982 * inferiors.c (gdb_id_to_thread): New function.
7983 (gdb_id_to_thread_id): Use it.
7984 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
7985 * linux-low.h (struct process_info): Add th member.
7986 (thread_db_get_tls_address): New prototype.
7987 * remote-utils.c (decode_address): Make non-static.
7988 * server.c (handle_query): Handle qGetTLSAddr.
7989 * server.h (gdb_id_to_thread, decode_address): New prototypes.
7990 * target.h (struct target_ops): Add get_tls_address.
7991 * thread-db.c (maybe_attach_thread): Save the thread handle.
7992 (thread_db_get_tls_address): New.
7994 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
7996 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
7997 (linux_resume_one_process): Take a siginfo_t *. Update all
7998 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
7999 (struct pending_signals): Add a siginfo_t.
8000 (linux_wait_for_process): Always set last_status.
8001 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
8002 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
8003 * linux-low.h (struct process_info): Add last_status.
8005 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
8007 * remote-utils.c (try_rle): New function.
8008 (putpkt_binary): Use it.
8010 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
8012 * Makefile.in (clean): Clean reg-x86-64-linux.c.
8013 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
8014 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
8015 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
8016 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
8019 2006-08-08 Richard Sandiford <richard@codesourcery.com>
8021 * server.c (terminal_fd): New variable.
8022 (old_foreground_pgrp): Likewise.
8023 (restore_old_foreground_pgrp): New function.
8024 (start_inferior): Record the terminal file descriptor in terminal_fd
8025 and its original foreground group in old_foreground_pgrp. Register
8026 restore_old_foreground_pgrp with atexit().
8028 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
8030 * server.c (handle_query): Correct qPart to qXfer.
8032 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
8034 * configure.ac: Check for more headers which are missing on
8035 Windows. Automatically supply -lwsock32 and USE_WIN32API.
8036 * configure.srv: Add Cygwin and mingw32.
8037 * remote-utils.c: Don't include headers unconditionally which
8038 are missing on mingw32. Include <winsock.h> for mingw32.
8039 (remote_open): Adjust for mingw32 support. Flush
8040 standard error after writing to it.
8041 (remote_close, putpkt_binary, input_interrupt, block_async_io)
8042 (unblock_async_io, enable_async_io, disable_async_io)
8043 (readchar, getpkt): Update for Winsock support.
8044 (prepare_resume_reply): Expect a protocol signal number.
8045 * server.c: Disable <sys/wait.h> on mingw32.
8046 (start_inferior): Adjust for mingw32 support. Flush
8047 standard error after writing to it.
8048 (attach_inferior): Likewise. Use protocol signal
8050 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
8052 * win32-i386-low.c: New file.
8053 * Makefile.in (XM_CLIBS): Set.
8054 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
8055 (win32-i386-low.o): New dependency rule.
8056 * linux-low.c (linux_wait): Use target signal numbers.
8057 * target.h (struct target_ops): Doc fix.
8058 * server.h (target_signal_to_name): New prototype.
8059 * gdbreplay.c: Don't include headers unconditionally which
8060 are missing on mingw32. Include <winsock.h> for mingw32.
8061 (remote_close, remote_open): Adjust for Winsock support.
8062 * configure, config.in: Regenerated.
8064 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8066 * server.c (decode_xfer_read, write_qxfer_response): New.
8067 (handle_query): Take a packet length argument. Handle
8068 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
8069 the qSupported response.
8070 (main): Update call to handle_query.
8072 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
8074 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
8075 (putpkt_binary): Renamed from putpkt and adjusted for binary
8077 (putpkt): New wrapper for putpkt_binary.
8078 (readchar): Don't mask off the high bit.
8079 (decode_X_packet): New function.
8080 * server.c (main): Call putpkt_binary if a handler sets the packet
8081 length. Save the length of the incoming packet. Handle 'X'.
8082 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
8084 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
8086 * server.c (handle_query): Handle qSupported.
8088 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
8090 * remote-utils.c (all_symbols_looked_up): New variable.
8091 (look_up_one_symbol): Check it.
8092 * server.h (look_up_one_symbol): New declaration.
8093 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
8095 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
8097 * Makefile.in (linux-arm-low.o): Update dependencies.
8098 * linux-arm-low.c: Include "gdb_proc_service.h".
8099 (PTRACE_GET_THREAD_AREA): Define.
8100 (ps_get_thread_area): New function.
8102 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
8104 * configure.srv (m68k*-*-uclinux*): New target.
8105 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
8106 (linux_resume_one_process): Remove extraneous cast.
8107 (linux_read_offsets): New.
8108 (linux_target_op): Add linux_read_offsets on mmuless systems.
8109 * server.c (handle_query): Add qOffsets logic.
8110 * target.h (struct target_ops): Add read_offsets.
8112 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
8114 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
8115 (PTRACE_GET_THREAD_AREA): Define.
8116 (ps_get_thread_area): New function.
8117 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
8118 (linux-x86-64-low.o): Update.
8120 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
8122 * configure.ac: Remove checks for prfpregset_t.
8123 * gdb_proc_service.h: New file.
8124 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
8125 new "gdb_proc_service.h".
8126 * proc-service.c: Likewise.
8127 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
8128 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
8129 * Makefile.in (gdb_proc_service_h): Updated.
8130 * configure, config.in: Regenerated.
8132 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
8134 * remote-utils.c (prepare_resume_reply): Move declaration
8135 of gdb_id_from_wait to the top of the block.
8137 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
8139 * linux-low.c (regsets_store_inferior_registers): Read the regset
8140 from the target before filling it.
8142 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
8144 * server.c (attach_inferior): Return SIGTRAP for a successful
8147 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8149 * Makefile.in (OBS): Add version.o.
8150 (STAGESTUFF): Delete.
8151 (version.o): Add dependencies.
8152 (version.c): Replace rule.
8153 (clean): Remove version.c.
8154 * server.c (gdbserver_version): New.
8155 (gdbserver_usage): Use printf.
8156 (main): Handle --version and --help.
8157 * server.h (version, host_name): Add declarations.
8159 2005-12-23 Eli Zaretskii <eliz@gnu.org>
8171 * linux-x86-64-low.c:
8174 * linux-ppc64-low.c:
8183 * linux-crisv32-low.c:
8195 * gdbserver.1: Add (C) after Copyright. Update the FSF
8198 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
8200 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
8201 (arm_breakpoint_at): Recognize both breakpoints.
8202 (the_low_target): Use the correct breakpoint instruction.
8204 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
8206 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
8207 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
8208 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
8209 (the_low_target): Update.
8211 2005-10-25 Andreas Schwab <schwab@suse.de>
8213 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
8215 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
8216 (ia64_num_regs): Reduce to 462.
8218 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
8220 * acinclude.m4: Correct quoting.
8221 * aclocal.m4: Regenerated.
8223 Suggested by SZOKOVACS Robert <szo@ies.hu>:
8224 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
8225 (thread_db_init): Call thread_db_err_str.
8226 * configure.ac: Check for TD_VERSION.
8227 * config.in, configure: Regenerated.
8229 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8231 * server.h (error, fatal, warning): Add ATTR_FORMAT.
8233 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8235 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
8236 is not available. Define HAVE_PTRACE_GETREGS if it is.
8237 * config.in, configure: Regenerated.
8238 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
8239 * linux-i386-low.c, linux-m68k-low.c: Update to use
8240 HAVE_PTRACE_GETREGS.
8241 * linux-low.c (regsets_fetch_inferior_registers)
8242 (regsets_store_inferior_registers): Only return 0 if we processed
8244 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
8245 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
8247 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8249 * inferiors.c (struct thread_info): Add gdb_id.
8250 (add_thread): Add gdb_id argument.
8251 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
8252 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
8253 calls to add_thread.
8254 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
8255 * server.c (handle_query): Use thread_to_gdb_id.
8256 (handle_v_cont, main): Use gdb_id_to_thread_id.
8257 * server.h (add_thread): Update prototype.
8258 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
8261 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8263 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
8264 left-padded registers.
8265 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
8266 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
8268 2005-07-01 Steve Ellcey <sje@cup.hp.com>
8270 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
8271 * configure: Regenerate.
8272 * config.in: Regenerate.
8273 * server.h (NEED_DECLARATION_STRERROR):
8274 Replace with !HAVE_DECL_STRERROR.
8276 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
8278 * linux-low.c (linux_wait, linux_send_signal): Don't test
8279 an unsigned long variable for > 0 if it could be MAX_ULONG.
8280 * server.c (myresume): Likewise.
8281 * target.c (set_desired_inferior): Likewise.
8283 2005-06-13 Mark Kettenis <kettenis@gnu.org>
8285 * configure.ac: Simplify and improve check for socklen_t.
8286 * configure, config.in: Regenerate.
8288 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
8290 * acconfig.h: Remove.
8291 * configure.ac: Add a test for socklen_t. Use three-argument
8292 AC_DEFINE throughout.
8293 * config.in: Regenerated using autoheader 2.59.
8294 * configure: Regenerated.
8296 * gdbreplay.c (socklen_t): Provide a default.
8297 (remote_open): Use socklen_t.
8298 * remote-utils.c (socklen_t): Provide a default.
8299 (remote_open): Use socklen_t.
8300 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
8303 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
8305 * linux-low.c (linux_read_memory, linux_write_memory)
8306 (linux_read_auxv): Likewise.
8307 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
8308 (check_mem_write): Likewise.
8309 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
8311 * regcache.c (struct inferior_rgcache_data, registers_to_string)
8312 (registers_from_string, register_data): Likewise.
8313 * server.c (handle_query, main): Likewise.
8314 * server.h (convert_ascii_to_int, convert_int_to_ascii)
8315 (decode_M_packet): Likewise.
8316 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
8317 * target.h (struct target_ops): Update read_memory, write_memory,
8319 (read_inferior_memory, write_inferior_memory): Update.
8320 * linux-low.h (struct linux_target_ops): Change type of breakpoint
8322 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
8323 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
8324 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
8325 linux-s390-low.c, linux-sh-low.c: Update for changes in
8326 read_inferior_memory and the_low_target->breakpoint.
8328 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
8330 * Makefile.in (SFILES): Add linux-ppc64-low.c.
8331 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
8332 * configure.srv: Add powerpc64-*-linux*.
8333 * linux-ppc64-low.c: New file.
8335 2005-05-23 Orjan Friberg <orjanf@axis.com>
8337 * linux-cris-low.c: New file with support for CRIS.
8338 * linux-crisv32-low.c: Ditto for CRISv32.
8339 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
8340 (clean): Add reg-cris.c and reg-crisv32.c.
8341 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
8342 reg-crisv32.o, and reg-crisv32.c to make rules.
8343 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
8346 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
8348 * linux-low.c (fetch_register): Ensure buffer size is a multiple
8349 of sizeof (PTRACE_XFER_TYPE).
8350 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
8352 2005-05-12 Orjan Friberg <orjanf@axis.com>
8354 * target.h (struct target_ops): Add insert_watchpoint,
8355 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
8356 pointers for hardware watchpoint support.
8357 * linux-low.h (struct linux_target_ops): Ditto.
8358 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
8359 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
8360 to linux_target_ops.
8361 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
8363 * server.c (main): Recognize 'Z' and 'z' packets.
8365 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
8367 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
8368 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
8369 (the_low_target): Add new members.
8371 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
8373 * proc-service.c (ps_lgetregs): Search all_processes instead of
8376 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
8378 * server.c (start_inferior): Change return type to int.
8379 (attach_inferior): Change sigptr to int *.
8380 (handle_v_cont, handle_v_requests): Change signal to int *.
8381 (main): Change signal to int.
8383 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
8385 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
8386 * configure.srv: Add m32r*-*-linux*.
8387 * linux-m32r-low.c: New file.
8389 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
8391 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
8393 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
8395 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
8396 Take unsigned long arguments for PIDs.
8397 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
8398 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
8399 (wait_for_sigstop, linux_resume_one_process)
8400 (regsets_fetch_inferior_registers, linux_send_signal)
8401 (linux_read_auxv): Likewise. Update the types of variables holding
8402 PIDs. Update format string specifiers.
8403 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
8404 * remote-utils.c (prepare_resume_reply): Likewise.
8405 * server.c (cont_thread, general_thread, step_thread)
8406 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
8408 (handle_query): Update format specifiers.
8409 (handle_v_cont, main): Use strtoul for thread IDs.
8410 * server.h (struct inferior_list_entry): Use unsigned long for ID.
8411 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
8412 (general_thread, step_thread, thread_from_wait)
8413 (old_thread_from_wait): Update.
8414 * target.h (struct thread_resume): Use unsigned long for THREAD.
8415 (struct target_ops): Use unsigned long for arguments to attach and
8418 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
8420 * acinclude.m4: Include bfd/bfd.m4 directly.
8421 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
8422 <agriffis@toolchain.org>.
8423 * aclocal.m4, configure: Regenerated.
8425 2005-01-07 Andrew Cagney <cagney@gnu.org>
8427 * configure.ac: Rename configure.in, require autoconf 2.59.
8428 * configure: Re-generate.
8430 2004-12-08 Daniel Jacobowitz <dan@debian.org>
8432 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
8434 * aclocal.m4: Regenerated.
8435 * configure: Regenerated.
8437 2004-11-21 Andreas Schwab <schwab@suse.de>
8439 * linux-m68k-low.c (m68k_num_gregs): Define.
8440 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
8441 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
8442 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
8443 (m68k_breakpoint_at): New. Add to the_low_target.
8445 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
8446 srv_linux_thread_db to yes.
8448 2004-10-20 Joel Brobecker <brobecker@gnat.com>
8450 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
8451 (ARCH_SET_FS): Likewise.
8452 (ARCH_GET_FS): Likewise.
8453 (ARCH_GET_GS): Likewise.
8455 2004-10-16 Daniel Jacobowitz <dan@debian.org>
8457 * linux-i386-low.c (ps_get_thread_area): New.
8458 * linux-x86-64-low.c (ps_get_thread_area): New.
8459 * linux-low.c: Include <sys/syscall.h>.
8460 (linux_kill_one_process): Don't kill the first thread here.
8461 (linux_kill): Kill the first thread here.
8462 (kill_lwp): New function.
8463 (send_sigstop, linux_send_signal): Use it.
8464 * proc-service.c: Clean up #ifdefs.
8465 (fpregset_info): Delete.
8466 (ps_lgetregs): Update and enable implementation.
8467 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
8469 * remote-utils.c (struct sym_cache, symbol_cache): New.
8470 (input_interrupt): Print a clearer message.
8471 (async_io_enabled): New variable.
8472 (enable_async_io, disable_async_io): Use it. Update comments.
8473 (look_up_one_symbol): Use the symbol cache.
8474 * thread-db.c (thread_db_look_up_symbols): New function.
8475 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
8477 2004-10-16 Daniel Jacobowitz <dan@debian.org>
8479 * configure.in: Test for -rdynamic.
8480 * configure: Regenerated.
8481 * Makefile (INTERNAL_LDFLAGS): New.
8482 (gdbserver, gdbreplay): Use it.
8484 2004-09-02 Andrew Cagney <cagney@gnu.org>
8486 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
8488 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
8490 * linux-low.c (linux_wait): Clear all_processes list also.
8492 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8494 * linux-low.c: Include <errno.h>. Remove extern declaration of
8497 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8499 * gdbreplay.c, server.h, utils.c: Update copyright years.
8501 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8503 * server.c (main): Print child status or termination signal from
8504 variable 'signal', not 'sig'.
8506 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8508 * linux-low.c (linux_read_memory): Change return type to
8509 int. Check for and return error from ptrace().
8510 * target.c (read_inferior_memory): Change return type to int. Pass
8511 back return status from the_target->read_memory().
8512 * target.h (struct target_ops): Adapt *read_memory() prototype.
8514 (read_inferior_memory): Adapt prototype.
8515 * server.c (main): Return an error packet if
8516 read_inferior_memory() returns an error.
8518 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
8520 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
8521 Unify with other clean targets.
8523 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8525 * server.c (handle_v_cont): Call set_desired_inferior.
8527 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8529 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
8531 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8533 * linux-low.c (linux_wait): Unblock async I/O.
8534 (linux_resume): Block and enable async I/O.
8535 * remote-utils.c (block_async_io, unblock_async_io): New functions.
8536 * server.h (block_async_io, unblock_async_io): Add prototypes.
8538 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8540 * remote-utils.c (remote_open): Print a status notice after
8542 * server.c (attach_inferior): Print a status notice after
8545 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8547 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
8549 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
8551 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
8553 * server.c, target.h: Update copyright years.
8555 2004-02-25 Roland McGrath <roland@redhat.com>
8557 * target.h (struct target_ops): New member `read_auxv'.
8558 * server.c (handle_query): Handle qPart:auxv:read: query using that.
8559 * linux-low.c (linux_read_auxv): New function.
8560 (linux_target_ops): Initialize `read_auxv' member to that.
8562 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8564 Committed by Jim Blandy <jimb@redhat.com>.
8566 * linux-s390-low.c (s390_num_regs): Update.
8567 (s390_regmap): Remove control registers. Use __s390x__ predefine
8568 instead of GPR_SIZE to distiguish s390 and s390x targets.
8570 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
8572 * linux-low.c: Update copyright year.
8573 (check_removed_breakpoint): Clear pending_is_breakpoint.
8574 (linux_set_resume_request, linux_queue_one_thread)
8575 (resume_status_pending_p): New functions.
8576 (linux_continue_one_thread): Use process->resume.
8577 (linux_resume): Only resume threads if there are no pending events.
8578 * linux-low.h (struct process_info): Add resume request
8581 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
8583 * regcache.c (new_register_cache): Clear the allocated register
8584 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
8586 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
8588 * linux-low.c (linux_resume): Take a struct thread_resume *
8590 (linux_wait): Update call.
8591 (resume_ptr): New static variable.
8592 (linux_continue_one_thread): Renamed from
8593 linux_continue_one_process. Use resume_ptr.
8594 (linux_resume): Use linux_continue_one_thread.
8595 * server.c (handle_v_cont, handle_v_requests): New functions.
8596 (myresume): New function.
8597 (main): Handle 'v' case.
8598 * target.h (struct thread_resume): New type.
8599 (struct target_ops): Change argument of "resume" to struct
8601 (myresume): Delete macro.
8603 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
8605 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
8606 (uninstall): Support DESTDIR.
8608 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
8610 * configure.srv: Add xscale*linux copy of arm*linux entry.
8612 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
8614 * linux-arm-low.c (arm_reinsert_addr): New function.
8615 (the_low_target): Add arm_reinsert_addr.
8617 2003-07-08 Mark Kettenis <kettenis@gnu.org>
8619 * mem-break.c: Remove whitespace at end of file.
8621 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8623 * configure.in: Check whether we need to prototype strerror.
8624 * server.h: Optionally prototype strerror.
8625 * gdbreplay.c (perror_with_name): Use strerror.
8626 * linux-low.c (linux_attach_lwp): Use strerror.
8627 * utils.c (perror_with_name): Use strerror.
8628 * config.in, configure: Regenerated.
8630 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8632 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
8633 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
8635 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
8637 * Makefile.in (SFILES): Update.
8638 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
8639 low-sun3.c: Remove files.
8641 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
8643 * linux-low.c: Move comment to linux_thread_alive where it belonged.
8644 (linux_detach_one_process, linux_detach): New functions.
8645 (linux_target_ops): Add linux_detach.
8646 * server.c (main): Handle 'D' packet.
8647 * target.h (struct target_ops): Add "detach" member.
8648 (detach_inferior): Define.
8650 2003-06-13 Mark Kettenis <kettenis@gnu.org>
8652 From Kelley Cook <kelleycook@wideopenwest.com>:
8653 * configure.srv: Accept i[34567]86 variants.
8655 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
8657 * linux-low.c (linux_wait_for_event): Correct comment typos.
8658 (linux_resume_one_process): Call check_removed_breakpoint.
8659 (linux_send_signal): New function.
8660 (linux_target_ops): Add linux_send_signal.
8661 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
8663 * target.h (struct target_ops): Add send_signal.
8665 2003-05-29 Jim Blandy <jimb@redhat.com>
8667 * linux-low.c (usr_store_inferior_registers): Transfer buf in
8668 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
8669 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
8670 away part of the register's value.
8672 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
8674 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
8675 (linux_wait_for_event, linux_init_signals): Likewise.
8677 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
8679 * configure.in: Check for stdlib.h.
8680 * configure: Regenerated.
8681 * config.in: Regenerated.
8683 2003-01-04 Andreas Schwab <schwab@suse.de>
8685 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
8687 2003-01-02 Andrew Cagney <ac131313@redhat.com>
8689 * Makefile.in: Remove obsolete code.
8691 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
8693 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
8694 defined(PT_FPR0_HI).
8696 2002-11-17 Stuart Hughes <seh@zee2.com>
8698 * linux-arm-low.c (arm_num_regs): Increase.
8699 (arm_regmap): Include status register.
8701 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
8703 * linux-low.c (register_addr): Remove incorrect -1 check.
8705 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
8707 * linux-low.c (linux_create_inferior): Call setpgid. Return
8709 (unstopped_p, linux_signal_pid): Remove.
8710 (linux_target_ops): Remove linux_signal_pid.
8711 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
8712 global instead of target method.
8713 * target.h (struct target_ops): Remove signal_pid. Update comment
8714 for create_inferior.
8715 * server.c (signal_pid): New variable.
8716 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
8717 gdbserver. Set the child to be the foreground process group.
8718 (attach_inferior): Set signal_pid.
8720 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
8722 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
8724 2002-08-20 Jim Blandy <jimb@redhat.com>
8726 * Makefile.in (LDFLAGS): Allow the configure script to establish a
8729 2002-08-01 Andrew Cagney <cagney@redhat.com>
8731 * Makefile.in: Make chill references obsolete.
8733 2002-07-24 Kevin Buettner <kevinb@redhat.com>
8735 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
8736 * configure: Regenerate.
8737 * config.in: Regenerate.
8739 2002-07-09 David O'Brien <obrien@FreeBSD.org>
8741 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
8742 (perror_with_name, remote_close, remote_open, expect, play): Static.
8744 2002-07-04 Michal Ludvig <mludvig@suse.cz>
8746 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
8747 byte offsets instead of an array of indexes.
8748 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
8750 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
8752 * regcache.c: Add comment.
8754 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
8756 * thread-db.c: New file.
8757 * proc-service.c: New file.
8758 * acinclude.m4: New file.
8759 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
8760 proc-service.o, and thread-db.o.
8761 (linux-low.o): Add USE_THREAD_DB.
8762 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
8763 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
8764 * aclocal.m4: Regenerated.
8765 * config.in: Regenerated.
8766 * configure: Regenerated.
8767 * configure.in: Check for proc_service.h, sys/procfs.h,
8768 thread_db.h, and linux/elf.h headrs.
8769 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
8770 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
8771 Check for -lthread_db and thread support.
8772 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
8773 PowerPC, and SuperH.
8774 * i387-fp.c: Constify arguments.
8775 * i387-fp.h: Likewise.
8776 * inferiors.c: (struct thread_info): Renamed from
8777 `struct inferior_info'. Remove PID member. Use generic inferior
8778 list header. All uses updated.
8779 (inferiors, signal_pid): Removed.
8780 (all_threads): New variable.
8781 (get_thread): Define.
8782 (add_inferior_to_list): New function.
8783 (for_each_inferior): New function.
8784 (change_inferior_id): New function.
8785 (add_inferior): Removed.
8786 (remove_inferior): New function.
8787 (add_thread): New function.
8788 (free_one_thread): New function.
8789 (remove_thread): New function.
8790 (clear_inferiors): Use for_each_inferior and free_one_thread.
8791 (find_inferior): New function.
8792 (find_inferior_id): New function.
8793 (inferior_target_data): Update argument type.
8794 (set_inferior_target_data): Likewise.
8795 (inferior_regcache_data): Likewise.
8796 (set_inferior_regcache_data): Likewise.
8797 * linux-low.c (linux_bp_reinsert): Remove.
8798 (all_processes, stopping_threads, using_thrads)
8799 (struct pending_signals, debug_threads, pid_of): New.
8800 (inferior_pid): Replace with macro.
8801 (struct inferior_linux_data): Remove.
8802 (get_stop_pc, add_process): New functions.
8803 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
8804 Use add_process and add_thread.
8805 (linux_attach_lwp): New function, based on old linux_attach. Use
8806 add_process and add_thread. Set stop_expected for new threads.
8807 (linux_attach): New function.
8808 (linux_kill_one_process): New function.
8809 (linux_kill): Kill all LWPs.
8810 (linux_thread_alive): Use find_inferior_id.
8811 (check_removed_breakpoints, status_pending_p): New functions.
8812 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
8813 Update. Use WNOHANG. Wait for cloned processes also. Update process
8814 struct for the found process.
8815 (linux_wait_for_event): New function.
8816 (linux_wait): Use it. Support LWPs.
8817 (send_sigstop, wait_for_sigstop, stop_all_processes)
8818 (linux_resume_one_process, linux_continue_one_process): New functions.
8819 (linux_resume): Support LWPs.
8820 (REGISTER_RAW_SIZE): Remove.
8821 (fetch_register): Use register_size instead. Call supply_register.
8822 (usr_store_inferior_registers): Likewise. Call collect_register.
8824 (regsets_fetch_inferior_registers): Improve error message.
8825 (regsets_store_inferior_registers): Add debugging.
8826 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
8827 (unstopped_p, linux_signal_pid): New functions.
8828 (linux_target_ops): Add linux_signal_pid.
8829 (linux_init_signals): New function.
8830 (initialize_low): Call it. Initialize using_threads.
8831 * regcache.c (inferior_regcache_data): Add valid
8833 (get_regcache): Fetch registers lazily. Add fetch argument
8834 and update all callers.
8835 (regcache_invalidate_one, regcache_invalidate): New
8837 (new_register_cache): Renamed from create_register_cache.
8838 Return the new regcache.
8839 (free_register_cache): Change argument to a void *.
8840 (registers_to_string, registers_from_string): Call get_regcache
8841 with fetch flag set.
8842 (register_data): Make static. Pass fetch flag to get_regcache.
8843 (supply_register): Call get_regcache with fetch flag clear.
8844 (collect_register): Call get_regcache with fetch flag set.
8845 (collect_register_as_string): New function.
8846 * regcache.h: Update.
8847 * remote-utils.c (putpkt): Flush after debug output and use
8849 Handle input interrupts while waiting for an ACK.
8850 (input_interrupt): Use signal_pid method.
8851 (getpkt): Flush after debug output and use stderr.
8852 (outreg): Use collect_register_as_string.
8853 (new_thread_notify, dead_thread_notify): New functions.
8854 (prepare_resume_reply): Check using_threads. Set thread_from_wait
8856 (look_up_one_symbol): Flush after debug output.
8857 * server.c (step_thread, server_waiting): New variables.
8858 (start_inferior): Don't use signal_pid. Update call to mywait.
8859 (attach_inferior): Update call to mywait.
8860 (handle_query): Handle qfThreadInfo and qsThreadInfo.
8861 (main): Don't fetch/store registers explicitly. Use
8862 set_desired_inferior. Support proposed ``Hs'' packet. Update
8865 (struct inferior_list, struct_inferior_list_entry): New.
8866 * target.c (set_desired_inferior): New.
8867 (write_inferior_memory): Constify.
8868 (mywait): New function.
8870 (struct target_ops): New signal_pid method.
8871 (mywait): Removed macro, added prototype.
8873 * linux-low.h (regset_func): Removed.
8874 (regset_fill_func, regset_store_func): New.
8875 (enum regset_type): New.
8876 (struct regset_info): Add type field. Use new operation types.
8877 (struct linux_target_ops): stop_pc renamed to get_pc.
8878 Add decr_pc_after_break and breakpoint_at.
8879 (get_process, get_thread_proess, get_process_thread)
8880 (strut process_info, all_processes, linux_attach_lwp)
8881 (thread_db_init): New.
8883 * linux-arm-low.c (arm_get_pc, arm_set_pc,
8884 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
8885 (the_low_target): Add new members.
8886 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
8887 (i386_store_fpxregset): Constify.
8888 (target_regsets): Add new kind identifier.
8889 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
8890 (i386_set_pc): Add debugging.
8891 (i386_breakpoint_at): New function.
8892 (the_low_target): Add new members.
8893 * linux-mips-low.c (mips_get_pc, mips_set_pc)
8894 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
8895 (mips_breakpoint_at): New.
8896 (the_low_target): Add new members.
8897 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
8898 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
8899 (the_low_target): Add new members.
8900 * linux-sh-low.c (sh_get_pc, sh_set_pc)
8901 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
8902 (the_low_target): Add new members.
8903 * linux-x86-64-low.c (target_regsets): Add new kind
8906 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
8908 From Martin Pool <mbp@samba.org>:
8909 * server.c (gdbserver_usage): New function.
8912 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
8914 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
8917 2002-05-04 Andrew Cagney <ac131313@redhat.com>
8919 * Makefile.in: Remove obsolete code.
8921 2002-04-24 Michal Ludvig <mludvig@suse.cz>
8923 * linux-low.c (regsets_fetch_inferior_registers),
8924 (regsets_store_inferior_registers): Removed cast to int from
8926 * regcache.h: Added declaration of struct inferior_info.
8928 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8930 * inferiors.c (struct inferior_info): Add regcache_data.
8931 (add_inferior): Call create_register_cache.
8932 (clear_inferiors): Call free_register_cache.
8933 (inferior_regcache_data, set_inferior_regcache_data): New functions.
8934 * regcache.c (struct inferior_regcache_data): New.
8935 (registers): Remove.
8936 (get_regcache): New function.
8937 (create_register_cache, free_register_cache): New functions.
8938 (set_register_cache): Don't initialize the register cache here.
8939 (registers_to_string, registers_from_string, register_data): Call
8941 * regcache.h: Add prototypes.
8942 * server.h: Likewise.
8944 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8946 * mem-break.c: New file.
8947 * mem-break.h: New file.
8948 * Makefile.in: Add mem-break.o rule; update server.h
8950 * inferiors.c (struct inferior_info): Add target_data
8952 (clear_inferiors): Free target_data member if set.
8953 (inferior_target_data, set_inferior_target_data): New functions.
8954 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
8955 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
8956 * linux-low.c (linux_bp_reinsert): New variable.
8957 (struct inferior_linux_data): New.
8958 (linux_create_inferior): Use set_inferior_target_data.
8959 (linux_attach): Likewise. Call add_inferior.
8960 (linux_wait_for_one_inferior): New function.
8961 (linux_wait): Call it.
8962 (linux_write_memory): Add const.
8963 (initialize_low): Call set_breakpoint_data.
8964 * linux-low.h (struct linux_target_ops): Add breakpoint
8966 * server.c (attach_inferior): Remove extra add_inferior
8968 * server.h: Include mem-break.h. Update inferior.c
8970 * target.c (read_inferior_memory)
8971 (write_inferior_memory): New functions.
8972 * target.h (read_inferior_memory)
8973 (write_inferior_memory): Change macros to prototypes.
8974 (struct target_ops): Update comments. Add const to write_memory
8977 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
8979 * linux-low.c (usr_store_inferior_registers): Support
8980 registers which are allowed to fail to store.
8981 * linux-low.h (linux_target_ops): Likewise.
8982 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
8983 (ppc_cannot_store_register): FPSCR may not be storable.
8985 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8987 * server.h: Include <string.h> if HAVE_STRING_H.
8988 * ChangeLog: Correct paths in last ChangeLog entry.
8990 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8992 * linux-low.h: Remove obsolete prototypes.
8993 (struct linux_target_ops): New.
8994 (extern the_low_target): New.
8995 * linux-low.c (num_regs, regmap): Remove declarations.
8996 (register_addr): Use the_low_target explicitly.
8997 (fetch_register): Likewise.
8998 (usr_fetch_inferior_registers): Likewise.
8999 (usr_store_inferior_registers): Likewise.
9000 * linux-arm-low.c (num_regs): Remove.
9001 (arm_num_regs): Define.
9002 (arm_regmap): Renamed from regmap, made static.
9003 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
9005 (arm_cannot_store_register): Renamed from cannot_store_register,
9007 (the_low_target): New.
9008 * linux-i386-low.c (num_regs): Remove.
9009 (i386_num_regs): Define.
9010 (i386_regmap): Renamed from regmap, made static.
9011 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
9013 (i386_cannot_store_register): Renamed from cannot_store_register,
9015 (the_low_target): New.
9016 * linux-ia64-low.c (num_regs): Remove.
9017 (ia64_num_regs): Define.
9018 (ia64_regmap): Renamed from regmap, made static.
9019 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
9021 (ia64_cannot_store_register): Renamed from cannot_store_register,
9023 (the_low_target): New.
9024 * linux-m68k-low.c (num_regs): Remove.
9025 (m68k_num_regs): Define.
9026 (m68k_regmap): Renamed from regmap, made static.
9027 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
9029 (m68k_cannot_store_register): Renamed from cannot_store_register,
9031 (the_low_target): New.
9032 * linux-mips-low.c (num_regs): Remove.
9033 (mips_num_regs): Define.
9034 (mips_regmap): Renamed from regmap, made static.
9035 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
9037 (mips_cannot_store_register): Renamed from cannot_store_register,
9039 (the_low_target): New.
9040 * linux-ppc-low.c (num_regs): Remove.
9041 (ppc_num_regs): Define.
9042 (ppc_regmap): Renamed from regmap, made static.
9043 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
9045 (ppc_cannot_store_register): Renamed from cannot_store_register,
9047 (the_low_target): New.
9048 * linux-s390-low.c (num_regs): Remove.
9049 (s390_num_regs): Define.
9050 (s390_regmap): Renamed from regmap, made static.
9051 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
9053 (s390_cannot_store_register): Renamed from cannot_store_register,
9055 (the_low_target): New.
9056 * linux-sh-low.c (num_regs): Remove.
9057 (sh_num_regs): Define.
9058 (sh_regmap): Renamed from regmap, made static.
9059 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
9061 (sh_cannot_store_register): Renamed from cannot_store_register,
9063 (the_low_target): New.
9064 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
9065 (the_low_target): New.
9067 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9069 * Makefile.in: Add stamp-h target.
9070 * configure.in: Create stamp-h.
9071 * configure: Regenerated.
9073 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9075 * inferiors.c: New file.
9076 * target.c: New file.
9077 * target.h: New file.
9078 * Makefile.in: Add target.o and inferiors.o. Update
9080 * linux-low.c (inferior_pid): New static variable,
9081 moved from server.c.
9082 (linux_create_inferior): Renamed from create_inferior.
9083 Call add_inferior. Return 0 on success instead of a PID.
9084 (linux_attach): Renamed from myattach.
9085 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
9086 (linux_thread_alive): Renamed from mythread_alive.
9087 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
9089 (linux_resume): Renamed from myresume. Add missing ``return 0''.
9090 (regsets_store_inferior_registers): Correct error message.
9091 Add missing ``return 0''.
9092 (linux_fetch_registers): Renamed from fetch_inferior_registers.
9093 (linux_store_registers): Renamed from store_inferior_registers.
9094 (linux_read_memory): Renamed from read_inferior_memory.
9095 (linux_write_memory): Renamed from write_inferior_memory.
9096 (linux_target_ops): New structure.
9097 (initialize_low): Call set_target_ops ().
9098 * remote-utils.c (unhexify): New function.
9099 (hexify): New function.
9100 (input_interrupt): Send signals to ``signal_pid''.
9101 * server.c (inferior_pid): Remove.
9102 (start_inferior): Update create_inferior call.
9103 (attach_inferior): Call add_inferior.
9104 (handle_query): New function.
9105 (main): Call handle_query for `q' packets.
9106 * server.h: Include "target.h". Remove obsolete prototypes.
9107 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
9109 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9111 * Makefile.in: Add WARN_CFLAGS. Update configury
9113 * configure.in: Check for <string.h>
9114 * configure: Regenerate.
9115 * config.in: Regenerate.
9116 * gdbreplay.c: Include needed system headers.
9117 (remote_open): Remove strchr prototype.
9118 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
9119 * regcache.c (supply_register): Change buf argument to const void *.
9120 (supply_register_by_name): Likewise.
9121 (collect_register): Change buf argument to void *.
9122 (collect_register_by_name): Likewise.
9123 * regcache.h: Add missing prototypes.
9124 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
9125 * server.c (handle_query): New function.
9126 (attached): New static variable, moved out of main.
9127 (main): Quiet longjmp clobber warnings.
9128 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
9129 * utils.c (error): Remove NORETURN.