1 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
4 linux_ptrace_attach_fail_reason_string now returning an
6 (linux_attach): Likewise.
7 * thread-db.c (attach_thread): Likewise.
9 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
12 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13 checking for fs_base/gs_base fields in struct user_regs_struct.
14 * configure: Regenerate.
16 2018-01-16 Yao Qi <yao.qi@linaro.org>
19 * linux-low.c (fetch_register): Call supply_register instead of
22 2018-01-08 Yao Qi <yao.qi@linaro.org>
23 Simon Marchi <simon.marchi@ericsson.com>
25 * Makefile.in (OBS): Remove selftest.o.
26 * configure.ac: Set srv_selftest_objs if $development is true.
27 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
28 * configure: Re-generated.
29 * server.c (captured_main): Wrap variable selftest_filter with
32 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
34 * server.c (parse_debug_format_options): Return std::string.
35 (handle_monitor_command, captured_main): Adjust.
37 2018-01-05 Pedro Alves <palves@redhat.com>
40 * server.c (captured_main): Pass quiet=false to
41 save_original_signals_state.
43 2018-01-01 Joel Brobecker <brobecker@adacore.com>
45 * gdbreplay.c (gdbreplay_version): Update copyright year in
47 * server.c (gdbserver_version): Likewise.
49 2017-12-08 Tom Tromey <tom@tromey.com>
51 * ax.c (ax_printf): Update.
53 2017-12-07 Yao Qi <yao.qi@linaro.org>
55 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
56 aarch64_linux_read_description.
57 * linux-amd64-ipa.c (idx2mask): New array.
58 (get_ipa_tdesc): Move idx2mask out.
59 (initialize_low_tracepoint): Initialize target descriptions.
60 * linux-i386-ipa.c (idx2mask): New array.
61 (get_ipa_tdesc): Move idx2mask out.
62 (initialize_low_tracepoint): Initialize target descriptions.
64 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
66 * tdesc.c (struct tdesc_type): Change return type.
67 (tdesc_add_flag): Change parameter type.
68 (tdesc_add_bitfield): Likewise.
69 (tdesc_add_field): Likewise.
70 (tdesc_set_struct_size): Likewise.
72 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
74 * regcache.c (registers_to_string): Remove unused variable.
76 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
78 * inferiors.c (for_each_inferior_with_data): Remove.
79 * inferiors.h (for_each_inferior_with_data): Remove.
80 * server.c (handle_qxfer_threads_worker): Change parameter type.
81 (handle_qxfer_threads_proper): Use for_each_thread.
83 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
85 * inferiors.c (for_each_inferior): Remove.
86 (clear_inferiors): Use for_each_thread.
87 * inferiors.h (for_each_inferior): Remove.
88 * linux-low.c (linux_wait_for_event_filtered): Use
90 (linux_stabilize_threads): Likewise.
91 * regcache.c (regcache_release): Likewise.
92 * server.c (gdb_wants_all_threads_stopped): Likewise.
93 (clear_pending_status_callback): Remove.
94 (handle_status): Use for_each_thread.
95 (captured_main): Likewise.
96 * win32-low.c (child_init_thread_list): Likewise.
97 (win32_clear_inferiors): Likewise.
98 (fake_breakpoint_event): Likewise.
100 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
102 * inferiors.h (find_inferior): Remove.
103 * inferiors.c (find_inferior): Remove.
105 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
107 * linux-low.c (resume_status_pending_p): Update comment.
108 (need_step_over_p): Update comment.
110 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
112 * linux-low.c (proceed_one_lwp): Return void, change parameter
114 (unsuspend_and_proceed_one_lwp): Likewise.
115 (proceed_all_lwps): Use for_each_thread.
116 (unstop_all_lwps): Likewise.
118 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
120 * linux-low.c (linux_resume_one_thread): Return void, take
122 (linux_resume): Use for_each_thread.
124 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
126 * linux-low.c (send_sigstop_callback): Return void, change
127 parameter type. Rename to...
128 (send_sigstop): ... this.
129 (suspend_and_send_sigstop_callback): Return void, change parameter
131 (suspend_and_send_sigstop): ... this.
132 (stop_all_lwps): Use for_each_thread.
134 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
136 * linux-low.c (lwp_running): Return bool, remove unused
138 (linux_stabilize_threads): Use find_thread.
140 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
142 * linux-low.c (select_singlestep_lwp_callback): Remove.
143 (count_events_callback): Remove.
144 (select_event_lwp_callback): Remove.
145 (select_event_lwp): Use find_thread/for_each_thread.
147 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
149 * linux-low.c (not_stopped_callback): Return bool, take filter
151 (linux_wait_for_event_filtered): Use find_thread.
152 (linux_wait_1): Likewise.
154 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
156 * linux-low.c (same_lwp): Remove.
157 (find_lwp_pid): Use find_thread.
159 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
161 * linux-low.c (delete_lwp_callback): Remove.
162 (linux_mourn): Use for_each_thread.
164 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
166 * linux-low.c (linux_detach_lwp_callback): Return void, remove
167 args parameter, don't check for pid.
168 (linux_detach): Use for_each_thread.
170 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
172 * linux-low.c (struct counter): Remove.
173 (second_thread_of_pid_p): Remove.
174 (last_thread_of_process_p): Use find_thread.
176 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
178 * inferiors.c (find_inferior_in_random): Remove.
179 * inferiors.h (find_inferior_in_random): Remove.
180 * linux-low.c (status_pending_p_callback): Return bool, accept
181 parameter ptid directly.
182 (linux_wait_for_event_filtered): Use find_thread_in_random.
183 (linux_wait_1): Likewise.
185 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
187 * inferiors.c (find_inferior_id): Remove.
188 (find_thread_ptid): Move implemention from find_inferior_id to
190 * inferiors.h (find_inferior_id): Remove.
191 * server.c (handle_status): Use find_thread_ptid.
192 (process_serial_event): Likewise.
193 * thread-db.c (find_one_thread): Likewise.
194 (thread_db_thread_handle): Likewise.
195 * win32-low.c (thread_rec): Likewise.
196 (child_delete_thread): Likewise.
197 (win32_thread_alive): Likewise.
198 (get_child_debug_event): Likewise.
200 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
202 * linux-mips-low.c (update_watch_registers_callback): Return
203 void, remove pid_p parameter, don't check for pid.
204 (mips_insert_point, mips_remove_point): Use for_each_thread.
206 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
208 * lynx.low (lynx_delete_thread_callback): Remove.
209 (lynx_mourn): Use for_each_thread.
211 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
213 * regcache.c (regcache_invalidate_one): Remove.
214 (regcache_invalidate_pid): use for_each_thread.
216 2017-11-26 Tom Tromey <tom@tromey.com>
218 * linux-low.c (linux_create_inferior): Update.
220 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
222 * spu-low.c (spu_create_inferior): Fix typo in argument name.
224 2017-11-24 Alan Hayward <alan.hayward@arm.com>
226 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
227 * linux-aarch64-low.c (initialize_low_arch): Call init func.
228 * linux-aarch64-tdesc-selftest.c: New file.
229 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
231 2017-11-24 Alan Hayward <alan.hayward@arm.com>
233 * configure.srv: Add new file.
234 * linux-aarch64-low.c (initialize_low_arch): Call init func.
235 * linux-aarch64-tdesc-selftest.c: New file.
236 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
238 2017-11-24 Alan Hayward <alan.hayward@arm.com>
240 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
241 * linux-aarch64-low.c (initialize_low_arch): Remove init.
242 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
244 2017-11-24 Alan Hayward <alan.hayward@arm.com>
246 * configure.srv: Add new files.
247 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
248 aarch64_linux_read_description.
249 * linux-aarch64-low.c (aarch64_linux_read_description):
250 Merge with aarch64_arch_setup.
251 (aarch64_arch_setup): Call aarch64_linux_read_description.
252 * linux-aarch64-tdesc.c: New file.
253 * linux-aarch64-tdesc.h: New file.
255 2017-11-24 Yao Qi <yao.qi@linaro.org>
257 * configure.srv: Set $srv_regobj for tic6x-linux.
258 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
259 (tic6x_read_description): Move some code to tic6x_arch_setup.
260 (tic6x_tdesc_test): New function.
261 (initialize_low_arch): Call selftests::register_test.
263 2017-11-22 Yao Qi <yao.qi@linaro.org>
265 * remote-utils.c (prepare_resume_reply): Use memcpy.
267 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
269 * linux-low.c (kill_one_lwp_callback): Return void, take
270 argument directly, don't filter on pid.
271 (linux_kill): Use for_each_thread.
273 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
275 * linux-low.c (need_step_over_p): Return bool, remove dummy
277 (linux_resume, proceed_all_lwps): Use find_thread.
279 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
281 * linux-low.c (resume_status_pending_p): Return bool, remove
283 (linux_resume): Use find_thread.
285 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
287 * linux-low.c (struct thread_resume_array): Remove.
288 (linux_set_resume_request): Return void, take arguments
290 (linux_resume): Use for_each_thread.
292 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
294 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
295 return bool, remove data argument.
296 (linux_stabilize_threads): Use find_thread.
298 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
300 * linux-low.c (unsuspend_one_lwp): Remove.
301 (unsuspend_all_lwps): Use for_each_thread, inline code from
304 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
306 * gdbthread.h (find_thread): Add overload with ptid_t filter.
307 * linux-low.c (struct iterate_over_lwps_args): Remove.
308 (iterate_over_lwps_filter): Remove.
309 (iterate_over_lwps): Use find_thread.
311 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
313 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
314 (linux_handle_new_gdb_connection): Use for_each_thread, inline
315 code from reset_lwp_ptrace_options_callback.
317 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
319 * linux-arm-low.c (struct update_registers_data): Remove.
320 (update_registers_callback): Return void, take arguments
321 directly, don't check thread's pid.
322 (arm_insert_point, arm_remove_point): Use for_each_thread.
324 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
326 * win32-low.c (continue_one_thread): Return void, take argument
328 (child_continue): Use for_each_thread.
330 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
332 * win32-i386-low.c (update_debug_registers_callback): Rename
334 (update_debug_registers): ... this, return void, remove pid_p arg.
335 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
337 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
339 * inferiors.h (struct process_info): Add constructor, initialize
341 <syscalls_to_catch>: Change type to std::vector<int>.
342 * inferiors.c (add_process): Allocate process_info with new.
343 (remove_process): Free process_info with delete.
344 * linux-low.c (handle_extended_wait): Adjust.
345 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
346 * server.c (handle_general_set): Adjust.
348 2017-11-16 Pedro Alves <palves@redhat.com>
350 * remote-utils.c (remote_close): Block SIGIO signals instead of
351 uninstalling the SIGIO handler.
353 2017-11-16 Alan Hayward <alan.hayward@arm.com>
355 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
357 2017-11-16 Yao Qi <yao.qi@linaro.org>
359 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
360 (tic6x_store_gregset): Likewise.
361 (tic6x_usrregs_info): Move it up.
363 2017-11-15 Alan Hayward <alan.hayward@arm.com>
365 * Makefile.in: Update arch rules.
366 * configure.srv: Explicitly mark arch/ files.
368 2017-11-13 Andreas Schwab <schwab@suse.de>
370 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
372 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
374 2017-11-06 Pedro Alves <palves@redhat.com>
376 * config.in, configure: Regenerate.
378 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
380 * target.c (struct thread_search): Remove.
381 (thread_search_callback): Remove.
382 (prepare_to_access_memory): Use for_each_thread instead of
383 find_inferior. Inline code from thread_search_callback.
385 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
387 * server.c (struct visit_actioned_threads_data): Remove.
388 (visit_actioned_threads): Change prototype to take arguments
390 (resume): Use find_thread instead of find_inferior.
392 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
394 * server.c (queue_stop_reply_callback): Change prototype, return
396 (find_status_pending_thread_callback): Remove.
397 (handle_status): Replace find_inferior with find_thread and
400 2017-10-25 Alan Hayward <alan.hayward@arm.com>
402 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
404 (aarch64_store_gregset): Likewise.
405 (aarch64_fill_fpregset): Likewise.
406 (aarch64_store_fpregset): Likewise.
408 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
410 * gdbthread.h (find_thread, for_each_thread): New functions.
411 * inferiors.c (thread_of_pid): Remove.
412 (find_any_thread_of_pid): Use find_thread.
413 * linux-low.c (num_lwps): Use for_each_thread.
415 2017-10-17 Yao Qi <yao.qi@linaro.org>
417 * Makefile.in: Remove one rule.
418 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
420 2017-10-17 Yao Qi <yao.qi@linaro.org>
422 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
423 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
425 2017-10-17 Yao Qi <yao.qi@linaro.org>
427 * configure.srv: Rename arm.o with arch/arm.o.
429 2017-10-17 Yao Qi <yao.qi@linaro.org>
431 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
432 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
433 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
434 (arch-i386.o, arch-amd64.o): Remove rules.
435 (arch/%.o): New rule.
436 Update POSTCOMPILE and COMPILE.pre.
437 * configure.ac: Invoke AC_CONFIG_COMMANDS.
438 * configure: Re-generated.
439 * configure.srv: Replace arch-i386.o with arch/i386.o.
440 Replace arch-amd64.o with arch/amd64.o.
442 2017-10-16 Yao Qi <yao.qi@linaro.org>
444 * configure: Regenerated.
446 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
448 * inferiors.h: (struct inferior_list): Remove.
449 (struct inferior_list_entry); Remove.
450 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
451 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
452 get_first_inferior): Remove.
453 (for_each_inferior, for_each_inferior_with_data, find_inferior,
454 find_inferior_id, find_inferior_in_random): Change signature.
455 * inferiors.c (all_threads): Change type to
456 std::list<thread_info *>.
457 (get_thread): Remove macro.
458 (find_inferior, find_inferior_id): Change signature, implement
460 (find_inferior_in_random): Change signature, implement using
461 find_thread_in_random.
462 (for_each_inferior, for_each_inferior_with_data): Change
463 signature, implement using for_each_thread.
464 (add_inferior_to_list, remove_inferior): Remove.
465 (add_thread, get_first_thread, thread_of_pid,
466 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
467 (get_first_inferior, one_inferior_p, clear_inferior_list):
469 (clear_inferiors, get_thread_process): Update.
470 * gdbthread.h: Include <list>.
471 (struct thread_info) <entry>: Remove field.
473 (all_threads): Change type to std::list<thread_info *>.
474 (get_first_inferior): Add doc.
475 (find_thread, for_each_thread, find_thread_in_random): New
477 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
478 * linux-arm-low.c (update_registers_callback): Update.
479 * linux-low.c (second_thread_of_pid_p): Update.
480 (kill_one_lwp_callback, linux_detach_lwp_callback,
481 delete_lwp_callback, status_pending_p_callback, same_lwp,
482 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
483 iterate_over_lwps, not_stopped_callback,
484 resume_stopped_resumed_lwps, count_events_callback,
485 select_singlestep_lwp_callback, select_event_lwp_callback,
486 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
487 suspend_and_send_sigstop_callback, wait_for_sigstop,
488 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
489 lwp_running, linux_set_resume_request, resume_status_pending_p,
490 need_step_over_p, start_step_over, linux_resume_one_thread,
491 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
492 reset_lwp_ptrace_options_callback): Update.
493 * linux-mips-low.c (update_watch_registers_callback): Update.
494 * regcache.c (regcache_invalidate_one, regcache_invalidate):
496 (free_register_cache_thread_one): Remove.
497 (regcache_release): Update.
498 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
499 handle_qxfer_threads_worker): Update.
500 (handle_query): Update, use list iterator.
501 (visit_actioned_threads, handle_pending_status,
502 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
503 clear_pending_status_callback, set_pending_status_callback,
504 find_status_pending_thread_callback, handle_status,
505 process_serial_event): Update.
506 * target.c (thread_search_callback): Update.
507 * thread-db.c (thread_db_get_tls_address): Update.
508 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
510 * win32-i386-low.c (update_debug_registers_callback): Update.
511 * win32-low.c (delete_thread_info, child_delete_thread,
512 continue_one_thread, suspend_one_thread,
513 get_child_debug_event): Adjust.
515 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
517 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
518 * inferiors.h: Include <list>.
519 (struct process_info) <entry>: Remove field.
521 (pid_of): Change macro to function.
522 (ptid_of, lwpid_of): Remove macro.
523 (all_processes): Change type to std::list<process_info *>.
524 (ALL_PROCESSES): Remove macro.
525 (for_each_process, find_process): New function.
526 * inferiors.c (all_processes): Change type to
527 std::list<process_info *>.
528 (find_thread_process): Adjust.
529 (add_process): Likewise.
530 (remove_process): Likewise.
531 (find_process_pid): Likewise.
532 (get_first_process): Likewise.
533 (started_inferior_callback): Remove.
534 (have_started_inferiors_p): Adjust.
535 (attached_inferior_callback): Remove.
536 (have_attached_inferiors_p): Adjust.
537 * linux-low.c (check_zombie_leaders): Likewise.
538 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
539 (x86_linux_update_xmltarget): Adjust.
540 * server.c (handle_query): Likewise.
541 (gdb_reattached_process): Remove.
542 (handle_status): Adjust.
543 (kill_inferior_callback): Likewise.
544 (detach_or_kill_inferior): Remove.
545 (print_started_pid): Likewise.
546 (print_attached_pid): Likewise.
547 (detach_or_kill_for_exit): Update.
548 (process_serial_event): Likewise.
549 * linux-arm-low.c (arm_new_fork): Likewise.
551 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
553 * dll.h: Include <list>.
554 (struct dll_info): Add constructor.
555 <entry>: Remove field.
556 (all_dlls): Change type to std::list<dll_info>.
557 * dll.c: Include <algorithm>.
558 (get_dll): Remove macro.
559 (all_dlls): Change type to std::list<dll_info *>.
560 (free_one_dll): Remove.
561 (match_dll): Likewise.
562 (loaded_dll): Adjust.
563 (unloaded_dll): Adjust to all_dlls type change, use
564 std::find_if. Inline code from match_dll.
565 (clear_dlls): Adjust to all_dlls type change.
566 * server.c (emit_dll_description): Remove.
567 (handle_qxfer_libraries): Adjust to all_dlls type change,
568 integrate emit_dll_description's functionality.
570 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
572 * linux-low.h (struct linux_target_ops) <delete_process>: New
574 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
575 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
576 (struct linux_target_ops): Add delete_process callback.
577 * linux-arm-low.c (arm_delete_process): New.
578 (struct linux_target_ops): Add delete_process callback.
579 * linux-bfin-low.c (struct linux_target_ops): Likewise.
580 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
581 * linux-m32r-low.c (struct linux_target_ops): Likewise.
582 * linux-mips-low.c (mips_linux_delete_process): New.
583 (struct linux_target_ops): Add delete_process callback.
584 * linux-ppc-low.c (struct linux_target_ops): Likewise.
585 * linux-s390-low.c (struct linux_target_ops): Likewise.
586 * linux-sh-low.c (struct linux_target_ops): Likewise.
587 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
588 * linux-tile-low.c (struct linux_target_ops): Likewise.
589 * linux-x86-low.c (x86_linux_delete_process): New.
590 (struct linux_target_ops): Add delete_process callback.
591 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
593 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
595 * linux-aarch64-low.c (the_low_target): Add thread delete
597 * linux-arm-low.c (arm_delete_thread): New function.
598 (the_low_target): Add thread delete callback.
599 * linux-bfin-low.c (the_low_target): Likewise.
600 * linux-crisv32-low.c (the_low_target): Likewise.
601 * linux-low.c (delete_lwp): Invoke delete_thread callback if
603 * linux-low.h (struct linux_target_ops) <delete_thread>: New
605 * linux-m32r-low.c (the_low_target): Add thread delete callback.
606 * linux-mips-low.c (mips_linux_delete_thread): New function.
607 (the_low_target): Add thread delete callback.
608 * linux-ppc-low.c (the_low_target): Likewise.
609 * linux-s390-low.c (the_low_target): Likewise.
610 * linux-sh-low.c (the_low_target): Likewise.
611 * linux-tic6x-low.c (the_low_target): Likewise.
612 * linux-tile-low.c (the_low_target): Likewise.
613 * linux-x86-low.c (the_low_target): Likewise.
614 * linux-xtensa-low.c (the_low_target): Likewise.
616 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
618 * win32-low.c: Include "common-inferior.h".
620 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
622 * inferiors.c (set_inferior_cwd): New function.
623 * server.c (handle_general_set): Handle QSetWorkingDir packet.
624 (handle_query): Inform that QSetWorkingDir is supported.
625 * win32-low.c (create_process): Pass the inferior's cwd to
628 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
630 * inferiors.c (current_inferior_cwd): New global variable.
631 (get_inferior_cwd): New function.
632 * inferiors.h (struct process_info) <cwd>: New field.
634 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
636 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
637 (OBS): Add gdb_tilde_expand.o.
639 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
641 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
642 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
644 2017-09-29 Pedro Alves <palves@redhat.com>
646 * ax.c (gdb_parse_agent_expr): Constify.
647 * ax.h (gdb_parse_agent_expr): Constify.
648 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
650 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
651 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
652 * remote-utils.h (read_ptid): Constify.
653 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
654 (process_point_options, process_serial_event): Constify.
655 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
656 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
657 (cmd_qtbuffer): Constify.
659 2017-09-29 Pedro Alves <palves@redhat.com>
661 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
664 2017-09-29 Pedro Alves <palves@redhat.com>
666 * linux-low.c (handle_extended_wait): Pass parent thread instead
667 of process to thread_db_notice_clone.
668 * linux-low.h (thread_db_notice_clone): Replace parent process
669 parameter with parent thread parameter.
670 * thread-db.c (find_one_thread): Add comment.
671 (thread_db_notice_clone): Replace parent process parameter with
672 parent thread parameter. Temporarily switch to the parent thread.
674 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
676 * gdbthread.h: Include "common-gdbthread.h".
677 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
678 "if" when validating the ptid.
679 * remote-utils.c: Include "gdbthread.h".
680 (prepare_resume_reply): Use "switch_to_thread".
681 * target.c (done_accessing_memory): Likewise.
683 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
685 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
686 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
687 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
688 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
689 s390x-gs-linux64-ipa.o to ipa_obj.
690 * linux-s390-low.c (HWCAP_S390_GS): New define.
691 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
693 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
694 (s390_arch_setup): Check for guarded-storage support and choose
696 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
697 init_registers_s390x_gs_linux64.
698 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
700 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
701 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
703 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
705 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
707 2017-09-21 Kevin Buettner <kevinb@redhat.com>
709 * linux-low.h (struct lwp_info): Add new field, thread_handle.
710 (thread_db_thread_handle): Declare.
711 * linux-low.c (linux_target_ops): Initialize thread_handle.
712 * server.c (handle_qxfer_threads_worker): Add support for
714 * target.h (struct target_ops): Add new function pointer,
716 (target_thread_handle): Define.
717 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
719 (thread_db_thread_handle): New function.
721 2017-09-21 Kevin Buettner <kevinb@redhat.com>
723 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
724 * linux-low.h (thread_db_notice_clone): Declare.
725 * thread-db.c (thread_db_notice_clone): New function.
727 2017-09-21 Pedro Alves <palves@redhat.com>
729 * server.c (gdb_read_memory, handle_status, process_serial_event)
730 (handle_serial_event, handle_target_event): Adjust to
731 set_desired_thread prototype change.
732 * target.c (set_desired_thread): Remove 'use_general' parameter
734 * target.h (set_desired_thread): Remove 'use_general' parameter.
736 2017-09-20 Tom Tromey <tom@tromey.com>
738 * target.c (target_terminal::terminal_state): Define.
739 (target_terminal::init): Rename from target_terminal_init.
740 (target_terminal::inferior): Rename from
741 target_terminal_inferior.
742 (target_terminal::ours): Rename from target_terminal_ours.
743 (target_terminal::ours_for_output, target_terminal::info): New.
745 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
747 * server.c (accumulate_file_name_length): Remove.
748 (emit_dll_description): Adjust to std::string change.
749 (handle_qxfer_libraries): Use std::string to hold document.
751 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
753 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
754 return type of xml_escape_text.
755 * server.c (emit_dll_description): Likewise.
757 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
759 * server.c (captured_main): Accept argument for --selftest.
760 Update run_tests call.
761 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
762 when registering selftests.
764 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
766 * regcache.c (get_thread_regcache): Update code to use "std::vector"
767 instead of "VEC" for "target_desc.reg_defs".
768 (regcache_cpy): Likewise.
769 (registers_to_string): Likewise.
770 (registers_from_string): Likewise.
771 (find_regno): Likewise.
772 (supply_regblock): Likewise.
773 (regcache_raw_read_unsigned): Likewise.
774 * tdesc.c (init_target_desc): Likewise.
775 (tdesc_create_reg): Likewise.
776 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
777 (struct target_desc) <reg_defs>: Convert to "std::vector".
778 (target_desc): Do not initialize "reg_defs".
779 (~target_desc): Update code to use "std::vector" instead of "VEC"
780 for "target_desc.reg_defs".
781 (operator==): Likewise.
783 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
785 * inferiors.h (thread_to_gdb_id): Remove.
786 * inferiors.c (thread_to_gdb_id): Remove.
787 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
788 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
789 lynx_store_registers, lynx_read_memory, lynx_write_memory):
791 * nto-low.c (nto_fetch_registers, nto_store_registers,
792 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
794 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
796 * inferiors.h (gdb_id_to_thread_id): Remove.
797 * inferiors.c (gdb_id_to_thread_id): Remove.
798 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
799 removal. Move pid declaration closer to where it's used.
801 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
803 * server.c (handle_detach): New function.
804 (process_serial_event): Move code out, call handle_detach.
806 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
808 * server.c (require_running): Rename to ...
809 (require_running_or_return): ... this ...
810 (require_running_or_break): ... and this.
811 (handle_query, process_serial_event): Adjust.
813 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
815 * linux-low.c (linux_set_resume_request): Remove unused
818 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
820 * server.c (first_thread_of): Remove.
821 (process_serial_event): Replace usage of first_thread_of with
822 find_any_thread_of_pid.
823 * tracepoint.c (same_process_p): Remove.
824 (gdb_agent_about_to_close): Replace usage of same_process_p with
825 find_any_thread_of_pid.
826 * linux-x86-low.c (same_process_callback): Remove.
827 (x86_arch_setup_process_callback): Replace usage of
828 same_process_callback with find_any_thread_of_pid.
829 * thread-db.c (any_thread_of): Remove.
830 (switch_to_process): Replace usage of any_thread_of with
831 find_any_thread_of_pid.
832 * inferiors.c (thread_pid_matches_callback): Remove.
833 (find_thread_process): Adjust to use find_any_thread_of_pid.
835 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
837 * regcache.c (get_thread_regcache): Guard calls to "memset"
840 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
842 * linux-low.c (handle_extended_wait): Use
843 "allocate_target_description" instead of "XNEW".
844 * linux-x86-low.c (initialize_low_arch): Likewise.
846 2017-09-05 Yao Qi <yao.qi@linaro.org>
848 * configure.srv (srv_i386_regobj): Remove.
849 (srv_amd64_regobj): Remove.
850 (srv_regobj): Set it to "" for x86 non-linux targets.
851 * linux-x86-tdesc.c (i386_linux_read_description):
852 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
853 (init_registers_i386): Remove the declaration.
854 (tdesc_i386): Remove the declaration.
855 (lynx_i386_arch_setup): Call i386_create_target_description.
856 * nto-x86-low.c: Likewise.
857 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
858 [!__x86_64__]: include arch/i386.h.
859 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
861 2017-09-05 Yao Qi <yao.qi@linaro.org>
863 * configure.srv (srv_amd64_linux_xmlfiles): Remove
864 i386/amd64-XXX-linux from it.
866 2017-09-05 Yao Qi <yao.qi@linaro.org>
868 * configure.srv: Empty srv_amd64_linux_regobj if $development is
870 (ipa_amd64_linux_regobj): Remove.
871 (ipa_x32_linux_regobj): Remove.
873 2017-09-05 Yao Qi <yao.qi@linaro.org>
875 * Makefile.in (arch-amd64.o): New rule.
876 * configure.srv: Append arch-amd64.o.
877 * linux-amd64-ipa.c: Include common/x86-xstate.h.
878 (get_ipa_tdesc): Call amd64_linux_read_description.
879 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
880 and init_registers_amd64_XXX.
881 * linux-x86-low.c (x86_linux_read_description): Call
882 amd64_linux_read_description.
883 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
884 (initialize_low_arch): Don't call init_registers_x32_XXX and
885 init_registers_amd64_XXX.
886 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
888 [__x86_64__] (amd64_tdesc_test): New function.
889 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
890 and init_registers_amd64_XXX.
891 * linux-x86-tdesc.c: Include arch/amd64.h.
892 (xcr0_to_tdesc_idx): New function.
893 (i386_linux_read_description): New function.
894 (amd64_get_ipa_tdesc_idx): New function.
895 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
896 (amd64_get_ipa_tdesc): Declare.
898 2017-09-05 Yao Qi <yao.qi@linaro.org>
900 * configure.srv (srv_i386_linux_xmlfiles): Remove
901 i386/i386-XXX-linux.xml from it.
903 2017-09-05 Yao Qi <yao.qi@linaro.org>
905 * configure.srv: Set srv_i386_linux_regobj empty if $development
907 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
908 initialize_low_tdesc.
909 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
910 with #if initialize_low_tdesc.
911 * linux-x86-tdesc-selftest.c: New file.
912 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
914 2017-09-05 Yao Qi <yao.qi@linaro.org>
916 * Makefile.in (arch-i386.o): New rule.
917 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
918 (x86_64-*-linux*): Likewise.
919 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
921 (i386_linux_read_description): Remove code and call
922 i386_create_target_description.
923 * tdesc.c (allocate_target_description): New function.
924 * tdesc.h (set_tdesc_architecture): Remove declaration.
925 (set_tdesc_osabi): Likewise.
927 2017-09-05 Yao Qi <yao.qi@linaro.org>
929 * linux-x86-tdesc.c: Don't include <inttypes.h>.
930 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
931 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
933 * server.c (get_features_xml): Call tdesc_get_features_xml.
934 * tdesc.c (set_tdesc_architecture): New function.
935 (set_tdesc_osabi): New function.
936 (tdesc_get_features_xml): New function.
937 (tdesc_create_feature): Add an argument.
938 * tdesc.h (struct target_desc) <features>: New field.
939 <arch, osabi>: New field.
940 (~target_desc): xfree features, arch, and osabi.
941 (target_desc::oerator==): Don't compare .xmltarget.
942 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
943 (set_tdesc_osabi): Likewise.
944 (tdesc_get_features_xml): Likewise.
946 2017-09-05 Yao Qi <yao.qi@linaro.org>
948 * linux-x86-tdesc.c: Include selftest.h.
949 (i386_tdesc_test): New function.
950 (initialize_low_tdesc): Call selftests::register_test.
951 * tdesc.h: Include regdef.h.
952 (target_desc): Override operator == and !=.
954 2017-09-05 Yao Qi <yao.qi@linaro.org>
956 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
958 * linux-i386-ipa.c: Include common/x86-xstate.h
959 (get_ipa_tdesc): Call i386_linux_read_description.
960 (initialize_low_tracepoint): Don't call init_registers_XXX
961 functions, call initialize_low_tdesc instead.
962 * linux-x86-low.c (x86_linux_read_description): Call
963 i386_linux_read_description.
964 (initialize_low_arch): Don't call init_registers_i386_XXX
965 functions, call initialize_low_tdesc.
966 * linux-x86-tdesc.c: New file.
967 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
968 (i386_get_ipa_tdesc_idx): Declare.
969 (i386_get_ipa_tdesc): Declare.
970 (initialize_low_tdesc): Declare.
972 2017-09-05 Yao Qi <yao.qi@linaro.org>
974 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
977 2017-09-05 Yao Qi <yao.qi@linaro.org>
979 * Makefile.in (IPA_OBJS): Add vec-ipa.o
980 * regcache.c (get_thread_regcache): Use VEC_length.
981 (init_register_cache): Likewise.
982 (regcache_cpy): Likewise.
983 (registers_to_string): Iterate reg_defs via VEC_iterate.
984 (find_regno): Likewise.
985 (find_register_by_number): Use VEC_index.
986 (register_size): Call find_register_by_number.
987 (register_data): Call find_register_by_number.
988 (supply_regblock): Use VEC_length.
989 (regcache_raw_read_unsigned): Likewise.
990 * tdesc.c (init_target_desc): Iterate reg_defs via
992 (default_description): Update initializer.
993 (copy_target_description): Don't update field num_registers.
994 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
995 <num_registers>: Remove.
997 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
999 * Makefile.in (.SECONDARY): Define target.
1001 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1003 * linux-low.c (linux_wait_1): Adjust.
1004 * server.c (queue_stop_reply_callback): Adjust.
1006 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1008 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1009 QEnvironmentUnset and QEnvironmentReset packets.
1010 (handle_query): Inform remote that QEnvironmentHexEncoded,
1011 QEnvironmentUnset and QEnvironmentReset are supported.
1013 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1015 * inferiors.h (inferior_target_data): Rename to ...
1016 (thread_target_data): ... this.
1017 (inferior_regcache_data): Rename to ...
1018 (thread_regcache_data): ... this.
1019 (set_inferior_regcache_data): Rename to ...
1020 (set_thread_regcache_data): ... this.
1021 * inferiors.c (inferior_target_data): Rename to ...
1022 (thread_target_data): ... this.
1023 (inferior_regcache_data): Rename to ...
1024 (thread_regcache_data): ... this.
1025 (set_inferior_regcache_data): Rename to ...
1026 (set_thread_regcache_data): ... this.
1027 (free_one_thread): Update.
1028 * linux-low.h (get_thread_lwp): Update.
1029 * regcache.c (get_thread_regcache): Update.
1030 (regcache_invalidate_thread): Update.
1031 (free_register_cache_thread): Update.
1032 * win32-i386-low.c (update_debug_registers_callback): Update.
1033 (win32_get_current_dr): Update.
1034 * win32-low.c (thread_rec): Update.
1035 (delete_thread_info): Update.
1036 (continue_one_thread): Update.
1037 (suspend_one_thread): Update.
1039 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1041 * inferiors.c (set_inferior_target_data): Remove.
1042 * inferiors.h (set_inferior_target_data): Remove.
1044 2017-08-18 Yao Qi <yao.qi@linaro.org>
1046 * Makefile.in (OBS): Add selftest.o.
1047 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1048 * configure, config.in: Re-generated.
1049 * server.c: Include common/sefltest.h.
1050 (captured_main): Handle option --selftest.
1052 2017-08-09 Yao Qi <yao.qi@linaro.org>
1054 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1055 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1056 i386-avx-mpx.o and i386-mmx.o.
1057 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1058 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1059 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1060 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1061 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1062 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1063 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1064 i386/amd64-avx-mpx.xml.
1066 2017-08-09 Yao Qi <yao.qi@linaro.org>
1068 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1069 and x32-avx-avx512.o.
1070 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1071 i386/x32-avx-avx512.xml.
1073 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1075 * tracepoint.h (enum class fast_tpoint_collect_result): New
1077 (fast_tracepoint_collecting): Change return type to
1078 fast_tpoint_collect_result.
1079 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1080 * linux-low.h: Include tracepoint.h.
1081 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1082 fast_tpoint_collect_result.
1083 * linux-low.c (handle_tracepoints): Adjust.
1084 (linux_fast_tracepoint_collecting): Change return type to
1085 fast_tpoint_collect_result.
1086 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1087 linux_wait_1, stuck_in_jump_pad_callback,
1088 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1089 proceed_one_lwp): Adjust to type change.
1091 2017-07-10 Yao Qi <yao.qi@linaro.org>
1093 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1095 2017-06-29 Yao Qi <yao.qi@linaro.org>
1097 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1099 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1101 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1103 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1105 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1107 * linux-low.c (linux_create_inferior): Adjust code to access the
1108 environment information via 'gdb_environ' class.
1109 * lynx-low.c (lynx_create_inferior): Likewise.
1110 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1111 (get_environ): Return a pointer to 'our_environ'.
1112 (captured_main): Initialize 'our_environ'.
1113 * server.h (get_environ): Adjust prototype.
1114 * spu-low.c (spu_create_inferior): Adjust code to access the
1115 environment information via 'gdb_environ' class.
1117 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1119 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1120 usage of "register" keyword.
1122 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1124 * configure: Re-generate.
1126 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1128 * configure: Re-generate.
1130 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1132 * Makefile.in (COMPILE.pre): Add "-x c++".
1134 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1136 * fork-child.c: Conditionally include <signal.h>.
1138 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1140 * server.c (handle_general_set): Handle new packet
1141 "QStartupWithShell".
1142 (handle_query): Add "QStartupWithShell" to the list of supported
1144 (gdbserver_usage): Add help text explaining the
1145 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1147 (captured_main): Recognize and act upon the presence of the new
1150 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1151 Pedro Alves <palves@redhat.com>
1153 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1154 * configure: Regenerate.
1155 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1157 (i[34567]86-*-lynxos*): Likewise.
1158 (spu*-*-*): Likewise.
1159 * fork-child.c: New file.
1160 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1162 (linux_ptrace_fun): New function.
1163 (linux_create_inferior): Adjust function prototype to reflect
1164 change on "target.h". Adjust function code to use
1166 (linux_request_interrupt): Delete "signal_pid".
1167 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1168 (lynx_ptrace_fun): New function.
1169 (lynx_create_inferior): Adjust function prototype to reflect
1170 change on "target.h". Adjust function code to use
1172 * nto-low.c (nto_create_inferior): Adjust function prototype and
1173 code to reflect change on "target.h". Update comments.
1174 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1175 "common-terminal.h" and "environ.h".
1176 (terminal_fd): Moved to fork-child.c.
1177 (old_foreground_pgrp): Likewise.
1178 (restore_old_foreground_pgrp): Likewise.
1179 (last_status): Make it global.
1180 (last_ptid): Likewise.
1181 (our_environ): New variable.
1182 (startup_with_shell): Likewise.
1183 (program_name): Likewise.
1184 (program_argv): Rename to...
1185 (program_args): ...this.
1186 (wrapper_argv): New variable.
1187 (start_inferior): Delete function.
1188 (get_exec_wrapper): New function.
1189 (get_exec_file): Likewise.
1190 (get_environ): Likewise.
1191 (prefork_hook): Likewise.
1192 (post_fork_inferior): Likewise.
1193 (postfork_hook): Likewise.
1194 (postfork_child_hook): Likewise.
1195 (handle_v_run): Update code to deal with arguments coming from the
1196 remote host. Update calls from "start_inferior" to
1198 (captured_main): Likewise. Initialize environment variable. Call
1200 * server.h (post_fork_inferior): New prototype.
1201 (get_environ): Likewise.
1202 (last_status): Declare.
1203 (last_ptid): Likewise.
1204 (signal_pid): Likewise.
1205 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1206 (spu_ptrace_fun): New function.
1207 (spu_create_inferior): Adjust function prototype to reflect change
1208 on "target.h". Adjust function code to use "fork_inferior".
1209 * target.c (target_terminal_init): New function.
1210 (target_terminal_inferior): Likewise.
1211 (target_terminal_ours): Likewise.
1212 * target.h: Include <vector>.
1213 (struct target_ops) <create_inferior>: Update prototype.
1214 (create_inferior): Update macro.
1215 * utils.c (gdb_flush_out_err): New function.
1216 * win32-low.c (win32_create_inferior): Adjust function prototype
1217 and code to reflect change on "target.h".
1219 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1221 * inferiors.c (switch_to_thread): New function.
1223 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1225 * Makefile.in (SFILE): Add "common/job-control.c".
1226 (OBS): Add "job-control.o".
1228 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1230 * Makefile: Remove "@host_makefile_frag@".
1232 2017-05-05 Pedro Alves <palves@redhat.com>
1234 * configure: Regenerate.
1236 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1238 * configure: Regenerate.
1240 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1242 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1243 software_single_step change of return type to
1244 std::vector<CORE_ADDR>.
1245 * linux-low.c (install_software_single_step_breakpoints):
1247 * linux-low.h (install_software_single_step_breakpoints):
1250 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1252 * remote-utils.c: Include "gdb_termios.h" instead of
1254 * terminal.h: Delete file.
1256 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1258 * server.c: Include <vector>.
1259 <program_argv, wrapper_argv>: Convert to std::vector.
1260 (start_inferior): Rewrite function to use C++.
1261 (handle_v_run): Likewise. Update code that calculates the argv
1262 based on the vRun packet; use C++.
1263 (captured_main): Likewise.
1265 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1267 * server.c (handle_v_cont): Initialize thread_resume::thread
1270 2017-04-05 Pedro Alves <palves@redhat.com>
1272 * configure: Regenerate.
1274 2017-04-05 Pedro Alves <palves@redhat.com>
1276 * gdbreplay.c (sync_error): Constify.
1277 * linux-x86-low.c (push_opcode): Constify.
1279 2017-04-05 Pedro Alves <palves@redhat.com>
1281 * win32-low.c (get_child_debug_event)
1282 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1283 Report TARGET_WAITKIND_SPURIOUS instead.
1285 2017-04-05 Pedro Alves <palves@redhat.com>
1287 * remote-utils.c (remote_prepare, remote_open): Constify.
1288 * remote-utils.h (remote_prepare, remote_open): Constify.
1289 * server.c (captured_main): Constify 'port' handling.
1291 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1293 * Makefile.in (clean): Clear .deps.
1295 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1297 * .gitignore: Remove generated files, replace with wildcard.
1298 * (clean): Replace removal of generated files with wildcard.
1299 (version.c): Replace with...
1300 (version-generated.c): ...this.
1301 (xml-builtin.c): Replace with...
1302 (xml-builtin-generated.c): ...this.
1303 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1304 (%.c: *regformats*): Replace with...
1305 (%-generated.c: *regformats*): ...this.
1307 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1309 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1310 (xtensa_fill_gregset): Call collect_register_by_name for
1312 (xtensa_store_gregset): Call supply_register_by_name for
1315 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1317 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1318 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1319 (xtensa_store_gregset): Call supply_register for all registers in
1320 a0_regnum..a0_regnum + C0_NREGS range.
1322 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1324 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1325 (ax-ipa.o: ax.c): Remove.
1326 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1327 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1328 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1329 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1330 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1332 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1334 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1335 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1336 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1337 (errors-ipa.o: ../common/errors.c): Remove.
1338 (format-ipa.o: ../common/format.c): Remove.
1339 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1341 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1343 * Makefile.in (%-ipa.o: %.c): New rule.
1344 (tracepoint-ipa.o: tracepoint.c): Remove.
1345 (utils-ipa.o: utils.c): Remove.
1346 (remote-utils-ipa.o: remote-utils.c): Remove.
1347 (regcache-ipa.o: regcache.c): Remove.
1348 (i386-linux-ipa.o: i386-linux.c): Remove.
1349 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1350 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1351 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1352 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1353 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1354 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1355 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1356 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1357 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1358 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1359 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1360 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1361 (aarch64-ipa.o: aarch64.c): Remove.
1362 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1363 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1364 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1365 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1366 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1367 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1368 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1369 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1370 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1371 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1372 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1373 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1374 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1375 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1376 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1377 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1378 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1379 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1380 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1381 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1382 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1383 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1384 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1385 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1386 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1387 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1388 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1389 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1390 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1391 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1392 (tdesc-ipa.o: tdesc.c): Remove.
1393 (x32-linux-ipa.o: x32-linux.c): Remove.
1394 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1395 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1397 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1399 * Makefile.in (%.o: ../arch/%.c): New rule.
1400 (arm.o: ../arch/arm.c): Remove.
1401 (arm-linux.o: ../arch/arm-linux.c): Remove.
1402 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1403 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1405 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1407 * Makefile.in (%.o: ../nat/%.c): New rule.
1408 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1409 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1410 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1411 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1412 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1413 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1414 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1415 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1416 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1417 (linux-personality.o: ../nat/linux-personality.c): Remove.
1418 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1419 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1420 (x86-linux.o: ../nat/x86-linux.c): Remove.
1421 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1422 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1424 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1426 * Makefile.in (%.o: ../common/%.c): New rule.
1427 (signals.o: ../common/signals.c): Remove.
1428 (print-utils.o: ../common/print-utils.c): Remove.
1429 (rsp-low.o: ../common/rsp-low.c): Remove.
1430 (common-utils.o: ../common/common-utils.c): Remove.
1431 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1432 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1433 (vec.o: ../common/vec.c): Remove.
1434 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1435 (xml-utils.o: ../common/xml-utils.c): Remove.
1436 (ptid.o: ../common/ptid.c): Remove.
1437 (buffer.o: ../common/buffer.c): Remove.
1438 (format.o: ../common/format.c): Remove.
1439 (filestuff.o: ../common/filestuff.c): Remove.
1440 (agent.o: ../common/agent.c): Remove.
1441 (errors.o: ../common/errors.c): Remove.
1442 (environ.o: ../common/environ.c): Remove.
1443 (common-debug.o: ../common/common-debug.c): Remove.
1444 (cleanups.o: ../common/cleanups.c): Remove.
1445 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1446 (fileio.o: ../common/fileio.c): Remove.
1447 (common-regcache.o: ../common/common-regcache.c): Remove.
1448 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1449 (new-op.o: ../common/new-op.c): Remove.
1450 (btrace-common.o: ../common/btrace-common.c): Remove.
1452 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1454 * Makefile.in (%.o: ../target/%.c): New rule.
1455 (waitstatus.o: ../target/waitstatus.c): Remove.
1457 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1460 (%.c: ../regformats/%.dat,
1461 (%.c: ../regformats/arm/%.dat,
1462 (%.c: ../regformats/i386/%.dat,
1463 (%.c: ../regformats/rs6000/%.dat): New rules.
1464 (aarch64.c): Remove.
1465 (reg-arm.c): Remove.
1466 (arm-with-iwmmxt.c): Remove.
1467 (arm-with-vfpv2.c): Remove.
1468 (arm-with-vfpv3.c): Remove.
1469 (arm-with-neon.c): Remove.
1470 (reg-bfin.c): Remove.
1471 (reg-cris.c): Remove.
1472 (reg-crisv32.c): Remove.
1474 (i386-linux.c): Remove.
1475 (i386-avx.c): Remove.
1476 (i386-avx-linux.c): Remove.
1477 (i386-avx-avx512.c): Remove.
1478 (i386-avx-avx512-linux.c): Remove.
1479 (i386-mpx.c): Remove.
1480 (i386-mpx-linux.c): Remove.
1481 (i386-avx-mpx-avx512-pku.c): Remove.
1482 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1483 (i386-avx-mpx.c): Remove.
1484 (i386-avx-mpx-linux.c): Remove.
1485 (i386-mmx.c): Remove.
1486 (i386-mmx-linux.c): Remove.
1487 (reg-ia64.c): Remove.
1488 (reg-m32r.c): Remove.
1489 (reg-m68k.c): Remove.
1491 (mips-linux.c): Remove.
1492 (mips-dsp-linux.c): Remove.
1493 (mips64-linux.c): Remove.
1494 (mips64-dsp-linux.c): Remove.
1495 (nios2-linux.c): Remove.
1496 (powerpc-32.c): Remove.
1497 (powerpc-32l.c): Remove.
1498 (powerpc-altivec32l.c): Remove.
1499 (powerpc-cell32l.c): Remove.
1500 (powerpc-vsx32l.c): Remove.
1501 (powerpc-isa205-32l.c): Remove.
1502 (powerpc-isa205-altivec32l.c): Remove.
1503 (powerpc-isa205-vsx32l.c): Remove.
1504 (powerpc-e500l.c): Remove.
1505 (powerpc-64l.c): Remove.
1506 (powerpc-altivec64l.c): Remove.
1507 (powerpc-cell64l.c): Remove.
1508 (powerpc-vsx64l.c): Remove.
1509 (powerpc-isa205-64l.c): Remove.
1510 (powerpc-isa205-altivec64l.c): Remove.
1511 (powerpc-isa205-vsx64l.c): Remove.
1512 (s390-linux32.c): Remove.
1513 (s390-linux32v1.c): Remove.
1514 (s390-linux32v2.c): Remove.
1515 (s390-linux64.c): Remove.
1516 (s390-linux64v1.c): Remove.
1517 (s390-linux64v2.c): Remove.
1518 (s390-te-linux64.c): Remove.
1519 (s390-vx-linux64.c): Remove.
1520 (s390-tevx-linux64.c): Remove.
1521 (s390x-linux64.c): Remove.
1522 (s390x-linux64v1.c): Remove.
1523 (s390x-linux64v2.c): Remove.
1524 (s390x-te-linux64.c): Remove.
1525 (s390x-vx-linux64.c): Remove.
1526 (s390x-tevx-linux64.c): Remove.
1527 (tic6x-c64xp-linux.c): Remove.
1528 (tic6x-c64x-linux.c): Remove.
1529 (tic6x-c62x-linux.c): Remove.
1531 (reg-sparc64.c): Remove.
1532 (reg-spu.c): Remove.
1534 (amd64-linux.c): Remove.
1535 (amd64-avx.c): Remove.
1536 (amd64-avx-linux.c): Remove.
1537 (amd64-avx-avx512.c): Remove.
1538 (amd64-avx-avx512-linux.c): Remove.
1539 (amd64-mpx.c): Remove.
1540 (amd64-mpx-linux.c): Remove.
1541 (amd64-avx-mpx-avx512-pku.c): Remove.
1542 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1543 (amd64-avx-mpx.c): Remove.
1544 (amd64-avx-mpx-linux.c): Remove.
1546 (x32-linux.c): Remove.
1547 (x32-avx.c): Remove.
1548 (x32-avx-linux.c): Remove.
1549 (x32-avx-avx512.c): Remove.
1550 (x32-avx-avx512-linux.c): Remove.
1551 (reg-xtensa.c): Remove.
1552 (reg-tilegx.c): Remove.
1553 (reg-tilegx32.c): Remove.
1555 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1557 * Makefile.in (SFILES): Add "common/environ.c".
1558 (OBJS): Add "common/environ.h".
1560 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1562 * configure.ac: Check if the fs_base and gs_base members of
1563 `struct user_regs_struct' exist.
1564 * config.in: Regenerated.
1565 * configure: Likewise.
1567 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1569 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1571 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1572 (get_next_pcs_syscall_next_pc): Likewise.
1574 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1576 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1577 * nto-x86-low.c: Likewise.
1579 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1581 * Makefile.in: Include disable-implicit-rules.mk.
1583 2016-11-23 Pedro Alves <palves@redhat.com>
1585 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1586 (debug_vprintf): Use std::chrono::steady_clock instead of
1587 gettimeofday. Use '.' instead of ':'.
1588 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1589 (get_timestamp): Use std::chrono::steady_clock instead of
1592 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1594 * Makefile.in: Fix whitespace formatting.
1596 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1598 * Makefile.in (SFILES, OBS): Flatten list and order
1601 2016-11-23 Pedro Alves <palves@redhat.com>
1603 * event-loop.c (handle_file_event): Use warning.
1604 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1605 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1608 2016-11-23 Pedro Alves <palves@redhat.com>
1610 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1612 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1613 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1614 debug_printf and debug_flush for debug output.
1615 * server.c (handle_general_set): Likewise.
1616 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1619 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1621 * Makefile.in (.c.o): Replace rule with ...
1622 (%.o: %.c): ... this one.
1624 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1626 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1627 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1629 * configure.ac: Remove checks for the make program.
1630 * configure: Re-generate.
1632 2016-10-28 Pedro Alves <palves@redhat.com>
1634 * Makefile.in (CXX_DIALECT): Get from configure.
1635 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1636 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1637 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1638 * config.in: Regenerate.
1639 * configure: Regenerate.
1641 2016-10-27 Yao Qi <yao.qi@linaro.org>
1643 * linux-low.c (linux_supports_range_stepping): Return true if
1644 can_software_single_step return true.
1646 2016-10-27 Yao Qi <yao.qi@linaro.org>
1648 * inferiors.c (find_inferior_in_random): New function.
1649 * inferiors.h (find_inferior_in_random): Declare.
1650 * linux-low.c (linux_wait_for_event_filtered): Call
1651 find_inferior_in_random instead of find_inferior.
1653 2016-10-27 Yao Qi <yao.qi@linaro.org>
1655 * linux-low.c (linux_wait_1): If single-step breakpoints are
1656 inserted, remove them.
1658 2016-10-26 Pedro Alves <palves@redhat.com>
1660 * linux-low.c (handle_extended_wait): Link parent/child fork
1662 (linux_wait_1): Unlink them.
1663 (linux_set_resume_request): Ignore resume requests for
1664 already-resumed and unhandled fork child threads.
1665 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1666 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1668 (handle_v_requests) <vCont>: Don't call require_running.
1669 * server.h (in_queued_stop_replies): New declaration.
1671 2016-10-24 Yao Qi <yao.qi@linaro.org>
1674 * linux-aarch64-low.c (append_insns): Cast the return value to
1677 2016-10-10 Yao Qi <yao.qi@linaro.org>
1679 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1681 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1683 * target.c (target_supports_multi_process): New function, moved
1685 * target.h (target_supports_multi_process): ... here. Remove
1688 2016-10-05 Tom Tromey <tom@tromey.com>
1691 * tracepoint.c (handle_tracepoint_bkpts): Check
1692 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1694 2016-10-05 Yao Qi <yao.qi@linaro.org>
1696 * configure.srv: Update the path of arm-*.xml files.
1698 2016-10-05 Terry Guo <terry.guo@arm.com>
1699 Yao Qi <yao.qi@linaro.org>
1701 * Makefile.in: Adjust the path of rules.
1702 * configure.srv: Update the path of xml files.
1703 * regformats/arm-with-iwmmxt.dat: Regenerated.
1704 * regformats/arm-with-neon.dat: Likewise.
1705 * regformats/arm-with-vfpv2.dat: Likewise.
1706 * regformats/arm-with-vfpv3.dat Likewise.
1708 2016-09-30 Yao Qi <yao.qi@linaro.org>
1711 * target.c (target_stop_and_wait): Don't call
1712 target_continue_no_signal, use resume_stop instead.
1714 2016-09-26 Yao Qi <yao.qi@linaro.org>
1716 * linux-low.c (linux_wait_1): Call debug_exit.
1718 2016-09-23 Pedro Alves <palves@redhat.com>
1720 * Makefile.in (SFILES): Add common/new-op.c.
1721 (OBS): Add common/new-op.o.
1722 (new-op.o): New rule.
1724 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1726 * .gitinore: Ignore more files.
1728 2016-09-21 Yao Qi <yao.qi@linaro.org>
1730 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1733 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1735 * server.c (start_inferior): Call target_mourn_inferior instead of
1736 mourn_inferior; pass ptid_t argument to it.
1738 (handle_target_event): Likewise.
1739 * target.c (target_mourn_inferior): New function.
1740 * target.h (mourn_inferior): Delete macro.
1742 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1744 * linux-low.c (lwp_is_stepping): New function.
1746 2016-09-06 Carl Love <cel@us.ibm.com>
1748 * server.c (start_inferior): Fixed comment, requested comment change
1749 didn't get updated correctly. Removed reference to ptrace () call as
1750 it is only true on Linux systems.
1752 2016-09-06 Carl Love <cel@us.ibm.com>
1754 * server.c (start_inferior): Do not call
1755 function target_post_create_inferior () if the
1756 inferior process has already exited.
1758 2016-09-05 Pedro Alves <palves@redhat.com>
1760 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1761 (COMPILE.pre, CC_LD): Use CXX directly.
1762 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1763 * acinclude.m4: Don't include build-with-cxx.m4.
1764 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1765 * configure: Regenerate.
1767 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1770 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1771 call writing data to own_buf.
1773 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1775 * target.c (mywait): Call target_wait instead of
1777 (target_wait): New function.
1779 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1781 * server.c (start_inferior): New variable 'ptid'. Replace calls
1782 to the_target->resume by target_continue{,_no_signal}, depending
1784 * target.c (target_stop_and_wait): Call target_continue_no_signal
1785 instead of the_target->resume.
1786 (target_continue): New function.
1788 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1790 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1792 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1795 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1797 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1798 * linux-arm-low.c (ps_get_thread_area): Likewise.
1799 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1800 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1801 * linux-mips-low.c (ps_get_thread_area): Likewise.
1802 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1803 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1804 * linux-x86-low.c (ps_get_thread_area): Likewise.
1805 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1807 2016-08-19 Pedro Alves <palves@redhat.com>
1809 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1811 2016-08-19 Pedro Alves <palves@redhat.com>
1813 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1814 comment. Use memcpy instead of casting through unsigned long.
1816 2016-08-19 Pedro Alves <palves@redhat.com>
1818 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1819 allocating around 0x80000000.
1821 2016-08-19 Pedro Alves <palves@redhat.com>
1824 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1825 (x32-avx512-linux-ipa.o): New rules.
1826 * configure.ac (x86_64-*-linux*): New x32 check.
1827 * configure.srv (ipa_x32_linux_regobj): New.
1828 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1829 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1831 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1833 * configure: Regenerate.
1835 2016-08-09 Pedro Alves <palves@redhat.com>
1838 * Makefile.in (OBS): Add signals-state-save-restore.o.
1839 (signals-state-save-restore.o): New rule.
1840 * config.in: Regenerate.
1841 * configure: Regenerate.
1842 * linux-low.c: Include "signals-state-save-restore.h".
1843 (linux_create_inferior): Call
1844 restore_original_signals_state.
1845 * server.c: Include "dispositions-save-restore.h".
1846 (captured_main): Call save_original_signals_state.
1848 2016-08-05 Pedro Alves <palves@redhat.com>
1850 * configure: Regenerate.
1852 2016-08-04 Yao Qi <yao.qi@linaro.org>
1854 * linux-low.c (regsets_fetch_inferior_registers): Check
1855 errno is ESRCH or not.
1857 2016-08-02 Yao Qi <yao.qi@linaro.org>
1859 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1860 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1861 (thread_db_load_search): Update.
1862 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1863 td_ta_set_event and td_ta_event_getmsg.
1865 2016-07-26 Pedro Alves <palves@redhat.com>
1868 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1869 of unsigned long for 64-bit registers and use uint32_t instead of
1870 unsigned int for 32-bit registers.
1872 2016-07-26 Pedro Alves <palves@redhat.com>
1874 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1877 2016-07-21 Tom Tromey <tom@tromey.com>
1879 * configure: Rebuild.
1881 2016-07-21 Yao Qi <yao.qi@linaro.org>
1883 * mem-break.c (find_gdb_breakpoint): Cast bp to
1884 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1886 2016-07-21 Yao Qi <yao.qi@linaro.org>
1888 * server.c (handle_v_requests): Support s and S actions
1889 if target_supports_software_single_step return true.
1891 2016-07-21 Yao Qi <yao.qi@linaro.org>
1893 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1894 is resume_step, call maybe_hw_step.
1895 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1897 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1899 (proceed_one_lwp): If resume request is resume_step, install
1900 reinsert breakpoints and call maybe_hw_step.
1902 2016-07-21 Yao Qi <yao.qi@linaro.org>
1904 * linux-low.c (proceed_one_lwp): Declare.
1905 (linux_resume_one_thread): Remove local variable 'step'.
1906 Lift code enqueue signal. Call proceed_one_lwp instead of
1907 linux_resume_one_lwp.
1909 2016-07-21 Yao Qi <yao.qi@linaro.org>
1911 * linux-low.c (linux_resume_one_thread): Call
1912 enqueue_pending_signal.
1914 2016-07-21 Yao Qi <yao.qi@linaro.org>
1916 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1917 * inferiors.c (do_restore_current_thread_cleanup): New function.
1918 (make_cleanup_restore_current_thread): Likewise.
1919 * linux-low.c (install_software_single_step_breakpoints): Call
1920 make_cleanup_restore_current_thread. Switch current_thread to
1923 2016-07-21 Yao Qi <yao.qi@linaro.org>
1925 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1926 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1927 (clone_one_breakpoint): Likewise.
1928 (delete_reinsert_breakpoints): Change parameter to thread.
1930 (has_reinsert_breakpoints): Likewise.
1931 (uninsert_reinsert_breakpoints): Likewise.
1932 (reinsert_reinsert_breakpoints): Likewise.
1933 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1934 (delete_reinsert_breakpoints): Likewise.
1935 (reinsert_reinsert_breakpoints): Likewise.
1936 (uninsert_reinsert_breakpoints): Likewise.
1937 (has_reinsert_breakpoints): Likewise.
1939 2016-07-21 Yao Qi <yao.qi@linaro.org>
1941 * inferiors.c (get_thread_process): Make parameter const.
1942 * inferiors.h (get_thread_process): Update declaration.
1943 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1944 Add new parameters child_thread and parent_thread. Callers
1946 * mem-break.h (clone_all_breakpoints): Update declaration.
1948 2016-07-21 Yao Qi <yao.qi@linaro.org>
1950 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1951 <command_list, handler>: Remove.
1952 (struct gdb_breakpoint): New.
1953 (struct other_breakpoint): New.
1954 (struct reinsert_breakpoint): New.
1955 (is_gdb_breakpoint): New function.
1956 (any_persistent_commands): Update command_list if
1957 is_gdb_breakpoint returns true.
1958 (set_breakpoint): Create breakpoints according to their types.
1959 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1960 (set_gdb_breakpoint_1): Likewise.
1961 (set_gdb_breakpoint): Likewise.
1962 (clear_breakpoint_conditions): Change parameter type to
1963 'struct gdb_breakpoint *'.
1964 (clear_breakpoint_commands): Likewise.
1965 (clear_breakpoint_conditions_and_commands): Likewise.
1966 (add_condition_to_breakpoint): Likewise.
1967 (add_breakpoint_condition): Likewise.
1968 (add_commands_to_breakpoint): Likewise.
1969 (check_breakpoints): Check other_breakpoint.
1970 (clone_one_breakpoint): Clone breakpopint according to its type.
1971 * mem-break.h (struct gdb_breakpoint): Declare.
1972 (set_gdb_breakpoint): Update declaration.
1973 (clear_breakpoint_conditions_and_commands): Likewise.
1974 (add_breakpoint_condition): Likewise.
1975 (add_breakpoint_commands): Likewise.
1976 * server.c (process_point_options): Change parameter type to
1977 'struct gdb_breakpoint *'.
1979 2016-07-21 Yao Qi <yao.qi@linaro.org>
1981 * mem-break.c (set_breakpoint_at): Rename it to ...
1982 (set_breakpoint_type_at): ... it.
1983 (set_breakpoint_at): Call set_breakpoint_type_at.
1984 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1985 * mem-break.h (set_breakpoint_at): Update comments.
1987 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1989 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1991 (nios2_store_gregset): Likewise.
1993 2016-07-01 Pedro Alves <palves@redhat.com>
1994 Antoine Tremblay <antoine.tremblay@ericsson.com>
1996 * linux-low.c: Change interface to take the target lwp_info
1997 pointer directly and return void. Handle detaching from a zombie
1999 (linux_detach_lwp_callback): New function.
2000 (linux_detach): Detach from the leader thread after detaching from
2003 2016-06-28 Yao Qi <yao.qi@linaro.org>
2005 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2006 for variable new_offset.
2007 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2008 (aarch64_ftrace_insn_reloc_cb): Likewise.
2009 (aarch64_ftrace_insn_reloc_tb): Likewise.
2010 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2011 PRIx64 instead of PRIx32.
2013 2016-06-28 Yao Qi <yao.qi@linaro.org>
2015 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2016 (the_low_target): Install arm_get_syscall_trapinfo.
2018 2016-06-28 Yao Qi <yao.qi@linaro.org>
2020 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2022 (the_low_target): Install aarch64_get_syscall_trapinfo.
2024 2016-06-28 Yao Qi <yao.qi@linaro.org>
2026 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2028 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2029 Remove parameter sysno.
2030 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2033 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2035 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2036 (s390_emit_ne_goto): Likewise.
2037 (s390_emit_lt_goto): Likewise.
2038 (s390_emit_le_goto): Likewise.
2039 (s390_emit_gt_goto): Likewise.
2040 (s390_emit_ge_goto): Likewise.
2041 (s390x_emit_eq_goto): Likewise.
2042 (s390x_emit_ne_goto): Likewise.
2043 (s390x_emit_lt_goto): Likewise.
2044 (s390x_emit_le_goto): Likewise.
2045 (s390x_emit_gt_goto): Likewise.
2046 (s390x_emit_ge_goto): Likewise.
2047 (s390_emit_ops_impl): Mark variable static.
2048 (s390x_emit_ops): Likewise.
2050 2016-06-17 Yao Qi <yao.qi@linaro.org>
2052 * linux-low.c (handle_extended_wait): Call
2053 uninsert_reinsert_breakpoints for the parent process. Remove
2054 reinsert breakpoints from the child process. Reinsert them to
2055 the parent process when vfork is done.
2056 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2057 (reinsert_reinsert_breakpoints): New function.
2058 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2059 (reinsert_reinsert_breakpoints): Declare.
2061 2016-06-17 Yao Qi <yao.qi@linaro.org>
2063 * linux-low.c (handle_extended_wait): If the parent is doing
2064 step-over, remove the reinsert breakpoints from the forked child.
2066 2016-06-17 Yao Qi <yao.qi@linaro.org>
2068 * linux-low.c (unsuspend_all_lwps): Declare.
2069 (linux_low_filter_event): If thread exited, call finish_step_over.
2070 If step-over is finished, unsuspend other threads.
2072 2016-06-17 Yao Qi <yao.qi@linaro.org>
2074 * linux-low.c (linux_resume_one_lwp_throw): Assert
2075 has_reinsert_breakpoints returns false.
2076 * mem-break.c (delete_disabled_breakpoints): Assert
2077 bp type isn't reinsert_breakpoint.
2079 2016-06-17 Yao Qi <yao.qi@linaro.org>
2081 * linux-low.c (maybe_hw_step): New function.
2082 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2083 (finish_step_over): Switch current_thread to lwp temporarily,
2084 and assert has_reinsert_breakpoints returns true.
2085 (proceed_one_lwp): Call maybe_hw_step.
2086 * mem-break.c (has_reinsert_breakpoints): New function.
2087 * mem-break.h (has_reinsert_breakpoints): Declare.
2089 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2091 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2093 2016-05-17 Yao Qi <yao.qi@linaro.org>
2095 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2096 instead of find_inferior.
2098 2016-05-05 Yao Qi <yao.qi@linaro.org>
2100 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2101 Initialize res to zero.
2103 2016-05-05 Yao Qi <yao.qi@linaro.org>
2105 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2108 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2110 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2111 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2112 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2114 2016-04-28 Par Olsson <par.olsson@windriver.com>
2115 Simon Marchi <simon.marchi@ericsson.com>
2117 * tracepoint.c (write_inferior_int8): New function.
2118 (cmd_qtenable_disable): Write enable flag using
2119 write_inferior_int8.
2121 2016-04-25 Yao Qi <yao.qi@linaro.org>
2123 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2124 (need_step_over_p): Return zero if the LWP has pending signals
2125 can be delivered on software single step target.
2127 2016-04-25 Yao Qi <yao.qi@linaro.org>
2129 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2130 return instead of error.
2132 2016-04-22 Yao Qi <yao.qi@linaro.org>
2134 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2137 2016-04-22 Yao Qi <yao.qi@linaro.org>
2139 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2140 signal when stepping over breakpoint with software single
2143 2016-04-21 Pedro Alves <palves@redhat.com>
2145 * linux-s390-low.c (s390_collect_ptrace_register)
2146 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2148 (s390_check_regset): Use void * instead of gdb_byte *.
2150 2016-04-20 Pedro Alves <palves@redhat.com>
2152 * configure: Renegerate.
2154 2016-04-20 Yao Qi <yao.qi@linaro.org>
2156 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2157 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2159 (arm_store_gregset): Likewise.
2161 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2163 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2164 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2165 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2166 (amd64-avx-mpx-linux.c): New rules.
2167 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2168 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2169 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2170 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2171 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2172 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2173 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2174 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2175 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2176 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2177 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2178 * linux-x86-low.c (x86_linux_read_description): Add case for
2179 X86_XSTATE_AVX_MPX_MASK.
2180 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2181 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2182 init_registers_i386_avx_mpx_linux.
2183 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2184 (initialize_low_tracepoint): Call
2185 init_registers_i386_avx_mpx_linux.
2186 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2187 (initialize_low_tracepoint): Call
2188 init_registers_amd64_avx_mpx_linux.
2189 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2190 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2191 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2194 2016-04-18 Pedro Alves <palves@redhat.com>
2196 * configure: Regenerate.
2198 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2200 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2201 (aarch64_emit_sub): Likewise.
2203 2016-04-12 Pedro Alves <palves@redhat.com>
2205 * utils.c (prepare_to_throw_exception): Delete.
2207 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2209 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2211 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2213 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2215 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2217 * linux-aarch64-ipa.c: Add <elf.h> include.
2218 * linux-ppc-ipa.c: Add <elf.h> include.
2219 * linux-s390-ipa.c: Add <elf.h> include.
2221 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2223 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2224 (get_raw_reg_ptr): Likewise.
2225 (get_trace_state_variable_value_ptr): Likewise.
2226 (set_trace_state_variable_value_ptr): Likewise.
2227 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2230 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2231 Marcin Kościelnicki <koriakin@0x04.net>
2234 * linux-ppc-low.c (emit_insns): New function.
2235 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2236 (ppc_emit_prologue): New function.
2237 (ppc_emit_epilogue): New function.
2238 (ppc_emit_add): New function.
2239 (ppc_emit_sub): New function.
2240 (ppc_emit_mul): New function.
2241 (ppc_emit_lsh): New function.
2242 (ppc_emit_rsh_signed): New function.
2243 (ppc_emit_rsh_unsigned): New function.
2244 (ppc_emit_ext): New function.
2245 (ppc_emit_zero_ext): New function.
2246 (ppc_emit_log_not): New function.
2247 (ppc_emit_bit_and): New function.
2248 (ppc_emit_bit_or): New function.
2249 (ppc_emit_bit_xor): New function.
2250 (ppc_emit_bit_not): New function.
2251 (ppc_emit_equal): New function.
2252 (ppc_emit_less_signed): New function.
2253 (ppc_emit_less_unsigned): New function.
2254 (ppc_emit_ref): New function.
2255 (ppc_emit_const): New function.
2256 (ppc_emit_reg): New function.
2257 (ppc_emit_pop): New function.
2258 (ppc_emit_stack_flush): New function.
2259 (ppc_emit_swap): New function.
2260 (ppc_emit_stack_adjust): New function.
2261 (ppc_emit_call): New function.
2262 (ppc_emit_int_call_1): New function.
2263 (ppc_emit_void_call_2): New function.
2264 (ppc_emit_if_goto): New function.
2265 (ppc_emit_goto): New function.
2266 (ppc_emit_eq_goto): New function.
2267 (ppc_emit_ne_goto): New function.
2268 (ppc_emit_lt_goto): New function.
2269 (ppc_emit_le_goto): New function.
2270 (ppc_emit_gt_goto): New function.
2271 (ppc_emit_ge_goto): New function.
2272 (ppc_write_goto_address): New function.
2273 (ppc_emit_ops_impl): New static variable.
2274 (ppc64v1_emit_prologue): New function.
2275 (ppc64v2_emit_prologue): New function.
2276 (ppc64_emit_epilogue): New function.
2277 (ppc64_emit_add): New function.
2278 (ppc64_emit_sub): New function.
2279 (ppc64_emit_mul): New function.
2280 (ppc64_emit_lsh): New function.
2281 (ppc64_emit_rsh_signed): New function.
2282 (ppc64_emit_rsh_unsigned): New function.
2283 (ppc64_emit_ext): New function.
2284 (ppc64_emit_zero_ext): New function.
2285 (ppc64_emit_log_not): New function.
2286 (ppc64_emit_bit_and): New function.
2287 (ppc64_emit_bit_or): New function.
2288 (ppc64_emit_bit_xor): New function.
2289 (ppc64_emit_bit_not): New function.
2290 (ppc64_emit_equal): New function.
2291 (ppc64_emit_less_signed): New function.
2292 (ppc64_emit_less_unsigned): New function.
2293 (ppc64_emit_ref): New function.
2294 (ppc64_emit_const): New function.
2295 (ppc64v1_emit_reg): New function.
2296 (ppc64v2_emit_reg): New function.
2297 (ppc64_emit_pop): New function.
2298 (ppc64_emit_stack_flush): New function.
2299 (ppc64_emit_swap): New function.
2300 (ppc64v1_emit_call): New function.
2301 (ppc64v2_emit_call): New function.
2302 (ppc64v1_emit_int_call_1): New function.
2303 (ppc64v2_emit_int_call_1): New function.
2304 (ppc64v1_emit_void_call_2): New function.
2305 (ppc64v2_emit_void_call_2): New function.
2306 (ppc64_emit_if_goto): New function.
2307 (ppc64_emit_eq_goto): New function.
2308 (ppc64_emit_ne_goto): New function.
2309 (ppc64_emit_lt_goto): New function.
2310 (ppc64_emit_le_goto): New function.
2311 (ppc64_emit_gt_goto): New function.
2312 (ppc64_emit_ge_goto): New function.
2313 (ppc64v1_emit_ops_impl): New static variable.
2314 (ppc64v2_emit_ops_impl): New static variable.
2315 (ppc_emit_ops): New function.
2316 (linux_low_target): Wire in ppc_emit_ops.
2318 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2319 Marcin Kościelnicki <koriakin@0x04.net>
2322 * Makefile.in: Add powerpc-*-ipa.o
2323 * configure.srv: Add ipa_obj for powerpc*-linux.
2324 * linux-ppc-ipa.c: New file.
2325 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2327 (PPC_FIELD): New macro.
2328 (PPC_SEXT): New macro.
2329 (PPC_OP6): New macro.
2330 (PPC_BO): New macro.
2331 (PPC_LI): New macro.
2332 (PPC_BD): New macro.
2333 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2334 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2335 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2336 (ppc_get_thread_area): New function.
2337 (is_elfv2_inferior): New function.
2338 (gen_ds_form): New function.
2339 (GEN_STD): New macro.
2340 (GEN_STDU): New macro.
2341 (GEN_LD): New macro.
2342 (GEN_LDU): New macro.
2343 (gen_d_form): New function.
2344 (GEN_ADDI): New macro.
2345 (GEN_ADDIS): New macro.
2346 (GEN_LI): New macro.
2347 (GEN_LIS): New macro.
2348 (GEN_ORI): New macro.
2349 (GEN_ORIS): New macro.
2350 (GEN_LWZ): New macro.
2351 (GEN_STW): New macro.
2352 (GEN_STWU): New macro.
2353 (gen_xfx_form): New function.
2354 (GEN_MFSPR): New macro.
2355 (GEN_MTSPR): New macro.
2356 (GEN_MFCR): New macro.
2357 (GEN_MTCR): New macro.
2358 (GEN_SYNC): New macro.
2359 (GEN_LWSYNC): New macro.
2360 (gen_x_form): New function.
2361 (GEN_OR): New macro.
2362 (GEN_MR): New macro.
2363 (GEN_LWARX): New macro.
2364 (GEN_STWCX): New macro.
2365 (GEN_CMPW): New macro.
2366 (gen_md_form): New function.
2367 (GEN_RLDICL): New macro.
2368 (GEN_RLDICR): New macro.
2369 (gen_i_form): New function.
2371 (GEN_BL): New macro.
2372 (gen_b_form): New function.
2373 (GEN_BNE): New macro.
2374 (GEN_LOAD): New macro.
2375 (GEN_STORE): New macro.
2376 (gen_limm): New function.
2377 (gen_atomic_xchg): New function.
2378 (gen_call): New function.
2379 (ppc_relocate_instruction): New function.
2380 (ppc_install_fast_tracepoint_jump_pad): New function.
2381 (ppc_get_min_fast_tracepoint_insn_len): New function.
2382 (ppc_get_ipa_tdesc_idx): New function.
2383 (the_low_target): Wire in the new functions.
2384 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2386 * linux-ppc-tdesc.h: New file.
2388 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2390 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2391 (alloc_jump_pad_buffer): New function.
2392 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2393 (alloc_jump_pad_buffer): New function.
2394 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2395 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2396 (alloc_jump_pad_buffer): New function.
2397 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2398 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2399 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2400 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2402 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2404 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2405 * linux-amd64-ipa.c: Likewise.
2406 * linux-i386-ipa.c: Likewise.
2407 * linux-s390-ipa.c: Likewise.
2408 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2409 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2410 set_trace_state_variable_value_ptr.
2411 (struct ipa_sym_addresses): Likewise.
2412 (symbol_list): Likewise.
2413 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2414 accessing gdb_collect directly.
2415 (gdb_collect_ptr_type): New typedef.
2416 (get_raw_reg_ptr_type): New typedef.
2417 (get_trace_state_variable_value_ptr_type): New typedef.
2418 (set_trace_state_variable_value_ptr_type): New typedef.
2419 (gdb_collect_ptr): New global.
2420 (get_raw_reg_ptr): New global.
2421 (get_trace_state_variable_value_ptr): New global.
2422 (set_trace_state_variable_value_ptr): New global.
2423 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2424 accessing get_raw_reg directly.
2425 (get_get_tsv_func_addr): Likewise for
2426 get_trace_state_variable_value_ptr.
2427 (get_set_tsv_func_addr): Likewise for
2428 set_trace_state_variable_value_ptr.
2429 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2431 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2433 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2435 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2437 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2439 (relocate_instruction): Remove own_buf.
2440 * server.c (own_buf): Make global.
2441 (handle_v_requests): Make global.
2442 * server.h (own_buf): New declaration.
2443 (handle_v_requests): New prototype.
2445 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2448 * linux-s390-low.c (add_insns): New function.
2449 (s390_emit_prologue): New function.
2450 (s390_emit_epilogue): New function.
2451 (s390_emit_add): New function.
2452 (s390_emit_sub): New function.
2453 (s390_emit_mul): New function.
2454 (s390_emit_lsh): New function.
2455 (s390_emit_rsh_signed): New function.
2456 (s390_emit_rsh_unsigned): New function.
2457 (s390_emit_ext): New function.
2458 (s390_emit_log_not): New function.
2459 (s390_emit_bit_and): New function.
2460 (s390_emit_bit_or): New function.
2461 (s390_emit_bit_xor): New function.
2462 (s390_emit_bit_not): New function.
2463 (s390_emit_equal): New function.
2464 (s390_emit_less_signed): New function.
2465 (s390_emit_less_unsigned): New function.
2466 (s390_emit_ref): New function.
2467 (s390_emit_if_goto): New function.
2468 (s390_emit_goto): New function.
2469 (s390_write_goto_address): New function.
2470 (s390_emit_litpool): New function.
2471 (s390_emit_const): New function.
2472 (s390_emit_call): New function.
2473 (s390_emit_reg): New function.
2474 (s390_emit_pop): New function.
2475 (s390_emit_stack_flush): New function.
2476 (s390_emit_zero_ext): New function.
2477 (s390_emit_swap): New function.
2478 (s390_emit_stack_adjust): New function.
2479 (s390_emit_set_r2): New function.
2480 (s390_emit_int_call_1): New function.
2481 (s390_emit_void_call_2): New function.
2482 (s390_emit_eq_goto): New function.
2483 (s390_emit_ne_goto): New function.
2484 (s390_emit_lt_goto): New function.
2485 (s390_emit_le_goto): New function.
2486 (s390_emit_gt_goto): New function.
2487 (s390_emit_ge_goto): New function.
2488 (s390x_emit_prologue): New function.
2489 (s390x_emit_epilogue): New function.
2490 (s390x_emit_add): New function.
2491 (s390x_emit_sub): New function.
2492 (s390x_emit_mul): New function.
2493 (s390x_emit_lsh): New function.
2494 (s390x_emit_rsh_signed): New function.
2495 (s390x_emit_rsh_unsigned): New function.
2496 (s390x_emit_ext): New function.
2497 (s390x_emit_log_not): New function.
2498 (s390x_emit_bit_and): New function.
2499 (s390x_emit_bit_or): New function.
2500 (s390x_emit_bit_xor): New function.
2501 (s390x_emit_bit_not): New function.
2502 (s390x_emit_equal): New function.
2503 (s390x_emit_less_signed): New function.
2504 (s390x_emit_less_unsigned): New function.
2505 (s390x_emit_ref): New function.
2506 (s390x_emit_if_goto): New function.
2507 (s390x_emit_const): New function.
2508 (s390x_emit_call): New function.
2509 (s390x_emit_reg): New function.
2510 (s390x_emit_pop): New function.
2511 (s390x_emit_stack_flush): New function.
2512 (s390x_emit_zero_ext): New function.
2513 (s390x_emit_swap): New function.
2514 (s390x_emit_stack_adjust): New function.
2515 (s390x_emit_int_call_1): New function.
2516 (s390x_emit_void_call_2): New function.
2517 (s390x_emit_eq_goto): New function.
2518 (s390x_emit_ne_goto): New function.
2519 (s390x_emit_lt_goto): New function.
2520 (s390x_emit_le_goto): New function.
2521 (s390x_emit_gt_goto): New function.
2522 (s390x_emit_ge_goto): New function.
2523 (s390_emit_ops): New function.
2524 (struct linux_target_ops): Fill in emit_ops hook.
2526 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2529 * Makefile.in: Add s390 IPA files.
2530 * configure.srv: Build IPA for s390.
2531 * linux-s390-ipa.c: New file.
2532 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2533 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2534 (tdesc_s390_linux32): Likewise.
2535 (init_registers_s390_linux32v1): Likewise.
2536 (tdesc_s390_linux32v1): Likewise.
2537 (init_registers_s390_linux32v2): Likewise.
2538 (tdesc_s390_linux32v2): Likewise.
2539 (init_registers_s390_linux64): Likewise.
2540 (tdesc_s390_linux64): Likewise.
2541 (init_registers_s390_linux64v1): Likewise.
2542 (tdesc_s390_linux64v1): Likewise.
2543 (init_registers_s390_linux64v2): Likewise.
2544 (tdesc_s390_linux64v2): Likewise.
2545 (init_registers_s390_te_linux64): Likewise.
2546 (tdesc_s390_te_linux64): Likewise.
2547 (init_registers_s390_vx_linux64): Likewise.
2548 (tdesc_s390_vx_linux64): Likewise.
2549 (init_registers_s390_tevx_linux64): Likewise.
2550 (tdesc_s390_tevx_linux64): Likewise.
2551 (init_registers_s390x_linux64): Likewise.
2552 (tdesc_s390x_linux64): Likewise.
2553 (init_registers_s390x_linux64v1): Likewise.
2554 (tdesc_s390x_linux64v1): Likewise.
2555 (init_registers_s390x_linux64v2): Likewise.
2556 (tdesc_s390x_linux64v2): Likewise.
2557 (init_registers_s390x_te_linux64): Likewise.
2558 (tdesc_s390x_te_linux64): Likewise.
2559 (init_registers_s390x_vx_linux64): Likewise.
2560 (tdesc_s390x_vx_linux64): Likewise.
2561 (init_registers_s390x_tevx_linux64): Likewise.
2562 (tdesc_s390x_tevx_linux64): Likewise.
2563 (have_hwcap_s390_vx): New static variable.
2564 (s390_arch_setup): Fill have_hwcap_s390_vx.
2565 (s390_get_thread_area): New function.
2566 (s390_ft_entry_gpr_esa): New const.
2567 (s390_ft_entry_gpr_zarch): New const.
2568 (s390_ft_entry_misc): New const.
2569 (s390_ft_entry_fr): New const.
2570 (s390_ft_entry_vr): New const.
2571 (s390_ft_main_31): New const.
2572 (s390_ft_main_64): New const.
2573 (s390_ft_exit_fr): New const.
2574 (s390_ft_exit_vr): New const.
2575 (s390_ft_exit_misc): New const.
2576 (s390_ft_exit_gpr_esa): New const.
2577 (s390_ft_exit_gpr_zarch): New const.
2578 (append_insns): New function.
2579 (s390_relocate_instruction): New function.
2580 (s390_install_fast_tracepoint_jump_pad): New function.
2581 (s390_get_min_fast_tracepoint_insn_len): New function.
2582 (s390_get_ipa_tdesc_idx): New function.
2583 (struct linux_target_ops): Wire in the above functions.
2584 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2585 * linux-s390-tdesc.h: New file.
2587 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2589 * linux-s390-low.c (s390_supports_tracepoints): New function.
2590 (struct linux_target_ops): Fill supports_tracepoints hook.
2592 2016-03-18 Yao Qi <yao.qi@linaro.org>
2594 * linux-low.c (lwp_signal_can_be_delivered): New function.
2595 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2597 2016-03-18 Yao Qi <yao.qi@linaro.org>
2599 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2600 0 if signal is enqueued. Remove 'signal' from one debugging
2601 message. Move one debugging message to some lines below.
2602 Remove code setting 'signal' to 0.
2604 2016-03-18 Yao Qi <yao.qi@linaro.org>
2606 * linux-low.c (linux_low_filter_event): Remove redundant
2607 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2609 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2611 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2612 (struct linux_target_ops): Wire in the above.
2614 2016-03-03 Yao Qi <yao.qi@linaro.org>
2616 * linux-low.c: Update comments to start_step_over.
2618 2016-03-03 Yao Qi <yao.qi@linaro.org>
2621 * linux-low.c (handle_extended_wait): Set child suspended
2622 if event_lwp->bp_reinsert isn't zero.
2624 2016-03-02 Yao Qi <yao.qi@linaro.org>
2626 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2627 enqueue_pending_signal.
2629 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2631 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2634 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2636 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2637 (s390_regmap_3264) [!__s390x__]: New global.
2638 (s390_collect_ptrace_register): Skip map entries containing -1.
2639 (s390_supply_ptrace_register): Ditto.
2640 (s390_fill_gprs_high): New function.
2641 (s390_store_gprs_high): New function.
2642 (s390_regsets): Add NT_S390_HIGH_GPRS.
2643 (s390_get_hwcap): Enable on 31-bit.
2644 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2645 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2646 Detect NT_S390_HIGH_GPRS.
2647 (s390_usrregs_info_3264): Enable on 31-bit.
2648 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2649 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2651 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2654 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2655 * configure.srv: Ditto.
2656 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2657 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2658 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2659 (init_registers_amd64_linux): Remove prototype.
2660 (tdesc_amd64_linux): Remove declaration.
2661 (get_ipa_tdesc): New function.
2662 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2663 initialize remaining tdescs.
2664 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2665 (init_registers_i386_linux): Remove prototype.
2666 (tdesc_i386_linux): Remove declaration.
2667 (get_ipa_tdesc): New function.
2668 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2669 initialize remaining tdescs.
2670 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2671 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2672 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2673 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2674 (x86_get_ipa_tdesc_idx): New function.
2675 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2676 * linux-x86-tdesc.h: New file.
2677 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2678 (target_get_ipa_tdesc_idx): New macro.
2679 * tracepoint.c (ipa_tdesc_idx): New macro.
2680 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2681 (symbol_list): Add ipa_tdesc_idx.
2682 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2683 (ipa_tdesc): Remove.
2684 (ipa_tdesc_idx): New variable.
2685 (get_context_regcache): Use get_ipa_tdesc.
2686 (gdb_collect): Ditto.
2688 * tracepoint.h (get_ipa_tdesc): New prototype.
2689 (ipa_tdesc): Remove.
2691 2016-02-24 Pedro Alves <palves@redhat.com>
2693 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2694 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2695 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2696 Factor out common code between the USE_SIGTRAP_SIGINFO and
2697 !USE_SIGTRAP_SIGINFO blocks.
2698 (linux_low_filter_event): Call save_stop_reason instead of
2699 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2701 (linux_wait_1): Update comments.
2703 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2705 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2706 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2707 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2708 ppc_insert_point, ppc_remove_point.
2710 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2712 * linux-s390-low.c (s390_supports_z_point_type): New function.
2713 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2715 2016-02-16 Yao Qi <yao.qi@linaro.org>
2717 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2718 PC. Get pc from regcache_read_pc.
2720 2016-02-12 Yao Qi <yao.qi@linaro.org>
2722 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2723 or linux_get_pc_32bit.
2724 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2726 2016-02-12 Yao Qi <yao.qi@linaro.org>
2728 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2729 arm_linux_get_next_pcs_fixup.
2731 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2733 * tracepoint.c (x_tracepoint_action_download): Change
2734 write_inferior_data_ptr to write_inferior_data_pointer.
2735 (cmd_qtstart): Likewise.
2736 (write_inferior_data_ptr): Remove.
2737 (download_agent_expr): Change write_inferior_data_ptr to
2738 write_inferior_data_pointer.
2739 (download_tracepoint_1): Likewise.
2740 (download_tracepoint): Likewise.
2741 (download_trace_state_variables): Likewise.
2743 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2744 Marcin Kościelnicki <koriakin@0x04.net>
2746 * tracepoint.c (struct tracepoint_action_ops): Remove.
2747 (struct tracepoint_action): Remove ops.
2748 (m_tracepoint_action_download, r_tracepoint_action_download)
2749 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2750 size and offset accordingly.
2751 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2752 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2753 (tracepoint_action_send, tracepoint_action_download): New functions.
2754 Helpers for trace action handlers.
2755 (add_tracepoint_action): Remove setup actions ops.
2756 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2758 2016-02-10 Yao Qi <yao.qi@linaro.org>
2760 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2762 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2764 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2766 * configure: Regenerate.
2768 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2770 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2771 void * to gdb_byte *.
2772 * linux-low.c (siginfo_fixup): Likewise.
2773 (linux_xfer_siginfo): Likewise.
2774 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2776 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2778 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2780 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2782 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2784 * linux-x86-low.c [__x86_64__]: Include
2785 "nat/amd64-linux-siginfo.h".
2786 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2787 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2788 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2789 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2790 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2791 (cpt_si_fd, si_timerid, si_overrun): Move from
2792 nat/amd64-linux-siginfo.c.
2793 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2795 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2797 * server.c (skip_to_semicolon): Remove.
2798 (process_point_options): Use strchrnul instead of
2801 2016-01-26 Yao Qi <yao.qi@linaro.org>
2803 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2804 * linux-low.c (install_software_single_step_breakpoints): Don't
2805 call regcache_read_pc.
2806 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2809 2016-01-26 Yao Qi <yao.qi@linaro.org>
2811 * linux-low.c (install_software_single_step_breakpoints): Call
2812 regcache_read_pc instead of get_pc.
2814 2016-01-26 Yao Qi <yao.qi@linaro.org>
2816 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2817 (unblock_async_io): Rename to ...
2818 (block_unblock_async_io): ... it. New function.
2819 (enable_async_io): Don't install SIGIO handler. Unblock it
2821 (disable_async_io): Don't ignore SIGIO. Block it instead.
2822 (initialize_async_io): Install SIGIO handler. Don't call
2825 2016-01-26 Yao Qi <yao.qi@linaro.org>
2827 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2828 first character is '\003', call *the_target->request_interrupt.
2830 2016-01-25 Yao Qi <yao.qi@linaro.org>
2832 * remote-utils.c (new_thread_notify): Remove.
2833 (dead_thread_notify): Likewise.
2834 * remote-utils.h (new_thread_notify): Remove declaration.
2835 (dead_thread_notify): Likewise.
2837 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2839 * gdb.trace/pending.exp: Fix expected message on continue.
2841 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2843 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2844 it works properly on big-endian machines where sizeof (CORE_ADDR)
2847 2016-01-21 Pedro Alves <palves@redhat.com>
2849 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2850 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2851 * configure: Regenerate.
2853 2016-01-21 Yao Qi <yao.qi@linaro.org>
2855 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2856 is_thumb and set it according to CPSR saved on the stack.
2857 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2858 arm_sigreturn_next_pc.
2860 2016-01-18 Yao Qi <yao.qi@linaro.org>
2862 * linux-low.c (linux_set_pc_64bit): New function.
2863 (linux_get_pc_64bit): New function.
2864 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2866 * linux-sparc-low.c (debug_threads): Remove declaration.
2867 (sparc_get_pc): Remove.
2868 (the_low_target): Use linux_get_pc_64bit instead of
2870 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2871 (the_low_target): Use linux_get_pc_64bit and
2874 2016-01-18 Yao Qi <yao.qi@linaro.org>
2876 * linux-arm-low.c (debug_threads): Remove declaration.
2877 (arm_get_pc, arm_set_pc): Remove.
2878 (the_low_target): Use linux_get_pc_32bit and
2880 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2881 (the_low_target): Use linux_get_pc_32bit and
2883 * linux-cris-low.c (debug_threads): Remove declaration.
2884 (cris_get_pc, cris_set_pc,): Remove.
2885 (the_low_target): Use linux_get_pc_32bit and
2887 * linux-crisv32-low.c (debug_threads): Remove declaration.
2888 (cris_get_pc, cris_set_pc): Remove.
2889 (the_low_target): Use linux_get_pc_32bit and
2891 * linux-low.c: Include inttypes.h.
2892 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2893 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2894 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2895 (the_low_target): Use linux_get_pc_32bit and
2897 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2898 (the_low_target): Use linux_get_pc_32bit and
2900 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2901 (the_low_target): Use linux_get_pc_32bit and
2903 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2904 (the_low_target): Use linux_get_pc_32bit and
2906 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2907 (the_low_target): Use linux_get_pc_32bit and
2910 2016-01-18 Gary Benson <gbenson@redhat.com>
2912 * configure.ac (AC_FUNC_FORK): New check.
2913 * config.in: Regenerate.
2914 * configure: Likewise.
2916 2016-01-14 Yao Qi <yao.qi@linaro.org>
2918 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2919 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2920 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2921 arm_get_next_pcs_ctor.
2923 2016-01-12 Josh Stone <jistone@redhat.com>
2924 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2926 * inferiors.h: Include "gdb_vecs.h".
2927 (struct process_info): Add syscalls_to_catch.
2928 * inferiors.c (remove_process): Free syscalls_to_catch.
2929 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2930 syscall_return stops.
2931 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2932 * server.c (handle_general_set): Handle QCatchSyscalls.
2933 (handle_query): Report support for QCatchSyscalls.
2934 * target.h (struct target_ops): Add supports_catch_syscall.
2935 (target_supports_catch_syscall): New macro.
2936 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2937 (struct lwp_info): Add syscall_state.
2938 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2939 Maintain syscall_state and syscalls_to_catch across exec.
2940 (get_syscall_trapinfo): New function, proxy to the_low_target.
2941 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2942 (linux_low_filter_event): Toggle syscall_state entry/return for
2943 syscall traps, and set it ignored for all others.
2944 (gdb_catching_syscalls_p): New function.
2945 (gdb_catch_this_syscall_p): New function.
2946 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2947 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2948 (linux_supports_catch_syscall): New function.
2949 (linux_target_ops): Install it.
2950 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2951 (the_low_target): Install it.
2953 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2955 * acinclude.m4: Include new ../warning.m4 file.
2956 * configure: Regenerated.
2957 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2959 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2961 * ax.c (is_goto_target): Mark static.
2962 * linux-low.c (register_addr): Likewise.
2963 (linux_fetch_registers, linux_store_registers): Likewise.
2964 * mem-break.c (any_persistent_commands): Fix old prototype.
2965 (add_commands_to_breakpoint): Mark static.
2966 * regcache.c (find_register_by_name): Delete unused func.
2967 * remote-utils.c (hex_or_minus_one): Mark static.
2968 * server.c (monitor_show_help): Mark static.
2969 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2970 handle_v_requests): Likewise.
2972 2016-01-12 Pedro Alves <palves@redhat.com>
2974 Remove use of the registered trademark symbol throughout.
2976 2016-01-08 Yao Qi <yao.qi@linaro.org>
2978 * remote-utils.c (getpkt): If c is '\003', call target hook
2981 2016-01-06 Yao Qi <yao.qi@linaro.org>
2983 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2984 linux-aarch32-low.c.
2985 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2986 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2987 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2988 (thumb2_breakpoint): Declare.
2989 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2990 linux-aarch32-low.h.
2991 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2992 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2993 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2995 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2997 * gdbreplay.c (gdbreplay_version): Change copyright year in
2999 * server.c (gdbserver_version): Likewise.
3001 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3003 * server.c (crc32_table): Delete.
3004 (crc32): Use libiberty's xcrc32 function.
3006 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3008 * lynx-low.c (lynx_delete_thread_callback): New function.
3009 (lynx_mourn): Properly delete our process and all of its
3010 threads. Remove call to clear_inferiors.
3012 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3014 * target.c (thread_search_callback): Add check that
3015 the thread_stopped target callback is not NULL before
3018 2015-12-21 Yao Qi <yao.qi@linaro.org>
3020 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3023 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3025 * server.c (handle_query): Call target_supports_software_single_step.
3027 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3029 * linux-low.c (single_step): New function.
3030 (linux_resume_one_lwp_throw): Call single_step.
3031 (start_step_over): Likewise.
3033 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3035 * Makefile.in (SFILES): Append arch/arm-linux.c,
3036 arch/arm-get-next-pcs.c.
3037 (arm-linux.o): New rule.
3038 (arm-get-next-pcs.o): New rule.
3039 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3041 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3042 to linux-aarch32-low.c.
3043 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3044 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3045 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3046 (thumb2_breakpoint_len): Likewise.
3047 (arm_is_thumb_mode): Make non-static.
3048 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3049 from linux-aarch32-low.c.
3050 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3051 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3052 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3053 (thumb2_breakpoint_len): Likewise.
3054 (arm_is_thumb_mode): New declaration.
3055 * linux-arm-low.c: Include arch/arm-linux.h
3056 aarch/arm-get-next-pcs.h, sys/syscall.h.
3057 (get_next_pcs_ops): New struct.
3058 (get_next_pcs_addr_bits_remove): New function.
3059 (get_next_pcs_is_thumb): New function.
3060 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3061 (arm_sigreturn_next_pc): Likewise.
3062 (get_next_pcs_syscall_next_pc): Likewise.
3063 (arm_gdbserver_get_next_pcs): Likewise.
3064 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3066 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3067 * server.h: Include gdb_vecs.h.
3069 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3071 * Makefile.in (SFILES): Append common/common-regcache.c.
3072 (OBS): Append common-regcache.o.
3073 (common-regcache.o): New rule.
3074 * regcache.c (init_register_cache): Initialize cache to
3076 (regcache_raw_read_unsigned): New function.
3077 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3078 register_status enum.
3080 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3082 * linux-aarch64-low.c (the_low_targets): Rename
3083 breakpoint_reinsert_addr to get_next_pcs.
3084 * linux-arm-low.c (the_low_targets): Likewise.
3085 * linux-bfin-low.c (the_low_targets): Likewise.
3086 * linux-cris-low.c (the_low_targets): Likewise.
3087 * linux-crisv32-low.c (the_low_targets): Likewise.
3088 * linux-low.c (can_software_single_step): Likewise.
3089 (install_software_single_step_breakpoints): New function.
3090 (start_step_over): Use install_software_single_step_breakpoints.
3091 * linux-low.h: New CORE_ADDR vector.
3092 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3094 * linux-mips-low.c (the_low_targets): Likewise.
3095 * linux-nios2-low.c (the_low_targets): Likewise.
3096 * linux-sparc-low.c (the_low_targets): Likewise.
3098 2015-12-17 Pedro Alves <palves@redhat.com>
3100 * linux-low.c (linux_kill_one_lwp): Remove references to
3102 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3104 (linux_init_signals): Delete.
3105 (initialize_low): Adjust.
3106 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3108 2015-12-16 Pedro Alves <palves@redhat.com>
3110 * configure.ac (compiler warning flags): When testing a
3111 -Wno-foo option, check whether -Wfoo works instead.
3112 * configure: Regenerate.
3114 2015-12-11 Don Breazeal <donb@codesourcery.com>
3116 * server.c (process_serial_event): Don't exit from gdbserver
3117 in remote mode if there are still active inferiors.
3119 2015-12-11 Yao Qi <yao.qi@linaro.org>
3121 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3122 arm_breakpoint_at if the process is 32-bit.
3124 2015-12-11 Yao Qi <yao.qi@linaro.org>
3126 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3129 2015-12-07 Yao Qi <yao.qi@linaro.org>
3131 * configure.srv: Append arm.o to srv_tgtobj for
3132 aarch64*-*-linux* target.
3133 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3134 from linux-arm-low.c.
3135 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3136 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3137 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3138 (thumb2_breakpoint_len): Likewise.
3139 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3140 (arm_breakpoint_kinds): Likewise.
3141 (arm_breakpoint_kind_from_pc): Likewise.
3142 (arm_sw_breakpoint_from_kind): Likewise.
3143 (arm_breakpoint_kind_from_current_state): Likewise.
3144 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3145 (arm_sw_breakpoint_from_kind): Declare.
3146 (arm_breakpoint_kind_from_current_state): Declare.
3147 (arm_breakpoint_at): Declare.
3148 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3149 arm_sw_breakpoint_from_kind if process is 32-bit.
3150 (aarch64_breakpoint_kind_from_pc): New function.
3151 (aarch64_breakpoint_kind_from_current_state): New function.
3152 (the_low_target): Initialize fields breakpoint_kind_from_pc
3153 and breakpoint_kind_from_current_state.
3154 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3155 linux-aarch32-low.c.
3156 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3157 (arm_breakpoint, arm_breakpoint_len): Likewise.
3158 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3159 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3160 (arm_is_thumb_mode): Likewise.
3161 (arm_breakpoint_at): Likewise.
3162 (arm_breakpoint_kind_from_pc): Likewise.
3163 (arm_sw_breakpoint_from_kind): Likewise.
3164 (arm_breakpoint_kind_from_current_state): Likewise.
3167 2015-08-04 Yao Qi <yao.qi@linaro.org>
3169 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3170 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3171 * server.c (extended_protocol): Remove "static".
3172 * server.h (extended_protocol): Declare it.
3174 2015-12-04 Josh Stone <jistone@redhat.com>
3176 * target.h (struct target_ops) <arch_setup>: Rename to ...
3177 (struct target_ops) <post_create_inferior>: ... this.
3178 (target_arch_setup): Rename to ...
3179 (target_post_create_inferior): ... this, calling post_create_inferior.
3180 * server.c (start_inferior): Update target_arch_setup calls to
3181 target_post_create_inferior.
3182 * linux-low.c (linux_low_ptrace_options): Forward declare.
3183 (linux_arch_setup): Update its comment for general use.
3184 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3185 (struct linux_target_ops): Use linux_post_create_inferior.
3186 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3187 to post_create_inferior.
3188 * nto-low.c (struct nto_target_ops): Likewise.
3189 * spu-low.c (struct spu_target_ops): Likewise.
3190 * win32-low.c (struct win32_target_ops): Likewise.
3192 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3194 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3196 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3198 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3199 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3200 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3201 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3202 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3203 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3204 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3205 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3206 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3207 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3208 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3209 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3211 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3213 * linux-low.c (linux_look_up_symbols): Don't call
3214 linux_supports_traceclone.
3215 * linux-low.h (thread_db_init): Remove use_events argument.
3216 * thread-db.c (thread_db_use_event): Remove global variable.
3217 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3218 (struct thread_db) <td_create_bp>: Remove field.
3219 (thread_db_create_event): Remove function.
3220 (thread_db_enable_reporting): Likewise.
3221 (find_one_thread): Don't check for thread_db_use_events.
3222 (attach_thread): Likewise.
3223 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3224 (try_thread_db_load_1): Don't check for thread_db_use_events.
3225 (thread_db_init): Remove use_events argument and thread events
3227 (remove_thread_event_breakpoints): Remove function.
3228 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3230 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3232 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3234 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3235 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3236 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3237 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3238 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3240 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3242 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3243 * linux-low.c (can_hardware_single_step): Use
3244 supports_hardware_single_step.
3245 (can_software_single_step): New function.
3246 (start_step_over): Call can_software_single_step.
3247 (linux_supports_hardware_single_step): New function.
3248 (struct target_ops) <supports_software_single_step>: Initialize.
3249 * linux-low.h (struct linux_target_ops)
3250 <supports_hardware_single_step>: Initialize.
3251 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3252 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3253 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3254 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3255 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3256 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3257 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3258 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3259 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3260 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3262 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3263 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3265 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3266 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3267 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3269 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3270 * target.h (struct target_ops): <supports_software_single_step>:
3272 (target_supports_software_single_step): New macro.
3274 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3276 * linux-low.c (linux_wait_1): Fix pc advance condition.
3277 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3278 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3280 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3282 * linux-arm-low.c (arm_is_thumb_mode): New function.
3283 (arm_breakpoint_at): Use arm_is_thumb_mode.
3284 (arm_breakpoint_kind_from_current_state): New function.
3285 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3287 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3288 (linux_breakpoint_kind_from_current_state): New function.
3289 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3290 * linux-low.h (struct linux_target_ops)
3291 <breakpoint_kind_from_current_state>: New field.
3292 * target.h (struct target_ops): Likewise.
3293 (target_breakpoint_kind_from_current_state): New macro.
3295 2015-11-30 Pedro Alves <palves@redhat.com>
3297 * linux-low.c (linux_resume): Wake up the event loop before
3300 2015-11-30 Pedro Alves <palves@redhat.com>
3302 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3304 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3306 * target.c (struct thread_search): New structure.
3307 (thread_search_callback): New function.
3308 (prev_general_thread): New global.
3309 (prepare_to_access_memory, done_accessing_memory): New functions.
3310 * target.h (prepare_to_access_memory, done_accessing_memory):
3311 Replace macros with function declarations.
3313 2015-11-30 Pedro Alves <palves@redhat.com>
3316 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3317 report TARGET_WAITKIND_NO_RESUMED.
3318 * remote-utils.c (prepare_resume_reply): Handle
3319 TARGET_WAITKIND_NO_RESUMED.
3320 * server.c (report_no_resumed): New global.
3321 (handle_query) <qSupported>: Handle "no-resumed+". Report
3322 "no-resumed+" support.
3323 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3324 return error if the client doesn't support no-resumed events.
3325 (push_stop_notification): New function.
3326 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3327 events if the client supports them.
3329 2015-11-30 Pedro Alves <palves@redhat.com>
3331 * linux-low.c (thread_still_has_status_pending_p): Don't check
3333 (lwp_resumed): New function.
3334 (status_pending_p_callback): Return early if the LWP is not
3335 supposed to be resumed.
3337 2015-11-30 Pedro Alves <palves@redhat.com>
3339 * linux-low.c (handle_extended_wait): Assert that the LWP's
3340 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3341 thread create events, leave the new child's status pending.
3342 (linux_low_filter_event): If GDB wants to hear about thread exit
3343 events, leave the LWP marked dead and don't delete it.
3344 (linux_wait_for_event_filtered): Don't check for thread exit.
3345 (filter_exit_event): New function.
3346 (linux_wait_1): Use it, when returning an exit event.
3347 (linux_resume_one_lwp_throw): Assert that the LWP's
3348 waitstatus is TARGET_WAITKIND_IGNORE.
3349 * remote-utils.c (prepare_resume_reply): Handle
3350 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3351 * server.c (report_thread_events): New global.
3352 (handle_general_set): Handle QThreadEvents.
3353 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3354 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3355 TARGET_WAITKIND_THREAD_EXITED.
3356 * server.h (report_thread_events): Declare.
3358 2015-11-30 Pedro Alves <palves@redhat.com>
3360 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3361 the thread's last_resume_kind was resume_stop.
3363 2015-11-30 Pedro Alves <palves@redhat.com>
3365 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3368 2015-11-30 Pedro Alves <palves@redhat.com>
3370 * server.c (handle_v_requests): Handle vCtrlC.
3372 2015-11-30 Pedro Alves <palves@redhat.com>
3374 * gdbthread.h (find_any_thread_of_pid): Declare.
3375 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3377 * server.c (handle_query): If current_thread is NULL, look for
3378 another thread of the selected process.
3380 2015-11-26 Daniel Colascione <dancol@dancol.org>
3381 Simon Marchi <simon.marchi@ericsson.com>
3383 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3384 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3386 * target.h (struct target_ops) <thread_name>: New field.
3387 (target_thread_name): New macro.
3389 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3391 * regcache.h (regcache_invalidate_pid): Add declaration.
3392 * regcache.c (regcache_invalidate_pid): New function, extracted
3393 from regcache_invalidate.
3394 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3395 Add trivial documentation comment.
3396 * lynx-low.c: Use regcache_invalidate_pid instead of
3397 regcache_invalidate.
3399 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3401 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3402 and Elf64_auxv_t if the target is Android.
3404 2015-11-22 Doug Evans <xdje42@gmail.com>
3406 * target.h: #include <sys/types.h>.
3408 2015-11-19 Pedro Alves <palves@redhat.com>
3410 * linux-low.c (linux_process_qsupported): Change prototype.
3412 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3414 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3415 and adjust to loop over all features.
3416 * server.c (handle_query) <qSupported>: Adjust to call
3417 target_process_qsupported once, passing it a vector of unprocessed
3419 * target.h (struct target_ops) <process_qsupported>: Change
3421 (target_process_qsupported): Adjust.
3423 2015-11-19 Pedro Alves <palves@redhat.com>
3425 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3427 * configure: Regenerate.
3429 2015-11-19 Pedro Alves <palves@redhat.com>
3431 * configure: Regenerate.
3433 2015-11-19 Yao Qi <yao.qi@linaro.org>
3435 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3438 2015-11-19 Yao Qi <yao.qi@linaro.org>
3440 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3441 (struct aarch64_operand): Move enum out.
3443 2015-11-19 Yao Qi <yao.qi@linaro.org>
3445 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3446 struct user_fpsimd_state *.
3447 (aarch64_store_fpregset): Likewise.
3449 2015-11-19 Yao Qi <yao.qi@linaro.org>
3451 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3452 struct user_pt_regs *.
3453 (aarch64_store_gregset): Likewise.
3455 2015-11-18 Pedro Alves <palves@redhat.com>
3457 * Makefile.in (all_object_files): Add $IPA_OBJS.
3459 2015-11-17 Pedro Alves <palves@redhat.com>
3461 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3462 GDB_SIGNAL_0 and gdb_signal_to_string.
3464 2015-11-17 Pedro Alves <palves@redhat.com>
3466 * win32-low.c (handle_output_debug_string): Remove parameter.
3467 (win32_kill): Remove our_status local and adjust call to
3468 handle_output_debug_string.
3469 (get_child_debug_event): Adjust call to
3470 handle_output_debug_string.
3472 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3474 * linux-mips-low.c (mips_fill_gregset): Add cast.
3475 (mips_store_gregset): Likewise.
3476 (mips_fill_fpregset): Likewise.
3477 (mips_store_fpregset): Likewise.
3479 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3481 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3484 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3486 * linux-mips-low.c (mips_linux_new_thread): Change type of
3487 watch_type to enum target_hw_bp_type.
3489 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3491 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3492 Change return type to arm_hwbp_type.
3494 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3496 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3497 (arm_store_gregset): Likewise.
3498 * linux-arm-low.c (arm_get_hwcap): Likewise.
3499 (arm_read_description): Likewise.
3501 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3503 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3505 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3507 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3508 (ppc_fill_vsxregset): Likewise.
3509 (ppc_store_vsxregset): Likewise.
3510 (ppc_fill_vrregset): Likewise.
3511 (ppc_store_vrregset): Likewise.
3512 (ppc_fill_evrregset): Likewise.
3513 (ppc_store_evrregset): Likewise.
3515 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3517 * linux-ppc-low.c (ppc_usrregs_info): Remove
3518 forward-declaration.
3519 (ppc_arch_setup): Move lower in file.
3521 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3523 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3524 (ps_pdwrite): Likewise.
3526 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3528 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3529 to after assert checks.
3531 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3533 * proc-service.c (ps_pdread): Add/adjust casts.
3534 (ps_pdwrite): Add/adjust casts.
3536 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3538 * server.c (handle_search_memory_1): Cast return value of
3541 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3543 * server.c (write_qxfer_response): Change type of data to
3546 2015-10-29 Pedro Alves <palves@redhat.com>
3548 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3550 2015-10-29 Pedro Alves <palves@redhat.com>
3552 * tracepoint.c (clear_installed_tracepoints): Add casts.
3554 2015-10-29 Pedro Alves <palves@redhat.com>
3556 * server.c (handle_v_cont, process_serial_event): Add enum
3557 gdb_signal casts to signal parsing code.
3559 2015-10-29 Pedro Alves <palves@redhat.com>
3561 * linux-low.h (NULL_REGSET): Define.
3562 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3563 * linux-arm-low.c (arm_regsets): Likewise.
3564 * linux-crisv32-low.c (cris_regsets): Likewise.
3565 * linux-m68k-low.c (m68k_regsets): Likewise.
3566 * linux-mips-low.c (mips_regsets): Likewise.
3567 * linux-nios2-low.c (nios2_regsets): Likewise.
3568 * linux-ppc-low.c (ppc_regsets): Likewise.
3569 * linux-s390-low.c (s390_regsets): Likewise.
3570 * linux-sh-low.c (sh_regsets): Likewise.
3571 * linux-sparc-low.c (sparc_regsets): Likewise.
3572 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3573 * linux-tile-low.c (tile_regsets): Likewise.
3574 * linux-x86-low.c (x86_regsets): Likewise.
3575 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3577 2015-10-29 Pedro Alves <palves@redhat.com>
3579 * linux-low.h (NULL_REGSET): Define.
3580 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3581 * linux-arm-low.c (arm_regsets): Likewise.
3582 * linux-crisv32-low.c (cris_regsets): Likewise.
3583 * linux-m68k-low.c (m68k_regsets): Likewise.
3584 * linux-mips-low.c (mips_regsets): Likewise.
3585 * linux-nios2-low.c (nios2_regsets): Likewise.
3586 * linux-ppc-low.c (ppc_regsets): Likewise.
3587 * linux-s390-low.c (s390_regsets): Likewise.
3588 * linux-sh-low.c (sh_regsets): Likewise.
3589 * linux-sparc-low.c (sparc_regsets): Likewise.
3590 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3591 * linux-tile-low.c (tile_regsets): Likewise.
3592 * linux-x86-low.c (x86_regsets): Likewise.
3593 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3595 2015-10-26 Doug Evans <dje@google.com>
3597 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3599 2015-10-26 Doug Evans <dje@google.com>
3601 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3603 2015-10-26 Doug Evans <dje@google.com>
3605 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3607 (attach_thread, find_new_threads_callback): Ditto.
3609 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3611 * mem-break.h (set_breakpoint_data): Remove.
3613 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3615 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3616 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3617 (initialize_low): Remove set_breakpoint_data call.
3618 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3619 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3620 (initialize_low): Remove set_breakpoint_data call.
3621 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3622 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3623 (initialize_low): Remove set_breakpoint_data call.
3625 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3627 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3628 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3629 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3630 * target.h (target_breakpoint_kind_from_pc): New macro.
3632 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3634 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3635 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3636 the default breakpoint kind.
3638 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3640 * linux-arm-low.c (arm_supports_z_point_type): Add software
3643 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3645 * linux-arm-low.c: Refactor breakpoint definitions.
3646 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3647 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3649 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3651 * Makefile.in: Add arm.c/o.
3652 * configure.srv: Likewise.
3653 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3654 (arm_breakpoint_kind_from_pc): New function.
3655 (arm_sw_breakpoint_from_kind): Return proper kind.
3656 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3658 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3660 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3662 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3663 (struct raw_breakpoint) <size>: Remove.
3664 (struct raw_breakpoint) <kind>: Add.
3665 (bp_size): New function.
3666 (bp_opcode): Likewise.
3667 (find_raw_breakpoint_at): Adjust for kind.
3668 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3669 (remove_memory_breakpoint): Adjust for kind call bp_size.
3670 (set_raw_breakpoint_at): Adjust for kind.
3671 (set_breakpoint): Likewise.
3672 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3673 (delete_raw_breakpoint): Adjust for kind.
3674 (delete_breakpoint): Likewise.
3675 (find_gdb_breakpoint): Likewise.
3676 (set_gdb_breakpoint_1): Likewise.
3677 (set_gdb_breakpoint): Likewise.
3678 (delete_gdb_breakpoint_1): Likewise.
3679 (delete_gdb_breakpoint): Likewise.
3680 (uninsert_raw_breakpoint): Likewise.
3681 (reinsert_raw_breakpoint): Likewise.
3682 (set_breakpoint_data): Remove.
3683 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3684 (check_mem_read): Adjust for kind call bp_size.
3685 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3686 (clone_one_breakpoint): Adjust for kind.
3687 * mem-break.h (set_gdb_breakpoint): Likewise.
3688 (delete_gdb_breakpoint): Likewise.
3689 * server.c (process_serial_event): Likewise.
3691 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3693 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3694 (struct linux_target_ops) <breakpoint>: Remove.
3695 (struct linux_target_ops) <breakpoint_len>: Remove.
3696 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3697 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3698 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3699 (arm_sw_breakpoint_from_kind): New function.
3700 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3701 (struct linux_target_ops) <breakpoint>: Remove.
3702 (struct linux_target_ops) <breakpoint_len>: Remove.
3703 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3704 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3705 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3706 (struct linux_target_ops) <breakpoint>: Remove.
3707 (struct linux_target_ops) <breakpoint_len>: Remove.
3708 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3709 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3710 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3711 (struct linux_target_ops) <breakpoint>: Remove.
3712 (struct linux_target_ops) <breakpoint_len>: Remove.
3713 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3714 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3715 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3716 and sw_breakpoint_from_kind to increment the pc.
3717 (linux_breakpoint_kind_from_pc): New function.
3718 (linux_sw_breakpoint_from_kind): New function.
3719 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3720 (initialize_low): Call breakpoint_kind_from_pc and
3721 sw_breakpoint_from_kind to replace breakpoint_data/len.
3722 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3724 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3725 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3726 (struct linux_target_ops) <breakpoint>: Remove.
3727 (struct linux_target_ops) <breakpoint_len>: Remove.
3728 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3729 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3730 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3731 (struct linux_target_ops) <breakpoint>: Remove.
3732 (struct linux_target_ops) <breakpoint_len>: Remove.
3733 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3734 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3735 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3736 (struct linux_target_ops) <breakpoint>: Remove.
3737 (struct linux_target_ops) <breakpoint_len>: Remove.
3738 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3739 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3740 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3741 (struct linux_target_ops) <breakpoint>: Remove.
3742 (struct linux_target_ops) <breakpoint_len>: Remove.
3743 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3744 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3745 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3746 (struct linux_target_ops) <breakpoint>: Remove.
3747 (struct linux_target_ops) <breakpoint_len>: Remove.
3748 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3749 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3750 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3751 (struct linux_target_ops) <breakpoint>: Remove.
3752 (struct linux_target_ops) <breakpoint_len>: Remove.
3753 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3754 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3755 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3756 (struct linux_target_ops) <breakpoint>: Remove.
3757 (struct linux_target_ops) <breakpoint_len>: Remove.
3758 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3759 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3760 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3761 (struct linux_target_ops) <breakpoint>: Remove.
3762 (struct linux_target_ops) <breakpoint_len>: Remove.
3763 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3764 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3765 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3766 (struct linux_target_ops) <breakpoint>: Remove.
3767 (struct linux_target_ops) <breakpoint_len>: Remove.
3768 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3769 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3770 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3771 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3772 (struct linux_target_ops) <breakpoint>: Remove.
3773 (struct linux_target_ops) <breakpoint_len>: Remove.
3774 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3775 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3776 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3777 (struct linux_target_ops) <breakpoint>: Remove.
3778 (struct linux_target_ops) <breakpoint_len>: Remove.
3779 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3780 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3782 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3784 * linux-cris-low.c (cris_get_pc): Remove void arg.
3786 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3788 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3791 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3793 * inferiors.c (thread_pid_matches_callback): New function.
3794 (find_thread_process): New function.
3795 (remove_thread): Reset current_thread.
3796 (remove_process): Assert threads have been removed first.
3798 2015-10-15 Yao Qi <yao.qi@linaro.org>
3800 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3802 (aarch64_remove_point): Likewise.
3803 * regcache.c (regcache_register_size): New function.
3805 2015-10-12 Yao Qi <yao.qi@linaro.org>
3807 * linux-aarch64-low.c: Update all callers as emit_load_store
3808 is renamed to aarch64_emit_load_store.
3810 2015-10-12 Yao Qi <yao.qi@linaro.org>
3812 * linux-aarch64-low.c: Update all callers of function renaming
3813 from emit_insn to aarch64_emit_insn.
3815 2015-10-12 Yao Qi <yao.qi@linaro.org>
3817 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3818 arch/aarch64-insn.h.
3819 (struct aarch64_memory_operand): Likewise.
3821 (emit_insn): Move to arch/aarch64-insn.c.
3822 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3823 (emit_load_store): Move to arch/aarch64-insn.c.
3824 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3825 (can_encode_int32): Remove.
3827 2015-10-12 Yao Qi <yao.qi@linaro.org>
3829 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3830 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3831 (aarch64_relocate_instruction): Likewise.
3832 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3833 (struct aarch64_insn_visitor): Likewise.
3835 2015-10-12 Yao Qi <yao.qi@linaro.org>
3837 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3838 (struct aarch64_insn_visitor): New.
3839 (struct aarch64_insn_relocation_data): New.
3840 (aarch64_ftrace_insn_reloc_b): New function.
3841 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3842 (aarch64_ftrace_insn_reloc_cb): Likewise.
3843 (aarch64_ftrace_insn_reloc_tb): Likewise.
3844 (aarch64_ftrace_insn_reloc_adr): Likewise.
3845 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3846 (aarch64_ftrace_insn_reloc_others): Likewise.
3848 (aarch64_relocate_instruction): Use visitor.
3850 2015-10-12 Yao Qi <yao.qi@linaro.org>
3852 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3853 int. Add argument buf.
3854 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3855 aarch64_relocate_instruction.
3857 2015-10-12 Yao Qi <yao.qi@linaro.org>
3859 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3860 argument insn. Remove local variable insn. Don't call
3862 (aarch64_install_fast_tracepoint_jump_pad): Call
3865 2015-09-30 Yao Qi <yao.qi@linaro.org>
3867 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3868 (emit_load_store_pair): Likewise.
3870 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3872 * dll.c (match_dll): Add cast(s).
3873 (unloaded_dll): Likewise.
3874 * linux-low.c (second_thread_of_pid_p): Likewise.
3875 (delete_lwp_callback): Likewise.
3876 (count_events_callback): Likewise.
3877 (select_event_lwp_callback): Likewise.
3878 (linux_set_resume_request): Likewise.
3879 * server.c (accumulate_file_name_length): Likewise.
3880 (emit_dll_description): Likewise.
3881 (handle_qxfer_threads_worker): Likewise.
3882 (visit_actioned_threads): Likewise.
3883 * thread-db.c (any_thread_of): Likewise.
3884 * tracepoint.c (same_process_p): Likewise.
3885 (match_blocktype): Likewise.
3886 (build_traceframe_info_xml): Likewise.
3888 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3890 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3892 (gdb_unparse_agent_expr): Likewise.
3893 * hostio.c (require_data): Likewise.
3894 (handle_pread): Likewise.
3895 * linux-low.c (disable_regset): Likewise.
3896 (fetch_register): Likewise.
3897 (store_register): Likewise.
3898 (get_dynamic): Likewise.
3899 (linux_qxfer_libraries_svr4): Likewise.
3900 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3901 (set_fast_tracepoint_jump): Likewise.
3902 (uninsert_fast_tracepoint_jumps_at): Likewise.
3903 (reinsert_fast_tracepoint_jumps_at): Likewise.
3904 (validate_inserted_breakpoint): Likewise.
3905 (clone_agent_expr): Likewise.
3906 * regcache.c (init_register_cache): Likewise.
3907 * remote-utils.c (putpkt_binary_1): Likewise.
3908 (decode_M_packet): Likewise.
3909 (decode_X_packet): Likewise.
3910 (look_up_one_symbol): Likewise.
3911 (relocate_instruction): Likewise.
3912 (monitor_output): Likewise.
3913 * server.c (handle_search_memory): Likewise.
3914 (handle_qxfer_exec_file): Likewise.
3915 (handle_qxfer_libraries): Likewise.
3916 (handle_qxfer): Likewise.
3917 (handle_query): Likewise.
3918 (handle_v_cont): Likewise.
3919 (handle_v_run): Likewise.
3920 (captured_main): Likewise.
3921 * target.c (write_inferior_memory): Likewise.
3922 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3923 * tracepoint.c (init_trace_buffer): Likewise.
3924 (add_tracepoint_action): Likewise.
3925 (add_traceframe): Likewise.
3926 (add_traceframe_block): Likewise.
3927 (cmd_qtdpsrc): Likewise.
3928 (cmd_qtdv): Likewise.
3929 (cmd_qtstatus): Likewise.
3930 (response_source): Likewise.
3931 (response_tsv): Likewise.
3932 (cmd_qtnotes): Likewise.
3933 (gdb_collect): Likewise.
3934 (initialize_tracepoint): Likewise.
3936 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3938 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3939 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3940 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3942 (enum aarch64_condition_codes): New enum.
3943 (w0): New static global.
3946 (struct aarch64_memory_operand) <type>: New
3947 MEMORY_OPERAND_POSTINDEX type.
3948 (postindex_memory_operand): New helper function.
3949 (emit_ret): New function.
3950 (emit_load_store_pair): New function, factored out of emit_stp
3951 with support for MEMORY_OPERAND_POSTINDEX.
3952 (emit_stp): Rewrite using emit_load_store_pair.
3953 (emit_ldp): New function.
3954 (emit_load_store): Likewise.
3955 (emit_ldr): Mention post-index instruction in comment.
3956 (emit_ldrh): New function.
3957 (emit_ldrb): New function.
3958 (emit_ldrsw): Mention post-index instruction in comment.
3959 (emit_str): Likewise.
3960 (emit_subs): New function.
3961 (emit_cmp): Likewise.
3962 (emit_and): Likewise.
3963 (emit_orr): Likewise.
3964 (emit_orn): Likewise.
3965 (emit_eor): Likewise.
3966 (emit_mvn): Likewise.
3967 (emit_lslv): Likewise.
3968 (emit_lsrv): Likewise.
3969 (emit_asrv): Likewise.
3970 (emit_mul): Likewise.
3971 (emit_sbfm): Likewise.
3972 (emit_sbfx): Likewise.
3973 (emit_ubfm): Likewise.
3974 (emit_ubfx): Likewise.
3975 (emit_csinc): Likewise.
3976 (emit_cset): Likewise.
3977 (emit_nop): Likewise.
3978 (emit_ops_insns): New helper function.
3979 (emit_pop): Likewise.
3980 (emit_push): Likewise.
3981 (aarch64_emit_prologue): New function.
3982 (aarch64_emit_epilogue): Likewise.
3983 (aarch64_emit_add): Likewise.
3984 (aarch64_emit_sub): Likewise.
3985 (aarch64_emit_mul): Likewise.
3986 (aarch64_emit_lsh): Likewise.
3987 (aarch64_emit_rsh_signed): Likewise.
3988 (aarch64_emit_rsh_unsigned): Likewise.
3989 (aarch64_emit_ext): Likewise.
3990 (aarch64_emit_log_not): Likewise.
3991 (aarch64_emit_bit_and): Likewise.
3992 (aarch64_emit_bit_or): Likewise.
3993 (aarch64_emit_bit_xor): Likewise.
3994 (aarch64_emit_bit_not): Likewise.
3995 (aarch64_emit_equal): Likewise.
3996 (aarch64_emit_less_signed): Likewise.
3997 (aarch64_emit_less_unsigned): Likewise.
3998 (aarch64_emit_ref): Likewise.
3999 (aarch64_emit_if_goto): Likewise.
4000 (aarch64_emit_goto): Likewise.
4001 (aarch64_write_goto_address): Likewise.
4002 (aarch64_emit_const): Likewise.
4003 (aarch64_emit_call): Likewise.
4004 (aarch64_emit_reg): Likewise.
4005 (aarch64_emit_pop): Likewise.
4006 (aarch64_emit_stack_flush): Likewise.
4007 (aarch64_emit_zero_ext): Likewise.
4008 (aarch64_emit_swap): Likewise.
4009 (aarch64_emit_stack_adjust): Likewise.
4010 (aarch64_emit_int_call_1): Likewise.
4011 (aarch64_emit_void_call_2): Likewise.
4012 (aarch64_emit_eq_goto): Likewise.
4013 (aarch64_emit_ne_goto): Likewise.
4014 (aarch64_emit_lt_goto): Likewise.
4015 (aarch64_emit_le_goto): Likewise.
4016 (aarch64_emit_gt_goto): Likewise.
4017 (aarch64_emit_ge_got): Likewise.
4018 (aarch64_emit_ops_impl): New static global variable.
4019 (aarch64_emit_ops): New target function, return
4020 &aarch64_emit_ops_impl.
4021 (struct linux_target_ops): Install it.
4023 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4025 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4026 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4028 * linux-aarch64-ipa.c: New file.
4029 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4031 (aarch64_get_thread_area): New target method.
4032 (extract_signed_bitfield): New helper function.
4033 (aarch64_decode_ldr_literal): New function.
4034 (enum aarch64_opcodes): New enum.
4035 (struct aarch64_register): New struct.
4036 (struct aarch64_operand): New struct.
4037 (x0): New static global.
4046 (aarch64_register): New helper function.
4047 (register_operand): Likewise.
4048 (immediate_operand): Likewise.
4049 (struct aarch64_memory_operand): New struct.
4050 (offset_memory_operand): New helper function.
4051 (preindex_memory_operand): Likewise.
4052 (enum aarch64_system_control_registers): New enum.
4053 (ENCODE): New macro.
4054 (emit_insn): New helper function.
4055 (emit_b): New function.
4056 (emit_bcond): Likewise.
4057 (emit_cb): Likewise.
4058 (emit_tb): Likewise.
4059 (emit_blr): Likewise.
4060 (emit_stp): Likewise.
4061 (emit_ldp_q_offset): Likewise.
4062 (emit_stp_q_offset): Likewise.
4063 (emit_load_store): Likewise.
4064 (emit_ldr): Likewise.
4065 (emit_ldrsw): Likewise.
4066 (emit_str): Likewise.
4067 (emit_ldaxr): Likewise.
4068 (emit_stxr): Likewise.
4069 (emit_stlr): Likewise.
4070 (emit_data_processing_reg): Likewise.
4071 (emit_data_processing): Likewise.
4072 (emit_add): Likewise.
4073 (emit_sub): Likewise.
4074 (emit_mov): Likewise.
4075 (emit_movk): Likewise.
4076 (emit_mov_addr): Likewise.
4077 (emit_mrs): Likewise.
4078 (emit_msr): Likewise.
4079 (emit_sevl): Likewise.
4080 (emit_wfe): Likewise.
4081 (append_insns): Likewise.
4082 (can_encode_int32_in): New helper function.
4083 (aarch64_relocate_instruction): New function.
4084 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4085 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4086 (struct linux_target_ops): Install aarch64_get_thread_area,
4087 aarch64_install_fast_tracepoint_jump_pad and
4088 aarch64_get_min_fast_tracepoint_insn_len.
4090 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4092 * Makefile.in (aarch64-insn.o): New rule.
4093 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4095 2015-09-21 Yao Qi <yao.qi@linaro.org>
4097 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4099 2015-09-21 Yao Qi <yao.qi@linaro.org>
4101 * tracepoint.c (max_jump_pad_size): Remove.
4103 2015-09-18 Yao Qi <yao.qi@linaro.org>
4105 * linux-aarch64-low.c: Don't include sys/uio.h.
4106 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4108 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4110 * tracepoint.c (eval_result_type): Change prototype.
4111 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4113 2015-09-15 Pedro Alves <palves@redhat.com>
4115 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4116 Check whether to report exec events instead of checking whether
4117 multiprocess is enabled.
4119 2015-09-15 Pedro Alves <palves@redhat.com>
4122 * remote-utils.c (prepare_resume_reply): Merge
4123 TARGET_WAITKIND_VFORK_DONE switch case with the
4124 TARGET_WAITKIND_FORKED case.
4126 2015-09-15 Yao Qi <yao.qi@linaro.org>
4128 * server.c (handle_query): Check string comparison using
4129 "else if" instead of "if".
4131 2015-09-15 Yao Qi <yao.qi@linaro.org>
4133 * server.c (vCont_supported): New global variable.
4134 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4135 matches. Append ";vContSupported+" to own_buf.
4136 (handle_v_requests): Append ";s;S" to own_buf if target supports
4137 hardware single step or vCont_supported is false.
4138 (capture_main): Set vCont_supported to zero.
4140 2015-09-15 Yao Qi <yao.qi@linaro.org>
4142 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4144 (linux_supports_hardware_single_step): ... New function.
4145 (linux_target_ops): Update.
4146 * lynx-low.c (lynx_target_ops): Set field
4147 supports_hardware_single_step to target_can_do_hardware_single_step.
4148 * nto-low.c (nto_target_ops): Likewise.
4149 * spu-low.c (spu_target_ops): Likewise.
4150 * win32-low.c (win32_target_ops): Likewise.
4151 * target.c (target_can_do_hardware_single_step): New function.
4152 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4153 Remove. <supports_hardware_single_step>: New field.
4154 (target_supports_conditional_breakpoints): Remove.
4155 (target_supports_hardware_single_step): New macro.
4156 (target_can_do_hardware_single_step): Declare.
4157 * server.c (handle_query): Use target_supports_hardware_single_step
4158 instead of target_supports_conditional_breakpoints.
4160 2015-09-15 Yao Qi <yao.qi@linaro.org>
4162 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4164 (struct linux_target_ops the_low_target): Install
4165 aarch64_linux_siginfo_fixup.
4167 2015-09-11 Don Breazeal <donb@codesourcery.com>
4168 Luis Machado <lgustavo@codesourcery.com>
4170 * linux-low.c (linux_mourn): Static declaration.
4171 (linux_arch_setup): Move in front of
4172 handle_extended_wait.
4173 (linux_arch_setup_thread): New function.
4174 (handle_extended_wait): Handle exec events. Call
4175 linux_arch_setup_thread. Make event_lwp argument a
4176 pointer-to-a-pointer.
4177 (check_zombie_leaders): Do not check stopped threads.
4178 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4179 (linux_low_filter_event): Add lwp and thread for exec'ing
4180 non-leader thread if leader thread has been deleted.
4181 Refactor code into linux_arch_setup_thread and call it.
4182 Pass child lwp pointer by reference to handle_extended_wait.
4183 (linux_wait_for_event_filtered): Update comment.
4184 (linux_wait_1): Prevent clobbering exec event status.
4185 (linux_supports_exec_events): New function.
4186 (linux_target_ops) <supports_exec_events>: Initialize new member.
4187 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4189 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4190 * server.c (report_exec_events): New global variable.
4191 (handle_query): Handle qSupported query for exec-events feature.
4192 (captured_main): Initialize report_exec_events.
4193 * server.h (report_exec_events): Declare new global variable.
4194 * target.h (struct target_ops) <supports_exec_events>: New
4196 (target_supports_exec_events): New macro.
4197 * win32-low.c (win32_target_ops) <supports_exec_events>:
4198 Initialize new member.
4200 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4202 * linux-low.c (linux_low_enable_btrace): Remove.
4203 (linux_target_ops): Replace linux_low_enable_btrace with
4204 linux_enable_btrace.
4206 2015-09-03 Yao Qi <yao.qi@linaro.org>
4208 * linux-aarch64-low.c (aarch64_insert_point): Call
4209 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4212 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4214 * linux-low.c (check_stopped_by_breakpoint): Use
4215 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4217 2015-08-27 Pedro Alves <palves@redhat.com>
4219 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4221 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4223 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4224 the XNEW-family equivalent.
4225 (compile_bytecodes): Likewise.
4226 * dll.c (loaded_dll): Likewise.
4227 * event-loop.c (append_callback_event): Likewise.
4228 (create_file_handler): Likewise.
4229 (create_file_event): Likewise.
4230 * hostio.c (handle_open): Likewise.
4231 * inferiors.c (add_thread): Likewise.
4232 (add_process): Likewise.
4233 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4234 * linux-arm-low.c (arm_new_process): Likewise.
4235 (arm_new_thread): Likewise.
4236 * linux-low.c (add_to_pid_list): Likewise.
4237 (linux_add_process): Likewise.
4238 (handle_extended_wait): Likewise.
4239 (add_lwp): Likewise.
4240 (enqueue_one_deferred_signal): Likewise.
4241 (enqueue_pending_signal): Likewise.
4242 (linux_resume_one_lwp_throw): Likewise.
4243 (linux_resume_one_thread): Likewise.
4244 (linux_read_memory): Likewise.
4245 (linux_write_memory): Likewise.
4246 * linux-mips-low.c (mips_linux_new_process): Likewise.
4247 (mips_linux_new_thread): Likewise.
4248 (mips_add_watchpoint): Likewise.
4249 * linux-x86-low.c (initialize_low_arch): Likewise.
4250 * lynx-low.c (lynx_add_process): Likewise.
4251 * mem-break.c (set_raw_breakpoint_at): Likewise.
4252 (set_breakpoint): Likewise.
4253 (add_condition_to_breakpoint): Likewise.
4254 (add_commands_to_breakpoint): Likewise.
4255 (clone_agent_expr): Likewise.
4256 (clone_one_breakpoint): Likewise.
4257 * regcache.c (new_register_cache): Likewise.
4258 * remote-utils.c (look_up_one_symbol): Likewise.
4259 * server.c (queue_stop_reply): Likewise.
4260 (start_inferior): Likewise.
4261 (queue_stop_reply_callback): Likewise.
4262 (handle_target_event): Likewise.
4263 * spu-low.c (fetch_ppc_memory): Likewise.
4264 (store_ppc_memory): Likewise.
4265 * target.c (set_target_ops): Likewise.
4266 * thread-db.c (thread_db_load_search): Likewise.
4267 (try_thread_db_load_1): Likewise.
4268 * tracepoint.c (add_tracepoint): Likewise.
4269 (add_tracepoint_action): Likewise.
4270 (create_trace_state_variable): Likewise.
4271 (cmd_qtdpsrc): Likewise.
4272 (cmd_qtro): Likewise.
4273 (add_while_stepping_state): Likewise.
4274 * win32-low.c (child_add_thread): Likewise.
4275 (get_image_name): Likewise.
4277 2015-08-25 Yao Qi <yao.qi@linaro.org>
4279 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4281 2015-08-25 Yao Qi <yao.qi@linaro.org>
4283 * Makefile.in (aarch64-linux.o): New rule.
4284 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4286 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4287 (aarch64_init_debug_reg_state): Make it extern.
4288 (aarch64_linux_prepare_to_resume): Remove.
4290 2015-08-25 Yao Qi <yao.qi@linaro.org>
4292 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4293 lwp_arch_private_info and ptid_of_lwp.
4295 2015-08-25 Yao Qi <yao.qi@linaro.org>
4297 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4298 Find proc_info by find_process_pid. All callers updated.
4300 2015-08-25 Yao Qi <yao.qi@linaro.org>
4302 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4304 (debug_reg_change_callback): Remove.
4305 (aarch64_notify_debug_reg_change): Remove.
4307 2015-08-25 Yao Qi <yao.qi@linaro.org>
4309 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4310 Call current_lwp_ptid.
4312 2015-08-25 Yao Qi <yao.qi@linaro.org>
4314 * linux-aarch64-low.c (debug_reg_change_callback): Use
4317 2015-08-25 Yao Qi <yao.qi@linaro.org>
4319 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4321 2015-08-25 Yao Qi <yao.qi@linaro.org>
4323 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4325 2015-08-25 Yao Qi <yao.qi@linaro.org>
4327 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4330 2015-08-25 Yao Qi <yao.qi@linaro.org>
4332 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4334 (debug_reg_change_callback): Remove argument entry and add argument
4335 lwp. Remove local variable thread. Don't print thread id in the
4336 debugging output. Don't check whether pid of thread equals to pid.
4337 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4338 iterate_over_lwps instead find_inferior.
4340 2015-08-24 Pedro Alves <palves@redhat.com>
4342 * inferiors.c (get_first_process): New function.
4343 * inferiors.h (get_first_process): New declaration.
4344 * remote-utils.c (read_ptid): Default to the first process in the
4345 list, instead of to the current thread's process.
4347 2015-08-24 Pedro Alves <palves@redhat.com>
4349 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4350 * event-loop.c: Likewise.
4351 * remote-utils.c: Likewise.
4352 * tracepoint.c: Likewise.
4354 2015-08-24 Pedro Alves <palves@redhat.com>
4356 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4359 2015-08-21 Pedro Alves <palves@redhat.com>
4361 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4362 instead of literal 1.
4364 2015-08-21 Pedro Alves <palves@redhat.com>
4366 * tdesc.c (default_description): Explicitly zero-initialize.
4368 2015-08-21 Pedro Alves <palves@redhat.com>
4371 * inferiors.c (remove_thread): Discard any pending stop reply for
4373 * server.c (remove_all_on_match_pid): Rename to ...
4374 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4376 (discard_queued_stop_replies): Change parameter to a ptid. Now
4378 (handle_v_kill, kill_inferior_callback, captured_main)
4379 (process_serial_event): Adjust.
4380 * server.h (discard_queued_stop_replies): Declare.
4382 2015-08-21 Pedro Alves <palves@redhat.com>
4384 * linux-low.c (wait_for_sigstop): Always switch to no thread
4385 selected if the previously current thread dies.
4386 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4387 process instead of the current thread's.
4388 * remote-utils.c (input_interrupt): Don't check if there's no
4390 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4391 current thread to the general thread fails, error out.
4392 (handle_qxfer_auxv, handle_qxfer_libraries)
4393 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4394 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4395 (handle_query): Check if there's a thread selected instead of
4396 checking whether there's any thread in the thread list.
4397 (handle_qxfer_threads, handle_qxfer_btrace)
4398 (handle_qxfer_btrace_conf): Don't error out early if there's no
4399 thread in the thread list.
4400 (handle_v_cont, myresume): Don't set the current thread to the
4402 (process_serial_event) <Hg handling>: Also set thread_id if the
4403 previous general thread is still alive.
4404 (process_serial_event) <g/G handling>: If setting the current
4405 thread to the general thread fails, error out.
4406 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4407 thread's lwp instead of the current thread's.
4408 * target.c (set_desired_thread): If the desired thread was not
4409 found, leave the current thread pointing to NULL. Return an int
4410 (boolean) indicating success.
4411 * target.h (set_desired_thread): Change return type to int.
4413 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4415 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4416 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4418 (ps_get_thread_area): New function.
4420 2015-08-19 Gary Benson <gbenson@redhat.com>
4422 * hostio.c (handle_pread): Do not attempt to read more data
4423 than hostio_reply_with_data can fit in a packet.
4425 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4427 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4429 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4431 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4433 2015-08-06 Pedro Alves <palves@redhat.com>
4435 * tracepoint.c (expr_eval_result): Now an int.
4437 2015-08-06 Pedro Alves <palves@redhat.com>
4439 * gdbthread.h (struct regcache): Forward declare.
4440 (struct thread_info) <regcache_data>: Now a struct regcache
4442 * inferiors.c (inferior_regcache_data)
4443 (set_inferior_regcache_data): Now work with struct regcache
4445 * inferiors.h (struct regcache): Forward declare.
4446 (inferior_regcache_data, set_inferior_regcache_data): Now work
4447 with struct regcache pointers.
4448 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4449 (free_register_cache_thread): Remove struct regcache pointer
4452 2015-08-06 Pedro Alves <palves@redhat.com>
4454 * server.c (captured_main): On error, print the exception message
4455 to stderr, and if run_once is set, throw a quit.
4457 2015-08-06 Pedro Alves <palves@redhat.com>
4459 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4462 2015-08-06 Pedro Alves <palves@redhat.com>
4464 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4465 reading beyond the passed in buffer length.
4467 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4469 * tracepoint.c (symbol_list) <required>: Remove.
4471 2015-08-06 Pedro Alves <palves@redhat.com>
4473 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4474 count if stopping and suspending threads.
4475 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4476 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4477 (linux_detach): Complete an ongoing step-over.
4478 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4480 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4481 (linux_wait_1): If passing a signal to the inferior after
4482 finishing a step-over, unsuspend and re-resume all lwps. If we
4483 see a single-step event but the thread should be continuing, don't
4484 pass the trap to gdb.
4485 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4486 internal_error instead of gdb_assert.
4487 (enqueue_pending_signal): New function.
4488 (check_ptrace_stopped_lwp_gone): Add debug output.
4489 (start_step_over): Use internal_error instead of gdb_assert.
4490 (complete_ongoing_step_over): New function.
4491 (linux_resume_one_thread): Don't resume a suspended thread.
4492 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4495 2015-08-06 Pedro Alves <palves@redhat.com>
4497 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4498 (linux_thread_alive): Use lwp_is_marked_dead.
4499 (extended_event_reported): Delete.
4500 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4501 instead of extended_event_reported.
4502 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4504 (lwp_is_marked_dead): New function.
4505 (lwp_running): Use lwp_is_marked_dead.
4506 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4509 2015-08-06 Pedro Alves <palves@redhat.com>
4511 * linux-low.c (linux_wait_1): Move fork event output out of the
4512 !report_to_gdb check. Pass event_child->waitstatus to
4513 target_waitstatus_to_string instead of ourstatus.
4515 2015-08-04 Yao Qi <yao.qi@linaro.org>
4517 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4518 if current_thread is 32 bit.
4520 2015-08-04 Yao Qi <yao.qi@linaro.org>
4522 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4523 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4524 * server.c (extended_protocol): Remove "static".
4525 * server.h (extended_protocol): Declare it.
4527 2015-08-04 Yao Qi <yao.qi@linaro.org>
4529 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4530 both aarch64 and aarch32.
4531 (aarch64_set_pc): Likewise.
4533 2015-08-04 Yao Qi <yao.qi@linaro.org>
4535 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4536 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4537 arm-with-neon.xml to srv_xmlfiles.
4538 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4539 (is_64bit_tdesc): New function.
4540 (aarch64_linux_read_description): New function.
4541 (aarch64_arch_setup): Call aarch64_linux_read_description.
4542 (regs_info): Rename to regs_info_aarch64.
4543 (aarch64_regs_info): Return right regs_info.
4544 (initialize_low_arch): Call initialize_low_arch_aarch32.
4546 2015-08-04 Yao Qi <yao.qi@linaro.org>
4548 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4549 * linux-aarch32-low.c: New file.
4550 * linux-aarch32-low.h: New file.
4551 * linux-arm-low.c (arm_fill_gregset): Move it to
4552 linux-aarch32-low.c.
4553 (arm_store_gregset): Likewise.
4554 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4555 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4556 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4557 (regs_info): Rename to regs_info_arm.
4558 (arm_regs_info): Return regs_info_aarch32 if
4559 have_ptrace_getregset is 1 and target description is
4560 arm_with_neon or arm_with_vfpv3.
4561 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4562 Call initialize_low_arch_aarch32 instead.
4564 2015-08-04 Yao Qi <yao.qi@linaro.org>
4566 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4567 * linux-low.c: ... here.
4568 * linux-low.h (have_ptrace_getregset): Declare it.
4570 2015-08-04 Pedro Alves <palves@redhat.com>
4572 * thread-db.c (struct thread_db): Use new typedefs.
4573 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4575 (disable_thread_event_reporting): Cast result of dlsym to
4576 destination function pointer type.
4577 (thread_db_mourn): Use td_ta_delete_ftype.
4579 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4581 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4583 (CDX_BREAKPOINT): Define for R2.
4584 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4585 (the_low_target): Add comments.
4587 2015-07-30 Yao Qi <yao.qi@linaro.org>
4589 * linux-arm-low.c (arm_hwcap): Remove it.
4590 (arm_read_description): New local variable arm_hwcap. Don't
4591 set arm_hwcap to zero.
4593 2015-07-30 Yao Qi <yao.qi@linaro.org>
4595 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4596 Use regcache->tdesc instead.
4597 (arm_store_wmmxregset): Likewise.
4598 (arm_fill_vfpregset): Likewise.
4599 (arm_store_vfpregset): Likewise.
4601 2015-07-30 Yao Qi <yao.qi@linaro.org>
4603 * linux-arm-low.c: Include arch/arm.h.
4604 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4605 (arm_store_gregset): Likewise.
4607 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4609 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4610 ptrace's 4th parameter.
4612 2015-07-27 Yao Qi <yao.qi@linaro.org>
4614 * configure.srv (case aarch64*-*-linux*): Don't set
4617 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4619 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4621 * linux-arm-low.c: Likewise.
4622 * linux-cris-low.c: Likewise.
4623 * linux-crisv32-low.c: Likewise.
4624 * linux-low.c: Likewise.
4625 * linux-m68k-low.c: Likewise.
4626 * linux-mips-low.c: Likewise.
4627 * linux-nios2-low.c: Likewise.
4628 * linux-s390-low.c: Likewise.
4629 * linux-sparc-low.c: Likewise.
4630 * linux-tic6x-low.c: Likewise.
4631 * linux-tile-low.c: Likewise.
4632 * linux-x86-low.c: Likewise.
4634 2015-07-24 Pedro Alves <palves@redhat.com>
4636 * config.in: Regenerate.
4637 * configure: Regenerate.
4639 2015-07-24 Pedro Alves <palves@redhat.com>
4641 * acinclude.m4: Include ../ptrace.m4.
4642 * configure.ac: Call GDB_AC_PTRACE.
4643 * config.in, configure: Regenerate.
4645 2015-07-24 Yao Qi <yao.qi@linaro.org>
4647 * linux-low.c (linux_create_inferior): Remove setting to
4648 proc->priv->new_inferior.
4649 (linux_attach): Likewise.
4650 (linux_low_filter_event): Likewise.
4651 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4653 2015-07-24 Yao Qi <yao.qi@linaro.org>
4655 * linux-low.c (linux_arch_setup): New function.
4656 (linux_low_filter_event): If proc->tdesc is NULL and
4657 proc->attached is true, call the_low_target.arch_setup.
4658 Otherwise, keep status pending, and return.
4659 (linux_resume_one_lwp_throw): Don't call get_pc if
4660 thread->while_stepping isn't NULL. Don't call
4661 get_thread_regcache if proc->tdesc is NULL.
4662 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4663 (linux_target_ops): Install arch_setup.
4664 * server.c (start_inferior): Call the_target->arch_setup.
4665 * target.h (struct target_ops) <arch_setup>: New field.
4666 (target_arch_setup): New marco.
4667 * lynx-low.c (lynx_target_ops): Update.
4668 * nto-low.c (nto_target_ops): Update.
4669 * spu-low.c (spu_target_ops): Update.
4670 * win32-low.c (win32_target_ops): Update.
4672 2015-07-24 Yao Qi <yao.qi@linaro.org>
4674 * linux-low.c (linux_add_process): Don't set
4675 proc->priv->new_inferior.
4676 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4677 (linux_attach): Likewise.
4679 2015-07-24 Yao Qi <yao.qi@linaro.org>
4681 * server.c (start_inferior): Code refactor.
4683 2015-07-24 Yao Qi <yao.qi@linaro.org>
4685 * server.c (process_serial_event): Set general_thread.
4687 2015-07-21 Yao Qi <yao.qi@linaro.org>
4689 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4690 aarch64_linux_get_debug_reg_capacity.
4692 2015-07-17 Yao Qi <yao.qi@linaro.org>
4694 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4695 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4696 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4697 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4698 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4699 (AARCH64_HWP_ALIGNMENT): Likewise.
4700 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4701 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4702 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4703 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4704 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4705 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4706 (struct aarch64_debug_reg_state): Likewise.
4707 (struct arch_lwp_info): Likewise.
4708 (aarch64_align_watchpoint): Likewise.
4709 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4710 (aarch64_watchpoint_length): Likewise.
4711 (aarch64_point_encode_ctrl_reg): Likewise
4712 (aarch64_point_is_aligned): Likewise.
4713 (aarch64_align_watchpoint): Likewise.
4714 (aarch64_linux_set_debug_regs):
4715 (aarch64_dr_state_insert_one_point): Likewise.
4716 (aarch64_dr_state_remove_one_point): Likewise.
4717 (aarch64_handle_breakpoint): Likewise.
4718 (aarch64_handle_aligned_watchpoint): Likewise.
4719 (aarch64_handle_unaligned_watchpoint): Likewise.
4720 (aarch64_handle_watchpoint): Likewise.
4722 2015-07-17 Yao Qi <yao.qi@linaro.org>
4724 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4725 and don't aarch64_get_debug_reg_state. All callers update.
4726 (aarch64_handle_aligned_watchpoint): Likewise.
4727 (aarch64_handle_unaligned_watchpoint): Likewise.
4728 (aarch64_handle_watchpoint): Likewise.
4729 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4730 (aarch64_remove_point): Likewise.
4732 2015-07-17 Yao Qi <yao.qi@linaro.org>
4734 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4736 (aarch64_handle_unaligned_watchpoint): Likewise.
4738 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4740 Revert the previous 3 commits:
4741 Move gdb_regex* to common/
4742 Move linux_find_memory_regions_full & co.
4743 gdbserver build-id attribute generator
4745 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4746 Jan Kratochvil <jan.kratochvil@redhat.com>
4748 gdbserver build-id attribute generator.
4749 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4750 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4751 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4753 (get_dynamic): Use find_pdhr to traverse program headers.
4754 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4755 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4756 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4757 (get_hex_build_id): New.
4758 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4759 to reply XML document.
4761 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4762 Jan Kratochvil <jan.kratochvil@redhat.com>
4764 * target.c: Include target/target-utils.h and fcntl.h.
4765 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4766 (target_fileio_read_stralloc): New functions.
4768 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4770 * Makefile.in (OBS): Add gdb_regex.o.
4772 * config.in: Rebuilt.
4773 * configure: Rebuilt.
4775 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4776 Jan Kratochvil <jan.kratochvil@redhat.com>
4778 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4779 * Makefile.in (OBS): Add target-utils.o.
4780 (linux-maps.o, target-utils.o): New.
4781 * configure.srv (srv_linux_obj): Add linux-maps.o.
4783 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4785 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4787 (the_low_target): Install it.
4789 2015-07-14 Pedro Alves <palves@redhat.com>
4791 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4792 Instead, ignore ECHILD, and throw an error for other errnos.
4794 2015-07-10 Pedro Alves <palves@redhat.com>
4796 * event-loop.c (struct callback_event) <data>: Change type to
4797 gdb_client_data instance instead of gdb_client_data pointer.
4798 (append_callback_event): Adjust.
4800 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4802 * linux-aarch64-low.c: Add comments for each linux_target_ops
4803 method. Remove comments already covered in target_ops and
4804 linux_target_ops definitions.
4805 (the_low_target): Add comments for each unimplemented method.
4807 2015-07-09 Yao Qi <yao.qi@linaro.org>
4809 * linux-aarch64-low.c (aarch64_regmap): Remove.
4810 (aarch64_usrregs_info): Remove.
4811 (regs_info): Set field usrregs to NULL.
4813 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4815 * linux-low.c: Include "rsp-low.h"
4816 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4817 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4818 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4819 (handle_btrace_enable_pt): New.
4820 (handle_btrace_general_set): Support "pt".
4821 (handle_btrace_conf_general_set): Support "pt:size".
4823 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4825 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4828 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4830 * linux-aarch64-low.c: Remove comment about endianness.
4831 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4832 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4835 2015-06-24 Gary Benson <gbenson@redhat.com>
4837 * linux-i386-ipa.c (stdint.h): Do not include.
4838 * lynx-i386-low.c (stdint.h): Likewise.
4839 * lynx-ppc-low.c (stdint.h): Likewise.
4840 * mem-break.c (stdint.h): Likewise.
4841 * thread-db.c (stdint.h): Likewise.
4842 * tracepoint.c (stdint.h): Likewise.
4843 * win32-low.c (stdint.h): Likewise.
4845 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4847 * server.c (write_qxfer_response): Update call to
4848 remote_escape_output.
4850 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4851 Jan Kratochvil <jan.kratochvil@redhat.com>
4853 Merge multiple hex conversions.
4854 * gdbreplay.c (tohex): Rename to 'fromhex'.
4855 (logchar): Use fromhex.
4857 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4859 * server.c (handle_qxfer_libraries): Set `version' attribute for
4862 2015-06-10 Gary Benson <gbenson@redhat.com>
4864 * target.h (struct target_ops) <multifs_open>: New field.
4865 <multifs_unlink>: Likewise.
4866 <multifs_readlink>: Likewise.
4867 * linux-low.c (nat/linux-namespaces.h): New include.
4868 (linux_target_ops): Initialize the_target->multifs_open,
4869 the_target->multifs_unlink and the_target->multifs_readlink.
4870 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4871 * hostio.c (hostio_fs_pid): New static variable.
4872 (hostio_handle_new_gdb_connection): New function.
4873 (handle_setfs): Likewise.
4874 (handle_open): Use the_target->multifs_open as appropriate.
4875 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4876 (handle_readlink): Use the_target->multifs_readlink as
4878 (handle_vFile): Handle vFile:setfs packets.
4879 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4880 after target_handle_new_gdb_connection.
4882 2015-06-10 Gary Benson <gbenson@redhat.com>
4884 * configure.ac (AC_CHECK_FUNCS): Add setns.
4885 * config.in: Regenerate.
4886 * configure: Likewise.
4887 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4888 (linux-namespaces.o): New rule.
4889 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4891 2015-06-09 Gary Benson <gbenson@redhat.com>
4893 * hostio.c (handle_open): Process mode argument with
4894 fileio_to_host_mode.
4896 2015-06-01 Yao Qi <yao.qi@linaro.org>
4898 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4899 * linux-x86-low.c: Likewise.
4901 2015-05-28 Don Breazeal <donb@codesourcery.com>
4903 * linux-low.c (handle_extended_wait): Initialize
4904 thread_info.last_resume_kind for new fork children.
4906 2015-05-15 Pedro Alves <palves@redhat.com>
4908 * target.h (target_handle_new_gdb_connection): Rewrite using if
4909 wrapped in do/while.
4911 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4913 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4914 * configure, config.in: Regenerate.
4915 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4918 2015-05-12 Don Breazeal <donb@codesourcery.com>
4920 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4921 PTRACE_EVENT_VFORK_DONE.
4922 (linux_low_ptrace_options, extended_event_reported): Add vfork
4924 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4925 and "vforkdone" for RSP 'T' Stop Reply Packet.
4926 * server.h (report_vfork_events): Declare
4929 2015-05-12 Don Breazeal <donb@codesourcery.com>
4931 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4932 (the_low_target) <new_fork>: Initialize new member.
4933 * linux-arm-low.c (arm_new_fork): New function.
4934 (the_low_target) <new_fork>: Initialize new member.
4935 * linux-low.c (handle_extended_wait): Call new target function
4937 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4938 * linux-mips-low.c (mips_add_watchpoint): New function
4939 extracted from mips_insert_point.
4940 (the_low_target) <new_fork>: Initialize new member.
4941 (mips_linux_new_fork): New function.
4942 (mips_insert_point): Call mips_add_watchpoint.
4943 * linux-x86-low.c (x86_linux_new_fork): New function.
4944 (the_low_target) <new_fork>: Initialize new member.
4946 2015-05-12 Don Breazeal <donb@codesourcery.com>
4948 * linux-low.c (handle_extended_wait): Implement return value,
4949 rename argument 'event_child' to 'event_lwp', handle
4950 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4951 (linux_low_ptrace_options): New function.
4952 (linux_low_filter_event): Call linux_low_ptrace_options,
4953 use different argument fo linux_enable_event_reporting,
4954 use return value from handle_extended_wait.
4955 (extended_event_reported): New function.
4956 (linux_wait_1): Call extended_event_reported and set
4957 status to report fork events.
4958 (linux_write_memory): Add pid to debug message.
4959 (reset_lwp_ptrace_options_callback): New function.
4960 (linux_handle_new_gdb_connection): New function.
4961 (linux_target_ops): Initialize new structure member.
4962 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4963 * lynx-low.c: Initialize new structure member.
4964 * remote-utils.c (prepare_resume_reply): Implement stop reason
4965 "fork" for "T" stop message.
4966 * server.c (handle_query): Call handle_new_gdb_connection.
4967 * server.h (report_fork_events): Declare global flag.
4968 * target.h (struct target_ops) <handle_new_gdb_connection>:
4970 (target_handle_new_gdb_connection): New macro.
4971 * win32-low.c: Initialize new structure member.
4973 2015-05-12 Don Breazeal <donb@codesourcery.com>
4975 * mem-break.c (APPEND_TO_LIST): Define macro.
4976 (clone_agent_expr): New function.
4977 (clone_one_breakpoint): New function.
4978 (clone_all_breakpoints): New function.
4979 * mem-break.h: Declare new functions.
4981 2015-05-12 Don Breazeal <donb@codesourcery.com>
4983 * linux-low.c (linux_supports_fork_events): New function.
4984 (linux_supports_vfork_events): New function.
4985 (linux_target_ops): Initialize new structure members.
4986 (initialize_low): Call linux_check_ptrace_features.
4987 * lynx-low.c (lynx_target_ops): Initialize new structure
4989 * server.c (report_fork_events, report_vfork_events):
4991 (handle_query): Add new features to qSupported packet and
4993 (captured_main): Initialize new global variables.
4994 * target.h (struct target_ops) <supports_fork_events>:
4996 <supports_vfork_events>: New member.
4997 (target_supports_fork_events): New macro.
4998 (target_supports_vfork_events): New macro.
4999 * win32-low.c (win32_target_ops): Initialize new structure
5002 2015-05-12 Gary Benson <gbenson@redhat.com>
5004 * server.c (handle_qxfer_exec_file): Use current process
5007 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5009 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5010 Remove HAVE_PTRACE_GETREGS conditionals.
5011 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5012 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5014 2015-05-08 Yao Qi <yao.qi@linaro.org>
5016 * linux-low.c (linux_supports_conditional_breakpoints): New
5018 (linux_target_ops): Install new target method.
5019 * lynx-low.c (lynx_target_ops): Install NULL hook for
5020 supports_conditional_breakpoints.
5021 * nto-low.c (nto_target_ops): Likewise.
5022 * spu-low.c (spu_target_ops): Likewise.
5023 * win32-low.c (win32_target_ops): Likewise.
5024 * server.c (handle_query): Check
5025 target_supports_conditional_breakpoints.
5026 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5028 (target_supports_conditional_breakpoints): New macro.
5030 2015-05-06 Pedro Alves <palves@redhat.com>
5033 * server.c (start_inferior): If the process exits, mourn it.
5035 2015-04-21 Gary Benson <gbenson@redhat.com>
5037 * hostio.c (fileio_open_flags_to_host): Factored out to
5038 fileio_to_host_openflags in common/fileio.c. Single use
5041 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5043 * linux-xtensa-low.c (xtensa_fill_gregset)
5044 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5047 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5049 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5050 (regs_info): Replace usrregs pointer with NULL.
5052 2015-04-17 Gary Benson <gbenson@redhat.com>
5054 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5055 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5056 * server.c (handle_qxfer_exec_file): New function.
5057 (qxfer_packets): Add exec-file entry.
5058 (handle_query): Report qXfer:exec-file:read as supported packet.
5060 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5062 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5064 2015-04-09 Gary Benson <gbenson@redhat.com>
5066 * hostio-errno.c (errno_to_fileio_error): Remove function.
5067 Update caller to use remote_fileio_to_fio_error.
5069 2015-04-09 Yao Qi <yao.qi@linaro.org>
5071 * linux-low.c (linux_insert_point): Call
5072 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5073 (linux_remove_point): Call remove_memory_breakpoint if type is
5075 * linux-x86-low.c (x86_insert_point): Don't call
5076 insert_memory_breakpoint.
5077 (x86_remove_point): Don't call remove_memory_breakpoint.
5079 2015-04-01 Pedro Alves <palves@redhat.com>
5080 Cleber Rosa <crosa@redhat.com>
5082 * server.c (gdbserver_usage): Reorganize and extend the usage
5085 2015-03-24 Pedro Alves <palves@redhat.com>
5087 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5088 output. Also dump TRAP_TRACE.
5089 (linux_low_filter_event): In debug output, distinguish a
5090 resume_stop SIGSTOP from a delayed SIGSTOP.
5092 2015-03-24 Gary Benson <gbenson@redhat.com>
5094 * linux-x86-low.c (x86_linux_new_thread): Moved to
5096 (x86_linux_prepare_to_resume): Likewise.
5098 2015-03-24 Gary Benson <gbenson@redhat.com>
5100 * Makefile.in (x86-linux-dregs.o): New rule.
5101 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5102 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5103 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5104 (x86_linux_dr_get): Likewise.
5105 (x86_linux_dr_set): Likewise.
5106 (update_debug_registers_callback): Likewise.
5107 (x86_linux_dr_set_addr): Likewise.
5108 (x86_linux_dr_get_addr): Likewise.
5109 (x86_linux_dr_set_control): Likewise.
5110 (x86_linux_dr_get_control): Likewise.
5111 (x86_linux_dr_get_status): Likewise.
5112 (x86_linux_update_debug_registers): Likewise.
5114 2015-03-24 Gary Benson <gbenson@redhat.com>
5116 * linux-x86-low.c (x86_linux_update_debug_registers):
5117 New function, factored out from...
5118 (x86_linux_prepare_to_resume): ...this.
5120 2015-03-24 Gary Benson <gbenson@redhat.com>
5122 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5123 (x86_linux_dr_set): Likewise.
5124 (update_debug_registers_callback): Likewise.
5125 (x86_linux_dr_set_addr): Likewise.
5126 (x86_linux_dr_get_addr): Likewise.
5127 (x86_linux_dr_set_control): Likewise.
5128 (x86_linux_dr_get_control): Likewise.
5129 (x86_linux_dr_get_status): Likewise.
5130 (x86_linux_prepare_to_resume): Likewise.
5132 2015-03-24 Gary Benson <gbenson@redhat.com>
5134 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5135 Use perror_with_name. Pass string through gettext.
5136 (x86_linux_dr_set): Likewise.
5138 2015-03-24 Gary Benson <gbenson@redhat.com>
5140 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5141 (x86_linux_dr_set_addr): ...this.
5142 (x86_dr_low_get_addr): Rename to...
5143 (x86_linux_dr_get_addr): ...this.
5144 (x86_dr_low_set_control): Rename to...
5145 (x86_linux_dr_set_control): ...this.
5146 (x86_dr_low_get_control): Rename to...
5147 (x86_linux_dr_get_control): ...this.
5148 (x86_dr_low_get_status): Rename to...
5149 (x86_linux_dr_get_status): ...this.
5150 (x86_dr_low): Update with new function names.
5152 2015-03-24 Gary Benson <gbenson@redhat.com>
5154 * Makefile.in (x86-linux.o): New rule.
5155 * configure.srv: Add x86-linux.o to relevant targets.
5156 * linux-low.c (lwp_set_arch_private_info): New function.
5157 (lwp_arch_private_info): Likewise.
5158 * linux-x86-low.c: Include nat/x86-linux.h.
5159 (arch_lwp_info): Removed structure.
5160 (update_debug_registers_callback):
5161 Use lwp_set_debug_registers_changed.
5162 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5163 and lwp_set_debug_registers_changed.
5164 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5166 2015-03-24 Gary Benson <gbenson@redhat.com>
5168 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5169 * linux-arm-low.c (arm_new_thread): Likewise.
5170 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5171 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5172 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5173 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5175 2015-03-24 Gary Benson <gbenson@redhat.com>
5177 * linux-low.c (ptid_of_lwp): New function.
5178 (lwp_is_stopped): Likewise.
5179 (lwp_stop_reason): Likewise.
5180 * linux-x86-low.c (update_debug_registers_callback):
5182 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5185 2015-03-24 Gary Benson <gbenson@redhat.com>
5187 * linux-low.h (linux_stop_lwp): Remove declaration.
5189 2015-03-24 Gary Benson <gbenson@redhat.com>
5191 * linux-low.h: Include nat/linux-nat.h.
5192 * linux-low.c (iterate_over_lwps_args): New structure.
5193 (iterate_over_lwps_filter): New function.
5194 (iterate_over_lwps): Likewise.
5195 * linux-x86-low.c (update_debug_registers_callback):
5196 Update signature to what iterate_over_lwps expects.
5197 Remove PID check that iterate_over_lwps now performs.
5198 (x86_dr_low_set_addr): Use iterate_over_lwps.
5199 (x86_dr_low_set_control): Likewise.
5201 2015-03-24 Gary Benson <gbenson@redhat.com>
5203 * linux-x86-low.c (x86_debug_reg_state): New function.
5204 (x86_linux_prepare_to_resume): Use the above.
5206 2015-03-24 Gary Benson <gbenson@redhat.com>
5208 * linux-low.c (current_lwp_ptid): New function.
5209 * linux-x86-low.c: Include nat/linux-nat.h.
5210 (x86_dr_low_get_addr): Use current_lwp_ptid.
5211 (x86_dr_low_get_control): Likewise.
5212 (x86_dr_low_get_status): Likewise.
5214 2015-03-20 Pedro Alves <palves@redhat.com>
5216 * tracepoint.c (cmd_qtstatus): Make "str" const.
5218 2015-03-20 Pedro Alves <palves@redhat.com>
5220 * server.c (handle_general_set): Make "req_str" const.
5222 2015-03-19 Pedro Alves <palves@redhat.com>
5224 * linux-low.c (linux_resume_one_lwp): Rename to ...
5225 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5226 instead call perror_with_name.
5227 (check_ptrace_stopped_lwp_gone): New function.
5228 (linux_resume_one_lwp): Reimplement as wrapper around
5229 linux_resume_one_lwp_throw that swallows errors if the LWP is
5232 2015-03-19 Pedro Alves <palves@redhat.com>
5234 * linux-low.c (count_events_callback, select_event_lwp_callback):
5235 No longer check whether the thread has resume_stop as last resume
5238 2015-03-19 Pedro Alves <palves@redhat.com>
5240 * linux-low.c (count_events_callback, select_event_lwp_callback):
5241 Use the lwp's status_pending_p field, not the thread's.
5243 2015-03-19 Pedro Alves <palves@redhat.com>
5245 * linux-low.c (select_event_lwp_callback): Update comments to
5246 no longer mention SIGTRAP.
5248 2015-03-18 Gary Benson <gbenson@redhat.com>
5250 * server.c (handle_query): Do not report vFile:fstat as supported.
5252 2015-03-11 Gary Benson <gbenson@redhat.com>
5254 * hostio.c (sys/types.h): New include.
5255 (sys/stat.h): Likewise.
5256 (common-remote-fileio.h): Likewise.
5257 (handle_fstat): New function.
5258 (handle_vFile): Handle vFile:fstat packets.
5260 2015-03-11 Gary Benson <gbenson@redhat.com>
5262 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5263 struct stat.st_blocks and struct stat.st_blksize.
5264 * configure: Regenerate.
5265 * config.in: Likewise.
5266 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5267 (OBS): Add common-remote-fileio.o.
5268 (common-remote-fileio.o): New rule.
5270 2015-03-09 Pedro Alves <palves@redhat.com>
5272 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5273 'struct sockaddr' pointer in 'accept' call.
5275 2015-03-09 Pedro Alves <palves@redhat.com>
5278 2015-03-07 Pedro Alves <palves@redhat.com>
5279 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5280 or <winsock2.h> here. Instead include "gdb_socket.h".
5281 (remote_open): Use union gdb_sockaddr_u.
5282 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5283 or <winsock2.h> here. Instead include "gdb_socket.h".
5284 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5285 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5287 (init_named_socket, gdb_agent_helper_thread): Use union
5290 2015-03-07 Pedro Alves <palves@redhat.com>
5292 * configure.ac (build_warnings): Move
5293 -Wdeclaration-after-statement to the C-specific set.
5294 * configure: Regenerate.
5296 2015-03-07 Pedro Alves <palves@redhat.com>
5298 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5299 or <winsock2.h> here. Instead include "gdb_socket.h".
5300 (remote_open): Use union gdb_sockaddr_u.
5301 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5302 or <winsock2.h> here. Instead include "gdb_socket.h".
5303 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5304 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5306 (init_named_socket, gdb_agent_helper_thread): Use union
5309 2015-03-07 Pedro Alves <palves@redhat.com>
5311 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5314 2015-03-06 Yao Qi <yao.qi@linaro.org>
5316 * linux-aarch64-low.c (aarch64_insert_point): Use
5317 show_debug_regs as a boolean.
5318 (aarch64_remove_point): Likewise.
5320 2015-03-05 Pedro Alves <palves@redhat.com>
5322 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5323 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5324 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5325 * nto-low.c (nto_target_ops): Likewise.
5326 * spu-low.c (spu_target_ops): Likewise.
5327 * win32-low.c (win32_target_ops): Likewise.
5329 2015-03-04 Pedro Alves <palves@redhat.com>
5331 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5332 Decide whether a breakpoint triggered based on the SIGTRAP's
5334 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5335 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5336 (linux_low_filter_event): Check for breakpoints before checking
5338 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5340 (linux_stopped_by_sw_breakpoint)
5341 (linux_supports_stopped_by_sw_breakpoint)
5342 (linux_stopped_by_hw_breakpoint)
5343 (linux_supports_stopped_by_hw_breakpoint): New functions.
5344 (linux_target_ops): Install new target methods.
5346 2015-03-04 Pedro Alves <palves@redhat.com>
5348 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5349 * server.c (swbreak_feature, hwbreak_feature): New globals.
5350 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5351 (captured_main): Clear swbreak_feature and hwbreak_feature.
5352 * server.h (swbreak_feature, hwbreak_feature): Declare.
5353 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5354 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5355 supports_stopped_by_hw_breakpoint>: New fields.
5356 (target_supports_stopped_by_sw_breakpoint)
5357 (target_stopped_by_sw_breakpoint)
5358 (target_supports_stopped_by_hw_breakpoint)
5359 (target_stopped_by_hw_breakpoint): Declare.
5361 2015-03-04 Pedro Alves <palves@redhat.com>
5363 enum lwp_stop_reason -> enum target_stop_reason
5364 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5365 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5366 (linux_wait_1, stuck_in_jump_pad_callback)
5367 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5368 (linux_stopped_by_watchpoint):
5369 * linux-low.h (enum lwp_stop_reason): Delete.
5370 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5371 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5373 2015-03-04 Yao Qi <yao.qi@linaro.org>
5375 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5377 2015-03-03 Gary Benson <gbenson@redhat.com>
5379 * hostio.c (handle_vFile): Fix prefix lengths.
5381 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5383 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5386 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5388 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5389 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5390 (clean): Add "rm -f" for above C files.
5391 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5392 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5393 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5394 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5395 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5396 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5397 (init_registers_s390x_vx_linux64)
5398 (init_registers_s390x_tevx_linux64)
5399 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5400 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5402 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5403 (s390_store_vxrs_high): New functions.
5404 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5406 (s390_arch_setup): Add logic for selecting one of the new target
5407 descriptions. Activate the new vector regsets if applicable.
5408 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5409 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5410 and init_registers_s390x_tevx_linux64.
5412 2015-03-01 Pedro Alves <palves@redhat.com>
5414 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5417 2015-02-27 Pedro Alves <palves@redhat.com>
5419 * linux-x86-low.c (u_debugreg_offset): New function.
5420 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5422 2015-02-27 Pedro Alves <palves@redhat.com>
5424 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5425 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5426 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5427 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5428 (ps_lsetfpregs, ps_getpid)
5429 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5430 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5431 (ps_lsetxregs, ps_plog): Declare.
5433 2015-02-27 Pedro Alves <palves@redhat.com>
5435 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5436 IP_AGENT_EXPORT_FUNC.
5437 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5438 IP_AGENT_EXPORT_FUNC.
5439 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5440 (IP_AGENT_EXPORT): Delete.
5441 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5442 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5443 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5444 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5445 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5446 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5447 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5448 (traceframe_read_count, traceframe_write_count)
5449 (traceframes_created, trace_state_variables, get_raw_reg)
5450 (get_trace_state_variable_value, set_trace_state_variable_value)
5451 (ust_loaded, helper_thread_id, cmd_buf): Use
5452 IPA_SYM_EXPORTED_NAME.
5453 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5454 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5455 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5456 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5457 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5458 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5459 EXTERN_C_PUSH/EXTERN_C_POP.
5460 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5461 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5462 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5463 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5464 (traceframe_write_count, traceframe_read_count)
5465 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5466 (about_to_request_buffer_space, get_trace_state_variable_value)
5467 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5468 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5469 EXTERN_C_PUSH/EXTERN_C_POP.
5470 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5471 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5472 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5473 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5474 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5475 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5476 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5477 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5479 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5480 (IP_AGENT_EXPORT_VAR_DECL): Define.
5482 (gdb_agent_get_raw_reg): Declare.
5484 2015-02-27 Tom Tromey <tromey@redhat.com>
5485 Pedro Alves <palves@redhat.com>
5487 Rename symbols whose names are reserved C++ keywords throughout.
5489 2015-02-27 Pedro Alves <palves@redhat.com>
5491 * Makefile.in (COMPILER): New, get it from autoconf.
5492 (CXX): Get from autoconf instead.
5493 (COMPILE.pre): Use COMPILER.
5494 (CC-LD): Rename to ...
5495 (CC_LD): ... this. Use COMPILER.
5496 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5497 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5498 * acinclude.m4: Include build-with-cxx.m4.
5499 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5500 Disable -Werror by default if building in C++ mode.
5501 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5502 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5503 the C++ compiler. Save/restore CXXFLAGS too.
5504 * configure: Regenerate.
5506 2015-02-27 Pedro Alves <palves@redhat.com>
5508 * acinclude.m4: Include libiberty.m4.
5509 * configure.ac: Call libiberty_INIT.
5510 * config.in, configure: Regenerate.
5512 2015-02-26 Pedro Alves <palves@redhat.com>
5514 * linux-low.c (linux_wait_1): When incrementing the PC past a
5515 program breakpoint always use the_low_target.breakpoint_len as
5516 increment, rather than the maximum between that and
5517 the_low_target.decr_pc_after_break.
5519 2015-02-23 Pedro Alves <palves@redhat.com>
5521 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5522 thread was doing a step-over; always adjust the PC if
5523 we stepped over a permanent breakpoint.
5524 (linux_wait_1): If we stepped over breakpoint that was on top of a
5525 permanent breakpoint, manually advance the PC past it.
5527 2015-02-23 Pedro Alves <palves@redhat.com>
5529 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5531 (x86_fill_gregset, x86_store_gregset): Use it when handling
5534 2015-02-20 Pedro Alves <palves@redhat.com>
5536 * thread-db.c: Include "nat/linux-procfs.h".
5537 (thread_db_init): Skip listing new threads if the kernel supports
5538 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5540 2015-02-20 Pedro Alves <palves@redhat.com>
5542 * linux-low.c (status_pending_p_callback): Use ptid_match.
5544 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5546 PR breakpoints/16812
5547 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5548 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5549 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5551 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5553 PR breakpoints/15956
5554 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5556 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5558 * linux-low.c (linux_low_btrace_conf): Print size.
5559 * server.c (handle_btrace_conf_general_set): New.
5560 (hanle_general_set): Call handle_btrace_conf_general_set.
5561 (handle_query): Report Qbtrace-conf:bts:size as supported.
5563 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5565 * linux-low.c (linux_low_enable_btrace): Update parameters.
5566 (linux_low_btrace_conf): New.
5567 (linux_target_ops)<to_btrace_conf>: Initialize.
5568 * server.c (current_btrace_conf): New.
5569 (handle_btrace_enable): Rename to ...
5570 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
5571 to target_enable_btrace. Update comment. Update users.
5572 (handle_qxfer_btrace_conf): New.
5573 (qxfer_packets): Add btrace-conf entry.
5574 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5575 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5576 (target_ops)<read_btrace_conf>: New.
5577 (target_enable_btrace): Update parameters.
5578 (target_read_btrace_conf): New.
5580 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5582 * server.c (handle_btrace_general_set): Remove call to
5583 target_supports_btrace.
5584 (supported_btrace_packets): New.
5585 (handle_query): Call supported_btrace_packets.
5586 * target.h: include btrace-common.h.
5587 (btrace_target_info): Removed.
5588 (supports_btrace, target_supports_btrace): Update parameters.
5590 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5592 * Makefile.in (SFILES): Add common/btrace-common.c.
5593 (OBS): Add common/btrace-common.o.
5594 (btrace-common.o): Add build rules.
5595 * linux-low: Include btrace-common.h.
5596 (linux_low_read_btrace): Use struct btrace_data. Call
5597 btrace_data_init and btrace_data_fini.
5599 2015-02-06 Pedro Alves <palves@redhat.com>
5601 * thread-db.c (find_new_threads_callback): Add debug output.
5603 2015-02-04 Pedro Alves <palves@redhat.com>
5605 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5606 (resume_stopped_resumed_lwps): New function.
5607 (linux_wait_for_event_filtered): Use it.
5609 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5611 * Makefile.in (SFILES): Add linux-personality.c.
5612 (linux-personality.o): New rule.
5613 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5614 list of objects to be built.
5615 * linux-low.c: Include nat/linux-personality.h.
5616 (linux_create_inferior): Remove code to disable address space
5617 randomization (moved to ../nat/linux-personality.c). Create
5618 cleanup to disable address space randomization.
5620 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5622 * Makefile.in (posix-strerror.o): New rule.
5623 (mingw-strerror.o): Likewise.
5624 * configure: Regenerated.
5625 * configure.ac: Source file ../common/common.host. Initialize new
5626 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5628 2015-01-14 Yao Qi <yao@codesourcery.com>
5630 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5631 (ppc-linux.o): New rule.
5632 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5633 * configure.ac: AC_CHECK_FUNCS(getauxval).
5634 * config.in: Re-generated.
5635 * configure: Re-generated.
5636 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5637 ppc64_64bit_inferior_p
5639 2015-01-14 Yao Qi <yao@codesourcery.com>
5641 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5642 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5643 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5644 (PT_ORIG_R3, PT_TRAP): Likewise.
5645 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5646 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5647 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5649 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5651 * i387-fp.c (i387_cache_to_xsave): In look over
5652 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5653 zmmh_low_space field by use of zmmh_high_space.
5655 2015-01-09 Pedro Alves <palves@redhat.com>
5657 * linux-low.c (step_over_bkpt): Move higher up in the file.
5658 (handle_extended_wait): Don't store the stop_pc here.
5659 (get_stop_pc): Adjust comments and rename to ...
5660 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5661 stopped for a software breakpoint or hardware breakpoint.
5662 (thread_still_has_status_pending_p): New function.
5663 (status_pending_p_callback): Use
5664 thread_still_has_status_pending_p. If the event is no longer
5665 interesting, resume the LWP.
5666 (handle_tracepoints): Add assert.
5667 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5668 (wstatus_maybe_breakpoint): New function.
5669 (cancel_breakpoint): Delete function.
5670 (check_stopped_by_watchpoint): New function, factored out from
5671 linux_low_filter_event.
5672 (lp_status_maybe_breakpoint): Delete function.
5673 (linux_low_filter_event): Remove filter_ptid argument.
5674 Leave thread group exits pending here. Store the LWP's stop PC.
5675 Always leave events pending.
5676 (linux_wait_for_event_filtered): Pull all events out of the
5677 kernel, and leave them all pending.
5678 (count_events_callback, select_event_lwp_callback): Consider all
5680 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5681 (select_event_lwp): Only give preference to the stepping LWP in
5682 all-stop mode. Adjust comments.
5683 (ignore_event): New function.
5684 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5685 references to cancel_breakpoints. Adjust to renames. Also give
5686 equal priority to all LWPs that have had events in non-stop mode.
5687 If reporting a software breakpoint event, unadjust the LWP's PC.
5688 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5689 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5691 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5692 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5693 (linux_stopped_by_watchpoint): Adjust.
5694 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5695 * linux-low.h (enum lwp_stop_reason): New.
5696 (struct lwp_info) <stop_pc>: Adjust comment.
5697 <stopped_by_watchpoint>: Delete field.
5698 <stop_reason>: New field.
5699 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5700 * mem-break.c (software_breakpoint_inserted_here)
5701 (hardware_breakpoint_inserted_here): New function.
5702 * mem-break.h (software_breakpoint_inserted_here)
5703 (hardware_breakpoint_inserted_here): Declare.
5704 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5705 (cancel_breakpoints): Delete.
5706 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5707 (upload_fast_traceframes): Remove references to
5710 2015-01-09 Pedro Alves <palves@redhat.com>
5712 * thread-db.c (find_new_threads_callback): Ignore thread if the
5713 kernel thread ID is -1.
5715 2015-01-09 Pedro Alves <palves@redhat.com>
5717 * linux-low.c (linux_attach_fail_reason_string): Move to
5718 nat/linux-ptrace.c, and rename.
5719 (linux_attach_lwp): Update comment.
5720 (attach_proc_task_lwp_callback): New function.
5721 (linux_attach): Adjust to rename and use
5722 linux_proc_attach_tgid_threads.
5723 (linux_attach_fail_reason_string): Delete declaration.
5725 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5727 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5728 * server.c (gdbserver_version): Likewise.
5730 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5732 * remote-utils.c: Include ctype.h.
5733 (input_interrupt): Explicitly handle the case when the char
5734 received is the NUL byte. Improve the printing of non-ASCII
5737 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5739 * linux-low.c (linux_low_filter_event): Update call to
5740 linux_enable_event_reporting following the addition of
5741 a new parameter to that function.
5743 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5746 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5747 (AARCH64_FPCR_REGNO): Likewise.
5748 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5749 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5750 (aarch64_store_fpregset): Likewise.
5752 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5754 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5755 Remove FIXME comment about assumption about N.
5757 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5759 * configure.ac: If large-file support is disabled in GDBserver,
5760 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5761 * configure: Regenerate.
5763 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5765 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5766 warning upon ENODATA from ptrace.
5767 * linux-s390-low.c (s390_store_tdb): New.
5768 (s390_regsets): Add regset for NT_S390_TDB.
5770 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5772 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5773 without a fill_function.
5774 * linux-s390-low.c (s390_fill_last_break): Remove.
5775 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5776 (s390_arch_setup): Use regset's size instead of fill_function for
5779 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5781 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5782 the regset's store function when ptrace returned an error.
5783 * regcache.c (get_thread_regcache): Invalidate register cache
5784 before fetching inferior's registers.
5786 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5788 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5789 while-loop as for-loop.
5790 (regsets_store_inferior_registers): Likewise.
5792 2014-11-28 Yao Qi <yao@codesourcery.com>
5794 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5795 * config.in, configure: Re-generate.
5796 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5799 2014-11-21 Yao Qi <yao@codesourcery.com>
5801 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5802 (AC_CHECK_HEADERS): Remove malloc.h.
5803 * configure: Re-generated.
5804 * config.in: Re-generated.
5805 * server.h: Don't include alloca.h and malloc.h.
5806 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5807 Don't include malloc.h.
5809 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5811 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5812 corresponding ERRNO check in same block.
5814 2014-11-12 Pedro Alves <palves@redhat.com>
5816 * server.c (cont_thread): Update comment.
5817 (start_inferior, attach_inferior): No longer clear cont_thread.
5818 (handle_v_cont): No longer set cont_thread.
5819 (captured_main): Clear cont_thread each time a GDB connects.
5821 2014-11-12 Pedro Alves <palves@redhat.com>
5823 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5824 thread, and don't resume all threads if the Hc thread has exited.
5826 2014-11-12 Pedro Alves <palves@redhat.com>
5828 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5829 the process group instead of to a specific LWP.
5831 2014-10-15 Pedro Alves <palves@redhat.com>
5834 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5836 (arm_set_thread_context): Delete.
5837 (the_low_target): Adjust.
5838 * win32-i386-low.c (debug_registers_changed)
5839 (debug_registers_used): Delete.
5840 (update_debug_registers_callback): New function.
5841 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5842 needing to update their debug registers.
5843 (win32_get_current_dr): New function.
5844 (x86_dr_low_get_addr, x86_dr_low_get_control)
5845 (x86_dr_low_get_status): Fetch the debug register from the thread
5847 (i386_initial_stuff): Adjust.
5848 (i386_get_thread_context): Remove current_event parameter. Don't
5849 clear debug_registers_changed nor copy DR values to
5851 (i386_set_thread_context): Delete.
5852 (i386_prepare_to_resume): New function.
5853 (i386_thread_added): Mark the thread as needing to update irs
5855 (the_low_target): Remove i386_set_thread_context and install
5856 i386_prepare_to_resume.
5857 * win32-low.c (win32_get_thread_context): Adjust.
5858 (win32_set_thread_context): Use SetThreadContext
5860 (win32_prepare_to_resume): New function.
5861 (win32_require_context): New function, factored out from ...
5862 (thread_rec): ... this.
5863 (continue_one_thread): Call win32_prepare_to_resume on each thread
5864 we're about to continue.
5865 (win32_resume): Call win32_prepare_to_resume on the event thread.
5866 * win32-low.h (struct win32_thread_info)
5867 <debug_registers_changed>: New field.
5868 (struct win32_target_ops): Change prototype of set_thread_context,
5869 delete set_thread_context and add prepare_to_resume.
5870 (win32_require_context): New declaration.
5872 2014-10-08 Gary Benson <gbenson@redhat.com>
5874 * server.h: Do not include common-exceptions.h.
5876 2014-10-08 Gary Benson <gbenson@redhat.com>
5878 * server.h: Do not include cleanups.h.
5880 2014-09-30 James Hogan <james.hogan@imgtec.com>
5882 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5885 2014-09-23 Yao Qi <yao@codesourcery.com>
5887 * linux-low.c (lp_status_maybe_breakpoint): New function.
5888 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5889 (count_events_callback): Likewise.
5890 (select_event_lwp_callback): Likewise.
5891 (cancel_breakpoints_callback): Likewise.
5893 2014-09-19 Don Breazeal <donb@codesourcery.com>
5895 * linux-low.c (handle_extended_wait): Call
5896 linux_ptrace_get_extended_event.
5897 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5898 linux_is_extended_waitstatus.
5900 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5902 * Makefile.in (CPPFLAGS): Define.
5903 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5904 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5906 2014-09-16 Gary Benson <gbenson@redhat.com>
5908 * inferiors.h (current_inferior): Renamed as...
5909 (current_thread): New variable. All uses updated.
5910 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5911 (maybe_move_out_of_jump_pad): Likewise.
5912 (cancel_breakpoint): Likewise.
5913 (linux_low_filter_event): Likewise.
5914 (wait_for_sigstop): Likewise.
5915 (linux_resume_one_lwp): Likewise.
5916 (need_step_over_p): Likewise.
5917 (start_step_over): Likewise.
5918 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5919 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5920 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5921 and save_inferior as saved_thread.
5922 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5924 (regcache_invalidate_thread): Likewise.
5925 * remote-utils.c (prepare_resume_reply): Likewise.
5926 * thread-db.c (thread_db_get_tls_address): Likewise.
5927 (disable_thread_event_reporting): Likewise.
5928 (remove_thread_event_breakpoints): Likewise.
5929 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5931 * target.h (set_desired_inferior): Renamed as...
5932 (set_desired_thread): New declaration. All uses updated.
5933 * server.c (myresume): Updated comment to reference thread instead
5935 (handle_serial_event): Likewise.
5936 (handle_target_event): Likewise.
5938 2014-09-12 Tom Tromey <tromey@redhat.com>
5939 Gary Benson <gbenson@redhat.com>
5941 * regcache.h: Include common-regcache.h.
5942 (regcache_read_pc): Don't declare.
5943 * regcache.c (get_thread_regcache_for_ptid): New function.
5945 2014-09-11 Tom Tromey <tromey@redhat.com>
5946 Gary Benson <gbenson@redhat.com>
5948 * symbol.c: New file.
5949 * Makefile.in (SFILES): Add symbol.c.
5950 (OBS): Add symbol.o.
5952 2014-09-11 Gary Benson <gbenson@redhat.com>
5954 * target.c (target_stop_ptid, target_continue_ptid): New
5957 2014-09-11 Tom Tromey <tromey@redhat.com>
5958 Gary Benson <gbenson@redhat.com>
5960 * target.h: Include target/target.h.
5961 * target.c (target_read_memory, target_read_uint32)
5962 (target_write_memory): New functions.
5964 2014-09-11 Gary Benson <gbenson@redhat.com>
5966 * server.h (debug_hw_points): Don't declare.
5967 * server.c (debug_hw_points): Don't define. Replace all uses
5968 with show_debug_regs.
5969 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5970 all uses with show_debug_regs.
5972 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5974 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5975 endianness into account.
5976 (ppc_supply_ptrace_register): Likewise.
5978 2014-09-03 James Hogan <james.hogan@imgtec.com>
5980 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5981 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5983 2014-09-03 Gary Benson <gbenson@redhat.com>
5985 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5986 ALL_DEBUG_ADDRESS_REGISTERS.
5988 2014-09-02 Gary Benson <gbenson@redhat.com>
5990 * i386-low.h: Renamed as...
5991 * x86-low.h: New file. All type, function and variable name
5992 prefixes changed from "i386_" to "x86_". All references updated.
5993 * i386-low.c: Renamed as...
5994 * x86-low.c: New file. All type, function and variable name
5995 prefixes changed from "i386_" to "x86_". All references updated.
5997 2014-09-02 Gary Benson <gbenson@redhat.com>
5999 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6000 (x86_linux_new_thread): Likewise.
6002 2014-08-29 Gary Benson <gbenson@redhat.com>
6004 * server.h (setjmp.h): Do not include.
6005 (toplevel): Do not declare.
6006 (common-exceptions.h): Include.
6007 (cleanups.h): Likewise.
6008 * server.c (toplevel): Do not define.
6009 (exit_code): New static global.
6010 (detach_or_kill_for_exit_cleanup): New function.
6011 (main): New function. Original main renamed to...
6012 (captured_main): New function.
6013 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6015 2014-08-29 Gary Benson <gbenson@redhat.com>
6017 * Makefile.in (SFILES): Add common/common-exceptions.c.
6018 (OBS): Add common-exceptions.o.
6019 (common-exceptions.o): New rule.
6020 * utils.c (prepare_to_throw_exception): New function.
6022 2014-08-29 Gary Benson <gbenson@redhat.com>
6024 * config.in: Regenerate.
6025 * configure: Likewise.
6027 2014-08-29 Gary Benson <gbenson@redhat.com>
6029 * Makefile.in (SFILES): Add common/cleanups.c.
6031 (cleanups.o): New rule.
6033 2014-08-29 Gary Benson <gbenson@redhat.com>
6035 * utils.c (internal_vwarning): New function.
6037 2014-08-28 Gary Benson <gbenson@redhat.com>
6039 * utils.h (fatal): Remove declaration.
6040 * utils.c (fatal): Remove function.
6042 2014-08-28 Gary Benson <gbenson@redhat.com>
6044 * tracepoint.c (gdb_agent_init): Replace fatal with
6046 (initialize_tracepoint): Likewise.
6048 2014-08-28 Gary Benson <gbenson@redhat.com>
6050 * remote-utils.c (remote_prepare): Replace fatal with error.
6052 2014-08-28 Gary Benson <gbenson@redhat.com>
6054 * linux-low.c (linux_async): Replace fatal with warning.
6056 (linux_start_non_stop): Return -1 if linux_async failed.
6058 2014-08-28 Gary Benson <gbenson@redhat.com>
6060 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6062 (i386_dr_low_get_addr): Remove vague comment.
6063 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6066 2014-08-28 Gary Benson <gbenson@redhat.com>
6068 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6069 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6071 (linux_resume_one_lwp): Likewise.
6072 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6074 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6075 with internal_error.
6076 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6077 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6078 (find_register_by_name): Replace fatal with internal_error.
6079 (find_regno): Likewise.
6080 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6081 * thread-db.c (thread_db_create_event): Likewise.
6082 (thread_db_load_search): Likewise.
6083 (try_thread_db_load_1): Likewise.
6084 * tracepoint.c (get_jump_space_head): Replace fatal with
6086 (claim_trampoline_space): Likewise.
6087 (have_fast_tracepoint_trampoline_buffer): Likewise.
6088 (cmd_qtstart): Likewise.
6089 (stop_tracing): Likewise.
6090 (fast_tracepoint_collecting): Likewise.
6091 (target_malloc): Likewise.
6092 (download_tracepoint): Likewise.
6093 (download_trace_state_variables): Replace check with gdb_assert.
6094 (upload_fast_traceframes): Replace fatal with internal_error.
6096 2014-08-19 Tom Tromey <tromey@redhat.com>
6097 Gary Benson <gbenson@redhat.com>
6099 * Makefile.in (SFILES): Add common/common-debug.c.
6100 (OBS): Add common-debug.o.
6101 (common-debug.o): New rule.
6102 * debug.h (debug_printf): Don't declare.
6103 * debug.c (debug_printf): Renamed and rewritten as...
6104 (debug_vprintf): New function.
6106 2014-08-19 Gary Benson <gbenson@redhat.com>
6108 * utils.h: Do not include print-utils.h.
6110 2014-08-19 Tom Tromey <tromey@redhat.com>
6111 Gary Benson <gbenson@redhat.com>
6113 * server.h: Add static assertion.
6114 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6116 2014-08-19 Tom Tromey <tromey@redhat.com>
6117 Gary Benson <gbenson@redhat.com>
6119 * Makefile.in (SFILES): Add common/errors.c.
6120 (OBS): Add errors.o.
6121 (IPA_OBS): Add errors-ipa.o.
6122 (errors.o): New rule.
6123 (errors-ipa.o): Likewise.
6124 * utils.h (perror_with_name, error, warning): Don't declare.
6125 * utils.c (warning): Renamed and rewritten as...
6126 (vwarning): New function.
6127 (error): Renamed and rewritten as...
6128 (verror): New function.
6129 (internal_error): Renamed and rewritten as...
6130 (internal_verror): New function.
6132 2014-08-07 Gary Benson <gbenson@redhat.com>
6134 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6135 * configure: Regenerate.
6136 * config.in: Likewise.
6137 * server.h: Do not include errno.h.
6138 * event-loop.c: Likewise.
6139 * hostio-errno.c: Likewise.
6140 * linux-low.c: Likewise.
6141 * remote-utils.c: Likewise.
6142 * spu-low.c: Likewise.
6143 * utils.c: Likewise.
6144 * gdbreplay.c: Unconditionally include errno.h.
6146 2014-08-07 Gary Benson <gbenson@redhat.com>
6148 * server.h: Do not include string.h.
6149 * event-loop.c: Likewise.
6150 * linux-low.c: Likewise.
6151 * regcache.c: Likewise.
6152 * remote-utils.c: Likewise.
6153 * spu-low.c: Likewise.
6154 * utils.c: Likewise.
6156 2014-08-07 Gary Benson <gbenson@redhat.com>
6158 * server.h: Do not include gdb_assert.h.
6160 2014-08-07 Gary Benson <gbenson@redhat.com>
6162 * server.h: Do not include common-utils.h.
6164 2014-08-07 Gary Benson <gbenson@redhat.com>
6166 * server.h: Do not include ptid.h.
6167 * notif.h: Likewise.
6169 2014-08-07 Gary Benson <gbenson@redhat.com>
6171 * server.h: Do not include gdb_locale.h.
6173 2014-08-07 Gary Benson <gbenson@redhat.com>
6175 * server.h: Do not include gdb/signals.h.
6176 * win32-low.c: Likewise.
6178 2014-08-07 Gary Benson <gbenson@redhat.com>
6180 * server.h: Do not include pathmax.h.
6182 2014-08-07 Gary Benson <gbenson@redhat.com>
6184 * server.h: Do not include libiberty.h.
6185 * linux-bfin-low.c: Likewise.
6187 2014-08-07 Gary Benson <gbenson@redhat.com>
6189 * server.h: Do not include ansidecl.h.
6191 2014-08-07 Gary Benson <gbenson@redhat.com>
6193 * linux-x86-low.c: Do not include stddef.h.
6194 * lynx-ppc-low.c: Likewise.
6195 * tracepoint.c: Likewise.
6197 2014-08-07 Gary Benson <gbenson@redhat.com>
6199 * server.h: Do not include stdarg.h.
6200 * nto-low.c: Likewise.
6202 2014-08-07 Gary Benson <gbenson@redhat.com>
6204 * server.h: Do not include stdlib.h.
6205 * inferiors.c: Likewise.
6206 * linux-low.c: Likewise.
6207 * regcache.c: Likewise.
6208 * spu-low.c: Likewise.
6209 * tracepoint.c: Likewise.
6210 * utils.c: Likewise.
6212 2014-08-07 Gary Benson <gbenson@redhat.com>
6214 * server.h: Do not include stdio.h.
6215 * linux-low.c: Likewise.
6216 * remote-utils.c: Likewise.
6217 * spu-low.c: Likewise.
6218 * utils.c: Likewise.
6219 * wincecompat.c: Likewise.
6221 2014-08-06 Gary Benson <gbenson@redhat.com>
6223 * regcache.c (init_register_cache): Move conditionals inside if.
6225 2014-08-06 Gary Benson <gbenson@redhat.com>
6227 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6229 2014-07-31 Gary Benson <gbenson@redhat.com>
6231 * ax.h: Do not include server.h.
6232 * gdbthread.h: Likewise.
6233 * lynx-low.h: Likewise.
6234 * notif.h: Likewise.
6236 2014-07-30 Gary Benson <gbenson@redhat.com>
6238 * server.h: Include common-defs.h.
6239 Do not include config.h or build-gnulib-gdbserver/config.h.
6241 2014-07-30 Gary Benson <gbenson@redhat.com>
6243 * hostio-errno.c: Move server.h to top of includes list.
6244 * inferiors.c: Likewise.
6245 * linux-x86-low.c: Likewise.
6246 * notif.c: Include server.h.
6248 2014-07-24 Tom Tromey <tromey@redhat.com>
6249 Gary Benson <gbenson@redhat.com>
6251 * server.h (CORE_ADDR): Now unsigned.
6253 2014-07-16 Pedro Alves <palves@redhat.com>
6255 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6257 2014-07-15 Pedro Alves <palves@redhat.com>
6259 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6262 2014-07-11 Pedro Alves <palves@redhat.com>
6264 * linux-low.c (kill_wait_lwp): New function, based on
6265 kill_one_lwp_callback, but use my_waitpid directly.
6266 (kill_one_lwp_callback, linux_kill): Use it.
6268 2014-06-23 Pedro Alves <palves@redhat.com>
6270 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6271 before setting DR0..DR3.
6273 2014-06-20 Gary Benson <gbenson@redhat.com>
6275 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6276 * configure: Regenerated.
6277 * config.in: Likewise.
6279 2014-06-20 Gary Benson <gbenson@redhat.com>
6281 * Makefile.in (SFILES): Update locations for files moved
6283 (object file files): Reordered.
6285 2014-06-20 Gary Benson <gbenson@redhat.com>
6287 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6288 (i386_dr_low_set_addr): Likewise.
6289 (i386_dr_low_get_addr): Likewise.
6290 (i386_dr_low_can_set_control): Likewise.
6291 (i386_dr_low_set_control): Likewise.
6292 (i386_dr_low_get_control): Likewise.
6293 (i386_dr_low_get_status): Likewise.
6294 (i386_get_debug_register_length): Likewise.
6295 * linux-x86-low.c (i386_dr_low_set_addr):
6296 Changed signature. Made static.
6297 (i386_dr_low_get_addr): Likewise.
6298 (i386_dr_low_set_control): Likewise.
6299 (i386_dr_low_get_control): Likewise.
6300 (i386_dr_low_get_status): Likewise.
6301 (i386_dr_low): New global variable.
6302 * win32-i386-low.c (i386_dr_low_set_addr):
6303 Changed signature. Made static.
6304 (i386_dr_low_get_addr): Likewise.
6305 (i386_dr_low_set_control): Likewise.
6306 (i386_dr_low_get_control): Likewise.
6307 (i386_dr_low_get_status): Likewise.
6308 (i386_dr_low): New global variable.
6310 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6312 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6313 * Makefile.in (AR, AR_FLAGS): Define.
6314 * configure: Regenerate.
6316 2014-06-19 Gary Benson <gbenson@redhat.com>
6318 * Makefile.in (i386-dregs.o): New rule.
6319 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6320 * i386-low.c (target.h): Remove include.
6321 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6322 (DR_CONTROL_SHIFT): Likewise.
6323 (DR_CONTROL_SIZE): Likewise.
6324 (DR_RW_EXECUTE): Likewise.
6325 (DR_RW_WRITE): Likewise.
6326 (DR_RW_READ): Likewise.
6327 (DR_RW_IORW): Likewise.
6328 (DR_LEN_1): Likewise.
6329 (DR_LEN_2): Likewise.
6330 (DR_LEN_4): Likewise.
6331 (DR_LEN_8): Likewise.
6332 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6333 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6334 (DR_ENABLE_SIZE): Likewise.
6335 (DR_LOCAL_SLOWDOWN): Likewise.
6336 (DR_GLOBAL_SLOWDOWN): Likewise.
6337 (DR_CONTROL_RESERVED): Likewise.
6338 (I386_DR_CONTROL_MASK): Likewise.
6339 (I386_DR_VACANT): Likewise.
6340 (I386_DR_LOCAL_ENABLE): Likewise.
6341 (I386_DR_GLOBAL_ENABLE): Likewise.
6342 (I386_DR_DISABLE): Likewise.
6343 (I386_DR_SET_RW_LEN): Likewise.
6344 (I386_DR_GET_RW_LEN): Likewise.
6345 (I386_DR_WATCH_HIT): Likewise.
6346 (i386_wp_op_t): Likewise.
6347 (i386_show_dr): Likewise.
6348 (i386_length_and_rw_bits): Likewise.
6349 (i386_insert_aligned_watchpoint): Likewise.
6350 (i386_remove_aligned_watchpoint): Likewise.
6351 (i386_handle_nonaligned_watchpoint): Likewise.
6352 i386_update_inferior_debug_regs(): Likewise.
6353 (i386_dr_insert_watchpoint): Likewise.
6354 (i386_dr_remove_watchpoint): Likewise.
6355 (i386_dr_region_ok_for_watchpoint): Likewise.
6356 (i386_dr_stopped_data_address): Likewise.
6357 (i386_dr_stopped_by_watchpoint): Likewise.
6359 2014-06-19 Gary Benson <gbenson@redhat.com>
6361 * i386-low.c (i386_dr_show): Renamed to
6362 i386_show_dr and made static. All uses updated.
6363 (i386_dr_length_and_rw_bits): Renamed to
6364 i386_length_and_rw_bits and made static.
6366 (i386_dr_insert_aligned_watchpoint): Renamed to
6367 i386_insert_aligned_watchpoint and made static.
6369 (i386_dr_remove_aligned_watchpoint): Renamed to
6370 i386_remove_aligned_watchpoint and made static.
6372 (i386_dr_update_inferior_debug_regs): Renamed to
6373 i386_update_inferior_debug_regs and made static.
6376 2014-06-18 Gary Benson <gbenson@redhat.com>
6378 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6379 (i386_dr_low_can_set_control): Likewise.
6380 (i386_get_debug_register_length): Likewise.
6381 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6382 (i386_dr_low_can_set_control): Likewise.
6383 (i386_get_debug_register_length): Likewise.
6385 2014-06-17 Gary Benson <gbenson@redhat.com>
6387 * i386-low.h (i386-dregs.h): New include.
6388 (DR_FIRSTADDR): Now in i386-dregs.h.
6389 (DR_LASTADDR): Likewise.
6390 (DR_NADDR): Likewise.
6391 (DR_STATUS): Likewise.
6392 (DR_CONTROL): Likewise.
6393 (i386_debug_reg_state): Likewise.
6394 (i386_dr_insert_watchpoint): Likewise.
6395 (i386_dr_remove_watchpoint): Likewise.
6396 (i386_dr_region_ok_for_watchpoint): Likewise.
6397 (i386_dr_stopped_data_address): Likewise.
6398 (i386_dr_stopped_by_watchpoint): Likewise.
6399 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6401 2014-06-18 Gary Benson <gbenson@redhat.com>
6403 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6404 i386_dr_insert_watchpoint.
6405 (i386_low_remove_watchpoint): Renamed to
6406 i386_dr_remove_watchpoint.
6407 (i386_low_region_ok_for_watchpoint): Renamed to
6408 i386_dr_region_ok_for_watchpoint.
6409 (i386_low_stopped_data_address): Renamed to
6410 i386_dr_stopped_data_address.
6411 (i386_low_stopped_by_watchpoint): Renamed to
6412 i386_dr_stopped_by_watchpoint.
6413 * i386-low.c (i386_show_dr): Renamed to
6414 i386_dr_show and made nonstatic. All uses updated.
6415 (i386_length_and_rw_bits): Renamed to
6416 i386_dr_length_and_rw_bits and made nonstatic.
6418 (i386_insert_aligned_watchpoint): Renamed to
6419 i386_dr_insert_aligned_watchpoint and made nonstatic.
6421 (i386_remove_aligned_watchpoint): Renamed to
6422 i386_dr_remove_aligned_watchpoint and made nonstatic.
6424 (i386_update_inferior_debug_regs): Renamed to
6425 i386_dr_update_inferior_debug_regs and made nonstatic.
6427 (i386_low_insert_watchpoint): Renamed to
6428 i386_dr_insert_watchpoint. All uses updated.
6429 (i386_low_remove_watchpoint): Renamed to
6430 i386_dr_remove_watchpoint. All uses updated.
6431 (i386_low_region_ok_for_watchpoint): Renamed to
6432 i386_dr_region_ok_for_watchpoint. All uses updated.
6433 (i386_low_stopped_data_address): Renamed to
6434 i386_dr_stopped_data_address. All uses updated.
6435 (i386_low_stopped_by_watchpoint): Renamed to
6436 i386_dr_stopped_by_watchpoint. All uses updated.
6438 2014-06-18 Gary Benson <gbenson@redhat.com>
6440 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6441 (i386_dr_low_can_set_control): Likewise.
6442 (i386_insert_aligned_watchpoint): New check.
6444 2014-06-18 Gary Benson <gbenson@redhat.com>
6446 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6449 2014-06-18 Gary Benson <gbenson@redhat.com>
6451 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6452 instead of fatal and error.
6453 (i386_handle_nonaligned_watchpoint): Likewise.
6455 2014-06-18 Gary Benson <gbenson@redhat.com>
6457 * i386-low.c (i386_get_debug_register_length): New macro.
6458 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6459 (i386_show_dr): Use debug_printf instead of fprintf. Use
6460 phex to format values.
6462 2014-06-18 Gary Benson <gbenson@redhat.com>
6464 * i386-low.h: Comment changes.
6465 * i386-low.c: Likewise.
6467 2014-06-18 Gary Benson <gbenson@redhat.com>
6469 * i386-low.c: Whitespace changes.
6471 2014-06-12 Tom Tromey <tromey@redhat.com>
6473 * utils.c (freeargv): Remove.
6475 2014-06-12 Tom Tromey <tromey@redhat.com>
6477 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6478 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6479 (parse_debug_format_options): Likewise.
6480 (gdbserver_usage): Likewise.
6481 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6482 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6483 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6485 ($(LIBGNU)): Depend on libiberty.
6486 (all-lib): Recurse into all subdirs.
6487 (install-only): Invoke "install" target in subdirs.
6488 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6490 * configure: Rebuild.
6491 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6492 for vasprintf, vsnprintf, or gettimeofday.
6493 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6496 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6498 * development.sh: Delete.
6499 * Makefile.in (config.status): Adjust dependency on development.sh.
6500 * configure.ac: Adjust development.sh source call.
6501 * configure: Regenerate.
6503 2014-06-02 Pedro Alves <palves@redhat.com>
6505 * ax.c (gdb_free_agent_expr): New function.
6506 * ax.h (gdb_free_agent_expr): New declaration.
6507 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6509 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6511 (clear_breakpoint_conditions_and_commands): New function.
6512 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6513 (clear_breakpoint_conditions_and_commands): New declaration.
6515 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6517 * linux-aarch64-low.c (asm/ptrace.h): Include.
6519 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6521 Fix TLS access for -static -pthread.
6522 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6523 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6524 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6526 2014-05-20 Pedro Alves <palves@redhat.com>
6528 * linux-aarch64-low.c (aarch64_insert_point)
6529 (aarch64_remove_point): No longer check whether the type is
6530 supported here. Adjust to new interface.
6531 (the_low_target): Install aarch64_supports_z_point_type as
6532 supports_z_point_type method.
6533 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6534 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6535 instead of a Z packet char. Adjust.
6536 (arm_supports_z_point_type): New function.
6537 (arm_insert_point, arm_remove_point): Adjust to new interface.
6538 (the_low_target): Install arm_supports_z_point_type.
6539 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6540 (cris_insert_point, cris_remove_point): Adjust to new interface.
6541 Don't check whether the type is supported here.
6542 (the_low_target): Install cris_supports_z_point_type.
6543 * linux-low.c (linux_supports_z_point_type): New function.
6544 (linux_insert_point, linux_remove_point): Adjust to new interface.
6545 * linux-low.h (struct linux_target_ops) <insert_point,
6546 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6547 raw_breakpoint pointer parameter.
6548 <supports_z_point_type>: New method.
6549 * linux-mips-low.c (mips_supports_z_point_type): New function.
6550 (mips_insert_point, mips_remove_point): Adjust to new interface.
6551 Use mips_supports_z_point_type.
6552 (the_low_target): Install mips_supports_z_point_type.
6553 * linux-ppc-low.c (the_low_target): Install NULL as
6554 supports_z_point_type method.
6555 * linux-s390-low.c (the_low_target): Install NULL as
6556 supports_z_point_type method.
6557 * linux-sparc-low.c (the_low_target): Install NULL as
6558 supports_z_point_type method.
6559 * linux-x86-low.c (x86_supports_z_point_type): New function.
6560 (x86_insert_point): Adjust to new insert_point interface. Use
6561 insert_memory_breakpoint. Adjust to new
6562 i386_low_insert_watchpoint interface.
6563 (x86_remove_point): Adjust to remove_point interface. Use
6564 remove_memory_breakpoint. Adjust to new
6565 i386_low_remove_watchpoint interface.
6566 (the_low_target): Install x86_supports_z_point_type.
6567 * lynx-low.c (lynx_target_ops): Install NULL as
6568 supports_z_point_type callback.
6569 * nto-low.c (nto_supports_z_point_type): New.
6570 (nto_insert_point, nto_remove_point): Adjust to new interface.
6571 (nto_target_ops): Install nto_supports_z_point_type.
6572 * mem-break.c: Adjust intro comment.
6573 (struct raw_breakpoint) <raw_type, size>: New fields.
6574 <inserted>: Update comment.
6575 <shlib_disabled>: Delete field.
6576 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6577 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6578 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6579 (raw_bkpt_type_to_target_hw_bp_type): New function.
6580 (find_enabled_raw_code_breakpoint_at): New function.
6581 (find_raw_breakpoint_at): New type and size parameters. Use them.
6582 (insert_memory_breakpoint): New function, based off
6583 set_raw_breakpoint_at.
6584 (remove_memory_breakpoint): New function.
6585 (set_raw_breakpoint_at): Reimplement.
6586 (set_breakpoint): New, based on set_breakpoint_at.
6587 (set_breakpoint_at): Reimplement.
6588 (delete_raw_breakpoint): Go through the_target->remove_point
6589 instead of assuming memory breakpoints.
6590 (find_gdb_breakpoint_at): Delete.
6591 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6592 (find_gdb_breakpoint): New function.
6593 (set_gdb_breakpoint_at): Delete.
6594 (z_type_supported): New function.
6595 (set_gdb_breakpoint_1): New function, loosely based off
6596 set_gdb_breakpoint_at.
6597 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6598 (delete_gdb_breakpoint_at): Delete.
6599 (delete_gdb_breakpoint_1): New function, loosely based off
6600 delete_gdb_breakpoint_at.
6601 (delete_gdb_breakpoint): New function.
6602 (clear_gdb_breakpoint_conditions): Rename to ...
6603 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6605 (add_condition_to_breakpoint): Make static.
6606 (add_breakpoint_condition): Take a struct breakpoint pointer
6607 instead of an address. Adjust.
6608 (gdb_condition_true_at_breakpoint): Rename to ...
6609 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6611 (gdb_condition_true_at_breakpoint): Reimplement.
6612 (add_breakpoint_commands): Take a struct breakpoint pointer
6613 instead of an address. Adjust.
6614 (gdb_no_commands_at_breakpoint): Rename to ...
6615 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6616 parameter. Return true if no breakpoint was found. Change debug
6618 (gdb_no_commands_at_breakpoint): Reimplement.
6619 (run_breakpoint_commands): Rename to ...
6620 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6621 and change return type to boolean.
6622 (run_breakpoint_commands): New function.
6623 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6624 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6625 breakpoint. Go through the_target->remove_point instead of
6626 assuming memory breakpoint.
6627 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6628 software and hardware breakpoints.
6629 (reinsert_raw_breakpoint): Go through the_target->insert_point
6630 instead of assuming memory breakpoint.
6631 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6632 software and hardware breakpoints.
6633 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6634 Check both software and hardware breakpoints.
6635 (validate_inserted_breakpoint): Assert the breakpoint is a
6636 software breakpoint. Set the inserted flag to -1 instead of
6637 setting shlib_disabled.
6638 (delete_disabled_breakpoints): Adjust.
6639 (validate_breakpoints): Only validate software breakpoints.
6640 Adjust to inserted flag change.
6641 (check_mem_read, check_mem_write): Skip breakpoint types other
6642 than software breakpoints. Adjust to inserted flag change.
6643 * mem-break.h (enum raw_bkpt_type): New enum.
6644 (raw_breakpoint, struct process_info): Forward declare.
6645 (Z_packet_to_target_hw_bp_type): Delete declaration.
6646 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6647 (set_gdb_breakpoint, delete_gdb_breakpoint)
6648 (clear_breakpoint_conditions): New declarations.
6649 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6650 (breakpoint_inserted_here): Update comment.
6651 (add_breakpoint_condition, add_breakpoint_commands): Replace
6652 address parameter with a breakpoint pointer parameter.
6653 (gdb_breakpoint_here): Update comment.
6654 (delete_gdb_breakpoint_at): Delete.
6655 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6656 * server.c (process_point_options): Take a struct breakpoint
6657 pointer instead of an address. Adjust.
6658 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6659 delete_gdb_breakpoint.
6660 * spu-low.c (spu_target_ops): Install NULL as
6661 supports_z_point_type method.
6662 * target.h: Include mem-break.h.
6663 (struct target_ops) <prepare_to_access_memory>: Update comment.
6664 <supports_z_point_type>: New field.
6665 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6666 instead of a char. Also take a raw breakpoint pointer.
6667 * win32-arm-low.c (the_low_target): Install NULL as
6668 supports_z_point_type.
6669 * win32-i386-low.c (i386_supports_z_point_type): New function.
6670 (i386_insert_point, i386_remove_point): Adjust to new interface.
6671 (the_low_target): Install i386_supports_z_point_type.
6672 * win32-low.c (win32_supports_z_point_type): New function.
6673 (win32_insert_point, win32_remove_point): Adjust to new interface.
6674 (win32_target_ops): Install win32_supports_z_point_type.
6675 * win32-low.h (struct win32_target_ops):
6676 <supports_z_point_type>: New method.
6677 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6678 instead of a char. Also take a raw breakpoint pointer.
6680 2014-05-20 Pedro Alves <palves@redhat.com>
6682 * mem-break.h: Include break-common.h.
6683 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6684 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6685 (Z_packet_to_target_hw_bp_type): New declaration.
6686 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6687 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6688 (Z_PACKET_ACCESS_WP): Delete macros.
6689 (Z_packet_to_hw_type): Delete function.
6690 * i386-low.h: Don't include break-common.h here.
6691 (Z_packet_to_hw_type): Delete declaration.
6692 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6693 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6694 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6695 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6696 * linux-aarch64-low.c: Don't include break-common.h here.
6697 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6698 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6699 (Z_packet_to_target_hw_bp_type): Delete function.
6700 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6702 (mips_insert_point, mips_remove_point): Use
6703 Z_packet_to_target_hw_bp_type.
6705 2014-05-20 Pedro Alves <palves@redhat.com>
6707 * linux-aarch64-low.c: Include break-common.h.
6708 (enum target_point_type): Delete.
6709 (Z_packet_to_point_type): Rename to ...
6710 (Z_packet_to_target_hw_bp_type): ... this, and return a
6711 target_hw_bp_type instead.
6712 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6713 instead of an enum target_point_type.
6714 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6716 (aarch64_dr_state_insert_one_point)
6717 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6718 (aarch64_handle_aligned_watchpoint)
6719 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6720 Take an enum target_hw_bp_type instead of an enum
6722 (aarch64_supports_z_point_type): New function.
6723 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6724 use Z_packet_to_target_hw_bp_type.
6726 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6728 * configure.ac: Only use -Werror by default when DEVELOPMENT
6730 * configure: Regenerate.
6732 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6734 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6735 * linux-x86-low.c (X86_64_USER_REGS): New.
6736 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6738 2014-04-28 Yao Qi <yao@codesourcery.com>
6740 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6743 2014-04-25 Pedro Alves <palves@redhat.com>
6746 * linux-low.c (linux_attach_fail_reason_string): New function.
6747 (linux_attach_lwp): Delete.
6748 (linux_attach_lwp_1): Rename to ...
6749 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6750 argument. Remove "initial" parameter. Return int instead of
6751 void. Don't error or warn here.
6752 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6753 failure to attach to the tgid. Call warning when failing to
6755 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6756 argument. Remove "initial" parameter. Return int instead of
6757 void. Don't error or warn here.
6758 (linux_attach_fail_reason_string): New declaration.
6759 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6760 interface change. Use linux_attach_fail_reason_string.
6762 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6763 Walfred Tedeschi <walfred.tedeschi@intel.com>
6765 * Makefile.in: Added rules to handle new files
6766 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6767 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6768 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6769 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6770 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6771 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6773 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6774 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6775 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6776 i386/x32-avx512.xml.
6777 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6778 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6779 i386/x32-avx512-linux.xml.
6780 * i387-fp.c (num_avx512_k_registers): New constant for number
6782 (num_avx512_zmmh_low_registers): New constant for number of
6783 lower ZMM registers (0-15).
6784 (num_avx512_zmmh_high_registers): New constant for number of
6785 higher ZMM registers (16-31).
6786 (num_avx512_ymmh_registers): New contant for number of higher
6787 YMM registers (ymm16-31 added by avx521 on x86_64).
6788 (num_avx512_xmm_registers): New constant for number of higher
6789 XMM registers (xmm16-31 added by AVX512 on x86_64).
6790 (struct i387_xsave): Add space for AVX512 registers.
6791 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6792 Add code to handle AVX512 registers.
6793 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6794 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6795 prototypei from generated file.
6796 (tdesc_amd64_avx512_linux): Likewise.
6797 (init_registers_x32_avx512_linux): Likewise.
6798 (tdesc_x32_avx512_linux): Likewise.
6799 (init_registers_i386_avx512_linux): Likewise.
6800 (tdesc_i386_avx512_linux): Likewise.
6801 (x86_64_regmap): Add AVX512 registers.
6802 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6804 (initialize_low_arch): Add code to initialize AVX512 registers.
6806 2014-04-23 Pedro Alves <palves@redhat.com>
6808 * mem-break.c (find_gdb_breakpoint_at): Make static.
6809 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6811 2014-04-23 Pedro Alves <palves@redhat.com>
6813 * i386-low.c: Don't include break-common.h here.
6814 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6815 prototype to take target_hw_bp_type as argument instead of a Z
6817 * i386-low.h: Include break-common.h here.
6818 (Z_packet_to_hw_type): Declare.
6819 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6821 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6822 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6823 (x86_remove_point): Convert the packet number to a
6824 target_hw_bp_type before calling i386_low_remove_watchpoint.
6825 * win32-i386-low.c (i386_insert_point): Convert the packet number
6826 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6827 (i386_remove_point): Convert the packet number to a
6828 target_hw_bp_type before calling i386_low_remove_watchpoint.
6830 2014-04-23 Pedro Alves <palves@redhat.com>
6832 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6834 2014-04-10 Pedro Alves <palves@redhat.com>
6836 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6837 Check if the condition or command is NULL before checking if the
6838 breakpoint is known. On success, return true.
6839 * mem-break.h (add_breakpoint_condition): Document return.
6840 (add_breakpoint_commands): Add describing comment.
6841 * server.c (skip_to_semicolon): New function.
6842 (process_point_options): Use it.
6844 2014-04-09 Pedro Alves <palves@redhat.com>
6846 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6849 2014-02-27 Pedro Alves <palves@redhat.com>
6852 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6854 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6856 (last_thread_of_process_p): Take a PID argument instead of a
6858 (linux_wait_for_lwp): Delete.
6859 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6861 (linux_low_filter_event): New function, party factored out from
6862 linux_wait_for_event.
6863 (linux_wait_for_event): Rename to ...
6864 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6865 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6866 sigsuspend. Check for zombie leaders.
6867 (linux_wait_for_event): Reimplement as wrapper around
6868 linux_wait_for_event_filtered.
6869 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6870 a normal or signal exit is seen, it's the whole process exiting.
6871 (wait_for_sigstop): No longer a for_each_inferior callback.
6872 Rewrite on top of linux_wait_for_event_filtered.
6873 (stop_all_lwps): Call wait_for_sigstop directly.
6874 * server.c (resume, handle_target_event): Handle
6875 TARGET_WAITKIND_NO_RESUMED.
6877 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6879 * win32-low.c (psapi_get_dll_name,
6880 * win32_CreateToolhelp32Snapshot): Delete.
6881 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6882 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6884 (handle_load_dll): Add function description.
6885 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6887 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6889 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6891 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6892 base address when calling win32_add_one_solib.
6893 (handle_load_dll): Delete local variable load_addr.
6894 Remove 0x1000 offset applied to DLL base address when calling
6895 win32_add_one_solib.
6896 (handle_unload_dll): Add comment.
6898 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6900 * win32-low.c (win32_add_all_dlls): Renames
6901 win32_ensure_ntdll_loaded. Rewrite function documentation.
6902 Adjust implementation to always load all DLLs.
6903 Add 0x1000 offset to DLL base address when calling
6904 win32_add_one_solib.
6905 (child_initialization_done): New static global.
6906 (do_initial_child_stuff): Set child_initialization_done to
6907 zero during child initialization, and 1 after. Replace call
6908 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6910 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6911 (handle_unload_dll): Add function documentation.
6912 (get_child_debug_event): Ignore load and unload DLL events
6913 during child initialization.
6915 2014-02-20 Doug Evans <dje@google.com>
6917 Remove global all_lwps.
6918 * inferiors.h (ptid_of): Move here from linux-low.h.
6919 (pid_of, lwpid_of): Ditto.
6920 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6921 parameter is a struct thread_info * now.
6922 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6923 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6924 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6926 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6927 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6928 * linux-arm-low.c (update_registers_callback): Update, "entry"
6929 parameter is a struct thread_info * now.
6930 Fetch lwpid from current_inferior directly.
6931 (arm_insert_point): Pass &all_threads to find_inferior instead of
6933 (arm_remove_point): Ditto.
6934 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6935 (arm_prepare_to_resume): Fetch pid from thread.
6936 (arm_read_description): Fetch lwpid from current_inferior directly.
6937 * linux-low.c (all_lwps): Delete.
6938 (delete_lwp): Delete call to remove_inferior.
6939 (handle_extended_wait): Fetch lwpid from thread.
6940 (add_lwp): Don't set lwp->entry.id. Remove call to
6941 add_inferior_to_list.
6942 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6943 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6944 (kill_one_lwp_callback): Ditto.
6945 (linux_kill): Don't dereference NULL pointer.
6946 Fetch ptid,lwpid from thread.
6947 (get_detach_signal): Fetch ptid from thread.
6948 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6949 Simplify call to regcache_invalidate_thread.
6950 (delete_lwp_callback): Update, "entry" parameter is a
6951 struct thread_info * now. Fetch pid from thread.
6952 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6953 (status_pending_p_callback): Update, "entry" parameter is a
6954 struct thread_info * now. Fetch ptid from thread.
6955 (find_lwp_pid): Update, "entry" parameter is a
6956 struct thread_info * now.
6957 (linux_wait_for_lwp): Fetch pid from thread.
6958 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6959 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6960 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6961 (dequeue_one_deferred_signal): Ditto.
6962 (cancel_breakpoint): Fetch ptid from current_inferior.
6963 (linux_wait_for_event): Pass &all_threads to find_inferior,
6964 not &all_lwps. Fetch ptid, lwpid from thread.
6965 (count_events_callback): Update, "entry" parameter is a
6966 struct thread_info * now.
6967 (select_singlestep_lwp_callback): Ditto.
6968 (select_event_lwp_callback): Ditto.
6969 (cancel_breakpoints_callback): Ditto.
6970 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6972 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6973 (unsuspend_one_lwp): Update, "entry" parameter is a
6974 struct thread_info * now.
6975 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6977 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6978 Fetch lwpid from thread, not lwp.
6979 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6980 Pass &all_threads to find_inferior, not &all_lwps.
6981 (send_sigstop): Fetch lwpid from thread, not lwp.
6982 (send_sigstop_callback): Update, "entry" parameter is a
6983 struct thread_info * now.
6984 (suspend_and_send_sigstop_callback): Ditto.
6985 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6986 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6987 struct thread_info * now.
6988 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6990 (lwp_running): Update, "entry" parameter is a
6991 struct thread_info * now.
6992 (stop_all_lwps): Fetch ptid from thread.
6993 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6994 (linux_resume_one_lwp): Fetch lwpid from thread.
6995 (linux_set_resume_request): Update, "entry" parameter is a
6996 struct thread_info * now. Fetch pid, lwpid from thread.
6997 (resume_status_pending_p): Update, "entry" parameter is a
6998 struct thread_info * now.
6999 (need_step_over_p): Ditto. Fetch lwpid from thread.
7000 (start_step_over): Fetch lwpid from thread.
7001 (linux_resume_one_thread): Update, "entry" parameter is a
7002 struct thread_info * now. Fetch lwpid from thread.
7003 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7004 (proceed_one_lwp): Update, "entry" parameter is a
7005 struct thread_info * now. Fetch lwpid from thread.
7006 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7007 struct thread_info * now.
7008 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7009 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7010 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7012 (regsets_store_inferior_registers): Ditto.
7013 (fetch_register, store_register): Ditto.
7014 (linux_read_memory, linux_write_memory): Ditto.
7015 (linux_request_interrupt): Ditto.
7016 (linux_read_auxv): Ditto.
7017 (linux_xfer_siginfo): Ditto.
7018 (linux_qxfer_spu): Ditto.
7019 (linux_qxfer_libraries_svr4): Ditto.
7020 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7021 moved to inferiors.h.
7023 (get_thread_lwp): Update.
7024 (struct lwp_info): Delete member "entry". Simplify comment for
7027 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7028 current_inferior directly.
7029 (update_watch_registers_callback): Update, "entry" parameter is a
7030 struct thread_info * now. Fetch pid from thread.
7031 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7032 (mips_insert_point): Fetch lwpid from current_inferior.
7033 Pass &all_threads to find_inferior, not &all_lwps.
7034 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7035 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7037 (mips_stopped_data_address): Ditto.
7038 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7040 * linux-tile-low.c (tile_arch_setup): Ditto.
7041 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7042 (update_debug_registers_callback): Update, "entry" parameter is a
7043 struct thread_info * now. Fetch pid from thread.
7044 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7045 Pass &all_threads to find_inferior, not &all_lwps.
7046 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7047 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7048 Pass &all_threads to find_inferior, not &all_lwps.
7049 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7050 (i386_dr_low_get_status): Ditto.
7051 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7052 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7053 (x86_linux_read_description): Ditto.
7054 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7056 2014-02-20 Doug Evans <dje@google.com>
7058 * inferiors.c (get_first_inferior): Fix buglet.
7060 2014-02-19 Doug Evans <dje@google.com>
7062 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7063 * inferiors.c (add_thread): Change result type to struct thread_info *.
7064 All callers updated.
7065 (add_lwp): Call add_thread here instead of in callers.
7066 All callers updated.
7067 * linux-low.h (get_lwp_thread): Rewrite.
7068 (struct lwp_info): New member "thread".
7070 2014-02-19 Doug Evans <dje@google.com>
7072 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7073 All callers updated.
7075 2014-02-19 Doug Evans <dje@google.com>
7077 * inferiors.c (add_thread): Fix whitespace.
7079 2014-02-19 Doug Evans <dje@google.com>
7081 * dll.c (clear_dlls): Replace accessing list implemention details
7083 * gdbthread.h (get_first_thread): Declare.
7084 * inferiors.c (for_each_inferior_with_data): New function.
7085 (get_first_thread): New function.
7086 (find_thread_ptid): Simplify.
7087 (get_first_inferior): New function.
7088 (clear_list): Delete.
7089 (one_inferior_p): New function.
7090 (clear_inferior_list): New function.
7091 (clear_inferiors): Update.
7092 * inferiors.h (for_each_inferior_with_data): Declare.
7093 (clear_inferior_list): Declare.
7094 (one_inferior_p): Declare.
7095 (get_first_inferior): Declare.
7096 * linux-low.c (linux_wait_for_event): Replace accessing list
7097 implemention details with API function.
7098 * server.c (target_running): Ditto.
7099 (accumulate_file_name_length): New function.
7100 (emit_dll_description): New function.
7101 (handle_qxfer_libraries): Replace accessing list implemention
7102 details with API function.
7103 (handle_qxfer_threads_worker): New function.
7104 (handle_qxfer_threads_proper): Replace accessing list implemention
7105 details with API function.
7106 (handle_query): Ditto.
7107 (visit_actioned_threads_callback_ftype): New typedef.
7108 (visit_actioned_threads_data): New struct.
7109 (visit_actioned_threads): Rewrite to be find_inferior callback.
7110 (resume): Call find_inferior.
7111 (handle_status): Replace accessing list implemention
7112 details with API function.
7113 (process_serial_event): Replace accessing list implemention details
7115 * target.c (set_desired_inferior): Replace accessing list implemention
7116 details with API function.
7117 * tracepoint.c (same_process_p): New function.
7118 (gdb_agent_about_to_close): Replace accessing list implemention
7119 details with API function.
7120 * win32-low.c (child_delete_thread): Replace accessing list
7121 implemention details with API function.
7122 (match_dll_by_basename): New function.
7123 (dll_is_loaded_by_basename): New function.
7124 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7125 details call to dll_is_loaded_by_basename.
7127 2014-02-19 Doug Evans <dje@google.com>
7129 * dll.h (struct dll_info): Add comment.
7130 * gdbthread.h (struct thread_info): Add comment.
7131 (current_ptid): Simplify.
7132 * inferiors.c (add_process): Update.
7133 (remove_process): Update.
7134 * inferiors.h (struct process_info): Rename member "head" to "entry".
7135 * linux-low.c (delete_lwp): Update.
7137 (last_thread_of_process_p): Update.
7138 (kill_one_lwp_callback, linux_kill): Update.
7139 (status_pending_p_callback): Update.
7140 (wait_for_sigstop): Update. Simplify read of ptid.
7141 (start_step_over): Update.
7142 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7143 (get_lwp_thread): Update.
7144 (struct lwp_info): Rename member "head" to "entry".
7145 * regcache.h (inferior_list_entry): Delete.
7146 * server.c (kill_inferior_callback): Update.
7147 (detach_or_kill_inferior_callback): Update.
7148 (print_started_pid): Update.
7149 (print_attached_pid): Update.
7150 (process_serial_event): Simplify read of ptid.
7151 * thread-db.c (thread_db_create_event): Update.
7152 (thread_db_get_tls_address): Update.
7153 * win32-low.c (current_inferior_ptid): Simplify.
7155 2014-02-19 Tom Tromey <tromey@redhat.com>
7157 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7159 (target_supports_btrace): Update.
7161 2014-02-14 Yao Qi <yao@codesourcery.com>
7163 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7164 (rsp-low-ipa.o): New target.
7166 2014-02-12 Tom Tromey <tromey@redhat.com>
7168 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7169 convert_ascii_to_int.
7170 * regcache.c (registers_to_string): Likewise.
7171 * remote-utils.c (decode_M_packet): Likewise.
7172 * server.c (process_serial_event): Likewise.
7174 2014-02-12 Tom Tromey <tromey@redhat.com>
7176 * server.c (handle_query, handle_v_run): Use hex2bin, not
7178 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7180 2014-02-12 Tom Tromey <tromey@redhat.com>
7182 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7183 convert_int_to_ascii.
7184 * regcache.c (registers_to_string, collect_register_as_string):
7186 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7188 * server.c (process_serial_event): Likewise.
7189 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7190 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7192 2014-02-12 Tom Tromey <tromey@redhat.com>
7194 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7195 bin2hex, not hexify.
7196 * tracepoint.c (cmd_qtstatus): Likewise.
7198 2014-02-12 Tom Tromey <tromey@redhat.com>
7200 * remote-utils.c (monitor_output): Pass explicit length to
7203 2014-02-12 Tom Tromey <tromey@redhat.com>
7205 * tracepoint.c: Include rsp-low.h.
7206 * server.c: Include rsp-low.h.
7207 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7208 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7210 * remote-utils.c: Include rsp-low.h.
7211 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7212 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7213 (convert_int_to_ascii, convert_ascii_to_int): Move to
7215 * regcache.c: Include rsp-low.h.
7216 * ax.c: Include rsp-low.h.
7217 * Makefile.in (SFILES): Add common/rsp-low.c.
7218 (OBS): Add rsp-low.o.
7219 (rsp-low.o): New target.
7221 2014-02-12 Tom Tromey <tromey@redhat.com>
7223 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7224 Include print-utils.h.
7225 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7226 (plongest, thirty_two, phex_nz): Remove.
7227 * Makefile.in (SFILES): Add common/print-utils.c.
7228 (OBS): Add print-utils.o.
7229 (print-utils-ipa.o): New target.
7230 (print-utils.o): New target.
7231 (IPA_OBJS): Add print-utils-ipa.o.
7233 2014-02-06 Tom Tromey <tromey@redhat.com>
7235 * Makefile.in (SFILES): Fix indentation.
7237 2014-02-05 Doug Evans <dje@google.com>
7239 * linux-low.c (linux_wait_for_event): Improve comment.
7240 (linux_wait_1): Keep current_inferior in sync with event_child.
7242 2014-01-22 Doug Evans <dje@google.com>
7244 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7246 2014-01-22 Doug Evans <dje@google.com>
7248 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7249 * configure: Regenerate.
7250 * config.in: Regenerate.
7251 * Makefile.in (SFILES): Add debug.c.
7253 * debug.c: New file.
7254 * debug.h: New file.
7255 * linux-aarch64-low.c (*): Update all debugging printfs to use
7256 debug_printf instead of fprintf.
7257 * linux-arm-low.c (*): Ditto.
7258 * linux-cris-low.c (*): Ditto.
7259 * linux-crisv32-low.c (*): Ditto.
7260 * linux-m32r-low.c (*): Ditto.
7261 * linux-sparc-low.c (*): Ditto.
7262 * linux-x86.c (*): Ditto.
7263 * linux-low.c (*): Ditto.
7264 (linux_wait_1): Add calls to debug_enter, debug_exit.
7265 (linux_wait): Remove redundant debugging printf.
7266 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7267 (linux_resume, unstop_all_lwps): Ditto.
7268 * mem-break.c (*): Update all debugging printfs to use
7269 debug_printf instead of fprintf.
7270 * remote-utils.c (*): Ditto.
7271 * thread-db.c (*): Ditto.
7272 * server.c #include <ctype.h>, "gdb_vecs.h".
7273 (debug_threads): Moved to debug.c.
7274 (*): Update all debugging printfs to use debug_printf instead of
7276 (start_inferior): Replace call to fflush with call to debug_flush.
7277 (monitor_show_help): Mention set debug-format.
7278 (parse_debug_format_options): New function.
7279 (handle_monitor_command): Handle "monitor set debug-format".
7280 (gdbserver_usage): Mention --debug-format.
7281 (main): Parse --debug-format.
7282 * server.h (debug_threads): Declaration moved to debug.h.
7284 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7285 trace_debug_1 that uses debug_printf.
7286 (tracepoint_look_up_symbols): Update all debugging printfs to use
7287 debug_printf instead of fprintf.
7289 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7291 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7294 2014-01-17 Pedro Alves <palves@redhat.com>
7297 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7298 defined after including gdb_proc_service.h.
7300 2014-01-16 Doug Evans <dje@google.com>
7302 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7303 (match_dll): Use it.
7305 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7307 * target.h (target_ops) <read_btrace>: Change parameters and
7308 return type to allow error reporting.
7309 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7310 trace reading errors on.
7311 * linux-low.c (linux_low_read_btrace): Pass trace reading
7313 (linux_low_disable_btrace): New.
7315 2014-01-15 Doug Evans <dje@google.com>
7317 * inferiors.c (thread_id_to_gdb_id): Delete.
7318 * inferiors.h (thread_id_to_gdb_id): Delete.
7320 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7322 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7323 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7326 2014-01-08 Pedro Alves <palves@redhat.com>
7328 * server.c (handle_status): Don't discard previous queued stop
7329 replies or thread's pending status here.
7330 (main) <disconnection>: Do it here instead.
7332 2014-01-08 Pedro Alves <palves@redhat.com>
7334 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7335 * server.c (visit_actioned_threads, handle_pending_status): New
7337 (handle_v_cont): Factor out parts to ...
7338 (resume): ... this new function. If in all-stop, and a thread
7339 being resumed has a pending status, report it without actually
7341 (myresume): Adjust to use the new 'resume' function.
7342 (clear_pending_status_callback, set_pending_status_callback)
7343 (find_status_pending_thread_callback): New functions.
7344 (handle_status): Handle the case of multiple threads having
7345 interesting statuses to report. Report threads' real last signal
7346 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7347 with an interesting thread to report the status for, instead of
7348 always reporting the status of the first thread.
7350 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7352 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7353 * gdbreplay.c (gdbreplay_version): Likewise.
7355 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7357 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7358 iov.iov_len with the real length in use.
7360 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7362 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7363 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7364 for all targets that use win32-low.c.
7365 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7366 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7368 2013-12-13 Pedro Alves <palves@redhat.com>
7370 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7371 if equal to TARGET_WAITKIND_LOADED.
7372 * win32-low.c (cached_status): New static global.
7373 (win32_wait): Add declaration.
7374 (do_initial_child_stuff): Flush all initial pending debug events
7375 up to the initial breakpoint.
7376 (win32_wait): If CACHED_STATUS was set, return that instead
7377 of doing a real wait. Remove the code resuming the execution
7378 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7379 during the initial phase. Also remove the code changing
7380 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7381 TARGET_WAITKIND_STOPPED.
7383 2013-12-11 Yao Qi <yao@codesourcery.com>
7385 * notif.c (handle_notif_ack): Return 0 if no notification
7388 2013-11-20 Doug Evans <dje@google.com>
7390 * linux-low.c (linux_set_resume_request): Fix comment.
7392 2013-11-20 Doug Evans <dje@google.com>
7394 * linux-low.c (resume_status_pending_p): Tweak comment.
7396 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7398 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7399 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7400 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7401 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7402 (srv_amd64_regobj): Add amd64-mpx.o.
7403 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7404 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7405 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7406 * i387-fp.c (num_pl_bnd_register) Added constant.
7407 (num_pl_bnd_cfg_registers) Added constant.
7408 (struct i387_xsave) Added reserved area and MPX fields.
7409 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7410 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7412 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7413 (init_registers_amd64_mpx_linux): Declare new function.
7414 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7415 (x86_64_regmap): Add MPX registers.
7416 (x86_linux_read_description): Add MPX case.
7417 (initialize_low_arch): Initialize MPX targets.
7419 2013-11-18 Tom Tromey <tromey@redhat.com>
7421 * configure: Rebuild.
7422 * configure.ac: Don't check for stdlib.h.
7423 * gdbreplay.c: Unconditionally include stdlib.h.
7425 2013-11-18 Tom Tromey <tromey@redhat.com>
7427 * config.in: Rebuild.
7428 * configure: Rebuild.
7429 * configure.ac: Don't use AC_HEADER_DIRENT.
7431 2013-11-18 Tom Tromey <tromey@redhat.com>
7433 * server.h: Don't check HAVE_STRING_H.
7434 * gdbreplay.c: Don't check HAVE_STRING_H.
7435 * configure: Rebuild.
7437 2013-11-18 Tom Tromey <tromey@redhat.com>
7439 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7442 2013-11-08 Tom Tromey <tromey@redhat.com>
7444 * configure, config.in: Rebuild.
7445 * configure.ac: Remove unused configury.
7447 2013-11-08 Tom Tromey <tromey@redhat.com>
7449 * acinclude.m4: Include common.m4, codeset.m4.
7450 * configure, config.in: Rebuild.
7451 * configure.ac: Use GDB_AC_COMMON.
7453 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7455 * linux-s390-low.c (HWCAP_S390_TE): New define.
7456 (s390_arch_setup): Consider the TE field in the HWCAP for
7457 determining 'have_regset_tdb'.
7459 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7462 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7465 2013-10-02 Pedro Alves <palves@redhat.com>
7467 * server.c (process_serial_event): Don't output "GDBserver
7468 exiting" if GDB is connected through stdio.
7469 * target.c (mywait): Likewise, be silent if GDB is connected
7472 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7474 * lynx-low.c (lynx_add_threads_after_attach): New function.
7475 (lynx_attach): Remove call to add_thread. Add call to
7476 lynx_add_threads_after_attach instead.
7478 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7480 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7481 * config.in, configure: Regenerated.
7483 2013-09-18 Yao Qi <yao@codesourcery.com>
7486 * server.c (start_inferior): Clear 'resume_info'.
7488 2013-09-16 Jiong Wang <jiwang@tilera.com>
7490 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7493 2013-09-16 Jiong Wang <jiwang@tilera.com>
7495 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7496 linux-tile-low.o to srv_tgtobj.
7498 2013-09-16 Will Newton <will.newton@linaro.org>
7500 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7503 2013-09-06 Pedro Alves <palves@redhat.com>
7505 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7506 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7507 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7508 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7509 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7510 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7512 2013-09-06 Pedro Alves <palves@redhat.com>
7514 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7515 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7517 2013-09-06 Pedro Alves <palves@redhat.com>
7519 * linux-amd64-ipa.c: Include tracepoint.h.
7520 * linux-i386-ipa.c: Include tracepoint.h.
7522 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7524 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7525 (ps_get_thread_area): New function.
7527 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7529 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7530 (initialize_low_arch): Call init_registers_crisv32 rather than
7531 init_register_crisv32.
7533 2013-09-05 Pedro Alves <palves@redhat.com>
7535 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7537 * hostio.h: ... this new file.
7538 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7539 win32-low.c: Include hostio.h.
7541 2013-09-05 Pedro Alves <palves@redhat.com>
7543 * server.h (gdb_client_data, handler_func, callback_handler_func)
7544 (delete_file_handler, add_file_handler, append_callback_event)
7545 (delete_callback_event, start_event_loop, initialize_event_loop):
7546 Move to event-loop.h and include it.
7547 * event-loop.h: New file.
7549 2013-09-05 Pedro Alves <palves@redhat.com>
7551 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7552 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7553 (loaded_dll, unloaded_dll): Move to ...
7554 * dll.h: ... this new file.
7555 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7557 2013-09-05 Pedro Alves <palves@redhat.com>
7559 * server.h (current_process, get_thread_process, all_processes)
7560 (add_inferior_to_list, for_each_inferior, current_inferior)
7561 (remove_inferior, add_process, remove_process, find_process_pid)
7562 (have_started_inferiors_p, have_attached_inferiors_p)
7563 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7564 (clear_inferiors, find_inferior, find_inferior_id)
7565 (inferior_target_data, set_inferior_target_data)
7566 (inferior_regcache_data, set_inferior_regcache_data): Move to
7567 inferiors.h, and include it.
7568 * inferiors.h: New file.
7570 2013-09-05 Pedro Alves <palves@redhat.com>
7572 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7576 2013-09-05 Pedro Alves <palves@redhat.com>
7578 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7580 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7581 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7582 (handle_tracepoint_general_set, handle_tracepoint_query)
7583 (tracepoint_finished_step, tracepoint_was_hit)
7584 (release_while_stepping_state_list, current_traceframe)
7585 (in_readonly_region, traceframe_read_mem)
7586 (fetch_traceframe_registers, traceframe_read_sdata)
7587 (traceframe_read_info, struct fast_tpoint_collect_status)
7588 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7589 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7590 (supply_fast_tracepoint_registers)
7591 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7592 (ipa_tdesc, claim_trampoline_space)
7593 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7594 (agent_mem_read, agent_get_trace_state_variable_value)
7595 (agent_set_trace_state_variable_value, agent_tsv_read)
7596 (agent_mem_read_string, get_raw_reg_func_addr)
7597 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7598 * tracepoint.h: ... this new file.
7600 2013-09-05 Pedro Alves <palves@redhat.com>
7602 * server.h (perror_with_name, error, fatal, warning, paddress)
7603 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7605 * utils.h: New file.
7607 2013-09-05 Pedro Alves <palves@redhat.com>
7609 * server.h (remote_debug, noack_mode, transport_is_reliable)
7610 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7611 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7612 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7613 (write_enn, initialize_async_io, enable_async_io)
7614 (disable_async_io, check_remote_input_interrupt_request)
7615 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7616 (dead_thread_notify, prepare_resume_reply)
7617 (decode_address_to_semicolon, decode_address, decode_m_packet)
7618 (decode_M_packet, decode_X_packet, decode_xfer_write)
7619 (decode_search_memory_packet, unhexify, hexify)
7620 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7621 (look_up_one_symbol, relocate_instruction)
7622 (monitor_output): Move to remote-utils.h, and include it.
7623 * remote-utils.h: New file.
7625 2013-09-05 Pedro Alves <palves@redhat.com>
7627 * server.h (_): Delete.
7629 2013-09-02 Pedro Alves <palves@redhat.com>
7631 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7632 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7634 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7636 2013-09-02 Pierre Muller <muller@sourceware.org>
7638 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7639 or WriteProcessMemory complete successfully and handle
7640 ERROR_PARTIAL_COPY error.
7642 2013-09-02 Pedro Alves <palves@redhat.com>
7644 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7645 error instead of EIO.
7647 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7650 * linux-low.c: Include filestuff.h.
7651 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7652 * lynx-low.c: Include filestuff.h.
7653 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7654 * server.c: Include filestuff.h.
7655 (main): Call notice_open_fds.
7656 * spu-low.c: Include filestuff.h.
7657 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7659 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7661 * Makefile.in: Explain why ../target and ../nat are not
7662 listed as include file search paths.
7663 (linux-waitpid.o): New object file rule.
7664 * configure.srv (srv_native_linux_obj): New variable.
7665 Replace all occurrences of linux native object files with
7666 $srv_native_linux_obj.
7667 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7668 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7669 (linux_enable_event_reporting): Remove declaration.
7670 (my_waitpid): Moved to common/linux-waitpid.c.
7671 (linux_wait_for_event): Pass ptid when calling
7672 linux_enable_event_reporting.
7673 (linux_supports_tracefork_flag): Remove.
7674 (linux_enable_event_reporting): Likewise.
7675 (linux_tracefork_grandchild): Remove.
7676 (STACK_SIZE): Moved to common/linux-ptrace.c.
7677 (linux_tracefork_child): Remove.
7678 (linux_test_for_tracefork): Remove.
7679 (linux_look_up_symbols): Call linux_supports_traceclone.
7680 (initialize_low): Remove call to linux_test_for_tracefork.
7681 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7682 common/linux-ptrace.h.
7683 (PTRACE_TYPE_ARG4): Likewise.
7684 Include linux-ptrace.h.
7686 2013-08-21 Pedro Alves <palves@redhat.com>
7688 * config.in: Renegerate.
7690 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7692 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7693 (SFILES): Remove $(srcdir)/common/target-common.c and
7694 add $(srcdir)/target/waitstatus.c.
7695 (OBS): Remove target-common.o and add waitstatus.o.
7696 (server_h): Remove $(srcdir)/../common/target-common.h and
7697 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7698 and $(srcdir)/../target/waitstatus.h.
7699 (target-common.o): Remove.
7700 (waitstatus.o): New target object file.
7701 * target.h: Do not include target-common.h and
7702 include target/resume.h, target/wait.h and
7703 target/waitstatus.h.
7705 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7707 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7708 to PTRACE_TYPE_ARG3.
7709 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7710 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7712 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7713 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7715 2013-07-27 Jie Zhang <jie@codesourcery.com>
7716 Daniel Jacobowitz <dan@codesourcery.com>
7717 Yao Qi <yao@codesourcery.com>
7719 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7720 (mips-linux-watch.o): New rule.
7721 (mips_linux_watch_h): New variable.
7722 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7724 * linux-mips-low.c: Include mips-linux-watch.h.
7725 (struct arch_process_info, struct arch_lwp_info): New.
7726 (update_watch_registers_callback): New function.
7727 (mips_linux_new_process, mips_linux_new_thread) New functions.
7728 (mips_linux_prepare_to_resume, mips_insert_point): New
7730 (mips_remove_point, mips_stopped_by_watchpoint): New
7732 (rsp_bp_type_to_target_hw_bp_type): New function.
7733 (mips_stopped_data_address): New function.
7734 (the_low_target): Add watchpoint support functions.
7736 2013-07-27 Yao Qi <yao@codesourcery.com>
7738 * i386-low.c: Include break-common.h.
7739 (enum target_hw_bp_type): Remove.
7741 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7743 * Makefile.in (SFILES): /common/target-common.c.
7744 (OBS): Add target-common.o.
7745 (server_h): Add $(srcdir)/../common/target-common.h.
7746 (target-common.o): New target.
7747 * server.c (queue_stop_reply_callback): Free
7748 status string after use.
7749 * target.c (target_waitstatus_to_string): Remove.
7750 * target.h: Include target-common.h.
7751 (resume_kind): Likewise.
7752 (target_waitkind): Likewise.
7753 (target_waitstatus): Likewise.
7754 (TARGET_WNOHANG): Likewise.
7756 2013-07-04 Yao Qi <yao@codesourcery.com>
7758 * Makefile.in (host_alias): Use @host_noncanonical@.
7759 (target_alias): Use @target_noncanonical@.
7760 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7761 ACX_NONCANONICAL_HOST.
7762 * configure: Regenerated.
7765 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7767 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7768 * configure: Rebuild.
7769 * Makefile.in (version_host, version_target): Get from configure.
7770 (version.c): Use $(version_host) and $(version_target).
7772 2013-07-03 Pedro Alves <palves@redhat.com>
7774 * Makefile.in (config.status): Depend on development.sh.
7775 * acinclude.m4: Include libmcheck.m4.
7776 * configure: Regenerate.
7778 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7780 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7781 attribute inside the parentheses.
7782 (winapi_DebugSetProcessKillOnExit): Ditto.
7783 (winapi_DebugBreakProcess): Ditto.
7784 (winapi_GenerateConsoleCtrlEvent): Ditto.
7786 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7788 * notif.h (notif_event): Add a dummy member to avoid compiler
7791 2013-07-01 Pedro Alves <palves@redhat.com>
7793 * hostio.c (HOSTIO_PATH_MAX): Define.
7794 (require_filename, handle_open, handle_unlink, handle_readlink):
7797 2013-07-01 Pedro Alves <palves@redhat.com>
7799 * server.h: Include "pathmax.h".
7800 * linux-low.c: Don't include sys/param.h.
7801 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7803 * win32-low.c: Don't include sys/param.h.
7804 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7806 2013-07-01 Pedro Alves <palves@redhat.com>
7808 * event-loop.c: Don't check HAVE_UNISTD_H before including
7810 * gdbreplay.c: Likewise.
7811 * remote-utils.c: Likewise.
7812 * server.c: Likewise.
7813 * configure.ac: Don't check for unistd.h.
7814 * configure: Regenerate.
7816 2013-06-28 Tom Tromey <tromey@redhat.com>
7818 * Makefile.in (version.c): Use version.in, not
7821 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7823 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7824 * configure: Rebuild.
7825 * Makefile.in (version_host, version_target): Get from configure.
7826 (version.c): Use $(version_host) and $(version_target).
7828 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7830 Fix trace-status to output user name without trailing colon.
7831 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7833 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7835 Fix trace-status to output proper start-time and stop-time.
7836 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7837 output start time and stop time in hex as gdb expects.
7839 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7841 * tracepoint.c (build_traceframe_info_xml): Output trace state
7842 variables present in the trace buffer.
7844 2013-06-24 Tom Tromey <tromey@redhat.com>
7846 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7848 (version.o): Remove.
7849 * gdbreplay.c: Include version.h.
7850 (version, host_name): Don't declare.
7851 * server.h: Include version.h.
7852 (version, host_name): Don't declare.
7854 2013-06-12 Pedro Alves <palves@redhat.com>
7856 * linux-x86-low.c (linux_is_elf64): Delete global.
7857 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7858 with local linux_pid_exe_is_elf_64_file use.
7860 2013-06-11 Pedro Alves <palves@redhat.com>
7862 * linux-low.c (regset_disabled, disable_regset): New functions.
7863 (regsets_fetch_inferior_registers)
7864 (regsets_store_inferior_registers): Use them.
7865 (initialize_regsets_info); Don't allocate the disabled_regsets
7867 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7870 2013-06-11 Pedro Alves <palves@redhat.com>
7872 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7875 2013-06-11 Pedro Alves <palves@redhat.com>
7877 * linux-x86-low.c (initialize_low_arch): Call
7878 init_registers_x32_avx_linux.
7880 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7882 Fix compatibility with Android Bionic.
7883 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7886 2013-06-07 Pedro Alves <palves@redhat.com>
7889 * Makefile.in (OBS): Add tdesc.o.
7890 (IPA_OBJS): Add tdesc-ipa.o.
7891 (tdesc-ipa.o): New rule.
7892 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7894 * linux-low.c (new_inferior): Delete.
7895 (disabled_regsets, num_regsets): Delete.
7896 (linux_add_process): Adjust to set the new per-process
7898 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7899 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7900 was a stop. When calling arch_setup, switch the current inferior
7901 to the thread that got an event.
7902 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7903 (regsets_fetch_inferior_registers)
7904 (regsets_store_inferior_registers): New regsets_info parameter.
7906 (linux_register_in_regsets): New regs_info parameter. Adjust to
7908 (register_addr, fetch_register, store_register): New usrregs_info
7909 parameter. Adjust to use it.
7910 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7911 parameter regs_info. Adjust to use it.
7912 (linux_fetch_registers): Get the current inferior's regs_info, and
7914 (linux_store_registers): Ditto.
7915 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7916 (initialize_low): Don't initialize the target_regsets here. Call
7917 initialize_low_arch.
7918 * linux-low.h (target_regsets): Delete declaration.
7919 (struct regsets_info): New.
7920 (struct usrregs_info): New.
7921 (struct regs_info): New.
7922 (struct process_info_private) <new_inferior>: New field.
7923 (struct linux_target_ops): Delete the num_regs, regmap, and
7924 regset_bitmap fields. New field regs_info.
7925 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7926 * i387-fp.c (num_xmm_registers): Delete.
7927 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7928 calls to new interface.
7929 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7930 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7931 Infer the number of xmm registers from the regcache's target
7933 * i387-fp.h (num_xmm_registers): Delete.
7934 * inferiors.c (add_thread): Don't install the thread's regcache
7936 * proc-service.c (gregset_info): Fetch the current inferior's
7937 regs_info. Adjust to use it.
7938 * regcache.c: Include tdesc.h.
7939 (register_bytes, reg_defs, num_registers)
7940 (gdbserver_expedite_regs): Delete.
7941 (get_thread_regcache): If the thread doesn't have a regcache yet,
7942 create one, instead of aborting gdbserver.
7943 (regcache_invalidate_one): Rename to ...
7944 (regcache_invalidate_thread): ... this.
7945 (regcache_invalidate_one): New.
7946 (regcache_invalidate): Only invalidate registers of the current
7948 (init_register_cache): Add target_desc parameter, and use it.
7949 (new_register_cache): Ditto. Assert the target description has a
7950 non zero registers_size.
7951 (regcache_cpy): Add assertions. Adjust.
7952 (realloc_register_cache, set_register_cache): Delete.
7953 (registers_to_string, registers_from_string): Adjust.
7954 (find_register_by_name, find_regno, find_register_by_number)
7955 (register_cache_size): Add target_desc parameter, and use it.
7956 (free_register_cache_thread, free_register_cache_thread_one)
7957 (regcache_release, register_cache_size): New.
7958 (register_size): Add target_desc parameter, and use it.
7959 (register_data, supply_register, supply_register_zeroed)
7960 (supply_regblock, supply_register_by_name, collect_register)
7961 (collect_register_as_string, collect_register_by_name): Adjust.
7962 * regcache.h (struct target_desc): Forward declare.
7963 (struct regcache) <tdesc>: New field.
7964 (init_register_cache, new_register_cache): Add target_desc
7966 (regcache_invalidate_thread): Declare.
7967 (regcache_invalidate_one): Delete declaration.
7968 (regcache_release): Declare.
7969 (find_register_by_number, register_cache_size, register_size)
7970 (find_regno): Add target_desc parameter.
7971 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7973 * remote-utils.c: Include tdesc.h.
7974 (outreg, prepare_resume_reply): Adjust.
7975 * server.c: Include tdesc.h.
7976 (gdbserver_xmltarget): Delete declaration.
7977 (get_features_xml, process_serial_event): Adjust.
7978 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7980 (struct process_info) <tdesc>: New field.
7981 (ipa_tdesc): Declare.
7982 * tdesc.c: New file.
7983 * tdesc.h: New file.
7984 * tracepoint.c: Include tdesc.h.
7985 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7986 (get_context_regcache): Adjust to pass ipa_tdesc down.
7987 (do_action_at_tracepoint): Adjust to get the register cache size
7988 from the context regcache's description.
7989 (traceframe_walk_blocks): Adjust to get the register cache size
7990 from the current trace frame's description.
7991 (traceframe_get_pc): Adjust to get current trace frame's
7992 description and pass it down.
7993 (gdb_collect): Adjust to get the register cache size from the
7995 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7996 (gdbserver_xmltarget): Delete.
7997 (initialize_low_tracepoint): Set the ipa's target description.
7998 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7999 (initialize_low_tracepoint): Set the ipa's target description.
8000 * linux-x86-low.c: Include tdesc.h.
8001 [__x86_64__] (is_64bit_tdesc): New.
8002 (ps_get_thread_area, x86_get_thread_area): Use it.
8003 (i386_cannot_store_register): Rename to ...
8004 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8005 (i386_cannot_fetch_register): Rename to ...
8006 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8007 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8009 (target_regsets): Rename to ...
8010 (x86_regsets): ... this.
8011 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8013 (x86_siginfo_fixup): Use is_64bit_tdesc.
8014 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8015 (tdesc_x32_avx_linux, tdesc_x32_linux)
8016 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8018 (x86_linux_update_xmltarget): Delete.
8019 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8020 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8021 (AMD64_LINUX_USER64_CS): New.
8022 (x86_linux_read_description): New, based on
8023 x86_linux_update_xmltarget.
8024 (same_process_callback): New.
8025 (x86_arch_setup_process_callback): New.
8026 (x86_linux_update_xmltarget): New.
8027 (x86_regsets_info): New.
8028 (amd64_linux_regs_info): New.
8029 (i386_linux_usrregs_info): New.
8030 (i386_linux_regs_info): New.
8031 (x86_linux_regs_info): New.
8032 (x86_arch_setup): Reimplement.
8033 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8034 (x86_emit_ops): Ditto.
8035 (the_low_target): Adjust. Install x86_linux_regs_info,
8036 x86_cannot_fetch_register, and x86_cannot_store_register.
8037 (initialize_low_arch): New.
8038 * linux-ia64-low.c (tdesc_ia64): Declare.
8039 (ia64_fetch_register): Adjust.
8040 (ia64_usrregs_info, regs_info): New globals.
8041 (ia64_regs_info): New function.
8042 (the_low_target): Adjust.
8043 (initialize_low_arch): New function.
8044 * linux-sparc-low.c (tdesc_sparc64): Declare.
8045 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8047 (sparc_arch_setup): New function.
8048 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8049 (the_low_target): Adjust.
8050 (initialize_low_arch): New function.
8051 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8052 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8053 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8054 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8055 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8056 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8057 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8058 (tdesc_powerpc_isa205_vsx64l): Declare.
8059 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8060 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8061 (ppc_set_pc, ppc_get_hwcap): Adjust.
8062 (ppc_usrregs_info): Forward declare.
8063 (!__powerpc64__) ppc_regmap_adjusted: New global.
8064 (ppc_arch_setup): Adjust to the current process'es target
8066 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8067 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8068 (ppc_store_evrregset): Adjust.
8069 (target_regsets): Rename to ...
8070 (ppc_regsets): ... this, and make static.
8071 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8072 (ppc_regs_info): New function.
8073 (the_low_target): Adjust.
8074 (initialize_low_arch): New function.
8075 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8076 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8077 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8078 (tdesc_s390x_linux64v2): Declare.
8079 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8080 (s390_fill_gregset, s390_store_last_break): Adjust.
8081 (target_regsets): Rename to ...
8082 (s390_regsets): ... this, and make static.
8083 (s390_get_pc, s390_set_pc): Adjust.
8084 (s390_get_hwcap): New target_desc parameter, and use it.
8085 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8086 (s390_arch_setup): Adjust to set the current process'es target
8087 description. Don't adjust the regmap.
8088 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8089 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8090 (regs_info_3264): New globals.
8091 (s390_regs_info): New function.
8092 (the_low_target): Adjust.
8093 (initialize_low_arch): New function.
8094 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8095 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8096 [__mips64] (init_registers_mips_linux)
8097 (init_registers_mips_dsp_linux): Delete defines.
8098 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8099 (have_dsp): New global.
8100 (mips_read_description): New, based on mips_arch_setup.
8101 (mips_arch_setup): Reimplement.
8102 (get_usrregs_info): New function.
8103 (mips_cannot_fetch_register, mips_cannot_store_register)
8104 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8105 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8106 (target_regsets): Rename to ...
8107 (mips_regsets): ... this, and make static.
8108 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8109 (dsp_regs_info, regs_info): New globals.
8110 (mips_regs_info): New function.
8111 (the_low_target): Adjust.
8112 (initialize_low_arch): New function.
8113 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8114 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8116 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8117 (arm_read_description): New, with bits factored from
8119 (arm_arch_setup): Reimplement.
8120 (target_regsets): Rename to ...
8121 (arm_regsets): ... this, and make static.
8122 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8123 (arm_regs_info): New function.
8124 (the_low_target): Adjust.
8125 (initialize_low_arch): New function.
8126 * linux-m68k-low.c (tdesc_m68k): Declare.
8127 (target_regsets): Rename to ...
8128 (m68k_regsets): ... this, and make static.
8129 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8130 (m68k_regs_info): New function.
8131 (m68k_arch_setup): New function.
8132 (the_low_target): Adjust.
8133 (initialize_low_arch): New function.
8134 * linux-sh-low.c (tdesc_sharch): Declare.
8135 (target_regsets): Rename to ...
8136 (sh_regsets): ... this, and make static.
8137 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8138 (sh_regs_info, sh_arch_setup): New functions.
8139 (the_low_target): Adjust.
8140 (initialize_low_arch): New function.
8141 * linux-bfin-low.c (tdesc_bfin): Declare.
8142 (bfin_arch_setup): New function.
8143 (bfin_usrregs_info, regs_info): New globals.
8144 (bfin_regs_info): New function.
8145 (the_low_target): Adjust.
8146 (initialize_low_arch): New function.
8147 * linux-cris-low.c (tdesc_cris): Declare.
8148 (cris_arch_setup): New function.
8149 (cris_usrregs_info, regs_info): New globals.
8150 (cris_regs_info): New function.
8151 (the_low_target): Adjust.
8152 (initialize_low_arch): New function.
8153 * linux-cris-low.c (tdesc_crisv32): Declare.
8154 (cris_arch_setup): New function.
8155 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8156 (cris_regs_info): New function.
8157 (the_low_target): Adjust.
8158 (initialize_low_arch): New function.
8159 * linux-m32r-low.c (tdesc_m32r): Declare.
8160 (m32r_arch_setup): New function.
8161 (m32r_usrregs_info, regs_info): New globals.
8162 (m32r_regs_info): Adjust.
8163 (initialize_low_arch): New function.
8164 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8165 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8166 (tic6x_usrregs_info): Forward declare.
8167 (tic6x_read_description): New function, based on ...
8168 (tic6x_arch_setup): ... this. Reimplement.
8169 (target_regsets): Rename to ...
8170 (tic6x_regsets): ... this, and make static.
8171 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8172 (tic6x_regs_info): New function.
8173 (the_low_target): Adjust.
8174 (initialize_low_arch): New function.
8175 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8176 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8177 (target_regsets): Rename to ...
8178 (xtensa_regsets): ... this, and make static.
8179 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8181 (xtensa_arch_setup, xtensa_regs_info): New functions.
8182 (the_low_target): Adjust.
8183 (initialize_low_arch): New function.
8184 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8185 (nios2_arch_setup): Set the current process'es tdesc.
8186 (target_regsets): Rename to ...
8187 (nios2_regsets): ... this.
8188 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8189 (nios2_regs_info): New function.
8190 (the_low_target): Adjust.
8191 (initialize_low_arch): New function.
8192 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8193 (aarch64_arch_setup): Set the current process'es tdesc.
8194 (target_regsets): Rename to ...
8195 (aarch64_regsets): ... this.
8196 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8197 (aarch64_regs_info): New function.
8198 (the_low_target): Adjust.
8199 (initialize_low_arch): New function.
8200 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8202 (target_regsets): Rename to ...
8203 (tile_regsets): ... this.
8204 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8205 (tile_regs_info): New function.
8206 (tile_arch_setup): Set the current process'es tdesc.
8207 (the_low_target): Adjust.
8208 (initialize_low_arch): New function.
8209 * spu-low.c (tdesc_spu): Declare.
8210 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8211 * win32-arm-low.c (tdesc_arm): Declare.
8212 (arm_arch_setup): New function.
8213 (the_low_target): Install arm_arch_setup instead of
8215 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8216 (init_windows_x86): Rename to ...
8217 (i386_arch_setup): ... this. Set `win32_tdesc'.
8218 (the_low_target): Adjust.
8219 * win32-low.c (win32_tdesc): New global.
8220 (child_add_thread): Don't create the thread cache here.
8221 (do_initial_child_stuff): Set the new process'es tdesc.
8222 * win32-low.h (struct target_desc): Forward declare.
8223 (win32_tdesc): Declare.
8224 * lynx-i386-low.c (tdesc_i386): Declare global.
8225 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8226 * lynx-low.c (lynx_tdesc): New global.
8227 (lynx_add_process): Set the new process'es tdesc.
8228 * lynx-low.h (struct target_desc): Forward declare.
8229 (lynx_tdesc): Declare global.
8230 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8231 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8232 * nto-low.c (nto_tdesc): New global.
8233 (do_attach): Set the new process'es tdesc.
8234 * nto-low.h (struct target_desc): Forward declare.
8235 (nto_tdesc): Declare.
8236 * nto-x86-low.c (tdesc_i386): Declare.
8237 (nto_x86_arch_setup): Set `nto_tdesc'.
8239 2013-06-04 Gary Benson <gbenson@redhat.com>
8241 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8242 to qSupported response when appropriate.
8243 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8244 with nonzero-length annex.
8245 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8246 arguments supplied in annex.
8248 2013-05-31 Doug Evans <dje@google.com>
8251 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8252 64 bits in 64-cross-32 environment.
8254 2013-05-28 Pedro Alves <palves@redhat.com>
8256 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8257 (aarch64-without-fpu.c): Delete rule.
8258 * configure.srv (aarch64*-*-linux*): Remove references to
8259 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8260 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8263 2013-05-24 Pedro Alves <palves@redhat.com>
8265 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8266 instead of strchr/decode_address. Error if the range isn't split
8267 with a ','. Don't assume there's be a ':' in the action.
8269 2013-05-23 Yao Qi <yao@codesourcery.com>
8270 Pedro Alves <palves@redhat.com>
8272 * linux-low.c (lwp_in_step_range): New function.
8273 (linux_wait_1): If the thread was range stepping and stopped
8274 outside the stepping range, report the stop to GDB. Otherwise,
8275 continue stepping. Add range stepping debug output.
8276 (linux_set_resume_request): Copy the step range from the resume
8278 (linux_supports_range_stepping): New.
8279 (linux_target_ops) <supports_range_stepping>: Set to
8280 linux_supports_range_stepping.
8281 * linux-low.h (struct linux_target_ops)
8282 <supports_range_stepping>: New field.
8283 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8284 * linux-x86-low.c (x86_supports_range_stepping): New.
8285 (the_low_target) <supports_range_stepping>: Set to
8286 x86_supports_range_stepping.
8287 * server.c (handle_v_cont): Handle 'r' action.
8288 (handle_v_requests): Append ";r" if the target supports range
8290 * target.h (struct thread_resume) <step_range_start,
8291 step_range_end>: New fields.
8292 (struct target_ops) <supports_range_stepping>:
8294 (target_supports_range_stepping): New macro.
8296 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8298 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8299 confusion in comment.
8301 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8303 * lynx-low.c (struct process_info_private): New type.
8304 (lynx_add_process): New function.
8305 (lynx_create_inferior, lynx_attach): Replace calls to
8306 add_process by calls to lynx_add_process.
8307 (lynx_resume): If PTID is null, then try using
8308 current_process()->private->last_wait_event_ptid.
8310 (lynx_clear_inferiors): Delete. The contents of that function
8311 has been inlined in lynx_mourn;
8312 (lynx_wait_1): Save the ptid in the process's private data.
8313 (lynx_mourn): Free the process' private data. Replace call
8314 to lynx_clear_inferiors by call to clear_inferiors.
8316 2013-05-17 Yao Qi <yao@codesourcery.com>
8318 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8321 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8323 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8324 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8325 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8326 PT_TEXT_END_ADDR guards. Update comments.
8327 (linux_target_op) <read_offsets>: Conditionally define to
8328 linux_read_offsets if the target is UCLIBC and if it defines
8329 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8331 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8332 Andrew Jenner <andrew@codesourcery.com>
8334 * Makefile.in (SFILES): Add linux-nios2-low.c.
8335 (clean): Add action to delete nios2-linux.c.
8336 (nios2-linux.c): New rule.
8337 * configure.srv: Add nios2*-*-linux*.
8338 * linux-nios2-low.c: New.
8340 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8342 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8344 2013-04-25 Hui Zhu <hui@codesourcery.com>
8347 * ax.c (ax_printf): Add fflush.
8349 2013-04-22 Tom Tromey <tromey@redhat.com>
8351 * Makefile.in (SFILES): Add filestuff.c.
8352 (OBS): Add filestuff.o.
8353 (filestuff.o): New target.
8354 * config.in, configure: Rebuild.
8355 * configure.ac: Check for fdwalk, pipe2.
8357 2013-04-17 Pedro Alves <palves@redhat.com>
8359 * configure.ac (USE_THREAD_DB): Delete variable.
8360 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8361 Don't AC_SUBST USE_THREAD_DB.
8362 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8363 * config.in, configure: Regenerate.
8365 2013-04-16 Pedro Alves <palves@redhat.com>
8367 * linux-low.h (struct lwp_info) <thread_known>: Move under
8368 the USE_THREAD_DB #ifdef.
8370 2013-04-16 Pedro Alves <palves@redhat.com>
8372 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8373 (linux-low.o): Delete rule.
8374 * linux-low.h: Always include "gdb_thread_db.h" instead of
8375 conditionally including thread_db.h.
8376 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8379 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8381 * Makefile.in (install-only): Fix make install regression.
8383 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8385 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8386 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8388 * gdbserver.1: Remove.
8390 2013-03-22 Pedro Alves <palves@redhat.com>
8392 * linux-low.c (handle_extended_wait): Don't call
8393 linux_enable_event_reporting.
8395 2013-03-15 Tony Theodore <tonyt@logyst.com>
8398 * Makefile.in (SHELL): Use @SHELL@.
8400 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8402 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8405 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8407 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8408 Remove extraneous NULL element.
8410 2013-03-13 Yao Qi <yao@codesourcery.com>
8412 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8413 'V' block in trace frame.
8415 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8417 * target.h (struct target_ops): Add btrace ops.
8418 (target_supports_btrace): New macro.
8419 (target_enable_btrace): New macro.
8420 (target_disable_btrace): New macro.
8421 (target_read_btrace): New macro.
8422 * gdbthread.h (struct thread_info): Add btrace field.
8423 * server.c: Include btrace-common.h.
8424 (handle_btrace_general_set): New function.
8425 (handle_btrace_enable): New function.
8426 (handle_btrace_disable): New function.
8427 (handle_general_set): Call handle_btrace_general_set.
8428 (handle_qxfer_btrace): New function.
8429 (struct qxfer qxfer_packets[]): Add btrace entry.
8430 * inferiors.c (remove_thread): Disable btrace.
8431 * linux-low: Include linux-btrace.h.
8432 (linux_low_enable_btrace): New function.
8433 (linux_low_read_btrace): New function.
8434 (linux_target_ops): Add btrace ops.
8435 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8436 Add srv_linux_btrace=yes.
8437 (x86_64-*-linux*): Add linux-btrace.o.
8438 Add srv_linux_btrace=yes.
8439 * configure.ac: Define HAVE_LINUX_BTRACE.
8440 * config.in: Regenerated.
8441 * configure: Regenerated.
8443 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8445 * server.c (handle_qxfer): Preserve error message if -3 is
8447 (qxfer): Document the -3 return value.
8449 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8451 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8452 (linux_btrace_h): New variable.
8453 (linux-btrace.o): New rule.
8455 2013-03-08 Stan Shebs <stan@codesourcery.com>
8456 Hafiz Abid Qadeer <abidh@codesourcery.com>
8458 * tracepoint.c (trace_buffer_size): New global.
8459 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8460 (init_trace_buffer): Change to one-argument function. Allocate
8461 trace buffer memory.
8462 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8463 handle QTBuffer:size packet.
8464 (cmd_bigqtbuffer_size): New function.
8465 (initialize_tracepoint): Call init_trace_buffer with
8466 DEFAULT_TRACE_BUFFER_SIZE.
8467 * server.c (handle_query): Add QTBuffer:size in the
8470 2013-03-07 Yao Qi <yao@codesourcery.com>
8472 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8473 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8475 (cmd_qtsp): Adjust condition. Do post increment.
8476 Set cur_action and cur_step_action back to 0.
8478 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8481 * linux-low.c (linux_write_memory): Return early success if LEN is
8484 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8486 * configure.srv: Add x86_64-*-cygwin* as target.
8488 2013-02-28 Tom Tromey <tromey@redhat.com>
8490 * configure.ac: Invoke AC_SYS_LARGEFILE.
8491 * configure, config.in: Rebuild.
8493 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8495 * win32-low.c: Throughout, fix format strings and casts of
8496 printf-like functions to avoid type related warnings on all
8498 (get_child_debug_event): Print dwDebugEventCode as hex since
8499 that's how it's usually documented.
8501 2013-02-28 Yao Qi <yao@codesourcery.com>
8503 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8506 2013-02-27 Jiong Wang <jiwang@tilera.com>
8508 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8509 (reg-tilegx32.c): New rule.
8510 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8511 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8512 different register info initializer according to elf class.
8513 (init_registers_tilgx32): New function. The tilegx32 register info
8515 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8516 (tile_store_gregset): Likewise.
8518 2013-02-27 Yao Qi <yao@codesourcery.com>
8520 * server.c (process_point_options): Print debug message when
8521 debug_threads is true.
8523 2013-02-26 Yao Qi <yao@codesourcery.com>
8525 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8527 2013-02-19 Pedro Alves <palves@redhat.com>
8528 Kai Tietz <ktietz@redhat.com>
8532 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8533 instead of strtoul to extract address from packet.
8534 (process_serial_event) <'z'>: Likewise.
8536 2013-02-18 Yao Qi <yao@codesourcery.com>
8538 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8540 2013-02-14 Pedro Alves <palves@redhat.com>
8544 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8545 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8547 2013-02-14 Pedro Alves <palves@redhat.com>
8549 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8551 2013-02-14 Pedro Alves <palves@redhat.com>
8553 * tracepoint.c (save_string): Delete.
8554 (add_tracepoint_action): Use savestring instead of save_string.
8556 2013-02-12 Pedro Alves <palves@redhat.com>
8558 * linux-xtensa-low.c: Ditto.
8559 * xtensa-xtregs.c: Ditto.
8561 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8563 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8566 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8568 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8569 aarch64_num_wp_regs and aarch64_num_bp_regs to
8570 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8572 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8574 * linux-aarch64-low.c (ps_get_thread_area): Replace
8575 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8577 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8578 Marcus Shawcroft <marcus.shawcroft@arm.com>
8579 Nigel Stephens <nigel.stephens@arm.com>
8580 Yufeng Zhang <yufeng.zhang@arm.com>
8582 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8583 (aarch64.c, aarch64-without-fpu.c): New targets.
8584 * configure.srv (aarch64*-*-linux*): New.
8585 * linux-aarch64-low.c: New file.
8587 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8589 * linux-low.c (handle_extended_wait, linux_create_inferior)
8590 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8591 (dequeue_one_deferred_signal, linux_resume_one_thread)
8592 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8593 (linux_tracefork_grandchild, linux_test_for_tracefork)
8594 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8595 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8596 where the argument is 0.
8598 2013-01-25 Yao Qi <yao@codesourcery.com>
8600 * event-loop.c: Include "queue.h".
8601 (gdb_event_p): New typedef.
8602 (struct gdb_event) <next_event>: Remove.
8603 (event_queue): Change to QUEUE(gdb_event_p).
8604 (async_queue_event): Remove.
8605 (gdb_event_xfree): New.
8606 (initialize_event_loop): New.
8607 (process_event): Use API from QUEUE.
8608 (wait_for_event): Likewise.
8609 * server.c (main): Call initialize_event_loop.
8610 * server.h (initialize_event_loop): Declare.
8612 2013-01-18 Yao Qi <yao@codesourcery.com>
8614 * ax.h (struct eval_agent_expr_context): New.
8615 (gdb_eval_agent_expr): Update declaration.
8616 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8617 TFRAME. Add new argument CTX.
8618 * server.h (struct eval_agent_expr_context): Declare.
8619 (agent_mem_read, agent_tsv_read): Update declaration.
8620 (agent_mem_read_string): Likewise.
8621 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8622 (add_traceframe_block): Add new argument TPOINT.
8623 Increase TPOINT->traceframe_usage.
8624 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8625 eval_tracepoint_agent_expr.
8626 (condition_true_at_tracepoint): Likewise.
8627 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8628 (agent_mem_read_string, agent_tsv_read): Likewise.
8630 2013-01-16 Yao Qi <yao@codesourcery.com>
8632 * linux-low.c (linux_resume_one_lwp): Don't check
8633 'lwp->bp_reinsert != 0'.
8635 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8636 Pedro Alves <palves@redhat.com>
8638 * lynx-low.c (ptrace_request_to_str): Define a temporary
8639 macro and use it to simplify this function's implementation.
8641 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8643 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8646 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8648 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8650 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8652 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8654 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8656 * lynx-low.c (lynx_resume): Use the resume_info parameter
8657 to determine the ptid for the lynx_ptrace call, unless
8658 it is equal to minus_one_ptid, in which case we use the
8659 ptid of the current_inferior.
8660 (lynx_wait_1): After having received a thread create/exit
8661 event, resume the inferior's execution using the signaling
8662 thread's ptid, rather than the old ptid.
8664 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8666 * lynx-low.c (lynx_resume): Delete variable ret.
8668 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8670 * gdbreplay.c (gdbreplay_version): Update copyright year.
8671 * server.c (gdbserver_version): Likewise.
8673 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8675 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8678 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8680 * lynx-low.c (ptrace_request_to_str): Add handling for
8683 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8685 * lynx-low.c (lynx_attach): Delete variable new_process.
8687 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8689 * lynx-low.c (lynx_create_inferior): Delete variable
8692 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8694 * lynx-low.c (ptrace_request_to_str): Do not handle
8695 PTRACE_GETTHREADLIST if this macro does not exist.
8697 2012-12-15 Yao Qi <yao@codesourcery.com>
8699 * Makefile.in (OBS): Add notif.o.
8700 * notif.c, notif.h: New.
8701 * server.c: Include "notif.h".
8702 (struct vstop_notif) <next>: Remove.
8704 (queue_stop_reply): Update.
8705 (push_event, send_next_stop_reply): Remove.
8706 (discard_queued_stop_replies): Update.
8707 (notif_stop): New variable.
8708 (handle_v_stopped): Remove.
8709 (handle_v_requests): Don't call handle_v_stopped. Call
8710 handle_ack_notif instead.
8711 (queue_stop_reply_callback): Call notif_event_enque instead
8712 of queue_stop_reply.
8713 (handle_status): Don't call send_next_stop_reply, call
8714 notif_write_event instead.
8715 (kill_inferior_callback): Likewise.
8716 (detach_or_kill_inferior_callback): Likewise.
8717 (main): Call initialize_notif.
8718 (process_serial_event): Call QUEUE_is_empty.
8719 (handle_target_event): Call notif_push instead of push event.
8720 * server.h (push_event): Remove declaration.
8722 2012-12-10 Tom Tromey <tromey@redhat.com>
8724 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8725 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8728 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8729 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8730 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8731 (amd64-linux-ipa.o, ax.o): Rewrite.
8732 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8733 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8734 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8735 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8736 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8737 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8738 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8739 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8740 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8741 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8742 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8743 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8744 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8745 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8746 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8747 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8748 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8749 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8750 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8751 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8752 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8753 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8754 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8755 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8756 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8757 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8758 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8759 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8760 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8761 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8762 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8763 (reg-tilegx.o): Remove.
8764 (all_object_files): New macro.
8765 Include .deps files.
8766 * aclocal.m4, configure: Rebuild.
8767 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8768 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8769 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8771 2012-12-05 Tom Tromey <tromey@redhat.com>
8774 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8776 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8778 * configure.ac: Check for linux/perf_event.h.
8779 * config.in: Regenerated.
8780 * configure: Regenerated.
8782 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8784 * hostio.c (handle_readlink): Decrease buffer size
8785 parameter passed to readlink by one byte.
8787 2012-11-26 Yao Qi <yao@codesourcery.com>
8789 * configure.ac (build_warnings): Append '-Wempty-body'.
8790 * configure: Regenerated.
8791 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8794 2012-11-15 Pierre Muller <muller@sourceware.org>
8796 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8797 * config.in: Regenerate.
8798 * configure: Regenerate.
8799 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8800 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8801 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8802 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8804 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8805 instead of <sys/wait.h> header.
8806 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8808 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8810 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8811 (various make rules): Remove -DGDBSERVER
8813 2012-11-09 Yao Qi <yao@codesourcery.com>
8815 * spu-low.c (current_ptid): Move it to ..
8816 * gdbthread.h: ... here. New.
8817 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8818 * server.c (myresume, process_serial_event): Likewise.
8819 * thread-db.c (thread_db_find_new_threads): Likewise.
8820 * tracepoint.c (run_inferior_command): Likewise.
8822 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8824 * server.c (handle_search_memory_1): Include access length in
8827 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8829 * linux-crisv32-low.c: Fix compile errors.
8831 2012-09-04 Yao Qi <yao@codesourcery.com>
8833 * tracepoint.c (cmd_qtsv): Adjust debug message.
8834 Don't check CUR_TPOINT.
8836 2012-08-28 Yao Qi <yao@codesourcery.com>
8838 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8839 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8840 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8841 Remove declarations of xmalloc, xreallloc, xstrdup and
8843 * Makefile.in (libiberty_h): New.
8844 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8845 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8847 2012-08-23 Yao Qi <yao@codesourcery.com>
8849 * server.h: Remove declaration of 'xsnprintf'.
8851 2012-08-22 Keith Seitz <keiths@redhat.com>
8853 * server.h: Include build-gnulib-gbserver/config.h.
8854 * gdbreplay.c: Likewise.
8856 2012-08-08 Doug Evans <dje@google.com>
8858 * Makefile.in (SFILES): Add gdb_vecs.c.
8859 (OBS): Add gdb_vecs.o.
8860 (gdb_vecs_h, host_defs_h): New variables.
8861 (thread-db.o): Add $(gdb_vecs_h) dependency.
8862 (gdb_vecs.o): New rule.
8863 * thread-db.c: #include "gdb_vecs.h".
8864 (thread_db_load_search): Use a vector to iterate over path elements.
8865 Handle text appearing after "$pdir".
8867 * configure.ac: Add check for strstr.
8868 * config.in: Regenerate.
8869 * configure: Regenerate.
8871 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8873 * hostio.c (handle_pread): If pread fails, fall back to attempting
8875 (handle_pwrite): Likewise for pwrite.
8877 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8879 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8880 between unsupported TYPE and unimplementable ADDR/LEN combination.
8881 (arm_insert_point): Act on new return value.
8883 2012-07-31 Pedro Alves <palves@redhat.com>
8885 * server.c (process_point_options): Only skip tokens if we find
8886 one that is unrecognized. Don't treat 'X' specially while
8887 skipping unrecognized tokens.
8889 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8891 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8892 to 4-byte-align HW breakpoint addresses for Thumb.
8894 2012-07-27 Yao Qi <yao@codesourcery.com>
8898 * server.h: Declare gdb_agent_about_to_close.
8899 * target.c (kill_inferior): Include "agent.h".
8900 New. Send command 'kill'.
8901 * target.h (kill_inferior): Removed macro.
8902 * tracepoint.c (gdb_agent_about_to_close): New.
8903 (gdb_agent_helper_thread): Handle command 'close'.
8904 Wait endlessly until the inferior stops.
8905 Install gdb_agent_remove_socket to atexit hook.
8906 (agent_socket_name): New static variable.
8907 (gdb_agent_socket_init): Replace local variable 'name' with
8908 'agent_socket_name'.
8909 (gdb_agent_remove_socket): New.
8911 2012-07-27 Yao Qi <yao@codesourcery.com>
8913 * server.c (process_point_options): Stop at 'X' when parsing.
8915 2012-07-19 Michael Eager <eager@eagercon.com>
8917 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8919 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8920 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8921 hardware breakpoint.
8923 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8925 * gdbserver/linux-low.c (initialize_low): Call
8926 linux_ptrace_init_warnings.
8928 2012-07-02 Doug Evans <dje@google.com>
8930 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8933 2012-07-02 Stan Shebs <stan@codesourcery.com>
8935 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8936 (ax.o): Add it to build rule.
8938 (OBS): Add format.o.
8939 (IPA_OBS): Add format.o.
8940 * server.c (handle_query): Claim support for breakpoint commands.
8941 (process_point_options): Add command case.
8942 (process_serial_event): Leave running if there are printfs in
8944 * mem-break.h (any_persistent_commands): Declare.
8945 (add_breakpoint_commands): Declare.
8946 (gdb_no_commands_at_breakpoint): Declare.
8947 (run_breakpoint_commands): Declare.
8948 * mem-break.c (struct point_command_list): New struct.
8949 (struct breakpoint): New field command_list.
8950 (any_persistent_commands): New function.
8951 (add_commands_to_breakpoint): New function.
8952 (add_breakpoint_commands): New function.
8953 (gdb_no_commands_at_breakpoint): New function.
8954 (run_breakpoint_commands): New function.
8955 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8957 * ax.c: Include format.h.
8958 (ax_printf): New function.
8959 (gdb_eval_agent_expr): Add printf opcode.
8961 2012-06-13 Yao Qi <yao@codesourcery.com>
8963 * server.c (start_inferior): Remove duplicated writes to fields
8964 'last_resume_kind' and 'last_status' of 'current_inferior'.
8966 2012-06-12 Yao Qi <yao@codesourcery.com>
8967 Pedro Alves <palves@redhat.com>
8969 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8971 * server.c (handle_v_cont): Extend comment.
8973 2012-06-11 Yao Qi <yao@codesourcery.com>
8975 * linux-low.c (linux_attach): Add 'static'.
8977 2012-06-06 Yao Qi <yao@codesourcery.com>
8979 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8981 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8983 Fix gcc -flto compilation warning.
8984 * server.c (main): Make variable multi_mode and attach volatile.
8986 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8988 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8989 if the platform doesn't know about it.
8991 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8993 * Makefile.in (SFILES): Add linux-tile-low.c.
8994 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8995 * configure.srv: Handle tilegx-*-linux*.
8996 * linux-tile-low.c: New file.
8998 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9000 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9002 2012-05-24 Pedro Alves <palves@redhat.com>
9006 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9008 2012-05-24 Pedro Alves <palves@redhat.com>
9012 Replace target_signal with gdb_signal throughout.
9014 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9016 * linux-low.c (linux_store_registers): Avoid the copying sequence
9017 when no data has been retrieved by ptrace.
9019 2012-05-22 Will Deacon <will.deacon@arm.com>
9021 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9022 Include asm/ptrace.h.
9023 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9026 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9028 * linux-low.c (linux_store_registers): Don't re-retrieve data
9029 with ptrace that has already been obtained from /proc. Always
9030 copy any data retrieved with ptrace to the buffer supplied.
9032 2012-05-11 Yao Qi <yao@codesourcery.com>
9033 Pedro Alves <palves@redhat.com>
9035 * linux-low.c (enum stopping_threads_kind): New.
9036 (stopping_threads): Change type to `enum stopping_threads_kind'.
9037 (handle_extended_wait): If stopping and suspending threads, leave
9038 the new_lwp suspended too.
9039 (linux_wait_for_event): Adjust.
9040 (stop_all_lwps): Set `stopping_threads' to
9041 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9042 whether we're suspending threads or just stopping them. Assert no
9045 2012-04-29 Yao Qi <yao@codesourcery.com>
9047 * server.h: Move some code to ...
9048 * gdbthread.h: ... here. New.
9049 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9050 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9051 (nto-low.o, win32-low.o): Likewise.
9052 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9053 * regcache.c, remote-utils.c, server.c: Likewise.
9054 * target.c, tracepoint.c, win32-low.c: Likewise.
9056 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9058 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9059 (PTRACE_ARG4_TYPE): Likewise.
9060 (PTRACE_XFER_TYPE): Likewise.
9061 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9062 ptrace to PTRACE_ARG3_TYPE.
9063 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9064 (PTRACE_ARG4_TYPE): Likewise.
9065 (PTRACE_XFER_TYPE): Likewise.
9066 (linux_detach_one_lwp): Cast fourth argument of
9067 ptrace to long then PTRACE_ARG4_TYPE.
9068 (regsets_fetch_inferior_registers): Cast third argument of
9069 ptrace to long then PTRACE_ARG3_TYPE.
9070 (regsets_store_inferior_registers): Likewise.
9072 2012-04-20 Pedro Alves <palves@redhat.com>
9074 * configure: Regenerate.
9076 2012-04-19 Pedro Alves <palves@redhat.com>
9078 * Makefile.in (GNULIB_BUILDDIR): New.
9079 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9080 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9081 (all, install-only, uninstall, clean-info, all-lib, clean): No
9082 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9083 (maintainer-clean realclean distclean): Use subdir_do.
9085 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9086 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9087 * acinclude.m4: Include acx_configure_dir.m4.
9088 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9089 calls. Call AC_PROG_RANLIB. Configure gnulib using
9092 (GNULIB_STDINT_H): Adjust.
9093 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9094 * gdbreplay.c: Include build-gnulib/config.h.
9095 * server.h: Likewise.
9096 * aclocal.m4: Regenerate.
9097 * config.in: Regenerate.
9098 * configure: Regenerate.
9100 2012-04-19 Pedro Alves <palves@redhat.com>
9102 * Makefile.in (LIBGNU, INCGNU): Adjust.
9103 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9104 (all, install-only, uninstall, clean-info, all-lib, clean)
9105 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9106 * configure.ac: Adjust AC_OUTPUT output.
9107 * aclocal.m4: Regenerate.
9108 * configure: Regenerate.
9110 2012-04-19 Pedro Alves <palves@redhat.com>
9112 * Makefile.in (generated_files): New.
9113 (server_h): Remove the explicit dependency on config.h, and depend
9114 on $generated_files.
9116 2012-04-19 Pedro Alves <palves@redhat.com>
9118 * Makefile.in (INCGNU): Add -Ignulib.
9120 2012-04-19 Pedro Alves <palves@redhat.com>
9122 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9123 (INCGNU): ... this, and spell out -I here.
9124 (GNULIB_LIB): Rename to ...
9126 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9128 2012-04-19 Pedro Alves <palves@redhat.com>
9130 * config.in: Regenerate.
9132 2012-04-19 Pedro Alves <palves@redhat.com>
9134 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9135 * server.h (memmem): Remove declaration.
9136 * config.in: Regenerate.
9137 * configure: Regenerate.
9139 2012-04-19 Yao Qi <yao@codesourcery.com>
9141 * Makefile.in (SFILES): Add common/vec.c.
9145 2012-04-19 Yao Qi <yao@codesourcery.com>
9147 * remote-utils.c (prepare_resume_reply): Replace with macro
9148 target_core_of_thread.
9149 * server.c (handle_qxfer_threads_proper): Likewise.
9150 * target.h (traget_core_of_thread): New macro.
9152 2012-04-18 Pedro Alves <palves@redhat.com>
9154 * aclocal.m4: Regenerate.
9155 * configure: Regenerate.
9157 2012-04-16 Yao Qi <yao@codesourcery.com>
9159 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9160 duplicated on address.
9162 2012-04-16 Yao Qi <yao@codesourcery.com>
9164 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9165 (struct tracepoint_action_ops) <send>: New field.
9166 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9167 (agent_expr_send, x_tracepoint_action_send): New.
9168 (l_tracepoint_action_send): New.
9169 (cmd_qtdp): Download and install tracepoint
9170 according to `use_agent'.
9171 (run_inferior_command): Add one more parameter `len'.
9173 (tracepoint_send_agent): New.
9174 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9176 2012-04-16 Yao Qi <yao@codesourcery.com>
9178 * tracepoint.c (download_tracepoints): Moved to ...
9179 (cmd_qtstart): ... here.
9181 2012-04-14 Yao Qi <yao@codesourcery.com>
9183 * tracepoint.c: Include inttypes.h.
9184 (struct collect_memory_action): Use sized types.
9185 (struct tracepoint): Likewise.
9186 (cmd_qtdp, stop_tracing): Update print specifiers.
9187 (cmd_qtp, response_tracepoint): Likewise.
9188 (collect_data_at_tracepoint): Likewise.
9189 (collect_data_at_step): Likewise.
9191 2012-04-14 Yao Qi <yao@codesourcery.com>
9193 Import gnulib module inttypes.
9194 * aclocal.m4, config.in, configure: Regenerated.
9196 2012-04-14 Yao Qi <yao@codesourcery.com>
9198 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9199 Makefile and config.status at last.
9201 2012-04-13 Yao Qi <yao@codesourcery.com>
9203 * tracepoint.c: Include stdint.h unconditionally.
9205 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9207 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9208 on BFD_HAVE_SYS_PROCFS_TYPE.
9209 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9210 * configure: Regenerate.
9211 * config.in: Likewise.
9213 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9215 * Makefile.in (clean): Also remove x32.c x32-linux.c
9216 x32-avx.c x32-avx-linux.c.
9217 (x32.o): New target.
9219 (x32-linux.o): Likewise.
9220 (x32-linux.c): Likewise.
9221 (x32-avx.o): Likewise.
9222 (x32-avx.c): Likewise.
9223 (x32-avx-linux.o): Likewise.
9224 (x32-avx-linux.c): Likewise.
9226 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9227 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9228 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9229 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9230 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9231 i386/x32-avx-linux.xml.
9233 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9234 (init_registers_x32_avx_linux): Likwise.
9235 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9236 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9238 2012-04-13 Pedro Alves <palves@redhat.com>
9240 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9241 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9242 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9243 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9246 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9248 * linux-x86-low.c (compat_x32_clock_t): New.
9249 (compat_x32_siginfo_t): Likewise.
9250 (compat_x32_siginfo_from_siginfo): Likewise.
9251 (siginfo_from_compat_x32_siginfo): Likewise.
9252 (linux_is_elf64): Likewise.
9253 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9254 and siginfo_from_compat_x32_siginfo for x32.
9255 (x86_arch_setup): Set linux_is_elf64.
9257 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9260 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9262 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9263 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9264 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9265 compatible with process.
9267 2012-04-12 Yao Qi <yao@codesourcery.com>
9269 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9270 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9271 (install-only, install-info, clean): Handle sub dir gnulib.
9272 (all-lib, am--refresh): New targets.
9273 (memmem.o): Remove target.
9274 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9275 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9276 (AC_REPLACE_FUNCS): Remove memmem.
9277 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9278 (AC_OUTPUT): Generate Makefile in gnulib/.
9279 * aclocal.m4, config.in, configure: Regenerated.
9281 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9283 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9285 2012-04-05 Pedro Alves <palves@redhat.com>
9287 -Werror=strict-aliasing
9289 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9292 2012-04-04 Pedro Alves <palves@redhat.com>
9294 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9295 (sparc_store_gregset_from_stack, sparc_store_gregset)
9296 (sparc_breakpoint_at): Fix formatting.
9298 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9300 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9302 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9303 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9304 * config.in: Regenerate.
9305 * configure: Likewise.
9307 2012-03-29 Pedro Alves <palves@redhat.com>
9309 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9310 Correct ptrace arguments.
9312 2012-03-28 Pedro Alves <palves@redhat.com>
9314 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9315 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9316 (IA64_FR1_REGNUM): New defines.
9317 (ia64_fetch_register): New.
9318 (the_low_target): Install it.
9319 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9321 * linux-low.c (linux_fetch_registers): Try the
9322 the_low_target.fetch_register hook first.
9324 * linux-arm-low.c (the_low_target): Adjust.
9325 * linux-bfin-low.c (the_low_target): Adjust.
9326 * linux-cris-low.c (the_low_target): Adjust.
9327 * linux-crisv32-low.c (the_low_target): Adjust.
9328 * linux-m32r-low.c (the_low_target): Adjust.
9329 * linux-m68k-low.c (the_low_target): Adjust.
9330 * linux-mips-low.c (the_low_target): Adjust.
9331 * linux-ppc-low.c (the_low_target): Adjust.
9332 * linux-s390-low.c (the_low_target): Adjust.
9333 * linux-sh-low.c (the_low_target): Adjust.
9334 * linux-sparc-low.c (the_low_target): Adjust.
9335 * linux-tic6x-low.c (the_low_target): Adjust.
9336 * linux-x86-low.c (the_low_target): Adjust.
9337 * linux-xtensa-low.c (the_low_target): Adjust.
9339 2012-03-26 Pedro Alves <palves@redhat.com>
9341 * server.c (handle_qxfer_libraries): Don't bail early if
9342 the_target->qxfer_libraries_svr4 is not NULL.
9344 2012-03-26 Pedro Alves <palves@redhat.com>
9346 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9348 2012-03-23 Pedro Alves <palves@redhat.com>
9350 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9351 "library-list-svr4" element's start tag when the the DSO list is
9354 2012-03-23 Pedro Alves <palves@redhat.com>
9356 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9357 a variable whose type size is the same as the inferior's pointer
9360 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9362 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9364 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9365 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9366 * linux-low.h: Include <signal.h>.
9367 (struct siginfo): Remove forward declaration.
9368 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9371 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9373 * .gitignore: Ignore more files.
9375 2012-03-19 Pedro Alves <palves@redhat.com>
9376 Jan Kratochvil <jan.kratochvil@redhat.com>
9378 * server.c (cont_thread, general_thread): Add describing comments.
9379 (start_inferior): Clear `cont_thread'.
9380 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9383 2012-03-15 Yao Qi <yao@codesourcery.com>
9385 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9387 (cmd_qtdp): ... here.
9389 2012-03-15 Yao Qi <yao@codesourcery.com>
9391 * tracepoint.c (struct tracepoint_action_ops): New.
9392 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9393 (m_tracepoint_action_download): New.
9394 (r_tracepoint_action_download): New.
9395 (x_tracepoint_action_download): New.
9396 (l_tracepoint_action_download): New.
9397 (add_tracepoint_action): Install `action->ops' according type.
9398 (download_tracepoint_1): Move code `download' function pointer
9399 of various tracepoint_action_ops.
9401 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9403 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9404 linux_ptrace_attach_warnings.
9406 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9408 * Makefile.in (linux-ptrace.o): New.
9409 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9410 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9411 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9412 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9413 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9415 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9417 2012-03-08 Yao Qi <yao@codesourcery.com>
9418 Pedro Alves <palves@redhat.com>
9420 Fix PR server/13392.
9421 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9423 * tracepoint.c (remove_tracepoint): New.
9424 (cmd_qtdp): Call remove_tracepoint when failed to install.
9426 2012-03-07 Pedro Alves <palves@redhat.com>
9428 * linux-low.c (get_detach_signal): New.
9429 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9430 Pass on pending signals to PTRACE_DETACH. Check the result of the
9432 * server.c (program_signals, program_signals_p): New.
9433 (handle_general_set): Handle QProgramSignals.
9434 * server.h (program_signals, program_signals_p): Declare.
9436 2012-03-05 Pedro Alves <palves@redhat.com>
9437 Jan Kratochvil <jan.kratochvil@redhat.com>
9439 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9442 2012-03-03 Yao Qi <yao@codesourcery.com>
9444 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9445 agent_look_up_symbols.
9447 2012-03-03 Yao Qi <yao@codesourcery.com>
9449 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9450 (linux-x86-low.o): Likewise.
9451 * server.h: Remove in_process_agent_loaded.
9452 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9456 2012-03-03 Yao Qi <yao@codesourcery.com>
9458 * tracepoint.c (gdb_agent_capability): New global.
9459 (in_process_agent_loaded_ust): Renamed to
9460 `in_process_agent_supports_ust'.
9462 (in_process_agent_supports_ust): Call agent_capability_check.
9463 (clear_installed_tracepoints): Assert that agent supports
9466 2012-03-03 Yao Qi <yao@codesourcery.com>
9468 * linux-low.c (linux_supports_agent): New.
9469 (linux_target_ops): Initialize field `supports_agent' with
9470 linux_supports_agent.
9471 * target.h (struct target_ops) <supports_agent>: New.
9472 (target_supports_agent): New macro.
9473 * server.c (handle_general_set): Handle packet 'QAgent'.
9474 (handle_query): Send `QAgent+'.
9475 * Makefile.in (server.o): Depends on agent.h.
9477 2012-03-03 Yao Qi <yao@codesourcery.com>
9479 * Makefile.in (OBS): Add agent.o.
9480 Add new rule for agent.o.
9481 Track dependence of tracepoint.c on agent.h.
9482 * tracepoint.c (run_inferior_command_1):
9483 (run_inferior_command): Call agent_run_command.
9484 (gdb_ust_connect_sync_socket): Deleted. Move it to
9486 (resume_thread, stop_thread): Likewise.
9487 (gdb_ust_socket_init): Renamed to ...
9488 (gdb_agent_socket_init): ... New.
9489 (gdb_ust_thread): Renamed to ...
9490 (gdb_agent_helper_thread): ... New.
9491 (gdb_ust_init): Move some code to ...
9492 (gdb_agent_init): ... here. New.
9493 [HAVE_UST]: Call gdb_ust_init.
9494 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9495 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9496 * config.in, configure: Regenerated.
9498 2012-03-02 Pedro Alves <palves@redhat.com>
9500 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9501 * linux-low.c (struct simple_pid_list): New.
9502 (stopped_pids): New a struct simple_pid_list pointer.
9503 (add_to_pid_list, pull_pid_from_list): New.
9504 (handle_extended_wait): Don't assume the first signal new children
9505 report is SIGSTOP. Adjust call to pull_pid_from_list.
9506 (linux_wait_for_lwp): Adjust.
9508 2012-03-02 Yao Qi <yao@codesourcery.com>
9510 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9513 2012-03-02 Yao Qi <yao@codesourcery.com>
9515 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9516 `stop_pc' and `tpoint'. Update caller.
9518 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9520 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9521 * linux-low.c (use_linux_regsets): New macro.
9522 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9523 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9524 (linux_register_in_regsets): New function.
9525 (usr_fetch_inferior_registers): Skip registers covered by
9527 (usr_store_inferior_registers): Likewise.
9528 (usr_fetch_inferior_registers): New macro.
9529 (usr_store_inferior_registers): Likewise.
9530 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9531 (linux_store_registers): Likewise.
9532 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9534 (init_registers_mips64_dsp_linux): Likewise.
9535 (init_registers_mips_linux): New macro.
9536 (init_registers_mips_dsp_linux): Likewise.
9537 (mips_dsp_num_regs): Likewise.
9538 (DSP_BASE, DSP_CONTROL): New fallback macros.
9539 (mips_base_regs): New macro.
9540 (mips_regmap): Use it. Fix the size.
9541 (mips_dsp_regmap): New variable.
9542 (mips_dsp_regset_bitmap): Likewise.
9543 (mips_arch_setup): New function.
9544 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9546 (mips_cannot_store_register): Likewise.
9547 (the_low_target): Update .arch_setup, .num_regs and .regmap
9548 initializers. Add .regset_bitmap initializer.
9549 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9551 * linux-bfin-low.c (the_low_target): Likewise.
9552 * linux-cris-low.c (the_low_target): Likewise.
9553 * linux-crisv32-low.c (the_low_target): Likewise.
9554 * linux-ia64-low.c (the_low_target): Likewise.
9555 * linux-m32r-low.c (the_low_target): Likewise.
9556 * linux-m68k-low.c (the_low_target): Likewise.
9557 * linux-ppc-low.c (the_low_target): Likewise.
9558 * linux-s390-low.c (the_low_target): Likewise.
9559 * linux-sh-low.c (the_low_target): Likewise.
9560 * linux-sparc-low.c (the_low_target): Likewise.
9561 * linux-tic6x-low.c (the_low_target): Likewise.
9562 * linux-x86-low.c (the_low_target): Likewise.
9563 * linux-xtensa-low.c (the_low_target): Likewise.
9564 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9565 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9566 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9568 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9569 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9571 2012-02-29 Yao Qi <yao@codesourcery.com>
9572 Pedro Alves <palves@redhat.com>
9574 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9575 `step_over_finished' is true.
9577 2012-02-27 Pedro Alves <palves@redhat.com>
9579 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9580 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9582 2012-02-27 Pedro Alves <palves@redhat.com>
9585 * linux-low.c (pid_is_stopped): New.
9586 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9588 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9590 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9593 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9595 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9597 2012-02-24 Luis Machado <lgustavo@codesourcery>
9599 * server.c (handle_query): Advertise support for target-side
9600 breakpoint condition evaluation.
9601 (process_point_options): New function.
9602 (process_serial_event): When inserting a breakpoint, check for
9603 a target-side condition that should be evaluated.
9605 * mem-break.c: Include regcache.h and ax.h.
9606 (point_cond_list_t): New data structure.
9607 (breakpoint) <cond_list>: New field.
9608 (find_gdb_breakpoint_at): Make non-static.
9609 (delete_gdb_breakpoint_at): Clear any target-side
9611 (clear_gdb_breakpoint_conditions): New function.
9612 (add_condition_to_breakpoint): Likewise.
9613 (add_breakpoint_condition): Likewise.
9614 (gdb_condition_true_at_breakpoint): Likewise.
9615 (gdb_breakpoint_here): Return result directly instead
9616 of going through a local variable.
9618 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9619 (clear_gdb_breakpoint_conditions): Likewise.
9620 (add_breakpoint_condition): Likewise.
9621 (gdb_condition_true_at_breakpoint): Likewise.
9623 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9624 (need_step_over_p): Take target-side breakpoint condition into
9627 2012-02-24 Luis Machado <lgustavo@codesourcery>
9629 * server.h: Include tracepoint.h.
9630 (agent_mem_read, agent_get_trace_state_variable_value,
9631 agent_set_trace_state_variable_value,
9632 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9633 get_set_tsv_func_addr): New prototypes.
9635 * ax.h: New include file.
9636 * ax.c: New source file.
9638 * tracepoint.c: Include ax.h.
9639 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9640 agent_expr, eval_result_type): Move to ax.h.
9641 (parse_agent_expr): Rename to ...
9642 (gdb_parse_agent_expr): ... this, make it non-static and move
9644 (unparse_agent_expr) Rename to ...
9645 (gdb_unparse_agent_expr): ... this, make it non-static and move
9647 (eval_agent_expr): Rename to ...
9648 (eval_tracepoint_agent_expr): ... this.
9649 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9650 forward declarations.
9651 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9652 (agent_get_trace_state_variable_value): New function.
9653 (agent_set_trace_state_variable_value): New function.
9654 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9655 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9656 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9657 (condition_true_at_tracepoint): Likewise.
9658 (parse_agent_expr): Rename to ...
9659 (gdb_parse_agent_expr): ... this and move to ax.c.
9660 (unparse_agent_expr): Rename to ...
9661 (gdb_unparse_agent_expr): ... this and move to ax.c.
9662 (gdb_agent_op_name): Move to ax.c.
9663 (eval_agent_expr): Rename to ...
9664 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9666 (eval_tracepoint_agent_expr): New function.
9667 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9669 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9671 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9672 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9673 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9674 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9675 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9676 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9677 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9678 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9679 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9680 (compile_bytecodes): Remove forward declaration.
9681 (is_goto_target): Move to ax.c.
9682 (compile_bytecodes): Move to ax.c and call
9683 agent_get_trace_state_variable_value (...) and
9684 agent_set_trace_state_variable_value (...).
9686 * Makefile.in: Update ax.c and IPA dependencies.
9688 2012-02-24 Pedro Alves <palves@redhat.com>
9690 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9691 (cmd_bigqtbuffer_circular): ... this. Only handle
9692 'QTBuffer:circular:'.
9693 (handle_tracepoint_general_set): Adjust.
9695 2012-02-16 Yao Qi <yao@codesourcery.com>
9697 * inferiors.c: Move code to ...
9698 * dll.c: .... here. New.
9699 * server.h: Declare clear_dlls.
9700 * Makefile.in (SFILES): Add dll.c.
9704 2012-02-11 Yao Qi <yao@codesourcery.com>
9706 * server.c: (handle_monitor_command): Add a new parameter
9708 (handle_query): Update caller.
9710 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9712 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9713 * configure, config.in: Regenerate.
9714 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9717 2012-02-02 Pedro Alves <palves@redhat.com>
9719 Try SIGKILL first, then PTRACE_KILL.
9720 * linux-low.c (linux_kill_one_lwp): New.
9721 (linux_kill_one_lwp): Rename to ...
9722 (kill_one_lwp_callback): ... this. Use the new
9725 2012-02-02 Pedro Alves <palves@redhat.com>
9727 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9730 2012-01-27 Pedro Alves <palves@redhat.com>
9732 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9733 (elf_64_file_p): Make static.
9734 (linux_pid_exe_is_elf_64_file): New.
9735 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9736 Delete declarations.
9737 (linux_pid_exe_is_elf_64_file): Declare.
9738 * linux-x86-low.c (x86_arch_setup): Use
9739 linux_pid_exe_is_elf_64_file.
9741 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9743 * linux-low.c (linux_wait_for_event_1): Rename to ...
9744 (linux_wait_for_event): ... here and merge it with former
9745 linux_wait_for_event - new variable wait_ptid, use it.
9746 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9748 2012-01-23 Pedro Alves <palves@redhat.com>
9750 * server.c (main): Avoid yet another case of infinite loop while
9751 detaching/killing after a longjmp.
9753 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9756 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9758 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9760 * hostio.c (handle_readlink): New function.
9761 (handle_vFile): Call it to handle "vFile:readlink" packets.
9763 2012-01-20 Pedro Alves <palves@redhat.com>
9764 Ulrich Weigand <ulrich.weigand@linaro.org>
9766 * server.c (handle_v_requests): Only support vAttach and vRun to
9767 start multiple processes when in extended protocol mode.
9769 2012-01-17 Pedro Alves <palves@redhat.com>
9771 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9772 memalign plus mprotect to allocate the scratch buffer.
9774 2012-01-13 Pedro Alves <palves@redhat.com>
9776 * server.c (attach_inferior): Clear `cont_thread'.
9778 2012-01-13 Pedro Alves <palves@redhat.com>
9780 * server.c (main): Avoid infinite loop while detaching/killing
9783 2012-01-09 Doug Evans <dje@google.com>
9785 * server.c (start_inferior): Set last_ptid in --wrapper case.
9787 2012-01-06 Yao Qi <yao@codesourcery.com>
9789 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9791 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9793 2012-01-04 Yao Qi <yao@codesourcery.com>
9795 * tracepoint.c (cmd_qtdp): Print debug message
9796 for static tracepoint.
9798 2012-01-04 Yao Qi <yao@codesourcery.com>
9800 * tracepoint.c (trace_vdebug): Differentiate debug message
9801 between gdbserver and IPA.
9803 2012-01-03 Yao Qi <yao@codesourcery.com>
9805 * tracepoint.c (tracepoint_was_hit): Don't collect for
9808 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9810 * terminal.h: Reformat copyright header.
9812 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9814 * server.c (gdbserver_version): Update copyright year.
9815 * gdbreplay.c (gdbreplay_version): Likewise.
9817 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9819 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9822 2011-12-18 Hui Zhu <teawater@gmail.com>
9823 * linux-low.c (linux_create_inferior): Save return value to ret.
9825 2011-12-18 Hui Zhu <teawater@gmail.com>
9827 * linux-low.c (linux_create_inferior): Save return value to ret.
9829 2011-12-16 Doug Evans <dje@google.com>
9831 * linux-low.c (linux_create_inferior): If stdio connection,
9832 redirect stdin from /dev/null, stdout to stderr.
9833 * remote-utils.c (remote_is_stdio): New static global.
9834 (remote_connection_is_stdio): New function.
9835 (remote_prepare): Handle stdio connection.
9836 (remote_open): Ditto.
9837 (remote_close): Don't close stdin for stdio connections.
9838 (read_prim,write_prim): New functions. Replace all calls to
9839 read/write to these.
9840 * server.c (main): Watch for "-" argument. Move call to
9841 remote_prepare before start_inferior.
9842 * server.h (STDIO_CONNECTION_NAME): New macro.
9843 (remote_connection_is_stdio): Declare.
9845 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9846 in debugging output.
9848 2011-12-15 Yao Qi <yao@codesourcery.com>
9850 * tracepoint.c: Include sys/syscall.h.
9851 (gdb_ust_thread): Remove preprocessor conditional.
9853 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9855 * linux-low.c (linux_detach_one_lwp): Call
9856 the_low_target.prepare_to_resume before detaching.
9858 2011-12-14 Yao Qi <yao@codesourcery.com>
9860 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9863 2011-12-14 Yao Qi <yao@codesourcery.com>
9865 * i386-low.c (i386_low_stopped_data_address): Initialize local
9868 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9872 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9873 DR_CONTROL unless necessary. Extend comments.
9874 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9875 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9877 2011-12-13 Yao Qi <yao@codesourcery.com>
9879 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9881 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9883 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9885 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9886 Print new debug message for such case.
9888 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9890 Fix overlapping memcpy.
9891 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9892 the read_inferior_memory transfer.
9893 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9894 write_inferior_memory transfer.
9895 (set_fast_tracepoint_jump): New variable buf. Use it for the
9896 read_inferior_memory and write_inferior_memory transfers.
9897 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9898 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9899 Use it for the write_inferior_memory transfer.
9900 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9903 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9905 * linux-low.c (fetch_register, store_register): Make code
9906 consistent, fix formatting.
9908 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9910 * linux-low.c (usr_store_inferior_registers): Factor out code
9911 to handle individual registers into...
9912 (store_register): ... this new function.
9914 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9916 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9917 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9918 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9919 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9920 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9921 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9922 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9923 (srv_xmlfiles): Add new XML files.
9925 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9927 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9928 (init_registers_s390_linux32v1): Add prototype.
9929 (init_registers_s390_linux32v2): Likewise.
9930 (init_registers_s390_linux64v1): Likewise.
9931 (init_registers_s390_linux64v2): Likewise.
9932 (init_registers_s390x_linux64v1): Likewise.
9933 (init_registers_s390x_linux64v2): Likewise.
9934 (s390_num_regs): Increment to 52.
9935 (s390_regmap): Add orig_r2 register.
9936 (s390_num_regs_3264): Increment to 68.
9937 (s390_regmap_3264): Add orig_r2 register.
9938 (s390_collect_ptrace_register): Handle orig_r2 register.
9939 (s390_supply_ptrace_register): Likewise.
9940 (s390_fill_last_break): New function.
9941 (s390_store_last_break): Likewise.
9942 (s390_fill_system_call): New function.
9943 (s390_store_system_call): Likewise.
9944 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9946 (s390_check_regset): New function.
9947 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9948 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9949 Update target_regsets for available register sets.
9951 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9952 Jan Kratochvil <jan.kratochvil@redhat.com>
9954 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9955 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9957 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9958 * linux-low.h (struct process_info_private): New member r_debug.
9959 * server.c (handle_qxfer_libraries): Call
9960 the_target->qxfer_libraries_svr4.
9961 (handle_qxfer_libraries_svr4): New function.
9962 (qxfer_packets): New entry "libraries-svr4".
9963 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9964 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9965 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9966 PACKET_qXfer_libraries_svr4.
9968 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9970 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9971 PSW address/mask between 8-byte and 16-byte formats.
9972 (s390_supply_ptrace_register): Likewise.
9973 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9974 basic addressing mode bit.
9976 2011-11-24 Stan Shebs <stan@codesourcery.com>
9978 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9980 2011-11-17 Stan Shebs <stan@codesourcery.com>
9982 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9983 (tracing_start_time): New global.
9984 (tracing_stop_time): New global.
9985 (tracing_user_name): New global.
9986 (tracing_notes): New global.
9987 (tracing_stop_note): New global.
9988 (cmd_qtstart): Set traceframe_usage, start_time.
9989 (stop_tracing): Set stop_time.
9990 (cmd_qtstatus): Report additional status.
9991 (cmd_qtp): New function.
9992 (handle_tracepoint_query): Call it.
9993 (cmd_qtnotes): New function.
9994 (handle_tracepoint_general_set): Call it.
9995 (get_timestamp): Rename from tsv_get_timestamp.
9997 2011-11-14 Stan Shebs <stan@codesourcery.com>
9998 Kwok Cheung Yeung <kcy@codesourcery.com>
10000 * linux-x86-low.c (small_jump_insn): New.
10001 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10002 trampoline and error message, build a trampoline and issue a small
10003 jump instruction to it.
10004 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10005 trampoline and error message.
10006 (x86_get_min_fast_tracepoint_insn_len): New.
10007 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10008 * linux-low.h (struct linux_target_ops): Add arguments to
10009 install_fast_tracepoint_jump_pad operation, add new operation.
10010 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10012 (linux_get_min_fast_tracepoint_insn_len): New function.
10013 (linux_target_op): Add new operation.
10014 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10015 (gdb_trampoline_buffer_end): Ditto.
10016 (gdb_trampoline_buffer_error): Ditto.
10017 (struct ipa_sym_addresses): Add fields for new IPA variables.
10018 (symbol_list): Add entries for new IPA variables.
10019 (struct tracepoint): Add fields to hold the address range of the
10020 trampoline used by the tracepoint.
10021 (trampoline_buffer_head): New static variable.
10022 (trampoline_buffer_tail): Ditto.
10023 (claim_trampoline_space): New function.
10024 (have_fast_tracepoint_trampoline_buffer): New function.
10025 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10027 (install_fast_tracepoint): Ditto, also add error buffer argument.
10028 (cmd_qtminftpilen): New function.
10029 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10030 (fast_tracepoint_from_trampoline_address): New function.
10031 (fast_tracepoint_collecting): Handle trampoline as part of jump
10033 (set_trampoline_buffer_space): New function.
10034 (initialize_tracepoint): Initialize new IPA variables.
10035 * target.h (struct target_ops): Add arguments to
10036 install_fast_tracepoint_jump_pad operation, add new
10037 get_min_fast_tracepoint_insn_len operation.
10038 (target_get_min_fast_tracepoint_insn_len): New.
10039 (install_fast_tracepoint_jump_pad): Add arguments.
10040 * server.h (IPA_BUFSIZ): Define.
10041 * linux-i386-ipa.c: Include extra header files.
10042 (initialize_fast_tracepoint_trampoline_buffer): New function.
10043 (initialize_low_tracepoint): Call it.
10044 * server.h (set_trampoline_buffer_space): Declare.
10045 (claim_trampoline_space): Ditto.
10046 (have_fast_tracepoint_trampoline_buffer): Ditto.
10048 2011-11-14 Yao Qi <yao@codesourcery.com>
10050 * server.c (handle_query): Handle InstallInTrace for qSupported.
10051 * tracepoint.c (add_tracepoint): Sort list.
10052 (install_tracepoint, download_tracepoint): New.
10053 (cmd_qtdp): Call them to install and download tracepoints.
10054 (sort_tracepoints): Removed.
10055 (cmd_qtstart): Update.
10057 2011-11-14 Yao Qi <yao@codesourcery.com>
10059 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10060 * mem-break.h: Declare.
10061 * tracepoint.c (cmd_qtstart): Move some code to ...
10062 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10064 (download_tracepoints): Move some code to ...
10065 (download_tracepoint_1): ... here. New.
10067 2011-11-08 Yao Qi <yao@codesourcery.com>
10069 * remote-utils.c (relocate_instruction): A comment fix.
10071 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10073 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10074 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10075 dr_status_mirror and dr_control_mirror from debug_reg_state.
10076 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10077 (i386_initial_stuff): Remove use of deleted globals.
10078 (i386_get_thread_context, i386_set_thread_context,
10079 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10080 from debug_reg_state.
10082 2011-11-05 Yao Qi <yao@codesourcery.com>
10084 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10085 address as TPOINT's.
10087 2011-11-02 Stan Shebs <stan@codesourcery.com>
10089 * tracepoint.c (agent_mem_read_string): New function.
10090 (eval_agent_expr): Call it for tracenz.
10091 * server.c (handle_query): Report support for tracenz.
10093 2011-11-02 Yao Qi <yao@codesourcery.com>
10095 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10097 2011-11-02 Yao Qi <yao@codesourcery.com>
10099 * target.h: Fix a typo in comment.
10101 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10103 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10104 clobber the breakpoints' shadows with fast tracepoint jumps.
10105 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10106 * target.c (write_inferior_memory): Also pass MYADDR down to
10109 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10111 * configure.ac: Check support for personality routine.
10112 * configure: Regenerate.
10113 * config.in: Likewise.
10114 * linux-low.c: Include <sys/personality.h>.
10115 Define ADDR_NO_RANDOMIZE if necessary.
10116 (linux_create_inferior): Disable address space randomization when
10117 forking inferior, if requested.
10118 (linux_supports_disable_randomization): New function.
10119 (linux_target_ops): Install it.
10120 * server.h (disable_randomization): Declare.
10121 * server.c (disable_randomization): New global variable.
10122 (handle_general_set): Handle QDisableRandomization.
10123 (handle_query): Likewise for qSupported.
10124 (main): Support --disable-randomization and --no-disable-randomization
10125 command line arguments.
10126 * target.h (struct target_ops): Add supports_disable_randomization.
10127 (target_supports_disable_randomization): New macro.
10129 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10131 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10133 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10134 [!PT_GETDSBT] (target_loadmap): New definition.
10135 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10136 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10137 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10138 and PT_GETDSBT to LINUX_LOADMAP.
10139 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10140 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10142 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10144 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10145 (arm_linux_hwbp_cap): New static variable.
10146 (arm_linux_get_hwbp_cap): Replace by ...
10147 (arm_linux_init_hwbp_cap): ... this new function.
10148 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10149 (arm_linux_get_hw_watchpoint_count): Likewise.
10150 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10151 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10152 (arm_prepare_to_resume): Use perror_with_name instead of error.
10154 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10156 * linux-arm-low.c: Include <signal.h>.
10157 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10158 (struct arm_linux_hwbp_cap): New data type.
10159 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10160 (struct arm_linux_hw_breakpoint): New data type.
10161 (MAX_BPTS, MAX_WPTS): Define.
10162 (struct arch_process_info, struct arch_lwp_info): New data types.
10163 (arm_linux_get_hwbp_cap): New function.
10164 (arm_linux_get_hw_breakpoint_count): Likewise.
10165 (arm_linux_get_hw_watchpoint_count): Likewise.
10166 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10167 (arm_hwbp_control_initialize): Likewise.
10168 (arm_hwbp_control_is_enabled): Likewise.
10169 (arm_hwbp_control_is_initialized): Likewise.
10170 (arm_hwbp_control_disable): Likewise.
10171 (arm_linux_hw_breakpoint_equal): Likewise.
10172 (arm_linux_hw_point_initialize): Likewise.
10173 (struct update_registers_data): New data structure.
10174 (update_registers_callback: New function.
10175 (arm_insert_point): Likewise.
10176 (arm_remove_point): Likewise.
10177 (arm_stopped_by_watchpoint): Likewise.
10178 (arm_stopped_data_address): Likewise.
10179 (arm_new_process): Likewise.
10180 (arm_new_thread): Likewise.
10181 (arm_prepare_to_resume): Likewise.
10182 (the_low_target): Register arm_insert_point, arm_remove_point,
10183 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10184 arm_new_thread, and arm_prepare_to_resume.
10186 2011-09-15 Stan Shebs <stan@codesourcery.com>
10188 * server.h (struct emit_ops): Add compare-goto fields.
10189 * tracepoint.c (gdb_agent_op_sizes): New table.
10190 (emit_eq_goto): New function.
10191 (emit_ne_goto): New function.
10192 (emit_lt_goto): New function.
10193 (emit_le_goto): New function.
10194 (emit_gt_goto): New function.
10195 (emit_ge_goto): New function.
10196 (is_goto_target): New function.
10197 (compile_bytecodes): Recognize special cases of compare-goto
10198 combinations and call specialized emitters for them.
10199 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10200 (amd64_emit_ne_goto): New function.
10201 (amd64_emit_lt_goto): New function.
10202 (amd64_emit_le_goto): New function.
10203 (amd64_emit_gt_goto): New function.
10204 (amd64_emit_ge_goto): New function.
10205 (amd64_emit_ops): Add the new functions.
10206 (i386_emit_eq_goto): New function.
10207 (i386_emit_ne_goto): New function.
10208 (i386_emit_lt_goto): New function.
10209 (i386_emit_le_goto): New function.
10210 (i386_emit_gt_goto): New function.
10211 (i386_emit_ge_goto): New function.
10212 (i386_emit_ops): Add the new functions.
10214 2011-09-08 Stan Shebs <stan@codesourcery.com>
10216 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10217 (i386_emit_epilogue): Restore %ebx.
10219 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10221 * server.c (step_thread): Remove definition.
10222 (process_serial_event): Don't handle Hs.
10223 * server.h (step_thread): Remove declaration.
10224 * target.c (set_desired_inferior): Remove use of step_thread.
10226 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10228 * linux-low.c: Include linux-procfs.h.
10229 (linux_attach_lwp_1): Update comments.
10230 (linux_attach): Scan for existing threads when attaching to a
10231 process that is the tgid.
10232 * Makefile.in: Update dependencies.
10234 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10236 * configure.srv: Add linux-procfs.o dependencies.
10238 2011-08-14 Yao Qi <yao@codesourcery.com>
10240 * target.h (struct target_ops): Fix indent.
10241 * win32-low.c (win32_target_ops): Fix comment.
10243 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10244 Yao Qi <yao@codesourcery.com>
10246 * Makefile.in (clean): Remove tic6x-*.c files.
10247 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10248 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10249 (tic6x-c64xp-linux.c): Likewise.
10250 * configure.srv: Add support for tic6x-*-uclinux.
10251 * linux-tic6x-low.c: New.
10252 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10254 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10255 Yao Qi <yao@codesourcery.com>
10257 * target.h (struct target_ops): Add read_loadmap.
10258 * linux-low.c (struct target_loadseg): New type.
10259 (struct target_loadmap): New type.
10260 (linux_read_loadmap): New function.
10261 (linux_target_ops): Add linux_read_loadmap.
10262 * server.c (handle_query): Support qXfer:fdpic:read packet.
10263 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10266 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10268 * win32-low.c: Include <stdint.h>.
10270 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10272 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10273 to the inferior here.
10274 (i386_remove_aligned_watchpoint): Ditto.
10275 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10276 fit part of the watchpoint in the debug registers.
10277 (i386_update_inferior_debug_regs): New.
10278 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10279 registers, and only update the inferior on success.
10280 (i386_low_remove_watchpoint): Ditto.
10282 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10284 * linux-low.c (compare_ints, unique, list_threads, show_process,
10285 linux_core_of_thread): Delete.
10286 (linux_target_ops): Change linux_core_of_thread to
10287 linux_common_core_of_thread.
10288 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10289 * utils.c (malloc_failure): Change type of argument.
10290 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10291 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10292 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10293 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10294 (IPA_OBJS): Add common-utils-ipa.o.
10295 (ptid_h, linux_osdata_h): New macros.
10296 (server_h): Add common/common-utils.h, common/xml-utils.h,
10297 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10299 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10300 ptid.o, buffer.o): New rules.
10301 (linux-low.o): Add common/linux-osdata.h as a dependency.
10302 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10303 * configure.ac: Add AC_HEADER_DIRENT check.
10304 * config.in: Regenerate.
10305 * configure: Regenerate.
10306 * remote-utils.c (xml_escape_text): Delete.
10307 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10308 buffer_xml_printf): Move to common/buffer.c.
10309 * server.c (main): Remove call to initialize_inferiors.
10310 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10311 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10312 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10313 internal_error, gdb_assert, gdb_assert_fail): Delete.
10314 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10315 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10317 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10318 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10319 initialize_inferiors): Delete.
10321 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10323 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10326 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10328 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10330 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10332 2011-05-26 Yao Qi <yao@codesourcery.com>
10334 * Makefile.in (thread-db.o): Track dependence to
10335 common/gdb_thread_db.h.
10336 * thread-db.c: include gdb_thread_db.h from right place.
10338 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10340 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10341 __FILE__ and __LINE__ to internal_error.
10343 2011-05-13 Doug Evans <dje@google.com>
10345 * thread-db.c (try_thread_db_load_from_sdir): New function.
10346 (try_thread_db_load_from_dir): New function.
10347 (thread_db_load_search): Handle $sdir, ignore $pdir.
10348 Remove trying of system directories if search of
10349 libthread-db-search-path fails, that is now done via $sdir.
10351 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10353 * server.c (handle_query): Add EnableDisableTracepoints to the list
10354 of supported features.
10355 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10357 (cmd_qtenable_disable): New.
10358 (cmd_qtstart): Install tracepoints even if disabled.
10359 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10360 receiving a QTEnable or QTDisable packet.
10361 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10362 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10364 (gdb_probe): Skip data collection if static tracepoint is disabled.
10366 2011-05-10 Doug Evans <dje@google.com>
10368 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10370 2011-05-04 Doug Evans <dje@google.com>
10372 * linux-low.c (linux_join): Skip process lookup.
10373 * spu-low.c (spu_join): Ditto.
10374 * server.c (join_inferiors_callback): Delete.
10375 (process_serial_event): For 'D' packet (detach) call join_inferior
10378 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10380 * README: Don't mention xscale*-*-linux*.
10381 * configure.srv (xscale*-*-linux*): Don't handle target.
10383 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10385 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10387 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10388 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10389 (i386_emit_void_call_2): Likewise.
10391 2011-04-26 Yao Qi <yao@codesourcery.com>
10393 * linux-low.c: Move common macros to linux-ptrace.h.
10394 Include linux-ptrace.h.
10395 * Makefile.in (linux_ptrace_h): New.
10396 (linux-low.o): Depends on linux-ptrace.h.
10398 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10400 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10401 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10402 (remote_prepare): New function with most of the TCP code from ...
10403 (remote_open): ... here. Detect PORT here unconditionally. Move also
10404 setting transport_is_reliable.
10405 * server.c (run_once): New variable.
10406 (gdbserver_usage): Document it.
10407 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10408 the first run if RUN_ONCE.
10409 * server.h (run_once, remote_prepare): New declarations.
10411 2011-04-19 Tom Tromey <tromey@redhat.com>
10413 * win32-low.c (handle_load_dll): Remove duplicate "the".
10415 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10417 Remove support for old Cygwin 1.5 versions.
10418 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10419 function to avoid warning.
10420 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10423 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10425 * gdbserver/server.h (Macro _): Define it if not available.
10427 2011-03-14 Michael Snyder <msnyder@vmware.com>
10429 * hostio.c (handle_close): Remove unnecessary null test.
10431 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10433 * Makefile.in (maintainer-clean realclean distclean): Remove
10434 "make ... subdir_do" command.
10436 2011-03-10 Michael Snyder <msnyder@vmware.com>
10438 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10440 * server.c (handle_v_run): Free alloced buffer on early return.
10442 2011-03-09 Yao Qi <yao@codesourcery.com>
10445 2011-03-04 Yao Qi <yao@codesourcery.com>
10447 * Makefile.in: Remove GNU make feature --directory.
10449 2011-03-05 Yao Qi <yao@codesourcery.com>
10451 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10452 (subdir_do): New make target. Copied from gdb/Makefile.
10453 (maintainer-clean, realclean, distclean, clean): Call corresponding
10454 make targets in common/Makefile.
10456 2011-02-11 Yao Qi <yao@codesourcery.com>
10458 * configure.ac: Call AC_PROG_RANLIB.
10459 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10460 * configure: Regenerate.
10462 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10464 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10466 2011-03-06 Yao Qi <yao@codesourcery.com>
10468 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10470 2011-03-05 Yao Qi <yao@codesourcery.com>
10472 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10473 (subdir_do): New make target. Copied from gdb/Makefile.
10474 (maintainer-clean, realclean, distclean, clean): Call corresponding
10475 make targets in common/Makefile.
10477 2011-03-04 Yao Qi <yao@codesourcery.com>
10479 * Makefile.in: Remove GNU make feature --directory.
10481 2011-03-04 Michael Snyder <msnyder@vmware.com>
10483 * server.c (queue_stop_reply): Call xmalloc not malloc.
10485 2011-03-02 Michael Snyder <msnyder@vmware.com>
10487 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10489 2011-02-28 Michael Snyder <msnyder@vmware.com>
10491 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10492 (cmd_qtframe): Ditto.
10493 (cmd_qtbuffer): Ditto.
10494 (cmd_bigqtbuffer): Ditto.
10496 * utils.c (decimal2str): Initialize 'width' to nine, then
10497 don't mess with it.
10499 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10501 * hostio.c (require_data): Free *data, not data.
10503 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10505 * hostio.c (require_data): Use free, not xfree.
10507 2011-02-27 Michael Snyder <msnyder@vmware.com>
10509 * server.c (handle_query): Discard unused value.
10511 * hostio.c (require_data): Free malloc memory before returning
10514 2011-02-26 Michael Snyder <msnyder@vmware.com>
10516 * linux-low.c (list_threads): Call closedir for dirent.
10518 2011-02-27 Michael Snyder <msnyder@vmware.com>
10520 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10521 a case statement falls through.
10523 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10525 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10528 2011-02-26 Michael Snyder <msnyder@vmware.com>
10530 * utils.c (decimal2str): Eliminate dead code and dead param.
10531 (pulongest): Drop dead param from call to decimal2str.
10534 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10536 Revert the following patch (not approved yet):
10537 2011-02-21 Hui Zhu <teawater@gmail.com>
10538 * tracepoint.c (tp_printf): New function.
10539 (eval_agent_expr): Handle gdb_agent_op_printf.
10541 2011-02-21 Hui Zhu <teawater@gmail.com>
10543 * tracepoint.c (tp_printf): New function.
10544 (eval_agent_expr): Handle gdb_agent_op_printf.
10546 2011-02-18 Tom Tromey <tromey@redhat.com>
10548 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10549 (tracepoint.o): Likewise.
10550 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10551 (gdb_agent_op_names): Likewise.
10553 2011-02-18 Tom Tromey <tromey@redhat.com>
10555 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10556 gdb_agent_op_rot>: New constants.
10557 (gdb_agent_op_names): Add pick and roll.
10558 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10561 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10563 * aclocal.m4: Regenerated with aclocal-1.11.1.
10565 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10567 * server.c (handle_qxfer_traceframe_info): New.
10568 (qxfer_packets): Register "traceframe-info".
10569 (handle_query): Report support for qXfer:traceframe-info:read+.
10570 * tracepoint.c (match_blocktype): New.
10571 (traceframe_find_block_type): Rename to ...
10572 (traceframe_walk_blocks): ... this. Add callback filter argument,
10574 (traceframe_find_block_type): New, reimplemented on top of
10575 traceframe_walk_blocks.
10576 (build_traceframe_info_xml): New.
10577 (traceframe_read_info): New.
10578 * server.h (traceframe_read_info): Declare.
10580 2011-02-11 Yao Qi <yao@codesourcery.com>
10582 * configure.ac: Call AC_PROG_RANLIB.
10583 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10584 * configure: Regenerate.
10586 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10588 * server.c (gdb_read_memory): Change return semantics to allow
10590 (handle_search_memory_1): Adjust.
10591 (process_serial_event) <'m' packet>: Handle partial transfers.
10592 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10594 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10596 * regcache.c (init_register_cache): Initialize
10597 regcache->register_status.
10598 (free_register_cache): Release regcache->register_status.
10599 (regcache_cpy): Copy register_status.
10600 (registers_to_string): Print 'x's for unavailable registers.
10601 (supply_register): Mark the register's status valid or
10602 unavailable, depending on whether a buffer was passed in or not.
10603 (supply_register_zeroed): New.
10604 (supply_regblock): Mark the registers' status valid or
10605 unavailable, depending on whether a buffer was passed in or not.
10606 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10607 (struct regcache): New `register_status' field.
10608 (supply_register_zeroed): Declare.
10609 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10610 supply_register_zeroed, rather than passing a NULL buffer to
10612 * tracepoint.c (fetch_traceframe_registers): Update comment.
10614 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10616 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10619 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10621 * server.h (decode_xfer_write): Change prototype.
10622 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10623 and don't extract the annex here.
10624 * server.c (decode_xfer_read): Remove `annex' parameter,
10625 and don't extract the annex here.
10626 (decode_xfer): New.
10627 (struct qxfer): New.
10628 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10629 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10630 (handle_qxfer_statictrace): New functions, abstracted out from
10631 handle_query, and made to use the struct qxfer interface.
10632 (handle_threads_qxfer_proper): Rename to ...
10633 (handle_qxfer_threads_proper): ... this.
10634 (handle_threads_qxfer): Rename to ...
10635 (handle_qxfer_threads): ... this. Adjust.
10636 (qxfer_packets): New array.
10637 (handle_qxfer): New function.
10638 (handle_query): Use handle_qxfer.
10640 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10642 * gdbreplay.c: Shorten lines of >= 80 columns.
10643 * linux-low.c: Ditto.
10644 * linux-ppc-low.c: Ditto.
10645 * linux-s390-low.c: Ditto.
10646 * linux-sparc-low.c: Ditto.
10647 * linux-x86-low.c: Ditto.
10648 * linux-xtensa-low.c: Ditto.
10649 * mem-break.c: Ditto.
10650 * nto-low.c: Ditto.
10651 * regcache.h: Ditto.
10652 * remote-utils.c: Ditto.
10655 * thread-db.c: Ditto.
10656 * tracepoint.c: Ditto.
10658 * win32-low.h: Ditto.
10660 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10662 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10665 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10667 * server.c (gdbserver_version): Update copyright year in version
10669 * gdbreplay.c (gdbreplay_version): Ditto.
10671 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10673 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10674 * linux-bfin-low.c: New file.
10675 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10676 PT_DATA_ADDR for BFIN targets.
10677 * Makefile.in (SFILES): Add linux-bfin-low.c.
10678 (clean): Remove reg-bfin.c.
10679 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10680 * README: Mention supported Blackfin targets.
10682 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10684 * .gitignore: New file.
10686 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10688 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10690 2010-10-22 Jie Zhang <jie@codesourcery.com>
10692 * Makefile.in: Add FLAGS_TO_PASS variable.
10693 (install): Remove dependency of install-only and recursively
10694 invoke make for install-only.
10696 2010-10-04 Doug Evans <dje@google.com>
10698 * Makefile.in (uninstall): Use $(DESTDIR).
10700 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10704 * linux-x86-low.c (compat_siginfo_from_siginfo)
10705 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10706 si_code is < 0. Check for si_code == SI_TIMER before checking for
10709 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10711 * lynx-i386-low.c: New file.
10712 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10714 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10716 * lynx-low.c (ptrace_request_to_str): Remove handling for
10717 request values that have been removed in LynxOS 5.x.
10719 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10721 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10724 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10726 * configure.ac: Add --enable-inprocess-agent option.
10727 * configure: Rebuilt.
10729 2010-09-06 Yao Qi <yao@codesourcery.com>
10731 * linux-low.c (linux_kill): Remove unused variable.
10732 (linux_stabilize_threads): Likewise.
10733 * server.c (start_inferior): Likewise.
10734 (queue_stop_reply_callback): Likewise.
10735 * tracepoint.c (do_action_at_tracepoint): Likewise.
10737 2010-09-06 Yao Qi <yao@codesourcery.com>
10739 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10742 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10744 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10746 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10748 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10751 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10753 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10754 gdbserver/lynx-ppc-low.c: New files.
10755 * Makefile.in (lynx_low_h): New variable.
10756 (lynx-low.o, lynx-ppc-low.o): New rules.
10757 * configure.ac: On LynxOS, link with -lnetinet.
10758 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10759 * configure: regenerate.
10761 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10763 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10764 * configure.ac: Add check for vasprintf and vsnprintf.
10765 * configure, config.in: Regenerate.
10766 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10768 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10770 * gdbreplay.c: Move include of alloca.h up, next to include of
10772 * server.h: Add include of malloc.h.
10773 * mem-break.c: Remove include of malloc.h.
10774 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10776 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10778 * Makefile.in (memmem.o): Build with -Wno-error.
10780 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10782 * utils.c (xsnprintf): Make non-static.
10783 * server.h: Add xsnprintf declaration.
10784 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10785 replace calls to snprintf by calls to xsnprintf throughout.
10787 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10789 * configure.ac: Add configure check for alloca.
10790 * configure, config.in: Regenerate.
10791 * server.h: Include alloca.h if it exists.
10792 * gdbreplay.c: Include alloca.h if it exists.
10794 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10796 * linux-low.c (__SIGRTMIN): Define if not already defined.
10797 (linux_create_inferior): Check for __ANDROID__ rather than
10799 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10800 are already deferred.
10801 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10802 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10803 stopped and already has a pending signal to report.
10804 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10805 a pending signal to report or is moving out of a jump pad.
10806 (linux_init_signals): Check for __ANDROID__ rather than
10809 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10811 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10812 debug_threads check. Avoid a linear search when not doing debug
10815 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10817 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10818 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10819 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10820 (process_event): Change local fd's type to gdb_fildes_t.
10821 (create_file_handler): Adjust prototype.
10822 (delete_file_handler): Adjust prototype.
10823 (handle_file_event): Adjust prototype. Use pfildes.
10824 (create_file_event): Adjsut prototype.
10825 * remote-utils.c (remote_desc, listen_desc): Change type to
10827 * server.h: New gdb_fildes_t typedef.
10828 [USE_WIN32API]: Include winsock2.h.
10829 (delete_file_handler, add_file_handler): Adjust prototypes.
10830 (pfildes): Declare.
10831 * utils.c (pfildes): New.
10833 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10835 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10836 * configure: Regenerate.
10838 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10840 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10841 (linux_done_accessing_memory): ... this.
10842 (linux_target_ops): Adjust.
10843 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10844 * nto-low.c (nto_target_ops): Adjust comment.
10845 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10846 * spu-low.c (spu_target_ops): Adjust comment.
10847 * target.h (target_ops): Rename unprepare_to_access_memory field
10848 to done_accessing_memory.
10849 (unprepare_to_access_memory): Rename to ...
10850 (done_accessing_memory): ... this.
10852 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10854 * linux-low.c (linux_prepare_to_access_memory): New.
10855 (linux_unprepare_to_access_memory): New.
10856 (linux_target_ops): Install them.
10857 * server.c (read_memory): Rename to ...
10858 (gdb_read_memory): ... this. Use
10859 prepare_to_access_memory/prepare_to_access_memory.
10860 (write_memory): Rename to ...
10861 (gdb_write_memory): ... this. Use
10862 prepare_to_access_memory/prepare_to_access_memory.
10863 (handle_search_memory_1): Adjust.
10864 (process_serial_event): Adjust.
10865 * target.h (struct target_ops): New fields
10866 prepare_to_access_memory and unprepare_to_access_memory.
10867 (prepare_to_access_memory, unprepare_to_access_memory): New.
10868 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10869 prepare_to_access_memory/prepare_to_access_memory.
10870 * nto-low.c (nto_target_ops): Adjust.
10871 * spu-low.c (spu_target_ops): Adjust.
10872 * win32-low.c (win32_target_ops): Adjust.
10874 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10876 * Makefile.in (WARN_CFLAGS): Get it from configure.
10877 (WERROR_CFLAGS): New.
10878 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10879 * configure.ac: Introduce --enable-werror, which adds -Werror to
10880 the compiler command line. Enabled by default. Disable with
10881 --disable-werror. Add -Wdeclaration-after-statement
10882 Wpointer-arith and -Wformat-nonliteral to warning flags.
10883 * configure: Regenerate.
10885 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10887 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10889 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10891 * gdbreplay.c (remote_error): New.
10893 (expect): Use gdbchar. Check for error reading from GDB.
10894 Clarify sync error output.
10895 (play): Check for errors writing to GDB.
10896 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10897 * remote-utils.c (getpkt): Check for errors writing to the remote
10900 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10902 * linux-low.c (linux_wait_1): Move non-debugging code out of
10903 `debug_threads' control.
10905 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10907 * linux-low.c (linux_wait_1): Don't set last_status here.
10908 * server.c (push_event, queue_stop_reply_callback): Assert we're
10909 not pushing a TARGET_WAITKIND_IGNORE event.
10910 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10911 (myresume, handle_target_event): Set the thread's last_resume_kind
10912 and last_status from the target returned status.
10914 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10918 * linux-x86-low.c (update_debug_registers_callback): New.
10919 (i386_dr_low_set_addr): Use it.
10920 (i386_dr_low_get_addr): New.
10921 (i386_dr_low_set_control): Use update_debug_registers_callback.
10922 (i386_dr_low_get_control): New.
10923 (i386_dr_low_get_status): Adjust.
10924 * linux-low.c (linux_stop_lwp): New.
10925 * linux-low.h (linux_stop_lwp): Declare.
10927 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10928 argument instead of a i386_debug_reg_state.
10929 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10930 a i386_debug_reg_state.
10931 (i386_insert_aligned_watchpoint): Adjust.
10932 (i386_remove_aligned_watchpoint): Adjust.
10933 (i386_low_stopped_data_address): Read the debug registers from the
10934 inferior instead of from the mirrors.
10935 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10936 (i386_dr_low_get_addr): Declare.
10937 (i386_dr_low_get_control): Declare.
10938 (i386_dr_low_get_status): Change prototype.
10940 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10941 (i386_dr_low_get_addr): New.
10942 (i386_dr_low_get_control): New.
10943 (i386_dr_low_get_status): Adjust prototype. Return
10945 (i386_initial_stuff): Clear dr_status_mirror and
10947 (i386_get_thread_context): Adjust.
10948 (i386_set_thread_context): Adjust.
10949 (i386_thread_added): Adjust.
10951 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10953 * linux-low.h (linux_thread_area): Delete declaration.
10955 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10957 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10958 after its termination.
10960 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10962 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10963 (gdb_wants_all_stopped): Delete.
10964 (linux_wait_1): Don't call them.
10965 * server.c (handle_v_cont): Tag all threads as want-stopped.
10966 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10967 stopped as "client-wants-stopped".
10969 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10971 * Makefile.in (signals_h): New.
10972 (server_h): Depend on it.
10973 (server.o): Don't depend on $(signals_def).
10974 (signals.o): Depend on $(signals_def).
10976 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10978 * Makefile.in (signals_def): New.
10979 (server_h): Append include/gdb/signals.h and signals_def.
10980 (server.o): Append signals_def.
10982 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10984 * server.c (handle_target_event): Use target_signal_to_host for
10985 resume_info.sig initialization.
10986 * target.h (struct thread_resume) <sig>: New comment.
10988 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10990 * server.c (handle_query): strcpy() the returned string from paddress()
10991 instead of sprintf().
10992 * utils.c (paddress): Return phex_nz().
10994 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10996 * server.c (handle_v_cont): Call mourn_inferior if process
10998 (myresume): Likewise.
11000 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11002 Static tracepoints, and integration with UST.
11004 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11005 * mem-break.c (uninsert_all_breakpoints)
11006 (reinsert_all_breakpoints): New.
11007 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11008 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11009 (gdb_agent_ust_loaded, helper_thread_id)
11010 (gdb_agent_helper_thread_id): New macros.
11011 (struct ipa_sym_addresses): Add addr_ust_loaded,
11012 addr_helper_thread_id, addr_cmd_buf.
11013 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11014 (in_process_agent_loaded_ust): New.
11015 (write_e_ust_not_loaded): New.
11016 (maybe_write_ipa_ust_not_loaded): New.
11017 (struct collect_static_trace_data_action): New.
11018 (enum tracepoint_type) <static_tracepoint>: New.
11019 (struct tracepoint) <handle>: Mention static tracepoints.
11020 (struct static_tracepoint_ctx): New.
11021 (CMD_BUF_SIZE): New.
11022 (add_tracepoint_action): Handle static tracepoint actions.
11023 (unprobe_marker_at): New.
11024 (clear_installed_tracepoints): Handle static tracepoints.
11025 (cmd_qtdp): Handle static tracepoints.
11026 (probe_marker_at): New.
11027 (cmd_qtstart): Handle static tracepoints.
11028 (response_tracepoint): Handle static tracepoints.
11029 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11030 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11031 (get_context_regcache): Handle static tracepoints.
11032 (do_action_at_tracepoint): Handle static tracepoint actions.
11033 (traceframe_find_block_type): Handle static trace data blocks.
11034 (traceframe_read_sdata): New.
11035 (download_tracepoints): Download static tracepoint actions.
11036 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11037 (GDB_PROBE_NAME): New.
11039 (GET_UST_SYM): New.
11042 (ust_marker_to_static_tracepoint): New.
11044 (collect_ust_data_at_tracepoint): New.
11045 (gdb_ust_probe): New.
11046 (UNIX_PATH_MAX, SOCK_DIR): New.
11047 (gdb_ust_connect_sync_socket): New.
11048 (resume_thread, stop_thread): New.
11049 (run_inferior_command): New.
11050 (init_named_socket): New.
11051 (gdb_ust_socket_init): New.
11052 (cstr_to_hexstr): New.
11054 (first_marker, next_marker): New.
11055 (response_ust_marker): New.
11056 (cmd_qtfstm, cmd_qtsstm): New.
11057 (unprobe_marker_at, probe_marker_at): New.
11058 (cmd_qtstmat, gdb_ust_thread): New.
11059 (gdb_ust_init): New.
11060 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11061 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11062 (ST_REGENTRY): New.
11063 (x86_64_st_collect_regmap): New.
11064 (X86_64_NUM_ST_COLLECT_GREGS): New.
11065 (AMD64_RIP_REGNUM): New.
11066 (supply_static_tracepoint_registers): New.
11067 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11068 (ST_REGENTRY): New.
11069 (i386_st_collect_regmap): New.
11070 (i386_NUM_ST_COLLECT_GREGS): New.
11071 (supply_static_tracepoint_registers): New.
11072 * server.c (handle_query): Handle qXfer:statictrace:read.
11073 <qSupported>: Report support for StaticTracepoints, and
11074 qXfer:statictrace:read features.
11075 * server.h (traceframe_read_sdata)
11076 (supply_static_tracepoint_registers): Declare.
11077 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11078 (unpack_varlen_hex): Include in IPA build.
11079 * Makefile.in (ustlibs, ustinc): New.
11080 (IPA_OBJS): Add remote-utils-ipa.o.
11081 ($(IPA_LIB)): Link -ldl and -lpthread.
11083 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11084 * config.in, configure: Regenerate.
11086 2010-06-20 Ian Lance Taylor <iant@google.com>
11087 Pedro Alves <pedro@codesourcery.com>
11089 * linux-x86-low.c (always_true): Delete.
11090 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11091 trying to fool the compiler with always_true.
11093 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11095 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11096 conditions in gdbserver.
11098 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11100 * spu-low.c (spu_read_memory): Wrap around local store limit.
11101 (spu_write_memory): Likewise.
11103 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11105 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11106 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11108 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11110 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11111 uses with LONGEST uses.
11113 2010-06-14 Stan Shebs <stan@codesourcery.com>
11114 Pedro Alves <pedro@codesourcery.com>
11118 * linux-x86-low.c: Include limits.h.
11120 (always_true): New.
11123 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11124 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11125 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11126 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11127 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11128 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11129 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11130 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11131 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11132 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11133 (amd64_emit_void_call_2): New.
11134 (amd64_emit_ops): New.
11135 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11136 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11137 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11138 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11139 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11140 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11141 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11142 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11143 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11144 (i386_emit_stack_adjust, i386_emit_int_call_1)
11145 (i386_emit_void_call_2): New.
11146 (i386_emit_ops): New.
11147 (x86_emit_ops): New.
11148 (the_low_target): Install x86_emit_ops.
11149 * server.h (struct emit_ops): New.
11150 (get_raw_reg_func_addr): Declare.
11151 (current_insn_ptr, emit_error): Declare.
11152 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11153 (set_trace_state_variable_value): New defines.
11154 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11155 addr_get_trace_state_variable_value and
11156 addr_set_trace_state_variable_value.
11157 (symbol_list): New fields for get_raw_reg,
11158 get_trace_state_variable_value and set_trace_state_variable_value.
11159 (condfn): New typedef.
11160 (struct tracepoint): New field `compiled_cond'.
11161 (do_action_at_tracepoint): Clear compiled_cond.
11162 (get_trace_state_variable_value, set_trace_state_variable_value):
11164 (condition_true_at_tracepoint): If there's a compiled condition,
11166 (current_insn_ptr, emit_error): New globals.
11167 (struct bytecode_address): New.
11168 (get_raw_reg_func_addr): New.
11169 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11170 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11171 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11172 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11173 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11174 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11175 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11176 (compile_tracepoint_condition, compile_bytecodes): New.
11177 * target.h (emit_ops): Forward declare.
11178 (struct target_ops): New field emit_ops.
11179 (target_emit_ops): New.
11180 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11181 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11182 * linux-low.c (linux_emit_ops): New.
11183 (linux_target_ops): Install it.
11184 * linux-low.h (struct linux_target_ops): New field emit_ops.
11186 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11188 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11189 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11191 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11192 Stan Shebs <stan@codesourcery.com>
11194 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11195 (all): Depend on $(extra_libraries).
11196 (install-only): Install the IPA.
11197 (IPA_OBJS, IPA_LIB): New.
11198 (clean): Remove the IPA lib.
11199 (IPAGENT_CFLAGS): New.
11200 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11201 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11202 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11203 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11204 * configure.ac: Check for atomic builtins support in the compiler.
11205 (IPA_DEPFILES, extra_libraries): Define.
11206 * configure.srv (ipa_obj): Add description.
11207 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11208 (i[34567]86-*-linux*): Set ipa_obj.
11209 (x86_64-*-linux*): Set ipa_obj.
11210 * linux-low.c (stabilizing_threads): New.
11211 (supports_fast_tracepoints): New.
11212 (linux_detach): Stabilize threads before detaching.
11213 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11214 the lwp is either not stabilizing, or is moving out of a jump pad.
11215 (linux_fast_tracepoint_collecting): New.
11216 (maybe_move_out_of_jump_pad): New.
11217 (enqueue_one_deferred_signal): New.
11218 (dequeue_one_deferred_signal): New.
11219 (linux_wait_for_event_1): If moving out of a jump pad, defer
11220 pending signals to later.
11221 (linux_stabilize_threads): New.
11222 (linux_wait_1): Check if threads need moving out of jump pads, and
11224 (stuck_in_jump_pad_callback): New.
11225 (move_out_of_jump_pad_callback): New.
11226 (lwp_running): New.
11227 (linux_resume_one_lwp): Handle moving out of jump pads.
11228 (linux_set_resume_request): Dequeue deferred signals.
11229 (need_step_over_p): Also step over fast tracepoint jumps.
11230 (start_step_over): Also uninsert fast tracepoint jumps.
11231 (finish_step_over): Also reinsert fast tracepoint jumps.
11232 (linux_install_fast_tracepoint_jump): New.
11233 (linux_target_ops): Install linux_stabilize_threads and
11234 linux_install_fast_tracepoint_jump_pad.
11235 * linux-low.h (linux_target_ops) <get_thread_area,
11236 install_fast_tracepoint_jump_pad>: New fields.
11237 (struct lwp_info) <collecting_fast_tracepoint,
11238 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11239 (linux_get_thread_area): Declare.
11240 * linux-x86-low.c (jump_insn): New.
11241 (x86_get_thread_area): New.
11242 (append_insns): New.
11243 (push_opcode): New.
11244 (amd64_install_fast_tracepoint_jump_pad): New.
11245 (i386_install_fast_tracepoint_jump_pad): New.
11246 (x86_install_fast_tracepoint_jump_pad): New.
11247 (the_low_target): Install x86_get_thread_area and
11248 x86_install_fast_tracepoint_jump_pad.
11249 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11250 (struct fast_tracepoint_jump): New.
11251 (fast_tracepoint_jump_insn): New.
11252 (fast_tracepoint_jump_shadow): New.
11253 (find_fast_tracepoint_jump_at): New.
11254 (fast_tracepoint_jump_here): New.
11255 (delete_fast_tracepoint_jump): New.
11256 (set_fast_tracepoint_jump): New.
11257 (uninsert_fast_tracepoint_jumps_at): New.
11258 (reinsert_fast_tracepoint_jumps_at): New.
11259 (set_breakpoint_at): Use write_inferior_memory.
11260 (uninsert_raw_breakpoint): Use write_inferior_memory.
11261 (check_mem_read): Mask out fast tracepoint jumps.
11262 (check_mem_write): Mask out fast tracepoint jumps.
11263 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11264 (set_fast_tracepoint_jump): Declare.
11265 (delete_fast_tracepoint_jump)
11266 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11267 (reinsert_fast_tracepoint_jumps_at): Declare.
11268 * regcache.c: Don't compile many functions when building the
11269 in-process agent library.
11270 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11271 the register buffer in the heap.
11272 (free_register_cache): If the register buffer isn't owned by the
11273 regcache, don't free it.
11274 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11275 pre-existing register caches.
11276 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11278 (convert_ascii_to_int): : Constify `from' parameter type.
11279 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11280 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11281 the needed buffer in-place.
11282 (relocate_instruction): New.
11283 * server.c (handle_query) <qSymbols>: If the target supports
11284 tracepoints, give it a chance of looking up symbols. Report
11285 support for fast tracepoints.
11286 (handle_status): Stabilize threads.
11287 (process_serial_event): Adjust.
11288 * server.h (struct fast_tracepoint_jump): Forward declare.
11289 (struct process_info) <fast_tracepoint_jumps>: New field.
11290 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11291 (decode_X_packet, decode_M_packet): Adjust.
11292 (relocate_instruction): Declare.
11293 (in_process_agent_loaded): Declare.
11294 (tracepoint_look_up_symbols): Declare.
11295 (struct fast_tpoint_collect_status): Declare.
11296 (fast_tracepoint_collecting): Declare.
11297 (force_unlock_trace_buffer): Declare.
11298 (handle_tracepoint_bkpts): Declare.
11299 (initialize_low_tracepoint)
11300 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11301 * target.h (struct target_ops) <stabilize_threads,
11302 install_fast_tracepoint_jump_pad>: New fields.
11303 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11304 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11305 [HAVE_STDINT_H]: Include stdint.h.
11306 (trace_debug_1): Rename to ...
11307 (trace_vdebug): ... this.
11308 (trace_debug): Rename to ...
11309 (trace_debug_1): ... this. Add `level' parameter.
11310 (trace_debug): New.
11311 (ATTR_USED, ATTR_NOINLINE): New.
11312 (IP_AGENT_EXPORT): New.
11313 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11314 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11315 (about_to_request_buffer_space, trace_buffer_is_full)
11316 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11317 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11318 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11319 (traceframe_write_count, traceframes_created)
11320 (trace_state_variables)
11321 New renaming defines.
11322 (struct ipa_sym_addresses): New.
11323 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11324 (symbol_list): New.
11325 (ipa_sym_addrs): New.
11326 (all_tracepoint_symbols_looked_up): New.
11327 (in_process_agent_loaded): New.
11328 (write_e_ipa_not_loaded): New.
11329 (maybe_write_ipa_not_loaded): New.
11330 (tracepoint_look_up_symbols): New.
11331 (debug_threads) [IN_PROCESS_AGENT]: New.
11332 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11333 (UNKNOWN_SIDE_EFFECTS): New.
11334 (stop_tracing): New.
11335 (flush_trace_buffer): New.
11336 (stop_tracing_bkpt): New.
11337 (flush_trace_buffer_bkpt): New.
11338 (read_inferior_integer): New.
11339 (read_inferior_uinteger): New.
11340 (read_inferior_data_pointer): New.
11341 (write_inferior_data_pointer): New.
11342 (write_inferior_integer): New.
11343 (write_inferior_uinteger): New.
11344 (struct collect_static_trace_data_action): Delete.
11345 (enum tracepoint_type): New.
11346 (struct tracepoint) <type>: New field `type'.
11347 <actions_str, step_actions, step_actions_str>: Only include in
11349 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11350 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11351 (tracepoints): Use IP_AGENT_EXPORT.
11352 (last_tracepoint): Don't include in the IPA.
11353 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11354 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11355 (alloced_trace_state_variables): New.
11356 (trace_state_variables): Use IP_AGENT_EXPORT.
11357 (traceframe_t): Delete unused variable.
11358 (circular_trace_buffer): Don't include in the IPA.
11359 (trace_buffer_start): Delete.
11360 (struct trace_buffer_control): New.
11361 (trace_buffer_free): Delete.
11362 (struct ipa_trace_buffer_control): New.
11363 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11364 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11366 (trace_buffer_ctrl): New.
11367 (TRACE_BUFFER_CTRL_CURR): New.
11368 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11369 Reimplement as macros.
11370 (trace_buffer_wrap): Delete.
11371 (traceframe_write_count, traceframe_read_count)
11372 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11373 (struct tracepoint_hit_ctx) <type>: New field.
11374 (struct fast_tracepoint_ctx): New.
11375 (memory_barrier): New.
11377 (record_tracepoint_error): Update atomically in the IPA.
11378 (clear_inferior_trace_buffer): New.
11379 (about_to_request_buffer_space): New.
11380 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11381 updating the same buffer.
11382 (add_tracepoint): Default the tracepoint's type to trap
11383 tracepoint, and orig_size to -1.
11384 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11385 internal variables.
11386 (create_trace_state_variable): New parameter `gdb'. Handle it.
11387 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11388 (cmd_qtdp): Handle fast tracepoints.
11389 (cmd_qtdv): Adjust.
11390 (max_jump_pad_size): New.
11391 (gdb_jump_pad_head): New.
11392 (get_jump_space_head): New.
11393 (claim_jump_space): New.
11394 (sort_tracepoints): New.
11395 (MAX_JUMP_SIZE): New.
11396 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11398 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11399 support. Upload fast traceframes, and delete internal IPA
11401 (stop_tracing_handler): New.
11402 (flush_trace_buffer_handler): New.
11403 (cmd_qtstop): Upload fast tracepoints.
11404 (response_tracepoint): Handle fast tracepoints.
11405 (tracepoint_finished_step): Upload fast traceframes. Set the
11406 tracepoint hit context's tracepoint type.
11407 (handle_tracepoint_bkpts): New.
11408 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11409 type. Add comment about fast tracepoints.
11410 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11411 non-existing action_str field.
11412 (get_context_regcache): Handle fast tracepoints.
11413 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11415 (fast_tracepoint_from_jump_pad_address): New.
11416 (fast_tracepoint_from_ipa_tpoint_address): New.
11417 (collecting_t): New.
11418 (force_unlock_trace_buffer): New.
11419 (fast_tracepoint_collecting): New.
11421 (gdb_collect): New.
11422 (write_inferior_data_ptr): New.
11423 (target_tp_heap): New.
11424 (target_malloc): New.
11425 (download_agent_expr): New.
11427 (download_tracepoints): New.
11428 (download_trace_state_variables): New.
11429 (upload_fast_traceframes): New.
11430 (IPA_FIRST_TRACEFRAME): New.
11431 (IPA_NEXT_TRACEFRAME_1): New.
11432 (IPA_NEXT_TRACEFRAME): New.
11433 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11434 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11435 (gdb_jump_pad_buffer_end): New.
11436 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11437 (initialize_tracepoint): Adjust.
11438 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11439 buffer. Initialize the low module.
11440 * utils.c (PREFIX, TOOLNAME): New.
11441 (malloc_failure): Use PREFIX.
11442 (error): In the IPA, an error causes an exit.
11443 (fatal, warning): Use PREFIX.
11444 (internal_error): Use TOOLNAME.
11445 (NUMCELLS): Increase to 10.
11446 * configure, config.in: Regenerate.
11448 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11450 * server.c (handle_query) <qSupported>: Do two passes over the
11451 qSupported string to avoid nesting strtok.
11453 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11455 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11457 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11458 -Wl,--dynamic-list.
11459 * configure: Regenerate.
11460 * proc-service.list: New.
11462 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11464 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11467 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11469 * gdbreplay.c (remote_open): Check error return from socket() call by
11470 its equality to -1 not by it being negative.
11471 * remote-utils.c (remote_open): Likewise.
11473 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11475 * config.h: Regenerate.
11477 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11479 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11480 doesn't provide PTRACE_GET_THREAD_AREA.
11482 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11484 * linux-m68k-low.c: Include <asm/ptrace.h>
11485 (ps_get_thread_area): Implement.
11487 2010-05-03 Doug Evans <dje@google.com>
11489 * event-loop.c (struct callback_event): New struct.
11490 (callback_list): New global.
11491 (append_callback_event, delete_callback_event): New functions.
11492 (process_callback): New function.
11493 (start_event_loop): Call it.
11494 * remote-utils.c (NOT_SCHEDULED): Define.
11495 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11496 moved out of readchar.
11497 (readchar): Rewrite. Call reschedule before returning.
11498 (reset_readchar): New function.
11499 (remote_close): Call it.
11500 (process_remaining, reschedule): New functions.
11501 * server.h (callback_handler_func): New typedef.
11502 (append_callback_event, delete_callback_event): Declare.
11504 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11506 * proc-service.c (ps_pglobal_lookup): Use
11507 thread_db_look_up_one_symbol.
11508 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11509 parameter. Use it instead of all_symbols_looked_up.
11510 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11512 (all_symbols_looked_up): Don't declare.
11513 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11514 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11516 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11517 Set all_symbols_looked_up here.
11518 (thread_db_look_up_one_symbol): New.
11519 (thread_db_get_tls_address): Adjust.
11520 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11521 thread_db object on the heap, and tentatively set it in the
11523 (thread_db_init): Don't set all_symbols_looked_up here.
11524 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11526 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11528 * linux-low.c (linux_kill, linux_detach): Adjust.
11529 (status_pending_p_callback): Remove redundant statement. Check
11530 for !TARGET_WAITIKIND_IGNORE, instead of
11531 TARGET_WAITKIND_STOPPED.
11532 (handle_tracepoints): Make sure LWP is locked. Adjust.
11533 (linux_wait_for_event_1): Adjust.
11534 (linux_cancel_breakpoints): New.
11535 (unsuspend_one_lwp): New.
11536 (unsuspend_all_lwps): New.
11537 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11538 (send_sigstop_callback): Change return type to int, add new
11539 `except' parameter and handle it.
11540 (suspend_and_send_sigstop_callback): New.
11541 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11542 pass them down. If SUSPEND, also increment the lwp's suspend
11544 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11545 (need_step_over_p): Don't consider suspended LWPs.
11546 (start_step_over): Adjust.
11547 (proceed_one_lwp): Change return type to int, add new `except'
11548 parameter and handle it.
11549 (unsuspend_and_proceed_one_lwp): New.
11550 (proceed_all_lwps): Use find_inferior instead of
11552 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11553 also decrement the suspend count of LWPs. Pass `except' down,
11554 instead of hacking its suspend count.
11555 (linux_pause_all): Add `freeze' parameter. Adjust.
11556 (linux_unpause_all): New.
11557 (linux_target_ops): Install linux_unpause_all.
11558 * server.c (handle_status): Adjust.
11559 * target.h (struct target_ops): New fields `unpause_all' and
11560 `cancel_breakpoints'. Add new parameter to `pause_all'.
11561 (pause_all): Add new `freeze' parameter.
11562 (unpause_all): New.
11563 (cancel_breakpoints): New.
11564 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11565 cancel breakpoints.
11566 (cmd_qtstart): Pause threads.
11567 (stop_tracing): Pause threads, and cancel breakpoints.
11568 * win32-low.c (win32_target_ops): Adjust.
11570 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11572 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11573 the inferior right away from here...
11574 (linux_wait_1): ... to here, and adjust to check the thread's
11575 last_resume_kind instead of the lwp's step or stop_expected flags.
11577 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11579 * README: Use consistent `GDB' and `GDBserver' spellings.
11581 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11583 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11584 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11585 (linux_detach_one_lwp): Assume the lwp is stopped.
11586 (any_thread_of): Delete.
11587 (linux_detach): Stop all lwps here. Don't blindly delete all
11589 (delete_lwp_callback): New.
11590 (linux_mourn): Delete all lwps of the process that is gone.
11591 (linux_wait_1): Don't delete the last lwp of the process here.
11592 * mem-break.h (mark_breakpoints_out): Declare.
11593 * mem-break.c (mark_breakpoints_out): New.
11594 (free_all_breakpoints): Use it.
11595 * server.c (handle_target_event): If the process is gone, mark
11597 * thread-db.c (struct thread_db) <create_bp>: New field.
11598 (thread_db_enable_reporting): Fix prototype. Store a thread event
11599 breakpoint reference in the thread_db struct.
11600 (thread_db_load_search): Clear the thread_db object.
11601 (try_thread_db_load_1): Ditto.
11602 (switch_to_process): New.
11603 (disable_thread_event_reporting): Use it.
11604 (remove_thread_event_breakpoints): New.
11605 (thread_db_detach, thread_db_mourn): Use it.
11607 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11609 * linux-low.c (linux_enable_event_reporting): New.
11610 (linux_wait_for_event_1, handle_extended_wait): Use it.
11612 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11614 * linux-low.c (linux_kill_one_lwp, linux_kill)
11615 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11616 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11617 SIGSTOP even if the LWP is stopped.
11618 (send_sigstop_callback): New.
11619 (stop_all_lwps): Use send_sigstop_callback instead.
11620 (linux_resume_one_thread): Adjust.
11621 (proceed_one_lwp): Still proceed an LWP that the client has
11622 requested to stop, if we haven't reported it as stopped yet. Make
11623 sure that LWPs the client want stopped, have a pending SIGSTOP.
11625 2010-04-26 Doug Evans <dje@google.com>
11627 * server.c (handle_general_set): Make static.
11629 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11630 Print received char after testing for error/eof instead of before.
11631 (input_interrupt): Tweak comment.
11633 2010-04-23 Doug Evans <dje@google.com>
11635 * server.c (start_inferior): Print inferior argv if --debug.
11637 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11639 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11640 * nto-x86-low.c: Include server.h
11642 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11644 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11645 be consistent with other sources of this directory.
11646 (init_registers_amd64): Correct name of source file of this function
11649 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11651 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11652 64-bit executables.
11654 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11656 * win32-i386-low.c: Add 64-bit support.
11657 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11658 (init_registers_amd64): Declare.
11659 (mappings): Add 64-bit version of array.
11660 (init_windows_x86): New function.
11661 (the_low_target): Change init_arch field to init_windows_x86.
11663 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11665 * win32-low.c: Adapt to support also 64-bit architecture.
11666 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11667 (get_image_name): Use SIZE_T type for local variable `done'.
11668 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11669 (toolhelp_get_dll_name): Idem.
11670 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11671 Use uintptr_t typecast to avoid warning.
11672 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11673 (handle_exception): Use phex_nz to avoid warning.
11674 (win32_wait): Remove unused local variable `process'.
11676 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11678 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11681 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11683 * configure.ac: Use `ws2_32' library for srv_mingw.
11684 * configure: Regenerate.
11685 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11686 * remote-utils.c: Likewise.
11688 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11690 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11691 if __x86_64__ is defined.
11693 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11695 * configure: Regenerate.
11697 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11699 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11700 * target.h (target_ops): New get_tib_address field.
11701 * win32-low.h (win32_thread_info): Add thread_local_base field.
11702 * win32-low.c (child_add_thread): Add tlb argument.
11703 Set thread_local_base field to TLB.
11704 (get_child_debug_event): Adapt to child_add_thread change.
11705 (win32_get_tib_address): New function.
11706 (win32_target_ops): Set get_tib_address field to
11707 win32_get_tib_address.
11708 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11710 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11712 * linux-low.c (linux_mourn): Also remove the process.
11713 * server.c (handle_target_event): Don't remove the process here.
11714 * nto-low.c (nto_mourn): New.
11715 (nto_target_ops): Install it.
11716 * spu-low.c (spu_mourn): New.
11717 (spu_target_ops): Install it.
11718 * win32-low.c (win32_mourn): New.
11719 (win32_target_ops): Install it.
11721 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11723 * server.h (buffer_xml_printf): Remove redundant `;'.
11725 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11727 * regcache.c (set_register_cache): Invalidate regcaches before
11728 changing the register cache layout.
11729 (regcache_invalidate_one): Allow a NULL regcache.
11730 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11731 regcaches before changing the register cache layout or the target
11734 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11736 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11737 variable warning on Linux/x86-64.
11739 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11741 GDBserver disconnected tracing support.
11743 * linux-low.c (linux_remove_process): Delete.
11744 (add_lwp): Don't set last_resume_kind here.
11745 (linux_kill): Use `mourn'.
11746 (linux_detach): Use `thread_db_detach', and `mourn'.
11747 (linux_mourn): New.
11748 (linux_attach_lwp_1): Adjust comment.
11749 (linux_attach): last_resume_kind moved the thread_info; adjust.
11750 (status_pending_p_callback): Adjust.
11751 (linux_wait_for_event_1): Adjust.
11752 (count_events_callback, select_singlestep_lwp_callback)
11753 (select_event_lwp_callback, cancel_breakpoints_callback)
11754 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11755 (proceed_one_lwp): Adjust.
11756 (linux_async): Add debug output.
11757 (linux_thread_stopped): New.
11758 (linux_pause_all): New.
11759 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11761 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11762 (thread_db_free): Delete declaration.
11763 (thread_db_detach, thread_db_mourn): Declare.
11764 * thread-db.c (thread_db_init): Use thread_db_mourn.
11765 (thread_db_free): Delete, split in two.
11766 (disable_thread_event_reporting): New.
11767 (thread_db_detach): New.
11768 (thread_db_mourn): New.
11770 * server.h (struct thread_info) <last_resume_kind>: New field.
11771 <attached>: Add comment.
11772 <gdb_detached>: New field.
11773 (handler_func): Change return type to int.
11774 (handle_serial_event, handle_target_event): Ditto.
11775 (gdb_connected): Declare.
11777 (disconnected_tracing): Declare.
11778 (stop_tracing): Declare.
11780 * server.c (handle_query) <qSupported>: Report support for
11781 disconnected tracing.
11782 (queue_stop_reply_callback): Account for running threads.
11783 (gdb_wants_thread_stopped): New.
11784 (gdb_wants_all_threads_stopped): New.
11785 (gdb_reattached_process): New.
11786 (handle_status): Clear the `gdb_detached' flag of all processes.
11787 In all-stop, stop all threads.
11788 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11789 (process_serial_event): If the remote connection breaks, or if an
11790 exit was forced with "monitor exit", force an event loop exit.
11791 Handle disconnected tracing on detach.
11792 (handle_serial_event): Adjust.
11793 (handle_target_event): If GDB isn't connected, forward events back
11794 to the inferior, unless the last process exited, in which case,
11795 exit gdbserver. Adjust interface.
11797 * remote-utils.c (remote_open): Don't block in accept. Instead
11798 register an event loop source on the listen socket file
11799 descriptor. Refactor bits into ...
11800 (listen_desc): ... this new global.
11801 (gdb_connected): ... this new function.
11802 (enable_async_notification): ... this new function.
11803 (handle_accept_event): ... this new function.
11804 (remote_close): Clear remote_desc.
11806 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11808 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11810 (mourn_inferior): Define.
11811 (target_process_qsupported): Avoid the dangling else problem.
11812 (thread_stopped): Define.
11813 (pause_all): Define.
11814 (target_waitstatus_to_string): Declare.
11815 * target.c (target_waitstatus_to_string): New.
11817 * tracepoint.c (tracing): Make extern.
11818 (disconnected_tracing): New.
11819 (stop_tracing): Make extern. Handle tracing stops due to GDB
11821 (cmd_qtdisconnected): New.
11822 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11823 (handle_tracepoint_general_set): Handle QTDisconnected.
11825 * event-loop.c (event_handler_func): Change return type to int.
11826 (process_event): Bail out if the event handler wants the event
11828 (handle_file_event): Ditto.
11829 (start_event_loop): Bail out if the event handler wants the event
11832 * nto-low.c (nto_target_ops): Adjust.
11833 * spu-low.c (spu_wait): Don't remove the process here.
11834 (spu_target_ops): Adjust.
11835 * win32-low.c (win32_wait): Don't remove the process here.
11836 (win32_target_ops): Adjust.
11838 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11840 * regcache.c (realloc_register_cache): Invalidate inferior's
11841 regcache before recreating it.
11843 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11845 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11847 2010-04-09 Stan Shebs <stan@codesourcery.com>
11848 Pedro Alves <pedro@codesourcery.com>
11850 * server.h (LONGEST): New.
11851 (struct thread_info) <while_stepping>: New field.
11852 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11854 (initialize_tracepoint, handle_tracepoint_general_set)
11855 (handle_tracepoint_query, tracepoint_finished_step)
11856 (tracepoint_was_hit, release_while_stepping_state_list):
11857 (current_traceframe): Declare.
11858 * server.c (handle_general_set): Handle tracepoint packets.
11859 (read_memory): New.
11860 (write_memory): New.
11861 (handle_search_memory_1): Use read_memory.
11862 (handle_query): Report support for conditional tracepoints, trace
11863 state variables, and tracepoint sources. Handle tracepoint
11865 (main): Initialize the tracepoints module.
11866 (process_serial_event): Handle traceframe reads/writes.
11868 * linux-low.c (handle_tracepoints): New.
11869 (linux_wait_1): Call it.
11870 (linux_resume_one_lwp): Handle while-stepping.
11871 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11872 (linux_target_ops): Install them.
11873 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11875 * linux-x86-low.c (x86_supports_tracepoints): New.
11876 (the_low_target). Install it.
11878 * mem-break.h (delete_breakpoint): Declare.
11879 * mem-break.c (delete_breakpoint): Make external.
11881 * target.h (struct target_ops): Add `supports_tracepoints',
11882 `read_pc', and `write_pc' fields.
11883 (target_supports_tracepoints): Define.
11884 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11887 * regcache.h (struct regcache) <registers_owned>: New field.
11888 (init_register_cache, regcache_cpy): Declare.
11889 (regcache_read_pc, regcache_write_pc): Declare.
11890 (register_cache_size): Declare.
11891 (supply_regblock): Declare.
11892 * regcache.c (init_register_cache): New.
11893 (new_register_cache): Use it.
11894 (regcache_cpy): New.
11895 (register_cache_size): New.
11896 (supply_regblock): New.
11897 (regcache_read_pc, regcache_write_pc): New.
11899 * tracepoint.c: New.
11901 * Makefile.in (OBS): Add tracepoint.o.
11902 (tracepoint.o): New rule.
11904 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11906 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11908 (i386-mmx.c): Likewise.
11909 (i386-mmx-linux.o): Likewise.
11910 (i386-mmx-linux.c): Likewise.
11912 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11913 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11914 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11915 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11917 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11918 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11919 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11921 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11923 * Makefile.in (clean): Updated.
11925 (i386-avx.c): Likewise.
11926 (i386-avx-linux.o): Likewise.
11927 (i386-avx-linux.c): Likewise.
11928 (amd64-avx.o): Likewise.
11929 (amd64-avx.c): Likewise.
11930 (amd64-avx-linux.o): Likewise.
11931 (amd64-avx-linux.c): Likewise.
11933 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11934 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11935 (srv_amd64_regobj): Add amd64-avx.o.
11936 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11937 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11938 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11939 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11940 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11941 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11942 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11944 * i387-fp.c: Include "i386-xstate.h".
11946 (i387_cache_to_xsave): Likewise.
11947 (i387_xsave_to_cache): Likewise.
11948 (x86_xcr0): Likewise.
11950 * i387-fp.h (i387_cache_to_xsave): Likewise.
11951 (i387_xsave_to_cache): Likewise.
11952 (x86_xcr0): Likewise.
11954 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11955 * linux-crisv32-low.c (target_regsets): Likewise.
11956 * linux-m68k-low.c (target_regsets): Likewise.
11957 * linux-mips-low.c (target_regsets): Likewise.
11958 * linux-ppc-low.c (target_regsets): Likewise.
11959 * linux-s390-low.c (target_regsets): Likewise.
11960 * linux-sh-low.c (target_regsets): Likewise.
11961 * linux-sparc-low.c (target_regsets): Likewise.
11962 * linux-xtensa-low.c (target_regsets): Likewise.
11964 * linux-low.c: Include <sys/uio.h>.
11965 (regsets_fetch_inferior_registers): Support nt_type.
11966 (regsets_store_inferior_registers): Likewise.
11967 (linux_process_qsupported): New.
11968 (linux_target_ops): Add linux_process_qsupported.
11970 * linux-low.h (regset_info): Add nt_type.
11971 (linux_target_ops): Add process_qsupported.
11973 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11975 (init_registers_i386_avx_linux): New.
11976 (init_registers_amd64_avx_linux): Likewise.
11977 (xmltarget_i386_linux_no_xml): Likewise.
11978 (xmltarget_amd64_linux_no_xml): Likewise.
11979 (PTRACE_GETREGSET): Likewise.
11980 (PTRACE_SETREGSET): Likewise.
11981 (x86_fill_xstateregset): Likewise.
11982 (x86_store_xstateregset): Likewise.
11983 (use_xml): Likewise.
11984 (x86_linux_update_xmltarget): Likewise.
11985 (x86_linux_process_qsupported): Likewise.
11986 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11987 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11988 init_registers_i386_linux here. Call
11989 x86_linux_update_xmltarget.
11990 (the_low_target): Add x86_linux_process_qsupported.
11992 * server.c (handle_query): Call target_process_qsupported.
11994 * target.h (target_ops): Add process_qsupported.
11995 (target_process_qsupported): New.
11997 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11999 * inferiors.c (add_thread): Set last_status kind to
12000 TARGET_WAITKIND_IGNORE.
12001 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12002 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12003 (linux_wait_1): Move `thread' local definition to block that uses
12004 it. Don't NULL initialize `event_child'.
12005 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12006 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12007 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12009 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12011 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12012 an extended waitstatus, or by a watchpoint.
12013 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12014 thread was stepping or has been stopped by a watchpoint.
12016 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12018 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12019 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12020 of another, then delete the previous, and validate all
12022 (validate_inserted_breakpoint): New.
12023 (delete_disabled_breakpoints): New.
12024 (validate_breakpoints): New.
12025 (check_mem_read): Validate breakpoints before trusting their
12026 shadow. Delete disabled breakpoints.
12027 (check_mem_write): Validate breakpoints before trusting they
12028 should be inserted. Delete disabled breakpoints.
12029 * mem-break.h (validate_breakpoints):
12030 * server.c (handle_query): Validate breakpoints when we see a
12033 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12035 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12036 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12037 if we could tell there's a GDB breakpoint at stop_pc.
12038 (need_step_over_p): Don't do a step over if we find a GDB
12039 breakpoint at the resume PC.
12041 * mem-break.c (struct raw_breakpoint): New.
12042 (enum bkpt_type): New type `gdb_breakpoint'.
12043 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12044 fields. New field `raw'.
12045 (find_raw_breakpoint_at): New.
12046 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12047 breakpoint instead.
12048 (set_breakpoint_at): Adjust.
12049 (delete_raw_breakpoint): New.
12050 (release_breakpoint): New.
12051 (delete_breakpoint): Rename to...
12052 (delete_breakpoint_1): ... this. Add proc parameter. Use
12053 release_breakpoint. Return ENOENT.
12054 (delete_breakpoint): Reimplement.
12055 (find_breakpoint_at): Delete.
12056 (find_gdb_breakpoint_at): New.
12057 (delete_breakpoint_at): Delete.
12058 (set_gdb_breakpoint_at): New.
12059 (delete_gdb_breakpoint_at): New.
12060 (gdb_breakpoint_here): New.
12061 (set_reinsert_breakpoint): Use release_breakpoint.
12062 (uninsert_breakpoint): Rename to ...
12063 (uninsert_raw_breakpoint): ... this.
12064 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12065 (reinsert_raw_breakpoint): Change parameter type to
12067 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12069 (check_breakpoints): Adjust. Use release_breakpoint.
12070 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12071 (breakpoint_inserted_here): Ditto.
12072 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12073 Don't trust the breakpoint's shadow if it is not inserted.
12074 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12075 (delete_all_breakpoints): Adjust.
12076 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12077 use delete_breakpoint_1.
12079 * mem-break.h (breakpoints_supported): Delete declaration.
12080 (set_gdb_breakpoint_at): Declare.
12081 (gdb_breakpoint_here): Declare.
12082 (delete_breakpoint_at): Delete.
12083 (delete_gdb_breakpoint_at): Declare.
12085 * server.h (struct raw_breakpoint): Forward declare.
12086 (struct process_info): New field `raw_breakpoints'.
12088 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12091 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12093 * linux-low.c (status_pending_p_callback): Fix comment.
12094 (linux_wait_for_event_1): Move most of the internal breakpoint
12095 handling from here...
12096 (linux_wait_1): ... to here.
12097 (count_events_callback): New.
12098 (select_singlestep_lwp_callback): New.
12099 (select_event_lwp_callback): New.
12100 (cancel_breakpoints_callback): New.
12101 (select_event_lwp): New.
12102 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12103 priority to all LWPs that have had events that should be reported
12104 to the client. Cancel breakpoints when about to reporting the
12105 event to the client, not while stopping lwps. No longer cancel
12106 finished single-steps here.
12107 (cancel_finished_single_step): Delete.
12108 (cancel_finished_single_steps): Delete.
12110 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12112 * mem-break.c (enum bkpt_type): New.
12113 (struct breakpoint): New field `type'.
12114 (set_breakpoint_at): Change return type to struct breakpoint
12115 pointer. Set type to `other_breakpoint' by default.
12116 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12117 in the breakpoint list.
12118 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12119 (reinsert_breakpoint): Rename to ...
12120 (reinsert_raw_breakpoint): ... this.
12121 (reinsert_breakpoints_at): Adjust.
12122 * mem-break.h (struct breakpoint): Declare.
12123 (set_breakpoint_at): Change return type to struct breakpoint
12126 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12128 * server.c (handle_query): Assign, not compare.
12130 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12132 Teach linux gdbserver to step-over-breakpoints.
12134 * linux-low.c (can_hardware_single_step): New.
12135 (supports_breakpoints): New.
12136 (handle_extended_wait): If stopping threads, read the stop pc of
12137 the new cloned LWP.
12139 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12140 low target doesn't support retrieving the PC.
12141 (add_lwp): Set last_resume_kind to resume_continue.
12142 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12143 (linux_attach): Don't clear stop_expected. Set the lwp's
12144 last_resume_kind to resume_stop.
12145 (linux_detach_one_lwp): Don't check for removed breakpoints.
12146 (check_removed_breakpoint): Delete.
12147 (status_pending_p): Rename to ...
12148 (status_pending_p_callback): ... this. Don't check for removed
12149 breakpoints. Don't consider threads that are stopped from GDB's
12151 (linux_wait_for_lwp): Always read the stop_pc here.
12152 (cancel_breakpoint): New.
12153 (step_over_bkpt): New global.
12154 (linux_wait_for_event_1): Implement stepping over breakpoints.
12155 (gdb_wants_lwp_stopped): New.
12156 (gdb_wants_all_stopped): New.
12157 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12158 single-step traps here. Store the thread's last reported target
12160 (send_sigstop): Don't clear stop_expected. Always set it,
12162 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12163 (cancel_finished_single_step): New.
12164 (cancel_finished_single_steps): New.
12165 (wait_for_sigstop): Don't cancel finished single-step traps here.
12166 (linux_resume_one_lwp): Don't check for removed breakpoints.
12167 Don't set `step' on non-hardware step archs.
12168 (linux_set_resume_request): Ignore resume_stop requests if already
12169 stopping or stopped. Set the lwp's last_resume_kind.
12170 (resume_status_pending_p): Don't check for removed breakpoints.
12171 (need_step_over_p): New.
12172 (start_step_over): New.
12173 (finish_step_over): New.
12174 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12175 requests. Clear the thread's last reported target waitstatus.
12176 Don't use the `suspended' flag. Don't consider pending breakpoints.
12177 (linux_resume): Start a step-over if necessary.
12178 (proceed_one_lwp): New.
12179 (proceed_all_lwps): New.
12180 (unstop_all_lwps): New.
12181 * linux-low.h (struct lwp_info): Rewrite comment for the
12182 `suspended' flag. Add the `stop_pc' field. Delete the
12183 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12184 Add `'last_resume_kind' and `need_step_over' fields.
12185 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12186 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12187 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12188 (set_raw_breakpoint_at): New.
12189 (set_breakpoint_at): Rewrite to use it.
12190 (reinsert_breakpoint_handler): Delete.
12191 (set_reinsert_breakpoint): New.
12192 (reinsert_breakpoint_by_bp): Delete.
12193 (delete_reinsert_breakpoints): New.
12194 (uninsert_breakpoint): Rewrite.
12195 (uninsert_breakpoints_at): New.
12196 (reinsert_breakpoint): Rewrite.
12197 (reinsert_breakpoints_at): New.
12198 (check_breakpoints): Rewrite.
12199 (breakpoint_here): New.
12200 (breakpoint_inserted_here): New.
12201 (check_mem_read): Adjust.
12202 * mem-break.h (breakpoints_supported, breakpoint_here)
12203 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12204 (reinsert_breakpoint_by_bp): Delete declaration.
12205 (delete_reinsert_breakpoints): Declare.
12206 (reinsert_breakpoint): Delete declaration.
12207 (reinsert_breakpoints_at): Declare.
12208 (uninsert_breakpoint): Delete declaration.
12209 (uninsert_breakpoints_at): Declare.
12210 (check_breakpoints): Adjust prototype.
12211 * server.h: Adjust include order.
12212 (struct thread_info): Declare here. Add a `last_status' field.
12214 2010-03-23 Michael Snyder <msnyder@vmware.com>
12216 * server.c (crc32): New function.
12217 (handle_query): Add handling for 'qCRC:' request.
12219 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12221 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12222 lwp had been stopped by a watchpoint.
12224 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12226 * server.h (internal_error): Declare.
12227 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12228 * utils.c (internal_error): New function.
12230 2010-03-15 Andreas Schwab <schwab@redhat.com>
12232 * configure.srv: Fix typo setting srv_regobj.
12234 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12236 * linux-low.c (fetch_register): Avoid passing a non string literal
12238 (usr_store_inferior_registers): Ditto.
12240 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12242 * linux-low.c (linux_write_memory): Bail out early if peeking
12245 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12247 * linux-low.h (struct lwp_info): New fields
12248 `stopped_by_watchpoint' and `stopped_data_address'.
12249 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12250 here, and cache them in the lwp object.
12251 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12253 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12255 (linux_stopped_by_watchpoint): Rewrite.
12256 (linux_stopped_data_address): Rewrite.
12258 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12260 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12261 switching the current inferior, not before.
12263 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12265 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12266 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12267 i386-linux.c and amd64-linux.c.
12268 (reg-i386.o): Removed.
12269 (reg-i386.c): Likewise.
12270 (reg-i386-linux.o): Likewise.
12271 (reg-i386-linux.c): Likewise.
12272 (reg-x86-64.o): Likewise.
12273 (reg-x86-64.c): Likewise.
12274 (reg-x86-64-linux.o): Likewise.
12275 (reg-x86-64-linux.c): Likewise.
12277 (i386.c): Likewise.
12278 (i386-linux.o): Likewise.
12279 (i386-linux.c): Likewise.
12280 (amd64.o): Likewise.
12281 (amd64.c): Likewise.
12282 (amd64-linux.o): Likewise.
12283 (amd64-linux.c): Likewise.
12285 * configure.srv (srv_i386_regobj): New.
12286 (srv_i386_linux_regobj): Likewise.
12287 (srv_amd64_regobj): Likewise.
12288 (srv_amd64_linux_regobj): Likewise.
12289 (srv_i386_32bit_xmlfiles): Likewise.
12290 (srv_i386_64bit_xmlfiles): Likewise.
12291 (srv_i386_xmlfiles): Likewise.
12292 (srv_amd64_xmlfiles): Likewise.
12293 (srv_i386_linux_xmlfiles): Likewise.
12294 (srv_amd64_linux_xmlfiles): Likewise.
12295 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12296 srv_xmlfiles to $srv_i386_xmlfiles.
12297 (i[34567]86-*-mingw32ce*): Likewise.
12298 (i[34567]86-*-mingw*): Likewise.
12299 (i[34567]86-*-nto*): Likewise.
12300 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12301 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12302 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12303 (x86_64-*-linux*): Likewise.
12305 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12306 (init_registers_amd64_linux): New.
12307 (x86_arch_setup): Replace init_registers_x86_64_linux with
12308 init_registers_amd64_linux.
12310 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12312 * configure.ac: Check for libdl. If it is not available link against
12313 static libthread_db.
12314 * configure: Regenerate.
12316 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12320 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12321 handing a read watchpoint.
12322 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12324 2010-02-12 Doug Evans <dje@google.com>
12326 * linux-low.c (linux_supports_tracefork_flag): Document.
12327 (linux_look_up_symbols): Add comment.
12329 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12331 * regcache.c (supply_register): Clear regcache if buf is NULL.
12333 2010-02-02 Nicolas Roche <roche@sourceware.org>
12334 Joel Brobecker <brobecker@adacore.com>
12336 * inferiors.c (find_inferior): Add function documentation.
12337 (unloaded_dll): Handle the case where the unloaded dll has not
12338 been previously registered in the dll list.
12340 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12342 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12343 (thumb2_breakpoint): New.
12344 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12346 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12348 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12349 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12352 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12354 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12356 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12358 * linux-s390-low.c (s390_collect_ptrace_register)
12359 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12361 2010-01-21 Doug Evans <dje@google.com>
12363 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12364 (PTRACE_ARG4_TYPE): New macro.
12365 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12366 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12367 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12368 (usr_store_inferior_registers): Ditto.
12369 (linux_read_memory, linux_write_memory): Ditto.
12370 (linux_test_for_tracefork): Ditto.
12372 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12373 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12375 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12377 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12380 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12382 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12383 prototype to take a regcache. Adjust.
12385 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12387 * regcache.h (struct thread_info): Forward declare.
12388 (struct regcache): New.
12389 (new_register_cache): Adjust prototype.
12390 (get_thread_regcache): Declare.
12391 (free_register_cache): Adjust prototype.
12392 (registers_to_string, registers_from_string): Ditto.
12393 (supply_register, supply_register_by_name, collect_register)
12394 (collect_register_as_string, collect_register_by_name): Ditto.
12395 * regcache.c (struct inferior_regcache_data): Delete.
12396 (get_regcache): Rename to ...
12397 (get_thread_regcache): ... this. Adjust. Switch inferior before
12398 fetching registers.
12399 (regcache_invalidate_one): Adjust.
12400 (regcache_invalidate): Fix prototype.
12401 (new_register_cache): Return the new register cache.
12402 (free_register_cache): Change prototype.
12403 (realloc_register_cache): Adjust.
12404 (registers_to_string): Change prototype to take a regcache. Adjust.
12405 (registers_from_string): Ditto.
12406 (register_data): Ditto.
12407 (supply_register): Ditto.
12408 (supply_register_by_name): Ditto.
12409 (collect_register): Ditto.
12410 (collect_register_as_string): Ditto.
12411 (collect_register_by_name): Ditto.
12412 * server.c (process_serial_event): Adjust.
12413 * linux-low.h (regset_fill_func, regset_store_func): Change
12415 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12417 * linux-low.c (get_stop_pc): Adjust.
12418 (check_removed_breakpoint): Adjust.
12419 (linux_wait_for_event): Adjust.
12420 (linux_resume_one_lwp): Adjust.
12421 (fetch_register): Add regcache parameter. Adjust.
12422 (usr_store_inferior_registers): Ditto.
12423 (regsets_fetch_inferior_registers): Ditto.
12424 (regsets_store_inferior_registers): Ditto.
12425 (linux_fetch_registers, linux_store_registers): Ditto.
12426 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12428 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12430 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12431 prototype to take a regcache.
12432 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12433 * remote-utils.c (convert_ascii_to_int, outreg)
12434 (prepare_resume_reply): Change prototype to take a regcache.
12436 * target.h (struct target_ops) <fetch_registers, store_registers>:
12437 Change prototype to take a regcache.
12438 (fetch_inferior_registers, store_inferior_registers): Change
12439 prototype to take a regcache. Adjust.
12440 * proc-service.c (ps_lgetregs): Adjust.
12441 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12442 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12443 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12444 take a regcache. Adjust.
12445 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12446 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12447 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12448 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12449 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12450 (cris_cannot_fetch_register):
12451 (cris_breakpoint_at): Change prototype to take a regcache.
12453 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12454 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12455 to take a regcache. Adjust.
12456 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12458 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12459 take a regcache. Adjust.
12460 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12461 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12462 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12463 * linux-mips-low.c (mips_get_pc):
12464 (mips_set_pc): Change prototype to take a regcache. Adjust.
12465 (mips_reinsert_addr): Adjust.
12466 (mips_collect_register): Change prototype to take a regcache.
12468 (mips_supply_register):
12469 (mips_collect_register_32bit, mips_supply_register_32bit)
12470 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12471 (mips_store_fpregset): Ditto.
12472 * linux-ppc-low.c (ppc_supply_ptrace_register)
12473 (ppc_supply_ptrace_register): Ditto.
12474 (parse_spufs_run): Adjust.
12475 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12476 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12477 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12478 take a regcache. Adjust.
12479 * linux-s390-low.c (s390_collect_ptrace_register)
12480 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12481 (s390_set_pc): Change prototype to take a regcache. Adjust.
12482 (s390_arch_setup): Adjust.
12483 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12484 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12485 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12486 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12487 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12489 (sparc_breakpoint_at): Adjust.
12490 * linux-xtensa-low.c (xtensa_fill_gregset):
12491 (xtensa_store_gregset):
12492 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12493 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12494 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12495 prototype to take a regcache. Adjust.
12496 * win32-arm-low.c (arm_fetch_inferior_register)
12497 (arm_store_inferior_register): Change prototype to take a
12499 * win32-i386-low.c (i386_fetch_inferior_register)
12500 (i386_store_inferior_register): Change prototype to take a
12502 * win32-low.c (child_fetch_inferior_registers)
12503 (child_store_inferior_registers): Change prototype to take a
12505 (win32_wait): Adjust.
12506 (win32_fetch_inferior_registers): Change prototype to take a
12508 (win32_store_inferior_registers): Adjust.
12509 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12510 store_inferior_register>: Change prototype to take a regcache.
12512 2010-01-20 Doug Evans <dje@google.com>
12514 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12516 (linux_wait_for_event1, linux_init_signals): Ditto.
12517 (W_STOPCODE): Provide definition if missing.
12519 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12521 * linux-low.c (linux_core_of_thread): New.
12522 (compare_ints, show_process, list_threads): New.
12523 (linux_qxfer_osdata): Report threads and cores.
12524 (linux_target_op): Register linux_core_of_thread.
12525 * remote-utils.c (prepare_resume_reply): Report the core.
12526 (buffer_xml_printf): Support %d specifier.
12527 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12529 (handle_query): Handle qXfer:threads. Announce availability
12531 * target.h (struct target_ops): New field core_of_thread.
12533 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12535 * Makefile.in (clean): Remove new generated files.
12536 (reg-s390.o, reg-s390.c): Remove rules.
12537 (reg-s390x.o, reg-s390x.c): Likewise.
12538 (s390-linux32.o, s390-linux32.c): Add rules.
12539 (s390-linux64.o, s390-linux64.c): Likewise.
12540 (s390x-linux64.o, s390x-linux64.c): Likewise.
12541 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12542 * linux-s390-low.c: Include <elf.h>.
12543 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12544 (init_registers_s390): Remove prototype.
12545 (init_registers_s390x): Likewise.
12546 (init_registers_s390_linux32): Add prototype.
12547 (init_registers_s390_linux64): Likewise.
12548 (init_registers_s390x_linux64): Likewise.
12549 (s390_num_regs_3264): New define.
12550 (s390_regmap_3264): New global variable.
12551 (s390_cannot_fetch_register): Remove obsolete check.
12552 (s390_cannot_store_register): Likewise.
12553 (s390_collect_ptrace_register): Handle upper/lower register halves.
12554 (s390_supply_ptrace_register): Likewise.
12555 (s390_fill_gregset): Update to register number changes.
12556 (s390_get_hwcap): New routine.
12557 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12558 Install appropriate regmap and register set.
12560 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12562 * server.c (gdbserver_version): Update copyright year to 2010.
12563 * gdbreplay.c (gdbreplay_version): Likewise.
12565 2009-12-28 Doug Evans <dje@google.com>
12567 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12568 elf/external.h. Include <elf.h> instead but only if necessary.
12570 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12572 * linux-low.c (linux_remove_process): Remove `detaching'
12573 parameter. Don't release/detach from thread_db here.
12574 (linux_kill): Release/detach from thread_db here, ...
12575 (linux_detach): ... and here, before actually detaching.
12576 (linux_wait_1): ... and here, when a process exits.
12577 * thread-db.c (any_thread_of): New.
12578 (thread_db_free): Switch the current inferior to a thread of the
12581 2009-12-21 Doug Evans <dje@google.com>
12583 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12585 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12586 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12587 warning ifndef __NR_tkill. Move setting of errno there too.
12588 Delete unnecessary resetting of errno after syscall.
12589 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12591 * configure.ac: Check for dladdr.
12592 * config.in: Regenerate.
12593 * configure: Regenerate.
12594 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12595 (try_thread_db_load): Update.
12597 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12599 2009-12-18 Doug Evans <dje@google.com>
12601 * event-loop.c: Include unistd.h if it exists.
12603 * linux-low.c (my_waitpid): Move definition away from being in
12604 between linux_tracefork_child/linux_test_for_tracefork.
12606 * gdb_proc_service.h (psaddr_t): Fix type.
12607 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12608 signature to match glibc.
12610 2009-12-16 Doug Evans <dje@google.com>
12612 * linux-low.c (linux_read_memory): Fix argument to read.
12614 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12616 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12617 events, don't leave current_inferior pointing at null.
12619 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12621 * win32-low.c (LOG): Delete.
12622 (OUTMSG): Output to stderr.
12623 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12624 on compile time LOG macro.
12625 (win32_wait): Fix debug output.
12627 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12629 * win32-low.c (win32_add_one_solib): If the dll name is
12630 "ntdll.dll", prepend the system directory to the dll path.
12632 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12634 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12636 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12637 Vladimir Prus <vladimir@codesourcery.com>
12639 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12640 * configure.ac: Check for __mcoldfire__ and set
12641 gdb_cv_m68k_is_coldfire.
12642 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12643 reg-cf.o and reg-m68k.o.
12644 * configure: Regenerated.
12646 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12648 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12649 Pass it to thread_db_free.
12650 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12651 proper `detaching' argument to linux_remove_process.
12652 * linux-low.h (thread_db_free): Add `detaching' parameter.
12653 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12655 (thread_db_free): Add `detaching' parameter. Only
12656 call td_ta_clear_event if detaching from process.
12658 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12660 * thread-db.c (thread_db_free): Fix typo.
12662 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12665 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12667 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12669 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12670 with an i686 compiler.
12671 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12673 * configure: Rebuilt.
12675 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12679 * server.c (handle_search_memory_1): Correct read_addr initialization
12680 in loop for searching subsequent chunks.
12682 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12684 * configure.ac: New --with-libthread-db option.
12685 * thread-db.c: Allow direct dependence on libthread_db.
12686 (thread_db_free): Adjust.
12687 * config.in: Regenerate.
12688 * configure: Likewise.
12690 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12693 * thread-db.c (attach_thread): New function.
12694 (maybe_attach_thread): Return success/failure.
12695 (find_new_threads_callback): Adjust.
12696 (thread_db_find_new_threads): Loop until no new threads.
12698 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12700 * proc-service.c (ps_lgetregs): Formatting.
12702 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12704 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12705 * configure.ac: Adjust.
12706 * linux-low.h (struct process_info_private): Move members to struct
12708 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12709 * linux-low.c (linux_remove_process): Adjust.
12710 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12711 * server.c (handle_query): Move code ...
12712 (handle_monitor_command): ... here. New function.
12713 * target.h (struct target_ops): New member.
12714 * thread-db.c (struct thread_db): New.
12715 (libthread_db_search_path): New variable.
12716 (thread_db_create_event, thread_db_enable_reporting)
12717 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12718 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12719 (try_thread_db_load_1, dladdr_to_soname): New functions.
12720 (try_thread_db_load, thread_db_load_search): New functions.
12721 (thread_db_init): Search for libthread_db.
12722 (thread_db_free): New function.
12723 (thread_db_handle_monitor_command): Likewise.
12724 * config.in: Regenerate.
12725 * configure: Regenerate.
12727 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12729 * spu-low.c (spu_kill): Wait for inferior to terminate.
12730 Call clear_inferiors.
12731 (spu_detach): Call clear_inferiors.
12733 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12735 * aclocal.m4: Regenerate.
12736 * config.in: Likewise.
12737 * configure: Likewise.
12739 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12741 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12742 (parse_spufs_run): New function.
12743 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12744 (ppc_breakpoint_at): Handle SPU breakpoints.
12746 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12748 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12749 (SPUFS_MAGIC): Define.
12750 (spu_enumerate_spu_ids): New function.
12751 (linux_qxfer_spu): New function.
12752 (linux_target_ops): Install linux_qxfer_spu.
12754 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12756 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12757 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12758 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12759 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12760 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12761 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12762 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12763 (init_registers_powerpc_cell32l): Add prototype.
12764 (init_registers_powerpc_cell64l): Likewise.
12765 (ppc_arch_setup): Detect Cell/B.E. architecture.
12767 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12769 * Makefile.in (datarootdir): New variable.
12771 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12773 * linux-low.c (linux_write_memory): Update debugging output.
12774 * Makefile.in (clean): Add new descriptions.
12775 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12776 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12777 * configure.srv: Add new files for arm*-*-linux*.
12778 * linux-arm-low.c: Add new declarations.
12779 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12780 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12781 (HWCAP_VFPv3D16): New.
12782 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12783 instead of __IWMMXT__.
12784 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12785 (arm_arch_setup): New.
12786 (target_regsets): Remove #ifdef. Add VFP regset.
12787 (the_low_target): Use arm_arch_setup.
12789 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12791 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12792 the main thread again.
12794 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12796 Adding Neutrino gdbserver.
12797 * configure: Regenerated.
12798 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12799 * configure.srv (i[34567]86-*-nto*): New target.
12800 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12801 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12802 (nto_comctrl) [__QNX__]: New function.
12803 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12805 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12807 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12810 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12811 Pedro Alves <pedro@codesourcery.com>
12813 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12814 don't support CONTEXT_EXTENDED_REGISTERS.
12815 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12816 (the_low_target): Install them.
12817 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12818 failing with ERROR_PIPE_NOT_CONNECTED.
12820 2009-06-30 Doug Evans <dje@google.com>
12821 Pierre Muller <muller@ics.u-strasbg.fr>
12823 Add h/w watchpoint support to x86-linux, win32-i386.
12824 * Makefile.in (SFILES): Add i386-low.c
12825 (i386_low_h): Define.
12826 (i386-low.o): Add dependencies.
12827 (linux-x86-low.o): Add i386-low.h dependency.
12828 (win32-i386-low.o): Ditto.
12829 * i386-low.c: New file.
12830 * i386-low.h: New file.
12831 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12832 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12833 * linux-low.c (linux_add_process): Initialize arch_private.
12834 (linux_remove_process): Free arch_private.
12835 (add_lwp): Initialize arch_private.
12836 (delete_lwp): Free arch_private.
12837 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12839 * linux-low.h (process_info_private): New member arch_private.
12840 (lwp_info): New member arch_private.
12841 (linux_target_ops): New members new_process, new_thread,
12843 (ptid_of): New macro.
12844 * linux-x86-low.c: Include stddef.h, i386-low.h.
12845 (arch_process_info): New struct.
12846 (arch_lwp_info): New struct.
12847 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12848 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12849 (i386_dr_low_get_status): New function.
12850 (x86_insert_point, x86_remove_point): New functions.
12851 (x86_stopped_by_watchpoint): New function.
12852 (x86_stopped_data_address): New function.
12853 (x86_linux_new_process, x86_linux_new_thread): New functions.
12854 (x86_linux_prepare_to_resume): New function.
12855 (the_low_target): Add entries for insert_point, remove_point,
12856 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12858 * server.c (debug_hw_points): New global.
12859 (monitor_show_help): Document set debug-hw-points.
12860 (handle_query): Process "set debug-hw-points".
12861 * server.h (debug_hw_points): Declare.
12862 (paddress): Declare.
12863 * utils.c (NUMCELLS, CELLSIZE): New macros.
12864 (get_sell, xsnprintf, paddress): New functions.
12865 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12866 remove_point, stopped_by_watchpoint, stopped_data_address.
12867 * win32-i386-low.c: Include i386-low.h.
12868 (debug_reg_state): Replaces dr.
12869 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12870 (i386_dr_low_get_status): New function.
12871 (i386_insert_point, i386_remove_point): New functions.
12872 (i386_stopped_by_watchpoint): New function.
12873 (i386_stopped_data_address): New function.
12874 (i386_initial_stuff): Update.
12875 (get_thread_context,set_thread_context,i386_thread_added): Update.
12876 (the_low_target): Add entries for insert_point,
12877 remove_point, stopped_by_watchpoint, stopped_data_address.
12878 * win32-low.c (win32_insert_watchpoint): New function.
12879 (win32_remove_watchpoint): New function.
12880 (win32_stopped_by_watchpoint): New function.
12881 (win32_stopped_data_address): New function.
12882 (win32_target_ops): Add entries for insert_watchpoint,
12883 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12884 * win32-low.h (win32_target_ops): New members insert_point,
12885 remove_point, stopped_by_watchpoint, stopped_data_address.
12887 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12889 * server.c (process_serial_event): Re-return unsupported, not
12890 error, if the type isn't recognized. Re-allow supporting only
12891 insert or remove packets. Also call require_running for
12892 breakpoints. Add missing break statement to default case. Tidy.
12893 * target.h (struct target_ops): Rename insert_watchpoint to
12894 insert_point, and remove_watchpoint to remove_point.
12896 * linux-low.h (struct linux_target_ops): Likewise.
12897 * linux-low.c (linux_insert_watchpoint): Rename to ...
12898 (linux_insert_point): ... this. Adjust.
12899 (linux_remove_watchpoint): Rename to ...
12900 (linux_remove_point): ... this. Adjust.
12901 (linux_target_ops): Adjust.
12902 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12903 (cris_insert_point): ... this.
12904 (cris_remove_watchpoint): Rename to ...
12905 (cris_remove_point): ... this.
12906 (the_low_target): Adjust.
12908 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12910 * server.c (handle_v_kill): Pass signal_pid to
12911 kill_inferior if multi_process is zero.
12913 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12915 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12916 * target.h (target_ops): Comment for *_watchpoint to make it clear
12917 the functions can get types '0' and '1'.
12919 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12921 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12922 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12923 * regcache.c (get_regcache): Likewise.
12924 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12925 * win32-low.c (child_fetch_inferior_registers): Remove check for
12928 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12929 Pedro Alves <pedro@codesourcery.com>
12931 * target.h (struct target_ops) <supports_multi_process>: New
12933 (target_supports_multi_process): New.
12934 * server.c (handle_query): Even if GDB reports support, only
12935 enable multi-process if the target also supports it. Report
12936 multi-process support only if the target backend supports it.
12937 * linux-low.c (linux_supports_multi_process): New function.
12938 (linux_target_ops): Install it as target_supports_multi_process
12941 2009-05-24 Doug Evans <dje@google.com>
12943 Global renaming of find_thread_pid to find_thread_ptid.
12944 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12945 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12946 All callers updated.
12948 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12949 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12952 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12953 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12954 (linux_resume_one_lwp): Ditto.
12956 2009-05-23 Doug Evans <dje@google.com>
12958 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12959 from struct inferior_list_entry * to struct lwp_info *.
12960 All callers updated.
12962 2009-05-13 Doug Evans <dje@google.com>
12964 * linux-x86-low.c: Don't include assert.h.
12965 (x86_siginfo_fixup): Use fatal, not assert.
12966 (x86_arch_setup): Fix comment.
12968 2009-05-12 Doug Evans <dje@google.com>
12970 Biarch support for i386/amd64 gdbserver.
12971 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12972 Add linux-x86-low.c.
12973 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12974 (linux-x86-low.o): Add.
12975 * linux-x86-64-low.c: Delete.
12976 * linux-i386-low.c: Delete.
12977 * linux-x86-low.c: New file.
12978 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12980 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12982 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12983 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12984 (linux_child_pid_to_exec_file): New function.
12985 (elf_64_header_p, elf_64_file_p): New functions.
12986 (siginfo_fixup): New function.
12987 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12988 give target a chance to convert layout.
12989 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12990 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12992 2009-05-07 Doug Evans <dje@google.com>
12994 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12995 (regsets_store_inferior_registers): Ditto.
12997 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13001 * linux-low.c (must_set_ptrace_flags): Delete.
13002 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13004 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13005 `lwp->must_set_ptrace_flags' instead.
13006 (linux_wait_for_event_1): Set ptrace options here.
13007 (linux_wait_1): ... not here.
13009 2009-04-30 Doug Evans <dje@google.com>
13011 * inferiors.c (started_inferior_callback): New function.
13012 (attached_inferior_callback): New function.
13013 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13014 * server.c (print_started_pid, print_attached_pid): New functions.
13015 (detach_or_kill_for_exit): New function.
13016 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13017 * server.h (have_started_inferiors_p): Declare.
13018 (have_attached_inferiors_p): Declare.
13020 * inferiors.c (remove_process): Fix memory leak, free process.
13021 * linux-low.c (linux_remove_process): New function.
13022 (linux_kill): Call it instead of remove_process.
13023 (linux_detach, linux_wait_1): Ditto.
13025 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13027 * configure.srv: Add x86 Windows CE target.
13029 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13031 * inferiors.c (get_thread_process): Make global.
13032 * server.h (get_thread_process): Add prototype.
13033 * thread-db.c (find_one_thread): Use get_thread_process
13034 instead of current_process.
13035 (thread_db_get_tls_address): Do not crash if called when
13036 thread layer is not yet initialized.
13038 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13040 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13041 * spu-low.c (current_tid): Rename to ...
13042 (current_ptid): ... this.
13043 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13044 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13045 ptid_get_lwp (current_ptid) instead of current_tid.
13046 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13047 instead of current_tid. Use find_process_pid to verify pid
13048 argument is valid. Pass proper argument to remove_process.
13049 (spu_thread_alive): Compare current_ptid instead of current_tid.
13050 (spu_resume): Likewise.
13052 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13054 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13057 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13059 Implement the multiprocess extensions, and add linux multiprocess
13062 * server.h (ULONGEST): Declare.
13063 (struct ptid, ptid_t): New.
13064 (minus_one_ptid, null_ptid): Declare.
13065 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13066 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13067 (struct inferior_list_entry): Change `id' type from unsigned from
13069 (struct sym_cache, struct breakpoint, struct
13070 process_info_private): Forward declare.
13071 (struct process_info): Declare.
13072 (current_process): Declare.
13073 (all_processes): Declare.
13074 (initialize_inferiors): Declare.
13075 (add_thread): Adjust to use ptid_t.
13076 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13077 (add_process, remove_process, find_thread_pid): Declare.
13078 (find_inferior_id): Adjust to use ptid_t.
13079 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13080 (multi_process): Declare.
13081 (push_event): Adjust to use ptid_t.
13082 (read_ptid, write_ptid): Declare.
13083 (prepare_resume_reply): Adjust to use ptid_t.
13084 (clear_symbol_cache): Declare.
13085 * inferiors.c (all_processes): New.
13086 (null_ptid, minus_one_ptid): New.
13087 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13088 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13089 (add_thread): Change unsigned long to ptid. Remove gdb_id
13091 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13092 (gdb_id_to_thread): Rename to ...
13093 (find_thread_pid): ... this. Change unsigned long to ptid.
13094 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13095 (loaded_dll, pull_pid_from_list): Adjust.
13096 (add_process, remove_process, find_process_pid)
13097 (get_thread_process, current_process, initialize_inferiors): New.
13098 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13099 (struct target_waitstatus) <related_pid>: Ditto.
13100 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13101 return type to int.
13102 (struct target_ops) <join>: Add `pid' argument.
13103 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13104 (struct target_ops) <wait>: Add `ptid' field. Change return type
13106 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13107 (mywait): Add `ptid' argument. Change return type to ptid_t.
13108 (target_pid_to_str): Declare.
13109 * target.c (set_desired_inferior): Adjust to use ptids.
13110 (mywait): Add new `ptid' argument. Adjust.
13111 (target_pid_to_str): New.
13112 * mem-break.h (free_all_breakpoints): Declare.
13113 * mem-break.c (breakpoints): Delelete.
13114 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13115 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13116 to use per-process breakpoint list.
13117 (free_all_breakpoints): New.
13118 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13119 (symbol_cache, all_symbols_looked_up): Delete.
13121 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13123 (prepare_resume_reply): Change ptid argument's type from unsigned
13124 long to ptid_t. Adjust. Implement W;process and X;process.
13125 (free_sym_cache, clear_symbol_cache): New.
13126 (look_up_one_symbol): Adjust to per-process symbol cache. *
13127 * server.c (cont_thread, general_thread, step_thread): Change type
13129 (attached): Delete.
13130 (multi_process): New.
13131 (last_ptid): Change type to ptid_t.
13132 (struct vstop_notif) <ptid>: Change type to ptid_t.
13133 (queue_stop_reply, push_event): Change `ptid' argument's type to
13135 (discard_queued_stop_replies): Add `pid' argument.
13136 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13137 changes. Don't reference the `attached' global.
13138 (attach_inferior): Adjust to mywait interface changes.
13139 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13140 features. Handle and report "multiprocess+". Handle
13142 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13144 (handle_v_kill): New.
13145 (handle_v_stopped): Adjust to use target_pid_to_str.
13146 (handle_v_requests): Allow multiple attaches and runs when
13147 multiprocess extensions are in effect. Handle "vKill".
13148 (myresume): Adjust to use ptids.
13149 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13150 (handle_status): Adjust to discard_queued_stop_replies interface
13152 (first_thread_of, kill_inferior_callback)
13153 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13154 (main): Call initialize_inferiors. Adjust to use ptids, killing
13155 and detaching from all inferiors. Handle multiprocess packet
13157 * linux-low.h: Include gdb_proc_service.h.
13158 (struct process_info_private): New.
13159 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13160 <lwpid_of>: Use ptid_get_lwp.
13161 (get_lwp_thread): Adjust.
13162 (struct lwp_info): Add `dead' member.
13163 (find_lwp_pid): Declare.
13164 * linux-low.c (thread_db_active): Delete.
13165 (new_inferior): Adjust comment.
13166 (inferior_pid): Delete.
13167 (linux_add_process): New.
13168 (handle_extended_wait): Adjust.
13169 (add_lwp): Change unsigned long to ptid.
13170 (linux_create_inferior): Add process to processes table. Adjust
13171 to use ptids. Don't set new_inferior here.
13172 (linux_attach_lwp): Rename to ...
13173 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13174 it. Adjust to use ptids.
13175 (linux_attach_lwp): New.
13176 (linux_attach): Add process to processes table. Don't set
13178 (struct counter): New.
13179 (second_thread_of_pid_p, last_thread_of_process_p): New.
13180 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13181 multiple processes.
13182 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13183 processes. Remove process from process table.
13184 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13185 to multiple processes.
13186 (any_thread_of): New.
13187 (linux_detach): Add `pid' argument, and handle it. Remove process
13188 from processes table.
13189 (linux_join): Add `pid' argument. Handle it.
13190 (linux_thread_alive): Change unsighed long argument to ptid_t.
13191 Consider dead lwps as not being alive.
13192 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13193 threads we're not interested in.
13194 (same_lwp, find_lwp_pid): New.
13195 (linux_wait_for_lwp): Change `pid' argument's type from int to
13197 (linux_wait_for_event): Rename to ...
13198 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13199 from int to ptid_t. Adjust.
13200 (linux_wait_for_event): New.
13201 (linux_wait_1): Add `ptid' argument. Change return type to
13202 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13203 that exit from the process table.
13204 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13206 (mark_lwp_dead): New.
13207 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13208 stopping all threads, mark its main lwp as dead.
13209 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13211 (fetch_register, usr_store_inferior_registers)
13212 (regsets_fetch_inferior_registers)
13213 (regsets_store_inferior_registers, linux_read_memory)
13214 (linux_write_memory): Inline `inferior_pid'.
13215 (linux_look_up_symbols): Adjust to use per-process
13216 `thread_db_active'.
13217 (linux_request_interrupt): Adjust to use ptids.
13218 (linux_read_auxv): Inline `inferior_pid'.
13219 (initialize_low): Don't reference thread_db_active.
13220 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13221 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13222 (ps_getpid): Return the pid of the current inferior.
13223 * thread-db.c (proc_handle, thread_agent): Delete.
13224 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13226 (find_one_thread): Change argument type to ptid_t. Adjust to
13228 (maybe_attach_thread): Adjust to per-process data and ptids.
13229 (thread_db_find_new_threads): Ditto.
13230 (thread_db_init): Ditto.
13231 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13232 processes table. Adjust to use ptids.
13233 (spu_kill, spu_detach): Adjust interface. Remove process from
13235 (spu_join, spu_thread_alive): Adjust interface.
13236 (spu_wait): Adjust interface. Remove process from processes
13237 table. Adjust to use ptids.
13238 * win32-low.c (current_inferior_tid): Delete.
13239 (current_inferior_ptid): New.
13240 (debug_event_ptid): New.
13241 (thread_rec): Take a ptid. Adjust.
13242 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13243 (child_delete_thread): Ditto.
13244 (do_initial_child_stuff): Add `attached' argument. Add process to
13246 (child_fetch_inferior_registers, child_store_inferior_registers):
13248 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13249 (win32_attach): Pass 1 to do_initial_child_stuff.
13250 (win32_kill): Adjust interface. Remove process from processes
13252 (win32_detach): Ditto.
13253 (win32_join): Adjust interface.
13254 (win32_thread_alive): Take a ptid.
13255 (win32_resume): Adjust to use ptids.
13256 (get_child_debug_event): Ditto.
13257 (win32_wait): Adjust interface. Remove exiting process from
13260 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13262 Non-stop mode support.
13264 * server.h (non_stop): Declare.
13265 (gdb_client_data, handler_func): Declare.
13266 (delete_file_handler, add_file_handler, start_event_loop):
13268 (handle_serial_event, handle_target_event, push_event)
13269 (putpkt_notif): Declare.
13270 * target.h (enum resume_kind): New.
13271 (struct thread_resume): Replace `step' field by `kind' field.
13272 (TARGET_WNOHANG): Define.
13273 (struct target_ops) <wait>: Add `options' argument.
13274 <supports_non_stop, async, start_non_stop>: New fields.
13275 (target_supports_non_stop, target_async): New.
13276 (start_non_stop): Declare.
13277 (mywait): Add `options' argument.
13278 * target.c (mywait): Add `options' argument. Print child exit
13279 notifications here.
13280 (start_non_stop): New.
13281 * server.c (non_stop, own_buf, mem_buf): New globals.
13282 (struct vstop_notif): New.
13283 (notif_queue): New global.
13284 (queue_stop_reply, push_event, discard_queued_stop_replies)
13285 (send_next_stop_reply): New.
13286 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13288 (attach_inferior): In non-stop mode, don't wait for the target
13290 (handle_general_set): Handle QNonStop.
13291 (handle_query): When handling qC, return the current general
13292 thread, instead of the first thread of the list.
13293 (handle_query): If the backend supports non-stop mode, include
13294 QNonStop+ in the qSupported query response.
13295 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13297 (handle_v_attach, handle_v_run): Handle non-stop mode.
13298 (handle_v_stopped): New.
13299 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13300 (myresume): Adjust to use resume_kind. Handle non-stop.
13301 (queue_stop_reply_callback): New.
13302 (handle_status): Handle non-stop mode.
13303 (main): Clear non_stop flag on reconnection. Use the event-loop.
13304 Refactor serial protocol handling from here ...
13305 (process_serial_event): ... to this new function. When GDB
13306 selects any thread, select one here. In non-stop mode, wait until
13307 GDB acks all pending events before exiting.
13308 (handle_serial_event, handle_target_event): New.
13309 * remote-utils.c (remote_open): Install remote_desc in the event
13311 (remote_close): Remove remote_desc from the event loop.
13312 (putpkt_binary): Rename to...
13313 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13314 (putpkt_binary): New as wrapper around putpkt_binary_1.
13315 (putpkt_notif): New.
13316 (prepare_resume_reply): In non-stop mode, don't change the
13318 * event-loop.c: New.
13319 * Makefile.in (OBJ): Add event-loop.o.
13320 (event-loop.o): New rule.
13322 * linux-low.h (pid_of): Moved here.
13324 (get_lwp_thread): Use lwpid_of.
13325 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13326 * linux-low.c (pid_of): Delete.
13327 (inferior_pid): Use lwpid_of.
13328 (linux_event_pipe): New.
13329 (target_is_async_p): New.
13331 (handle_extended_wait): Use lwpid_of.
13332 (add_lwp): Don't set lwpid field.
13333 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13334 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13335 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13336 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13337 first. Adjust to linux_wait_for_event interface changes. Use
13339 (linux_detach): Don't delete the main lwp here.
13340 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13341 (status_pending_p): Don't consider explicitly suspended lwps.
13342 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13343 pointer. Add OPTIONS argument. Change return type to int. Use
13344 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13345 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13346 pointer. Add status pointer argument. Return a pid instead of a
13347 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13348 changes. In non-stop mode, don't switch to a random thread.
13349 (linux_wait): Rename to...
13350 (linux_wait_1): ... this. Add target_options argument, and handle
13351 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13352 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13353 clean exit and signal exit code. Don't stop all threads in
13354 non-stop mode. In all-stop mode, only stop all threads when
13355 reporting a stop to GDB. Handle explicit thread stop requests.
13356 (async_file_flush, async_file_mark): New.
13358 (send_sigstop): Use lwpid_of.
13359 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13360 interface changes. In non-stop mode, don't switch to a random
13362 (linux_resume_one_lwp): Use lwpid_of.
13363 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13364 (linux_resume_one_thread): ... this. Handle resume_stop. In
13365 non-stop mode, don't look for pending flag in all threads.
13366 (resume_status_pending_p): Don't consider explicitly suspended
13368 (my_waitpid): Reimplement. Emulate __WALL.
13369 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13371 (sigchld_handler, linux_supports_non_stop, linux_async)
13372 (linux_start_non_stop): New.
13373 (linux_target_ops): Register linux_supports_non_stop, linux_async
13374 and linux_start_non_stop.
13375 (initialize_low): Install SIGCHLD handler.
13376 * thread-db.c (thread_db_create_event, find_one_thread)
13377 (thread_db_get_tls_address): Use lwpid_of.
13378 * win32-low.c (win32_detach): Adjust to use resume_kind.
13379 (win32_wait): Add `options' argument.
13380 * spu-low.c (spu_resume): Adjust to use resume_kind.
13381 (spu_wait): Add `options' argument.
13383 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13385 Decouple target code from remote protocol.
13387 * target.h (enum target_waitkind): New.
13388 (struct target_waitstatus): New.
13389 (struct target_ops) <wait>: Return an unsigned long. Take a
13390 target_waitstatus pointer instead of a char pointer.
13391 (mywait): Likewise.
13392 * target.c (mywait): Change prototype to return an unsigned long.
13393 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13394 * server.h (thread_from_wait, old_thread_from_wait): Delete
13396 (prepare_resume_reply): Change prototype to take a
13398 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13399 (last_status, last_ptid): New.
13400 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13401 pid instead of a signal.
13402 (attach_inferior): Remove "status" and "signal" parameters.
13404 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13406 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13407 (handle_v_requests, myresume): Remove "status" and "signal"
13408 parameters. Adjust.
13409 (handle_status): New.
13410 (main): Delete local `status'. Adjust.
13411 * remote-utils.c: Include target.h.
13412 (prepare_resume_reply): Change prototype to take a
13413 target_waitstatus. Adjust.
13415 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13417 * spu-low.c (spu_wait): Adjust.
13418 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13420 (win32_wait): Adjust.
13422 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13424 * target.h (struct thread_resume): Delete leave_stopped member.
13425 (struct target_ops): Add a `n' argument to the `resume' callback.
13426 * server.c (start_inferior): Adjust.
13427 (handle_v_cont, myresume): Adjust.
13428 * linux-low.c (check_removed_breakpoint): Adjust to resume
13429 interface change, and to removed leave_stopped field.
13430 (resume_ptr): Delete.
13431 (struct thread_resume_array): New.
13432 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13433 resume interface change.
13434 (linux_continue_one_thread, linux_queue_one_thread)
13435 (resume_status_pending_p): Check if the resume field is NULL
13436 instead of checking the leave_stopped member.
13437 (linux_resume): Adjust to the target resume interface change.
13438 * spu-low.c (spu_resume): Adjust to the target resume interface
13440 * win32-low.c (win32_detach, win32_resume): Ditto.
13442 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13444 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13446 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13448 (linux_continue_one_thread): Only preserve the stepping flag if
13449 there's a pending breakpoint.
13451 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13453 * server.c (main): After the inferior having exited, call
13454 remote_close before exiting gdbserver.
13456 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13458 Fix size of FPSCR in Power 7 processors.
13459 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13460 (PPC_FEATURE_HAS_DFP): New #define.
13461 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13464 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13466 * server.c (handle_query) Whitespace and formatting.
13468 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13470 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13471 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13472 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13473 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13474 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13475 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13476 Makefile.in, configure.ac: Fix whitespace throughout.
13477 * configure: Regenerate.
13479 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13481 * inferiors.c (find_inferior): Make it safe for the callback
13482 function to delete the currently iterated inferior.
13484 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13486 * Makefile.in (linuw_low_h): Move higher.
13487 (thread-db.o): Depend on $(linux_low_h).
13489 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13491 Rename "process" to "lwp" throughout.
13493 * linux-low.c (all_processes): Rename to...
13494 (all_lwps): ... this.
13495 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13496 (add_process): Rename to ...
13497 (add_lwp): ... this. Adjust.
13498 (linux_create_inferior): Adjust.
13499 (linux_attach_lwp): Adjust.
13500 (linux_attach): Adjust.
13501 (linux_kill_one_process): Rename to ...
13502 (linux_kill_one_lwp): ... this. Adjust.
13503 (linux_kill): Adjust.
13504 (linux_detach_one_process): Rename to ...
13505 (linux_detach_one_lwp): ... this. Adjust.
13506 (linux_detach): Adjust.
13507 (check_removed_breakpoint): Adjust.
13508 (status_pending_p): Adjust.
13509 (linux_wait_for_process): Rename to ...
13510 (linux_wait_for_lwp): ... this. Adjust.
13511 (linux_wait_for_event): Adjust.
13512 (send_sigstop): Adjust.
13513 (wait_for_sigstop): Adjust.
13514 (stop_all_processes): Rename to ...
13515 (stop_all_lwps): ... this.
13516 (linux_resume_one_process): Rename to ...
13517 (linux_resume_one_lwp): ... this. Adjust.
13518 (linux_set_resume_request, linux_continue_one_thread)
13519 (linux_queue_one_thread, resume_status_pending_p)
13520 (usr_store_inferior_registers, regsets_store_inferior_registers)
13521 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13523 * linux-low.h (get_process): Rename to ...
13524 (get_lwp): ... this. Adjust.
13525 (get_thread_process): Rename to ...
13526 (get_thread_lwp): ... this. Adjust.
13527 (get_process_thread): Rename to ...
13528 (get_lwp_thread): ... this. Adjust.
13529 (struct process_info): Rename to ...
13530 (struct lwp_info): ... this.
13531 (all_processes): Rename to ...
13532 (all_lwps): ... this.
13533 * proc-service.c (ps_lgetregs): Adjust.
13534 * thread-db.c (thread_db_create_event, find_one_thread)
13535 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13537 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13539 * server.c (handle_query): Handle "qAttached".
13541 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13543 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13544 GPLv3, update license URL.
13546 2009-03-01 Doug Evans <dje@google.com>
13548 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13549 (server_h): Add gdb_signals.h.
13550 (signals.o): Update.
13551 * server.h (target_signal_from_host,target_signal_to_host_p)
13552 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13554 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13556 * remote-utils.c (getpkt): Also generate remote-debug
13557 information if noack_mode is set.
13559 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13561 * server.c (handle_query): Report qXfer:siginfo:read and
13562 qXfer:siginfo:write as supported and handle them.
13563 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13564 * linux-low.c (linux_xfer_siginfo): New.
13565 (linux_target_ops): Set it.
13567 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13569 * server.c (gdbserver_usage): Mention --remote-debug.
13570 (main): Accept '--remote-debug' switch.
13572 2009-01-18 Doug Evans <dje@google.com>
13574 * regcache.c (new_register_cache): No need to check result of xcalloc.
13575 * server.c (handle_search_memory): Back out calls to xmalloc,
13576 result is checked and error is returned to user upon failure.
13577 (handle_query): Ditto. Add more checks for result of malloc.
13578 (handle_v_cont): Check result of malloc, report error back to
13580 (handle_v_run): Ditto. Call freeargv.
13581 * server.h (freeargv): Declare.
13582 * utils.c (freeargv): New fn.
13584 2009-01-15 Doug Evans <dje@google.com>
13586 * gdbreplay.c (perror_with_name): Make arg const char *.
13587 * server.h (target_signal_to_name): Make return type const char *.
13588 * thread-db.c (thread_db_err_str): Make return type const char *.
13589 * utils.c (perror_with_name): Make arg const char *.
13591 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13593 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13594 when handling a EXIT_PROCESS_DEBUG_EVENT.
13596 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13598 * gdbreplay.c (gdbreplay_version): Update copyright year.
13599 * server.c (gdbserver_version): Likewise.
13601 2009-01-05 Doug Evans <dje@google.com>
13603 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13604 (handle_extended_wait): Improve comment.
13606 2008-12-13 Doug Evans <dje@google.com>
13608 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13609 * server.h (ATTR_MALLOC): New macro.
13610 (xmalloc,xcalloc,xstrdup): Declare.
13611 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13612 * inferiors.c: Ditto.
13613 * linux-low.c: Ditto.
13614 * mem-break.c: Ditto.
13615 * regcache.c: Ditto.
13616 * remote-utils.c: Ditto.
13619 * win32-low.c: Ditto.
13621 2008-12-12 Doug Evans <dje@google.com>
13623 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13624 in debugging printf.
13626 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13628 2008-12-09 Doug Evans <dje@google.com>
13630 * linux-low.h (struct process_info): Delete member tid, unused.
13631 * thread-db.c (find_one_thread): Update.
13632 (maybe_attach_thread): Update.
13634 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13636 * target.h (struct target_ops): Add qxfer_osdata member.
13637 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13639 (linux_qxfer_osdata): New functions.
13640 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13642 * server.c (handle_query): Handle "qXfer:osdata:read:".
13643 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13644 (buffer_xml_printf): New functions.
13645 * server.h (struct buffer): New.
13646 (buffer_grow_str, buffer_grow_str0): New macros.
13647 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13648 (buffer_xml_printf): Declare.
13650 2008-11-24 Doug Evans <dje@google.com>
13652 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13654 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13656 * server.c (handle_v_run): Always use the supplied argument list.
13658 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13660 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13661 (xtensa_regmap_table): Add entry for scompare1.
13663 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13665 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13666 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13667 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13668 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13669 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13670 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13671 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13672 XML target descriptions.
13673 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13674 when inferior is running on an ISA 2.05 or later processor. Add
13675 special case to return offset for full 64-bit slot of FPSCR when
13678 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13680 * Makefile.in (SFILES, clean): Added sparc64 files.
13681 (reg-sparc64.o, reg-sparc64.c): New.
13682 * configure.srv (sparc*-*-linux*): New configuration.
13683 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13684 syscall arguments for SPARC.
13685 (regsets_store_inferior_registers): Likewise.
13686 * linux-sparc-low.c: New file.
13688 2008-10-21 Doug Evans <dje@google.com>
13690 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13691 (READLINE_DIR,READLINE_DEP): Delete.
13692 (INTERNAL_CFLAGS): Update.
13693 (LINTFLAGS): Update.
13695 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13697 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13698 whole argv from the last run, not just argv[0].
13700 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13702 * regcache.c (new_register_cache): Return NULL if the register
13703 cache size isn't known yet.
13704 (free_register_cache): Avoid dereferencing a NULL regcache.
13706 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13708 * configure.srv: Merge MIPS and MIPS64.
13710 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13712 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13714 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13716 * Makefile.in: Add required vsx dependencies.
13718 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13719 Declare init_registers_powerpc_vsx32l.
13720 Declare init_registers_powerpc_vsx64l.
13721 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13722 (ppc_arch_setup): Check for VSX in hwcap.
13723 (ppc_fill_vsxregset): New function.
13724 (ppc_store_vsxregset): New function.
13725 Add new VSX entry in regset_info target_regsets.
13727 * configure.srv: Add new VSX dependencies.
13729 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13731 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13732 (remote_open): Set or clear transport_is_reliable.
13733 (putpkt_binary): Don't expect acks in noack mode.
13734 (getpkt): Don't send ack/nac in noack mode.
13735 * server.c (handle_general_set): Handle QStartNoAckMode.
13736 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13738 (main): Reset noack_mode on every connection.
13739 * server.h (noack_mode): Declare.
13741 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13743 * Makefile.in (GDBREPLAY_OBS): New variable.
13744 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13746 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13747 Daniel Jacobowitz <dan@codesourcery.com>
13749 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13750 (usr_store_inferior_registers): Likewise.
13751 (regsets_store_inferior_registers): Likewise.
13753 2008-07-31 Rolf Jansen <rj@surtec.com>
13754 Pedro Alves <pedro@codesourcery.com>
13756 * configure.ac: Check for memmem declaration.
13757 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13758 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13759 (disable_packet_qfThreadInfo): Unconditionally compile.
13760 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13761 * configure, config.in: Regenerate.
13763 2008-07-28 Doug Kwan <dougkwan@google.com>
13765 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13766 (linux_write_memory): Remove declaration of errno.
13768 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13770 * linux-low.c (handle_extended_wait): Do not use "status"
13771 variable uninitialized.
13773 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13775 * server.c (handle_v_attach): Inhibit reporting dll changes.
13777 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13779 * remote-utils.c (prepare_resume_reply): If requested, don't
13780 output "thread:TID" in the T stop reply.
13782 * server.c (disable_packet_vCont, disable_packet_Tthread)
13783 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13784 (handle_query): If requested, disable support for qC, qfThreadInfo
13786 (handle_v_requests): If requested, disable support for vCont.
13787 (gdbserver_show_disableable): New.
13788 (main): Handle --disable-packet and --disable-packet=LIST.
13790 * server.h (disable_packet_vCont, disable_packet_Tthread)
13791 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13793 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13795 * server.c (gdbserver_usage): Mention --version.
13797 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13799 * Makefile.in (gdbreplay.o): New rule.
13801 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13803 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13804 message, not gdbserver.
13806 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13807 Nathan Sidwell <nathan@codesourcery.com>
13808 Joseph Myers <joseph@codesourcery.com>
13810 * acinclude.m4: Include ../../config/acx.m4.
13811 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13812 * configure, config.in: Regenerate.
13813 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13814 * server.c (gdbserver_version): Print PKGVERSION.
13815 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13816 (main): Adjust gdbserver_usage calls.
13817 * gdbreplay.c (version, host_name): Add declarations.
13818 (gdbreplay_version, gdbreplay_usage): New.
13819 (main): Accept --version and --help options.
13821 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13823 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13824 (arm_breakpoint_at): Handle Thumb.
13825 (the_low_target): Add comment.
13827 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13829 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13831 2008-05-09 Doug Evans <dje@google.com>
13833 * server.h (decode_search_memory_packet): Declare.
13834 * remote-utils.c (decode_search_memory_packet): New fn.
13835 * server.c (handle_search_memory_1): New fn.
13836 (handle_search_memory): New fn.
13837 (handle_query): Process qSearch:memory packets.
13839 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13841 * regcache.c (registers_length): Remove.
13842 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13843 full register packet.
13844 * regcache.h (registers_length): Remove prototype.
13845 * server.h (PBUFSIZ): Define to 16384.
13847 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13849 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13850 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13851 powerpc-64l.o, and powerpc-altivec64l.o.
13852 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13853 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13854 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13855 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13856 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13859 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13860 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13861 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13862 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13863 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13864 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13865 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13866 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13867 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13868 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13871 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13872 (init_registers_powerpc_32l): ... this new prototype.
13873 (init_registers_powerpc_32): Remove, replace by ...
13874 (init_registers_powerpc_altivec32l): ... this new prototype.
13875 (init_registers_powerpc_e500): Remove, replace by ...
13876 (init_registers_powerpc_e500l): ... this new prototype.
13877 (init_registers_ppc64): Remove, replace by ...
13878 (init_registers_powerpc_64l): ... this new prototype.
13879 (init_registers_powerpc_64): Remove, replace by ...
13880 (init_registers_powerpc_altivec64l): ... this new prototype.
13881 (ppc_num_regs): Set to 73.
13882 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13883 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13884 (ppc_cannot_store_register): Handle orig_r3 and trap.
13885 (ppc_arch_setup): Update init_registers_... calls.
13886 (ppc_fill_gregset): Handle orig_r3 and trap.
13888 * inferiors.c (clear_inferiors): Reset current_inferior.
13890 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13892 * acinclude.m4: Add override.m4.
13893 * configure: Regenerate.
13895 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13897 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13898 initial call to init_register_ppc64.
13900 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13902 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13903 single powerpc*-*-linux* case.
13904 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13906 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13908 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13909 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13911 * linux-ppc-low.c: Include <elf.h>.
13912 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13913 (ppc_hwcap): New global variable.
13914 (ppc_regmap): Remove __SPE__ #ifdef sections.
13915 (ppc_regmap_e500): New global variable.
13916 (ppc_cannot_store_register): Update __SPE__ special case.
13917 (ppc_get_hwcap): New function.
13918 (ppc_arch_setup): Use it to determine whether inferior supports
13919 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13920 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13921 Do not access registers if target does not support AltiVec.
13922 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13923 Do not access registers if target does not support SPE.
13924 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13926 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13928 * linux-low.c (disabled_regsets, num_regsets): New.
13929 (use_regsets_p): Delete.
13930 (linux_wait_for_process): Clear disabled_regsets.
13931 (regsets_fetch_inferior_registers): Check and set it.
13932 (regsets_store_inferior_registers): Likewise.
13933 (linux_fetch_registers, linux_store_registers): Do not use
13935 (initialize_low): Allocate disabled_regsets.
13937 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13939 * Makefile.in (LIBOBJS): New.
13940 (OBS): Use LIBOBJS.
13941 (memmem.o): New rule.
13942 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13943 * configure: Regenerated.
13945 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13947 * server.c (handle_query): Never return "unsupported" for
13948 qXfer:features:read queries.
13950 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13952 * server.c (get_features_xml): Fix inverted condition.
13953 (handle_query): Always support qXfer:feature:read.
13955 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13957 * server.c (wrapper_argv): New.
13958 (start_inferior): Handle wrapper_argv. If set, expect an extra
13960 (gdbserver_usage): Document --wrapper.
13961 (main): Parse --wrapper.
13963 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13965 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13966 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13967 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13968 (ppc_set_pc): Likewise.
13969 (ppc_arch_setup): New function.
13970 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13971 of collect_register.
13972 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13974 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13976 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13977 instead of linux-ppc64-low.o.
13978 * linux-ppc64-low.c: Remove file.
13979 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13980 (linux-ppc64-low.o): Remove rule.
13982 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13983 (init_registers_powerpc_64): Likewise.
13984 (ppc_regmap): Conditionally define depending on __powerpc64__.
13985 (ppc_cannot_store_register): Do not special-case "fpscr" when
13986 compiled on __powerpc64__.
13987 (ppc_collect_ptrace_register): New function.
13988 (ppc_supply_ptrace_register): New function.
13989 (ppc_breakpoint): Change type to "unsigned int".
13990 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13991 (the_low_target): Conditionally provide initializers for the
13992 arch_setup member depending on __powerpc64__. Install
13993 collect_ptrace_register and supply_ptrace_register members.
13995 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13997 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13998 * server.c (gdbserver_xmltarget): Define.
13999 (get_features_xml): Use it to replace "target.xml" and arch_string.
14001 * configure.srv: Remove srv_xmltarget. Add XML files that were
14002 mentioned there to srv_xmlfiles instead. Remove conditional tests
14003 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14004 srv_xmlfiles and srv_regobj to include all possible choices.
14005 * configure.ac (srv_xmltarget): Remove.
14006 (srv_xmlfiles): Do not add "target.xml".
14007 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14008 checks for supplementary target information.
14009 * configure: Regenerate.
14010 * Makefile.in (XML_TARGET): Remove.
14011 (target.xml): Remove rule.
14012 (clean): Do not clean up target.xml.
14013 (.PRECIOUS): Do not mention target.xml.
14015 * target.h (struct target_ops): Remove arch_string member.
14016 * linux-low.c (linux_arch_string): Remove.
14017 (linux_target_ops): Remove arch_string initializer.
14018 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14019 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14020 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14021 * spu-low.c (spu_arch_string): Remove.
14022 (spu_target_ops): Remove arch_string initializer.
14023 * win32-low.c (win32_arch_string): Remove.
14024 (win32_target_ops): Remove arch_string initializer.
14025 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14026 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14027 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14029 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14031 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14032 by collect_ptrace_register and supply_ptrace_register hooks.
14033 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14034 instead of checking for the_low_target.left_pad_xfer.
14035 (usr_store_inferior_registers): Use collect_ptrace_register callback
14036 instead of checking for the_low_target.left_pad_xfer.
14038 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14039 (s390_supply_ptrace_register): Likewise.
14040 (s390_fill_gregset): Call s390_collect_ptrace_register.
14041 (the_low_target): Update.
14043 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14044 (ppc_supply_ptrace_register): Likewise.
14045 (the_low_target): Update.
14047 * linux-i386-low.c (the_low_target): Update.
14048 * linux-x86-64-low.c (the_low_target): Update.
14050 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14052 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14053 reg-s390.o and reg-s390x.o.
14055 * linux-low.c (new_inferior): New global variable.
14056 (linux_create_inferior, linux_attach): Set it.
14057 (linux_wait_for_process): Call the_low_target.arch_setup after the
14058 target has stopped for the first time.
14059 (initialize_low): Do not call the_low_target.arch_setup.
14061 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14062 (s390_set_pc): Likewise.
14063 (s390_arch_setup): New function.
14064 (the_low_target): Use s390_arch_setup as arch_setup routine.
14066 * regcache.c (realloc_register_cache): New function.
14067 (set_register_cache): Call it for each existing regcache.
14069 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14071 * server.h (init_registers): Remove prototype.
14073 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14074 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14075 instead of init_registers ().
14076 * linux-arm-low.c (init_registers_arm): Add prototype.
14077 (init_registers_arm_with_iwmmxt): Likewise.
14078 (the_low_target): Add initializer for arch_setup field.
14079 * linux-cris-low.c (init_registers_cris): Add prototype.
14080 (the_low_target): Add initializer for arch_setup field.
14081 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14082 (the_low_target): Add initializer for arch_setup field.
14083 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14084 (the_low_target): Add initializer for arch_setup field.
14085 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14086 (the_low_target): Add initializer for arch_setup field.
14087 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14088 (the_low_target): Add initializer for arch_setup field.
14089 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14090 (the_low_target): Add initializer for arch_setup field.
14091 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14092 (init_registers_mips64_linux): Likewise.
14093 (the_low_target): Add initializer for arch_setup field.
14094 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14095 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14096 (the_low_target): Add initializer for arch_setup field.
14097 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14098 (init_registers_powerpc_64): Likewise.
14099 (the_low_target): Add initializer for arch_setup field.
14100 * linux-s390-low.c (init_registers_s390): Add prototype.
14101 (init_registers_s390x): Likewise.
14102 (the_low_target): Add initializer for arch_setup field.
14103 * linux-sh-low.c (init_registers_sh): Add prototype.
14104 (the_low_target): Add initializer for arch_setup field.
14105 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14106 (the_low_target): Add initializer for arch_setup field.
14107 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14108 (the_low_target): Add initializer for arch_setup field.
14110 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14111 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14112 instead of init_registers ().
14113 * win32-arm-low.c (init_registers_arm): Add prototype.
14114 (the_low_target): Add initializer for arch_setup field.
14115 * win32-i386-low.c (init_registers_i386): Add prototype.
14116 (the_low_target): Add initializer for arch_setup field.
14118 * spu-low.c (init_registers_spu): Add prototype.
14119 (initialize_low): Call initialie_registers_spu () instead of
14120 initialize_registers ().
14122 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14124 * server.c (handle_v_requests): When handling the vRun and vAttach
14125 packets, if already debugging a process, don't kill it. Return an
14128 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14130 * server.c (handle_query): Correct length check.
14132 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14134 * win32-low.c (do_initial_child_stuff): Add process handle
14135 parameter. Set current_process_handle and current_process_id from the
14136 parameters. Clear globals.
14137 (win32_create_inferior): Don't set current_process_handle and
14138 current_process_id here. Instead pass them on the call to
14139 do_initial_child_stuff.
14140 (win32_attach): Likewise.
14141 (win32_clear_inferiors): New.
14142 (win32_kill): Don't close the current process handle or the
14143 current thread handle here. Instead call win32_clear_inferiors.
14144 (win32_detach): Don't open a new handle to the process. Call
14145 win32_clear_inferiors.
14146 (win32_join): Don't rely on current_process_handle; open a new
14147 handle using the process id.
14148 (win32_wait): Call win32_clear_inferiors when the inferior process
14151 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14153 * server.c (monitor_show_help): Add "exit".
14155 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14157 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14158 (clean): Add reg-xtensa.c.
14159 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14160 * configure.srv (xtensa*-*-linux*) New target.
14161 * linux-xtensa-low.c: New.
14162 * xtensa-xtregs.c: New.
14164 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14166 * hostio.c: Don't include errno.h.
14167 (errno_to_fileio_errno): Move to hostio-errno.
14168 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14169 error number outputting to the target->hostio_last_error callback.
14170 (hostio_packet_error): Use FILEIO_EINVAL directly.
14171 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14172 calls to hostio_error.
14173 * hostio-errno.c: New.
14174 * server.h (hostio_last_error_from_errno): Declare.
14175 * target.h (target_ops): Add hostio_last_error member.
14176 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14177 as hostio_last_error handler.
14178 * spu-low.c (spu_target_ops): Likewise.
14179 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14180 (wince_hostio_last_error): New functions.
14181 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14182 as hostio_last_error handler.
14183 (win32_target_ops) [!_WIN32_WCE]: Register
14184 hostio_last_error_from_errno as hostio_last_error handler.
14185 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14186 (hostio-errno.o): New rule.
14187 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14188 * configure.srv (srv_hostio_err_objs): New variable. Default to
14190 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14191 * configure: Regenerate.
14193 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14195 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14196 (linux_kill, linux_detach): Clean up the process list.
14197 * remote-utils.c (remote_open): Improve port number parsing.
14198 (putpkt_binary, input_interrupt): Only send interrupts if the target
14200 * server.c (extended_protocol): Make static.
14201 (attached): Define earlier.
14202 (exit_requested, response_needed, program_argv): New variables.
14203 (target_running): New.
14204 (start_inferior): Clear attached here.
14205 (attach_inferior): Set attached here.
14206 (require_running): Define.
14207 (handle_query): Use require_running and target_running. Implement
14209 (handle_v_attach, handle_v_run): New.
14210 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14211 (gdbserver_usage): Update.
14212 (main): Redo argument parsing. Handle --debug and --multi. Handle
14213 --attach along with other options or after the port. Save
14214 program_argv. Support no initial program. Resynchronize
14215 communication with GDB after an error. Handle "monitor exit".
14216 Use require_running and target_running. Always allow the extended
14217 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14218 restart in extended mode.
14219 * README: Refer to the GDB manual. Update --attach usage.
14221 2007-12-20 Andreas Schwab <schwab@suse.de>
14223 * linux-low.c (STACK_SIZE): Define.
14224 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14225 (linux_test_for_tracefork): Likewise.
14227 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14229 * linux-low.c (linux_wait_for_event): Update messages. Do not
14230 reinsert auto-delete breakpoints.
14231 * mem-break.c (struct breakpoint): Change return type of handler to
14233 (set_breakpoint_at): Update handler type.
14234 (reinsert_breakpoint_handler): Return 1 instead of calling
14236 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14238 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14239 * mem-break.h (set_breakpoint_at): Update handler type.
14240 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14241 * win32-low.c (auto_delete_breakpoint): New.
14242 (get_child_debug_event): Use it.
14244 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14246 * configure.ac: Check for pread and pwrite.
14247 * hostio.c (handle_pread): Fall back to lseek and read.
14248 (handle_pwrite): Fall back to lseek and write.
14249 * config.in, configure: Regenerated.
14251 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14253 * server.c (myresume): Add own_buf argument.
14254 (main): Update calls.
14256 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14258 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14259 * remote-utils.c (remote_open): Do not call disable_async_io.
14260 (block_async_io): Delete.
14261 (unblock_async_io): Make static.
14262 (initialize_async_io): New.
14263 * server.c (handle_v_cont): Handle async I/O here.
14264 (myresume): Likewise. Move other common resume tasks here...
14265 (main): ... from here. Call initialize_async_io. Disable async
14266 I/O before the main loop.
14267 * server.h (initialize_async_io): Declare.
14268 (block_async_io, unblock_async_io): Delete prototypes.
14269 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14271 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14273 * remote-utils.c (readchar): Allow binary data in received messages.
14275 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14277 * win32-low.c (attaching): New global.
14278 (win32_create_inferior): Clear the `attaching' global.
14279 (win32_attach): Set the `attaching' global.
14280 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14281 attaching. Only set a breakpoint at the entry point if not
14284 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14286 * server.c (main): Don't report dll events on the initial
14287 connection on attaches.
14289 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14291 * server.c (main): Relax numerical bases supported for the pid of
14292 the --attach command line argument.
14294 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14296 * win32-low.c (win32_attach): Call OpenProcess before
14297 DebugActiveProcess, not after. Add last error output to error
14300 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14302 * win32-low.c (win32_get_thread_context)
14303 (win32_set_thread_context): New functions.
14304 (thread_rec): Use win32_get_thread_context.
14305 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14306 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14309 2007-12-03 Leo Zayas
14310 Pedro Alves <pedro_alves@portugalmail.pt>
14312 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14314 (child_add_thread): Minor cleanup.
14315 (child_continue): Resume artificially suspended threads before
14316 calling ContinueDebugEvent.
14317 (suspend_one_thread): New.
14318 (fake_breakpoint_event): New.
14319 (get_child_debug_event): Change return type to int. Check here if
14320 gdb sent an interrupt request. If a soft interrupt was requested,
14321 fake a breakpoint event. Return 0 if there is no event to handle,
14323 (win32_wait): Don't check here if gdb sent an interrupt request.
14324 Ensure there is a valid event to handle.
14325 (win32_request_interrupt): Add soft interruption method as last
14328 2007-12-03 Leo Zayas
14329 Pedro Alves <pedro_alves@portugalmail.pt>
14331 * win32-low.h (win32_thread_info): Add descriptions to the
14332 structure members. Replace `suspend_count' counter by a
14334 * win32-low.c (thread_rec): Update condition of when to get the
14335 context from the inferior. Rely on ContextFlags being set if it
14336 has already been retrieved. Only suspend the inferior thread if
14337 we haven't already. Warn if that fails.
14338 (continue_one_thread): s/suspend_count/suspended/. Only call
14339 ResumeThread once. Warn if that fails.
14341 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14343 * win32-low.c (win32_wait): Don't read from the inferior when it
14344 has already exited.
14346 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14348 * Makefile.in (win32_low_h): New variable.
14349 (win32-low.o): Add dependency on $(win32_low_h).
14350 (win32-arm-low.o, win32-i386-low.o): New rules.
14352 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14354 * hostio.c: Correct copyright year.
14356 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14358 * Makefile.in (OBS): Add hostio.o.
14359 (hostio.o): New rule.
14360 * server.h (handle_vFile): Declare.
14361 * hostio.c: New file.
14362 * server.c (handle_v_requests): Take packet_len and new_packet_len
14363 for binary packets. Call handle_vFile.
14364 (main): Update call to handle_v_requests.
14366 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14368 * linux-low.c: Include <sched.h>.
14370 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14372 * linux-low.c (linux_tracefork_grandchild): New.
14373 (linux_tracefork_child): Use clone.
14374 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14376 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14378 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14380 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14382 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14384 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14386 * inferiors.c (change_inferior_id): Delete.
14387 (add_pid_to_list, pull_pid_from_list): New.
14388 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14389 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14390 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14391 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14392 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14393 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14394 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14395 (using_threads): Always set to 1.
14396 (handle_extended_wait): New.
14397 (add_process): Do not set TID.
14398 (linux_create_inferior): Set must_set_ptrace_flags.
14399 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14400 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14401 (linux_thread_alive): Rename TID argument to LWPID.
14402 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14403 (linux_wait_for_event): Do not use TID or check using_threads. Update
14404 call to dead_thread_notify. Call handle_extended_wait.
14405 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14406 (send_sigstop): Delete sigstop_sent.
14407 (wait_for_sigstop): Avoid TID.
14408 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14409 (linux_test_for_tracefork): New.
14410 (linux_lookup_signals): Use thread_db_active and
14411 linux_supports_tracefork_flag.
14412 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14413 * linux-low.h (get_process_thread): Avoid TID.
14414 (struct process_ifo): Move thread_known and tid to the end. Remove
14416 (linux_attach_lwp, thread_db_init): Update prototypes.
14417 * server.h (change_inferior_id): Delete prototype.
14418 (add_pid_to_list, pull_pid_from_list): New prototypes.
14419 * thread-db.c (thread_db_use_events): New.
14420 (find_first_thread): Rename to...
14421 (find_one_thread): ...this. Update callers and messages. Do not
14422 call fatal. Check thread_db_use_events. Do not call
14423 change_inferior_id or new_thread_notify.
14424 (maybe_attach_thread): Update. Do not call new_thread_notify.
14425 (thread_db_init): Set thread_db_use_events. Check use_events.
14426 * utils.c (fatal, warning): Correct message prefix.
14428 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14430 * Makefile.in (clean): Remove new files.
14431 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14432 (powerpc-64.o, powerpc-64.c): New rules.
14433 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14434 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14436 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14438 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14439 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14440 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14441 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14442 (target_regsets): Add AltiVec and SPE register sets.
14443 * configure.ac: Check for AltiVec and SPE.
14444 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14445 (ppc_fill_vrregset, ppc_store_vrregset): New.
14446 (target_regsets): Add AltiVec register set.
14447 * configure: Regenerated.
14449 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14451 * linux-low.c (O_LARGEFILE): Define.
14452 (linux_read_memory): Use /proc/PID/mem.
14453 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14454 * configure, config.in: Regenerated.
14456 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14458 * linux-low.c (linux_wait_for_event): Do not pass signals while
14461 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14463 * win32-low.c (create_process): New.
14464 (win32_create_inferior): Use create_process instead of
14465 CreateProcess. If create_process failed retry appending an ".exe"
14466 suffix. Store the GetLastError result immediatelly after
14467 create_process calls and use it on the call to error.
14469 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14471 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14473 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14475 * configure.ac: Switch license to GPLv3.
14477 2007-08-01 Michael Snyder <msnyder@access-company.com>
14479 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14481 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14483 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14485 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14486 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14487 CloseToolhelp32Snapshot.
14488 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14489 CloseToolhelp32Snapshot.
14491 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14493 * server.c (main): Check for inferior exit before main loop.
14495 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14497 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14498 instead of on tmp_desc.
14500 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14501 Daniel Jacobowitz <dan@codesourcery.com>
14503 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14504 (add_thread): Minor cleanups.
14505 (clear_inferiors): Move lower in the file. Clear the DLL
14507 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14508 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14509 (xml_escape_text): New.
14510 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14512 (handle_v_cont): Report errors.
14513 (gdbserver_version): Update.
14514 (main): Correct size of own_buf. Do not report initial DLL events.
14515 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14516 (unloaded_dll, xml_escape_text): New.
14517 * win32-low.c (enum target_waitkind): Update comments.
14518 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14519 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14520 (win32_EnumProcessModules, win32_GetModuleInformation)
14521 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14522 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14523 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14524 (win32_Module32First, win32_Module32Next, load_toolhelp)
14525 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14526 (get_child_debug_event): Handle DLL events.
14527 (win32_wait): Likewise.
14529 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14531 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14532 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14534 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14536 * win32-low.c (handle_output_debug_string): Ignore event if not
14539 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14541 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14543 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14545 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14547 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14549 * inferiors.c (change_inferior_id): Add comment.
14550 * linux-low.c (check_removed_breakpoint): Add an early
14551 prototype. Improve debug output.
14552 (linux_attach): Doc update.
14553 (linux_detach_one_process, linux_detach): Clean up before releasing
14555 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14556 * linux-low.h (struct process_info): Doc improvement.
14557 * mem-break.c (delete_all_breakpoints): New.
14558 * mem-break.h (delete_all_breakpoints): New prototype.
14559 * thread-db.c (find_first_thread): New.
14560 (thread_db_create_event): Call it instead of
14561 thread_db_find_new_threads. Clean up unused variables.
14562 (maybe_attach_thread): Remove first thread handling.
14563 (thread_db_find_new_threads): Use find_first_thread.
14564 (thread_db_get_tls_address): Likewise.
14566 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14568 * thread-db.c (thread_db_find_new_threads): Add prototype.
14569 (thread_db_create_event): Check for the main thread before adding
14571 (maybe_attach_thread): Only enable event reporting if TID == 0.
14572 (thread_db_get_tls_address): Check for new threads.
14574 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14576 * linux-low.c (linux_create_inferior): Try execv before execvp.
14577 * spu-low.c (spu_create_inferior): Likewise.
14579 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14581 * linux-low.c (linux_create_inferior): Change execv to execvp.
14582 * spu-low.c (spu_create_inferior): Likewies.
14584 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14586 * Makefile.in (clean): Clean new files instead of deleted ones.
14587 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14588 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14590 * configure.srv: Specify XML files and new regformats for MIPS and
14592 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14593 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14594 an entry for the restart register.
14595 (mips_cannot_fetch_register, mips_cannot_store_register)
14596 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14597 register names to match the XML descriptions.
14598 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14599 restart register instead of $0.
14601 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14602 Markus Deuling <deuling@de.ibm.com>
14604 * remote-utils.c (decode_xfer_write): New function.
14605 * server.h (decode_xfer_write): Add prototype.
14606 * server.c (handle_query): Add PACKET_LEN argument. Support
14607 qXfer:spu:read and qXfer:spu:write packets.
14608 (main): Pass packet_len to handle_query.
14609 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14610 * target.h (target_ops): Add qxfer_spu.
14612 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14614 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14615 accessing non-seekable spufs files.
14617 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14619 * server.c (handle_query): Add reply for qC packet.
14621 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14622 Leo Zayas <lerele@champenstudios@com>
14624 * server.h (check_remote_input_interrupt_request): New function.
14625 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14626 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14627 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14628 (check_remote_input_interrupt_request): New function.
14629 * server.h (check_remote_input_interrupt_request): Declare.
14630 * win32-low.c (winapi_DebugBreakProcess,
14631 winapi_GenerateConsoleCtrlEvent): New typedefs.
14632 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14634 (win32_wait): Check for remote interrupt request
14635 with check_remote_input_interrupt_request.
14636 (win32_request_interrupt): New function.
14637 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14639 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14641 * win32-low.c (debug_registers_changed,
14642 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14643 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14644 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14645 (thread_rec): Get context using the low target.
14646 (child_add_thread): Call thread_added on the low target,
14647 which does the same thing.
14649 (do_initial_child_stuff): Remove debug registers references.
14650 Set context using the low target. Resume threads after
14651 setting the contexts.
14652 (child_continue): Remove dead variable. Remove debug
14653 registers references.
14654 (child_fetch_inferior_registers): Go through the low target.
14655 (do_child_store_inferior_registers): Remove.
14656 (child_store_inferior_registers): Go through the low target.
14657 (win32_resume): Remove debug registers references.
14658 Set context using the low target.
14659 (handle_exception): Change return type to void. Don't record
14660 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14661 first chance exception.
14662 (get_child_debug_event): Change return type to void. Remove
14663 goto loop. Always return after waiting for debug event.
14664 (win32_wait): Convert to switch statement. Handle spurious
14667 * win32-i386-low.c (debug_registers_changed,
14668 debug_registers_used): New.
14669 (initial_stuff): Rename to ...
14670 (i386_initial_stuff): ... this. Clear debug registers
14672 (store_debug_registers): Delete.
14673 (i386_get_thread_context): New.
14674 (load_debug_registers): Delete.
14675 (i386_set_thread_context): New.
14676 (i386_thread_added): New.
14677 (single_step): Rename to ...
14678 (i386_single_step): ... this.
14679 (do_fetch_inferior_registers): Rename to ...
14680 (i386_fetch_inferior_register): ... this.
14681 (i386_store_inferior_register): New.
14682 (the_low_target): Adapt to new interface.
14684 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14685 (arm_get_thread_context): New.
14686 (arm_set_thread_context): New.
14688 (do_fetch_inferior_registers): Rename to ...
14689 (arm_fetch_inferior_register): ... this.
14690 (arm_store_inferior_register): New.
14691 (arm_wince_breakpoint): Reimplement as unsigned long.
14692 (arm_wince_breakpoint_len): Define.
14693 (the_low_target): Adapt to new interface.
14695 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14696 load_debug_registers. Add get_thread_context, set_thread_context,
14697 thread_added and store_inferior_register. Rename
14698 fetch_inferior_registers to fetch_inferior_register.
14699 (regptr): Remove declaration.
14701 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14703 * linux-low.c (linux_detach): Change return type to int. Return 0.
14704 * spu-low.c (spu_detach): Likewise.
14706 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14708 * target.h (target_ops): Change return type of detach to int.
14710 (join_inferior): New.
14711 * server.c (main): Don't skip detach support on mingw32.
14712 If the inferior doesn't support detaching return error.
14713 Call join_inferior instead of using waitpid.
14714 * linux-low.c (linux_join): New.
14715 (linux_target_op): Add linux_join.
14716 * spu-low.c (spu_join): New.
14717 (spu_target_ops): Add spu_join.
14718 * win32-low.c (win32_detach): Adapt to new interface.
14719 Reopen current_process_handle before detaching. Issue a child
14720 resume before detaching.
14722 (win32_target_op): Add win32_join.
14724 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14726 * win32-low.c (win32-attach): Fix return value.
14727 * target.h (target_ops): Describe ATTACH return values.
14729 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14731 * win32-low.c (GETPROCADDRESS): Define.
14732 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14733 (winapi_DebugSetProcessKillOnExit): Likewise.
14734 (win32_create_inferior): Force usage of ansi CreateProcessA.
14735 (win32_attach): Use GETPROCADDRESS.
14736 (win32_detach): Likewise.
14738 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14740 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14742 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14744 * win32-low.c: Commit leftover changes from 2007-03-29.
14746 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14748 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14749 fields short instead of int. Add explicit padding.
14750 (i387_cache_to_fsave): Remove unnecessary casts.
14751 (i387_fsave_to_cache): Doc fix.
14752 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14754 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14756 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14757 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14759 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14761 * configure.srv (arm*-*-mingw32ce*): Move near the other
14764 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14766 * configure.ac: Add errno checking.
14767 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14768 sys/file.h and malloc.h.
14769 (AC_CHECK_DECLS): Add perror.
14770 (srv_mingwce): Handle.
14771 * configure.srv (i[34567]86-*-cygwin*): Add
14772 win32-i386-low.o to srv_tgtobj.
14773 (i[34567]86-*-mingw*): Likewise.
14774 (arm*-*-mingw32ce*): Add case.
14775 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14776 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14777 [__MINGW32CE__] (strerror): New function.
14778 [__MINGW32CE__] (errno): Define to GetLastError.
14779 [__MINGW32CE__] (COUNTOF): New macro.
14780 (remote_open): Remove extra close call.
14781 * mem-break.c (delete_breakpoint_at): New function.
14782 * mem-break.h (delete_breakpoint_at): Declare.
14783 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14784 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14785 [USE_WIN32API] (read, write): Add char* casts.
14786 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14787 * server.h: Include wincecompat.h on Windows CE.
14788 [HAVE_ERRNO_H]: Check.
14789 (perror): Declare if not declared.
14790 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14791 (perror_with_name): Remove errno declaration.
14792 * wincecompat.h: New.
14793 * wincecompat.c: New.
14794 * win32-low.h: New.
14795 * win32-arm-low.c: New.
14796 * win32-i386-low.c: New.
14797 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14798 (OUTMSG2): Make it safe.
14800 (COUNTOF): New macro.
14801 (NUM_REGS): Get it from the low target.
14802 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14803 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14804 (thread_rec): Let low target handle debug registers.
14805 (child_add_thread): Likewise.
14806 (child_init_thread_list): Likewise.
14807 (continue_one_thread): Likewise.
14809 (do_child_fetch_inferior_registers): Move to ...
14810 * win32-i386-low.c: ... here, and rename to ...
14811 (do_fetch_inferior_registers): ... this.
14812 * win32-low.c (child_fetch_inferior_registers):
14813 Go through the low target.
14814 (do_child_store_inferior_registers): Use regptr.
14815 (strwinerror): New function.
14816 (win32_create_inferior): Handle Windows CE.
14817 Use strwinerror instead of strerror on Windows error
14818 codes. Add program to the error output.
14819 Don't close the main thread handle on Windows CE.
14820 (win32_attach): Use coredll.dll on Windows CE.
14821 (win32_kill): Close current process and current
14823 (win32_detach): Use coredll.dll on Windows CE.
14824 (win32_resume): Let low target handle debug registers, and
14826 (handle_exception): Add/Remove initial breakpoint. Avoid
14827 non-existant WSTOPSIG on Windows CE.
14828 (win32_read_inferior_memory): Cast to remove warning.
14829 (win32_arch_string): Go through the low target.
14830 (initialize_low): Call set_breakpoint_data with the low
14831 target's breakpoint.
14832 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14833 FOP_REGNUM, mappings): Move to ...
14834 * win32-i386-low.c: ... here.
14835 * win32-low.c (win32_thread_info): Move to ...
14836 * win32-low.h: ... here.
14837 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14838 win32-arm-low.c and wincecompat.c.
14839 (all:): Add $EXEEXT.
14840 (install-only:): Likewise.
14841 (gdbserver:): Likewise.
14842 (gdbreplay:): Likewise.
14843 * config.in: Regenerate.
14844 * configure: Regenerate.
14846 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14848 * win32-low.c: Rename typedef thread_info to
14849 win32_thread_info throughout.
14851 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14853 * win32-i386-low.c: Rename to ...
14854 * win32-low.c: ... this.
14855 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14856 * Makefile.in: Likewise.
14858 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14860 * remote-utils.c (monitor_output): Constify msg parameter.
14861 * server.h (monitor_output): Likewise.
14862 * win32-i386-low.c (handle_output_debug_string): New.
14863 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14864 handle_output_debug_string.
14865 (get_child_debug_event): Likewise.
14867 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14869 * server.c (main): Correct strtoul check.
14871 2007-03-27 Jon Ringle <jon@ringle.org>
14873 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14875 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14877 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14879 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14881 * terminal.h: Check HAVE_SGTTY_H.
14883 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14885 * remote-utils.c (remote_open): Print out the assigned port number.
14887 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14889 * remote-utils.c (monitor_output): New function.
14890 * server.c (debug_threads): Define here.
14891 (monitor_show_help): New function.
14892 (handle_query): Handle qRcmd.
14893 (main): Do not handle 'd' packet.
14894 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14895 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14898 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14900 * Makefile.in (EXEEXT): New.
14901 (clean): Use $(EXEEXT).
14903 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14905 * target.h (target_ops): Rename send_signal to request_interrupt,
14906 and remove enum target_signal parameter.
14907 * linux-low.c (linux_request_interrupt): Rename from
14908 linux_send_signal, and always send SIGINT.
14909 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14910 and always send SIGINT.
14911 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14913 (input_interrupt): Likewise.
14915 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14917 * server.c (get_features_xml): Check if target implemented
14919 * win32-i386-low.c (win32_arch_string): New.
14920 (win32_target_ops): Add win32_arch_string as arch_string member.
14922 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14924 * spu-low.c (spu_arch_string): New.
14925 (spu_target_ops): Add spu_arch_string.
14927 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14929 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14930 * configure.ac: Do not check for terminal.h.
14931 * configure, config.in: Regenerated.
14933 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14935 * Makefile.in (OBS): Add $(XML_BUILTIN).
14936 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14938 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14939 (arm-with-iwmmxt.c): New.
14940 * config.in, configure: Regenerate.
14941 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14942 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14943 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14944 (arm*-*-linux*): Add iWMMXt and regset support.
14945 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14946 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14947 (arm_store_wmmxregset, target_regsets): New.
14948 * server.c (get_features_xml): Take annex argument. Check builtin
14950 (handle_query): Handle multiple annexes.
14952 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14954 * remote-utils.c [USE_WIN32API] (read, write): Define.
14955 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14958 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14960 * linux-i386-low.c (the_low_target): Set arch_string.
14961 * linux-x86-64-low.c (the_low_target): Likewise.
14962 * linux-low.c (linux_arch_string): New.
14963 (linux_target_ops): Add it.
14964 * linux-low.h (struct linux_target_ops): Add arch_string.
14965 * server.c (write_qxfer_response): Use const void * for DATA.
14966 (get_features_xml): New.
14967 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14968 * target.h (struct target_ops): Add arch_string method.
14970 2007-01-03 Denis Pilat <denis.pilat@st.com>
14971 Daniel Jacobowitz <dan@codesourcery.com>
14973 * linux-low.c (linux_kill): Handle being called with no threads.
14974 * win32-i386-low.c (win32_kill): Likewise.
14975 (get_child_debug_event): Clear current_process_handle.
14977 2006-12-30 Denis PILAT <denis.pilat@st.com>
14978 Daniel Jacobowitz <dan@codesourcery.com>
14980 * remote-utils.c (remote_open): Check the type of specified
14981 serial port devices before opening them.
14982 * server.c (main): Kill the inferior if an error occurs during
14983 the first remote_open.
14985 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14987 * README: Update supported targets.
14989 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14991 * Makefile.in (clean): Remove reg-mips64.c.
14992 (reg-mips64.c, reg-mips64.o): New rules.
14993 * configure.srv: Handle mips64. Include regset support for mips.
14994 * linux-mips-low.c (union mips_register): New.
14995 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14996 (mips_breakpoint, mips_breakpoint_at): Use int.
14997 (mips_collect_register, mips_supply_register)
14998 (mips_collect_register_32bit, mips_supply_register_32bit)
14999 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15000 (mips_store_fpregset, target_regsets): New.
15001 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15003 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15005 * configure.srv: Add target "spu*-*-*".
15006 * Makefile.in (clean): Remove reg-spu.c.
15007 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15008 * spu-low.c: New file.
15010 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15012 * configure.ac: Correct td_thr_tls_get_addr test.
15013 * configure: Regenerated.
15015 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15017 * linux-low.c (linux_wait_for_event): Reformat. Use the
15018 pass_signals array.
15019 * remote-utils.c (decode_address_to_semicolon): New.
15020 * server.c (pass_signals, handle_general_set): New.
15021 (handle_query): Mention QPassSignals for qSupported.
15022 (main): Call handle_general_set.
15023 * server.h (pass_signals, decode_address_to_semicolon): New.
15025 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15027 * server.c (handle_query): Correct error handling for read_auxv.
15029 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15031 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15032 and srv_linux_thread_db to yes.
15033 * linux-s390-low.c (s390_fill_gregset): New function.
15034 (target_regsets): Define data structure.
15036 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15038 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15039 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15040 * config.in, configure: Regenerated.
15041 * inferiors.c (gdb_id_to_thread): New function.
15042 (gdb_id_to_thread_id): Use it.
15043 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15044 * linux-low.h (struct process_info): Add th member.
15045 (thread_db_get_tls_address): New prototype.
15046 * remote-utils.c (decode_address): Make non-static.
15047 * server.c (handle_query): Handle qGetTLSAddr.
15048 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15049 * target.h (struct target_ops): Add get_tls_address.
15050 * thread-db.c (maybe_attach_thread): Save the thread handle.
15051 (thread_db_get_tls_address): New.
15053 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15055 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15056 (linux_resume_one_process): Take a siginfo_t *. Update all
15057 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15058 (struct pending_signals): Add a siginfo_t.
15059 (linux_wait_for_process): Always set last_status.
15060 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15061 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15062 * linux-low.h (struct process_info): Add last_status.
15064 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15066 * remote-utils.c (try_rle): New function.
15067 (putpkt_binary): Use it.
15069 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15071 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15072 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15073 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15074 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15075 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15078 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15080 * server.c (terminal_fd): New variable.
15081 (old_foreground_pgrp): Likewise.
15082 (restore_old_foreground_pgrp): New function.
15083 (start_inferior): Record the terminal file descriptor in terminal_fd
15084 and its original foreground group in old_foreground_pgrp. Register
15085 restore_old_foreground_pgrp with atexit().
15087 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15089 * server.c (handle_query): Correct qPart to qXfer.
15091 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15093 * configure.ac: Check for more headers which are missing on
15094 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15095 * configure.srv: Add Cygwin and mingw32.
15096 * remote-utils.c: Don't include headers unconditionally which
15097 are missing on mingw32. Include <winsock.h> for mingw32.
15098 (remote_open): Adjust for mingw32 support. Flush
15099 standard error after writing to it.
15100 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15101 (unblock_async_io, enable_async_io, disable_async_io)
15102 (readchar, getpkt): Update for Winsock support.
15103 (prepare_resume_reply): Expect a protocol signal number.
15104 * server.c: Disable <sys/wait.h> on mingw32.
15105 (start_inferior): Adjust for mingw32 support. Flush
15106 standard error after writing to it.
15107 (attach_inferior): Likewise. Use protocol signal
15109 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15111 * win32-i386-low.c: New file.
15112 * Makefile.in (XM_CLIBS): Set.
15113 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15114 (win32-i386-low.o): New dependency rule.
15115 * linux-low.c (linux_wait): Use target signal numbers.
15116 * target.h (struct target_ops): Doc fix.
15117 * server.h (target_signal_to_name): New prototype.
15118 * gdbreplay.c: Don't include headers unconditionally which
15119 are missing on mingw32. Include <winsock.h> for mingw32.
15120 (remote_close, remote_open): Adjust for Winsock support.
15121 * configure, config.in: Regenerated.
15123 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15125 * server.c (decode_xfer_read, write_qxfer_response): New.
15126 (handle_query): Take a packet length argument. Handle
15127 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15128 the qSupported response.
15129 (main): Update call to handle_query.
15131 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15133 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15134 (putpkt_binary): Renamed from putpkt and adjusted for binary
15136 (putpkt): New wrapper for putpkt_binary.
15137 (readchar): Don't mask off the high bit.
15138 (decode_X_packet): New function.
15139 * server.c (main): Call putpkt_binary if a handler sets the packet
15140 length. Save the length of the incoming packet. Handle 'X'.
15141 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15143 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15145 * server.c (handle_query): Handle qSupported.
15147 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15149 * remote-utils.c (all_symbols_looked_up): New variable.
15150 (look_up_one_symbol): Check it.
15151 * server.h (look_up_one_symbol): New declaration.
15152 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15154 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15156 * Makefile.in (linux-arm-low.o): Update dependencies.
15157 * linux-arm-low.c: Include "gdb_proc_service.h".
15158 (PTRACE_GET_THREAD_AREA): Define.
15159 (ps_get_thread_area): New function.
15161 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15163 * configure.srv (m68k*-*-uclinux*): New target.
15164 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15165 (linux_resume_one_process): Remove extraneous cast.
15166 (linux_read_offsets): New.
15167 (linux_target_op): Add linux_read_offsets on mmuless systems.
15168 * server.c (handle_query): Add qOffsets logic.
15169 * target.h (struct target_ops): Add read_offsets.
15171 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15173 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15174 (PTRACE_GET_THREAD_AREA): Define.
15175 (ps_get_thread_area): New function.
15176 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15177 (linux-x86-64-low.o): Update.
15179 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15181 * configure.ac: Remove checks for prfpregset_t.
15182 * gdb_proc_service.h: New file.
15183 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15184 new "gdb_proc_service.h".
15185 * proc-service.c: Likewise.
15186 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15187 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15188 * Makefile.in (gdb_proc_service_h): Updated.
15189 * configure, config.in: Regenerated.
15191 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15193 * remote-utils.c (prepare_resume_reply): Move declaration
15194 of gdb_id_from_wait to the top of the block.
15196 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15198 * linux-low.c (regsets_store_inferior_registers): Read the regset
15199 from the target before filling it.
15201 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15203 * server.c (attach_inferior): Return SIGTRAP for a successful
15206 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15208 * Makefile.in (OBS): Add version.o.
15209 (STAGESTUFF): Delete.
15210 (version.o): Add dependencies.
15211 (version.c): Replace rule.
15212 (clean): Remove version.c.
15213 * server.c (gdbserver_version): New.
15214 (gdbserver_usage): Use printf.
15215 (main): Handle --version and --help.
15216 * server.h (version, host_name): Add declarations.
15218 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15230 * linux-x86-64-low.c:
15232 * linux-s390-low.c:
15233 * linux-ppc64-low.c:
15235 * linux-mips-low.c:
15236 * linux-m68k-low.c:
15237 * linux-m32r-low.c:
15240 * linux-ia64-low.c:
15241 * linux-i386-low.c:
15242 * linux-crisv32-low.c:
15254 * gdbserver.1: Add (C) after Copyright. Update the FSF
15257 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15259 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15260 (arm_breakpoint_at): Recognize both breakpoints.
15261 (the_low_target): Use the correct breakpoint instruction.
15263 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15265 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15266 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15267 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15268 (the_low_target): Update.
15270 2005-10-25 Andreas Schwab <schwab@suse.de>
15272 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15274 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15275 (ia64_num_regs): Reduce to 462.
15277 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15279 * acinclude.m4: Correct quoting.
15280 * aclocal.m4: Regenerated.
15282 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15283 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15284 (thread_db_init): Call thread_db_err_str.
15285 * configure.ac: Check for TD_VERSION.
15286 * config.in, configure: Regenerated.
15288 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15290 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15292 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15294 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15295 is not available. Define HAVE_PTRACE_GETREGS if it is.
15296 * config.in, configure: Regenerated.
15297 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15298 * linux-i386-low.c, linux-m68k-low.c: Update to use
15299 HAVE_PTRACE_GETREGS.
15300 * linux-low.c (regsets_fetch_inferior_registers)
15301 (regsets_store_inferior_registers): Only return 0 if we processed
15303 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15304 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15306 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15308 * inferiors.c (struct thread_info): Add gdb_id.
15309 (add_thread): Add gdb_id argument.
15310 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15311 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15312 calls to add_thread.
15313 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15314 * server.c (handle_query): Use thread_to_gdb_id.
15315 (handle_v_cont, main): Use gdb_id_to_thread_id.
15316 * server.h (add_thread): Update prototype.
15317 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15320 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15322 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15323 left-padded registers.
15324 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15325 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15327 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15329 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15330 * configure: Regenerate.
15331 * config.in: Regenerate.
15332 * server.h (NEED_DECLARATION_STRERROR):
15333 Replace with !HAVE_DECL_STRERROR.
15335 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15337 * linux-low.c (linux_wait, linux_send_signal): Don't test
15338 an unsigned long variable for > 0 if it could be MAX_ULONG.
15339 * server.c (myresume): Likewise.
15340 * target.c (set_desired_inferior): Likewise.
15342 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15344 * configure.ac: Simplify and improve check for socklen_t.
15345 * configure, config.in: Regenerate.
15347 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15349 * acconfig.h: Remove.
15350 * configure.ac: Add a test for socklen_t. Use three-argument
15351 AC_DEFINE throughout.
15352 * config.in: Regenerated using autoheader 2.59.
15353 * configure: Regenerated.
15355 * gdbreplay.c (socklen_t): Provide a default.
15356 (remote_open): Use socklen_t.
15357 * remote-utils.c (socklen_t): Provide a default.
15358 (remote_open): Use socklen_t.
15359 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15362 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15364 * linux-low.c (linux_read_memory, linux_write_memory)
15365 (linux_read_auxv): Likewise.
15366 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15367 (check_mem_write): Likewise.
15368 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15370 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15371 (registers_from_string, register_data): Likewise.
15372 * server.c (handle_query, main): Likewise.
15373 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15374 (decode_M_packet): Likewise.
15375 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15376 * target.h (struct target_ops): Update read_memory, write_memory,
15378 (read_inferior_memory, write_inferior_memory): Update.
15379 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15380 to unsigned char *.
15381 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15382 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15383 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15384 linux-s390-low.c, linux-sh-low.c: Update for changes in
15385 read_inferior_memory and the_low_target->breakpoint.
15387 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15389 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15390 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15391 * configure.srv: Add powerpc64-*-linux*.
15392 * linux-ppc64-low.c: New file.
15394 2005-05-23 Orjan Friberg <orjanf@axis.com>
15396 * linux-cris-low.c: New file with support for CRIS.
15397 * linux-crisv32-low.c: Ditto for CRISv32.
15398 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15399 (clean): Add reg-cris.c and reg-crisv32.c.
15400 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15401 reg-crisv32.o, and reg-crisv32.c to make rules.
15402 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15403 recognized targets.
15405 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15407 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15408 of sizeof (PTRACE_XFER_TYPE).
15409 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15411 2005-05-12 Orjan Friberg <orjanf@axis.com>
15413 * target.h (struct target_ops): Add insert_watchpoint,
15414 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15415 pointers for hardware watchpoint support.
15416 * linux-low.h (struct linux_target_ops): Ditto.
15417 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15418 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15419 to linux_target_ops.
15420 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15422 * server.c (main): Recognize 'Z' and 'z' packets.
15424 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15426 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15427 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15428 (the_low_target): Add new members.
15430 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15432 * proc-service.c (ps_lgetregs): Search all_processes instead of
15435 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15437 * server.c (start_inferior): Change return type to int.
15438 (attach_inferior): Change sigptr to int *.
15439 (handle_v_cont, handle_v_requests): Change signal to int *.
15440 (main): Change signal to int.
15442 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15444 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15445 * configure.srv: Add m32r*-*-linux*.
15446 * linux-m32r-low.c: New file.
15448 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15450 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15452 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15454 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15455 Take unsigned long arguments for PIDs.
15456 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15457 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15458 (wait_for_sigstop, linux_resume_one_process)
15459 (regsets_fetch_inferior_registers, linux_send_signal)
15460 (linux_read_auxv): Likewise. Update the types of variables holding
15461 PIDs. Update format string specifiers.
15462 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15463 * remote-utils.c (prepare_resume_reply): Likewise.
15464 * server.c (cont_thread, general_thread, step_thread)
15465 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15467 (handle_query): Update format specifiers.
15468 (handle_v_cont, main): Use strtoul for thread IDs.
15469 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15470 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15471 (general_thread, step_thread, thread_from_wait)
15472 (old_thread_from_wait): Update.
15473 * target.h (struct thread_resume): Use unsigned long for THREAD.
15474 (struct target_ops): Use unsigned long for arguments to attach and
15477 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15479 * acinclude.m4: Include bfd/bfd.m4 directly.
15480 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15481 <agriffis@toolchain.org>.
15482 * aclocal.m4, configure: Regenerated.
15484 2005-01-07 Andrew Cagney <cagney@gnu.org>
15486 * configure.ac: Rename configure.in, require autoconf 2.59.
15487 * configure: Re-generate.
15489 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15491 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15492 LIBS when finished.
15493 * aclocal.m4: Regenerated.
15494 * configure: Regenerated.
15496 2004-11-21 Andreas Schwab <schwab@suse.de>
15498 * linux-m68k-low.c (m68k_num_gregs): Define.
15499 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15500 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15501 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15502 (m68k_breakpoint_at): New. Add to the_low_target.
15504 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15505 srv_linux_thread_db to yes.
15507 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15509 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15510 (ARCH_SET_FS): Likewise.
15511 (ARCH_GET_FS): Likewise.
15512 (ARCH_GET_GS): Likewise.
15514 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15516 * linux-i386-low.c (ps_get_thread_area): New.
15517 * linux-x86-64-low.c (ps_get_thread_area): New.
15518 * linux-low.c: Include <sys/syscall.h>.
15519 (linux_kill_one_process): Don't kill the first thread here.
15520 (linux_kill): Kill the first thread here.
15521 (kill_lwp): New function.
15522 (send_sigstop, linux_send_signal): Use it.
15523 * proc-service.c: Clean up #ifdefs.
15524 (fpregset_info): Delete.
15525 (ps_lgetregs): Update and enable implementation.
15526 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15528 * remote-utils.c (struct sym_cache, symbol_cache): New.
15529 (input_interrupt): Print a clearer message.
15530 (async_io_enabled): New variable.
15531 (enable_async_io, disable_async_io): Use it. Update comments.
15532 (look_up_one_symbol): Use the symbol cache.
15533 * thread-db.c (thread_db_look_up_symbols): New function.
15534 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15536 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15538 * configure.in: Test for -rdynamic.
15539 * configure: Regenerated.
15540 * Makefile (INTERNAL_LDFLAGS): New.
15541 (gdbserver, gdbreplay): Use it.
15543 2004-09-02 Andrew Cagney <cagney@gnu.org>
15545 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15547 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15549 * linux-low.c (linux_wait): Clear all_processes list also.
15551 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15553 * linux-low.c: Include <errno.h>. Remove extern declaration of
15556 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15558 * gdbreplay.c, server.h, utils.c: Update copyright years.
15560 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15562 * server.c (main): Print child status or termination signal from
15563 variable 'signal', not 'sig'.
15565 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15567 * linux-low.c (linux_read_memory): Change return type to
15568 int. Check for and return error from ptrace().
15569 * target.c (read_inferior_memory): Change return type to int. Pass
15570 back return status from the_target->read_memory().
15571 * target.h (struct target_ops): Adapt *read_memory() prototype.
15573 (read_inferior_memory): Adapt prototype.
15574 * server.c (main): Return an error packet if
15575 read_inferior_memory() returns an error.
15577 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15579 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15580 Unify with other clean targets.
15582 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15584 * server.c (handle_v_cont): Call set_desired_inferior.
15586 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15588 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15590 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15592 * linux-low.c (linux_wait): Unblock async I/O.
15593 (linux_resume): Block and enable async I/O.
15594 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15595 * server.h (block_async_io, unblock_async_io): Add prototypes.
15597 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15599 * remote-utils.c (remote_open): Print a status notice after
15600 opening a TCP port.
15601 * server.c (attach_inferior): Print a status notice after
15604 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15606 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15608 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15610 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15612 * server.c, target.h: Update copyright years.
15614 2004-02-25 Roland McGrath <roland@redhat.com>
15616 * target.h (struct target_ops): New member `read_auxv'.
15617 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15618 * linux-low.c (linux_read_auxv): New function.
15619 (linux_target_ops): Initialize `read_auxv' member to that.
15621 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15623 Committed by Jim Blandy <jimb@redhat.com>.
15625 * linux-s390-low.c (s390_num_regs): Update.
15626 (s390_regmap): Remove control registers. Use __s390x__ predefine
15627 instead of GPR_SIZE to distiguish s390 and s390x targets.
15629 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15631 * linux-low.c: Update copyright year.
15632 (check_removed_breakpoint): Clear pending_is_breakpoint.
15633 (linux_set_resume_request, linux_queue_one_thread)
15634 (resume_status_pending_p): New functions.
15635 (linux_continue_one_thread): Use process->resume.
15636 (linux_resume): Only resume threads if there are no pending events.
15637 * linux-low.h (struct process_info): Add resume request
15640 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15642 * regcache.c (new_register_cache): Clear the allocated register
15643 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15645 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15647 * linux-low.c (linux_resume): Take a struct thread_resume *
15649 (linux_wait): Update call.
15650 (resume_ptr): New static variable.
15651 (linux_continue_one_thread): Renamed from
15652 linux_continue_one_process. Use resume_ptr.
15653 (linux_resume): Use linux_continue_one_thread.
15654 * server.c (handle_v_cont, handle_v_requests): New functions.
15655 (myresume): New function.
15656 (main): Handle 'v' case.
15657 * target.h (struct thread_resume): New type.
15658 (struct target_ops): Change argument of "resume" to struct
15660 (myresume): Delete macro.
15662 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15664 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15665 (uninstall): Support DESTDIR.
15667 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15669 * configure.srv: Add xscale*linux copy of arm*linux entry.
15671 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15673 * linux-arm-low.c (arm_reinsert_addr): New function.
15674 (the_low_target): Add arm_reinsert_addr.
15676 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15678 * mem-break.c: Remove whitespace at end of file.
15680 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15682 * configure.in: Check whether we need to prototype strerror.
15683 * server.h: Optionally prototype strerror.
15684 * gdbreplay.c (perror_with_name): Use strerror.
15685 * linux-low.c (linux_attach_lwp): Use strerror.
15686 * utils.c (perror_with_name): Use strerror.
15687 * config.in, configure: Regenerated.
15689 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15691 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15692 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15694 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15696 * Makefile.in (SFILES): Update.
15697 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15698 low-sun3.c: Remove files.
15700 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15702 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15703 (linux_detach_one_process, linux_detach): New functions.
15704 (linux_target_ops): Add linux_detach.
15705 * server.c (main): Handle 'D' packet.
15706 * target.h (struct target_ops): Add "detach" member.
15707 (detach_inferior): Define.
15709 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15711 From Kelley Cook <kelleycook@wideopenwest.com>:
15712 * configure.srv: Accept i[34567]86 variants.
15714 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15716 * linux-low.c (linux_wait_for_event): Correct comment typos.
15717 (linux_resume_one_process): Call check_removed_breakpoint.
15718 (linux_send_signal): New function.
15719 (linux_target_ops): Add linux_send_signal.
15720 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15722 * target.h (struct target_ops): Add send_signal.
15724 2003-05-29 Jim Blandy <jimb@redhat.com>
15726 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15727 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15728 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15729 away part of the register's value.
15731 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15733 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15734 (linux_wait_for_event, linux_init_signals): Likewise.
15736 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15738 * configure.in: Check for stdlib.h.
15739 * configure: Regenerated.
15740 * config.in: Regenerated.
15742 2003-01-04 Andreas Schwab <schwab@suse.de>
15744 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15746 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15748 * Makefile.in: Remove obsolete code.
15750 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15752 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15753 defined(PT_FPR0_HI).
15755 2002-11-17 Stuart Hughes <seh@zee2.com>
15757 * linux-arm-low.c (arm_num_regs): Increase.
15758 (arm_regmap): Include status register.
15760 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15762 * linux-low.c (register_addr): Remove incorrect -1 check.
15764 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15766 * linux-low.c (linux_create_inferior): Call setpgid. Return
15768 (unstopped_p, linux_signal_pid): Remove.
15769 (linux_target_ops): Remove linux_signal_pid.
15770 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15771 global instead of target method.
15772 * target.h (struct target_ops): Remove signal_pid. Update comment
15773 for create_inferior.
15774 * server.c (signal_pid): New variable.
15775 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15776 gdbserver. Set the child to be the foreground process group.
15777 (attach_inferior): Set signal_pid.
15779 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15781 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15783 2002-08-20 Jim Blandy <jimb@redhat.com>
15785 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15788 2002-08-01 Andrew Cagney <cagney@redhat.com>
15790 * Makefile.in: Make chill references obsolete.
15792 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15794 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15795 * configure: Regenerate.
15796 * config.in: Regenerate.
15798 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15800 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15801 (perror_with_name, remote_close, remote_open, expect, play): Static.
15803 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15805 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15806 byte offsets instead of an array of indexes.
15807 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15809 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15811 * regcache.c: Add comment.
15813 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15815 * thread-db.c: New file.
15816 * proc-service.c: New file.
15817 * acinclude.m4: New file.
15818 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15819 proc-service.o, and thread-db.o.
15820 (linux-low.o): Add USE_THREAD_DB.
15821 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15822 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15823 * aclocal.m4: Regenerated.
15824 * config.in: Regenerated.
15825 * configure: Regenerated.
15826 * configure.in: Check for proc_service.h, sys/procfs.h,
15827 thread_db.h, and linux/elf.h headrs.
15828 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15829 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15830 Check for -lthread_db and thread support.
15831 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15832 PowerPC, and SuperH.
15833 * i387-fp.c: Constify arguments.
15834 * i387-fp.h: Likewise.
15835 * inferiors.c: (struct thread_info): Renamed from
15836 `struct inferior_info'. Remove PID member. Use generic inferior
15837 list header. All uses updated.
15838 (inferiors, signal_pid): Removed.
15839 (all_threads): New variable.
15840 (get_thread): Define.
15841 (add_inferior_to_list): New function.
15842 (for_each_inferior): New function.
15843 (change_inferior_id): New function.
15844 (add_inferior): Removed.
15845 (remove_inferior): New function.
15846 (add_thread): New function.
15847 (free_one_thread): New function.
15848 (remove_thread): New function.
15849 (clear_inferiors): Use for_each_inferior and free_one_thread.
15850 (find_inferior): New function.
15851 (find_inferior_id): New function.
15852 (inferior_target_data): Update argument type.
15853 (set_inferior_target_data): Likewise.
15854 (inferior_regcache_data): Likewise.
15855 (set_inferior_regcache_data): Likewise.
15856 * linux-low.c (linux_bp_reinsert): Remove.
15857 (all_processes, stopping_threads, using_thrads)
15858 (struct pending_signals, debug_threads, pid_of): New.
15859 (inferior_pid): Replace with macro.
15860 (struct inferior_linux_data): Remove.
15861 (get_stop_pc, add_process): New functions.
15862 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15863 Use add_process and add_thread.
15864 (linux_attach_lwp): New function, based on old linux_attach. Use
15865 add_process and add_thread. Set stop_expected for new threads.
15866 (linux_attach): New function.
15867 (linux_kill_one_process): New function.
15868 (linux_kill): Kill all LWPs.
15869 (linux_thread_alive): Use find_inferior_id.
15870 (check_removed_breakpoints, status_pending_p): New functions.
15871 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15872 Update. Use WNOHANG. Wait for cloned processes also. Update process
15873 struct for the found process.
15874 (linux_wait_for_event): New function.
15875 (linux_wait): Use it. Support LWPs.
15876 (send_sigstop, wait_for_sigstop, stop_all_processes)
15877 (linux_resume_one_process, linux_continue_one_process): New functions.
15878 (linux_resume): Support LWPs.
15879 (REGISTER_RAW_SIZE): Remove.
15880 (fetch_register): Use register_size instead. Call supply_register.
15881 (usr_store_inferior_registers): Likewise. Call collect_register.
15882 Fix recursive case.
15883 (regsets_fetch_inferior_registers): Improve error message.
15884 (regsets_store_inferior_registers): Add debugging.
15885 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15886 (unstopped_p, linux_signal_pid): New functions.
15887 (linux_target_ops): Add linux_signal_pid.
15888 (linux_init_signals): New function.
15889 (initialize_low): Call it. Initialize using_threads.
15890 * regcache.c (inferior_regcache_data): Add valid
15892 (get_regcache): Fetch registers lazily. Add fetch argument
15893 and update all callers.
15894 (regcache_invalidate_one, regcache_invalidate): New
15896 (new_register_cache): Renamed from create_register_cache.
15897 Return the new regcache.
15898 (free_register_cache): Change argument to a void *.
15899 (registers_to_string, registers_from_string): Call get_regcache
15900 with fetch flag set.
15901 (register_data): Make static. Pass fetch flag to get_regcache.
15902 (supply_register): Call get_regcache with fetch flag clear.
15903 (collect_register): Call get_regcache with fetch flag set.
15904 (collect_register_as_string): New function.
15905 * regcache.h: Update.
15906 * remote-utils.c (putpkt): Flush after debug output and use
15908 Handle input interrupts while waiting for an ACK.
15909 (input_interrupt): Use signal_pid method.
15910 (getpkt): Flush after debug output and use stderr.
15911 (outreg): Use collect_register_as_string.
15912 (new_thread_notify, dead_thread_notify): New functions.
15913 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15914 and general_thread.
15915 (look_up_one_symbol): Flush after debug output.
15916 * server.c (step_thread, server_waiting): New variables.
15917 (start_inferior): Don't use signal_pid. Update call to mywait.
15918 (attach_inferior): Update call to mywait.
15919 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15920 (main): Don't fetch/store registers explicitly. Use
15921 set_desired_inferior. Support proposed ``Hs'' packet. Update
15923 * server.h: Update.
15924 (struct inferior_list, struct_inferior_list_entry): New.
15925 * target.c (set_desired_inferior): New.
15926 (write_inferior_memory): Constify.
15927 (mywait): New function.
15928 * target.h: Update.
15929 (struct target_ops): New signal_pid method.
15930 (mywait): Removed macro, added prototype.
15932 * linux-low.h (regset_func): Removed.
15933 (regset_fill_func, regset_store_func): New.
15934 (enum regset_type): New.
15935 (struct regset_info): Add type field. Use new operation types.
15936 (struct linux_target_ops): stop_pc renamed to get_pc.
15937 Add decr_pc_after_break and breakpoint_at.
15938 (get_process, get_thread_proess, get_process_thread)
15939 (strut process_info, all_processes, linux_attach_lwp)
15940 (thread_db_init): New.
15942 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15943 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15944 (the_low_target): Add new members.
15945 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15946 (i386_store_fpxregset): Constify.
15947 (target_regsets): Add new kind identifier.
15948 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15949 (i386_set_pc): Add debugging.
15950 (i386_breakpoint_at): New function.
15951 (the_low_target): Add new members.
15952 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15953 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15954 (mips_breakpoint_at): New.
15955 (the_low_target): Add new members.
15956 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15957 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15958 (the_low_target): Add new members.
15959 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15960 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15961 (the_low_target): Add new members.
15962 * linux-x86-64-low.c (target_regsets): Add new kind
15965 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15967 From Martin Pool <mbp@samba.org>:
15968 * server.c (gdbserver_usage): New function.
15971 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15973 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15974 stop_at -> stop_pc.
15976 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15978 * Makefile.in: Remove obsolete code.
15980 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15982 * linux-low.c (regsets_fetch_inferior_registers),
15983 (regsets_store_inferior_registers): Removed cast to int from
15985 * regcache.h: Added declaration of struct inferior_info.
15987 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15989 * inferiors.c (struct inferior_info): Add regcache_data.
15990 (add_inferior): Call create_register_cache.
15991 (clear_inferiors): Call free_register_cache.
15992 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15993 * regcache.c (struct inferior_regcache_data): New.
15994 (registers): Remove.
15995 (get_regcache): New function.
15996 (create_register_cache, free_register_cache): New functions.
15997 (set_register_cache): Don't initialize the register cache here.
15998 (registers_to_string, registers_from_string, register_data): Call
16000 * regcache.h: Add prototypes.
16001 * server.h: Likewise.
16003 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16005 * mem-break.c: New file.
16006 * mem-break.h: New file.
16007 * Makefile.in: Add mem-break.o rule; update server.h
16009 * inferiors.c (struct inferior_info): Add target_data
16011 (clear_inferiors): Free target_data member if set.
16012 (inferior_target_data, set_inferior_target_data): New functions.
16013 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16014 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16015 * linux-low.c (linux_bp_reinsert): New variable.
16016 (struct inferior_linux_data): New.
16017 (linux_create_inferior): Use set_inferior_target_data.
16018 (linux_attach): Likewise. Call add_inferior.
16019 (linux_wait_for_one_inferior): New function.
16020 (linux_wait): Call it.
16021 (linux_write_memory): Add const.
16022 (initialize_low): Call set_breakpoint_data.
16023 * linux-low.h (struct linux_target_ops): Add breakpoint
16025 * server.c (attach_inferior): Remove extra add_inferior
16027 * server.h: Include mem-break.h. Update inferior.c
16029 * target.c (read_inferior_memory)
16030 (write_inferior_memory): New functions.
16031 * target.h (read_inferior_memory)
16032 (write_inferior_memory): Change macros to prototypes.
16033 (struct target_ops): Update comments. Add const to write_memory
16036 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16038 * linux-low.c (usr_store_inferior_registers): Support
16039 registers which are allowed to fail to store.
16040 * linux-low.h (linux_target_ops): Likewise.
16041 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16042 (ppc_cannot_store_register): FPSCR may not be storable.
16044 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16046 * server.h: Include <string.h> if HAVE_STRING_H.
16047 * ChangeLog: Correct paths in last ChangeLog entry.
16049 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16051 * linux-low.h: Remove obsolete prototypes.
16052 (struct linux_target_ops): New.
16053 (extern the_low_target): New.
16054 * linux-low.c (num_regs, regmap): Remove declarations.
16055 (register_addr): Use the_low_target explicitly.
16056 (fetch_register): Likewise.
16057 (usr_fetch_inferior_registers): Likewise.
16058 (usr_store_inferior_registers): Likewise.
16059 * linux-arm-low.c (num_regs): Remove.
16060 (arm_num_regs): Define.
16061 (arm_regmap): Renamed from regmap, made static.
16062 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16064 (arm_cannot_store_register): Renamed from cannot_store_register,
16066 (the_low_target): New.
16067 * linux-i386-low.c (num_regs): Remove.
16068 (i386_num_regs): Define.
16069 (i386_regmap): Renamed from regmap, made static.
16070 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16072 (i386_cannot_store_register): Renamed from cannot_store_register,
16074 (the_low_target): New.
16075 * linux-ia64-low.c (num_regs): Remove.
16076 (ia64_num_regs): Define.
16077 (ia64_regmap): Renamed from regmap, made static.
16078 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16080 (ia64_cannot_store_register): Renamed from cannot_store_register,
16082 (the_low_target): New.
16083 * linux-m68k-low.c (num_regs): Remove.
16084 (m68k_num_regs): Define.
16085 (m68k_regmap): Renamed from regmap, made static.
16086 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16088 (m68k_cannot_store_register): Renamed from cannot_store_register,
16090 (the_low_target): New.
16091 * linux-mips-low.c (num_regs): Remove.
16092 (mips_num_regs): Define.
16093 (mips_regmap): Renamed from regmap, made static.
16094 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16096 (mips_cannot_store_register): Renamed from cannot_store_register,
16098 (the_low_target): New.
16099 * linux-ppc-low.c (num_regs): Remove.
16100 (ppc_num_regs): Define.
16101 (ppc_regmap): Renamed from regmap, made static.
16102 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16104 (ppc_cannot_store_register): Renamed from cannot_store_register,
16106 (the_low_target): New.
16107 * linux-s390-low.c (num_regs): Remove.
16108 (s390_num_regs): Define.
16109 (s390_regmap): Renamed from regmap, made static.
16110 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16112 (s390_cannot_store_register): Renamed from cannot_store_register,
16114 (the_low_target): New.
16115 * linux-sh-low.c (num_regs): Remove.
16116 (sh_num_regs): Define.
16117 (sh_regmap): Renamed from regmap, made static.
16118 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16120 (sh_cannot_store_register): Renamed from cannot_store_register,
16122 (the_low_target): New.
16123 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16124 (the_low_target): New.
16126 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16128 * Makefile.in: Add stamp-h target.
16129 * configure.in: Create stamp-h.
16130 * configure: Regenerated.
16132 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16134 * inferiors.c: New file.
16135 * target.c: New file.
16136 * target.h: New file.
16137 * Makefile.in: Add target.o and inferiors.o. Update
16139 * linux-low.c (inferior_pid): New static variable,
16140 moved from server.c.
16141 (linux_create_inferior): Renamed from create_inferior.
16142 Call add_inferior. Return 0 on success instead of a PID.
16143 (linux_attach): Renamed from myattach.
16144 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16145 (linux_thread_alive): Renamed from mythread_alive.
16146 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16148 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16149 (regsets_store_inferior_registers): Correct error message.
16150 Add missing ``return 0''.
16151 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16152 (linux_store_registers): Renamed from store_inferior_registers.
16153 (linux_read_memory): Renamed from read_inferior_memory.
16154 (linux_write_memory): Renamed from write_inferior_memory.
16155 (linux_target_ops): New structure.
16156 (initialize_low): Call set_target_ops ().
16157 * remote-utils.c (unhexify): New function.
16158 (hexify): New function.
16159 (input_interrupt): Send signals to ``signal_pid''.
16160 * server.c (inferior_pid): Remove.
16161 (start_inferior): Update create_inferior call.
16162 (attach_inferior): Call add_inferior.
16163 (handle_query): New function.
16164 (main): Call handle_query for `q' packets.
16165 * server.h: Include "target.h". Remove obsolete prototypes.
16166 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16168 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16170 * Makefile.in: Add WARN_CFLAGS. Update configury
16172 * configure.in: Check for <string.h>
16173 * configure: Regenerate.
16174 * config.in: Regenerate.
16175 * gdbreplay.c: Include needed system headers.
16176 (remote_open): Remove strchr prototype.
16177 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16178 * regcache.c (supply_register): Change buf argument to const void *.
16179 (supply_register_by_name): Likewise.
16180 (collect_register): Change buf argument to void *.
16181 (collect_register_by_name): Likewise.
16182 * regcache.h: Add missing prototypes.
16183 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16184 * server.c (handle_query): New function.
16185 (attached): New static variable, moved out of main.
16186 (main): Quiet longjmp clobber warnings.
16187 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16188 * utils.c (error): Remove NORETURN.