1 2014-02-27 Pedro Alves <palves@redhat.com>
4 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8 (last_thread_of_process_p): Take a PID argument instead of a
10 (linux_wait_for_lwp): Delete.
11 (num_lwps, check_zombie_leaders, not_stopped_callback): New
13 (linux_low_filter_event): New function, party factored out from
15 (linux_wait_for_event): Rename to ...
16 (linux_wait_for_event_filtered): ... this. Add new filter ptid
17 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
18 sigsuspend. Check for zombie leaders.
19 (linux_wait_for_event): Reimplement as wrapper around
20 linux_wait_for_event_filtered.
21 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
22 a normal or signal exit is seen, it's the whole process exiting.
23 (wait_for_sigstop): No longer a for_each_inferior callback.
24 Rewrite on top of linux_wait_for_event_filtered.
25 (stop_all_lwps): Call wait_for_sigstop directly.
26 * server.c (resume, handle_target_event): Handle
27 TARGET_WAITKIND_NO_RESUMED.
29 2014-02-26 Joel Brobecker <brobecker@adacore.com>
31 * win32-low.c (psapi_get_dll_name,
32 * win32_CreateToolhelp32Snapshot): Delete.
33 (win32_CreateToolhelp32Snapshot, win32_Module32First)
34 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
36 (handle_load_dll): Add function description.
37 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
39 2014-02-26 Joel Brobecker <brobecker@adacore.com>
41 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
43 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
44 base address when calling win32_add_one_solib.
45 (handle_load_dll): Delete local variable load_addr.
46 Remove 0x1000 offset applied to DLL base address when calling
48 (handle_unload_dll): Add comment.
50 2014-02-26 Joel Brobecker <brobecker@adacore.com>
52 * win32-low.c (win32_add_all_dlls): Renames
53 win32_ensure_ntdll_loaded. Rewrite function documentation.
54 Adjust implementation to always load all DLLs.
55 Add 0x1000 offset to DLL base address when calling
57 (child_initialization_done): New static global.
58 (do_initial_child_stuff): Set child_initialization_done to
59 zero during child initialization, and 1 after. Replace call
60 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
62 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
63 (handle_unload_dll): Add function documentation.
64 (get_child_debug_event): Ignore load and unload DLL events
65 during child initialization.
67 2014-02-20 Doug Evans <dje@google.com>
69 Remove global all_lwps.
70 * inferiors.h (ptid_of): Move here from linux-low.h.
71 (pid_of, lwpid_of): Ditto.
72 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
73 parameter is a struct thread_info * now.
74 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
75 directly. Pass &all_threads to find_inferior instead of &all_lwps.
76 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
78 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
79 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
80 * linux-arm-low.c (update_registers_callback): Update, "entry"
81 parameter is a struct thread_info * now.
82 Fetch lwpid from current_inferior directly.
83 (arm_insert_point): Pass &all_threads to find_inferior instead of
85 (arm_remove_point): Ditto.
86 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
87 (arm_prepare_to_resume): Fetch pid from thread.
88 (arm_read_description): Fetch lwpid from current_inferior directly.
89 * linux-low.c (all_lwps): Delete.
90 (delete_lwp): Delete call to remove_inferior.
91 (handle_extended_wait): Fetch lwpid from thread.
92 (add_lwp): Don't set lwp->entry.id. Remove call to
94 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
95 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
96 (kill_one_lwp_callback): Ditto.
97 (linux_kill): Don't dereference NULL pointer.
98 Fetch ptid,lwpid from thread.
99 (get_detach_signal): Fetch ptid from thread.
100 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
101 Simplify call to regcache_invalidate_thread.
102 (delete_lwp_callback): Update, "entry" parameter is a
103 struct thread_info * now. Fetch pid from thread.
104 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
105 (status_pending_p_callback): Update, "entry" parameter is a
106 struct thread_info * now. Fetch ptid from thread.
107 (find_lwp_pid): Update, "entry" parameter is a
108 struct thread_info * now.
109 (linux_wait_for_lwp): Fetch pid from thread.
110 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
111 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
112 (enqueue_one_deferred_signal): Fetch lwpid from thread.
113 (dequeue_one_deferred_signal): Ditto.
114 (cancel_breakpoint): Fetch ptid from current_inferior.
115 (linux_wait_for_event): Pass &all_threads to find_inferior,
116 not &all_lwps. Fetch ptid, lwpid from thread.
117 (count_events_callback): Update, "entry" parameter is a
118 struct thread_info * now.
119 (select_singlestep_lwp_callback): Ditto.
120 (select_event_lwp_callback): Ditto.
121 (cancel_breakpoints_callback): Ditto.
122 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
124 (select_event_lwp): Ditto. Fetch ptid from event_thread.
125 (unsuspend_one_lwp): Update, "entry" parameter is a
126 struct thread_info * now.
127 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
129 (linux_stabilize_threads): Ditto. And for for_each_inferior.
130 Fetch lwpid from thread, not lwp.
131 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
132 Pass &all_threads to find_inferior, not &all_lwps.
133 (send_sigstop): Fetch lwpid from thread, not lwp.
134 (send_sigstop_callback): Update, "entry" parameter is a
135 struct thread_info * now.
136 (suspend_and_send_sigstop_callback): Ditto.
137 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
138 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
139 struct thread_info * now.
140 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
142 (lwp_running): Update, "entry" parameter is a
143 struct thread_info * now.
144 (stop_all_lwps): Fetch ptid from thread.
145 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
146 (linux_resume_one_lwp): Fetch lwpid from thread.
147 (linux_set_resume_request): Update, "entry" parameter is a
148 struct thread_info * now. Fetch pid, lwpid from thread.
149 (resume_status_pending_p): Update, "entry" parameter is a
150 struct thread_info * now.
151 (need_step_over_p): Ditto. Fetch lwpid from thread.
152 (start_step_over): Fetch lwpid from thread.
153 (linux_resume_one_thread): Update, "entry" parameter is a
154 struct thread_info * now. Fetch lwpid from thread.
155 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
156 (proceed_one_lwp): Update, "entry" parameter is a
157 struct thread_info * now. Fetch lwpid from thread.
158 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
159 struct thread_info * now.
160 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
161 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
162 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
164 (regsets_store_inferior_registers): Ditto.
165 (fetch_register, store_register): Ditto.
166 (linux_read_memory, linux_write_memory): Ditto.
167 (linux_request_interrupt): Ditto.
168 (linux_read_auxv): Ditto.
169 (linux_xfer_siginfo): Ditto.
170 (linux_qxfer_spu): Ditto.
171 (linux_qxfer_libraries_svr4): Ditto.
172 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
173 moved to inferiors.h.
175 (get_thread_lwp): Update.
176 (struct lwp_info): Delete member "entry". Simplify comment for
179 * linux-mips-low.c (mips_read_description): Fetch lwpid from
180 current_inferior directly.
181 (update_watch_registers_callback): Update, "entry" parameter is a
182 struct thread_info * now. Fetch pid from thread.
183 (mips_linux_prepare_to_resume): Fetch ptid from thread.
184 (mips_insert_point): Fetch lwpid from current_inferior.
185 Pass &all_threads to find_inferior, not &all_lwps.
186 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
187 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
189 (mips_stopped_data_address): Ditto.
190 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
192 * linux-tile-low.c (tile_arch_setup): Ditto.
193 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
194 (update_debug_registers_callback): Update, "entry" parameter is a
195 struct thread_info * now. Fetch pid from thread.
196 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
197 Pass &all_threads to find_inferior, not &all_lwps.
198 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
199 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
200 Pass &all_threads to find_inferior, not &all_lwps.
201 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
202 (i386_dr_low_get_status): Ditto.
203 (x86_linux_prepare_to_resume): Fetch ptid from thread.
204 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
205 (x86_linux_read_description): Ditto.
206 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
208 2014-02-20 Doug Evans <dje@google.com>
210 * inferiors.c (get_first_inferior): Fix buglet.
212 2014-02-19 Doug Evans <dje@google.com>
214 * gdbthread.h (add_thread): Change result type to struct thread_info *.
215 * inferiors.c (add_thread): Change result type to struct thread_info *.
217 (add_lwp): Call add_thread here instead of in callers.
219 * linux-low.h (get_lwp_thread): Rewrite.
220 (struct lwp_info): New member "thread".
222 2014-02-19 Doug Evans <dje@google.com>
224 * linux-low.c (add_lwp): Change result to struct lwp_info *.
227 2014-02-19 Doug Evans <dje@google.com>
229 * inferiors.c (add_thread): Fix whitespace.
231 2014-02-19 Doug Evans <dje@google.com>
233 * dll.c (clear_dlls): Replace accessing list implemention details
235 * gdbthread.h (get_first_thread): Declare.
236 * inferiors.c (for_each_inferior_with_data): New function.
237 (get_first_thread): New function.
238 (find_thread_ptid): Simplify.
239 (get_first_inferior): New function.
240 (clear_list): Delete.
241 (one_inferior_p): New function.
242 (clear_inferior_list): New function.
243 (clear_inferiors): Update.
244 * inferiors.h (for_each_inferior_with_data): Declare.
245 (clear_inferior_list): Declare.
246 (one_inferior_p): Declare.
247 (get_first_inferior): Declare.
248 * linux-low.c (linux_wait_for_event): Replace accessing list
249 implemention details with API function.
250 * server.c (target_running): Ditto.
251 (accumulate_file_name_length): New function.
252 (emit_dll_description): New function.
253 (handle_qxfer_libraries): Replace accessing list implemention
254 details with API function.
255 (handle_qxfer_threads_worker): New function.
256 (handle_qxfer_threads_proper): Replace accessing list implemention
257 details with API function.
258 (handle_query): Ditto.
259 (visit_actioned_threads_callback_ftype): New typedef.
260 (visit_actioned_threads_data): New struct.
261 (visit_actioned_threads): Rewrite to be find_inferior callback.
262 (resume): Call find_inferior.
263 (handle_status): Replace accessing list implemention
264 details with API function.
265 (process_serial_event): Replace accessing list implemention details
267 * target.c (set_desired_inferior): Replace accessing list implemention
268 details with API function.
269 * tracepoint.c (same_process_p): New function.
270 (gdb_agent_about_to_close): Replace accessing list implemention
271 details with API function.
272 * win32-low.c (child_delete_thread): Replace accessing list
273 implemention details with API function.
274 (match_dll_by_basename): New function.
275 (dll_is_loaded_by_basename): New function.
276 (win32_ensure_ntdll_loaded): Replace accessing list implemention
277 details call to dll_is_loaded_by_basename.
279 2014-02-19 Doug Evans <dje@google.com>
281 * dll.h (struct dll_info): Add comment.
282 * gdbthread.h (struct thread_info): Add comment.
283 (current_ptid): Simplify.
284 * inferiors.c (add_process): Update.
285 (remove_process): Update.
286 * inferiors.h (struct process_info): Rename member "head" to "entry".
287 * linux-low.c (delete_lwp): Update.
289 (last_thread_of_process_p): Update.
290 (kill_one_lwp_callback, linux_kill): Update.
291 (status_pending_p_callback): Update.
292 (wait_for_sigstop): Update. Simplify read of ptid.
293 (start_step_over): Update.
294 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
295 (get_lwp_thread): Update.
296 (struct lwp_info): Rename member "head" to "entry".
297 * regcache.h (inferior_list_entry): Delete.
298 * server.c (kill_inferior_callback): Update.
299 (detach_or_kill_inferior_callback): Update.
300 (print_started_pid): Update.
301 (print_attached_pid): Update.
302 (process_serial_event): Simplify read of ptid.
303 * thread-db.c (thread_db_create_event): Update.
304 (thread_db_get_tls_address): Update.
305 * win32-low.c (current_inferior_ptid): Simplify.
307 2014-02-19 Tom Tromey <tromey@redhat.com>
309 * target.h (struct target_ops) <supports_btrace>: Add target_ops
311 (target_supports_btrace): Update.
313 2014-02-14 Yao Qi <yao@codesourcery.com>
315 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
316 (rsp-low-ipa.o): New target.
318 2014-02-12 Tom Tromey <tromey@redhat.com>
320 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
321 convert_ascii_to_int.
322 * regcache.c (registers_to_string): Likewise.
323 * remote-utils.c (decode_M_packet): Likewise.
324 * server.c (process_serial_event): Likewise.
326 2014-02-12 Tom Tromey <tromey@redhat.com>
328 * server.c (handle_query, handle_v_run): Use hex2bin, not
330 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
332 2014-02-12 Tom Tromey <tromey@redhat.com>
334 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
335 convert_int_to_ascii.
336 * regcache.c (registers_to_string, collect_register_as_string):
338 * remote-utils.c (look_up_one_symbol, relocate_instruction):
340 * server.c (process_serial_event): Likewise.
341 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
342 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
344 2014-02-12 Tom Tromey <tromey@redhat.com>
346 * remote-utils.c (look_up_one_symbol, monitor_output): Use
348 * tracepoint.c (cmd_qtstatus): Likewise.
350 2014-02-12 Tom Tromey <tromey@redhat.com>
352 * remote-utils.c (monitor_output): Pass explicit length to
355 2014-02-12 Tom Tromey <tromey@redhat.com>
357 * tracepoint.c: Include rsp-low.h.
358 * server.c: Include rsp-low.h.
359 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
360 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
362 * remote-utils.c: Include rsp-low.h.
363 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
364 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
365 (convert_int_to_ascii, convert_ascii_to_int): Move to
367 * regcache.c: Include rsp-low.h.
368 * ax.c: Include rsp-low.h.
369 * Makefile.in (SFILES): Add common/rsp-low.c.
370 (OBS): Add rsp-low.o.
371 (rsp-low.o): New target.
373 2014-02-12 Tom Tromey <tromey@redhat.com>
375 * utils.h (pulongest, plongest, phex_nz): Don't declare.
376 Include print-utils.h.
377 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
378 (plongest, thirty_two, phex_nz): Remove.
379 * Makefile.in (SFILES): Add common/print-utils.c.
380 (OBS): Add print-utils.o.
381 (print-utils-ipa.o): New target.
382 (print-utils.o): New target.
383 (IPA_OBJS): Add print-utils-ipa.o.
385 2014-02-06 Tom Tromey <tromey@redhat.com>
387 * Makefile.in (SFILES): Fix indentation.
389 2014-02-05 Doug Evans <dje@google.com>
391 * linux-low.c (linux_wait_for_event): Improve comment.
392 (linux_wait_1): Keep current_inferior in sync with event_child.
394 2014-01-22 Doug Evans <dje@google.com>
396 * gdbthread.h (gdb_id_to_thread): Delete, unused.
398 2014-01-22 Doug Evans <dje@google.com>
400 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
401 * configure: Regenerate.
402 * config.in: Regenerate.
403 * Makefile.in (SFILES): Add debug.c.
407 * linux-aarch64-low.c (*): Update all debugging printfs to use
408 debug_printf instead of fprintf.
409 * linux-arm-low.c (*): Ditto.
410 * linux-cris-low.c (*): Ditto.
411 * linux-crisv32-low.c (*): Ditto.
412 * linux-m32r-low.c (*): Ditto.
413 * linux-sparc-low.c (*): Ditto.
414 * linux-x86.c (*): Ditto.
415 * linux-low.c (*): Ditto.
416 (linux_wait_1): Add calls to debug_enter, debug_exit.
417 (linux_wait): Remove redundant debugging printf.
418 (stop_all_lwps): Add calls to debug_enter, debug_exit.
419 (linux_resume, unstop_all_lwps): Ditto.
420 * mem-break.c (*): Update all debugging printfs to use
421 debug_printf instead of fprintf.
422 * remote-utils.c (*): Ditto.
423 * thread-db.c (*): Ditto.
424 * server.c #include <ctype.h>, "gdb_vecs.h".
425 (debug_threads): Moved to debug.c.
426 (*): Update all debugging printfs to use debug_printf instead of
428 (start_inferior): Replace call to fflush with call to debug_flush.
429 (monitor_show_help): Mention set debug-format.
430 (parse_debug_format_options): New function.
431 (handle_monitor_command): Handle "monitor set debug-format".
432 (gdbserver_usage): Mention --debug-format.
433 (main): Parse --debug-format.
434 * server.h (debug_threads): Declaration moved to debug.h.
436 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
437 trace_debug_1 that uses debug_printf.
438 (tracepoint_look_up_symbols): Update all debugging printfs to use
439 debug_printf instead of fprintf.
441 2014-01-20 Baruch Siach <baruch@tkos.co.il>
443 * linux-xtensa-low.c: Include asm/ptrace.h instead of
446 2014-01-17 Pedro Alves <palves@redhat.com>
449 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
450 defined after including gdb_proc_service.h.
452 2014-01-16 Doug Evans <dje@google.com>
454 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
457 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
459 * target.h (target_ops) <read_btrace>: Change parameters and
460 return type to allow error reporting.
461 * server.c (handle_qxfer_btrace): Support delta reads. Pass
462 trace reading errors on.
463 * linux-low.c (linux_low_read_btrace): Pass trace reading
465 (linux_low_disable_btrace): New.
467 2014-01-15 Doug Evans <dje@google.com>
469 * inferiors.c (thread_id_to_gdb_id): Delete.
470 * inferiors.h (thread_id_to_gdb_id): Delete.
472 2014-01-13 Eli Zaretskii <eliz@gnu.org>
474 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
475 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
478 2014-01-08 Pedro Alves <palves@redhat.com>
480 * server.c (handle_status): Don't discard previous queued stop
481 replies or thread's pending status here.
482 (main) <disconnection>: Do it here instead.
484 2014-01-08 Pedro Alves <palves@redhat.com>
486 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
487 * server.c (visit_actioned_threads, handle_pending_status): New
489 (handle_v_cont): Factor out parts to ...
490 (resume): ... this new function. If in all-stop, and a thread
491 being resumed has a pending status, report it without actually
493 (myresume): Adjust to use the new 'resume' function.
494 (clear_pending_status_callback, set_pending_status_callback)
495 (find_status_pending_thread_callback): New functions.
496 (handle_status): Handle the case of multiple threads having
497 interesting statuses to report. Report threads' real last signal
498 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
499 with an interesting thread to report the status for, instead of
500 always reporting the status of the first thread.
502 2014-01-01 Joel Brobecker <brobecker@adacore.com>
504 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
505 * gdbreplay.c (gdbreplay_version): Likewise.
507 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
509 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
510 iov.iov_len with the real length in use.
512 2013-12-13 Joel Brobecker <brobecker@adacore.com>
514 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
515 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
516 for all targets that use win32-low.c.
517 * win32-low.c (win32_ensure_ntdll_loaded): New function.
518 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
520 2013-12-13 Pedro Alves <palves@redhat.com>
522 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
523 if equal to TARGET_WAITKIND_LOADED.
524 * win32-low.c (cached_status): New static global.
525 (win32_wait): Add declaration.
526 (do_initial_child_stuff): Flush all initial pending debug events
527 up to the initial breakpoint.
528 (win32_wait): If CACHED_STATUS was set, return that instead
529 of doing a real wait. Remove the code resuming the execution
530 of the inferior after receiving a TARGET_WAITKIND_LOADED event
531 during the initial phase. Also remove the code changing
532 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
533 TARGET_WAITKIND_STOPPED.
535 2013-12-11 Yao Qi <yao@codesourcery.com>
537 * notif.c (handle_notif_ack): Return 0 if no notification
540 2013-11-20 Doug Evans <dje@google.com>
542 * linux-low.c (linux_set_resume_request): Fix comment.
544 2013-11-20 Doug Evans <dje@google.com>
546 * linux-low.c (resume_status_pending_p): Tweak comment.
548 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
550 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
551 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
552 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
553 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
554 (srv_amd64_regobj): Add amd64-mpx.o.
555 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
556 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
557 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
558 * i387-fp.c (num_pl_bnd_register) Added constant.
559 (num_pl_bnd_cfg_registers) Added constant.
560 (struct i387_xsave) Added reserved area and MPX fields.
561 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
562 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
564 (tdesc_i386_mpx_linux): Add MPX amd64 target.
565 (init_registers_amd64_mpx_linux): Declare new function.
566 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
567 (x86_64_regmap): Add MPX registers.
568 (x86_linux_read_description): Add MPX case.
569 (initialize_low_arch): Initialize MPX targets.
571 2013-11-18 Tom Tromey <tromey@redhat.com>
573 * configure: Rebuild.
574 * configure.ac: Don't check for stdlib.h.
575 * gdbreplay.c: Unconditionally include stdlib.h.
577 2013-11-18 Tom Tromey <tromey@redhat.com>
579 * config.in: Rebuild.
580 * configure: Rebuild.
581 * configure.ac: Don't use AC_HEADER_DIRENT.
583 2013-11-18 Tom Tromey <tromey@redhat.com>
585 * server.h: Don't check HAVE_STRING_H.
586 * gdbreplay.c: Don't check HAVE_STRING_H.
587 * configure: Rebuild.
589 2013-11-18 Tom Tromey <tromey@redhat.com>
591 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
594 2013-11-08 Tom Tromey <tromey@redhat.com>
596 * configure, config.in: Rebuild.
597 * configure.ac: Remove unused configury.
599 2013-11-08 Tom Tromey <tromey@redhat.com>
601 * acinclude.m4: Include common.m4, codeset.m4.
602 * configure, config.in: Rebuild.
603 * configure.ac: Use GDB_AC_COMMON.
605 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
607 * linux-s390-low.c (HWCAP_S390_TE): New define.
608 (s390_arch_setup): Consider the TE field in the HWCAP for
609 determining 'have_regset_tdb'.
611 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
614 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
617 2013-10-02 Pedro Alves <palves@redhat.com>
619 * server.c (process_serial_event): Don't output "GDBserver
620 exiting" if GDB is connected through stdio.
621 * target.c (mywait): Likewise, be silent if GDB is connected
624 2013-10-01 Joel Brobecker <brobecker@adacore.com>
626 * lynx-low.c (lynx_add_threads_after_attach): New function.
627 (lynx_attach): Remove call to add_thread. Add call to
628 lynx_add_threads_after_attach instead.
630 2013-09-28 Mike Frysinger <vapier@gentoo.org>
632 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
633 * config.in, configure: Regenerated.
635 2013-09-18 Yao Qi <yao@codesourcery.com>
638 * server.c (start_inferior): Clear 'resume_info'.
640 2013-09-16 Jiong Wang <jiwang@tilera.com>
642 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
645 2013-09-16 Jiong Wang <jiwang@tilera.com>
647 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
648 linux-tile-low.o to srv_tgtobj.
650 2013-09-16 Will Newton <will.newton@linaro.org>
652 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
655 2013-09-06 Pedro Alves <palves@redhat.com>
657 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
658 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
659 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
660 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
661 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
662 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
664 2013-09-06 Pedro Alves <palves@redhat.com>
666 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
667 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
669 2013-09-06 Pedro Alves <palves@redhat.com>
671 * linux-amd64-ipa.c: Include tracepoint.h.
672 * linux-i386-ipa.c: Include tracepoint.h.
674 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
676 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
677 (ps_get_thread_area): New function.
679 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
681 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
682 (initialize_low_arch): Call init_registers_crisv32 rather than
683 init_register_crisv32.
685 2013-09-05 Pedro Alves <palves@redhat.com>
687 * server.h (handle_vFile, hostio_last_error_from_errno): Move
689 * hostio.h: ... this new file.
690 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
691 win32-low.c: Include hostio.h.
693 2013-09-05 Pedro Alves <palves@redhat.com>
695 * server.h (gdb_client_data, handler_func, callback_handler_func)
696 (delete_file_handler, add_file_handler, append_callback_event)
697 (delete_callback_event, start_event_loop, initialize_event_loop):
698 Move to event-loop.h and include it.
699 * event-loop.h: New file.
701 2013-09-05 Pedro Alves <palves@redhat.com>
703 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
704 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
705 (loaded_dll, unloaded_dll): Move to ...
706 * dll.h: ... this new file.
707 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
709 2013-09-05 Pedro Alves <palves@redhat.com>
711 * server.h (current_process, get_thread_process, all_processes)
712 (add_inferior_to_list, for_each_inferior, current_inferior)
713 (remove_inferior, add_process, remove_process, find_process_pid)
714 (have_started_inferiors_p, have_attached_inferiors_p)
715 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
716 (clear_inferiors, find_inferior, find_inferior_id)
717 (inferior_target_data, set_inferior_target_data)
718 (inferior_regcache_data, set_inferior_regcache_data): Move to
719 inferiors.h, and include it.
720 * inferiors.h: New file.
722 2013-09-05 Pedro Alves <palves@redhat.com>
724 * server.h (struct emit_ops, current_insn_ptr, emit_error):
728 2013-09-05 Pedro Alves <palves@redhat.com>
730 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
732 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
733 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
734 (handle_tracepoint_general_set, handle_tracepoint_query)
735 (tracepoint_finished_step, tracepoint_was_hit)
736 (release_while_stepping_state_list, current_traceframe)
737 (in_readonly_region, traceframe_read_mem)
738 (fetch_traceframe_registers, traceframe_read_sdata)
739 (traceframe_read_info, struct fast_tpoint_collect_status)
740 (fast_tracepoint_collecting, force_unlock_trace_buffer)
741 (handle_tracepoit_bkpts, initialize_low_tracepoint)
742 (supply_fast_tracepoint_registers)
743 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
744 (ipa_tdesc, claim_trampoline_space)
745 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
746 (agent_mem_read, agent_get_trace_state_variable_value)
747 (agent_set_trace_state_variable_value, agent_tsv_read)
748 (agent_mem_read_string, get_raw_reg_func_addr)
749 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
750 * tracepoint.h: ... this new file.
752 2013-09-05 Pedro Alves <palves@redhat.com>
754 * server.h (perror_with_name, error, fatal, warning, paddress)
755 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
759 2013-09-05 Pedro Alves <palves@redhat.com>
761 * server.h (remote_debug, noack_mode, transport_is_reliable)
762 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
763 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
764 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
765 (write_enn, initialize_async_io, enable_async_io)
766 (disable_async_io, check_remote_input_interrupt_request)
767 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
768 (dead_thread_notify, prepare_resume_reply)
769 (decode_address_to_semicolon, decode_address, decode_m_packet)
770 (decode_M_packet, decode_X_packet, decode_xfer_write)
771 (decode_search_memory_packet, unhexify, hexify)
772 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
773 (look_up_one_symbol, relocate_instruction)
774 (monitor_output): Move to remote-utils.h, and include it.
775 * remote-utils.h: New file.
777 2013-09-05 Pedro Alves <palves@redhat.com>
779 * server.h (_): Delete.
781 2013-09-02 Pedro Alves <palves@redhat.com>
783 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
784 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
786 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
788 2013-09-02 Pierre Muller <muller@sourceware.org>
790 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
791 or WriteProcessMemory complete successfully and handle
792 ERROR_PARTIAL_COPY error.
794 2013-09-02 Pedro Alves <palves@redhat.com>
796 * server.c (gdb_read_memory): Return -1 on traceframe memory read
797 error instead of EIO.
799 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
802 * linux-low.c: Include filestuff.h.
803 (linux_create_inferior) <pid == 0>: Call close_most_fds.
804 * lynx-low.c: Include filestuff.h.
805 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
806 * server.c: Include filestuff.h.
807 (main): Call notice_open_fds.
808 * spu-low.c: Include filestuff.h.
809 (spu_create_inferior) <pid == 0>: Call close_most_fds.
811 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
813 * Makefile.in: Explain why ../target and ../nat are not
814 listed as include file search paths.
815 (linux-waitpid.o): New object file rule.
816 * configure.srv (srv_native_linux_obj): New variable.
817 Replace all occurrences of linux native object files with
818 $srv_native_linux_obj.
819 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
820 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
821 (linux_enable_event_reporting): Remove declaration.
822 (my_waitpid): Moved to common/linux-waitpid.c.
823 (linux_wait_for_event): Pass ptid when calling
824 linux_enable_event_reporting.
825 (linux_supports_tracefork_flag): Remove.
826 (linux_enable_event_reporting): Likewise.
827 (linux_tracefork_grandchild): Remove.
828 (STACK_SIZE): Moved to common/linux-ptrace.c.
829 (linux_tracefork_child): Remove.
830 (linux_test_for_tracefork): Remove.
831 (linux_look_up_symbols): Call linux_supports_traceclone.
832 (initialize_low): Remove call to linux_test_for_tracefork.
833 * linux-low.h (PTRACE_TYPE_ARG3): Move to
834 common/linux-ptrace.h.
835 (PTRACE_TYPE_ARG4): Likewise.
836 Include linux-ptrace.h.
838 2013-08-21 Pedro Alves <palves@redhat.com>
840 * config.in: Renegerate.
842 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
844 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
845 (SFILES): Remove $(srcdir)/common/target-common.c and
846 add $(srcdir)/target/waitstatus.c.
847 (OBS): Remove target-common.o and add waitstatus.o.
848 (server_h): Remove $(srcdir)/../common/target-common.h and
849 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
850 and $(srcdir)/../target/waitstatus.h.
851 (target-common.o): Remove.
852 (waitstatus.o): New target object file.
853 * target.h: Do not include target-common.h and
854 include target/resume.h, target/wait.h and
857 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
859 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
861 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
862 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
864 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
865 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
867 2013-07-27 Jie Zhang <jie@codesourcery.com>
868 Daniel Jacobowitz <dan@codesourcery.com>
869 Yao Qi <yao@codesourcery.com>
871 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
872 (mips-linux-watch.o): New rule.
873 (mips_linux_watch_h): New variable.
874 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
876 * linux-mips-low.c: Include mips-linux-watch.h.
877 (struct arch_process_info, struct arch_lwp_info): New.
878 (update_watch_registers_callback): New function.
879 (mips_linux_new_process, mips_linux_new_thread) New functions.
880 (mips_linux_prepare_to_resume, mips_insert_point): New
882 (mips_remove_point, mips_stopped_by_watchpoint): New
884 (rsp_bp_type_to_target_hw_bp_type): New function.
885 (mips_stopped_data_address): New function.
886 (the_low_target): Add watchpoint support functions.
888 2013-07-27 Yao Qi <yao@codesourcery.com>
890 * i386-low.c: Include break-common.h.
891 (enum target_hw_bp_type): Remove.
893 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
895 * Makefile.in (SFILES): /common/target-common.c.
896 (OBS): Add target-common.o.
897 (server_h): Add $(srcdir)/../common/target-common.h.
898 (target-common.o): New target.
899 * server.c (queue_stop_reply_callback): Free
900 status string after use.
901 * target.c (target_waitstatus_to_string): Remove.
902 * target.h: Include target-common.h.
903 (resume_kind): Likewise.
904 (target_waitkind): Likewise.
905 (target_waitstatus): Likewise.
906 (TARGET_WNOHANG): Likewise.
908 2013-07-04 Yao Qi <yao@codesourcery.com>
910 * Makefile.in (host_alias): Use @host_noncanonical@.
911 (target_alias): Use @target_noncanonical@.
912 * configure.ac: Use ACX_NONCANONICAL_TARGET and
913 ACX_NONCANONICAL_HOST.
914 * configure: Regenerated.
917 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
919 * configure.ac (version_host, version_target): Set and AC_SUBST them.
920 * configure: Rebuild.
921 * Makefile.in (version_host, version_target): Get from configure.
922 (version.c): Use $(version_host) and $(version_target).
924 2013-07-03 Pedro Alves <palves@redhat.com>
926 * Makefile.in (config.status): Depend on development.sh.
927 * acinclude.m4: Include libmcheck.m4.
928 * configure: Regenerate.
930 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
932 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
933 attribute inside the parentheses.
934 (winapi_DebugSetProcessKillOnExit): Ditto.
935 (winapi_DebugBreakProcess): Ditto.
936 (winapi_GenerateConsoleCtrlEvent): Ditto.
938 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
940 * notif.h (notif_event): Add a dummy member to avoid compiler
943 2013-07-01 Pedro Alves <palves@redhat.com>
945 * hostio.c (HOSTIO_PATH_MAX): Define.
946 (require_filename, handle_open, handle_unlink, handle_readlink):
949 2013-07-01 Pedro Alves <palves@redhat.com>
951 * server.h: Include "pathmax.h".
952 * linux-low.c: Don't include sys/param.h.
953 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
955 * win32-low.c: Don't include sys/param.h.
956 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
958 2013-07-01 Pedro Alves <palves@redhat.com>
960 * event-loop.c: Don't check HAVE_UNISTD_H before including
962 * gdbreplay.c: Likewise.
963 * remote-utils.c: Likewise.
964 * server.c: Likewise.
965 * configure.ac: Don't check for unistd.h.
966 * configure: Regenerate.
968 2013-06-28 Tom Tromey <tromey@redhat.com>
970 * Makefile.in (version.c): Use version.in, not
973 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
975 * configure.ac (version_host, version_target): Set and AC_SUBST them.
976 * configure: Rebuild.
977 * Makefile.in (version_host, version_target): Get from configure.
978 (version.c): Use $(version_host) and $(version_target).
980 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
982 Fix trace-status to output user name without trailing colon.
983 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
985 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
987 Fix trace-status to output proper start-time and stop-time.
988 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
989 output start time and stop time in hex as gdb expects.
991 2013-06-26 Pedro Alves <pedro@codesourcery.com>
993 * tracepoint.c (build_traceframe_info_xml): Output trace state
994 variables present in the trace buffer.
996 2013-06-24 Tom Tromey <tromey@redhat.com>
998 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
1000 (version.o): Remove.
1001 * gdbreplay.c: Include version.h.
1002 (version, host_name): Don't declare.
1003 * server.h: Include version.h.
1004 (version, host_name): Don't declare.
1006 2013-06-12 Pedro Alves <palves@redhat.com>
1008 * linux-x86-low.c (linux_is_elf64): Delete global.
1009 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
1010 with local linux_pid_exe_is_elf_64_file use.
1012 2013-06-11 Pedro Alves <palves@redhat.com>
1014 * linux-low.c (regset_disabled, disable_regset): New functions.
1015 (regsets_fetch_inferior_registers)
1016 (regsets_store_inferior_registers): Use them.
1017 (initialize_regsets_info); Don't allocate the disabled_regsets
1019 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
1022 2013-06-11 Pedro Alves <palves@redhat.com>
1024 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
1027 2013-06-11 Pedro Alves <palves@redhat.com>
1029 * linux-x86-low.c (initialize_low_arch): Call
1030 init_registers_x32_avx_linux.
1032 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
1034 Fix compatibility with Android Bionic.
1035 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
1038 2013-06-07 Pedro Alves <palves@redhat.com>
1041 * Makefile.in (OBS): Add tdesc.o.
1042 (IPA_OBJS): Add tdesc-ipa.o.
1043 (tdesc-ipa.o): New rule.
1044 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
1046 * linux-low.c (new_inferior): Delete.
1047 (disabled_regsets, num_regsets): Delete.
1048 (linux_add_process): Adjust to set the new per-process
1050 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
1051 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
1052 was a stop. When calling arch_setup, switch the current inferior
1053 to the thread that got an event.
1054 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
1055 (regsets_fetch_inferior_registers)
1056 (regsets_store_inferior_registers): New regsets_info parameter.
1058 (linux_register_in_regsets): New regs_info parameter. Adjust to
1060 (register_addr, fetch_register, store_register): New usrregs_info
1061 parameter. Adjust to use it.
1062 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
1063 parameter regs_info. Adjust to use it.
1064 (linux_fetch_registers): Get the current inferior's regs_info, and
1066 (linux_store_registers): Ditto.
1067 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
1068 (initialize_low): Don't initialize the target_regsets here. Call
1069 initialize_low_arch.
1070 * linux-low.h (target_regsets): Delete declaration.
1071 (struct regsets_info): New.
1072 (struct usrregs_info): New.
1073 (struct regs_info): New.
1074 (struct process_info_private) <new_inferior>: New field.
1075 (struct linux_target_ops): Delete the num_regs, regmap, and
1076 regset_bitmap fields. New field regs_info.
1077 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
1078 * i387-fp.c (num_xmm_registers): Delete.
1079 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
1080 calls to new interface.
1081 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
1082 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
1083 Infer the number of xmm registers from the regcache's target
1085 * i387-fp.h (num_xmm_registers): Delete.
1086 * inferiors.c (add_thread): Don't install the thread's regcache
1088 * proc-service.c (gregset_info): Fetch the current inferior's
1089 regs_info. Adjust to use it.
1090 * regcache.c: Include tdesc.h.
1091 (register_bytes, reg_defs, num_registers)
1092 (gdbserver_expedite_regs): Delete.
1093 (get_thread_regcache): If the thread doesn't have a regcache yet,
1094 create one, instead of aborting gdbserver.
1095 (regcache_invalidate_one): Rename to ...
1096 (regcache_invalidate_thread): ... this.
1097 (regcache_invalidate_one): New.
1098 (regcache_invalidate): Only invalidate registers of the current
1100 (init_register_cache): Add target_desc parameter, and use it.
1101 (new_register_cache): Ditto. Assert the target description has a
1102 non zero registers_size.
1103 (regcache_cpy): Add assertions. Adjust.
1104 (realloc_register_cache, set_register_cache): Delete.
1105 (registers_to_string, registers_from_string): Adjust.
1106 (find_register_by_name, find_regno, find_register_by_number)
1107 (register_cache_size): Add target_desc parameter, and use it.
1108 (free_register_cache_thread, free_register_cache_thread_one)
1109 (regcache_release, register_cache_size): New.
1110 (register_size): Add target_desc parameter, and use it.
1111 (register_data, supply_register, supply_register_zeroed)
1112 (supply_regblock, supply_register_by_name, collect_register)
1113 (collect_register_as_string, collect_register_by_name): Adjust.
1114 * regcache.h (struct target_desc): Forward declare.
1115 (struct regcache) <tdesc>: New field.
1116 (init_register_cache, new_register_cache): Add target_desc
1118 (regcache_invalidate_thread): Declare.
1119 (regcache_invalidate_one): Delete declaration.
1120 (regcache_release): Declare.
1121 (find_register_by_number, register_cache_size, register_size)
1122 (find_regno): Add target_desc parameter.
1123 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
1125 * remote-utils.c: Include tdesc.h.
1126 (outreg, prepare_resume_reply): Adjust.
1127 * server.c: Include tdesc.h.
1128 (gdbserver_xmltarget): Delete declaration.
1129 (get_features_xml, process_serial_event): Adjust.
1130 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
1132 (struct process_info) <tdesc>: New field.
1133 (ipa_tdesc): Declare.
1134 * tdesc.c: New file.
1135 * tdesc.h: New file.
1136 * tracepoint.c: Include tdesc.h.
1137 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
1138 (get_context_regcache): Adjust to pass ipa_tdesc down.
1139 (do_action_at_tracepoint): Adjust to get the register cache size
1140 from the context regcache's description.
1141 (traceframe_walk_blocks): Adjust to get the register cache size
1142 from the current trace frame's description.
1143 (traceframe_get_pc): Adjust to get current trace frame's
1144 description and pass it down.
1145 (gdb_collect): Adjust to get the register cache size from the
1147 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
1148 (gdbserver_xmltarget): Delete.
1149 (initialize_low_tracepoint): Set the ipa's target description.
1150 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
1151 (initialize_low_tracepoint): Set the ipa's target description.
1152 * linux-x86-low.c: Include tdesc.h.
1153 [__x86_64__] (is_64bit_tdesc): New.
1154 (ps_get_thread_area, x86_get_thread_area): Use it.
1155 (i386_cannot_store_register): Rename to ...
1156 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
1157 (i386_cannot_fetch_register): Rename to ...
1158 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
1159 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
1161 (target_regsets): Rename to ...
1162 (x86_regsets): ... this.
1163 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
1165 (x86_siginfo_fixup): Use is_64bit_tdesc.
1166 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
1167 (tdesc_x32_avx_linux, tdesc_x32_linux)
1168 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
1170 (x86_linux_update_xmltarget): Delete.
1171 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
1172 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
1173 (AMD64_LINUX_USER64_CS): New.
1174 (x86_linux_read_description): New, based on
1175 x86_linux_update_xmltarget.
1176 (same_process_callback): New.
1177 (x86_arch_setup_process_callback): New.
1178 (x86_linux_update_xmltarget): New.
1179 (x86_regsets_info): New.
1180 (amd64_linux_regs_info): New.
1181 (i386_linux_usrregs_info): New.
1182 (i386_linux_regs_info): New.
1183 (x86_linux_regs_info): New.
1184 (x86_arch_setup): Reimplement.
1185 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
1186 (x86_emit_ops): Ditto.
1187 (the_low_target): Adjust. Install x86_linux_regs_info,
1188 x86_cannot_fetch_register, and x86_cannot_store_register.
1189 (initialize_low_arch): New.
1190 * linux-ia64-low.c (tdesc_ia64): Declare.
1191 (ia64_fetch_register): Adjust.
1192 (ia64_usrregs_info, regs_info): New globals.
1193 (ia64_regs_info): New function.
1194 (the_low_target): Adjust.
1195 (initialize_low_arch): New function.
1196 * linux-sparc-low.c (tdesc_sparc64): Declare.
1197 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
1199 (sparc_arch_setup): New function.
1200 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
1201 (the_low_target): Adjust.
1202 (initialize_low_arch): New function.
1203 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
1204 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
1205 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
1206 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
1207 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
1208 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
1209 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
1210 (tdesc_powerpc_isa205_vsx64l): Declare.
1211 (ppc_cannot_store_register, ppc_collect_ptrace_register)
1212 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
1213 (ppc_set_pc, ppc_get_hwcap): Adjust.
1214 (ppc_usrregs_info): Forward declare.
1215 (!__powerpc64__) ppc_regmap_adjusted: New global.
1216 (ppc_arch_setup): Adjust to the current process'es target
1218 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
1219 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
1220 (ppc_store_evrregset): Adjust.
1221 (target_regsets): Rename to ...
1222 (ppc_regsets): ... this, and make static.
1223 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
1224 (ppc_regs_info): New function.
1225 (the_low_target): Adjust.
1226 (initialize_low_arch): New function.
1227 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
1228 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
1229 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
1230 (tdesc_s390x_linux64v2): Declare.
1231 (s390_collect_ptrace_register, s390_supply_ptrace_register)
1232 (s390_fill_gregset, s390_store_last_break): Adjust.
1233 (target_regsets): Rename to ...
1234 (s390_regsets): ... this, and make static.
1235 (s390_get_pc, s390_set_pc): Adjust.
1236 (s390_get_hwcap): New target_desc parameter, and use it.
1237 [__s390x__] (have_hwcap_s390_high_gprs): New global.
1238 (s390_arch_setup): Adjust to set the current process'es target
1239 description. Don't adjust the regmap.
1240 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
1241 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
1242 (regs_info_3264): New globals.
1243 (s390_regs_info): New function.
1244 (the_low_target): Adjust.
1245 (initialize_low_arch): New function.
1246 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
1247 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
1248 [__mips64] (init_registers_mips_linux)
1249 (init_registers_mips_dsp_linux): Delete defines.
1250 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
1251 (have_dsp): New global.
1252 (mips_read_description): New, based on mips_arch_setup.
1253 (mips_arch_setup): Reimplement.
1254 (get_usrregs_info): New function.
1255 (mips_cannot_fetch_register, mips_cannot_store_register)
1256 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
1257 (mips_fill_fpregset, mips_store_fpregset): Adjust.
1258 (target_regsets): Rename to ...
1259 (mips_regsets): ... this, and make static.
1260 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
1261 (dsp_regs_info, regs_info): New globals.
1262 (mips_regs_info): New function.
1263 (the_low_target): Adjust.
1264 (initialize_low_arch): New function.
1265 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
1266 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
1268 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
1269 (arm_read_description): New, with bits factored from
1271 (arm_arch_setup): Reimplement.
1272 (target_regsets): Rename to ...
1273 (arm_regsets): ... this, and make static.
1274 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
1275 (arm_regs_info): New function.
1276 (the_low_target): Adjust.
1277 (initialize_low_arch): New function.
1278 * linux-m68k-low.c (tdesc_m68k): Declare.
1279 (target_regsets): Rename to ...
1280 (m68k_regsets): ... this, and make static.
1281 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
1282 (m68k_regs_info): New function.
1283 (m68k_arch_setup): New function.
1284 (the_low_target): Adjust.
1285 (initialize_low_arch): New function.
1286 * linux-sh-low.c (tdesc_sharch): Declare.
1287 (target_regsets): Rename to ...
1288 (sh_regsets): ... this, and make static.
1289 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
1290 (sh_regs_info, sh_arch_setup): New functions.
1291 (the_low_target): Adjust.
1292 (initialize_low_arch): New function.
1293 * linux-bfin-low.c (tdesc_bfin): Declare.
1294 (bfin_arch_setup): New function.
1295 (bfin_usrregs_info, regs_info): New globals.
1296 (bfin_regs_info): New function.
1297 (the_low_target): Adjust.
1298 (initialize_low_arch): New function.
1299 * linux-cris-low.c (tdesc_cris): Declare.
1300 (cris_arch_setup): New function.
1301 (cris_usrregs_info, regs_info): New globals.
1302 (cris_regs_info): New function.
1303 (the_low_target): Adjust.
1304 (initialize_low_arch): New function.
1305 * linux-cris-low.c (tdesc_crisv32): Declare.
1306 (cris_arch_setup): New function.
1307 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
1308 (cris_regs_info): New function.
1309 (the_low_target): Adjust.
1310 (initialize_low_arch): New function.
1311 * linux-m32r-low.c (tdesc_m32r): Declare.
1312 (m32r_arch_setup): New function.
1313 (m32r_usrregs_info, regs_info): New globals.
1314 (m32r_regs_info): Adjust.
1315 (initialize_low_arch): New function.
1316 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
1317 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
1318 (tic6x_usrregs_info): Forward declare.
1319 (tic6x_read_description): New function, based on ...
1320 (tic6x_arch_setup): ... this. Reimplement.
1321 (target_regsets): Rename to ...
1322 (tic6x_regsets): ... this, and make static.
1323 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
1324 (tic6x_regs_info): New function.
1325 (the_low_target): Adjust.
1326 (initialize_low_arch): New function.
1327 * linux-xtensa-low.c (tdesc_xtensa): Declare.
1328 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
1329 (target_regsets): Rename to ...
1330 (xtensa_regsets): ... this, and make static.
1331 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
1333 (xtensa_arch_setup, xtensa_regs_info): New functions.
1334 (the_low_target): Adjust.
1335 (initialize_low_arch): New function.
1336 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
1337 (nios2_arch_setup): Set the current process'es tdesc.
1338 (target_regsets): Rename to ...
1339 (nios2_regsets): ... this.
1340 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
1341 (nios2_regs_info): New function.
1342 (the_low_target): Adjust.
1343 (initialize_low_arch): New function.
1344 * linux-aarch64-low.c (tdesc_aarch64): Declare.
1345 (aarch64_arch_setup): Set the current process'es tdesc.
1346 (target_regsets): Rename to ...
1347 (aarch64_regsets): ... this.
1348 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
1349 (aarch64_regs_info): New function.
1350 (the_low_target): Adjust.
1351 (initialize_low_arch): New function.
1352 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
1354 (target_regsets): Rename to ...
1355 (tile_regsets): ... this.
1356 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
1357 (tile_regs_info): New function.
1358 (tile_arch_setup): Set the current process'es tdesc.
1359 (the_low_target): Adjust.
1360 (initialize_low_arch): New function.
1361 * spu-low.c (tdesc_spu): Declare.
1362 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
1363 * win32-arm-low.c (tdesc_arm): Declare.
1364 (arm_arch_setup): New function.
1365 (the_low_target): Install arm_arch_setup instead of
1367 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
1368 (init_windows_x86): Rename to ...
1369 (i386_arch_setup): ... this. Set `win32_tdesc'.
1370 (the_low_target): Adjust.
1371 * win32-low.c (win32_tdesc): New global.
1372 (child_add_thread): Don't create the thread cache here.
1373 (do_initial_child_stuff): Set the new process'es tdesc.
1374 * win32-low.h (struct target_desc): Forward declare.
1375 (win32_tdesc): Declare.
1376 * lynx-i386-low.c (tdesc_i386): Declare global.
1377 (lynx_i386_arch_setup): Set `lynx_tdesc'.
1378 * lynx-low.c (lynx_tdesc): New global.
1379 (lynx_add_process): Set the new process'es tdesc.
1380 * lynx-low.h (struct target_desc): Forward declare.
1381 (lynx_tdesc): Declare global.
1382 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
1383 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
1384 * nto-low.c (nto_tdesc): New global.
1385 (do_attach): Set the new process'es tdesc.
1386 * nto-low.h (struct target_desc): Forward declare.
1387 (nto_tdesc): Declare.
1388 * nto-x86-low.c (tdesc_i386): Declare.
1389 (nto_x86_arch_setup): Set `nto_tdesc'.
1391 2013-06-04 Gary Benson <gbenson@redhat.com>
1393 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
1394 to qSupported response when appropriate.
1395 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
1396 with nonzero-length annex.
1397 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
1398 arguments supplied in annex.
1400 2013-05-31 Doug Evans <dje@google.com>
1403 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
1404 64 bits in 64-cross-32 environment.
1406 2013-05-28 Pedro Alves <palves@redhat.com>
1408 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
1409 (aarch64-without-fpu.c): Delete rule.
1410 * configure.srv (aarch64*-*-linux*): Remove references to
1411 aarch64-without-fpu.o and aarch64-without-fpu.xml.
1412 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
1415 2013-05-24 Pedro Alves <palves@redhat.com>
1417 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
1418 instead of strchr/decode_address. Error if the range isn't split
1419 with a ','. Don't assume there's be a ':' in the action.
1421 2013-05-23 Yao Qi <yao@codesourcery.com>
1422 Pedro Alves <palves@redhat.com>
1424 * linux-low.c (lwp_in_step_range): New function.
1425 (linux_wait_1): If the thread was range stepping and stopped
1426 outside the stepping range, report the stop to GDB. Otherwise,
1427 continue stepping. Add range stepping debug output.
1428 (linux_set_resume_request): Copy the step range from the resume
1430 (linux_supports_range_stepping): New.
1431 (linux_target_ops) <supports_range_stepping>: Set to
1432 linux_supports_range_stepping.
1433 * linux-low.h (struct linux_target_ops)
1434 <supports_range_stepping>: New field.
1435 (struct lwp_info) <step_range_start, step_range_end>: New fields.
1436 * linux-x86-low.c (x86_supports_range_stepping): New.
1437 (the_low_target) <supports_range_stepping>: Set to
1438 x86_supports_range_stepping.
1439 * server.c (handle_v_cont): Handle 'r' action.
1440 (handle_v_requests): Append ";r" if the target supports range
1442 * target.h (struct thread_resume) <step_range_start,
1443 step_range_end>: New fields.
1444 (struct target_ops) <supports_range_stepping>:
1446 (target_supports_range_stepping): New macro.
1448 2013-05-17 Joel Brobecker <brobecker@adacore.com>
1450 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
1451 confusion in comment.
1453 2013-05-17 Joel Brobecker <brobecker@adacore.com>
1455 * lynx-low.c (struct process_info_private): New type.
1456 (lynx_add_process): New function.
1457 (lynx_create_inferior, lynx_attach): Replace calls to
1458 add_process by calls to lynx_add_process.
1459 (lynx_resume): If PTID is null, then try using
1460 current_process()->private->last_wait_event_ptid.
1462 (lynx_clear_inferiors): Delete. The contents of that function
1463 has been inlined in lynx_mourn;
1464 (lynx_wait_1): Save the ptid in the process's private data.
1465 (lynx_mourn): Free the process' private data. Replace call
1466 to lynx_clear_inferiors by call to clear_inferiors.
1468 2013-05-17 Yao Qi <yao@codesourcery.com>
1470 * i386-low.c (i386_length_and_rw_bits): Move the comment to
1473 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
1475 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
1476 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
1477 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
1478 PT_TEXT_END_ADDR guards. Update comments.
1479 (linux_target_op) <read_offsets>: Conditionally define to
1480 linux_read_offsets if the target is UCLIBC and if it defines
1481 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
1483 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
1484 Andrew Jenner <andrew@codesourcery.com>
1486 * Makefile.in (SFILES): Add linux-nios2-low.c.
1487 (clean): Add action to delete nios2-linux.c.
1488 (nios2-linux.c): New rule.
1489 * configure.srv: Add nios2*-*-linux*.
1490 * linux-nios2-low.c: New.
1492 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
1494 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
1496 2013-04-25 Hui Zhu <hui@codesourcery.com>
1499 * ax.c (ax_printf): Add fflush.
1501 2013-04-22 Tom Tromey <tromey@redhat.com>
1503 * Makefile.in (SFILES): Add filestuff.c.
1504 (OBS): Add filestuff.o.
1505 (filestuff.o): New target.
1506 * config.in, configure: Rebuild.
1507 * configure.ac: Check for fdwalk, pipe2.
1509 2013-04-17 Pedro Alves <palves@redhat.com>
1511 * configure.ac (USE_THREAD_DB): Delete variable.
1512 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
1513 Don't AC_SUBST USE_THREAD_DB.
1514 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
1515 * config.in, configure: Regenerate.
1517 2013-04-16 Pedro Alves <palves@redhat.com>
1519 * linux-low.h (struct lwp_info) <thread_known>: Move under
1520 the USE_THREAD_DB #ifdef.
1522 2013-04-16 Pedro Alves <palves@redhat.com>
1524 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
1525 (linux-low.o): Delete rule.
1526 * linux-low.h: Always include "gdb_thread_db.h" instead of
1527 conditionally including thread_db.h.
1528 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
1531 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1533 * Makefile.in (install-only): Fix make install regression.
1535 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
1537 Convert man pages to texinfo, new gdbinit.5 texinfo page.
1538 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
1540 * gdbserver.1: Remove.
1542 2013-03-22 Pedro Alves <palves@redhat.com>
1544 * linux-low.c (handle_extended_wait): Don't call
1545 linux_enable_event_reporting.
1547 2013-03-15 Tony Theodore <tonyt@logyst.com>
1550 * Makefile.in (SHELL): Use @SHELL@.
1552 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
1554 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
1557 2013-03-13 Joel Brobecker <brobecker@adacore.com>
1559 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
1560 Remove extraneous NULL element.
1562 2013-03-13 Yao Qi <yao@codesourcery.com>
1564 * tracepoint.c (traceframe_read_tsv): Look for the last matched
1565 'V' block in trace frame.
1567 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1569 * target.h (struct target_ops): Add btrace ops.
1570 (target_supports_btrace): New macro.
1571 (target_enable_btrace): New macro.
1572 (target_disable_btrace): New macro.
1573 (target_read_btrace): New macro.
1574 * gdbthread.h (struct thread_info): Add btrace field.
1575 * server.c: Include btrace-common.h.
1576 (handle_btrace_general_set): New function.
1577 (handle_btrace_enable): New function.
1578 (handle_btrace_disable): New function.
1579 (handle_general_set): Call handle_btrace_general_set.
1580 (handle_qxfer_btrace): New function.
1581 (struct qxfer qxfer_packets[]): Add btrace entry.
1582 * inferiors.c (remove_thread): Disable btrace.
1583 * linux-low: Include linux-btrace.h.
1584 (linux_low_enable_btrace): New function.
1585 (linux_low_read_btrace): New function.
1586 (linux_target_ops): Add btrace ops.
1587 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
1588 Add srv_linux_btrace=yes.
1589 (x86_64-*-linux*): Add linux-btrace.o.
1590 Add srv_linux_btrace=yes.
1591 * configure.ac: Define HAVE_LINUX_BTRACE.
1592 * config.in: Regenerated.
1593 * configure: Regenerated.
1595 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1597 * server.c (handle_qxfer): Preserve error message if -3 is
1599 (qxfer): Document the -3 return value.
1601 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1603 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
1604 (linux_btrace_h): New variable.
1605 (linux-btrace.o): New rule.
1607 2013-03-08 Stan Shebs <stan@codesourcery.com>
1608 Hafiz Abid Qadeer <abidh@codesourcery.com>
1610 * tracepoint.c (trace_buffer_size): New global.
1611 (DEFAULT_TRACE_BUFFER_SIZE): New define.
1612 (init_trace_buffer): Change to one-argument function. Allocate
1613 trace buffer memory.
1614 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
1615 handle QTBuffer:size packet.
1616 (cmd_bigqtbuffer_size): New function.
1617 (initialize_tracepoint): Call init_trace_buffer with
1618 DEFAULT_TRACE_BUFFER_SIZE.
1619 * server.c (handle_query): Add QTBuffer:size in the
1622 2013-03-07 Yao Qi <yao@codesourcery.com>
1624 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
1625 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
1627 (cmd_qtsp): Adjust condition. Do post increment.
1628 Set cur_action and cur_step_action back to 0.
1630 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
1633 * linux-low.c (linux_write_memory): Return early success if LEN is
1636 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
1638 * configure.srv: Add x86_64-*-cygwin* as target.
1640 2013-02-28 Tom Tromey <tromey@redhat.com>
1642 * configure.ac: Invoke AC_SYS_LARGEFILE.
1643 * configure, config.in: Rebuild.
1645 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
1647 * win32-low.c: Throughout, fix format strings and casts of
1648 printf-like functions to avoid type related warnings on all
1650 (get_child_debug_event): Print dwDebugEventCode as hex since
1651 that's how it's usually documented.
1653 2013-02-28 Yao Qi <yao@codesourcery.com>
1655 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
1658 2013-02-27 Jiong Wang <jiwang@tilera.com>
1660 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
1661 (reg-tilegx32.c): New rule.
1662 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
1663 * linux-tile-low.c (tile_arch_setup): New function. Invoke
1664 different register info initializer according to elf class.
1665 (init_registers_tilgx32): New function. The tilegx32 register info
1667 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
1668 (tile_store_gregset): Likewise.
1670 2013-02-27 Yao Qi <yao@codesourcery.com>
1672 * server.c (process_point_options): Print debug message when
1673 debug_threads is true.
1675 2013-02-26 Yao Qi <yao@codesourcery.com>
1677 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
1679 2013-02-19 Pedro Alves <palves@redhat.com>
1680 Kai Tietz <ktietz@redhat.com>
1684 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
1685 instead of strtoul to extract address from packet.
1686 (process_serial_event) <'z'>: Likewise.
1688 2013-02-18 Yao Qi <yao@codesourcery.com>
1690 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
1692 2013-02-14 Pedro Alves <palves@redhat.com>
1696 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
1697 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
1699 2013-02-14 Pedro Alves <palves@redhat.com>
1701 * tracepoint.c (cmd_qtdpsrc): Use savestring.
1703 2013-02-14 Pedro Alves <palves@redhat.com>
1705 * tracepoint.c (save_string): Delete.
1706 (add_tracepoint_action): Use savestring instead of save_string.
1708 2013-02-12 Pedro Alves <palves@redhat.com>
1710 * linux-xtensa-low.c: Ditto.
1711 * xtensa-xtregs.c: Ditto.
1713 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
1715 * thread-db.c (thread_db_get_tls_address): NULL pointer check
1718 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1720 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
1721 aarch64_num_wp_regs and aarch64_num_bp_regs to
1722 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
1724 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1726 * linux-aarch64-low.c (ps_get_thread_area): Replace
1727 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
1729 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
1730 Marcus Shawcroft <marcus.shawcroft@arm.com>
1731 Nigel Stephens <nigel.stephens@arm.com>
1732 Yufeng Zhang <yufeng.zhang@arm.com>
1734 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
1735 (aarch64.c, aarch64-without-fpu.c): New targets.
1736 * configure.srv (aarch64*-*-linux*): New.
1737 * linux-aarch64-low.c: New file.
1739 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1741 * linux-low.c (handle_extended_wait, linux_create_inferior)
1742 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
1743 (dequeue_one_deferred_signal, linux_resume_one_thread)
1744 (fetch_register, linux_write_memory, linux_enable_event_reporting)
1745 (linux_tracefork_grandchild, linux_test_for_tracefork)
1746 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
1747 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
1748 where the argument is 0.
1750 2013-01-25 Yao Qi <yao@codesourcery.com>
1752 * event-loop.c: Include "queue.h".
1753 (gdb_event_p): New typedef.
1754 (struct gdb_event) <next_event>: Remove.
1755 (event_queue): Change to QUEUE(gdb_event_p).
1756 (async_queue_event): Remove.
1757 (gdb_event_xfree): New.
1758 (initialize_event_loop): New.
1759 (process_event): Use API from QUEUE.
1760 (wait_for_event): Likewise.
1761 * server.c (main): Call initialize_event_loop.
1762 * server.h (initialize_event_loop): Declare.
1764 2013-01-18 Yao Qi <yao@codesourcery.com>
1766 * ax.h (struct eval_agent_expr_context): New.
1767 (gdb_eval_agent_expr): Update declaration.
1768 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
1769 TFRAME. Add new argument CTX.
1770 * server.h (struct eval_agent_expr_context): Declare.
1771 (agent_mem_read, agent_tsv_read): Update declaration.
1772 (agent_mem_read_string): Likewise.
1773 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
1774 (add_traceframe_block): Add new argument TPOINT.
1775 Increase TPOINT->traceframe_usage.
1776 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
1777 eval_tracepoint_agent_expr.
1778 (condition_true_at_tracepoint): Likewise.
1779 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
1780 (agent_mem_read_string, agent_tsv_read): Likewise.
1782 2013-01-16 Yao Qi <yao@codesourcery.com>
1784 * linux-low.c (linux_resume_one_lwp): Don't check
1785 'lwp->bp_reinsert != 0'.
1787 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1788 Pedro Alves <palves@redhat.com>
1790 * lynx-low.c (ptrace_request_to_str): Define a temporary
1791 macro and use it to simplify this function's implementation.
1793 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1795 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
1798 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1800 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
1802 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1804 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
1806 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1808 * lynx-low.c (lynx_resume): Use the resume_info parameter
1809 to determine the ptid for the lynx_ptrace call, unless
1810 it is equal to minus_one_ptid, in which case we use the
1811 ptid of the current_inferior.
1812 (lynx_wait_1): After having received a thread create/exit
1813 event, resume the inferior's execution using the signaling
1814 thread's ptid, rather than the old ptid.
1816 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1818 * lynx-low.c (lynx_resume): Delete variable ret.
1820 2013-01-01 Joel Brobecker <brobecker@adacore.com>
1822 * gdbreplay.c (gdbreplay_version): Update copyright year.
1823 * server.c (gdbserver_version): Likewise.
1825 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1827 * lynx-low.c (lynx_wait_1): Add debug trace before adding
1830 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1832 * lynx-low.c (ptrace_request_to_str): Add handling for
1835 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1837 * lynx-low.c (lynx_attach): Delete variable new_process.
1839 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1841 * lynx-low.c (lynx_create_inferior): Delete variable
1844 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1846 * lynx-low.c (ptrace_request_to_str): Do not handle
1847 PTRACE_GETTHREADLIST if this macro does not exist.
1849 2012-12-15 Yao Qi <yao@codesourcery.com>
1851 * Makefile.in (OBS): Add notif.o.
1852 * notif.c, notif.h: New.
1853 * server.c: Include "notif.h".
1854 (struct vstop_notif) <next>: Remove.
1856 (queue_stop_reply): Update.
1857 (push_event, send_next_stop_reply): Remove.
1858 (discard_queued_stop_replies): Update.
1859 (notif_stop): New variable.
1860 (handle_v_stopped): Remove.
1861 (handle_v_requests): Don't call handle_v_stopped. Call
1862 handle_ack_notif instead.
1863 (queue_stop_reply_callback): Call notif_event_enque instead
1864 of queue_stop_reply.
1865 (handle_status): Don't call send_next_stop_reply, call
1866 notif_write_event instead.
1867 (kill_inferior_callback): Likewise.
1868 (detach_or_kill_inferior_callback): Likewise.
1869 (main): Call initialize_notif.
1870 (process_serial_event): Call QUEUE_is_empty.
1871 (handle_target_event): Call notif_push instead of push event.
1872 * server.h (push_event): Remove declaration.
1874 2012-12-10 Tom Tromey <tromey@redhat.com>
1876 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
1877 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
1880 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
1881 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
1882 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
1883 (amd64-linux-ipa.o, ax.o): Rewrite.
1884 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
1885 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
1886 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
1887 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
1888 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
1889 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
1890 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
1891 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
1892 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
1893 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
1894 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
1895 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
1896 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
1897 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
1898 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
1899 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
1900 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
1901 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
1902 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
1903 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
1904 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
1905 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
1906 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
1907 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
1908 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
1909 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
1910 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
1911 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
1912 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
1913 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
1914 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
1915 (reg-tilegx.o): Remove.
1916 (all_object_files): New macro.
1917 Include .deps files.
1918 * aclocal.m4, configure: Rebuild.
1919 * acinclude.m4: Include depstand.m4, lead-dot.m4.
1920 * configure.ac: Invoke ZW_CREATE_DEPDIR,
1921 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
1923 2012-12-05 Tom Tromey <tromey@redhat.com>
1926 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
1928 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
1930 * configure.ac: Check for linux/perf_event.h.
1931 * config.in: Regenerated.
1932 * configure: Regenerated.
1934 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
1936 * hostio.c (handle_readlink): Decrease buffer size
1937 parameter passed to readlink by one byte.
1939 2012-11-26 Yao Qi <yao@codesourcery.com>
1941 * configure.ac (build_warnings): Append '-Wempty-body'.
1942 * configure: Regenerated.
1943 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
1946 2012-11-15 Pierre Muller <muller@sourceware.org>
1948 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
1949 * config.in: Regenerate.
1950 * configure: Regenerate.
1951 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
1952 Use "gdb_wait.h" header instead of <sys/wait.h> header.
1953 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1954 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
1956 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
1957 instead of <sys/wait.h> header.
1958 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1960 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
1962 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
1963 (various make rules): Remove -DGDBSERVER
1965 2012-11-09 Yao Qi <yao@codesourcery.com>
1967 * spu-low.c (current_ptid): Move it to ..
1968 * gdbthread.h: ... here. New.
1969 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
1970 * server.c (myresume, process_serial_event): Likewise.
1971 * thread-db.c (thread_db_find_new_threads): Likewise.
1972 * tracepoint.c (run_inferior_command): Likewise.
1974 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
1976 * server.c (handle_search_memory_1): Include access length in
1979 2012-09-05 Michael Brandt <michael.brandt@axis.com>
1981 * linux-crisv32-low.c: Fix compile errors.
1983 2012-09-04 Yao Qi <yao@codesourcery.com>
1985 * tracepoint.c (cmd_qtsv): Adjust debug message.
1986 Don't check CUR_TPOINT.
1988 2012-08-28 Yao Qi <yao@codesourcery.com>
1990 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
1991 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
1992 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
1993 Remove declarations of xmalloc, xreallloc, xstrdup and
1995 * Makefile.in (libiberty_h): New.
1996 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
1997 (linux-bfin-low.o): Append dependency 'libiberty.h'.
1999 2012-08-23 Yao Qi <yao@codesourcery.com>
2001 * server.h: Remove declaration of 'xsnprintf'.
2003 2012-08-22 Keith Seitz <keiths@redhat.com>
2005 * server.h: Include build-gnulib-gbserver/config.h.
2006 * gdbreplay.c: Likewise.
2008 2012-08-08 Doug Evans <dje@google.com>
2010 * Makefile.in (SFILES): Add gdb_vecs.c.
2011 (OBS): Add gdb_vecs.o.
2012 (gdb_vecs_h, host_defs_h): New variables.
2013 (thread-db.o): Add $(gdb_vecs_h) dependency.
2014 (gdb_vecs.o): New rule.
2015 * thread-db.c: #include "gdb_vecs.h".
2016 (thread_db_load_search): Use a vector to iterate over path elements.
2017 Handle text appearing after "$pdir".
2019 * configure.ac: Add check for strstr.
2020 * config.in: Regenerate.
2021 * configure: Regenerate.
2023 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
2025 * hostio.c (handle_pread): If pread fails, fall back to attempting
2027 (handle_pwrite): Likewise for pwrite.
2029 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
2031 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
2032 between unsupported TYPE and unimplementable ADDR/LEN combination.
2033 (arm_insert_point): Act on new return value.
2035 2012-07-31 Pedro Alves <palves@redhat.com>
2037 * server.c (process_point_options): Only skip tokens if we find
2038 one that is unrecognized. Don't treat 'X' specially while
2039 skipping unrecognized tokens.
2041 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
2043 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
2044 to 4-byte-align HW breakpoint addresses for Thumb.
2046 2012-07-27 Yao Qi <yao@codesourcery.com>
2050 * server.h: Declare gdb_agent_about_to_close.
2051 * target.c (kill_inferior): Include "agent.h".
2052 New. Send command 'kill'.
2053 * target.h (kill_inferior): Removed macro.
2054 * tracepoint.c (gdb_agent_about_to_close): New.
2055 (gdb_agent_helper_thread): Handle command 'close'.
2056 Wait endlessly until the inferior stops.
2057 Install gdb_agent_remove_socket to atexit hook.
2058 (agent_socket_name): New static variable.
2059 (gdb_agent_socket_init): Replace local variable 'name' with
2060 'agent_socket_name'.
2061 (gdb_agent_remove_socket): New.
2063 2012-07-27 Yao Qi <yao@codesourcery.com>
2065 * server.c (process_point_options): Stop at 'X' when parsing.
2067 2012-07-19 Michael Eager <eager@eagercon.com>
2069 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
2071 * linux-x86-low.c (x86_insert_point, x86_remove_point):
2072 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
2073 hardware breakpoint.
2075 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2077 * gdbserver/linux-low.c (initialize_low): Call
2078 linux_ptrace_init_warnings.
2080 2012-07-02 Doug Evans <dje@google.com>
2082 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
2085 2012-07-02 Stan Shebs <stan@codesourcery.com>
2087 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
2088 (ax.o): Add it to build rule.
2090 (OBS): Add format.o.
2091 (IPA_OBS): Add format.o.
2092 * server.c (handle_query): Claim support for breakpoint commands.
2093 (process_point_options): Add command case.
2094 (process_serial_event): Leave running if there are printfs in
2096 * mem-break.h (any_persistent_commands): Declare.
2097 (add_breakpoint_commands): Declare.
2098 (gdb_no_commands_at_breakpoint): Declare.
2099 (run_breakpoint_commands): Declare.
2100 * mem-break.c (struct point_command_list): New struct.
2101 (struct breakpoint): New field command_list.
2102 (any_persistent_commands): New function.
2103 (add_commands_to_breakpoint): New function.
2104 (add_breakpoint_commands): New function.
2105 (gdb_no_commands_at_breakpoint): New function.
2106 (run_breakpoint_commands): New function.
2107 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
2109 * ax.c: Include format.h.
2110 (ax_printf): New function.
2111 (gdb_eval_agent_expr): Add printf opcode.
2113 2012-06-13 Yao Qi <yao@codesourcery.com>
2115 * server.c (start_inferior): Remove duplicated writes to fields
2116 'last_resume_kind' and 'last_status' of 'current_inferior'.
2118 2012-06-12 Yao Qi <yao@codesourcery.com>
2119 Pedro Alves <palves@redhat.com>
2121 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
2123 * server.c (handle_v_cont): Extend comment.
2125 2012-06-11 Yao Qi <yao@codesourcery.com>
2127 * linux-low.c (linux_attach): Add 'static'.
2129 2012-06-06 Yao Qi <yao@codesourcery.com>
2131 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
2133 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2135 Fix gcc -flto compilation warning.
2136 * server.c (main): Make variable multi_mode and attach volatile.
2138 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2140 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
2141 if the platform doesn't know about it.
2143 2012-05-30 Jeff Kenton <jkenton@tilera.com>
2145 * Makefile.in (SFILES): Add linux-tile-low.c.
2146 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
2147 * configure.srv: Handle tilegx-*-linux*.
2148 * linux-tile-low.c: New file.
2150 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2152 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
2154 2012-05-24 Pedro Alves <palves@redhat.com>
2158 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
2160 2012-05-24 Pedro Alves <palves@redhat.com>
2164 Replace target_signal with gdb_signal throughout.
2166 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
2168 * linux-low.c (linux_store_registers): Avoid the copying sequence
2169 when no data has been retrieved by ptrace.
2171 2012-05-22 Will Deacon <will.deacon@arm.com>
2173 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
2174 Include asm/ptrace.h.
2175 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
2178 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
2180 * linux-low.c (linux_store_registers): Don't re-retrieve data
2181 with ptrace that has already been obtained from /proc. Always
2182 copy any data retrieved with ptrace to the buffer supplied.
2184 2012-05-11 Yao Qi <yao@codesourcery.com>
2185 Pedro Alves <palves@redhat.com>
2187 * linux-low.c (enum stopping_threads_kind): New.
2188 (stopping_threads): Change type to `enum stopping_threads_kind'.
2189 (handle_extended_wait): If stopping and suspending threads, leave
2190 the new_lwp suspended too.
2191 (linux_wait_for_event): Adjust.
2192 (stop_all_lwps): Set `stopping_threads' to
2193 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
2194 whether we're suspending threads or just stopping them. Assert no
2197 2012-04-29 Yao Qi <yao@codesourcery.com>
2199 * server.h: Move some code to ...
2200 * gdbthread.h: ... here. New.
2201 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
2202 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
2203 (nto-low.o, win32-low.o): Likewise.
2204 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
2205 * regcache.c, remote-utils.c, server.c: Likewise.
2206 * target.c, tracepoint.c, win32-low.c: Likewise.
2208 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2210 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
2211 (PTRACE_ARG4_TYPE): Likewise.
2212 (PTRACE_XFER_TYPE): Likewise.
2213 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
2214 ptrace to PTRACE_ARG3_TYPE.
2215 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
2216 (PTRACE_ARG4_TYPE): Likewise.
2217 (PTRACE_XFER_TYPE): Likewise.
2218 (linux_detach_one_lwp): Cast fourth argument of
2219 ptrace to long then PTRACE_ARG4_TYPE.
2220 (regsets_fetch_inferior_registers): Cast third argument of
2221 ptrace to long then PTRACE_ARG3_TYPE.
2222 (regsets_store_inferior_registers): Likewise.
2224 2012-04-20 Pedro Alves <palves@redhat.com>
2226 * configure: Regenerate.
2228 2012-04-19 Pedro Alves <palves@redhat.com>
2230 * Makefile.in (GNULIB_BUILDDIR): New.
2231 (LIBGNU, INCGNU, GNULIB_H): Adjust.
2232 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
2233 (all, install-only, uninstall, clean-info, all-lib, clean): No
2234 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
2235 (maintainer-clean realclean distclean): Use subdir_do.
2237 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
2238 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
2239 * acinclude.m4: Include acx_configure_dir.m4.
2240 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
2241 calls. Call AC_PROG_RANLIB. Configure gnulib using
2244 (GNULIB_STDINT_H): Adjust.
2245 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
2246 * gdbreplay.c: Include build-gnulib/config.h.
2247 * server.h: Likewise.
2248 * aclocal.m4: Regenerate.
2249 * config.in: Regenerate.
2250 * configure: Regenerate.
2252 2012-04-19 Pedro Alves <palves@redhat.com>
2254 * Makefile.in (LIBGNU, INCGNU): Adjust.
2255 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
2256 (all, install-only, uninstall, clean-info, all-lib, clean)
2257 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
2258 * configure.ac: Adjust AC_OUTPUT output.
2259 * aclocal.m4: Regenerate.
2260 * configure: Regenerate.
2262 2012-04-19 Pedro Alves <palves@redhat.com>
2264 * Makefile.in (generated_files): New.
2265 (server_h): Remove the explicit dependency on config.h, and depend
2266 on $generated_files.
2268 2012-04-19 Pedro Alves <palves@redhat.com>
2270 * Makefile.in (INCGNU): Add -Ignulib.
2272 2012-04-19 Pedro Alves <palves@redhat.com>
2274 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
2275 (INCGNU): ... this, and spell out -I here.
2276 (GNULIB_LIB): Rename to ...
2278 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
2280 2012-04-19 Pedro Alves <palves@redhat.com>
2282 * config.in: Regenerate.
2284 2012-04-19 Pedro Alves <palves@redhat.com>
2286 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
2287 * server.h (memmem): Remove declaration.
2288 * config.in: Regenerate.
2289 * configure: Regenerate.
2291 2012-04-19 Yao Qi <yao@codesourcery.com>
2293 * Makefile.in (SFILES): Add common/vec.c.
2297 2012-04-19 Yao Qi <yao@codesourcery.com>
2299 * remote-utils.c (prepare_resume_reply): Replace with macro
2300 target_core_of_thread.
2301 * server.c (handle_qxfer_threads_proper): Likewise.
2302 * target.h (traget_core_of_thread): New macro.
2304 2012-04-18 Pedro Alves <palves@redhat.com>
2306 * aclocal.m4: Regenerate.
2307 * configure: Regenerate.
2309 2012-04-16 Yao Qi <yao@codesourcery.com>
2311 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
2312 duplicated on address.
2314 2012-04-16 Yao Qi <yao@codesourcery.com>
2316 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
2317 (struct tracepoint_action_ops) <send>: New field.
2318 (m_tracepoint_action_send, r_tracepoint_action_send): New.
2319 (agent_expr_send, x_tracepoint_action_send): New.
2320 (l_tracepoint_action_send): New.
2321 (cmd_qtdp): Download and install tracepoint
2322 according to `use_agent'.
2323 (run_inferior_command): Add one more parameter `len'.
2325 (tracepoint_send_agent): New.
2326 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
2328 2012-04-16 Yao Qi <yao@codesourcery.com>
2330 * tracepoint.c (download_tracepoints): Moved to ...
2331 (cmd_qtstart): ... here.
2333 2012-04-14 Yao Qi <yao@codesourcery.com>
2335 * tracepoint.c: Include inttypes.h.
2336 (struct collect_memory_action): Use sized types.
2337 (struct tracepoint): Likewise.
2338 (cmd_qtdp, stop_tracing): Update print specifiers.
2339 (cmd_qtp, response_tracepoint): Likewise.
2340 (collect_data_at_tracepoint): Likewise.
2341 (collect_data_at_step): Likewise.
2343 2012-04-14 Yao Qi <yao@codesourcery.com>
2345 Import gnulib module inttypes.
2346 * aclocal.m4, config.in, configure: Regenerated.
2348 2012-04-14 Yao Qi <yao@codesourcery.com>
2350 * Makefile.in (maintainer-clean, realclean, distclean): Remove
2351 Makefile and config.status at last.
2353 2012-04-13 Yao Qi <yao@codesourcery.com>
2355 * tracepoint.c: Include stdint.h unconditionally.
2357 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2359 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
2360 on BFD_HAVE_SYS_PROCFS_TYPE.
2361 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
2362 * configure: Regenerate.
2363 * config.in: Likewise.
2365 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
2367 * Makefile.in (clean): Also remove x32.c x32-linux.c
2368 x32-avx.c x32-avx-linux.c.
2369 (x32.o): New target.
2371 (x32-linux.o): Likewise.
2372 (x32-linux.c): Likewise.
2373 (x32-avx.o): Likewise.
2374 (x32-avx.c): Likewise.
2375 (x32-avx-linux.o): Likewise.
2376 (x32-avx-linux.c): Likewise.
2378 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
2379 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
2380 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
2381 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
2382 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
2383 i386/x32-avx-linux.xml.
2385 * linux-x86-low.c (init_registers_x32_linux): New prototype.
2386 (init_registers_x32_avx_linux): Likwise.
2387 (x86_linux_update_xmltarget): Call init_registers_x32_linux
2388 or init_registers_x32_avx_linux if linux_is_elf64 is false.
2390 2012-04-13 Pedro Alves <palves@redhat.com>
2392 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
2393 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
2394 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
2395 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
2398 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
2400 * linux-x86-low.c (compat_x32_clock_t): New.
2401 (compat_x32_siginfo_t): Likewise.
2402 (compat_x32_siginfo_from_siginfo): Likewise.
2403 (siginfo_from_compat_x32_siginfo): Likewise.
2404 (linux_is_elf64): Likewise.
2405 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
2406 and siginfo_from_compat_x32_siginfo for x32.
2407 (x86_arch_setup): Set linux_is_elf64.
2409 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
2412 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
2414 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
2415 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
2416 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
2417 compatible with process.
2419 2012-04-12 Yao Qi <yao@codesourcery.com>
2421 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
2422 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
2423 (install-only, install-info, clean): Handle sub dir gnulib.
2424 (all-lib, am--refresh): New targets.
2425 (memmem.o): Remove target.
2426 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
2427 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
2428 (AC_REPLACE_FUNCS): Remove memmem.
2429 Invoke gl_INIT and AM_INIT_AUTOMAKE.
2430 (AC_OUTPUT): Generate Makefile in gnulib/.
2431 * aclocal.m4, config.in, configure: Regenerated.
2433 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
2435 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
2437 2012-04-05 Pedro Alves <palves@redhat.com>
2439 -Werror=strict-aliasing
2441 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
2444 2012-04-04 Pedro Alves <palves@redhat.com>
2446 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
2447 (sparc_store_gregset_from_stack, sparc_store_gregset)
2448 (sparc_breakpoint_at): Fix formatting.
2450 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2452 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
2454 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
2455 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
2456 * config.in: Regenerate.
2457 * configure: Likewise.
2459 2012-03-29 Pedro Alves <palves@redhat.com>
2461 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
2462 Correct ptrace arguments.
2464 2012-03-28 Pedro Alves <palves@redhat.com>
2466 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
2467 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
2468 (IA64_FR1_REGNUM): New defines.
2469 (ia64_fetch_register): New.
2470 (the_low_target): Install it.
2471 * linux-low.h (struct linux_target_ops) <fetch_register>: New
2473 * linux-low.c (linux_fetch_registers): Try the
2474 the_low_target.fetch_register hook first.
2476 * linux-arm-low.c (the_low_target): Adjust.
2477 * linux-bfin-low.c (the_low_target): Adjust.
2478 * linux-cris-low.c (the_low_target): Adjust.
2479 * linux-crisv32-low.c (the_low_target): Adjust.
2480 * linux-m32r-low.c (the_low_target): Adjust.
2481 * linux-m68k-low.c (the_low_target): Adjust.
2482 * linux-mips-low.c (the_low_target): Adjust.
2483 * linux-ppc-low.c (the_low_target): Adjust.
2484 * linux-s390-low.c (the_low_target): Adjust.
2485 * linux-sh-low.c (the_low_target): Adjust.
2486 * linux-sparc-low.c (the_low_target): Adjust.
2487 * linux-tic6x-low.c (the_low_target): Adjust.
2488 * linux-x86-low.c (the_low_target): Adjust.
2489 * linux-xtensa-low.c (the_low_target): Adjust.
2491 2012-03-26 Pedro Alves <palves@redhat.com>
2493 * server.c (handle_qxfer_libraries): Don't bail early if
2494 the_target->qxfer_libraries_svr4 is not NULL.
2496 2012-03-26 Pedro Alves <palves@redhat.com>
2498 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
2500 2012-03-23 Pedro Alves <palves@redhat.com>
2502 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
2503 "library-list-svr4" element's start tag when the the DSO list is
2506 2012-03-23 Pedro Alves <palves@redhat.com>
2508 * linux-low.c (read_one_ptr): Read the inferior's pointer through
2509 a variable whose type size is the same as the inferior's pointer
2512 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
2514 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
2516 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
2517 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2518 * linux-low.h: Include <signal.h>.
2519 (struct siginfo): Remove forward declaration.
2520 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
2523 2012-03-21 Mike Frysinger <vapier@gentoo.org>
2525 * .gitignore: Ignore more files.
2527 2012-03-19 Pedro Alves <palves@redhat.com>
2528 Jan Kratochvil <jan.kratochvil@redhat.com>
2530 * server.c (cont_thread, general_thread): Add describing comments.
2531 (start_inferior): Clear `cont_thread'.
2532 (handle_v_cont): Don't set `cont_thread' if resuming all threads
2535 2012-03-15 Yao Qi <yao@codesourcery.com>
2537 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
2539 (cmd_qtdp): ... here.
2541 2012-03-15 Yao Qi <yao@codesourcery.com>
2543 * tracepoint.c (struct tracepoint_action_ops): New.
2544 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
2545 (m_tracepoint_action_download): New.
2546 (r_tracepoint_action_download): New.
2547 (x_tracepoint_action_download): New.
2548 (l_tracepoint_action_download): New.
2549 (add_tracepoint_action): Install `action->ops' according type.
2550 (download_tracepoint_1): Move code `download' function pointer
2551 of various tracepoint_action_ops.
2553 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
2555 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
2556 linux_ptrace_attach_warnings.
2558 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
2560 * Makefile.in (linux-ptrace.o): New.
2561 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
2562 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
2563 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
2564 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
2565 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
2567 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
2569 2012-03-08 Yao Qi <yao@codesourcery.com>
2570 Pedro Alves <palves@redhat.com>
2572 Fix PR server/13392.
2573 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
2575 * tracepoint.c (remove_tracepoint): New.
2576 (cmd_qtdp): Call remove_tracepoint when failed to install.
2578 2012-03-07 Pedro Alves <palves@redhat.com>
2580 * linux-low.c (get_detach_signal): New.
2581 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
2582 Pass on pending signals to PTRACE_DETACH. Check the result of the
2584 * server.c (program_signals, program_signals_p): New.
2585 (handle_general_set): Handle QProgramSignals.
2586 * server.h (program_signals, program_signals_p): Declare.
2588 2012-03-05 Pedro Alves <palves@redhat.com>
2589 Jan Kratochvil <jan.kratochvil@redhat.com>
2591 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
2594 2012-03-03 Yao Qi <yao@codesourcery.com>
2596 * tracepoint.c (tracepoint_look_up_symbols): Update call to
2597 agent_look_up_symbols.
2599 2012-03-03 Yao Qi <yao@codesourcery.com>
2601 * Makefile.in (linux-low.o): Keep dependence on agent.h.
2602 (linux-x86-low.o): Likewise.
2603 * server.h: Remove in_process_agent_loaded.
2604 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
2608 2012-03-03 Yao Qi <yao@codesourcery.com>
2610 * tracepoint.c (gdb_agent_capability): New global.
2611 (in_process_agent_loaded_ust): Renamed to
2612 `in_process_agent_supports_ust'.
2614 (in_process_agent_supports_ust): Call agent_capability_check.
2615 (clear_installed_tracepoints): Assert that agent supports
2618 2012-03-03 Yao Qi <yao@codesourcery.com>
2620 * linux-low.c (linux_supports_agent): New.
2621 (linux_target_ops): Initialize field `supports_agent' with
2622 linux_supports_agent.
2623 * target.h (struct target_ops) <supports_agent>: New.
2624 (target_supports_agent): New macro.
2625 * server.c (handle_general_set): Handle packet 'QAgent'.
2626 (handle_query): Send `QAgent+'.
2627 * Makefile.in (server.o): Depends on agent.h.
2629 2012-03-03 Yao Qi <yao@codesourcery.com>
2631 * Makefile.in (OBS): Add agent.o.
2632 Add new rule for agent.o.
2633 Track dependence of tracepoint.c on agent.h.
2634 * tracepoint.c (run_inferior_command_1):
2635 (run_inferior_command): Call agent_run_command.
2636 (gdb_ust_connect_sync_socket): Deleted. Move it to
2638 (resume_thread, stop_thread): Likewise.
2639 (gdb_ust_socket_init): Renamed to ...
2640 (gdb_agent_socket_init): ... New.
2641 (gdb_ust_thread): Renamed to ...
2642 (gdb_agent_helper_thread): ... New.
2643 (gdb_ust_init): Move some code to ...
2644 (gdb_agent_init): ... here. New.
2645 [HAVE_UST]: Call gdb_ust_init.
2646 (initialize_tracepoint_ftlib): Call gdb_agent_init.
2647 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
2648 * config.in, configure: Regenerated.
2650 2012-03-02 Pedro Alves <palves@redhat.com>
2652 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
2653 * linux-low.c (struct simple_pid_list): New.
2654 (stopped_pids): New a struct simple_pid_list pointer.
2655 (add_to_pid_list, pull_pid_from_list): New.
2656 (handle_extended_wait): Don't assume the first signal new children
2657 report is SIGSTOP. Adjust call to pull_pid_from_list.
2658 (linux_wait_for_lwp): Adjust.
2660 2012-03-02 Yao Qi <yao@codesourcery.com>
2662 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
2665 2012-03-02 Yao Qi <yao@codesourcery.com>
2667 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
2668 `stop_pc' and `tpoint'. Update caller.
2670 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
2672 * linux-low.h (linux_target_ops): Add regset_bitmap member.
2673 * linux-low.c (use_linux_regsets): New macro.
2674 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
2675 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
2676 (linux_register_in_regsets): New function.
2677 (usr_fetch_inferior_registers): Skip registers covered by
2679 (usr_store_inferior_registers): Likewise.
2680 (usr_fetch_inferior_registers): New macro.
2681 (usr_store_inferior_registers): Likewise.
2682 (linux_fetch_registers): Handle mixed regset/non-regset targets.
2683 (linux_store_registers): Likewise.
2684 * linux-mips-low.c (init_registers_mips_dsp_linux): New
2686 (init_registers_mips64_dsp_linux): Likewise.
2687 (init_registers_mips_linux): New macro.
2688 (init_registers_mips_dsp_linux): Likewise.
2689 (mips_dsp_num_regs): Likewise.
2690 (DSP_BASE, DSP_CONTROL): New fallback macros.
2691 (mips_base_regs): New macro.
2692 (mips_regmap): Use it. Fix the size.
2693 (mips_dsp_regmap): New variable.
2694 (mips_dsp_regset_bitmap): Likewise.
2695 (mips_arch_setup): New function.
2696 (mips_cannot_fetch_register): Use the_low_target.regmap rather
2698 (mips_cannot_store_register): Likewise.
2699 (the_low_target): Update .arch_setup, .num_regs and .regmap
2700 initializers. Add .regset_bitmap initializer.
2701 * linux-arm-low.c (the_low_target): Add .regset_bitmap
2703 * linux-bfin-low.c (the_low_target): Likewise.
2704 * linux-cris-low.c (the_low_target): Likewise.
2705 * linux-crisv32-low.c (the_low_target): Likewise.
2706 * linux-ia64-low.c (the_low_target): Likewise.
2707 * linux-m32r-low.c (the_low_target): Likewise.
2708 * linux-m68k-low.c (the_low_target): Likewise.
2709 * linux-ppc-low.c (the_low_target): Likewise.
2710 * linux-s390-low.c (the_low_target): Likewise.
2711 * linux-sh-low.c (the_low_target): Likewise.
2712 * linux-sparc-low.c (the_low_target): Likewise.
2713 * linux-tic6x-low.c (the_low_target): Likewise.
2714 * linux-x86-low.c (the_low_target): Likewise.
2715 * linux-xtensa-low.c (the_low_target): Likewise.
2716 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
2717 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
2718 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
2720 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
2721 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
2723 2012-02-29 Yao Qi <yao@codesourcery.com>
2724 Pedro Alves <palves@redhat.com>
2726 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
2727 `step_over_finished' is true.
2729 2012-02-27 Pedro Alves <palves@redhat.com>
2731 * linux-low.c (pid_is_stopped): Delete, moved to common/.
2732 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
2734 2012-02-27 Pedro Alves <palves@redhat.com>
2737 * linux-low.c (pid_is_stopped): New.
2738 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
2740 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
2742 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
2745 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
2747 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
2749 2012-02-24 Luis Machado <lgustavo@codesourcery>
2751 * server.c (handle_query): Advertise support for target-side
2752 breakpoint condition evaluation.
2753 (process_point_options): New function.
2754 (process_serial_event): When inserting a breakpoint, check for
2755 a target-side condition that should be evaluated.
2757 * mem-break.c: Include regcache.h and ax.h.
2758 (point_cond_list_t): New data structure.
2759 (breakpoint) <cond_list>: New field.
2760 (find_gdb_breakpoint_at): Make non-static.
2761 (delete_gdb_breakpoint_at): Clear any target-side
2763 (clear_gdb_breakpoint_conditions): New function.
2764 (add_condition_to_breakpoint): Likewise.
2765 (add_breakpoint_condition): Likewise.
2766 (gdb_condition_true_at_breakpoint): Likewise.
2767 (gdb_breakpoint_here): Return result directly instead
2768 of going through a local variable.
2770 * mem-break.h (find_gdb_breakpoint_at): New prototype.
2771 (clear_gdb_breakpoint_conditions): Likewise.
2772 (add_breakpoint_condition): Likewise.
2773 (gdb_condition_true_at_breakpoint): Likewise.
2775 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
2776 (need_step_over_p): Take target-side breakpoint condition into
2779 2012-02-24 Luis Machado <lgustavo@codesourcery>
2781 * server.h: Include tracepoint.h.
2782 (agent_mem_read, agent_get_trace_state_variable_value,
2783 agent_set_trace_state_variable_value,
2784 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
2785 get_set_tsv_func_addr): New prototypes.
2787 * ax.h: New include file.
2788 * ax.c: New source file.
2790 * tracepoint.c: Include ax.h.
2791 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
2792 agent_expr, eval_result_type): Move to ax.h.
2793 (parse_agent_expr): Rename to ...
2794 (gdb_parse_agent_expr): ... this, make it non-static and move
2796 (unparse_agent_expr) Rename to ...
2797 (gdb_unparse_agent_expr): ... this, make it non-static and move
2799 (eval_agent_expr): Rename to ...
2800 (eval_tracepoint_agent_expr): ... this.
2801 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
2802 forward declarations.
2803 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
2804 (agent_get_trace_state_variable_value): New function.
2805 (agent_set_trace_state_variable_value): New function.
2806 (cmd_qtdp): Call gdb_parse_agent_expr (...).
2807 (response_tracepoint): Call gdb_unparse_agent_expr (...).
2808 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
2809 (condition_true_at_tracepoint): Likewise.
2810 (parse_agent_expr): Rename to ...
2811 (gdb_parse_agent_expr): ... this and move to ax.c.
2812 (unparse_agent_expr): Rename to ...
2813 (gdb_unparse_agent_expr): ... this and move to ax.c.
2814 (gdb_agent_op_name): Move to ax.c.
2815 (eval_agent_expr): Rename to ...
2816 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
2818 (eval_tracepoint_agent_expr): New function.
2819 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
2821 (current_insn_ptr, emit_error, struct bytecode_address): Move to
2823 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
2824 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
2825 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
2826 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
2827 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
2828 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
2829 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
2830 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
2831 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
2832 (compile_bytecodes): Remove forward declaration.
2833 (is_goto_target): Move to ax.c.
2834 (compile_bytecodes): Move to ax.c and call
2835 agent_get_trace_state_variable_value (...) and
2836 agent_set_trace_state_variable_value (...).
2838 * Makefile.in: Update ax.c and IPA dependencies.
2840 2012-02-24 Pedro Alves <palves@redhat.com>
2842 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
2843 (cmd_bigqtbuffer_circular): ... this. Only handle
2844 'QTBuffer:circular:'.
2845 (handle_tracepoint_general_set): Adjust.
2847 2012-02-16 Yao Qi <yao@codesourcery.com>
2849 * inferiors.c: Move code to ...
2850 * dll.c: .... here. New.
2851 * server.h: Declare clear_dlls.
2852 * Makefile.in (SFILES): Add dll.c.
2856 2012-02-11 Yao Qi <yao@codesourcery.com>
2858 * server.c: (handle_monitor_command): Add a new parameter
2860 (handle_query): Update caller.
2862 2012-02-09 Joel Brobecker <brobecker@adacore.com>
2864 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
2865 * configure, config.in: Regenerate.
2866 * hostio.c: Provide an alternate implementation if HAVE_READLINK
2869 2012-02-02 Pedro Alves <palves@redhat.com>
2871 Try SIGKILL first, then PTRACE_KILL.
2872 * linux-low.c (linux_kill_one_lwp): New.
2873 (linux_kill_one_lwp): Rename to ...
2874 (kill_one_lwp_callback): ... this. Use the new
2877 2012-02-02 Pedro Alves <palves@redhat.com>
2879 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
2882 2012-01-27 Pedro Alves <palves@redhat.com>
2884 * linux-low.c (linux_child_pid_to_exec_file): Delete.
2885 (elf_64_file_p): Make static.
2886 (linux_pid_exe_is_elf_64_file): New.
2887 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
2888 Delete declarations.
2889 (linux_pid_exe_is_elf_64_file): Declare.
2890 * linux-x86-low.c (x86_arch_setup): Use
2891 linux_pid_exe_is_elf_64_file.
2893 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2895 * linux-low.c (linux_wait_for_event_1): Rename to ...
2896 (linux_wait_for_event): ... here and merge it with former
2897 linux_wait_for_event - new variable wait_ptid, use it.
2898 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
2900 2012-01-23 Pedro Alves <palves@redhat.com>
2902 * server.c (main): Avoid yet another case of infinite loop while
2903 detaching/killing after a longjmp.
2905 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2908 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
2910 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
2912 * hostio.c (handle_readlink): New function.
2913 (handle_vFile): Call it to handle "vFile:readlink" packets.
2915 2012-01-20 Pedro Alves <palves@redhat.com>
2916 Ulrich Weigand <ulrich.weigand@linaro.org>
2918 * server.c (handle_v_requests): Only support vAttach and vRun to
2919 start multiple processes when in extended protocol mode.
2921 2012-01-17 Pedro Alves <palves@redhat.com>
2923 * tracepoint.c (initialize_tracepoint): Use mmap instead of
2924 memalign plus mprotect to allocate the scratch buffer.
2926 2012-01-13 Pedro Alves <palves@redhat.com>
2928 * server.c (attach_inferior): Clear `cont_thread'.
2930 2012-01-13 Pedro Alves <palves@redhat.com>
2932 * server.c (main): Avoid infinite loop while detaching/killing
2935 2012-01-09 Doug Evans <dje@google.com>
2937 * server.c (start_inferior): Set last_ptid in --wrapper case.
2939 2012-01-06 Yao Qi <yao@codesourcery.com>
2941 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
2943 [IN_PROCESS_AGENT] (debug_agent): New global variable.
2945 2012-01-04 Yao Qi <yao@codesourcery.com>
2947 * tracepoint.c (cmd_qtdp): Print debug message
2948 for static tracepoint.
2950 2012-01-04 Yao Qi <yao@codesourcery.com>
2952 * tracepoint.c (trace_vdebug): Differentiate debug message
2953 between gdbserver and IPA.
2955 2012-01-03 Yao Qi <yao@codesourcery.com>
2957 * tracepoint.c (tracepoint_was_hit): Don't collect for
2960 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2962 * terminal.h: Reformat copyright header.
2964 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2966 * server.c (gdbserver_version): Update copyright year.
2967 * gdbreplay.c (gdbreplay_version): Likewise.
2969 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
2971 * linux-low.c (linux_create_inferior): Put empty if clause for write.
2974 2011-12-18 Hui Zhu <teawater@gmail.com>
2975 * linux-low.c (linux_create_inferior): Save return value to ret.
2977 2011-12-18 Hui Zhu <teawater@gmail.com>
2979 * linux-low.c (linux_create_inferior): Save return value to ret.
2981 2011-12-16 Doug Evans <dje@google.com>
2983 * linux-low.c (linux_create_inferior): If stdio connection,
2984 redirect stdin from /dev/null, stdout to stderr.
2985 * remote-utils.c (remote_is_stdio): New static global.
2986 (remote_connection_is_stdio): New function.
2987 (remote_prepare): Handle stdio connection.
2988 (remote_open): Ditto.
2989 (remote_close): Don't close stdin for stdio connections.
2990 (read_prim,write_prim): New functions. Replace all calls to
2991 read/write to these.
2992 * server.c (main): Watch for "-" argument. Move call to
2993 remote_prepare before start_inferior.
2994 * server.h (STDIO_CONNECTION_NAME): New macro.
2995 (remote_connection_is_stdio): Declare.
2997 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
2998 in debugging output.
3000 2011-12-15 Yao Qi <yao@codesourcery.com>
3002 * tracepoint.c: Include sys/syscall.h.
3003 (gdb_ust_thread): Remove preprocessor conditional.
3005 2011-12-14 Pedro Alves <pedro@codesourcery.com>
3007 * linux-low.c (linux_detach_one_lwp): Call
3008 the_low_target.prepare_to_resume before detaching.
3010 2011-12-14 Yao Qi <yao@codesourcery.com>
3012 * tracepoint.c (gdb_ust_thread): Don't ignore return value
3015 2011-12-14 Yao Qi <yao@codesourcery.com>
3017 * i386-low.c (i386_low_stopped_data_address): Initialize local
3020 2011-12-13 Pedro Alves <pedro@codesourcery.com>
3024 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
3025 DR_CONTROL unless necessary. Extend comments.
3026 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
3027 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
3029 2011-12-13 Yao Qi <yao@codesourcery.com>
3031 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
3033 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
3035 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
3037 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
3038 Print new debug message for such case.
3040 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3042 Fix overlapping memcpy.
3043 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
3044 the read_inferior_memory transfer.
3045 (delete_fast_tracepoint_jump): New variable buf. Use it for the
3046 write_inferior_memory transfer.
3047 (set_fast_tracepoint_jump): New variable buf. Use it for the
3048 read_inferior_memory and write_inferior_memory transfers.
3049 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
3050 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
3051 Use it for the write_inferior_memory transfer.
3052 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
3055 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3057 * linux-low.c (fetch_register, store_register): Make code
3058 consistent, fix formatting.
3060 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3062 * linux-low.c (usr_store_inferior_registers): Factor out code
3063 to handle individual registers into...
3064 (store_register): ... this new function.
3066 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
3068 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
3069 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
3070 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
3071 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
3072 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
3073 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
3074 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
3075 (srv_xmlfiles): Add new XML files.
3077 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
3079 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
3080 (init_registers_s390_linux32v1): Add prototype.
3081 (init_registers_s390_linux32v2): Likewise.
3082 (init_registers_s390_linux64v1): Likewise.
3083 (init_registers_s390_linux64v2): Likewise.
3084 (init_registers_s390x_linux64v1): Likewise.
3085 (init_registers_s390x_linux64v2): Likewise.
3086 (s390_num_regs): Increment to 52.
3087 (s390_regmap): Add orig_r2 register.
3088 (s390_num_regs_3264): Increment to 68.
3089 (s390_regmap_3264): Add orig_r2 register.
3090 (s390_collect_ptrace_register): Handle orig_r2 register.
3091 (s390_supply_ptrace_register): Likewise.
3092 (s390_fill_last_break): New function.
3093 (s390_store_last_break): Likewise.
3094 (s390_fill_system_call): New function.
3095 (s390_store_system_call): Likewise.
3096 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
3098 (s390_check_regset): New function.
3099 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
3100 NT_S390_SYSTEM_CALL regsets and use appropriate description.
3101 Update target_regsets for available register sets.
3103 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
3104 Jan Kratochvil <jan.kratochvil@redhat.com>
3106 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
3107 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
3109 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
3110 * linux-low.h (struct process_info_private): New member r_debug.
3111 * server.c (handle_qxfer_libraries): Call
3112 the_target->qxfer_libraries_svr4.
3113 (handle_qxfer_libraries_svr4): New function.
3114 (qxfer_packets): New entry "libraries-svr4".
3115 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
3116 * target.h (struct target_ops): New member qxfer_libraries_svr4.
3117 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
3118 PACKET_qXfer_libraries_svr4.
3120 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
3122 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
3123 PSW address/mask between 8-byte and 16-byte formats.
3124 (s390_supply_ptrace_register): Likewise.
3125 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
3126 basic addressing mode bit.
3128 2011-11-24 Stan Shebs <stan@codesourcery.com>
3130 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
3132 2011-11-17 Stan Shebs <stan@codesourcery.com>
3134 * tracepoint.c (struct tracepoint): New field traceframe_usage.
3135 (tracing_start_time): New global.
3136 (tracing_stop_time): New global.
3137 (tracing_user_name): New global.
3138 (tracing_notes): New global.
3139 (tracing_stop_note): New global.
3140 (cmd_qtstart): Set traceframe_usage, start_time.
3141 (stop_tracing): Set stop_time.
3142 (cmd_qtstatus): Report additional status.
3143 (cmd_qtp): New function.
3144 (handle_tracepoint_query): Call it.
3145 (cmd_qtnotes): New function.
3146 (handle_tracepoint_general_set): Call it.
3147 (get_timestamp): Rename from tsv_get_timestamp.
3149 2011-11-14 Stan Shebs <stan@codesourcery.com>
3150 Kwok Cheung Yeung <kcy@codesourcery.com>
3152 * linux-x86-low.c (small_jump_insn): New.
3153 (i386_install_fast_tracepoint_jump_pad): Add arguments for
3154 trampoline and error message, build a trampoline and issue a small
3155 jump instruction to it.
3156 (x86_install_fast_tracepoint_jump_pad): Add arguments for
3157 trampoline and error message.
3158 (x86_get_min_fast_tracepoint_insn_len): New.
3159 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
3160 * linux-low.h (struct linux_target_ops): Add arguments to
3161 install_fast_tracepoint_jump_pad operation, add new operation.
3162 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
3164 (linux_get_min_fast_tracepoint_insn_len): New function.
3165 (linux_target_op): Add new operation.
3166 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
3167 (gdb_trampoline_buffer_end): Ditto.
3168 (gdb_trampoline_buffer_error): Ditto.
3169 (struct ipa_sym_addresses): Add fields for new IPA variables.
3170 (symbol_list): Add entries for new IPA variables.
3171 (struct tracepoint): Add fields to hold the address range of the
3172 trampoline used by the tracepoint.
3173 (trampoline_buffer_head): New static variable.
3174 (trampoline_buffer_tail): Ditto.
3175 (claim_trampoline_space): New function.
3176 (have_fast_tracepoint_trampoline_buffer): New function.
3177 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
3179 (install_fast_tracepoint): Ditto, also add error buffer argument.
3180 (cmd_qtminftpilen): New function.
3181 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
3182 (fast_tracepoint_from_trampoline_address): New function.
3183 (fast_tracepoint_collecting): Handle trampoline as part of jump
3185 (set_trampoline_buffer_space): New function.
3186 (initialize_tracepoint): Initialize new IPA variables.
3187 * target.h (struct target_ops): Add arguments to
3188 install_fast_tracepoint_jump_pad operation, add new
3189 get_min_fast_tracepoint_insn_len operation.
3190 (target_get_min_fast_tracepoint_insn_len): New.
3191 (install_fast_tracepoint_jump_pad): Add arguments.
3192 * server.h (IPA_BUFSIZ): Define.
3193 * linux-i386-ipa.c: Include extra header files.
3194 (initialize_fast_tracepoint_trampoline_buffer): New function.
3195 (initialize_low_tracepoint): Call it.
3196 * server.h (set_trampoline_buffer_space): Declare.
3197 (claim_trampoline_space): Ditto.
3198 (have_fast_tracepoint_trampoline_buffer): Ditto.
3200 2011-11-14 Yao Qi <yao@codesourcery.com>
3202 * server.c (handle_query): Handle InstallInTrace for qSupported.
3203 * tracepoint.c (add_tracepoint): Sort list.
3204 (install_tracepoint, download_tracepoint): New.
3205 (cmd_qtdp): Call them to install and download tracepoints.
3206 (sort_tracepoints): Removed.
3207 (cmd_qtstart): Update.
3209 2011-11-14 Yao Qi <yao@codesourcery.com>
3211 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
3212 * mem-break.h: Declare.
3213 * tracepoint.c (cmd_qtstart): Move some code to ...
3214 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
3216 (download_tracepoints): Move some code to ...
3217 (download_tracepoint_1): ... here. New.
3219 2011-11-08 Yao Qi <yao@codesourcery.com>
3221 * remote-utils.c (relocate_instruction): A comment fix.
3223 2011-11-07 Joel Brobecker <brobecker@adacore.com>
3225 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
3226 (i386_dr_low_get_control, i386_dr_low_get_status): Use
3227 dr_status_mirror and dr_control_mirror from debug_reg_state.
3228 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
3229 (i386_initial_stuff): Remove use of deleted globals.
3230 (i386_get_thread_context, i386_set_thread_context,
3231 i386_thread_added): Use dr_status_mirror and dr_control_mirror
3232 from debug_reg_state.
3234 2011-11-05 Yao Qi <yao@codesourcery.com>
3236 * tracepoint.c (gdb_collect): Loop over tracepoints of same
3237 address as TPOINT's.
3239 2011-11-02 Stan Shebs <stan@codesourcery.com>
3241 * tracepoint.c (agent_mem_read_string): New function.
3242 (eval_agent_expr): Call it for tracenz.
3243 * server.c (handle_query): Report support for tracenz.
3245 2011-11-02 Yao Qi <yao@codesourcery.com>
3247 * tracepoint.c (cmd_qtstart): Remove unused local variables.
3249 2011-11-02 Yao Qi <yao@codesourcery.com>
3251 * target.h: Fix a typo in comment.
3253 2011-10-31 Pedro Alves <pedro@codesourcery.com>
3255 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
3256 clobber the breakpoints' shadows with fast tracepoint jumps.
3257 * mem-break.h (check_mem_write): Add `myaddr' parameter.
3258 * target.c (write_inferior_memory): Also pass MYADDR down to
3261 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
3263 * configure.ac: Check support for personality routine.
3264 * configure: Regenerate.
3265 * config.in: Likewise.
3266 * linux-low.c: Include <sys/personality.h>.
3267 Define ADDR_NO_RANDOMIZE if necessary.
3268 (linux_create_inferior): Disable address space randomization when
3269 forking inferior, if requested.
3270 (linux_supports_disable_randomization): New function.
3271 (linux_target_ops): Install it.
3272 * server.h (disable_randomization): Declare.
3273 * server.c (disable_randomization): New global variable.
3274 (handle_general_set): Handle QDisableRandomization.
3275 (handle_query): Likewise for qSupported.
3276 (main): Support --disable-randomization and --no-disable-randomization
3277 command line arguments.
3278 * target.h (struct target_ops): Add supports_disable_randomization.
3279 (target_supports_disable_randomization): New macro.
3281 2011-09-29 Mike Frysinger <vapier@gentoo.org>
3283 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
3285 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
3286 [!PT_GETDSBT] (target_loadmap): New definition.
3287 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
3288 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
3289 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
3290 and PT_GETDSBT to LINUX_LOADMAP.
3291 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
3292 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
3294 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
3296 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
3297 (arm_linux_hwbp_cap): New static variable.
3298 (arm_linux_get_hwbp_cap): Replace by ...
3299 (arm_linux_init_hwbp_cap): ... this new function.
3300 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
3301 (arm_linux_get_hw_watchpoint_count): Likewise.
3302 (arm_linux_get_hw_watchpoint_max_length): Likewise.
3303 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
3304 (arm_prepare_to_resume): Use perror_with_name instead of error.
3306 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
3308 * linux-arm-low.c: Include <signal.h>.
3309 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
3310 (struct arm_linux_hwbp_cap): New data type.
3311 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
3312 (struct arm_linux_hw_breakpoint): New data type.
3313 (MAX_BPTS, MAX_WPTS): Define.
3314 (struct arch_process_info, struct arch_lwp_info): New data types.
3315 (arm_linux_get_hwbp_cap): New function.
3316 (arm_linux_get_hw_breakpoint_count): Likewise.
3317 (arm_linux_get_hw_watchpoint_count): Likewise.
3318 (arm_linux_get_hw_watchpoint_max_length): Likewise.
3319 (arm_hwbp_control_initialize): Likewise.
3320 (arm_hwbp_control_is_enabled): Likewise.
3321 (arm_hwbp_control_is_initialized): Likewise.
3322 (arm_hwbp_control_disable): Likewise.
3323 (arm_linux_hw_breakpoint_equal): Likewise.
3324 (arm_linux_hw_point_initialize): Likewise.
3325 (struct update_registers_data): New data structure.
3326 (update_registers_callback: New function.
3327 (arm_insert_point): Likewise.
3328 (arm_remove_point): Likewise.
3329 (arm_stopped_by_watchpoint): Likewise.
3330 (arm_stopped_data_address): Likewise.
3331 (arm_new_process): Likewise.
3332 (arm_new_thread): Likewise.
3333 (arm_prepare_to_resume): Likewise.
3334 (the_low_target): Register arm_insert_point, arm_remove_point,
3335 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
3336 arm_new_thread, and arm_prepare_to_resume.
3338 2011-09-15 Stan Shebs <stan@codesourcery.com>
3340 * server.h (struct emit_ops): Add compare-goto fields.
3341 * tracepoint.c (gdb_agent_op_sizes): New table.
3342 (emit_eq_goto): New function.
3343 (emit_ne_goto): New function.
3344 (emit_lt_goto): New function.
3345 (emit_le_goto): New function.
3346 (emit_gt_goto): New function.
3347 (emit_ge_goto): New function.
3348 (is_goto_target): New function.
3349 (compile_bytecodes): Recognize special cases of compare-goto
3350 combinations and call specialized emitters for them.
3351 * linux-x86-low.c (amd64_emit_eq_goto): New function.
3352 (amd64_emit_ne_goto): New function.
3353 (amd64_emit_lt_goto): New function.
3354 (amd64_emit_le_goto): New function.
3355 (amd64_emit_gt_goto): New function.
3356 (amd64_emit_ge_goto): New function.
3357 (amd64_emit_ops): Add the new functions.
3358 (i386_emit_eq_goto): New function.
3359 (i386_emit_ne_goto): New function.
3360 (i386_emit_lt_goto): New function.
3361 (i386_emit_le_goto): New function.
3362 (i386_emit_gt_goto): New function.
3363 (i386_emit_ge_goto): New function.
3364 (i386_emit_ops): Add the new functions.
3366 2011-09-08 Stan Shebs <stan@codesourcery.com>
3368 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
3369 (i386_emit_epilogue): Restore %ebx.
3371 2011-08-31 Jie Zhang <jzhang918@gmail.com>
3373 * server.c (step_thread): Remove definition.
3374 (process_serial_event): Don't handle Hs.
3375 * server.h (step_thread): Remove declaration.
3376 * target.c (set_desired_inferior): Remove use of step_thread.
3378 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
3380 * linux-low.c: Include linux-procfs.h.
3381 (linux_attach_lwp_1): Update comments.
3382 (linux_attach): Scan for existing threads when attaching to a
3383 process that is the tgid.
3384 * Makefile.in: Update dependencies.
3386 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
3388 * configure.srv: Add linux-procfs.o dependencies.
3390 2011-08-14 Yao Qi <yao@codesourcery.com>
3392 * target.h (struct target_ops): Fix indent.
3393 * win32-low.c (win32_target_ops): Fix comment.
3395 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
3396 Yao Qi <yao@codesourcery.com>
3398 * Makefile.in (clean): Remove tic6x-*.c files.
3399 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
3400 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
3401 (tic6x-c64xp-linux.c): Likewise.
3402 * configure.srv: Add support for tic6x-*-uclinux.
3403 * linux-tic6x-low.c: New.
3404 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
3406 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
3407 Yao Qi <yao@codesourcery.com>
3409 * target.h (struct target_ops): Add read_loadmap.
3410 * linux-low.c (struct target_loadseg): New type.
3411 (struct target_loadmap): New type.
3412 (linux_read_loadmap): New function.
3413 (linux_target_ops): Add linux_read_loadmap.
3414 * server.c (handle_query): Support qXfer:fdpic:read packet.
3415 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
3418 2011-08-05 Eli Zaretskii <eliz@gnu.org>
3420 * win32-low.c: Include <stdint.h>.
3422 2011-07-22 Pedro Alves <pedro@codesourcery.com>
3424 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
3425 to the inferior here.
3426 (i386_remove_aligned_watchpoint): Ditto.
3427 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
3428 fit part of the watchpoint in the debug registers.
3429 (i386_update_inferior_debug_regs): New.
3430 (i386_low_insert_watchpoint): Work on a local mirror of the debug
3431 registers, and only update the inferior on success.
3432 (i386_low_remove_watchpoint): Ditto.
3434 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
3436 * linux-low.c (compare_ints, unique, list_threads, show_process,
3437 linux_core_of_thread): Delete.
3438 (linux_target_ops): Change linux_core_of_thread to
3439 linux_common_core_of_thread.
3440 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
3441 * utils.c (malloc_failure): Change type of argument.
3442 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
3443 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
3444 common/linux-osdata.c, common/ptid.c and common/buffer.c.
3445 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
3446 (IPA_OBJS): Add common-utils-ipa.o.
3447 (ptid_h, linux_osdata_h): New macros.
3448 (server_h): Add common/common-utils.h, common/xml-utils.h,
3449 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
3451 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
3452 ptid.o, buffer.o): New rules.
3453 (linux-low.o): Add common/linux-osdata.h as a dependency.
3454 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
3455 * configure.ac: Add AC_HEADER_DIRENT check.
3456 * config.in: Regenerate.
3457 * configure: Regenerate.
3458 * remote-utils.c (xml_escape_text): Delete.
3459 (buffer_grow, buffer_free, buffer_init, buffer_finish,
3460 buffer_xml_printf): Move to common/buffer.c.
3461 * server.c (main): Remove call to initialize_inferiors.
3462 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
3463 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
3464 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
3465 internal_error, gdb_assert, gdb_assert_fail): Delete.
3466 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
3467 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
3469 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
3470 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
3471 initialize_inferiors): Delete.
3473 2011-07-20 Pedro Alves <pedro@codesourcery.com>
3475 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
3478 2011-05-31 Pedro Alves <pedro@codesourcery.com>
3480 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
3482 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
3484 2011-05-26 Yao Qi <yao@codesourcery.com>
3486 * Makefile.in (thread-db.o): Track dependence to
3487 common/gdb_thread_db.h.
3488 * thread-db.c: include gdb_thread_db.h from right place.
3490 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
3492 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
3493 __FILE__ and __LINE__ to internal_error.
3495 2011-05-13 Doug Evans <dje@google.com>
3497 * thread-db.c (try_thread_db_load_from_sdir): New function.
3498 (try_thread_db_load_from_dir): New function.
3499 (thread_db_load_search): Handle $sdir, ignore $pdir.
3500 Remove trying of system directories if search of
3501 libthread-db-search-path fails, that is now done via $sdir.
3503 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
3505 * server.c (handle_query): Add EnableDisableTracepoints to the list
3506 of supported features.
3507 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
3509 (cmd_qtenable_disable): New.
3510 (cmd_qtstart): Install tracepoints even if disabled.
3511 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
3512 receiving a QTEnable or QTDisable packet.
3513 (gdb_collect): Skip data collection if fast tracepoint is disabled.
3514 (ust_marker_to_static_tracepoint): Do not ignore disabled static
3516 (gdb_probe): Skip data collection if static tracepoint is disabled.
3518 2011-05-10 Doug Evans <dje@google.com>
3520 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
3522 2011-05-04 Doug Evans <dje@google.com>
3524 * linux-low.c (linux_join): Skip process lookup.
3525 * spu-low.c (spu_join): Ditto.
3526 * server.c (join_inferiors_callback): Delete.
3527 (process_serial_event): For 'D' packet (detach) call join_inferior
3530 2011-05-04 Joseph Myers <joseph@codesourcery.com>
3532 * README: Don't mention xscale*-*-linux*.
3533 * configure.srv (xscale*-*-linux*): Don't handle target.
3535 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
3537 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
3539 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
3540 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
3541 (i386_emit_void_call_2): Likewise.
3543 2011-04-26 Yao Qi <yao@codesourcery.com>
3545 * linux-low.c: Move common macros to linux-ptrace.h.
3546 Include linux-ptrace.h.
3547 * Makefile.in (linux_ptrace_h): New.
3548 (linux-low.o): Depends on linux-ptrace.h.
3550 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3552 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
3553 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
3554 (remote_prepare): New function with most of the TCP code from ...
3555 (remote_open): ... here. Detect PORT here unconditionally. Move also
3556 setting transport_is_reliable.
3557 * server.c (run_once): New variable.
3558 (gdbserver_usage): Document it.
3559 (main): Set run_once for `--once'. Call remote_prepare. Exit after
3560 the first run if RUN_ONCE.
3561 * server.h (run_once, remote_prepare): New declarations.
3563 2011-04-19 Tom Tromey <tromey@redhat.com>
3565 * win32-low.c (handle_load_dll): Remove duplicate "the".
3567 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
3569 Remove support for old Cygwin 1.5 versions.
3570 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
3571 function to avoid warning.
3572 (win32_add_one_solib): Use cygwin_conv_path function to avoid
3575 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
3577 * gdbserver/server.h (Macro _): Define it if not available.
3579 2011-03-14 Michael Snyder <msnyder@vmware.com>
3581 * hostio.c (handle_close): Remove unnecessary null test.
3583 2011-03-10 Joel Brobecker <brobecker@adacore.com>
3585 * Makefile.in (maintainer-clean realclean distclean): Remove
3586 "make ... subdir_do" command.
3588 2011-03-10 Michael Snyder <msnyder@vmware.com>
3590 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
3592 * server.c (handle_v_run): Free alloced buffer on early return.
3594 2011-03-09 Yao Qi <yao@codesourcery.com>
3597 2011-03-04 Yao Qi <yao@codesourcery.com>
3599 * Makefile.in: Remove GNU make feature --directory.
3601 2011-03-05 Yao Qi <yao@codesourcery.com>
3603 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
3604 (subdir_do): New make target. Copied from gdb/Makefile.
3605 (maintainer-clean, realclean, distclean, clean): Call corresponding
3606 make targets in common/Makefile.
3608 2011-02-11 Yao Qi <yao@codesourcery.com>
3610 * configure.ac: Call AC_PROG_RANLIB.
3611 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3612 * configure: Regenerate.
3614 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3616 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
3618 2011-03-06 Yao Qi <yao@codesourcery.com>
3620 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
3622 2011-03-05 Yao Qi <yao@codesourcery.com>
3624 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
3625 (subdir_do): New make target. Copied from gdb/Makefile.
3626 (maintainer-clean, realclean, distclean, clean): Call corresponding
3627 make targets in common/Makefile.
3629 2011-03-04 Yao Qi <yao@codesourcery.com>
3631 * Makefile.in: Remove GNU make feature --directory.
3633 2011-03-04 Michael Snyder <msnyder@vmware.com>
3635 * server.c (queue_stop_reply): Call xmalloc not malloc.
3637 2011-03-02 Michael Snyder <msnyder@vmware.com>
3639 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
3641 2011-02-28 Michael Snyder <msnyder@vmware.com>
3643 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
3644 (cmd_qtframe): Ditto.
3645 (cmd_qtbuffer): Ditto.
3646 (cmd_bigqtbuffer): Ditto.
3648 * utils.c (decimal2str): Initialize 'width' to nine, then
3651 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3653 * hostio.c (require_data): Free *data, not data.
3655 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3657 * hostio.c (require_data): Use free, not xfree.
3659 2011-02-27 Michael Snyder <msnyder@vmware.com>
3661 * server.c (handle_query): Discard unused value.
3663 * hostio.c (require_data): Free malloc memory before returning
3666 2011-02-26 Michael Snyder <msnyder@vmware.com>
3668 * linux-low.c (list_threads): Call closedir for dirent.
3670 2011-02-27 Michael Snyder <msnyder@vmware.com>
3672 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
3673 a case statement falls through.
3675 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
3677 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
3680 2011-02-26 Michael Snyder <msnyder@vmware.com>
3682 * utils.c (decimal2str): Eliminate dead code and dead param.
3683 (pulongest): Drop dead param from call to decimal2str.
3686 2011-02-24 Joel Brobecker <brobecker@adacore.com>
3688 Revert the following patch (not approved yet):
3689 2011-02-21 Hui Zhu <teawater@gmail.com>
3690 * tracepoint.c (tp_printf): New function.
3691 (eval_agent_expr): Handle gdb_agent_op_printf.
3693 2011-02-21 Hui Zhu <teawater@gmail.com>
3695 * tracepoint.c (tp_printf): New function.
3696 (eval_agent_expr): Handle gdb_agent_op_printf.
3698 2011-02-18 Tom Tromey <tromey@redhat.com>
3700 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
3701 (tracepoint.o): Likewise.
3702 * tracepoint.c (enum gdb_agent_op): Use ax.def.
3703 (gdb_agent_op_names): Likewise.
3705 2011-02-18 Tom Tromey <tromey@redhat.com>
3707 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
3708 gdb_agent_op_rot>: New constants.
3709 (gdb_agent_op_names): Add pick and roll.
3710 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
3713 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3715 * aclocal.m4: Regenerated with aclocal-1.11.1.
3717 2011-02-14 Pedro Alves <pedro@codesourcery.com>
3719 * server.c (handle_qxfer_traceframe_info): New.
3720 (qxfer_packets): Register "traceframe-info".
3721 (handle_query): Report support for qXfer:traceframe-info:read+.
3722 * tracepoint.c (match_blocktype): New.
3723 (traceframe_find_block_type): Rename to ...
3724 (traceframe_walk_blocks): ... this. Add callback filter argument,
3726 (traceframe_find_block_type): New, reimplemented on top of
3727 traceframe_walk_blocks.
3728 (build_traceframe_info_xml): New.
3729 (traceframe_read_info): New.
3730 * server.h (traceframe_read_info): Declare.
3732 2011-02-11 Yao Qi <yao@codesourcery.com>
3734 * configure.ac: Call AC_PROG_RANLIB.
3735 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3736 * configure: Regenerate.
3738 2011-02-07 Pedro Alves <pedro@codesourcery.com>
3740 * server.c (gdb_read_memory): Change return semantics to allow
3742 (handle_search_memory_1): Adjust.
3743 (process_serial_event) <'m' packet>: Handle partial transfers.
3744 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
3746 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3748 * regcache.c (init_register_cache): Initialize
3749 regcache->register_status.
3750 (free_register_cache): Release regcache->register_status.
3751 (regcache_cpy): Copy register_status.
3752 (registers_to_string): Print 'x's for unavailable registers.
3753 (supply_register): Mark the register's status valid or
3754 unavailable, depending on whether a buffer was passed in or not.
3755 (supply_register_zeroed): New.
3756 (supply_regblock): Mark the registers' status valid or
3757 unavailable, depending on whether a buffer was passed in or not.
3758 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
3759 (struct regcache): New `register_status' field.
3760 (supply_register_zeroed): Declare.
3761 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
3762 supply_register_zeroed, rather than passing a NULL buffer to
3764 * tracepoint.c (fetch_traceframe_registers): Update comment.
3766 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3768 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
3771 2011-01-25 Pedro Alves <pedro@codesourcery.com>
3773 * server.h (decode_xfer_write): Change prototype.
3774 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
3775 and don't extract the annex here.
3776 * server.c (decode_xfer_read): Remove `annex' parameter,
3777 and don't extract the annex here.
3779 (struct qxfer): New.
3780 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
3781 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
3782 (handle_qxfer_statictrace): New functions, abstracted out from
3783 handle_query, and made to use the struct qxfer interface.
3784 (handle_threads_qxfer_proper): Rename to ...
3785 (handle_qxfer_threads_proper): ... this.
3786 (handle_threads_qxfer): Rename to ...
3787 (handle_qxfer_threads): ... this. Adjust.
3788 (qxfer_packets): New array.
3789 (handle_qxfer): New function.
3790 (handle_query): Use handle_qxfer.
3792 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
3794 * gdbreplay.c: Shorten lines of >= 80 columns.
3795 * linux-low.c: Ditto.
3796 * linux-ppc-low.c: Ditto.
3797 * linux-s390-low.c: Ditto.
3798 * linux-sparc-low.c: Ditto.
3799 * linux-x86-low.c: Ditto.
3800 * linux-xtensa-low.c: Ditto.
3801 * mem-break.c: Ditto.
3803 * regcache.h: Ditto.
3804 * remote-utils.c: Ditto.
3807 * thread-db.c: Ditto.
3808 * tracepoint.c: Ditto.
3810 * win32-low.h: Ditto.
3812 2011-01-05 Joel Brobecker <brobecker@adacore.com>
3814 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
3817 2011-01-01 Joel Brobecker <brobecker@adacore.com>
3819 * server.c (gdbserver_version): Update copyright year in version
3821 * gdbreplay.c (gdbreplay_version): Ditto.
3823 2010-12-29 Jie Zhang <jie.zhang@analog.com>
3825 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
3826 * linux-bfin-low.c: New file.
3827 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
3828 PT_DATA_ADDR for BFIN targets.
3829 * Makefile.in (SFILES): Add linux-bfin-low.c.
3830 (clean): Remove reg-bfin.c.
3831 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
3832 * README: Mention supported Blackfin targets.
3834 2010-12-23 Mike Frysinger <vapier@gentoo.org>
3836 * .gitignore: New file.
3838 2010-11-16 Mike Frysinger <vapier@gentoo.org>
3840 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
3842 2010-10-22 Jie Zhang <jie@codesourcery.com>
3844 * Makefile.in: Add FLAGS_TO_PASS variable.
3845 (install): Remove dependency of install-only and recursively
3846 invoke make for install-only.
3848 2010-10-04 Doug Evans <dje@google.com>
3850 * Makefile.in (uninstall): Use $(DESTDIR).
3852 2010-09-24 Pedro Alves <pedro@codesourcery.com>
3856 * linux-x86-low.c (compat_siginfo_from_siginfo)
3857 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
3858 si_code is < 0. Check for si_code == SI_TIMER before checking for
3861 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3863 * lynx-i386-low.c: New file.
3864 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
3866 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3868 * lynx-low.c (ptrace_request_to_str): Remove handling for
3869 request values that have been removed in LynxOS 5.x.
3871 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3873 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
3876 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
3878 * configure.ac: Add --enable-inprocess-agent option.
3879 * configure: Rebuilt.
3881 2010-09-06 Yao Qi <yao@codesourcery.com>
3883 * linux-low.c (linux_kill): Remove unused variable.
3884 (linux_stabilize_threads): Likewise.
3885 * server.c (start_inferior): Likewise.
3886 (queue_stop_reply_callback): Likewise.
3887 * tracepoint.c (do_action_at_tracepoint): Likewise.
3889 2010-09-06 Yao Qi <yao@codesourcery.com>
3891 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
3894 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3896 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
3898 2010-09-06 Pedro Alves <pedro@codesourcery.com>
3900 * Makefile.in (install-only): Replace $IPA_DEPFILES with
3903 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3905 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
3906 gdbserver/lynx-ppc-low.c: New files.
3907 * Makefile.in (lynx_low_h): New variable.
3908 (lynx-low.o, lynx-ppc-low.o): New rules.
3909 * configure.ac: On LynxOS, link with -lnetinet.
3910 * configure.srv: Add handling of powerpc-*-lynxos* targets.
3911 * configure: regenerate.
3913 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3915 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
3916 * configure.ac: Add check for vasprintf and vsnprintf.
3917 * configure, config.in: Regenerate.
3918 * server.h (vasprintf, vsnprintf): Add conditional declarations.
3920 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3922 * gdbreplay.c: Move include of alloca.h up, next to include of
3924 * server.h: Add include of malloc.h.
3925 * mem-break.c: Remove include of malloc.h.
3926 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
3928 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3930 * Makefile.in (memmem.o): Build with -Wno-error.
3932 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3934 * utils.c (xsnprintf): Make non-static.
3935 * server.h: Add xsnprintf declaration.
3936 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
3937 replace calls to snprintf by calls to xsnprintf throughout.
3939 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3941 * configure.ac: Add configure check for alloca.
3942 * configure, config.in: Regenerate.
3943 * server.h: Include alloca.h if it exists.
3944 * gdbreplay.c: Include alloca.h if it exists.
3946 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3948 * linux-low.c (__SIGRTMIN): Define if not already defined.
3949 (linux_create_inferior): Check for __ANDROID__ rather than
3951 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
3952 are already deferred.
3953 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
3954 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
3955 stopped and already has a pending signal to report.
3956 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
3957 a pending signal to report or is moving out of a jump pad.
3958 (linux_init_signals): Check for __ANDROID__ rather than
3961 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3963 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
3964 debug_threads check. Avoid a linear search when not doing debug
3967 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3969 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
3970 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
3971 (struct file_handler) <fd>: Change type to gdb_fildes_t.
3972 (process_event): Change local fd's type to gdb_fildes_t.
3973 (create_file_handler): Adjust prototype.
3974 (delete_file_handler): Adjust prototype.
3975 (handle_file_event): Adjust prototype. Use pfildes.
3976 (create_file_event): Adjsut prototype.
3977 * remote-utils.c (remote_desc, listen_desc): Change type to
3979 * server.h: New gdb_fildes_t typedef.
3980 [USE_WIN32API]: Include winsock2.h.
3981 (delete_file_handler, add_file_handler): Adjust prototypes.
3983 * utils.c (pfildes): New.
3985 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3987 * configure.ac (build_warnings): Add -Wno-char-subscripts.
3988 * configure: Regenerate.
3990 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3992 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
3993 (linux_done_accessing_memory): ... this.
3994 (linux_target_ops): Adjust.
3995 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
3996 * nto-low.c (nto_target_ops): Adjust comment.
3997 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
3998 * spu-low.c (spu_target_ops): Adjust comment.
3999 * target.h (target_ops): Rename unprepare_to_access_memory field
4000 to done_accessing_memory.
4001 (unprepare_to_access_memory): Rename to ...
4002 (done_accessing_memory): ... this.
4004 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4006 * linux-low.c (linux_prepare_to_access_memory): New.
4007 (linux_unprepare_to_access_memory): New.
4008 (linux_target_ops): Install them.
4009 * server.c (read_memory): Rename to ...
4010 (gdb_read_memory): ... this. Use
4011 prepare_to_access_memory/prepare_to_access_memory.
4012 (write_memory): Rename to ...
4013 (gdb_write_memory): ... this. Use
4014 prepare_to_access_memory/prepare_to_access_memory.
4015 (handle_search_memory_1): Adjust.
4016 (process_serial_event): Adjust.
4017 * target.h (struct target_ops): New fields
4018 prepare_to_access_memory and unprepare_to_access_memory.
4019 (prepare_to_access_memory, unprepare_to_access_memory): New.
4020 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
4021 prepare_to_access_memory/prepare_to_access_memory.
4022 * nto-low.c (nto_target_ops): Adjust.
4023 * spu-low.c (spu_target_ops): Adjust.
4024 * win32-low.c (win32_target_ops): Adjust.
4026 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4028 * Makefile.in (WARN_CFLAGS): Get it from configure.
4029 (WERROR_CFLAGS): New.
4030 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
4031 * configure.ac: Introduce --enable-werror, which adds -Werror to
4032 the compiler command line. Enabled by default. Disable with
4033 --disable-werror. Add -Wdeclaration-after-statement
4034 Wpointer-arith and -Wformat-nonliteral to warning flags.
4035 * configure: Regenerate.
4037 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4039 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
4041 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4043 * gdbreplay.c (remote_error): New.
4045 (expect): Use gdbchar. Check for error reading from GDB.
4046 Clarify sync error output.
4047 (play): Check for errors writing to GDB.
4048 * linux-low.c (sigchld_handler): Really ignore `write' errors.
4049 * remote-utils.c (getpkt): Check for errors writing to the remote
4052 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4054 * linux-low.c (linux_wait_1): Move non-debugging code out of
4055 `debug_threads' control.
4057 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4059 * linux-low.c (linux_wait_1): Don't set last_status here.
4060 * server.c (push_event, queue_stop_reply_callback): Assert we're
4061 not pushing a TARGET_WAITKIND_IGNORE event.
4062 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
4063 (myresume, handle_target_event): Set the thread's last_resume_kind
4064 and last_status from the target returned status.
4066 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4070 * linux-x86-low.c (update_debug_registers_callback): New.
4071 (i386_dr_low_set_addr): Use it.
4072 (i386_dr_low_get_addr): New.
4073 (i386_dr_low_set_control): Use update_debug_registers_callback.
4074 (i386_dr_low_get_control): New.
4075 (i386_dr_low_get_status): Adjust.
4076 * linux-low.c (linux_stop_lwp): New.
4077 * linux-low.h (linux_stop_lwp): Declare.
4079 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
4080 argument instead of a i386_debug_reg_state.
4081 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
4082 a i386_debug_reg_state.
4083 (i386_insert_aligned_watchpoint): Adjust.
4084 (i386_remove_aligned_watchpoint): Adjust.
4085 (i386_low_stopped_data_address): Read the debug registers from the
4086 inferior instead of from the mirrors.
4087 * i386-low.h (struct i386_debug_reg_state): Extend comment.
4088 (i386_dr_low_get_addr): Declare.
4089 (i386_dr_low_get_control): Declare.
4090 (i386_dr_low_get_status): Change prototype.
4092 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
4093 (i386_dr_low_get_addr): New.
4094 (i386_dr_low_get_control): New.
4095 (i386_dr_low_get_status): Adjust prototype. Return
4097 (i386_initial_stuff): Clear dr_status_mirror and
4099 (i386_get_thread_context): Adjust.
4100 (i386_set_thread_context): Adjust.
4101 (i386_thread_added): Adjust.
4103 2010-08-24 Pedro Alves <pedro@codesourcery.com>
4105 * linux-low.h (linux_thread_area): Delete declaration.
4107 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
4109 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
4110 after its termination.
4112 2010-08-09 Pedro Alves <pedro@codesourcery.com>
4114 * linux-low.c (gdb_wants_lwp_stopped): Delete.
4115 (gdb_wants_all_stopped): Delete.
4116 (linux_wait_1): Don't call them.
4117 * server.c (handle_v_cont): Tag all threads as want-stopped.
4118 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
4119 stopped as "client-wants-stopped".
4121 2010-07-31 Pedro Alves <pedro@codesourcery.com>
4123 * Makefile.in (signals_h): New.
4124 (server_h): Depend on it.
4125 (server.o): Don't depend on $(signals_def).
4126 (signals.o): Depend on $(signals_def).
4128 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
4130 * Makefile.in (signals_def): New.
4131 (server_h): Append include/gdb/signals.h and signals_def.
4132 (server.o): Append signals_def.
4134 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4136 * server.c (handle_target_event): Use target_signal_to_host for
4137 resume_info.sig initialization.
4138 * target.h (struct thread_resume) <sig>: New comment.
4140 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
4142 * server.c (handle_query): strcpy() the returned string from paddress()
4143 instead of sprintf().
4144 * utils.c (paddress): Return phex_nz().
4146 2010-07-07 Joel Brobecker <brobecker@adacore.com>
4148 * server.c (handle_v_cont): Call mourn_inferior if process
4150 (myresume): Likewise.
4152 2010-07-01 Pedro Alves <pedro@codesourcery.com>
4154 Static tracepoints, and integration with UST.
4156 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
4157 * mem-break.c (uninsert_all_breakpoints)
4158 (reinsert_all_breakpoints): New.
4159 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
4160 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
4161 (gdb_agent_ust_loaded, helper_thread_id)
4162 (gdb_agent_helper_thread_id): New macros.
4163 (struct ipa_sym_addresses): Add addr_ust_loaded,
4164 addr_helper_thread_id, addr_cmd_buf.
4165 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
4166 (in_process_agent_loaded_ust): New.
4167 (write_e_ust_not_loaded): New.
4168 (maybe_write_ipa_ust_not_loaded): New.
4169 (struct collect_static_trace_data_action): New.
4170 (enum tracepoint_type) <static_tracepoint>: New.
4171 (struct tracepoint) <handle>: Mention static tracepoints.
4172 (struct static_tracepoint_ctx): New.
4173 (CMD_BUF_SIZE): New.
4174 (add_tracepoint_action): Handle static tracepoint actions.
4175 (unprobe_marker_at): New.
4176 (clear_installed_tracepoints): Handle static tracepoints.
4177 (cmd_qtdp): Handle static tracepoints.
4178 (probe_marker_at): New.
4179 (cmd_qtstart): Handle static tracepoints.
4180 (response_tracepoint): Handle static tracepoints.
4181 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
4182 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
4183 (get_context_regcache): Handle static tracepoints.
4184 (do_action_at_tracepoint): Handle static tracepoint actions.
4185 (traceframe_find_block_type): Handle static trace data blocks.
4186 (traceframe_read_sdata): New.
4187 (download_tracepoints): Download static tracepoint actions.
4188 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
4189 (GDB_PROBE_NAME): New.
4194 (ust_marker_to_static_tracepoint): New.
4196 (collect_ust_data_at_tracepoint): New.
4197 (gdb_ust_probe): New.
4198 (UNIX_PATH_MAX, SOCK_DIR): New.
4199 (gdb_ust_connect_sync_socket): New.
4200 (resume_thread, stop_thread): New.
4201 (run_inferior_command): New.
4202 (init_named_socket): New.
4203 (gdb_ust_socket_init): New.
4204 (cstr_to_hexstr): New.
4206 (first_marker, next_marker): New.
4207 (response_ust_marker): New.
4208 (cmd_qtfstm, cmd_qtsstm): New.
4209 (unprobe_marker_at, probe_marker_at): New.
4210 (cmd_qtstmat, gdb_ust_thread): New.
4211 (gdb_ust_init): New.
4212 (initialize_tracepoint_ftlib): Call gdb_ust_init.
4213 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
4215 (x86_64_st_collect_regmap): New.
4216 (X86_64_NUM_ST_COLLECT_GREGS): New.
4217 (AMD64_RIP_REGNUM): New.
4218 (supply_static_tracepoint_registers): New.
4219 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
4221 (i386_st_collect_regmap): New.
4222 (i386_NUM_ST_COLLECT_GREGS): New.
4223 (supply_static_tracepoint_registers): New.
4224 * server.c (handle_query): Handle qXfer:statictrace:read.
4225 <qSupported>: Report support for StaticTracepoints, and
4226 qXfer:statictrace:read features.
4227 * server.h (traceframe_read_sdata)
4228 (supply_static_tracepoint_registers): Declare.
4229 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
4230 (unpack_varlen_hex): Include in IPA build.
4231 * Makefile.in (ustlibs, ustinc): New.
4232 (IPA_OBJS): Add remote-utils-ipa.o.
4233 ($(IPA_LIB)): Link -ldl and -lpthread.
4235 (IPAGENT_CFLAGS): Add UST_CFLAGS.
4236 * config.in, configure: Regenerate.
4238 2010-06-20 Ian Lance Taylor <iant@google.com>
4239 Pedro Alves <pedro@codesourcery.com>
4241 * linux-x86-low.c (always_true): Delete.
4242 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
4243 trying to fool the compiler with always_true.
4245 2010-06-20 Pedro Alves <pedro@codesourcery.com>
4247 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
4248 conditions in gdbserver.
4250 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
4252 * spu-low.c (spu_read_memory): Wrap around local store limit.
4253 (spu_write_memory): Likewise.
4255 2010-06-15 Pedro Alves <pedro@codesourcery.com>
4257 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
4258 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
4260 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
4262 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
4263 uses with LONGEST uses.
4265 2010-06-14 Stan Shebs <stan@codesourcery.com>
4266 Pedro Alves <pedro@codesourcery.com>
4270 * linux-x86-low.c: Include limits.h.
4275 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
4276 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
4277 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
4278 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
4279 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
4280 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
4281 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
4282 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
4283 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
4284 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
4285 (amd64_emit_void_call_2): New.
4286 (amd64_emit_ops): New.
4287 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
4288 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
4289 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
4290 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
4291 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
4292 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
4293 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
4294 (i386_emit_call, i386_emit_reg, i386_emit_pop)
4295 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
4296 (i386_emit_stack_adjust, i386_emit_int_call_1)
4297 (i386_emit_void_call_2): New.
4298 (i386_emit_ops): New.
4299 (x86_emit_ops): New.
4300 (the_low_target): Install x86_emit_ops.
4301 * server.h (struct emit_ops): New.
4302 (get_raw_reg_func_addr): Declare.
4303 (current_insn_ptr, emit_error): Declare.
4304 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
4305 (set_trace_state_variable_value): New defines.
4306 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
4307 addr_get_trace_state_variable_value and
4308 addr_set_trace_state_variable_value.
4309 (symbol_list): New fields for get_raw_reg,
4310 get_trace_state_variable_value and set_trace_state_variable_value.
4311 (condfn): New typedef.
4312 (struct tracepoint): New field `compiled_cond'.
4313 (do_action_at_tracepoint): Clear compiled_cond.
4314 (get_trace_state_variable_value, set_trace_state_variable_value):
4316 (condition_true_at_tracepoint): If there's a compiled condition,
4318 (current_insn_ptr, emit_error): New globals.
4319 (struct bytecode_address): New.
4320 (get_raw_reg_func_addr): New.
4321 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
4322 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
4323 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
4324 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
4325 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
4326 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
4327 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
4328 (compile_tracepoint_condition, compile_bytecodes): New.
4329 * target.h (emit_ops): Forward declare.
4330 (struct target_ops): New field emit_ops.
4331 (target_emit_ops): New.
4332 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
4333 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
4334 * linux-low.c (linux_emit_ops): New.
4335 (linux_target_ops): Install it.
4336 * linux-low.h (struct linux_target_ops): New field emit_ops.
4338 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
4340 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
4341 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
4343 2010-06-01 Pedro Alves <pedro@codesourcery.com>
4344 Stan Shebs <stan@codesourcery.com>
4346 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
4347 (all): Depend on $(extra_libraries).
4348 (install-only): Install the IPA.
4349 (IPA_OBJS, IPA_LIB): New.
4350 (clean): Remove the IPA lib.
4351 (IPAGENT_CFLAGS): New.
4352 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
4353 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
4354 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
4355 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
4356 * configure.ac: Check for atomic builtins support in the compiler.
4357 (IPA_DEPFILES, extra_libraries): Define.
4358 * configure.srv (ipa_obj): Add description.
4359 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
4360 (i[34567]86-*-linux*): Set ipa_obj.
4361 (x86_64-*-linux*): Set ipa_obj.
4362 * linux-low.c (stabilizing_threads): New.
4363 (supports_fast_tracepoints): New.
4364 (linux_detach): Stabilize threads before detaching.
4365 (handle_tracepoints): Handle internal tracing breakpoints. Assert
4366 the lwp is either not stabilizing, or is moving out of a jump pad.
4367 (linux_fast_tracepoint_collecting): New.
4368 (maybe_move_out_of_jump_pad): New.
4369 (enqueue_one_deferred_signal): New.
4370 (dequeue_one_deferred_signal): New.
4371 (linux_wait_for_event_1): If moving out of a jump pad, defer
4372 pending signals to later.
4373 (linux_stabilize_threads): New.
4374 (linux_wait_1): Check if threads need moving out of jump pads, and
4376 (stuck_in_jump_pad_callback): New.
4377 (move_out_of_jump_pad_callback): New.
4379 (linux_resume_one_lwp): Handle moving out of jump pads.
4380 (linux_set_resume_request): Dequeue deferred signals.
4381 (need_step_over_p): Also step over fast tracepoint jumps.
4382 (start_step_over): Also uninsert fast tracepoint jumps.
4383 (finish_step_over): Also reinsert fast tracepoint jumps.
4384 (linux_install_fast_tracepoint_jump): New.
4385 (linux_target_ops): Install linux_stabilize_threads and
4386 linux_install_fast_tracepoint_jump_pad.
4387 * linux-low.h (linux_target_ops) <get_thread_area,
4388 install_fast_tracepoint_jump_pad>: New fields.
4389 (struct lwp_info) <collecting_fast_tracepoint,
4390 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
4391 (linux_get_thread_area): Declare.
4392 * linux-x86-low.c (jump_insn): New.
4393 (x86_get_thread_area): New.
4394 (append_insns): New.
4396 (amd64_install_fast_tracepoint_jump_pad): New.
4397 (i386_install_fast_tracepoint_jump_pad): New.
4398 (x86_install_fast_tracepoint_jump_pad): New.
4399 (the_low_target): Install x86_get_thread_area and
4400 x86_install_fast_tracepoint_jump_pad.
4401 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
4402 (struct fast_tracepoint_jump): New.
4403 (fast_tracepoint_jump_insn): New.
4404 (fast_tracepoint_jump_shadow): New.
4405 (find_fast_tracepoint_jump_at): New.
4406 (fast_tracepoint_jump_here): New.
4407 (delete_fast_tracepoint_jump): New.
4408 (set_fast_tracepoint_jump): New.
4409 (uninsert_fast_tracepoint_jumps_at): New.
4410 (reinsert_fast_tracepoint_jumps_at): New.
4411 (set_breakpoint_at): Use write_inferior_memory.
4412 (uninsert_raw_breakpoint): Use write_inferior_memory.
4413 (check_mem_read): Mask out fast tracepoint jumps.
4414 (check_mem_write): Mask out fast tracepoint jumps.
4415 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
4416 (set_fast_tracepoint_jump): Declare.
4417 (delete_fast_tracepoint_jump)
4418 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
4419 (reinsert_fast_tracepoint_jumps_at): Declare.
4420 * regcache.c: Don't compile many functions when building the
4421 in-process agent library.
4422 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
4423 the register buffer in the heap.
4424 (free_register_cache): If the register buffer isn't owned by the
4425 regcache, don't free it.
4426 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
4427 pre-existing register caches.
4428 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
4430 (convert_ascii_to_int): : Constify `from' parameter type.
4431 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
4432 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
4433 the needed buffer in-place.
4434 (relocate_instruction): New.
4435 * server.c (handle_query) <qSymbols>: If the target supports
4436 tracepoints, give it a chance of looking up symbols. Report
4437 support for fast tracepoints.
4438 (handle_status): Stabilize threads.
4439 (process_serial_event): Adjust.
4440 * server.h (struct fast_tracepoint_jump): Forward declare.
4441 (struct process_info) <fast_tracepoint_jumps>: New field.
4442 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
4443 (decode_X_packet, decode_M_packet): Adjust.
4444 (relocate_instruction): Declare.
4445 (in_process_agent_loaded): Declare.
4446 (tracepoint_look_up_symbols): Declare.
4447 (struct fast_tpoint_collect_status): Declare.
4448 (fast_tracepoint_collecting): Declare.
4449 (force_unlock_trace_buffer): Declare.
4450 (handle_tracepoint_bkpts): Declare.
4451 (initialize_low_tracepoint)
4452 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
4453 * target.h (struct target_ops) <stabilize_threads,
4454 install_fast_tracepoint_jump_pad>: New fields.
4455 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
4456 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
4457 [HAVE_STDINT_H]: Include stdint.h.
4458 (trace_debug_1): Rename to ...
4459 (trace_vdebug): ... this.
4460 (trace_debug): Rename to ...
4461 (trace_debug_1): ... this. Add `level' parameter.
4463 (ATTR_USED, ATTR_NOINLINE): New.
4464 (IP_AGENT_EXPORT): New.
4465 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4466 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
4467 (about_to_request_buffer_space, trace_buffer_is_full)
4468 (stopping_tracepoint, expr_eval_result, error_tracepoint)
4469 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
4470 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
4471 (traceframe_write_count, traceframes_created)
4472 (trace_state_variables)
4473 New renaming defines.
4474 (struct ipa_sym_addresses): New.
4475 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
4477 (ipa_sym_addrs): New.
4478 (all_tracepoint_symbols_looked_up): New.
4479 (in_process_agent_loaded): New.
4480 (write_e_ipa_not_loaded): New.
4481 (maybe_write_ipa_not_loaded): New.
4482 (tracepoint_look_up_symbols): New.
4483 (debug_threads) [IN_PROCESS_AGENT]: New.
4484 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
4485 (UNKNOWN_SIDE_EFFECTS): New.
4486 (stop_tracing): New.
4487 (flush_trace_buffer): New.
4488 (stop_tracing_bkpt): New.
4489 (flush_trace_buffer_bkpt): New.
4490 (read_inferior_integer): New.
4491 (read_inferior_uinteger): New.
4492 (read_inferior_data_pointer): New.
4493 (write_inferior_data_pointer): New.
4494 (write_inferior_integer): New.
4495 (write_inferior_uinteger): New.
4496 (struct collect_static_trace_data_action): Delete.
4497 (enum tracepoint_type): New.
4498 (struct tracepoint) <type>: New field `type'.
4499 <actions_str, step_actions, step_actions_str>: Only include in
4501 <orig_size, obj_addr_on_target, adjusted_insn_addr>
4502 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
4503 (tracepoints): Use IP_AGENT_EXPORT.
4504 (last_tracepoint): Don't include in the IPA.
4505 (stopping_tracepoint): Use IP_AGENT_EXPORT.
4506 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
4507 (alloced_trace_state_variables): New.
4508 (trace_state_variables): Use IP_AGENT_EXPORT.
4509 (traceframe_t): Delete unused variable.
4510 (circular_trace_buffer): Don't include in the IPA.
4511 (trace_buffer_start): Delete.
4512 (struct trace_buffer_control): New.
4513 (trace_buffer_free): Delete.
4514 (struct ipa_trace_buffer_control): New.
4515 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
4516 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
4518 (trace_buffer_ctrl): New.
4519 (TRACE_BUFFER_CTRL_CURR): New.
4520 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
4521 Reimplement as macros.
4522 (trace_buffer_wrap): Delete.
4523 (traceframe_write_count, traceframe_read_count)
4524 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
4525 (struct tracepoint_hit_ctx) <type>: New field.
4526 (struct fast_tracepoint_ctx): New.
4527 (memory_barrier): New.
4529 (record_tracepoint_error): Update atomically in the IPA.
4530 (clear_inferior_trace_buffer): New.
4531 (about_to_request_buffer_space): New.
4532 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
4533 updating the same buffer.
4534 (add_tracepoint): Default the tracepoint's type to trap
4535 tracepoint, and orig_size to -1.
4536 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
4538 (create_trace_state_variable): New parameter `gdb'. Handle it.
4539 (clear_installed_tracepoints): Clear fast tracepoint jumps.
4540 (cmd_qtdp): Handle fast tracepoints.
4542 (max_jump_pad_size): New.
4543 (gdb_jump_pad_head): New.
4544 (get_jump_space_head): New.
4545 (claim_jump_space): New.
4546 (sort_tracepoints): New.
4547 (MAX_JUMP_SIZE): New.
4548 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
4550 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
4551 support. Upload fast traceframes, and delete internal IPA
4553 (stop_tracing_handler): New.
4554 (flush_trace_buffer_handler): New.
4555 (cmd_qtstop): Upload fast tracepoints.
4556 (response_tracepoint): Handle fast tracepoints.
4557 (tracepoint_finished_step): Upload fast traceframes. Set the
4558 tracepoint hit context's tracepoint type.
4559 (handle_tracepoint_bkpts): New.
4560 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
4561 type. Add comment about fast tracepoints.
4562 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
4563 non-existing action_str field.
4564 (get_context_regcache): Handle fast tracepoints.
4565 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
4567 (fast_tracepoint_from_jump_pad_address): New.
4568 (fast_tracepoint_from_ipa_tpoint_address): New.
4569 (collecting_t): New.
4570 (force_unlock_trace_buffer): New.
4571 (fast_tracepoint_collecting): New.
4574 (write_inferior_data_ptr): New.
4575 (target_tp_heap): New.
4576 (target_malloc): New.
4577 (download_agent_expr): New.
4579 (download_tracepoints): New.
4580 (download_trace_state_variables): New.
4581 (upload_fast_traceframes): New.
4582 (IPA_FIRST_TRACEFRAME): New.
4583 (IPA_NEXT_TRACEFRAME_1): New.
4584 (IPA_NEXT_TRACEFRAME): New.
4585 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
4586 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
4587 (gdb_jump_pad_buffer_end): New.
4588 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
4589 (initialize_tracepoint): Adjust.
4590 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
4591 buffer. Initialize the low module.
4592 * utils.c (PREFIX, TOOLNAME): New.
4593 (malloc_failure): Use PREFIX.
4594 (error): In the IPA, an error causes an exit.
4595 (fatal, warning): Use PREFIX.
4596 (internal_error): Use TOOLNAME.
4597 (NUMCELLS): Increase to 10.
4598 * configure, config.in: Regenerate.
4600 2010-06-01 Pedro Alves <pedro@codesourcery.com>
4602 * server.c (handle_query) <qSupported>: Do two passes over the
4603 qSupported string to avoid nesting strtok.
4605 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4607 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
4609 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
4611 * configure: Regenerate.
4612 * proc-service.list: New.
4614 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4616 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
4619 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
4621 * gdbreplay.c (remote_open): Check error return from socket() call by
4622 its equality to -1 not by it being negative.
4623 * remote-utils.c (remote_open): Likewise.
4625 2010-05-23 Pedro Alves <pedro@codesourcery.com>
4627 * config.h: Regenerate.
4629 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
4631 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
4632 doesn't provide PTRACE_GET_THREAD_AREA.
4634 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
4636 * linux-m68k-low.c: Include <asm/ptrace.h>
4637 (ps_get_thread_area): Implement.
4639 2010-05-03 Doug Evans <dje@google.com>
4641 * event-loop.c (struct callback_event): New struct.
4642 (callback_list): New global.
4643 (append_callback_event, delete_callback_event): New functions.
4644 (process_callback): New function.
4645 (start_event_loop): Call it.
4646 * remote-utils.c (NOT_SCHEDULED): Define.
4647 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
4648 moved out of readchar.
4649 (readchar): Rewrite. Call reschedule before returning.
4650 (reset_readchar): New function.
4651 (remote_close): Call it.
4652 (process_remaining, reschedule): New functions.
4653 * server.h (callback_handler_func): New typedef.
4654 (append_callback_event, delete_callback_event): Declare.
4656 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4658 * proc-service.c (ps_pglobal_lookup): Use
4659 thread_db_look_up_one_symbol.
4660 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
4661 parameter. Use it instead of all_symbols_looked_up.
4662 * server.h (struct process_info) <all_symbols_looked_up>: Delete
4664 (all_symbols_looked_up): Don't declare.
4665 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
4666 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
4668 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
4669 Set all_symbols_looked_up here.
4670 (thread_db_look_up_one_symbol): New.
4671 (thread_db_get_tls_address): Adjust.
4672 (thread_db_load_search, try_thread_db_load_1): Always allocate the
4673 thread_db object on the heap, and tentatively set it in the
4675 (thread_db_init): Don't set all_symbols_looked_up here.
4676 * linux-low.h (thread_db_look_up_one_symbol): Declare.
4678 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4680 * linux-low.c (linux_kill, linux_detach): Adjust.
4681 (status_pending_p_callback): Remove redundant statement. Check
4682 for !TARGET_WAITIKIND_IGNORE, instead of
4683 TARGET_WAITKIND_STOPPED.
4684 (handle_tracepoints): Make sure LWP is locked. Adjust.
4685 (linux_wait_for_event_1): Adjust.
4686 (linux_cancel_breakpoints): New.
4687 (unsuspend_one_lwp): New.
4688 (unsuspend_all_lwps): New.
4689 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
4690 (send_sigstop_callback): Change return type to int, add new
4691 `except' parameter and handle it.
4692 (suspend_and_send_sigstop_callback): New.
4693 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
4694 pass them down. If SUSPEND, also increment the lwp's suspend
4696 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
4697 (need_step_over_p): Don't consider suspended LWPs.
4698 (start_step_over): Adjust.
4699 (proceed_one_lwp): Change return type to int, add new `except'
4700 parameter and handle it.
4701 (unsuspend_and_proceed_one_lwp): New.
4702 (proceed_all_lwps): Use find_inferior instead of
4704 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
4705 also decrement the suspend count of LWPs. Pass `except' down,
4706 instead of hacking its suspend count.
4707 (linux_pause_all): Add `freeze' parameter. Adjust.
4708 (linux_unpause_all): New.
4709 (linux_target_ops): Install linux_unpause_all.
4710 * server.c (handle_status): Adjust.
4711 * target.h (struct target_ops): New fields `unpause_all' and
4712 `cancel_breakpoints'. Add new parameter to `pause_all'.
4713 (pause_all): Add new `freeze' parameter.
4715 (cancel_breakpoints): New.
4716 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
4718 (cmd_qtstart): Pause threads.
4719 (stop_tracing): Pause threads, and cancel breakpoints.
4720 * win32-low.c (win32_target_ops): Adjust.
4722 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4724 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
4725 the inferior right away from here...
4726 (linux_wait_1): ... to here, and adjust to check the thread's
4727 last_resume_kind instead of the lwp's step or stop_expected flags.
4729 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4731 * README: Use consistent `GDB' and `GDBserver' spellings.
4733 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4735 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
4736 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
4737 (linux_detach_one_lwp): Assume the lwp is stopped.
4738 (any_thread_of): Delete.
4739 (linux_detach): Stop all lwps here. Don't blindly delete all
4741 (delete_lwp_callback): New.
4742 (linux_mourn): Delete all lwps of the process that is gone.
4743 (linux_wait_1): Don't delete the last lwp of the process here.
4744 * mem-break.h (mark_breakpoints_out): Declare.
4745 * mem-break.c (mark_breakpoints_out): New.
4746 (free_all_breakpoints): Use it.
4747 * server.c (handle_target_event): If the process is gone, mark
4749 * thread-db.c (struct thread_db) <create_bp>: New field.
4750 (thread_db_enable_reporting): Fix prototype. Store a thread event
4751 breakpoint reference in the thread_db struct.
4752 (thread_db_load_search): Clear the thread_db object.
4753 (try_thread_db_load_1): Ditto.
4754 (switch_to_process): New.
4755 (disable_thread_event_reporting): Use it.
4756 (remove_thread_event_breakpoints): New.
4757 (thread_db_detach, thread_db_mourn): Use it.
4759 2010-05-01 Pedro Alves <pedro@codesourcery.com>
4761 * linux-low.c (linux_enable_event_reporting): New.
4762 (linux_wait_for_event_1, handle_extended_wait): Use it.
4764 2010-04-30 Pedro Alves <pedro@codesourcery.com>
4766 * linux-low.c (linux_kill_one_lwp, linux_kill)
4767 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
4768 (send_sigstop): Take an lwp_info as parameter instead. Queue a
4769 SIGSTOP even if the LWP is stopped.
4770 (send_sigstop_callback): New.
4771 (stop_all_lwps): Use send_sigstop_callback instead.
4772 (linux_resume_one_thread): Adjust.
4773 (proceed_one_lwp): Still proceed an LWP that the client has
4774 requested to stop, if we haven't reported it as stopped yet. Make
4775 sure that LWPs the client want stopped, have a pending SIGSTOP.
4777 2010-04-26 Doug Evans <dje@google.com>
4779 * server.c (handle_general_set): Make static.
4781 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
4782 Print received char after testing for error/eof instead of before.
4783 (input_interrupt): Tweak comment.
4785 2010-04-23 Doug Evans <dje@google.com>
4787 * server.c (start_inferior): Print inferior argv if --debug.
4789 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
4791 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
4792 * nto-x86-low.c: Include server.h
4794 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
4796 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
4797 be consistent with other sources of this directory.
4798 (init_registers_amd64): Correct name of source file of this function
4801 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4803 * configure.srv (x86_64-*-mingw*): New configuration for Windows
4806 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4808 * win32-i386-low.c: Add 64-bit support.
4809 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
4810 (init_registers_amd64): Declare.
4811 (mappings): Add 64-bit version of array.
4812 (init_windows_x86): New function.
4813 (the_low_target): Change init_arch field to init_windows_x86.
4815 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4817 * win32-low.c: Adapt to support also 64-bit architecture.
4818 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
4819 (get_image_name): Use SIZE_T type for local variable `done'.
4820 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
4821 (toolhelp_get_dll_name): Idem.
4822 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
4823 Use uintptr_t typecast to avoid warning.
4824 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
4825 (handle_exception): Use phex_nz to avoid warning.
4826 (win32_wait): Remove unused local variable `process'.
4828 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4830 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
4833 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
4835 * configure.ac: Use `ws2_32' library for srv_mingw.
4836 * configure: Regenerate.
4837 * gdbreplay.c: Include winsock2.h instead of winsock.h.
4838 * remote-utils.c: Likewise.
4840 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
4842 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
4843 if __x86_64__ is defined.
4845 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4847 * configure: Regenerate.
4849 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4851 * server.c (handle_query): Handle 'qGetTIBAddr' query.
4852 * target.h (target_ops): New get_tib_address field.
4853 * win32-low.h (win32_thread_info): Add thread_local_base field.
4854 * win32-low.c (child_add_thread): Add tlb argument.
4855 Set thread_local_base field to TLB.
4856 (get_child_debug_event): Adapt to child_add_thread change.
4857 (win32_get_tib_address): New function.
4858 (win32_target_ops): Set get_tib_address field to
4859 win32_get_tib_address.
4860 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
4862 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4864 * linux-low.c (linux_mourn): Also remove the process.
4865 * server.c (handle_target_event): Don't remove the process here.
4866 * nto-low.c (nto_mourn): New.
4867 (nto_target_ops): Install it.
4868 * spu-low.c (spu_mourn): New.
4869 (spu_target_ops): Install it.
4870 * win32-low.c (win32_mourn): New.
4871 (win32_target_ops): Install it.
4873 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4875 * server.h (buffer_xml_printf): Remove redundant `;'.
4877 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4879 * regcache.c (set_register_cache): Invalidate regcaches before
4880 changing the register cache layout.
4881 (regcache_invalidate_one): Allow a NULL regcache.
4882 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
4883 regcaches before changing the register cache layout or the target
4886 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
4888 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
4889 variable warning on Linux/x86-64.
4891 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4893 GDBserver disconnected tracing support.
4895 * linux-low.c (linux_remove_process): Delete.
4896 (add_lwp): Don't set last_resume_kind here.
4897 (linux_kill): Use `mourn'.
4898 (linux_detach): Use `thread_db_detach', and `mourn'.
4900 (linux_attach_lwp_1): Adjust comment.
4901 (linux_attach): last_resume_kind moved the thread_info; adjust.
4902 (status_pending_p_callback): Adjust.
4903 (linux_wait_for_event_1): Adjust.
4904 (count_events_callback, select_singlestep_lwp_callback)
4905 (select_event_lwp_callback, cancel_breakpoints_callback)
4906 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
4907 (proceed_one_lwp): Adjust.
4908 (linux_async): Add debug output.
4909 (linux_thread_stopped): New.
4910 (linux_pause_all): New.
4911 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
4913 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
4914 (thread_db_free): Delete declaration.
4915 (thread_db_detach, thread_db_mourn): Declare.
4916 * thread-db.c (thread_db_init): Use thread_db_mourn.
4917 (thread_db_free): Delete, split in two.
4918 (disable_thread_event_reporting): New.
4919 (thread_db_detach): New.
4920 (thread_db_mourn): New.
4922 * server.h (struct thread_info) <last_resume_kind>: New field.
4923 <attached>: Add comment.
4924 <gdb_detached>: New field.
4925 (handler_func): Change return type to int.
4926 (handle_serial_event, handle_target_event): Ditto.
4927 (gdb_connected): Declare.
4929 (disconnected_tracing): Declare.
4930 (stop_tracing): Declare.
4932 * server.c (handle_query) <qSupported>: Report support for
4933 disconnected tracing.
4934 (queue_stop_reply_callback): Account for running threads.
4935 (gdb_wants_thread_stopped): New.
4936 (gdb_wants_all_threads_stopped): New.
4937 (gdb_reattached_process): New.
4938 (handle_status): Clear the `gdb_detached' flag of all processes.
4939 In all-stop, stop all threads.
4940 (main): Be sure to leave tfind mode. Handle disconnected tracing.
4941 (process_serial_event): If the remote connection breaks, or if an
4942 exit was forced with "monitor exit", force an event loop exit.
4943 Handle disconnected tracing on detach.
4944 (handle_serial_event): Adjust.
4945 (handle_target_event): If GDB isn't connected, forward events back
4946 to the inferior, unless the last process exited, in which case,
4947 exit gdbserver. Adjust interface.
4949 * remote-utils.c (remote_open): Don't block in accept. Instead
4950 register an event loop source on the listen socket file
4951 descriptor. Refactor bits into ...
4952 (listen_desc): ... this new global.
4953 (gdb_connected): ... this new function.
4954 (enable_async_notification): ... this new function.
4955 (handle_accept_event): ... this new function.
4956 (remote_close): Clear remote_desc.
4958 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
4960 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
4962 (mourn_inferior): Define.
4963 (target_process_qsupported): Avoid the dangling else problem.
4964 (thread_stopped): Define.
4965 (pause_all): Define.
4966 (target_waitstatus_to_string): Declare.
4967 * target.c (target_waitstatus_to_string): New.
4969 * tracepoint.c (tracing): Make extern.
4970 (disconnected_tracing): New.
4971 (stop_tracing): Make extern. Handle tracing stops due to GDB
4973 (cmd_qtdisconnected): New.
4974 (cmd_qtstatus): Report disconnected tracing status in trace reply.
4975 (handle_tracepoint_general_set): Handle QTDisconnected.
4977 * event-loop.c (event_handler_func): Change return type to int.
4978 (process_event): Bail out if the event handler wants the event
4980 (handle_file_event): Ditto.
4981 (start_event_loop): Bail out if the event handler wants the event
4984 * nto-low.c (nto_target_ops): Adjust.
4985 * spu-low.c (spu_wait): Don't remove the process here.
4986 (spu_target_ops): Adjust.
4987 * win32-low.c (win32_wait): Don't remove the process here.
4988 (win32_target_ops): Adjust.
4990 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4992 * regcache.c (realloc_register_cache): Invalidate inferior's
4993 regcache before recreating it.
4995 2010-04-09 Pedro Alves <pedro@codesourcery.com>
4997 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
4999 2010-04-09 Stan Shebs <stan@codesourcery.com>
5000 Pedro Alves <pedro@codesourcery.com>
5002 * server.h (LONGEST): New.
5003 (struct thread_info) <while_stepping>: New field.
5004 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
5006 (initialize_tracepoint, handle_tracepoint_general_set)
5007 (handle_tracepoint_query, tracepoint_finished_step)
5008 (tracepoint_was_hit, release_while_stepping_state_list):
5009 (current_traceframe): Declare.
5010 * server.c (handle_general_set): Handle tracepoint packets.
5012 (write_memory): New.
5013 (handle_search_memory_1): Use read_memory.
5014 (handle_query): Report support for conditional tracepoints, trace
5015 state variables, and tracepoint sources. Handle tracepoint
5017 (main): Initialize the tracepoints module.
5018 (process_serial_event): Handle traceframe reads/writes.
5020 * linux-low.c (handle_tracepoints): New.
5021 (linux_wait_1): Call it.
5022 (linux_resume_one_lwp): Handle while-stepping.
5023 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
5024 (linux_target_ops): Install them.
5025 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
5027 * linux-x86-low.c (x86_supports_tracepoints): New.
5028 (the_low_target). Install it.
5030 * mem-break.h (delete_breakpoint): Declare.
5031 * mem-break.c (delete_breakpoint): Make external.
5033 * target.h (struct target_ops): Add `supports_tracepoints',
5034 `read_pc', and `write_pc' fields.
5035 (target_supports_tracepoints): Define.
5036 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
5039 * regcache.h (struct regcache) <registers_owned>: New field.
5040 (init_register_cache, regcache_cpy): Declare.
5041 (regcache_read_pc, regcache_write_pc): Declare.
5042 (register_cache_size): Declare.
5043 (supply_regblock): Declare.
5044 * regcache.c (init_register_cache): New.
5045 (new_register_cache): Use it.
5046 (regcache_cpy): New.
5047 (register_cache_size): New.
5048 (supply_regblock): New.
5049 (regcache_read_pc, regcache_write_pc): New.
5051 * tracepoint.c: New.
5053 * Makefile.in (OBS): Add tracepoint.o.
5054 (tracepoint.o): New rule.
5056 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
5058 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
5060 (i386-mmx.c): Likewise.
5061 (i386-mmx-linux.o): Likewise.
5062 (i386-mmx-linux.c): Likewise.
5064 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
5065 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
5066 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
5067 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
5069 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
5070 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
5071 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
5073 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
5075 * Makefile.in (clean): Updated.
5077 (i386-avx.c): Likewise.
5078 (i386-avx-linux.o): Likewise.
5079 (i386-avx-linux.c): Likewise.
5080 (amd64-avx.o): Likewise.
5081 (amd64-avx.c): Likewise.
5082 (amd64-avx-linux.o): Likewise.
5083 (amd64-avx-linux.c): Likewise.
5085 * configure.srv (srv_i386_regobj): Add i386-avx.o.
5086 (srv_i386_linux_regobj): Add i386-avx-linux.o.
5087 (srv_amd64_regobj): Add amd64-avx.o.
5088 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
5089 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
5090 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
5091 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
5092 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
5093 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
5094 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
5096 * i387-fp.c: Include "i386-xstate.h".
5098 (i387_cache_to_xsave): Likewise.
5099 (i387_xsave_to_cache): Likewise.
5100 (x86_xcr0): Likewise.
5102 * i387-fp.h (i387_cache_to_xsave): Likewise.
5103 (i387_xsave_to_cache): Likewise.
5104 (x86_xcr0): Likewise.
5106 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
5107 * linux-crisv32-low.c (target_regsets): Likewise.
5108 * linux-m68k-low.c (target_regsets): Likewise.
5109 * linux-mips-low.c (target_regsets): Likewise.
5110 * linux-ppc-low.c (target_regsets): Likewise.
5111 * linux-s390-low.c (target_regsets): Likewise.
5112 * linux-sh-low.c (target_regsets): Likewise.
5113 * linux-sparc-low.c (target_regsets): Likewise.
5114 * linux-xtensa-low.c (target_regsets): Likewise.
5116 * linux-low.c: Include <sys/uio.h>.
5117 (regsets_fetch_inferior_registers): Support nt_type.
5118 (regsets_store_inferior_registers): Likewise.
5119 (linux_process_qsupported): New.
5120 (linux_target_ops): Add linux_process_qsupported.
5122 * linux-low.h (regset_info): Add nt_type.
5123 (linux_target_ops): Add process_qsupported.
5125 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
5127 (init_registers_i386_avx_linux): New.
5128 (init_registers_amd64_avx_linux): Likewise.
5129 (xmltarget_i386_linux_no_xml): Likewise.
5130 (xmltarget_amd64_linux_no_xml): Likewise.
5131 (PTRACE_GETREGSET): Likewise.
5132 (PTRACE_SETREGSET): Likewise.
5133 (x86_fill_xstateregset): Likewise.
5134 (x86_store_xstateregset): Likewise.
5135 (use_xml): Likewise.
5136 (x86_linux_update_xmltarget): Likewise.
5137 (x86_linux_process_qsupported): Likewise.
5138 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
5139 (x86_arch_setup): Don't call init_registers_amd64_linux nor
5140 init_registers_i386_linux here. Call
5141 x86_linux_update_xmltarget.
5142 (the_low_target): Add x86_linux_process_qsupported.
5144 * server.c (handle_query): Call target_process_qsupported.
5146 * target.h (target_ops): Add process_qsupported.
5147 (target_process_qsupported): New.
5149 2010-04-03 Pedro Alves <pedro@codesourcery.com>
5151 * inferiors.c (add_thread): Set last_status kind to
5152 TARGET_WAITKIND_IGNORE.
5153 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
5154 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
5155 (linux_wait_1): Move `thread' local definition to block that uses
5156 it. Don't NULL initialize `event_child'.
5157 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
5158 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
5159 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
5161 2010-04-01 Pedro Alves <pedro@codesourcery.com>
5163 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
5164 an extended waitstatus, or by a watchpoint.
5165 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
5166 thread was stepping or has been stopped by a watchpoint.
5168 2010-04-01 Pedro Alves <pedro@codesourcery.com>
5170 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
5171 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
5172 of another, then delete the previous, and validate all
5174 (validate_inserted_breakpoint): New.
5175 (delete_disabled_breakpoints): New.
5176 (validate_breakpoints): New.
5177 (check_mem_read): Validate breakpoints before trusting their
5178 shadow. Delete disabled breakpoints.
5179 (check_mem_write): Validate breakpoints before trusting they
5180 should be inserted. Delete disabled breakpoints.
5181 * mem-break.h (validate_breakpoints):
5182 * server.c (handle_query): Validate breakpoints when we see a
5185 2010-04-01 Pedro Alves <pedro@codesourcery.com>
5187 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
5188 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
5189 if we could tell there's a GDB breakpoint at stop_pc.
5190 (need_step_over_p): Don't do a step over if we find a GDB
5191 breakpoint at the resume PC.
5193 * mem-break.c (struct raw_breakpoint): New.
5194 (enum bkpt_type): New type `gdb_breakpoint'.
5195 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
5196 fields. New field `raw'.
5197 (find_raw_breakpoint_at): New.
5198 (set_raw_breakpoint_at): Handle refcounting. Create a raw
5200 (set_breakpoint_at): Adjust.
5201 (delete_raw_breakpoint): New.
5202 (release_breakpoint): New.
5203 (delete_breakpoint): Rename to...
5204 (delete_breakpoint_1): ... this. Add proc parameter. Use
5205 release_breakpoint. Return ENOENT.
5206 (delete_breakpoint): Reimplement.
5207 (find_breakpoint_at): Delete.
5208 (find_gdb_breakpoint_at): New.
5209 (delete_breakpoint_at): Delete.
5210 (set_gdb_breakpoint_at): New.
5211 (delete_gdb_breakpoint_at): New.
5212 (gdb_breakpoint_here): New.
5213 (set_reinsert_breakpoint): Use release_breakpoint.
5214 (uninsert_breakpoint): Rename to ...
5215 (uninsert_raw_breakpoint): ... this.
5216 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
5217 (reinsert_raw_breakpoint): Change parameter type to
5219 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
5221 (check_breakpoints): Adjust. Use release_breakpoint.
5222 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
5223 (breakpoint_inserted_here): Ditto.
5224 (check_mem_read): Adjust to iterate over raw breakpoints instead.
5225 Don't trust the breakpoint's shadow if it is not inserted.
5226 (check_mem_write): Adjust to iterate over raw breakpoints instead.
5227 (delete_all_breakpoints): Adjust.
5228 (free_all_breakpoints): Mark all breakpoints as uninserted, and
5229 use delete_breakpoint_1.
5231 * mem-break.h (breakpoints_supported): Delete declaration.
5232 (set_gdb_breakpoint_at): Declare.
5233 (gdb_breakpoint_here): Declare.
5234 (delete_breakpoint_at): Delete.
5235 (delete_gdb_breakpoint_at): Declare.
5237 * server.h (struct raw_breakpoint): Forward declare.
5238 (struct process_info): New field `raw_breakpoints'.
5240 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
5243 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5245 * linux-low.c (status_pending_p_callback): Fix comment.
5246 (linux_wait_for_event_1): Move most of the internal breakpoint
5247 handling from here...
5248 (linux_wait_1): ... to here.
5249 (count_events_callback): New.
5250 (select_singlestep_lwp_callback): New.
5251 (select_event_lwp_callback): New.
5252 (cancel_breakpoints_callback): New.
5253 (select_event_lwp): New.
5254 (linux_wait_1): Simplify internal breakpoint handling. Give equal
5255 priority to all LWPs that have had events that should be reported
5256 to the client. Cancel breakpoints when about to reporting the
5257 event to the client, not while stopping lwps. No longer cancel
5258 finished single-steps here.
5259 (cancel_finished_single_step): Delete.
5260 (cancel_finished_single_steps): Delete.
5262 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5264 * mem-break.c (enum bkpt_type): New.
5265 (struct breakpoint): New field `type'.
5266 (set_breakpoint_at): Change return type to struct breakpoint
5267 pointer. Set type to `other_breakpoint' by default.
5268 (delete_breakpoint): Rewrite, supporting more than one breakpoint
5269 in the breakpoint list.
5270 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
5271 (reinsert_breakpoint): Rename to ...
5272 (reinsert_raw_breakpoint): ... this.
5273 (reinsert_breakpoints_at): Adjust.
5274 * mem-break.h (struct breakpoint): Declare.
5275 (set_breakpoint_at): Change return type to struct breakpoint
5278 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5280 * server.c (handle_query): Assign, not compare.
5282 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5284 Teach linux gdbserver to step-over-breakpoints.
5286 * linux-low.c (can_hardware_single_step): New.
5287 (supports_breakpoints): New.
5288 (handle_extended_wait): If stopping threads, read the stop pc of
5291 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
5292 low target doesn't support retrieving the PC.
5293 (add_lwp): Set last_resume_kind to resume_continue.
5294 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
5295 (linux_attach): Don't clear stop_expected. Set the lwp's
5296 last_resume_kind to resume_stop.
5297 (linux_detach_one_lwp): Don't check for removed breakpoints.
5298 (check_removed_breakpoint): Delete.
5299 (status_pending_p): Rename to ...
5300 (status_pending_p_callback): ... this. Don't check for removed
5301 breakpoints. Don't consider threads that are stopped from GDB's
5303 (linux_wait_for_lwp): Always read the stop_pc here.
5304 (cancel_breakpoint): New.
5305 (step_over_bkpt): New global.
5306 (linux_wait_for_event_1): Implement stepping over breakpoints.
5307 (gdb_wants_lwp_stopped): New.
5308 (gdb_wants_all_stopped): New.
5309 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
5310 single-step traps here. Store the thread's last reported target
5312 (send_sigstop): Don't clear stop_expected. Always set it,
5314 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
5315 (cancel_finished_single_step): New.
5316 (cancel_finished_single_steps): New.
5317 (wait_for_sigstop): Don't cancel finished single-step traps here.
5318 (linux_resume_one_lwp): Don't check for removed breakpoints.
5319 Don't set `step' on non-hardware step archs.
5320 (linux_set_resume_request): Ignore resume_stop requests if already
5321 stopping or stopped. Set the lwp's last_resume_kind.
5322 (resume_status_pending_p): Don't check for removed breakpoints.
5323 (need_step_over_p): New.
5324 (start_step_over): New.
5325 (finish_step_over): New.
5326 (linux_resume_one_thread): Always queue a sigstop for resume_stop
5327 requests. Clear the thread's last reported target waitstatus.
5328 Don't use the `suspended' flag. Don't consider pending breakpoints.
5329 (linux_resume): Start a step-over if necessary.
5330 (proceed_one_lwp): New.
5331 (proceed_all_lwps): New.
5332 (unstop_all_lwps): New.
5333 * linux-low.h (struct lwp_info): Rewrite comment for the
5334 `suspended' flag. Add the `stop_pc' field. Delete the
5335 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
5336 Add `'last_resume_kind' and `need_step_over' fields.
5337 * inferiors.c (struct thread_info): Delete, moved elsewhere.
5338 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
5339 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
5340 (set_raw_breakpoint_at): New.
5341 (set_breakpoint_at): Rewrite to use it.
5342 (reinsert_breakpoint_handler): Delete.
5343 (set_reinsert_breakpoint): New.
5344 (reinsert_breakpoint_by_bp): Delete.
5345 (delete_reinsert_breakpoints): New.
5346 (uninsert_breakpoint): Rewrite.
5347 (uninsert_breakpoints_at): New.
5348 (reinsert_breakpoint): Rewrite.
5349 (reinsert_breakpoints_at): New.
5350 (check_breakpoints): Rewrite.
5351 (breakpoint_here): New.
5352 (breakpoint_inserted_here): New.
5353 (check_mem_read): Adjust.
5354 * mem-break.h (breakpoints_supported, breakpoint_here)
5355 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
5356 (reinsert_breakpoint_by_bp): Delete declaration.
5357 (delete_reinsert_breakpoints): Declare.
5358 (reinsert_breakpoint): Delete declaration.
5359 (reinsert_breakpoints_at): Declare.
5360 (uninsert_breakpoint): Delete declaration.
5361 (uninsert_breakpoints_at): Declare.
5362 (check_breakpoints): Adjust prototype.
5363 * server.h: Adjust include order.
5364 (struct thread_info): Declare here. Add a `last_status' field.
5366 2010-03-23 Michael Snyder <msnyder@vmware.com>
5368 * server.c (crc32): New function.
5369 (handle_query): Add handling for 'qCRC:' request.
5371 2010-03-23 Pedro Alves <pedro@codesourcery.com>
5373 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
5374 lwp had been stopped by a watchpoint.
5376 2010-03-16 Pedro Alves <pedro@codesourcery.com>
5378 * server.h (internal_error): Declare.
5379 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
5380 * utils.c (internal_error): New function.
5382 2010-03-15 Andreas Schwab <schwab@redhat.com>
5384 * configure.srv: Fix typo setting srv_regobj.
5386 2010-03-15 Pedro Alves <pedro@codesourcery.com>
5388 * linux-low.c (fetch_register): Avoid passing a non string literal
5390 (usr_store_inferior_registers): Ditto.
5392 2010-03-14 Pedro Alves <pedro@codesourcery.com>
5394 * linux-low.c (linux_write_memory): Bail out early if peeking
5397 2010-03-14 Pedro Alves <pedro@codesourcery.com>
5399 * linux-low.h (struct lwp_info): New fields
5400 `stopped_by_watchpoint' and `stopped_data_address'.
5401 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
5402 here, and cache them in the lwp object.
5403 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
5405 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
5407 (linux_stopped_by_watchpoint): Rewrite.
5408 (linux_stopped_data_address): Rewrite.
5410 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
5412 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
5413 switching the current inferior, not before.
5415 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
5417 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
5418 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
5419 i386-linux.c and amd64-linux.c.
5420 (reg-i386.o): Removed.
5421 (reg-i386.c): Likewise.
5422 (reg-i386-linux.o): Likewise.
5423 (reg-i386-linux.c): Likewise.
5424 (reg-x86-64.o): Likewise.
5425 (reg-x86-64.c): Likewise.
5426 (reg-x86-64-linux.o): Likewise.
5427 (reg-x86-64-linux.c): Likewise.
5430 (i386-linux.o): Likewise.
5431 (i386-linux.c): Likewise.
5432 (amd64.o): Likewise.
5433 (amd64.c): Likewise.
5434 (amd64-linux.o): Likewise.
5435 (amd64-linux.c): Likewise.
5437 * configure.srv (srv_i386_regobj): New.
5438 (srv_i386_linux_regobj): Likewise.
5439 (srv_amd64_regobj): Likewise.
5440 (srv_amd64_linux_regobj): Likewise.
5441 (srv_i386_32bit_xmlfiles): Likewise.
5442 (srv_i386_64bit_xmlfiles): Likewise.
5443 (srv_i386_xmlfiles): Likewise.
5444 (srv_amd64_xmlfiles): Likewise.
5445 (srv_i386_linux_xmlfiles): Likewise.
5446 (srv_amd64_linux_xmlfiles): Likewise.
5447 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
5448 srv_xmlfiles to $srv_i386_xmlfiles.
5449 (i[34567]86-*-mingw32ce*): Likewise.
5450 (i[34567]86-*-mingw*): Likewise.
5451 (i[34567]86-*-nto*): Likewise.
5452 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
5453 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
5454 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
5455 (x86_64-*-linux*): Likewise.
5457 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
5458 (init_registers_amd64_linux): New.
5459 (x86_arch_setup): Replace init_registers_x86_64_linux with
5460 init_registers_amd64_linux.
5462 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
5464 * configure.ac: Check for libdl. If it is not available link against
5465 static libthread_db.
5466 * configure: Regenerate.
5468 2010-02-22 Pedro Alves <pedro@codesourcery.com>
5472 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
5473 handing a read watchpoint.
5474 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
5476 2010-02-12 Doug Evans <dje@google.com>
5478 * linux-low.c (linux_supports_tracefork_flag): Document.
5479 (linux_look_up_symbols): Add comment.
5481 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
5483 * regcache.c (supply_register): Clear regcache if buf is NULL.
5485 2010-02-02 Nicolas Roche <roche@sourceware.org>
5486 Joel Brobecker <brobecker@adacore.com>
5488 * inferiors.c (find_inferior): Add function documentation.
5489 (unloaded_dll): Handle the case where the unloaded dll has not
5490 been previously registered in the dll list.
5492 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
5494 * linux-arm-low.c (thumb_breakpoint_len): Delete.
5495 (thumb2_breakpoint): New.
5496 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
5498 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5500 * linux-low.c (get_stop_pc): Check for SIGTRAP.
5501 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
5504 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5506 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
5508 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5510 * linux-s390-low.c (s390_collect_ptrace_register)
5511 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
5513 2010-01-21 Doug Evans <dje@google.com>
5515 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
5516 (PTRACE_ARG4_TYPE): New macro.
5517 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
5518 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
5519 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
5520 (usr_store_inferior_registers): Ditto.
5521 (linux_read_memory, linux_write_memory): Ditto.
5522 (linux_test_for_tracefork): Ditto.
5524 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
5525 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
5527 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5529 * proc-service.c (ps_lgetregs): Don't refetch registers from the
5532 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5534 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
5535 prototype to take a regcache. Adjust.
5537 2010-01-20 Pedro Alves <pedro@codesourcery.com>
5539 * regcache.h (struct thread_info): Forward declare.
5540 (struct regcache): New.
5541 (new_register_cache): Adjust prototype.
5542 (get_thread_regcache): Declare.
5543 (free_register_cache): Adjust prototype.
5544 (registers_to_string, registers_from_string): Ditto.
5545 (supply_register, supply_register_by_name, collect_register)
5546 (collect_register_as_string, collect_register_by_name): Ditto.
5547 * regcache.c (struct inferior_regcache_data): Delete.
5548 (get_regcache): Rename to ...
5549 (get_thread_regcache): ... this. Adjust. Switch inferior before
5551 (regcache_invalidate_one): Adjust.
5552 (regcache_invalidate): Fix prototype.
5553 (new_register_cache): Return the new register cache.
5554 (free_register_cache): Change prototype.
5555 (realloc_register_cache): Adjust.
5556 (registers_to_string): Change prototype to take a regcache. Adjust.
5557 (registers_from_string): Ditto.
5558 (register_data): Ditto.
5559 (supply_register): Ditto.
5560 (supply_register_by_name): Ditto.
5561 (collect_register): Ditto.
5562 (collect_register_as_string): Ditto.
5563 (collect_register_by_name): Ditto.
5564 * server.c (process_serial_event): Adjust.
5565 * linux-low.h (regset_fill_func, regset_store_func): Change
5567 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
5569 * linux-low.c (get_stop_pc): Adjust.
5570 (check_removed_breakpoint): Adjust.
5571 (linux_wait_for_event): Adjust.
5572 (linux_resume_one_lwp): Adjust.
5573 (fetch_register): Add regcache parameter. Adjust.
5574 (usr_store_inferior_registers): Ditto.
5575 (regsets_fetch_inferior_registers): Ditto.
5576 (regsets_store_inferior_registers): Ditto.
5577 (linux_fetch_registers, linux_store_registers): Ditto.
5578 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
5580 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
5582 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
5583 prototype to take a regcache.
5584 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
5585 * remote-utils.c (convert_ascii_to_int, outreg)
5586 (prepare_resume_reply): Change prototype to take a regcache.
5588 * target.h (struct target_ops) <fetch_registers, store_registers>:
5589 Change prototype to take a regcache.
5590 (fetch_inferior_registers, store_inferior_registers): Change
5591 prototype to take a regcache. Adjust.
5592 * proc-service.c (ps_lgetregs): Adjust.
5593 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
5594 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
5595 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
5596 take a regcache. Adjust.
5597 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
5598 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
5599 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
5600 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
5601 * linux-cris-low.c (cris_get_pc, cris_set_pc)
5602 (cris_cannot_fetch_register):
5603 (cris_breakpoint_at): Change prototype to take a regcache.
5605 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
5606 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
5607 to take a regcache. Adjust.
5608 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
5610 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
5611 take a regcache. Adjust.
5612 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
5613 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
5614 (m68k_set_pc): Change prototype to take a regcache. Adjust.
5615 * linux-mips-low.c (mips_get_pc):
5616 (mips_set_pc): Change prototype to take a regcache. Adjust.
5617 (mips_reinsert_addr): Adjust.
5618 (mips_collect_register): Change prototype to take a regcache.
5620 (mips_supply_register):
5621 (mips_collect_register_32bit, mips_supply_register_32bit)
5622 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
5623 (mips_store_fpregset): Ditto.
5624 * linux-ppc-low.c (ppc_supply_ptrace_register)
5625 (ppc_supply_ptrace_register): Ditto.
5626 (parse_spufs_run): Adjust.
5627 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
5628 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
5629 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
5630 take a regcache. Adjust.
5631 * linux-s390-low.c (s390_collect_ptrace_register)
5632 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
5633 (s390_set_pc): Change prototype to take a regcache. Adjust.
5634 (s390_arch_setup): Adjust.
5635 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
5636 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
5637 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5638 (sparc_fill_gregset, sparc_store_gregset_from_stack)
5639 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
5641 (sparc_breakpoint_at): Adjust.
5642 * linux-xtensa-low.c (xtensa_fill_gregset):
5643 (xtensa_store_gregset):
5644 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
5645 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
5646 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
5647 prototype to take a regcache. Adjust.
5648 * win32-arm-low.c (arm_fetch_inferior_register)
5649 (arm_store_inferior_register): Change prototype to take a
5651 * win32-i386-low.c (i386_fetch_inferior_register)
5652 (i386_store_inferior_register): Change prototype to take a
5654 * win32-low.c (child_fetch_inferior_registers)
5655 (child_store_inferior_registers): Change prototype to take a
5657 (win32_wait): Adjust.
5658 (win32_fetch_inferior_registers): Change prototype to take a
5660 (win32_store_inferior_registers): Adjust.
5661 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
5662 store_inferior_register>: Change prototype to take a regcache.
5664 2010-01-20 Doug Evans <dje@google.com>
5666 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
5668 (linux_wait_for_event1, linux_init_signals): Ditto.
5669 (W_STOPCODE): Provide definition if missing.
5671 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
5673 * linux-low.c (linux_core_of_thread): New.
5674 (compare_ints, show_process, list_threads): New.
5675 (linux_qxfer_osdata): Report threads and cores.
5676 (linux_target_op): Register linux_core_of_thread.
5677 * remote-utils.c (prepare_resume_reply): Report the core.
5678 (buffer_xml_printf): Support %d specifier.
5679 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
5681 (handle_query): Handle qXfer:threads. Announce availability
5683 * target.h (struct target_ops): New field core_of_thread.
5685 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
5687 * Makefile.in (clean): Remove new generated files.
5688 (reg-s390.o, reg-s390.c): Remove rules.
5689 (reg-s390x.o, reg-s390x.c): Likewise.
5690 (s390-linux32.o, s390-linux32.c): Add rules.
5691 (s390-linux64.o, s390-linux64.c): Likewise.
5692 (s390x-linux64.o, s390x-linux64.c): Likewise.
5693 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
5694 * linux-s390-low.c: Include <elf.h>.
5695 (HWCAP_S390_HIGH_GPRS): Define if undefined.
5696 (init_registers_s390): Remove prototype.
5697 (init_registers_s390x): Likewise.
5698 (init_registers_s390_linux32): Add prototype.
5699 (init_registers_s390_linux64): Likewise.
5700 (init_registers_s390x_linux64): Likewise.
5701 (s390_num_regs_3264): New define.
5702 (s390_regmap_3264): New global variable.
5703 (s390_cannot_fetch_register): Remove obsolete check.
5704 (s390_cannot_store_register): Likewise.
5705 (s390_collect_ptrace_register): Handle upper/lower register halves.
5706 (s390_supply_ptrace_register): Likewise.
5707 (s390_fill_gregset): Update to register number changes.
5708 (s390_get_hwcap): New routine.
5709 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
5710 Install appropriate regmap and register set.
5712 2010-01-01 Joel Brobecker <brobecker@adacore.com>
5714 * server.c (gdbserver_version): Update copyright year to 2010.
5715 * gdbreplay.c (gdbreplay_version): Likewise.
5717 2009-12-28 Doug Evans <dje@google.com>
5719 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
5720 elf/external.h. Include <elf.h> instead but only if necessary.
5722 2009-12-28 Pedro Alves <pedro@codesourcery.com>
5724 * linux-low.c (linux_remove_process): Remove `detaching'
5725 parameter. Don't release/detach from thread_db here.
5726 (linux_kill): Release/detach from thread_db here, ...
5727 (linux_detach): ... and here, before actually detaching.
5728 (linux_wait_1): ... and here, when a process exits.
5729 * thread-db.c (any_thread_of): New.
5730 (thread_db_free): Switch the current inferior to a thread of the
5733 2009-12-21 Doug Evans <dje@google.com>
5735 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
5737 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
5738 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
5739 warning ifndef __NR_tkill. Move setting of errno there too.
5740 Delete unnecessary resetting of errno after syscall.
5741 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
5743 * configure.ac: Check for dladdr.
5744 * config.in: Regenerate.
5745 * configure: Regenerate.
5746 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
5747 (try_thread_db_load): Update.
5749 * linux-low.c (my_waitpid): Delete unnecessary prototype.
5751 2009-12-18 Doug Evans <dje@google.com>
5753 * event-loop.c: Include unistd.h if it exists.
5755 * linux-low.c (my_waitpid): Move definition away from being in
5756 between linux_tracefork_child/linux_test_for_tracefork.
5758 * gdb_proc_service.h (psaddr_t): Fix type.
5759 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
5760 signature to match glibc.
5762 2009-12-16 Doug Evans <dje@google.com>
5764 * linux-low.c (linux_read_memory): Fix argument to read.
5766 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5768 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
5769 events, don't leave current_inferior pointing at null.
5771 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5773 * win32-low.c (LOG): Delete.
5774 (OUTMSG): Output to stderr.
5775 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
5776 on compile time LOG macro.
5777 (win32_wait): Fix debug output.
5779 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5781 * win32-low.c (win32_add_one_solib): If the dll name is
5782 "ntdll.dll", prepend the system directory to the dll path.
5784 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
5786 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
5788 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
5789 Vladimir Prus <vladimir@codesourcery.com>
5791 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
5792 * configure.ac: Check for __mcoldfire__ and set
5793 gdb_cv_m68k_is_coldfire.
5794 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
5795 reg-cf.o and reg-m68k.o.
5796 * configure: Regenerated.
5798 2009-11-16 Pedro Alves <pedro@codesourcery.com>
5800 * linux-low.c (linux_remove_process): Add `detaching' parameter.
5801 Pass it to thread_db_free.
5802 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
5803 proper `detaching' argument to linux_remove_process.
5804 * linux-low.h (thread_db_free): Add `detaching' parameter.
5805 * thread-db.c (thread_db_init): Pass false as `detaching' argument
5807 (thread_db_free): Add `detaching' parameter. Only
5808 call td_ta_clear_event if detaching from process.
5810 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
5812 * thread-db.c (thread_db_free): Fix typo.
5814 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
5817 * thread-db.c (thread_db_free): Call td_ta_clear_event.
5819 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
5821 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
5822 with an i686 compiler.
5823 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
5825 * configure: Rebuilt.
5827 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
5831 * server.c (handle_search_memory_1): Correct read_addr initialization
5832 in loop for searching subsequent chunks.
5834 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
5836 * configure.ac: New --with-libthread-db option.
5837 * thread-db.c: Allow direct dependence on libthread_db.
5838 (thread_db_free): Adjust.
5839 * config.in: Regenerate.
5840 * configure: Likewise.
5842 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
5845 * thread-db.c (attach_thread): New function.
5846 (maybe_attach_thread): Return success/failure.
5847 (find_new_threads_callback): Adjust.
5848 (thread_db_find_new_threads): Loop until no new threads.
5850 2009-10-13 Pedro Alves <pedro@codesourcery.com>
5852 * proc-service.c (ps_lgetregs): Formatting.
5854 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
5856 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
5857 * configure.ac: Adjust.
5858 * linux-low.h (struct process_info_private): Move members to struct
5860 (thread_db_free, thread_db_handle_monitor_command): New prototype.
5861 * linux-low.c (linux_remove_process): Adjust.
5862 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
5863 * server.c (handle_query): Move code ...
5864 (handle_monitor_command): ... here. New function.
5865 * target.h (struct target_ops): New member.
5866 * thread-db.c (struct thread_db): New.
5867 (libthread_db_search_path): New variable.
5868 (thread_db_create_event, thread_db_enable_reporting)
5869 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
5870 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
5871 (try_thread_db_load_1, dladdr_to_soname): New functions.
5872 (try_thread_db_load, thread_db_load_search): New functions.
5873 (thread_db_init): Search for libthread_db.
5874 (thread_db_free): New function.
5875 (thread_db_handle_monitor_command): Likewise.
5876 * config.in: Regenerate.
5877 * configure: Regenerate.
5879 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5881 * spu-low.c (spu_kill): Wait for inferior to terminate.
5882 Call clear_inferiors.
5883 (spu_detach): Call clear_inferiors.
5885 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5887 * aclocal.m4: Regenerate.
5888 * config.in: Likewise.
5889 * configure: Likewise.
5891 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5893 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
5894 (parse_spufs_run): New function.
5895 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
5896 (ppc_breakpoint_at): Handle SPU breakpoints.
5898 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5900 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
5901 (SPUFS_MAGIC): Define.
5902 (spu_enumerate_spu_ids): New function.
5903 (linux_qxfer_spu): New function.
5904 (linux_target_ops): Install linux_qxfer_spu.
5906 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5908 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
5909 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
5910 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
5911 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
5912 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
5913 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
5914 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
5915 (init_registers_powerpc_cell32l): Add prototype.
5916 (init_registers_powerpc_cell64l): Likewise.
5917 (ppc_arch_setup): Detect Cell/B.E. architecture.
5919 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5921 * Makefile.in (datarootdir): New variable.
5923 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5925 * linux-low.c (linux_write_memory): Update debugging output.
5926 * Makefile.in (clean): Add new descriptions.
5927 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
5928 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
5929 * configure.srv: Add new files for arm*-*-linux*.
5930 * linux-arm-low.c: Add new declarations.
5931 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
5932 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
5933 (HWCAP_VFPv3D16): New.
5934 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
5935 instead of __IWMMXT__.
5936 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
5937 (arm_arch_setup): New.
5938 (target_regsets): Remove #ifdef. Add VFP regset.
5939 (the_low_target): Use arm_arch_setup.
5941 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5943 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
5944 the main thread again.
5946 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
5948 Adding Neutrino gdbserver.
5949 * configure: Regenerated.
5950 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
5951 * configure.srv (i[34567]86-*-nto*): New target.
5952 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
5953 * remote-utils.c [__QNX__]: Include sys/iomgr.h
5954 (nto_comctrl) [__QNX__]: New function.
5955 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
5957 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
5959 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
5962 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
5963 Pedro Alves <pedro@codesourcery.com>
5965 * win32-i386-low.c (i386_get_thread_context): Handle systems that
5966 don't support CONTEXT_EXTENDED_REGISTERS.
5967 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
5968 (the_low_target): Install them.
5969 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
5970 failing with ERROR_PIPE_NOT_CONNECTED.
5972 2009-06-30 Doug Evans <dje@google.com>
5973 Pierre Muller <muller@ics.u-strasbg.fr>
5975 Add h/w watchpoint support to x86-linux, win32-i386.
5976 * Makefile.in (SFILES): Add i386-low.c
5977 (i386_low_h): Define.
5978 (i386-low.o): Add dependencies.
5979 (linux-x86-low.o): Add i386-low.h dependency.
5980 (win32-i386-low.o): Ditto.
5981 * i386-low.c: New file.
5982 * i386-low.h: New file.
5983 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
5984 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
5985 * linux-low.c (linux_add_process): Initialize arch_private.
5986 (linux_remove_process): Free arch_private.
5987 (add_lwp): Initialize arch_private.
5988 (delete_lwp): Free arch_private.
5989 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
5991 * linux-low.h (process_info_private): New member arch_private.
5992 (lwp_info): New member arch_private.
5993 (linux_target_ops): New members new_process, new_thread,
5995 (ptid_of): New macro.
5996 * linux-x86-low.c: Include stddef.h, i386-low.h.
5997 (arch_process_info): New struct.
5998 (arch_lwp_info): New struct.
5999 (x86_linux_dr_get, x86_linux_dr_set): New functions.
6000 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6001 (i386_dr_low_get_status): New function.
6002 (x86_insert_point, x86_remove_point): New functions.
6003 (x86_stopped_by_watchpoint): New function.
6004 (x86_stopped_data_address): New function.
6005 (x86_linux_new_process, x86_linux_new_thread): New functions.
6006 (x86_linux_prepare_to_resume): New function.
6007 (the_low_target): Add entries for insert_point, remove_point,
6008 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
6010 * server.c (debug_hw_points): New global.
6011 (monitor_show_help): Document set debug-hw-points.
6012 (handle_query): Process "set debug-hw-points".
6013 * server.h (debug_hw_points): Declare.
6014 (paddress): Declare.
6015 * utils.c (NUMCELLS, CELLSIZE): New macros.
6016 (get_sell, xsnprintf, paddress): New functions.
6017 * win32-arm-low.c (the_low_target): Add entries for insert_point,
6018 remove_point, stopped_by_watchpoint, stopped_data_address.
6019 * win32-i386-low.c: Include i386-low.h.
6020 (debug_reg_state): Replaces dr.
6021 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6022 (i386_dr_low_get_status): New function.
6023 (i386_insert_point, i386_remove_point): New functions.
6024 (i386_stopped_by_watchpoint): New function.
6025 (i386_stopped_data_address): New function.
6026 (i386_initial_stuff): Update.
6027 (get_thread_context,set_thread_context,i386_thread_added): Update.
6028 (the_low_target): Add entries for insert_point,
6029 remove_point, stopped_by_watchpoint, stopped_data_address.
6030 * win32-low.c (win32_insert_watchpoint): New function.
6031 (win32_remove_watchpoint): New function.
6032 (win32_stopped_by_watchpoint): New function.
6033 (win32_stopped_data_address): New function.
6034 (win32_target_ops): Add entries for insert_watchpoint,
6035 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
6036 * win32-low.h (win32_target_ops): New members insert_point,
6037 remove_point, stopped_by_watchpoint, stopped_data_address.
6039 2009-06-25 Pedro Alves <pedro@codesourcery.com>
6041 * server.c (process_serial_event): Re-return unsupported, not
6042 error, if the type isn't recognized. Re-allow supporting only
6043 insert or remove packets. Also call require_running for
6044 breakpoints. Add missing break statement to default case. Tidy.
6045 * target.h (struct target_ops): Rename insert_watchpoint to
6046 insert_point, and remove_watchpoint to remove_point.
6048 * linux-low.h (struct linux_target_ops): Likewise.
6049 * linux-low.c (linux_insert_watchpoint): Rename to ...
6050 (linux_insert_point): ... this. Adjust.
6051 (linux_remove_watchpoint): Rename to ...
6052 (linux_remove_point): ... this. Adjust.
6053 (linux_target_ops): Adjust.
6054 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
6055 (cris_insert_point): ... this.
6056 (cris_remove_watchpoint): Rename to ...
6057 (cris_remove_point): ... this.
6058 (the_low_target): Adjust.
6060 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
6062 * server.c (handle_v_kill): Pass signal_pid to
6063 kill_inferior if multi_process is zero.
6065 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
6067 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
6068 * target.h (target_ops): Comment for *_watchpoint to make it clear
6069 the functions can get types '0' and '1'.
6071 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
6073 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
6074 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
6075 * regcache.c (get_regcache): Likewise.
6076 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
6077 * win32-low.c (child_fetch_inferior_registers): Remove check for
6080 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
6081 Pedro Alves <pedro@codesourcery.com>
6083 * target.h (struct target_ops) <supports_multi_process>: New
6085 (target_supports_multi_process): New.
6086 * server.c (handle_query): Even if GDB reports support, only
6087 enable multi-process if the target also supports it. Report
6088 multi-process support only if the target backend supports it.
6089 * linux-low.c (linux_supports_multi_process): New function.
6090 (linux_target_ops): Install it as target_supports_multi_process
6093 2009-05-24 Doug Evans <dje@google.com>
6095 Global renaming of find_thread_pid to find_thread_ptid.
6096 * server.h (find_thread_ptid): Renamed from find_thread_pid.
6097 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
6098 All callers updated.
6100 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
6101 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
6104 * linux-low.c (get_stop_pc): Print pc if debug_threads.
6105 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
6106 (linux_resume_one_lwp): Ditto.
6108 2009-05-23 Doug Evans <dje@google.com>
6110 * linux-low.c (linux_resume_one_lwp): Change type of first arg
6111 from struct inferior_list_entry * to struct lwp_info *.
6112 All callers updated.
6114 2009-05-13 Doug Evans <dje@google.com>
6116 * linux-x86-low.c: Don't include assert.h.
6117 (x86_siginfo_fixup): Use fatal, not assert.
6118 (x86_arch_setup): Fix comment.
6120 2009-05-12 Doug Evans <dje@google.com>
6122 Biarch support for i386/amd64 gdbserver.
6123 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
6124 Add linux-x86-low.c.
6125 (linux-i386-low.o, linux-x86-64-low.o): Delete.
6126 (linux-x86-low.o): Add.
6127 * linux-x86-64-low.c: Delete.
6128 * linux-i386-low.c: Delete.
6129 * linux-x86-low.c: New file.
6130 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
6132 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
6134 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
6135 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
6136 (linux_child_pid_to_exec_file): New function.
6137 (elf_64_header_p, elf_64_file_p): New functions.
6138 (siginfo_fixup): New function.
6139 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
6140 give target a chance to convert layout.
6141 * linux-low.h (linux_target_ops): New member siginfo_fixup.
6142 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
6144 2009-05-07 Doug Evans <dje@google.com>
6146 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
6147 (regsets_store_inferior_registers): Ditto.
6149 2009-05-06 Pedro Alves <pedro@codesourcery.com>
6153 * linux-low.c (must_set_ptrace_flags): Delete.
6154 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
6156 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
6157 `lwp->must_set_ptrace_flags' instead.
6158 (linux_wait_for_event_1): Set ptrace options here.
6159 (linux_wait_1): ... not here.
6161 2009-04-30 Doug Evans <dje@google.com>
6163 * inferiors.c (started_inferior_callback): New function.
6164 (attached_inferior_callback): New function.
6165 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
6166 * server.c (print_started_pid, print_attached_pid): New functions.
6167 (detach_or_kill_for_exit): New function.
6168 (main): Call it instead of for_each_inferior (kill_inferior_callback).
6169 * server.h (have_started_inferiors_p): Declare.
6170 (have_attached_inferiors_p): Declare.
6172 * inferiors.c (remove_process): Fix memory leak, free process.
6173 * linux-low.c (linux_remove_process): New function.
6174 (linux_kill): Call it instead of remove_process.
6175 (linux_detach, linux_wait_1): Ditto.
6177 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
6179 * configure.srv: Add x86 Windows CE target.
6181 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
6183 * inferiors.c (get_thread_process): Make global.
6184 * server.h (get_thread_process): Add prototype.
6185 * thread-db.c (find_one_thread): Use get_thread_process
6186 instead of current_process.
6187 (thread_db_get_tls_address): Do not crash if called when
6188 thread layer is not yet initialized.
6190 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
6192 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
6193 * spu-low.c (current_tid): Rename to ...
6194 (current_ptid): ... this.
6195 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
6196 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
6197 ptid_get_lwp (current_ptid) instead of current_tid.
6198 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
6199 instead of current_tid. Use find_process_pid to verify pid
6200 argument is valid. Pass proper argument to remove_process.
6201 (spu_thread_alive): Compare current_ptid instead of current_tid.
6202 (spu_resume): Likewise.
6204 2009-04-02 Pedro Alves <pedro@codesourcery.com>
6206 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
6209 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6211 Implement the multiprocess extensions, and add linux multiprocess
6214 * server.h (ULONGEST): Declare.
6215 (struct ptid, ptid_t): New.
6216 (minus_one_ptid, null_ptid): Declare.
6217 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
6218 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
6219 (struct inferior_list_entry): Change `id' type from unsigned from
6221 (struct sym_cache, struct breakpoint, struct
6222 process_info_private): Forward declare.
6223 (struct process_info): Declare.
6224 (current_process): Declare.
6225 (all_processes): Declare.
6226 (initialize_inferiors): Declare.
6227 (add_thread): Adjust to use ptid_t.
6228 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
6229 (add_process, remove_process, find_thread_pid): Declare.
6230 (find_inferior_id): Adjust to use ptid_t.
6231 (cont_thread, general_thread, step_thread): Change type to ptid_t.
6232 (multi_process): Declare.
6233 (push_event): Adjust to use ptid_t.
6234 (read_ptid, write_ptid): Declare.
6235 (prepare_resume_reply): Adjust to use ptid_t.
6236 (clear_symbol_cache): Declare.
6237 * inferiors.c (all_processes): New.
6238 (null_ptid, minus_one_ptid): New.
6239 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
6240 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
6241 (add_thread): Change unsigned long to ptid. Remove gdb_id
6243 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
6244 (gdb_id_to_thread): Rename to ...
6245 (find_thread_pid): ... this. Change unsigned long to ptid.
6246 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
6247 (loaded_dll, pull_pid_from_list): Adjust.
6248 (add_process, remove_process, find_process_pid)
6249 (get_thread_process, current_process, initialize_inferiors): New.
6250 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
6251 (struct target_waitstatus) <related_pid>: Ditto.
6252 (struct target_ops) <kill, detach>: Add `pid' argument. Change
6254 (struct target_ops) <join>: Add `pid' argument.
6255 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
6256 (struct target_ops) <wait>: Add `ptid' field. Change return type
6258 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
6259 (mywait): Add `ptid' argument. Change return type to ptid_t.
6260 (target_pid_to_str): Declare.
6261 * target.c (set_desired_inferior): Adjust to use ptids.
6262 (mywait): Add new `ptid' argument. Adjust.
6263 (target_pid_to_str): New.
6264 * mem-break.h (free_all_breakpoints): Declare.
6265 * mem-break.c (breakpoints): Delelete.
6266 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
6267 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
6268 to use per-process breakpoint list.
6269 (free_all_breakpoints): New.
6270 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
6271 (symbol_cache, all_symbols_looked_up): Delete.
6273 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
6275 (prepare_resume_reply): Change ptid argument's type from unsigned
6276 long to ptid_t. Adjust. Implement W;process and X;process.
6277 (free_sym_cache, clear_symbol_cache): New.
6278 (look_up_one_symbol): Adjust to per-process symbol cache. *
6279 * server.c (cont_thread, general_thread, step_thread): Change type
6282 (multi_process): New.
6283 (last_ptid): Change type to ptid_t.
6284 (struct vstop_notif) <ptid>: Change type to ptid_t.
6285 (queue_stop_reply, push_event): Change `ptid' argument's type to
6287 (discard_queued_stop_replies): Add `pid' argument.
6288 (start_inferior): Adjust to use ptids. Adjust to mywait interface
6289 changes. Don't reference the `attached' global.
6290 (attach_inferior): Adjust to mywait interface changes.
6291 (handle_query): Adjust to use ptids. Parse GDB's qSupported
6292 features. Handle and report "multiprocess+". Handle
6294 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
6296 (handle_v_kill): New.
6297 (handle_v_stopped): Adjust to use target_pid_to_str.
6298 (handle_v_requests): Allow multiple attaches and runs when
6299 multiprocess extensions are in effect. Handle "vKill".
6300 (myresume): Adjust to use ptids.
6301 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
6302 (handle_status): Adjust to discard_queued_stop_replies interface
6304 (first_thread_of, kill_inferior_callback)
6305 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
6306 (main): Call initialize_inferiors. Adjust to use ptids, killing
6307 and detaching from all inferiors. Handle multiprocess packet
6309 * linux-low.h: Include gdb_proc_service.h.
6310 (struct process_info_private): New.
6311 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
6312 <lwpid_of>: Use ptid_get_lwp.
6313 (get_lwp_thread): Adjust.
6314 (struct lwp_info): Add `dead' member.
6315 (find_lwp_pid): Declare.
6316 * linux-low.c (thread_db_active): Delete.
6317 (new_inferior): Adjust comment.
6318 (inferior_pid): Delete.
6319 (linux_add_process): New.
6320 (handle_extended_wait): Adjust.
6321 (add_lwp): Change unsigned long to ptid.
6322 (linux_create_inferior): Add process to processes table. Adjust
6323 to use ptids. Don't set new_inferior here.
6324 (linux_attach_lwp): Rename to ...
6325 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
6326 it. Adjust to use ptids.
6327 (linux_attach_lwp): New.
6328 (linux_attach): Add process to processes table. Don't set
6330 (struct counter): New.
6331 (second_thread_of_pid_p, last_thread_of_process_p): New.
6332 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
6334 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
6335 processes. Remove process from process table.
6336 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
6337 to multiple processes.
6338 (any_thread_of): New.
6339 (linux_detach): Add `pid' argument, and handle it. Remove process
6340 from processes table.
6341 (linux_join): Add `pid' argument. Handle it.
6342 (linux_thread_alive): Change unsighed long argument to ptid_t.
6343 Consider dead lwps as not being alive.
6344 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
6345 threads we're not interested in.
6346 (same_lwp, find_lwp_pid): New.
6347 (linux_wait_for_lwp): Change `pid' argument's type from int to
6349 (linux_wait_for_event): Rename to ...
6350 (linux_wait_for_event_1): ... this. Change `pid' argument's type
6351 from int to ptid_t. Adjust.
6352 (linux_wait_for_event): New.
6353 (linux_wait_1): Add `ptid' argument. Change return type to
6354 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
6355 that exit from the process table.
6356 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
6358 (mark_lwp_dead): New.
6359 (wait_for_sigstop): Adjust to use ptids. If a process exits while
6360 stopping all threads, mark its main lwp as dead.
6361 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
6363 (fetch_register, usr_store_inferior_registers)
6364 (regsets_fetch_inferior_registers)
6365 (regsets_store_inferior_registers, linux_read_memory)
6366 (linux_write_memory): Inline `inferior_pid'.
6367 (linux_look_up_symbols): Adjust to use per-process
6369 (linux_request_interrupt): Adjust to use ptids.
6370 (linux_read_auxv): Inline `inferior_pid'.
6371 (initialize_low): Don't reference thread_db_active.
6372 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
6373 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
6374 (ps_getpid): Return the pid of the current inferior.
6375 * thread-db.c (proc_handle, thread_agent): Delete.
6376 (thread_db_create_event, thread_db_enable_reporting): Adjust to
6378 (find_one_thread): Change argument type to ptid_t. Adjust to
6380 (maybe_attach_thread): Adjust to per-process data and ptids.
6381 (thread_db_find_new_threads): Ditto.
6382 (thread_db_init): Ditto.
6383 * spu-low.c (spu_create_inferior, spu_attach): Add process to
6384 processes table. Adjust to use ptids.
6385 (spu_kill, spu_detach): Adjust interface. Remove process from
6387 (spu_join, spu_thread_alive): Adjust interface.
6388 (spu_wait): Adjust interface. Remove process from processes
6389 table. Adjust to use ptids.
6390 * win32-low.c (current_inferior_tid): Delete.
6391 (current_inferior_ptid): New.
6392 (debug_event_ptid): New.
6393 (thread_rec): Take a ptid. Adjust.
6394 (child_add_thread): Add `pid' argument. Adjust to use ptids.
6395 (child_delete_thread): Ditto.
6396 (do_initial_child_stuff): Add `attached' argument. Add process to
6398 (child_fetch_inferior_registers, child_store_inferior_registers):
6400 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
6401 (win32_attach): Pass 1 to do_initial_child_stuff.
6402 (win32_kill): Adjust interface. Remove process from processes
6404 (win32_detach): Ditto.
6405 (win32_join): Adjust interface.
6406 (win32_thread_alive): Take a ptid.
6407 (win32_resume): Adjust to use ptids.
6408 (get_child_debug_event): Ditto.
6409 (win32_wait): Adjust interface. Remove exiting process from
6412 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6414 Non-stop mode support.
6416 * server.h (non_stop): Declare.
6417 (gdb_client_data, handler_func): Declare.
6418 (delete_file_handler, add_file_handler, start_event_loop):
6420 (handle_serial_event, handle_target_event, push_event)
6421 (putpkt_notif): Declare.
6422 * target.h (enum resume_kind): New.
6423 (struct thread_resume): Replace `step' field by `kind' field.
6424 (TARGET_WNOHANG): Define.
6425 (struct target_ops) <wait>: Add `options' argument.
6426 <supports_non_stop, async, start_non_stop>: New fields.
6427 (target_supports_non_stop, target_async): New.
6428 (start_non_stop): Declare.
6429 (mywait): Add `options' argument.
6430 * target.c (mywait): Add `options' argument. Print child exit
6432 (start_non_stop): New.
6433 * server.c (non_stop, own_buf, mem_buf): New globals.
6434 (struct vstop_notif): New.
6435 (notif_queue): New global.
6436 (queue_stop_reply, push_event, discard_queued_stop_replies)
6437 (send_next_stop_reply): New.
6438 (start_inferior): Adjust to use resume_kind. Adjust to mywait
6440 (attach_inferior): In non-stop mode, don't wait for the target
6442 (handle_general_set): Handle QNonStop.
6443 (handle_query): When handling qC, return the current general
6444 thread, instead of the first thread of the list.
6445 (handle_query): If the backend supports non-stop mode, include
6446 QNonStop+ in the qSupported query response.
6447 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
6449 (handle_v_attach, handle_v_run): Handle non-stop mode.
6450 (handle_v_stopped): New.
6451 (handle_v_requests): Report support for vCont;t. Handle vStopped.
6452 (myresume): Adjust to use resume_kind. Handle non-stop.
6453 (queue_stop_reply_callback): New.
6454 (handle_status): Handle non-stop mode.
6455 (main): Clear non_stop flag on reconnection. Use the event-loop.
6456 Refactor serial protocol handling from here ...
6457 (process_serial_event): ... to this new function. When GDB
6458 selects any thread, select one here. In non-stop mode, wait until
6459 GDB acks all pending events before exiting.
6460 (handle_serial_event, handle_target_event): New.
6461 * remote-utils.c (remote_open): Install remote_desc in the event
6463 (remote_close): Remove remote_desc from the event loop.
6464 (putpkt_binary): Rename to...
6465 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
6466 (putpkt_binary): New as wrapper around putpkt_binary_1.
6467 (putpkt_notif): New.
6468 (prepare_resume_reply): In non-stop mode, don't change the
6470 * event-loop.c: New.
6471 * Makefile.in (OBJ): Add event-loop.o.
6472 (event-loop.o): New rule.
6474 * linux-low.h (pid_of): Moved here.
6476 (get_lwp_thread): Use lwpid_of.
6477 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
6478 * linux-low.c (pid_of): Delete.
6479 (inferior_pid): Use lwpid_of.
6480 (linux_event_pipe): New.
6481 (target_is_async_p): New.
6483 (handle_extended_wait): Use lwpid_of.
6484 (add_lwp): Don't set lwpid field.
6485 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
6486 (linux_kill_one_lwp): If killing a running lwp, stop it first.
6487 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
6488 (linux_detach_one_lwp): If detaching from a running lwp, stop it
6489 first. Adjust to linux_wait_for_event interface changes. Use
6491 (linux_detach): Don't delete the main lwp here.
6492 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
6493 (status_pending_p): Don't consider explicitly suspended lwps.
6494 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
6495 pointer. Add OPTIONS argument. Change return type to int. Use
6496 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
6497 (linux_wait_for_event): Take an integer pid instead of a lwp_info
6498 pointer. Add status pointer argument. Return a pid instead of a
6499 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
6500 changes. In non-stop mode, don't switch to a random thread.
6501 (linux_wait): Rename to...
6502 (linux_wait_1): ... this. Add target_options argument, and handle
6503 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
6504 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
6505 clean exit and signal exit code. Don't stop all threads in
6506 non-stop mode. In all-stop mode, only stop all threads when
6507 reporting a stop to GDB. Handle explicit thread stop requests.
6508 (async_file_flush, async_file_mark): New.
6510 (send_sigstop): Use lwpid_of.
6511 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
6512 interface changes. In non-stop mode, don't switch to a random
6514 (linux_resume_one_lwp): Use lwpid_of.
6515 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
6516 (linux_resume_one_thread): ... this. Handle resume_stop. In
6517 non-stop mode, don't look for pending flag in all threads.
6518 (resume_status_pending_p): Don't consider explicitly suspended
6520 (my_waitpid): Reimplement. Emulate __WALL.
6521 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
6523 (sigchld_handler, linux_supports_non_stop, linux_async)
6524 (linux_start_non_stop): New.
6525 (linux_target_ops): Register linux_supports_non_stop, linux_async
6526 and linux_start_non_stop.
6527 (initialize_low): Install SIGCHLD handler.
6528 * thread-db.c (thread_db_create_event, find_one_thread)
6529 (thread_db_get_tls_address): Use lwpid_of.
6530 * win32-low.c (win32_detach): Adjust to use resume_kind.
6531 (win32_wait): Add `options' argument.
6532 * spu-low.c (spu_resume): Adjust to use resume_kind.
6533 (spu_wait): Add `options' argument.
6535 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6537 Decouple target code from remote protocol.
6539 * target.h (enum target_waitkind): New.
6540 (struct target_waitstatus): New.
6541 (struct target_ops) <wait>: Return an unsigned long. Take a
6542 target_waitstatus pointer instead of a char pointer.
6544 * target.c (mywait): Change prototype to return an unsigned long.
6545 Take a target_waitstatus pointer instead of a char pointer. Adjust.
6546 * server.h (thread_from_wait, old_thread_from_wait): Delete
6548 (prepare_resume_reply): Change prototype to take a
6550 * server.c (thread_from_wait, old_thread_from_wait): Delete.
6551 (last_status, last_ptid): New.
6552 (start_inferior): Remove "statusptr" argument. Adjust. Return a
6553 pid instead of a signal.
6554 (attach_inferior): Remove "status" and "signal" parameters.
6556 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
6558 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
6559 (handle_v_requests, myresume): Remove "status" and "signal"
6561 (handle_status): New.
6562 (main): Delete local `status'. Adjust.
6563 * remote-utils.c: Include target.h.
6564 (prepare_resume_reply): Change prototype to take a
6565 target_waitstatus. Adjust.
6567 * linux-low.c (linux_wait): Adjust to new target_ops->wait
6569 * spu-low.c (spu_wait): Adjust.
6570 * win32-low.c (enum target_waitkind, struct target_waitstatus):
6572 (win32_wait): Adjust.
6574 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6576 * target.h (struct thread_resume): Delete leave_stopped member.
6577 (struct target_ops): Add a `n' argument to the `resume' callback.
6578 * server.c (start_inferior): Adjust.
6579 (handle_v_cont, myresume): Adjust.
6580 * linux-low.c (check_removed_breakpoint): Adjust to resume
6581 interface change, and to removed leave_stopped field.
6582 (resume_ptr): Delete.
6583 (struct thread_resume_array): New.
6584 (linux_set_resume_request): Add new `arg' parameter. Adjust to
6585 resume interface change.
6586 (linux_continue_one_thread, linux_queue_one_thread)
6587 (resume_status_pending_p): Check if the resume field is NULL
6588 instead of checking the leave_stopped member.
6589 (linux_resume): Adjust to the target resume interface change.
6590 * spu-low.c (spu_resume): Adjust to the target resume interface
6592 * win32-low.c (win32_detach, win32_resume): Ditto.
6594 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6596 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
6598 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
6600 (linux_continue_one_thread): Only preserve the stepping flag if
6601 there's a pending breakpoint.
6603 2009-03-31 Pedro Alves <pedro@codesourcery.com>
6605 * server.c (main): After the inferior having exited, call
6606 remote_close before exiting gdbserver.
6608 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
6610 Fix size of FPSCR in Power 7 processors.
6611 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
6612 (PPC_FEATURE_HAS_DFP): New #define.
6613 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
6616 2009-03-23 Pedro Alves <pedro@codesourcery.com>
6618 * server.c (handle_query) Whitespace and formatting.
6620 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6622 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
6623 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
6624 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
6625 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
6626 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
6627 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
6628 Makefile.in, configure.ac: Fix whitespace throughout.
6629 * configure: Regenerate.
6631 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6633 * inferiors.c (find_inferior): Make it safe for the callback
6634 function to delete the currently iterated inferior.
6636 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6638 * Makefile.in (linuw_low_h): Move higher.
6639 (thread-db.o): Depend on $(linux_low_h).
6641 2009-03-17 Pedro Alves <pedro@codesourcery.com>
6643 Rename "process" to "lwp" throughout.
6645 * linux-low.c (all_processes): Rename to...
6646 (all_lwps): ... this.
6647 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
6648 (add_process): Rename to ...
6649 (add_lwp): ... this. Adjust.
6650 (linux_create_inferior): Adjust.
6651 (linux_attach_lwp): Adjust.
6652 (linux_attach): Adjust.
6653 (linux_kill_one_process): Rename to ...
6654 (linux_kill_one_lwp): ... this. Adjust.
6655 (linux_kill): Adjust.
6656 (linux_detach_one_process): Rename to ...
6657 (linux_detach_one_lwp): ... this. Adjust.
6658 (linux_detach): Adjust.
6659 (check_removed_breakpoint): Adjust.
6660 (status_pending_p): Adjust.
6661 (linux_wait_for_process): Rename to ...
6662 (linux_wait_for_lwp): ... this. Adjust.
6663 (linux_wait_for_event): Adjust.
6664 (send_sigstop): Adjust.
6665 (wait_for_sigstop): Adjust.
6666 (stop_all_processes): Rename to ...
6667 (stop_all_lwps): ... this.
6668 (linux_resume_one_process): Rename to ...
6669 (linux_resume_one_lwp): ... this. Adjust.
6670 (linux_set_resume_request, linux_continue_one_thread)
6671 (linux_queue_one_thread, resume_status_pending_p)
6672 (usr_store_inferior_registers, regsets_store_inferior_registers)
6673 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
6675 * linux-low.h (get_process): Rename to ...
6676 (get_lwp): ... this. Adjust.
6677 (get_thread_process): Rename to ...
6678 (get_thread_lwp): ... this. Adjust.
6679 (get_process_thread): Rename to ...
6680 (get_lwp_thread): ... this. Adjust.
6681 (struct process_info): Rename to ...
6682 (struct lwp_info): ... this.
6683 (all_processes): Rename to ...
6684 (all_lwps): ... this.
6685 * proc-service.c (ps_lgetregs): Adjust.
6686 * thread-db.c (thread_db_create_event, find_one_thread)
6687 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
6689 2009-03-14 Pedro Alves <pedro@codesourcery.com>
6691 * server.c (handle_query): Handle "qAttached".
6693 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
6695 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
6696 GPLv3, update license URL.
6698 2009-03-01 Doug Evans <dje@google.com>
6700 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
6701 (server_h): Add gdb_signals.h.
6702 (signals.o): Update.
6703 * server.h (target_signal_from_host,target_signal_to_host_p)
6704 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
6706 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
6708 * remote-utils.c (getpkt): Also generate remote-debug
6709 information if noack_mode is set.
6711 2009-02-06 Pedro Alves <pedro@codesourcery.com>
6713 * server.c (handle_query): Report qXfer:siginfo:read and
6714 qXfer:siginfo:write as supported and handle them.
6715 * target.h (struct target_ops) <qxfer_siginfo>: New field.
6716 * linux-low.c (linux_xfer_siginfo): New.
6717 (linux_target_ops): Set it.
6719 2009-01-26 Pedro Alves <pedro@codesourcery.com>
6721 * server.c (gdbserver_usage): Mention --remote-debug.
6722 (main): Accept '--remote-debug' switch.
6724 2009-01-18 Doug Evans <dje@google.com>
6726 * regcache.c (new_register_cache): No need to check result of xcalloc.
6727 * server.c (handle_search_memory): Back out calls to xmalloc,
6728 result is checked and error is returned to user upon failure.
6729 (handle_query): Ditto. Add more checks for result of malloc.
6730 (handle_v_cont): Check result of malloc, report error back to
6732 (handle_v_run): Ditto. Call freeargv.
6733 * server.h (freeargv): Declare.
6734 * utils.c (freeargv): New fn.
6736 2009-01-15 Doug Evans <dje@google.com>
6738 * gdbreplay.c (perror_with_name): Make arg const char *.
6739 * server.h (target_signal_to_name): Make return type const char *.
6740 * thread-db.c (thread_db_err_str): Make return type const char *.
6741 * utils.c (perror_with_name): Make arg const char *.
6743 2009-01-14 Pedro Alves <pedro@codesourcery.com>
6745 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
6746 when handling a EXIT_PROCESS_DEBUG_EVENT.
6748 2009-01-06 Joel Brobecker <brobecker@adacore.com>
6750 * gdbreplay.c (gdbreplay_version): Update copyright year.
6751 * server.c (gdbserver_version): Likewise.
6753 2009-01-05 Doug Evans <dje@google.com>
6755 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
6756 (handle_extended_wait): Improve comment.
6758 2008-12-13 Doug Evans <dje@google.com>
6760 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
6761 * server.h (ATTR_MALLOC): New macro.
6762 (xmalloc,xcalloc,xstrdup): Declare.
6763 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
6764 * inferiors.c: Ditto.
6765 * linux-low.c: Ditto.
6766 * mem-break.c: Ditto.
6767 * regcache.c: Ditto.
6768 * remote-utils.c: Ditto.
6771 * win32-low.c: Ditto.
6773 2008-12-12 Doug Evans <dje@google.com>
6775 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
6776 in debugging printf.
6778 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
6780 2008-12-09 Doug Evans <dje@google.com>
6782 * linux-low.h (struct process_info): Delete member tid, unused.
6783 * thread-db.c (find_one_thread): Update.
6784 (maybe_attach_thread): Update.
6786 2008-12-02 Pedro Alves <pedro@codesourcery.com>
6788 * target.h (struct target_ops): Add qxfer_osdata member.
6789 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
6791 (linux_qxfer_osdata): New functions.
6792 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
6794 * server.c (handle_query): Handle "qXfer:osdata:read:".
6795 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
6796 (buffer_xml_printf): New functions.
6797 * server.h (struct buffer): New.
6798 (buffer_grow_str, buffer_grow_str0): New macros.
6799 (buffer_grow, buffer_free, buffer_init, buffer_finish)
6800 (buffer_xml_printf): Declare.
6802 2008-11-24 Doug Evans <dje@google.com>
6804 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
6806 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
6808 * server.c (handle_v_run): Always use the supplied argument list.
6810 2008-11-19 Bob Wilson <bob.wilson@acm.org>
6812 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
6813 (xtensa_regmap_table): Add entry for scompare1.
6815 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
6817 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
6818 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
6819 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
6820 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
6821 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
6822 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
6823 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
6824 XML target descriptions.
6825 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
6826 when inferior is running on an ISA 2.05 or later processor. Add
6827 special case to return offset for full 64-bit slot of FPSCR when
6830 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
6832 * Makefile.in (SFILES, clean): Added sparc64 files.
6833 (reg-sparc64.o, reg-sparc64.c): New.
6834 * configure.srv (sparc*-*-linux*): New configuration.
6835 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
6836 syscall arguments for SPARC.
6837 (regsets_store_inferior_registers): Likewise.
6838 * linux-sparc-low.c: New file.
6840 2008-10-21 Doug Evans <dje@google.com>
6842 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
6843 (READLINE_DIR,READLINE_DEP): Delete.
6844 (INTERNAL_CFLAGS): Update.
6845 (LINTFLAGS): Update.
6847 2008-10-10 Pedro Alves <pedro@codesourcery.com>
6849 * server.c (handle_v_run): If GDB didn't specify an argv, use the
6850 whole argv from the last run, not just argv[0].
6852 2008-09-08 Pedro Alves <pedro@codesourcery.com>
6854 * regcache.c (new_register_cache): Return NULL if the register
6855 cache size isn't known yet.
6856 (free_register_cache): Avoid dereferencing a NULL regcache.
6858 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6860 * configure.srv: Merge MIPS and MIPS64.
6862 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
6864 * Makefile.in (uninstall): Apply $(EXEEXT) too.
6866 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
6868 * Makefile.in: Add required vsx dependencies.
6870 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
6871 Declare init_registers_powerpc_vsx32l.
6872 Declare init_registers_powerpc_vsx64l.
6873 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
6874 (ppc_arch_setup): Check for VSX in hwcap.
6875 (ppc_fill_vsxregset): New function.
6876 (ppc_store_vsxregset): New function.
6877 Add new VSX entry in regset_info target_regsets.
6879 * configure.srv: Add new VSX dependencies.
6881 2008-08-12 Pedro Alves <pedro@codesourcery.com>
6883 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
6884 (remote_open): Set or clear transport_is_reliable.
6885 (putpkt_binary): Don't expect acks in noack mode.
6886 (getpkt): Don't send ack/nac in noack mode.
6887 * server.c (handle_general_set): Handle QStartNoAckMode.
6888 (handle_query): If connected by tcp pass QStartNoAckMode+ in
6890 (main): Reset noack_mode on every connection.
6891 * server.h (noack_mode): Declare.
6893 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6895 * Makefile.in (GDBREPLAY_OBS): New variable.
6896 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
6898 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
6899 Daniel Jacobowitz <dan@codesourcery.com>
6901 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
6902 (usr_store_inferior_registers): Likewise.
6903 (regsets_store_inferior_registers): Likewise.
6905 2008-07-31 Rolf Jansen <rj@surtec.com>
6906 Pedro Alves <pedro@codesourcery.com>
6908 * configure.ac: Check for memmem declaration.
6909 * server.c [HAVE_MALLOC_H]: Include malloc.h.
6910 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
6911 (disable_packet_qfThreadInfo): Unconditionally compile.
6912 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
6913 * configure, config.in: Regenerate.
6915 2008-07-28 Doug Kwan <dougkwan@google.com>
6917 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
6918 (linux_write_memory): Remove declaration of errno.
6920 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
6922 * linux-low.c (handle_extended_wait): Do not use "status"
6923 variable uninitialized.
6925 2008-07-07 Pedro Alves <pedro@codesourcery.com>
6927 * server.c (handle_v_attach): Inhibit reporting dll changes.
6929 2008-06-27 Pedro Alves <pedro@codesourcery.com>
6931 * remote-utils.c (prepare_resume_reply): If requested, don't
6932 output "thread:TID" in the T stop reply.
6934 * server.c (disable_packet_vCont, disable_packet_Tthread)
6935 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
6936 (handle_query): If requested, disable support for qC, qfThreadInfo
6938 (handle_v_requests): If requested, disable support for vCont.
6939 (gdbserver_show_disableable): New.
6940 (main): Handle --disable-packet and --disable-packet=LIST.
6942 * server.h (disable_packet_vCont, disable_packet_Tthread)
6943 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
6945 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
6947 * server.c (gdbserver_usage): Mention --version.
6949 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
6951 * Makefile.in (gdbreplay.o): New rule.
6953 2008-06-06 Joseph Myers <joseph@codesourcery.com>
6955 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
6956 message, not gdbserver.
6958 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
6959 Nathan Sidwell <nathan@codesourcery.com>
6960 Joseph Myers <joseph@codesourcery.com>
6962 * acinclude.m4: Include ../../config/acx.m4.
6963 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
6964 * configure, config.in: Regenerate.
6965 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
6966 * server.c (gdbserver_version): Print PKGVERSION.
6967 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
6968 (main): Adjust gdbserver_usage calls.
6969 * gdbreplay.c (version, host_name): Add declarations.
6970 (gdbreplay_version, gdbreplay_usage): New.
6971 (main): Accept --version and --help options.
6973 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
6975 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
6976 (arm_breakpoint_at): Handle Thumb.
6977 (the_low_target): Add comment.
6979 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
6981 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
6983 2008-05-09 Doug Evans <dje@google.com>
6985 * server.h (decode_search_memory_packet): Declare.
6986 * remote-utils.c (decode_search_memory_packet): New fn.
6987 * server.c (handle_search_memory_1): New fn.
6988 (handle_search_memory): New fn.
6989 (handle_query): Process qSearch:memory packets.
6991 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6993 * regcache.c (registers_length): Remove.
6994 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
6995 full register packet.
6996 * regcache.h (registers_length): Remove prototype.
6997 * server.h (PBUFSIZ): Define to 16384.
6999 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
7001 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
7002 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
7003 powerpc-64l.o, and powerpc-altivec64l.o.
7004 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
7005 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
7006 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
7007 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
7008 rs6000/power-linux.xml, and rs6000/power64-linux.xml
7011 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
7012 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
7013 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
7014 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
7015 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
7016 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
7017 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
7018 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
7019 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
7020 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
7023 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
7024 (init_registers_powerpc_32l): ... this new prototype.
7025 (init_registers_powerpc_32): Remove, replace by ...
7026 (init_registers_powerpc_altivec32l): ... this new prototype.
7027 (init_registers_powerpc_e500): Remove, replace by ...
7028 (init_registers_powerpc_e500l): ... this new prototype.
7029 (init_registers_ppc64): Remove, replace by ...
7030 (init_registers_powerpc_64l): ... this new prototype.
7031 (init_registers_powerpc_64): Remove, replace by ...
7032 (init_registers_powerpc_altivec64l): ... this new prototype.
7033 (ppc_num_regs): Set to 73.
7034 (PT_ORIG_R3, PT_TRAP): Define if necessary.
7035 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
7036 (ppc_cannot_store_register): Handle orig_r3 and trap.
7037 (ppc_arch_setup): Update init_registers_... calls.
7038 (ppc_fill_gregset): Handle orig_r3 and trap.
7040 * inferiors.c (clear_inferiors): Reset current_inferior.
7042 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
7044 * acinclude.m4: Add override.m4.
7045 * configure: Regenerate.
7047 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7049 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
7050 initial call to init_register_ppc64.
7052 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7054 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
7055 single powerpc*-*-linux* case.
7056 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
7058 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
7060 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
7061 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
7063 * linux-ppc-low.c: Include <elf.h>.
7064 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
7065 (ppc_hwcap): New global variable.
7066 (ppc_regmap): Remove __SPE__ #ifdef sections.
7067 (ppc_regmap_e500): New global variable.
7068 (ppc_cannot_store_register): Update __SPE__ special case.
7069 (ppc_get_hwcap): New function.
7070 (ppc_arch_setup): Use it to determine whether inferior supports
7071 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
7072 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
7073 Do not access registers if target does not support AltiVec.
7074 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
7075 Do not access registers if target does not support SPE.
7076 (target_regsets): Unconditionally include AltiVec and SPE regsets.
7078 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
7080 * linux-low.c (disabled_regsets, num_regsets): New.
7081 (use_regsets_p): Delete.
7082 (linux_wait_for_process): Clear disabled_regsets.
7083 (regsets_fetch_inferior_registers): Check and set it.
7084 (regsets_store_inferior_registers): Likewise.
7085 (linux_fetch_registers, linux_store_registers): Do not use
7087 (initialize_low): Allocate disabled_regsets.
7089 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
7091 * Makefile.in (LIBOBJS): New.
7093 (memmem.o): New rule.
7094 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
7095 * configure: Regenerated.
7097 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
7099 * server.c (handle_query): Never return "unsupported" for
7100 qXfer:features:read queries.
7102 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
7104 * server.c (get_features_xml): Fix inverted condition.
7105 (handle_query): Always support qXfer:feature:read.
7107 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
7109 * server.c (wrapper_argv): New.
7110 (start_inferior): Handle wrapper_argv. If set, expect an extra
7112 (gdbserver_usage): Document --wrapper.
7113 (main): Parse --wrapper.
7115 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7117 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
7118 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
7119 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
7120 (ppc_set_pc): Likewise.
7121 (ppc_arch_setup): New function.
7122 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
7123 of collect_register.
7124 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
7126 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7128 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
7129 instead of linux-ppc64-low.o.
7130 * linux-ppc64-low.c: Remove file.
7131 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
7132 (linux-ppc64-low.o): Remove rule.
7134 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
7135 (init_registers_powerpc_64): Likewise.
7136 (ppc_regmap): Conditionally define depending on __powerpc64__.
7137 (ppc_cannot_store_register): Do not special-case "fpscr" when
7138 compiled on __powerpc64__.
7139 (ppc_collect_ptrace_register): New function.
7140 (ppc_supply_ptrace_register): New function.
7141 (ppc_breakpoint): Change type to "unsigned int".
7142 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
7143 (the_low_target): Conditionally provide initializers for the
7144 arch_setup member depending on __powerpc64__. Install
7145 collect_ptrace_register and supply_ptrace_register members.
7147 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7149 * regcache.h (gdbserver_xmltarget): Add extern declaration.
7150 * server.c (gdbserver_xmltarget): Define.
7151 (get_features_xml): Use it to replace "target.xml" and arch_string.
7153 * configure.srv: Remove srv_xmltarget. Add XML files that were
7154 mentioned there to srv_xmlfiles instead. Remove conditional tests
7155 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
7156 srv_xmlfiles and srv_regobj to include all possible choices.
7157 * configure.ac (srv_xmltarget): Remove.
7158 (srv_xmlfiles): Do not add "target.xml".
7159 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
7160 checks for supplementary target information.
7161 * configure: Regenerate.
7162 * Makefile.in (XML_TARGET): Remove.
7163 (target.xml): Remove rule.
7164 (clean): Do not clean up target.xml.
7165 (.PRECIOUS): Do not mention target.xml.
7167 * target.h (struct target_ops): Remove arch_string member.
7168 * linux-low.c (linux_arch_string): Remove.
7169 (linux_target_ops): Remove arch_string initializer.
7170 * linux-low.h (struct linux_target_ops): Remove arch_string member.
7171 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
7172 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
7173 * spu-low.c (spu_arch_string): Remove.
7174 (spu_target_ops): Remove arch_string initializer.
7175 * win32-low.c (win32_arch_string): Remove.
7176 (win32_target_ops): Remove arch_string initializer.
7177 * win32-low.h (struct win32_target_ops): Remove arch_string member.
7178 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
7179 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
7181 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7183 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
7184 by collect_ptrace_register and supply_ptrace_register hooks.
7185 * linux-low.c (fetch_register): Use supply_ptrace_register callback
7186 instead of checking for the_low_target.left_pad_xfer.
7187 (usr_store_inferior_registers): Use collect_ptrace_register callback
7188 instead of checking for the_low_target.left_pad_xfer.
7190 * linux-s390-low.c (s390_collect_ptrace_register): New function.
7191 (s390_supply_ptrace_register): Likewise.
7192 (s390_fill_gregset): Call s390_collect_ptrace_register.
7193 (the_low_target): Update.
7195 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
7196 (ppc_supply_ptrace_register): Likewise.
7197 (the_low_target): Update.
7199 * linux-i386-low.c (the_low_target): Update.
7200 * linux-x86-64-low.c (the_low_target): Update.
7202 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7204 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
7205 reg-s390.o and reg-s390x.o.
7207 * linux-low.c (new_inferior): New global variable.
7208 (linux_create_inferior, linux_attach): Set it.
7209 (linux_wait_for_process): Call the_low_target.arch_setup after the
7210 target has stopped for the first time.
7211 (initialize_low): Do not call the_low_target.arch_setup.
7213 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
7214 (s390_set_pc): Likewise.
7215 (s390_arch_setup): New function.
7216 (the_low_target): Use s390_arch_setup as arch_setup routine.
7218 * regcache.c (realloc_register_cache): New function.
7219 (set_register_cache): Call it for each existing regcache.
7221 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7223 * server.h (init_registers): Remove prototype.
7225 * linux-low.h (struct linux_target_ops): Add arch_setup field.
7226 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
7227 instead of init_registers ().
7228 * linux-arm-low.c (init_registers_arm): Add prototype.
7229 (init_registers_arm_with_iwmmxt): Likewise.
7230 (the_low_target): Add initializer for arch_setup field.
7231 * linux-cris-low.c (init_registers_cris): Add prototype.
7232 (the_low_target): Add initializer for arch_setup field.
7233 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
7234 (the_low_target): Add initializer for arch_setup field.
7235 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
7236 (the_low_target): Add initializer for arch_setup field.
7237 * linux-ia64-low.c (init_registers_ia64): Add prototype.
7238 (the_low_target): Add initializer for arch_setup field.
7239 * linux-m32r-low.c (init_registers_m32r): Add prototype.
7240 (the_low_target): Add initializer for arch_setup field.
7241 * linux-m68k-low.c (init_registers_m68k): Add prototype.
7242 (the_low_target): Add initializer for arch_setup field.
7243 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
7244 (init_registers_mips64_linux): Likewise.
7245 (the_low_target): Add initializer for arch_setup field.
7246 * linux-ppc-low.c (init_registers_ppc): Add prototype.
7247 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
7248 (the_low_target): Add initializer for arch_setup field.
7249 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
7250 (init_registers_powerpc_64): Likewise.
7251 (the_low_target): Add initializer for arch_setup field.
7252 * linux-s390-low.c (init_registers_s390): Add prototype.
7253 (init_registers_s390x): Likewise.
7254 (the_low_target): Add initializer for arch_setup field.
7255 * linux-sh-low.c (init_registers_sh): Add prototype.
7256 (the_low_target): Add initializer for arch_setup field.
7257 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
7258 (the_low_target): Add initializer for arch_setup field.
7259 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
7260 (the_low_target): Add initializer for arch_setup field.
7262 * win32-low.h (struct win32_target_ops): Add arch_setup field.
7263 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
7264 instead of init_registers ().
7265 * win32-arm-low.c (init_registers_arm): Add prototype.
7266 (the_low_target): Add initializer for arch_setup field.
7267 * win32-i386-low.c (init_registers_i386): Add prototype.
7268 (the_low_target): Add initializer for arch_setup field.
7270 * spu-low.c (init_registers_spu): Add prototype.
7271 (initialize_low): Call initialie_registers_spu () instead of
7272 initialize_registers ().
7274 2008-02-19 Pedro Alves <pedro@codesourcery.com>
7276 * server.c (handle_v_requests): When handling the vRun and vAttach
7277 packets, if already debugging a process, don't kill it. Return an
7280 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
7282 * server.c (handle_query): Correct length check.
7284 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
7286 * win32-low.c (do_initial_child_stuff): Add process handle
7287 parameter. Set current_process_handle and current_process_id from the
7288 parameters. Clear globals.
7289 (win32_create_inferior): Don't set current_process_handle and
7290 current_process_id here. Instead pass them on the call to
7291 do_initial_child_stuff.
7292 (win32_attach): Likewise.
7293 (win32_clear_inferiors): New.
7294 (win32_kill): Don't close the current process handle or the
7295 current thread handle here. Instead call win32_clear_inferiors.
7296 (win32_detach): Don't open a new handle to the process. Call
7297 win32_clear_inferiors.
7298 (win32_join): Don't rely on current_process_handle; open a new
7299 handle using the process id.
7300 (win32_wait): Call win32_clear_inferiors when the inferior process
7303 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
7305 * server.c (monitor_show_help): Add "exit".
7307 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
7309 * Makefile.in (SFILES): Add linux-xtensa-low.c.
7310 (clean): Add reg-xtensa.c.
7311 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
7312 * configure.srv (xtensa*-*-linux*) New target.
7313 * linux-xtensa-low.c: New.
7314 * xtensa-xtregs.c: New.
7316 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
7318 * hostio.c: Don't include errno.h.
7319 (errno_to_fileio_errno): Move to hostio-errno.
7320 * hostio.c: (hostio_error): Remove the error parameter. Defer the
7321 error number outputting to the target->hostio_last_error callback.
7322 (hostio_packet_error): Use FILEIO_EINVAL directly.
7323 (handle_open, handle_pread, hostio_error, handle_unlink): Update
7324 calls to hostio_error.
7325 * hostio-errno.c: New.
7326 * server.h (hostio_last_error_from_errno): Declare.
7327 * target.h (target_ops): Add hostio_last_error member.
7328 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
7329 as hostio_last_error handler.
7330 * spu-low.c (spu_target_ops): Likewise.
7331 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
7332 (wince_hostio_last_error): New functions.
7333 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
7334 as hostio_last_error handler.
7335 (win32_target_ops) [!_WIN32_WCE]: Register
7336 hostio_last_error_from_errno as hostio_last_error handler.
7337 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
7338 (hostio-errno.o): New rule.
7339 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
7340 * configure.srv (srv_hostio_err_objs): New variable. Default to
7342 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
7343 * configure: Regenerate.
7345 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7347 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
7348 (linux_kill, linux_detach): Clean up the process list.
7349 * remote-utils.c (remote_open): Improve port number parsing.
7350 (putpkt_binary, input_interrupt): Only send interrupts if the target
7352 * server.c (extended_protocol): Make static.
7353 (attached): Define earlier.
7354 (exit_requested, response_needed, program_argv): New variables.
7355 (target_running): New.
7356 (start_inferior): Clear attached here.
7357 (attach_inferior): Set attached here.
7358 (require_running): Define.
7359 (handle_query): Use require_running and target_running. Implement
7361 (handle_v_attach, handle_v_run): New.
7362 (handle_v_requests): Use require_running. Handle vAttach and vRun.
7363 (gdbserver_usage): Update.
7364 (main): Redo argument parsing. Handle --debug and --multi. Handle
7365 --attach along with other options or after the port. Save
7366 program_argv. Support no initial program. Resynchronize
7367 communication with GDB after an error. Handle "monitor exit".
7368 Use require_running and target_running. Always allow the extended
7369 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
7370 restart in extended mode.
7371 * README: Refer to the GDB manual. Update --attach usage.
7373 2007-12-20 Andreas Schwab <schwab@suse.de>
7375 * linux-low.c (STACK_SIZE): Define.
7376 (linux_tracefork_child): Use it. Use __clone2 on ia64.
7377 (linux_test_for_tracefork): Likewise.
7379 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
7381 * linux-low.c (linux_wait_for_event): Update messages. Do not
7382 reinsert auto-delete breakpoints.
7383 * mem-break.c (struct breakpoint): Change return type of handler to
7385 (set_breakpoint_at): Update handler type.
7386 (reinsert_breakpoint_handler): Return 1 instead of calling
7388 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
7390 (check_breakpoints): Delete auto-delete breakpoints and return 2.
7391 * mem-break.h (set_breakpoint_at): Update handler type.
7392 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
7393 * win32-low.c (auto_delete_breakpoint): New.
7394 (get_child_debug_event): Use it.
7396 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
7398 * configure.ac: Check for pread and pwrite.
7399 * hostio.c (handle_pread): Fall back to lseek and read.
7400 (handle_pwrite): Fall back to lseek and write.
7401 * config.in, configure: Regenerated.
7403 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
7405 * server.c (myresume): Add own_buf argument.
7406 (main): Update calls.
7408 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
7410 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
7411 * remote-utils.c (remote_open): Do not call disable_async_io.
7412 (block_async_io): Delete.
7413 (unblock_async_io): Make static.
7414 (initialize_async_io): New.
7415 * server.c (handle_v_cont): Handle async I/O here.
7416 (myresume): Likewise. Move other common resume tasks here...
7417 (main): ... from here. Call initialize_async_io. Disable async
7418 I/O before the main loop.
7419 * server.h (initialize_async_io): Declare.
7420 (block_async_io, unblock_async_io): Delete prototypes.
7421 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
7423 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
7425 * remote-utils.c (readchar): Allow binary data in received messages.
7427 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7429 * win32-low.c (attaching): New global.
7430 (win32_create_inferior): Clear the `attaching' global.
7431 (win32_attach): Set the `attaching' global.
7432 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
7433 attaching. Only set a breakpoint at the entry point if not
7436 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7438 * server.c (main): Don't report dll events on the initial
7439 connection on attaches.
7441 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7443 * server.c (main): Relax numerical bases supported for the pid of
7444 the --attach command line argument.
7446 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7448 * win32-low.c (win32_attach): Call OpenProcess before
7449 DebugActiveProcess, not after. Add last error output to error
7452 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7454 * win32-low.c (win32_get_thread_context)
7455 (win32_set_thread_context): New functions.
7456 (thread_rec): Use win32_get_thread_context.
7457 (continue_one_thread, win32_resume): Use win32_set_thread_context.
7458 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
7461 2007-12-03 Leo Zayas
7462 Pedro Alves <pedro_alves@portugalmail.pt>
7464 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
7466 (child_add_thread): Minor cleanup.
7467 (child_continue): Resume artificially suspended threads before
7468 calling ContinueDebugEvent.
7469 (suspend_one_thread): New.
7470 (fake_breakpoint_event): New.
7471 (get_child_debug_event): Change return type to int. Check here if
7472 gdb sent an interrupt request. If a soft interrupt was requested,
7473 fake a breakpoint event. Return 0 if there is no event to handle,
7475 (win32_wait): Don't check here if gdb sent an interrupt request.
7476 Ensure there is a valid event to handle.
7477 (win32_request_interrupt): Add soft interruption method as last
7480 2007-12-03 Leo Zayas
7481 Pedro Alves <pedro_alves@portugalmail.pt>
7483 * win32-low.h (win32_thread_info): Add descriptions to the
7484 structure members. Replace `suspend_count' counter by a
7486 * win32-low.c (thread_rec): Update condition of when to get the
7487 context from the inferior. Rely on ContextFlags being set if it
7488 has already been retrieved. Only suspend the inferior thread if
7489 we haven't already. Warn if that fails.
7490 (continue_one_thread): s/suspend_count/suspended/. Only call
7491 ResumeThread once. Warn if that fails.
7493 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
7495 * win32-low.c (win32_wait): Don't read from the inferior when it
7498 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
7500 * Makefile.in (win32_low_h): New variable.
7501 (win32-low.o): Add dependency on $(win32_low_h).
7502 (win32-arm-low.o, win32-i386-low.o): New rules.
7504 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
7506 * hostio.c: Correct copyright year.
7508 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
7510 * Makefile.in (OBS): Add hostio.o.
7511 (hostio.o): New rule.
7512 * server.h (handle_vFile): Declare.
7513 * hostio.c: New file.
7514 * server.c (handle_v_requests): Take packet_len and new_packet_len
7515 for binary packets. Call handle_vFile.
7516 (main): Update call to handle_v_requests.
7518 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
7520 * linux-low.c: Include <sched.h>.
7522 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
7524 * linux-low.c (linux_tracefork_grandchild): New.
7525 (linux_tracefork_child): Use clone.
7526 (linux_test_for_tracefork): Use clone; allocate and free a stack.
7528 2007-10-31 Joel Brobecker <brobecker@adacore.com>
7530 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
7532 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
7534 * linux-low.c (handle_extended_wait): Handle unexpected signals.
7536 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
7538 * inferiors.c (change_inferior_id): Delete.
7539 (add_pid_to_list, pull_pid_from_list): New.
7540 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
7541 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
7542 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
7543 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
7544 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
7545 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
7546 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
7547 (using_threads): Always set to 1.
7548 (handle_extended_wait): New.
7549 (add_process): Do not set TID.
7550 (linux_create_inferior): Set must_set_ptrace_flags.
7551 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
7552 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
7553 (linux_thread_alive): Rename TID argument to LWPID.
7554 (linux_wait_for_process): Handle unknown processes. Do not use TID.
7555 (linux_wait_for_event): Do not use TID or check using_threads. Update
7556 call to dead_thread_notify. Call handle_extended_wait.
7557 (linux_create_inferior): Use PTRACE_SETOPTIONS.
7558 (send_sigstop): Delete sigstop_sent.
7559 (wait_for_sigstop): Avoid TID.
7560 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
7561 (linux_test_for_tracefork): New.
7562 (linux_lookup_signals): Use thread_db_active and
7563 linux_supports_tracefork_flag.
7564 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
7565 * linux-low.h (get_process_thread): Avoid TID.
7566 (struct process_ifo): Move thread_known and tid to the end. Remove
7568 (linux_attach_lwp, thread_db_init): Update prototypes.
7569 * server.h (change_inferior_id): Delete prototype.
7570 (add_pid_to_list, pull_pid_from_list): New prototypes.
7571 * thread-db.c (thread_db_use_events): New.
7572 (find_first_thread): Rename to...
7573 (find_one_thread): ...this. Update callers and messages. Do not
7574 call fatal. Check thread_db_use_events. Do not call
7575 change_inferior_id or new_thread_notify.
7576 (maybe_attach_thread): Update. Do not call new_thread_notify.
7577 (thread_db_init): Set thread_db_use_events. Check use_events.
7578 * utils.c (fatal, warning): Correct message prefix.
7580 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
7582 * Makefile.in (clean): Remove new files.
7583 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
7584 (powerpc-64.o, powerpc-64.c): New rules.
7585 * configure.srv: Use alternate register sets for powerpc64-*-linux*
7586 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
7588 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
7590 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
7591 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
7592 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
7593 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
7594 (target_regsets): Add AltiVec and SPE register sets.
7595 * configure.ac: Check for AltiVec and SPE.
7596 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
7597 (ppc_fill_vrregset, ppc_store_vrregset): New.
7598 (target_regsets): Add AltiVec register set.
7599 * configure: Regenerated.
7601 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
7603 * linux-low.c (O_LARGEFILE): Define.
7604 (linux_read_memory): Use /proc/PID/mem.
7605 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
7606 * configure, config.in: Regenerated.
7608 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7610 * linux-low.c (linux_wait_for_event): Do not pass signals while
7613 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
7615 * win32-low.c (create_process): New.
7616 (win32_create_inferior): Use create_process instead of
7617 CreateProcess. If create_process failed retry appending an ".exe"
7618 suffix. Store the GetLastError result immediatelly after
7619 create_process calls and use it on the call to error.
7621 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
7623 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
7625 2007-08-23 Joel Brobecker <brobecker@adacore.com>
7627 * configure.ac: Switch license to GPLv3.
7629 2007-08-01 Michael Snyder <msnyder@access-company.com>
7631 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
7633 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
7635 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
7637 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
7638 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
7639 CloseToolhelp32Snapshot.
7640 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
7641 CloseToolhelp32Snapshot.
7643 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
7645 * server.c (main): Check for inferior exit before main loop.
7647 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
7649 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
7650 instead of on tmp_desc.
7652 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
7653 Daniel Jacobowitz <dan@codesourcery.com>
7655 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
7656 (add_thread): Minor cleanups.
7657 (clear_inferiors): Move lower in the file. Clear the DLL
7659 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
7660 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
7661 (xml_escape_text): New.
7662 * server.c (handle_query): Handle qXfer:libraries:read. Report it
7664 (handle_v_cont): Report errors.
7665 (gdbserver_version): Update.
7666 (main): Correct size of own_buf. Do not report initial DLL events.
7667 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
7668 (unloaded_dll, xml_escape_text): New.
7669 * win32-low.c (enum target_waitkind): Update comments.
7670 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
7671 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
7672 (win32_EnumProcessModules, win32_GetModuleInformation)
7673 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
7674 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
7675 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
7676 (win32_Module32First, win32_Module32Next, load_toolhelp)
7677 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
7678 (get_child_debug_event): Handle DLL events.
7679 (win32_wait): Likewise.
7681 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7683 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
7684 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
7686 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7688 * win32-low.c (handle_output_debug_string): Ignore event if not
7691 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7693 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
7695 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
7697 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
7699 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
7701 * inferiors.c (change_inferior_id): Add comment.
7702 * linux-low.c (check_removed_breakpoint): Add an early
7703 prototype. Improve debug output.
7704 (linux_attach): Doc update.
7705 (linux_detach_one_process, linux_detach): Clean up before releasing
7707 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
7708 * linux-low.h (struct process_info): Doc improvement.
7709 * mem-break.c (delete_all_breakpoints): New.
7710 * mem-break.h (delete_all_breakpoints): New prototype.
7711 * thread-db.c (find_first_thread): New.
7712 (thread_db_create_event): Call it instead of
7713 thread_db_find_new_threads. Clean up unused variables.
7714 (maybe_attach_thread): Remove first thread handling.
7715 (thread_db_find_new_threads): Use find_first_thread.
7716 (thread_db_get_tls_address): Likewise.
7718 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
7720 * thread-db.c (thread_db_find_new_threads): Add prototype.
7721 (thread_db_create_event): Check for the main thread before adding
7723 (maybe_attach_thread): Only enable event reporting if TID == 0.
7724 (thread_db_get_tls_address): Check for new threads.
7726 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
7728 * linux-low.c (linux_create_inferior): Try execv before execvp.
7729 * spu-low.c (spu_create_inferior): Likewise.
7731 2007-06-13 Mike Frysinger <vapier@gentoo.org>
7733 * linux-low.c (linux_create_inferior): Change execv to execvp.
7734 * spu-low.c (spu_create_inferior): Likewies.
7736 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
7738 * Makefile.in (clean): Clean new files instead of deleted ones.
7739 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
7740 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
7742 * configure.srv: Specify XML files and new regformats for MIPS and
7744 * linux-mips-low.c (mips_num_regs): Set to only used registers.
7745 (mips_regmap): Do not fetch $0. Remove unused registers. Add
7746 an entry for the restart register.
7747 (mips_cannot_fetch_register, mips_cannot_store_register)
7748 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
7749 register names to match the XML descriptions.
7750 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
7751 restart register instead of $0.
7753 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7754 Markus Deuling <deuling@de.ibm.com>
7756 * remote-utils.c (decode_xfer_write): New function.
7757 * server.h (decode_xfer_write): Add prototype.
7758 * server.c (handle_query): Add PACKET_LEN argument. Support
7759 qXfer:spu:read and qXfer:spu:write packets.
7760 (main): Pass packet_len to handle_query.
7761 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
7762 * target.h (target_ops): Add qxfer_spu.
7764 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7766 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
7767 accessing non-seekable spufs files.
7769 2007-05-16 Markus Deuling <deuling@de.ibm.com>
7771 * server.c (handle_query): Add reply for qC packet.
7773 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7774 Leo Zayas <lerele@champenstudios@com>
7776 * server.h (check_remote_input_interrupt_request): New function.
7777 * remote_utils.c (INVALID_DESCRIPTOR): New define.
7778 (remote_desc): Initialize with INVALID_DESCRIPTOR.
7779 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
7780 (check_remote_input_interrupt_request): New function.
7781 * server.h (check_remote_input_interrupt_request): Declare.
7782 * win32-low.c (winapi_DebugBreakProcess,
7783 winapi_GenerateConsoleCtrlEvent): New typedefs.
7784 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
7786 (win32_wait): Check for remote interrupt request
7787 with check_remote_input_interrupt_request.
7788 (win32_request_interrupt): New function.
7789 (win32_target_op): Set request_interrupt to win32_request_interrupt.
7791 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7793 * win32-low.c (debug_registers_changed,
7794 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
7795 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
7796 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
7797 (thread_rec): Get context using the low target.
7798 (child_add_thread): Call thread_added on the low target,
7799 which does the same thing.
7801 (do_initial_child_stuff): Remove debug registers references.
7802 Set context using the low target. Resume threads after
7803 setting the contexts.
7804 (child_continue): Remove dead variable. Remove debug
7805 registers references.
7806 (child_fetch_inferior_registers): Go through the low target.
7807 (do_child_store_inferior_registers): Remove.
7808 (child_store_inferior_registers): Go through the low target.
7809 (win32_resume): Remove debug registers references.
7810 Set context using the low target.
7811 (handle_exception): Change return type to void. Don't record
7812 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
7813 first chance exception.
7814 (get_child_debug_event): Change return type to void. Remove
7815 goto loop. Always return after waiting for debug event.
7816 (win32_wait): Convert to switch statement. Handle spurious
7819 * win32-i386-low.c (debug_registers_changed,
7820 debug_registers_used): New.
7821 (initial_stuff): Rename to ...
7822 (i386_initial_stuff): ... this. Clear debug registers
7824 (store_debug_registers): Delete.
7825 (i386_get_thread_context): New.
7826 (load_debug_registers): Delete.
7827 (i386_set_thread_context): New.
7828 (i386_thread_added): New.
7829 (single_step): Rename to ...
7830 (i386_single_step): ... this.
7831 (do_fetch_inferior_registers): Rename to ...
7832 (i386_fetch_inferior_register): ... this.
7833 (i386_store_inferior_register): New.
7834 (the_low_target): Adapt to new interface.
7836 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
7837 (arm_get_thread_context): New.
7838 (arm_set_thread_context): New.
7840 (do_fetch_inferior_registers): Rename to ...
7841 (arm_fetch_inferior_register): ... this.
7842 (arm_store_inferior_register): New.
7843 (arm_wince_breakpoint): Reimplement as unsigned long.
7844 (arm_wince_breakpoint_len): Define.
7845 (the_low_target): Adapt to new interface.
7847 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
7848 load_debug_registers. Add get_thread_context, set_thread_context,
7849 thread_added and store_inferior_register. Rename
7850 fetch_inferior_registers to fetch_inferior_register.
7851 (regptr): Remove declaration.
7853 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7855 * linux-low.c (linux_detach): Change return type to int. Return 0.
7856 * spu-low.c (spu_detach): Likewise.
7858 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7860 * target.h (target_ops): Change return type of detach to int.
7862 (join_inferior): New.
7863 * server.c (main): Don't skip detach support on mingw32.
7864 If the inferior doesn't support detaching return error.
7865 Call join_inferior instead of using waitpid.
7866 * linux-low.c (linux_join): New.
7867 (linux_target_op): Add linux_join.
7868 * spu-low.c (spu_join): New.
7869 (spu_target_ops): Add spu_join.
7870 * win32-low.c (win32_detach): Adapt to new interface.
7871 Reopen current_process_handle before detaching. Issue a child
7872 resume before detaching.
7874 (win32_target_op): Add win32_join.
7876 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7878 * win32-low.c (win32-attach): Fix return value.
7879 * target.h (target_ops): Describe ATTACH return values.
7881 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7883 * win32-low.c (GETPROCADDRESS): Define.
7884 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
7885 (winapi_DebugSetProcessKillOnExit): Likewise.
7886 (win32_create_inferior): Force usage of ansi CreateProcessA.
7887 (win32_attach): Use GETPROCADDRESS.
7888 (win32_detach): Likewise.
7890 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7892 * win32-low.c (win32_wait): Don't use WSTOPSIG.
7894 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
7896 * win32-low.c: Commit leftover changes from 2007-03-29.
7898 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7900 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
7901 fields short instead of int. Add explicit padding.
7902 (i387_cache_to_fsave): Remove unnecessary casts.
7903 (i387_fsave_to_cache): Doc fix.
7904 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
7906 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7908 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
7909 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
7911 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7913 * configure.srv (arm*-*-mingw32ce*): Move near the other
7916 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7918 * configure.ac: Add errno checking.
7919 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
7920 sys/file.h and malloc.h.
7921 (AC_CHECK_DECLS): Add perror.
7922 (srv_mingwce): Handle.
7923 * configure.srv (i[34567]86-*-cygwin*): Add
7924 win32-i386-low.o to srv_tgtobj.
7925 (i[34567]86-*-mingw*): Likewise.
7926 (arm*-*-mingw32ce*): Add case.
7927 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7928 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
7929 [__MINGW32CE__] (strerror): New function.
7930 [__MINGW32CE__] (errno): Define to GetLastError.
7931 [__MINGW32CE__] (COUNTOF): New macro.
7932 (remote_open): Remove extra close call.
7933 * mem-break.c (delete_breakpoint_at): New function.
7934 * mem-break.h (delete_breakpoint_at): Declare.
7935 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7936 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
7937 [USE_WIN32API] (read, write): Add char* casts.
7938 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
7939 * server.h: Include wincecompat.h on Windows CE.
7940 [HAVE_ERRNO_H]: Check.
7941 (perror): Declare if not declared.
7942 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
7943 (perror_with_name): Remove errno declaration.
7944 * wincecompat.h: New.
7945 * wincecompat.c: New.
7947 * win32-arm-low.c: New.
7948 * win32-i386-low.c: New.
7949 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
7950 (OUTMSG2): Make it safe.
7952 (COUNTOF): New macro.
7953 (NUM_REGS): Get it from the low target.
7954 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
7955 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
7956 (thread_rec): Let low target handle debug registers.
7957 (child_add_thread): Likewise.
7958 (child_init_thread_list): Likewise.
7959 (continue_one_thread): Likewise.
7961 (do_child_fetch_inferior_registers): Move to ...
7962 * win32-i386-low.c: ... here, and rename to ...
7963 (do_fetch_inferior_registers): ... this.
7964 * win32-low.c (child_fetch_inferior_registers):
7965 Go through the low target.
7966 (do_child_store_inferior_registers): Use regptr.
7967 (strwinerror): New function.
7968 (win32_create_inferior): Handle Windows CE.
7969 Use strwinerror instead of strerror on Windows error
7970 codes. Add program to the error output.
7971 Don't close the main thread handle on Windows CE.
7972 (win32_attach): Use coredll.dll on Windows CE.
7973 (win32_kill): Close current process and current
7975 (win32_detach): Use coredll.dll on Windows CE.
7976 (win32_resume): Let low target handle debug registers, and
7978 (handle_exception): Add/Remove initial breakpoint. Avoid
7979 non-existant WSTOPSIG on Windows CE.
7980 (win32_read_inferior_memory): Cast to remove warning.
7981 (win32_arch_string): Go through the low target.
7982 (initialize_low): Call set_breakpoint_data with the low
7983 target's breakpoint.
7984 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
7985 FOP_REGNUM, mappings): Move to ...
7986 * win32-i386-low.c: ... here.
7987 * win32-low.c (win32_thread_info): Move to ...
7988 * win32-low.h: ... here.
7989 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
7990 win32-arm-low.c and wincecompat.c.
7991 (all:): Add $EXEEXT.
7992 (install-only:): Likewise.
7993 (gdbserver:): Likewise.
7994 (gdbreplay:): Likewise.
7995 * config.in: Regenerate.
7996 * configure: Regenerate.
7998 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8000 * win32-low.c: Rename typedef thread_info to
8001 win32_thread_info throughout.
8003 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8005 * win32-i386-low.c: Rename to ...
8006 * win32-low.c: ... this.
8007 * configure.srv: Replace win32-i386-low.o with win32-low.o.
8008 * Makefile.in: Likewise.
8010 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
8012 * remote-utils.c (monitor_output): Constify msg parameter.
8013 * server.h (monitor_output): Likewise.
8014 * win32-i386-low.c (handle_output_debug_string): New.
8015 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
8016 handle_output_debug_string.
8017 (get_child_debug_event): Likewise.
8019 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
8021 * server.c (main): Correct strtoul check.
8023 2007-03-27 Jon Ringle <jon@ringle.org>
8025 * linux-low.c: Check __ARCH_HAS_MMU__ also.
8027 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
8029 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
8031 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
8033 * terminal.h: Check HAVE_SGTTY_H.
8035 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
8037 * remote-utils.c (remote_open): Print out the assigned port number.
8039 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
8041 * remote-utils.c (monitor_output): New function.
8042 * server.c (debug_threads): Define here.
8043 (monitor_show_help): New function.
8044 (handle_query): Handle qRcmd.
8045 (main): Do not handle 'd' packet.
8046 * server.h (debug_threads, remote_debug, monitor_output): Declare.
8047 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
8050 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8052 * Makefile.in (EXEEXT): New.
8053 (clean): Use $(EXEEXT).
8055 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8057 * target.h (target_ops): Rename send_signal to request_interrupt,
8058 and remove enum target_signal parameter.
8059 * linux-low.c (linux_request_interrupt): Rename from
8060 linux_send_signal, and always send SIGINT.
8061 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
8062 and always send SIGINT.
8063 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
8065 (input_interrupt): Likewise.
8067 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8069 * server.c (get_features_xml): Check if target implemented
8071 * win32-i386-low.c (win32_arch_string): New.
8072 (win32_target_ops): Add win32_arch_string as arch_string member.
8074 2007-02-22 Markus Deuling <deuling@de.ibm.com>
8076 * spu-low.c (spu_arch_string): New.
8077 (spu_target_ops): Add spu_arch_string.
8079 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
8081 * remote-utils.c: Remove HAVE_TERMINAL_H check.
8082 * configure.ac: Do not check for terminal.h.
8083 * configure, config.in: Regenerated.
8085 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
8087 * Makefile.in (OBS): Add $(XML_BUILTIN).
8088 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
8090 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
8091 (arm-with-iwmmxt.c): New.
8092 * config.in, configure: Regenerate.
8093 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
8094 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
8095 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
8096 (arm*-*-linux*): Add iWMMXt and regset support.
8097 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
8098 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
8099 (arm_store_wmmxregset, target_regsets): New.
8100 * server.c (get_features_xml): Take annex argument. Check builtin
8102 (handle_query): Handle multiple annexes.
8104 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8106 * remote-utils.c [USE_WIN32API] (read, write): Define.
8107 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
8110 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
8112 * linux-i386-low.c (the_low_target): Set arch_string.
8113 * linux-x86-64-low.c (the_low_target): Likewise.
8114 * linux-low.c (linux_arch_string): New.
8115 (linux_target_ops): Add it.
8116 * linux-low.h (struct linux_target_ops): Add arch_string.
8117 * server.c (write_qxfer_response): Use const void * for DATA.
8118 (get_features_xml): New.
8119 (handle_query): Handle qXfer:features:read. Report it for qSupported.
8120 * target.h (struct target_ops): Add arch_string method.
8122 2007-01-03 Denis Pilat <denis.pilat@st.com>
8123 Daniel Jacobowitz <dan@codesourcery.com>
8125 * linux-low.c (linux_kill): Handle being called with no threads.
8126 * win32-i386-low.c (win32_kill): Likewise.
8127 (get_child_debug_event): Clear current_process_handle.
8129 2006-12-30 Denis PILAT <denis.pilat@st.com>
8130 Daniel Jacobowitz <dan@codesourcery.com>
8132 * remote-utils.c (remote_open): Check the type of specified
8133 serial port devices before opening them.
8134 * server.c (main): Kill the inferior if an error occurs during
8135 the first remote_open.
8137 2006-12-05 Markus Deuling <deuling@de.ibm.com>
8139 * README: Update supported targets.
8141 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
8143 * Makefile.in (clean): Remove reg-mips64.c.
8144 (reg-mips64.c, reg-mips64.o): New rules.
8145 * configure.srv: Handle mips64. Include regset support for mips.
8146 * linux-mips-low.c (union mips_register): New.
8147 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
8148 (mips_breakpoint, mips_breakpoint_at): Use int.
8149 (mips_collect_register, mips_supply_register)
8150 (mips_collect_register_32bit, mips_supply_register_32bit)
8151 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8152 (mips_store_fpregset, target_regsets): New.
8153 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
8155 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
8157 * configure.srv: Add target "spu*-*-*".
8158 * Makefile.in (clean): Remove reg-spu.c.
8159 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
8160 * spu-low.c: New file.
8162 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
8164 * configure.ac: Correct td_thr_tls_get_addr test.
8165 * configure: Regenerated.
8167 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
8169 * linux-low.c (linux_wait_for_event): Reformat. Use the
8171 * remote-utils.c (decode_address_to_semicolon): New.
8172 * server.c (pass_signals, handle_general_set): New.
8173 (handle_query): Mention QPassSignals for qSupported.
8174 (main): Call handle_general_set.
8175 * server.h (pass_signals, decode_address_to_semicolon): New.
8177 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
8179 * server.c (handle_query): Correct error handling for read_auxv.
8181 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
8183 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
8184 and srv_linux_thread_db to yes.
8185 * linux-s390-low.c (s390_fill_gregset): New function.
8186 (target_regsets): Define data structure.
8188 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
8190 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
8191 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
8192 * config.in, configure: Regenerated.
8193 * inferiors.c (gdb_id_to_thread): New function.
8194 (gdb_id_to_thread_id): Use it.
8195 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
8196 * linux-low.h (struct process_info): Add th member.
8197 (thread_db_get_tls_address): New prototype.
8198 * remote-utils.c (decode_address): Make non-static.
8199 * server.c (handle_query): Handle qGetTLSAddr.
8200 * server.h (gdb_id_to_thread, decode_address): New prototypes.
8201 * target.h (struct target_ops): Add get_tls_address.
8202 * thread-db.c (maybe_attach_thread): Save the thread handle.
8203 (thread_db_get_tls_address): New.
8205 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
8207 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
8208 (linux_resume_one_process): Take a siginfo_t *. Update all
8209 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
8210 (struct pending_signals): Add a siginfo_t.
8211 (linux_wait_for_process): Always set last_status.
8212 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
8213 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
8214 * linux-low.h (struct process_info): Add last_status.
8216 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
8218 * remote-utils.c (try_rle): New function.
8219 (putpkt_binary): Use it.
8221 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
8223 * Makefile.in (clean): Clean reg-x86-64-linux.c.
8224 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
8225 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
8226 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
8227 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
8230 2006-08-08 Richard Sandiford <richard@codesourcery.com>
8232 * server.c (terminal_fd): New variable.
8233 (old_foreground_pgrp): Likewise.
8234 (restore_old_foreground_pgrp): New function.
8235 (start_inferior): Record the terminal file descriptor in terminal_fd
8236 and its original foreground group in old_foreground_pgrp. Register
8237 restore_old_foreground_pgrp with atexit().
8239 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
8241 * server.c (handle_query): Correct qPart to qXfer.
8243 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
8245 * configure.ac: Check for more headers which are missing on
8246 Windows. Automatically supply -lwsock32 and USE_WIN32API.
8247 * configure.srv: Add Cygwin and mingw32.
8248 * remote-utils.c: Don't include headers unconditionally which
8249 are missing on mingw32. Include <winsock.h> for mingw32.
8250 (remote_open): Adjust for mingw32 support. Flush
8251 standard error after writing to it.
8252 (remote_close, putpkt_binary, input_interrupt, block_async_io)
8253 (unblock_async_io, enable_async_io, disable_async_io)
8254 (readchar, getpkt): Update for Winsock support.
8255 (prepare_resume_reply): Expect a protocol signal number.
8256 * server.c: Disable <sys/wait.h> on mingw32.
8257 (start_inferior): Adjust for mingw32 support. Flush
8258 standard error after writing to it.
8259 (attach_inferior): Likewise. Use protocol signal
8261 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
8263 * win32-i386-low.c: New file.
8264 * Makefile.in (XM_CLIBS): Set.
8265 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
8266 (win32-i386-low.o): New dependency rule.
8267 * linux-low.c (linux_wait): Use target signal numbers.
8268 * target.h (struct target_ops): Doc fix.
8269 * server.h (target_signal_to_name): New prototype.
8270 * gdbreplay.c: Don't include headers unconditionally which
8271 are missing on mingw32. Include <winsock.h> for mingw32.
8272 (remote_close, remote_open): Adjust for Winsock support.
8273 * configure, config.in: Regenerated.
8275 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8277 * server.c (decode_xfer_read, write_qxfer_response): New.
8278 (handle_query): Take a packet length argument. Handle
8279 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
8280 the qSupported response.
8281 (main): Update call to handle_query.
8283 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
8285 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
8286 (putpkt_binary): Renamed from putpkt and adjusted for binary
8288 (putpkt): New wrapper for putpkt_binary.
8289 (readchar): Don't mask off the high bit.
8290 (decode_X_packet): New function.
8291 * server.c (main): Call putpkt_binary if a handler sets the packet
8292 length. Save the length of the incoming packet. Handle 'X'.
8293 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
8295 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
8297 * server.c (handle_query): Handle qSupported.
8299 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
8301 * remote-utils.c (all_symbols_looked_up): New variable.
8302 (look_up_one_symbol): Check it.
8303 * server.h (look_up_one_symbol): New declaration.
8304 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
8306 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
8308 * Makefile.in (linux-arm-low.o): Update dependencies.
8309 * linux-arm-low.c: Include "gdb_proc_service.h".
8310 (PTRACE_GET_THREAD_AREA): Define.
8311 (ps_get_thread_area): New function.
8313 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
8315 * configure.srv (m68k*-*-uclinux*): New target.
8316 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
8317 (linux_resume_one_process): Remove extraneous cast.
8318 (linux_read_offsets): New.
8319 (linux_target_op): Add linux_read_offsets on mmuless systems.
8320 * server.c (handle_query): Add qOffsets logic.
8321 * target.h (struct target_ops): Add read_offsets.
8323 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
8325 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
8326 (PTRACE_GET_THREAD_AREA): Define.
8327 (ps_get_thread_area): New function.
8328 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
8329 (linux-x86-64-low.o): Update.
8331 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
8333 * configure.ac: Remove checks for prfpregset_t.
8334 * gdb_proc_service.h: New file.
8335 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
8336 new "gdb_proc_service.h".
8337 * proc-service.c: Likewise.
8338 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
8339 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
8340 * Makefile.in (gdb_proc_service_h): Updated.
8341 * configure, config.in: Regenerated.
8343 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
8345 * remote-utils.c (prepare_resume_reply): Move declaration
8346 of gdb_id_from_wait to the top of the block.
8348 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
8350 * linux-low.c (regsets_store_inferior_registers): Read the regset
8351 from the target before filling it.
8353 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
8355 * server.c (attach_inferior): Return SIGTRAP for a successful
8358 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8360 * Makefile.in (OBS): Add version.o.
8361 (STAGESTUFF): Delete.
8362 (version.o): Add dependencies.
8363 (version.c): Replace rule.
8364 (clean): Remove version.c.
8365 * server.c (gdbserver_version): New.
8366 (gdbserver_usage): Use printf.
8367 (main): Handle --version and --help.
8368 * server.h (version, host_name): Add declarations.
8370 2005-12-23 Eli Zaretskii <eliz@gnu.org>
8382 * linux-x86-64-low.c:
8385 * linux-ppc64-low.c:
8394 * linux-crisv32-low.c:
8406 * gdbserver.1: Add (C) after Copyright. Update the FSF
8409 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
8411 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
8412 (arm_breakpoint_at): Recognize both breakpoints.
8413 (the_low_target): Use the correct breakpoint instruction.
8415 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
8417 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
8418 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
8419 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
8420 (the_low_target): Update.
8422 2005-10-25 Andreas Schwab <schwab@suse.de>
8424 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
8426 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
8427 (ia64_num_regs): Reduce to 462.
8429 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
8431 * acinclude.m4: Correct quoting.
8432 * aclocal.m4: Regenerated.
8434 Suggested by SZOKOVACS Robert <szo@ies.hu>:
8435 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
8436 (thread_db_init): Call thread_db_err_str.
8437 * configure.ac: Check for TD_VERSION.
8438 * config.in, configure: Regenerated.
8440 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8442 * server.h (error, fatal, warning): Add ATTR_FORMAT.
8444 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8446 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
8447 is not available. Define HAVE_PTRACE_GETREGS if it is.
8448 * config.in, configure: Regenerated.
8449 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
8450 * linux-i386-low.c, linux-m68k-low.c: Update to use
8451 HAVE_PTRACE_GETREGS.
8452 * linux-low.c (regsets_fetch_inferior_registers)
8453 (regsets_store_inferior_registers): Only return 0 if we processed
8455 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
8456 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
8458 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8460 * inferiors.c (struct thread_info): Add gdb_id.
8461 (add_thread): Add gdb_id argument.
8462 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
8463 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
8464 calls to add_thread.
8465 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
8466 * server.c (handle_query): Use thread_to_gdb_id.
8467 (handle_v_cont, main): Use gdb_id_to_thread_id.
8468 * server.h (add_thread): Update prototype.
8469 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
8472 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8474 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
8475 left-padded registers.
8476 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
8477 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
8479 2005-07-01 Steve Ellcey <sje@cup.hp.com>
8481 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
8482 * configure: Regenerate.
8483 * config.in: Regenerate.
8484 * server.h (NEED_DECLARATION_STRERROR):
8485 Replace with !HAVE_DECL_STRERROR.
8487 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
8489 * linux-low.c (linux_wait, linux_send_signal): Don't test
8490 an unsigned long variable for > 0 if it could be MAX_ULONG.
8491 * server.c (myresume): Likewise.
8492 * target.c (set_desired_inferior): Likewise.
8494 2005-06-13 Mark Kettenis <kettenis@gnu.org>
8496 * configure.ac: Simplify and improve check for socklen_t.
8497 * configure, config.in: Regenerate.
8499 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
8501 * acconfig.h: Remove.
8502 * configure.ac: Add a test for socklen_t. Use three-argument
8503 AC_DEFINE throughout.
8504 * config.in: Regenerated using autoheader 2.59.
8505 * configure: Regenerated.
8507 * gdbreplay.c (socklen_t): Provide a default.
8508 (remote_open): Use socklen_t.
8509 * remote-utils.c (socklen_t): Provide a default.
8510 (remote_open): Use socklen_t.
8511 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
8514 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
8516 * linux-low.c (linux_read_memory, linux_write_memory)
8517 (linux_read_auxv): Likewise.
8518 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
8519 (check_mem_write): Likewise.
8520 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
8522 * regcache.c (struct inferior_rgcache_data, registers_to_string)
8523 (registers_from_string, register_data): Likewise.
8524 * server.c (handle_query, main): Likewise.
8525 * server.h (convert_ascii_to_int, convert_int_to_ascii)
8526 (decode_M_packet): Likewise.
8527 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
8528 * target.h (struct target_ops): Update read_memory, write_memory,
8530 (read_inferior_memory, write_inferior_memory): Update.
8531 * linux-low.h (struct linux_target_ops): Change type of breakpoint
8533 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
8534 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
8535 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
8536 linux-s390-low.c, linux-sh-low.c: Update for changes in
8537 read_inferior_memory and the_low_target->breakpoint.
8539 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
8541 * Makefile.in (SFILES): Add linux-ppc64-low.c.
8542 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
8543 * configure.srv: Add powerpc64-*-linux*.
8544 * linux-ppc64-low.c: New file.
8546 2005-05-23 Orjan Friberg <orjanf@axis.com>
8548 * linux-cris-low.c: New file with support for CRIS.
8549 * linux-crisv32-low.c: Ditto for CRISv32.
8550 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
8551 (clean): Add reg-cris.c and reg-crisv32.c.
8552 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
8553 reg-crisv32.o, and reg-crisv32.c to make rules.
8554 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
8557 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
8559 * linux-low.c (fetch_register): Ensure buffer size is a multiple
8560 of sizeof (PTRACE_XFER_TYPE).
8561 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
8563 2005-05-12 Orjan Friberg <orjanf@axis.com>
8565 * target.h (struct target_ops): Add insert_watchpoint,
8566 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
8567 pointers for hardware watchpoint support.
8568 * linux-low.h (struct linux_target_ops): Ditto.
8569 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
8570 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
8571 to linux_target_ops.
8572 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
8574 * server.c (main): Recognize 'Z' and 'z' packets.
8576 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
8578 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
8579 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
8580 (the_low_target): Add new members.
8582 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
8584 * proc-service.c (ps_lgetregs): Search all_processes instead of
8587 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
8589 * server.c (start_inferior): Change return type to int.
8590 (attach_inferior): Change sigptr to int *.
8591 (handle_v_cont, handle_v_requests): Change signal to int *.
8592 (main): Change signal to int.
8594 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
8596 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
8597 * configure.srv: Add m32r*-*-linux*.
8598 * linux-m32r-low.c: New file.
8600 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
8602 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
8604 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
8606 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
8607 Take unsigned long arguments for PIDs.
8608 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
8609 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
8610 (wait_for_sigstop, linux_resume_one_process)
8611 (regsets_fetch_inferior_registers, linux_send_signal)
8612 (linux_read_auxv): Likewise. Update the types of variables holding
8613 PIDs. Update format string specifiers.
8614 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
8615 * remote-utils.c (prepare_resume_reply): Likewise.
8616 * server.c (cont_thread, general_thread, step_thread)
8617 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
8619 (handle_query): Update format specifiers.
8620 (handle_v_cont, main): Use strtoul for thread IDs.
8621 * server.h (struct inferior_list_entry): Use unsigned long for ID.
8622 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
8623 (general_thread, step_thread, thread_from_wait)
8624 (old_thread_from_wait): Update.
8625 * target.h (struct thread_resume): Use unsigned long for THREAD.
8626 (struct target_ops): Use unsigned long for arguments to attach and
8629 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
8631 * acinclude.m4: Include bfd/bfd.m4 directly.
8632 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
8633 <agriffis@toolchain.org>.
8634 * aclocal.m4, configure: Regenerated.
8636 2005-01-07 Andrew Cagney <cagney@gnu.org>
8638 * configure.ac: Rename configure.in, require autoconf 2.59.
8639 * configure: Re-generate.
8641 2004-12-08 Daniel Jacobowitz <dan@debian.org>
8643 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
8645 * aclocal.m4: Regenerated.
8646 * configure: Regenerated.
8648 2004-11-21 Andreas Schwab <schwab@suse.de>
8650 * linux-m68k-low.c (m68k_num_gregs): Define.
8651 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
8652 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
8653 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
8654 (m68k_breakpoint_at): New. Add to the_low_target.
8656 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
8657 srv_linux_thread_db to yes.
8659 2004-10-20 Joel Brobecker <brobecker@gnat.com>
8661 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
8662 (ARCH_SET_FS): Likewise.
8663 (ARCH_GET_FS): Likewise.
8664 (ARCH_GET_GS): Likewise.
8666 2004-10-16 Daniel Jacobowitz <dan@debian.org>
8668 * linux-i386-low.c (ps_get_thread_area): New.
8669 * linux-x86-64-low.c (ps_get_thread_area): New.
8670 * linux-low.c: Include <sys/syscall.h>.
8671 (linux_kill_one_process): Don't kill the first thread here.
8672 (linux_kill): Kill the first thread here.
8673 (kill_lwp): New function.
8674 (send_sigstop, linux_send_signal): Use it.
8675 * proc-service.c: Clean up #ifdefs.
8676 (fpregset_info): Delete.
8677 (ps_lgetregs): Update and enable implementation.
8678 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
8680 * remote-utils.c (struct sym_cache, symbol_cache): New.
8681 (input_interrupt): Print a clearer message.
8682 (async_io_enabled): New variable.
8683 (enable_async_io, disable_async_io): Use it. Update comments.
8684 (look_up_one_symbol): Use the symbol cache.
8685 * thread-db.c (thread_db_look_up_symbols): New function.
8686 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
8688 2004-10-16 Daniel Jacobowitz <dan@debian.org>
8690 * configure.in: Test for -rdynamic.
8691 * configure: Regenerated.
8692 * Makefile (INTERNAL_LDFLAGS): New.
8693 (gdbserver, gdbreplay): Use it.
8695 2004-09-02 Andrew Cagney <cagney@gnu.org>
8697 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
8699 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
8701 * linux-low.c (linux_wait): Clear all_processes list also.
8703 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8705 * linux-low.c: Include <errno.h>. Remove extern declaration of
8708 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8710 * gdbreplay.c, server.h, utils.c: Update copyright years.
8712 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8714 * server.c (main): Print child status or termination signal from
8715 variable 'signal', not 'sig'.
8717 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8719 * linux-low.c (linux_read_memory): Change return type to
8720 int. Check for and return error from ptrace().
8721 * target.c (read_inferior_memory): Change return type to int. Pass
8722 back return status from the_target->read_memory().
8723 * target.h (struct target_ops): Adapt *read_memory() prototype.
8725 (read_inferior_memory): Adapt prototype.
8726 * server.c (main): Return an error packet if
8727 read_inferior_memory() returns an error.
8729 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
8731 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
8732 Unify with other clean targets.
8734 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8736 * server.c (handle_v_cont): Call set_desired_inferior.
8738 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8740 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
8742 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8744 * linux-low.c (linux_wait): Unblock async I/O.
8745 (linux_resume): Block and enable async I/O.
8746 * remote-utils.c (block_async_io, unblock_async_io): New functions.
8747 * server.h (block_async_io, unblock_async_io): Add prototypes.
8749 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8751 * remote-utils.c (remote_open): Print a status notice after
8753 * server.c (attach_inferior): Print a status notice after
8756 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8758 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
8760 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
8762 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
8764 * server.c, target.h: Update copyright years.
8766 2004-02-25 Roland McGrath <roland@redhat.com>
8768 * target.h (struct target_ops): New member `read_auxv'.
8769 * server.c (handle_query): Handle qPart:auxv:read: query using that.
8770 * linux-low.c (linux_read_auxv): New function.
8771 (linux_target_ops): Initialize `read_auxv' member to that.
8773 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8775 Committed by Jim Blandy <jimb@redhat.com>.
8777 * linux-s390-low.c (s390_num_regs): Update.
8778 (s390_regmap): Remove control registers. Use __s390x__ predefine
8779 instead of GPR_SIZE to distiguish s390 and s390x targets.
8781 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
8783 * linux-low.c: Update copyright year.
8784 (check_removed_breakpoint): Clear pending_is_breakpoint.
8785 (linux_set_resume_request, linux_queue_one_thread)
8786 (resume_status_pending_p): New functions.
8787 (linux_continue_one_thread): Use process->resume.
8788 (linux_resume): Only resume threads if there are no pending events.
8789 * linux-low.h (struct process_info): Add resume request
8792 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
8794 * regcache.c (new_register_cache): Clear the allocated register
8795 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
8797 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
8799 * linux-low.c (linux_resume): Take a struct thread_resume *
8801 (linux_wait): Update call.
8802 (resume_ptr): New static variable.
8803 (linux_continue_one_thread): Renamed from
8804 linux_continue_one_process. Use resume_ptr.
8805 (linux_resume): Use linux_continue_one_thread.
8806 * server.c (handle_v_cont, handle_v_requests): New functions.
8807 (myresume): New function.
8808 (main): Handle 'v' case.
8809 * target.h (struct thread_resume): New type.
8810 (struct target_ops): Change argument of "resume" to struct
8812 (myresume): Delete macro.
8814 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
8816 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
8817 (uninstall): Support DESTDIR.
8819 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
8821 * configure.srv: Add xscale*linux copy of arm*linux entry.
8823 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
8825 * linux-arm-low.c (arm_reinsert_addr): New function.
8826 (the_low_target): Add arm_reinsert_addr.
8828 2003-07-08 Mark Kettenis <kettenis@gnu.org>
8830 * mem-break.c: Remove whitespace at end of file.
8832 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8834 * configure.in: Check whether we need to prototype strerror.
8835 * server.h: Optionally prototype strerror.
8836 * gdbreplay.c (perror_with_name): Use strerror.
8837 * linux-low.c (linux_attach_lwp): Use strerror.
8838 * utils.c (perror_with_name): Use strerror.
8839 * config.in, configure: Regenerated.
8841 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8843 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
8844 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
8846 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
8848 * Makefile.in (SFILES): Update.
8849 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
8850 low-sun3.c: Remove files.
8852 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
8854 * linux-low.c: Move comment to linux_thread_alive where it belonged.
8855 (linux_detach_one_process, linux_detach): New functions.
8856 (linux_target_ops): Add linux_detach.
8857 * server.c (main): Handle 'D' packet.
8858 * target.h (struct target_ops): Add "detach" member.
8859 (detach_inferior): Define.
8861 2003-06-13 Mark Kettenis <kettenis@gnu.org>
8863 From Kelley Cook <kelleycook@wideopenwest.com>:
8864 * configure.srv: Accept i[34567]86 variants.
8866 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
8868 * linux-low.c (linux_wait_for_event): Correct comment typos.
8869 (linux_resume_one_process): Call check_removed_breakpoint.
8870 (linux_send_signal): New function.
8871 (linux_target_ops): Add linux_send_signal.
8872 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
8874 * target.h (struct target_ops): Add send_signal.
8876 2003-05-29 Jim Blandy <jimb@redhat.com>
8878 * linux-low.c (usr_store_inferior_registers): Transfer buf in
8879 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
8880 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
8881 away part of the register's value.
8883 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
8885 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
8886 (linux_wait_for_event, linux_init_signals): Likewise.
8888 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
8890 * configure.in: Check for stdlib.h.
8891 * configure: Regenerated.
8892 * config.in: Regenerated.
8894 2003-01-04 Andreas Schwab <schwab@suse.de>
8896 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
8898 2003-01-02 Andrew Cagney <ac131313@redhat.com>
8900 * Makefile.in: Remove obsolete code.
8902 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
8904 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
8905 defined(PT_FPR0_HI).
8907 2002-11-17 Stuart Hughes <seh@zee2.com>
8909 * linux-arm-low.c (arm_num_regs): Increase.
8910 (arm_regmap): Include status register.
8912 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
8914 * linux-low.c (register_addr): Remove incorrect -1 check.
8916 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
8918 * linux-low.c (linux_create_inferior): Call setpgid. Return
8920 (unstopped_p, linux_signal_pid): Remove.
8921 (linux_target_ops): Remove linux_signal_pid.
8922 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
8923 global instead of target method.
8924 * target.h (struct target_ops): Remove signal_pid. Update comment
8925 for create_inferior.
8926 * server.c (signal_pid): New variable.
8927 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
8928 gdbserver. Set the child to be the foreground process group.
8929 (attach_inferior): Set signal_pid.
8931 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
8933 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
8935 2002-08-20 Jim Blandy <jimb@redhat.com>
8937 * Makefile.in (LDFLAGS): Allow the configure script to establish a
8940 2002-08-01 Andrew Cagney <cagney@redhat.com>
8942 * Makefile.in: Make chill references obsolete.
8944 2002-07-24 Kevin Buettner <kevinb@redhat.com>
8946 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
8947 * configure: Regenerate.
8948 * config.in: Regenerate.
8950 2002-07-09 David O'Brien <obrien@FreeBSD.org>
8952 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
8953 (perror_with_name, remote_close, remote_open, expect, play): Static.
8955 2002-07-04 Michal Ludvig <mludvig@suse.cz>
8957 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
8958 byte offsets instead of an array of indexes.
8959 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
8961 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
8963 * regcache.c: Add comment.
8965 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
8967 * thread-db.c: New file.
8968 * proc-service.c: New file.
8969 * acinclude.m4: New file.
8970 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
8971 proc-service.o, and thread-db.o.
8972 (linux-low.o): Add USE_THREAD_DB.
8973 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
8974 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
8975 * aclocal.m4: Regenerated.
8976 * config.in: Regenerated.
8977 * configure: Regenerated.
8978 * configure.in: Check for proc_service.h, sys/procfs.h,
8979 thread_db.h, and linux/elf.h headrs.
8980 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
8981 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
8982 Check for -lthread_db and thread support.
8983 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
8984 PowerPC, and SuperH.
8985 * i387-fp.c: Constify arguments.
8986 * i387-fp.h: Likewise.
8987 * inferiors.c: (struct thread_info): Renamed from
8988 `struct inferior_info'. Remove PID member. Use generic inferior
8989 list header. All uses updated.
8990 (inferiors, signal_pid): Removed.
8991 (all_threads): New variable.
8992 (get_thread): Define.
8993 (add_inferior_to_list): New function.
8994 (for_each_inferior): New function.
8995 (change_inferior_id): New function.
8996 (add_inferior): Removed.
8997 (remove_inferior): New function.
8998 (add_thread): New function.
8999 (free_one_thread): New function.
9000 (remove_thread): New function.
9001 (clear_inferiors): Use for_each_inferior and free_one_thread.
9002 (find_inferior): New function.
9003 (find_inferior_id): New function.
9004 (inferior_target_data): Update argument type.
9005 (set_inferior_target_data): Likewise.
9006 (inferior_regcache_data): Likewise.
9007 (set_inferior_regcache_data): Likewise.
9008 * linux-low.c (linux_bp_reinsert): Remove.
9009 (all_processes, stopping_threads, using_thrads)
9010 (struct pending_signals, debug_threads, pid_of): New.
9011 (inferior_pid): Replace with macro.
9012 (struct inferior_linux_data): Remove.
9013 (get_stop_pc, add_process): New functions.
9014 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
9015 Use add_process and add_thread.
9016 (linux_attach_lwp): New function, based on old linux_attach. Use
9017 add_process and add_thread. Set stop_expected for new threads.
9018 (linux_attach): New function.
9019 (linux_kill_one_process): New function.
9020 (linux_kill): Kill all LWPs.
9021 (linux_thread_alive): Use find_inferior_id.
9022 (check_removed_breakpoints, status_pending_p): New functions.
9023 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
9024 Update. Use WNOHANG. Wait for cloned processes also. Update process
9025 struct for the found process.
9026 (linux_wait_for_event): New function.
9027 (linux_wait): Use it. Support LWPs.
9028 (send_sigstop, wait_for_sigstop, stop_all_processes)
9029 (linux_resume_one_process, linux_continue_one_process): New functions.
9030 (linux_resume): Support LWPs.
9031 (REGISTER_RAW_SIZE): Remove.
9032 (fetch_register): Use register_size instead. Call supply_register.
9033 (usr_store_inferior_registers): Likewise. Call collect_register.
9035 (regsets_fetch_inferior_registers): Improve error message.
9036 (regsets_store_inferior_registers): Add debugging.
9037 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
9038 (unstopped_p, linux_signal_pid): New functions.
9039 (linux_target_ops): Add linux_signal_pid.
9040 (linux_init_signals): New function.
9041 (initialize_low): Call it. Initialize using_threads.
9042 * regcache.c (inferior_regcache_data): Add valid
9044 (get_regcache): Fetch registers lazily. Add fetch argument
9045 and update all callers.
9046 (regcache_invalidate_one, regcache_invalidate): New
9048 (new_register_cache): Renamed from create_register_cache.
9049 Return the new regcache.
9050 (free_register_cache): Change argument to a void *.
9051 (registers_to_string, registers_from_string): Call get_regcache
9052 with fetch flag set.
9053 (register_data): Make static. Pass fetch flag to get_regcache.
9054 (supply_register): Call get_regcache with fetch flag clear.
9055 (collect_register): Call get_regcache with fetch flag set.
9056 (collect_register_as_string): New function.
9057 * regcache.h: Update.
9058 * remote-utils.c (putpkt): Flush after debug output and use
9060 Handle input interrupts while waiting for an ACK.
9061 (input_interrupt): Use signal_pid method.
9062 (getpkt): Flush after debug output and use stderr.
9063 (outreg): Use collect_register_as_string.
9064 (new_thread_notify, dead_thread_notify): New functions.
9065 (prepare_resume_reply): Check using_threads. Set thread_from_wait
9067 (look_up_one_symbol): Flush after debug output.
9068 * server.c (step_thread, server_waiting): New variables.
9069 (start_inferior): Don't use signal_pid. Update call to mywait.
9070 (attach_inferior): Update call to mywait.
9071 (handle_query): Handle qfThreadInfo and qsThreadInfo.
9072 (main): Don't fetch/store registers explicitly. Use
9073 set_desired_inferior. Support proposed ``Hs'' packet. Update
9076 (struct inferior_list, struct_inferior_list_entry): New.
9077 * target.c (set_desired_inferior): New.
9078 (write_inferior_memory): Constify.
9079 (mywait): New function.
9081 (struct target_ops): New signal_pid method.
9082 (mywait): Removed macro, added prototype.
9084 * linux-low.h (regset_func): Removed.
9085 (regset_fill_func, regset_store_func): New.
9086 (enum regset_type): New.
9087 (struct regset_info): Add type field. Use new operation types.
9088 (struct linux_target_ops): stop_pc renamed to get_pc.
9089 Add decr_pc_after_break and breakpoint_at.
9090 (get_process, get_thread_proess, get_process_thread)
9091 (strut process_info, all_processes, linux_attach_lwp)
9092 (thread_db_init): New.
9094 * linux-arm-low.c (arm_get_pc, arm_set_pc,
9095 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
9096 (the_low_target): Add new members.
9097 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
9098 (i386_store_fpxregset): Constify.
9099 (target_regsets): Add new kind identifier.
9100 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
9101 (i386_set_pc): Add debugging.
9102 (i386_breakpoint_at): New function.
9103 (the_low_target): Add new members.
9104 * linux-mips-low.c (mips_get_pc, mips_set_pc)
9105 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
9106 (mips_breakpoint_at): New.
9107 (the_low_target): Add new members.
9108 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
9109 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
9110 (the_low_target): Add new members.
9111 * linux-sh-low.c (sh_get_pc, sh_set_pc)
9112 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
9113 (the_low_target): Add new members.
9114 * linux-x86-64-low.c (target_regsets): Add new kind
9117 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
9119 From Martin Pool <mbp@samba.org>:
9120 * server.c (gdbserver_usage): New function.
9123 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
9125 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
9128 2002-05-04 Andrew Cagney <ac131313@redhat.com>
9130 * Makefile.in: Remove obsolete code.
9132 2002-04-24 Michal Ludvig <mludvig@suse.cz>
9134 * linux-low.c (regsets_fetch_inferior_registers),
9135 (regsets_store_inferior_registers): Removed cast to int from
9137 * regcache.h: Added declaration of struct inferior_info.
9139 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
9141 * inferiors.c (struct inferior_info): Add regcache_data.
9142 (add_inferior): Call create_register_cache.
9143 (clear_inferiors): Call free_register_cache.
9144 (inferior_regcache_data, set_inferior_regcache_data): New functions.
9145 * regcache.c (struct inferior_regcache_data): New.
9146 (registers): Remove.
9147 (get_regcache): New function.
9148 (create_register_cache, free_register_cache): New functions.
9149 (set_register_cache): Don't initialize the register cache here.
9150 (registers_to_string, registers_from_string, register_data): Call
9152 * regcache.h: Add prototypes.
9153 * server.h: Likewise.
9155 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
9157 * mem-break.c: New file.
9158 * mem-break.h: New file.
9159 * Makefile.in: Add mem-break.o rule; update server.h
9161 * inferiors.c (struct inferior_info): Add target_data
9163 (clear_inferiors): Free target_data member if set.
9164 (inferior_target_data, set_inferior_target_data): New functions.
9165 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
9166 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
9167 * linux-low.c (linux_bp_reinsert): New variable.
9168 (struct inferior_linux_data): New.
9169 (linux_create_inferior): Use set_inferior_target_data.
9170 (linux_attach): Likewise. Call add_inferior.
9171 (linux_wait_for_one_inferior): New function.
9172 (linux_wait): Call it.
9173 (linux_write_memory): Add const.
9174 (initialize_low): Call set_breakpoint_data.
9175 * linux-low.h (struct linux_target_ops): Add breakpoint
9177 * server.c (attach_inferior): Remove extra add_inferior
9179 * server.h: Include mem-break.h. Update inferior.c
9181 * target.c (read_inferior_memory)
9182 (write_inferior_memory): New functions.
9183 * target.h (read_inferior_memory)
9184 (write_inferior_memory): Change macros to prototypes.
9185 (struct target_ops): Update comments. Add const to write_memory
9188 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
9190 * linux-low.c (usr_store_inferior_registers): Support
9191 registers which are allowed to fail to store.
9192 * linux-low.h (linux_target_ops): Likewise.
9193 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
9194 (ppc_cannot_store_register): FPSCR may not be storable.
9196 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9198 * server.h: Include <string.h> if HAVE_STRING_H.
9199 * ChangeLog: Correct paths in last ChangeLog entry.
9201 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9203 * linux-low.h: Remove obsolete prototypes.
9204 (struct linux_target_ops): New.
9205 (extern the_low_target): New.
9206 * linux-low.c (num_regs, regmap): Remove declarations.
9207 (register_addr): Use the_low_target explicitly.
9208 (fetch_register): Likewise.
9209 (usr_fetch_inferior_registers): Likewise.
9210 (usr_store_inferior_registers): Likewise.
9211 * linux-arm-low.c (num_regs): Remove.
9212 (arm_num_regs): Define.
9213 (arm_regmap): Renamed from regmap, made static.
9214 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
9216 (arm_cannot_store_register): Renamed from cannot_store_register,
9218 (the_low_target): New.
9219 * linux-i386-low.c (num_regs): Remove.
9220 (i386_num_regs): Define.
9221 (i386_regmap): Renamed from regmap, made static.
9222 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
9224 (i386_cannot_store_register): Renamed from cannot_store_register,
9226 (the_low_target): New.
9227 * linux-ia64-low.c (num_regs): Remove.
9228 (ia64_num_regs): Define.
9229 (ia64_regmap): Renamed from regmap, made static.
9230 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
9232 (ia64_cannot_store_register): Renamed from cannot_store_register,
9234 (the_low_target): New.
9235 * linux-m68k-low.c (num_regs): Remove.
9236 (m68k_num_regs): Define.
9237 (m68k_regmap): Renamed from regmap, made static.
9238 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
9240 (m68k_cannot_store_register): Renamed from cannot_store_register,
9242 (the_low_target): New.
9243 * linux-mips-low.c (num_regs): Remove.
9244 (mips_num_regs): Define.
9245 (mips_regmap): Renamed from regmap, made static.
9246 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
9248 (mips_cannot_store_register): Renamed from cannot_store_register,
9250 (the_low_target): New.
9251 * linux-ppc-low.c (num_regs): Remove.
9252 (ppc_num_regs): Define.
9253 (ppc_regmap): Renamed from regmap, made static.
9254 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
9256 (ppc_cannot_store_register): Renamed from cannot_store_register,
9258 (the_low_target): New.
9259 * linux-s390-low.c (num_regs): Remove.
9260 (s390_num_regs): Define.
9261 (s390_regmap): Renamed from regmap, made static.
9262 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
9264 (s390_cannot_store_register): Renamed from cannot_store_register,
9266 (the_low_target): New.
9267 * linux-sh-low.c (num_regs): Remove.
9268 (sh_num_regs): Define.
9269 (sh_regmap): Renamed from regmap, made static.
9270 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
9272 (sh_cannot_store_register): Renamed from cannot_store_register,
9274 (the_low_target): New.
9275 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
9276 (the_low_target): New.
9278 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9280 * Makefile.in: Add stamp-h target.
9281 * configure.in: Create stamp-h.
9282 * configure: Regenerated.
9284 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9286 * inferiors.c: New file.
9287 * target.c: New file.
9288 * target.h: New file.
9289 * Makefile.in: Add target.o and inferiors.o. Update
9291 * linux-low.c (inferior_pid): New static variable,
9292 moved from server.c.
9293 (linux_create_inferior): Renamed from create_inferior.
9294 Call add_inferior. Return 0 on success instead of a PID.
9295 (linux_attach): Renamed from myattach.
9296 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
9297 (linux_thread_alive): Renamed from mythread_alive.
9298 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
9300 (linux_resume): Renamed from myresume. Add missing ``return 0''.
9301 (regsets_store_inferior_registers): Correct error message.
9302 Add missing ``return 0''.
9303 (linux_fetch_registers): Renamed from fetch_inferior_registers.
9304 (linux_store_registers): Renamed from store_inferior_registers.
9305 (linux_read_memory): Renamed from read_inferior_memory.
9306 (linux_write_memory): Renamed from write_inferior_memory.
9307 (linux_target_ops): New structure.
9308 (initialize_low): Call set_target_ops ().
9309 * remote-utils.c (unhexify): New function.
9310 (hexify): New function.
9311 (input_interrupt): Send signals to ``signal_pid''.
9312 * server.c (inferior_pid): Remove.
9313 (start_inferior): Update create_inferior call.
9314 (attach_inferior): Call add_inferior.
9315 (handle_query): New function.
9316 (main): Call handle_query for `q' packets.
9317 * server.h: Include "target.h". Remove obsolete prototypes.
9318 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
9320 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9322 * Makefile.in: Add WARN_CFLAGS. Update configury
9324 * configure.in: Check for <string.h>
9325 * configure: Regenerate.
9326 * config.in: Regenerate.
9327 * gdbreplay.c: Include needed system headers.
9328 (remote_open): Remove strchr prototype.
9329 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
9330 * regcache.c (supply_register): Change buf argument to const void *.
9331 (supply_register_by_name): Likewise.
9332 (collect_register): Change buf argument to void *.
9333 (collect_register_by_name): Likewise.
9334 * regcache.h: Add missing prototypes.
9335 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
9336 * server.c (handle_query): New function.
9337 (attached): New static variable, moved out of main.
9338 (main): Quiet longjmp clobber warnings.
9339 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
9340 * utils.c (error): Remove NORETURN.