1 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
4 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5 checking for fs_base/gs_base fields in struct user_regs_struct.
6 * configure: Regenerate.
8 2018-01-16 Yao Qi <yao.qi@linaro.org>
11 * linux-low.c (fetch_register): Call supply_register instead of
14 2018-01-08 Yao Qi <yao.qi@linaro.org>
15 Simon Marchi <simon.marchi@ericsson.com>
17 * Makefile.in (OBS): Remove selftest.o.
18 * configure.ac: Set srv_selftest_objs if $development is true.
19 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
20 * configure: Re-generated.
21 * server.c (captured_main): Wrap variable selftest_filter with
24 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
26 * server.c (parse_debug_format_options): Return std::string.
27 (handle_monitor_command, captured_main): Adjust.
29 2018-01-05 Pedro Alves <palves@redhat.com>
32 * server.c (captured_main): Pass quiet=false to
33 save_original_signals_state.
35 2018-01-01 Joel Brobecker <brobecker@adacore.com>
37 * gdbreplay.c (gdbreplay_version): Update copyright year in
39 * server.c (gdbserver_version): Likewise.
41 2017-12-08 Tom Tromey <tom@tromey.com>
43 * ax.c (ax_printf): Update.
45 2017-12-07 Yao Qi <yao.qi@linaro.org>
47 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
48 aarch64_linux_read_description.
49 * linux-amd64-ipa.c (idx2mask): New array.
50 (get_ipa_tdesc): Move idx2mask out.
51 (initialize_low_tracepoint): Initialize target descriptions.
52 * linux-i386-ipa.c (idx2mask): New array.
53 (get_ipa_tdesc): Move idx2mask out.
54 (initialize_low_tracepoint): Initialize target descriptions.
56 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
58 * tdesc.c (struct tdesc_type): Change return type.
59 (tdesc_add_flag): Change parameter type.
60 (tdesc_add_bitfield): Likewise.
61 (tdesc_add_field): Likewise.
62 (tdesc_set_struct_size): Likewise.
64 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
66 * regcache.c (registers_to_string): Remove unused variable.
68 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
70 * inferiors.c (for_each_inferior_with_data): Remove.
71 * inferiors.h (for_each_inferior_with_data): Remove.
72 * server.c (handle_qxfer_threads_worker): Change parameter type.
73 (handle_qxfer_threads_proper): Use for_each_thread.
75 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
77 * inferiors.c (for_each_inferior): Remove.
78 (clear_inferiors): Use for_each_thread.
79 * inferiors.h (for_each_inferior): Remove.
80 * linux-low.c (linux_wait_for_event_filtered): Use
82 (linux_stabilize_threads): Likewise.
83 * regcache.c (regcache_release): Likewise.
84 * server.c (gdb_wants_all_threads_stopped): Likewise.
85 (clear_pending_status_callback): Remove.
86 (handle_status): Use for_each_thread.
87 (captured_main): Likewise.
88 * win32-low.c (child_init_thread_list): Likewise.
89 (win32_clear_inferiors): Likewise.
90 (fake_breakpoint_event): Likewise.
92 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
94 * inferiors.h (find_inferior): Remove.
95 * inferiors.c (find_inferior): Remove.
97 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
99 * linux-low.c (resume_status_pending_p): Update comment.
100 (need_step_over_p): Update comment.
102 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
104 * linux-low.c (proceed_one_lwp): Return void, change parameter
106 (unsuspend_and_proceed_one_lwp): Likewise.
107 (proceed_all_lwps): Use for_each_thread.
108 (unstop_all_lwps): Likewise.
110 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
112 * linux-low.c (linux_resume_one_thread): Return void, take
114 (linux_resume): Use for_each_thread.
116 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
118 * linux-low.c (send_sigstop_callback): Return void, change
119 parameter type. Rename to...
120 (send_sigstop): ... this.
121 (suspend_and_send_sigstop_callback): Return void, change parameter
123 (suspend_and_send_sigstop): ... this.
124 (stop_all_lwps): Use for_each_thread.
126 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
128 * linux-low.c (lwp_running): Return bool, remove unused
130 (linux_stabilize_threads): Use find_thread.
132 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
134 * linux-low.c (select_singlestep_lwp_callback): Remove.
135 (count_events_callback): Remove.
136 (select_event_lwp_callback): Remove.
137 (select_event_lwp): Use find_thread/for_each_thread.
139 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
141 * linux-low.c (not_stopped_callback): Return bool, take filter
143 (linux_wait_for_event_filtered): Use find_thread.
144 (linux_wait_1): Likewise.
146 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
148 * linux-low.c (same_lwp): Remove.
149 (find_lwp_pid): Use find_thread.
151 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
153 * linux-low.c (delete_lwp_callback): Remove.
154 (linux_mourn): Use for_each_thread.
156 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
158 * linux-low.c (linux_detach_lwp_callback): Return void, remove
159 args parameter, don't check for pid.
160 (linux_detach): Use for_each_thread.
162 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
164 * linux-low.c (struct counter): Remove.
165 (second_thread_of_pid_p): Remove.
166 (last_thread_of_process_p): Use find_thread.
168 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
170 * inferiors.c (find_inferior_in_random): Remove.
171 * inferiors.h (find_inferior_in_random): Remove.
172 * linux-low.c (status_pending_p_callback): Return bool, accept
173 parameter ptid directly.
174 (linux_wait_for_event_filtered): Use find_thread_in_random.
175 (linux_wait_1): Likewise.
177 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
179 * inferiors.c (find_inferior_id): Remove.
180 (find_thread_ptid): Move implemention from find_inferior_id to
182 * inferiors.h (find_inferior_id): Remove.
183 * server.c (handle_status): Use find_thread_ptid.
184 (process_serial_event): Likewise.
185 * thread-db.c (find_one_thread): Likewise.
186 (thread_db_thread_handle): Likewise.
187 * win32-low.c (thread_rec): Likewise.
188 (child_delete_thread): Likewise.
189 (win32_thread_alive): Likewise.
190 (get_child_debug_event): Likewise.
192 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
194 * linux-mips-low.c (update_watch_registers_callback): Return
195 void, remove pid_p parameter, don't check for pid.
196 (mips_insert_point, mips_remove_point): Use for_each_thread.
198 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
200 * lynx.low (lynx_delete_thread_callback): Remove.
201 (lynx_mourn): Use for_each_thread.
203 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
205 * regcache.c (regcache_invalidate_one): Remove.
206 (regcache_invalidate_pid): use for_each_thread.
208 2017-11-26 Tom Tromey <tom@tromey.com>
210 * linux-low.c (linux_create_inferior): Update.
212 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
214 * spu-low.c (spu_create_inferior): Fix typo in argument name.
216 2017-11-24 Alan Hayward <alan.hayward@arm.com>
218 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
219 * linux-aarch64-low.c (initialize_low_arch): Call init func.
220 * linux-aarch64-tdesc-selftest.c: New file.
221 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
223 2017-11-24 Alan Hayward <alan.hayward@arm.com>
225 * configure.srv: Add new file.
226 * linux-aarch64-low.c (initialize_low_arch): Call init func.
227 * linux-aarch64-tdesc-selftest.c: New file.
228 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
230 2017-11-24 Alan Hayward <alan.hayward@arm.com>
232 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
233 * linux-aarch64-low.c (initialize_low_arch): Remove init.
234 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
236 2017-11-24 Alan Hayward <alan.hayward@arm.com>
238 * configure.srv: Add new files.
239 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
240 aarch64_linux_read_description.
241 * linux-aarch64-low.c (aarch64_linux_read_description):
242 Merge with aarch64_arch_setup.
243 (aarch64_arch_setup): Call aarch64_linux_read_description.
244 * linux-aarch64-tdesc.c: New file.
245 * linux-aarch64-tdesc.h: New file.
247 2017-11-24 Yao Qi <yao.qi@linaro.org>
249 * configure.srv: Set $srv_regobj for tic6x-linux.
250 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
251 (tic6x_read_description): Move some code to tic6x_arch_setup.
252 (tic6x_tdesc_test): New function.
253 (initialize_low_arch): Call selftests::register_test.
255 2017-11-22 Yao Qi <yao.qi@linaro.org>
257 * remote-utils.c (prepare_resume_reply): Use memcpy.
259 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
261 * linux-low.c (kill_one_lwp_callback): Return void, take
262 argument directly, don't filter on pid.
263 (linux_kill): Use for_each_thread.
265 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
267 * linux-low.c (need_step_over_p): Return bool, remove dummy
269 (linux_resume, proceed_all_lwps): Use find_thread.
271 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
273 * linux-low.c (resume_status_pending_p): Return bool, remove
275 (linux_resume): Use find_thread.
277 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
279 * linux-low.c (struct thread_resume_array): Remove.
280 (linux_set_resume_request): Return void, take arguments
282 (linux_resume): Use for_each_thread.
284 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
286 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
287 return bool, remove data argument.
288 (linux_stabilize_threads): Use find_thread.
290 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
292 * linux-low.c (unsuspend_one_lwp): Remove.
293 (unsuspend_all_lwps): Use for_each_thread, inline code from
296 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
298 * gdbthread.h (find_thread): Add overload with ptid_t filter.
299 * linux-low.c (struct iterate_over_lwps_args): Remove.
300 (iterate_over_lwps_filter): Remove.
301 (iterate_over_lwps): Use find_thread.
303 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
305 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
306 (linux_handle_new_gdb_connection): Use for_each_thread, inline
307 code from reset_lwp_ptrace_options_callback.
309 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
311 * linux-arm-low.c (struct update_registers_data): Remove.
312 (update_registers_callback): Return void, take arguments
313 directly, don't check thread's pid.
314 (arm_insert_point, arm_remove_point): Use for_each_thread.
316 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
318 * win32-low.c (continue_one_thread): Return void, take argument
320 (child_continue): Use for_each_thread.
322 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
324 * win32-i386-low.c (update_debug_registers_callback): Rename
326 (update_debug_registers): ... this, return void, remove pid_p arg.
327 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
329 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
331 * inferiors.h (struct process_info): Add constructor, initialize
333 <syscalls_to_catch>: Change type to std::vector<int>.
334 * inferiors.c (add_process): Allocate process_info with new.
335 (remove_process): Free process_info with delete.
336 * linux-low.c (handle_extended_wait): Adjust.
337 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
338 * server.c (handle_general_set): Adjust.
340 2017-11-16 Pedro Alves <palves@redhat.com>
342 * remote-utils.c (remote_close): Block SIGIO signals instead of
343 uninstalling the SIGIO handler.
345 2017-11-16 Alan Hayward <alan.hayward@arm.com>
347 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
349 2017-11-16 Yao Qi <yao.qi@linaro.org>
351 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
352 (tic6x_store_gregset): Likewise.
353 (tic6x_usrregs_info): Move it up.
355 2017-11-15 Alan Hayward <alan.hayward@arm.com>
357 * Makefile.in: Update arch rules.
358 * configure.srv: Explicitly mark arch/ files.
360 2017-11-13 Andreas Schwab <schwab@suse.de>
362 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
364 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
366 2017-11-06 Pedro Alves <palves@redhat.com>
368 * config.in, configure: Regenerate.
370 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
372 * target.c (struct thread_search): Remove.
373 (thread_search_callback): Remove.
374 (prepare_to_access_memory): Use for_each_thread instead of
375 find_inferior. Inline code from thread_search_callback.
377 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
379 * server.c (struct visit_actioned_threads_data): Remove.
380 (visit_actioned_threads): Change prototype to take arguments
382 (resume): Use find_thread instead of find_inferior.
384 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
386 * server.c (queue_stop_reply_callback): Change prototype, return
388 (find_status_pending_thread_callback): Remove.
389 (handle_status): Replace find_inferior with find_thread and
392 2017-10-25 Alan Hayward <alan.hayward@arm.com>
394 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
396 (aarch64_store_gregset): Likewise.
397 (aarch64_fill_fpregset): Likewise.
398 (aarch64_store_fpregset): Likewise.
400 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
402 * gdbthread.h (find_thread, for_each_thread): New functions.
403 * inferiors.c (thread_of_pid): Remove.
404 (find_any_thread_of_pid): Use find_thread.
405 * linux-low.c (num_lwps): Use for_each_thread.
407 2017-10-17 Yao Qi <yao.qi@linaro.org>
409 * Makefile.in: Remove one rule.
410 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
412 2017-10-17 Yao Qi <yao.qi@linaro.org>
414 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
415 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
417 2017-10-17 Yao Qi <yao.qi@linaro.org>
419 * configure.srv: Rename arm.o with arch/arm.o.
421 2017-10-17 Yao Qi <yao.qi@linaro.org>
423 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
424 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
425 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
426 (arch-i386.o, arch-amd64.o): Remove rules.
427 (arch/%.o): New rule.
428 Update POSTCOMPILE and COMPILE.pre.
429 * configure.ac: Invoke AC_CONFIG_COMMANDS.
430 * configure: Re-generated.
431 * configure.srv: Replace arch-i386.o with arch/i386.o.
432 Replace arch-amd64.o with arch/amd64.o.
434 2017-10-16 Yao Qi <yao.qi@linaro.org>
436 * configure: Regenerated.
438 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
440 * inferiors.h: (struct inferior_list): Remove.
441 (struct inferior_list_entry); Remove.
442 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
443 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
444 get_first_inferior): Remove.
445 (for_each_inferior, for_each_inferior_with_data, find_inferior,
446 find_inferior_id, find_inferior_in_random): Change signature.
447 * inferiors.c (all_threads): Change type to
448 std::list<thread_info *>.
449 (get_thread): Remove macro.
450 (find_inferior, find_inferior_id): Change signature, implement
452 (find_inferior_in_random): Change signature, implement using
453 find_thread_in_random.
454 (for_each_inferior, for_each_inferior_with_data): Change
455 signature, implement using for_each_thread.
456 (add_inferior_to_list, remove_inferior): Remove.
457 (add_thread, get_first_thread, thread_of_pid,
458 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
459 (get_first_inferior, one_inferior_p, clear_inferior_list):
461 (clear_inferiors, get_thread_process): Update.
462 * gdbthread.h: Include <list>.
463 (struct thread_info) <entry>: Remove field.
465 (all_threads): Change type to std::list<thread_info *>.
466 (get_first_inferior): Add doc.
467 (find_thread, for_each_thread, find_thread_in_random): New
469 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
470 * linux-arm-low.c (update_registers_callback): Update.
471 * linux-low.c (second_thread_of_pid_p): Update.
472 (kill_one_lwp_callback, linux_detach_lwp_callback,
473 delete_lwp_callback, status_pending_p_callback, same_lwp,
474 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
475 iterate_over_lwps, not_stopped_callback,
476 resume_stopped_resumed_lwps, count_events_callback,
477 select_singlestep_lwp_callback, select_event_lwp_callback,
478 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
479 suspend_and_send_sigstop_callback, wait_for_sigstop,
480 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
481 lwp_running, linux_set_resume_request, resume_status_pending_p,
482 need_step_over_p, start_step_over, linux_resume_one_thread,
483 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
484 reset_lwp_ptrace_options_callback): Update.
485 * linux-mips-low.c (update_watch_registers_callback): Update.
486 * regcache.c (regcache_invalidate_one, regcache_invalidate):
488 (free_register_cache_thread_one): Remove.
489 (regcache_release): Update.
490 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
491 handle_qxfer_threads_worker): Update.
492 (handle_query): Update, use list iterator.
493 (visit_actioned_threads, handle_pending_status,
494 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
495 clear_pending_status_callback, set_pending_status_callback,
496 find_status_pending_thread_callback, handle_status,
497 process_serial_event): Update.
498 * target.c (thread_search_callback): Update.
499 * thread-db.c (thread_db_get_tls_address): Update.
500 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
502 * win32-i386-low.c (update_debug_registers_callback): Update.
503 * win32-low.c (delete_thread_info, child_delete_thread,
504 continue_one_thread, suspend_one_thread,
505 get_child_debug_event): Adjust.
507 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
509 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
510 * inferiors.h: Include <list>.
511 (struct process_info) <entry>: Remove field.
513 (pid_of): Change macro to function.
514 (ptid_of, lwpid_of): Remove macro.
515 (all_processes): Change type to std::list<process_info *>.
516 (ALL_PROCESSES): Remove macro.
517 (for_each_process, find_process): New function.
518 * inferiors.c (all_processes): Change type to
519 std::list<process_info *>.
520 (find_thread_process): Adjust.
521 (add_process): Likewise.
522 (remove_process): Likewise.
523 (find_process_pid): Likewise.
524 (get_first_process): Likewise.
525 (started_inferior_callback): Remove.
526 (have_started_inferiors_p): Adjust.
527 (attached_inferior_callback): Remove.
528 (have_attached_inferiors_p): Adjust.
529 * linux-low.c (check_zombie_leaders): Likewise.
530 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
531 (x86_linux_update_xmltarget): Adjust.
532 * server.c (handle_query): Likewise.
533 (gdb_reattached_process): Remove.
534 (handle_status): Adjust.
535 (kill_inferior_callback): Likewise.
536 (detach_or_kill_inferior): Remove.
537 (print_started_pid): Likewise.
538 (print_attached_pid): Likewise.
539 (detach_or_kill_for_exit): Update.
540 (process_serial_event): Likewise.
541 * linux-arm-low.c (arm_new_fork): Likewise.
543 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
545 * dll.h: Include <list>.
546 (struct dll_info): Add constructor.
547 <entry>: Remove field.
548 (all_dlls): Change type to std::list<dll_info>.
549 * dll.c: Include <algorithm>.
550 (get_dll): Remove macro.
551 (all_dlls): Change type to std::list<dll_info *>.
552 (free_one_dll): Remove.
553 (match_dll): Likewise.
554 (loaded_dll): Adjust.
555 (unloaded_dll): Adjust to all_dlls type change, use
556 std::find_if. Inline code from match_dll.
557 (clear_dlls): Adjust to all_dlls type change.
558 * server.c (emit_dll_description): Remove.
559 (handle_qxfer_libraries): Adjust to all_dlls type change,
560 integrate emit_dll_description's functionality.
562 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
564 * linux-low.h (struct linux_target_ops) <delete_process>: New
566 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
567 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
568 (struct linux_target_ops): Add delete_process callback.
569 * linux-arm-low.c (arm_delete_process): New.
570 (struct linux_target_ops): Add delete_process callback.
571 * linux-bfin-low.c (struct linux_target_ops): Likewise.
572 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
573 * linux-m32r-low.c (struct linux_target_ops): Likewise.
574 * linux-mips-low.c (mips_linux_delete_process): New.
575 (struct linux_target_ops): Add delete_process callback.
576 * linux-ppc-low.c (struct linux_target_ops): Likewise.
577 * linux-s390-low.c (struct linux_target_ops): Likewise.
578 * linux-sh-low.c (struct linux_target_ops): Likewise.
579 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
580 * linux-tile-low.c (struct linux_target_ops): Likewise.
581 * linux-x86-low.c (x86_linux_delete_process): New.
582 (struct linux_target_ops): Add delete_process callback.
583 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
585 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
587 * linux-aarch64-low.c (the_low_target): Add thread delete
589 * linux-arm-low.c (arm_delete_thread): New function.
590 (the_low_target): Add thread delete callback.
591 * linux-bfin-low.c (the_low_target): Likewise.
592 * linux-crisv32-low.c (the_low_target): Likewise.
593 * linux-low.c (delete_lwp): Invoke delete_thread callback if
595 * linux-low.h (struct linux_target_ops) <delete_thread>: New
597 * linux-m32r-low.c (the_low_target): Add thread delete callback.
598 * linux-mips-low.c (mips_linux_delete_thread): New function.
599 (the_low_target): Add thread delete callback.
600 * linux-ppc-low.c (the_low_target): Likewise.
601 * linux-s390-low.c (the_low_target): Likewise.
602 * linux-sh-low.c (the_low_target): Likewise.
603 * linux-tic6x-low.c (the_low_target): Likewise.
604 * linux-tile-low.c (the_low_target): Likewise.
605 * linux-x86-low.c (the_low_target): Likewise.
606 * linux-xtensa-low.c (the_low_target): Likewise.
608 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
610 * win32-low.c: Include "common-inferior.h".
612 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
614 * inferiors.c (set_inferior_cwd): New function.
615 * server.c (handle_general_set): Handle QSetWorkingDir packet.
616 (handle_query): Inform that QSetWorkingDir is supported.
617 * win32-low.c (create_process): Pass the inferior's cwd to
620 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
622 * inferiors.c (current_inferior_cwd): New global variable.
623 (get_inferior_cwd): New function.
624 * inferiors.h (struct process_info) <cwd>: New field.
626 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
628 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
629 (OBS): Add gdb_tilde_expand.o.
631 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
633 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
634 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
636 2017-09-29 Pedro Alves <palves@redhat.com>
638 * ax.c (gdb_parse_agent_expr): Constify.
639 * ax.h (gdb_parse_agent_expr): Constify.
640 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
642 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
643 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
644 * remote-utils.h (read_ptid): Constify.
645 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
646 (process_point_options, process_serial_event): Constify.
647 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
648 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
649 (cmd_qtbuffer): Constify.
651 2017-09-29 Pedro Alves <palves@redhat.com>
653 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
656 2017-09-29 Pedro Alves <palves@redhat.com>
658 * linux-low.c (handle_extended_wait): Pass parent thread instead
659 of process to thread_db_notice_clone.
660 * linux-low.h (thread_db_notice_clone): Replace parent process
661 parameter with parent thread parameter.
662 * thread-db.c (find_one_thread): Add comment.
663 (thread_db_notice_clone): Replace parent process parameter with
664 parent thread parameter. Temporarily switch to the parent thread.
666 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
668 * gdbthread.h: Include "common-gdbthread.h".
669 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
670 "if" when validating the ptid.
671 * remote-utils.c: Include "gdbthread.h".
672 (prepare_resume_reply): Use "switch_to_thread".
673 * target.c (done_accessing_memory): Likewise.
675 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
677 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
678 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
679 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
680 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
681 s390x-gs-linux64-ipa.o to ipa_obj.
682 * linux-s390-low.c (HWCAP_S390_GS): New define.
683 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
685 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
686 (s390_arch_setup): Check for guarded-storage support and choose
688 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
689 init_registers_s390x_gs_linux64.
690 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
692 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
693 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
695 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
697 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
699 2017-09-21 Kevin Buettner <kevinb@redhat.com>
701 * linux-low.h (struct lwp_info): Add new field, thread_handle.
702 (thread_db_thread_handle): Declare.
703 * linux-low.c (linux_target_ops): Initialize thread_handle.
704 * server.c (handle_qxfer_threads_worker): Add support for
706 * target.h (struct target_ops): Add new function pointer,
708 (target_thread_handle): Define.
709 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
711 (thread_db_thread_handle): New function.
713 2017-09-21 Kevin Buettner <kevinb@redhat.com>
715 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
716 * linux-low.h (thread_db_notice_clone): Declare.
717 * thread-db.c (thread_db_notice_clone): New function.
719 2017-09-21 Pedro Alves <palves@redhat.com>
721 * server.c (gdb_read_memory, handle_status, process_serial_event)
722 (handle_serial_event, handle_target_event): Adjust to
723 set_desired_thread prototype change.
724 * target.c (set_desired_thread): Remove 'use_general' parameter
726 * target.h (set_desired_thread): Remove 'use_general' parameter.
728 2017-09-20 Tom Tromey <tom@tromey.com>
730 * target.c (target_terminal::terminal_state): Define.
731 (target_terminal::init): Rename from target_terminal_init.
732 (target_terminal::inferior): Rename from
733 target_terminal_inferior.
734 (target_terminal::ours): Rename from target_terminal_ours.
735 (target_terminal::ours_for_output, target_terminal::info): New.
737 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
739 * server.c (accumulate_file_name_length): Remove.
740 (emit_dll_description): Adjust to std::string change.
741 (handle_qxfer_libraries): Use std::string to hold document.
743 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
745 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
746 return type of xml_escape_text.
747 * server.c (emit_dll_description): Likewise.
749 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
751 * server.c (captured_main): Accept argument for --selftest.
752 Update run_tests call.
753 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
754 when registering selftests.
756 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
758 * regcache.c (get_thread_regcache): Update code to use "std::vector"
759 instead of "VEC" for "target_desc.reg_defs".
760 (regcache_cpy): Likewise.
761 (registers_to_string): Likewise.
762 (registers_from_string): Likewise.
763 (find_regno): Likewise.
764 (supply_regblock): Likewise.
765 (regcache_raw_read_unsigned): Likewise.
766 * tdesc.c (init_target_desc): Likewise.
767 (tdesc_create_reg): Likewise.
768 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
769 (struct target_desc) <reg_defs>: Convert to "std::vector".
770 (target_desc): Do not initialize "reg_defs".
771 (~target_desc): Update code to use "std::vector" instead of "VEC"
772 for "target_desc.reg_defs".
773 (operator==): Likewise.
775 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
777 * inferiors.h (thread_to_gdb_id): Remove.
778 * inferiors.c (thread_to_gdb_id): Remove.
779 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
780 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
781 lynx_store_registers, lynx_read_memory, lynx_write_memory):
783 * nto-low.c (nto_fetch_registers, nto_store_registers,
784 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
786 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
788 * inferiors.h (gdb_id_to_thread_id): Remove.
789 * inferiors.c (gdb_id_to_thread_id): Remove.
790 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
791 removal. Move pid declaration closer to where it's used.
793 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
795 * server.c (handle_detach): New function.
796 (process_serial_event): Move code out, call handle_detach.
798 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
800 * server.c (require_running): Rename to ...
801 (require_running_or_return): ... this ...
802 (require_running_or_break): ... and this.
803 (handle_query, process_serial_event): Adjust.
805 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
807 * linux-low.c (linux_set_resume_request): Remove unused
810 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
812 * server.c (first_thread_of): Remove.
813 (process_serial_event): Replace usage of first_thread_of with
814 find_any_thread_of_pid.
815 * tracepoint.c (same_process_p): Remove.
816 (gdb_agent_about_to_close): Replace usage of same_process_p with
817 find_any_thread_of_pid.
818 * linux-x86-low.c (same_process_callback): Remove.
819 (x86_arch_setup_process_callback): Replace usage of
820 same_process_callback with find_any_thread_of_pid.
821 * thread-db.c (any_thread_of): Remove.
822 (switch_to_process): Replace usage of any_thread_of with
823 find_any_thread_of_pid.
824 * inferiors.c (thread_pid_matches_callback): Remove.
825 (find_thread_process): Adjust to use find_any_thread_of_pid.
827 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
829 * regcache.c (get_thread_regcache): Guard calls to "memset"
832 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
834 * linux-low.c (handle_extended_wait): Use
835 "allocate_target_description" instead of "XNEW".
836 * linux-x86-low.c (initialize_low_arch): Likewise.
838 2017-09-05 Yao Qi <yao.qi@linaro.org>
840 * configure.srv (srv_i386_regobj): Remove.
841 (srv_amd64_regobj): Remove.
842 (srv_regobj): Set it to "" for x86 non-linux targets.
843 * linux-x86-tdesc.c (i386_linux_read_description):
844 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
845 (init_registers_i386): Remove the declaration.
846 (tdesc_i386): Remove the declaration.
847 (lynx_i386_arch_setup): Call i386_create_target_description.
848 * nto-x86-low.c: Likewise.
849 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
850 [!__x86_64__]: include arch/i386.h.
851 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
853 2017-09-05 Yao Qi <yao.qi@linaro.org>
855 * configure.srv (srv_amd64_linux_xmlfiles): Remove
856 i386/amd64-XXX-linux from it.
858 2017-09-05 Yao Qi <yao.qi@linaro.org>
860 * configure.srv: Empty srv_amd64_linux_regobj if $development is
862 (ipa_amd64_linux_regobj): Remove.
863 (ipa_x32_linux_regobj): Remove.
865 2017-09-05 Yao Qi <yao.qi@linaro.org>
867 * Makefile.in (arch-amd64.o): New rule.
868 * configure.srv: Append arch-amd64.o.
869 * linux-amd64-ipa.c: Include common/x86-xstate.h.
870 (get_ipa_tdesc): Call amd64_linux_read_description.
871 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
872 and init_registers_amd64_XXX.
873 * linux-x86-low.c (x86_linux_read_description): Call
874 amd64_linux_read_description.
875 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
876 (initialize_low_arch): Don't call init_registers_x32_XXX and
877 init_registers_amd64_XXX.
878 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
880 [__x86_64__] (amd64_tdesc_test): New function.
881 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
882 and init_registers_amd64_XXX.
883 * linux-x86-tdesc.c: Include arch/amd64.h.
884 (xcr0_to_tdesc_idx): New function.
885 (i386_linux_read_description): New function.
886 (amd64_get_ipa_tdesc_idx): New function.
887 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
888 (amd64_get_ipa_tdesc): Declare.
890 2017-09-05 Yao Qi <yao.qi@linaro.org>
892 * configure.srv (srv_i386_linux_xmlfiles): Remove
893 i386/i386-XXX-linux.xml from it.
895 2017-09-05 Yao Qi <yao.qi@linaro.org>
897 * configure.srv: Set srv_i386_linux_regobj empty if $development
899 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
900 initialize_low_tdesc.
901 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
902 with #if initialize_low_tdesc.
903 * linux-x86-tdesc-selftest.c: New file.
904 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
906 2017-09-05 Yao Qi <yao.qi@linaro.org>
908 * Makefile.in (arch-i386.o): New rule.
909 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
910 (x86_64-*-linux*): Likewise.
911 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
913 (i386_linux_read_description): Remove code and call
914 i386_create_target_description.
915 * tdesc.c (allocate_target_description): New function.
916 * tdesc.h (set_tdesc_architecture): Remove declaration.
917 (set_tdesc_osabi): Likewise.
919 2017-09-05 Yao Qi <yao.qi@linaro.org>
921 * linux-x86-tdesc.c: Don't include <inttypes.h>.
922 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
923 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
925 * server.c (get_features_xml): Call tdesc_get_features_xml.
926 * tdesc.c (set_tdesc_architecture): New function.
927 (set_tdesc_osabi): New function.
928 (tdesc_get_features_xml): New function.
929 (tdesc_create_feature): Add an argument.
930 * tdesc.h (struct target_desc) <features>: New field.
931 <arch, osabi>: New field.
932 (~target_desc): xfree features, arch, and osabi.
933 (target_desc::oerator==): Don't compare .xmltarget.
934 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
935 (set_tdesc_osabi): Likewise.
936 (tdesc_get_features_xml): Likewise.
938 2017-09-05 Yao Qi <yao.qi@linaro.org>
940 * linux-x86-tdesc.c: Include selftest.h.
941 (i386_tdesc_test): New function.
942 (initialize_low_tdesc): Call selftests::register_test.
943 * tdesc.h: Include regdef.h.
944 (target_desc): Override operator == and !=.
946 2017-09-05 Yao Qi <yao.qi@linaro.org>
948 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
950 * linux-i386-ipa.c: Include common/x86-xstate.h
951 (get_ipa_tdesc): Call i386_linux_read_description.
952 (initialize_low_tracepoint): Don't call init_registers_XXX
953 functions, call initialize_low_tdesc instead.
954 * linux-x86-low.c (x86_linux_read_description): Call
955 i386_linux_read_description.
956 (initialize_low_arch): Don't call init_registers_i386_XXX
957 functions, call initialize_low_tdesc.
958 * linux-x86-tdesc.c: New file.
959 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
960 (i386_get_ipa_tdesc_idx): Declare.
961 (i386_get_ipa_tdesc): Declare.
962 (initialize_low_tdesc): Declare.
964 2017-09-05 Yao Qi <yao.qi@linaro.org>
966 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
969 2017-09-05 Yao Qi <yao.qi@linaro.org>
971 * Makefile.in (IPA_OBJS): Add vec-ipa.o
972 * regcache.c (get_thread_regcache): Use VEC_length.
973 (init_register_cache): Likewise.
974 (regcache_cpy): Likewise.
975 (registers_to_string): Iterate reg_defs via VEC_iterate.
976 (find_regno): Likewise.
977 (find_register_by_number): Use VEC_index.
978 (register_size): Call find_register_by_number.
979 (register_data): Call find_register_by_number.
980 (supply_regblock): Use VEC_length.
981 (regcache_raw_read_unsigned): Likewise.
982 * tdesc.c (init_target_desc): Iterate reg_defs via
984 (default_description): Update initializer.
985 (copy_target_description): Don't update field num_registers.
986 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
987 <num_registers>: Remove.
989 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
991 * Makefile.in (.SECONDARY): Define target.
993 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
995 * linux-low.c (linux_wait_1): Adjust.
996 * server.c (queue_stop_reply_callback): Adjust.
998 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1000 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1001 QEnvironmentUnset and QEnvironmentReset packets.
1002 (handle_query): Inform remote that QEnvironmentHexEncoded,
1003 QEnvironmentUnset and QEnvironmentReset are supported.
1005 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1007 * inferiors.h (inferior_target_data): Rename to ...
1008 (thread_target_data): ... this.
1009 (inferior_regcache_data): Rename to ...
1010 (thread_regcache_data): ... this.
1011 (set_inferior_regcache_data): Rename to ...
1012 (set_thread_regcache_data): ... this.
1013 * inferiors.c (inferior_target_data): Rename to ...
1014 (thread_target_data): ... this.
1015 (inferior_regcache_data): Rename to ...
1016 (thread_regcache_data): ... this.
1017 (set_inferior_regcache_data): Rename to ...
1018 (set_thread_regcache_data): ... this.
1019 (free_one_thread): Update.
1020 * linux-low.h (get_thread_lwp): Update.
1021 * regcache.c (get_thread_regcache): Update.
1022 (regcache_invalidate_thread): Update.
1023 (free_register_cache_thread): Update.
1024 * win32-i386-low.c (update_debug_registers_callback): Update.
1025 (win32_get_current_dr): Update.
1026 * win32-low.c (thread_rec): Update.
1027 (delete_thread_info): Update.
1028 (continue_one_thread): Update.
1029 (suspend_one_thread): Update.
1031 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1033 * inferiors.c (set_inferior_target_data): Remove.
1034 * inferiors.h (set_inferior_target_data): Remove.
1036 2017-08-18 Yao Qi <yao.qi@linaro.org>
1038 * Makefile.in (OBS): Add selftest.o.
1039 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1040 * configure, config.in: Re-generated.
1041 * server.c: Include common/sefltest.h.
1042 (captured_main): Handle option --selftest.
1044 2017-08-09 Yao Qi <yao.qi@linaro.org>
1046 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1047 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1048 i386-avx-mpx.o and i386-mmx.o.
1049 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1050 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1051 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1052 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1053 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1054 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1055 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1056 i386/amd64-avx-mpx.xml.
1058 2017-08-09 Yao Qi <yao.qi@linaro.org>
1060 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1061 and x32-avx-avx512.o.
1062 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1063 i386/x32-avx-avx512.xml.
1065 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1067 * tracepoint.h (enum class fast_tpoint_collect_result): New
1069 (fast_tracepoint_collecting): Change return type to
1070 fast_tpoint_collect_result.
1071 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1072 * linux-low.h: Include tracepoint.h.
1073 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1074 fast_tpoint_collect_result.
1075 * linux-low.c (handle_tracepoints): Adjust.
1076 (linux_fast_tracepoint_collecting): Change return type to
1077 fast_tpoint_collect_result.
1078 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1079 linux_wait_1, stuck_in_jump_pad_callback,
1080 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1081 proceed_one_lwp): Adjust to type change.
1083 2017-07-10 Yao Qi <yao.qi@linaro.org>
1085 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1087 2017-06-29 Yao Qi <yao.qi@linaro.org>
1089 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1091 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1093 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1095 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1097 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1099 * linux-low.c (linux_create_inferior): Adjust code to access the
1100 environment information via 'gdb_environ' class.
1101 * lynx-low.c (lynx_create_inferior): Likewise.
1102 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1103 (get_environ): Return a pointer to 'our_environ'.
1104 (captured_main): Initialize 'our_environ'.
1105 * server.h (get_environ): Adjust prototype.
1106 * spu-low.c (spu_create_inferior): Adjust code to access the
1107 environment information via 'gdb_environ' class.
1109 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1111 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1112 usage of "register" keyword.
1114 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1116 * configure: Re-generate.
1118 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1120 * configure: Re-generate.
1122 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1124 * Makefile.in (COMPILE.pre): Add "-x c++".
1126 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1128 * fork-child.c: Conditionally include <signal.h>.
1130 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1132 * server.c (handle_general_set): Handle new packet
1133 "QStartupWithShell".
1134 (handle_query): Add "QStartupWithShell" to the list of supported
1136 (gdbserver_usage): Add help text explaining the
1137 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1139 (captured_main): Recognize and act upon the presence of the new
1142 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1143 Pedro Alves <palves@redhat.com>
1145 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1146 * configure: Regenerate.
1147 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1149 (i[34567]86-*-lynxos*): Likewise.
1150 (spu*-*-*): Likewise.
1151 * fork-child.c: New file.
1152 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1154 (linux_ptrace_fun): New function.
1155 (linux_create_inferior): Adjust function prototype to reflect
1156 change on "target.h". Adjust function code to use
1158 (linux_request_interrupt): Delete "signal_pid".
1159 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1160 (lynx_ptrace_fun): New function.
1161 (lynx_create_inferior): Adjust function prototype to reflect
1162 change on "target.h". Adjust function code to use
1164 * nto-low.c (nto_create_inferior): Adjust function prototype and
1165 code to reflect change on "target.h". Update comments.
1166 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1167 "common-terminal.h" and "environ.h".
1168 (terminal_fd): Moved to fork-child.c.
1169 (old_foreground_pgrp): Likewise.
1170 (restore_old_foreground_pgrp): Likewise.
1171 (last_status): Make it global.
1172 (last_ptid): Likewise.
1173 (our_environ): New variable.
1174 (startup_with_shell): Likewise.
1175 (program_name): Likewise.
1176 (program_argv): Rename to...
1177 (program_args): ...this.
1178 (wrapper_argv): New variable.
1179 (start_inferior): Delete function.
1180 (get_exec_wrapper): New function.
1181 (get_exec_file): Likewise.
1182 (get_environ): Likewise.
1183 (prefork_hook): Likewise.
1184 (post_fork_inferior): Likewise.
1185 (postfork_hook): Likewise.
1186 (postfork_child_hook): Likewise.
1187 (handle_v_run): Update code to deal with arguments coming from the
1188 remote host. Update calls from "start_inferior" to
1190 (captured_main): Likewise. Initialize environment variable. Call
1192 * server.h (post_fork_inferior): New prototype.
1193 (get_environ): Likewise.
1194 (last_status): Declare.
1195 (last_ptid): Likewise.
1196 (signal_pid): Likewise.
1197 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1198 (spu_ptrace_fun): New function.
1199 (spu_create_inferior): Adjust function prototype to reflect change
1200 on "target.h". Adjust function code to use "fork_inferior".
1201 * target.c (target_terminal_init): New function.
1202 (target_terminal_inferior): Likewise.
1203 (target_terminal_ours): Likewise.
1204 * target.h: Include <vector>.
1205 (struct target_ops) <create_inferior>: Update prototype.
1206 (create_inferior): Update macro.
1207 * utils.c (gdb_flush_out_err): New function.
1208 * win32-low.c (win32_create_inferior): Adjust function prototype
1209 and code to reflect change on "target.h".
1211 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1213 * inferiors.c (switch_to_thread): New function.
1215 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1217 * Makefile.in (SFILE): Add "common/job-control.c".
1218 (OBS): Add "job-control.o".
1220 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1222 * Makefile: Remove "@host_makefile_frag@".
1224 2017-05-05 Pedro Alves <palves@redhat.com>
1226 * configure: Regenerate.
1228 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1230 * configure: Regenerate.
1232 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1234 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1235 software_single_step change of return type to
1236 std::vector<CORE_ADDR>.
1237 * linux-low.c (install_software_single_step_breakpoints):
1239 * linux-low.h (install_software_single_step_breakpoints):
1242 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1244 * remote-utils.c: Include "gdb_termios.h" instead of
1246 * terminal.h: Delete file.
1248 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1250 * server.c: Include <vector>.
1251 <program_argv, wrapper_argv>: Convert to std::vector.
1252 (start_inferior): Rewrite function to use C++.
1253 (handle_v_run): Likewise. Update code that calculates the argv
1254 based on the vRun packet; use C++.
1255 (captured_main): Likewise.
1257 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1259 * server.c (handle_v_cont): Initialize thread_resume::thread
1262 2017-04-05 Pedro Alves <palves@redhat.com>
1264 * configure: Regenerate.
1266 2017-04-05 Pedro Alves <palves@redhat.com>
1268 * gdbreplay.c (sync_error): Constify.
1269 * linux-x86-low.c (push_opcode): Constify.
1271 2017-04-05 Pedro Alves <palves@redhat.com>
1273 * win32-low.c (get_child_debug_event)
1274 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1275 Report TARGET_WAITKIND_SPURIOUS instead.
1277 2017-04-05 Pedro Alves <palves@redhat.com>
1279 * remote-utils.c (remote_prepare, remote_open): Constify.
1280 * remote-utils.h (remote_prepare, remote_open): Constify.
1281 * server.c (captured_main): Constify 'port' handling.
1283 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1285 * Makefile.in (clean): Clear .deps.
1287 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1289 * .gitignore: Remove generated files, replace with wildcard.
1290 * (clean): Replace removal of generated files with wildcard.
1291 (version.c): Replace with...
1292 (version-generated.c): ...this.
1293 (xml-builtin.c): Replace with...
1294 (xml-builtin-generated.c): ...this.
1295 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1296 (%.c: *regformats*): Replace with...
1297 (%-generated.c: *regformats*): ...this.
1299 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1301 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1302 (xtensa_fill_gregset): Call collect_register_by_name for
1304 (xtensa_store_gregset): Call supply_register_by_name for
1307 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1309 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1310 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1311 (xtensa_store_gregset): Call supply_register for all registers in
1312 a0_regnum..a0_regnum + C0_NREGS range.
1314 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1316 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1317 (ax-ipa.o: ax.c): Remove.
1318 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1319 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1320 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1321 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1322 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1324 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1326 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1327 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1328 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1329 (errors-ipa.o: ../common/errors.c): Remove.
1330 (format-ipa.o: ../common/format.c): Remove.
1331 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1333 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1335 * Makefile.in (%-ipa.o: %.c): New rule.
1336 (tracepoint-ipa.o: tracepoint.c): Remove.
1337 (utils-ipa.o: utils.c): Remove.
1338 (remote-utils-ipa.o: remote-utils.c): Remove.
1339 (regcache-ipa.o: regcache.c): Remove.
1340 (i386-linux-ipa.o: i386-linux.c): Remove.
1341 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1342 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1343 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1344 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1345 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1346 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1347 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1348 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1349 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1350 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1351 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1352 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1353 (aarch64-ipa.o: aarch64.c): Remove.
1354 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1355 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1356 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1357 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1358 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1359 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1360 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1361 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1362 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1363 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1364 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1365 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1366 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1367 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1368 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1369 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1370 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1371 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1372 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1373 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1374 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1375 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1376 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1377 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1378 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1379 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1380 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1381 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1382 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1383 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1384 (tdesc-ipa.o: tdesc.c): Remove.
1385 (x32-linux-ipa.o: x32-linux.c): Remove.
1386 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1387 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1389 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1391 * Makefile.in (%.o: ../arch/%.c): New rule.
1392 (arm.o: ../arch/arm.c): Remove.
1393 (arm-linux.o: ../arch/arm-linux.c): Remove.
1394 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1395 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1397 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1399 * Makefile.in (%.o: ../nat/%.c): New rule.
1400 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1401 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1402 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1403 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1404 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1405 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1406 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1407 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1408 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1409 (linux-personality.o: ../nat/linux-personality.c): Remove.
1410 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1411 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1412 (x86-linux.o: ../nat/x86-linux.c): Remove.
1413 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1414 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1416 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1418 * Makefile.in (%.o: ../common/%.c): New rule.
1419 (signals.o: ../common/signals.c): Remove.
1420 (print-utils.o: ../common/print-utils.c): Remove.
1421 (rsp-low.o: ../common/rsp-low.c): Remove.
1422 (common-utils.o: ../common/common-utils.c): Remove.
1423 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1424 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1425 (vec.o: ../common/vec.c): Remove.
1426 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1427 (xml-utils.o: ../common/xml-utils.c): Remove.
1428 (ptid.o: ../common/ptid.c): Remove.
1429 (buffer.o: ../common/buffer.c): Remove.
1430 (format.o: ../common/format.c): Remove.
1431 (filestuff.o: ../common/filestuff.c): Remove.
1432 (agent.o: ../common/agent.c): Remove.
1433 (errors.o: ../common/errors.c): Remove.
1434 (environ.o: ../common/environ.c): Remove.
1435 (common-debug.o: ../common/common-debug.c): Remove.
1436 (cleanups.o: ../common/cleanups.c): Remove.
1437 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1438 (fileio.o: ../common/fileio.c): Remove.
1439 (common-regcache.o: ../common/common-regcache.c): Remove.
1440 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1441 (new-op.o: ../common/new-op.c): Remove.
1442 (btrace-common.o: ../common/btrace-common.c): Remove.
1444 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1446 * Makefile.in (%.o: ../target/%.c): New rule.
1447 (waitstatus.o: ../target/waitstatus.c): Remove.
1449 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1452 (%.c: ../regformats/%.dat,
1453 (%.c: ../regformats/arm/%.dat,
1454 (%.c: ../regformats/i386/%.dat,
1455 (%.c: ../regformats/rs6000/%.dat): New rules.
1456 (aarch64.c): Remove.
1457 (reg-arm.c): Remove.
1458 (arm-with-iwmmxt.c): Remove.
1459 (arm-with-vfpv2.c): Remove.
1460 (arm-with-vfpv3.c): Remove.
1461 (arm-with-neon.c): Remove.
1462 (reg-bfin.c): Remove.
1463 (reg-cris.c): Remove.
1464 (reg-crisv32.c): Remove.
1466 (i386-linux.c): Remove.
1467 (i386-avx.c): Remove.
1468 (i386-avx-linux.c): Remove.
1469 (i386-avx-avx512.c): Remove.
1470 (i386-avx-avx512-linux.c): Remove.
1471 (i386-mpx.c): Remove.
1472 (i386-mpx-linux.c): Remove.
1473 (i386-avx-mpx-avx512-pku.c): Remove.
1474 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1475 (i386-avx-mpx.c): Remove.
1476 (i386-avx-mpx-linux.c): Remove.
1477 (i386-mmx.c): Remove.
1478 (i386-mmx-linux.c): Remove.
1479 (reg-ia64.c): Remove.
1480 (reg-m32r.c): Remove.
1481 (reg-m68k.c): Remove.
1483 (mips-linux.c): Remove.
1484 (mips-dsp-linux.c): Remove.
1485 (mips64-linux.c): Remove.
1486 (mips64-dsp-linux.c): Remove.
1487 (nios2-linux.c): Remove.
1488 (powerpc-32.c): Remove.
1489 (powerpc-32l.c): Remove.
1490 (powerpc-altivec32l.c): Remove.
1491 (powerpc-cell32l.c): Remove.
1492 (powerpc-vsx32l.c): Remove.
1493 (powerpc-isa205-32l.c): Remove.
1494 (powerpc-isa205-altivec32l.c): Remove.
1495 (powerpc-isa205-vsx32l.c): Remove.
1496 (powerpc-e500l.c): Remove.
1497 (powerpc-64l.c): Remove.
1498 (powerpc-altivec64l.c): Remove.
1499 (powerpc-cell64l.c): Remove.
1500 (powerpc-vsx64l.c): Remove.
1501 (powerpc-isa205-64l.c): Remove.
1502 (powerpc-isa205-altivec64l.c): Remove.
1503 (powerpc-isa205-vsx64l.c): Remove.
1504 (s390-linux32.c): Remove.
1505 (s390-linux32v1.c): Remove.
1506 (s390-linux32v2.c): Remove.
1507 (s390-linux64.c): Remove.
1508 (s390-linux64v1.c): Remove.
1509 (s390-linux64v2.c): Remove.
1510 (s390-te-linux64.c): Remove.
1511 (s390-vx-linux64.c): Remove.
1512 (s390-tevx-linux64.c): Remove.
1513 (s390x-linux64.c): Remove.
1514 (s390x-linux64v1.c): Remove.
1515 (s390x-linux64v2.c): Remove.
1516 (s390x-te-linux64.c): Remove.
1517 (s390x-vx-linux64.c): Remove.
1518 (s390x-tevx-linux64.c): Remove.
1519 (tic6x-c64xp-linux.c): Remove.
1520 (tic6x-c64x-linux.c): Remove.
1521 (tic6x-c62x-linux.c): Remove.
1523 (reg-sparc64.c): Remove.
1524 (reg-spu.c): Remove.
1526 (amd64-linux.c): Remove.
1527 (amd64-avx.c): Remove.
1528 (amd64-avx-linux.c): Remove.
1529 (amd64-avx-avx512.c): Remove.
1530 (amd64-avx-avx512-linux.c): Remove.
1531 (amd64-mpx.c): Remove.
1532 (amd64-mpx-linux.c): Remove.
1533 (amd64-avx-mpx-avx512-pku.c): Remove.
1534 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1535 (amd64-avx-mpx.c): Remove.
1536 (amd64-avx-mpx-linux.c): Remove.
1538 (x32-linux.c): Remove.
1539 (x32-avx.c): Remove.
1540 (x32-avx-linux.c): Remove.
1541 (x32-avx-avx512.c): Remove.
1542 (x32-avx-avx512-linux.c): Remove.
1543 (reg-xtensa.c): Remove.
1544 (reg-tilegx.c): Remove.
1545 (reg-tilegx32.c): Remove.
1547 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1549 * Makefile.in (SFILES): Add "common/environ.c".
1550 (OBJS): Add "common/environ.h".
1552 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1554 * configure.ac: Check if the fs_base and gs_base members of
1555 `struct user_regs_struct' exist.
1556 * config.in: Regenerated.
1557 * configure: Likewise.
1559 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1561 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1563 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1564 (get_next_pcs_syscall_next_pc): Likewise.
1566 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1568 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1569 * nto-x86-low.c: Likewise.
1571 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1573 * Makefile.in: Include disable-implicit-rules.mk.
1575 2016-11-23 Pedro Alves <palves@redhat.com>
1577 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1578 (debug_vprintf): Use std::chrono::steady_clock instead of
1579 gettimeofday. Use '.' instead of ':'.
1580 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1581 (get_timestamp): Use std::chrono::steady_clock instead of
1584 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1586 * Makefile.in: Fix whitespace formatting.
1588 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1590 * Makefile.in (SFILES, OBS): Flatten list and order
1593 2016-11-23 Pedro Alves <palves@redhat.com>
1595 * event-loop.c (handle_file_event): Use warning.
1596 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1597 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1600 2016-11-23 Pedro Alves <palves@redhat.com>
1602 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1604 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1605 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1606 debug_printf and debug_flush for debug output.
1607 * server.c (handle_general_set): Likewise.
1608 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1611 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1613 * Makefile.in (.c.o): Replace rule with ...
1614 (%.o: %.c): ... this one.
1616 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1618 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1619 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1621 * configure.ac: Remove checks for the make program.
1622 * configure: Re-generate.
1624 2016-10-28 Pedro Alves <palves@redhat.com>
1626 * Makefile.in (CXX_DIALECT): Get from configure.
1627 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1628 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1629 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1630 * config.in: Regenerate.
1631 * configure: Regenerate.
1633 2016-10-27 Yao Qi <yao.qi@linaro.org>
1635 * linux-low.c (linux_supports_range_stepping): Return true if
1636 can_software_single_step return true.
1638 2016-10-27 Yao Qi <yao.qi@linaro.org>
1640 * inferiors.c (find_inferior_in_random): New function.
1641 * inferiors.h (find_inferior_in_random): Declare.
1642 * linux-low.c (linux_wait_for_event_filtered): Call
1643 find_inferior_in_random instead of find_inferior.
1645 2016-10-27 Yao Qi <yao.qi@linaro.org>
1647 * linux-low.c (linux_wait_1): If single-step breakpoints are
1648 inserted, remove them.
1650 2016-10-26 Pedro Alves <palves@redhat.com>
1652 * linux-low.c (handle_extended_wait): Link parent/child fork
1654 (linux_wait_1): Unlink them.
1655 (linux_set_resume_request): Ignore resume requests for
1656 already-resumed and unhandled fork child threads.
1657 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1658 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1660 (handle_v_requests) <vCont>: Don't call require_running.
1661 * server.h (in_queued_stop_replies): New declaration.
1663 2016-10-24 Yao Qi <yao.qi@linaro.org>
1666 * linux-aarch64-low.c (append_insns): Cast the return value to
1669 2016-10-10 Yao Qi <yao.qi@linaro.org>
1671 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1673 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1675 * target.c (target_supports_multi_process): New function, moved
1677 * target.h (target_supports_multi_process): ... here. Remove
1680 2016-10-05 Tom Tromey <tom@tromey.com>
1683 * tracepoint.c (handle_tracepoint_bkpts): Check
1684 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1686 2016-10-05 Yao Qi <yao.qi@linaro.org>
1688 * configure.srv: Update the path of arm-*.xml files.
1690 2016-10-05 Terry Guo <terry.guo@arm.com>
1691 Yao Qi <yao.qi@linaro.org>
1693 * Makefile.in: Adjust the path of rules.
1694 * configure.srv: Update the path of xml files.
1695 * regformats/arm-with-iwmmxt.dat: Regenerated.
1696 * regformats/arm-with-neon.dat: Likewise.
1697 * regformats/arm-with-vfpv2.dat: Likewise.
1698 * regformats/arm-with-vfpv3.dat Likewise.
1700 2016-09-30 Yao Qi <yao.qi@linaro.org>
1703 * target.c (target_stop_and_wait): Don't call
1704 target_continue_no_signal, use resume_stop instead.
1706 2016-09-26 Yao Qi <yao.qi@linaro.org>
1708 * linux-low.c (linux_wait_1): Call debug_exit.
1710 2016-09-23 Pedro Alves <palves@redhat.com>
1712 * Makefile.in (SFILES): Add common/new-op.c.
1713 (OBS): Add common/new-op.o.
1714 (new-op.o): New rule.
1716 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1718 * .gitinore: Ignore more files.
1720 2016-09-21 Yao Qi <yao.qi@linaro.org>
1722 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1725 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1727 * server.c (start_inferior): Call target_mourn_inferior instead of
1728 mourn_inferior; pass ptid_t argument to it.
1730 (handle_target_event): Likewise.
1731 * target.c (target_mourn_inferior): New function.
1732 * target.h (mourn_inferior): Delete macro.
1734 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1736 * linux-low.c (lwp_is_stepping): New function.
1738 2016-09-06 Carl Love <cel@us.ibm.com>
1740 * server.c (start_inferior): Fixed comment, requested comment change
1741 didn't get updated correctly. Removed reference to ptrace () call as
1742 it is only true on Linux systems.
1744 2016-09-06 Carl Love <cel@us.ibm.com>
1746 * server.c (start_inferior): Do not call
1747 function target_post_create_inferior () if the
1748 inferior process has already exited.
1750 2016-09-05 Pedro Alves <palves@redhat.com>
1752 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1753 (COMPILE.pre, CC_LD): Use CXX directly.
1754 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1755 * acinclude.m4: Don't include build-with-cxx.m4.
1756 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1757 * configure: Regenerate.
1759 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1762 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1763 call writing data to own_buf.
1765 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1767 * target.c (mywait): Call target_wait instead of
1769 (target_wait): New function.
1771 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1773 * server.c (start_inferior): New variable 'ptid'. Replace calls
1774 to the_target->resume by target_continue{,_no_signal}, depending
1776 * target.c (target_stop_and_wait): Call target_continue_no_signal
1777 instead of the_target->resume.
1778 (target_continue): New function.
1780 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1782 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1784 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1787 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1789 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1790 * linux-arm-low.c (ps_get_thread_area): Likewise.
1791 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1792 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1793 * linux-mips-low.c (ps_get_thread_area): Likewise.
1794 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1795 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1796 * linux-x86-low.c (ps_get_thread_area): Likewise.
1797 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1799 2016-08-19 Pedro Alves <palves@redhat.com>
1801 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1803 2016-08-19 Pedro Alves <palves@redhat.com>
1805 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1806 comment. Use memcpy instead of casting through unsigned long.
1808 2016-08-19 Pedro Alves <palves@redhat.com>
1810 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1811 allocating around 0x80000000.
1813 2016-08-19 Pedro Alves <palves@redhat.com>
1816 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1817 (x32-avx512-linux-ipa.o): New rules.
1818 * configure.ac (x86_64-*-linux*): New x32 check.
1819 * configure.srv (ipa_x32_linux_regobj): New.
1820 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1821 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1823 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1825 * configure: Regenerate.
1827 2016-08-09 Pedro Alves <palves@redhat.com>
1830 * Makefile.in (OBS): Add signals-state-save-restore.o.
1831 (signals-state-save-restore.o): New rule.
1832 * config.in: Regenerate.
1833 * configure: Regenerate.
1834 * linux-low.c: Include "signals-state-save-restore.h".
1835 (linux_create_inferior): Call
1836 restore_original_signals_state.
1837 * server.c: Include "dispositions-save-restore.h".
1838 (captured_main): Call save_original_signals_state.
1840 2016-08-05 Pedro Alves <palves@redhat.com>
1842 * configure: Regenerate.
1844 2016-08-04 Yao Qi <yao.qi@linaro.org>
1846 * linux-low.c (regsets_fetch_inferior_registers): Check
1847 errno is ESRCH or not.
1849 2016-08-02 Yao Qi <yao.qi@linaro.org>
1851 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1852 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1853 (thread_db_load_search): Update.
1854 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1855 td_ta_set_event and td_ta_event_getmsg.
1857 2016-07-26 Pedro Alves <palves@redhat.com>
1860 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1861 of unsigned long for 64-bit registers and use uint32_t instead of
1862 unsigned int for 32-bit registers.
1864 2016-07-26 Pedro Alves <palves@redhat.com>
1866 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1869 2016-07-21 Tom Tromey <tom@tromey.com>
1871 * configure: Rebuild.
1873 2016-07-21 Yao Qi <yao.qi@linaro.org>
1875 * mem-break.c (find_gdb_breakpoint): Cast bp to
1876 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1878 2016-07-21 Yao Qi <yao.qi@linaro.org>
1880 * server.c (handle_v_requests): Support s and S actions
1881 if target_supports_software_single_step return true.
1883 2016-07-21 Yao Qi <yao.qi@linaro.org>
1885 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1886 is resume_step, call maybe_hw_step.
1887 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1889 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1891 (proceed_one_lwp): If resume request is resume_step, install
1892 reinsert breakpoints and call maybe_hw_step.
1894 2016-07-21 Yao Qi <yao.qi@linaro.org>
1896 * linux-low.c (proceed_one_lwp): Declare.
1897 (linux_resume_one_thread): Remove local variable 'step'.
1898 Lift code enqueue signal. Call proceed_one_lwp instead of
1899 linux_resume_one_lwp.
1901 2016-07-21 Yao Qi <yao.qi@linaro.org>
1903 * linux-low.c (linux_resume_one_thread): Call
1904 enqueue_pending_signal.
1906 2016-07-21 Yao Qi <yao.qi@linaro.org>
1908 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1909 * inferiors.c (do_restore_current_thread_cleanup): New function.
1910 (make_cleanup_restore_current_thread): Likewise.
1911 * linux-low.c (install_software_single_step_breakpoints): Call
1912 make_cleanup_restore_current_thread. Switch current_thread to
1915 2016-07-21 Yao Qi <yao.qi@linaro.org>
1917 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1918 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1919 (clone_one_breakpoint): Likewise.
1920 (delete_reinsert_breakpoints): Change parameter to thread.
1922 (has_reinsert_breakpoints): Likewise.
1923 (uninsert_reinsert_breakpoints): Likewise.
1924 (reinsert_reinsert_breakpoints): Likewise.
1925 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1926 (delete_reinsert_breakpoints): Likewise.
1927 (reinsert_reinsert_breakpoints): Likewise.
1928 (uninsert_reinsert_breakpoints): Likewise.
1929 (has_reinsert_breakpoints): Likewise.
1931 2016-07-21 Yao Qi <yao.qi@linaro.org>
1933 * inferiors.c (get_thread_process): Make parameter const.
1934 * inferiors.h (get_thread_process): Update declaration.
1935 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1936 Add new parameters child_thread and parent_thread. Callers
1938 * mem-break.h (clone_all_breakpoints): Update declaration.
1940 2016-07-21 Yao Qi <yao.qi@linaro.org>
1942 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1943 <command_list, handler>: Remove.
1944 (struct gdb_breakpoint): New.
1945 (struct other_breakpoint): New.
1946 (struct reinsert_breakpoint): New.
1947 (is_gdb_breakpoint): New function.
1948 (any_persistent_commands): Update command_list if
1949 is_gdb_breakpoint returns true.
1950 (set_breakpoint): Create breakpoints according to their types.
1951 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1952 (set_gdb_breakpoint_1): Likewise.
1953 (set_gdb_breakpoint): Likewise.
1954 (clear_breakpoint_conditions): Change parameter type to
1955 'struct gdb_breakpoint *'.
1956 (clear_breakpoint_commands): Likewise.
1957 (clear_breakpoint_conditions_and_commands): Likewise.
1958 (add_condition_to_breakpoint): Likewise.
1959 (add_breakpoint_condition): Likewise.
1960 (add_commands_to_breakpoint): Likewise.
1961 (check_breakpoints): Check other_breakpoint.
1962 (clone_one_breakpoint): Clone breakpopint according to its type.
1963 * mem-break.h (struct gdb_breakpoint): Declare.
1964 (set_gdb_breakpoint): Update declaration.
1965 (clear_breakpoint_conditions_and_commands): Likewise.
1966 (add_breakpoint_condition): Likewise.
1967 (add_breakpoint_commands): Likewise.
1968 * server.c (process_point_options): Change parameter type to
1969 'struct gdb_breakpoint *'.
1971 2016-07-21 Yao Qi <yao.qi@linaro.org>
1973 * mem-break.c (set_breakpoint_at): Rename it to ...
1974 (set_breakpoint_type_at): ... it.
1975 (set_breakpoint_at): Call set_breakpoint_type_at.
1976 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1977 * mem-break.h (set_breakpoint_at): Update comments.
1979 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1981 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1983 (nios2_store_gregset): Likewise.
1985 2016-07-01 Pedro Alves <palves@redhat.com>
1986 Antoine Tremblay <antoine.tremblay@ericsson.com>
1988 * linux-low.c: Change interface to take the target lwp_info
1989 pointer directly and return void. Handle detaching from a zombie
1991 (linux_detach_lwp_callback): New function.
1992 (linux_detach): Detach from the leader thread after detaching from
1995 2016-06-28 Yao Qi <yao.qi@linaro.org>
1997 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1998 for variable new_offset.
1999 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2000 (aarch64_ftrace_insn_reloc_cb): Likewise.
2001 (aarch64_ftrace_insn_reloc_tb): Likewise.
2002 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2003 PRIx64 instead of PRIx32.
2005 2016-06-28 Yao Qi <yao.qi@linaro.org>
2007 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2008 (the_low_target): Install arm_get_syscall_trapinfo.
2010 2016-06-28 Yao Qi <yao.qi@linaro.org>
2012 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2014 (the_low_target): Install aarch64_get_syscall_trapinfo.
2016 2016-06-28 Yao Qi <yao.qi@linaro.org>
2018 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2020 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2021 Remove parameter sysno.
2022 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2025 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2027 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2028 (s390_emit_ne_goto): Likewise.
2029 (s390_emit_lt_goto): Likewise.
2030 (s390_emit_le_goto): Likewise.
2031 (s390_emit_gt_goto): Likewise.
2032 (s390_emit_ge_goto): Likewise.
2033 (s390x_emit_eq_goto): Likewise.
2034 (s390x_emit_ne_goto): Likewise.
2035 (s390x_emit_lt_goto): Likewise.
2036 (s390x_emit_le_goto): Likewise.
2037 (s390x_emit_gt_goto): Likewise.
2038 (s390x_emit_ge_goto): Likewise.
2039 (s390_emit_ops_impl): Mark variable static.
2040 (s390x_emit_ops): Likewise.
2042 2016-06-17 Yao Qi <yao.qi@linaro.org>
2044 * linux-low.c (handle_extended_wait): Call
2045 uninsert_reinsert_breakpoints for the parent process. Remove
2046 reinsert breakpoints from the child process. Reinsert them to
2047 the parent process when vfork is done.
2048 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2049 (reinsert_reinsert_breakpoints): New function.
2050 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2051 (reinsert_reinsert_breakpoints): Declare.
2053 2016-06-17 Yao Qi <yao.qi@linaro.org>
2055 * linux-low.c (handle_extended_wait): If the parent is doing
2056 step-over, remove the reinsert breakpoints from the forked child.
2058 2016-06-17 Yao Qi <yao.qi@linaro.org>
2060 * linux-low.c (unsuspend_all_lwps): Declare.
2061 (linux_low_filter_event): If thread exited, call finish_step_over.
2062 If step-over is finished, unsuspend other threads.
2064 2016-06-17 Yao Qi <yao.qi@linaro.org>
2066 * linux-low.c (linux_resume_one_lwp_throw): Assert
2067 has_reinsert_breakpoints returns false.
2068 * mem-break.c (delete_disabled_breakpoints): Assert
2069 bp type isn't reinsert_breakpoint.
2071 2016-06-17 Yao Qi <yao.qi@linaro.org>
2073 * linux-low.c (maybe_hw_step): New function.
2074 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2075 (finish_step_over): Switch current_thread to lwp temporarily,
2076 and assert has_reinsert_breakpoints returns true.
2077 (proceed_one_lwp): Call maybe_hw_step.
2078 * mem-break.c (has_reinsert_breakpoints): New function.
2079 * mem-break.h (has_reinsert_breakpoints): Declare.
2081 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2083 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2085 2016-05-17 Yao Qi <yao.qi@linaro.org>
2087 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2088 instead of find_inferior.
2090 2016-05-05 Yao Qi <yao.qi@linaro.org>
2092 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2093 Initialize res to zero.
2095 2016-05-05 Yao Qi <yao.qi@linaro.org>
2097 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2100 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2102 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2103 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2104 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2106 2016-04-28 Par Olsson <par.olsson@windriver.com>
2107 Simon Marchi <simon.marchi@ericsson.com>
2109 * tracepoint.c (write_inferior_int8): New function.
2110 (cmd_qtenable_disable): Write enable flag using
2111 write_inferior_int8.
2113 2016-04-25 Yao Qi <yao.qi@linaro.org>
2115 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2116 (need_step_over_p): Return zero if the LWP has pending signals
2117 can be delivered on software single step target.
2119 2016-04-25 Yao Qi <yao.qi@linaro.org>
2121 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2122 return instead of error.
2124 2016-04-22 Yao Qi <yao.qi@linaro.org>
2126 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2129 2016-04-22 Yao Qi <yao.qi@linaro.org>
2131 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2132 signal when stepping over breakpoint with software single
2135 2016-04-21 Pedro Alves <palves@redhat.com>
2137 * linux-s390-low.c (s390_collect_ptrace_register)
2138 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2140 (s390_check_regset): Use void * instead of gdb_byte *.
2142 2016-04-20 Pedro Alves <palves@redhat.com>
2144 * configure: Renegerate.
2146 2016-04-20 Yao Qi <yao.qi@linaro.org>
2148 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2149 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2151 (arm_store_gregset): Likewise.
2153 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2155 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2156 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2157 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2158 (amd64-avx-mpx-linux.c): New rules.
2159 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2160 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2161 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2162 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2163 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2164 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2165 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2166 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2167 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2168 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2169 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2170 * linux-x86-low.c (x86_linux_read_description): Add case for
2171 X86_XSTATE_AVX_MPX_MASK.
2172 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2173 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2174 init_registers_i386_avx_mpx_linux.
2175 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2176 (initialize_low_tracepoint): Call
2177 init_registers_i386_avx_mpx_linux.
2178 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2179 (initialize_low_tracepoint): Call
2180 init_registers_amd64_avx_mpx_linux.
2181 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2182 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2183 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2186 2016-04-18 Pedro Alves <palves@redhat.com>
2188 * configure: Regenerate.
2190 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2192 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2193 (aarch64_emit_sub): Likewise.
2195 2016-04-12 Pedro Alves <palves@redhat.com>
2197 * utils.c (prepare_to_throw_exception): Delete.
2199 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2201 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2203 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2205 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2207 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2209 * linux-aarch64-ipa.c: Add <elf.h> include.
2210 * linux-ppc-ipa.c: Add <elf.h> include.
2211 * linux-s390-ipa.c: Add <elf.h> include.
2213 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2215 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2216 (get_raw_reg_ptr): Likewise.
2217 (get_trace_state_variable_value_ptr): Likewise.
2218 (set_trace_state_variable_value_ptr): Likewise.
2219 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2222 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2223 Marcin Kościelnicki <koriakin@0x04.net>
2226 * linux-ppc-low.c (emit_insns): New function.
2227 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2228 (ppc_emit_prologue): New function.
2229 (ppc_emit_epilogue): New function.
2230 (ppc_emit_add): New function.
2231 (ppc_emit_sub): New function.
2232 (ppc_emit_mul): New function.
2233 (ppc_emit_lsh): New function.
2234 (ppc_emit_rsh_signed): New function.
2235 (ppc_emit_rsh_unsigned): New function.
2236 (ppc_emit_ext): New function.
2237 (ppc_emit_zero_ext): New function.
2238 (ppc_emit_log_not): New function.
2239 (ppc_emit_bit_and): New function.
2240 (ppc_emit_bit_or): New function.
2241 (ppc_emit_bit_xor): New function.
2242 (ppc_emit_bit_not): New function.
2243 (ppc_emit_equal): New function.
2244 (ppc_emit_less_signed): New function.
2245 (ppc_emit_less_unsigned): New function.
2246 (ppc_emit_ref): New function.
2247 (ppc_emit_const): New function.
2248 (ppc_emit_reg): New function.
2249 (ppc_emit_pop): New function.
2250 (ppc_emit_stack_flush): New function.
2251 (ppc_emit_swap): New function.
2252 (ppc_emit_stack_adjust): New function.
2253 (ppc_emit_call): New function.
2254 (ppc_emit_int_call_1): New function.
2255 (ppc_emit_void_call_2): New function.
2256 (ppc_emit_if_goto): New function.
2257 (ppc_emit_goto): New function.
2258 (ppc_emit_eq_goto): New function.
2259 (ppc_emit_ne_goto): New function.
2260 (ppc_emit_lt_goto): New function.
2261 (ppc_emit_le_goto): New function.
2262 (ppc_emit_gt_goto): New function.
2263 (ppc_emit_ge_goto): New function.
2264 (ppc_write_goto_address): New function.
2265 (ppc_emit_ops_impl): New static variable.
2266 (ppc64v1_emit_prologue): New function.
2267 (ppc64v2_emit_prologue): New function.
2268 (ppc64_emit_epilogue): New function.
2269 (ppc64_emit_add): New function.
2270 (ppc64_emit_sub): New function.
2271 (ppc64_emit_mul): New function.
2272 (ppc64_emit_lsh): New function.
2273 (ppc64_emit_rsh_signed): New function.
2274 (ppc64_emit_rsh_unsigned): New function.
2275 (ppc64_emit_ext): New function.
2276 (ppc64_emit_zero_ext): New function.
2277 (ppc64_emit_log_not): New function.
2278 (ppc64_emit_bit_and): New function.
2279 (ppc64_emit_bit_or): New function.
2280 (ppc64_emit_bit_xor): New function.
2281 (ppc64_emit_bit_not): New function.
2282 (ppc64_emit_equal): New function.
2283 (ppc64_emit_less_signed): New function.
2284 (ppc64_emit_less_unsigned): New function.
2285 (ppc64_emit_ref): New function.
2286 (ppc64_emit_const): New function.
2287 (ppc64v1_emit_reg): New function.
2288 (ppc64v2_emit_reg): New function.
2289 (ppc64_emit_pop): New function.
2290 (ppc64_emit_stack_flush): New function.
2291 (ppc64_emit_swap): New function.
2292 (ppc64v1_emit_call): New function.
2293 (ppc64v2_emit_call): New function.
2294 (ppc64v1_emit_int_call_1): New function.
2295 (ppc64v2_emit_int_call_1): New function.
2296 (ppc64v1_emit_void_call_2): New function.
2297 (ppc64v2_emit_void_call_2): New function.
2298 (ppc64_emit_if_goto): New function.
2299 (ppc64_emit_eq_goto): New function.
2300 (ppc64_emit_ne_goto): New function.
2301 (ppc64_emit_lt_goto): New function.
2302 (ppc64_emit_le_goto): New function.
2303 (ppc64_emit_gt_goto): New function.
2304 (ppc64_emit_ge_goto): New function.
2305 (ppc64v1_emit_ops_impl): New static variable.
2306 (ppc64v2_emit_ops_impl): New static variable.
2307 (ppc_emit_ops): New function.
2308 (linux_low_target): Wire in ppc_emit_ops.
2310 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2311 Marcin Kościelnicki <koriakin@0x04.net>
2314 * Makefile.in: Add powerpc-*-ipa.o
2315 * configure.srv: Add ipa_obj for powerpc*-linux.
2316 * linux-ppc-ipa.c: New file.
2317 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2319 (PPC_FIELD): New macro.
2320 (PPC_SEXT): New macro.
2321 (PPC_OP6): New macro.
2322 (PPC_BO): New macro.
2323 (PPC_LI): New macro.
2324 (PPC_BD): New macro.
2325 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2326 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2327 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2328 (ppc_get_thread_area): New function.
2329 (is_elfv2_inferior): New function.
2330 (gen_ds_form): New function.
2331 (GEN_STD): New macro.
2332 (GEN_STDU): New macro.
2333 (GEN_LD): New macro.
2334 (GEN_LDU): New macro.
2335 (gen_d_form): New function.
2336 (GEN_ADDI): New macro.
2337 (GEN_ADDIS): New macro.
2338 (GEN_LI): New macro.
2339 (GEN_LIS): New macro.
2340 (GEN_ORI): New macro.
2341 (GEN_ORIS): New macro.
2342 (GEN_LWZ): New macro.
2343 (GEN_STW): New macro.
2344 (GEN_STWU): New macro.
2345 (gen_xfx_form): New function.
2346 (GEN_MFSPR): New macro.
2347 (GEN_MTSPR): New macro.
2348 (GEN_MFCR): New macro.
2349 (GEN_MTCR): New macro.
2350 (GEN_SYNC): New macro.
2351 (GEN_LWSYNC): New macro.
2352 (gen_x_form): New function.
2353 (GEN_OR): New macro.
2354 (GEN_MR): New macro.
2355 (GEN_LWARX): New macro.
2356 (GEN_STWCX): New macro.
2357 (GEN_CMPW): New macro.
2358 (gen_md_form): New function.
2359 (GEN_RLDICL): New macro.
2360 (GEN_RLDICR): New macro.
2361 (gen_i_form): New function.
2363 (GEN_BL): New macro.
2364 (gen_b_form): New function.
2365 (GEN_BNE): New macro.
2366 (GEN_LOAD): New macro.
2367 (GEN_STORE): New macro.
2368 (gen_limm): New function.
2369 (gen_atomic_xchg): New function.
2370 (gen_call): New function.
2371 (ppc_relocate_instruction): New function.
2372 (ppc_install_fast_tracepoint_jump_pad): New function.
2373 (ppc_get_min_fast_tracepoint_insn_len): New function.
2374 (ppc_get_ipa_tdesc_idx): New function.
2375 (the_low_target): Wire in the new functions.
2376 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2378 * linux-ppc-tdesc.h: New file.
2380 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2382 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2383 (alloc_jump_pad_buffer): New function.
2384 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2385 (alloc_jump_pad_buffer): New function.
2386 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2387 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2388 (alloc_jump_pad_buffer): New function.
2389 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2390 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2391 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2392 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2394 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2396 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2397 * linux-amd64-ipa.c: Likewise.
2398 * linux-i386-ipa.c: Likewise.
2399 * linux-s390-ipa.c: Likewise.
2400 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2401 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2402 set_trace_state_variable_value_ptr.
2403 (struct ipa_sym_addresses): Likewise.
2404 (symbol_list): Likewise.
2405 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2406 accessing gdb_collect directly.
2407 (gdb_collect_ptr_type): New typedef.
2408 (get_raw_reg_ptr_type): New typedef.
2409 (get_trace_state_variable_value_ptr_type): New typedef.
2410 (set_trace_state_variable_value_ptr_type): New typedef.
2411 (gdb_collect_ptr): New global.
2412 (get_raw_reg_ptr): New global.
2413 (get_trace_state_variable_value_ptr): New global.
2414 (set_trace_state_variable_value_ptr): New global.
2415 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2416 accessing get_raw_reg directly.
2417 (get_get_tsv_func_addr): Likewise for
2418 get_trace_state_variable_value_ptr.
2419 (get_set_tsv_func_addr): Likewise for
2420 set_trace_state_variable_value_ptr.
2421 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2423 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2425 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2427 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2429 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2431 (relocate_instruction): Remove own_buf.
2432 * server.c (own_buf): Make global.
2433 (handle_v_requests): Make global.
2434 * server.h (own_buf): New declaration.
2435 (handle_v_requests): New prototype.
2437 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2440 * linux-s390-low.c (add_insns): New function.
2441 (s390_emit_prologue): New function.
2442 (s390_emit_epilogue): New function.
2443 (s390_emit_add): New function.
2444 (s390_emit_sub): New function.
2445 (s390_emit_mul): New function.
2446 (s390_emit_lsh): New function.
2447 (s390_emit_rsh_signed): New function.
2448 (s390_emit_rsh_unsigned): New function.
2449 (s390_emit_ext): New function.
2450 (s390_emit_log_not): New function.
2451 (s390_emit_bit_and): New function.
2452 (s390_emit_bit_or): New function.
2453 (s390_emit_bit_xor): New function.
2454 (s390_emit_bit_not): New function.
2455 (s390_emit_equal): New function.
2456 (s390_emit_less_signed): New function.
2457 (s390_emit_less_unsigned): New function.
2458 (s390_emit_ref): New function.
2459 (s390_emit_if_goto): New function.
2460 (s390_emit_goto): New function.
2461 (s390_write_goto_address): New function.
2462 (s390_emit_litpool): New function.
2463 (s390_emit_const): New function.
2464 (s390_emit_call): New function.
2465 (s390_emit_reg): New function.
2466 (s390_emit_pop): New function.
2467 (s390_emit_stack_flush): New function.
2468 (s390_emit_zero_ext): New function.
2469 (s390_emit_swap): New function.
2470 (s390_emit_stack_adjust): New function.
2471 (s390_emit_set_r2): New function.
2472 (s390_emit_int_call_1): New function.
2473 (s390_emit_void_call_2): New function.
2474 (s390_emit_eq_goto): New function.
2475 (s390_emit_ne_goto): New function.
2476 (s390_emit_lt_goto): New function.
2477 (s390_emit_le_goto): New function.
2478 (s390_emit_gt_goto): New function.
2479 (s390_emit_ge_goto): New function.
2480 (s390x_emit_prologue): New function.
2481 (s390x_emit_epilogue): New function.
2482 (s390x_emit_add): New function.
2483 (s390x_emit_sub): New function.
2484 (s390x_emit_mul): New function.
2485 (s390x_emit_lsh): New function.
2486 (s390x_emit_rsh_signed): New function.
2487 (s390x_emit_rsh_unsigned): New function.
2488 (s390x_emit_ext): New function.
2489 (s390x_emit_log_not): New function.
2490 (s390x_emit_bit_and): New function.
2491 (s390x_emit_bit_or): New function.
2492 (s390x_emit_bit_xor): New function.
2493 (s390x_emit_bit_not): New function.
2494 (s390x_emit_equal): New function.
2495 (s390x_emit_less_signed): New function.
2496 (s390x_emit_less_unsigned): New function.
2497 (s390x_emit_ref): New function.
2498 (s390x_emit_if_goto): New function.
2499 (s390x_emit_const): New function.
2500 (s390x_emit_call): New function.
2501 (s390x_emit_reg): New function.
2502 (s390x_emit_pop): New function.
2503 (s390x_emit_stack_flush): New function.
2504 (s390x_emit_zero_ext): New function.
2505 (s390x_emit_swap): New function.
2506 (s390x_emit_stack_adjust): New function.
2507 (s390x_emit_int_call_1): New function.
2508 (s390x_emit_void_call_2): New function.
2509 (s390x_emit_eq_goto): New function.
2510 (s390x_emit_ne_goto): New function.
2511 (s390x_emit_lt_goto): New function.
2512 (s390x_emit_le_goto): New function.
2513 (s390x_emit_gt_goto): New function.
2514 (s390x_emit_ge_goto): New function.
2515 (s390_emit_ops): New function.
2516 (struct linux_target_ops): Fill in emit_ops hook.
2518 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2521 * Makefile.in: Add s390 IPA files.
2522 * configure.srv: Build IPA for s390.
2523 * linux-s390-ipa.c: New file.
2524 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2525 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2526 (tdesc_s390_linux32): Likewise.
2527 (init_registers_s390_linux32v1): Likewise.
2528 (tdesc_s390_linux32v1): Likewise.
2529 (init_registers_s390_linux32v2): Likewise.
2530 (tdesc_s390_linux32v2): Likewise.
2531 (init_registers_s390_linux64): Likewise.
2532 (tdesc_s390_linux64): Likewise.
2533 (init_registers_s390_linux64v1): Likewise.
2534 (tdesc_s390_linux64v1): Likewise.
2535 (init_registers_s390_linux64v2): Likewise.
2536 (tdesc_s390_linux64v2): Likewise.
2537 (init_registers_s390_te_linux64): Likewise.
2538 (tdesc_s390_te_linux64): Likewise.
2539 (init_registers_s390_vx_linux64): Likewise.
2540 (tdesc_s390_vx_linux64): Likewise.
2541 (init_registers_s390_tevx_linux64): Likewise.
2542 (tdesc_s390_tevx_linux64): Likewise.
2543 (init_registers_s390x_linux64): Likewise.
2544 (tdesc_s390x_linux64): Likewise.
2545 (init_registers_s390x_linux64v1): Likewise.
2546 (tdesc_s390x_linux64v1): Likewise.
2547 (init_registers_s390x_linux64v2): Likewise.
2548 (tdesc_s390x_linux64v2): Likewise.
2549 (init_registers_s390x_te_linux64): Likewise.
2550 (tdesc_s390x_te_linux64): Likewise.
2551 (init_registers_s390x_vx_linux64): Likewise.
2552 (tdesc_s390x_vx_linux64): Likewise.
2553 (init_registers_s390x_tevx_linux64): Likewise.
2554 (tdesc_s390x_tevx_linux64): Likewise.
2555 (have_hwcap_s390_vx): New static variable.
2556 (s390_arch_setup): Fill have_hwcap_s390_vx.
2557 (s390_get_thread_area): New function.
2558 (s390_ft_entry_gpr_esa): New const.
2559 (s390_ft_entry_gpr_zarch): New const.
2560 (s390_ft_entry_misc): New const.
2561 (s390_ft_entry_fr): New const.
2562 (s390_ft_entry_vr): New const.
2563 (s390_ft_main_31): New const.
2564 (s390_ft_main_64): New const.
2565 (s390_ft_exit_fr): New const.
2566 (s390_ft_exit_vr): New const.
2567 (s390_ft_exit_misc): New const.
2568 (s390_ft_exit_gpr_esa): New const.
2569 (s390_ft_exit_gpr_zarch): New const.
2570 (append_insns): New function.
2571 (s390_relocate_instruction): New function.
2572 (s390_install_fast_tracepoint_jump_pad): New function.
2573 (s390_get_min_fast_tracepoint_insn_len): New function.
2574 (s390_get_ipa_tdesc_idx): New function.
2575 (struct linux_target_ops): Wire in the above functions.
2576 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2577 * linux-s390-tdesc.h: New file.
2579 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2581 * linux-s390-low.c (s390_supports_tracepoints): New function.
2582 (struct linux_target_ops): Fill supports_tracepoints hook.
2584 2016-03-18 Yao Qi <yao.qi@linaro.org>
2586 * linux-low.c (lwp_signal_can_be_delivered): New function.
2587 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2589 2016-03-18 Yao Qi <yao.qi@linaro.org>
2591 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2592 0 if signal is enqueued. Remove 'signal' from one debugging
2593 message. Move one debugging message to some lines below.
2594 Remove code setting 'signal' to 0.
2596 2016-03-18 Yao Qi <yao.qi@linaro.org>
2598 * linux-low.c (linux_low_filter_event): Remove redundant
2599 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2601 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2603 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2604 (struct linux_target_ops): Wire in the above.
2606 2016-03-03 Yao Qi <yao.qi@linaro.org>
2608 * linux-low.c: Update comments to start_step_over.
2610 2016-03-03 Yao Qi <yao.qi@linaro.org>
2613 * linux-low.c (handle_extended_wait): Set child suspended
2614 if event_lwp->bp_reinsert isn't zero.
2616 2016-03-02 Yao Qi <yao.qi@linaro.org>
2618 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2619 enqueue_pending_signal.
2621 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2623 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2626 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2628 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2629 (s390_regmap_3264) [!__s390x__]: New global.
2630 (s390_collect_ptrace_register): Skip map entries containing -1.
2631 (s390_supply_ptrace_register): Ditto.
2632 (s390_fill_gprs_high): New function.
2633 (s390_store_gprs_high): New function.
2634 (s390_regsets): Add NT_S390_HIGH_GPRS.
2635 (s390_get_hwcap): Enable on 31-bit.
2636 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2637 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2638 Detect NT_S390_HIGH_GPRS.
2639 (s390_usrregs_info_3264): Enable on 31-bit.
2640 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2641 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2643 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2646 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2647 * configure.srv: Ditto.
2648 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2649 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2650 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2651 (init_registers_amd64_linux): Remove prototype.
2652 (tdesc_amd64_linux): Remove declaration.
2653 (get_ipa_tdesc): New function.
2654 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2655 initialize remaining tdescs.
2656 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2657 (init_registers_i386_linux): Remove prototype.
2658 (tdesc_i386_linux): Remove declaration.
2659 (get_ipa_tdesc): New function.
2660 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2661 initialize remaining tdescs.
2662 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2663 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2664 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2665 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2666 (x86_get_ipa_tdesc_idx): New function.
2667 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2668 * linux-x86-tdesc.h: New file.
2669 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2670 (target_get_ipa_tdesc_idx): New macro.
2671 * tracepoint.c (ipa_tdesc_idx): New macro.
2672 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2673 (symbol_list): Add ipa_tdesc_idx.
2674 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2675 (ipa_tdesc): Remove.
2676 (ipa_tdesc_idx): New variable.
2677 (get_context_regcache): Use get_ipa_tdesc.
2678 (gdb_collect): Ditto.
2680 * tracepoint.h (get_ipa_tdesc): New prototype.
2681 (ipa_tdesc): Remove.
2683 2016-02-24 Pedro Alves <palves@redhat.com>
2685 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2686 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2687 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2688 Factor out common code between the USE_SIGTRAP_SIGINFO and
2689 !USE_SIGTRAP_SIGINFO blocks.
2690 (linux_low_filter_event): Call save_stop_reason instead of
2691 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2693 (linux_wait_1): Update comments.
2695 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2697 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2698 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2699 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2700 ppc_insert_point, ppc_remove_point.
2702 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2704 * linux-s390-low.c (s390_supports_z_point_type): New function.
2705 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2707 2016-02-16 Yao Qi <yao.qi@linaro.org>
2709 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2710 PC. Get pc from regcache_read_pc.
2712 2016-02-12 Yao Qi <yao.qi@linaro.org>
2714 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2715 or linux_get_pc_32bit.
2716 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2718 2016-02-12 Yao Qi <yao.qi@linaro.org>
2720 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2721 arm_linux_get_next_pcs_fixup.
2723 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2725 * tracepoint.c (x_tracepoint_action_download): Change
2726 write_inferior_data_ptr to write_inferior_data_pointer.
2727 (cmd_qtstart): Likewise.
2728 (write_inferior_data_ptr): Remove.
2729 (download_agent_expr): Change write_inferior_data_ptr to
2730 write_inferior_data_pointer.
2731 (download_tracepoint_1): Likewise.
2732 (download_tracepoint): Likewise.
2733 (download_trace_state_variables): Likewise.
2735 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2736 Marcin Kościelnicki <koriakin@0x04.net>
2738 * tracepoint.c (struct tracepoint_action_ops): Remove.
2739 (struct tracepoint_action): Remove ops.
2740 (m_tracepoint_action_download, r_tracepoint_action_download)
2741 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2742 size and offset accordingly.
2743 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2744 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2745 (tracepoint_action_send, tracepoint_action_download): New functions.
2746 Helpers for trace action handlers.
2747 (add_tracepoint_action): Remove setup actions ops.
2748 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2750 2016-02-10 Yao Qi <yao.qi@linaro.org>
2752 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2754 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2756 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2758 * configure: Regenerate.
2760 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2762 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2763 void * to gdb_byte *.
2764 * linux-low.c (siginfo_fixup): Likewise.
2765 (linux_xfer_siginfo): Likewise.
2766 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2768 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2770 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2772 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2774 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2776 * linux-x86-low.c [__x86_64__]: Include
2777 "nat/amd64-linux-siginfo.h".
2778 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2779 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2780 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2781 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2782 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2783 (cpt_si_fd, si_timerid, si_overrun): Move from
2784 nat/amd64-linux-siginfo.c.
2785 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2787 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2789 * server.c (skip_to_semicolon): Remove.
2790 (process_point_options): Use strchrnul instead of
2793 2016-01-26 Yao Qi <yao.qi@linaro.org>
2795 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2796 * linux-low.c (install_software_single_step_breakpoints): Don't
2797 call regcache_read_pc.
2798 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2801 2016-01-26 Yao Qi <yao.qi@linaro.org>
2803 * linux-low.c (install_software_single_step_breakpoints): Call
2804 regcache_read_pc instead of get_pc.
2806 2016-01-26 Yao Qi <yao.qi@linaro.org>
2808 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2809 (unblock_async_io): Rename to ...
2810 (block_unblock_async_io): ... it. New function.
2811 (enable_async_io): Don't install SIGIO handler. Unblock it
2813 (disable_async_io): Don't ignore SIGIO. Block it instead.
2814 (initialize_async_io): Install SIGIO handler. Don't call
2817 2016-01-26 Yao Qi <yao.qi@linaro.org>
2819 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2820 first character is '\003', call *the_target->request_interrupt.
2822 2016-01-25 Yao Qi <yao.qi@linaro.org>
2824 * remote-utils.c (new_thread_notify): Remove.
2825 (dead_thread_notify): Likewise.
2826 * remote-utils.h (new_thread_notify): Remove declaration.
2827 (dead_thread_notify): Likewise.
2829 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2831 * gdb.trace/pending.exp: Fix expected message on continue.
2833 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2835 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2836 it works properly on big-endian machines where sizeof (CORE_ADDR)
2839 2016-01-21 Pedro Alves <palves@redhat.com>
2841 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2842 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2843 * configure: Regenerate.
2845 2016-01-21 Yao Qi <yao.qi@linaro.org>
2847 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2848 is_thumb and set it according to CPSR saved on the stack.
2849 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2850 arm_sigreturn_next_pc.
2852 2016-01-18 Yao Qi <yao.qi@linaro.org>
2854 * linux-low.c (linux_set_pc_64bit): New function.
2855 (linux_get_pc_64bit): New function.
2856 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2858 * linux-sparc-low.c (debug_threads): Remove declaration.
2859 (sparc_get_pc): Remove.
2860 (the_low_target): Use linux_get_pc_64bit instead of
2862 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2863 (the_low_target): Use linux_get_pc_64bit and
2866 2016-01-18 Yao Qi <yao.qi@linaro.org>
2868 * linux-arm-low.c (debug_threads): Remove declaration.
2869 (arm_get_pc, arm_set_pc): Remove.
2870 (the_low_target): Use linux_get_pc_32bit and
2872 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2873 (the_low_target): Use linux_get_pc_32bit and
2875 * linux-cris-low.c (debug_threads): Remove declaration.
2876 (cris_get_pc, cris_set_pc,): Remove.
2877 (the_low_target): Use linux_get_pc_32bit and
2879 * linux-crisv32-low.c (debug_threads): Remove declaration.
2880 (cris_get_pc, cris_set_pc): Remove.
2881 (the_low_target): Use linux_get_pc_32bit and
2883 * linux-low.c: Include inttypes.h.
2884 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2885 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2886 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2887 (the_low_target): Use linux_get_pc_32bit and
2889 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2890 (the_low_target): Use linux_get_pc_32bit and
2892 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2893 (the_low_target): Use linux_get_pc_32bit and
2895 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2896 (the_low_target): Use linux_get_pc_32bit and
2898 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2899 (the_low_target): Use linux_get_pc_32bit and
2902 2016-01-18 Gary Benson <gbenson@redhat.com>
2904 * configure.ac (AC_FUNC_FORK): New check.
2905 * config.in: Regenerate.
2906 * configure: Likewise.
2908 2016-01-14 Yao Qi <yao.qi@linaro.org>
2910 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2911 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2912 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2913 arm_get_next_pcs_ctor.
2915 2016-01-12 Josh Stone <jistone@redhat.com>
2916 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2918 * inferiors.h: Include "gdb_vecs.h".
2919 (struct process_info): Add syscalls_to_catch.
2920 * inferiors.c (remove_process): Free syscalls_to_catch.
2921 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2922 syscall_return stops.
2923 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2924 * server.c (handle_general_set): Handle QCatchSyscalls.
2925 (handle_query): Report support for QCatchSyscalls.
2926 * target.h (struct target_ops): Add supports_catch_syscall.
2927 (target_supports_catch_syscall): New macro.
2928 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2929 (struct lwp_info): Add syscall_state.
2930 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2931 Maintain syscall_state and syscalls_to_catch across exec.
2932 (get_syscall_trapinfo): New function, proxy to the_low_target.
2933 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2934 (linux_low_filter_event): Toggle syscall_state entry/return for
2935 syscall traps, and set it ignored for all others.
2936 (gdb_catching_syscalls_p): New function.
2937 (gdb_catch_this_syscall_p): New function.
2938 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2939 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2940 (linux_supports_catch_syscall): New function.
2941 (linux_target_ops): Install it.
2942 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2943 (the_low_target): Install it.
2945 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2947 * acinclude.m4: Include new ../warning.m4 file.
2948 * configure: Regenerated.
2949 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2951 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2953 * ax.c (is_goto_target): Mark static.
2954 * linux-low.c (register_addr): Likewise.
2955 (linux_fetch_registers, linux_store_registers): Likewise.
2956 * mem-break.c (any_persistent_commands): Fix old prototype.
2957 (add_commands_to_breakpoint): Mark static.
2958 * regcache.c (find_register_by_name): Delete unused func.
2959 * remote-utils.c (hex_or_minus_one): Mark static.
2960 * server.c (monitor_show_help): Mark static.
2961 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2962 handle_v_requests): Likewise.
2964 2016-01-12 Pedro Alves <palves@redhat.com>
2966 Remove use of the registered trademark symbol throughout.
2968 2016-01-08 Yao Qi <yao.qi@linaro.org>
2970 * remote-utils.c (getpkt): If c is '\003', call target hook
2973 2016-01-06 Yao Qi <yao.qi@linaro.org>
2975 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2976 linux-aarch32-low.c.
2977 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2978 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2979 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2980 (thumb2_breakpoint): Declare.
2981 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2982 linux-aarch32-low.h.
2983 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2984 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2985 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2987 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2989 * gdbreplay.c (gdbreplay_version): Change copyright year in
2991 * server.c (gdbserver_version): Likewise.
2993 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2995 * server.c (crc32_table): Delete.
2996 (crc32): Use libiberty's xcrc32 function.
2998 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3000 * lynx-low.c (lynx_delete_thread_callback): New function.
3001 (lynx_mourn): Properly delete our process and all of its
3002 threads. Remove call to clear_inferiors.
3004 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3006 * target.c (thread_search_callback): Add check that
3007 the thread_stopped target callback is not NULL before
3010 2015-12-21 Yao Qi <yao.qi@linaro.org>
3012 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3015 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3017 * server.c (handle_query): Call target_supports_software_single_step.
3019 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3021 * linux-low.c (single_step): New function.
3022 (linux_resume_one_lwp_throw): Call single_step.
3023 (start_step_over): Likewise.
3025 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3027 * Makefile.in (SFILES): Append arch/arm-linux.c,
3028 arch/arm-get-next-pcs.c.
3029 (arm-linux.o): New rule.
3030 (arm-get-next-pcs.o): New rule.
3031 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3033 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3034 to linux-aarch32-low.c.
3035 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3036 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3037 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3038 (thumb2_breakpoint_len): Likewise.
3039 (arm_is_thumb_mode): Make non-static.
3040 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3041 from linux-aarch32-low.c.
3042 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3043 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3044 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3045 (thumb2_breakpoint_len): Likewise.
3046 (arm_is_thumb_mode): New declaration.
3047 * linux-arm-low.c: Include arch/arm-linux.h
3048 aarch/arm-get-next-pcs.h, sys/syscall.h.
3049 (get_next_pcs_ops): New struct.
3050 (get_next_pcs_addr_bits_remove): New function.
3051 (get_next_pcs_is_thumb): New function.
3052 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3053 (arm_sigreturn_next_pc): Likewise.
3054 (get_next_pcs_syscall_next_pc): Likewise.
3055 (arm_gdbserver_get_next_pcs): Likewise.
3056 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3058 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3059 * server.h: Include gdb_vecs.h.
3061 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3063 * Makefile.in (SFILES): Append common/common-regcache.c.
3064 (OBS): Append common-regcache.o.
3065 (common-regcache.o): New rule.
3066 * regcache.c (init_register_cache): Initialize cache to
3068 (regcache_raw_read_unsigned): New function.
3069 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3070 register_status enum.
3072 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3074 * linux-aarch64-low.c (the_low_targets): Rename
3075 breakpoint_reinsert_addr to get_next_pcs.
3076 * linux-arm-low.c (the_low_targets): Likewise.
3077 * linux-bfin-low.c (the_low_targets): Likewise.
3078 * linux-cris-low.c (the_low_targets): Likewise.
3079 * linux-crisv32-low.c (the_low_targets): Likewise.
3080 * linux-low.c (can_software_single_step): Likewise.
3081 (install_software_single_step_breakpoints): New function.
3082 (start_step_over): Use install_software_single_step_breakpoints.
3083 * linux-low.h: New CORE_ADDR vector.
3084 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3086 * linux-mips-low.c (the_low_targets): Likewise.
3087 * linux-nios2-low.c (the_low_targets): Likewise.
3088 * linux-sparc-low.c (the_low_targets): Likewise.
3090 2015-12-17 Pedro Alves <palves@redhat.com>
3092 * linux-low.c (linux_kill_one_lwp): Remove references to
3094 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3096 (linux_init_signals): Delete.
3097 (initialize_low): Adjust.
3098 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3100 2015-12-16 Pedro Alves <palves@redhat.com>
3102 * configure.ac (compiler warning flags): When testing a
3103 -Wno-foo option, check whether -Wfoo works instead.
3104 * configure: Regenerate.
3106 2015-12-11 Don Breazeal <donb@codesourcery.com>
3108 * server.c (process_serial_event): Don't exit from gdbserver
3109 in remote mode if there are still active inferiors.
3111 2015-12-11 Yao Qi <yao.qi@linaro.org>
3113 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3114 arm_breakpoint_at if the process is 32-bit.
3116 2015-12-11 Yao Qi <yao.qi@linaro.org>
3118 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3121 2015-12-07 Yao Qi <yao.qi@linaro.org>
3123 * configure.srv: Append arm.o to srv_tgtobj for
3124 aarch64*-*-linux* target.
3125 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3126 from linux-arm-low.c.
3127 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3128 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3129 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3130 (thumb2_breakpoint_len): Likewise.
3131 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3132 (arm_breakpoint_kinds): Likewise.
3133 (arm_breakpoint_kind_from_pc): Likewise.
3134 (arm_sw_breakpoint_from_kind): Likewise.
3135 (arm_breakpoint_kind_from_current_state): Likewise.
3136 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3137 (arm_sw_breakpoint_from_kind): Declare.
3138 (arm_breakpoint_kind_from_current_state): Declare.
3139 (arm_breakpoint_at): Declare.
3140 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3141 arm_sw_breakpoint_from_kind if process is 32-bit.
3142 (aarch64_breakpoint_kind_from_pc): New function.
3143 (aarch64_breakpoint_kind_from_current_state): New function.
3144 (the_low_target): Initialize fields breakpoint_kind_from_pc
3145 and breakpoint_kind_from_current_state.
3146 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3147 linux-aarch32-low.c.
3148 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3149 (arm_breakpoint, arm_breakpoint_len): Likewise.
3150 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3151 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3152 (arm_is_thumb_mode): Likewise.
3153 (arm_breakpoint_at): Likewise.
3154 (arm_breakpoint_kind_from_pc): Likewise.
3155 (arm_sw_breakpoint_from_kind): Likewise.
3156 (arm_breakpoint_kind_from_current_state): Likewise.
3159 2015-08-04 Yao Qi <yao.qi@linaro.org>
3161 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3162 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3163 * server.c (extended_protocol): Remove "static".
3164 * server.h (extended_protocol): Declare it.
3166 2015-12-04 Josh Stone <jistone@redhat.com>
3168 * target.h (struct target_ops) <arch_setup>: Rename to ...
3169 (struct target_ops) <post_create_inferior>: ... this.
3170 (target_arch_setup): Rename to ...
3171 (target_post_create_inferior): ... this, calling post_create_inferior.
3172 * server.c (start_inferior): Update target_arch_setup calls to
3173 target_post_create_inferior.
3174 * linux-low.c (linux_low_ptrace_options): Forward declare.
3175 (linux_arch_setup): Update its comment for general use.
3176 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3177 (struct linux_target_ops): Use linux_post_create_inferior.
3178 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3179 to post_create_inferior.
3180 * nto-low.c (struct nto_target_ops): Likewise.
3181 * spu-low.c (struct spu_target_ops): Likewise.
3182 * win32-low.c (struct win32_target_ops): Likewise.
3184 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3186 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3188 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3190 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3191 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3192 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3193 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3194 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3195 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3196 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3197 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3198 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3199 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3200 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3201 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3203 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3205 * linux-low.c (linux_look_up_symbols): Don't call
3206 linux_supports_traceclone.
3207 * linux-low.h (thread_db_init): Remove use_events argument.
3208 * thread-db.c (thread_db_use_event): Remove global variable.
3209 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3210 (struct thread_db) <td_create_bp>: Remove field.
3211 (thread_db_create_event): Remove function.
3212 (thread_db_enable_reporting): Likewise.
3213 (find_one_thread): Don't check for thread_db_use_events.
3214 (attach_thread): Likewise.
3215 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3216 (try_thread_db_load_1): Don't check for thread_db_use_events.
3217 (thread_db_init): Remove use_events argument and thread events
3219 (remove_thread_event_breakpoints): Remove function.
3220 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3222 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3224 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3226 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3227 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3228 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3229 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3230 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3232 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3234 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3235 * linux-low.c (can_hardware_single_step): Use
3236 supports_hardware_single_step.
3237 (can_software_single_step): New function.
3238 (start_step_over): Call can_software_single_step.
3239 (linux_supports_hardware_single_step): New function.
3240 (struct target_ops) <supports_software_single_step>: Initialize.
3241 * linux-low.h (struct linux_target_ops)
3242 <supports_hardware_single_step>: Initialize.
3243 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3244 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3245 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3246 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3247 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3248 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3249 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3250 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3251 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3252 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3254 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3255 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3257 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3258 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3259 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3261 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3262 * target.h (struct target_ops): <supports_software_single_step>:
3264 (target_supports_software_single_step): New macro.
3266 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3268 * linux-low.c (linux_wait_1): Fix pc advance condition.
3269 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3270 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3272 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3274 * linux-arm-low.c (arm_is_thumb_mode): New function.
3275 (arm_breakpoint_at): Use arm_is_thumb_mode.
3276 (arm_breakpoint_kind_from_current_state): New function.
3277 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3279 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3280 (linux_breakpoint_kind_from_current_state): New function.
3281 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3282 * linux-low.h (struct linux_target_ops)
3283 <breakpoint_kind_from_current_state>: New field.
3284 * target.h (struct target_ops): Likewise.
3285 (target_breakpoint_kind_from_current_state): New macro.
3287 2015-11-30 Pedro Alves <palves@redhat.com>
3289 * linux-low.c (linux_resume): Wake up the event loop before
3292 2015-11-30 Pedro Alves <palves@redhat.com>
3294 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3296 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3298 * target.c (struct thread_search): New structure.
3299 (thread_search_callback): New function.
3300 (prev_general_thread): New global.
3301 (prepare_to_access_memory, done_accessing_memory): New functions.
3302 * target.h (prepare_to_access_memory, done_accessing_memory):
3303 Replace macros with function declarations.
3305 2015-11-30 Pedro Alves <palves@redhat.com>
3308 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3309 report TARGET_WAITKIND_NO_RESUMED.
3310 * remote-utils.c (prepare_resume_reply): Handle
3311 TARGET_WAITKIND_NO_RESUMED.
3312 * server.c (report_no_resumed): New global.
3313 (handle_query) <qSupported>: Handle "no-resumed+". Report
3314 "no-resumed+" support.
3315 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3316 return error if the client doesn't support no-resumed events.
3317 (push_stop_notification): New function.
3318 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3319 events if the client supports them.
3321 2015-11-30 Pedro Alves <palves@redhat.com>
3323 * linux-low.c (thread_still_has_status_pending_p): Don't check
3325 (lwp_resumed): New function.
3326 (status_pending_p_callback): Return early if the LWP is not
3327 supposed to be resumed.
3329 2015-11-30 Pedro Alves <palves@redhat.com>
3331 * linux-low.c (handle_extended_wait): Assert that the LWP's
3332 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3333 thread create events, leave the new child's status pending.
3334 (linux_low_filter_event): If GDB wants to hear about thread exit
3335 events, leave the LWP marked dead and don't delete it.
3336 (linux_wait_for_event_filtered): Don't check for thread exit.
3337 (filter_exit_event): New function.
3338 (linux_wait_1): Use it, when returning an exit event.
3339 (linux_resume_one_lwp_throw): Assert that the LWP's
3340 waitstatus is TARGET_WAITKIND_IGNORE.
3341 * remote-utils.c (prepare_resume_reply): Handle
3342 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3343 * server.c (report_thread_events): New global.
3344 (handle_general_set): Handle QThreadEvents.
3345 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3346 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3347 TARGET_WAITKIND_THREAD_EXITED.
3348 * server.h (report_thread_events): Declare.
3350 2015-11-30 Pedro Alves <palves@redhat.com>
3352 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3353 the thread's last_resume_kind was resume_stop.
3355 2015-11-30 Pedro Alves <palves@redhat.com>
3357 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3360 2015-11-30 Pedro Alves <palves@redhat.com>
3362 * server.c (handle_v_requests): Handle vCtrlC.
3364 2015-11-30 Pedro Alves <palves@redhat.com>
3366 * gdbthread.h (find_any_thread_of_pid): Declare.
3367 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3369 * server.c (handle_query): If current_thread is NULL, look for
3370 another thread of the selected process.
3372 2015-11-26 Daniel Colascione <dancol@dancol.org>
3373 Simon Marchi <simon.marchi@ericsson.com>
3375 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3376 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3378 * target.h (struct target_ops) <thread_name>: New field.
3379 (target_thread_name): New macro.
3381 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3383 * regcache.h (regcache_invalidate_pid): Add declaration.
3384 * regcache.c (regcache_invalidate_pid): New function, extracted
3385 from regcache_invalidate.
3386 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3387 Add trivial documentation comment.
3388 * lynx-low.c: Use regcache_invalidate_pid instead of
3389 regcache_invalidate.
3391 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3393 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3394 and Elf64_auxv_t if the target is Android.
3396 2015-11-22 Doug Evans <xdje42@gmail.com>
3398 * target.h: #include <sys/types.h>.
3400 2015-11-19 Pedro Alves <palves@redhat.com>
3402 * linux-low.c (linux_process_qsupported): Change prototype.
3404 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3406 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3407 and adjust to loop over all features.
3408 * server.c (handle_query) <qSupported>: Adjust to call
3409 target_process_qsupported once, passing it a vector of unprocessed
3411 * target.h (struct target_ops) <process_qsupported>: Change
3413 (target_process_qsupported): Adjust.
3415 2015-11-19 Pedro Alves <palves@redhat.com>
3417 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3419 * configure: Regenerate.
3421 2015-11-19 Pedro Alves <palves@redhat.com>
3423 * configure: Regenerate.
3425 2015-11-19 Yao Qi <yao.qi@linaro.org>
3427 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3430 2015-11-19 Yao Qi <yao.qi@linaro.org>
3432 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3433 (struct aarch64_operand): Move enum out.
3435 2015-11-19 Yao Qi <yao.qi@linaro.org>
3437 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3438 struct user_fpsimd_state *.
3439 (aarch64_store_fpregset): Likewise.
3441 2015-11-19 Yao Qi <yao.qi@linaro.org>
3443 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3444 struct user_pt_regs *.
3445 (aarch64_store_gregset): Likewise.
3447 2015-11-18 Pedro Alves <palves@redhat.com>
3449 * Makefile.in (all_object_files): Add $IPA_OBJS.
3451 2015-11-17 Pedro Alves <palves@redhat.com>
3453 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3454 GDB_SIGNAL_0 and gdb_signal_to_string.
3456 2015-11-17 Pedro Alves <palves@redhat.com>
3458 * win32-low.c (handle_output_debug_string): Remove parameter.
3459 (win32_kill): Remove our_status local and adjust call to
3460 handle_output_debug_string.
3461 (get_child_debug_event): Adjust call to
3462 handle_output_debug_string.
3464 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3466 * linux-mips-low.c (mips_fill_gregset): Add cast.
3467 (mips_store_gregset): Likewise.
3468 (mips_fill_fpregset): Likewise.
3469 (mips_store_fpregset): Likewise.
3471 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3473 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3476 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3478 * linux-mips-low.c (mips_linux_new_thread): Change type of
3479 watch_type to enum target_hw_bp_type.
3481 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3483 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3484 Change return type to arm_hwbp_type.
3486 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3488 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3489 (arm_store_gregset): Likewise.
3490 * linux-arm-low.c (arm_get_hwcap): Likewise.
3491 (arm_read_description): Likewise.
3493 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3495 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3497 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3499 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3500 (ppc_fill_vsxregset): Likewise.
3501 (ppc_store_vsxregset): Likewise.
3502 (ppc_fill_vrregset): Likewise.
3503 (ppc_store_vrregset): Likewise.
3504 (ppc_fill_evrregset): Likewise.
3505 (ppc_store_evrregset): Likewise.
3507 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3509 * linux-ppc-low.c (ppc_usrregs_info): Remove
3510 forward-declaration.
3511 (ppc_arch_setup): Move lower in file.
3513 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3515 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3516 (ps_pdwrite): Likewise.
3518 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3520 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3521 to after assert checks.
3523 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3525 * proc-service.c (ps_pdread): Add/adjust casts.
3526 (ps_pdwrite): Add/adjust casts.
3528 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3530 * server.c (handle_search_memory_1): Cast return value of
3533 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3535 * server.c (write_qxfer_response): Change type of data to
3538 2015-10-29 Pedro Alves <palves@redhat.com>
3540 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3542 2015-10-29 Pedro Alves <palves@redhat.com>
3544 * tracepoint.c (clear_installed_tracepoints): Add casts.
3546 2015-10-29 Pedro Alves <palves@redhat.com>
3548 * server.c (handle_v_cont, process_serial_event): Add enum
3549 gdb_signal casts to signal parsing code.
3551 2015-10-29 Pedro Alves <palves@redhat.com>
3553 * linux-low.h (NULL_REGSET): Define.
3554 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3555 * linux-arm-low.c (arm_regsets): Likewise.
3556 * linux-crisv32-low.c (cris_regsets): Likewise.
3557 * linux-m68k-low.c (m68k_regsets): Likewise.
3558 * linux-mips-low.c (mips_regsets): Likewise.
3559 * linux-nios2-low.c (nios2_regsets): Likewise.
3560 * linux-ppc-low.c (ppc_regsets): Likewise.
3561 * linux-s390-low.c (s390_regsets): Likewise.
3562 * linux-sh-low.c (sh_regsets): Likewise.
3563 * linux-sparc-low.c (sparc_regsets): Likewise.
3564 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3565 * linux-tile-low.c (tile_regsets): Likewise.
3566 * linux-x86-low.c (x86_regsets): Likewise.
3567 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3569 2015-10-29 Pedro Alves <palves@redhat.com>
3571 * linux-low.h (NULL_REGSET): Define.
3572 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3573 * linux-arm-low.c (arm_regsets): Likewise.
3574 * linux-crisv32-low.c (cris_regsets): Likewise.
3575 * linux-m68k-low.c (m68k_regsets): Likewise.
3576 * linux-mips-low.c (mips_regsets): Likewise.
3577 * linux-nios2-low.c (nios2_regsets): Likewise.
3578 * linux-ppc-low.c (ppc_regsets): Likewise.
3579 * linux-s390-low.c (s390_regsets): Likewise.
3580 * linux-sh-low.c (sh_regsets): Likewise.
3581 * linux-sparc-low.c (sparc_regsets): Likewise.
3582 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3583 * linux-tile-low.c (tile_regsets): Likewise.
3584 * linux-x86-low.c (x86_regsets): Likewise.
3585 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3587 2015-10-26 Doug Evans <dje@google.com>
3589 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3591 2015-10-26 Doug Evans <dje@google.com>
3593 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3595 2015-10-26 Doug Evans <dje@google.com>
3597 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3599 (attach_thread, find_new_threads_callback): Ditto.
3601 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3603 * mem-break.h (set_breakpoint_data): Remove.
3605 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3607 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3608 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3609 (initialize_low): Remove set_breakpoint_data call.
3610 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3611 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3612 (initialize_low): Remove set_breakpoint_data call.
3613 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3614 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3615 (initialize_low): Remove set_breakpoint_data call.
3617 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3619 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3620 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3621 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3622 * target.h (target_breakpoint_kind_from_pc): New macro.
3624 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3626 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3627 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3628 the default breakpoint kind.
3630 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3632 * linux-arm-low.c (arm_supports_z_point_type): Add software
3635 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3637 * linux-arm-low.c: Refactor breakpoint definitions.
3638 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3639 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3641 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3643 * Makefile.in: Add arm.c/o.
3644 * configure.srv: Likewise.
3645 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3646 (arm_breakpoint_kind_from_pc): New function.
3647 (arm_sw_breakpoint_from_kind): Return proper kind.
3648 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3650 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3652 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3654 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3655 (struct raw_breakpoint) <size>: Remove.
3656 (struct raw_breakpoint) <kind>: Add.
3657 (bp_size): New function.
3658 (bp_opcode): Likewise.
3659 (find_raw_breakpoint_at): Adjust for kind.
3660 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3661 (remove_memory_breakpoint): Adjust for kind call bp_size.
3662 (set_raw_breakpoint_at): Adjust for kind.
3663 (set_breakpoint): Likewise.
3664 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3665 (delete_raw_breakpoint): Adjust for kind.
3666 (delete_breakpoint): Likewise.
3667 (find_gdb_breakpoint): Likewise.
3668 (set_gdb_breakpoint_1): Likewise.
3669 (set_gdb_breakpoint): Likewise.
3670 (delete_gdb_breakpoint_1): Likewise.
3671 (delete_gdb_breakpoint): Likewise.
3672 (uninsert_raw_breakpoint): Likewise.
3673 (reinsert_raw_breakpoint): Likewise.
3674 (set_breakpoint_data): Remove.
3675 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3676 (check_mem_read): Adjust for kind call bp_size.
3677 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3678 (clone_one_breakpoint): Adjust for kind.
3679 * mem-break.h (set_gdb_breakpoint): Likewise.
3680 (delete_gdb_breakpoint): Likewise.
3681 * server.c (process_serial_event): Likewise.
3683 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3685 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3686 (struct linux_target_ops) <breakpoint>: Remove.
3687 (struct linux_target_ops) <breakpoint_len>: Remove.
3688 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3689 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3690 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3691 (arm_sw_breakpoint_from_kind): New function.
3692 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3693 (struct linux_target_ops) <breakpoint>: Remove.
3694 (struct linux_target_ops) <breakpoint_len>: Remove.
3695 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3696 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3697 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3698 (struct linux_target_ops) <breakpoint>: Remove.
3699 (struct linux_target_ops) <breakpoint_len>: Remove.
3700 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3701 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3702 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3703 (struct linux_target_ops) <breakpoint>: Remove.
3704 (struct linux_target_ops) <breakpoint_len>: Remove.
3705 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3706 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3707 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3708 and sw_breakpoint_from_kind to increment the pc.
3709 (linux_breakpoint_kind_from_pc): New function.
3710 (linux_sw_breakpoint_from_kind): New function.
3711 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3712 (initialize_low): Call breakpoint_kind_from_pc and
3713 sw_breakpoint_from_kind to replace breakpoint_data/len.
3714 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3716 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3717 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3718 (struct linux_target_ops) <breakpoint>: Remove.
3719 (struct linux_target_ops) <breakpoint_len>: Remove.
3720 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3721 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3722 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3723 (struct linux_target_ops) <breakpoint>: Remove.
3724 (struct linux_target_ops) <breakpoint_len>: Remove.
3725 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3726 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3727 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3728 (struct linux_target_ops) <breakpoint>: Remove.
3729 (struct linux_target_ops) <breakpoint_len>: Remove.
3730 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3731 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3732 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3733 (struct linux_target_ops) <breakpoint>: Remove.
3734 (struct linux_target_ops) <breakpoint_len>: Remove.
3735 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3736 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3737 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3738 (struct linux_target_ops) <breakpoint>: Remove.
3739 (struct linux_target_ops) <breakpoint_len>: Remove.
3740 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3741 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3742 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3743 (struct linux_target_ops) <breakpoint>: Remove.
3744 (struct linux_target_ops) <breakpoint_len>: Remove.
3745 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3746 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3747 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3748 (struct linux_target_ops) <breakpoint>: Remove.
3749 (struct linux_target_ops) <breakpoint_len>: Remove.
3750 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3751 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3752 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3753 (struct linux_target_ops) <breakpoint>: Remove.
3754 (struct linux_target_ops) <breakpoint_len>: Remove.
3755 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3756 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3757 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3758 (struct linux_target_ops) <breakpoint>: Remove.
3759 (struct linux_target_ops) <breakpoint_len>: Remove.
3760 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3761 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3762 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3763 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3764 (struct linux_target_ops) <breakpoint>: Remove.
3765 (struct linux_target_ops) <breakpoint_len>: Remove.
3766 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3767 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3768 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3769 (struct linux_target_ops) <breakpoint>: Remove.
3770 (struct linux_target_ops) <breakpoint_len>: Remove.
3771 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3772 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3774 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3776 * linux-cris-low.c (cris_get_pc): Remove void arg.
3778 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3780 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3783 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3785 * inferiors.c (thread_pid_matches_callback): New function.
3786 (find_thread_process): New function.
3787 (remove_thread): Reset current_thread.
3788 (remove_process): Assert threads have been removed first.
3790 2015-10-15 Yao Qi <yao.qi@linaro.org>
3792 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3794 (aarch64_remove_point): Likewise.
3795 * regcache.c (regcache_register_size): New function.
3797 2015-10-12 Yao Qi <yao.qi@linaro.org>
3799 * linux-aarch64-low.c: Update all callers as emit_load_store
3800 is renamed to aarch64_emit_load_store.
3802 2015-10-12 Yao Qi <yao.qi@linaro.org>
3804 * linux-aarch64-low.c: Update all callers of function renaming
3805 from emit_insn to aarch64_emit_insn.
3807 2015-10-12 Yao Qi <yao.qi@linaro.org>
3809 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3810 arch/aarch64-insn.h.
3811 (struct aarch64_memory_operand): Likewise.
3813 (emit_insn): Move to arch/aarch64-insn.c.
3814 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3815 (emit_load_store): Move to arch/aarch64-insn.c.
3816 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3817 (can_encode_int32): Remove.
3819 2015-10-12 Yao Qi <yao.qi@linaro.org>
3821 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3822 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3823 (aarch64_relocate_instruction): Likewise.
3824 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3825 (struct aarch64_insn_visitor): Likewise.
3827 2015-10-12 Yao Qi <yao.qi@linaro.org>
3829 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3830 (struct aarch64_insn_visitor): New.
3831 (struct aarch64_insn_relocation_data): New.
3832 (aarch64_ftrace_insn_reloc_b): New function.
3833 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3834 (aarch64_ftrace_insn_reloc_cb): Likewise.
3835 (aarch64_ftrace_insn_reloc_tb): Likewise.
3836 (aarch64_ftrace_insn_reloc_adr): Likewise.
3837 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3838 (aarch64_ftrace_insn_reloc_others): Likewise.
3840 (aarch64_relocate_instruction): Use visitor.
3842 2015-10-12 Yao Qi <yao.qi@linaro.org>
3844 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3845 int. Add argument buf.
3846 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3847 aarch64_relocate_instruction.
3849 2015-10-12 Yao Qi <yao.qi@linaro.org>
3851 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3852 argument insn. Remove local variable insn. Don't call
3854 (aarch64_install_fast_tracepoint_jump_pad): Call
3857 2015-09-30 Yao Qi <yao.qi@linaro.org>
3859 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3860 (emit_load_store_pair): Likewise.
3862 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3864 * dll.c (match_dll): Add cast(s).
3865 (unloaded_dll): Likewise.
3866 * linux-low.c (second_thread_of_pid_p): Likewise.
3867 (delete_lwp_callback): Likewise.
3868 (count_events_callback): Likewise.
3869 (select_event_lwp_callback): Likewise.
3870 (linux_set_resume_request): Likewise.
3871 * server.c (accumulate_file_name_length): Likewise.
3872 (emit_dll_description): Likewise.
3873 (handle_qxfer_threads_worker): Likewise.
3874 (visit_actioned_threads): Likewise.
3875 * thread-db.c (any_thread_of): Likewise.
3876 * tracepoint.c (same_process_p): Likewise.
3877 (match_blocktype): Likewise.
3878 (build_traceframe_info_xml): Likewise.
3880 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3882 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3884 (gdb_unparse_agent_expr): Likewise.
3885 * hostio.c (require_data): Likewise.
3886 (handle_pread): Likewise.
3887 * linux-low.c (disable_regset): Likewise.
3888 (fetch_register): Likewise.
3889 (store_register): Likewise.
3890 (get_dynamic): Likewise.
3891 (linux_qxfer_libraries_svr4): Likewise.
3892 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3893 (set_fast_tracepoint_jump): Likewise.
3894 (uninsert_fast_tracepoint_jumps_at): Likewise.
3895 (reinsert_fast_tracepoint_jumps_at): Likewise.
3896 (validate_inserted_breakpoint): Likewise.
3897 (clone_agent_expr): Likewise.
3898 * regcache.c (init_register_cache): Likewise.
3899 * remote-utils.c (putpkt_binary_1): Likewise.
3900 (decode_M_packet): Likewise.
3901 (decode_X_packet): Likewise.
3902 (look_up_one_symbol): Likewise.
3903 (relocate_instruction): Likewise.
3904 (monitor_output): Likewise.
3905 * server.c (handle_search_memory): Likewise.
3906 (handle_qxfer_exec_file): Likewise.
3907 (handle_qxfer_libraries): Likewise.
3908 (handle_qxfer): Likewise.
3909 (handle_query): Likewise.
3910 (handle_v_cont): Likewise.
3911 (handle_v_run): Likewise.
3912 (captured_main): Likewise.
3913 * target.c (write_inferior_memory): Likewise.
3914 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3915 * tracepoint.c (init_trace_buffer): Likewise.
3916 (add_tracepoint_action): Likewise.
3917 (add_traceframe): Likewise.
3918 (add_traceframe_block): Likewise.
3919 (cmd_qtdpsrc): Likewise.
3920 (cmd_qtdv): Likewise.
3921 (cmd_qtstatus): Likewise.
3922 (response_source): Likewise.
3923 (response_tsv): Likewise.
3924 (cmd_qtnotes): Likewise.
3925 (gdb_collect): Likewise.
3926 (initialize_tracepoint): Likewise.
3928 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3930 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3931 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3932 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3934 (enum aarch64_condition_codes): New enum.
3935 (w0): New static global.
3938 (struct aarch64_memory_operand) <type>: New
3939 MEMORY_OPERAND_POSTINDEX type.
3940 (postindex_memory_operand): New helper function.
3941 (emit_ret): New function.
3942 (emit_load_store_pair): New function, factored out of emit_stp
3943 with support for MEMORY_OPERAND_POSTINDEX.
3944 (emit_stp): Rewrite using emit_load_store_pair.
3945 (emit_ldp): New function.
3946 (emit_load_store): Likewise.
3947 (emit_ldr): Mention post-index instruction in comment.
3948 (emit_ldrh): New function.
3949 (emit_ldrb): New function.
3950 (emit_ldrsw): Mention post-index instruction in comment.
3951 (emit_str): Likewise.
3952 (emit_subs): New function.
3953 (emit_cmp): Likewise.
3954 (emit_and): Likewise.
3955 (emit_orr): Likewise.
3956 (emit_orn): Likewise.
3957 (emit_eor): Likewise.
3958 (emit_mvn): Likewise.
3959 (emit_lslv): Likewise.
3960 (emit_lsrv): Likewise.
3961 (emit_asrv): Likewise.
3962 (emit_mul): Likewise.
3963 (emit_sbfm): Likewise.
3964 (emit_sbfx): Likewise.
3965 (emit_ubfm): Likewise.
3966 (emit_ubfx): Likewise.
3967 (emit_csinc): Likewise.
3968 (emit_cset): Likewise.
3969 (emit_nop): Likewise.
3970 (emit_ops_insns): New helper function.
3971 (emit_pop): Likewise.
3972 (emit_push): Likewise.
3973 (aarch64_emit_prologue): New function.
3974 (aarch64_emit_epilogue): Likewise.
3975 (aarch64_emit_add): Likewise.
3976 (aarch64_emit_sub): Likewise.
3977 (aarch64_emit_mul): Likewise.
3978 (aarch64_emit_lsh): Likewise.
3979 (aarch64_emit_rsh_signed): Likewise.
3980 (aarch64_emit_rsh_unsigned): Likewise.
3981 (aarch64_emit_ext): Likewise.
3982 (aarch64_emit_log_not): Likewise.
3983 (aarch64_emit_bit_and): Likewise.
3984 (aarch64_emit_bit_or): Likewise.
3985 (aarch64_emit_bit_xor): Likewise.
3986 (aarch64_emit_bit_not): Likewise.
3987 (aarch64_emit_equal): Likewise.
3988 (aarch64_emit_less_signed): Likewise.
3989 (aarch64_emit_less_unsigned): Likewise.
3990 (aarch64_emit_ref): Likewise.
3991 (aarch64_emit_if_goto): Likewise.
3992 (aarch64_emit_goto): Likewise.
3993 (aarch64_write_goto_address): Likewise.
3994 (aarch64_emit_const): Likewise.
3995 (aarch64_emit_call): Likewise.
3996 (aarch64_emit_reg): Likewise.
3997 (aarch64_emit_pop): Likewise.
3998 (aarch64_emit_stack_flush): Likewise.
3999 (aarch64_emit_zero_ext): Likewise.
4000 (aarch64_emit_swap): Likewise.
4001 (aarch64_emit_stack_adjust): Likewise.
4002 (aarch64_emit_int_call_1): Likewise.
4003 (aarch64_emit_void_call_2): Likewise.
4004 (aarch64_emit_eq_goto): Likewise.
4005 (aarch64_emit_ne_goto): Likewise.
4006 (aarch64_emit_lt_goto): Likewise.
4007 (aarch64_emit_le_goto): Likewise.
4008 (aarch64_emit_gt_goto): Likewise.
4009 (aarch64_emit_ge_got): Likewise.
4010 (aarch64_emit_ops_impl): New static global variable.
4011 (aarch64_emit_ops): New target function, return
4012 &aarch64_emit_ops_impl.
4013 (struct linux_target_ops): Install it.
4015 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4017 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4018 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4020 * linux-aarch64-ipa.c: New file.
4021 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4023 (aarch64_get_thread_area): New target method.
4024 (extract_signed_bitfield): New helper function.
4025 (aarch64_decode_ldr_literal): New function.
4026 (enum aarch64_opcodes): New enum.
4027 (struct aarch64_register): New struct.
4028 (struct aarch64_operand): New struct.
4029 (x0): New static global.
4038 (aarch64_register): New helper function.
4039 (register_operand): Likewise.
4040 (immediate_operand): Likewise.
4041 (struct aarch64_memory_operand): New struct.
4042 (offset_memory_operand): New helper function.
4043 (preindex_memory_operand): Likewise.
4044 (enum aarch64_system_control_registers): New enum.
4045 (ENCODE): New macro.
4046 (emit_insn): New helper function.
4047 (emit_b): New function.
4048 (emit_bcond): Likewise.
4049 (emit_cb): Likewise.
4050 (emit_tb): Likewise.
4051 (emit_blr): Likewise.
4052 (emit_stp): Likewise.
4053 (emit_ldp_q_offset): Likewise.
4054 (emit_stp_q_offset): Likewise.
4055 (emit_load_store): Likewise.
4056 (emit_ldr): Likewise.
4057 (emit_ldrsw): Likewise.
4058 (emit_str): Likewise.
4059 (emit_ldaxr): Likewise.
4060 (emit_stxr): Likewise.
4061 (emit_stlr): Likewise.
4062 (emit_data_processing_reg): Likewise.
4063 (emit_data_processing): Likewise.
4064 (emit_add): Likewise.
4065 (emit_sub): Likewise.
4066 (emit_mov): Likewise.
4067 (emit_movk): Likewise.
4068 (emit_mov_addr): Likewise.
4069 (emit_mrs): Likewise.
4070 (emit_msr): Likewise.
4071 (emit_sevl): Likewise.
4072 (emit_wfe): Likewise.
4073 (append_insns): Likewise.
4074 (can_encode_int32_in): New helper function.
4075 (aarch64_relocate_instruction): New function.
4076 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4077 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4078 (struct linux_target_ops): Install aarch64_get_thread_area,
4079 aarch64_install_fast_tracepoint_jump_pad and
4080 aarch64_get_min_fast_tracepoint_insn_len.
4082 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4084 * Makefile.in (aarch64-insn.o): New rule.
4085 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4087 2015-09-21 Yao Qi <yao.qi@linaro.org>
4089 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4091 2015-09-21 Yao Qi <yao.qi@linaro.org>
4093 * tracepoint.c (max_jump_pad_size): Remove.
4095 2015-09-18 Yao Qi <yao.qi@linaro.org>
4097 * linux-aarch64-low.c: Don't include sys/uio.h.
4098 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4100 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4102 * tracepoint.c (eval_result_type): Change prototype.
4103 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4105 2015-09-15 Pedro Alves <palves@redhat.com>
4107 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4108 Check whether to report exec events instead of checking whether
4109 multiprocess is enabled.
4111 2015-09-15 Pedro Alves <palves@redhat.com>
4114 * remote-utils.c (prepare_resume_reply): Merge
4115 TARGET_WAITKIND_VFORK_DONE switch case with the
4116 TARGET_WAITKIND_FORKED case.
4118 2015-09-15 Yao Qi <yao.qi@linaro.org>
4120 * server.c (handle_query): Check string comparison using
4121 "else if" instead of "if".
4123 2015-09-15 Yao Qi <yao.qi@linaro.org>
4125 * server.c (vCont_supported): New global variable.
4126 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4127 matches. Append ";vContSupported+" to own_buf.
4128 (handle_v_requests): Append ";s;S" to own_buf if target supports
4129 hardware single step or vCont_supported is false.
4130 (capture_main): Set vCont_supported to zero.
4132 2015-09-15 Yao Qi <yao.qi@linaro.org>
4134 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4136 (linux_supports_hardware_single_step): ... New function.
4137 (linux_target_ops): Update.
4138 * lynx-low.c (lynx_target_ops): Set field
4139 supports_hardware_single_step to target_can_do_hardware_single_step.
4140 * nto-low.c (nto_target_ops): Likewise.
4141 * spu-low.c (spu_target_ops): Likewise.
4142 * win32-low.c (win32_target_ops): Likewise.
4143 * target.c (target_can_do_hardware_single_step): New function.
4144 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4145 Remove. <supports_hardware_single_step>: New field.
4146 (target_supports_conditional_breakpoints): Remove.
4147 (target_supports_hardware_single_step): New macro.
4148 (target_can_do_hardware_single_step): Declare.
4149 * server.c (handle_query): Use target_supports_hardware_single_step
4150 instead of target_supports_conditional_breakpoints.
4152 2015-09-15 Yao Qi <yao.qi@linaro.org>
4154 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4156 (struct linux_target_ops the_low_target): Install
4157 aarch64_linux_siginfo_fixup.
4159 2015-09-11 Don Breazeal <donb@codesourcery.com>
4160 Luis Machado <lgustavo@codesourcery.com>
4162 * linux-low.c (linux_mourn): Static declaration.
4163 (linux_arch_setup): Move in front of
4164 handle_extended_wait.
4165 (linux_arch_setup_thread): New function.
4166 (handle_extended_wait): Handle exec events. Call
4167 linux_arch_setup_thread. Make event_lwp argument a
4168 pointer-to-a-pointer.
4169 (check_zombie_leaders): Do not check stopped threads.
4170 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4171 (linux_low_filter_event): Add lwp and thread for exec'ing
4172 non-leader thread if leader thread has been deleted.
4173 Refactor code into linux_arch_setup_thread and call it.
4174 Pass child lwp pointer by reference to handle_extended_wait.
4175 (linux_wait_for_event_filtered): Update comment.
4176 (linux_wait_1): Prevent clobbering exec event status.
4177 (linux_supports_exec_events): New function.
4178 (linux_target_ops) <supports_exec_events>: Initialize new member.
4179 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4181 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4182 * server.c (report_exec_events): New global variable.
4183 (handle_query): Handle qSupported query for exec-events feature.
4184 (captured_main): Initialize report_exec_events.
4185 * server.h (report_exec_events): Declare new global variable.
4186 * target.h (struct target_ops) <supports_exec_events>: New
4188 (target_supports_exec_events): New macro.
4189 * win32-low.c (win32_target_ops) <supports_exec_events>:
4190 Initialize new member.
4192 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4194 * linux-low.c (linux_low_enable_btrace): Remove.
4195 (linux_target_ops): Replace linux_low_enable_btrace with
4196 linux_enable_btrace.
4198 2015-09-03 Yao Qi <yao.qi@linaro.org>
4200 * linux-aarch64-low.c (aarch64_insert_point): Call
4201 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4204 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4206 * linux-low.c (check_stopped_by_breakpoint): Use
4207 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4209 2015-08-27 Pedro Alves <palves@redhat.com>
4211 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4213 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4215 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4216 the XNEW-family equivalent.
4217 (compile_bytecodes): Likewise.
4218 * dll.c (loaded_dll): Likewise.
4219 * event-loop.c (append_callback_event): Likewise.
4220 (create_file_handler): Likewise.
4221 (create_file_event): Likewise.
4222 * hostio.c (handle_open): Likewise.
4223 * inferiors.c (add_thread): Likewise.
4224 (add_process): Likewise.
4225 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4226 * linux-arm-low.c (arm_new_process): Likewise.
4227 (arm_new_thread): Likewise.
4228 * linux-low.c (add_to_pid_list): Likewise.
4229 (linux_add_process): Likewise.
4230 (handle_extended_wait): Likewise.
4231 (add_lwp): Likewise.
4232 (enqueue_one_deferred_signal): Likewise.
4233 (enqueue_pending_signal): Likewise.
4234 (linux_resume_one_lwp_throw): Likewise.
4235 (linux_resume_one_thread): Likewise.
4236 (linux_read_memory): Likewise.
4237 (linux_write_memory): Likewise.
4238 * linux-mips-low.c (mips_linux_new_process): Likewise.
4239 (mips_linux_new_thread): Likewise.
4240 (mips_add_watchpoint): Likewise.
4241 * linux-x86-low.c (initialize_low_arch): Likewise.
4242 * lynx-low.c (lynx_add_process): Likewise.
4243 * mem-break.c (set_raw_breakpoint_at): Likewise.
4244 (set_breakpoint): Likewise.
4245 (add_condition_to_breakpoint): Likewise.
4246 (add_commands_to_breakpoint): Likewise.
4247 (clone_agent_expr): Likewise.
4248 (clone_one_breakpoint): Likewise.
4249 * regcache.c (new_register_cache): Likewise.
4250 * remote-utils.c (look_up_one_symbol): Likewise.
4251 * server.c (queue_stop_reply): Likewise.
4252 (start_inferior): Likewise.
4253 (queue_stop_reply_callback): Likewise.
4254 (handle_target_event): Likewise.
4255 * spu-low.c (fetch_ppc_memory): Likewise.
4256 (store_ppc_memory): Likewise.
4257 * target.c (set_target_ops): Likewise.
4258 * thread-db.c (thread_db_load_search): Likewise.
4259 (try_thread_db_load_1): Likewise.
4260 * tracepoint.c (add_tracepoint): Likewise.
4261 (add_tracepoint_action): Likewise.
4262 (create_trace_state_variable): Likewise.
4263 (cmd_qtdpsrc): Likewise.
4264 (cmd_qtro): Likewise.
4265 (add_while_stepping_state): Likewise.
4266 * win32-low.c (child_add_thread): Likewise.
4267 (get_image_name): Likewise.
4269 2015-08-25 Yao Qi <yao.qi@linaro.org>
4271 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4273 2015-08-25 Yao Qi <yao.qi@linaro.org>
4275 * Makefile.in (aarch64-linux.o): New rule.
4276 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4278 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4279 (aarch64_init_debug_reg_state): Make it extern.
4280 (aarch64_linux_prepare_to_resume): Remove.
4282 2015-08-25 Yao Qi <yao.qi@linaro.org>
4284 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4285 lwp_arch_private_info and ptid_of_lwp.
4287 2015-08-25 Yao Qi <yao.qi@linaro.org>
4289 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4290 Find proc_info by find_process_pid. All callers updated.
4292 2015-08-25 Yao Qi <yao.qi@linaro.org>
4294 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4296 (debug_reg_change_callback): Remove.
4297 (aarch64_notify_debug_reg_change): Remove.
4299 2015-08-25 Yao Qi <yao.qi@linaro.org>
4301 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4302 Call current_lwp_ptid.
4304 2015-08-25 Yao Qi <yao.qi@linaro.org>
4306 * linux-aarch64-low.c (debug_reg_change_callback): Use
4309 2015-08-25 Yao Qi <yao.qi@linaro.org>
4311 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4313 2015-08-25 Yao Qi <yao.qi@linaro.org>
4315 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4317 2015-08-25 Yao Qi <yao.qi@linaro.org>
4319 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4322 2015-08-25 Yao Qi <yao.qi@linaro.org>
4324 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4326 (debug_reg_change_callback): Remove argument entry and add argument
4327 lwp. Remove local variable thread. Don't print thread id in the
4328 debugging output. Don't check whether pid of thread equals to pid.
4329 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4330 iterate_over_lwps instead find_inferior.
4332 2015-08-24 Pedro Alves <palves@redhat.com>
4334 * inferiors.c (get_first_process): New function.
4335 * inferiors.h (get_first_process): New declaration.
4336 * remote-utils.c (read_ptid): Default to the first process in the
4337 list, instead of to the current thread's process.
4339 2015-08-24 Pedro Alves <palves@redhat.com>
4341 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4342 * event-loop.c: Likewise.
4343 * remote-utils.c: Likewise.
4344 * tracepoint.c: Likewise.
4346 2015-08-24 Pedro Alves <palves@redhat.com>
4348 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4351 2015-08-21 Pedro Alves <palves@redhat.com>
4353 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4354 instead of literal 1.
4356 2015-08-21 Pedro Alves <palves@redhat.com>
4358 * tdesc.c (default_description): Explicitly zero-initialize.
4360 2015-08-21 Pedro Alves <palves@redhat.com>
4363 * inferiors.c (remove_thread): Discard any pending stop reply for
4365 * server.c (remove_all_on_match_pid): Rename to ...
4366 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4368 (discard_queued_stop_replies): Change parameter to a ptid. Now
4370 (handle_v_kill, kill_inferior_callback, captured_main)
4371 (process_serial_event): Adjust.
4372 * server.h (discard_queued_stop_replies): Declare.
4374 2015-08-21 Pedro Alves <palves@redhat.com>
4376 * linux-low.c (wait_for_sigstop): Always switch to no thread
4377 selected if the previously current thread dies.
4378 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4379 process instead of the current thread's.
4380 * remote-utils.c (input_interrupt): Don't check if there's no
4382 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4383 current thread to the general thread fails, error out.
4384 (handle_qxfer_auxv, handle_qxfer_libraries)
4385 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4386 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4387 (handle_query): Check if there's a thread selected instead of
4388 checking whether there's any thread in the thread list.
4389 (handle_qxfer_threads, handle_qxfer_btrace)
4390 (handle_qxfer_btrace_conf): Don't error out early if there's no
4391 thread in the thread list.
4392 (handle_v_cont, myresume): Don't set the current thread to the
4394 (process_serial_event) <Hg handling>: Also set thread_id if the
4395 previous general thread is still alive.
4396 (process_serial_event) <g/G handling>: If setting the current
4397 thread to the general thread fails, error out.
4398 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4399 thread's lwp instead of the current thread's.
4400 * target.c (set_desired_thread): If the desired thread was not
4401 found, leave the current thread pointing to NULL. Return an int
4402 (boolean) indicating success.
4403 * target.h (set_desired_thread): Change return type to int.
4405 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4407 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4408 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4410 (ps_get_thread_area): New function.
4412 2015-08-19 Gary Benson <gbenson@redhat.com>
4414 * hostio.c (handle_pread): Do not attempt to read more data
4415 than hostio_reply_with_data can fit in a packet.
4417 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4419 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4421 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4423 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4425 2015-08-06 Pedro Alves <palves@redhat.com>
4427 * tracepoint.c (expr_eval_result): Now an int.
4429 2015-08-06 Pedro Alves <palves@redhat.com>
4431 * gdbthread.h (struct regcache): Forward declare.
4432 (struct thread_info) <regcache_data>: Now a struct regcache
4434 * inferiors.c (inferior_regcache_data)
4435 (set_inferior_regcache_data): Now work with struct regcache
4437 * inferiors.h (struct regcache): Forward declare.
4438 (inferior_regcache_data, set_inferior_regcache_data): Now work
4439 with struct regcache pointers.
4440 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4441 (free_register_cache_thread): Remove struct regcache pointer
4444 2015-08-06 Pedro Alves <palves@redhat.com>
4446 * server.c (captured_main): On error, print the exception message
4447 to stderr, and if run_once is set, throw a quit.
4449 2015-08-06 Pedro Alves <palves@redhat.com>
4451 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4454 2015-08-06 Pedro Alves <palves@redhat.com>
4456 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4457 reading beyond the passed in buffer length.
4459 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4461 * tracepoint.c (symbol_list) <required>: Remove.
4463 2015-08-06 Pedro Alves <palves@redhat.com>
4465 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4466 count if stopping and suspending threads.
4467 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4468 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4469 (linux_detach): Complete an ongoing step-over.
4470 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4472 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4473 (linux_wait_1): If passing a signal to the inferior after
4474 finishing a step-over, unsuspend and re-resume all lwps. If we
4475 see a single-step event but the thread should be continuing, don't
4476 pass the trap to gdb.
4477 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4478 internal_error instead of gdb_assert.
4479 (enqueue_pending_signal): New function.
4480 (check_ptrace_stopped_lwp_gone): Add debug output.
4481 (start_step_over): Use internal_error instead of gdb_assert.
4482 (complete_ongoing_step_over): New function.
4483 (linux_resume_one_thread): Don't resume a suspended thread.
4484 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4487 2015-08-06 Pedro Alves <palves@redhat.com>
4489 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4490 (linux_thread_alive): Use lwp_is_marked_dead.
4491 (extended_event_reported): Delete.
4492 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4493 instead of extended_event_reported.
4494 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4496 (lwp_is_marked_dead): New function.
4497 (lwp_running): Use lwp_is_marked_dead.
4498 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4501 2015-08-06 Pedro Alves <palves@redhat.com>
4503 * linux-low.c (linux_wait_1): Move fork event output out of the
4504 !report_to_gdb check. Pass event_child->waitstatus to
4505 target_waitstatus_to_string instead of ourstatus.
4507 2015-08-04 Yao Qi <yao.qi@linaro.org>
4509 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4510 if current_thread is 32 bit.
4512 2015-08-04 Yao Qi <yao.qi@linaro.org>
4514 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4515 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4516 * server.c (extended_protocol): Remove "static".
4517 * server.h (extended_protocol): Declare it.
4519 2015-08-04 Yao Qi <yao.qi@linaro.org>
4521 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4522 both aarch64 and aarch32.
4523 (aarch64_set_pc): Likewise.
4525 2015-08-04 Yao Qi <yao.qi@linaro.org>
4527 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4528 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4529 arm-with-neon.xml to srv_xmlfiles.
4530 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4531 (is_64bit_tdesc): New function.
4532 (aarch64_linux_read_description): New function.
4533 (aarch64_arch_setup): Call aarch64_linux_read_description.
4534 (regs_info): Rename to regs_info_aarch64.
4535 (aarch64_regs_info): Return right regs_info.
4536 (initialize_low_arch): Call initialize_low_arch_aarch32.
4538 2015-08-04 Yao Qi <yao.qi@linaro.org>
4540 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4541 * linux-aarch32-low.c: New file.
4542 * linux-aarch32-low.h: New file.
4543 * linux-arm-low.c (arm_fill_gregset): Move it to
4544 linux-aarch32-low.c.
4545 (arm_store_gregset): Likewise.
4546 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4547 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4548 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4549 (regs_info): Rename to regs_info_arm.
4550 (arm_regs_info): Return regs_info_aarch32 if
4551 have_ptrace_getregset is 1 and target description is
4552 arm_with_neon or arm_with_vfpv3.
4553 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4554 Call initialize_low_arch_aarch32 instead.
4556 2015-08-04 Yao Qi <yao.qi@linaro.org>
4558 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4559 * linux-low.c: ... here.
4560 * linux-low.h (have_ptrace_getregset): Declare it.
4562 2015-08-04 Pedro Alves <palves@redhat.com>
4564 * thread-db.c (struct thread_db): Use new typedefs.
4565 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4567 (disable_thread_event_reporting): Cast result of dlsym to
4568 destination function pointer type.
4569 (thread_db_mourn): Use td_ta_delete_ftype.
4571 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4573 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4575 (CDX_BREAKPOINT): Define for R2.
4576 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4577 (the_low_target): Add comments.
4579 2015-07-30 Yao Qi <yao.qi@linaro.org>
4581 * linux-arm-low.c (arm_hwcap): Remove it.
4582 (arm_read_description): New local variable arm_hwcap. Don't
4583 set arm_hwcap to zero.
4585 2015-07-30 Yao Qi <yao.qi@linaro.org>
4587 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4588 Use regcache->tdesc instead.
4589 (arm_store_wmmxregset): Likewise.
4590 (arm_fill_vfpregset): Likewise.
4591 (arm_store_vfpregset): Likewise.
4593 2015-07-30 Yao Qi <yao.qi@linaro.org>
4595 * linux-arm-low.c: Include arch/arm.h.
4596 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4597 (arm_store_gregset): Likewise.
4599 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4601 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4602 ptrace's 4th parameter.
4604 2015-07-27 Yao Qi <yao.qi@linaro.org>
4606 * configure.srv (case aarch64*-*-linux*): Don't set
4609 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4611 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4613 * linux-arm-low.c: Likewise.
4614 * linux-cris-low.c: Likewise.
4615 * linux-crisv32-low.c: Likewise.
4616 * linux-low.c: Likewise.
4617 * linux-m68k-low.c: Likewise.
4618 * linux-mips-low.c: Likewise.
4619 * linux-nios2-low.c: Likewise.
4620 * linux-s390-low.c: Likewise.
4621 * linux-sparc-low.c: Likewise.
4622 * linux-tic6x-low.c: Likewise.
4623 * linux-tile-low.c: Likewise.
4624 * linux-x86-low.c: Likewise.
4626 2015-07-24 Pedro Alves <palves@redhat.com>
4628 * config.in: Regenerate.
4629 * configure: Regenerate.
4631 2015-07-24 Pedro Alves <palves@redhat.com>
4633 * acinclude.m4: Include ../ptrace.m4.
4634 * configure.ac: Call GDB_AC_PTRACE.
4635 * config.in, configure: Regenerate.
4637 2015-07-24 Yao Qi <yao.qi@linaro.org>
4639 * linux-low.c (linux_create_inferior): Remove setting to
4640 proc->priv->new_inferior.
4641 (linux_attach): Likewise.
4642 (linux_low_filter_event): Likewise.
4643 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4645 2015-07-24 Yao Qi <yao.qi@linaro.org>
4647 * linux-low.c (linux_arch_setup): New function.
4648 (linux_low_filter_event): If proc->tdesc is NULL and
4649 proc->attached is true, call the_low_target.arch_setup.
4650 Otherwise, keep status pending, and return.
4651 (linux_resume_one_lwp_throw): Don't call get_pc if
4652 thread->while_stepping isn't NULL. Don't call
4653 get_thread_regcache if proc->tdesc is NULL.
4654 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4655 (linux_target_ops): Install arch_setup.
4656 * server.c (start_inferior): Call the_target->arch_setup.
4657 * target.h (struct target_ops) <arch_setup>: New field.
4658 (target_arch_setup): New marco.
4659 * lynx-low.c (lynx_target_ops): Update.
4660 * nto-low.c (nto_target_ops): Update.
4661 * spu-low.c (spu_target_ops): Update.
4662 * win32-low.c (win32_target_ops): Update.
4664 2015-07-24 Yao Qi <yao.qi@linaro.org>
4666 * linux-low.c (linux_add_process): Don't set
4667 proc->priv->new_inferior.
4668 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4669 (linux_attach): Likewise.
4671 2015-07-24 Yao Qi <yao.qi@linaro.org>
4673 * server.c (start_inferior): Code refactor.
4675 2015-07-24 Yao Qi <yao.qi@linaro.org>
4677 * server.c (process_serial_event): Set general_thread.
4679 2015-07-21 Yao Qi <yao.qi@linaro.org>
4681 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4682 aarch64_linux_get_debug_reg_capacity.
4684 2015-07-17 Yao Qi <yao.qi@linaro.org>
4686 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4687 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4688 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4689 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4690 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4691 (AARCH64_HWP_ALIGNMENT): Likewise.
4692 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4693 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4694 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4695 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4696 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4697 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4698 (struct aarch64_debug_reg_state): Likewise.
4699 (struct arch_lwp_info): Likewise.
4700 (aarch64_align_watchpoint): Likewise.
4701 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4702 (aarch64_watchpoint_length): Likewise.
4703 (aarch64_point_encode_ctrl_reg): Likewise
4704 (aarch64_point_is_aligned): Likewise.
4705 (aarch64_align_watchpoint): Likewise.
4706 (aarch64_linux_set_debug_regs):
4707 (aarch64_dr_state_insert_one_point): Likewise.
4708 (aarch64_dr_state_remove_one_point): Likewise.
4709 (aarch64_handle_breakpoint): Likewise.
4710 (aarch64_handle_aligned_watchpoint): Likewise.
4711 (aarch64_handle_unaligned_watchpoint): Likewise.
4712 (aarch64_handle_watchpoint): Likewise.
4714 2015-07-17 Yao Qi <yao.qi@linaro.org>
4716 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4717 and don't aarch64_get_debug_reg_state. All callers update.
4718 (aarch64_handle_aligned_watchpoint): Likewise.
4719 (aarch64_handle_unaligned_watchpoint): Likewise.
4720 (aarch64_handle_watchpoint): Likewise.
4721 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4722 (aarch64_remove_point): Likewise.
4724 2015-07-17 Yao Qi <yao.qi@linaro.org>
4726 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4728 (aarch64_handle_unaligned_watchpoint): Likewise.
4730 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4732 Revert the previous 3 commits:
4733 Move gdb_regex* to common/
4734 Move linux_find_memory_regions_full & co.
4735 gdbserver build-id attribute generator
4737 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4738 Jan Kratochvil <jan.kratochvil@redhat.com>
4740 gdbserver build-id attribute generator.
4741 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4742 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4743 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4745 (get_dynamic): Use find_pdhr to traverse program headers.
4746 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4747 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4748 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4749 (get_hex_build_id): New.
4750 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4751 to reply XML document.
4753 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4754 Jan Kratochvil <jan.kratochvil@redhat.com>
4756 * target.c: Include target/target-utils.h and fcntl.h.
4757 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4758 (target_fileio_read_stralloc): New functions.
4760 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4762 * Makefile.in (OBS): Add gdb_regex.o.
4764 * config.in: Rebuilt.
4765 * configure: Rebuilt.
4767 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4768 Jan Kratochvil <jan.kratochvil@redhat.com>
4770 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4771 * Makefile.in (OBS): Add target-utils.o.
4772 (linux-maps.o, target-utils.o): New.
4773 * configure.srv (srv_linux_obj): Add linux-maps.o.
4775 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4777 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4779 (the_low_target): Install it.
4781 2015-07-14 Pedro Alves <palves@redhat.com>
4783 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4784 Instead, ignore ECHILD, and throw an error for other errnos.
4786 2015-07-10 Pedro Alves <palves@redhat.com>
4788 * event-loop.c (struct callback_event) <data>: Change type to
4789 gdb_client_data instance instead of gdb_client_data pointer.
4790 (append_callback_event): Adjust.
4792 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4794 * linux-aarch64-low.c: Add comments for each linux_target_ops
4795 method. Remove comments already covered in target_ops and
4796 linux_target_ops definitions.
4797 (the_low_target): Add comments for each unimplemented method.
4799 2015-07-09 Yao Qi <yao.qi@linaro.org>
4801 * linux-aarch64-low.c (aarch64_regmap): Remove.
4802 (aarch64_usrregs_info): Remove.
4803 (regs_info): Set field usrregs to NULL.
4805 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4807 * linux-low.c: Include "rsp-low.h"
4808 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4809 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4810 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4811 (handle_btrace_enable_pt): New.
4812 (handle_btrace_general_set): Support "pt".
4813 (handle_btrace_conf_general_set): Support "pt:size".
4815 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4817 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4820 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4822 * linux-aarch64-low.c: Remove comment about endianness.
4823 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4824 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4827 2015-06-24 Gary Benson <gbenson@redhat.com>
4829 * linux-i386-ipa.c (stdint.h): Do not include.
4830 * lynx-i386-low.c (stdint.h): Likewise.
4831 * lynx-ppc-low.c (stdint.h): Likewise.
4832 * mem-break.c (stdint.h): Likewise.
4833 * thread-db.c (stdint.h): Likewise.
4834 * tracepoint.c (stdint.h): Likewise.
4835 * win32-low.c (stdint.h): Likewise.
4837 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4839 * server.c (write_qxfer_response): Update call to
4840 remote_escape_output.
4842 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4843 Jan Kratochvil <jan.kratochvil@redhat.com>
4845 Merge multiple hex conversions.
4846 * gdbreplay.c (tohex): Rename to 'fromhex'.
4847 (logchar): Use fromhex.
4849 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4851 * server.c (handle_qxfer_libraries): Set `version' attribute for
4854 2015-06-10 Gary Benson <gbenson@redhat.com>
4856 * target.h (struct target_ops) <multifs_open>: New field.
4857 <multifs_unlink>: Likewise.
4858 <multifs_readlink>: Likewise.
4859 * linux-low.c (nat/linux-namespaces.h): New include.
4860 (linux_target_ops): Initialize the_target->multifs_open,
4861 the_target->multifs_unlink and the_target->multifs_readlink.
4862 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4863 * hostio.c (hostio_fs_pid): New static variable.
4864 (hostio_handle_new_gdb_connection): New function.
4865 (handle_setfs): Likewise.
4866 (handle_open): Use the_target->multifs_open as appropriate.
4867 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4868 (handle_readlink): Use the_target->multifs_readlink as
4870 (handle_vFile): Handle vFile:setfs packets.
4871 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4872 after target_handle_new_gdb_connection.
4874 2015-06-10 Gary Benson <gbenson@redhat.com>
4876 * configure.ac (AC_CHECK_FUNCS): Add setns.
4877 * config.in: Regenerate.
4878 * configure: Likewise.
4879 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4880 (linux-namespaces.o): New rule.
4881 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4883 2015-06-09 Gary Benson <gbenson@redhat.com>
4885 * hostio.c (handle_open): Process mode argument with
4886 fileio_to_host_mode.
4888 2015-06-01 Yao Qi <yao.qi@linaro.org>
4890 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4891 * linux-x86-low.c: Likewise.
4893 2015-05-28 Don Breazeal <donb@codesourcery.com>
4895 * linux-low.c (handle_extended_wait): Initialize
4896 thread_info.last_resume_kind for new fork children.
4898 2015-05-15 Pedro Alves <palves@redhat.com>
4900 * target.h (target_handle_new_gdb_connection): Rewrite using if
4901 wrapped in do/while.
4903 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4905 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4906 * configure, config.in: Regenerate.
4907 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4910 2015-05-12 Don Breazeal <donb@codesourcery.com>
4912 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4913 PTRACE_EVENT_VFORK_DONE.
4914 (linux_low_ptrace_options, extended_event_reported): Add vfork
4916 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4917 and "vforkdone" for RSP 'T' Stop Reply Packet.
4918 * server.h (report_vfork_events): Declare
4921 2015-05-12 Don Breazeal <donb@codesourcery.com>
4923 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4924 (the_low_target) <new_fork>: Initialize new member.
4925 * linux-arm-low.c (arm_new_fork): New function.
4926 (the_low_target) <new_fork>: Initialize new member.
4927 * linux-low.c (handle_extended_wait): Call new target function
4929 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4930 * linux-mips-low.c (mips_add_watchpoint): New function
4931 extracted from mips_insert_point.
4932 (the_low_target) <new_fork>: Initialize new member.
4933 (mips_linux_new_fork): New function.
4934 (mips_insert_point): Call mips_add_watchpoint.
4935 * linux-x86-low.c (x86_linux_new_fork): New function.
4936 (the_low_target) <new_fork>: Initialize new member.
4938 2015-05-12 Don Breazeal <donb@codesourcery.com>
4940 * linux-low.c (handle_extended_wait): Implement return value,
4941 rename argument 'event_child' to 'event_lwp', handle
4942 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4943 (linux_low_ptrace_options): New function.
4944 (linux_low_filter_event): Call linux_low_ptrace_options,
4945 use different argument fo linux_enable_event_reporting,
4946 use return value from handle_extended_wait.
4947 (extended_event_reported): New function.
4948 (linux_wait_1): Call extended_event_reported and set
4949 status to report fork events.
4950 (linux_write_memory): Add pid to debug message.
4951 (reset_lwp_ptrace_options_callback): New function.
4952 (linux_handle_new_gdb_connection): New function.
4953 (linux_target_ops): Initialize new structure member.
4954 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4955 * lynx-low.c: Initialize new structure member.
4956 * remote-utils.c (prepare_resume_reply): Implement stop reason
4957 "fork" for "T" stop message.
4958 * server.c (handle_query): Call handle_new_gdb_connection.
4959 * server.h (report_fork_events): Declare global flag.
4960 * target.h (struct target_ops) <handle_new_gdb_connection>:
4962 (target_handle_new_gdb_connection): New macro.
4963 * win32-low.c: Initialize new structure member.
4965 2015-05-12 Don Breazeal <donb@codesourcery.com>
4967 * mem-break.c (APPEND_TO_LIST): Define macro.
4968 (clone_agent_expr): New function.
4969 (clone_one_breakpoint): New function.
4970 (clone_all_breakpoints): New function.
4971 * mem-break.h: Declare new functions.
4973 2015-05-12 Don Breazeal <donb@codesourcery.com>
4975 * linux-low.c (linux_supports_fork_events): New function.
4976 (linux_supports_vfork_events): New function.
4977 (linux_target_ops): Initialize new structure members.
4978 (initialize_low): Call linux_check_ptrace_features.
4979 * lynx-low.c (lynx_target_ops): Initialize new structure
4981 * server.c (report_fork_events, report_vfork_events):
4983 (handle_query): Add new features to qSupported packet and
4985 (captured_main): Initialize new global variables.
4986 * target.h (struct target_ops) <supports_fork_events>:
4988 <supports_vfork_events>: New member.
4989 (target_supports_fork_events): New macro.
4990 (target_supports_vfork_events): New macro.
4991 * win32-low.c (win32_target_ops): Initialize new structure
4994 2015-05-12 Gary Benson <gbenson@redhat.com>
4996 * server.c (handle_qxfer_exec_file): Use current process
4999 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5001 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5002 Remove HAVE_PTRACE_GETREGS conditionals.
5003 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5004 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5006 2015-05-08 Yao Qi <yao.qi@linaro.org>
5008 * linux-low.c (linux_supports_conditional_breakpoints): New
5010 (linux_target_ops): Install new target method.
5011 * lynx-low.c (lynx_target_ops): Install NULL hook for
5012 supports_conditional_breakpoints.
5013 * nto-low.c (nto_target_ops): Likewise.
5014 * spu-low.c (spu_target_ops): Likewise.
5015 * win32-low.c (win32_target_ops): Likewise.
5016 * server.c (handle_query): Check
5017 target_supports_conditional_breakpoints.
5018 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5020 (target_supports_conditional_breakpoints): New macro.
5022 2015-05-06 Pedro Alves <palves@redhat.com>
5025 * server.c (start_inferior): If the process exits, mourn it.
5027 2015-04-21 Gary Benson <gbenson@redhat.com>
5029 * hostio.c (fileio_open_flags_to_host): Factored out to
5030 fileio_to_host_openflags in common/fileio.c. Single use
5033 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5035 * linux-xtensa-low.c (xtensa_fill_gregset)
5036 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5039 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5041 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5042 (regs_info): Replace usrregs pointer with NULL.
5044 2015-04-17 Gary Benson <gbenson@redhat.com>
5046 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5047 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5048 * server.c (handle_qxfer_exec_file): New function.
5049 (qxfer_packets): Add exec-file entry.
5050 (handle_query): Report qXfer:exec-file:read as supported packet.
5052 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5054 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5056 2015-04-09 Gary Benson <gbenson@redhat.com>
5058 * hostio-errno.c (errno_to_fileio_error): Remove function.
5059 Update caller to use remote_fileio_to_fio_error.
5061 2015-04-09 Yao Qi <yao.qi@linaro.org>
5063 * linux-low.c (linux_insert_point): Call
5064 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5065 (linux_remove_point): Call remove_memory_breakpoint if type is
5067 * linux-x86-low.c (x86_insert_point): Don't call
5068 insert_memory_breakpoint.
5069 (x86_remove_point): Don't call remove_memory_breakpoint.
5071 2015-04-01 Pedro Alves <palves@redhat.com>
5072 Cleber Rosa <crosa@redhat.com>
5074 * server.c (gdbserver_usage): Reorganize and extend the usage
5077 2015-03-24 Pedro Alves <palves@redhat.com>
5079 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5080 output. Also dump TRAP_TRACE.
5081 (linux_low_filter_event): In debug output, distinguish a
5082 resume_stop SIGSTOP from a delayed SIGSTOP.
5084 2015-03-24 Gary Benson <gbenson@redhat.com>
5086 * linux-x86-low.c (x86_linux_new_thread): Moved to
5088 (x86_linux_prepare_to_resume): Likewise.
5090 2015-03-24 Gary Benson <gbenson@redhat.com>
5092 * Makefile.in (x86-linux-dregs.o): New rule.
5093 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5094 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5095 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5096 (x86_linux_dr_get): Likewise.
5097 (x86_linux_dr_set): Likewise.
5098 (update_debug_registers_callback): Likewise.
5099 (x86_linux_dr_set_addr): Likewise.
5100 (x86_linux_dr_get_addr): Likewise.
5101 (x86_linux_dr_set_control): Likewise.
5102 (x86_linux_dr_get_control): Likewise.
5103 (x86_linux_dr_get_status): Likewise.
5104 (x86_linux_update_debug_registers): Likewise.
5106 2015-03-24 Gary Benson <gbenson@redhat.com>
5108 * linux-x86-low.c (x86_linux_update_debug_registers):
5109 New function, factored out from...
5110 (x86_linux_prepare_to_resume): ...this.
5112 2015-03-24 Gary Benson <gbenson@redhat.com>
5114 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5115 (x86_linux_dr_set): Likewise.
5116 (update_debug_registers_callback): Likewise.
5117 (x86_linux_dr_set_addr): Likewise.
5118 (x86_linux_dr_get_addr): Likewise.
5119 (x86_linux_dr_set_control): Likewise.
5120 (x86_linux_dr_get_control): Likewise.
5121 (x86_linux_dr_get_status): Likewise.
5122 (x86_linux_prepare_to_resume): Likewise.
5124 2015-03-24 Gary Benson <gbenson@redhat.com>
5126 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5127 Use perror_with_name. Pass string through gettext.
5128 (x86_linux_dr_set): Likewise.
5130 2015-03-24 Gary Benson <gbenson@redhat.com>
5132 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5133 (x86_linux_dr_set_addr): ...this.
5134 (x86_dr_low_get_addr): Rename to...
5135 (x86_linux_dr_get_addr): ...this.
5136 (x86_dr_low_set_control): Rename to...
5137 (x86_linux_dr_set_control): ...this.
5138 (x86_dr_low_get_control): Rename to...
5139 (x86_linux_dr_get_control): ...this.
5140 (x86_dr_low_get_status): Rename to...
5141 (x86_linux_dr_get_status): ...this.
5142 (x86_dr_low): Update with new function names.
5144 2015-03-24 Gary Benson <gbenson@redhat.com>
5146 * Makefile.in (x86-linux.o): New rule.
5147 * configure.srv: Add x86-linux.o to relevant targets.
5148 * linux-low.c (lwp_set_arch_private_info): New function.
5149 (lwp_arch_private_info): Likewise.
5150 * linux-x86-low.c: Include nat/x86-linux.h.
5151 (arch_lwp_info): Removed structure.
5152 (update_debug_registers_callback):
5153 Use lwp_set_debug_registers_changed.
5154 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5155 and lwp_set_debug_registers_changed.
5156 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5158 2015-03-24 Gary Benson <gbenson@redhat.com>
5160 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5161 * linux-arm-low.c (arm_new_thread): Likewise.
5162 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5163 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5164 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5165 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5167 2015-03-24 Gary Benson <gbenson@redhat.com>
5169 * linux-low.c (ptid_of_lwp): New function.
5170 (lwp_is_stopped): Likewise.
5171 (lwp_stop_reason): Likewise.
5172 * linux-x86-low.c (update_debug_registers_callback):
5174 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5177 2015-03-24 Gary Benson <gbenson@redhat.com>
5179 * linux-low.h (linux_stop_lwp): Remove declaration.
5181 2015-03-24 Gary Benson <gbenson@redhat.com>
5183 * linux-low.h: Include nat/linux-nat.h.
5184 * linux-low.c (iterate_over_lwps_args): New structure.
5185 (iterate_over_lwps_filter): New function.
5186 (iterate_over_lwps): Likewise.
5187 * linux-x86-low.c (update_debug_registers_callback):
5188 Update signature to what iterate_over_lwps expects.
5189 Remove PID check that iterate_over_lwps now performs.
5190 (x86_dr_low_set_addr): Use iterate_over_lwps.
5191 (x86_dr_low_set_control): Likewise.
5193 2015-03-24 Gary Benson <gbenson@redhat.com>
5195 * linux-x86-low.c (x86_debug_reg_state): New function.
5196 (x86_linux_prepare_to_resume): Use the above.
5198 2015-03-24 Gary Benson <gbenson@redhat.com>
5200 * linux-low.c (current_lwp_ptid): New function.
5201 * linux-x86-low.c: Include nat/linux-nat.h.
5202 (x86_dr_low_get_addr): Use current_lwp_ptid.
5203 (x86_dr_low_get_control): Likewise.
5204 (x86_dr_low_get_status): Likewise.
5206 2015-03-20 Pedro Alves <palves@redhat.com>
5208 * tracepoint.c (cmd_qtstatus): Make "str" const.
5210 2015-03-20 Pedro Alves <palves@redhat.com>
5212 * server.c (handle_general_set): Make "req_str" const.
5214 2015-03-19 Pedro Alves <palves@redhat.com>
5216 * linux-low.c (linux_resume_one_lwp): Rename to ...
5217 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5218 instead call perror_with_name.
5219 (check_ptrace_stopped_lwp_gone): New function.
5220 (linux_resume_one_lwp): Reimplement as wrapper around
5221 linux_resume_one_lwp_throw that swallows errors if the LWP is
5224 2015-03-19 Pedro Alves <palves@redhat.com>
5226 * linux-low.c (count_events_callback, select_event_lwp_callback):
5227 No longer check whether the thread has resume_stop as last resume
5230 2015-03-19 Pedro Alves <palves@redhat.com>
5232 * linux-low.c (count_events_callback, select_event_lwp_callback):
5233 Use the lwp's status_pending_p field, not the thread's.
5235 2015-03-19 Pedro Alves <palves@redhat.com>
5237 * linux-low.c (select_event_lwp_callback): Update comments to
5238 no longer mention SIGTRAP.
5240 2015-03-18 Gary Benson <gbenson@redhat.com>
5242 * server.c (handle_query): Do not report vFile:fstat as supported.
5244 2015-03-11 Gary Benson <gbenson@redhat.com>
5246 * hostio.c (sys/types.h): New include.
5247 (sys/stat.h): Likewise.
5248 (common-remote-fileio.h): Likewise.
5249 (handle_fstat): New function.
5250 (handle_vFile): Handle vFile:fstat packets.
5252 2015-03-11 Gary Benson <gbenson@redhat.com>
5254 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5255 struct stat.st_blocks and struct stat.st_blksize.
5256 * configure: Regenerate.
5257 * config.in: Likewise.
5258 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5259 (OBS): Add common-remote-fileio.o.
5260 (common-remote-fileio.o): New rule.
5262 2015-03-09 Pedro Alves <palves@redhat.com>
5264 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5265 'struct sockaddr' pointer in 'accept' call.
5267 2015-03-09 Pedro Alves <palves@redhat.com>
5270 2015-03-07 Pedro Alves <palves@redhat.com>
5271 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5272 or <winsock2.h> here. Instead include "gdb_socket.h".
5273 (remote_open): Use union gdb_sockaddr_u.
5274 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5275 or <winsock2.h> here. Instead include "gdb_socket.h".
5276 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5277 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5279 (init_named_socket, gdb_agent_helper_thread): Use union
5282 2015-03-07 Pedro Alves <palves@redhat.com>
5284 * configure.ac (build_warnings): Move
5285 -Wdeclaration-after-statement to the C-specific set.
5286 * configure: Regenerate.
5288 2015-03-07 Pedro Alves <palves@redhat.com>
5290 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5291 or <winsock2.h> here. Instead include "gdb_socket.h".
5292 (remote_open): Use union gdb_sockaddr_u.
5293 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5294 or <winsock2.h> here. Instead include "gdb_socket.h".
5295 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5296 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5298 (init_named_socket, gdb_agent_helper_thread): Use union
5301 2015-03-07 Pedro Alves <palves@redhat.com>
5303 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5306 2015-03-06 Yao Qi <yao.qi@linaro.org>
5308 * linux-aarch64-low.c (aarch64_insert_point): Use
5309 show_debug_regs as a boolean.
5310 (aarch64_remove_point): Likewise.
5312 2015-03-05 Pedro Alves <palves@redhat.com>
5314 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5315 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5316 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5317 * nto-low.c (nto_target_ops): Likewise.
5318 * spu-low.c (spu_target_ops): Likewise.
5319 * win32-low.c (win32_target_ops): Likewise.
5321 2015-03-04 Pedro Alves <palves@redhat.com>
5323 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5324 Decide whether a breakpoint triggered based on the SIGTRAP's
5326 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5327 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5328 (linux_low_filter_event): Check for breakpoints before checking
5330 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5332 (linux_stopped_by_sw_breakpoint)
5333 (linux_supports_stopped_by_sw_breakpoint)
5334 (linux_stopped_by_hw_breakpoint)
5335 (linux_supports_stopped_by_hw_breakpoint): New functions.
5336 (linux_target_ops): Install new target methods.
5338 2015-03-04 Pedro Alves <palves@redhat.com>
5340 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5341 * server.c (swbreak_feature, hwbreak_feature): New globals.
5342 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5343 (captured_main): Clear swbreak_feature and hwbreak_feature.
5344 * server.h (swbreak_feature, hwbreak_feature): Declare.
5345 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5346 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5347 supports_stopped_by_hw_breakpoint>: New fields.
5348 (target_supports_stopped_by_sw_breakpoint)
5349 (target_stopped_by_sw_breakpoint)
5350 (target_supports_stopped_by_hw_breakpoint)
5351 (target_stopped_by_hw_breakpoint): Declare.
5353 2015-03-04 Pedro Alves <palves@redhat.com>
5355 enum lwp_stop_reason -> enum target_stop_reason
5356 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5357 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5358 (linux_wait_1, stuck_in_jump_pad_callback)
5359 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5360 (linux_stopped_by_watchpoint):
5361 * linux-low.h (enum lwp_stop_reason): Delete.
5362 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5363 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5365 2015-03-04 Yao Qi <yao.qi@linaro.org>
5367 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5369 2015-03-03 Gary Benson <gbenson@redhat.com>
5371 * hostio.c (handle_vFile): Fix prefix lengths.
5373 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5375 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5378 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5380 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5381 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5382 (clean): Add "rm -f" for above C files.
5383 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5384 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5385 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5386 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5387 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5388 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5389 (init_registers_s390x_vx_linux64)
5390 (init_registers_s390x_tevx_linux64)
5391 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5392 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5394 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5395 (s390_store_vxrs_high): New functions.
5396 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5398 (s390_arch_setup): Add logic for selecting one of the new target
5399 descriptions. Activate the new vector regsets if applicable.
5400 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5401 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5402 and init_registers_s390x_tevx_linux64.
5404 2015-03-01 Pedro Alves <palves@redhat.com>
5406 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5409 2015-02-27 Pedro Alves <palves@redhat.com>
5411 * linux-x86-low.c (u_debugreg_offset): New function.
5412 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5414 2015-02-27 Pedro Alves <palves@redhat.com>
5416 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5417 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5418 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5419 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5420 (ps_lsetfpregs, ps_getpid)
5421 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5422 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5423 (ps_lsetxregs, ps_plog): Declare.
5425 2015-02-27 Pedro Alves <palves@redhat.com>
5427 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5428 IP_AGENT_EXPORT_FUNC.
5429 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5430 IP_AGENT_EXPORT_FUNC.
5431 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5432 (IP_AGENT_EXPORT): Delete.
5433 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5434 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5435 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5436 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5437 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5438 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5439 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5440 (traceframe_read_count, traceframe_write_count)
5441 (traceframes_created, trace_state_variables, get_raw_reg)
5442 (get_trace_state_variable_value, set_trace_state_variable_value)
5443 (ust_loaded, helper_thread_id, cmd_buf): Use
5444 IPA_SYM_EXPORTED_NAME.
5445 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5446 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5447 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5448 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5449 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5450 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5451 EXTERN_C_PUSH/EXTERN_C_POP.
5452 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5453 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5454 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5455 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5456 (traceframe_write_count, traceframe_read_count)
5457 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5458 (about_to_request_buffer_space, get_trace_state_variable_value)
5459 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5460 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5461 EXTERN_C_PUSH/EXTERN_C_POP.
5462 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5463 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5464 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5465 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5466 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5467 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5468 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5469 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5471 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5472 (IP_AGENT_EXPORT_VAR_DECL): Define.
5474 (gdb_agent_get_raw_reg): Declare.
5476 2015-02-27 Tom Tromey <tromey@redhat.com>
5477 Pedro Alves <palves@redhat.com>
5479 Rename symbols whose names are reserved C++ keywords throughout.
5481 2015-02-27 Pedro Alves <palves@redhat.com>
5483 * Makefile.in (COMPILER): New, get it from autoconf.
5484 (CXX): Get from autoconf instead.
5485 (COMPILE.pre): Use COMPILER.
5486 (CC-LD): Rename to ...
5487 (CC_LD): ... this. Use COMPILER.
5488 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5489 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5490 * acinclude.m4: Include build-with-cxx.m4.
5491 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5492 Disable -Werror by default if building in C++ mode.
5493 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5494 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5495 the C++ compiler. Save/restore CXXFLAGS too.
5496 * configure: Regenerate.
5498 2015-02-27 Pedro Alves <palves@redhat.com>
5500 * acinclude.m4: Include libiberty.m4.
5501 * configure.ac: Call libiberty_INIT.
5502 * config.in, configure: Regenerate.
5504 2015-02-26 Pedro Alves <palves@redhat.com>
5506 * linux-low.c (linux_wait_1): When incrementing the PC past a
5507 program breakpoint always use the_low_target.breakpoint_len as
5508 increment, rather than the maximum between that and
5509 the_low_target.decr_pc_after_break.
5511 2015-02-23 Pedro Alves <palves@redhat.com>
5513 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5514 thread was doing a step-over; always adjust the PC if
5515 we stepped over a permanent breakpoint.
5516 (linux_wait_1): If we stepped over breakpoint that was on top of a
5517 permanent breakpoint, manually advance the PC past it.
5519 2015-02-23 Pedro Alves <palves@redhat.com>
5521 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5523 (x86_fill_gregset, x86_store_gregset): Use it when handling
5526 2015-02-20 Pedro Alves <palves@redhat.com>
5528 * thread-db.c: Include "nat/linux-procfs.h".
5529 (thread_db_init): Skip listing new threads if the kernel supports
5530 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5532 2015-02-20 Pedro Alves <palves@redhat.com>
5534 * linux-low.c (status_pending_p_callback): Use ptid_match.
5536 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5538 PR breakpoints/16812
5539 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5540 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5541 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5543 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5545 PR breakpoints/15956
5546 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5548 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5550 * linux-low.c (linux_low_btrace_conf): Print size.
5551 * server.c (handle_btrace_conf_general_set): New.
5552 (hanle_general_set): Call handle_btrace_conf_general_set.
5553 (handle_query): Report Qbtrace-conf:bts:size as supported.
5555 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5557 * linux-low.c (linux_low_enable_btrace): Update parameters.
5558 (linux_low_btrace_conf): New.
5559 (linux_target_ops)<to_btrace_conf>: Initialize.
5560 * server.c (current_btrace_conf): New.
5561 (handle_btrace_enable): Rename to ...
5562 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
5563 to target_enable_btrace. Update comment. Update users.
5564 (handle_qxfer_btrace_conf): New.
5565 (qxfer_packets): Add btrace-conf entry.
5566 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5567 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5568 (target_ops)<read_btrace_conf>: New.
5569 (target_enable_btrace): Update parameters.
5570 (target_read_btrace_conf): New.
5572 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5574 * server.c (handle_btrace_general_set): Remove call to
5575 target_supports_btrace.
5576 (supported_btrace_packets): New.
5577 (handle_query): Call supported_btrace_packets.
5578 * target.h: include btrace-common.h.
5579 (btrace_target_info): Removed.
5580 (supports_btrace, target_supports_btrace): Update parameters.
5582 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5584 * Makefile.in (SFILES): Add common/btrace-common.c.
5585 (OBS): Add common/btrace-common.o.
5586 (btrace-common.o): Add build rules.
5587 * linux-low: Include btrace-common.h.
5588 (linux_low_read_btrace): Use struct btrace_data. Call
5589 btrace_data_init and btrace_data_fini.
5591 2015-02-06 Pedro Alves <palves@redhat.com>
5593 * thread-db.c (find_new_threads_callback): Add debug output.
5595 2015-02-04 Pedro Alves <palves@redhat.com>
5597 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5598 (resume_stopped_resumed_lwps): New function.
5599 (linux_wait_for_event_filtered): Use it.
5601 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5603 * Makefile.in (SFILES): Add linux-personality.c.
5604 (linux-personality.o): New rule.
5605 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5606 list of objects to be built.
5607 * linux-low.c: Include nat/linux-personality.h.
5608 (linux_create_inferior): Remove code to disable address space
5609 randomization (moved to ../nat/linux-personality.c). Create
5610 cleanup to disable address space randomization.
5612 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5614 * Makefile.in (posix-strerror.o): New rule.
5615 (mingw-strerror.o): Likewise.
5616 * configure: Regenerated.
5617 * configure.ac: Source file ../common/common.host. Initialize new
5618 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5620 2015-01-14 Yao Qi <yao@codesourcery.com>
5622 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5623 (ppc-linux.o): New rule.
5624 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5625 * configure.ac: AC_CHECK_FUNCS(getauxval).
5626 * config.in: Re-generated.
5627 * configure: Re-generated.
5628 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5629 ppc64_64bit_inferior_p
5631 2015-01-14 Yao Qi <yao@codesourcery.com>
5633 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5634 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5635 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5636 (PT_ORIG_R3, PT_TRAP): Likewise.
5637 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5638 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5639 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5641 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5643 * i387-fp.c (i387_cache_to_xsave): In look over
5644 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5645 zmmh_low_space field by use of zmmh_high_space.
5647 2015-01-09 Pedro Alves <palves@redhat.com>
5649 * linux-low.c (step_over_bkpt): Move higher up in the file.
5650 (handle_extended_wait): Don't store the stop_pc here.
5651 (get_stop_pc): Adjust comments and rename to ...
5652 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5653 stopped for a software breakpoint or hardware breakpoint.
5654 (thread_still_has_status_pending_p): New function.
5655 (status_pending_p_callback): Use
5656 thread_still_has_status_pending_p. If the event is no longer
5657 interesting, resume the LWP.
5658 (handle_tracepoints): Add assert.
5659 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5660 (wstatus_maybe_breakpoint): New function.
5661 (cancel_breakpoint): Delete function.
5662 (check_stopped_by_watchpoint): New function, factored out from
5663 linux_low_filter_event.
5664 (lp_status_maybe_breakpoint): Delete function.
5665 (linux_low_filter_event): Remove filter_ptid argument.
5666 Leave thread group exits pending here. Store the LWP's stop PC.
5667 Always leave events pending.
5668 (linux_wait_for_event_filtered): Pull all events out of the
5669 kernel, and leave them all pending.
5670 (count_events_callback, select_event_lwp_callback): Consider all
5672 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5673 (select_event_lwp): Only give preference to the stepping LWP in
5674 all-stop mode. Adjust comments.
5675 (ignore_event): New function.
5676 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5677 references to cancel_breakpoints. Adjust to renames. Also give
5678 equal priority to all LWPs that have had events in non-stop mode.
5679 If reporting a software breakpoint event, unadjust the LWP's PC.
5680 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5681 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5683 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5684 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5685 (linux_stopped_by_watchpoint): Adjust.
5686 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5687 * linux-low.h (enum lwp_stop_reason): New.
5688 (struct lwp_info) <stop_pc>: Adjust comment.
5689 <stopped_by_watchpoint>: Delete field.
5690 <stop_reason>: New field.
5691 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5692 * mem-break.c (software_breakpoint_inserted_here)
5693 (hardware_breakpoint_inserted_here): New function.
5694 * mem-break.h (software_breakpoint_inserted_here)
5695 (hardware_breakpoint_inserted_here): Declare.
5696 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5697 (cancel_breakpoints): Delete.
5698 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5699 (upload_fast_traceframes): Remove references to
5702 2015-01-09 Pedro Alves <palves@redhat.com>
5704 * thread-db.c (find_new_threads_callback): Ignore thread if the
5705 kernel thread ID is -1.
5707 2015-01-09 Pedro Alves <palves@redhat.com>
5709 * linux-low.c (linux_attach_fail_reason_string): Move to
5710 nat/linux-ptrace.c, and rename.
5711 (linux_attach_lwp): Update comment.
5712 (attach_proc_task_lwp_callback): New function.
5713 (linux_attach): Adjust to rename and use
5714 linux_proc_attach_tgid_threads.
5715 (linux_attach_fail_reason_string): Delete declaration.
5717 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5719 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5720 * server.c (gdbserver_version): Likewise.
5722 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5724 * remote-utils.c: Include ctype.h.
5725 (input_interrupt): Explicitly handle the case when the char
5726 received is the NUL byte. Improve the printing of non-ASCII
5729 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5731 * linux-low.c (linux_low_filter_event): Update call to
5732 linux_enable_event_reporting following the addition of
5733 a new parameter to that function.
5735 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5738 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5739 (AARCH64_FPCR_REGNO): Likewise.
5740 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5741 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5742 (aarch64_store_fpregset): Likewise.
5744 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5746 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5747 Remove FIXME comment about assumption about N.
5749 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5751 * configure.ac: If large-file support is disabled in GDBserver,
5752 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5753 * configure: Regenerate.
5755 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5757 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5758 warning upon ENODATA from ptrace.
5759 * linux-s390-low.c (s390_store_tdb): New.
5760 (s390_regsets): Add regset for NT_S390_TDB.
5762 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5764 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5765 without a fill_function.
5766 * linux-s390-low.c (s390_fill_last_break): Remove.
5767 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5768 (s390_arch_setup): Use regset's size instead of fill_function for
5771 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5773 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5774 the regset's store function when ptrace returned an error.
5775 * regcache.c (get_thread_regcache): Invalidate register cache
5776 before fetching inferior's registers.
5778 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5780 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5781 while-loop as for-loop.
5782 (regsets_store_inferior_registers): Likewise.
5784 2014-11-28 Yao Qi <yao@codesourcery.com>
5786 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5787 * config.in, configure: Re-generate.
5788 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5791 2014-11-21 Yao Qi <yao@codesourcery.com>
5793 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5794 (AC_CHECK_HEADERS): Remove malloc.h.
5795 * configure: Re-generated.
5796 * config.in: Re-generated.
5797 * server.h: Don't include alloca.h and malloc.h.
5798 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5799 Don't include malloc.h.
5801 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5803 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5804 corresponding ERRNO check in same block.
5806 2014-11-12 Pedro Alves <palves@redhat.com>
5808 * server.c (cont_thread): Update comment.
5809 (start_inferior, attach_inferior): No longer clear cont_thread.
5810 (handle_v_cont): No longer set cont_thread.
5811 (captured_main): Clear cont_thread each time a GDB connects.
5813 2014-11-12 Pedro Alves <palves@redhat.com>
5815 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5816 thread, and don't resume all threads if the Hc thread has exited.
5818 2014-11-12 Pedro Alves <palves@redhat.com>
5820 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5821 the process group instead of to a specific LWP.
5823 2014-10-15 Pedro Alves <palves@redhat.com>
5826 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5828 (arm_set_thread_context): Delete.
5829 (the_low_target): Adjust.
5830 * win32-i386-low.c (debug_registers_changed)
5831 (debug_registers_used): Delete.
5832 (update_debug_registers_callback): New function.
5833 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5834 needing to update their debug registers.
5835 (win32_get_current_dr): New function.
5836 (x86_dr_low_get_addr, x86_dr_low_get_control)
5837 (x86_dr_low_get_status): Fetch the debug register from the thread
5839 (i386_initial_stuff): Adjust.
5840 (i386_get_thread_context): Remove current_event parameter. Don't
5841 clear debug_registers_changed nor copy DR values to
5843 (i386_set_thread_context): Delete.
5844 (i386_prepare_to_resume): New function.
5845 (i386_thread_added): Mark the thread as needing to update irs
5847 (the_low_target): Remove i386_set_thread_context and install
5848 i386_prepare_to_resume.
5849 * win32-low.c (win32_get_thread_context): Adjust.
5850 (win32_set_thread_context): Use SetThreadContext
5852 (win32_prepare_to_resume): New function.
5853 (win32_require_context): New function, factored out from ...
5854 (thread_rec): ... this.
5855 (continue_one_thread): Call win32_prepare_to_resume on each thread
5856 we're about to continue.
5857 (win32_resume): Call win32_prepare_to_resume on the event thread.
5858 * win32-low.h (struct win32_thread_info)
5859 <debug_registers_changed>: New field.
5860 (struct win32_target_ops): Change prototype of set_thread_context,
5861 delete set_thread_context and add prepare_to_resume.
5862 (win32_require_context): New declaration.
5864 2014-10-08 Gary Benson <gbenson@redhat.com>
5866 * server.h: Do not include common-exceptions.h.
5868 2014-10-08 Gary Benson <gbenson@redhat.com>
5870 * server.h: Do not include cleanups.h.
5872 2014-09-30 James Hogan <james.hogan@imgtec.com>
5874 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5877 2014-09-23 Yao Qi <yao@codesourcery.com>
5879 * linux-low.c (lp_status_maybe_breakpoint): New function.
5880 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5881 (count_events_callback): Likewise.
5882 (select_event_lwp_callback): Likewise.
5883 (cancel_breakpoints_callback): Likewise.
5885 2014-09-19 Don Breazeal <donb@codesourcery.com>
5887 * linux-low.c (handle_extended_wait): Call
5888 linux_ptrace_get_extended_event.
5889 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5890 linux_is_extended_waitstatus.
5892 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5894 * Makefile.in (CPPFLAGS): Define.
5895 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5896 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5898 2014-09-16 Gary Benson <gbenson@redhat.com>
5900 * inferiors.h (current_inferior): Renamed as...
5901 (current_thread): New variable. All uses updated.
5902 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5903 (maybe_move_out_of_jump_pad): Likewise.
5904 (cancel_breakpoint): Likewise.
5905 (linux_low_filter_event): Likewise.
5906 (wait_for_sigstop): Likewise.
5907 (linux_resume_one_lwp): Likewise.
5908 (need_step_over_p): Likewise.
5909 (start_step_over): Likewise.
5910 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5911 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5912 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5913 and save_inferior as saved_thread.
5914 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5916 (regcache_invalidate_thread): Likewise.
5917 * remote-utils.c (prepare_resume_reply): Likewise.
5918 * thread-db.c (thread_db_get_tls_address): Likewise.
5919 (disable_thread_event_reporting): Likewise.
5920 (remove_thread_event_breakpoints): Likewise.
5921 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5923 * target.h (set_desired_inferior): Renamed as...
5924 (set_desired_thread): New declaration. All uses updated.
5925 * server.c (myresume): Updated comment to reference thread instead
5927 (handle_serial_event): Likewise.
5928 (handle_target_event): Likewise.
5930 2014-09-12 Tom Tromey <tromey@redhat.com>
5931 Gary Benson <gbenson@redhat.com>
5933 * regcache.h: Include common-regcache.h.
5934 (regcache_read_pc): Don't declare.
5935 * regcache.c (get_thread_regcache_for_ptid): New function.
5937 2014-09-11 Tom Tromey <tromey@redhat.com>
5938 Gary Benson <gbenson@redhat.com>
5940 * symbol.c: New file.
5941 * Makefile.in (SFILES): Add symbol.c.
5942 (OBS): Add symbol.o.
5944 2014-09-11 Gary Benson <gbenson@redhat.com>
5946 * target.c (target_stop_ptid, target_continue_ptid): New
5949 2014-09-11 Tom Tromey <tromey@redhat.com>
5950 Gary Benson <gbenson@redhat.com>
5952 * target.h: Include target/target.h.
5953 * target.c (target_read_memory, target_read_uint32)
5954 (target_write_memory): New functions.
5956 2014-09-11 Gary Benson <gbenson@redhat.com>
5958 * server.h (debug_hw_points): Don't declare.
5959 * server.c (debug_hw_points): Don't define. Replace all uses
5960 with show_debug_regs.
5961 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5962 all uses with show_debug_regs.
5964 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5966 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5967 endianness into account.
5968 (ppc_supply_ptrace_register): Likewise.
5970 2014-09-03 James Hogan <james.hogan@imgtec.com>
5972 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5973 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5975 2014-09-03 Gary Benson <gbenson@redhat.com>
5977 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5978 ALL_DEBUG_ADDRESS_REGISTERS.
5980 2014-09-02 Gary Benson <gbenson@redhat.com>
5982 * i386-low.h: Renamed as...
5983 * x86-low.h: New file. All type, function and variable name
5984 prefixes changed from "i386_" to "x86_". All references updated.
5985 * i386-low.c: Renamed as...
5986 * x86-low.c: New file. All type, function and variable name
5987 prefixes changed from "i386_" to "x86_". All references updated.
5989 2014-09-02 Gary Benson <gbenson@redhat.com>
5991 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5992 (x86_linux_new_thread): Likewise.
5994 2014-08-29 Gary Benson <gbenson@redhat.com>
5996 * server.h (setjmp.h): Do not include.
5997 (toplevel): Do not declare.
5998 (common-exceptions.h): Include.
5999 (cleanups.h): Likewise.
6000 * server.c (toplevel): Do not define.
6001 (exit_code): New static global.
6002 (detach_or_kill_for_exit_cleanup): New function.
6003 (main): New function. Original main renamed to...
6004 (captured_main): New function.
6005 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6007 2014-08-29 Gary Benson <gbenson@redhat.com>
6009 * Makefile.in (SFILES): Add common/common-exceptions.c.
6010 (OBS): Add common-exceptions.o.
6011 (common-exceptions.o): New rule.
6012 * utils.c (prepare_to_throw_exception): New function.
6014 2014-08-29 Gary Benson <gbenson@redhat.com>
6016 * config.in: Regenerate.
6017 * configure: Likewise.
6019 2014-08-29 Gary Benson <gbenson@redhat.com>
6021 * Makefile.in (SFILES): Add common/cleanups.c.
6023 (cleanups.o): New rule.
6025 2014-08-29 Gary Benson <gbenson@redhat.com>
6027 * utils.c (internal_vwarning): New function.
6029 2014-08-28 Gary Benson <gbenson@redhat.com>
6031 * utils.h (fatal): Remove declaration.
6032 * utils.c (fatal): Remove function.
6034 2014-08-28 Gary Benson <gbenson@redhat.com>
6036 * tracepoint.c (gdb_agent_init): Replace fatal with
6038 (initialize_tracepoint): Likewise.
6040 2014-08-28 Gary Benson <gbenson@redhat.com>
6042 * remote-utils.c (remote_prepare): Replace fatal with error.
6044 2014-08-28 Gary Benson <gbenson@redhat.com>
6046 * linux-low.c (linux_async): Replace fatal with warning.
6048 (linux_start_non_stop): Return -1 if linux_async failed.
6050 2014-08-28 Gary Benson <gbenson@redhat.com>
6052 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6054 (i386_dr_low_get_addr): Remove vague comment.
6055 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6058 2014-08-28 Gary Benson <gbenson@redhat.com>
6060 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6061 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6063 (linux_resume_one_lwp): Likewise.
6064 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6066 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6067 with internal_error.
6068 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6069 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6070 (find_register_by_name): Replace fatal with internal_error.
6071 (find_regno): Likewise.
6072 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6073 * thread-db.c (thread_db_create_event): Likewise.
6074 (thread_db_load_search): Likewise.
6075 (try_thread_db_load_1): Likewise.
6076 * tracepoint.c (get_jump_space_head): Replace fatal with
6078 (claim_trampoline_space): Likewise.
6079 (have_fast_tracepoint_trampoline_buffer): Likewise.
6080 (cmd_qtstart): Likewise.
6081 (stop_tracing): Likewise.
6082 (fast_tracepoint_collecting): Likewise.
6083 (target_malloc): Likewise.
6084 (download_tracepoint): Likewise.
6085 (download_trace_state_variables): Replace check with gdb_assert.
6086 (upload_fast_traceframes): Replace fatal with internal_error.
6088 2014-08-19 Tom Tromey <tromey@redhat.com>
6089 Gary Benson <gbenson@redhat.com>
6091 * Makefile.in (SFILES): Add common/common-debug.c.
6092 (OBS): Add common-debug.o.
6093 (common-debug.o): New rule.
6094 * debug.h (debug_printf): Don't declare.
6095 * debug.c (debug_printf): Renamed and rewritten as...
6096 (debug_vprintf): New function.
6098 2014-08-19 Gary Benson <gbenson@redhat.com>
6100 * utils.h: Do not include print-utils.h.
6102 2014-08-19 Tom Tromey <tromey@redhat.com>
6103 Gary Benson <gbenson@redhat.com>
6105 * server.h: Add static assertion.
6106 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6108 2014-08-19 Tom Tromey <tromey@redhat.com>
6109 Gary Benson <gbenson@redhat.com>
6111 * Makefile.in (SFILES): Add common/errors.c.
6112 (OBS): Add errors.o.
6113 (IPA_OBS): Add errors-ipa.o.
6114 (errors.o): New rule.
6115 (errors-ipa.o): Likewise.
6116 * utils.h (perror_with_name, error, warning): Don't declare.
6117 * utils.c (warning): Renamed and rewritten as...
6118 (vwarning): New function.
6119 (error): Renamed and rewritten as...
6120 (verror): New function.
6121 (internal_error): Renamed and rewritten as...
6122 (internal_verror): New function.
6124 2014-08-07 Gary Benson <gbenson@redhat.com>
6126 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6127 * configure: Regenerate.
6128 * config.in: Likewise.
6129 * server.h: Do not include errno.h.
6130 * event-loop.c: Likewise.
6131 * hostio-errno.c: Likewise.
6132 * linux-low.c: Likewise.
6133 * remote-utils.c: Likewise.
6134 * spu-low.c: Likewise.
6135 * utils.c: Likewise.
6136 * gdbreplay.c: Unconditionally include errno.h.
6138 2014-08-07 Gary Benson <gbenson@redhat.com>
6140 * server.h: Do not include string.h.
6141 * event-loop.c: Likewise.
6142 * linux-low.c: Likewise.
6143 * regcache.c: Likewise.
6144 * remote-utils.c: Likewise.
6145 * spu-low.c: Likewise.
6146 * utils.c: Likewise.
6148 2014-08-07 Gary Benson <gbenson@redhat.com>
6150 * server.h: Do not include gdb_assert.h.
6152 2014-08-07 Gary Benson <gbenson@redhat.com>
6154 * server.h: Do not include common-utils.h.
6156 2014-08-07 Gary Benson <gbenson@redhat.com>
6158 * server.h: Do not include ptid.h.
6159 * notif.h: Likewise.
6161 2014-08-07 Gary Benson <gbenson@redhat.com>
6163 * server.h: Do not include gdb_locale.h.
6165 2014-08-07 Gary Benson <gbenson@redhat.com>
6167 * server.h: Do not include gdb/signals.h.
6168 * win32-low.c: Likewise.
6170 2014-08-07 Gary Benson <gbenson@redhat.com>
6172 * server.h: Do not include pathmax.h.
6174 2014-08-07 Gary Benson <gbenson@redhat.com>
6176 * server.h: Do not include libiberty.h.
6177 * linux-bfin-low.c: Likewise.
6179 2014-08-07 Gary Benson <gbenson@redhat.com>
6181 * server.h: Do not include ansidecl.h.
6183 2014-08-07 Gary Benson <gbenson@redhat.com>
6185 * linux-x86-low.c: Do not include stddef.h.
6186 * lynx-ppc-low.c: Likewise.
6187 * tracepoint.c: Likewise.
6189 2014-08-07 Gary Benson <gbenson@redhat.com>
6191 * server.h: Do not include stdarg.h.
6192 * nto-low.c: Likewise.
6194 2014-08-07 Gary Benson <gbenson@redhat.com>
6196 * server.h: Do not include stdlib.h.
6197 * inferiors.c: Likewise.
6198 * linux-low.c: Likewise.
6199 * regcache.c: Likewise.
6200 * spu-low.c: Likewise.
6201 * tracepoint.c: Likewise.
6202 * utils.c: Likewise.
6204 2014-08-07 Gary Benson <gbenson@redhat.com>
6206 * server.h: Do not include stdio.h.
6207 * linux-low.c: Likewise.
6208 * remote-utils.c: Likewise.
6209 * spu-low.c: Likewise.
6210 * utils.c: Likewise.
6211 * wincecompat.c: Likewise.
6213 2014-08-06 Gary Benson <gbenson@redhat.com>
6215 * regcache.c (init_register_cache): Move conditionals inside if.
6217 2014-08-06 Gary Benson <gbenson@redhat.com>
6219 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6221 2014-07-31 Gary Benson <gbenson@redhat.com>
6223 * ax.h: Do not include server.h.
6224 * gdbthread.h: Likewise.
6225 * lynx-low.h: Likewise.
6226 * notif.h: Likewise.
6228 2014-07-30 Gary Benson <gbenson@redhat.com>
6230 * server.h: Include common-defs.h.
6231 Do not include config.h or build-gnulib-gdbserver/config.h.
6233 2014-07-30 Gary Benson <gbenson@redhat.com>
6235 * hostio-errno.c: Move server.h to top of includes list.
6236 * inferiors.c: Likewise.
6237 * linux-x86-low.c: Likewise.
6238 * notif.c: Include server.h.
6240 2014-07-24 Tom Tromey <tromey@redhat.com>
6241 Gary Benson <gbenson@redhat.com>
6243 * server.h (CORE_ADDR): Now unsigned.
6245 2014-07-16 Pedro Alves <palves@redhat.com>
6247 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6249 2014-07-15 Pedro Alves <palves@redhat.com>
6251 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6254 2014-07-11 Pedro Alves <palves@redhat.com>
6256 * linux-low.c (kill_wait_lwp): New function, based on
6257 kill_one_lwp_callback, but use my_waitpid directly.
6258 (kill_one_lwp_callback, linux_kill): Use it.
6260 2014-06-23 Pedro Alves <palves@redhat.com>
6262 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6263 before setting DR0..DR3.
6265 2014-06-20 Gary Benson <gbenson@redhat.com>
6267 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6268 * configure: Regenerated.
6269 * config.in: Likewise.
6271 2014-06-20 Gary Benson <gbenson@redhat.com>
6273 * Makefile.in (SFILES): Update locations for files moved
6275 (object file files): Reordered.
6277 2014-06-20 Gary Benson <gbenson@redhat.com>
6279 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6280 (i386_dr_low_set_addr): Likewise.
6281 (i386_dr_low_get_addr): Likewise.
6282 (i386_dr_low_can_set_control): Likewise.
6283 (i386_dr_low_set_control): Likewise.
6284 (i386_dr_low_get_control): Likewise.
6285 (i386_dr_low_get_status): Likewise.
6286 (i386_get_debug_register_length): Likewise.
6287 * linux-x86-low.c (i386_dr_low_set_addr):
6288 Changed signature. Made static.
6289 (i386_dr_low_get_addr): Likewise.
6290 (i386_dr_low_set_control): Likewise.
6291 (i386_dr_low_get_control): Likewise.
6292 (i386_dr_low_get_status): Likewise.
6293 (i386_dr_low): New global variable.
6294 * win32-i386-low.c (i386_dr_low_set_addr):
6295 Changed signature. Made static.
6296 (i386_dr_low_get_addr): Likewise.
6297 (i386_dr_low_set_control): Likewise.
6298 (i386_dr_low_get_control): Likewise.
6299 (i386_dr_low_get_status): Likewise.
6300 (i386_dr_low): New global variable.
6302 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6304 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6305 * Makefile.in (AR, AR_FLAGS): Define.
6306 * configure: Regenerate.
6308 2014-06-19 Gary Benson <gbenson@redhat.com>
6310 * Makefile.in (i386-dregs.o): New rule.
6311 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6312 * i386-low.c (target.h): Remove include.
6313 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6314 (DR_CONTROL_SHIFT): Likewise.
6315 (DR_CONTROL_SIZE): Likewise.
6316 (DR_RW_EXECUTE): Likewise.
6317 (DR_RW_WRITE): Likewise.
6318 (DR_RW_READ): Likewise.
6319 (DR_RW_IORW): Likewise.
6320 (DR_LEN_1): Likewise.
6321 (DR_LEN_2): Likewise.
6322 (DR_LEN_4): Likewise.
6323 (DR_LEN_8): Likewise.
6324 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6325 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6326 (DR_ENABLE_SIZE): Likewise.
6327 (DR_LOCAL_SLOWDOWN): Likewise.
6328 (DR_GLOBAL_SLOWDOWN): Likewise.
6329 (DR_CONTROL_RESERVED): Likewise.
6330 (I386_DR_CONTROL_MASK): Likewise.
6331 (I386_DR_VACANT): Likewise.
6332 (I386_DR_LOCAL_ENABLE): Likewise.
6333 (I386_DR_GLOBAL_ENABLE): Likewise.
6334 (I386_DR_DISABLE): Likewise.
6335 (I386_DR_SET_RW_LEN): Likewise.
6336 (I386_DR_GET_RW_LEN): Likewise.
6337 (I386_DR_WATCH_HIT): Likewise.
6338 (i386_wp_op_t): Likewise.
6339 (i386_show_dr): Likewise.
6340 (i386_length_and_rw_bits): Likewise.
6341 (i386_insert_aligned_watchpoint): Likewise.
6342 (i386_remove_aligned_watchpoint): Likewise.
6343 (i386_handle_nonaligned_watchpoint): Likewise.
6344 i386_update_inferior_debug_regs(): Likewise.
6345 (i386_dr_insert_watchpoint): Likewise.
6346 (i386_dr_remove_watchpoint): Likewise.
6347 (i386_dr_region_ok_for_watchpoint): Likewise.
6348 (i386_dr_stopped_data_address): Likewise.
6349 (i386_dr_stopped_by_watchpoint): Likewise.
6351 2014-06-19 Gary Benson <gbenson@redhat.com>
6353 * i386-low.c (i386_dr_show): Renamed to
6354 i386_show_dr and made static. All uses updated.
6355 (i386_dr_length_and_rw_bits): Renamed to
6356 i386_length_and_rw_bits and made static.
6358 (i386_dr_insert_aligned_watchpoint): Renamed to
6359 i386_insert_aligned_watchpoint and made static.
6361 (i386_dr_remove_aligned_watchpoint): Renamed to
6362 i386_remove_aligned_watchpoint and made static.
6364 (i386_dr_update_inferior_debug_regs): Renamed to
6365 i386_update_inferior_debug_regs and made static.
6368 2014-06-18 Gary Benson <gbenson@redhat.com>
6370 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6371 (i386_dr_low_can_set_control): Likewise.
6372 (i386_get_debug_register_length): Likewise.
6373 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6374 (i386_dr_low_can_set_control): Likewise.
6375 (i386_get_debug_register_length): Likewise.
6377 2014-06-17 Gary Benson <gbenson@redhat.com>
6379 * i386-low.h (i386-dregs.h): New include.
6380 (DR_FIRSTADDR): Now in i386-dregs.h.
6381 (DR_LASTADDR): Likewise.
6382 (DR_NADDR): Likewise.
6383 (DR_STATUS): Likewise.
6384 (DR_CONTROL): Likewise.
6385 (i386_debug_reg_state): Likewise.
6386 (i386_dr_insert_watchpoint): Likewise.
6387 (i386_dr_remove_watchpoint): Likewise.
6388 (i386_dr_region_ok_for_watchpoint): Likewise.
6389 (i386_dr_stopped_data_address): Likewise.
6390 (i386_dr_stopped_by_watchpoint): Likewise.
6391 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6393 2014-06-18 Gary Benson <gbenson@redhat.com>
6395 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6396 i386_dr_insert_watchpoint.
6397 (i386_low_remove_watchpoint): Renamed to
6398 i386_dr_remove_watchpoint.
6399 (i386_low_region_ok_for_watchpoint): Renamed to
6400 i386_dr_region_ok_for_watchpoint.
6401 (i386_low_stopped_data_address): Renamed to
6402 i386_dr_stopped_data_address.
6403 (i386_low_stopped_by_watchpoint): Renamed to
6404 i386_dr_stopped_by_watchpoint.
6405 * i386-low.c (i386_show_dr): Renamed to
6406 i386_dr_show and made nonstatic. All uses updated.
6407 (i386_length_and_rw_bits): Renamed to
6408 i386_dr_length_and_rw_bits and made nonstatic.
6410 (i386_insert_aligned_watchpoint): Renamed to
6411 i386_dr_insert_aligned_watchpoint and made nonstatic.
6413 (i386_remove_aligned_watchpoint): Renamed to
6414 i386_dr_remove_aligned_watchpoint and made nonstatic.
6416 (i386_update_inferior_debug_regs): Renamed to
6417 i386_dr_update_inferior_debug_regs and made nonstatic.
6419 (i386_low_insert_watchpoint): Renamed to
6420 i386_dr_insert_watchpoint. All uses updated.
6421 (i386_low_remove_watchpoint): Renamed to
6422 i386_dr_remove_watchpoint. All uses updated.
6423 (i386_low_region_ok_for_watchpoint): Renamed to
6424 i386_dr_region_ok_for_watchpoint. All uses updated.
6425 (i386_low_stopped_data_address): Renamed to
6426 i386_dr_stopped_data_address. All uses updated.
6427 (i386_low_stopped_by_watchpoint): Renamed to
6428 i386_dr_stopped_by_watchpoint. All uses updated.
6430 2014-06-18 Gary Benson <gbenson@redhat.com>
6432 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6433 (i386_dr_low_can_set_control): Likewise.
6434 (i386_insert_aligned_watchpoint): New check.
6436 2014-06-18 Gary Benson <gbenson@redhat.com>
6438 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6441 2014-06-18 Gary Benson <gbenson@redhat.com>
6443 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6444 instead of fatal and error.
6445 (i386_handle_nonaligned_watchpoint): Likewise.
6447 2014-06-18 Gary Benson <gbenson@redhat.com>
6449 * i386-low.c (i386_get_debug_register_length): New macro.
6450 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6451 (i386_show_dr): Use debug_printf instead of fprintf. Use
6452 phex to format values.
6454 2014-06-18 Gary Benson <gbenson@redhat.com>
6456 * i386-low.h: Comment changes.
6457 * i386-low.c: Likewise.
6459 2014-06-18 Gary Benson <gbenson@redhat.com>
6461 * i386-low.c: Whitespace changes.
6463 2014-06-12 Tom Tromey <tromey@redhat.com>
6465 * utils.c (freeargv): Remove.
6467 2014-06-12 Tom Tromey <tromey@redhat.com>
6469 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6470 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6471 (parse_debug_format_options): Likewise.
6472 (gdbserver_usage): Likewise.
6473 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6474 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6475 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6477 ($(LIBGNU)): Depend on libiberty.
6478 (all-lib): Recurse into all subdirs.
6479 (install-only): Invoke "install" target in subdirs.
6480 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6482 * configure: Rebuild.
6483 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6484 for vasprintf, vsnprintf, or gettimeofday.
6485 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6488 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6490 * development.sh: Delete.
6491 * Makefile.in (config.status): Adjust dependency on development.sh.
6492 * configure.ac: Adjust development.sh source call.
6493 * configure: Regenerate.
6495 2014-06-02 Pedro Alves <palves@redhat.com>
6497 * ax.c (gdb_free_agent_expr): New function.
6498 * ax.h (gdb_free_agent_expr): New declaration.
6499 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6501 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6503 (clear_breakpoint_conditions_and_commands): New function.
6504 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6505 (clear_breakpoint_conditions_and_commands): New declaration.
6507 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6509 * linux-aarch64-low.c (asm/ptrace.h): Include.
6511 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6513 Fix TLS access for -static -pthread.
6514 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6515 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6516 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6518 2014-05-20 Pedro Alves <palves@redhat.com>
6520 * linux-aarch64-low.c (aarch64_insert_point)
6521 (aarch64_remove_point): No longer check whether the type is
6522 supported here. Adjust to new interface.
6523 (the_low_target): Install aarch64_supports_z_point_type as
6524 supports_z_point_type method.
6525 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6526 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6527 instead of a Z packet char. Adjust.
6528 (arm_supports_z_point_type): New function.
6529 (arm_insert_point, arm_remove_point): Adjust to new interface.
6530 (the_low_target): Install arm_supports_z_point_type.
6531 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6532 (cris_insert_point, cris_remove_point): Adjust to new interface.
6533 Don't check whether the type is supported here.
6534 (the_low_target): Install cris_supports_z_point_type.
6535 * linux-low.c (linux_supports_z_point_type): New function.
6536 (linux_insert_point, linux_remove_point): Adjust to new interface.
6537 * linux-low.h (struct linux_target_ops) <insert_point,
6538 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6539 raw_breakpoint pointer parameter.
6540 <supports_z_point_type>: New method.
6541 * linux-mips-low.c (mips_supports_z_point_type): New function.
6542 (mips_insert_point, mips_remove_point): Adjust to new interface.
6543 Use mips_supports_z_point_type.
6544 (the_low_target): Install mips_supports_z_point_type.
6545 * linux-ppc-low.c (the_low_target): Install NULL as
6546 supports_z_point_type method.
6547 * linux-s390-low.c (the_low_target): Install NULL as
6548 supports_z_point_type method.
6549 * linux-sparc-low.c (the_low_target): Install NULL as
6550 supports_z_point_type method.
6551 * linux-x86-low.c (x86_supports_z_point_type): New function.
6552 (x86_insert_point): Adjust to new insert_point interface. Use
6553 insert_memory_breakpoint. Adjust to new
6554 i386_low_insert_watchpoint interface.
6555 (x86_remove_point): Adjust to remove_point interface. Use
6556 remove_memory_breakpoint. Adjust to new
6557 i386_low_remove_watchpoint interface.
6558 (the_low_target): Install x86_supports_z_point_type.
6559 * lynx-low.c (lynx_target_ops): Install NULL as
6560 supports_z_point_type callback.
6561 * nto-low.c (nto_supports_z_point_type): New.
6562 (nto_insert_point, nto_remove_point): Adjust to new interface.
6563 (nto_target_ops): Install nto_supports_z_point_type.
6564 * mem-break.c: Adjust intro comment.
6565 (struct raw_breakpoint) <raw_type, size>: New fields.
6566 <inserted>: Update comment.
6567 <shlib_disabled>: Delete field.
6568 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6569 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6570 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6571 (raw_bkpt_type_to_target_hw_bp_type): New function.
6572 (find_enabled_raw_code_breakpoint_at): New function.
6573 (find_raw_breakpoint_at): New type and size parameters. Use them.
6574 (insert_memory_breakpoint): New function, based off
6575 set_raw_breakpoint_at.
6576 (remove_memory_breakpoint): New function.
6577 (set_raw_breakpoint_at): Reimplement.
6578 (set_breakpoint): New, based on set_breakpoint_at.
6579 (set_breakpoint_at): Reimplement.
6580 (delete_raw_breakpoint): Go through the_target->remove_point
6581 instead of assuming memory breakpoints.
6582 (find_gdb_breakpoint_at): Delete.
6583 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6584 (find_gdb_breakpoint): New function.
6585 (set_gdb_breakpoint_at): Delete.
6586 (z_type_supported): New function.
6587 (set_gdb_breakpoint_1): New function, loosely based off
6588 set_gdb_breakpoint_at.
6589 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6590 (delete_gdb_breakpoint_at): Delete.
6591 (delete_gdb_breakpoint_1): New function, loosely based off
6592 delete_gdb_breakpoint_at.
6593 (delete_gdb_breakpoint): New function.
6594 (clear_gdb_breakpoint_conditions): Rename to ...
6595 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6597 (add_condition_to_breakpoint): Make static.
6598 (add_breakpoint_condition): Take a struct breakpoint pointer
6599 instead of an address. Adjust.
6600 (gdb_condition_true_at_breakpoint): Rename to ...
6601 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6603 (gdb_condition_true_at_breakpoint): Reimplement.
6604 (add_breakpoint_commands): Take a struct breakpoint pointer
6605 instead of an address. Adjust.
6606 (gdb_no_commands_at_breakpoint): Rename to ...
6607 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6608 parameter. Return true if no breakpoint was found. Change debug
6610 (gdb_no_commands_at_breakpoint): Reimplement.
6611 (run_breakpoint_commands): Rename to ...
6612 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6613 and change return type to boolean.
6614 (run_breakpoint_commands): New function.
6615 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6616 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6617 breakpoint. Go through the_target->remove_point instead of
6618 assuming memory breakpoint.
6619 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6620 software and hardware breakpoints.
6621 (reinsert_raw_breakpoint): Go through the_target->insert_point
6622 instead of assuming memory breakpoint.
6623 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6624 software and hardware breakpoints.
6625 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6626 Check both software and hardware breakpoints.
6627 (validate_inserted_breakpoint): Assert the breakpoint is a
6628 software breakpoint. Set the inserted flag to -1 instead of
6629 setting shlib_disabled.
6630 (delete_disabled_breakpoints): Adjust.
6631 (validate_breakpoints): Only validate software breakpoints.
6632 Adjust to inserted flag change.
6633 (check_mem_read, check_mem_write): Skip breakpoint types other
6634 than software breakpoints. Adjust to inserted flag change.
6635 * mem-break.h (enum raw_bkpt_type): New enum.
6636 (raw_breakpoint, struct process_info): Forward declare.
6637 (Z_packet_to_target_hw_bp_type): Delete declaration.
6638 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6639 (set_gdb_breakpoint, delete_gdb_breakpoint)
6640 (clear_breakpoint_conditions): New declarations.
6641 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6642 (breakpoint_inserted_here): Update comment.
6643 (add_breakpoint_condition, add_breakpoint_commands): Replace
6644 address parameter with a breakpoint pointer parameter.
6645 (gdb_breakpoint_here): Update comment.
6646 (delete_gdb_breakpoint_at): Delete.
6647 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6648 * server.c (process_point_options): Take a struct breakpoint
6649 pointer instead of an address. Adjust.
6650 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6651 delete_gdb_breakpoint.
6652 * spu-low.c (spu_target_ops): Install NULL as
6653 supports_z_point_type method.
6654 * target.h: Include mem-break.h.
6655 (struct target_ops) <prepare_to_access_memory>: Update comment.
6656 <supports_z_point_type>: New field.
6657 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6658 instead of a char. Also take a raw breakpoint pointer.
6659 * win32-arm-low.c (the_low_target): Install NULL as
6660 supports_z_point_type.
6661 * win32-i386-low.c (i386_supports_z_point_type): New function.
6662 (i386_insert_point, i386_remove_point): Adjust to new interface.
6663 (the_low_target): Install i386_supports_z_point_type.
6664 * win32-low.c (win32_supports_z_point_type): New function.
6665 (win32_insert_point, win32_remove_point): Adjust to new interface.
6666 (win32_target_ops): Install win32_supports_z_point_type.
6667 * win32-low.h (struct win32_target_ops):
6668 <supports_z_point_type>: New method.
6669 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6670 instead of a char. Also take a raw breakpoint pointer.
6672 2014-05-20 Pedro Alves <palves@redhat.com>
6674 * mem-break.h: Include break-common.h.
6675 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6676 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6677 (Z_packet_to_target_hw_bp_type): New declaration.
6678 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6679 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6680 (Z_PACKET_ACCESS_WP): Delete macros.
6681 (Z_packet_to_hw_type): Delete function.
6682 * i386-low.h: Don't include break-common.h here.
6683 (Z_packet_to_hw_type): Delete declaration.
6684 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6685 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6686 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6687 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6688 * linux-aarch64-low.c: Don't include break-common.h here.
6689 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6690 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6691 (Z_packet_to_target_hw_bp_type): Delete function.
6692 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6694 (mips_insert_point, mips_remove_point): Use
6695 Z_packet_to_target_hw_bp_type.
6697 2014-05-20 Pedro Alves <palves@redhat.com>
6699 * linux-aarch64-low.c: Include break-common.h.
6700 (enum target_point_type): Delete.
6701 (Z_packet_to_point_type): Rename to ...
6702 (Z_packet_to_target_hw_bp_type): ... this, and return a
6703 target_hw_bp_type instead.
6704 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6705 instead of an enum target_point_type.
6706 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6708 (aarch64_dr_state_insert_one_point)
6709 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6710 (aarch64_handle_aligned_watchpoint)
6711 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6712 Take an enum target_hw_bp_type instead of an enum
6714 (aarch64_supports_z_point_type): New function.
6715 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6716 use Z_packet_to_target_hw_bp_type.
6718 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6720 * configure.ac: Only use -Werror by default when DEVELOPMENT
6722 * configure: Regenerate.
6724 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6726 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6727 * linux-x86-low.c (X86_64_USER_REGS): New.
6728 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6730 2014-04-28 Yao Qi <yao@codesourcery.com>
6732 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6735 2014-04-25 Pedro Alves <palves@redhat.com>
6738 * linux-low.c (linux_attach_fail_reason_string): New function.
6739 (linux_attach_lwp): Delete.
6740 (linux_attach_lwp_1): Rename to ...
6741 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6742 argument. Remove "initial" parameter. Return int instead of
6743 void. Don't error or warn here.
6744 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6745 failure to attach to the tgid. Call warning when failing to
6747 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6748 argument. Remove "initial" parameter. Return int instead of
6749 void. Don't error or warn here.
6750 (linux_attach_fail_reason_string): New declaration.
6751 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6752 interface change. Use linux_attach_fail_reason_string.
6754 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6755 Walfred Tedeschi <walfred.tedeschi@intel.com>
6757 * Makefile.in: Added rules to handle new files
6758 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6759 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6760 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6761 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6762 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6763 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6765 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6766 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6767 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6768 i386/x32-avx512.xml.
6769 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6770 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6771 i386/x32-avx512-linux.xml.
6772 * i387-fp.c (num_avx512_k_registers): New constant for number
6774 (num_avx512_zmmh_low_registers): New constant for number of
6775 lower ZMM registers (0-15).
6776 (num_avx512_zmmh_high_registers): New constant for number of
6777 higher ZMM registers (16-31).
6778 (num_avx512_ymmh_registers): New contant for number of higher
6779 YMM registers (ymm16-31 added by avx521 on x86_64).
6780 (num_avx512_xmm_registers): New constant for number of higher
6781 XMM registers (xmm16-31 added by AVX512 on x86_64).
6782 (struct i387_xsave): Add space for AVX512 registers.
6783 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6784 Add code to handle AVX512 registers.
6785 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6786 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6787 prototypei from generated file.
6788 (tdesc_amd64_avx512_linux): Likewise.
6789 (init_registers_x32_avx512_linux): Likewise.
6790 (tdesc_x32_avx512_linux): Likewise.
6791 (init_registers_i386_avx512_linux): Likewise.
6792 (tdesc_i386_avx512_linux): Likewise.
6793 (x86_64_regmap): Add AVX512 registers.
6794 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6796 (initialize_low_arch): Add code to initialize AVX512 registers.
6798 2014-04-23 Pedro Alves <palves@redhat.com>
6800 * mem-break.c (find_gdb_breakpoint_at): Make static.
6801 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6803 2014-04-23 Pedro Alves <palves@redhat.com>
6805 * i386-low.c: Don't include break-common.h here.
6806 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6807 prototype to take target_hw_bp_type as argument instead of a Z
6809 * i386-low.h: Include break-common.h here.
6810 (Z_packet_to_hw_type): Declare.
6811 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6813 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6814 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6815 (x86_remove_point): Convert the packet number to a
6816 target_hw_bp_type before calling i386_low_remove_watchpoint.
6817 * win32-i386-low.c (i386_insert_point): Convert the packet number
6818 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6819 (i386_remove_point): Convert the packet number to a
6820 target_hw_bp_type before calling i386_low_remove_watchpoint.
6822 2014-04-23 Pedro Alves <palves@redhat.com>
6824 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6826 2014-04-10 Pedro Alves <palves@redhat.com>
6828 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6829 Check if the condition or command is NULL before checking if the
6830 breakpoint is known. On success, return true.
6831 * mem-break.h (add_breakpoint_condition): Document return.
6832 (add_breakpoint_commands): Add describing comment.
6833 * server.c (skip_to_semicolon): New function.
6834 (process_point_options): Use it.
6836 2014-04-09 Pedro Alves <palves@redhat.com>
6838 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6841 2014-02-27 Pedro Alves <palves@redhat.com>
6844 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6846 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6848 (last_thread_of_process_p): Take a PID argument instead of a
6850 (linux_wait_for_lwp): Delete.
6851 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6853 (linux_low_filter_event): New function, party factored out from
6854 linux_wait_for_event.
6855 (linux_wait_for_event): Rename to ...
6856 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6857 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6858 sigsuspend. Check for zombie leaders.
6859 (linux_wait_for_event): Reimplement as wrapper around
6860 linux_wait_for_event_filtered.
6861 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6862 a normal or signal exit is seen, it's the whole process exiting.
6863 (wait_for_sigstop): No longer a for_each_inferior callback.
6864 Rewrite on top of linux_wait_for_event_filtered.
6865 (stop_all_lwps): Call wait_for_sigstop directly.
6866 * server.c (resume, handle_target_event): Handle
6867 TARGET_WAITKIND_NO_RESUMED.
6869 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6871 * win32-low.c (psapi_get_dll_name,
6872 * win32_CreateToolhelp32Snapshot): Delete.
6873 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6874 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6876 (handle_load_dll): Add function description.
6877 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6879 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6881 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6883 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6884 base address when calling win32_add_one_solib.
6885 (handle_load_dll): Delete local variable load_addr.
6886 Remove 0x1000 offset applied to DLL base address when calling
6887 win32_add_one_solib.
6888 (handle_unload_dll): Add comment.
6890 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6892 * win32-low.c (win32_add_all_dlls): Renames
6893 win32_ensure_ntdll_loaded. Rewrite function documentation.
6894 Adjust implementation to always load all DLLs.
6895 Add 0x1000 offset to DLL base address when calling
6896 win32_add_one_solib.
6897 (child_initialization_done): New static global.
6898 (do_initial_child_stuff): Set child_initialization_done to
6899 zero during child initialization, and 1 after. Replace call
6900 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6902 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6903 (handle_unload_dll): Add function documentation.
6904 (get_child_debug_event): Ignore load and unload DLL events
6905 during child initialization.
6907 2014-02-20 Doug Evans <dje@google.com>
6909 Remove global all_lwps.
6910 * inferiors.h (ptid_of): Move here from linux-low.h.
6911 (pid_of, lwpid_of): Ditto.
6912 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6913 parameter is a struct thread_info * now.
6914 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6915 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6916 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6918 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6919 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6920 * linux-arm-low.c (update_registers_callback): Update, "entry"
6921 parameter is a struct thread_info * now.
6922 Fetch lwpid from current_inferior directly.
6923 (arm_insert_point): Pass &all_threads to find_inferior instead of
6925 (arm_remove_point): Ditto.
6926 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6927 (arm_prepare_to_resume): Fetch pid from thread.
6928 (arm_read_description): Fetch lwpid from current_inferior directly.
6929 * linux-low.c (all_lwps): Delete.
6930 (delete_lwp): Delete call to remove_inferior.
6931 (handle_extended_wait): Fetch lwpid from thread.
6932 (add_lwp): Don't set lwp->entry.id. Remove call to
6933 add_inferior_to_list.
6934 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6935 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6936 (kill_one_lwp_callback): Ditto.
6937 (linux_kill): Don't dereference NULL pointer.
6938 Fetch ptid,lwpid from thread.
6939 (get_detach_signal): Fetch ptid from thread.
6940 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6941 Simplify call to regcache_invalidate_thread.
6942 (delete_lwp_callback): Update, "entry" parameter is a
6943 struct thread_info * now. Fetch pid from thread.
6944 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6945 (status_pending_p_callback): Update, "entry" parameter is a
6946 struct thread_info * now. Fetch ptid from thread.
6947 (find_lwp_pid): Update, "entry" parameter is a
6948 struct thread_info * now.
6949 (linux_wait_for_lwp): Fetch pid from thread.
6950 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6951 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6952 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6953 (dequeue_one_deferred_signal): Ditto.
6954 (cancel_breakpoint): Fetch ptid from current_inferior.
6955 (linux_wait_for_event): Pass &all_threads to find_inferior,
6956 not &all_lwps. Fetch ptid, lwpid from thread.
6957 (count_events_callback): Update, "entry" parameter is a
6958 struct thread_info * now.
6959 (select_singlestep_lwp_callback): Ditto.
6960 (select_event_lwp_callback): Ditto.
6961 (cancel_breakpoints_callback): Ditto.
6962 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6964 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6965 (unsuspend_one_lwp): Update, "entry" parameter is a
6966 struct thread_info * now.
6967 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6969 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6970 Fetch lwpid from thread, not lwp.
6971 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6972 Pass &all_threads to find_inferior, not &all_lwps.
6973 (send_sigstop): Fetch lwpid from thread, not lwp.
6974 (send_sigstop_callback): Update, "entry" parameter is a
6975 struct thread_info * now.
6976 (suspend_and_send_sigstop_callback): Ditto.
6977 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6978 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6979 struct thread_info * now.
6980 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6982 (lwp_running): Update, "entry" parameter is a
6983 struct thread_info * now.
6984 (stop_all_lwps): Fetch ptid from thread.
6985 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6986 (linux_resume_one_lwp): Fetch lwpid from thread.
6987 (linux_set_resume_request): Update, "entry" parameter is a
6988 struct thread_info * now. Fetch pid, lwpid from thread.
6989 (resume_status_pending_p): Update, "entry" parameter is a
6990 struct thread_info * now.
6991 (need_step_over_p): Ditto. Fetch lwpid from thread.
6992 (start_step_over): Fetch lwpid from thread.
6993 (linux_resume_one_thread): Update, "entry" parameter is a
6994 struct thread_info * now. Fetch lwpid from thread.
6995 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6996 (proceed_one_lwp): Update, "entry" parameter is a
6997 struct thread_info * now. Fetch lwpid from thread.
6998 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6999 struct thread_info * now.
7000 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7001 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7002 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7004 (regsets_store_inferior_registers): Ditto.
7005 (fetch_register, store_register): Ditto.
7006 (linux_read_memory, linux_write_memory): Ditto.
7007 (linux_request_interrupt): Ditto.
7008 (linux_read_auxv): Ditto.
7009 (linux_xfer_siginfo): Ditto.
7010 (linux_qxfer_spu): Ditto.
7011 (linux_qxfer_libraries_svr4): Ditto.
7012 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7013 moved to inferiors.h.
7015 (get_thread_lwp): Update.
7016 (struct lwp_info): Delete member "entry". Simplify comment for
7019 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7020 current_inferior directly.
7021 (update_watch_registers_callback): Update, "entry" parameter is a
7022 struct thread_info * now. Fetch pid from thread.
7023 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7024 (mips_insert_point): Fetch lwpid from current_inferior.
7025 Pass &all_threads to find_inferior, not &all_lwps.
7026 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7027 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7029 (mips_stopped_data_address): Ditto.
7030 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7032 * linux-tile-low.c (tile_arch_setup): Ditto.
7033 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7034 (update_debug_registers_callback): Update, "entry" parameter is a
7035 struct thread_info * now. Fetch pid from thread.
7036 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7037 Pass &all_threads to find_inferior, not &all_lwps.
7038 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7039 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7040 Pass &all_threads to find_inferior, not &all_lwps.
7041 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7042 (i386_dr_low_get_status): Ditto.
7043 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7044 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7045 (x86_linux_read_description): Ditto.
7046 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7048 2014-02-20 Doug Evans <dje@google.com>
7050 * inferiors.c (get_first_inferior): Fix buglet.
7052 2014-02-19 Doug Evans <dje@google.com>
7054 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7055 * inferiors.c (add_thread): Change result type to struct thread_info *.
7056 All callers updated.
7057 (add_lwp): Call add_thread here instead of in callers.
7058 All callers updated.
7059 * linux-low.h (get_lwp_thread): Rewrite.
7060 (struct lwp_info): New member "thread".
7062 2014-02-19 Doug Evans <dje@google.com>
7064 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7065 All callers updated.
7067 2014-02-19 Doug Evans <dje@google.com>
7069 * inferiors.c (add_thread): Fix whitespace.
7071 2014-02-19 Doug Evans <dje@google.com>
7073 * dll.c (clear_dlls): Replace accessing list implemention details
7075 * gdbthread.h (get_first_thread): Declare.
7076 * inferiors.c (for_each_inferior_with_data): New function.
7077 (get_first_thread): New function.
7078 (find_thread_ptid): Simplify.
7079 (get_first_inferior): New function.
7080 (clear_list): Delete.
7081 (one_inferior_p): New function.
7082 (clear_inferior_list): New function.
7083 (clear_inferiors): Update.
7084 * inferiors.h (for_each_inferior_with_data): Declare.
7085 (clear_inferior_list): Declare.
7086 (one_inferior_p): Declare.
7087 (get_first_inferior): Declare.
7088 * linux-low.c (linux_wait_for_event): Replace accessing list
7089 implemention details with API function.
7090 * server.c (target_running): Ditto.
7091 (accumulate_file_name_length): New function.
7092 (emit_dll_description): New function.
7093 (handle_qxfer_libraries): Replace accessing list implemention
7094 details with API function.
7095 (handle_qxfer_threads_worker): New function.
7096 (handle_qxfer_threads_proper): Replace accessing list implemention
7097 details with API function.
7098 (handle_query): Ditto.
7099 (visit_actioned_threads_callback_ftype): New typedef.
7100 (visit_actioned_threads_data): New struct.
7101 (visit_actioned_threads): Rewrite to be find_inferior callback.
7102 (resume): Call find_inferior.
7103 (handle_status): Replace accessing list implemention
7104 details with API function.
7105 (process_serial_event): Replace accessing list implemention details
7107 * target.c (set_desired_inferior): Replace accessing list implemention
7108 details with API function.
7109 * tracepoint.c (same_process_p): New function.
7110 (gdb_agent_about_to_close): Replace accessing list implemention
7111 details with API function.
7112 * win32-low.c (child_delete_thread): Replace accessing list
7113 implemention details with API function.
7114 (match_dll_by_basename): New function.
7115 (dll_is_loaded_by_basename): New function.
7116 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7117 details call to dll_is_loaded_by_basename.
7119 2014-02-19 Doug Evans <dje@google.com>
7121 * dll.h (struct dll_info): Add comment.
7122 * gdbthread.h (struct thread_info): Add comment.
7123 (current_ptid): Simplify.
7124 * inferiors.c (add_process): Update.
7125 (remove_process): Update.
7126 * inferiors.h (struct process_info): Rename member "head" to "entry".
7127 * linux-low.c (delete_lwp): Update.
7129 (last_thread_of_process_p): Update.
7130 (kill_one_lwp_callback, linux_kill): Update.
7131 (status_pending_p_callback): Update.
7132 (wait_for_sigstop): Update. Simplify read of ptid.
7133 (start_step_over): Update.
7134 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7135 (get_lwp_thread): Update.
7136 (struct lwp_info): Rename member "head" to "entry".
7137 * regcache.h (inferior_list_entry): Delete.
7138 * server.c (kill_inferior_callback): Update.
7139 (detach_or_kill_inferior_callback): Update.
7140 (print_started_pid): Update.
7141 (print_attached_pid): Update.
7142 (process_serial_event): Simplify read of ptid.
7143 * thread-db.c (thread_db_create_event): Update.
7144 (thread_db_get_tls_address): Update.
7145 * win32-low.c (current_inferior_ptid): Simplify.
7147 2014-02-19 Tom Tromey <tromey@redhat.com>
7149 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7151 (target_supports_btrace): Update.
7153 2014-02-14 Yao Qi <yao@codesourcery.com>
7155 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7156 (rsp-low-ipa.o): New target.
7158 2014-02-12 Tom Tromey <tromey@redhat.com>
7160 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7161 convert_ascii_to_int.
7162 * regcache.c (registers_to_string): Likewise.
7163 * remote-utils.c (decode_M_packet): Likewise.
7164 * server.c (process_serial_event): Likewise.
7166 2014-02-12 Tom Tromey <tromey@redhat.com>
7168 * server.c (handle_query, handle_v_run): Use hex2bin, not
7170 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7172 2014-02-12 Tom Tromey <tromey@redhat.com>
7174 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7175 convert_int_to_ascii.
7176 * regcache.c (registers_to_string, collect_register_as_string):
7178 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7180 * server.c (process_serial_event): Likewise.
7181 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7182 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7184 2014-02-12 Tom Tromey <tromey@redhat.com>
7186 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7187 bin2hex, not hexify.
7188 * tracepoint.c (cmd_qtstatus): Likewise.
7190 2014-02-12 Tom Tromey <tromey@redhat.com>
7192 * remote-utils.c (monitor_output): Pass explicit length to
7195 2014-02-12 Tom Tromey <tromey@redhat.com>
7197 * tracepoint.c: Include rsp-low.h.
7198 * server.c: Include rsp-low.h.
7199 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7200 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7202 * remote-utils.c: Include rsp-low.h.
7203 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7204 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7205 (convert_int_to_ascii, convert_ascii_to_int): Move to
7207 * regcache.c: Include rsp-low.h.
7208 * ax.c: Include rsp-low.h.
7209 * Makefile.in (SFILES): Add common/rsp-low.c.
7210 (OBS): Add rsp-low.o.
7211 (rsp-low.o): New target.
7213 2014-02-12 Tom Tromey <tromey@redhat.com>
7215 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7216 Include print-utils.h.
7217 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7218 (plongest, thirty_two, phex_nz): Remove.
7219 * Makefile.in (SFILES): Add common/print-utils.c.
7220 (OBS): Add print-utils.o.
7221 (print-utils-ipa.o): New target.
7222 (print-utils.o): New target.
7223 (IPA_OBJS): Add print-utils-ipa.o.
7225 2014-02-06 Tom Tromey <tromey@redhat.com>
7227 * Makefile.in (SFILES): Fix indentation.
7229 2014-02-05 Doug Evans <dje@google.com>
7231 * linux-low.c (linux_wait_for_event): Improve comment.
7232 (linux_wait_1): Keep current_inferior in sync with event_child.
7234 2014-01-22 Doug Evans <dje@google.com>
7236 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7238 2014-01-22 Doug Evans <dje@google.com>
7240 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7241 * configure: Regenerate.
7242 * config.in: Regenerate.
7243 * Makefile.in (SFILES): Add debug.c.
7245 * debug.c: New file.
7246 * debug.h: New file.
7247 * linux-aarch64-low.c (*): Update all debugging printfs to use
7248 debug_printf instead of fprintf.
7249 * linux-arm-low.c (*): Ditto.
7250 * linux-cris-low.c (*): Ditto.
7251 * linux-crisv32-low.c (*): Ditto.
7252 * linux-m32r-low.c (*): Ditto.
7253 * linux-sparc-low.c (*): Ditto.
7254 * linux-x86.c (*): Ditto.
7255 * linux-low.c (*): Ditto.
7256 (linux_wait_1): Add calls to debug_enter, debug_exit.
7257 (linux_wait): Remove redundant debugging printf.
7258 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7259 (linux_resume, unstop_all_lwps): Ditto.
7260 * mem-break.c (*): Update all debugging printfs to use
7261 debug_printf instead of fprintf.
7262 * remote-utils.c (*): Ditto.
7263 * thread-db.c (*): Ditto.
7264 * server.c #include <ctype.h>, "gdb_vecs.h".
7265 (debug_threads): Moved to debug.c.
7266 (*): Update all debugging printfs to use debug_printf instead of
7268 (start_inferior): Replace call to fflush with call to debug_flush.
7269 (monitor_show_help): Mention set debug-format.
7270 (parse_debug_format_options): New function.
7271 (handle_monitor_command): Handle "monitor set debug-format".
7272 (gdbserver_usage): Mention --debug-format.
7273 (main): Parse --debug-format.
7274 * server.h (debug_threads): Declaration moved to debug.h.
7276 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7277 trace_debug_1 that uses debug_printf.
7278 (tracepoint_look_up_symbols): Update all debugging printfs to use
7279 debug_printf instead of fprintf.
7281 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7283 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7286 2014-01-17 Pedro Alves <palves@redhat.com>
7289 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7290 defined after including gdb_proc_service.h.
7292 2014-01-16 Doug Evans <dje@google.com>
7294 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7295 (match_dll): Use it.
7297 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7299 * target.h (target_ops) <read_btrace>: Change parameters and
7300 return type to allow error reporting.
7301 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7302 trace reading errors on.
7303 * linux-low.c (linux_low_read_btrace): Pass trace reading
7305 (linux_low_disable_btrace): New.
7307 2014-01-15 Doug Evans <dje@google.com>
7309 * inferiors.c (thread_id_to_gdb_id): Delete.
7310 * inferiors.h (thread_id_to_gdb_id): Delete.
7312 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7314 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7315 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7318 2014-01-08 Pedro Alves <palves@redhat.com>
7320 * server.c (handle_status): Don't discard previous queued stop
7321 replies or thread's pending status here.
7322 (main) <disconnection>: Do it here instead.
7324 2014-01-08 Pedro Alves <palves@redhat.com>
7326 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7327 * server.c (visit_actioned_threads, handle_pending_status): New
7329 (handle_v_cont): Factor out parts to ...
7330 (resume): ... this new function. If in all-stop, and a thread
7331 being resumed has a pending status, report it without actually
7333 (myresume): Adjust to use the new 'resume' function.
7334 (clear_pending_status_callback, set_pending_status_callback)
7335 (find_status_pending_thread_callback): New functions.
7336 (handle_status): Handle the case of multiple threads having
7337 interesting statuses to report. Report threads' real last signal
7338 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7339 with an interesting thread to report the status for, instead of
7340 always reporting the status of the first thread.
7342 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7344 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7345 * gdbreplay.c (gdbreplay_version): Likewise.
7347 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7349 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7350 iov.iov_len with the real length in use.
7352 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7354 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7355 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7356 for all targets that use win32-low.c.
7357 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7358 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7360 2013-12-13 Pedro Alves <palves@redhat.com>
7362 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7363 if equal to TARGET_WAITKIND_LOADED.
7364 * win32-low.c (cached_status): New static global.
7365 (win32_wait): Add declaration.
7366 (do_initial_child_stuff): Flush all initial pending debug events
7367 up to the initial breakpoint.
7368 (win32_wait): If CACHED_STATUS was set, return that instead
7369 of doing a real wait. Remove the code resuming the execution
7370 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7371 during the initial phase. Also remove the code changing
7372 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7373 TARGET_WAITKIND_STOPPED.
7375 2013-12-11 Yao Qi <yao@codesourcery.com>
7377 * notif.c (handle_notif_ack): Return 0 if no notification
7380 2013-11-20 Doug Evans <dje@google.com>
7382 * linux-low.c (linux_set_resume_request): Fix comment.
7384 2013-11-20 Doug Evans <dje@google.com>
7386 * linux-low.c (resume_status_pending_p): Tweak comment.
7388 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7390 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7391 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7392 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7393 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7394 (srv_amd64_regobj): Add amd64-mpx.o.
7395 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7396 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7397 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7398 * i387-fp.c (num_pl_bnd_register) Added constant.
7399 (num_pl_bnd_cfg_registers) Added constant.
7400 (struct i387_xsave) Added reserved area and MPX fields.
7401 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7402 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7404 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7405 (init_registers_amd64_mpx_linux): Declare new function.
7406 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7407 (x86_64_regmap): Add MPX registers.
7408 (x86_linux_read_description): Add MPX case.
7409 (initialize_low_arch): Initialize MPX targets.
7411 2013-11-18 Tom Tromey <tromey@redhat.com>
7413 * configure: Rebuild.
7414 * configure.ac: Don't check for stdlib.h.
7415 * gdbreplay.c: Unconditionally include stdlib.h.
7417 2013-11-18 Tom Tromey <tromey@redhat.com>
7419 * config.in: Rebuild.
7420 * configure: Rebuild.
7421 * configure.ac: Don't use AC_HEADER_DIRENT.
7423 2013-11-18 Tom Tromey <tromey@redhat.com>
7425 * server.h: Don't check HAVE_STRING_H.
7426 * gdbreplay.c: Don't check HAVE_STRING_H.
7427 * configure: Rebuild.
7429 2013-11-18 Tom Tromey <tromey@redhat.com>
7431 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7434 2013-11-08 Tom Tromey <tromey@redhat.com>
7436 * configure, config.in: Rebuild.
7437 * configure.ac: Remove unused configury.
7439 2013-11-08 Tom Tromey <tromey@redhat.com>
7441 * acinclude.m4: Include common.m4, codeset.m4.
7442 * configure, config.in: Rebuild.
7443 * configure.ac: Use GDB_AC_COMMON.
7445 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7447 * linux-s390-low.c (HWCAP_S390_TE): New define.
7448 (s390_arch_setup): Consider the TE field in the HWCAP for
7449 determining 'have_regset_tdb'.
7451 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7454 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7457 2013-10-02 Pedro Alves <palves@redhat.com>
7459 * server.c (process_serial_event): Don't output "GDBserver
7460 exiting" if GDB is connected through stdio.
7461 * target.c (mywait): Likewise, be silent if GDB is connected
7464 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7466 * lynx-low.c (lynx_add_threads_after_attach): New function.
7467 (lynx_attach): Remove call to add_thread. Add call to
7468 lynx_add_threads_after_attach instead.
7470 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7472 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7473 * config.in, configure: Regenerated.
7475 2013-09-18 Yao Qi <yao@codesourcery.com>
7478 * server.c (start_inferior): Clear 'resume_info'.
7480 2013-09-16 Jiong Wang <jiwang@tilera.com>
7482 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7485 2013-09-16 Jiong Wang <jiwang@tilera.com>
7487 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7488 linux-tile-low.o to srv_tgtobj.
7490 2013-09-16 Will Newton <will.newton@linaro.org>
7492 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7495 2013-09-06 Pedro Alves <palves@redhat.com>
7497 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7498 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7499 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7500 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7501 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7502 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7504 2013-09-06 Pedro Alves <palves@redhat.com>
7506 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7507 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7509 2013-09-06 Pedro Alves <palves@redhat.com>
7511 * linux-amd64-ipa.c: Include tracepoint.h.
7512 * linux-i386-ipa.c: Include tracepoint.h.
7514 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7516 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7517 (ps_get_thread_area): New function.
7519 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7521 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7522 (initialize_low_arch): Call init_registers_crisv32 rather than
7523 init_register_crisv32.
7525 2013-09-05 Pedro Alves <palves@redhat.com>
7527 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7529 * hostio.h: ... this new file.
7530 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7531 win32-low.c: Include hostio.h.
7533 2013-09-05 Pedro Alves <palves@redhat.com>
7535 * server.h (gdb_client_data, handler_func, callback_handler_func)
7536 (delete_file_handler, add_file_handler, append_callback_event)
7537 (delete_callback_event, start_event_loop, initialize_event_loop):
7538 Move to event-loop.h and include it.
7539 * event-loop.h: New file.
7541 2013-09-05 Pedro Alves <palves@redhat.com>
7543 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7544 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7545 (loaded_dll, unloaded_dll): Move to ...
7546 * dll.h: ... this new file.
7547 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7549 2013-09-05 Pedro Alves <palves@redhat.com>
7551 * server.h (current_process, get_thread_process, all_processes)
7552 (add_inferior_to_list, for_each_inferior, current_inferior)
7553 (remove_inferior, add_process, remove_process, find_process_pid)
7554 (have_started_inferiors_p, have_attached_inferiors_p)
7555 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7556 (clear_inferiors, find_inferior, find_inferior_id)
7557 (inferior_target_data, set_inferior_target_data)
7558 (inferior_regcache_data, set_inferior_regcache_data): Move to
7559 inferiors.h, and include it.
7560 * inferiors.h: New file.
7562 2013-09-05 Pedro Alves <palves@redhat.com>
7564 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7568 2013-09-05 Pedro Alves <palves@redhat.com>
7570 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7572 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7573 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7574 (handle_tracepoint_general_set, handle_tracepoint_query)
7575 (tracepoint_finished_step, tracepoint_was_hit)
7576 (release_while_stepping_state_list, current_traceframe)
7577 (in_readonly_region, traceframe_read_mem)
7578 (fetch_traceframe_registers, traceframe_read_sdata)
7579 (traceframe_read_info, struct fast_tpoint_collect_status)
7580 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7581 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7582 (supply_fast_tracepoint_registers)
7583 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7584 (ipa_tdesc, claim_trampoline_space)
7585 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7586 (agent_mem_read, agent_get_trace_state_variable_value)
7587 (agent_set_trace_state_variable_value, agent_tsv_read)
7588 (agent_mem_read_string, get_raw_reg_func_addr)
7589 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7590 * tracepoint.h: ... this new file.
7592 2013-09-05 Pedro Alves <palves@redhat.com>
7594 * server.h (perror_with_name, error, fatal, warning, paddress)
7595 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7597 * utils.h: New file.
7599 2013-09-05 Pedro Alves <palves@redhat.com>
7601 * server.h (remote_debug, noack_mode, transport_is_reliable)
7602 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7603 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7604 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7605 (write_enn, initialize_async_io, enable_async_io)
7606 (disable_async_io, check_remote_input_interrupt_request)
7607 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7608 (dead_thread_notify, prepare_resume_reply)
7609 (decode_address_to_semicolon, decode_address, decode_m_packet)
7610 (decode_M_packet, decode_X_packet, decode_xfer_write)
7611 (decode_search_memory_packet, unhexify, hexify)
7612 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7613 (look_up_one_symbol, relocate_instruction)
7614 (monitor_output): Move to remote-utils.h, and include it.
7615 * remote-utils.h: New file.
7617 2013-09-05 Pedro Alves <palves@redhat.com>
7619 * server.h (_): Delete.
7621 2013-09-02 Pedro Alves <palves@redhat.com>
7623 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7624 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7626 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7628 2013-09-02 Pierre Muller <muller@sourceware.org>
7630 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7631 or WriteProcessMemory complete successfully and handle
7632 ERROR_PARTIAL_COPY error.
7634 2013-09-02 Pedro Alves <palves@redhat.com>
7636 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7637 error instead of EIO.
7639 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7642 * linux-low.c: Include filestuff.h.
7643 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7644 * lynx-low.c: Include filestuff.h.
7645 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7646 * server.c: Include filestuff.h.
7647 (main): Call notice_open_fds.
7648 * spu-low.c: Include filestuff.h.
7649 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7651 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7653 * Makefile.in: Explain why ../target and ../nat are not
7654 listed as include file search paths.
7655 (linux-waitpid.o): New object file rule.
7656 * configure.srv (srv_native_linux_obj): New variable.
7657 Replace all occurrences of linux native object files with
7658 $srv_native_linux_obj.
7659 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7660 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7661 (linux_enable_event_reporting): Remove declaration.
7662 (my_waitpid): Moved to common/linux-waitpid.c.
7663 (linux_wait_for_event): Pass ptid when calling
7664 linux_enable_event_reporting.
7665 (linux_supports_tracefork_flag): Remove.
7666 (linux_enable_event_reporting): Likewise.
7667 (linux_tracefork_grandchild): Remove.
7668 (STACK_SIZE): Moved to common/linux-ptrace.c.
7669 (linux_tracefork_child): Remove.
7670 (linux_test_for_tracefork): Remove.
7671 (linux_look_up_symbols): Call linux_supports_traceclone.
7672 (initialize_low): Remove call to linux_test_for_tracefork.
7673 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7674 common/linux-ptrace.h.
7675 (PTRACE_TYPE_ARG4): Likewise.
7676 Include linux-ptrace.h.
7678 2013-08-21 Pedro Alves <palves@redhat.com>
7680 * config.in: Renegerate.
7682 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7684 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7685 (SFILES): Remove $(srcdir)/common/target-common.c and
7686 add $(srcdir)/target/waitstatus.c.
7687 (OBS): Remove target-common.o and add waitstatus.o.
7688 (server_h): Remove $(srcdir)/../common/target-common.h and
7689 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7690 and $(srcdir)/../target/waitstatus.h.
7691 (target-common.o): Remove.
7692 (waitstatus.o): New target object file.
7693 * target.h: Do not include target-common.h and
7694 include target/resume.h, target/wait.h and
7695 target/waitstatus.h.
7697 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7699 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7700 to PTRACE_TYPE_ARG3.
7701 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7702 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7704 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7705 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7707 2013-07-27 Jie Zhang <jie@codesourcery.com>
7708 Daniel Jacobowitz <dan@codesourcery.com>
7709 Yao Qi <yao@codesourcery.com>
7711 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7712 (mips-linux-watch.o): New rule.
7713 (mips_linux_watch_h): New variable.
7714 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7716 * linux-mips-low.c: Include mips-linux-watch.h.
7717 (struct arch_process_info, struct arch_lwp_info): New.
7718 (update_watch_registers_callback): New function.
7719 (mips_linux_new_process, mips_linux_new_thread) New functions.
7720 (mips_linux_prepare_to_resume, mips_insert_point): New
7722 (mips_remove_point, mips_stopped_by_watchpoint): New
7724 (rsp_bp_type_to_target_hw_bp_type): New function.
7725 (mips_stopped_data_address): New function.
7726 (the_low_target): Add watchpoint support functions.
7728 2013-07-27 Yao Qi <yao@codesourcery.com>
7730 * i386-low.c: Include break-common.h.
7731 (enum target_hw_bp_type): Remove.
7733 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7735 * Makefile.in (SFILES): /common/target-common.c.
7736 (OBS): Add target-common.o.
7737 (server_h): Add $(srcdir)/../common/target-common.h.
7738 (target-common.o): New target.
7739 * server.c (queue_stop_reply_callback): Free
7740 status string after use.
7741 * target.c (target_waitstatus_to_string): Remove.
7742 * target.h: Include target-common.h.
7743 (resume_kind): Likewise.
7744 (target_waitkind): Likewise.
7745 (target_waitstatus): Likewise.
7746 (TARGET_WNOHANG): Likewise.
7748 2013-07-04 Yao Qi <yao@codesourcery.com>
7750 * Makefile.in (host_alias): Use @host_noncanonical@.
7751 (target_alias): Use @target_noncanonical@.
7752 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7753 ACX_NONCANONICAL_HOST.
7754 * configure: Regenerated.
7757 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7759 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7760 * configure: Rebuild.
7761 * Makefile.in (version_host, version_target): Get from configure.
7762 (version.c): Use $(version_host) and $(version_target).
7764 2013-07-03 Pedro Alves <palves@redhat.com>
7766 * Makefile.in (config.status): Depend on development.sh.
7767 * acinclude.m4: Include libmcheck.m4.
7768 * configure: Regenerate.
7770 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7772 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7773 attribute inside the parentheses.
7774 (winapi_DebugSetProcessKillOnExit): Ditto.
7775 (winapi_DebugBreakProcess): Ditto.
7776 (winapi_GenerateConsoleCtrlEvent): Ditto.
7778 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7780 * notif.h (notif_event): Add a dummy member to avoid compiler
7783 2013-07-01 Pedro Alves <palves@redhat.com>
7785 * hostio.c (HOSTIO_PATH_MAX): Define.
7786 (require_filename, handle_open, handle_unlink, handle_readlink):
7789 2013-07-01 Pedro Alves <palves@redhat.com>
7791 * server.h: Include "pathmax.h".
7792 * linux-low.c: Don't include sys/param.h.
7793 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7795 * win32-low.c: Don't include sys/param.h.
7796 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7798 2013-07-01 Pedro Alves <palves@redhat.com>
7800 * event-loop.c: Don't check HAVE_UNISTD_H before including
7802 * gdbreplay.c: Likewise.
7803 * remote-utils.c: Likewise.
7804 * server.c: Likewise.
7805 * configure.ac: Don't check for unistd.h.
7806 * configure: Regenerate.
7808 2013-06-28 Tom Tromey <tromey@redhat.com>
7810 * Makefile.in (version.c): Use version.in, not
7813 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7815 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7816 * configure: Rebuild.
7817 * Makefile.in (version_host, version_target): Get from configure.
7818 (version.c): Use $(version_host) and $(version_target).
7820 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7822 Fix trace-status to output user name without trailing colon.
7823 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7825 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7827 Fix trace-status to output proper start-time and stop-time.
7828 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7829 output start time and stop time in hex as gdb expects.
7831 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7833 * tracepoint.c (build_traceframe_info_xml): Output trace state
7834 variables present in the trace buffer.
7836 2013-06-24 Tom Tromey <tromey@redhat.com>
7838 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7840 (version.o): Remove.
7841 * gdbreplay.c: Include version.h.
7842 (version, host_name): Don't declare.
7843 * server.h: Include version.h.
7844 (version, host_name): Don't declare.
7846 2013-06-12 Pedro Alves <palves@redhat.com>
7848 * linux-x86-low.c (linux_is_elf64): Delete global.
7849 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7850 with local linux_pid_exe_is_elf_64_file use.
7852 2013-06-11 Pedro Alves <palves@redhat.com>
7854 * linux-low.c (regset_disabled, disable_regset): New functions.
7855 (regsets_fetch_inferior_registers)
7856 (regsets_store_inferior_registers): Use them.
7857 (initialize_regsets_info); Don't allocate the disabled_regsets
7859 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7862 2013-06-11 Pedro Alves <palves@redhat.com>
7864 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7867 2013-06-11 Pedro Alves <palves@redhat.com>
7869 * linux-x86-low.c (initialize_low_arch): Call
7870 init_registers_x32_avx_linux.
7872 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7874 Fix compatibility with Android Bionic.
7875 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7878 2013-06-07 Pedro Alves <palves@redhat.com>
7881 * Makefile.in (OBS): Add tdesc.o.
7882 (IPA_OBJS): Add tdesc-ipa.o.
7883 (tdesc-ipa.o): New rule.
7884 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7886 * linux-low.c (new_inferior): Delete.
7887 (disabled_regsets, num_regsets): Delete.
7888 (linux_add_process): Adjust to set the new per-process
7890 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7891 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7892 was a stop. When calling arch_setup, switch the current inferior
7893 to the thread that got an event.
7894 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7895 (regsets_fetch_inferior_registers)
7896 (regsets_store_inferior_registers): New regsets_info parameter.
7898 (linux_register_in_regsets): New regs_info parameter. Adjust to
7900 (register_addr, fetch_register, store_register): New usrregs_info
7901 parameter. Adjust to use it.
7902 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7903 parameter regs_info. Adjust to use it.
7904 (linux_fetch_registers): Get the current inferior's regs_info, and
7906 (linux_store_registers): Ditto.
7907 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7908 (initialize_low): Don't initialize the target_regsets here. Call
7909 initialize_low_arch.
7910 * linux-low.h (target_regsets): Delete declaration.
7911 (struct regsets_info): New.
7912 (struct usrregs_info): New.
7913 (struct regs_info): New.
7914 (struct process_info_private) <new_inferior>: New field.
7915 (struct linux_target_ops): Delete the num_regs, regmap, and
7916 regset_bitmap fields. New field regs_info.
7917 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7918 * i387-fp.c (num_xmm_registers): Delete.
7919 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7920 calls to new interface.
7921 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7922 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7923 Infer the number of xmm registers from the regcache's target
7925 * i387-fp.h (num_xmm_registers): Delete.
7926 * inferiors.c (add_thread): Don't install the thread's regcache
7928 * proc-service.c (gregset_info): Fetch the current inferior's
7929 regs_info. Adjust to use it.
7930 * regcache.c: Include tdesc.h.
7931 (register_bytes, reg_defs, num_registers)
7932 (gdbserver_expedite_regs): Delete.
7933 (get_thread_regcache): If the thread doesn't have a regcache yet,
7934 create one, instead of aborting gdbserver.
7935 (regcache_invalidate_one): Rename to ...
7936 (regcache_invalidate_thread): ... this.
7937 (regcache_invalidate_one): New.
7938 (regcache_invalidate): Only invalidate registers of the current
7940 (init_register_cache): Add target_desc parameter, and use it.
7941 (new_register_cache): Ditto. Assert the target description has a
7942 non zero registers_size.
7943 (regcache_cpy): Add assertions. Adjust.
7944 (realloc_register_cache, set_register_cache): Delete.
7945 (registers_to_string, registers_from_string): Adjust.
7946 (find_register_by_name, find_regno, find_register_by_number)
7947 (register_cache_size): Add target_desc parameter, and use it.
7948 (free_register_cache_thread, free_register_cache_thread_one)
7949 (regcache_release, register_cache_size): New.
7950 (register_size): Add target_desc parameter, and use it.
7951 (register_data, supply_register, supply_register_zeroed)
7952 (supply_regblock, supply_register_by_name, collect_register)
7953 (collect_register_as_string, collect_register_by_name): Adjust.
7954 * regcache.h (struct target_desc): Forward declare.
7955 (struct regcache) <tdesc>: New field.
7956 (init_register_cache, new_register_cache): Add target_desc
7958 (regcache_invalidate_thread): Declare.
7959 (regcache_invalidate_one): Delete declaration.
7960 (regcache_release): Declare.
7961 (find_register_by_number, register_cache_size, register_size)
7962 (find_regno): Add target_desc parameter.
7963 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7965 * remote-utils.c: Include tdesc.h.
7966 (outreg, prepare_resume_reply): Adjust.
7967 * server.c: Include tdesc.h.
7968 (gdbserver_xmltarget): Delete declaration.
7969 (get_features_xml, process_serial_event): Adjust.
7970 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7972 (struct process_info) <tdesc>: New field.
7973 (ipa_tdesc): Declare.
7974 * tdesc.c: New file.
7975 * tdesc.h: New file.
7976 * tracepoint.c: Include tdesc.h.
7977 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7978 (get_context_regcache): Adjust to pass ipa_tdesc down.
7979 (do_action_at_tracepoint): Adjust to get the register cache size
7980 from the context regcache's description.
7981 (traceframe_walk_blocks): Adjust to get the register cache size
7982 from the current trace frame's description.
7983 (traceframe_get_pc): Adjust to get current trace frame's
7984 description and pass it down.
7985 (gdb_collect): Adjust to get the register cache size from the
7987 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7988 (gdbserver_xmltarget): Delete.
7989 (initialize_low_tracepoint): Set the ipa's target description.
7990 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7991 (initialize_low_tracepoint): Set the ipa's target description.
7992 * linux-x86-low.c: Include tdesc.h.
7993 [__x86_64__] (is_64bit_tdesc): New.
7994 (ps_get_thread_area, x86_get_thread_area): Use it.
7995 (i386_cannot_store_register): Rename to ...
7996 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7997 (i386_cannot_fetch_register): Rename to ...
7998 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7999 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8001 (target_regsets): Rename to ...
8002 (x86_regsets): ... this.
8003 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8005 (x86_siginfo_fixup): Use is_64bit_tdesc.
8006 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8007 (tdesc_x32_avx_linux, tdesc_x32_linux)
8008 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8010 (x86_linux_update_xmltarget): Delete.
8011 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8012 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8013 (AMD64_LINUX_USER64_CS): New.
8014 (x86_linux_read_description): New, based on
8015 x86_linux_update_xmltarget.
8016 (same_process_callback): New.
8017 (x86_arch_setup_process_callback): New.
8018 (x86_linux_update_xmltarget): New.
8019 (x86_regsets_info): New.
8020 (amd64_linux_regs_info): New.
8021 (i386_linux_usrregs_info): New.
8022 (i386_linux_regs_info): New.
8023 (x86_linux_regs_info): New.
8024 (x86_arch_setup): Reimplement.
8025 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8026 (x86_emit_ops): Ditto.
8027 (the_low_target): Adjust. Install x86_linux_regs_info,
8028 x86_cannot_fetch_register, and x86_cannot_store_register.
8029 (initialize_low_arch): New.
8030 * linux-ia64-low.c (tdesc_ia64): Declare.
8031 (ia64_fetch_register): Adjust.
8032 (ia64_usrregs_info, regs_info): New globals.
8033 (ia64_regs_info): New function.
8034 (the_low_target): Adjust.
8035 (initialize_low_arch): New function.
8036 * linux-sparc-low.c (tdesc_sparc64): Declare.
8037 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8039 (sparc_arch_setup): New function.
8040 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8041 (the_low_target): Adjust.
8042 (initialize_low_arch): New function.
8043 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8044 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8045 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8046 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8047 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8048 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8049 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8050 (tdesc_powerpc_isa205_vsx64l): Declare.
8051 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8052 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8053 (ppc_set_pc, ppc_get_hwcap): Adjust.
8054 (ppc_usrregs_info): Forward declare.
8055 (!__powerpc64__) ppc_regmap_adjusted: New global.
8056 (ppc_arch_setup): Adjust to the current process'es target
8058 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8059 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8060 (ppc_store_evrregset): Adjust.
8061 (target_regsets): Rename to ...
8062 (ppc_regsets): ... this, and make static.
8063 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8064 (ppc_regs_info): New function.
8065 (the_low_target): Adjust.
8066 (initialize_low_arch): New function.
8067 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8068 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8069 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8070 (tdesc_s390x_linux64v2): Declare.
8071 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8072 (s390_fill_gregset, s390_store_last_break): Adjust.
8073 (target_regsets): Rename to ...
8074 (s390_regsets): ... this, and make static.
8075 (s390_get_pc, s390_set_pc): Adjust.
8076 (s390_get_hwcap): New target_desc parameter, and use it.
8077 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8078 (s390_arch_setup): Adjust to set the current process'es target
8079 description. Don't adjust the regmap.
8080 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8081 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8082 (regs_info_3264): New globals.
8083 (s390_regs_info): New function.
8084 (the_low_target): Adjust.
8085 (initialize_low_arch): New function.
8086 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8087 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8088 [__mips64] (init_registers_mips_linux)
8089 (init_registers_mips_dsp_linux): Delete defines.
8090 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8091 (have_dsp): New global.
8092 (mips_read_description): New, based on mips_arch_setup.
8093 (mips_arch_setup): Reimplement.
8094 (get_usrregs_info): New function.
8095 (mips_cannot_fetch_register, mips_cannot_store_register)
8096 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8097 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8098 (target_regsets): Rename to ...
8099 (mips_regsets): ... this, and make static.
8100 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8101 (dsp_regs_info, regs_info): New globals.
8102 (mips_regs_info): New function.
8103 (the_low_target): Adjust.
8104 (initialize_low_arch): New function.
8105 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8106 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8108 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8109 (arm_read_description): New, with bits factored from
8111 (arm_arch_setup): Reimplement.
8112 (target_regsets): Rename to ...
8113 (arm_regsets): ... this, and make static.
8114 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8115 (arm_regs_info): New function.
8116 (the_low_target): Adjust.
8117 (initialize_low_arch): New function.
8118 * linux-m68k-low.c (tdesc_m68k): Declare.
8119 (target_regsets): Rename to ...
8120 (m68k_regsets): ... this, and make static.
8121 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8122 (m68k_regs_info): New function.
8123 (m68k_arch_setup): New function.
8124 (the_low_target): Adjust.
8125 (initialize_low_arch): New function.
8126 * linux-sh-low.c (tdesc_sharch): Declare.
8127 (target_regsets): Rename to ...
8128 (sh_regsets): ... this, and make static.
8129 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8130 (sh_regs_info, sh_arch_setup): New functions.
8131 (the_low_target): Adjust.
8132 (initialize_low_arch): New function.
8133 * linux-bfin-low.c (tdesc_bfin): Declare.
8134 (bfin_arch_setup): New function.
8135 (bfin_usrregs_info, regs_info): New globals.
8136 (bfin_regs_info): New function.
8137 (the_low_target): Adjust.
8138 (initialize_low_arch): New function.
8139 * linux-cris-low.c (tdesc_cris): Declare.
8140 (cris_arch_setup): New function.
8141 (cris_usrregs_info, regs_info): New globals.
8142 (cris_regs_info): New function.
8143 (the_low_target): Adjust.
8144 (initialize_low_arch): New function.
8145 * linux-cris-low.c (tdesc_crisv32): Declare.
8146 (cris_arch_setup): New function.
8147 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8148 (cris_regs_info): New function.
8149 (the_low_target): Adjust.
8150 (initialize_low_arch): New function.
8151 * linux-m32r-low.c (tdesc_m32r): Declare.
8152 (m32r_arch_setup): New function.
8153 (m32r_usrregs_info, regs_info): New globals.
8154 (m32r_regs_info): Adjust.
8155 (initialize_low_arch): New function.
8156 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8157 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8158 (tic6x_usrregs_info): Forward declare.
8159 (tic6x_read_description): New function, based on ...
8160 (tic6x_arch_setup): ... this. Reimplement.
8161 (target_regsets): Rename to ...
8162 (tic6x_regsets): ... this, and make static.
8163 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8164 (tic6x_regs_info): New function.
8165 (the_low_target): Adjust.
8166 (initialize_low_arch): New function.
8167 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8168 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8169 (target_regsets): Rename to ...
8170 (xtensa_regsets): ... this, and make static.
8171 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8173 (xtensa_arch_setup, xtensa_regs_info): New functions.
8174 (the_low_target): Adjust.
8175 (initialize_low_arch): New function.
8176 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8177 (nios2_arch_setup): Set the current process'es tdesc.
8178 (target_regsets): Rename to ...
8179 (nios2_regsets): ... this.
8180 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8181 (nios2_regs_info): New function.
8182 (the_low_target): Adjust.
8183 (initialize_low_arch): New function.
8184 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8185 (aarch64_arch_setup): Set the current process'es tdesc.
8186 (target_regsets): Rename to ...
8187 (aarch64_regsets): ... this.
8188 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8189 (aarch64_regs_info): New function.
8190 (the_low_target): Adjust.
8191 (initialize_low_arch): New function.
8192 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8194 (target_regsets): Rename to ...
8195 (tile_regsets): ... this.
8196 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8197 (tile_regs_info): New function.
8198 (tile_arch_setup): Set the current process'es tdesc.
8199 (the_low_target): Adjust.
8200 (initialize_low_arch): New function.
8201 * spu-low.c (tdesc_spu): Declare.
8202 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8203 * win32-arm-low.c (tdesc_arm): Declare.
8204 (arm_arch_setup): New function.
8205 (the_low_target): Install arm_arch_setup instead of
8207 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8208 (init_windows_x86): Rename to ...
8209 (i386_arch_setup): ... this. Set `win32_tdesc'.
8210 (the_low_target): Adjust.
8211 * win32-low.c (win32_tdesc): New global.
8212 (child_add_thread): Don't create the thread cache here.
8213 (do_initial_child_stuff): Set the new process'es tdesc.
8214 * win32-low.h (struct target_desc): Forward declare.
8215 (win32_tdesc): Declare.
8216 * lynx-i386-low.c (tdesc_i386): Declare global.
8217 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8218 * lynx-low.c (lynx_tdesc): New global.
8219 (lynx_add_process): Set the new process'es tdesc.
8220 * lynx-low.h (struct target_desc): Forward declare.
8221 (lynx_tdesc): Declare global.
8222 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8223 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8224 * nto-low.c (nto_tdesc): New global.
8225 (do_attach): Set the new process'es tdesc.
8226 * nto-low.h (struct target_desc): Forward declare.
8227 (nto_tdesc): Declare.
8228 * nto-x86-low.c (tdesc_i386): Declare.
8229 (nto_x86_arch_setup): Set `nto_tdesc'.
8231 2013-06-04 Gary Benson <gbenson@redhat.com>
8233 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8234 to qSupported response when appropriate.
8235 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8236 with nonzero-length annex.
8237 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8238 arguments supplied in annex.
8240 2013-05-31 Doug Evans <dje@google.com>
8243 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8244 64 bits in 64-cross-32 environment.
8246 2013-05-28 Pedro Alves <palves@redhat.com>
8248 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8249 (aarch64-without-fpu.c): Delete rule.
8250 * configure.srv (aarch64*-*-linux*): Remove references to
8251 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8252 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8255 2013-05-24 Pedro Alves <palves@redhat.com>
8257 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8258 instead of strchr/decode_address. Error if the range isn't split
8259 with a ','. Don't assume there's be a ':' in the action.
8261 2013-05-23 Yao Qi <yao@codesourcery.com>
8262 Pedro Alves <palves@redhat.com>
8264 * linux-low.c (lwp_in_step_range): New function.
8265 (linux_wait_1): If the thread was range stepping and stopped
8266 outside the stepping range, report the stop to GDB. Otherwise,
8267 continue stepping. Add range stepping debug output.
8268 (linux_set_resume_request): Copy the step range from the resume
8270 (linux_supports_range_stepping): New.
8271 (linux_target_ops) <supports_range_stepping>: Set to
8272 linux_supports_range_stepping.
8273 * linux-low.h (struct linux_target_ops)
8274 <supports_range_stepping>: New field.
8275 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8276 * linux-x86-low.c (x86_supports_range_stepping): New.
8277 (the_low_target) <supports_range_stepping>: Set to
8278 x86_supports_range_stepping.
8279 * server.c (handle_v_cont): Handle 'r' action.
8280 (handle_v_requests): Append ";r" if the target supports range
8282 * target.h (struct thread_resume) <step_range_start,
8283 step_range_end>: New fields.
8284 (struct target_ops) <supports_range_stepping>:
8286 (target_supports_range_stepping): New macro.
8288 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8290 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8291 confusion in comment.
8293 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8295 * lynx-low.c (struct process_info_private): New type.
8296 (lynx_add_process): New function.
8297 (lynx_create_inferior, lynx_attach): Replace calls to
8298 add_process by calls to lynx_add_process.
8299 (lynx_resume): If PTID is null, then try using
8300 current_process()->private->last_wait_event_ptid.
8302 (lynx_clear_inferiors): Delete. The contents of that function
8303 has been inlined in lynx_mourn;
8304 (lynx_wait_1): Save the ptid in the process's private data.
8305 (lynx_mourn): Free the process' private data. Replace call
8306 to lynx_clear_inferiors by call to clear_inferiors.
8308 2013-05-17 Yao Qi <yao@codesourcery.com>
8310 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8313 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8315 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8316 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8317 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8318 PT_TEXT_END_ADDR guards. Update comments.
8319 (linux_target_op) <read_offsets>: Conditionally define to
8320 linux_read_offsets if the target is UCLIBC and if it defines
8321 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8323 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8324 Andrew Jenner <andrew@codesourcery.com>
8326 * Makefile.in (SFILES): Add linux-nios2-low.c.
8327 (clean): Add action to delete nios2-linux.c.
8328 (nios2-linux.c): New rule.
8329 * configure.srv: Add nios2*-*-linux*.
8330 * linux-nios2-low.c: New.
8332 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8334 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8336 2013-04-25 Hui Zhu <hui@codesourcery.com>
8339 * ax.c (ax_printf): Add fflush.
8341 2013-04-22 Tom Tromey <tromey@redhat.com>
8343 * Makefile.in (SFILES): Add filestuff.c.
8344 (OBS): Add filestuff.o.
8345 (filestuff.o): New target.
8346 * config.in, configure: Rebuild.
8347 * configure.ac: Check for fdwalk, pipe2.
8349 2013-04-17 Pedro Alves <palves@redhat.com>
8351 * configure.ac (USE_THREAD_DB): Delete variable.
8352 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8353 Don't AC_SUBST USE_THREAD_DB.
8354 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8355 * config.in, configure: Regenerate.
8357 2013-04-16 Pedro Alves <palves@redhat.com>
8359 * linux-low.h (struct lwp_info) <thread_known>: Move under
8360 the USE_THREAD_DB #ifdef.
8362 2013-04-16 Pedro Alves <palves@redhat.com>
8364 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8365 (linux-low.o): Delete rule.
8366 * linux-low.h: Always include "gdb_thread_db.h" instead of
8367 conditionally including thread_db.h.
8368 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8371 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8373 * Makefile.in (install-only): Fix make install regression.
8375 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8377 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8378 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8380 * gdbserver.1: Remove.
8382 2013-03-22 Pedro Alves <palves@redhat.com>
8384 * linux-low.c (handle_extended_wait): Don't call
8385 linux_enable_event_reporting.
8387 2013-03-15 Tony Theodore <tonyt@logyst.com>
8390 * Makefile.in (SHELL): Use @SHELL@.
8392 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8394 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8397 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8399 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8400 Remove extraneous NULL element.
8402 2013-03-13 Yao Qi <yao@codesourcery.com>
8404 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8405 'V' block in trace frame.
8407 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8409 * target.h (struct target_ops): Add btrace ops.
8410 (target_supports_btrace): New macro.
8411 (target_enable_btrace): New macro.
8412 (target_disable_btrace): New macro.
8413 (target_read_btrace): New macro.
8414 * gdbthread.h (struct thread_info): Add btrace field.
8415 * server.c: Include btrace-common.h.
8416 (handle_btrace_general_set): New function.
8417 (handle_btrace_enable): New function.
8418 (handle_btrace_disable): New function.
8419 (handle_general_set): Call handle_btrace_general_set.
8420 (handle_qxfer_btrace): New function.
8421 (struct qxfer qxfer_packets[]): Add btrace entry.
8422 * inferiors.c (remove_thread): Disable btrace.
8423 * linux-low: Include linux-btrace.h.
8424 (linux_low_enable_btrace): New function.
8425 (linux_low_read_btrace): New function.
8426 (linux_target_ops): Add btrace ops.
8427 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8428 Add srv_linux_btrace=yes.
8429 (x86_64-*-linux*): Add linux-btrace.o.
8430 Add srv_linux_btrace=yes.
8431 * configure.ac: Define HAVE_LINUX_BTRACE.
8432 * config.in: Regenerated.
8433 * configure: Regenerated.
8435 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8437 * server.c (handle_qxfer): Preserve error message if -3 is
8439 (qxfer): Document the -3 return value.
8441 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8443 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8444 (linux_btrace_h): New variable.
8445 (linux-btrace.o): New rule.
8447 2013-03-08 Stan Shebs <stan@codesourcery.com>
8448 Hafiz Abid Qadeer <abidh@codesourcery.com>
8450 * tracepoint.c (trace_buffer_size): New global.
8451 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8452 (init_trace_buffer): Change to one-argument function. Allocate
8453 trace buffer memory.
8454 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8455 handle QTBuffer:size packet.
8456 (cmd_bigqtbuffer_size): New function.
8457 (initialize_tracepoint): Call init_trace_buffer with
8458 DEFAULT_TRACE_BUFFER_SIZE.
8459 * server.c (handle_query): Add QTBuffer:size in the
8462 2013-03-07 Yao Qi <yao@codesourcery.com>
8464 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8465 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8467 (cmd_qtsp): Adjust condition. Do post increment.
8468 Set cur_action and cur_step_action back to 0.
8470 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8473 * linux-low.c (linux_write_memory): Return early success if LEN is
8476 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8478 * configure.srv: Add x86_64-*-cygwin* as target.
8480 2013-02-28 Tom Tromey <tromey@redhat.com>
8482 * configure.ac: Invoke AC_SYS_LARGEFILE.
8483 * configure, config.in: Rebuild.
8485 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8487 * win32-low.c: Throughout, fix format strings and casts of
8488 printf-like functions to avoid type related warnings on all
8490 (get_child_debug_event): Print dwDebugEventCode as hex since
8491 that's how it's usually documented.
8493 2013-02-28 Yao Qi <yao@codesourcery.com>
8495 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8498 2013-02-27 Jiong Wang <jiwang@tilera.com>
8500 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8501 (reg-tilegx32.c): New rule.
8502 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8503 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8504 different register info initializer according to elf class.
8505 (init_registers_tilgx32): New function. The tilegx32 register info
8507 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8508 (tile_store_gregset): Likewise.
8510 2013-02-27 Yao Qi <yao@codesourcery.com>
8512 * server.c (process_point_options): Print debug message when
8513 debug_threads is true.
8515 2013-02-26 Yao Qi <yao@codesourcery.com>
8517 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8519 2013-02-19 Pedro Alves <palves@redhat.com>
8520 Kai Tietz <ktietz@redhat.com>
8524 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8525 instead of strtoul to extract address from packet.
8526 (process_serial_event) <'z'>: Likewise.
8528 2013-02-18 Yao Qi <yao@codesourcery.com>
8530 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8532 2013-02-14 Pedro Alves <palves@redhat.com>
8536 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8537 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8539 2013-02-14 Pedro Alves <palves@redhat.com>
8541 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8543 2013-02-14 Pedro Alves <palves@redhat.com>
8545 * tracepoint.c (save_string): Delete.
8546 (add_tracepoint_action): Use savestring instead of save_string.
8548 2013-02-12 Pedro Alves <palves@redhat.com>
8550 * linux-xtensa-low.c: Ditto.
8551 * xtensa-xtregs.c: Ditto.
8553 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8555 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8558 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8560 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8561 aarch64_num_wp_regs and aarch64_num_bp_regs to
8562 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8564 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8566 * linux-aarch64-low.c (ps_get_thread_area): Replace
8567 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8569 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8570 Marcus Shawcroft <marcus.shawcroft@arm.com>
8571 Nigel Stephens <nigel.stephens@arm.com>
8572 Yufeng Zhang <yufeng.zhang@arm.com>
8574 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8575 (aarch64.c, aarch64-without-fpu.c): New targets.
8576 * configure.srv (aarch64*-*-linux*): New.
8577 * linux-aarch64-low.c: New file.
8579 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8581 * linux-low.c (handle_extended_wait, linux_create_inferior)
8582 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8583 (dequeue_one_deferred_signal, linux_resume_one_thread)
8584 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8585 (linux_tracefork_grandchild, linux_test_for_tracefork)
8586 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8587 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8588 where the argument is 0.
8590 2013-01-25 Yao Qi <yao@codesourcery.com>
8592 * event-loop.c: Include "queue.h".
8593 (gdb_event_p): New typedef.
8594 (struct gdb_event) <next_event>: Remove.
8595 (event_queue): Change to QUEUE(gdb_event_p).
8596 (async_queue_event): Remove.
8597 (gdb_event_xfree): New.
8598 (initialize_event_loop): New.
8599 (process_event): Use API from QUEUE.
8600 (wait_for_event): Likewise.
8601 * server.c (main): Call initialize_event_loop.
8602 * server.h (initialize_event_loop): Declare.
8604 2013-01-18 Yao Qi <yao@codesourcery.com>
8606 * ax.h (struct eval_agent_expr_context): New.
8607 (gdb_eval_agent_expr): Update declaration.
8608 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8609 TFRAME. Add new argument CTX.
8610 * server.h (struct eval_agent_expr_context): Declare.
8611 (agent_mem_read, agent_tsv_read): Update declaration.
8612 (agent_mem_read_string): Likewise.
8613 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8614 (add_traceframe_block): Add new argument TPOINT.
8615 Increase TPOINT->traceframe_usage.
8616 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8617 eval_tracepoint_agent_expr.
8618 (condition_true_at_tracepoint): Likewise.
8619 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8620 (agent_mem_read_string, agent_tsv_read): Likewise.
8622 2013-01-16 Yao Qi <yao@codesourcery.com>
8624 * linux-low.c (linux_resume_one_lwp): Don't check
8625 'lwp->bp_reinsert != 0'.
8627 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8628 Pedro Alves <palves@redhat.com>
8630 * lynx-low.c (ptrace_request_to_str): Define a temporary
8631 macro and use it to simplify this function's implementation.
8633 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8635 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8638 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8640 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8642 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8644 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8646 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8648 * lynx-low.c (lynx_resume): Use the resume_info parameter
8649 to determine the ptid for the lynx_ptrace call, unless
8650 it is equal to minus_one_ptid, in which case we use the
8651 ptid of the current_inferior.
8652 (lynx_wait_1): After having received a thread create/exit
8653 event, resume the inferior's execution using the signaling
8654 thread's ptid, rather than the old ptid.
8656 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8658 * lynx-low.c (lynx_resume): Delete variable ret.
8660 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8662 * gdbreplay.c (gdbreplay_version): Update copyright year.
8663 * server.c (gdbserver_version): Likewise.
8665 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8667 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8670 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8672 * lynx-low.c (ptrace_request_to_str): Add handling for
8675 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8677 * lynx-low.c (lynx_attach): Delete variable new_process.
8679 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8681 * lynx-low.c (lynx_create_inferior): Delete variable
8684 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8686 * lynx-low.c (ptrace_request_to_str): Do not handle
8687 PTRACE_GETTHREADLIST if this macro does not exist.
8689 2012-12-15 Yao Qi <yao@codesourcery.com>
8691 * Makefile.in (OBS): Add notif.o.
8692 * notif.c, notif.h: New.
8693 * server.c: Include "notif.h".
8694 (struct vstop_notif) <next>: Remove.
8696 (queue_stop_reply): Update.
8697 (push_event, send_next_stop_reply): Remove.
8698 (discard_queued_stop_replies): Update.
8699 (notif_stop): New variable.
8700 (handle_v_stopped): Remove.
8701 (handle_v_requests): Don't call handle_v_stopped. Call
8702 handle_ack_notif instead.
8703 (queue_stop_reply_callback): Call notif_event_enque instead
8704 of queue_stop_reply.
8705 (handle_status): Don't call send_next_stop_reply, call
8706 notif_write_event instead.
8707 (kill_inferior_callback): Likewise.
8708 (detach_or_kill_inferior_callback): Likewise.
8709 (main): Call initialize_notif.
8710 (process_serial_event): Call QUEUE_is_empty.
8711 (handle_target_event): Call notif_push instead of push event.
8712 * server.h (push_event): Remove declaration.
8714 2012-12-10 Tom Tromey <tromey@redhat.com>
8716 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8717 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8720 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8721 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8722 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8723 (amd64-linux-ipa.o, ax.o): Rewrite.
8724 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8725 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8726 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8727 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8728 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8729 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8730 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8731 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8732 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8733 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8734 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8735 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8736 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8737 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8738 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8739 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8740 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8741 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8742 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8743 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8744 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8745 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8746 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8747 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8748 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8749 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8750 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8751 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8752 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8753 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8754 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8755 (reg-tilegx.o): Remove.
8756 (all_object_files): New macro.
8757 Include .deps files.
8758 * aclocal.m4, configure: Rebuild.
8759 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8760 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8761 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8763 2012-12-05 Tom Tromey <tromey@redhat.com>
8766 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8768 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8770 * configure.ac: Check for linux/perf_event.h.
8771 * config.in: Regenerated.
8772 * configure: Regenerated.
8774 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8776 * hostio.c (handle_readlink): Decrease buffer size
8777 parameter passed to readlink by one byte.
8779 2012-11-26 Yao Qi <yao@codesourcery.com>
8781 * configure.ac (build_warnings): Append '-Wempty-body'.
8782 * configure: Regenerated.
8783 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8786 2012-11-15 Pierre Muller <muller@sourceware.org>
8788 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8789 * config.in: Regenerate.
8790 * configure: Regenerate.
8791 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8792 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8793 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8794 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8796 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8797 instead of <sys/wait.h> header.
8798 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8800 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8802 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8803 (various make rules): Remove -DGDBSERVER
8805 2012-11-09 Yao Qi <yao@codesourcery.com>
8807 * spu-low.c (current_ptid): Move it to ..
8808 * gdbthread.h: ... here. New.
8809 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8810 * server.c (myresume, process_serial_event): Likewise.
8811 * thread-db.c (thread_db_find_new_threads): Likewise.
8812 * tracepoint.c (run_inferior_command): Likewise.
8814 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8816 * server.c (handle_search_memory_1): Include access length in
8819 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8821 * linux-crisv32-low.c: Fix compile errors.
8823 2012-09-04 Yao Qi <yao@codesourcery.com>
8825 * tracepoint.c (cmd_qtsv): Adjust debug message.
8826 Don't check CUR_TPOINT.
8828 2012-08-28 Yao Qi <yao@codesourcery.com>
8830 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8831 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8832 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8833 Remove declarations of xmalloc, xreallloc, xstrdup and
8835 * Makefile.in (libiberty_h): New.
8836 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8837 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8839 2012-08-23 Yao Qi <yao@codesourcery.com>
8841 * server.h: Remove declaration of 'xsnprintf'.
8843 2012-08-22 Keith Seitz <keiths@redhat.com>
8845 * server.h: Include build-gnulib-gbserver/config.h.
8846 * gdbreplay.c: Likewise.
8848 2012-08-08 Doug Evans <dje@google.com>
8850 * Makefile.in (SFILES): Add gdb_vecs.c.
8851 (OBS): Add gdb_vecs.o.
8852 (gdb_vecs_h, host_defs_h): New variables.
8853 (thread-db.o): Add $(gdb_vecs_h) dependency.
8854 (gdb_vecs.o): New rule.
8855 * thread-db.c: #include "gdb_vecs.h".
8856 (thread_db_load_search): Use a vector to iterate over path elements.
8857 Handle text appearing after "$pdir".
8859 * configure.ac: Add check for strstr.
8860 * config.in: Regenerate.
8861 * configure: Regenerate.
8863 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8865 * hostio.c (handle_pread): If pread fails, fall back to attempting
8867 (handle_pwrite): Likewise for pwrite.
8869 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8871 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8872 between unsupported TYPE and unimplementable ADDR/LEN combination.
8873 (arm_insert_point): Act on new return value.
8875 2012-07-31 Pedro Alves <palves@redhat.com>
8877 * server.c (process_point_options): Only skip tokens if we find
8878 one that is unrecognized. Don't treat 'X' specially while
8879 skipping unrecognized tokens.
8881 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8883 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8884 to 4-byte-align HW breakpoint addresses for Thumb.
8886 2012-07-27 Yao Qi <yao@codesourcery.com>
8890 * server.h: Declare gdb_agent_about_to_close.
8891 * target.c (kill_inferior): Include "agent.h".
8892 New. Send command 'kill'.
8893 * target.h (kill_inferior): Removed macro.
8894 * tracepoint.c (gdb_agent_about_to_close): New.
8895 (gdb_agent_helper_thread): Handle command 'close'.
8896 Wait endlessly until the inferior stops.
8897 Install gdb_agent_remove_socket to atexit hook.
8898 (agent_socket_name): New static variable.
8899 (gdb_agent_socket_init): Replace local variable 'name' with
8900 'agent_socket_name'.
8901 (gdb_agent_remove_socket): New.
8903 2012-07-27 Yao Qi <yao@codesourcery.com>
8905 * server.c (process_point_options): Stop at 'X' when parsing.
8907 2012-07-19 Michael Eager <eager@eagercon.com>
8909 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8911 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8912 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8913 hardware breakpoint.
8915 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8917 * gdbserver/linux-low.c (initialize_low): Call
8918 linux_ptrace_init_warnings.
8920 2012-07-02 Doug Evans <dje@google.com>
8922 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8925 2012-07-02 Stan Shebs <stan@codesourcery.com>
8927 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8928 (ax.o): Add it to build rule.
8930 (OBS): Add format.o.
8931 (IPA_OBS): Add format.o.
8932 * server.c (handle_query): Claim support for breakpoint commands.
8933 (process_point_options): Add command case.
8934 (process_serial_event): Leave running if there are printfs in
8936 * mem-break.h (any_persistent_commands): Declare.
8937 (add_breakpoint_commands): Declare.
8938 (gdb_no_commands_at_breakpoint): Declare.
8939 (run_breakpoint_commands): Declare.
8940 * mem-break.c (struct point_command_list): New struct.
8941 (struct breakpoint): New field command_list.
8942 (any_persistent_commands): New function.
8943 (add_commands_to_breakpoint): New function.
8944 (add_breakpoint_commands): New function.
8945 (gdb_no_commands_at_breakpoint): New function.
8946 (run_breakpoint_commands): New function.
8947 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8949 * ax.c: Include format.h.
8950 (ax_printf): New function.
8951 (gdb_eval_agent_expr): Add printf opcode.
8953 2012-06-13 Yao Qi <yao@codesourcery.com>
8955 * server.c (start_inferior): Remove duplicated writes to fields
8956 'last_resume_kind' and 'last_status' of 'current_inferior'.
8958 2012-06-12 Yao Qi <yao@codesourcery.com>
8959 Pedro Alves <palves@redhat.com>
8961 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8963 * server.c (handle_v_cont): Extend comment.
8965 2012-06-11 Yao Qi <yao@codesourcery.com>
8967 * linux-low.c (linux_attach): Add 'static'.
8969 2012-06-06 Yao Qi <yao@codesourcery.com>
8971 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8973 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8975 Fix gcc -flto compilation warning.
8976 * server.c (main): Make variable multi_mode and attach volatile.
8978 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8980 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8981 if the platform doesn't know about it.
8983 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8985 * Makefile.in (SFILES): Add linux-tile-low.c.
8986 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8987 * configure.srv: Handle tilegx-*-linux*.
8988 * linux-tile-low.c: New file.
8990 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8992 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8994 2012-05-24 Pedro Alves <palves@redhat.com>
8998 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9000 2012-05-24 Pedro Alves <palves@redhat.com>
9004 Replace target_signal with gdb_signal throughout.
9006 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9008 * linux-low.c (linux_store_registers): Avoid the copying sequence
9009 when no data has been retrieved by ptrace.
9011 2012-05-22 Will Deacon <will.deacon@arm.com>
9013 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9014 Include asm/ptrace.h.
9015 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9018 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9020 * linux-low.c (linux_store_registers): Don't re-retrieve data
9021 with ptrace that has already been obtained from /proc. Always
9022 copy any data retrieved with ptrace to the buffer supplied.
9024 2012-05-11 Yao Qi <yao@codesourcery.com>
9025 Pedro Alves <palves@redhat.com>
9027 * linux-low.c (enum stopping_threads_kind): New.
9028 (stopping_threads): Change type to `enum stopping_threads_kind'.
9029 (handle_extended_wait): If stopping and suspending threads, leave
9030 the new_lwp suspended too.
9031 (linux_wait_for_event): Adjust.
9032 (stop_all_lwps): Set `stopping_threads' to
9033 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9034 whether we're suspending threads or just stopping them. Assert no
9037 2012-04-29 Yao Qi <yao@codesourcery.com>
9039 * server.h: Move some code to ...
9040 * gdbthread.h: ... here. New.
9041 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9042 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9043 (nto-low.o, win32-low.o): Likewise.
9044 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9045 * regcache.c, remote-utils.c, server.c: Likewise.
9046 * target.c, tracepoint.c, win32-low.c: Likewise.
9048 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9050 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9051 (PTRACE_ARG4_TYPE): Likewise.
9052 (PTRACE_XFER_TYPE): Likewise.
9053 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9054 ptrace to PTRACE_ARG3_TYPE.
9055 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9056 (PTRACE_ARG4_TYPE): Likewise.
9057 (PTRACE_XFER_TYPE): Likewise.
9058 (linux_detach_one_lwp): Cast fourth argument of
9059 ptrace to long then PTRACE_ARG4_TYPE.
9060 (regsets_fetch_inferior_registers): Cast third argument of
9061 ptrace to long then PTRACE_ARG3_TYPE.
9062 (regsets_store_inferior_registers): Likewise.
9064 2012-04-20 Pedro Alves <palves@redhat.com>
9066 * configure: Regenerate.
9068 2012-04-19 Pedro Alves <palves@redhat.com>
9070 * Makefile.in (GNULIB_BUILDDIR): New.
9071 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9072 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9073 (all, install-only, uninstall, clean-info, all-lib, clean): No
9074 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9075 (maintainer-clean realclean distclean): Use subdir_do.
9077 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9078 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9079 * acinclude.m4: Include acx_configure_dir.m4.
9080 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9081 calls. Call AC_PROG_RANLIB. Configure gnulib using
9084 (GNULIB_STDINT_H): Adjust.
9085 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9086 * gdbreplay.c: Include build-gnulib/config.h.
9087 * server.h: Likewise.
9088 * aclocal.m4: Regenerate.
9089 * config.in: Regenerate.
9090 * configure: Regenerate.
9092 2012-04-19 Pedro Alves <palves@redhat.com>
9094 * Makefile.in (LIBGNU, INCGNU): Adjust.
9095 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9096 (all, install-only, uninstall, clean-info, all-lib, clean)
9097 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9098 * configure.ac: Adjust AC_OUTPUT output.
9099 * aclocal.m4: Regenerate.
9100 * configure: Regenerate.
9102 2012-04-19 Pedro Alves <palves@redhat.com>
9104 * Makefile.in (generated_files): New.
9105 (server_h): Remove the explicit dependency on config.h, and depend
9106 on $generated_files.
9108 2012-04-19 Pedro Alves <palves@redhat.com>
9110 * Makefile.in (INCGNU): Add -Ignulib.
9112 2012-04-19 Pedro Alves <palves@redhat.com>
9114 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9115 (INCGNU): ... this, and spell out -I here.
9116 (GNULIB_LIB): Rename to ...
9118 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9120 2012-04-19 Pedro Alves <palves@redhat.com>
9122 * config.in: Regenerate.
9124 2012-04-19 Pedro Alves <palves@redhat.com>
9126 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9127 * server.h (memmem): Remove declaration.
9128 * config.in: Regenerate.
9129 * configure: Regenerate.
9131 2012-04-19 Yao Qi <yao@codesourcery.com>
9133 * Makefile.in (SFILES): Add common/vec.c.
9137 2012-04-19 Yao Qi <yao@codesourcery.com>
9139 * remote-utils.c (prepare_resume_reply): Replace with macro
9140 target_core_of_thread.
9141 * server.c (handle_qxfer_threads_proper): Likewise.
9142 * target.h (traget_core_of_thread): New macro.
9144 2012-04-18 Pedro Alves <palves@redhat.com>
9146 * aclocal.m4: Regenerate.
9147 * configure: Regenerate.
9149 2012-04-16 Yao Qi <yao@codesourcery.com>
9151 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9152 duplicated on address.
9154 2012-04-16 Yao Qi <yao@codesourcery.com>
9156 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9157 (struct tracepoint_action_ops) <send>: New field.
9158 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9159 (agent_expr_send, x_tracepoint_action_send): New.
9160 (l_tracepoint_action_send): New.
9161 (cmd_qtdp): Download and install tracepoint
9162 according to `use_agent'.
9163 (run_inferior_command): Add one more parameter `len'.
9165 (tracepoint_send_agent): New.
9166 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9168 2012-04-16 Yao Qi <yao@codesourcery.com>
9170 * tracepoint.c (download_tracepoints): Moved to ...
9171 (cmd_qtstart): ... here.
9173 2012-04-14 Yao Qi <yao@codesourcery.com>
9175 * tracepoint.c: Include inttypes.h.
9176 (struct collect_memory_action): Use sized types.
9177 (struct tracepoint): Likewise.
9178 (cmd_qtdp, stop_tracing): Update print specifiers.
9179 (cmd_qtp, response_tracepoint): Likewise.
9180 (collect_data_at_tracepoint): Likewise.
9181 (collect_data_at_step): Likewise.
9183 2012-04-14 Yao Qi <yao@codesourcery.com>
9185 Import gnulib module inttypes.
9186 * aclocal.m4, config.in, configure: Regenerated.
9188 2012-04-14 Yao Qi <yao@codesourcery.com>
9190 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9191 Makefile and config.status at last.
9193 2012-04-13 Yao Qi <yao@codesourcery.com>
9195 * tracepoint.c: Include stdint.h unconditionally.
9197 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9199 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9200 on BFD_HAVE_SYS_PROCFS_TYPE.
9201 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9202 * configure: Regenerate.
9203 * config.in: Likewise.
9205 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9207 * Makefile.in (clean): Also remove x32.c x32-linux.c
9208 x32-avx.c x32-avx-linux.c.
9209 (x32.o): New target.
9211 (x32-linux.o): Likewise.
9212 (x32-linux.c): Likewise.
9213 (x32-avx.o): Likewise.
9214 (x32-avx.c): Likewise.
9215 (x32-avx-linux.o): Likewise.
9216 (x32-avx-linux.c): Likewise.
9218 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9219 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9220 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9221 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9222 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9223 i386/x32-avx-linux.xml.
9225 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9226 (init_registers_x32_avx_linux): Likwise.
9227 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9228 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9230 2012-04-13 Pedro Alves <palves@redhat.com>
9232 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9233 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9234 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9235 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9238 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9240 * linux-x86-low.c (compat_x32_clock_t): New.
9241 (compat_x32_siginfo_t): Likewise.
9242 (compat_x32_siginfo_from_siginfo): Likewise.
9243 (siginfo_from_compat_x32_siginfo): Likewise.
9244 (linux_is_elf64): Likewise.
9245 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9246 and siginfo_from_compat_x32_siginfo for x32.
9247 (x86_arch_setup): Set linux_is_elf64.
9249 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9252 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9254 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9255 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9256 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9257 compatible with process.
9259 2012-04-12 Yao Qi <yao@codesourcery.com>
9261 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9262 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9263 (install-only, install-info, clean): Handle sub dir gnulib.
9264 (all-lib, am--refresh): New targets.
9265 (memmem.o): Remove target.
9266 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9267 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9268 (AC_REPLACE_FUNCS): Remove memmem.
9269 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9270 (AC_OUTPUT): Generate Makefile in gnulib/.
9271 * aclocal.m4, config.in, configure: Regenerated.
9273 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9275 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9277 2012-04-05 Pedro Alves <palves@redhat.com>
9279 -Werror=strict-aliasing
9281 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9284 2012-04-04 Pedro Alves <palves@redhat.com>
9286 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9287 (sparc_store_gregset_from_stack, sparc_store_gregset)
9288 (sparc_breakpoint_at): Fix formatting.
9290 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9292 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9294 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9295 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9296 * config.in: Regenerate.
9297 * configure: Likewise.
9299 2012-03-29 Pedro Alves <palves@redhat.com>
9301 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9302 Correct ptrace arguments.
9304 2012-03-28 Pedro Alves <palves@redhat.com>
9306 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9307 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9308 (IA64_FR1_REGNUM): New defines.
9309 (ia64_fetch_register): New.
9310 (the_low_target): Install it.
9311 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9313 * linux-low.c (linux_fetch_registers): Try the
9314 the_low_target.fetch_register hook first.
9316 * linux-arm-low.c (the_low_target): Adjust.
9317 * linux-bfin-low.c (the_low_target): Adjust.
9318 * linux-cris-low.c (the_low_target): Adjust.
9319 * linux-crisv32-low.c (the_low_target): Adjust.
9320 * linux-m32r-low.c (the_low_target): Adjust.
9321 * linux-m68k-low.c (the_low_target): Adjust.
9322 * linux-mips-low.c (the_low_target): Adjust.
9323 * linux-ppc-low.c (the_low_target): Adjust.
9324 * linux-s390-low.c (the_low_target): Adjust.
9325 * linux-sh-low.c (the_low_target): Adjust.
9326 * linux-sparc-low.c (the_low_target): Adjust.
9327 * linux-tic6x-low.c (the_low_target): Adjust.
9328 * linux-x86-low.c (the_low_target): Adjust.
9329 * linux-xtensa-low.c (the_low_target): Adjust.
9331 2012-03-26 Pedro Alves <palves@redhat.com>
9333 * server.c (handle_qxfer_libraries): Don't bail early if
9334 the_target->qxfer_libraries_svr4 is not NULL.
9336 2012-03-26 Pedro Alves <palves@redhat.com>
9338 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9340 2012-03-23 Pedro Alves <palves@redhat.com>
9342 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9343 "library-list-svr4" element's start tag when the the DSO list is
9346 2012-03-23 Pedro Alves <palves@redhat.com>
9348 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9349 a variable whose type size is the same as the inferior's pointer
9352 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9354 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9356 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9357 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9358 * linux-low.h: Include <signal.h>.
9359 (struct siginfo): Remove forward declaration.
9360 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9363 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9365 * .gitignore: Ignore more files.
9367 2012-03-19 Pedro Alves <palves@redhat.com>
9368 Jan Kratochvil <jan.kratochvil@redhat.com>
9370 * server.c (cont_thread, general_thread): Add describing comments.
9371 (start_inferior): Clear `cont_thread'.
9372 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9375 2012-03-15 Yao Qi <yao@codesourcery.com>
9377 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9379 (cmd_qtdp): ... here.
9381 2012-03-15 Yao Qi <yao@codesourcery.com>
9383 * tracepoint.c (struct tracepoint_action_ops): New.
9384 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9385 (m_tracepoint_action_download): New.
9386 (r_tracepoint_action_download): New.
9387 (x_tracepoint_action_download): New.
9388 (l_tracepoint_action_download): New.
9389 (add_tracepoint_action): Install `action->ops' according type.
9390 (download_tracepoint_1): Move code `download' function pointer
9391 of various tracepoint_action_ops.
9393 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9395 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9396 linux_ptrace_attach_warnings.
9398 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9400 * Makefile.in (linux-ptrace.o): New.
9401 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9402 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9403 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9404 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9405 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9407 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9409 2012-03-08 Yao Qi <yao@codesourcery.com>
9410 Pedro Alves <palves@redhat.com>
9412 Fix PR server/13392.
9413 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9415 * tracepoint.c (remove_tracepoint): New.
9416 (cmd_qtdp): Call remove_tracepoint when failed to install.
9418 2012-03-07 Pedro Alves <palves@redhat.com>
9420 * linux-low.c (get_detach_signal): New.
9421 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9422 Pass on pending signals to PTRACE_DETACH. Check the result of the
9424 * server.c (program_signals, program_signals_p): New.
9425 (handle_general_set): Handle QProgramSignals.
9426 * server.h (program_signals, program_signals_p): Declare.
9428 2012-03-05 Pedro Alves <palves@redhat.com>
9429 Jan Kratochvil <jan.kratochvil@redhat.com>
9431 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9434 2012-03-03 Yao Qi <yao@codesourcery.com>
9436 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9437 agent_look_up_symbols.
9439 2012-03-03 Yao Qi <yao@codesourcery.com>
9441 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9442 (linux-x86-low.o): Likewise.
9443 * server.h: Remove in_process_agent_loaded.
9444 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9448 2012-03-03 Yao Qi <yao@codesourcery.com>
9450 * tracepoint.c (gdb_agent_capability): New global.
9451 (in_process_agent_loaded_ust): Renamed to
9452 `in_process_agent_supports_ust'.
9454 (in_process_agent_supports_ust): Call agent_capability_check.
9455 (clear_installed_tracepoints): Assert that agent supports
9458 2012-03-03 Yao Qi <yao@codesourcery.com>
9460 * linux-low.c (linux_supports_agent): New.
9461 (linux_target_ops): Initialize field `supports_agent' with
9462 linux_supports_agent.
9463 * target.h (struct target_ops) <supports_agent>: New.
9464 (target_supports_agent): New macro.
9465 * server.c (handle_general_set): Handle packet 'QAgent'.
9466 (handle_query): Send `QAgent+'.
9467 * Makefile.in (server.o): Depends on agent.h.
9469 2012-03-03 Yao Qi <yao@codesourcery.com>
9471 * Makefile.in (OBS): Add agent.o.
9472 Add new rule for agent.o.
9473 Track dependence of tracepoint.c on agent.h.
9474 * tracepoint.c (run_inferior_command_1):
9475 (run_inferior_command): Call agent_run_command.
9476 (gdb_ust_connect_sync_socket): Deleted. Move it to
9478 (resume_thread, stop_thread): Likewise.
9479 (gdb_ust_socket_init): Renamed to ...
9480 (gdb_agent_socket_init): ... New.
9481 (gdb_ust_thread): Renamed to ...
9482 (gdb_agent_helper_thread): ... New.
9483 (gdb_ust_init): Move some code to ...
9484 (gdb_agent_init): ... here. New.
9485 [HAVE_UST]: Call gdb_ust_init.
9486 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9487 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9488 * config.in, configure: Regenerated.
9490 2012-03-02 Pedro Alves <palves@redhat.com>
9492 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9493 * linux-low.c (struct simple_pid_list): New.
9494 (stopped_pids): New a struct simple_pid_list pointer.
9495 (add_to_pid_list, pull_pid_from_list): New.
9496 (handle_extended_wait): Don't assume the first signal new children
9497 report is SIGSTOP. Adjust call to pull_pid_from_list.
9498 (linux_wait_for_lwp): Adjust.
9500 2012-03-02 Yao Qi <yao@codesourcery.com>
9502 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9505 2012-03-02 Yao Qi <yao@codesourcery.com>
9507 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9508 `stop_pc' and `tpoint'. Update caller.
9510 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9512 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9513 * linux-low.c (use_linux_regsets): New macro.
9514 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9515 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9516 (linux_register_in_regsets): New function.
9517 (usr_fetch_inferior_registers): Skip registers covered by
9519 (usr_store_inferior_registers): Likewise.
9520 (usr_fetch_inferior_registers): New macro.
9521 (usr_store_inferior_registers): Likewise.
9522 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9523 (linux_store_registers): Likewise.
9524 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9526 (init_registers_mips64_dsp_linux): Likewise.
9527 (init_registers_mips_linux): New macro.
9528 (init_registers_mips_dsp_linux): Likewise.
9529 (mips_dsp_num_regs): Likewise.
9530 (DSP_BASE, DSP_CONTROL): New fallback macros.
9531 (mips_base_regs): New macro.
9532 (mips_regmap): Use it. Fix the size.
9533 (mips_dsp_regmap): New variable.
9534 (mips_dsp_regset_bitmap): Likewise.
9535 (mips_arch_setup): New function.
9536 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9538 (mips_cannot_store_register): Likewise.
9539 (the_low_target): Update .arch_setup, .num_regs and .regmap
9540 initializers. Add .regset_bitmap initializer.
9541 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9543 * linux-bfin-low.c (the_low_target): Likewise.
9544 * linux-cris-low.c (the_low_target): Likewise.
9545 * linux-crisv32-low.c (the_low_target): Likewise.
9546 * linux-ia64-low.c (the_low_target): Likewise.
9547 * linux-m32r-low.c (the_low_target): Likewise.
9548 * linux-m68k-low.c (the_low_target): Likewise.
9549 * linux-ppc-low.c (the_low_target): Likewise.
9550 * linux-s390-low.c (the_low_target): Likewise.
9551 * linux-sh-low.c (the_low_target): Likewise.
9552 * linux-sparc-low.c (the_low_target): Likewise.
9553 * linux-tic6x-low.c (the_low_target): Likewise.
9554 * linux-x86-low.c (the_low_target): Likewise.
9555 * linux-xtensa-low.c (the_low_target): Likewise.
9556 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9557 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9558 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9560 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9561 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9563 2012-02-29 Yao Qi <yao@codesourcery.com>
9564 Pedro Alves <palves@redhat.com>
9566 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9567 `step_over_finished' is true.
9569 2012-02-27 Pedro Alves <palves@redhat.com>
9571 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9572 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9574 2012-02-27 Pedro Alves <palves@redhat.com>
9577 * linux-low.c (pid_is_stopped): New.
9578 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9580 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9582 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9585 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9587 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9589 2012-02-24 Luis Machado <lgustavo@codesourcery>
9591 * server.c (handle_query): Advertise support for target-side
9592 breakpoint condition evaluation.
9593 (process_point_options): New function.
9594 (process_serial_event): When inserting a breakpoint, check for
9595 a target-side condition that should be evaluated.
9597 * mem-break.c: Include regcache.h and ax.h.
9598 (point_cond_list_t): New data structure.
9599 (breakpoint) <cond_list>: New field.
9600 (find_gdb_breakpoint_at): Make non-static.
9601 (delete_gdb_breakpoint_at): Clear any target-side
9603 (clear_gdb_breakpoint_conditions): New function.
9604 (add_condition_to_breakpoint): Likewise.
9605 (add_breakpoint_condition): Likewise.
9606 (gdb_condition_true_at_breakpoint): Likewise.
9607 (gdb_breakpoint_here): Return result directly instead
9608 of going through a local variable.
9610 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9611 (clear_gdb_breakpoint_conditions): Likewise.
9612 (add_breakpoint_condition): Likewise.
9613 (gdb_condition_true_at_breakpoint): Likewise.
9615 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9616 (need_step_over_p): Take target-side breakpoint condition into
9619 2012-02-24 Luis Machado <lgustavo@codesourcery>
9621 * server.h: Include tracepoint.h.
9622 (agent_mem_read, agent_get_trace_state_variable_value,
9623 agent_set_trace_state_variable_value,
9624 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9625 get_set_tsv_func_addr): New prototypes.
9627 * ax.h: New include file.
9628 * ax.c: New source file.
9630 * tracepoint.c: Include ax.h.
9631 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9632 agent_expr, eval_result_type): Move to ax.h.
9633 (parse_agent_expr): Rename to ...
9634 (gdb_parse_agent_expr): ... this, make it non-static and move
9636 (unparse_agent_expr) Rename to ...
9637 (gdb_unparse_agent_expr): ... this, make it non-static and move
9639 (eval_agent_expr): Rename to ...
9640 (eval_tracepoint_agent_expr): ... this.
9641 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9642 forward declarations.
9643 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9644 (agent_get_trace_state_variable_value): New function.
9645 (agent_set_trace_state_variable_value): New function.
9646 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9647 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9648 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9649 (condition_true_at_tracepoint): Likewise.
9650 (parse_agent_expr): Rename to ...
9651 (gdb_parse_agent_expr): ... this and move to ax.c.
9652 (unparse_agent_expr): Rename to ...
9653 (gdb_unparse_agent_expr): ... this and move to ax.c.
9654 (gdb_agent_op_name): Move to ax.c.
9655 (eval_agent_expr): Rename to ...
9656 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9658 (eval_tracepoint_agent_expr): New function.
9659 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9661 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9663 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9664 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9665 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9666 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9667 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9668 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9669 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9670 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9671 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9672 (compile_bytecodes): Remove forward declaration.
9673 (is_goto_target): Move to ax.c.
9674 (compile_bytecodes): Move to ax.c and call
9675 agent_get_trace_state_variable_value (...) and
9676 agent_set_trace_state_variable_value (...).
9678 * Makefile.in: Update ax.c and IPA dependencies.
9680 2012-02-24 Pedro Alves <palves@redhat.com>
9682 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9683 (cmd_bigqtbuffer_circular): ... this. Only handle
9684 'QTBuffer:circular:'.
9685 (handle_tracepoint_general_set): Adjust.
9687 2012-02-16 Yao Qi <yao@codesourcery.com>
9689 * inferiors.c: Move code to ...
9690 * dll.c: .... here. New.
9691 * server.h: Declare clear_dlls.
9692 * Makefile.in (SFILES): Add dll.c.
9696 2012-02-11 Yao Qi <yao@codesourcery.com>
9698 * server.c: (handle_monitor_command): Add a new parameter
9700 (handle_query): Update caller.
9702 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9704 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9705 * configure, config.in: Regenerate.
9706 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9709 2012-02-02 Pedro Alves <palves@redhat.com>
9711 Try SIGKILL first, then PTRACE_KILL.
9712 * linux-low.c (linux_kill_one_lwp): New.
9713 (linux_kill_one_lwp): Rename to ...
9714 (kill_one_lwp_callback): ... this. Use the new
9717 2012-02-02 Pedro Alves <palves@redhat.com>
9719 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9722 2012-01-27 Pedro Alves <palves@redhat.com>
9724 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9725 (elf_64_file_p): Make static.
9726 (linux_pid_exe_is_elf_64_file): New.
9727 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9728 Delete declarations.
9729 (linux_pid_exe_is_elf_64_file): Declare.
9730 * linux-x86-low.c (x86_arch_setup): Use
9731 linux_pid_exe_is_elf_64_file.
9733 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9735 * linux-low.c (linux_wait_for_event_1): Rename to ...
9736 (linux_wait_for_event): ... here and merge it with former
9737 linux_wait_for_event - new variable wait_ptid, use it.
9738 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9740 2012-01-23 Pedro Alves <palves@redhat.com>
9742 * server.c (main): Avoid yet another case of infinite loop while
9743 detaching/killing after a longjmp.
9745 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9748 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9750 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9752 * hostio.c (handle_readlink): New function.
9753 (handle_vFile): Call it to handle "vFile:readlink" packets.
9755 2012-01-20 Pedro Alves <palves@redhat.com>
9756 Ulrich Weigand <ulrich.weigand@linaro.org>
9758 * server.c (handle_v_requests): Only support vAttach and vRun to
9759 start multiple processes when in extended protocol mode.
9761 2012-01-17 Pedro Alves <palves@redhat.com>
9763 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9764 memalign plus mprotect to allocate the scratch buffer.
9766 2012-01-13 Pedro Alves <palves@redhat.com>
9768 * server.c (attach_inferior): Clear `cont_thread'.
9770 2012-01-13 Pedro Alves <palves@redhat.com>
9772 * server.c (main): Avoid infinite loop while detaching/killing
9775 2012-01-09 Doug Evans <dje@google.com>
9777 * server.c (start_inferior): Set last_ptid in --wrapper case.
9779 2012-01-06 Yao Qi <yao@codesourcery.com>
9781 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9783 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9785 2012-01-04 Yao Qi <yao@codesourcery.com>
9787 * tracepoint.c (cmd_qtdp): Print debug message
9788 for static tracepoint.
9790 2012-01-04 Yao Qi <yao@codesourcery.com>
9792 * tracepoint.c (trace_vdebug): Differentiate debug message
9793 between gdbserver and IPA.
9795 2012-01-03 Yao Qi <yao@codesourcery.com>
9797 * tracepoint.c (tracepoint_was_hit): Don't collect for
9800 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9802 * terminal.h: Reformat copyright header.
9804 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9806 * server.c (gdbserver_version): Update copyright year.
9807 * gdbreplay.c (gdbreplay_version): Likewise.
9809 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9811 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9814 2011-12-18 Hui Zhu <teawater@gmail.com>
9815 * linux-low.c (linux_create_inferior): Save return value to ret.
9817 2011-12-18 Hui Zhu <teawater@gmail.com>
9819 * linux-low.c (linux_create_inferior): Save return value to ret.
9821 2011-12-16 Doug Evans <dje@google.com>
9823 * linux-low.c (linux_create_inferior): If stdio connection,
9824 redirect stdin from /dev/null, stdout to stderr.
9825 * remote-utils.c (remote_is_stdio): New static global.
9826 (remote_connection_is_stdio): New function.
9827 (remote_prepare): Handle stdio connection.
9828 (remote_open): Ditto.
9829 (remote_close): Don't close stdin for stdio connections.
9830 (read_prim,write_prim): New functions. Replace all calls to
9831 read/write to these.
9832 * server.c (main): Watch for "-" argument. Move call to
9833 remote_prepare before start_inferior.
9834 * server.h (STDIO_CONNECTION_NAME): New macro.
9835 (remote_connection_is_stdio): Declare.
9837 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9838 in debugging output.
9840 2011-12-15 Yao Qi <yao@codesourcery.com>
9842 * tracepoint.c: Include sys/syscall.h.
9843 (gdb_ust_thread): Remove preprocessor conditional.
9845 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9847 * linux-low.c (linux_detach_one_lwp): Call
9848 the_low_target.prepare_to_resume before detaching.
9850 2011-12-14 Yao Qi <yao@codesourcery.com>
9852 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9855 2011-12-14 Yao Qi <yao@codesourcery.com>
9857 * i386-low.c (i386_low_stopped_data_address): Initialize local
9860 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9864 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9865 DR_CONTROL unless necessary. Extend comments.
9866 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9867 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9869 2011-12-13 Yao Qi <yao@codesourcery.com>
9871 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9873 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9875 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9877 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9878 Print new debug message for such case.
9880 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9882 Fix overlapping memcpy.
9883 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9884 the read_inferior_memory transfer.
9885 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9886 write_inferior_memory transfer.
9887 (set_fast_tracepoint_jump): New variable buf. Use it for the
9888 read_inferior_memory and write_inferior_memory transfers.
9889 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9890 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9891 Use it for the write_inferior_memory transfer.
9892 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9895 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9897 * linux-low.c (fetch_register, store_register): Make code
9898 consistent, fix formatting.
9900 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9902 * linux-low.c (usr_store_inferior_registers): Factor out code
9903 to handle individual registers into...
9904 (store_register): ... this new function.
9906 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9908 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9909 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9910 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9911 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9912 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9913 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9914 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9915 (srv_xmlfiles): Add new XML files.
9917 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9919 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9920 (init_registers_s390_linux32v1): Add prototype.
9921 (init_registers_s390_linux32v2): Likewise.
9922 (init_registers_s390_linux64v1): Likewise.
9923 (init_registers_s390_linux64v2): Likewise.
9924 (init_registers_s390x_linux64v1): Likewise.
9925 (init_registers_s390x_linux64v2): Likewise.
9926 (s390_num_regs): Increment to 52.
9927 (s390_regmap): Add orig_r2 register.
9928 (s390_num_regs_3264): Increment to 68.
9929 (s390_regmap_3264): Add orig_r2 register.
9930 (s390_collect_ptrace_register): Handle orig_r2 register.
9931 (s390_supply_ptrace_register): Likewise.
9932 (s390_fill_last_break): New function.
9933 (s390_store_last_break): Likewise.
9934 (s390_fill_system_call): New function.
9935 (s390_store_system_call): Likewise.
9936 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9938 (s390_check_regset): New function.
9939 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9940 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9941 Update target_regsets for available register sets.
9943 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9944 Jan Kratochvil <jan.kratochvil@redhat.com>
9946 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9947 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9949 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9950 * linux-low.h (struct process_info_private): New member r_debug.
9951 * server.c (handle_qxfer_libraries): Call
9952 the_target->qxfer_libraries_svr4.
9953 (handle_qxfer_libraries_svr4): New function.
9954 (qxfer_packets): New entry "libraries-svr4".
9955 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9956 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9957 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9958 PACKET_qXfer_libraries_svr4.
9960 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9962 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9963 PSW address/mask between 8-byte and 16-byte formats.
9964 (s390_supply_ptrace_register): Likewise.
9965 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9966 basic addressing mode bit.
9968 2011-11-24 Stan Shebs <stan@codesourcery.com>
9970 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9972 2011-11-17 Stan Shebs <stan@codesourcery.com>
9974 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9975 (tracing_start_time): New global.
9976 (tracing_stop_time): New global.
9977 (tracing_user_name): New global.
9978 (tracing_notes): New global.
9979 (tracing_stop_note): New global.
9980 (cmd_qtstart): Set traceframe_usage, start_time.
9981 (stop_tracing): Set stop_time.
9982 (cmd_qtstatus): Report additional status.
9983 (cmd_qtp): New function.
9984 (handle_tracepoint_query): Call it.
9985 (cmd_qtnotes): New function.
9986 (handle_tracepoint_general_set): Call it.
9987 (get_timestamp): Rename from tsv_get_timestamp.
9989 2011-11-14 Stan Shebs <stan@codesourcery.com>
9990 Kwok Cheung Yeung <kcy@codesourcery.com>
9992 * linux-x86-low.c (small_jump_insn): New.
9993 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9994 trampoline and error message, build a trampoline and issue a small
9995 jump instruction to it.
9996 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9997 trampoline and error message.
9998 (x86_get_min_fast_tracepoint_insn_len): New.
9999 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10000 * linux-low.h (struct linux_target_ops): Add arguments to
10001 install_fast_tracepoint_jump_pad operation, add new operation.
10002 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10004 (linux_get_min_fast_tracepoint_insn_len): New function.
10005 (linux_target_op): Add new operation.
10006 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10007 (gdb_trampoline_buffer_end): Ditto.
10008 (gdb_trampoline_buffer_error): Ditto.
10009 (struct ipa_sym_addresses): Add fields for new IPA variables.
10010 (symbol_list): Add entries for new IPA variables.
10011 (struct tracepoint): Add fields to hold the address range of the
10012 trampoline used by the tracepoint.
10013 (trampoline_buffer_head): New static variable.
10014 (trampoline_buffer_tail): Ditto.
10015 (claim_trampoline_space): New function.
10016 (have_fast_tracepoint_trampoline_buffer): New function.
10017 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10019 (install_fast_tracepoint): Ditto, also add error buffer argument.
10020 (cmd_qtminftpilen): New function.
10021 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10022 (fast_tracepoint_from_trampoline_address): New function.
10023 (fast_tracepoint_collecting): Handle trampoline as part of jump
10025 (set_trampoline_buffer_space): New function.
10026 (initialize_tracepoint): Initialize new IPA variables.
10027 * target.h (struct target_ops): Add arguments to
10028 install_fast_tracepoint_jump_pad operation, add new
10029 get_min_fast_tracepoint_insn_len operation.
10030 (target_get_min_fast_tracepoint_insn_len): New.
10031 (install_fast_tracepoint_jump_pad): Add arguments.
10032 * server.h (IPA_BUFSIZ): Define.
10033 * linux-i386-ipa.c: Include extra header files.
10034 (initialize_fast_tracepoint_trampoline_buffer): New function.
10035 (initialize_low_tracepoint): Call it.
10036 * server.h (set_trampoline_buffer_space): Declare.
10037 (claim_trampoline_space): Ditto.
10038 (have_fast_tracepoint_trampoline_buffer): Ditto.
10040 2011-11-14 Yao Qi <yao@codesourcery.com>
10042 * server.c (handle_query): Handle InstallInTrace for qSupported.
10043 * tracepoint.c (add_tracepoint): Sort list.
10044 (install_tracepoint, download_tracepoint): New.
10045 (cmd_qtdp): Call them to install and download tracepoints.
10046 (sort_tracepoints): Removed.
10047 (cmd_qtstart): Update.
10049 2011-11-14 Yao Qi <yao@codesourcery.com>
10051 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10052 * mem-break.h: Declare.
10053 * tracepoint.c (cmd_qtstart): Move some code to ...
10054 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10056 (download_tracepoints): Move some code to ...
10057 (download_tracepoint_1): ... here. New.
10059 2011-11-08 Yao Qi <yao@codesourcery.com>
10061 * remote-utils.c (relocate_instruction): A comment fix.
10063 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10065 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10066 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10067 dr_status_mirror and dr_control_mirror from debug_reg_state.
10068 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10069 (i386_initial_stuff): Remove use of deleted globals.
10070 (i386_get_thread_context, i386_set_thread_context,
10071 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10072 from debug_reg_state.
10074 2011-11-05 Yao Qi <yao@codesourcery.com>
10076 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10077 address as TPOINT's.
10079 2011-11-02 Stan Shebs <stan@codesourcery.com>
10081 * tracepoint.c (agent_mem_read_string): New function.
10082 (eval_agent_expr): Call it for tracenz.
10083 * server.c (handle_query): Report support for tracenz.
10085 2011-11-02 Yao Qi <yao@codesourcery.com>
10087 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10089 2011-11-02 Yao Qi <yao@codesourcery.com>
10091 * target.h: Fix a typo in comment.
10093 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10095 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10096 clobber the breakpoints' shadows with fast tracepoint jumps.
10097 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10098 * target.c (write_inferior_memory): Also pass MYADDR down to
10101 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10103 * configure.ac: Check support for personality routine.
10104 * configure: Regenerate.
10105 * config.in: Likewise.
10106 * linux-low.c: Include <sys/personality.h>.
10107 Define ADDR_NO_RANDOMIZE if necessary.
10108 (linux_create_inferior): Disable address space randomization when
10109 forking inferior, if requested.
10110 (linux_supports_disable_randomization): New function.
10111 (linux_target_ops): Install it.
10112 * server.h (disable_randomization): Declare.
10113 * server.c (disable_randomization): New global variable.
10114 (handle_general_set): Handle QDisableRandomization.
10115 (handle_query): Likewise for qSupported.
10116 (main): Support --disable-randomization and --no-disable-randomization
10117 command line arguments.
10118 * target.h (struct target_ops): Add supports_disable_randomization.
10119 (target_supports_disable_randomization): New macro.
10121 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10123 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10125 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10126 [!PT_GETDSBT] (target_loadmap): New definition.
10127 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10128 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10129 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10130 and PT_GETDSBT to LINUX_LOADMAP.
10131 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10132 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10134 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10136 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10137 (arm_linux_hwbp_cap): New static variable.
10138 (arm_linux_get_hwbp_cap): Replace by ...
10139 (arm_linux_init_hwbp_cap): ... this new function.
10140 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10141 (arm_linux_get_hw_watchpoint_count): Likewise.
10142 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10143 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10144 (arm_prepare_to_resume): Use perror_with_name instead of error.
10146 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10148 * linux-arm-low.c: Include <signal.h>.
10149 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10150 (struct arm_linux_hwbp_cap): New data type.
10151 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10152 (struct arm_linux_hw_breakpoint): New data type.
10153 (MAX_BPTS, MAX_WPTS): Define.
10154 (struct arch_process_info, struct arch_lwp_info): New data types.
10155 (arm_linux_get_hwbp_cap): New function.
10156 (arm_linux_get_hw_breakpoint_count): Likewise.
10157 (arm_linux_get_hw_watchpoint_count): Likewise.
10158 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10159 (arm_hwbp_control_initialize): Likewise.
10160 (arm_hwbp_control_is_enabled): Likewise.
10161 (arm_hwbp_control_is_initialized): Likewise.
10162 (arm_hwbp_control_disable): Likewise.
10163 (arm_linux_hw_breakpoint_equal): Likewise.
10164 (arm_linux_hw_point_initialize): Likewise.
10165 (struct update_registers_data): New data structure.
10166 (update_registers_callback: New function.
10167 (arm_insert_point): Likewise.
10168 (arm_remove_point): Likewise.
10169 (arm_stopped_by_watchpoint): Likewise.
10170 (arm_stopped_data_address): Likewise.
10171 (arm_new_process): Likewise.
10172 (arm_new_thread): Likewise.
10173 (arm_prepare_to_resume): Likewise.
10174 (the_low_target): Register arm_insert_point, arm_remove_point,
10175 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10176 arm_new_thread, and arm_prepare_to_resume.
10178 2011-09-15 Stan Shebs <stan@codesourcery.com>
10180 * server.h (struct emit_ops): Add compare-goto fields.
10181 * tracepoint.c (gdb_agent_op_sizes): New table.
10182 (emit_eq_goto): New function.
10183 (emit_ne_goto): New function.
10184 (emit_lt_goto): New function.
10185 (emit_le_goto): New function.
10186 (emit_gt_goto): New function.
10187 (emit_ge_goto): New function.
10188 (is_goto_target): New function.
10189 (compile_bytecodes): Recognize special cases of compare-goto
10190 combinations and call specialized emitters for them.
10191 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10192 (amd64_emit_ne_goto): New function.
10193 (amd64_emit_lt_goto): New function.
10194 (amd64_emit_le_goto): New function.
10195 (amd64_emit_gt_goto): New function.
10196 (amd64_emit_ge_goto): New function.
10197 (amd64_emit_ops): Add the new functions.
10198 (i386_emit_eq_goto): New function.
10199 (i386_emit_ne_goto): New function.
10200 (i386_emit_lt_goto): New function.
10201 (i386_emit_le_goto): New function.
10202 (i386_emit_gt_goto): New function.
10203 (i386_emit_ge_goto): New function.
10204 (i386_emit_ops): Add the new functions.
10206 2011-09-08 Stan Shebs <stan@codesourcery.com>
10208 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10209 (i386_emit_epilogue): Restore %ebx.
10211 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10213 * server.c (step_thread): Remove definition.
10214 (process_serial_event): Don't handle Hs.
10215 * server.h (step_thread): Remove declaration.
10216 * target.c (set_desired_inferior): Remove use of step_thread.
10218 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10220 * linux-low.c: Include linux-procfs.h.
10221 (linux_attach_lwp_1): Update comments.
10222 (linux_attach): Scan for existing threads when attaching to a
10223 process that is the tgid.
10224 * Makefile.in: Update dependencies.
10226 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10228 * configure.srv: Add linux-procfs.o dependencies.
10230 2011-08-14 Yao Qi <yao@codesourcery.com>
10232 * target.h (struct target_ops): Fix indent.
10233 * win32-low.c (win32_target_ops): Fix comment.
10235 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10236 Yao Qi <yao@codesourcery.com>
10238 * Makefile.in (clean): Remove tic6x-*.c files.
10239 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10240 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10241 (tic6x-c64xp-linux.c): Likewise.
10242 * configure.srv: Add support for tic6x-*-uclinux.
10243 * linux-tic6x-low.c: New.
10244 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10246 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10247 Yao Qi <yao@codesourcery.com>
10249 * target.h (struct target_ops): Add read_loadmap.
10250 * linux-low.c (struct target_loadseg): New type.
10251 (struct target_loadmap): New type.
10252 (linux_read_loadmap): New function.
10253 (linux_target_ops): Add linux_read_loadmap.
10254 * server.c (handle_query): Support qXfer:fdpic:read packet.
10255 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10258 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10260 * win32-low.c: Include <stdint.h>.
10262 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10264 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10265 to the inferior here.
10266 (i386_remove_aligned_watchpoint): Ditto.
10267 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10268 fit part of the watchpoint in the debug registers.
10269 (i386_update_inferior_debug_regs): New.
10270 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10271 registers, and only update the inferior on success.
10272 (i386_low_remove_watchpoint): Ditto.
10274 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10276 * linux-low.c (compare_ints, unique, list_threads, show_process,
10277 linux_core_of_thread): Delete.
10278 (linux_target_ops): Change linux_core_of_thread to
10279 linux_common_core_of_thread.
10280 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10281 * utils.c (malloc_failure): Change type of argument.
10282 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10283 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10284 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10285 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10286 (IPA_OBJS): Add common-utils-ipa.o.
10287 (ptid_h, linux_osdata_h): New macros.
10288 (server_h): Add common/common-utils.h, common/xml-utils.h,
10289 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10291 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10292 ptid.o, buffer.o): New rules.
10293 (linux-low.o): Add common/linux-osdata.h as a dependency.
10294 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10295 * configure.ac: Add AC_HEADER_DIRENT check.
10296 * config.in: Regenerate.
10297 * configure: Regenerate.
10298 * remote-utils.c (xml_escape_text): Delete.
10299 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10300 buffer_xml_printf): Move to common/buffer.c.
10301 * server.c (main): Remove call to initialize_inferiors.
10302 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10303 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10304 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10305 internal_error, gdb_assert, gdb_assert_fail): Delete.
10306 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10307 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10309 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10310 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10311 initialize_inferiors): Delete.
10313 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10315 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10318 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10320 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10322 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10324 2011-05-26 Yao Qi <yao@codesourcery.com>
10326 * Makefile.in (thread-db.o): Track dependence to
10327 common/gdb_thread_db.h.
10328 * thread-db.c: include gdb_thread_db.h from right place.
10330 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10332 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10333 __FILE__ and __LINE__ to internal_error.
10335 2011-05-13 Doug Evans <dje@google.com>
10337 * thread-db.c (try_thread_db_load_from_sdir): New function.
10338 (try_thread_db_load_from_dir): New function.
10339 (thread_db_load_search): Handle $sdir, ignore $pdir.
10340 Remove trying of system directories if search of
10341 libthread-db-search-path fails, that is now done via $sdir.
10343 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10345 * server.c (handle_query): Add EnableDisableTracepoints to the list
10346 of supported features.
10347 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10349 (cmd_qtenable_disable): New.
10350 (cmd_qtstart): Install tracepoints even if disabled.
10351 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10352 receiving a QTEnable or QTDisable packet.
10353 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10354 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10356 (gdb_probe): Skip data collection if static tracepoint is disabled.
10358 2011-05-10 Doug Evans <dje@google.com>
10360 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10362 2011-05-04 Doug Evans <dje@google.com>
10364 * linux-low.c (linux_join): Skip process lookup.
10365 * spu-low.c (spu_join): Ditto.
10366 * server.c (join_inferiors_callback): Delete.
10367 (process_serial_event): For 'D' packet (detach) call join_inferior
10370 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10372 * README: Don't mention xscale*-*-linux*.
10373 * configure.srv (xscale*-*-linux*): Don't handle target.
10375 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10377 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10379 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10380 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10381 (i386_emit_void_call_2): Likewise.
10383 2011-04-26 Yao Qi <yao@codesourcery.com>
10385 * linux-low.c: Move common macros to linux-ptrace.h.
10386 Include linux-ptrace.h.
10387 * Makefile.in (linux_ptrace_h): New.
10388 (linux-low.o): Depends on linux-ptrace.h.
10390 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10392 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10393 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10394 (remote_prepare): New function with most of the TCP code from ...
10395 (remote_open): ... here. Detect PORT here unconditionally. Move also
10396 setting transport_is_reliable.
10397 * server.c (run_once): New variable.
10398 (gdbserver_usage): Document it.
10399 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10400 the first run if RUN_ONCE.
10401 * server.h (run_once, remote_prepare): New declarations.
10403 2011-04-19 Tom Tromey <tromey@redhat.com>
10405 * win32-low.c (handle_load_dll): Remove duplicate "the".
10407 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10409 Remove support for old Cygwin 1.5 versions.
10410 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10411 function to avoid warning.
10412 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10415 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10417 * gdbserver/server.h (Macro _): Define it if not available.
10419 2011-03-14 Michael Snyder <msnyder@vmware.com>
10421 * hostio.c (handle_close): Remove unnecessary null test.
10423 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10425 * Makefile.in (maintainer-clean realclean distclean): Remove
10426 "make ... subdir_do" command.
10428 2011-03-10 Michael Snyder <msnyder@vmware.com>
10430 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10432 * server.c (handle_v_run): Free alloced buffer on early return.
10434 2011-03-09 Yao Qi <yao@codesourcery.com>
10437 2011-03-04 Yao Qi <yao@codesourcery.com>
10439 * Makefile.in: Remove GNU make feature --directory.
10441 2011-03-05 Yao Qi <yao@codesourcery.com>
10443 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10444 (subdir_do): New make target. Copied from gdb/Makefile.
10445 (maintainer-clean, realclean, distclean, clean): Call corresponding
10446 make targets in common/Makefile.
10448 2011-02-11 Yao Qi <yao@codesourcery.com>
10450 * configure.ac: Call AC_PROG_RANLIB.
10451 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10452 * configure: Regenerate.
10454 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10456 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10458 2011-03-06 Yao Qi <yao@codesourcery.com>
10460 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10462 2011-03-05 Yao Qi <yao@codesourcery.com>
10464 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10465 (subdir_do): New make target. Copied from gdb/Makefile.
10466 (maintainer-clean, realclean, distclean, clean): Call corresponding
10467 make targets in common/Makefile.
10469 2011-03-04 Yao Qi <yao@codesourcery.com>
10471 * Makefile.in: Remove GNU make feature --directory.
10473 2011-03-04 Michael Snyder <msnyder@vmware.com>
10475 * server.c (queue_stop_reply): Call xmalloc not malloc.
10477 2011-03-02 Michael Snyder <msnyder@vmware.com>
10479 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10481 2011-02-28 Michael Snyder <msnyder@vmware.com>
10483 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10484 (cmd_qtframe): Ditto.
10485 (cmd_qtbuffer): Ditto.
10486 (cmd_bigqtbuffer): Ditto.
10488 * utils.c (decimal2str): Initialize 'width' to nine, then
10489 don't mess with it.
10491 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10493 * hostio.c (require_data): Free *data, not data.
10495 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10497 * hostio.c (require_data): Use free, not xfree.
10499 2011-02-27 Michael Snyder <msnyder@vmware.com>
10501 * server.c (handle_query): Discard unused value.
10503 * hostio.c (require_data): Free malloc memory before returning
10506 2011-02-26 Michael Snyder <msnyder@vmware.com>
10508 * linux-low.c (list_threads): Call closedir for dirent.
10510 2011-02-27 Michael Snyder <msnyder@vmware.com>
10512 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10513 a case statement falls through.
10515 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10517 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10520 2011-02-26 Michael Snyder <msnyder@vmware.com>
10522 * utils.c (decimal2str): Eliminate dead code and dead param.
10523 (pulongest): Drop dead param from call to decimal2str.
10526 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10528 Revert the following patch (not approved yet):
10529 2011-02-21 Hui Zhu <teawater@gmail.com>
10530 * tracepoint.c (tp_printf): New function.
10531 (eval_agent_expr): Handle gdb_agent_op_printf.
10533 2011-02-21 Hui Zhu <teawater@gmail.com>
10535 * tracepoint.c (tp_printf): New function.
10536 (eval_agent_expr): Handle gdb_agent_op_printf.
10538 2011-02-18 Tom Tromey <tromey@redhat.com>
10540 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10541 (tracepoint.o): Likewise.
10542 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10543 (gdb_agent_op_names): Likewise.
10545 2011-02-18 Tom Tromey <tromey@redhat.com>
10547 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10548 gdb_agent_op_rot>: New constants.
10549 (gdb_agent_op_names): Add pick and roll.
10550 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10553 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10555 * aclocal.m4: Regenerated with aclocal-1.11.1.
10557 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10559 * server.c (handle_qxfer_traceframe_info): New.
10560 (qxfer_packets): Register "traceframe-info".
10561 (handle_query): Report support for qXfer:traceframe-info:read+.
10562 * tracepoint.c (match_blocktype): New.
10563 (traceframe_find_block_type): Rename to ...
10564 (traceframe_walk_blocks): ... this. Add callback filter argument,
10566 (traceframe_find_block_type): New, reimplemented on top of
10567 traceframe_walk_blocks.
10568 (build_traceframe_info_xml): New.
10569 (traceframe_read_info): New.
10570 * server.h (traceframe_read_info): Declare.
10572 2011-02-11 Yao Qi <yao@codesourcery.com>
10574 * configure.ac: Call AC_PROG_RANLIB.
10575 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10576 * configure: Regenerate.
10578 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10580 * server.c (gdb_read_memory): Change return semantics to allow
10582 (handle_search_memory_1): Adjust.
10583 (process_serial_event) <'m' packet>: Handle partial transfers.
10584 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10586 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10588 * regcache.c (init_register_cache): Initialize
10589 regcache->register_status.
10590 (free_register_cache): Release regcache->register_status.
10591 (regcache_cpy): Copy register_status.
10592 (registers_to_string): Print 'x's for unavailable registers.
10593 (supply_register): Mark the register's status valid or
10594 unavailable, depending on whether a buffer was passed in or not.
10595 (supply_register_zeroed): New.
10596 (supply_regblock): Mark the registers' status valid or
10597 unavailable, depending on whether a buffer was passed in or not.
10598 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10599 (struct regcache): New `register_status' field.
10600 (supply_register_zeroed): Declare.
10601 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10602 supply_register_zeroed, rather than passing a NULL buffer to
10604 * tracepoint.c (fetch_traceframe_registers): Update comment.
10606 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10608 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10611 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10613 * server.h (decode_xfer_write): Change prototype.
10614 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10615 and don't extract the annex here.
10616 * server.c (decode_xfer_read): Remove `annex' parameter,
10617 and don't extract the annex here.
10618 (decode_xfer): New.
10619 (struct qxfer): New.
10620 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10621 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10622 (handle_qxfer_statictrace): New functions, abstracted out from
10623 handle_query, and made to use the struct qxfer interface.
10624 (handle_threads_qxfer_proper): Rename to ...
10625 (handle_qxfer_threads_proper): ... this.
10626 (handle_threads_qxfer): Rename to ...
10627 (handle_qxfer_threads): ... this. Adjust.
10628 (qxfer_packets): New array.
10629 (handle_qxfer): New function.
10630 (handle_query): Use handle_qxfer.
10632 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10634 * gdbreplay.c: Shorten lines of >= 80 columns.
10635 * linux-low.c: Ditto.
10636 * linux-ppc-low.c: Ditto.
10637 * linux-s390-low.c: Ditto.
10638 * linux-sparc-low.c: Ditto.
10639 * linux-x86-low.c: Ditto.
10640 * linux-xtensa-low.c: Ditto.
10641 * mem-break.c: Ditto.
10642 * nto-low.c: Ditto.
10643 * regcache.h: Ditto.
10644 * remote-utils.c: Ditto.
10647 * thread-db.c: Ditto.
10648 * tracepoint.c: Ditto.
10650 * win32-low.h: Ditto.
10652 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10654 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10657 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10659 * server.c (gdbserver_version): Update copyright year in version
10661 * gdbreplay.c (gdbreplay_version): Ditto.
10663 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10665 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10666 * linux-bfin-low.c: New file.
10667 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10668 PT_DATA_ADDR for BFIN targets.
10669 * Makefile.in (SFILES): Add linux-bfin-low.c.
10670 (clean): Remove reg-bfin.c.
10671 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10672 * README: Mention supported Blackfin targets.
10674 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10676 * .gitignore: New file.
10678 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10680 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10682 2010-10-22 Jie Zhang <jie@codesourcery.com>
10684 * Makefile.in: Add FLAGS_TO_PASS variable.
10685 (install): Remove dependency of install-only and recursively
10686 invoke make for install-only.
10688 2010-10-04 Doug Evans <dje@google.com>
10690 * Makefile.in (uninstall): Use $(DESTDIR).
10692 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10696 * linux-x86-low.c (compat_siginfo_from_siginfo)
10697 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10698 si_code is < 0. Check for si_code == SI_TIMER before checking for
10701 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10703 * lynx-i386-low.c: New file.
10704 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10706 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10708 * lynx-low.c (ptrace_request_to_str): Remove handling for
10709 request values that have been removed in LynxOS 5.x.
10711 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10713 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10716 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10718 * configure.ac: Add --enable-inprocess-agent option.
10719 * configure: Rebuilt.
10721 2010-09-06 Yao Qi <yao@codesourcery.com>
10723 * linux-low.c (linux_kill): Remove unused variable.
10724 (linux_stabilize_threads): Likewise.
10725 * server.c (start_inferior): Likewise.
10726 (queue_stop_reply_callback): Likewise.
10727 * tracepoint.c (do_action_at_tracepoint): Likewise.
10729 2010-09-06 Yao Qi <yao@codesourcery.com>
10731 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10734 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10736 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10738 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10740 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10743 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10745 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10746 gdbserver/lynx-ppc-low.c: New files.
10747 * Makefile.in (lynx_low_h): New variable.
10748 (lynx-low.o, lynx-ppc-low.o): New rules.
10749 * configure.ac: On LynxOS, link with -lnetinet.
10750 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10751 * configure: regenerate.
10753 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10755 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10756 * configure.ac: Add check for vasprintf and vsnprintf.
10757 * configure, config.in: Regenerate.
10758 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10760 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10762 * gdbreplay.c: Move include of alloca.h up, next to include of
10764 * server.h: Add include of malloc.h.
10765 * mem-break.c: Remove include of malloc.h.
10766 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10768 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10770 * Makefile.in (memmem.o): Build with -Wno-error.
10772 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10774 * utils.c (xsnprintf): Make non-static.
10775 * server.h: Add xsnprintf declaration.
10776 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10777 replace calls to snprintf by calls to xsnprintf throughout.
10779 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10781 * configure.ac: Add configure check for alloca.
10782 * configure, config.in: Regenerate.
10783 * server.h: Include alloca.h if it exists.
10784 * gdbreplay.c: Include alloca.h if it exists.
10786 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10788 * linux-low.c (__SIGRTMIN): Define if not already defined.
10789 (linux_create_inferior): Check for __ANDROID__ rather than
10791 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10792 are already deferred.
10793 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10794 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10795 stopped and already has a pending signal to report.
10796 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10797 a pending signal to report or is moving out of a jump pad.
10798 (linux_init_signals): Check for __ANDROID__ rather than
10801 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10803 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10804 debug_threads check. Avoid a linear search when not doing debug
10807 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10809 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10810 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10811 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10812 (process_event): Change local fd's type to gdb_fildes_t.
10813 (create_file_handler): Adjust prototype.
10814 (delete_file_handler): Adjust prototype.
10815 (handle_file_event): Adjust prototype. Use pfildes.
10816 (create_file_event): Adjsut prototype.
10817 * remote-utils.c (remote_desc, listen_desc): Change type to
10819 * server.h: New gdb_fildes_t typedef.
10820 [USE_WIN32API]: Include winsock2.h.
10821 (delete_file_handler, add_file_handler): Adjust prototypes.
10822 (pfildes): Declare.
10823 * utils.c (pfildes): New.
10825 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10827 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10828 * configure: Regenerate.
10830 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10832 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10833 (linux_done_accessing_memory): ... this.
10834 (linux_target_ops): Adjust.
10835 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10836 * nto-low.c (nto_target_ops): Adjust comment.
10837 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10838 * spu-low.c (spu_target_ops): Adjust comment.
10839 * target.h (target_ops): Rename unprepare_to_access_memory field
10840 to done_accessing_memory.
10841 (unprepare_to_access_memory): Rename to ...
10842 (done_accessing_memory): ... this.
10844 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10846 * linux-low.c (linux_prepare_to_access_memory): New.
10847 (linux_unprepare_to_access_memory): New.
10848 (linux_target_ops): Install them.
10849 * server.c (read_memory): Rename to ...
10850 (gdb_read_memory): ... this. Use
10851 prepare_to_access_memory/prepare_to_access_memory.
10852 (write_memory): Rename to ...
10853 (gdb_write_memory): ... this. Use
10854 prepare_to_access_memory/prepare_to_access_memory.
10855 (handle_search_memory_1): Adjust.
10856 (process_serial_event): Adjust.
10857 * target.h (struct target_ops): New fields
10858 prepare_to_access_memory and unprepare_to_access_memory.
10859 (prepare_to_access_memory, unprepare_to_access_memory): New.
10860 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10861 prepare_to_access_memory/prepare_to_access_memory.
10862 * nto-low.c (nto_target_ops): Adjust.
10863 * spu-low.c (spu_target_ops): Adjust.
10864 * win32-low.c (win32_target_ops): Adjust.
10866 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10868 * Makefile.in (WARN_CFLAGS): Get it from configure.
10869 (WERROR_CFLAGS): New.
10870 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10871 * configure.ac: Introduce --enable-werror, which adds -Werror to
10872 the compiler command line. Enabled by default. Disable with
10873 --disable-werror. Add -Wdeclaration-after-statement
10874 Wpointer-arith and -Wformat-nonliteral to warning flags.
10875 * configure: Regenerate.
10877 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10879 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10881 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10883 * gdbreplay.c (remote_error): New.
10885 (expect): Use gdbchar. Check for error reading from GDB.
10886 Clarify sync error output.
10887 (play): Check for errors writing to GDB.
10888 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10889 * remote-utils.c (getpkt): Check for errors writing to the remote
10892 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10894 * linux-low.c (linux_wait_1): Move non-debugging code out of
10895 `debug_threads' control.
10897 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10899 * linux-low.c (linux_wait_1): Don't set last_status here.
10900 * server.c (push_event, queue_stop_reply_callback): Assert we're
10901 not pushing a TARGET_WAITKIND_IGNORE event.
10902 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10903 (myresume, handle_target_event): Set the thread's last_resume_kind
10904 and last_status from the target returned status.
10906 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10910 * linux-x86-low.c (update_debug_registers_callback): New.
10911 (i386_dr_low_set_addr): Use it.
10912 (i386_dr_low_get_addr): New.
10913 (i386_dr_low_set_control): Use update_debug_registers_callback.
10914 (i386_dr_low_get_control): New.
10915 (i386_dr_low_get_status): Adjust.
10916 * linux-low.c (linux_stop_lwp): New.
10917 * linux-low.h (linux_stop_lwp): Declare.
10919 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10920 argument instead of a i386_debug_reg_state.
10921 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10922 a i386_debug_reg_state.
10923 (i386_insert_aligned_watchpoint): Adjust.
10924 (i386_remove_aligned_watchpoint): Adjust.
10925 (i386_low_stopped_data_address): Read the debug registers from the
10926 inferior instead of from the mirrors.
10927 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10928 (i386_dr_low_get_addr): Declare.
10929 (i386_dr_low_get_control): Declare.
10930 (i386_dr_low_get_status): Change prototype.
10932 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10933 (i386_dr_low_get_addr): New.
10934 (i386_dr_low_get_control): New.
10935 (i386_dr_low_get_status): Adjust prototype. Return
10937 (i386_initial_stuff): Clear dr_status_mirror and
10939 (i386_get_thread_context): Adjust.
10940 (i386_set_thread_context): Adjust.
10941 (i386_thread_added): Adjust.
10943 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10945 * linux-low.h (linux_thread_area): Delete declaration.
10947 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10949 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10950 after its termination.
10952 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10954 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10955 (gdb_wants_all_stopped): Delete.
10956 (linux_wait_1): Don't call them.
10957 * server.c (handle_v_cont): Tag all threads as want-stopped.
10958 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10959 stopped as "client-wants-stopped".
10961 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10963 * Makefile.in (signals_h): New.
10964 (server_h): Depend on it.
10965 (server.o): Don't depend on $(signals_def).
10966 (signals.o): Depend on $(signals_def).
10968 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10970 * Makefile.in (signals_def): New.
10971 (server_h): Append include/gdb/signals.h and signals_def.
10972 (server.o): Append signals_def.
10974 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10976 * server.c (handle_target_event): Use target_signal_to_host for
10977 resume_info.sig initialization.
10978 * target.h (struct thread_resume) <sig>: New comment.
10980 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10982 * server.c (handle_query): strcpy() the returned string from paddress()
10983 instead of sprintf().
10984 * utils.c (paddress): Return phex_nz().
10986 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10988 * server.c (handle_v_cont): Call mourn_inferior if process
10990 (myresume): Likewise.
10992 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10994 Static tracepoints, and integration with UST.
10996 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10997 * mem-break.c (uninsert_all_breakpoints)
10998 (reinsert_all_breakpoints): New.
10999 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11000 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11001 (gdb_agent_ust_loaded, helper_thread_id)
11002 (gdb_agent_helper_thread_id): New macros.
11003 (struct ipa_sym_addresses): Add addr_ust_loaded,
11004 addr_helper_thread_id, addr_cmd_buf.
11005 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11006 (in_process_agent_loaded_ust): New.
11007 (write_e_ust_not_loaded): New.
11008 (maybe_write_ipa_ust_not_loaded): New.
11009 (struct collect_static_trace_data_action): New.
11010 (enum tracepoint_type) <static_tracepoint>: New.
11011 (struct tracepoint) <handle>: Mention static tracepoints.
11012 (struct static_tracepoint_ctx): New.
11013 (CMD_BUF_SIZE): New.
11014 (add_tracepoint_action): Handle static tracepoint actions.
11015 (unprobe_marker_at): New.
11016 (clear_installed_tracepoints): Handle static tracepoints.
11017 (cmd_qtdp): Handle static tracepoints.
11018 (probe_marker_at): New.
11019 (cmd_qtstart): Handle static tracepoints.
11020 (response_tracepoint): Handle static tracepoints.
11021 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11022 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11023 (get_context_regcache): Handle static tracepoints.
11024 (do_action_at_tracepoint): Handle static tracepoint actions.
11025 (traceframe_find_block_type): Handle static trace data blocks.
11026 (traceframe_read_sdata): New.
11027 (download_tracepoints): Download static tracepoint actions.
11028 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11029 (GDB_PROBE_NAME): New.
11031 (GET_UST_SYM): New.
11034 (ust_marker_to_static_tracepoint): New.
11036 (collect_ust_data_at_tracepoint): New.
11037 (gdb_ust_probe): New.
11038 (UNIX_PATH_MAX, SOCK_DIR): New.
11039 (gdb_ust_connect_sync_socket): New.
11040 (resume_thread, stop_thread): New.
11041 (run_inferior_command): New.
11042 (init_named_socket): New.
11043 (gdb_ust_socket_init): New.
11044 (cstr_to_hexstr): New.
11046 (first_marker, next_marker): New.
11047 (response_ust_marker): New.
11048 (cmd_qtfstm, cmd_qtsstm): New.
11049 (unprobe_marker_at, probe_marker_at): New.
11050 (cmd_qtstmat, gdb_ust_thread): New.
11051 (gdb_ust_init): New.
11052 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11053 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11054 (ST_REGENTRY): New.
11055 (x86_64_st_collect_regmap): New.
11056 (X86_64_NUM_ST_COLLECT_GREGS): New.
11057 (AMD64_RIP_REGNUM): New.
11058 (supply_static_tracepoint_registers): New.
11059 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11060 (ST_REGENTRY): New.
11061 (i386_st_collect_regmap): New.
11062 (i386_NUM_ST_COLLECT_GREGS): New.
11063 (supply_static_tracepoint_registers): New.
11064 * server.c (handle_query): Handle qXfer:statictrace:read.
11065 <qSupported>: Report support for StaticTracepoints, and
11066 qXfer:statictrace:read features.
11067 * server.h (traceframe_read_sdata)
11068 (supply_static_tracepoint_registers): Declare.
11069 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11070 (unpack_varlen_hex): Include in IPA build.
11071 * Makefile.in (ustlibs, ustinc): New.
11072 (IPA_OBJS): Add remote-utils-ipa.o.
11073 ($(IPA_LIB)): Link -ldl and -lpthread.
11075 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11076 * config.in, configure: Regenerate.
11078 2010-06-20 Ian Lance Taylor <iant@google.com>
11079 Pedro Alves <pedro@codesourcery.com>
11081 * linux-x86-low.c (always_true): Delete.
11082 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11083 trying to fool the compiler with always_true.
11085 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11087 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11088 conditions in gdbserver.
11090 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11092 * spu-low.c (spu_read_memory): Wrap around local store limit.
11093 (spu_write_memory): Likewise.
11095 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11097 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11098 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11100 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11102 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11103 uses with LONGEST uses.
11105 2010-06-14 Stan Shebs <stan@codesourcery.com>
11106 Pedro Alves <pedro@codesourcery.com>
11110 * linux-x86-low.c: Include limits.h.
11112 (always_true): New.
11115 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11116 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11117 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11118 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11119 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11120 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11121 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11122 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11123 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11124 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11125 (amd64_emit_void_call_2): New.
11126 (amd64_emit_ops): New.
11127 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11128 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11129 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11130 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11131 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11132 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11133 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11134 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11135 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11136 (i386_emit_stack_adjust, i386_emit_int_call_1)
11137 (i386_emit_void_call_2): New.
11138 (i386_emit_ops): New.
11139 (x86_emit_ops): New.
11140 (the_low_target): Install x86_emit_ops.
11141 * server.h (struct emit_ops): New.
11142 (get_raw_reg_func_addr): Declare.
11143 (current_insn_ptr, emit_error): Declare.
11144 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11145 (set_trace_state_variable_value): New defines.
11146 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11147 addr_get_trace_state_variable_value and
11148 addr_set_trace_state_variable_value.
11149 (symbol_list): New fields for get_raw_reg,
11150 get_trace_state_variable_value and set_trace_state_variable_value.
11151 (condfn): New typedef.
11152 (struct tracepoint): New field `compiled_cond'.
11153 (do_action_at_tracepoint): Clear compiled_cond.
11154 (get_trace_state_variable_value, set_trace_state_variable_value):
11156 (condition_true_at_tracepoint): If there's a compiled condition,
11158 (current_insn_ptr, emit_error): New globals.
11159 (struct bytecode_address): New.
11160 (get_raw_reg_func_addr): New.
11161 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11162 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11163 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11164 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11165 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11166 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11167 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11168 (compile_tracepoint_condition, compile_bytecodes): New.
11169 * target.h (emit_ops): Forward declare.
11170 (struct target_ops): New field emit_ops.
11171 (target_emit_ops): New.
11172 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11173 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11174 * linux-low.c (linux_emit_ops): New.
11175 (linux_target_ops): Install it.
11176 * linux-low.h (struct linux_target_ops): New field emit_ops.
11178 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11180 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11181 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11183 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11184 Stan Shebs <stan@codesourcery.com>
11186 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11187 (all): Depend on $(extra_libraries).
11188 (install-only): Install the IPA.
11189 (IPA_OBJS, IPA_LIB): New.
11190 (clean): Remove the IPA lib.
11191 (IPAGENT_CFLAGS): New.
11192 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11193 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11194 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11195 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11196 * configure.ac: Check for atomic builtins support in the compiler.
11197 (IPA_DEPFILES, extra_libraries): Define.
11198 * configure.srv (ipa_obj): Add description.
11199 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11200 (i[34567]86-*-linux*): Set ipa_obj.
11201 (x86_64-*-linux*): Set ipa_obj.
11202 * linux-low.c (stabilizing_threads): New.
11203 (supports_fast_tracepoints): New.
11204 (linux_detach): Stabilize threads before detaching.
11205 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11206 the lwp is either not stabilizing, or is moving out of a jump pad.
11207 (linux_fast_tracepoint_collecting): New.
11208 (maybe_move_out_of_jump_pad): New.
11209 (enqueue_one_deferred_signal): New.
11210 (dequeue_one_deferred_signal): New.
11211 (linux_wait_for_event_1): If moving out of a jump pad, defer
11212 pending signals to later.
11213 (linux_stabilize_threads): New.
11214 (linux_wait_1): Check if threads need moving out of jump pads, and
11216 (stuck_in_jump_pad_callback): New.
11217 (move_out_of_jump_pad_callback): New.
11218 (lwp_running): New.
11219 (linux_resume_one_lwp): Handle moving out of jump pads.
11220 (linux_set_resume_request): Dequeue deferred signals.
11221 (need_step_over_p): Also step over fast tracepoint jumps.
11222 (start_step_over): Also uninsert fast tracepoint jumps.
11223 (finish_step_over): Also reinsert fast tracepoint jumps.
11224 (linux_install_fast_tracepoint_jump): New.
11225 (linux_target_ops): Install linux_stabilize_threads and
11226 linux_install_fast_tracepoint_jump_pad.
11227 * linux-low.h (linux_target_ops) <get_thread_area,
11228 install_fast_tracepoint_jump_pad>: New fields.
11229 (struct lwp_info) <collecting_fast_tracepoint,
11230 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11231 (linux_get_thread_area): Declare.
11232 * linux-x86-low.c (jump_insn): New.
11233 (x86_get_thread_area): New.
11234 (append_insns): New.
11235 (push_opcode): New.
11236 (amd64_install_fast_tracepoint_jump_pad): New.
11237 (i386_install_fast_tracepoint_jump_pad): New.
11238 (x86_install_fast_tracepoint_jump_pad): New.
11239 (the_low_target): Install x86_get_thread_area and
11240 x86_install_fast_tracepoint_jump_pad.
11241 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11242 (struct fast_tracepoint_jump): New.
11243 (fast_tracepoint_jump_insn): New.
11244 (fast_tracepoint_jump_shadow): New.
11245 (find_fast_tracepoint_jump_at): New.
11246 (fast_tracepoint_jump_here): New.
11247 (delete_fast_tracepoint_jump): New.
11248 (set_fast_tracepoint_jump): New.
11249 (uninsert_fast_tracepoint_jumps_at): New.
11250 (reinsert_fast_tracepoint_jumps_at): New.
11251 (set_breakpoint_at): Use write_inferior_memory.
11252 (uninsert_raw_breakpoint): Use write_inferior_memory.
11253 (check_mem_read): Mask out fast tracepoint jumps.
11254 (check_mem_write): Mask out fast tracepoint jumps.
11255 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11256 (set_fast_tracepoint_jump): Declare.
11257 (delete_fast_tracepoint_jump)
11258 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11259 (reinsert_fast_tracepoint_jumps_at): Declare.
11260 * regcache.c: Don't compile many functions when building the
11261 in-process agent library.
11262 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11263 the register buffer in the heap.
11264 (free_register_cache): If the register buffer isn't owned by the
11265 regcache, don't free it.
11266 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11267 pre-existing register caches.
11268 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11270 (convert_ascii_to_int): : Constify `from' parameter type.
11271 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11272 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11273 the needed buffer in-place.
11274 (relocate_instruction): New.
11275 * server.c (handle_query) <qSymbols>: If the target supports
11276 tracepoints, give it a chance of looking up symbols. Report
11277 support for fast tracepoints.
11278 (handle_status): Stabilize threads.
11279 (process_serial_event): Adjust.
11280 * server.h (struct fast_tracepoint_jump): Forward declare.
11281 (struct process_info) <fast_tracepoint_jumps>: New field.
11282 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11283 (decode_X_packet, decode_M_packet): Adjust.
11284 (relocate_instruction): Declare.
11285 (in_process_agent_loaded): Declare.
11286 (tracepoint_look_up_symbols): Declare.
11287 (struct fast_tpoint_collect_status): Declare.
11288 (fast_tracepoint_collecting): Declare.
11289 (force_unlock_trace_buffer): Declare.
11290 (handle_tracepoint_bkpts): Declare.
11291 (initialize_low_tracepoint)
11292 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11293 * target.h (struct target_ops) <stabilize_threads,
11294 install_fast_tracepoint_jump_pad>: New fields.
11295 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11296 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11297 [HAVE_STDINT_H]: Include stdint.h.
11298 (trace_debug_1): Rename to ...
11299 (trace_vdebug): ... this.
11300 (trace_debug): Rename to ...
11301 (trace_debug_1): ... this. Add `level' parameter.
11302 (trace_debug): New.
11303 (ATTR_USED, ATTR_NOINLINE): New.
11304 (IP_AGENT_EXPORT): New.
11305 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11306 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11307 (about_to_request_buffer_space, trace_buffer_is_full)
11308 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11309 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11310 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11311 (traceframe_write_count, traceframes_created)
11312 (trace_state_variables)
11313 New renaming defines.
11314 (struct ipa_sym_addresses): New.
11315 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11316 (symbol_list): New.
11317 (ipa_sym_addrs): New.
11318 (all_tracepoint_symbols_looked_up): New.
11319 (in_process_agent_loaded): New.
11320 (write_e_ipa_not_loaded): New.
11321 (maybe_write_ipa_not_loaded): New.
11322 (tracepoint_look_up_symbols): New.
11323 (debug_threads) [IN_PROCESS_AGENT]: New.
11324 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11325 (UNKNOWN_SIDE_EFFECTS): New.
11326 (stop_tracing): New.
11327 (flush_trace_buffer): New.
11328 (stop_tracing_bkpt): New.
11329 (flush_trace_buffer_bkpt): New.
11330 (read_inferior_integer): New.
11331 (read_inferior_uinteger): New.
11332 (read_inferior_data_pointer): New.
11333 (write_inferior_data_pointer): New.
11334 (write_inferior_integer): New.
11335 (write_inferior_uinteger): New.
11336 (struct collect_static_trace_data_action): Delete.
11337 (enum tracepoint_type): New.
11338 (struct tracepoint) <type>: New field `type'.
11339 <actions_str, step_actions, step_actions_str>: Only include in
11341 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11342 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11343 (tracepoints): Use IP_AGENT_EXPORT.
11344 (last_tracepoint): Don't include in the IPA.
11345 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11346 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11347 (alloced_trace_state_variables): New.
11348 (trace_state_variables): Use IP_AGENT_EXPORT.
11349 (traceframe_t): Delete unused variable.
11350 (circular_trace_buffer): Don't include in the IPA.
11351 (trace_buffer_start): Delete.
11352 (struct trace_buffer_control): New.
11353 (trace_buffer_free): Delete.
11354 (struct ipa_trace_buffer_control): New.
11355 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11356 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11358 (trace_buffer_ctrl): New.
11359 (TRACE_BUFFER_CTRL_CURR): New.
11360 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11361 Reimplement as macros.
11362 (trace_buffer_wrap): Delete.
11363 (traceframe_write_count, traceframe_read_count)
11364 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11365 (struct tracepoint_hit_ctx) <type>: New field.
11366 (struct fast_tracepoint_ctx): New.
11367 (memory_barrier): New.
11369 (record_tracepoint_error): Update atomically in the IPA.
11370 (clear_inferior_trace_buffer): New.
11371 (about_to_request_buffer_space): New.
11372 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11373 updating the same buffer.
11374 (add_tracepoint): Default the tracepoint's type to trap
11375 tracepoint, and orig_size to -1.
11376 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11377 internal variables.
11378 (create_trace_state_variable): New parameter `gdb'. Handle it.
11379 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11380 (cmd_qtdp): Handle fast tracepoints.
11381 (cmd_qtdv): Adjust.
11382 (max_jump_pad_size): New.
11383 (gdb_jump_pad_head): New.
11384 (get_jump_space_head): New.
11385 (claim_jump_space): New.
11386 (sort_tracepoints): New.
11387 (MAX_JUMP_SIZE): New.
11388 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11390 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11391 support. Upload fast traceframes, and delete internal IPA
11393 (stop_tracing_handler): New.
11394 (flush_trace_buffer_handler): New.
11395 (cmd_qtstop): Upload fast tracepoints.
11396 (response_tracepoint): Handle fast tracepoints.
11397 (tracepoint_finished_step): Upload fast traceframes. Set the
11398 tracepoint hit context's tracepoint type.
11399 (handle_tracepoint_bkpts): New.
11400 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11401 type. Add comment about fast tracepoints.
11402 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11403 non-existing action_str field.
11404 (get_context_regcache): Handle fast tracepoints.
11405 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11407 (fast_tracepoint_from_jump_pad_address): New.
11408 (fast_tracepoint_from_ipa_tpoint_address): New.
11409 (collecting_t): New.
11410 (force_unlock_trace_buffer): New.
11411 (fast_tracepoint_collecting): New.
11413 (gdb_collect): New.
11414 (write_inferior_data_ptr): New.
11415 (target_tp_heap): New.
11416 (target_malloc): New.
11417 (download_agent_expr): New.
11419 (download_tracepoints): New.
11420 (download_trace_state_variables): New.
11421 (upload_fast_traceframes): New.
11422 (IPA_FIRST_TRACEFRAME): New.
11423 (IPA_NEXT_TRACEFRAME_1): New.
11424 (IPA_NEXT_TRACEFRAME): New.
11425 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11426 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11427 (gdb_jump_pad_buffer_end): New.
11428 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11429 (initialize_tracepoint): Adjust.
11430 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11431 buffer. Initialize the low module.
11432 * utils.c (PREFIX, TOOLNAME): New.
11433 (malloc_failure): Use PREFIX.
11434 (error): In the IPA, an error causes an exit.
11435 (fatal, warning): Use PREFIX.
11436 (internal_error): Use TOOLNAME.
11437 (NUMCELLS): Increase to 10.
11438 * configure, config.in: Regenerate.
11440 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11442 * server.c (handle_query) <qSupported>: Do two passes over the
11443 qSupported string to avoid nesting strtok.
11445 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11447 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11449 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11450 -Wl,--dynamic-list.
11451 * configure: Regenerate.
11452 * proc-service.list: New.
11454 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11456 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11459 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11461 * gdbreplay.c (remote_open): Check error return from socket() call by
11462 its equality to -1 not by it being negative.
11463 * remote-utils.c (remote_open): Likewise.
11465 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11467 * config.h: Regenerate.
11469 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11471 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11472 doesn't provide PTRACE_GET_THREAD_AREA.
11474 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11476 * linux-m68k-low.c: Include <asm/ptrace.h>
11477 (ps_get_thread_area): Implement.
11479 2010-05-03 Doug Evans <dje@google.com>
11481 * event-loop.c (struct callback_event): New struct.
11482 (callback_list): New global.
11483 (append_callback_event, delete_callback_event): New functions.
11484 (process_callback): New function.
11485 (start_event_loop): Call it.
11486 * remote-utils.c (NOT_SCHEDULED): Define.
11487 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11488 moved out of readchar.
11489 (readchar): Rewrite. Call reschedule before returning.
11490 (reset_readchar): New function.
11491 (remote_close): Call it.
11492 (process_remaining, reschedule): New functions.
11493 * server.h (callback_handler_func): New typedef.
11494 (append_callback_event, delete_callback_event): Declare.
11496 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11498 * proc-service.c (ps_pglobal_lookup): Use
11499 thread_db_look_up_one_symbol.
11500 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11501 parameter. Use it instead of all_symbols_looked_up.
11502 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11504 (all_symbols_looked_up): Don't declare.
11505 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11506 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11508 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11509 Set all_symbols_looked_up here.
11510 (thread_db_look_up_one_symbol): New.
11511 (thread_db_get_tls_address): Adjust.
11512 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11513 thread_db object on the heap, and tentatively set it in the
11515 (thread_db_init): Don't set all_symbols_looked_up here.
11516 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11518 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11520 * linux-low.c (linux_kill, linux_detach): Adjust.
11521 (status_pending_p_callback): Remove redundant statement. Check
11522 for !TARGET_WAITIKIND_IGNORE, instead of
11523 TARGET_WAITKIND_STOPPED.
11524 (handle_tracepoints): Make sure LWP is locked. Adjust.
11525 (linux_wait_for_event_1): Adjust.
11526 (linux_cancel_breakpoints): New.
11527 (unsuspend_one_lwp): New.
11528 (unsuspend_all_lwps): New.
11529 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11530 (send_sigstop_callback): Change return type to int, add new
11531 `except' parameter and handle it.
11532 (suspend_and_send_sigstop_callback): New.
11533 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11534 pass them down. If SUSPEND, also increment the lwp's suspend
11536 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11537 (need_step_over_p): Don't consider suspended LWPs.
11538 (start_step_over): Adjust.
11539 (proceed_one_lwp): Change return type to int, add new `except'
11540 parameter and handle it.
11541 (unsuspend_and_proceed_one_lwp): New.
11542 (proceed_all_lwps): Use find_inferior instead of
11544 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11545 also decrement the suspend count of LWPs. Pass `except' down,
11546 instead of hacking its suspend count.
11547 (linux_pause_all): Add `freeze' parameter. Adjust.
11548 (linux_unpause_all): New.
11549 (linux_target_ops): Install linux_unpause_all.
11550 * server.c (handle_status): Adjust.
11551 * target.h (struct target_ops): New fields `unpause_all' and
11552 `cancel_breakpoints'. Add new parameter to `pause_all'.
11553 (pause_all): Add new `freeze' parameter.
11554 (unpause_all): New.
11555 (cancel_breakpoints): New.
11556 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11557 cancel breakpoints.
11558 (cmd_qtstart): Pause threads.
11559 (stop_tracing): Pause threads, and cancel breakpoints.
11560 * win32-low.c (win32_target_ops): Adjust.
11562 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11564 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11565 the inferior right away from here...
11566 (linux_wait_1): ... to here, and adjust to check the thread's
11567 last_resume_kind instead of the lwp's step or stop_expected flags.
11569 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11571 * README: Use consistent `GDB' and `GDBserver' spellings.
11573 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11575 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11576 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11577 (linux_detach_one_lwp): Assume the lwp is stopped.
11578 (any_thread_of): Delete.
11579 (linux_detach): Stop all lwps here. Don't blindly delete all
11581 (delete_lwp_callback): New.
11582 (linux_mourn): Delete all lwps of the process that is gone.
11583 (linux_wait_1): Don't delete the last lwp of the process here.
11584 * mem-break.h (mark_breakpoints_out): Declare.
11585 * mem-break.c (mark_breakpoints_out): New.
11586 (free_all_breakpoints): Use it.
11587 * server.c (handle_target_event): If the process is gone, mark
11589 * thread-db.c (struct thread_db) <create_bp>: New field.
11590 (thread_db_enable_reporting): Fix prototype. Store a thread event
11591 breakpoint reference in the thread_db struct.
11592 (thread_db_load_search): Clear the thread_db object.
11593 (try_thread_db_load_1): Ditto.
11594 (switch_to_process): New.
11595 (disable_thread_event_reporting): Use it.
11596 (remove_thread_event_breakpoints): New.
11597 (thread_db_detach, thread_db_mourn): Use it.
11599 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11601 * linux-low.c (linux_enable_event_reporting): New.
11602 (linux_wait_for_event_1, handle_extended_wait): Use it.
11604 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11606 * linux-low.c (linux_kill_one_lwp, linux_kill)
11607 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11608 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11609 SIGSTOP even if the LWP is stopped.
11610 (send_sigstop_callback): New.
11611 (stop_all_lwps): Use send_sigstop_callback instead.
11612 (linux_resume_one_thread): Adjust.
11613 (proceed_one_lwp): Still proceed an LWP that the client has
11614 requested to stop, if we haven't reported it as stopped yet. Make
11615 sure that LWPs the client want stopped, have a pending SIGSTOP.
11617 2010-04-26 Doug Evans <dje@google.com>
11619 * server.c (handle_general_set): Make static.
11621 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11622 Print received char after testing for error/eof instead of before.
11623 (input_interrupt): Tweak comment.
11625 2010-04-23 Doug Evans <dje@google.com>
11627 * server.c (start_inferior): Print inferior argv if --debug.
11629 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11631 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11632 * nto-x86-low.c: Include server.h
11634 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11636 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11637 be consistent with other sources of this directory.
11638 (init_registers_amd64): Correct name of source file of this function
11641 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11643 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11644 64-bit executables.
11646 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11648 * win32-i386-low.c: Add 64-bit support.
11649 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11650 (init_registers_amd64): Declare.
11651 (mappings): Add 64-bit version of array.
11652 (init_windows_x86): New function.
11653 (the_low_target): Change init_arch field to init_windows_x86.
11655 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11657 * win32-low.c: Adapt to support also 64-bit architecture.
11658 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11659 (get_image_name): Use SIZE_T type for local variable `done'.
11660 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11661 (toolhelp_get_dll_name): Idem.
11662 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11663 Use uintptr_t typecast to avoid warning.
11664 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11665 (handle_exception): Use phex_nz to avoid warning.
11666 (win32_wait): Remove unused local variable `process'.
11668 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11670 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11673 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11675 * configure.ac: Use `ws2_32' library for srv_mingw.
11676 * configure: Regenerate.
11677 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11678 * remote-utils.c: Likewise.
11680 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11682 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11683 if __x86_64__ is defined.
11685 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11687 * configure: Regenerate.
11689 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11691 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11692 * target.h (target_ops): New get_tib_address field.
11693 * win32-low.h (win32_thread_info): Add thread_local_base field.
11694 * win32-low.c (child_add_thread): Add tlb argument.
11695 Set thread_local_base field to TLB.
11696 (get_child_debug_event): Adapt to child_add_thread change.
11697 (win32_get_tib_address): New function.
11698 (win32_target_ops): Set get_tib_address field to
11699 win32_get_tib_address.
11700 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11702 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11704 * linux-low.c (linux_mourn): Also remove the process.
11705 * server.c (handle_target_event): Don't remove the process here.
11706 * nto-low.c (nto_mourn): New.
11707 (nto_target_ops): Install it.
11708 * spu-low.c (spu_mourn): New.
11709 (spu_target_ops): Install it.
11710 * win32-low.c (win32_mourn): New.
11711 (win32_target_ops): Install it.
11713 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11715 * server.h (buffer_xml_printf): Remove redundant `;'.
11717 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11719 * regcache.c (set_register_cache): Invalidate regcaches before
11720 changing the register cache layout.
11721 (regcache_invalidate_one): Allow a NULL regcache.
11722 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11723 regcaches before changing the register cache layout or the target
11726 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11728 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11729 variable warning on Linux/x86-64.
11731 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11733 GDBserver disconnected tracing support.
11735 * linux-low.c (linux_remove_process): Delete.
11736 (add_lwp): Don't set last_resume_kind here.
11737 (linux_kill): Use `mourn'.
11738 (linux_detach): Use `thread_db_detach', and `mourn'.
11739 (linux_mourn): New.
11740 (linux_attach_lwp_1): Adjust comment.
11741 (linux_attach): last_resume_kind moved the thread_info; adjust.
11742 (status_pending_p_callback): Adjust.
11743 (linux_wait_for_event_1): Adjust.
11744 (count_events_callback, select_singlestep_lwp_callback)
11745 (select_event_lwp_callback, cancel_breakpoints_callback)
11746 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11747 (proceed_one_lwp): Adjust.
11748 (linux_async): Add debug output.
11749 (linux_thread_stopped): New.
11750 (linux_pause_all): New.
11751 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11753 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11754 (thread_db_free): Delete declaration.
11755 (thread_db_detach, thread_db_mourn): Declare.
11756 * thread-db.c (thread_db_init): Use thread_db_mourn.
11757 (thread_db_free): Delete, split in two.
11758 (disable_thread_event_reporting): New.
11759 (thread_db_detach): New.
11760 (thread_db_mourn): New.
11762 * server.h (struct thread_info) <last_resume_kind>: New field.
11763 <attached>: Add comment.
11764 <gdb_detached>: New field.
11765 (handler_func): Change return type to int.
11766 (handle_serial_event, handle_target_event): Ditto.
11767 (gdb_connected): Declare.
11769 (disconnected_tracing): Declare.
11770 (stop_tracing): Declare.
11772 * server.c (handle_query) <qSupported>: Report support for
11773 disconnected tracing.
11774 (queue_stop_reply_callback): Account for running threads.
11775 (gdb_wants_thread_stopped): New.
11776 (gdb_wants_all_threads_stopped): New.
11777 (gdb_reattached_process): New.
11778 (handle_status): Clear the `gdb_detached' flag of all processes.
11779 In all-stop, stop all threads.
11780 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11781 (process_serial_event): If the remote connection breaks, or if an
11782 exit was forced with "monitor exit", force an event loop exit.
11783 Handle disconnected tracing on detach.
11784 (handle_serial_event): Adjust.
11785 (handle_target_event): If GDB isn't connected, forward events back
11786 to the inferior, unless the last process exited, in which case,
11787 exit gdbserver. Adjust interface.
11789 * remote-utils.c (remote_open): Don't block in accept. Instead
11790 register an event loop source on the listen socket file
11791 descriptor. Refactor bits into ...
11792 (listen_desc): ... this new global.
11793 (gdb_connected): ... this new function.
11794 (enable_async_notification): ... this new function.
11795 (handle_accept_event): ... this new function.
11796 (remote_close): Clear remote_desc.
11798 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11800 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11802 (mourn_inferior): Define.
11803 (target_process_qsupported): Avoid the dangling else problem.
11804 (thread_stopped): Define.
11805 (pause_all): Define.
11806 (target_waitstatus_to_string): Declare.
11807 * target.c (target_waitstatus_to_string): New.
11809 * tracepoint.c (tracing): Make extern.
11810 (disconnected_tracing): New.
11811 (stop_tracing): Make extern. Handle tracing stops due to GDB
11813 (cmd_qtdisconnected): New.
11814 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11815 (handle_tracepoint_general_set): Handle QTDisconnected.
11817 * event-loop.c (event_handler_func): Change return type to int.
11818 (process_event): Bail out if the event handler wants the event
11820 (handle_file_event): Ditto.
11821 (start_event_loop): Bail out if the event handler wants the event
11824 * nto-low.c (nto_target_ops): Adjust.
11825 * spu-low.c (spu_wait): Don't remove the process here.
11826 (spu_target_ops): Adjust.
11827 * win32-low.c (win32_wait): Don't remove the process here.
11828 (win32_target_ops): Adjust.
11830 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11832 * regcache.c (realloc_register_cache): Invalidate inferior's
11833 regcache before recreating it.
11835 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11837 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11839 2010-04-09 Stan Shebs <stan@codesourcery.com>
11840 Pedro Alves <pedro@codesourcery.com>
11842 * server.h (LONGEST): New.
11843 (struct thread_info) <while_stepping>: New field.
11844 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11846 (initialize_tracepoint, handle_tracepoint_general_set)
11847 (handle_tracepoint_query, tracepoint_finished_step)
11848 (tracepoint_was_hit, release_while_stepping_state_list):
11849 (current_traceframe): Declare.
11850 * server.c (handle_general_set): Handle tracepoint packets.
11851 (read_memory): New.
11852 (write_memory): New.
11853 (handle_search_memory_1): Use read_memory.
11854 (handle_query): Report support for conditional tracepoints, trace
11855 state variables, and tracepoint sources. Handle tracepoint
11857 (main): Initialize the tracepoints module.
11858 (process_serial_event): Handle traceframe reads/writes.
11860 * linux-low.c (handle_tracepoints): New.
11861 (linux_wait_1): Call it.
11862 (linux_resume_one_lwp): Handle while-stepping.
11863 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11864 (linux_target_ops): Install them.
11865 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11867 * linux-x86-low.c (x86_supports_tracepoints): New.
11868 (the_low_target). Install it.
11870 * mem-break.h (delete_breakpoint): Declare.
11871 * mem-break.c (delete_breakpoint): Make external.
11873 * target.h (struct target_ops): Add `supports_tracepoints',
11874 `read_pc', and `write_pc' fields.
11875 (target_supports_tracepoints): Define.
11876 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11879 * regcache.h (struct regcache) <registers_owned>: New field.
11880 (init_register_cache, regcache_cpy): Declare.
11881 (regcache_read_pc, regcache_write_pc): Declare.
11882 (register_cache_size): Declare.
11883 (supply_regblock): Declare.
11884 * regcache.c (init_register_cache): New.
11885 (new_register_cache): Use it.
11886 (regcache_cpy): New.
11887 (register_cache_size): New.
11888 (supply_regblock): New.
11889 (regcache_read_pc, regcache_write_pc): New.
11891 * tracepoint.c: New.
11893 * Makefile.in (OBS): Add tracepoint.o.
11894 (tracepoint.o): New rule.
11896 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11898 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11900 (i386-mmx.c): Likewise.
11901 (i386-mmx-linux.o): Likewise.
11902 (i386-mmx-linux.c): Likewise.
11904 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11905 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11906 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11907 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11909 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11910 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11911 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11913 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11915 * Makefile.in (clean): Updated.
11917 (i386-avx.c): Likewise.
11918 (i386-avx-linux.o): Likewise.
11919 (i386-avx-linux.c): Likewise.
11920 (amd64-avx.o): Likewise.
11921 (amd64-avx.c): Likewise.
11922 (amd64-avx-linux.o): Likewise.
11923 (amd64-avx-linux.c): Likewise.
11925 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11926 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11927 (srv_amd64_regobj): Add amd64-avx.o.
11928 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11929 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11930 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11931 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11932 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11933 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11934 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11936 * i387-fp.c: Include "i386-xstate.h".
11938 (i387_cache_to_xsave): Likewise.
11939 (i387_xsave_to_cache): Likewise.
11940 (x86_xcr0): Likewise.
11942 * i387-fp.h (i387_cache_to_xsave): Likewise.
11943 (i387_xsave_to_cache): Likewise.
11944 (x86_xcr0): Likewise.
11946 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11947 * linux-crisv32-low.c (target_regsets): Likewise.
11948 * linux-m68k-low.c (target_regsets): Likewise.
11949 * linux-mips-low.c (target_regsets): Likewise.
11950 * linux-ppc-low.c (target_regsets): Likewise.
11951 * linux-s390-low.c (target_regsets): Likewise.
11952 * linux-sh-low.c (target_regsets): Likewise.
11953 * linux-sparc-low.c (target_regsets): Likewise.
11954 * linux-xtensa-low.c (target_regsets): Likewise.
11956 * linux-low.c: Include <sys/uio.h>.
11957 (regsets_fetch_inferior_registers): Support nt_type.
11958 (regsets_store_inferior_registers): Likewise.
11959 (linux_process_qsupported): New.
11960 (linux_target_ops): Add linux_process_qsupported.
11962 * linux-low.h (regset_info): Add nt_type.
11963 (linux_target_ops): Add process_qsupported.
11965 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11967 (init_registers_i386_avx_linux): New.
11968 (init_registers_amd64_avx_linux): Likewise.
11969 (xmltarget_i386_linux_no_xml): Likewise.
11970 (xmltarget_amd64_linux_no_xml): Likewise.
11971 (PTRACE_GETREGSET): Likewise.
11972 (PTRACE_SETREGSET): Likewise.
11973 (x86_fill_xstateregset): Likewise.
11974 (x86_store_xstateregset): Likewise.
11975 (use_xml): Likewise.
11976 (x86_linux_update_xmltarget): Likewise.
11977 (x86_linux_process_qsupported): Likewise.
11978 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11979 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11980 init_registers_i386_linux here. Call
11981 x86_linux_update_xmltarget.
11982 (the_low_target): Add x86_linux_process_qsupported.
11984 * server.c (handle_query): Call target_process_qsupported.
11986 * target.h (target_ops): Add process_qsupported.
11987 (target_process_qsupported): New.
11989 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11991 * inferiors.c (add_thread): Set last_status kind to
11992 TARGET_WAITKIND_IGNORE.
11993 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11994 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11995 (linux_wait_1): Move `thread' local definition to block that uses
11996 it. Don't NULL initialize `event_child'.
11997 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11998 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11999 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12001 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12003 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12004 an extended waitstatus, or by a watchpoint.
12005 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12006 thread was stepping or has been stopped by a watchpoint.
12008 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12010 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12011 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12012 of another, then delete the previous, and validate all
12014 (validate_inserted_breakpoint): New.
12015 (delete_disabled_breakpoints): New.
12016 (validate_breakpoints): New.
12017 (check_mem_read): Validate breakpoints before trusting their
12018 shadow. Delete disabled breakpoints.
12019 (check_mem_write): Validate breakpoints before trusting they
12020 should be inserted. Delete disabled breakpoints.
12021 * mem-break.h (validate_breakpoints):
12022 * server.c (handle_query): Validate breakpoints when we see a
12025 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12027 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12028 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12029 if we could tell there's a GDB breakpoint at stop_pc.
12030 (need_step_over_p): Don't do a step over if we find a GDB
12031 breakpoint at the resume PC.
12033 * mem-break.c (struct raw_breakpoint): New.
12034 (enum bkpt_type): New type `gdb_breakpoint'.
12035 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12036 fields. New field `raw'.
12037 (find_raw_breakpoint_at): New.
12038 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12039 breakpoint instead.
12040 (set_breakpoint_at): Adjust.
12041 (delete_raw_breakpoint): New.
12042 (release_breakpoint): New.
12043 (delete_breakpoint): Rename to...
12044 (delete_breakpoint_1): ... this. Add proc parameter. Use
12045 release_breakpoint. Return ENOENT.
12046 (delete_breakpoint): Reimplement.
12047 (find_breakpoint_at): Delete.
12048 (find_gdb_breakpoint_at): New.
12049 (delete_breakpoint_at): Delete.
12050 (set_gdb_breakpoint_at): New.
12051 (delete_gdb_breakpoint_at): New.
12052 (gdb_breakpoint_here): New.
12053 (set_reinsert_breakpoint): Use release_breakpoint.
12054 (uninsert_breakpoint): Rename to ...
12055 (uninsert_raw_breakpoint): ... this.
12056 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12057 (reinsert_raw_breakpoint): Change parameter type to
12059 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12061 (check_breakpoints): Adjust. Use release_breakpoint.
12062 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12063 (breakpoint_inserted_here): Ditto.
12064 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12065 Don't trust the breakpoint's shadow if it is not inserted.
12066 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12067 (delete_all_breakpoints): Adjust.
12068 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12069 use delete_breakpoint_1.
12071 * mem-break.h (breakpoints_supported): Delete declaration.
12072 (set_gdb_breakpoint_at): Declare.
12073 (gdb_breakpoint_here): Declare.
12074 (delete_breakpoint_at): Delete.
12075 (delete_gdb_breakpoint_at): Declare.
12077 * server.h (struct raw_breakpoint): Forward declare.
12078 (struct process_info): New field `raw_breakpoints'.
12080 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12083 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12085 * linux-low.c (status_pending_p_callback): Fix comment.
12086 (linux_wait_for_event_1): Move most of the internal breakpoint
12087 handling from here...
12088 (linux_wait_1): ... to here.
12089 (count_events_callback): New.
12090 (select_singlestep_lwp_callback): New.
12091 (select_event_lwp_callback): New.
12092 (cancel_breakpoints_callback): New.
12093 (select_event_lwp): New.
12094 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12095 priority to all LWPs that have had events that should be reported
12096 to the client. Cancel breakpoints when about to reporting the
12097 event to the client, not while stopping lwps. No longer cancel
12098 finished single-steps here.
12099 (cancel_finished_single_step): Delete.
12100 (cancel_finished_single_steps): Delete.
12102 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12104 * mem-break.c (enum bkpt_type): New.
12105 (struct breakpoint): New field `type'.
12106 (set_breakpoint_at): Change return type to struct breakpoint
12107 pointer. Set type to `other_breakpoint' by default.
12108 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12109 in the breakpoint list.
12110 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12111 (reinsert_breakpoint): Rename to ...
12112 (reinsert_raw_breakpoint): ... this.
12113 (reinsert_breakpoints_at): Adjust.
12114 * mem-break.h (struct breakpoint): Declare.
12115 (set_breakpoint_at): Change return type to struct breakpoint
12118 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12120 * server.c (handle_query): Assign, not compare.
12122 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12124 Teach linux gdbserver to step-over-breakpoints.
12126 * linux-low.c (can_hardware_single_step): New.
12127 (supports_breakpoints): New.
12128 (handle_extended_wait): If stopping threads, read the stop pc of
12129 the new cloned LWP.
12131 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12132 low target doesn't support retrieving the PC.
12133 (add_lwp): Set last_resume_kind to resume_continue.
12134 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12135 (linux_attach): Don't clear stop_expected. Set the lwp's
12136 last_resume_kind to resume_stop.
12137 (linux_detach_one_lwp): Don't check for removed breakpoints.
12138 (check_removed_breakpoint): Delete.
12139 (status_pending_p): Rename to ...
12140 (status_pending_p_callback): ... this. Don't check for removed
12141 breakpoints. Don't consider threads that are stopped from GDB's
12143 (linux_wait_for_lwp): Always read the stop_pc here.
12144 (cancel_breakpoint): New.
12145 (step_over_bkpt): New global.
12146 (linux_wait_for_event_1): Implement stepping over breakpoints.
12147 (gdb_wants_lwp_stopped): New.
12148 (gdb_wants_all_stopped): New.
12149 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12150 single-step traps here. Store the thread's last reported target
12152 (send_sigstop): Don't clear stop_expected. Always set it,
12154 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12155 (cancel_finished_single_step): New.
12156 (cancel_finished_single_steps): New.
12157 (wait_for_sigstop): Don't cancel finished single-step traps here.
12158 (linux_resume_one_lwp): Don't check for removed breakpoints.
12159 Don't set `step' on non-hardware step archs.
12160 (linux_set_resume_request): Ignore resume_stop requests if already
12161 stopping or stopped. Set the lwp's last_resume_kind.
12162 (resume_status_pending_p): Don't check for removed breakpoints.
12163 (need_step_over_p): New.
12164 (start_step_over): New.
12165 (finish_step_over): New.
12166 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12167 requests. Clear the thread's last reported target waitstatus.
12168 Don't use the `suspended' flag. Don't consider pending breakpoints.
12169 (linux_resume): Start a step-over if necessary.
12170 (proceed_one_lwp): New.
12171 (proceed_all_lwps): New.
12172 (unstop_all_lwps): New.
12173 * linux-low.h (struct lwp_info): Rewrite comment for the
12174 `suspended' flag. Add the `stop_pc' field. Delete the
12175 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12176 Add `'last_resume_kind' and `need_step_over' fields.
12177 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12178 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12179 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12180 (set_raw_breakpoint_at): New.
12181 (set_breakpoint_at): Rewrite to use it.
12182 (reinsert_breakpoint_handler): Delete.
12183 (set_reinsert_breakpoint): New.
12184 (reinsert_breakpoint_by_bp): Delete.
12185 (delete_reinsert_breakpoints): New.
12186 (uninsert_breakpoint): Rewrite.
12187 (uninsert_breakpoints_at): New.
12188 (reinsert_breakpoint): Rewrite.
12189 (reinsert_breakpoints_at): New.
12190 (check_breakpoints): Rewrite.
12191 (breakpoint_here): New.
12192 (breakpoint_inserted_here): New.
12193 (check_mem_read): Adjust.
12194 * mem-break.h (breakpoints_supported, breakpoint_here)
12195 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12196 (reinsert_breakpoint_by_bp): Delete declaration.
12197 (delete_reinsert_breakpoints): Declare.
12198 (reinsert_breakpoint): Delete declaration.
12199 (reinsert_breakpoints_at): Declare.
12200 (uninsert_breakpoint): Delete declaration.
12201 (uninsert_breakpoints_at): Declare.
12202 (check_breakpoints): Adjust prototype.
12203 * server.h: Adjust include order.
12204 (struct thread_info): Declare here. Add a `last_status' field.
12206 2010-03-23 Michael Snyder <msnyder@vmware.com>
12208 * server.c (crc32): New function.
12209 (handle_query): Add handling for 'qCRC:' request.
12211 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12213 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12214 lwp had been stopped by a watchpoint.
12216 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12218 * server.h (internal_error): Declare.
12219 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12220 * utils.c (internal_error): New function.
12222 2010-03-15 Andreas Schwab <schwab@redhat.com>
12224 * configure.srv: Fix typo setting srv_regobj.
12226 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12228 * linux-low.c (fetch_register): Avoid passing a non string literal
12230 (usr_store_inferior_registers): Ditto.
12232 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12234 * linux-low.c (linux_write_memory): Bail out early if peeking
12237 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12239 * linux-low.h (struct lwp_info): New fields
12240 `stopped_by_watchpoint' and `stopped_data_address'.
12241 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12242 here, and cache them in the lwp object.
12243 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12245 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12247 (linux_stopped_by_watchpoint): Rewrite.
12248 (linux_stopped_data_address): Rewrite.
12250 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12252 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12253 switching the current inferior, not before.
12255 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12257 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12258 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12259 i386-linux.c and amd64-linux.c.
12260 (reg-i386.o): Removed.
12261 (reg-i386.c): Likewise.
12262 (reg-i386-linux.o): Likewise.
12263 (reg-i386-linux.c): Likewise.
12264 (reg-x86-64.o): Likewise.
12265 (reg-x86-64.c): Likewise.
12266 (reg-x86-64-linux.o): Likewise.
12267 (reg-x86-64-linux.c): Likewise.
12269 (i386.c): Likewise.
12270 (i386-linux.o): Likewise.
12271 (i386-linux.c): Likewise.
12272 (amd64.o): Likewise.
12273 (amd64.c): Likewise.
12274 (amd64-linux.o): Likewise.
12275 (amd64-linux.c): Likewise.
12277 * configure.srv (srv_i386_regobj): New.
12278 (srv_i386_linux_regobj): Likewise.
12279 (srv_amd64_regobj): Likewise.
12280 (srv_amd64_linux_regobj): Likewise.
12281 (srv_i386_32bit_xmlfiles): Likewise.
12282 (srv_i386_64bit_xmlfiles): Likewise.
12283 (srv_i386_xmlfiles): Likewise.
12284 (srv_amd64_xmlfiles): Likewise.
12285 (srv_i386_linux_xmlfiles): Likewise.
12286 (srv_amd64_linux_xmlfiles): Likewise.
12287 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12288 srv_xmlfiles to $srv_i386_xmlfiles.
12289 (i[34567]86-*-mingw32ce*): Likewise.
12290 (i[34567]86-*-mingw*): Likewise.
12291 (i[34567]86-*-nto*): Likewise.
12292 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12293 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12294 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12295 (x86_64-*-linux*): Likewise.
12297 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12298 (init_registers_amd64_linux): New.
12299 (x86_arch_setup): Replace init_registers_x86_64_linux with
12300 init_registers_amd64_linux.
12302 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12304 * configure.ac: Check for libdl. If it is not available link against
12305 static libthread_db.
12306 * configure: Regenerate.
12308 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12312 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12313 handing a read watchpoint.
12314 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12316 2010-02-12 Doug Evans <dje@google.com>
12318 * linux-low.c (linux_supports_tracefork_flag): Document.
12319 (linux_look_up_symbols): Add comment.
12321 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12323 * regcache.c (supply_register): Clear regcache if buf is NULL.
12325 2010-02-02 Nicolas Roche <roche@sourceware.org>
12326 Joel Brobecker <brobecker@adacore.com>
12328 * inferiors.c (find_inferior): Add function documentation.
12329 (unloaded_dll): Handle the case where the unloaded dll has not
12330 been previously registered in the dll list.
12332 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12334 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12335 (thumb2_breakpoint): New.
12336 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12338 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12340 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12341 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12344 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12346 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12348 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12350 * linux-s390-low.c (s390_collect_ptrace_register)
12351 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12353 2010-01-21 Doug Evans <dje@google.com>
12355 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12356 (PTRACE_ARG4_TYPE): New macro.
12357 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12358 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12359 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12360 (usr_store_inferior_registers): Ditto.
12361 (linux_read_memory, linux_write_memory): Ditto.
12362 (linux_test_for_tracefork): Ditto.
12364 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12365 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12367 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12369 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12372 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12374 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12375 prototype to take a regcache. Adjust.
12377 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12379 * regcache.h (struct thread_info): Forward declare.
12380 (struct regcache): New.
12381 (new_register_cache): Adjust prototype.
12382 (get_thread_regcache): Declare.
12383 (free_register_cache): Adjust prototype.
12384 (registers_to_string, registers_from_string): Ditto.
12385 (supply_register, supply_register_by_name, collect_register)
12386 (collect_register_as_string, collect_register_by_name): Ditto.
12387 * regcache.c (struct inferior_regcache_data): Delete.
12388 (get_regcache): Rename to ...
12389 (get_thread_regcache): ... this. Adjust. Switch inferior before
12390 fetching registers.
12391 (regcache_invalidate_one): Adjust.
12392 (regcache_invalidate): Fix prototype.
12393 (new_register_cache): Return the new register cache.
12394 (free_register_cache): Change prototype.
12395 (realloc_register_cache): Adjust.
12396 (registers_to_string): Change prototype to take a regcache. Adjust.
12397 (registers_from_string): Ditto.
12398 (register_data): Ditto.
12399 (supply_register): Ditto.
12400 (supply_register_by_name): Ditto.
12401 (collect_register): Ditto.
12402 (collect_register_as_string): Ditto.
12403 (collect_register_by_name): Ditto.
12404 * server.c (process_serial_event): Adjust.
12405 * linux-low.h (regset_fill_func, regset_store_func): Change
12407 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12409 * linux-low.c (get_stop_pc): Adjust.
12410 (check_removed_breakpoint): Adjust.
12411 (linux_wait_for_event): Adjust.
12412 (linux_resume_one_lwp): Adjust.
12413 (fetch_register): Add regcache parameter. Adjust.
12414 (usr_store_inferior_registers): Ditto.
12415 (regsets_fetch_inferior_registers): Ditto.
12416 (regsets_store_inferior_registers): Ditto.
12417 (linux_fetch_registers, linux_store_registers): Ditto.
12418 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12420 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12422 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12423 prototype to take a regcache.
12424 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12425 * remote-utils.c (convert_ascii_to_int, outreg)
12426 (prepare_resume_reply): Change prototype to take a regcache.
12428 * target.h (struct target_ops) <fetch_registers, store_registers>:
12429 Change prototype to take a regcache.
12430 (fetch_inferior_registers, store_inferior_registers): Change
12431 prototype to take a regcache. Adjust.
12432 * proc-service.c (ps_lgetregs): Adjust.
12433 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12434 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12435 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12436 take a regcache. Adjust.
12437 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12438 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12439 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12440 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12441 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12442 (cris_cannot_fetch_register):
12443 (cris_breakpoint_at): Change prototype to take a regcache.
12445 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12446 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12447 to take a regcache. Adjust.
12448 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12450 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12451 take a regcache. Adjust.
12452 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12453 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12454 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12455 * linux-mips-low.c (mips_get_pc):
12456 (mips_set_pc): Change prototype to take a regcache. Adjust.
12457 (mips_reinsert_addr): Adjust.
12458 (mips_collect_register): Change prototype to take a regcache.
12460 (mips_supply_register):
12461 (mips_collect_register_32bit, mips_supply_register_32bit)
12462 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12463 (mips_store_fpregset): Ditto.
12464 * linux-ppc-low.c (ppc_supply_ptrace_register)
12465 (ppc_supply_ptrace_register): Ditto.
12466 (parse_spufs_run): Adjust.
12467 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12468 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12469 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12470 take a regcache. Adjust.
12471 * linux-s390-low.c (s390_collect_ptrace_register)
12472 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12473 (s390_set_pc): Change prototype to take a regcache. Adjust.
12474 (s390_arch_setup): Adjust.
12475 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12476 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12477 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12478 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12479 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12481 (sparc_breakpoint_at): Adjust.
12482 * linux-xtensa-low.c (xtensa_fill_gregset):
12483 (xtensa_store_gregset):
12484 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12485 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12486 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12487 prototype to take a regcache. Adjust.
12488 * win32-arm-low.c (arm_fetch_inferior_register)
12489 (arm_store_inferior_register): Change prototype to take a
12491 * win32-i386-low.c (i386_fetch_inferior_register)
12492 (i386_store_inferior_register): Change prototype to take a
12494 * win32-low.c (child_fetch_inferior_registers)
12495 (child_store_inferior_registers): Change prototype to take a
12497 (win32_wait): Adjust.
12498 (win32_fetch_inferior_registers): Change prototype to take a
12500 (win32_store_inferior_registers): Adjust.
12501 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12502 store_inferior_register>: Change prototype to take a regcache.
12504 2010-01-20 Doug Evans <dje@google.com>
12506 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12508 (linux_wait_for_event1, linux_init_signals): Ditto.
12509 (W_STOPCODE): Provide definition if missing.
12511 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12513 * linux-low.c (linux_core_of_thread): New.
12514 (compare_ints, show_process, list_threads): New.
12515 (linux_qxfer_osdata): Report threads and cores.
12516 (linux_target_op): Register linux_core_of_thread.
12517 * remote-utils.c (prepare_resume_reply): Report the core.
12518 (buffer_xml_printf): Support %d specifier.
12519 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12521 (handle_query): Handle qXfer:threads. Announce availability
12523 * target.h (struct target_ops): New field core_of_thread.
12525 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12527 * Makefile.in (clean): Remove new generated files.
12528 (reg-s390.o, reg-s390.c): Remove rules.
12529 (reg-s390x.o, reg-s390x.c): Likewise.
12530 (s390-linux32.o, s390-linux32.c): Add rules.
12531 (s390-linux64.o, s390-linux64.c): Likewise.
12532 (s390x-linux64.o, s390x-linux64.c): Likewise.
12533 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12534 * linux-s390-low.c: Include <elf.h>.
12535 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12536 (init_registers_s390): Remove prototype.
12537 (init_registers_s390x): Likewise.
12538 (init_registers_s390_linux32): Add prototype.
12539 (init_registers_s390_linux64): Likewise.
12540 (init_registers_s390x_linux64): Likewise.
12541 (s390_num_regs_3264): New define.
12542 (s390_regmap_3264): New global variable.
12543 (s390_cannot_fetch_register): Remove obsolete check.
12544 (s390_cannot_store_register): Likewise.
12545 (s390_collect_ptrace_register): Handle upper/lower register halves.
12546 (s390_supply_ptrace_register): Likewise.
12547 (s390_fill_gregset): Update to register number changes.
12548 (s390_get_hwcap): New routine.
12549 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12550 Install appropriate regmap and register set.
12552 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12554 * server.c (gdbserver_version): Update copyright year to 2010.
12555 * gdbreplay.c (gdbreplay_version): Likewise.
12557 2009-12-28 Doug Evans <dje@google.com>
12559 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12560 elf/external.h. Include <elf.h> instead but only if necessary.
12562 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12564 * linux-low.c (linux_remove_process): Remove `detaching'
12565 parameter. Don't release/detach from thread_db here.
12566 (linux_kill): Release/detach from thread_db here, ...
12567 (linux_detach): ... and here, before actually detaching.
12568 (linux_wait_1): ... and here, when a process exits.
12569 * thread-db.c (any_thread_of): New.
12570 (thread_db_free): Switch the current inferior to a thread of the
12573 2009-12-21 Doug Evans <dje@google.com>
12575 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12577 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12578 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12579 warning ifndef __NR_tkill. Move setting of errno there too.
12580 Delete unnecessary resetting of errno after syscall.
12581 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12583 * configure.ac: Check for dladdr.
12584 * config.in: Regenerate.
12585 * configure: Regenerate.
12586 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12587 (try_thread_db_load): Update.
12589 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12591 2009-12-18 Doug Evans <dje@google.com>
12593 * event-loop.c: Include unistd.h if it exists.
12595 * linux-low.c (my_waitpid): Move definition away from being in
12596 between linux_tracefork_child/linux_test_for_tracefork.
12598 * gdb_proc_service.h (psaddr_t): Fix type.
12599 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12600 signature to match glibc.
12602 2009-12-16 Doug Evans <dje@google.com>
12604 * linux-low.c (linux_read_memory): Fix argument to read.
12606 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12608 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12609 events, don't leave current_inferior pointing at null.
12611 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12613 * win32-low.c (LOG): Delete.
12614 (OUTMSG): Output to stderr.
12615 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12616 on compile time LOG macro.
12617 (win32_wait): Fix debug output.
12619 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12621 * win32-low.c (win32_add_one_solib): If the dll name is
12622 "ntdll.dll", prepend the system directory to the dll path.
12624 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12626 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12628 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12629 Vladimir Prus <vladimir@codesourcery.com>
12631 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12632 * configure.ac: Check for __mcoldfire__ and set
12633 gdb_cv_m68k_is_coldfire.
12634 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12635 reg-cf.o and reg-m68k.o.
12636 * configure: Regenerated.
12638 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12640 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12641 Pass it to thread_db_free.
12642 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12643 proper `detaching' argument to linux_remove_process.
12644 * linux-low.h (thread_db_free): Add `detaching' parameter.
12645 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12647 (thread_db_free): Add `detaching' parameter. Only
12648 call td_ta_clear_event if detaching from process.
12650 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12652 * thread-db.c (thread_db_free): Fix typo.
12654 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12657 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12659 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12661 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12662 with an i686 compiler.
12663 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12665 * configure: Rebuilt.
12667 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12671 * server.c (handle_search_memory_1): Correct read_addr initialization
12672 in loop for searching subsequent chunks.
12674 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12676 * configure.ac: New --with-libthread-db option.
12677 * thread-db.c: Allow direct dependence on libthread_db.
12678 (thread_db_free): Adjust.
12679 * config.in: Regenerate.
12680 * configure: Likewise.
12682 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12685 * thread-db.c (attach_thread): New function.
12686 (maybe_attach_thread): Return success/failure.
12687 (find_new_threads_callback): Adjust.
12688 (thread_db_find_new_threads): Loop until no new threads.
12690 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12692 * proc-service.c (ps_lgetregs): Formatting.
12694 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12696 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12697 * configure.ac: Adjust.
12698 * linux-low.h (struct process_info_private): Move members to struct
12700 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12701 * linux-low.c (linux_remove_process): Adjust.
12702 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12703 * server.c (handle_query): Move code ...
12704 (handle_monitor_command): ... here. New function.
12705 * target.h (struct target_ops): New member.
12706 * thread-db.c (struct thread_db): New.
12707 (libthread_db_search_path): New variable.
12708 (thread_db_create_event, thread_db_enable_reporting)
12709 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12710 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12711 (try_thread_db_load_1, dladdr_to_soname): New functions.
12712 (try_thread_db_load, thread_db_load_search): New functions.
12713 (thread_db_init): Search for libthread_db.
12714 (thread_db_free): New function.
12715 (thread_db_handle_monitor_command): Likewise.
12716 * config.in: Regenerate.
12717 * configure: Regenerate.
12719 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12721 * spu-low.c (spu_kill): Wait for inferior to terminate.
12722 Call clear_inferiors.
12723 (spu_detach): Call clear_inferiors.
12725 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12727 * aclocal.m4: Regenerate.
12728 * config.in: Likewise.
12729 * configure: Likewise.
12731 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12733 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12734 (parse_spufs_run): New function.
12735 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12736 (ppc_breakpoint_at): Handle SPU breakpoints.
12738 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12740 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12741 (SPUFS_MAGIC): Define.
12742 (spu_enumerate_spu_ids): New function.
12743 (linux_qxfer_spu): New function.
12744 (linux_target_ops): Install linux_qxfer_spu.
12746 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12748 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12749 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12750 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12751 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12752 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12753 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12754 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12755 (init_registers_powerpc_cell32l): Add prototype.
12756 (init_registers_powerpc_cell64l): Likewise.
12757 (ppc_arch_setup): Detect Cell/B.E. architecture.
12759 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12761 * Makefile.in (datarootdir): New variable.
12763 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12765 * linux-low.c (linux_write_memory): Update debugging output.
12766 * Makefile.in (clean): Add new descriptions.
12767 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12768 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12769 * configure.srv: Add new files for arm*-*-linux*.
12770 * linux-arm-low.c: Add new declarations.
12771 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12772 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12773 (HWCAP_VFPv3D16): New.
12774 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12775 instead of __IWMMXT__.
12776 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12777 (arm_arch_setup): New.
12778 (target_regsets): Remove #ifdef. Add VFP regset.
12779 (the_low_target): Use arm_arch_setup.
12781 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12783 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12784 the main thread again.
12786 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12788 Adding Neutrino gdbserver.
12789 * configure: Regenerated.
12790 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12791 * configure.srv (i[34567]86-*-nto*): New target.
12792 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12793 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12794 (nto_comctrl) [__QNX__]: New function.
12795 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12797 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12799 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12802 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12803 Pedro Alves <pedro@codesourcery.com>
12805 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12806 don't support CONTEXT_EXTENDED_REGISTERS.
12807 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12808 (the_low_target): Install them.
12809 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12810 failing with ERROR_PIPE_NOT_CONNECTED.
12812 2009-06-30 Doug Evans <dje@google.com>
12813 Pierre Muller <muller@ics.u-strasbg.fr>
12815 Add h/w watchpoint support to x86-linux, win32-i386.
12816 * Makefile.in (SFILES): Add i386-low.c
12817 (i386_low_h): Define.
12818 (i386-low.o): Add dependencies.
12819 (linux-x86-low.o): Add i386-low.h dependency.
12820 (win32-i386-low.o): Ditto.
12821 * i386-low.c: New file.
12822 * i386-low.h: New file.
12823 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12824 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12825 * linux-low.c (linux_add_process): Initialize arch_private.
12826 (linux_remove_process): Free arch_private.
12827 (add_lwp): Initialize arch_private.
12828 (delete_lwp): Free arch_private.
12829 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12831 * linux-low.h (process_info_private): New member arch_private.
12832 (lwp_info): New member arch_private.
12833 (linux_target_ops): New members new_process, new_thread,
12835 (ptid_of): New macro.
12836 * linux-x86-low.c: Include stddef.h, i386-low.h.
12837 (arch_process_info): New struct.
12838 (arch_lwp_info): New struct.
12839 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12840 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12841 (i386_dr_low_get_status): New function.
12842 (x86_insert_point, x86_remove_point): New functions.
12843 (x86_stopped_by_watchpoint): New function.
12844 (x86_stopped_data_address): New function.
12845 (x86_linux_new_process, x86_linux_new_thread): New functions.
12846 (x86_linux_prepare_to_resume): New function.
12847 (the_low_target): Add entries for insert_point, remove_point,
12848 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12850 * server.c (debug_hw_points): New global.
12851 (monitor_show_help): Document set debug-hw-points.
12852 (handle_query): Process "set debug-hw-points".
12853 * server.h (debug_hw_points): Declare.
12854 (paddress): Declare.
12855 * utils.c (NUMCELLS, CELLSIZE): New macros.
12856 (get_sell, xsnprintf, paddress): New functions.
12857 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12858 remove_point, stopped_by_watchpoint, stopped_data_address.
12859 * win32-i386-low.c: Include i386-low.h.
12860 (debug_reg_state): Replaces dr.
12861 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12862 (i386_dr_low_get_status): New function.
12863 (i386_insert_point, i386_remove_point): New functions.
12864 (i386_stopped_by_watchpoint): New function.
12865 (i386_stopped_data_address): New function.
12866 (i386_initial_stuff): Update.
12867 (get_thread_context,set_thread_context,i386_thread_added): Update.
12868 (the_low_target): Add entries for insert_point,
12869 remove_point, stopped_by_watchpoint, stopped_data_address.
12870 * win32-low.c (win32_insert_watchpoint): New function.
12871 (win32_remove_watchpoint): New function.
12872 (win32_stopped_by_watchpoint): New function.
12873 (win32_stopped_data_address): New function.
12874 (win32_target_ops): Add entries for insert_watchpoint,
12875 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12876 * win32-low.h (win32_target_ops): New members insert_point,
12877 remove_point, stopped_by_watchpoint, stopped_data_address.
12879 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12881 * server.c (process_serial_event): Re-return unsupported, not
12882 error, if the type isn't recognized. Re-allow supporting only
12883 insert or remove packets. Also call require_running for
12884 breakpoints. Add missing break statement to default case. Tidy.
12885 * target.h (struct target_ops): Rename insert_watchpoint to
12886 insert_point, and remove_watchpoint to remove_point.
12888 * linux-low.h (struct linux_target_ops): Likewise.
12889 * linux-low.c (linux_insert_watchpoint): Rename to ...
12890 (linux_insert_point): ... this. Adjust.
12891 (linux_remove_watchpoint): Rename to ...
12892 (linux_remove_point): ... this. Adjust.
12893 (linux_target_ops): Adjust.
12894 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12895 (cris_insert_point): ... this.
12896 (cris_remove_watchpoint): Rename to ...
12897 (cris_remove_point): ... this.
12898 (the_low_target): Adjust.
12900 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12902 * server.c (handle_v_kill): Pass signal_pid to
12903 kill_inferior if multi_process is zero.
12905 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12907 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12908 * target.h (target_ops): Comment for *_watchpoint to make it clear
12909 the functions can get types '0' and '1'.
12911 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12913 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12914 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12915 * regcache.c (get_regcache): Likewise.
12916 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12917 * win32-low.c (child_fetch_inferior_registers): Remove check for
12920 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12921 Pedro Alves <pedro@codesourcery.com>
12923 * target.h (struct target_ops) <supports_multi_process>: New
12925 (target_supports_multi_process): New.
12926 * server.c (handle_query): Even if GDB reports support, only
12927 enable multi-process if the target also supports it. Report
12928 multi-process support only if the target backend supports it.
12929 * linux-low.c (linux_supports_multi_process): New function.
12930 (linux_target_ops): Install it as target_supports_multi_process
12933 2009-05-24 Doug Evans <dje@google.com>
12935 Global renaming of find_thread_pid to find_thread_ptid.
12936 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12937 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12938 All callers updated.
12940 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12941 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12944 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12945 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12946 (linux_resume_one_lwp): Ditto.
12948 2009-05-23 Doug Evans <dje@google.com>
12950 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12951 from struct inferior_list_entry * to struct lwp_info *.
12952 All callers updated.
12954 2009-05-13 Doug Evans <dje@google.com>
12956 * linux-x86-low.c: Don't include assert.h.
12957 (x86_siginfo_fixup): Use fatal, not assert.
12958 (x86_arch_setup): Fix comment.
12960 2009-05-12 Doug Evans <dje@google.com>
12962 Biarch support for i386/amd64 gdbserver.
12963 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12964 Add linux-x86-low.c.
12965 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12966 (linux-x86-low.o): Add.
12967 * linux-x86-64-low.c: Delete.
12968 * linux-i386-low.c: Delete.
12969 * linux-x86-low.c: New file.
12970 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12972 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12974 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12975 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12976 (linux_child_pid_to_exec_file): New function.
12977 (elf_64_header_p, elf_64_file_p): New functions.
12978 (siginfo_fixup): New function.
12979 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12980 give target a chance to convert layout.
12981 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12982 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12984 2009-05-07 Doug Evans <dje@google.com>
12986 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12987 (regsets_store_inferior_registers): Ditto.
12989 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12993 * linux-low.c (must_set_ptrace_flags): Delete.
12994 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12996 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12997 `lwp->must_set_ptrace_flags' instead.
12998 (linux_wait_for_event_1): Set ptrace options here.
12999 (linux_wait_1): ... not here.
13001 2009-04-30 Doug Evans <dje@google.com>
13003 * inferiors.c (started_inferior_callback): New function.
13004 (attached_inferior_callback): New function.
13005 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13006 * server.c (print_started_pid, print_attached_pid): New functions.
13007 (detach_or_kill_for_exit): New function.
13008 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13009 * server.h (have_started_inferiors_p): Declare.
13010 (have_attached_inferiors_p): Declare.
13012 * inferiors.c (remove_process): Fix memory leak, free process.
13013 * linux-low.c (linux_remove_process): New function.
13014 (linux_kill): Call it instead of remove_process.
13015 (linux_detach, linux_wait_1): Ditto.
13017 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13019 * configure.srv: Add x86 Windows CE target.
13021 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13023 * inferiors.c (get_thread_process): Make global.
13024 * server.h (get_thread_process): Add prototype.
13025 * thread-db.c (find_one_thread): Use get_thread_process
13026 instead of current_process.
13027 (thread_db_get_tls_address): Do not crash if called when
13028 thread layer is not yet initialized.
13030 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13032 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13033 * spu-low.c (current_tid): Rename to ...
13034 (current_ptid): ... this.
13035 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13036 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13037 ptid_get_lwp (current_ptid) instead of current_tid.
13038 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13039 instead of current_tid. Use find_process_pid to verify pid
13040 argument is valid. Pass proper argument to remove_process.
13041 (spu_thread_alive): Compare current_ptid instead of current_tid.
13042 (spu_resume): Likewise.
13044 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13046 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13049 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13051 Implement the multiprocess extensions, and add linux multiprocess
13054 * server.h (ULONGEST): Declare.
13055 (struct ptid, ptid_t): New.
13056 (minus_one_ptid, null_ptid): Declare.
13057 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13058 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13059 (struct inferior_list_entry): Change `id' type from unsigned from
13061 (struct sym_cache, struct breakpoint, struct
13062 process_info_private): Forward declare.
13063 (struct process_info): Declare.
13064 (current_process): Declare.
13065 (all_processes): Declare.
13066 (initialize_inferiors): Declare.
13067 (add_thread): Adjust to use ptid_t.
13068 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13069 (add_process, remove_process, find_thread_pid): Declare.
13070 (find_inferior_id): Adjust to use ptid_t.
13071 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13072 (multi_process): Declare.
13073 (push_event): Adjust to use ptid_t.
13074 (read_ptid, write_ptid): Declare.
13075 (prepare_resume_reply): Adjust to use ptid_t.
13076 (clear_symbol_cache): Declare.
13077 * inferiors.c (all_processes): New.
13078 (null_ptid, minus_one_ptid): New.
13079 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13080 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13081 (add_thread): Change unsigned long to ptid. Remove gdb_id
13083 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13084 (gdb_id_to_thread): Rename to ...
13085 (find_thread_pid): ... this. Change unsigned long to ptid.
13086 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13087 (loaded_dll, pull_pid_from_list): Adjust.
13088 (add_process, remove_process, find_process_pid)
13089 (get_thread_process, current_process, initialize_inferiors): New.
13090 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13091 (struct target_waitstatus) <related_pid>: Ditto.
13092 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13093 return type to int.
13094 (struct target_ops) <join>: Add `pid' argument.
13095 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13096 (struct target_ops) <wait>: Add `ptid' field. Change return type
13098 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13099 (mywait): Add `ptid' argument. Change return type to ptid_t.
13100 (target_pid_to_str): Declare.
13101 * target.c (set_desired_inferior): Adjust to use ptids.
13102 (mywait): Add new `ptid' argument. Adjust.
13103 (target_pid_to_str): New.
13104 * mem-break.h (free_all_breakpoints): Declare.
13105 * mem-break.c (breakpoints): Delelete.
13106 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13107 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13108 to use per-process breakpoint list.
13109 (free_all_breakpoints): New.
13110 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13111 (symbol_cache, all_symbols_looked_up): Delete.
13113 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13115 (prepare_resume_reply): Change ptid argument's type from unsigned
13116 long to ptid_t. Adjust. Implement W;process and X;process.
13117 (free_sym_cache, clear_symbol_cache): New.
13118 (look_up_one_symbol): Adjust to per-process symbol cache. *
13119 * server.c (cont_thread, general_thread, step_thread): Change type
13121 (attached): Delete.
13122 (multi_process): New.
13123 (last_ptid): Change type to ptid_t.
13124 (struct vstop_notif) <ptid>: Change type to ptid_t.
13125 (queue_stop_reply, push_event): Change `ptid' argument's type to
13127 (discard_queued_stop_replies): Add `pid' argument.
13128 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13129 changes. Don't reference the `attached' global.
13130 (attach_inferior): Adjust to mywait interface changes.
13131 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13132 features. Handle and report "multiprocess+". Handle
13134 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13136 (handle_v_kill): New.
13137 (handle_v_stopped): Adjust to use target_pid_to_str.
13138 (handle_v_requests): Allow multiple attaches and runs when
13139 multiprocess extensions are in effect. Handle "vKill".
13140 (myresume): Adjust to use ptids.
13141 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13142 (handle_status): Adjust to discard_queued_stop_replies interface
13144 (first_thread_of, kill_inferior_callback)
13145 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13146 (main): Call initialize_inferiors. Adjust to use ptids, killing
13147 and detaching from all inferiors. Handle multiprocess packet
13149 * linux-low.h: Include gdb_proc_service.h.
13150 (struct process_info_private): New.
13151 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13152 <lwpid_of>: Use ptid_get_lwp.
13153 (get_lwp_thread): Adjust.
13154 (struct lwp_info): Add `dead' member.
13155 (find_lwp_pid): Declare.
13156 * linux-low.c (thread_db_active): Delete.
13157 (new_inferior): Adjust comment.
13158 (inferior_pid): Delete.
13159 (linux_add_process): New.
13160 (handle_extended_wait): Adjust.
13161 (add_lwp): Change unsigned long to ptid.
13162 (linux_create_inferior): Add process to processes table. Adjust
13163 to use ptids. Don't set new_inferior here.
13164 (linux_attach_lwp): Rename to ...
13165 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13166 it. Adjust to use ptids.
13167 (linux_attach_lwp): New.
13168 (linux_attach): Add process to processes table. Don't set
13170 (struct counter): New.
13171 (second_thread_of_pid_p, last_thread_of_process_p): New.
13172 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13173 multiple processes.
13174 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13175 processes. Remove process from process table.
13176 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13177 to multiple processes.
13178 (any_thread_of): New.
13179 (linux_detach): Add `pid' argument, and handle it. Remove process
13180 from processes table.
13181 (linux_join): Add `pid' argument. Handle it.
13182 (linux_thread_alive): Change unsighed long argument to ptid_t.
13183 Consider dead lwps as not being alive.
13184 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13185 threads we're not interested in.
13186 (same_lwp, find_lwp_pid): New.
13187 (linux_wait_for_lwp): Change `pid' argument's type from int to
13189 (linux_wait_for_event): Rename to ...
13190 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13191 from int to ptid_t. Adjust.
13192 (linux_wait_for_event): New.
13193 (linux_wait_1): Add `ptid' argument. Change return type to
13194 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13195 that exit from the process table.
13196 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13198 (mark_lwp_dead): New.
13199 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13200 stopping all threads, mark its main lwp as dead.
13201 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13203 (fetch_register, usr_store_inferior_registers)
13204 (regsets_fetch_inferior_registers)
13205 (regsets_store_inferior_registers, linux_read_memory)
13206 (linux_write_memory): Inline `inferior_pid'.
13207 (linux_look_up_symbols): Adjust to use per-process
13208 `thread_db_active'.
13209 (linux_request_interrupt): Adjust to use ptids.
13210 (linux_read_auxv): Inline `inferior_pid'.
13211 (initialize_low): Don't reference thread_db_active.
13212 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13213 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13214 (ps_getpid): Return the pid of the current inferior.
13215 * thread-db.c (proc_handle, thread_agent): Delete.
13216 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13218 (find_one_thread): Change argument type to ptid_t. Adjust to
13220 (maybe_attach_thread): Adjust to per-process data and ptids.
13221 (thread_db_find_new_threads): Ditto.
13222 (thread_db_init): Ditto.
13223 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13224 processes table. Adjust to use ptids.
13225 (spu_kill, spu_detach): Adjust interface. Remove process from
13227 (spu_join, spu_thread_alive): Adjust interface.
13228 (spu_wait): Adjust interface. Remove process from processes
13229 table. Adjust to use ptids.
13230 * win32-low.c (current_inferior_tid): Delete.
13231 (current_inferior_ptid): New.
13232 (debug_event_ptid): New.
13233 (thread_rec): Take a ptid. Adjust.
13234 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13235 (child_delete_thread): Ditto.
13236 (do_initial_child_stuff): Add `attached' argument. Add process to
13238 (child_fetch_inferior_registers, child_store_inferior_registers):
13240 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13241 (win32_attach): Pass 1 to do_initial_child_stuff.
13242 (win32_kill): Adjust interface. Remove process from processes
13244 (win32_detach): Ditto.
13245 (win32_join): Adjust interface.
13246 (win32_thread_alive): Take a ptid.
13247 (win32_resume): Adjust to use ptids.
13248 (get_child_debug_event): Ditto.
13249 (win32_wait): Adjust interface. Remove exiting process from
13252 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13254 Non-stop mode support.
13256 * server.h (non_stop): Declare.
13257 (gdb_client_data, handler_func): Declare.
13258 (delete_file_handler, add_file_handler, start_event_loop):
13260 (handle_serial_event, handle_target_event, push_event)
13261 (putpkt_notif): Declare.
13262 * target.h (enum resume_kind): New.
13263 (struct thread_resume): Replace `step' field by `kind' field.
13264 (TARGET_WNOHANG): Define.
13265 (struct target_ops) <wait>: Add `options' argument.
13266 <supports_non_stop, async, start_non_stop>: New fields.
13267 (target_supports_non_stop, target_async): New.
13268 (start_non_stop): Declare.
13269 (mywait): Add `options' argument.
13270 * target.c (mywait): Add `options' argument. Print child exit
13271 notifications here.
13272 (start_non_stop): New.
13273 * server.c (non_stop, own_buf, mem_buf): New globals.
13274 (struct vstop_notif): New.
13275 (notif_queue): New global.
13276 (queue_stop_reply, push_event, discard_queued_stop_replies)
13277 (send_next_stop_reply): New.
13278 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13280 (attach_inferior): In non-stop mode, don't wait for the target
13282 (handle_general_set): Handle QNonStop.
13283 (handle_query): When handling qC, return the current general
13284 thread, instead of the first thread of the list.
13285 (handle_query): If the backend supports non-stop mode, include
13286 QNonStop+ in the qSupported query response.
13287 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13289 (handle_v_attach, handle_v_run): Handle non-stop mode.
13290 (handle_v_stopped): New.
13291 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13292 (myresume): Adjust to use resume_kind. Handle non-stop.
13293 (queue_stop_reply_callback): New.
13294 (handle_status): Handle non-stop mode.
13295 (main): Clear non_stop flag on reconnection. Use the event-loop.
13296 Refactor serial protocol handling from here ...
13297 (process_serial_event): ... to this new function. When GDB
13298 selects any thread, select one here. In non-stop mode, wait until
13299 GDB acks all pending events before exiting.
13300 (handle_serial_event, handle_target_event): New.
13301 * remote-utils.c (remote_open): Install remote_desc in the event
13303 (remote_close): Remove remote_desc from the event loop.
13304 (putpkt_binary): Rename to...
13305 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13306 (putpkt_binary): New as wrapper around putpkt_binary_1.
13307 (putpkt_notif): New.
13308 (prepare_resume_reply): In non-stop mode, don't change the
13310 * event-loop.c: New.
13311 * Makefile.in (OBJ): Add event-loop.o.
13312 (event-loop.o): New rule.
13314 * linux-low.h (pid_of): Moved here.
13316 (get_lwp_thread): Use lwpid_of.
13317 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13318 * linux-low.c (pid_of): Delete.
13319 (inferior_pid): Use lwpid_of.
13320 (linux_event_pipe): New.
13321 (target_is_async_p): New.
13323 (handle_extended_wait): Use lwpid_of.
13324 (add_lwp): Don't set lwpid field.
13325 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13326 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13327 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13328 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13329 first. Adjust to linux_wait_for_event interface changes. Use
13331 (linux_detach): Don't delete the main lwp here.
13332 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13333 (status_pending_p): Don't consider explicitly suspended lwps.
13334 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13335 pointer. Add OPTIONS argument. Change return type to int. Use
13336 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13337 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13338 pointer. Add status pointer argument. Return a pid instead of a
13339 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13340 changes. In non-stop mode, don't switch to a random thread.
13341 (linux_wait): Rename to...
13342 (linux_wait_1): ... this. Add target_options argument, and handle
13343 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13344 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13345 clean exit and signal exit code. Don't stop all threads in
13346 non-stop mode. In all-stop mode, only stop all threads when
13347 reporting a stop to GDB. Handle explicit thread stop requests.
13348 (async_file_flush, async_file_mark): New.
13350 (send_sigstop): Use lwpid_of.
13351 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13352 interface changes. In non-stop mode, don't switch to a random
13354 (linux_resume_one_lwp): Use lwpid_of.
13355 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13356 (linux_resume_one_thread): ... this. Handle resume_stop. In
13357 non-stop mode, don't look for pending flag in all threads.
13358 (resume_status_pending_p): Don't consider explicitly suspended
13360 (my_waitpid): Reimplement. Emulate __WALL.
13361 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13363 (sigchld_handler, linux_supports_non_stop, linux_async)
13364 (linux_start_non_stop): New.
13365 (linux_target_ops): Register linux_supports_non_stop, linux_async
13366 and linux_start_non_stop.
13367 (initialize_low): Install SIGCHLD handler.
13368 * thread-db.c (thread_db_create_event, find_one_thread)
13369 (thread_db_get_tls_address): Use lwpid_of.
13370 * win32-low.c (win32_detach): Adjust to use resume_kind.
13371 (win32_wait): Add `options' argument.
13372 * spu-low.c (spu_resume): Adjust to use resume_kind.
13373 (spu_wait): Add `options' argument.
13375 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13377 Decouple target code from remote protocol.
13379 * target.h (enum target_waitkind): New.
13380 (struct target_waitstatus): New.
13381 (struct target_ops) <wait>: Return an unsigned long. Take a
13382 target_waitstatus pointer instead of a char pointer.
13383 (mywait): Likewise.
13384 * target.c (mywait): Change prototype to return an unsigned long.
13385 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13386 * server.h (thread_from_wait, old_thread_from_wait): Delete
13388 (prepare_resume_reply): Change prototype to take a
13390 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13391 (last_status, last_ptid): New.
13392 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13393 pid instead of a signal.
13394 (attach_inferior): Remove "status" and "signal" parameters.
13396 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13398 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13399 (handle_v_requests, myresume): Remove "status" and "signal"
13400 parameters. Adjust.
13401 (handle_status): New.
13402 (main): Delete local `status'. Adjust.
13403 * remote-utils.c: Include target.h.
13404 (prepare_resume_reply): Change prototype to take a
13405 target_waitstatus. Adjust.
13407 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13409 * spu-low.c (spu_wait): Adjust.
13410 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13412 (win32_wait): Adjust.
13414 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13416 * target.h (struct thread_resume): Delete leave_stopped member.
13417 (struct target_ops): Add a `n' argument to the `resume' callback.
13418 * server.c (start_inferior): Adjust.
13419 (handle_v_cont, myresume): Adjust.
13420 * linux-low.c (check_removed_breakpoint): Adjust to resume
13421 interface change, and to removed leave_stopped field.
13422 (resume_ptr): Delete.
13423 (struct thread_resume_array): New.
13424 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13425 resume interface change.
13426 (linux_continue_one_thread, linux_queue_one_thread)
13427 (resume_status_pending_p): Check if the resume field is NULL
13428 instead of checking the leave_stopped member.
13429 (linux_resume): Adjust to the target resume interface change.
13430 * spu-low.c (spu_resume): Adjust to the target resume interface
13432 * win32-low.c (win32_detach, win32_resume): Ditto.
13434 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13436 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13438 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13440 (linux_continue_one_thread): Only preserve the stepping flag if
13441 there's a pending breakpoint.
13443 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13445 * server.c (main): After the inferior having exited, call
13446 remote_close before exiting gdbserver.
13448 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13450 Fix size of FPSCR in Power 7 processors.
13451 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13452 (PPC_FEATURE_HAS_DFP): New #define.
13453 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13456 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13458 * server.c (handle_query) Whitespace and formatting.
13460 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13462 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13463 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13464 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13465 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13466 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13467 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13468 Makefile.in, configure.ac: Fix whitespace throughout.
13469 * configure: Regenerate.
13471 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13473 * inferiors.c (find_inferior): Make it safe for the callback
13474 function to delete the currently iterated inferior.
13476 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13478 * Makefile.in (linuw_low_h): Move higher.
13479 (thread-db.o): Depend on $(linux_low_h).
13481 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13483 Rename "process" to "lwp" throughout.
13485 * linux-low.c (all_processes): Rename to...
13486 (all_lwps): ... this.
13487 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13488 (add_process): Rename to ...
13489 (add_lwp): ... this. Adjust.
13490 (linux_create_inferior): Adjust.
13491 (linux_attach_lwp): Adjust.
13492 (linux_attach): Adjust.
13493 (linux_kill_one_process): Rename to ...
13494 (linux_kill_one_lwp): ... this. Adjust.
13495 (linux_kill): Adjust.
13496 (linux_detach_one_process): Rename to ...
13497 (linux_detach_one_lwp): ... this. Adjust.
13498 (linux_detach): Adjust.
13499 (check_removed_breakpoint): Adjust.
13500 (status_pending_p): Adjust.
13501 (linux_wait_for_process): Rename to ...
13502 (linux_wait_for_lwp): ... this. Adjust.
13503 (linux_wait_for_event): Adjust.
13504 (send_sigstop): Adjust.
13505 (wait_for_sigstop): Adjust.
13506 (stop_all_processes): Rename to ...
13507 (stop_all_lwps): ... this.
13508 (linux_resume_one_process): Rename to ...
13509 (linux_resume_one_lwp): ... this. Adjust.
13510 (linux_set_resume_request, linux_continue_one_thread)
13511 (linux_queue_one_thread, resume_status_pending_p)
13512 (usr_store_inferior_registers, regsets_store_inferior_registers)
13513 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13515 * linux-low.h (get_process): Rename to ...
13516 (get_lwp): ... this. Adjust.
13517 (get_thread_process): Rename to ...
13518 (get_thread_lwp): ... this. Adjust.
13519 (get_process_thread): Rename to ...
13520 (get_lwp_thread): ... this. Adjust.
13521 (struct process_info): Rename to ...
13522 (struct lwp_info): ... this.
13523 (all_processes): Rename to ...
13524 (all_lwps): ... this.
13525 * proc-service.c (ps_lgetregs): Adjust.
13526 * thread-db.c (thread_db_create_event, find_one_thread)
13527 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13529 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13531 * server.c (handle_query): Handle "qAttached".
13533 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13535 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13536 GPLv3, update license URL.
13538 2009-03-01 Doug Evans <dje@google.com>
13540 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13541 (server_h): Add gdb_signals.h.
13542 (signals.o): Update.
13543 * server.h (target_signal_from_host,target_signal_to_host_p)
13544 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13546 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13548 * remote-utils.c (getpkt): Also generate remote-debug
13549 information if noack_mode is set.
13551 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13553 * server.c (handle_query): Report qXfer:siginfo:read and
13554 qXfer:siginfo:write as supported and handle them.
13555 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13556 * linux-low.c (linux_xfer_siginfo): New.
13557 (linux_target_ops): Set it.
13559 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13561 * server.c (gdbserver_usage): Mention --remote-debug.
13562 (main): Accept '--remote-debug' switch.
13564 2009-01-18 Doug Evans <dje@google.com>
13566 * regcache.c (new_register_cache): No need to check result of xcalloc.
13567 * server.c (handle_search_memory): Back out calls to xmalloc,
13568 result is checked and error is returned to user upon failure.
13569 (handle_query): Ditto. Add more checks for result of malloc.
13570 (handle_v_cont): Check result of malloc, report error back to
13572 (handle_v_run): Ditto. Call freeargv.
13573 * server.h (freeargv): Declare.
13574 * utils.c (freeargv): New fn.
13576 2009-01-15 Doug Evans <dje@google.com>
13578 * gdbreplay.c (perror_with_name): Make arg const char *.
13579 * server.h (target_signal_to_name): Make return type const char *.
13580 * thread-db.c (thread_db_err_str): Make return type const char *.
13581 * utils.c (perror_with_name): Make arg const char *.
13583 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13585 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13586 when handling a EXIT_PROCESS_DEBUG_EVENT.
13588 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13590 * gdbreplay.c (gdbreplay_version): Update copyright year.
13591 * server.c (gdbserver_version): Likewise.
13593 2009-01-05 Doug Evans <dje@google.com>
13595 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13596 (handle_extended_wait): Improve comment.
13598 2008-12-13 Doug Evans <dje@google.com>
13600 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13601 * server.h (ATTR_MALLOC): New macro.
13602 (xmalloc,xcalloc,xstrdup): Declare.
13603 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13604 * inferiors.c: Ditto.
13605 * linux-low.c: Ditto.
13606 * mem-break.c: Ditto.
13607 * regcache.c: Ditto.
13608 * remote-utils.c: Ditto.
13611 * win32-low.c: Ditto.
13613 2008-12-12 Doug Evans <dje@google.com>
13615 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13616 in debugging printf.
13618 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13620 2008-12-09 Doug Evans <dje@google.com>
13622 * linux-low.h (struct process_info): Delete member tid, unused.
13623 * thread-db.c (find_one_thread): Update.
13624 (maybe_attach_thread): Update.
13626 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13628 * target.h (struct target_ops): Add qxfer_osdata member.
13629 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13631 (linux_qxfer_osdata): New functions.
13632 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13634 * server.c (handle_query): Handle "qXfer:osdata:read:".
13635 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13636 (buffer_xml_printf): New functions.
13637 * server.h (struct buffer): New.
13638 (buffer_grow_str, buffer_grow_str0): New macros.
13639 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13640 (buffer_xml_printf): Declare.
13642 2008-11-24 Doug Evans <dje@google.com>
13644 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13646 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13648 * server.c (handle_v_run): Always use the supplied argument list.
13650 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13652 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13653 (xtensa_regmap_table): Add entry for scompare1.
13655 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13657 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13658 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13659 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13660 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13661 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13662 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13663 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13664 XML target descriptions.
13665 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13666 when inferior is running on an ISA 2.05 or later processor. Add
13667 special case to return offset for full 64-bit slot of FPSCR when
13670 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13672 * Makefile.in (SFILES, clean): Added sparc64 files.
13673 (reg-sparc64.o, reg-sparc64.c): New.
13674 * configure.srv (sparc*-*-linux*): New configuration.
13675 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13676 syscall arguments for SPARC.
13677 (regsets_store_inferior_registers): Likewise.
13678 * linux-sparc-low.c: New file.
13680 2008-10-21 Doug Evans <dje@google.com>
13682 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13683 (READLINE_DIR,READLINE_DEP): Delete.
13684 (INTERNAL_CFLAGS): Update.
13685 (LINTFLAGS): Update.
13687 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13689 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13690 whole argv from the last run, not just argv[0].
13692 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13694 * regcache.c (new_register_cache): Return NULL if the register
13695 cache size isn't known yet.
13696 (free_register_cache): Avoid dereferencing a NULL regcache.
13698 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13700 * configure.srv: Merge MIPS and MIPS64.
13702 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13704 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13706 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13708 * Makefile.in: Add required vsx dependencies.
13710 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13711 Declare init_registers_powerpc_vsx32l.
13712 Declare init_registers_powerpc_vsx64l.
13713 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13714 (ppc_arch_setup): Check for VSX in hwcap.
13715 (ppc_fill_vsxregset): New function.
13716 (ppc_store_vsxregset): New function.
13717 Add new VSX entry in regset_info target_regsets.
13719 * configure.srv: Add new VSX dependencies.
13721 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13723 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13724 (remote_open): Set or clear transport_is_reliable.
13725 (putpkt_binary): Don't expect acks in noack mode.
13726 (getpkt): Don't send ack/nac in noack mode.
13727 * server.c (handle_general_set): Handle QStartNoAckMode.
13728 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13730 (main): Reset noack_mode on every connection.
13731 * server.h (noack_mode): Declare.
13733 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13735 * Makefile.in (GDBREPLAY_OBS): New variable.
13736 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13738 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13739 Daniel Jacobowitz <dan@codesourcery.com>
13741 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13742 (usr_store_inferior_registers): Likewise.
13743 (regsets_store_inferior_registers): Likewise.
13745 2008-07-31 Rolf Jansen <rj@surtec.com>
13746 Pedro Alves <pedro@codesourcery.com>
13748 * configure.ac: Check for memmem declaration.
13749 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13750 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13751 (disable_packet_qfThreadInfo): Unconditionally compile.
13752 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13753 * configure, config.in: Regenerate.
13755 2008-07-28 Doug Kwan <dougkwan@google.com>
13757 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13758 (linux_write_memory): Remove declaration of errno.
13760 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13762 * linux-low.c (handle_extended_wait): Do not use "status"
13763 variable uninitialized.
13765 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13767 * server.c (handle_v_attach): Inhibit reporting dll changes.
13769 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13771 * remote-utils.c (prepare_resume_reply): If requested, don't
13772 output "thread:TID" in the T stop reply.
13774 * server.c (disable_packet_vCont, disable_packet_Tthread)
13775 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13776 (handle_query): If requested, disable support for qC, qfThreadInfo
13778 (handle_v_requests): If requested, disable support for vCont.
13779 (gdbserver_show_disableable): New.
13780 (main): Handle --disable-packet and --disable-packet=LIST.
13782 * server.h (disable_packet_vCont, disable_packet_Tthread)
13783 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13785 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13787 * server.c (gdbserver_usage): Mention --version.
13789 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13791 * Makefile.in (gdbreplay.o): New rule.
13793 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13795 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13796 message, not gdbserver.
13798 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13799 Nathan Sidwell <nathan@codesourcery.com>
13800 Joseph Myers <joseph@codesourcery.com>
13802 * acinclude.m4: Include ../../config/acx.m4.
13803 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13804 * configure, config.in: Regenerate.
13805 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13806 * server.c (gdbserver_version): Print PKGVERSION.
13807 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13808 (main): Adjust gdbserver_usage calls.
13809 * gdbreplay.c (version, host_name): Add declarations.
13810 (gdbreplay_version, gdbreplay_usage): New.
13811 (main): Accept --version and --help options.
13813 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13815 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13816 (arm_breakpoint_at): Handle Thumb.
13817 (the_low_target): Add comment.
13819 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13821 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13823 2008-05-09 Doug Evans <dje@google.com>
13825 * server.h (decode_search_memory_packet): Declare.
13826 * remote-utils.c (decode_search_memory_packet): New fn.
13827 * server.c (handle_search_memory_1): New fn.
13828 (handle_search_memory): New fn.
13829 (handle_query): Process qSearch:memory packets.
13831 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13833 * regcache.c (registers_length): Remove.
13834 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13835 full register packet.
13836 * regcache.h (registers_length): Remove prototype.
13837 * server.h (PBUFSIZ): Define to 16384.
13839 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13841 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13842 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13843 powerpc-64l.o, and powerpc-altivec64l.o.
13844 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13845 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13846 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13847 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13848 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13851 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13852 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13853 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13854 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13855 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13856 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13857 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13858 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13859 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13860 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13863 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13864 (init_registers_powerpc_32l): ... this new prototype.
13865 (init_registers_powerpc_32): Remove, replace by ...
13866 (init_registers_powerpc_altivec32l): ... this new prototype.
13867 (init_registers_powerpc_e500): Remove, replace by ...
13868 (init_registers_powerpc_e500l): ... this new prototype.
13869 (init_registers_ppc64): Remove, replace by ...
13870 (init_registers_powerpc_64l): ... this new prototype.
13871 (init_registers_powerpc_64): Remove, replace by ...
13872 (init_registers_powerpc_altivec64l): ... this new prototype.
13873 (ppc_num_regs): Set to 73.
13874 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13875 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13876 (ppc_cannot_store_register): Handle orig_r3 and trap.
13877 (ppc_arch_setup): Update init_registers_... calls.
13878 (ppc_fill_gregset): Handle orig_r3 and trap.
13880 * inferiors.c (clear_inferiors): Reset current_inferior.
13882 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13884 * acinclude.m4: Add override.m4.
13885 * configure: Regenerate.
13887 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13889 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13890 initial call to init_register_ppc64.
13892 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13894 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13895 single powerpc*-*-linux* case.
13896 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13898 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13900 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13901 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13903 * linux-ppc-low.c: Include <elf.h>.
13904 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13905 (ppc_hwcap): New global variable.
13906 (ppc_regmap): Remove __SPE__ #ifdef sections.
13907 (ppc_regmap_e500): New global variable.
13908 (ppc_cannot_store_register): Update __SPE__ special case.
13909 (ppc_get_hwcap): New function.
13910 (ppc_arch_setup): Use it to determine whether inferior supports
13911 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13912 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13913 Do not access registers if target does not support AltiVec.
13914 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13915 Do not access registers if target does not support SPE.
13916 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13918 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13920 * linux-low.c (disabled_regsets, num_regsets): New.
13921 (use_regsets_p): Delete.
13922 (linux_wait_for_process): Clear disabled_regsets.
13923 (regsets_fetch_inferior_registers): Check and set it.
13924 (regsets_store_inferior_registers): Likewise.
13925 (linux_fetch_registers, linux_store_registers): Do not use
13927 (initialize_low): Allocate disabled_regsets.
13929 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13931 * Makefile.in (LIBOBJS): New.
13932 (OBS): Use LIBOBJS.
13933 (memmem.o): New rule.
13934 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13935 * configure: Regenerated.
13937 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13939 * server.c (handle_query): Never return "unsupported" for
13940 qXfer:features:read queries.
13942 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13944 * server.c (get_features_xml): Fix inverted condition.
13945 (handle_query): Always support qXfer:feature:read.
13947 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13949 * server.c (wrapper_argv): New.
13950 (start_inferior): Handle wrapper_argv. If set, expect an extra
13952 (gdbserver_usage): Document --wrapper.
13953 (main): Parse --wrapper.
13955 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13957 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13958 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13959 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13960 (ppc_set_pc): Likewise.
13961 (ppc_arch_setup): New function.
13962 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13963 of collect_register.
13964 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13966 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13968 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13969 instead of linux-ppc64-low.o.
13970 * linux-ppc64-low.c: Remove file.
13971 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13972 (linux-ppc64-low.o): Remove rule.
13974 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13975 (init_registers_powerpc_64): Likewise.
13976 (ppc_regmap): Conditionally define depending on __powerpc64__.
13977 (ppc_cannot_store_register): Do not special-case "fpscr" when
13978 compiled on __powerpc64__.
13979 (ppc_collect_ptrace_register): New function.
13980 (ppc_supply_ptrace_register): New function.
13981 (ppc_breakpoint): Change type to "unsigned int".
13982 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13983 (the_low_target): Conditionally provide initializers for the
13984 arch_setup member depending on __powerpc64__. Install
13985 collect_ptrace_register and supply_ptrace_register members.
13987 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13989 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13990 * server.c (gdbserver_xmltarget): Define.
13991 (get_features_xml): Use it to replace "target.xml" and arch_string.
13993 * configure.srv: Remove srv_xmltarget. Add XML files that were
13994 mentioned there to srv_xmlfiles instead. Remove conditional tests
13995 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13996 srv_xmlfiles and srv_regobj to include all possible choices.
13997 * configure.ac (srv_xmltarget): Remove.
13998 (srv_xmlfiles): Do not add "target.xml".
13999 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14000 checks for supplementary target information.
14001 * configure: Regenerate.
14002 * Makefile.in (XML_TARGET): Remove.
14003 (target.xml): Remove rule.
14004 (clean): Do not clean up target.xml.
14005 (.PRECIOUS): Do not mention target.xml.
14007 * target.h (struct target_ops): Remove arch_string member.
14008 * linux-low.c (linux_arch_string): Remove.
14009 (linux_target_ops): Remove arch_string initializer.
14010 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14011 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14012 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14013 * spu-low.c (spu_arch_string): Remove.
14014 (spu_target_ops): Remove arch_string initializer.
14015 * win32-low.c (win32_arch_string): Remove.
14016 (win32_target_ops): Remove arch_string initializer.
14017 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14018 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14019 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14021 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14023 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14024 by collect_ptrace_register and supply_ptrace_register hooks.
14025 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14026 instead of checking for the_low_target.left_pad_xfer.
14027 (usr_store_inferior_registers): Use collect_ptrace_register callback
14028 instead of checking for the_low_target.left_pad_xfer.
14030 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14031 (s390_supply_ptrace_register): Likewise.
14032 (s390_fill_gregset): Call s390_collect_ptrace_register.
14033 (the_low_target): Update.
14035 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14036 (ppc_supply_ptrace_register): Likewise.
14037 (the_low_target): Update.
14039 * linux-i386-low.c (the_low_target): Update.
14040 * linux-x86-64-low.c (the_low_target): Update.
14042 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14044 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14045 reg-s390.o and reg-s390x.o.
14047 * linux-low.c (new_inferior): New global variable.
14048 (linux_create_inferior, linux_attach): Set it.
14049 (linux_wait_for_process): Call the_low_target.arch_setup after the
14050 target has stopped for the first time.
14051 (initialize_low): Do not call the_low_target.arch_setup.
14053 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14054 (s390_set_pc): Likewise.
14055 (s390_arch_setup): New function.
14056 (the_low_target): Use s390_arch_setup as arch_setup routine.
14058 * regcache.c (realloc_register_cache): New function.
14059 (set_register_cache): Call it for each existing regcache.
14061 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14063 * server.h (init_registers): Remove prototype.
14065 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14066 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14067 instead of init_registers ().
14068 * linux-arm-low.c (init_registers_arm): Add prototype.
14069 (init_registers_arm_with_iwmmxt): Likewise.
14070 (the_low_target): Add initializer for arch_setup field.
14071 * linux-cris-low.c (init_registers_cris): Add prototype.
14072 (the_low_target): Add initializer for arch_setup field.
14073 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14074 (the_low_target): Add initializer for arch_setup field.
14075 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14076 (the_low_target): Add initializer for arch_setup field.
14077 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14078 (the_low_target): Add initializer for arch_setup field.
14079 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14080 (the_low_target): Add initializer for arch_setup field.
14081 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14082 (the_low_target): Add initializer for arch_setup field.
14083 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14084 (init_registers_mips64_linux): Likewise.
14085 (the_low_target): Add initializer for arch_setup field.
14086 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14087 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14088 (the_low_target): Add initializer for arch_setup field.
14089 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14090 (init_registers_powerpc_64): Likewise.
14091 (the_low_target): Add initializer for arch_setup field.
14092 * linux-s390-low.c (init_registers_s390): Add prototype.
14093 (init_registers_s390x): Likewise.
14094 (the_low_target): Add initializer for arch_setup field.
14095 * linux-sh-low.c (init_registers_sh): Add prototype.
14096 (the_low_target): Add initializer for arch_setup field.
14097 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14098 (the_low_target): Add initializer for arch_setup field.
14099 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14100 (the_low_target): Add initializer for arch_setup field.
14102 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14103 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14104 instead of init_registers ().
14105 * win32-arm-low.c (init_registers_arm): Add prototype.
14106 (the_low_target): Add initializer for arch_setup field.
14107 * win32-i386-low.c (init_registers_i386): Add prototype.
14108 (the_low_target): Add initializer for arch_setup field.
14110 * spu-low.c (init_registers_spu): Add prototype.
14111 (initialize_low): Call initialie_registers_spu () instead of
14112 initialize_registers ().
14114 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14116 * server.c (handle_v_requests): When handling the vRun and vAttach
14117 packets, if already debugging a process, don't kill it. Return an
14120 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14122 * server.c (handle_query): Correct length check.
14124 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14126 * win32-low.c (do_initial_child_stuff): Add process handle
14127 parameter. Set current_process_handle and current_process_id from the
14128 parameters. Clear globals.
14129 (win32_create_inferior): Don't set current_process_handle and
14130 current_process_id here. Instead pass them on the call to
14131 do_initial_child_stuff.
14132 (win32_attach): Likewise.
14133 (win32_clear_inferiors): New.
14134 (win32_kill): Don't close the current process handle or the
14135 current thread handle here. Instead call win32_clear_inferiors.
14136 (win32_detach): Don't open a new handle to the process. Call
14137 win32_clear_inferiors.
14138 (win32_join): Don't rely on current_process_handle; open a new
14139 handle using the process id.
14140 (win32_wait): Call win32_clear_inferiors when the inferior process
14143 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14145 * server.c (monitor_show_help): Add "exit".
14147 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14149 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14150 (clean): Add reg-xtensa.c.
14151 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14152 * configure.srv (xtensa*-*-linux*) New target.
14153 * linux-xtensa-low.c: New.
14154 * xtensa-xtregs.c: New.
14156 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14158 * hostio.c: Don't include errno.h.
14159 (errno_to_fileio_errno): Move to hostio-errno.
14160 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14161 error number outputting to the target->hostio_last_error callback.
14162 (hostio_packet_error): Use FILEIO_EINVAL directly.
14163 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14164 calls to hostio_error.
14165 * hostio-errno.c: New.
14166 * server.h (hostio_last_error_from_errno): Declare.
14167 * target.h (target_ops): Add hostio_last_error member.
14168 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14169 as hostio_last_error handler.
14170 * spu-low.c (spu_target_ops): Likewise.
14171 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14172 (wince_hostio_last_error): New functions.
14173 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14174 as hostio_last_error handler.
14175 (win32_target_ops) [!_WIN32_WCE]: Register
14176 hostio_last_error_from_errno as hostio_last_error handler.
14177 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14178 (hostio-errno.o): New rule.
14179 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14180 * configure.srv (srv_hostio_err_objs): New variable. Default to
14182 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14183 * configure: Regenerate.
14185 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14187 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14188 (linux_kill, linux_detach): Clean up the process list.
14189 * remote-utils.c (remote_open): Improve port number parsing.
14190 (putpkt_binary, input_interrupt): Only send interrupts if the target
14192 * server.c (extended_protocol): Make static.
14193 (attached): Define earlier.
14194 (exit_requested, response_needed, program_argv): New variables.
14195 (target_running): New.
14196 (start_inferior): Clear attached here.
14197 (attach_inferior): Set attached here.
14198 (require_running): Define.
14199 (handle_query): Use require_running and target_running. Implement
14201 (handle_v_attach, handle_v_run): New.
14202 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14203 (gdbserver_usage): Update.
14204 (main): Redo argument parsing. Handle --debug and --multi. Handle
14205 --attach along with other options or after the port. Save
14206 program_argv. Support no initial program. Resynchronize
14207 communication with GDB after an error. Handle "monitor exit".
14208 Use require_running and target_running. Always allow the extended
14209 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14210 restart in extended mode.
14211 * README: Refer to the GDB manual. Update --attach usage.
14213 2007-12-20 Andreas Schwab <schwab@suse.de>
14215 * linux-low.c (STACK_SIZE): Define.
14216 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14217 (linux_test_for_tracefork): Likewise.
14219 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14221 * linux-low.c (linux_wait_for_event): Update messages. Do not
14222 reinsert auto-delete breakpoints.
14223 * mem-break.c (struct breakpoint): Change return type of handler to
14225 (set_breakpoint_at): Update handler type.
14226 (reinsert_breakpoint_handler): Return 1 instead of calling
14228 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14230 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14231 * mem-break.h (set_breakpoint_at): Update handler type.
14232 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14233 * win32-low.c (auto_delete_breakpoint): New.
14234 (get_child_debug_event): Use it.
14236 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14238 * configure.ac: Check for pread and pwrite.
14239 * hostio.c (handle_pread): Fall back to lseek and read.
14240 (handle_pwrite): Fall back to lseek and write.
14241 * config.in, configure: Regenerated.
14243 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14245 * server.c (myresume): Add own_buf argument.
14246 (main): Update calls.
14248 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14250 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14251 * remote-utils.c (remote_open): Do not call disable_async_io.
14252 (block_async_io): Delete.
14253 (unblock_async_io): Make static.
14254 (initialize_async_io): New.
14255 * server.c (handle_v_cont): Handle async I/O here.
14256 (myresume): Likewise. Move other common resume tasks here...
14257 (main): ... from here. Call initialize_async_io. Disable async
14258 I/O before the main loop.
14259 * server.h (initialize_async_io): Declare.
14260 (block_async_io, unblock_async_io): Delete prototypes.
14261 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14263 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14265 * remote-utils.c (readchar): Allow binary data in received messages.
14267 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14269 * win32-low.c (attaching): New global.
14270 (win32_create_inferior): Clear the `attaching' global.
14271 (win32_attach): Set the `attaching' global.
14272 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14273 attaching. Only set a breakpoint at the entry point if not
14276 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14278 * server.c (main): Don't report dll events on the initial
14279 connection on attaches.
14281 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14283 * server.c (main): Relax numerical bases supported for the pid of
14284 the --attach command line argument.
14286 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14288 * win32-low.c (win32_attach): Call OpenProcess before
14289 DebugActiveProcess, not after. Add last error output to error
14292 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14294 * win32-low.c (win32_get_thread_context)
14295 (win32_set_thread_context): New functions.
14296 (thread_rec): Use win32_get_thread_context.
14297 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14298 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14301 2007-12-03 Leo Zayas
14302 Pedro Alves <pedro_alves@portugalmail.pt>
14304 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14306 (child_add_thread): Minor cleanup.
14307 (child_continue): Resume artificially suspended threads before
14308 calling ContinueDebugEvent.
14309 (suspend_one_thread): New.
14310 (fake_breakpoint_event): New.
14311 (get_child_debug_event): Change return type to int. Check here if
14312 gdb sent an interrupt request. If a soft interrupt was requested,
14313 fake a breakpoint event. Return 0 if there is no event to handle,
14315 (win32_wait): Don't check here if gdb sent an interrupt request.
14316 Ensure there is a valid event to handle.
14317 (win32_request_interrupt): Add soft interruption method as last
14320 2007-12-03 Leo Zayas
14321 Pedro Alves <pedro_alves@portugalmail.pt>
14323 * win32-low.h (win32_thread_info): Add descriptions to the
14324 structure members. Replace `suspend_count' counter by a
14326 * win32-low.c (thread_rec): Update condition of when to get the
14327 context from the inferior. Rely on ContextFlags being set if it
14328 has already been retrieved. Only suspend the inferior thread if
14329 we haven't already. Warn if that fails.
14330 (continue_one_thread): s/suspend_count/suspended/. Only call
14331 ResumeThread once. Warn if that fails.
14333 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14335 * win32-low.c (win32_wait): Don't read from the inferior when it
14336 has already exited.
14338 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14340 * Makefile.in (win32_low_h): New variable.
14341 (win32-low.o): Add dependency on $(win32_low_h).
14342 (win32-arm-low.o, win32-i386-low.o): New rules.
14344 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14346 * hostio.c: Correct copyright year.
14348 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14350 * Makefile.in (OBS): Add hostio.o.
14351 (hostio.o): New rule.
14352 * server.h (handle_vFile): Declare.
14353 * hostio.c: New file.
14354 * server.c (handle_v_requests): Take packet_len and new_packet_len
14355 for binary packets. Call handle_vFile.
14356 (main): Update call to handle_v_requests.
14358 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14360 * linux-low.c: Include <sched.h>.
14362 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14364 * linux-low.c (linux_tracefork_grandchild): New.
14365 (linux_tracefork_child): Use clone.
14366 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14368 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14370 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14372 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14374 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14376 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14378 * inferiors.c (change_inferior_id): Delete.
14379 (add_pid_to_list, pull_pid_from_list): New.
14380 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14381 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14382 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14383 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14384 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14385 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14386 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14387 (using_threads): Always set to 1.
14388 (handle_extended_wait): New.
14389 (add_process): Do not set TID.
14390 (linux_create_inferior): Set must_set_ptrace_flags.
14391 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14392 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14393 (linux_thread_alive): Rename TID argument to LWPID.
14394 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14395 (linux_wait_for_event): Do not use TID or check using_threads. Update
14396 call to dead_thread_notify. Call handle_extended_wait.
14397 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14398 (send_sigstop): Delete sigstop_sent.
14399 (wait_for_sigstop): Avoid TID.
14400 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14401 (linux_test_for_tracefork): New.
14402 (linux_lookup_signals): Use thread_db_active and
14403 linux_supports_tracefork_flag.
14404 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14405 * linux-low.h (get_process_thread): Avoid TID.
14406 (struct process_ifo): Move thread_known and tid to the end. Remove
14408 (linux_attach_lwp, thread_db_init): Update prototypes.
14409 * server.h (change_inferior_id): Delete prototype.
14410 (add_pid_to_list, pull_pid_from_list): New prototypes.
14411 * thread-db.c (thread_db_use_events): New.
14412 (find_first_thread): Rename to...
14413 (find_one_thread): ...this. Update callers and messages. Do not
14414 call fatal. Check thread_db_use_events. Do not call
14415 change_inferior_id or new_thread_notify.
14416 (maybe_attach_thread): Update. Do not call new_thread_notify.
14417 (thread_db_init): Set thread_db_use_events. Check use_events.
14418 * utils.c (fatal, warning): Correct message prefix.
14420 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14422 * Makefile.in (clean): Remove new files.
14423 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14424 (powerpc-64.o, powerpc-64.c): New rules.
14425 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14426 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14428 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14430 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14431 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14432 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14433 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14434 (target_regsets): Add AltiVec and SPE register sets.
14435 * configure.ac: Check for AltiVec and SPE.
14436 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14437 (ppc_fill_vrregset, ppc_store_vrregset): New.
14438 (target_regsets): Add AltiVec register set.
14439 * configure: Regenerated.
14441 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14443 * linux-low.c (O_LARGEFILE): Define.
14444 (linux_read_memory): Use /proc/PID/mem.
14445 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14446 * configure, config.in: Regenerated.
14448 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14450 * linux-low.c (linux_wait_for_event): Do not pass signals while
14453 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14455 * win32-low.c (create_process): New.
14456 (win32_create_inferior): Use create_process instead of
14457 CreateProcess. If create_process failed retry appending an ".exe"
14458 suffix. Store the GetLastError result immediatelly after
14459 create_process calls and use it on the call to error.
14461 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14463 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14465 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14467 * configure.ac: Switch license to GPLv3.
14469 2007-08-01 Michael Snyder <msnyder@access-company.com>
14471 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14473 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14475 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14477 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14478 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14479 CloseToolhelp32Snapshot.
14480 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14481 CloseToolhelp32Snapshot.
14483 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14485 * server.c (main): Check for inferior exit before main loop.
14487 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14489 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14490 instead of on tmp_desc.
14492 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14493 Daniel Jacobowitz <dan@codesourcery.com>
14495 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14496 (add_thread): Minor cleanups.
14497 (clear_inferiors): Move lower in the file. Clear the DLL
14499 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14500 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14501 (xml_escape_text): New.
14502 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14504 (handle_v_cont): Report errors.
14505 (gdbserver_version): Update.
14506 (main): Correct size of own_buf. Do not report initial DLL events.
14507 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14508 (unloaded_dll, xml_escape_text): New.
14509 * win32-low.c (enum target_waitkind): Update comments.
14510 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14511 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14512 (win32_EnumProcessModules, win32_GetModuleInformation)
14513 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14514 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14515 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14516 (win32_Module32First, win32_Module32Next, load_toolhelp)
14517 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14518 (get_child_debug_event): Handle DLL events.
14519 (win32_wait): Likewise.
14521 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14523 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14524 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14526 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14528 * win32-low.c (handle_output_debug_string): Ignore event if not
14531 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14533 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14535 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14537 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14539 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14541 * inferiors.c (change_inferior_id): Add comment.
14542 * linux-low.c (check_removed_breakpoint): Add an early
14543 prototype. Improve debug output.
14544 (linux_attach): Doc update.
14545 (linux_detach_one_process, linux_detach): Clean up before releasing
14547 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14548 * linux-low.h (struct process_info): Doc improvement.
14549 * mem-break.c (delete_all_breakpoints): New.
14550 * mem-break.h (delete_all_breakpoints): New prototype.
14551 * thread-db.c (find_first_thread): New.
14552 (thread_db_create_event): Call it instead of
14553 thread_db_find_new_threads. Clean up unused variables.
14554 (maybe_attach_thread): Remove first thread handling.
14555 (thread_db_find_new_threads): Use find_first_thread.
14556 (thread_db_get_tls_address): Likewise.
14558 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14560 * thread-db.c (thread_db_find_new_threads): Add prototype.
14561 (thread_db_create_event): Check for the main thread before adding
14563 (maybe_attach_thread): Only enable event reporting if TID == 0.
14564 (thread_db_get_tls_address): Check for new threads.
14566 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14568 * linux-low.c (linux_create_inferior): Try execv before execvp.
14569 * spu-low.c (spu_create_inferior): Likewise.
14571 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14573 * linux-low.c (linux_create_inferior): Change execv to execvp.
14574 * spu-low.c (spu_create_inferior): Likewies.
14576 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14578 * Makefile.in (clean): Clean new files instead of deleted ones.
14579 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14580 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14582 * configure.srv: Specify XML files and new regformats for MIPS and
14584 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14585 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14586 an entry for the restart register.
14587 (mips_cannot_fetch_register, mips_cannot_store_register)
14588 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14589 register names to match the XML descriptions.
14590 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14591 restart register instead of $0.
14593 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14594 Markus Deuling <deuling@de.ibm.com>
14596 * remote-utils.c (decode_xfer_write): New function.
14597 * server.h (decode_xfer_write): Add prototype.
14598 * server.c (handle_query): Add PACKET_LEN argument. Support
14599 qXfer:spu:read and qXfer:spu:write packets.
14600 (main): Pass packet_len to handle_query.
14601 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14602 * target.h (target_ops): Add qxfer_spu.
14604 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14606 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14607 accessing non-seekable spufs files.
14609 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14611 * server.c (handle_query): Add reply for qC packet.
14613 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14614 Leo Zayas <lerele@champenstudios@com>
14616 * server.h (check_remote_input_interrupt_request): New function.
14617 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14618 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14619 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14620 (check_remote_input_interrupt_request): New function.
14621 * server.h (check_remote_input_interrupt_request): Declare.
14622 * win32-low.c (winapi_DebugBreakProcess,
14623 winapi_GenerateConsoleCtrlEvent): New typedefs.
14624 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14626 (win32_wait): Check for remote interrupt request
14627 with check_remote_input_interrupt_request.
14628 (win32_request_interrupt): New function.
14629 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14631 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14633 * win32-low.c (debug_registers_changed,
14634 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14635 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14636 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14637 (thread_rec): Get context using the low target.
14638 (child_add_thread): Call thread_added on the low target,
14639 which does the same thing.
14641 (do_initial_child_stuff): Remove debug registers references.
14642 Set context using the low target. Resume threads after
14643 setting the contexts.
14644 (child_continue): Remove dead variable. Remove debug
14645 registers references.
14646 (child_fetch_inferior_registers): Go through the low target.
14647 (do_child_store_inferior_registers): Remove.
14648 (child_store_inferior_registers): Go through the low target.
14649 (win32_resume): Remove debug registers references.
14650 Set context using the low target.
14651 (handle_exception): Change return type to void. Don't record
14652 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14653 first chance exception.
14654 (get_child_debug_event): Change return type to void. Remove
14655 goto loop. Always return after waiting for debug event.
14656 (win32_wait): Convert to switch statement. Handle spurious
14659 * win32-i386-low.c (debug_registers_changed,
14660 debug_registers_used): New.
14661 (initial_stuff): Rename to ...
14662 (i386_initial_stuff): ... this. Clear debug registers
14664 (store_debug_registers): Delete.
14665 (i386_get_thread_context): New.
14666 (load_debug_registers): Delete.
14667 (i386_set_thread_context): New.
14668 (i386_thread_added): New.
14669 (single_step): Rename to ...
14670 (i386_single_step): ... this.
14671 (do_fetch_inferior_registers): Rename to ...
14672 (i386_fetch_inferior_register): ... this.
14673 (i386_store_inferior_register): New.
14674 (the_low_target): Adapt to new interface.
14676 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14677 (arm_get_thread_context): New.
14678 (arm_set_thread_context): New.
14680 (do_fetch_inferior_registers): Rename to ...
14681 (arm_fetch_inferior_register): ... this.
14682 (arm_store_inferior_register): New.
14683 (arm_wince_breakpoint): Reimplement as unsigned long.
14684 (arm_wince_breakpoint_len): Define.
14685 (the_low_target): Adapt to new interface.
14687 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14688 load_debug_registers. Add get_thread_context, set_thread_context,
14689 thread_added and store_inferior_register. Rename
14690 fetch_inferior_registers to fetch_inferior_register.
14691 (regptr): Remove declaration.
14693 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14695 * linux-low.c (linux_detach): Change return type to int. Return 0.
14696 * spu-low.c (spu_detach): Likewise.
14698 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14700 * target.h (target_ops): Change return type of detach to int.
14702 (join_inferior): New.
14703 * server.c (main): Don't skip detach support on mingw32.
14704 If the inferior doesn't support detaching return error.
14705 Call join_inferior instead of using waitpid.
14706 * linux-low.c (linux_join): New.
14707 (linux_target_op): Add linux_join.
14708 * spu-low.c (spu_join): New.
14709 (spu_target_ops): Add spu_join.
14710 * win32-low.c (win32_detach): Adapt to new interface.
14711 Reopen current_process_handle before detaching. Issue a child
14712 resume before detaching.
14714 (win32_target_op): Add win32_join.
14716 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14718 * win32-low.c (win32-attach): Fix return value.
14719 * target.h (target_ops): Describe ATTACH return values.
14721 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14723 * win32-low.c (GETPROCADDRESS): Define.
14724 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14725 (winapi_DebugSetProcessKillOnExit): Likewise.
14726 (win32_create_inferior): Force usage of ansi CreateProcessA.
14727 (win32_attach): Use GETPROCADDRESS.
14728 (win32_detach): Likewise.
14730 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14732 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14734 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14736 * win32-low.c: Commit leftover changes from 2007-03-29.
14738 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14740 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14741 fields short instead of int. Add explicit padding.
14742 (i387_cache_to_fsave): Remove unnecessary casts.
14743 (i387_fsave_to_cache): Doc fix.
14744 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14746 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14748 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14749 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14751 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14753 * configure.srv (arm*-*-mingw32ce*): Move near the other
14756 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14758 * configure.ac: Add errno checking.
14759 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14760 sys/file.h and malloc.h.
14761 (AC_CHECK_DECLS): Add perror.
14762 (srv_mingwce): Handle.
14763 * configure.srv (i[34567]86-*-cygwin*): Add
14764 win32-i386-low.o to srv_tgtobj.
14765 (i[34567]86-*-mingw*): Likewise.
14766 (arm*-*-mingw32ce*): Add case.
14767 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14768 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14769 [__MINGW32CE__] (strerror): New function.
14770 [__MINGW32CE__] (errno): Define to GetLastError.
14771 [__MINGW32CE__] (COUNTOF): New macro.
14772 (remote_open): Remove extra close call.
14773 * mem-break.c (delete_breakpoint_at): New function.
14774 * mem-break.h (delete_breakpoint_at): Declare.
14775 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14776 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14777 [USE_WIN32API] (read, write): Add char* casts.
14778 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14779 * server.h: Include wincecompat.h on Windows CE.
14780 [HAVE_ERRNO_H]: Check.
14781 (perror): Declare if not declared.
14782 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14783 (perror_with_name): Remove errno declaration.
14784 * wincecompat.h: New.
14785 * wincecompat.c: New.
14786 * win32-low.h: New.
14787 * win32-arm-low.c: New.
14788 * win32-i386-low.c: New.
14789 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14790 (OUTMSG2): Make it safe.
14792 (COUNTOF): New macro.
14793 (NUM_REGS): Get it from the low target.
14794 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14795 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14796 (thread_rec): Let low target handle debug registers.
14797 (child_add_thread): Likewise.
14798 (child_init_thread_list): Likewise.
14799 (continue_one_thread): Likewise.
14801 (do_child_fetch_inferior_registers): Move to ...
14802 * win32-i386-low.c: ... here, and rename to ...
14803 (do_fetch_inferior_registers): ... this.
14804 * win32-low.c (child_fetch_inferior_registers):
14805 Go through the low target.
14806 (do_child_store_inferior_registers): Use regptr.
14807 (strwinerror): New function.
14808 (win32_create_inferior): Handle Windows CE.
14809 Use strwinerror instead of strerror on Windows error
14810 codes. Add program to the error output.
14811 Don't close the main thread handle on Windows CE.
14812 (win32_attach): Use coredll.dll on Windows CE.
14813 (win32_kill): Close current process and current
14815 (win32_detach): Use coredll.dll on Windows CE.
14816 (win32_resume): Let low target handle debug registers, and
14818 (handle_exception): Add/Remove initial breakpoint. Avoid
14819 non-existant WSTOPSIG on Windows CE.
14820 (win32_read_inferior_memory): Cast to remove warning.
14821 (win32_arch_string): Go through the low target.
14822 (initialize_low): Call set_breakpoint_data with the low
14823 target's breakpoint.
14824 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14825 FOP_REGNUM, mappings): Move to ...
14826 * win32-i386-low.c: ... here.
14827 * win32-low.c (win32_thread_info): Move to ...
14828 * win32-low.h: ... here.
14829 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14830 win32-arm-low.c and wincecompat.c.
14831 (all:): Add $EXEEXT.
14832 (install-only:): Likewise.
14833 (gdbserver:): Likewise.
14834 (gdbreplay:): Likewise.
14835 * config.in: Regenerate.
14836 * configure: Regenerate.
14838 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14840 * win32-low.c: Rename typedef thread_info to
14841 win32_thread_info throughout.
14843 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14845 * win32-i386-low.c: Rename to ...
14846 * win32-low.c: ... this.
14847 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14848 * Makefile.in: Likewise.
14850 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14852 * remote-utils.c (monitor_output): Constify msg parameter.
14853 * server.h (monitor_output): Likewise.
14854 * win32-i386-low.c (handle_output_debug_string): New.
14855 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14856 handle_output_debug_string.
14857 (get_child_debug_event): Likewise.
14859 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14861 * server.c (main): Correct strtoul check.
14863 2007-03-27 Jon Ringle <jon@ringle.org>
14865 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14867 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14869 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14871 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14873 * terminal.h: Check HAVE_SGTTY_H.
14875 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14877 * remote-utils.c (remote_open): Print out the assigned port number.
14879 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14881 * remote-utils.c (monitor_output): New function.
14882 * server.c (debug_threads): Define here.
14883 (monitor_show_help): New function.
14884 (handle_query): Handle qRcmd.
14885 (main): Do not handle 'd' packet.
14886 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14887 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14890 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14892 * Makefile.in (EXEEXT): New.
14893 (clean): Use $(EXEEXT).
14895 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14897 * target.h (target_ops): Rename send_signal to request_interrupt,
14898 and remove enum target_signal parameter.
14899 * linux-low.c (linux_request_interrupt): Rename from
14900 linux_send_signal, and always send SIGINT.
14901 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14902 and always send SIGINT.
14903 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14905 (input_interrupt): Likewise.
14907 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14909 * server.c (get_features_xml): Check if target implemented
14911 * win32-i386-low.c (win32_arch_string): New.
14912 (win32_target_ops): Add win32_arch_string as arch_string member.
14914 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14916 * spu-low.c (spu_arch_string): New.
14917 (spu_target_ops): Add spu_arch_string.
14919 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14921 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14922 * configure.ac: Do not check for terminal.h.
14923 * configure, config.in: Regenerated.
14925 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14927 * Makefile.in (OBS): Add $(XML_BUILTIN).
14928 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14930 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14931 (arm-with-iwmmxt.c): New.
14932 * config.in, configure: Regenerate.
14933 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14934 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14935 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14936 (arm*-*-linux*): Add iWMMXt and regset support.
14937 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14938 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14939 (arm_store_wmmxregset, target_regsets): New.
14940 * server.c (get_features_xml): Take annex argument. Check builtin
14942 (handle_query): Handle multiple annexes.
14944 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14946 * remote-utils.c [USE_WIN32API] (read, write): Define.
14947 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14950 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14952 * linux-i386-low.c (the_low_target): Set arch_string.
14953 * linux-x86-64-low.c (the_low_target): Likewise.
14954 * linux-low.c (linux_arch_string): New.
14955 (linux_target_ops): Add it.
14956 * linux-low.h (struct linux_target_ops): Add arch_string.
14957 * server.c (write_qxfer_response): Use const void * for DATA.
14958 (get_features_xml): New.
14959 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14960 * target.h (struct target_ops): Add arch_string method.
14962 2007-01-03 Denis Pilat <denis.pilat@st.com>
14963 Daniel Jacobowitz <dan@codesourcery.com>
14965 * linux-low.c (linux_kill): Handle being called with no threads.
14966 * win32-i386-low.c (win32_kill): Likewise.
14967 (get_child_debug_event): Clear current_process_handle.
14969 2006-12-30 Denis PILAT <denis.pilat@st.com>
14970 Daniel Jacobowitz <dan@codesourcery.com>
14972 * remote-utils.c (remote_open): Check the type of specified
14973 serial port devices before opening them.
14974 * server.c (main): Kill the inferior if an error occurs during
14975 the first remote_open.
14977 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14979 * README: Update supported targets.
14981 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14983 * Makefile.in (clean): Remove reg-mips64.c.
14984 (reg-mips64.c, reg-mips64.o): New rules.
14985 * configure.srv: Handle mips64. Include regset support for mips.
14986 * linux-mips-low.c (union mips_register): New.
14987 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14988 (mips_breakpoint, mips_breakpoint_at): Use int.
14989 (mips_collect_register, mips_supply_register)
14990 (mips_collect_register_32bit, mips_supply_register_32bit)
14991 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14992 (mips_store_fpregset, target_regsets): New.
14993 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14995 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14997 * configure.srv: Add target "spu*-*-*".
14998 * Makefile.in (clean): Remove reg-spu.c.
14999 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15000 * spu-low.c: New file.
15002 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15004 * configure.ac: Correct td_thr_tls_get_addr test.
15005 * configure: Regenerated.
15007 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15009 * linux-low.c (linux_wait_for_event): Reformat. Use the
15010 pass_signals array.
15011 * remote-utils.c (decode_address_to_semicolon): New.
15012 * server.c (pass_signals, handle_general_set): New.
15013 (handle_query): Mention QPassSignals for qSupported.
15014 (main): Call handle_general_set.
15015 * server.h (pass_signals, decode_address_to_semicolon): New.
15017 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15019 * server.c (handle_query): Correct error handling for read_auxv.
15021 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15023 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15024 and srv_linux_thread_db to yes.
15025 * linux-s390-low.c (s390_fill_gregset): New function.
15026 (target_regsets): Define data structure.
15028 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15030 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15031 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15032 * config.in, configure: Regenerated.
15033 * inferiors.c (gdb_id_to_thread): New function.
15034 (gdb_id_to_thread_id): Use it.
15035 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15036 * linux-low.h (struct process_info): Add th member.
15037 (thread_db_get_tls_address): New prototype.
15038 * remote-utils.c (decode_address): Make non-static.
15039 * server.c (handle_query): Handle qGetTLSAddr.
15040 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15041 * target.h (struct target_ops): Add get_tls_address.
15042 * thread-db.c (maybe_attach_thread): Save the thread handle.
15043 (thread_db_get_tls_address): New.
15045 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15047 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15048 (linux_resume_one_process): Take a siginfo_t *. Update all
15049 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15050 (struct pending_signals): Add a siginfo_t.
15051 (linux_wait_for_process): Always set last_status.
15052 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15053 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15054 * linux-low.h (struct process_info): Add last_status.
15056 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15058 * remote-utils.c (try_rle): New function.
15059 (putpkt_binary): Use it.
15061 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15063 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15064 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15065 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15066 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15067 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15070 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15072 * server.c (terminal_fd): New variable.
15073 (old_foreground_pgrp): Likewise.
15074 (restore_old_foreground_pgrp): New function.
15075 (start_inferior): Record the terminal file descriptor in terminal_fd
15076 and its original foreground group in old_foreground_pgrp. Register
15077 restore_old_foreground_pgrp with atexit().
15079 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15081 * server.c (handle_query): Correct qPart to qXfer.
15083 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15085 * configure.ac: Check for more headers which are missing on
15086 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15087 * configure.srv: Add Cygwin and mingw32.
15088 * remote-utils.c: Don't include headers unconditionally which
15089 are missing on mingw32. Include <winsock.h> for mingw32.
15090 (remote_open): Adjust for mingw32 support. Flush
15091 standard error after writing to it.
15092 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15093 (unblock_async_io, enable_async_io, disable_async_io)
15094 (readchar, getpkt): Update for Winsock support.
15095 (prepare_resume_reply): Expect a protocol signal number.
15096 * server.c: Disable <sys/wait.h> on mingw32.
15097 (start_inferior): Adjust for mingw32 support. Flush
15098 standard error after writing to it.
15099 (attach_inferior): Likewise. Use protocol signal
15101 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15103 * win32-i386-low.c: New file.
15104 * Makefile.in (XM_CLIBS): Set.
15105 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15106 (win32-i386-low.o): New dependency rule.
15107 * linux-low.c (linux_wait): Use target signal numbers.
15108 * target.h (struct target_ops): Doc fix.
15109 * server.h (target_signal_to_name): New prototype.
15110 * gdbreplay.c: Don't include headers unconditionally which
15111 are missing on mingw32. Include <winsock.h> for mingw32.
15112 (remote_close, remote_open): Adjust for Winsock support.
15113 * configure, config.in: Regenerated.
15115 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15117 * server.c (decode_xfer_read, write_qxfer_response): New.
15118 (handle_query): Take a packet length argument. Handle
15119 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15120 the qSupported response.
15121 (main): Update call to handle_query.
15123 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15125 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15126 (putpkt_binary): Renamed from putpkt and adjusted for binary
15128 (putpkt): New wrapper for putpkt_binary.
15129 (readchar): Don't mask off the high bit.
15130 (decode_X_packet): New function.
15131 * server.c (main): Call putpkt_binary if a handler sets the packet
15132 length. Save the length of the incoming packet. Handle 'X'.
15133 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15135 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15137 * server.c (handle_query): Handle qSupported.
15139 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15141 * remote-utils.c (all_symbols_looked_up): New variable.
15142 (look_up_one_symbol): Check it.
15143 * server.h (look_up_one_symbol): New declaration.
15144 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15146 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15148 * Makefile.in (linux-arm-low.o): Update dependencies.
15149 * linux-arm-low.c: Include "gdb_proc_service.h".
15150 (PTRACE_GET_THREAD_AREA): Define.
15151 (ps_get_thread_area): New function.
15153 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15155 * configure.srv (m68k*-*-uclinux*): New target.
15156 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15157 (linux_resume_one_process): Remove extraneous cast.
15158 (linux_read_offsets): New.
15159 (linux_target_op): Add linux_read_offsets on mmuless systems.
15160 * server.c (handle_query): Add qOffsets logic.
15161 * target.h (struct target_ops): Add read_offsets.
15163 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15165 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15166 (PTRACE_GET_THREAD_AREA): Define.
15167 (ps_get_thread_area): New function.
15168 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15169 (linux-x86-64-low.o): Update.
15171 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15173 * configure.ac: Remove checks for prfpregset_t.
15174 * gdb_proc_service.h: New file.
15175 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15176 new "gdb_proc_service.h".
15177 * proc-service.c: Likewise.
15178 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15179 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15180 * Makefile.in (gdb_proc_service_h): Updated.
15181 * configure, config.in: Regenerated.
15183 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15185 * remote-utils.c (prepare_resume_reply): Move declaration
15186 of gdb_id_from_wait to the top of the block.
15188 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15190 * linux-low.c (regsets_store_inferior_registers): Read the regset
15191 from the target before filling it.
15193 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15195 * server.c (attach_inferior): Return SIGTRAP for a successful
15198 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15200 * Makefile.in (OBS): Add version.o.
15201 (STAGESTUFF): Delete.
15202 (version.o): Add dependencies.
15203 (version.c): Replace rule.
15204 (clean): Remove version.c.
15205 * server.c (gdbserver_version): New.
15206 (gdbserver_usage): Use printf.
15207 (main): Handle --version and --help.
15208 * server.h (version, host_name): Add declarations.
15210 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15222 * linux-x86-64-low.c:
15224 * linux-s390-low.c:
15225 * linux-ppc64-low.c:
15227 * linux-mips-low.c:
15228 * linux-m68k-low.c:
15229 * linux-m32r-low.c:
15232 * linux-ia64-low.c:
15233 * linux-i386-low.c:
15234 * linux-crisv32-low.c:
15246 * gdbserver.1: Add (C) after Copyright. Update the FSF
15249 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15251 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15252 (arm_breakpoint_at): Recognize both breakpoints.
15253 (the_low_target): Use the correct breakpoint instruction.
15255 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15257 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15258 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15259 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15260 (the_low_target): Update.
15262 2005-10-25 Andreas Schwab <schwab@suse.de>
15264 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15266 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15267 (ia64_num_regs): Reduce to 462.
15269 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15271 * acinclude.m4: Correct quoting.
15272 * aclocal.m4: Regenerated.
15274 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15275 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15276 (thread_db_init): Call thread_db_err_str.
15277 * configure.ac: Check for TD_VERSION.
15278 * config.in, configure: Regenerated.
15280 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15282 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15284 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15286 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15287 is not available. Define HAVE_PTRACE_GETREGS if it is.
15288 * config.in, configure: Regenerated.
15289 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15290 * linux-i386-low.c, linux-m68k-low.c: Update to use
15291 HAVE_PTRACE_GETREGS.
15292 * linux-low.c (regsets_fetch_inferior_registers)
15293 (regsets_store_inferior_registers): Only return 0 if we processed
15295 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15296 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15298 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15300 * inferiors.c (struct thread_info): Add gdb_id.
15301 (add_thread): Add gdb_id argument.
15302 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15303 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15304 calls to add_thread.
15305 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15306 * server.c (handle_query): Use thread_to_gdb_id.
15307 (handle_v_cont, main): Use gdb_id_to_thread_id.
15308 * server.h (add_thread): Update prototype.
15309 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15312 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15314 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15315 left-padded registers.
15316 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15317 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15319 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15321 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15322 * configure: Regenerate.
15323 * config.in: Regenerate.
15324 * server.h (NEED_DECLARATION_STRERROR):
15325 Replace with !HAVE_DECL_STRERROR.
15327 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15329 * linux-low.c (linux_wait, linux_send_signal): Don't test
15330 an unsigned long variable for > 0 if it could be MAX_ULONG.
15331 * server.c (myresume): Likewise.
15332 * target.c (set_desired_inferior): Likewise.
15334 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15336 * configure.ac: Simplify and improve check for socklen_t.
15337 * configure, config.in: Regenerate.
15339 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15341 * acconfig.h: Remove.
15342 * configure.ac: Add a test for socklen_t. Use three-argument
15343 AC_DEFINE throughout.
15344 * config.in: Regenerated using autoheader 2.59.
15345 * configure: Regenerated.
15347 * gdbreplay.c (socklen_t): Provide a default.
15348 (remote_open): Use socklen_t.
15349 * remote-utils.c (socklen_t): Provide a default.
15350 (remote_open): Use socklen_t.
15351 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15354 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15356 * linux-low.c (linux_read_memory, linux_write_memory)
15357 (linux_read_auxv): Likewise.
15358 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15359 (check_mem_write): Likewise.
15360 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15362 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15363 (registers_from_string, register_data): Likewise.
15364 * server.c (handle_query, main): Likewise.
15365 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15366 (decode_M_packet): Likewise.
15367 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15368 * target.h (struct target_ops): Update read_memory, write_memory,
15370 (read_inferior_memory, write_inferior_memory): Update.
15371 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15372 to unsigned char *.
15373 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15374 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15375 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15376 linux-s390-low.c, linux-sh-low.c: Update for changes in
15377 read_inferior_memory and the_low_target->breakpoint.
15379 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15381 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15382 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15383 * configure.srv: Add powerpc64-*-linux*.
15384 * linux-ppc64-low.c: New file.
15386 2005-05-23 Orjan Friberg <orjanf@axis.com>
15388 * linux-cris-low.c: New file with support for CRIS.
15389 * linux-crisv32-low.c: Ditto for CRISv32.
15390 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15391 (clean): Add reg-cris.c and reg-crisv32.c.
15392 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15393 reg-crisv32.o, and reg-crisv32.c to make rules.
15394 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15395 recognized targets.
15397 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15399 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15400 of sizeof (PTRACE_XFER_TYPE).
15401 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15403 2005-05-12 Orjan Friberg <orjanf@axis.com>
15405 * target.h (struct target_ops): Add insert_watchpoint,
15406 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15407 pointers for hardware watchpoint support.
15408 * linux-low.h (struct linux_target_ops): Ditto.
15409 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15410 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15411 to linux_target_ops.
15412 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15414 * server.c (main): Recognize 'Z' and 'z' packets.
15416 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15418 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15419 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15420 (the_low_target): Add new members.
15422 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15424 * proc-service.c (ps_lgetregs): Search all_processes instead of
15427 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15429 * server.c (start_inferior): Change return type to int.
15430 (attach_inferior): Change sigptr to int *.
15431 (handle_v_cont, handle_v_requests): Change signal to int *.
15432 (main): Change signal to int.
15434 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15436 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15437 * configure.srv: Add m32r*-*-linux*.
15438 * linux-m32r-low.c: New file.
15440 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15442 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15444 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15446 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15447 Take unsigned long arguments for PIDs.
15448 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15449 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15450 (wait_for_sigstop, linux_resume_one_process)
15451 (regsets_fetch_inferior_registers, linux_send_signal)
15452 (linux_read_auxv): Likewise. Update the types of variables holding
15453 PIDs. Update format string specifiers.
15454 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15455 * remote-utils.c (prepare_resume_reply): Likewise.
15456 * server.c (cont_thread, general_thread, step_thread)
15457 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15459 (handle_query): Update format specifiers.
15460 (handle_v_cont, main): Use strtoul for thread IDs.
15461 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15462 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15463 (general_thread, step_thread, thread_from_wait)
15464 (old_thread_from_wait): Update.
15465 * target.h (struct thread_resume): Use unsigned long for THREAD.
15466 (struct target_ops): Use unsigned long for arguments to attach and
15469 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15471 * acinclude.m4: Include bfd/bfd.m4 directly.
15472 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15473 <agriffis@toolchain.org>.
15474 * aclocal.m4, configure: Regenerated.
15476 2005-01-07 Andrew Cagney <cagney@gnu.org>
15478 * configure.ac: Rename configure.in, require autoconf 2.59.
15479 * configure: Re-generate.
15481 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15483 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15484 LIBS when finished.
15485 * aclocal.m4: Regenerated.
15486 * configure: Regenerated.
15488 2004-11-21 Andreas Schwab <schwab@suse.de>
15490 * linux-m68k-low.c (m68k_num_gregs): Define.
15491 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15492 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15493 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15494 (m68k_breakpoint_at): New. Add to the_low_target.
15496 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15497 srv_linux_thread_db to yes.
15499 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15501 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15502 (ARCH_SET_FS): Likewise.
15503 (ARCH_GET_FS): Likewise.
15504 (ARCH_GET_GS): Likewise.
15506 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15508 * linux-i386-low.c (ps_get_thread_area): New.
15509 * linux-x86-64-low.c (ps_get_thread_area): New.
15510 * linux-low.c: Include <sys/syscall.h>.
15511 (linux_kill_one_process): Don't kill the first thread here.
15512 (linux_kill): Kill the first thread here.
15513 (kill_lwp): New function.
15514 (send_sigstop, linux_send_signal): Use it.
15515 * proc-service.c: Clean up #ifdefs.
15516 (fpregset_info): Delete.
15517 (ps_lgetregs): Update and enable implementation.
15518 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15520 * remote-utils.c (struct sym_cache, symbol_cache): New.
15521 (input_interrupt): Print a clearer message.
15522 (async_io_enabled): New variable.
15523 (enable_async_io, disable_async_io): Use it. Update comments.
15524 (look_up_one_symbol): Use the symbol cache.
15525 * thread-db.c (thread_db_look_up_symbols): New function.
15526 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15528 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15530 * configure.in: Test for -rdynamic.
15531 * configure: Regenerated.
15532 * Makefile (INTERNAL_LDFLAGS): New.
15533 (gdbserver, gdbreplay): Use it.
15535 2004-09-02 Andrew Cagney <cagney@gnu.org>
15537 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15539 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15541 * linux-low.c (linux_wait): Clear all_processes list also.
15543 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15545 * linux-low.c: Include <errno.h>. Remove extern declaration of
15548 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15550 * gdbreplay.c, server.h, utils.c: Update copyright years.
15552 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15554 * server.c (main): Print child status or termination signal from
15555 variable 'signal', not 'sig'.
15557 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15559 * linux-low.c (linux_read_memory): Change return type to
15560 int. Check for and return error from ptrace().
15561 * target.c (read_inferior_memory): Change return type to int. Pass
15562 back return status from the_target->read_memory().
15563 * target.h (struct target_ops): Adapt *read_memory() prototype.
15565 (read_inferior_memory): Adapt prototype.
15566 * server.c (main): Return an error packet if
15567 read_inferior_memory() returns an error.
15569 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15571 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15572 Unify with other clean targets.
15574 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15576 * server.c (handle_v_cont): Call set_desired_inferior.
15578 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15580 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15582 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15584 * linux-low.c (linux_wait): Unblock async I/O.
15585 (linux_resume): Block and enable async I/O.
15586 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15587 * server.h (block_async_io, unblock_async_io): Add prototypes.
15589 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15591 * remote-utils.c (remote_open): Print a status notice after
15592 opening a TCP port.
15593 * server.c (attach_inferior): Print a status notice after
15596 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15598 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15600 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15602 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15604 * server.c, target.h: Update copyright years.
15606 2004-02-25 Roland McGrath <roland@redhat.com>
15608 * target.h (struct target_ops): New member `read_auxv'.
15609 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15610 * linux-low.c (linux_read_auxv): New function.
15611 (linux_target_ops): Initialize `read_auxv' member to that.
15613 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15615 Committed by Jim Blandy <jimb@redhat.com>.
15617 * linux-s390-low.c (s390_num_regs): Update.
15618 (s390_regmap): Remove control registers. Use __s390x__ predefine
15619 instead of GPR_SIZE to distiguish s390 and s390x targets.
15621 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15623 * linux-low.c: Update copyright year.
15624 (check_removed_breakpoint): Clear pending_is_breakpoint.
15625 (linux_set_resume_request, linux_queue_one_thread)
15626 (resume_status_pending_p): New functions.
15627 (linux_continue_one_thread): Use process->resume.
15628 (linux_resume): Only resume threads if there are no pending events.
15629 * linux-low.h (struct process_info): Add resume request
15632 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15634 * regcache.c (new_register_cache): Clear the allocated register
15635 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15637 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15639 * linux-low.c (linux_resume): Take a struct thread_resume *
15641 (linux_wait): Update call.
15642 (resume_ptr): New static variable.
15643 (linux_continue_one_thread): Renamed from
15644 linux_continue_one_process. Use resume_ptr.
15645 (linux_resume): Use linux_continue_one_thread.
15646 * server.c (handle_v_cont, handle_v_requests): New functions.
15647 (myresume): New function.
15648 (main): Handle 'v' case.
15649 * target.h (struct thread_resume): New type.
15650 (struct target_ops): Change argument of "resume" to struct
15652 (myresume): Delete macro.
15654 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15656 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15657 (uninstall): Support DESTDIR.
15659 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15661 * configure.srv: Add xscale*linux copy of arm*linux entry.
15663 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15665 * linux-arm-low.c (arm_reinsert_addr): New function.
15666 (the_low_target): Add arm_reinsert_addr.
15668 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15670 * mem-break.c: Remove whitespace at end of file.
15672 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15674 * configure.in: Check whether we need to prototype strerror.
15675 * server.h: Optionally prototype strerror.
15676 * gdbreplay.c (perror_with_name): Use strerror.
15677 * linux-low.c (linux_attach_lwp): Use strerror.
15678 * utils.c (perror_with_name): Use strerror.
15679 * config.in, configure: Regenerated.
15681 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15683 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15684 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15686 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15688 * Makefile.in (SFILES): Update.
15689 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15690 low-sun3.c: Remove files.
15692 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15694 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15695 (linux_detach_one_process, linux_detach): New functions.
15696 (linux_target_ops): Add linux_detach.
15697 * server.c (main): Handle 'D' packet.
15698 * target.h (struct target_ops): Add "detach" member.
15699 (detach_inferior): Define.
15701 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15703 From Kelley Cook <kelleycook@wideopenwest.com>:
15704 * configure.srv: Accept i[34567]86 variants.
15706 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15708 * linux-low.c (linux_wait_for_event): Correct comment typos.
15709 (linux_resume_one_process): Call check_removed_breakpoint.
15710 (linux_send_signal): New function.
15711 (linux_target_ops): Add linux_send_signal.
15712 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15714 * target.h (struct target_ops): Add send_signal.
15716 2003-05-29 Jim Blandy <jimb@redhat.com>
15718 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15719 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15720 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15721 away part of the register's value.
15723 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15725 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15726 (linux_wait_for_event, linux_init_signals): Likewise.
15728 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15730 * configure.in: Check for stdlib.h.
15731 * configure: Regenerated.
15732 * config.in: Regenerated.
15734 2003-01-04 Andreas Schwab <schwab@suse.de>
15736 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15738 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15740 * Makefile.in: Remove obsolete code.
15742 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15744 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15745 defined(PT_FPR0_HI).
15747 2002-11-17 Stuart Hughes <seh@zee2.com>
15749 * linux-arm-low.c (arm_num_regs): Increase.
15750 (arm_regmap): Include status register.
15752 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15754 * linux-low.c (register_addr): Remove incorrect -1 check.
15756 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15758 * linux-low.c (linux_create_inferior): Call setpgid. Return
15760 (unstopped_p, linux_signal_pid): Remove.
15761 (linux_target_ops): Remove linux_signal_pid.
15762 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15763 global instead of target method.
15764 * target.h (struct target_ops): Remove signal_pid. Update comment
15765 for create_inferior.
15766 * server.c (signal_pid): New variable.
15767 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15768 gdbserver. Set the child to be the foreground process group.
15769 (attach_inferior): Set signal_pid.
15771 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15773 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15775 2002-08-20 Jim Blandy <jimb@redhat.com>
15777 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15780 2002-08-01 Andrew Cagney <cagney@redhat.com>
15782 * Makefile.in: Make chill references obsolete.
15784 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15786 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15787 * configure: Regenerate.
15788 * config.in: Regenerate.
15790 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15792 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15793 (perror_with_name, remote_close, remote_open, expect, play): Static.
15795 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15797 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15798 byte offsets instead of an array of indexes.
15799 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15801 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15803 * regcache.c: Add comment.
15805 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15807 * thread-db.c: New file.
15808 * proc-service.c: New file.
15809 * acinclude.m4: New file.
15810 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15811 proc-service.o, and thread-db.o.
15812 (linux-low.o): Add USE_THREAD_DB.
15813 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15814 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15815 * aclocal.m4: Regenerated.
15816 * config.in: Regenerated.
15817 * configure: Regenerated.
15818 * configure.in: Check for proc_service.h, sys/procfs.h,
15819 thread_db.h, and linux/elf.h headrs.
15820 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15821 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15822 Check for -lthread_db and thread support.
15823 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15824 PowerPC, and SuperH.
15825 * i387-fp.c: Constify arguments.
15826 * i387-fp.h: Likewise.
15827 * inferiors.c: (struct thread_info): Renamed from
15828 `struct inferior_info'. Remove PID member. Use generic inferior
15829 list header. All uses updated.
15830 (inferiors, signal_pid): Removed.
15831 (all_threads): New variable.
15832 (get_thread): Define.
15833 (add_inferior_to_list): New function.
15834 (for_each_inferior): New function.
15835 (change_inferior_id): New function.
15836 (add_inferior): Removed.
15837 (remove_inferior): New function.
15838 (add_thread): New function.
15839 (free_one_thread): New function.
15840 (remove_thread): New function.
15841 (clear_inferiors): Use for_each_inferior and free_one_thread.
15842 (find_inferior): New function.
15843 (find_inferior_id): New function.
15844 (inferior_target_data): Update argument type.
15845 (set_inferior_target_data): Likewise.
15846 (inferior_regcache_data): Likewise.
15847 (set_inferior_regcache_data): Likewise.
15848 * linux-low.c (linux_bp_reinsert): Remove.
15849 (all_processes, stopping_threads, using_thrads)
15850 (struct pending_signals, debug_threads, pid_of): New.
15851 (inferior_pid): Replace with macro.
15852 (struct inferior_linux_data): Remove.
15853 (get_stop_pc, add_process): New functions.
15854 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15855 Use add_process and add_thread.
15856 (linux_attach_lwp): New function, based on old linux_attach. Use
15857 add_process and add_thread. Set stop_expected for new threads.
15858 (linux_attach): New function.
15859 (linux_kill_one_process): New function.
15860 (linux_kill): Kill all LWPs.
15861 (linux_thread_alive): Use find_inferior_id.
15862 (check_removed_breakpoints, status_pending_p): New functions.
15863 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15864 Update. Use WNOHANG. Wait for cloned processes also. Update process
15865 struct for the found process.
15866 (linux_wait_for_event): New function.
15867 (linux_wait): Use it. Support LWPs.
15868 (send_sigstop, wait_for_sigstop, stop_all_processes)
15869 (linux_resume_one_process, linux_continue_one_process): New functions.
15870 (linux_resume): Support LWPs.
15871 (REGISTER_RAW_SIZE): Remove.
15872 (fetch_register): Use register_size instead. Call supply_register.
15873 (usr_store_inferior_registers): Likewise. Call collect_register.
15874 Fix recursive case.
15875 (regsets_fetch_inferior_registers): Improve error message.
15876 (regsets_store_inferior_registers): Add debugging.
15877 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15878 (unstopped_p, linux_signal_pid): New functions.
15879 (linux_target_ops): Add linux_signal_pid.
15880 (linux_init_signals): New function.
15881 (initialize_low): Call it. Initialize using_threads.
15882 * regcache.c (inferior_regcache_data): Add valid
15884 (get_regcache): Fetch registers lazily. Add fetch argument
15885 and update all callers.
15886 (regcache_invalidate_one, regcache_invalidate): New
15888 (new_register_cache): Renamed from create_register_cache.
15889 Return the new regcache.
15890 (free_register_cache): Change argument to a void *.
15891 (registers_to_string, registers_from_string): Call get_regcache
15892 with fetch flag set.
15893 (register_data): Make static. Pass fetch flag to get_regcache.
15894 (supply_register): Call get_regcache with fetch flag clear.
15895 (collect_register): Call get_regcache with fetch flag set.
15896 (collect_register_as_string): New function.
15897 * regcache.h: Update.
15898 * remote-utils.c (putpkt): Flush after debug output and use
15900 Handle input interrupts while waiting for an ACK.
15901 (input_interrupt): Use signal_pid method.
15902 (getpkt): Flush after debug output and use stderr.
15903 (outreg): Use collect_register_as_string.
15904 (new_thread_notify, dead_thread_notify): New functions.
15905 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15906 and general_thread.
15907 (look_up_one_symbol): Flush after debug output.
15908 * server.c (step_thread, server_waiting): New variables.
15909 (start_inferior): Don't use signal_pid. Update call to mywait.
15910 (attach_inferior): Update call to mywait.
15911 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15912 (main): Don't fetch/store registers explicitly. Use
15913 set_desired_inferior. Support proposed ``Hs'' packet. Update
15915 * server.h: Update.
15916 (struct inferior_list, struct_inferior_list_entry): New.
15917 * target.c (set_desired_inferior): New.
15918 (write_inferior_memory): Constify.
15919 (mywait): New function.
15920 * target.h: Update.
15921 (struct target_ops): New signal_pid method.
15922 (mywait): Removed macro, added prototype.
15924 * linux-low.h (regset_func): Removed.
15925 (regset_fill_func, regset_store_func): New.
15926 (enum regset_type): New.
15927 (struct regset_info): Add type field. Use new operation types.
15928 (struct linux_target_ops): stop_pc renamed to get_pc.
15929 Add decr_pc_after_break and breakpoint_at.
15930 (get_process, get_thread_proess, get_process_thread)
15931 (strut process_info, all_processes, linux_attach_lwp)
15932 (thread_db_init): New.
15934 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15935 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15936 (the_low_target): Add new members.
15937 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15938 (i386_store_fpxregset): Constify.
15939 (target_regsets): Add new kind identifier.
15940 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15941 (i386_set_pc): Add debugging.
15942 (i386_breakpoint_at): New function.
15943 (the_low_target): Add new members.
15944 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15945 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15946 (mips_breakpoint_at): New.
15947 (the_low_target): Add new members.
15948 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15949 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15950 (the_low_target): Add new members.
15951 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15952 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15953 (the_low_target): Add new members.
15954 * linux-x86-64-low.c (target_regsets): Add new kind
15957 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15959 From Martin Pool <mbp@samba.org>:
15960 * server.c (gdbserver_usage): New function.
15963 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15965 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15966 stop_at -> stop_pc.
15968 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15970 * Makefile.in: Remove obsolete code.
15972 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15974 * linux-low.c (regsets_fetch_inferior_registers),
15975 (regsets_store_inferior_registers): Removed cast to int from
15977 * regcache.h: Added declaration of struct inferior_info.
15979 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15981 * inferiors.c (struct inferior_info): Add regcache_data.
15982 (add_inferior): Call create_register_cache.
15983 (clear_inferiors): Call free_register_cache.
15984 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15985 * regcache.c (struct inferior_regcache_data): New.
15986 (registers): Remove.
15987 (get_regcache): New function.
15988 (create_register_cache, free_register_cache): New functions.
15989 (set_register_cache): Don't initialize the register cache here.
15990 (registers_to_string, registers_from_string, register_data): Call
15992 * regcache.h: Add prototypes.
15993 * server.h: Likewise.
15995 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15997 * mem-break.c: New file.
15998 * mem-break.h: New file.
15999 * Makefile.in: Add mem-break.o rule; update server.h
16001 * inferiors.c (struct inferior_info): Add target_data
16003 (clear_inferiors): Free target_data member if set.
16004 (inferior_target_data, set_inferior_target_data): New functions.
16005 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16006 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16007 * linux-low.c (linux_bp_reinsert): New variable.
16008 (struct inferior_linux_data): New.
16009 (linux_create_inferior): Use set_inferior_target_data.
16010 (linux_attach): Likewise. Call add_inferior.
16011 (linux_wait_for_one_inferior): New function.
16012 (linux_wait): Call it.
16013 (linux_write_memory): Add const.
16014 (initialize_low): Call set_breakpoint_data.
16015 * linux-low.h (struct linux_target_ops): Add breakpoint
16017 * server.c (attach_inferior): Remove extra add_inferior
16019 * server.h: Include mem-break.h. Update inferior.c
16021 * target.c (read_inferior_memory)
16022 (write_inferior_memory): New functions.
16023 * target.h (read_inferior_memory)
16024 (write_inferior_memory): Change macros to prototypes.
16025 (struct target_ops): Update comments. Add const to write_memory
16028 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16030 * linux-low.c (usr_store_inferior_registers): Support
16031 registers which are allowed to fail to store.
16032 * linux-low.h (linux_target_ops): Likewise.
16033 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16034 (ppc_cannot_store_register): FPSCR may not be storable.
16036 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16038 * server.h: Include <string.h> if HAVE_STRING_H.
16039 * ChangeLog: Correct paths in last ChangeLog entry.
16041 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16043 * linux-low.h: Remove obsolete prototypes.
16044 (struct linux_target_ops): New.
16045 (extern the_low_target): New.
16046 * linux-low.c (num_regs, regmap): Remove declarations.
16047 (register_addr): Use the_low_target explicitly.
16048 (fetch_register): Likewise.
16049 (usr_fetch_inferior_registers): Likewise.
16050 (usr_store_inferior_registers): Likewise.
16051 * linux-arm-low.c (num_regs): Remove.
16052 (arm_num_regs): Define.
16053 (arm_regmap): Renamed from regmap, made static.
16054 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16056 (arm_cannot_store_register): Renamed from cannot_store_register,
16058 (the_low_target): New.
16059 * linux-i386-low.c (num_regs): Remove.
16060 (i386_num_regs): Define.
16061 (i386_regmap): Renamed from regmap, made static.
16062 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16064 (i386_cannot_store_register): Renamed from cannot_store_register,
16066 (the_low_target): New.
16067 * linux-ia64-low.c (num_regs): Remove.
16068 (ia64_num_regs): Define.
16069 (ia64_regmap): Renamed from regmap, made static.
16070 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16072 (ia64_cannot_store_register): Renamed from cannot_store_register,
16074 (the_low_target): New.
16075 * linux-m68k-low.c (num_regs): Remove.
16076 (m68k_num_regs): Define.
16077 (m68k_regmap): Renamed from regmap, made static.
16078 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16080 (m68k_cannot_store_register): Renamed from cannot_store_register,
16082 (the_low_target): New.
16083 * linux-mips-low.c (num_regs): Remove.
16084 (mips_num_regs): Define.
16085 (mips_regmap): Renamed from regmap, made static.
16086 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16088 (mips_cannot_store_register): Renamed from cannot_store_register,
16090 (the_low_target): New.
16091 * linux-ppc-low.c (num_regs): Remove.
16092 (ppc_num_regs): Define.
16093 (ppc_regmap): Renamed from regmap, made static.
16094 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16096 (ppc_cannot_store_register): Renamed from cannot_store_register,
16098 (the_low_target): New.
16099 * linux-s390-low.c (num_regs): Remove.
16100 (s390_num_regs): Define.
16101 (s390_regmap): Renamed from regmap, made static.
16102 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16104 (s390_cannot_store_register): Renamed from cannot_store_register,
16106 (the_low_target): New.
16107 * linux-sh-low.c (num_regs): Remove.
16108 (sh_num_regs): Define.
16109 (sh_regmap): Renamed from regmap, made static.
16110 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16112 (sh_cannot_store_register): Renamed from cannot_store_register,
16114 (the_low_target): New.
16115 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16116 (the_low_target): New.
16118 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16120 * Makefile.in: Add stamp-h target.
16121 * configure.in: Create stamp-h.
16122 * configure: Regenerated.
16124 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16126 * inferiors.c: New file.
16127 * target.c: New file.
16128 * target.h: New file.
16129 * Makefile.in: Add target.o and inferiors.o. Update
16131 * linux-low.c (inferior_pid): New static variable,
16132 moved from server.c.
16133 (linux_create_inferior): Renamed from create_inferior.
16134 Call add_inferior. Return 0 on success instead of a PID.
16135 (linux_attach): Renamed from myattach.
16136 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16137 (linux_thread_alive): Renamed from mythread_alive.
16138 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16140 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16141 (regsets_store_inferior_registers): Correct error message.
16142 Add missing ``return 0''.
16143 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16144 (linux_store_registers): Renamed from store_inferior_registers.
16145 (linux_read_memory): Renamed from read_inferior_memory.
16146 (linux_write_memory): Renamed from write_inferior_memory.
16147 (linux_target_ops): New structure.
16148 (initialize_low): Call set_target_ops ().
16149 * remote-utils.c (unhexify): New function.
16150 (hexify): New function.
16151 (input_interrupt): Send signals to ``signal_pid''.
16152 * server.c (inferior_pid): Remove.
16153 (start_inferior): Update create_inferior call.
16154 (attach_inferior): Call add_inferior.
16155 (handle_query): New function.
16156 (main): Call handle_query for `q' packets.
16157 * server.h: Include "target.h". Remove obsolete prototypes.
16158 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16160 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16162 * Makefile.in: Add WARN_CFLAGS. Update configury
16164 * configure.in: Check for <string.h>
16165 * configure: Regenerate.
16166 * config.in: Regenerate.
16167 * gdbreplay.c: Include needed system headers.
16168 (remote_open): Remove strchr prototype.
16169 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16170 * regcache.c (supply_register): Change buf argument to const void *.
16171 (supply_register_by_name): Likewise.
16172 (collect_register): Change buf argument to void *.
16173 (collect_register_by_name): Likewise.
16174 * regcache.h: Add missing prototypes.
16175 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16176 * server.c (handle_query): New function.
16177 (attached): New static variable, moved out of main.
16178 (main): Quiet longjmp clobber warnings.
16179 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16180 * utils.c (error): Remove NORETURN.