1 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3 * tdesc.c (~target_desc): Remove implictly deleted items.
4 (init_target_desc): Iterate all features.
5 (tdesc_get_features_xml): Use vector.
6 (tdesc_create_feature): Create feature.
7 * tdesc.h (tdesc_feature) Remove
8 (target_desc): Add features.
10 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12 * Makefile.in: Add common/tdesc.c
13 * tdesc.c (init_target_desc): init all reg_defs from register
15 (tdesc_create_reg): Create tdesc_reg.
16 * tdesc.h (tdesc_feature): Add register vector.
18 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
20 * tdesc.h (struct target_desc) <features>: Change type to
21 std::vector<std::string>.
22 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
24 (tdesc_get_features_xml): Likewise.
25 (tdesc_create_feature): Likewise.
27 2018-03-26 Alan Hayward <alan.hayward@arm.com>
29 * regcache.c (find_register_by_number): Return a ref.
30 (find_regno): Use references.
31 (register_size): Likewise.
32 (register_data): Likewise.
33 * tdesc.c (target_desc::~target_desc): Remove free calls.
34 (target_desc::operator==): Use std::vector compare.
35 (init_target_desc): Use reference.
36 (tdesc_create_reg): Use reg constructors.
37 * tdesc.h (struct target_desc): Replace pointer with object.
39 2018-03-23 Alan Hayward <alan.hayward@arm.com>
41 * regcache.c (find_register_by_number): Make static.
42 (find_regno): Use find_register_by_number
43 * regcache.h (struct reg): Remove declaration.
45 2018-03-23 Alan Hayward <alan.hayward@arm.com>
47 * tdesc.c (target_desc::~target_desc): Move to here.
48 (target_desc::operator==): Likewise.
49 * tdesc.h (target_desc::~target_desc): Move from here.
50 (target_desc::operator==): Likewise.
52 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
54 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
56 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
58 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
60 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
61 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
62 and init_registers_s390_gs_linux64.
64 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
66 * linux-s390-low.c (s390_fill_gs): Remove function.
67 (s390_fill_gsbc): Remove function.
68 (s390_regsets): Set fill functions for the guarded storage regsets
71 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
73 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
74 the word size. Add comment.
75 (s390_get_wordsize): New function.
76 (s390_arch_setup): No longer select a temporary tdesc to fetch the
77 pswm with it. Instead, use s390_get_wordsize to determine the
78 word size first and derive the correct tdesc from that directly.
80 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
82 * Makefile.in: Include silent-rules.mk.
83 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
84 (COMPILE): Add ECHO_CXX.
85 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
86 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
87 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
88 (version-generated.c): Add ECHO_GEN.
89 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
90 (IPAGENT_COMPILE): Add ECHO_CXX.
91 (%-generated.c): Add ECHO_REGDAT.
93 2018-03-14 Tom Tromey <tom@tromey.com>
96 * ax.c (ax_printf): Special case for NULL.
98 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
100 * linux-low.c (linux_qxfer_libraries_svr4): Use
101 xml_escape_text_append.
103 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
105 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
107 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
109 * server.c (handle_general_set): Remove unnecessary xstrdup.
111 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
113 * server.c (parse_debug_format_options): Adjust to
114 delim_string_to_char_ptr_vec changes.
115 * thread-db.c (thread_db_load_search): Adjust to
116 dirnames_to_char_ptr_vec changes.
118 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
120 * target.h (target_enable_btrace, target_disable_btrace)
121 (target_read_btrace, target_read_btrace_conf): Turn macro into
122 inline function. Throw error if target method is not defined.
123 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
124 check for btrace target method. Be prepared to handle exceptions
125 from btrace target methods.
127 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
129 * server.c (captured_main): Change order of error message printed
130 when the current working directory cannot be found.
132 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
134 * server.c: Include "filenames.h" and "pathstuff.h".
135 (program_name): Delete variable.
136 (program_path): New anonymous class.
137 (get_exec_wrapper): Use "program_path" instead of
139 (handle_v_run): Likewise.
140 (captured_main): Likewise.
141 (process_serial_event): Likewise.
143 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
145 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
146 (OBJS): Add "pathstuff.o".
147 * server.c (current_directory): New global variable.
148 (captured_main): Initialize "current_directory".
150 2018-02-26 Alan Hayward <alan.hayward@arm.com>
152 * tdesc.c: Use common/tdesc.h.
155 2018-02-20 Alan Hayward <alan.hayward@arm.com>
156 Simon Marchi <simon.marchi@ericsson.com>
158 * Makefile.in: Switch order of make rules.
160 2018-02-19 Alan Hayward <alan.hayward@arm.com>
162 * Makefile.in: Add common directory in build.
163 * configure.ac: Add common reference.
164 * configure: Regenerate.
166 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
168 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
169 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
170 * spu-low.c (spu_target_ops): Likewise.
171 * win32-low.c (win32_target_ops): Likewise.
172 * server.c (supported_btrace_packets): Report packets unconditionally.
173 * target.h (target_ops) <supports_btrace>: Remove.
174 (target_supports_btrace): Remove.
176 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
178 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
179 (handle_btrace_disable): Change return type to void. Use exceptions
181 (handle_btrace_general_set): Catch exception and copy message to
184 2018-02-08 Tom Tromey <tom@tromey.com>
186 * linux-low.c (install_software_single_step_breakpoints): Use
188 * inferiors.c (make_cleanup_restore_current_thread): Remove.
189 (do_restore_current_thread_cleanup): Remove.
190 * gdbthread.h (make_cleanup_restore_current_thread): Don't
193 2018-02-08 Tom Tromey <tom@tromey.com>
195 * mem-break.c (set_raw_breakpoint_at): Use
196 gdb::unique_xmalloc_ptr.
198 2018-01-30 Pedro Alves <palves@redhat.com>
201 * target.c (target_terminal::terminal_state): Rename to ...
202 (target_terminal::m_terminal_state): ... this.
204 2018-01-19 James Clarke <jrtc27@jrtc27.com>
206 * linux-low.c (handle_extended_wait): Surround call to
207 thread_db_notice_clone with #ifdef USE_THREAD_DB.
209 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
211 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
212 linux_ptrace_attach_fail_reason_string now returning an
214 (linux_attach): Likewise.
215 * thread-db.c (attach_thread): Likewise.
217 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
220 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
221 checking for fs_base/gs_base fields in struct user_regs_struct.
222 * configure: Regenerate.
224 2018-01-16 Yao Qi <yao.qi@linaro.org>
227 * linux-low.c (fetch_register): Call supply_register instead of
230 2018-01-08 Yao Qi <yao.qi@linaro.org>
231 Simon Marchi <simon.marchi@ericsson.com>
233 * Makefile.in (OBS): Remove selftest.o.
234 * configure.ac: Set srv_selftest_objs if $development is true.
235 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
236 * configure: Re-generated.
237 * server.c (captured_main): Wrap variable selftest_filter with
240 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
242 * server.c (parse_debug_format_options): Return std::string.
243 (handle_monitor_command, captured_main): Adjust.
245 2018-01-05 Pedro Alves <palves@redhat.com>
248 * server.c (captured_main): Pass quiet=false to
249 save_original_signals_state.
251 2018-01-01 Joel Brobecker <brobecker@adacore.com>
253 * gdbreplay.c (gdbreplay_version): Update copyright year in
255 * server.c (gdbserver_version): Likewise.
257 2017-12-08 Tom Tromey <tom@tromey.com>
259 * ax.c (ax_printf): Update.
261 2017-12-07 Yao Qi <yao.qi@linaro.org>
263 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
264 aarch64_linux_read_description.
265 * linux-amd64-ipa.c (idx2mask): New array.
266 (get_ipa_tdesc): Move idx2mask out.
267 (initialize_low_tracepoint): Initialize target descriptions.
268 * linux-i386-ipa.c (idx2mask): New array.
269 (get_ipa_tdesc): Move idx2mask out.
270 (initialize_low_tracepoint): Initialize target descriptions.
272 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
274 * tdesc.c (struct tdesc_type): Change return type.
275 (tdesc_add_flag): Change parameter type.
276 (tdesc_add_bitfield): Likewise.
277 (tdesc_add_field): Likewise.
278 (tdesc_set_struct_size): Likewise.
280 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
282 * regcache.c (registers_to_string): Remove unused variable.
284 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
286 * inferiors.c (for_each_inferior_with_data): Remove.
287 * inferiors.h (for_each_inferior_with_data): Remove.
288 * server.c (handle_qxfer_threads_worker): Change parameter type.
289 (handle_qxfer_threads_proper): Use for_each_thread.
291 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
293 * inferiors.c (for_each_inferior): Remove.
294 (clear_inferiors): Use for_each_thread.
295 * inferiors.h (for_each_inferior): Remove.
296 * linux-low.c (linux_wait_for_event_filtered): Use
298 (linux_stabilize_threads): Likewise.
299 * regcache.c (regcache_release): Likewise.
300 * server.c (gdb_wants_all_threads_stopped): Likewise.
301 (clear_pending_status_callback): Remove.
302 (handle_status): Use for_each_thread.
303 (captured_main): Likewise.
304 * win32-low.c (child_init_thread_list): Likewise.
305 (win32_clear_inferiors): Likewise.
306 (fake_breakpoint_event): Likewise.
308 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
310 * inferiors.h (find_inferior): Remove.
311 * inferiors.c (find_inferior): Remove.
313 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
315 * linux-low.c (resume_status_pending_p): Update comment.
316 (need_step_over_p): Update comment.
318 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
320 * linux-low.c (proceed_one_lwp): Return void, change parameter
322 (unsuspend_and_proceed_one_lwp): Likewise.
323 (proceed_all_lwps): Use for_each_thread.
324 (unstop_all_lwps): Likewise.
326 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
328 * linux-low.c (linux_resume_one_thread): Return void, take
330 (linux_resume): Use for_each_thread.
332 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
334 * linux-low.c (send_sigstop_callback): Return void, change
335 parameter type. Rename to...
336 (send_sigstop): ... this.
337 (suspend_and_send_sigstop_callback): Return void, change parameter
339 (suspend_and_send_sigstop): ... this.
340 (stop_all_lwps): Use for_each_thread.
342 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
344 * linux-low.c (lwp_running): Return bool, remove unused
346 (linux_stabilize_threads): Use find_thread.
348 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
350 * linux-low.c (select_singlestep_lwp_callback): Remove.
351 (count_events_callback): Remove.
352 (select_event_lwp_callback): Remove.
353 (select_event_lwp): Use find_thread/for_each_thread.
355 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
357 * linux-low.c (not_stopped_callback): Return bool, take filter
359 (linux_wait_for_event_filtered): Use find_thread.
360 (linux_wait_1): Likewise.
362 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
364 * linux-low.c (same_lwp): Remove.
365 (find_lwp_pid): Use find_thread.
367 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
369 * linux-low.c (delete_lwp_callback): Remove.
370 (linux_mourn): Use for_each_thread.
372 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
374 * linux-low.c (linux_detach_lwp_callback): Return void, remove
375 args parameter, don't check for pid.
376 (linux_detach): Use for_each_thread.
378 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
380 * linux-low.c (struct counter): Remove.
381 (second_thread_of_pid_p): Remove.
382 (last_thread_of_process_p): Use find_thread.
384 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
386 * inferiors.c (find_inferior_in_random): Remove.
387 * inferiors.h (find_inferior_in_random): Remove.
388 * linux-low.c (status_pending_p_callback): Return bool, accept
389 parameter ptid directly.
390 (linux_wait_for_event_filtered): Use find_thread_in_random.
391 (linux_wait_1): Likewise.
393 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
395 * inferiors.c (find_inferior_id): Remove.
396 (find_thread_ptid): Move implemention from find_inferior_id to
398 * inferiors.h (find_inferior_id): Remove.
399 * server.c (handle_status): Use find_thread_ptid.
400 (process_serial_event): Likewise.
401 * thread-db.c (find_one_thread): Likewise.
402 (thread_db_thread_handle): Likewise.
403 * win32-low.c (thread_rec): Likewise.
404 (child_delete_thread): Likewise.
405 (win32_thread_alive): Likewise.
406 (get_child_debug_event): Likewise.
408 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
410 * linux-mips-low.c (update_watch_registers_callback): Return
411 void, remove pid_p parameter, don't check for pid.
412 (mips_insert_point, mips_remove_point): Use for_each_thread.
414 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
416 * lynx.low (lynx_delete_thread_callback): Remove.
417 (lynx_mourn): Use for_each_thread.
419 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
421 * regcache.c (regcache_invalidate_one): Remove.
422 (regcache_invalidate_pid): use for_each_thread.
424 2017-11-26 Tom Tromey <tom@tromey.com>
426 * linux-low.c (linux_create_inferior): Update.
428 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
430 * spu-low.c (spu_create_inferior): Fix typo in argument name.
432 2017-11-24 Alan Hayward <alan.hayward@arm.com>
434 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
435 * linux-aarch64-low.c (initialize_low_arch): Call init func.
436 * linux-aarch64-tdesc-selftest.c: New file.
437 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
439 2017-11-24 Alan Hayward <alan.hayward@arm.com>
441 * configure.srv: Add new file.
442 * linux-aarch64-low.c (initialize_low_arch): Call init func.
443 * linux-aarch64-tdesc-selftest.c: New file.
444 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
446 2017-11-24 Alan Hayward <alan.hayward@arm.com>
448 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
449 * linux-aarch64-low.c (initialize_low_arch): Remove init.
450 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
452 2017-11-24 Alan Hayward <alan.hayward@arm.com>
454 * configure.srv: Add new files.
455 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
456 aarch64_linux_read_description.
457 * linux-aarch64-low.c (aarch64_linux_read_description):
458 Merge with aarch64_arch_setup.
459 (aarch64_arch_setup): Call aarch64_linux_read_description.
460 * linux-aarch64-tdesc.c: New file.
461 * linux-aarch64-tdesc.h: New file.
463 2017-11-24 Yao Qi <yao.qi@linaro.org>
465 * configure.srv: Set $srv_regobj for tic6x-linux.
466 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
467 (tic6x_read_description): Move some code to tic6x_arch_setup.
468 (tic6x_tdesc_test): New function.
469 (initialize_low_arch): Call selftests::register_test.
471 2017-11-22 Yao Qi <yao.qi@linaro.org>
473 * remote-utils.c (prepare_resume_reply): Use memcpy.
475 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
477 * linux-low.c (kill_one_lwp_callback): Return void, take
478 argument directly, don't filter on pid.
479 (linux_kill): Use for_each_thread.
481 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
483 * linux-low.c (need_step_over_p): Return bool, remove dummy
485 (linux_resume, proceed_all_lwps): Use find_thread.
487 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
489 * linux-low.c (resume_status_pending_p): Return bool, remove
491 (linux_resume): Use find_thread.
493 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
495 * linux-low.c (struct thread_resume_array): Remove.
496 (linux_set_resume_request): Return void, take arguments
498 (linux_resume): Use for_each_thread.
500 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
502 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
503 return bool, remove data argument.
504 (linux_stabilize_threads): Use find_thread.
506 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
508 * linux-low.c (unsuspend_one_lwp): Remove.
509 (unsuspend_all_lwps): Use for_each_thread, inline code from
512 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
514 * gdbthread.h (find_thread): Add overload with ptid_t filter.
515 * linux-low.c (struct iterate_over_lwps_args): Remove.
516 (iterate_over_lwps_filter): Remove.
517 (iterate_over_lwps): Use find_thread.
519 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
521 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
522 (linux_handle_new_gdb_connection): Use for_each_thread, inline
523 code from reset_lwp_ptrace_options_callback.
525 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
527 * linux-arm-low.c (struct update_registers_data): Remove.
528 (update_registers_callback): Return void, take arguments
529 directly, don't check thread's pid.
530 (arm_insert_point, arm_remove_point): Use for_each_thread.
532 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
534 * win32-low.c (continue_one_thread): Return void, take argument
536 (child_continue): Use for_each_thread.
538 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
540 * win32-i386-low.c (update_debug_registers_callback): Rename
542 (update_debug_registers): ... this, return void, remove pid_p arg.
543 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
545 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
547 * inferiors.h (struct process_info): Add constructor, initialize
549 <syscalls_to_catch>: Change type to std::vector<int>.
550 * inferiors.c (add_process): Allocate process_info with new.
551 (remove_process): Free process_info with delete.
552 * linux-low.c (handle_extended_wait): Adjust.
553 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
554 * server.c (handle_general_set): Adjust.
556 2017-11-16 Pedro Alves <palves@redhat.com>
558 * remote-utils.c (remote_close): Block SIGIO signals instead of
559 uninstalling the SIGIO handler.
561 2017-11-16 Alan Hayward <alan.hayward@arm.com>
563 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
565 2017-11-16 Yao Qi <yao.qi@linaro.org>
567 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
568 (tic6x_store_gregset): Likewise.
569 (tic6x_usrregs_info): Move it up.
571 2017-11-15 Alan Hayward <alan.hayward@arm.com>
573 * Makefile.in: Update arch rules.
574 * configure.srv: Explicitly mark arch/ files.
576 2017-11-13 Andreas Schwab <schwab@suse.de>
578 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
580 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
582 2017-11-06 Pedro Alves <palves@redhat.com>
584 * config.in, configure: Regenerate.
586 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
588 * target.c (struct thread_search): Remove.
589 (thread_search_callback): Remove.
590 (prepare_to_access_memory): Use for_each_thread instead of
591 find_inferior. Inline code from thread_search_callback.
593 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
595 * server.c (struct visit_actioned_threads_data): Remove.
596 (visit_actioned_threads): Change prototype to take arguments
598 (resume): Use find_thread instead of find_inferior.
600 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
602 * server.c (queue_stop_reply_callback): Change prototype, return
604 (find_status_pending_thread_callback): Remove.
605 (handle_status): Replace find_inferior with find_thread and
608 2017-10-25 Alan Hayward <alan.hayward@arm.com>
610 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
612 (aarch64_store_gregset): Likewise.
613 (aarch64_fill_fpregset): Likewise.
614 (aarch64_store_fpregset): Likewise.
616 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
618 * gdbthread.h (find_thread, for_each_thread): New functions.
619 * inferiors.c (thread_of_pid): Remove.
620 (find_any_thread_of_pid): Use find_thread.
621 * linux-low.c (num_lwps): Use for_each_thread.
623 2017-10-17 Yao Qi <yao.qi@linaro.org>
625 * Makefile.in: Remove one rule.
626 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
628 2017-10-17 Yao Qi <yao.qi@linaro.org>
630 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
631 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
633 2017-10-17 Yao Qi <yao.qi@linaro.org>
635 * configure.srv: Rename arm.o with arch/arm.o.
637 2017-10-17 Yao Qi <yao.qi@linaro.org>
639 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
640 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
641 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
642 (arch-i386.o, arch-amd64.o): Remove rules.
643 (arch/%.o): New rule.
644 Update POSTCOMPILE and COMPILE.pre.
645 * configure.ac: Invoke AC_CONFIG_COMMANDS.
646 * configure: Re-generated.
647 * configure.srv: Replace arch-i386.o with arch/i386.o.
648 Replace arch-amd64.o with arch/amd64.o.
650 2017-10-16 Yao Qi <yao.qi@linaro.org>
652 * configure: Regenerated.
654 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
656 * inferiors.h: (struct inferior_list): Remove.
657 (struct inferior_list_entry); Remove.
658 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
659 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
660 get_first_inferior): Remove.
661 (for_each_inferior, for_each_inferior_with_data, find_inferior,
662 find_inferior_id, find_inferior_in_random): Change signature.
663 * inferiors.c (all_threads): Change type to
664 std::list<thread_info *>.
665 (get_thread): Remove macro.
666 (find_inferior, find_inferior_id): Change signature, implement
668 (find_inferior_in_random): Change signature, implement using
669 find_thread_in_random.
670 (for_each_inferior, for_each_inferior_with_data): Change
671 signature, implement using for_each_thread.
672 (add_inferior_to_list, remove_inferior): Remove.
673 (add_thread, get_first_thread, thread_of_pid,
674 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
675 (get_first_inferior, one_inferior_p, clear_inferior_list):
677 (clear_inferiors, get_thread_process): Update.
678 * gdbthread.h: Include <list>.
679 (struct thread_info) <entry>: Remove field.
681 (all_threads): Change type to std::list<thread_info *>.
682 (get_first_inferior): Add doc.
683 (find_thread, for_each_thread, find_thread_in_random): New
685 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
686 * linux-arm-low.c (update_registers_callback): Update.
687 * linux-low.c (second_thread_of_pid_p): Update.
688 (kill_one_lwp_callback, linux_detach_lwp_callback,
689 delete_lwp_callback, status_pending_p_callback, same_lwp,
690 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
691 iterate_over_lwps, not_stopped_callback,
692 resume_stopped_resumed_lwps, count_events_callback,
693 select_singlestep_lwp_callback, select_event_lwp_callback,
694 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
695 suspend_and_send_sigstop_callback, wait_for_sigstop,
696 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
697 lwp_running, linux_set_resume_request, resume_status_pending_p,
698 need_step_over_p, start_step_over, linux_resume_one_thread,
699 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
700 reset_lwp_ptrace_options_callback): Update.
701 * linux-mips-low.c (update_watch_registers_callback): Update.
702 * regcache.c (regcache_invalidate_one, regcache_invalidate):
704 (free_register_cache_thread_one): Remove.
705 (regcache_release): Update.
706 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
707 handle_qxfer_threads_worker): Update.
708 (handle_query): Update, use list iterator.
709 (visit_actioned_threads, handle_pending_status,
710 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
711 clear_pending_status_callback, set_pending_status_callback,
712 find_status_pending_thread_callback, handle_status,
713 process_serial_event): Update.
714 * target.c (thread_search_callback): Update.
715 * thread-db.c (thread_db_get_tls_address): Update.
716 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
718 * win32-i386-low.c (update_debug_registers_callback): Update.
719 * win32-low.c (delete_thread_info, child_delete_thread,
720 continue_one_thread, suspend_one_thread,
721 get_child_debug_event): Adjust.
723 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
725 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
726 * inferiors.h: Include <list>.
727 (struct process_info) <entry>: Remove field.
729 (pid_of): Change macro to function.
730 (ptid_of, lwpid_of): Remove macro.
731 (all_processes): Change type to std::list<process_info *>.
732 (ALL_PROCESSES): Remove macro.
733 (for_each_process, find_process): New function.
734 * inferiors.c (all_processes): Change type to
735 std::list<process_info *>.
736 (find_thread_process): Adjust.
737 (add_process): Likewise.
738 (remove_process): Likewise.
739 (find_process_pid): Likewise.
740 (get_first_process): Likewise.
741 (started_inferior_callback): Remove.
742 (have_started_inferiors_p): Adjust.
743 (attached_inferior_callback): Remove.
744 (have_attached_inferiors_p): Adjust.
745 * linux-low.c (check_zombie_leaders): Likewise.
746 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
747 (x86_linux_update_xmltarget): Adjust.
748 * server.c (handle_query): Likewise.
749 (gdb_reattached_process): Remove.
750 (handle_status): Adjust.
751 (kill_inferior_callback): Likewise.
752 (detach_or_kill_inferior): Remove.
753 (print_started_pid): Likewise.
754 (print_attached_pid): Likewise.
755 (detach_or_kill_for_exit): Update.
756 (process_serial_event): Likewise.
757 * linux-arm-low.c (arm_new_fork): Likewise.
759 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
761 * dll.h: Include <list>.
762 (struct dll_info): Add constructor.
763 <entry>: Remove field.
764 (all_dlls): Change type to std::list<dll_info>.
765 * dll.c: Include <algorithm>.
766 (get_dll): Remove macro.
767 (all_dlls): Change type to std::list<dll_info *>.
768 (free_one_dll): Remove.
769 (match_dll): Likewise.
770 (loaded_dll): Adjust.
771 (unloaded_dll): Adjust to all_dlls type change, use
772 std::find_if. Inline code from match_dll.
773 (clear_dlls): Adjust to all_dlls type change.
774 * server.c (emit_dll_description): Remove.
775 (handle_qxfer_libraries): Adjust to all_dlls type change,
776 integrate emit_dll_description's functionality.
778 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
780 * linux-low.h (struct linux_target_ops) <delete_process>: New
782 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
783 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
784 (struct linux_target_ops): Add delete_process callback.
785 * linux-arm-low.c (arm_delete_process): New.
786 (struct linux_target_ops): Add delete_process callback.
787 * linux-bfin-low.c (struct linux_target_ops): Likewise.
788 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
789 * linux-m32r-low.c (struct linux_target_ops): Likewise.
790 * linux-mips-low.c (mips_linux_delete_process): New.
791 (struct linux_target_ops): Add delete_process callback.
792 * linux-ppc-low.c (struct linux_target_ops): Likewise.
793 * linux-s390-low.c (struct linux_target_ops): Likewise.
794 * linux-sh-low.c (struct linux_target_ops): Likewise.
795 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
796 * linux-tile-low.c (struct linux_target_ops): Likewise.
797 * linux-x86-low.c (x86_linux_delete_process): New.
798 (struct linux_target_ops): Add delete_process callback.
799 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
801 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
803 * linux-aarch64-low.c (the_low_target): Add thread delete
805 * linux-arm-low.c (arm_delete_thread): New function.
806 (the_low_target): Add thread delete callback.
807 * linux-bfin-low.c (the_low_target): Likewise.
808 * linux-crisv32-low.c (the_low_target): Likewise.
809 * linux-low.c (delete_lwp): Invoke delete_thread callback if
811 * linux-low.h (struct linux_target_ops) <delete_thread>: New
813 * linux-m32r-low.c (the_low_target): Add thread delete callback.
814 * linux-mips-low.c (mips_linux_delete_thread): New function.
815 (the_low_target): Add thread delete callback.
816 * linux-ppc-low.c (the_low_target): Likewise.
817 * linux-s390-low.c (the_low_target): Likewise.
818 * linux-sh-low.c (the_low_target): Likewise.
819 * linux-tic6x-low.c (the_low_target): Likewise.
820 * linux-tile-low.c (the_low_target): Likewise.
821 * linux-x86-low.c (the_low_target): Likewise.
822 * linux-xtensa-low.c (the_low_target): Likewise.
824 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
826 * win32-low.c: Include "common-inferior.h".
828 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
830 * inferiors.c (set_inferior_cwd): New function.
831 * server.c (handle_general_set): Handle QSetWorkingDir packet.
832 (handle_query): Inform that QSetWorkingDir is supported.
833 * win32-low.c (create_process): Pass the inferior's cwd to
836 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
838 * inferiors.c (current_inferior_cwd): New global variable.
839 (get_inferior_cwd): New function.
840 * inferiors.h (struct process_info) <cwd>: New field.
842 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
844 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
845 (OBS): Add gdb_tilde_expand.o.
847 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
849 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
850 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
852 2017-09-29 Pedro Alves <palves@redhat.com>
854 * ax.c (gdb_parse_agent_expr): Constify.
855 * ax.h (gdb_parse_agent_expr): Constify.
856 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
858 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
859 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
860 * remote-utils.h (read_ptid): Constify.
861 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
862 (process_point_options, process_serial_event): Constify.
863 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
864 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
865 (cmd_qtbuffer): Constify.
867 2017-09-29 Pedro Alves <palves@redhat.com>
869 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
872 2017-09-29 Pedro Alves <palves@redhat.com>
874 * linux-low.c (handle_extended_wait): Pass parent thread instead
875 of process to thread_db_notice_clone.
876 * linux-low.h (thread_db_notice_clone): Replace parent process
877 parameter with parent thread parameter.
878 * thread-db.c (find_one_thread): Add comment.
879 (thread_db_notice_clone): Replace parent process parameter with
880 parent thread parameter. Temporarily switch to the parent thread.
882 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
884 * gdbthread.h: Include "common-gdbthread.h".
885 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
886 "if" when validating the ptid.
887 * remote-utils.c: Include "gdbthread.h".
888 (prepare_resume_reply): Use "switch_to_thread".
889 * target.c (done_accessing_memory): Likewise.
891 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
893 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
894 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
895 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
896 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
897 s390x-gs-linux64-ipa.o to ipa_obj.
898 * linux-s390-low.c (HWCAP_S390_GS): New define.
899 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
901 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
902 (s390_arch_setup): Check for guarded-storage support and choose
904 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
905 init_registers_s390x_gs_linux64.
906 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
908 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
909 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
911 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
913 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
915 2017-09-21 Kevin Buettner <kevinb@redhat.com>
917 * linux-low.h (struct lwp_info): Add new field, thread_handle.
918 (thread_db_thread_handle): Declare.
919 * linux-low.c (linux_target_ops): Initialize thread_handle.
920 * server.c (handle_qxfer_threads_worker): Add support for
922 * target.h (struct target_ops): Add new function pointer,
924 (target_thread_handle): Define.
925 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
927 (thread_db_thread_handle): New function.
929 2017-09-21 Kevin Buettner <kevinb@redhat.com>
931 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
932 * linux-low.h (thread_db_notice_clone): Declare.
933 * thread-db.c (thread_db_notice_clone): New function.
935 2017-09-21 Pedro Alves <palves@redhat.com>
937 * server.c (gdb_read_memory, handle_status, process_serial_event)
938 (handle_serial_event, handle_target_event): Adjust to
939 set_desired_thread prototype change.
940 * target.c (set_desired_thread): Remove 'use_general' parameter
942 * target.h (set_desired_thread): Remove 'use_general' parameter.
944 2017-09-20 Tom Tromey <tom@tromey.com>
946 * target.c (target_terminal::terminal_state): Define.
947 (target_terminal::init): Rename from target_terminal_init.
948 (target_terminal::inferior): Rename from
949 target_terminal_inferior.
950 (target_terminal::ours): Rename from target_terminal_ours.
951 (target_terminal::ours_for_output, target_terminal::info): New.
953 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
955 * server.c (accumulate_file_name_length): Remove.
956 (emit_dll_description): Adjust to std::string change.
957 (handle_qxfer_libraries): Use std::string to hold document.
959 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
961 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
962 return type of xml_escape_text.
963 * server.c (emit_dll_description): Likewise.
965 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
967 * server.c (captured_main): Accept argument for --selftest.
968 Update run_tests call.
969 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
970 when registering selftests.
972 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
974 * regcache.c (get_thread_regcache): Update code to use "std::vector"
975 instead of "VEC" for "target_desc.reg_defs".
976 (regcache_cpy): Likewise.
977 (registers_to_string): Likewise.
978 (registers_from_string): Likewise.
979 (find_regno): Likewise.
980 (supply_regblock): Likewise.
981 (regcache_raw_read_unsigned): Likewise.
982 * tdesc.c (init_target_desc): Likewise.
983 (tdesc_create_reg): Likewise.
984 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
985 (struct target_desc) <reg_defs>: Convert to "std::vector".
986 (target_desc): Do not initialize "reg_defs".
987 (~target_desc): Update code to use "std::vector" instead of "VEC"
988 for "target_desc.reg_defs".
989 (operator==): Likewise.
991 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
993 * inferiors.h (thread_to_gdb_id): Remove.
994 * inferiors.c (thread_to_gdb_id): Remove.
995 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
996 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
997 lynx_store_registers, lynx_read_memory, lynx_write_memory):
999 * nto-low.c (nto_fetch_registers, nto_store_registers,
1000 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1002 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1004 * inferiors.h (gdb_id_to_thread_id): Remove.
1005 * inferiors.c (gdb_id_to_thread_id): Remove.
1006 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1007 removal. Move pid declaration closer to where it's used.
1009 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1011 * server.c (handle_detach): New function.
1012 (process_serial_event): Move code out, call handle_detach.
1014 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1016 * server.c (require_running): Rename to ...
1017 (require_running_or_return): ... this ...
1018 (require_running_or_break): ... and this.
1019 (handle_query, process_serial_event): Adjust.
1021 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1023 * linux-low.c (linux_set_resume_request): Remove unused
1026 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1028 * server.c (first_thread_of): Remove.
1029 (process_serial_event): Replace usage of first_thread_of with
1030 find_any_thread_of_pid.
1031 * tracepoint.c (same_process_p): Remove.
1032 (gdb_agent_about_to_close): Replace usage of same_process_p with
1033 find_any_thread_of_pid.
1034 * linux-x86-low.c (same_process_callback): Remove.
1035 (x86_arch_setup_process_callback): Replace usage of
1036 same_process_callback with find_any_thread_of_pid.
1037 * thread-db.c (any_thread_of): Remove.
1038 (switch_to_process): Replace usage of any_thread_of with
1039 find_any_thread_of_pid.
1040 * inferiors.c (thread_pid_matches_callback): Remove.
1041 (find_thread_process): Adjust to use find_any_thread_of_pid.
1043 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1045 * regcache.c (get_thread_regcache): Guard calls to "memset"
1048 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1050 * linux-low.c (handle_extended_wait): Use
1051 "allocate_target_description" instead of "XNEW".
1052 * linux-x86-low.c (initialize_low_arch): Likewise.
1054 2017-09-05 Yao Qi <yao.qi@linaro.org>
1056 * configure.srv (srv_i386_regobj): Remove.
1057 (srv_amd64_regobj): Remove.
1058 (srv_regobj): Set it to "" for x86 non-linux targets.
1059 * linux-x86-tdesc.c (i386_linux_read_description):
1060 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1061 (init_registers_i386): Remove the declaration.
1062 (tdesc_i386): Remove the declaration.
1063 (lynx_i386_arch_setup): Call i386_create_target_description.
1064 * nto-x86-low.c: Likewise.
1065 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1066 [!__x86_64__]: include arch/i386.h.
1067 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1069 2017-09-05 Yao Qi <yao.qi@linaro.org>
1071 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1072 i386/amd64-XXX-linux from it.
1074 2017-09-05 Yao Qi <yao.qi@linaro.org>
1076 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1078 (ipa_amd64_linux_regobj): Remove.
1079 (ipa_x32_linux_regobj): Remove.
1081 2017-09-05 Yao Qi <yao.qi@linaro.org>
1083 * Makefile.in (arch-amd64.o): New rule.
1084 * configure.srv: Append arch-amd64.o.
1085 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1086 (get_ipa_tdesc): Call amd64_linux_read_description.
1087 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1088 and init_registers_amd64_XXX.
1089 * linux-x86-low.c (x86_linux_read_description): Call
1090 amd64_linux_read_description.
1091 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1092 (initialize_low_arch): Don't call init_registers_x32_XXX and
1093 init_registers_amd64_XXX.
1094 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1095 and tdesc_amd64_XXX.
1096 [__x86_64__] (amd64_tdesc_test): New function.
1097 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1098 and init_registers_amd64_XXX.
1099 * linux-x86-tdesc.c: Include arch/amd64.h.
1100 (xcr0_to_tdesc_idx): New function.
1101 (i386_linux_read_description): New function.
1102 (amd64_get_ipa_tdesc_idx): New function.
1103 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1104 (amd64_get_ipa_tdesc): Declare.
1106 2017-09-05 Yao Qi <yao.qi@linaro.org>
1108 * configure.srv (srv_i386_linux_xmlfiles): Remove
1109 i386/i386-XXX-linux.xml from it.
1111 2017-09-05 Yao Qi <yao.qi@linaro.org>
1113 * configure.srv: Set srv_i386_linux_regobj empty if $development
1115 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1116 initialize_low_tdesc.
1117 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1118 with #if initialize_low_tdesc.
1119 * linux-x86-tdesc-selftest.c: New file.
1120 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1122 2017-09-05 Yao Qi <yao.qi@linaro.org>
1124 * Makefile.in (arch-i386.o): New rule.
1125 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1126 (x86_64-*-linux*): Likewise.
1127 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1128 include arch/i386.h.
1129 (i386_linux_read_description): Remove code and call
1130 i386_create_target_description.
1131 * tdesc.c (allocate_target_description): New function.
1132 * tdesc.h (set_tdesc_architecture): Remove declaration.
1133 (set_tdesc_osabi): Likewise.
1135 2017-09-05 Yao Qi <yao.qi@linaro.org>
1137 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1138 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1139 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1141 * server.c (get_features_xml): Call tdesc_get_features_xml.
1142 * tdesc.c (set_tdesc_architecture): New function.
1143 (set_tdesc_osabi): New function.
1144 (tdesc_get_features_xml): New function.
1145 (tdesc_create_feature): Add an argument.
1146 * tdesc.h (struct target_desc) <features>: New field.
1147 <arch, osabi>: New field.
1148 (~target_desc): xfree features, arch, and osabi.
1149 (target_desc::oerator==): Don't compare .xmltarget.
1150 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1151 (set_tdesc_osabi): Likewise.
1152 (tdesc_get_features_xml): Likewise.
1154 2017-09-05 Yao Qi <yao.qi@linaro.org>
1156 * linux-x86-tdesc.c: Include selftest.h.
1157 (i386_tdesc_test): New function.
1158 (initialize_low_tdesc): Call selftests::register_test.
1159 * tdesc.h: Include regdef.h.
1160 (target_desc): Override operator == and !=.
1162 2017-09-05 Yao Qi <yao.qi@linaro.org>
1164 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1165 (ipa_obj): Likewise.
1166 * linux-i386-ipa.c: Include common/x86-xstate.h
1167 (get_ipa_tdesc): Call i386_linux_read_description.
1168 (initialize_low_tracepoint): Don't call init_registers_XXX
1169 functions, call initialize_low_tdesc instead.
1170 * linux-x86-low.c (x86_linux_read_description): Call
1171 i386_linux_read_description.
1172 (initialize_low_arch): Don't call init_registers_i386_XXX
1173 functions, call initialize_low_tdesc.
1174 * linux-x86-tdesc.c: New file.
1175 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1176 (i386_get_ipa_tdesc_idx): Declare.
1177 (i386_get_ipa_tdesc): Declare.
1178 (initialize_low_tdesc): Declare.
1180 2017-09-05 Yao Qi <yao.qi@linaro.org>
1182 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1185 2017-09-05 Yao Qi <yao.qi@linaro.org>
1187 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1188 * regcache.c (get_thread_regcache): Use VEC_length.
1189 (init_register_cache): Likewise.
1190 (regcache_cpy): Likewise.
1191 (registers_to_string): Iterate reg_defs via VEC_iterate.
1192 (find_regno): Likewise.
1193 (find_register_by_number): Use VEC_index.
1194 (register_size): Call find_register_by_number.
1195 (register_data): Call find_register_by_number.
1196 (supply_regblock): Use VEC_length.
1197 (regcache_raw_read_unsigned): Likewise.
1198 * tdesc.c (init_target_desc): Iterate reg_defs via
1200 (default_description): Update initializer.
1201 (copy_target_description): Don't update field num_registers.
1202 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1203 <num_registers>: Remove.
1205 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1207 * Makefile.in (.SECONDARY): Define target.
1209 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1211 * linux-low.c (linux_wait_1): Adjust.
1212 * server.c (queue_stop_reply_callback): Adjust.
1214 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1216 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1217 QEnvironmentUnset and QEnvironmentReset packets.
1218 (handle_query): Inform remote that QEnvironmentHexEncoded,
1219 QEnvironmentUnset and QEnvironmentReset are supported.
1221 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1223 * inferiors.h (inferior_target_data): Rename to ...
1224 (thread_target_data): ... this.
1225 (inferior_regcache_data): Rename to ...
1226 (thread_regcache_data): ... this.
1227 (set_inferior_regcache_data): Rename to ...
1228 (set_thread_regcache_data): ... this.
1229 * inferiors.c (inferior_target_data): Rename to ...
1230 (thread_target_data): ... this.
1231 (inferior_regcache_data): Rename to ...
1232 (thread_regcache_data): ... this.
1233 (set_inferior_regcache_data): Rename to ...
1234 (set_thread_regcache_data): ... this.
1235 (free_one_thread): Update.
1236 * linux-low.h (get_thread_lwp): Update.
1237 * regcache.c (get_thread_regcache): Update.
1238 (regcache_invalidate_thread): Update.
1239 (free_register_cache_thread): Update.
1240 * win32-i386-low.c (update_debug_registers_callback): Update.
1241 (win32_get_current_dr): Update.
1242 * win32-low.c (thread_rec): Update.
1243 (delete_thread_info): Update.
1244 (continue_one_thread): Update.
1245 (suspend_one_thread): Update.
1247 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1249 * inferiors.c (set_inferior_target_data): Remove.
1250 * inferiors.h (set_inferior_target_data): Remove.
1252 2017-08-18 Yao Qi <yao.qi@linaro.org>
1254 * Makefile.in (OBS): Add selftest.o.
1255 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1256 * configure, config.in: Re-generated.
1257 * server.c: Include common/sefltest.h.
1258 (captured_main): Handle option --selftest.
1260 2017-08-09 Yao Qi <yao.qi@linaro.org>
1262 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1263 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1264 i386-avx-mpx.o and i386-mmx.o.
1265 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1266 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1267 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1268 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1269 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1270 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1271 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1272 i386/amd64-avx-mpx.xml.
1274 2017-08-09 Yao Qi <yao.qi@linaro.org>
1276 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1277 and x32-avx-avx512.o.
1278 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1279 i386/x32-avx-avx512.xml.
1281 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1283 * tracepoint.h (enum class fast_tpoint_collect_result): New
1285 (fast_tracepoint_collecting): Change return type to
1286 fast_tpoint_collect_result.
1287 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1288 * linux-low.h: Include tracepoint.h.
1289 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1290 fast_tpoint_collect_result.
1291 * linux-low.c (handle_tracepoints): Adjust.
1292 (linux_fast_tracepoint_collecting): Change return type to
1293 fast_tpoint_collect_result.
1294 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1295 linux_wait_1, stuck_in_jump_pad_callback,
1296 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1297 proceed_one_lwp): Adjust to type change.
1299 2017-07-10 Yao Qi <yao.qi@linaro.org>
1301 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1303 2017-06-29 Yao Qi <yao.qi@linaro.org>
1305 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1307 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1309 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1311 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1313 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1315 * linux-low.c (linux_create_inferior): Adjust code to access the
1316 environment information via 'gdb_environ' class.
1317 * lynx-low.c (lynx_create_inferior): Likewise.
1318 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1319 (get_environ): Return a pointer to 'our_environ'.
1320 (captured_main): Initialize 'our_environ'.
1321 * server.h (get_environ): Adjust prototype.
1322 * spu-low.c (spu_create_inferior): Adjust code to access the
1323 environment information via 'gdb_environ' class.
1325 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1327 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1328 usage of "register" keyword.
1330 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1332 * configure: Re-generate.
1334 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1336 * configure: Re-generate.
1338 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1340 * Makefile.in (COMPILE.pre): Add "-x c++".
1342 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1344 * fork-child.c: Conditionally include <signal.h>.
1346 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1348 * server.c (handle_general_set): Handle new packet
1349 "QStartupWithShell".
1350 (handle_query): Add "QStartupWithShell" to the list of supported
1352 (gdbserver_usage): Add help text explaining the
1353 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1355 (captured_main): Recognize and act upon the presence of the new
1358 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1359 Pedro Alves <palves@redhat.com>
1361 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1362 * configure: Regenerate.
1363 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1365 (i[34567]86-*-lynxos*): Likewise.
1366 (spu*-*-*): Likewise.
1367 * fork-child.c: New file.
1368 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1370 (linux_ptrace_fun): New function.
1371 (linux_create_inferior): Adjust function prototype to reflect
1372 change on "target.h". Adjust function code to use
1374 (linux_request_interrupt): Delete "signal_pid".
1375 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1376 (lynx_ptrace_fun): New function.
1377 (lynx_create_inferior): Adjust function prototype to reflect
1378 change on "target.h". Adjust function code to use
1380 * nto-low.c (nto_create_inferior): Adjust function prototype and
1381 code to reflect change on "target.h". Update comments.
1382 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1383 "common-terminal.h" and "environ.h".
1384 (terminal_fd): Moved to fork-child.c.
1385 (old_foreground_pgrp): Likewise.
1386 (restore_old_foreground_pgrp): Likewise.
1387 (last_status): Make it global.
1388 (last_ptid): Likewise.
1389 (our_environ): New variable.
1390 (startup_with_shell): Likewise.
1391 (program_name): Likewise.
1392 (program_argv): Rename to...
1393 (program_args): ...this.
1394 (wrapper_argv): New variable.
1395 (start_inferior): Delete function.
1396 (get_exec_wrapper): New function.
1397 (get_exec_file): Likewise.
1398 (get_environ): Likewise.
1399 (prefork_hook): Likewise.
1400 (post_fork_inferior): Likewise.
1401 (postfork_hook): Likewise.
1402 (postfork_child_hook): Likewise.
1403 (handle_v_run): Update code to deal with arguments coming from the
1404 remote host. Update calls from "start_inferior" to
1406 (captured_main): Likewise. Initialize environment variable. Call
1408 * server.h (post_fork_inferior): New prototype.
1409 (get_environ): Likewise.
1410 (last_status): Declare.
1411 (last_ptid): Likewise.
1412 (signal_pid): Likewise.
1413 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1414 (spu_ptrace_fun): New function.
1415 (spu_create_inferior): Adjust function prototype to reflect change
1416 on "target.h". Adjust function code to use "fork_inferior".
1417 * target.c (target_terminal_init): New function.
1418 (target_terminal_inferior): Likewise.
1419 (target_terminal_ours): Likewise.
1420 * target.h: Include <vector>.
1421 (struct target_ops) <create_inferior>: Update prototype.
1422 (create_inferior): Update macro.
1423 * utils.c (gdb_flush_out_err): New function.
1424 * win32-low.c (win32_create_inferior): Adjust function prototype
1425 and code to reflect change on "target.h".
1427 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1429 * inferiors.c (switch_to_thread): New function.
1431 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1433 * Makefile.in (SFILE): Add "common/job-control.c".
1434 (OBS): Add "job-control.o".
1436 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1438 * Makefile: Remove "@host_makefile_frag@".
1440 2017-05-05 Pedro Alves <palves@redhat.com>
1442 * configure: Regenerate.
1444 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1446 * configure: Regenerate.
1448 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1450 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1451 software_single_step change of return type to
1452 std::vector<CORE_ADDR>.
1453 * linux-low.c (install_software_single_step_breakpoints):
1455 * linux-low.h (install_software_single_step_breakpoints):
1458 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1460 * remote-utils.c: Include "gdb_termios.h" instead of
1462 * terminal.h: Delete file.
1464 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1466 * server.c: Include <vector>.
1467 <program_argv, wrapper_argv>: Convert to std::vector.
1468 (start_inferior): Rewrite function to use C++.
1469 (handle_v_run): Likewise. Update code that calculates the argv
1470 based on the vRun packet; use C++.
1471 (captured_main): Likewise.
1473 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1475 * server.c (handle_v_cont): Initialize thread_resume::thread
1478 2017-04-05 Pedro Alves <palves@redhat.com>
1480 * configure: Regenerate.
1482 2017-04-05 Pedro Alves <palves@redhat.com>
1484 * gdbreplay.c (sync_error): Constify.
1485 * linux-x86-low.c (push_opcode): Constify.
1487 2017-04-05 Pedro Alves <palves@redhat.com>
1489 * win32-low.c (get_child_debug_event)
1490 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1491 Report TARGET_WAITKIND_SPURIOUS instead.
1493 2017-04-05 Pedro Alves <palves@redhat.com>
1495 * remote-utils.c (remote_prepare, remote_open): Constify.
1496 * remote-utils.h (remote_prepare, remote_open): Constify.
1497 * server.c (captured_main): Constify 'port' handling.
1499 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1501 * Makefile.in (clean): Clear .deps.
1503 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1505 * .gitignore: Remove generated files, replace with wildcard.
1506 * (clean): Replace removal of generated files with wildcard.
1507 (version.c): Replace with...
1508 (version-generated.c): ...this.
1509 (xml-builtin.c): Replace with...
1510 (xml-builtin-generated.c): ...this.
1511 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1512 (%.c: *regformats*): Replace with...
1513 (%-generated.c: *regformats*): ...this.
1515 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1517 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1518 (xtensa_fill_gregset): Call collect_register_by_name for
1520 (xtensa_store_gregset): Call supply_register_by_name for
1523 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1525 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1526 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1527 (xtensa_store_gregset): Call supply_register for all registers in
1528 a0_regnum..a0_regnum + C0_NREGS range.
1530 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1532 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1533 (ax-ipa.o: ax.c): Remove.
1534 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1535 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1536 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1537 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1538 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1540 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1542 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1543 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1544 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1545 (errors-ipa.o: ../common/errors.c): Remove.
1546 (format-ipa.o: ../common/format.c): Remove.
1547 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1549 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1551 * Makefile.in (%-ipa.o: %.c): New rule.
1552 (tracepoint-ipa.o: tracepoint.c): Remove.
1553 (utils-ipa.o: utils.c): Remove.
1554 (remote-utils-ipa.o: remote-utils.c): Remove.
1555 (regcache-ipa.o: regcache.c): Remove.
1556 (i386-linux-ipa.o: i386-linux.c): Remove.
1557 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1558 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1559 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1560 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1561 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1562 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1563 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1564 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1565 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1566 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1567 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1568 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1569 (aarch64-ipa.o: aarch64.c): Remove.
1570 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1571 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1572 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1573 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1574 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1575 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1576 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1577 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1578 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1579 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1580 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1581 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1582 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1583 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1584 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1585 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1586 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1587 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1588 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1589 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1590 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1591 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1592 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1593 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1594 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1595 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1596 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1597 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1598 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1599 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1600 (tdesc-ipa.o: tdesc.c): Remove.
1601 (x32-linux-ipa.o: x32-linux.c): Remove.
1602 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1603 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1605 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1607 * Makefile.in (%.o: ../arch/%.c): New rule.
1608 (arm.o: ../arch/arm.c): Remove.
1609 (arm-linux.o: ../arch/arm-linux.c): Remove.
1610 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1611 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1613 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1615 * Makefile.in (%.o: ../nat/%.c): New rule.
1616 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1617 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1618 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1619 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1620 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1621 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1622 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1623 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1624 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1625 (linux-personality.o: ../nat/linux-personality.c): Remove.
1626 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1627 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1628 (x86-linux.o: ../nat/x86-linux.c): Remove.
1629 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1630 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1632 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1634 * Makefile.in (%.o: ../common/%.c): New rule.
1635 (signals.o: ../common/signals.c): Remove.
1636 (print-utils.o: ../common/print-utils.c): Remove.
1637 (rsp-low.o: ../common/rsp-low.c): Remove.
1638 (common-utils.o: ../common/common-utils.c): Remove.
1639 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1640 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1641 (vec.o: ../common/vec.c): Remove.
1642 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1643 (xml-utils.o: ../common/xml-utils.c): Remove.
1644 (ptid.o: ../common/ptid.c): Remove.
1645 (buffer.o: ../common/buffer.c): Remove.
1646 (format.o: ../common/format.c): Remove.
1647 (filestuff.o: ../common/filestuff.c): Remove.
1648 (agent.o: ../common/agent.c): Remove.
1649 (errors.o: ../common/errors.c): Remove.
1650 (environ.o: ../common/environ.c): Remove.
1651 (common-debug.o: ../common/common-debug.c): Remove.
1652 (cleanups.o: ../common/cleanups.c): Remove.
1653 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1654 (fileio.o: ../common/fileio.c): Remove.
1655 (common-regcache.o: ../common/common-regcache.c): Remove.
1656 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1657 (new-op.o: ../common/new-op.c): Remove.
1658 (btrace-common.o: ../common/btrace-common.c): Remove.
1660 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1662 * Makefile.in (%.o: ../target/%.c): New rule.
1663 (waitstatus.o: ../target/waitstatus.c): Remove.
1665 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1668 (%.c: ../regformats/%.dat,
1669 (%.c: ../regformats/arm/%.dat,
1670 (%.c: ../regformats/i386/%.dat,
1671 (%.c: ../regformats/rs6000/%.dat): New rules.
1672 (aarch64.c): Remove.
1673 (reg-arm.c): Remove.
1674 (arm-with-iwmmxt.c): Remove.
1675 (arm-with-vfpv2.c): Remove.
1676 (arm-with-vfpv3.c): Remove.
1677 (arm-with-neon.c): Remove.
1678 (reg-bfin.c): Remove.
1679 (reg-cris.c): Remove.
1680 (reg-crisv32.c): Remove.
1682 (i386-linux.c): Remove.
1683 (i386-avx.c): Remove.
1684 (i386-avx-linux.c): Remove.
1685 (i386-avx-avx512.c): Remove.
1686 (i386-avx-avx512-linux.c): Remove.
1687 (i386-mpx.c): Remove.
1688 (i386-mpx-linux.c): Remove.
1689 (i386-avx-mpx-avx512-pku.c): Remove.
1690 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1691 (i386-avx-mpx.c): Remove.
1692 (i386-avx-mpx-linux.c): Remove.
1693 (i386-mmx.c): Remove.
1694 (i386-mmx-linux.c): Remove.
1695 (reg-ia64.c): Remove.
1696 (reg-m32r.c): Remove.
1697 (reg-m68k.c): Remove.
1699 (mips-linux.c): Remove.
1700 (mips-dsp-linux.c): Remove.
1701 (mips64-linux.c): Remove.
1702 (mips64-dsp-linux.c): Remove.
1703 (nios2-linux.c): Remove.
1704 (powerpc-32.c): Remove.
1705 (powerpc-32l.c): Remove.
1706 (powerpc-altivec32l.c): Remove.
1707 (powerpc-cell32l.c): Remove.
1708 (powerpc-vsx32l.c): Remove.
1709 (powerpc-isa205-32l.c): Remove.
1710 (powerpc-isa205-altivec32l.c): Remove.
1711 (powerpc-isa205-vsx32l.c): Remove.
1712 (powerpc-e500l.c): Remove.
1713 (powerpc-64l.c): Remove.
1714 (powerpc-altivec64l.c): Remove.
1715 (powerpc-cell64l.c): Remove.
1716 (powerpc-vsx64l.c): Remove.
1717 (powerpc-isa205-64l.c): Remove.
1718 (powerpc-isa205-altivec64l.c): Remove.
1719 (powerpc-isa205-vsx64l.c): Remove.
1720 (s390-linux32.c): Remove.
1721 (s390-linux32v1.c): Remove.
1722 (s390-linux32v2.c): Remove.
1723 (s390-linux64.c): Remove.
1724 (s390-linux64v1.c): Remove.
1725 (s390-linux64v2.c): Remove.
1726 (s390-te-linux64.c): Remove.
1727 (s390-vx-linux64.c): Remove.
1728 (s390-tevx-linux64.c): Remove.
1729 (s390x-linux64.c): Remove.
1730 (s390x-linux64v1.c): Remove.
1731 (s390x-linux64v2.c): Remove.
1732 (s390x-te-linux64.c): Remove.
1733 (s390x-vx-linux64.c): Remove.
1734 (s390x-tevx-linux64.c): Remove.
1735 (tic6x-c64xp-linux.c): Remove.
1736 (tic6x-c64x-linux.c): Remove.
1737 (tic6x-c62x-linux.c): Remove.
1739 (reg-sparc64.c): Remove.
1740 (reg-spu.c): Remove.
1742 (amd64-linux.c): Remove.
1743 (amd64-avx.c): Remove.
1744 (amd64-avx-linux.c): Remove.
1745 (amd64-avx-avx512.c): Remove.
1746 (amd64-avx-avx512-linux.c): Remove.
1747 (amd64-mpx.c): Remove.
1748 (amd64-mpx-linux.c): Remove.
1749 (amd64-avx-mpx-avx512-pku.c): Remove.
1750 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1751 (amd64-avx-mpx.c): Remove.
1752 (amd64-avx-mpx-linux.c): Remove.
1754 (x32-linux.c): Remove.
1755 (x32-avx.c): Remove.
1756 (x32-avx-linux.c): Remove.
1757 (x32-avx-avx512.c): Remove.
1758 (x32-avx-avx512-linux.c): Remove.
1759 (reg-xtensa.c): Remove.
1760 (reg-tilegx.c): Remove.
1761 (reg-tilegx32.c): Remove.
1763 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1765 * Makefile.in (SFILES): Add "common/environ.c".
1766 (OBJS): Add "common/environ.h".
1768 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1770 * configure.ac: Check if the fs_base and gs_base members of
1771 `struct user_regs_struct' exist.
1772 * config.in: Regenerated.
1773 * configure: Likewise.
1775 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1777 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1779 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1780 (get_next_pcs_syscall_next_pc): Likewise.
1782 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1784 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1785 * nto-x86-low.c: Likewise.
1787 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1789 * Makefile.in: Include disable-implicit-rules.mk.
1791 2016-11-23 Pedro Alves <palves@redhat.com>
1793 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1794 (debug_vprintf): Use std::chrono::steady_clock instead of
1795 gettimeofday. Use '.' instead of ':'.
1796 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1797 (get_timestamp): Use std::chrono::steady_clock instead of
1800 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1802 * Makefile.in: Fix whitespace formatting.
1804 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1806 * Makefile.in (SFILES, OBS): Flatten list and order
1809 2016-11-23 Pedro Alves <palves@redhat.com>
1811 * event-loop.c (handle_file_event): Use warning.
1812 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1813 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1816 2016-11-23 Pedro Alves <palves@redhat.com>
1818 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1820 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1821 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1822 debug_printf and debug_flush for debug output.
1823 * server.c (handle_general_set): Likewise.
1824 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1827 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1829 * Makefile.in (.c.o): Replace rule with ...
1830 (%.o: %.c): ... this one.
1832 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1834 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1835 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1837 * configure.ac: Remove checks for the make program.
1838 * configure: Re-generate.
1840 2016-10-28 Pedro Alves <palves@redhat.com>
1842 * Makefile.in (CXX_DIALECT): Get from configure.
1843 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1844 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1845 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1846 * config.in: Regenerate.
1847 * configure: Regenerate.
1849 2016-10-27 Yao Qi <yao.qi@linaro.org>
1851 * linux-low.c (linux_supports_range_stepping): Return true if
1852 can_software_single_step return true.
1854 2016-10-27 Yao Qi <yao.qi@linaro.org>
1856 * inferiors.c (find_inferior_in_random): New function.
1857 * inferiors.h (find_inferior_in_random): Declare.
1858 * linux-low.c (linux_wait_for_event_filtered): Call
1859 find_inferior_in_random instead of find_inferior.
1861 2016-10-27 Yao Qi <yao.qi@linaro.org>
1863 * linux-low.c (linux_wait_1): If single-step breakpoints are
1864 inserted, remove them.
1866 2016-10-26 Pedro Alves <palves@redhat.com>
1868 * linux-low.c (handle_extended_wait): Link parent/child fork
1870 (linux_wait_1): Unlink them.
1871 (linux_set_resume_request): Ignore resume requests for
1872 already-resumed and unhandled fork child threads.
1873 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1874 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1876 (handle_v_requests) <vCont>: Don't call require_running.
1877 * server.h (in_queued_stop_replies): New declaration.
1879 2016-10-24 Yao Qi <yao.qi@linaro.org>
1882 * linux-aarch64-low.c (append_insns): Cast the return value to
1885 2016-10-10 Yao Qi <yao.qi@linaro.org>
1887 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1889 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1891 * target.c (target_supports_multi_process): New function, moved
1893 * target.h (target_supports_multi_process): ... here. Remove
1896 2016-10-05 Tom Tromey <tom@tromey.com>
1899 * tracepoint.c (handle_tracepoint_bkpts): Check
1900 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1902 2016-10-05 Yao Qi <yao.qi@linaro.org>
1904 * configure.srv: Update the path of arm-*.xml files.
1906 2016-10-05 Terry Guo <terry.guo@arm.com>
1907 Yao Qi <yao.qi@linaro.org>
1909 * Makefile.in: Adjust the path of rules.
1910 * configure.srv: Update the path of xml files.
1911 * regformats/arm-with-iwmmxt.dat: Regenerated.
1912 * regformats/arm-with-neon.dat: Likewise.
1913 * regformats/arm-with-vfpv2.dat: Likewise.
1914 * regformats/arm-with-vfpv3.dat Likewise.
1916 2016-09-30 Yao Qi <yao.qi@linaro.org>
1919 * target.c (target_stop_and_wait): Don't call
1920 target_continue_no_signal, use resume_stop instead.
1922 2016-09-26 Yao Qi <yao.qi@linaro.org>
1924 * linux-low.c (linux_wait_1): Call debug_exit.
1926 2016-09-23 Pedro Alves <palves@redhat.com>
1928 * Makefile.in (SFILES): Add common/new-op.c.
1929 (OBS): Add common/new-op.o.
1930 (new-op.o): New rule.
1932 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1934 * .gitinore: Ignore more files.
1936 2016-09-21 Yao Qi <yao.qi@linaro.org>
1938 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1941 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1943 * server.c (start_inferior): Call target_mourn_inferior instead of
1944 mourn_inferior; pass ptid_t argument to it.
1946 (handle_target_event): Likewise.
1947 * target.c (target_mourn_inferior): New function.
1948 * target.h (mourn_inferior): Delete macro.
1950 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1952 * linux-low.c (lwp_is_stepping): New function.
1954 2016-09-06 Carl Love <cel@us.ibm.com>
1956 * server.c (start_inferior): Fixed comment, requested comment change
1957 didn't get updated correctly. Removed reference to ptrace () call as
1958 it is only true on Linux systems.
1960 2016-09-06 Carl Love <cel@us.ibm.com>
1962 * server.c (start_inferior): Do not call
1963 function target_post_create_inferior () if the
1964 inferior process has already exited.
1966 2016-09-05 Pedro Alves <palves@redhat.com>
1968 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1969 (COMPILE.pre, CC_LD): Use CXX directly.
1970 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1971 * acinclude.m4: Don't include build-with-cxx.m4.
1972 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1973 * configure: Regenerate.
1975 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1978 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1979 call writing data to own_buf.
1981 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1983 * target.c (mywait): Call target_wait instead of
1985 (target_wait): New function.
1987 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1989 * server.c (start_inferior): New variable 'ptid'. Replace calls
1990 to the_target->resume by target_continue{,_no_signal}, depending
1992 * target.c (target_stop_and_wait): Call target_continue_no_signal
1993 instead of the_target->resume.
1994 (target_continue): New function.
1996 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1998 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2000 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2003 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2005 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2006 * linux-arm-low.c (ps_get_thread_area): Likewise.
2007 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2008 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2009 * linux-mips-low.c (ps_get_thread_area): Likewise.
2010 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2011 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2012 * linux-x86-low.c (ps_get_thread_area): Likewise.
2013 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2015 2016-08-19 Pedro Alves <palves@redhat.com>
2017 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2019 2016-08-19 Pedro Alves <palves@redhat.com>
2021 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2022 comment. Use memcpy instead of casting through unsigned long.
2024 2016-08-19 Pedro Alves <palves@redhat.com>
2026 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2027 allocating around 0x80000000.
2029 2016-08-19 Pedro Alves <palves@redhat.com>
2032 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2033 (x32-avx512-linux-ipa.o): New rules.
2034 * configure.ac (x86_64-*-linux*): New x32 check.
2035 * configure.srv (ipa_x32_linux_regobj): New.
2036 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2037 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2039 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2041 * configure: Regenerate.
2043 2016-08-09 Pedro Alves <palves@redhat.com>
2046 * Makefile.in (OBS): Add signals-state-save-restore.o.
2047 (signals-state-save-restore.o): New rule.
2048 * config.in: Regenerate.
2049 * configure: Regenerate.
2050 * linux-low.c: Include "signals-state-save-restore.h".
2051 (linux_create_inferior): Call
2052 restore_original_signals_state.
2053 * server.c: Include "dispositions-save-restore.h".
2054 (captured_main): Call save_original_signals_state.
2056 2016-08-05 Pedro Alves <palves@redhat.com>
2058 * configure: Regenerate.
2060 2016-08-04 Yao Qi <yao.qi@linaro.org>
2062 * linux-low.c (regsets_fetch_inferior_registers): Check
2063 errno is ESRCH or not.
2065 2016-08-02 Yao Qi <yao.qi@linaro.org>
2067 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2068 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2069 (thread_db_load_search): Update.
2070 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2071 td_ta_set_event and td_ta_event_getmsg.
2073 2016-07-26 Pedro Alves <palves@redhat.com>
2076 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2077 of unsigned long for 64-bit registers and use uint32_t instead of
2078 unsigned int for 32-bit registers.
2080 2016-07-26 Pedro Alves <palves@redhat.com>
2082 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2085 2016-07-21 Tom Tromey <tom@tromey.com>
2087 * configure: Rebuild.
2089 2016-07-21 Yao Qi <yao.qi@linaro.org>
2091 * mem-break.c (find_gdb_breakpoint): Cast bp to
2092 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2094 2016-07-21 Yao Qi <yao.qi@linaro.org>
2096 * server.c (handle_v_requests): Support s and S actions
2097 if target_supports_software_single_step return true.
2099 2016-07-21 Yao Qi <yao.qi@linaro.org>
2101 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2102 is resume_step, call maybe_hw_step.
2103 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2105 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2107 (proceed_one_lwp): If resume request is resume_step, install
2108 reinsert breakpoints and call maybe_hw_step.
2110 2016-07-21 Yao Qi <yao.qi@linaro.org>
2112 * linux-low.c (proceed_one_lwp): Declare.
2113 (linux_resume_one_thread): Remove local variable 'step'.
2114 Lift code enqueue signal. Call proceed_one_lwp instead of
2115 linux_resume_one_lwp.
2117 2016-07-21 Yao Qi <yao.qi@linaro.org>
2119 * linux-low.c (linux_resume_one_thread): Call
2120 enqueue_pending_signal.
2122 2016-07-21 Yao Qi <yao.qi@linaro.org>
2124 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2125 * inferiors.c (do_restore_current_thread_cleanup): New function.
2126 (make_cleanup_restore_current_thread): Likewise.
2127 * linux-low.c (install_software_single_step_breakpoints): Call
2128 make_cleanup_restore_current_thread. Switch current_thread to
2131 2016-07-21 Yao Qi <yao.qi@linaro.org>
2133 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2134 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2135 (clone_one_breakpoint): Likewise.
2136 (delete_reinsert_breakpoints): Change parameter to thread.
2138 (has_reinsert_breakpoints): Likewise.
2139 (uninsert_reinsert_breakpoints): Likewise.
2140 (reinsert_reinsert_breakpoints): Likewise.
2141 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2142 (delete_reinsert_breakpoints): Likewise.
2143 (reinsert_reinsert_breakpoints): Likewise.
2144 (uninsert_reinsert_breakpoints): Likewise.
2145 (has_reinsert_breakpoints): Likewise.
2147 2016-07-21 Yao Qi <yao.qi@linaro.org>
2149 * inferiors.c (get_thread_process): Make parameter const.
2150 * inferiors.h (get_thread_process): Update declaration.
2151 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2152 Add new parameters child_thread and parent_thread. Callers
2154 * mem-break.h (clone_all_breakpoints): Update declaration.
2156 2016-07-21 Yao Qi <yao.qi@linaro.org>
2158 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2159 <command_list, handler>: Remove.
2160 (struct gdb_breakpoint): New.
2161 (struct other_breakpoint): New.
2162 (struct reinsert_breakpoint): New.
2163 (is_gdb_breakpoint): New function.
2164 (any_persistent_commands): Update command_list if
2165 is_gdb_breakpoint returns true.
2166 (set_breakpoint): Create breakpoints according to their types.
2167 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2168 (set_gdb_breakpoint_1): Likewise.
2169 (set_gdb_breakpoint): Likewise.
2170 (clear_breakpoint_conditions): Change parameter type to
2171 'struct gdb_breakpoint *'.
2172 (clear_breakpoint_commands): Likewise.
2173 (clear_breakpoint_conditions_and_commands): Likewise.
2174 (add_condition_to_breakpoint): Likewise.
2175 (add_breakpoint_condition): Likewise.
2176 (add_commands_to_breakpoint): Likewise.
2177 (check_breakpoints): Check other_breakpoint.
2178 (clone_one_breakpoint): Clone breakpopint according to its type.
2179 * mem-break.h (struct gdb_breakpoint): Declare.
2180 (set_gdb_breakpoint): Update declaration.
2181 (clear_breakpoint_conditions_and_commands): Likewise.
2182 (add_breakpoint_condition): Likewise.
2183 (add_breakpoint_commands): Likewise.
2184 * server.c (process_point_options): Change parameter type to
2185 'struct gdb_breakpoint *'.
2187 2016-07-21 Yao Qi <yao.qi@linaro.org>
2189 * mem-break.c (set_breakpoint_at): Rename it to ...
2190 (set_breakpoint_type_at): ... it.
2191 (set_breakpoint_at): Call set_breakpoint_type_at.
2192 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2193 * mem-break.h (set_breakpoint_at): Update comments.
2195 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2197 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2199 (nios2_store_gregset): Likewise.
2201 2016-07-01 Pedro Alves <palves@redhat.com>
2202 Antoine Tremblay <antoine.tremblay@ericsson.com>
2204 * linux-low.c: Change interface to take the target lwp_info
2205 pointer directly and return void. Handle detaching from a zombie
2207 (linux_detach_lwp_callback): New function.
2208 (linux_detach): Detach from the leader thread after detaching from
2211 2016-06-28 Yao Qi <yao.qi@linaro.org>
2213 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2214 for variable new_offset.
2215 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2216 (aarch64_ftrace_insn_reloc_cb): Likewise.
2217 (aarch64_ftrace_insn_reloc_tb): Likewise.
2218 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2219 PRIx64 instead of PRIx32.
2221 2016-06-28 Yao Qi <yao.qi@linaro.org>
2223 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2224 (the_low_target): Install arm_get_syscall_trapinfo.
2226 2016-06-28 Yao Qi <yao.qi@linaro.org>
2228 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2230 (the_low_target): Install aarch64_get_syscall_trapinfo.
2232 2016-06-28 Yao Qi <yao.qi@linaro.org>
2234 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2236 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2237 Remove parameter sysno.
2238 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2241 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2243 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2244 (s390_emit_ne_goto): Likewise.
2245 (s390_emit_lt_goto): Likewise.
2246 (s390_emit_le_goto): Likewise.
2247 (s390_emit_gt_goto): Likewise.
2248 (s390_emit_ge_goto): Likewise.
2249 (s390x_emit_eq_goto): Likewise.
2250 (s390x_emit_ne_goto): Likewise.
2251 (s390x_emit_lt_goto): Likewise.
2252 (s390x_emit_le_goto): Likewise.
2253 (s390x_emit_gt_goto): Likewise.
2254 (s390x_emit_ge_goto): Likewise.
2255 (s390_emit_ops_impl): Mark variable static.
2256 (s390x_emit_ops): Likewise.
2258 2016-06-17 Yao Qi <yao.qi@linaro.org>
2260 * linux-low.c (handle_extended_wait): Call
2261 uninsert_reinsert_breakpoints for the parent process. Remove
2262 reinsert breakpoints from the child process. Reinsert them to
2263 the parent process when vfork is done.
2264 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2265 (reinsert_reinsert_breakpoints): New function.
2266 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2267 (reinsert_reinsert_breakpoints): Declare.
2269 2016-06-17 Yao Qi <yao.qi@linaro.org>
2271 * linux-low.c (handle_extended_wait): If the parent is doing
2272 step-over, remove the reinsert breakpoints from the forked child.
2274 2016-06-17 Yao Qi <yao.qi@linaro.org>
2276 * linux-low.c (unsuspend_all_lwps): Declare.
2277 (linux_low_filter_event): If thread exited, call finish_step_over.
2278 If step-over is finished, unsuspend other threads.
2280 2016-06-17 Yao Qi <yao.qi@linaro.org>
2282 * linux-low.c (linux_resume_one_lwp_throw): Assert
2283 has_reinsert_breakpoints returns false.
2284 * mem-break.c (delete_disabled_breakpoints): Assert
2285 bp type isn't reinsert_breakpoint.
2287 2016-06-17 Yao Qi <yao.qi@linaro.org>
2289 * linux-low.c (maybe_hw_step): New function.
2290 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2291 (finish_step_over): Switch current_thread to lwp temporarily,
2292 and assert has_reinsert_breakpoints returns true.
2293 (proceed_one_lwp): Call maybe_hw_step.
2294 * mem-break.c (has_reinsert_breakpoints): New function.
2295 * mem-break.h (has_reinsert_breakpoints): Declare.
2297 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2299 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2301 2016-05-17 Yao Qi <yao.qi@linaro.org>
2303 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2304 instead of find_inferior.
2306 2016-05-05 Yao Qi <yao.qi@linaro.org>
2308 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2309 Initialize res to zero.
2311 2016-05-05 Yao Qi <yao.qi@linaro.org>
2313 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2316 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2318 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2319 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2320 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2322 2016-04-28 Par Olsson <par.olsson@windriver.com>
2323 Simon Marchi <simon.marchi@ericsson.com>
2325 * tracepoint.c (write_inferior_int8): New function.
2326 (cmd_qtenable_disable): Write enable flag using
2327 write_inferior_int8.
2329 2016-04-25 Yao Qi <yao.qi@linaro.org>
2331 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2332 (need_step_over_p): Return zero if the LWP has pending signals
2333 can be delivered on software single step target.
2335 2016-04-25 Yao Qi <yao.qi@linaro.org>
2337 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2338 return instead of error.
2340 2016-04-22 Yao Qi <yao.qi@linaro.org>
2342 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2345 2016-04-22 Yao Qi <yao.qi@linaro.org>
2347 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2348 signal when stepping over breakpoint with software single
2351 2016-04-21 Pedro Alves <palves@redhat.com>
2353 * linux-s390-low.c (s390_collect_ptrace_register)
2354 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2356 (s390_check_regset): Use void * instead of gdb_byte *.
2358 2016-04-20 Pedro Alves <palves@redhat.com>
2360 * configure: Renegerate.
2362 2016-04-20 Yao Qi <yao.qi@linaro.org>
2364 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2365 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2367 (arm_store_gregset): Likewise.
2369 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2371 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2372 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2373 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2374 (amd64-avx-mpx-linux.c): New rules.
2375 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2376 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2377 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2378 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2379 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2380 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2381 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2382 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2383 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2384 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2385 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2386 * linux-x86-low.c (x86_linux_read_description): Add case for
2387 X86_XSTATE_AVX_MPX_MASK.
2388 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2389 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2390 init_registers_i386_avx_mpx_linux.
2391 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2392 (initialize_low_tracepoint): Call
2393 init_registers_i386_avx_mpx_linux.
2394 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2395 (initialize_low_tracepoint): Call
2396 init_registers_amd64_avx_mpx_linux.
2397 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2398 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2399 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2402 2016-04-18 Pedro Alves <palves@redhat.com>
2404 * configure: Regenerate.
2406 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2408 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2409 (aarch64_emit_sub): Likewise.
2411 2016-04-12 Pedro Alves <palves@redhat.com>
2413 * utils.c (prepare_to_throw_exception): Delete.
2415 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2417 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2419 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2421 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2423 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2425 * linux-aarch64-ipa.c: Add <elf.h> include.
2426 * linux-ppc-ipa.c: Add <elf.h> include.
2427 * linux-s390-ipa.c: Add <elf.h> include.
2429 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2431 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2432 (get_raw_reg_ptr): Likewise.
2433 (get_trace_state_variable_value_ptr): Likewise.
2434 (set_trace_state_variable_value_ptr): Likewise.
2435 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2438 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2439 Marcin Kościelnicki <koriakin@0x04.net>
2442 * linux-ppc-low.c (emit_insns): New function.
2443 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2444 (ppc_emit_prologue): New function.
2445 (ppc_emit_epilogue): New function.
2446 (ppc_emit_add): New function.
2447 (ppc_emit_sub): New function.
2448 (ppc_emit_mul): New function.
2449 (ppc_emit_lsh): New function.
2450 (ppc_emit_rsh_signed): New function.
2451 (ppc_emit_rsh_unsigned): New function.
2452 (ppc_emit_ext): New function.
2453 (ppc_emit_zero_ext): New function.
2454 (ppc_emit_log_not): New function.
2455 (ppc_emit_bit_and): New function.
2456 (ppc_emit_bit_or): New function.
2457 (ppc_emit_bit_xor): New function.
2458 (ppc_emit_bit_not): New function.
2459 (ppc_emit_equal): New function.
2460 (ppc_emit_less_signed): New function.
2461 (ppc_emit_less_unsigned): New function.
2462 (ppc_emit_ref): New function.
2463 (ppc_emit_const): New function.
2464 (ppc_emit_reg): New function.
2465 (ppc_emit_pop): New function.
2466 (ppc_emit_stack_flush): New function.
2467 (ppc_emit_swap): New function.
2468 (ppc_emit_stack_adjust): New function.
2469 (ppc_emit_call): New function.
2470 (ppc_emit_int_call_1): New function.
2471 (ppc_emit_void_call_2): New function.
2472 (ppc_emit_if_goto): New function.
2473 (ppc_emit_goto): New function.
2474 (ppc_emit_eq_goto): New function.
2475 (ppc_emit_ne_goto): New function.
2476 (ppc_emit_lt_goto): New function.
2477 (ppc_emit_le_goto): New function.
2478 (ppc_emit_gt_goto): New function.
2479 (ppc_emit_ge_goto): New function.
2480 (ppc_write_goto_address): New function.
2481 (ppc_emit_ops_impl): New static variable.
2482 (ppc64v1_emit_prologue): New function.
2483 (ppc64v2_emit_prologue): New function.
2484 (ppc64_emit_epilogue): New function.
2485 (ppc64_emit_add): New function.
2486 (ppc64_emit_sub): New function.
2487 (ppc64_emit_mul): New function.
2488 (ppc64_emit_lsh): New function.
2489 (ppc64_emit_rsh_signed): New function.
2490 (ppc64_emit_rsh_unsigned): New function.
2491 (ppc64_emit_ext): New function.
2492 (ppc64_emit_zero_ext): New function.
2493 (ppc64_emit_log_not): New function.
2494 (ppc64_emit_bit_and): New function.
2495 (ppc64_emit_bit_or): New function.
2496 (ppc64_emit_bit_xor): New function.
2497 (ppc64_emit_bit_not): New function.
2498 (ppc64_emit_equal): New function.
2499 (ppc64_emit_less_signed): New function.
2500 (ppc64_emit_less_unsigned): New function.
2501 (ppc64_emit_ref): New function.
2502 (ppc64_emit_const): New function.
2503 (ppc64v1_emit_reg): New function.
2504 (ppc64v2_emit_reg): New function.
2505 (ppc64_emit_pop): New function.
2506 (ppc64_emit_stack_flush): New function.
2507 (ppc64_emit_swap): New function.
2508 (ppc64v1_emit_call): New function.
2509 (ppc64v2_emit_call): New function.
2510 (ppc64v1_emit_int_call_1): New function.
2511 (ppc64v2_emit_int_call_1): New function.
2512 (ppc64v1_emit_void_call_2): New function.
2513 (ppc64v2_emit_void_call_2): New function.
2514 (ppc64_emit_if_goto): New function.
2515 (ppc64_emit_eq_goto): New function.
2516 (ppc64_emit_ne_goto): New function.
2517 (ppc64_emit_lt_goto): New function.
2518 (ppc64_emit_le_goto): New function.
2519 (ppc64_emit_gt_goto): New function.
2520 (ppc64_emit_ge_goto): New function.
2521 (ppc64v1_emit_ops_impl): New static variable.
2522 (ppc64v2_emit_ops_impl): New static variable.
2523 (ppc_emit_ops): New function.
2524 (linux_low_target): Wire in ppc_emit_ops.
2526 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2527 Marcin Kościelnicki <koriakin@0x04.net>
2530 * Makefile.in: Add powerpc-*-ipa.o
2531 * configure.srv: Add ipa_obj for powerpc*-linux.
2532 * linux-ppc-ipa.c: New file.
2533 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2535 (PPC_FIELD): New macro.
2536 (PPC_SEXT): New macro.
2537 (PPC_OP6): New macro.
2538 (PPC_BO): New macro.
2539 (PPC_LI): New macro.
2540 (PPC_BD): New macro.
2541 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2542 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2543 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2544 (ppc_get_thread_area): New function.
2545 (is_elfv2_inferior): New function.
2546 (gen_ds_form): New function.
2547 (GEN_STD): New macro.
2548 (GEN_STDU): New macro.
2549 (GEN_LD): New macro.
2550 (GEN_LDU): New macro.
2551 (gen_d_form): New function.
2552 (GEN_ADDI): New macro.
2553 (GEN_ADDIS): New macro.
2554 (GEN_LI): New macro.
2555 (GEN_LIS): New macro.
2556 (GEN_ORI): New macro.
2557 (GEN_ORIS): New macro.
2558 (GEN_LWZ): New macro.
2559 (GEN_STW): New macro.
2560 (GEN_STWU): New macro.
2561 (gen_xfx_form): New function.
2562 (GEN_MFSPR): New macro.
2563 (GEN_MTSPR): New macro.
2564 (GEN_MFCR): New macro.
2565 (GEN_MTCR): New macro.
2566 (GEN_SYNC): New macro.
2567 (GEN_LWSYNC): New macro.
2568 (gen_x_form): New function.
2569 (GEN_OR): New macro.
2570 (GEN_MR): New macro.
2571 (GEN_LWARX): New macro.
2572 (GEN_STWCX): New macro.
2573 (GEN_CMPW): New macro.
2574 (gen_md_form): New function.
2575 (GEN_RLDICL): New macro.
2576 (GEN_RLDICR): New macro.
2577 (gen_i_form): New function.
2579 (GEN_BL): New macro.
2580 (gen_b_form): New function.
2581 (GEN_BNE): New macro.
2582 (GEN_LOAD): New macro.
2583 (GEN_STORE): New macro.
2584 (gen_limm): New function.
2585 (gen_atomic_xchg): New function.
2586 (gen_call): New function.
2587 (ppc_relocate_instruction): New function.
2588 (ppc_install_fast_tracepoint_jump_pad): New function.
2589 (ppc_get_min_fast_tracepoint_insn_len): New function.
2590 (ppc_get_ipa_tdesc_idx): New function.
2591 (the_low_target): Wire in the new functions.
2592 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2594 * linux-ppc-tdesc.h: New file.
2596 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2598 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2599 (alloc_jump_pad_buffer): New function.
2600 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2601 (alloc_jump_pad_buffer): New function.
2602 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2603 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2604 (alloc_jump_pad_buffer): New function.
2605 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2606 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2607 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2608 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2610 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2612 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2613 * linux-amd64-ipa.c: Likewise.
2614 * linux-i386-ipa.c: Likewise.
2615 * linux-s390-ipa.c: Likewise.
2616 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2617 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2618 set_trace_state_variable_value_ptr.
2619 (struct ipa_sym_addresses): Likewise.
2620 (symbol_list): Likewise.
2621 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2622 accessing gdb_collect directly.
2623 (gdb_collect_ptr_type): New typedef.
2624 (get_raw_reg_ptr_type): New typedef.
2625 (get_trace_state_variable_value_ptr_type): New typedef.
2626 (set_trace_state_variable_value_ptr_type): New typedef.
2627 (gdb_collect_ptr): New global.
2628 (get_raw_reg_ptr): New global.
2629 (get_trace_state_variable_value_ptr): New global.
2630 (set_trace_state_variable_value_ptr): New global.
2631 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2632 accessing get_raw_reg directly.
2633 (get_get_tsv_func_addr): Likewise for
2634 get_trace_state_variable_value_ptr.
2635 (get_set_tsv_func_addr): Likewise for
2636 set_trace_state_variable_value_ptr.
2637 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2639 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2641 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2643 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2645 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2647 (relocate_instruction): Remove own_buf.
2648 * server.c (own_buf): Make global.
2649 (handle_v_requests): Make global.
2650 * server.h (own_buf): New declaration.
2651 (handle_v_requests): New prototype.
2653 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2656 * linux-s390-low.c (add_insns): New function.
2657 (s390_emit_prologue): New function.
2658 (s390_emit_epilogue): New function.
2659 (s390_emit_add): New function.
2660 (s390_emit_sub): New function.
2661 (s390_emit_mul): New function.
2662 (s390_emit_lsh): New function.
2663 (s390_emit_rsh_signed): New function.
2664 (s390_emit_rsh_unsigned): New function.
2665 (s390_emit_ext): New function.
2666 (s390_emit_log_not): New function.
2667 (s390_emit_bit_and): New function.
2668 (s390_emit_bit_or): New function.
2669 (s390_emit_bit_xor): New function.
2670 (s390_emit_bit_not): New function.
2671 (s390_emit_equal): New function.
2672 (s390_emit_less_signed): New function.
2673 (s390_emit_less_unsigned): New function.
2674 (s390_emit_ref): New function.
2675 (s390_emit_if_goto): New function.
2676 (s390_emit_goto): New function.
2677 (s390_write_goto_address): New function.
2678 (s390_emit_litpool): New function.
2679 (s390_emit_const): New function.
2680 (s390_emit_call): New function.
2681 (s390_emit_reg): New function.
2682 (s390_emit_pop): New function.
2683 (s390_emit_stack_flush): New function.
2684 (s390_emit_zero_ext): New function.
2685 (s390_emit_swap): New function.
2686 (s390_emit_stack_adjust): New function.
2687 (s390_emit_set_r2): New function.
2688 (s390_emit_int_call_1): New function.
2689 (s390_emit_void_call_2): New function.
2690 (s390_emit_eq_goto): New function.
2691 (s390_emit_ne_goto): New function.
2692 (s390_emit_lt_goto): New function.
2693 (s390_emit_le_goto): New function.
2694 (s390_emit_gt_goto): New function.
2695 (s390_emit_ge_goto): New function.
2696 (s390x_emit_prologue): New function.
2697 (s390x_emit_epilogue): New function.
2698 (s390x_emit_add): New function.
2699 (s390x_emit_sub): New function.
2700 (s390x_emit_mul): New function.
2701 (s390x_emit_lsh): New function.
2702 (s390x_emit_rsh_signed): New function.
2703 (s390x_emit_rsh_unsigned): New function.
2704 (s390x_emit_ext): New function.
2705 (s390x_emit_log_not): New function.
2706 (s390x_emit_bit_and): New function.
2707 (s390x_emit_bit_or): New function.
2708 (s390x_emit_bit_xor): New function.
2709 (s390x_emit_bit_not): New function.
2710 (s390x_emit_equal): New function.
2711 (s390x_emit_less_signed): New function.
2712 (s390x_emit_less_unsigned): New function.
2713 (s390x_emit_ref): New function.
2714 (s390x_emit_if_goto): New function.
2715 (s390x_emit_const): New function.
2716 (s390x_emit_call): New function.
2717 (s390x_emit_reg): New function.
2718 (s390x_emit_pop): New function.
2719 (s390x_emit_stack_flush): New function.
2720 (s390x_emit_zero_ext): New function.
2721 (s390x_emit_swap): New function.
2722 (s390x_emit_stack_adjust): New function.
2723 (s390x_emit_int_call_1): New function.
2724 (s390x_emit_void_call_2): New function.
2725 (s390x_emit_eq_goto): New function.
2726 (s390x_emit_ne_goto): New function.
2727 (s390x_emit_lt_goto): New function.
2728 (s390x_emit_le_goto): New function.
2729 (s390x_emit_gt_goto): New function.
2730 (s390x_emit_ge_goto): New function.
2731 (s390_emit_ops): New function.
2732 (struct linux_target_ops): Fill in emit_ops hook.
2734 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2737 * Makefile.in: Add s390 IPA files.
2738 * configure.srv: Build IPA for s390.
2739 * linux-s390-ipa.c: New file.
2740 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2741 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2742 (tdesc_s390_linux32): Likewise.
2743 (init_registers_s390_linux32v1): Likewise.
2744 (tdesc_s390_linux32v1): Likewise.
2745 (init_registers_s390_linux32v2): Likewise.
2746 (tdesc_s390_linux32v2): Likewise.
2747 (init_registers_s390_linux64): Likewise.
2748 (tdesc_s390_linux64): Likewise.
2749 (init_registers_s390_linux64v1): Likewise.
2750 (tdesc_s390_linux64v1): Likewise.
2751 (init_registers_s390_linux64v2): Likewise.
2752 (tdesc_s390_linux64v2): Likewise.
2753 (init_registers_s390_te_linux64): Likewise.
2754 (tdesc_s390_te_linux64): Likewise.
2755 (init_registers_s390_vx_linux64): Likewise.
2756 (tdesc_s390_vx_linux64): Likewise.
2757 (init_registers_s390_tevx_linux64): Likewise.
2758 (tdesc_s390_tevx_linux64): Likewise.
2759 (init_registers_s390x_linux64): Likewise.
2760 (tdesc_s390x_linux64): Likewise.
2761 (init_registers_s390x_linux64v1): Likewise.
2762 (tdesc_s390x_linux64v1): Likewise.
2763 (init_registers_s390x_linux64v2): Likewise.
2764 (tdesc_s390x_linux64v2): Likewise.
2765 (init_registers_s390x_te_linux64): Likewise.
2766 (tdesc_s390x_te_linux64): Likewise.
2767 (init_registers_s390x_vx_linux64): Likewise.
2768 (tdesc_s390x_vx_linux64): Likewise.
2769 (init_registers_s390x_tevx_linux64): Likewise.
2770 (tdesc_s390x_tevx_linux64): Likewise.
2771 (have_hwcap_s390_vx): New static variable.
2772 (s390_arch_setup): Fill have_hwcap_s390_vx.
2773 (s390_get_thread_area): New function.
2774 (s390_ft_entry_gpr_esa): New const.
2775 (s390_ft_entry_gpr_zarch): New const.
2776 (s390_ft_entry_misc): New const.
2777 (s390_ft_entry_fr): New const.
2778 (s390_ft_entry_vr): New const.
2779 (s390_ft_main_31): New const.
2780 (s390_ft_main_64): New const.
2781 (s390_ft_exit_fr): New const.
2782 (s390_ft_exit_vr): New const.
2783 (s390_ft_exit_misc): New const.
2784 (s390_ft_exit_gpr_esa): New const.
2785 (s390_ft_exit_gpr_zarch): New const.
2786 (append_insns): New function.
2787 (s390_relocate_instruction): New function.
2788 (s390_install_fast_tracepoint_jump_pad): New function.
2789 (s390_get_min_fast_tracepoint_insn_len): New function.
2790 (s390_get_ipa_tdesc_idx): New function.
2791 (struct linux_target_ops): Wire in the above functions.
2792 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2793 * linux-s390-tdesc.h: New file.
2795 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2797 * linux-s390-low.c (s390_supports_tracepoints): New function.
2798 (struct linux_target_ops): Fill supports_tracepoints hook.
2800 2016-03-18 Yao Qi <yao.qi@linaro.org>
2802 * linux-low.c (lwp_signal_can_be_delivered): New function.
2803 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2805 2016-03-18 Yao Qi <yao.qi@linaro.org>
2807 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2808 0 if signal is enqueued. Remove 'signal' from one debugging
2809 message. Move one debugging message to some lines below.
2810 Remove code setting 'signal' to 0.
2812 2016-03-18 Yao Qi <yao.qi@linaro.org>
2814 * linux-low.c (linux_low_filter_event): Remove redundant
2815 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2817 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2819 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2820 (struct linux_target_ops): Wire in the above.
2822 2016-03-03 Yao Qi <yao.qi@linaro.org>
2824 * linux-low.c: Update comments to start_step_over.
2826 2016-03-03 Yao Qi <yao.qi@linaro.org>
2829 * linux-low.c (handle_extended_wait): Set child suspended
2830 if event_lwp->bp_reinsert isn't zero.
2832 2016-03-02 Yao Qi <yao.qi@linaro.org>
2834 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2835 enqueue_pending_signal.
2837 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2839 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2842 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2844 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2845 (s390_regmap_3264) [!__s390x__]: New global.
2846 (s390_collect_ptrace_register): Skip map entries containing -1.
2847 (s390_supply_ptrace_register): Ditto.
2848 (s390_fill_gprs_high): New function.
2849 (s390_store_gprs_high): New function.
2850 (s390_regsets): Add NT_S390_HIGH_GPRS.
2851 (s390_get_hwcap): Enable on 31-bit.
2852 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2853 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2854 Detect NT_S390_HIGH_GPRS.
2855 (s390_usrregs_info_3264): Enable on 31-bit.
2856 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2857 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2859 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2862 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2863 * configure.srv: Ditto.
2864 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2865 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2866 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2867 (init_registers_amd64_linux): Remove prototype.
2868 (tdesc_amd64_linux): Remove declaration.
2869 (get_ipa_tdesc): New function.
2870 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2871 initialize remaining tdescs.
2872 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2873 (init_registers_i386_linux): Remove prototype.
2874 (tdesc_i386_linux): Remove declaration.
2875 (get_ipa_tdesc): New function.
2876 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2877 initialize remaining tdescs.
2878 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2879 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2880 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2881 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2882 (x86_get_ipa_tdesc_idx): New function.
2883 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2884 * linux-x86-tdesc.h: New file.
2885 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2886 (target_get_ipa_tdesc_idx): New macro.
2887 * tracepoint.c (ipa_tdesc_idx): New macro.
2888 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2889 (symbol_list): Add ipa_tdesc_idx.
2890 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2891 (ipa_tdesc): Remove.
2892 (ipa_tdesc_idx): New variable.
2893 (get_context_regcache): Use get_ipa_tdesc.
2894 (gdb_collect): Ditto.
2896 * tracepoint.h (get_ipa_tdesc): New prototype.
2897 (ipa_tdesc): Remove.
2899 2016-02-24 Pedro Alves <palves@redhat.com>
2901 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2902 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2903 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2904 Factor out common code between the USE_SIGTRAP_SIGINFO and
2905 !USE_SIGTRAP_SIGINFO blocks.
2906 (linux_low_filter_event): Call save_stop_reason instead of
2907 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2909 (linux_wait_1): Update comments.
2911 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2913 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2914 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2915 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2916 ppc_insert_point, ppc_remove_point.
2918 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2920 * linux-s390-low.c (s390_supports_z_point_type): New function.
2921 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2923 2016-02-16 Yao Qi <yao.qi@linaro.org>
2925 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2926 PC. Get pc from regcache_read_pc.
2928 2016-02-12 Yao Qi <yao.qi@linaro.org>
2930 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2931 or linux_get_pc_32bit.
2932 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2934 2016-02-12 Yao Qi <yao.qi@linaro.org>
2936 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2937 arm_linux_get_next_pcs_fixup.
2939 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2941 * tracepoint.c (x_tracepoint_action_download): Change
2942 write_inferior_data_ptr to write_inferior_data_pointer.
2943 (cmd_qtstart): Likewise.
2944 (write_inferior_data_ptr): Remove.
2945 (download_agent_expr): Change write_inferior_data_ptr to
2946 write_inferior_data_pointer.
2947 (download_tracepoint_1): Likewise.
2948 (download_tracepoint): Likewise.
2949 (download_trace_state_variables): Likewise.
2951 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2952 Marcin Kościelnicki <koriakin@0x04.net>
2954 * tracepoint.c (struct tracepoint_action_ops): Remove.
2955 (struct tracepoint_action): Remove ops.
2956 (m_tracepoint_action_download, r_tracepoint_action_download)
2957 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2958 size and offset accordingly.
2959 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2960 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2961 (tracepoint_action_send, tracepoint_action_download): New functions.
2962 Helpers for trace action handlers.
2963 (add_tracepoint_action): Remove setup actions ops.
2964 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2966 2016-02-10 Yao Qi <yao.qi@linaro.org>
2968 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2970 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2972 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2974 * configure: Regenerate.
2976 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2978 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2979 void * to gdb_byte *.
2980 * linux-low.c (siginfo_fixup): Likewise.
2981 (linux_xfer_siginfo): Likewise.
2982 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2984 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2986 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2988 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2990 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2992 * linux-x86-low.c [__x86_64__]: Include
2993 "nat/amd64-linux-siginfo.h".
2994 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2995 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2996 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2997 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2998 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2999 (cpt_si_fd, si_timerid, si_overrun): Move from
3000 nat/amd64-linux-siginfo.c.
3001 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3003 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3005 * server.c (skip_to_semicolon): Remove.
3006 (process_point_options): Use strchrnul instead of
3009 2016-01-26 Yao Qi <yao.qi@linaro.org>
3011 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3012 * linux-low.c (install_software_single_step_breakpoints): Don't
3013 call regcache_read_pc.
3014 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3017 2016-01-26 Yao Qi <yao.qi@linaro.org>
3019 * linux-low.c (install_software_single_step_breakpoints): Call
3020 regcache_read_pc instead of get_pc.
3022 2016-01-26 Yao Qi <yao.qi@linaro.org>
3024 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3025 (unblock_async_io): Rename to ...
3026 (block_unblock_async_io): ... it. New function.
3027 (enable_async_io): Don't install SIGIO handler. Unblock it
3029 (disable_async_io): Don't ignore SIGIO. Block it instead.
3030 (initialize_async_io): Install SIGIO handler. Don't call
3033 2016-01-26 Yao Qi <yao.qi@linaro.org>
3035 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3036 first character is '\003', call *the_target->request_interrupt.
3038 2016-01-25 Yao Qi <yao.qi@linaro.org>
3040 * remote-utils.c (new_thread_notify): Remove.
3041 (dead_thread_notify): Likewise.
3042 * remote-utils.h (new_thread_notify): Remove declaration.
3043 (dead_thread_notify): Likewise.
3045 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3047 * gdb.trace/pending.exp: Fix expected message on continue.
3049 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3051 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3052 it works properly on big-endian machines where sizeof (CORE_ADDR)
3055 2016-01-21 Pedro Alves <palves@redhat.com>
3057 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3058 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3059 * configure: Regenerate.
3061 2016-01-21 Yao Qi <yao.qi@linaro.org>
3063 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3064 is_thumb and set it according to CPSR saved on the stack.
3065 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3066 arm_sigreturn_next_pc.
3068 2016-01-18 Yao Qi <yao.qi@linaro.org>
3070 * linux-low.c (linux_set_pc_64bit): New function.
3071 (linux_get_pc_64bit): New function.
3072 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3074 * linux-sparc-low.c (debug_threads): Remove declaration.
3075 (sparc_get_pc): Remove.
3076 (the_low_target): Use linux_get_pc_64bit instead of
3078 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3079 (the_low_target): Use linux_get_pc_64bit and
3082 2016-01-18 Yao Qi <yao.qi@linaro.org>
3084 * linux-arm-low.c (debug_threads): Remove declaration.
3085 (arm_get_pc, arm_set_pc): Remove.
3086 (the_low_target): Use linux_get_pc_32bit and
3088 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3089 (the_low_target): Use linux_get_pc_32bit and
3091 * linux-cris-low.c (debug_threads): Remove declaration.
3092 (cris_get_pc, cris_set_pc,): Remove.
3093 (the_low_target): Use linux_get_pc_32bit and
3095 * linux-crisv32-low.c (debug_threads): Remove declaration.
3096 (cris_get_pc, cris_set_pc): Remove.
3097 (the_low_target): Use linux_get_pc_32bit and
3099 * linux-low.c: Include inttypes.h.
3100 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3101 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3102 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3103 (the_low_target): Use linux_get_pc_32bit and
3105 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3106 (the_low_target): Use linux_get_pc_32bit and
3108 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3109 (the_low_target): Use linux_get_pc_32bit and
3111 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3112 (the_low_target): Use linux_get_pc_32bit and
3114 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3115 (the_low_target): Use linux_get_pc_32bit and
3118 2016-01-18 Gary Benson <gbenson@redhat.com>
3120 * configure.ac (AC_FUNC_FORK): New check.
3121 * config.in: Regenerate.
3122 * configure: Likewise.
3124 2016-01-14 Yao Qi <yao.qi@linaro.org>
3126 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3127 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3128 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3129 arm_get_next_pcs_ctor.
3131 2016-01-12 Josh Stone <jistone@redhat.com>
3132 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3134 * inferiors.h: Include "gdb_vecs.h".
3135 (struct process_info): Add syscalls_to_catch.
3136 * inferiors.c (remove_process): Free syscalls_to_catch.
3137 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3138 syscall_return stops.
3139 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3140 * server.c (handle_general_set): Handle QCatchSyscalls.
3141 (handle_query): Report support for QCatchSyscalls.
3142 * target.h (struct target_ops): Add supports_catch_syscall.
3143 (target_supports_catch_syscall): New macro.
3144 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3145 (struct lwp_info): Add syscall_state.
3146 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3147 Maintain syscall_state and syscalls_to_catch across exec.
3148 (get_syscall_trapinfo): New function, proxy to the_low_target.
3149 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3150 (linux_low_filter_event): Toggle syscall_state entry/return for
3151 syscall traps, and set it ignored for all others.
3152 (gdb_catching_syscalls_p): New function.
3153 (gdb_catch_this_syscall_p): New function.
3154 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3155 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3156 (linux_supports_catch_syscall): New function.
3157 (linux_target_ops): Install it.
3158 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3159 (the_low_target): Install it.
3161 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3163 * acinclude.m4: Include new ../warning.m4 file.
3164 * configure: Regenerated.
3165 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3167 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3169 * ax.c (is_goto_target): Mark static.
3170 * linux-low.c (register_addr): Likewise.
3171 (linux_fetch_registers, linux_store_registers): Likewise.
3172 * mem-break.c (any_persistent_commands): Fix old prototype.
3173 (add_commands_to_breakpoint): Mark static.
3174 * regcache.c (find_register_by_name): Delete unused func.
3175 * remote-utils.c (hex_or_minus_one): Mark static.
3176 * server.c (monitor_show_help): Mark static.
3177 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3178 handle_v_requests): Likewise.
3180 2016-01-12 Pedro Alves <palves@redhat.com>
3182 Remove use of the registered trademark symbol throughout.
3184 2016-01-08 Yao Qi <yao.qi@linaro.org>
3186 * remote-utils.c (getpkt): If c is '\003', call target hook
3189 2016-01-06 Yao Qi <yao.qi@linaro.org>
3191 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3192 linux-aarch32-low.c.
3193 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3194 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3195 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3196 (thumb2_breakpoint): Declare.
3197 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3198 linux-aarch32-low.h.
3199 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3200 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3201 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3203 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3205 * gdbreplay.c (gdbreplay_version): Change copyright year in
3207 * server.c (gdbserver_version): Likewise.
3209 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3211 * server.c (crc32_table): Delete.
3212 (crc32): Use libiberty's xcrc32 function.
3214 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3216 * lynx-low.c (lynx_delete_thread_callback): New function.
3217 (lynx_mourn): Properly delete our process and all of its
3218 threads. Remove call to clear_inferiors.
3220 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3222 * target.c (thread_search_callback): Add check that
3223 the thread_stopped target callback is not NULL before
3226 2015-12-21 Yao Qi <yao.qi@linaro.org>
3228 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3231 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3233 * server.c (handle_query): Call target_supports_software_single_step.
3235 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3237 * linux-low.c (single_step): New function.
3238 (linux_resume_one_lwp_throw): Call single_step.
3239 (start_step_over): Likewise.
3241 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3243 * Makefile.in (SFILES): Append arch/arm-linux.c,
3244 arch/arm-get-next-pcs.c.
3245 (arm-linux.o): New rule.
3246 (arm-get-next-pcs.o): New rule.
3247 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3249 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3250 to linux-aarch32-low.c.
3251 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3252 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3253 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3254 (thumb2_breakpoint_len): Likewise.
3255 (arm_is_thumb_mode): Make non-static.
3256 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3257 from linux-aarch32-low.c.
3258 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3259 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3260 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3261 (thumb2_breakpoint_len): Likewise.
3262 (arm_is_thumb_mode): New declaration.
3263 * linux-arm-low.c: Include arch/arm-linux.h
3264 aarch/arm-get-next-pcs.h, sys/syscall.h.
3265 (get_next_pcs_ops): New struct.
3266 (get_next_pcs_addr_bits_remove): New function.
3267 (get_next_pcs_is_thumb): New function.
3268 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3269 (arm_sigreturn_next_pc): Likewise.
3270 (get_next_pcs_syscall_next_pc): Likewise.
3271 (arm_gdbserver_get_next_pcs): Likewise.
3272 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3274 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3275 * server.h: Include gdb_vecs.h.
3277 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3279 * Makefile.in (SFILES): Append common/common-regcache.c.
3280 (OBS): Append common-regcache.o.
3281 (common-regcache.o): New rule.
3282 * regcache.c (init_register_cache): Initialize cache to
3284 (regcache_raw_read_unsigned): New function.
3285 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3286 register_status enum.
3288 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3290 * linux-aarch64-low.c (the_low_targets): Rename
3291 breakpoint_reinsert_addr to get_next_pcs.
3292 * linux-arm-low.c (the_low_targets): Likewise.
3293 * linux-bfin-low.c (the_low_targets): Likewise.
3294 * linux-cris-low.c (the_low_targets): Likewise.
3295 * linux-crisv32-low.c (the_low_targets): Likewise.
3296 * linux-low.c (can_software_single_step): Likewise.
3297 (install_software_single_step_breakpoints): New function.
3298 (start_step_over): Use install_software_single_step_breakpoints.
3299 * linux-low.h: New CORE_ADDR vector.
3300 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3302 * linux-mips-low.c (the_low_targets): Likewise.
3303 * linux-nios2-low.c (the_low_targets): Likewise.
3304 * linux-sparc-low.c (the_low_targets): Likewise.
3306 2015-12-17 Pedro Alves <palves@redhat.com>
3308 * linux-low.c (linux_kill_one_lwp): Remove references to
3310 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3312 (linux_init_signals): Delete.
3313 (initialize_low): Adjust.
3314 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3316 2015-12-16 Pedro Alves <palves@redhat.com>
3318 * configure.ac (compiler warning flags): When testing a
3319 -Wno-foo option, check whether -Wfoo works instead.
3320 * configure: Regenerate.
3322 2015-12-11 Don Breazeal <donb@codesourcery.com>
3324 * server.c (process_serial_event): Don't exit from gdbserver
3325 in remote mode if there are still active inferiors.
3327 2015-12-11 Yao Qi <yao.qi@linaro.org>
3329 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3330 arm_breakpoint_at if the process is 32-bit.
3332 2015-12-11 Yao Qi <yao.qi@linaro.org>
3334 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3337 2015-12-07 Yao Qi <yao.qi@linaro.org>
3339 * configure.srv: Append arm.o to srv_tgtobj for
3340 aarch64*-*-linux* target.
3341 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3342 from linux-arm-low.c.
3343 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3344 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3345 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3346 (thumb2_breakpoint_len): Likewise.
3347 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3348 (arm_breakpoint_kinds): Likewise.
3349 (arm_breakpoint_kind_from_pc): Likewise.
3350 (arm_sw_breakpoint_from_kind): Likewise.
3351 (arm_breakpoint_kind_from_current_state): Likewise.
3352 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3353 (arm_sw_breakpoint_from_kind): Declare.
3354 (arm_breakpoint_kind_from_current_state): Declare.
3355 (arm_breakpoint_at): Declare.
3356 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3357 arm_sw_breakpoint_from_kind if process is 32-bit.
3358 (aarch64_breakpoint_kind_from_pc): New function.
3359 (aarch64_breakpoint_kind_from_current_state): New function.
3360 (the_low_target): Initialize fields breakpoint_kind_from_pc
3361 and breakpoint_kind_from_current_state.
3362 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3363 linux-aarch32-low.c.
3364 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3365 (arm_breakpoint, arm_breakpoint_len): Likewise.
3366 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3367 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3368 (arm_is_thumb_mode): Likewise.
3369 (arm_breakpoint_at): Likewise.
3370 (arm_breakpoint_kind_from_pc): Likewise.
3371 (arm_sw_breakpoint_from_kind): Likewise.
3372 (arm_breakpoint_kind_from_current_state): Likewise.
3375 2015-08-04 Yao Qi <yao.qi@linaro.org>
3377 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3378 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3379 * server.c (extended_protocol): Remove "static".
3380 * server.h (extended_protocol): Declare it.
3382 2015-12-04 Josh Stone <jistone@redhat.com>
3384 * target.h (struct target_ops) <arch_setup>: Rename to ...
3385 (struct target_ops) <post_create_inferior>: ... this.
3386 (target_arch_setup): Rename to ...
3387 (target_post_create_inferior): ... this, calling post_create_inferior.
3388 * server.c (start_inferior): Update target_arch_setup calls to
3389 target_post_create_inferior.
3390 * linux-low.c (linux_low_ptrace_options): Forward declare.
3391 (linux_arch_setup): Update its comment for general use.
3392 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3393 (struct linux_target_ops): Use linux_post_create_inferior.
3394 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3395 to post_create_inferior.
3396 * nto-low.c (struct nto_target_ops): Likewise.
3397 * spu-low.c (struct spu_target_ops): Likewise.
3398 * win32-low.c (struct win32_target_ops): Likewise.
3400 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3402 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3404 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3406 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3407 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3408 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3409 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3410 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3411 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3412 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3413 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3414 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3415 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3416 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3417 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3419 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3421 * linux-low.c (linux_look_up_symbols): Don't call
3422 linux_supports_traceclone.
3423 * linux-low.h (thread_db_init): Remove use_events argument.
3424 * thread-db.c (thread_db_use_event): Remove global variable.
3425 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3426 (struct thread_db) <td_create_bp>: Remove field.
3427 (thread_db_create_event): Remove function.
3428 (thread_db_enable_reporting): Likewise.
3429 (find_one_thread): Don't check for thread_db_use_events.
3430 (attach_thread): Likewise.
3431 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3432 (try_thread_db_load_1): Don't check for thread_db_use_events.
3433 (thread_db_init): Remove use_events argument and thread events
3435 (remove_thread_event_breakpoints): Remove function.
3436 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3438 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3440 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3442 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3443 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3444 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3445 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3446 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3448 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3450 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3451 * linux-low.c (can_hardware_single_step): Use
3452 supports_hardware_single_step.
3453 (can_software_single_step): New function.
3454 (start_step_over): Call can_software_single_step.
3455 (linux_supports_hardware_single_step): New function.
3456 (struct target_ops) <supports_software_single_step>: Initialize.
3457 * linux-low.h (struct linux_target_ops)
3458 <supports_hardware_single_step>: Initialize.
3459 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3460 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3461 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3462 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3463 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3464 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3465 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3466 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3467 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3468 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3470 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3471 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3473 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3474 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3475 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3477 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3478 * target.h (struct target_ops): <supports_software_single_step>:
3480 (target_supports_software_single_step): New macro.
3482 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3484 * linux-low.c (linux_wait_1): Fix pc advance condition.
3485 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3486 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3488 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3490 * linux-arm-low.c (arm_is_thumb_mode): New function.
3491 (arm_breakpoint_at): Use arm_is_thumb_mode.
3492 (arm_breakpoint_kind_from_current_state): New function.
3493 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3495 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3496 (linux_breakpoint_kind_from_current_state): New function.
3497 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3498 * linux-low.h (struct linux_target_ops)
3499 <breakpoint_kind_from_current_state>: New field.
3500 * target.h (struct target_ops): Likewise.
3501 (target_breakpoint_kind_from_current_state): New macro.
3503 2015-11-30 Pedro Alves <palves@redhat.com>
3505 * linux-low.c (linux_resume): Wake up the event loop before
3508 2015-11-30 Pedro Alves <palves@redhat.com>
3510 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3512 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3514 * target.c (struct thread_search): New structure.
3515 (thread_search_callback): New function.
3516 (prev_general_thread): New global.
3517 (prepare_to_access_memory, done_accessing_memory): New functions.
3518 * target.h (prepare_to_access_memory, done_accessing_memory):
3519 Replace macros with function declarations.
3521 2015-11-30 Pedro Alves <palves@redhat.com>
3524 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3525 report TARGET_WAITKIND_NO_RESUMED.
3526 * remote-utils.c (prepare_resume_reply): Handle
3527 TARGET_WAITKIND_NO_RESUMED.
3528 * server.c (report_no_resumed): New global.
3529 (handle_query) <qSupported>: Handle "no-resumed+". Report
3530 "no-resumed+" support.
3531 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3532 return error if the client doesn't support no-resumed events.
3533 (push_stop_notification): New function.
3534 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3535 events if the client supports them.
3537 2015-11-30 Pedro Alves <palves@redhat.com>
3539 * linux-low.c (thread_still_has_status_pending_p): Don't check
3541 (lwp_resumed): New function.
3542 (status_pending_p_callback): Return early if the LWP is not
3543 supposed to be resumed.
3545 2015-11-30 Pedro Alves <palves@redhat.com>
3547 * linux-low.c (handle_extended_wait): Assert that the LWP's
3548 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3549 thread create events, leave the new child's status pending.
3550 (linux_low_filter_event): If GDB wants to hear about thread exit
3551 events, leave the LWP marked dead and don't delete it.
3552 (linux_wait_for_event_filtered): Don't check for thread exit.
3553 (filter_exit_event): New function.
3554 (linux_wait_1): Use it, when returning an exit event.
3555 (linux_resume_one_lwp_throw): Assert that the LWP's
3556 waitstatus is TARGET_WAITKIND_IGNORE.
3557 * remote-utils.c (prepare_resume_reply): Handle
3558 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3559 * server.c (report_thread_events): New global.
3560 (handle_general_set): Handle QThreadEvents.
3561 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3562 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3563 TARGET_WAITKIND_THREAD_EXITED.
3564 * server.h (report_thread_events): Declare.
3566 2015-11-30 Pedro Alves <palves@redhat.com>
3568 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3569 the thread's last_resume_kind was resume_stop.
3571 2015-11-30 Pedro Alves <palves@redhat.com>
3573 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3576 2015-11-30 Pedro Alves <palves@redhat.com>
3578 * server.c (handle_v_requests): Handle vCtrlC.
3580 2015-11-30 Pedro Alves <palves@redhat.com>
3582 * gdbthread.h (find_any_thread_of_pid): Declare.
3583 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3585 * server.c (handle_query): If current_thread is NULL, look for
3586 another thread of the selected process.
3588 2015-11-26 Daniel Colascione <dancol@dancol.org>
3589 Simon Marchi <simon.marchi@ericsson.com>
3591 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3592 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3594 * target.h (struct target_ops) <thread_name>: New field.
3595 (target_thread_name): New macro.
3597 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3599 * regcache.h (regcache_invalidate_pid): Add declaration.
3600 * regcache.c (regcache_invalidate_pid): New function, extracted
3601 from regcache_invalidate.
3602 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3603 Add trivial documentation comment.
3604 * lynx-low.c: Use regcache_invalidate_pid instead of
3605 regcache_invalidate.
3607 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3609 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3610 and Elf64_auxv_t if the target is Android.
3612 2015-11-22 Doug Evans <xdje42@gmail.com>
3614 * target.h: #include <sys/types.h>.
3616 2015-11-19 Pedro Alves <palves@redhat.com>
3618 * linux-low.c (linux_process_qsupported): Change prototype.
3620 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3622 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3623 and adjust to loop over all features.
3624 * server.c (handle_query) <qSupported>: Adjust to call
3625 target_process_qsupported once, passing it a vector of unprocessed
3627 * target.h (struct target_ops) <process_qsupported>: Change
3629 (target_process_qsupported): Adjust.
3631 2015-11-19 Pedro Alves <palves@redhat.com>
3633 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3635 * configure: Regenerate.
3637 2015-11-19 Pedro Alves <palves@redhat.com>
3639 * configure: Regenerate.
3641 2015-11-19 Yao Qi <yao.qi@linaro.org>
3643 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3646 2015-11-19 Yao Qi <yao.qi@linaro.org>
3648 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3649 (struct aarch64_operand): Move enum out.
3651 2015-11-19 Yao Qi <yao.qi@linaro.org>
3653 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3654 struct user_fpsimd_state *.
3655 (aarch64_store_fpregset): Likewise.
3657 2015-11-19 Yao Qi <yao.qi@linaro.org>
3659 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3660 struct user_pt_regs *.
3661 (aarch64_store_gregset): Likewise.
3663 2015-11-18 Pedro Alves <palves@redhat.com>
3665 * Makefile.in (all_object_files): Add $IPA_OBJS.
3667 2015-11-17 Pedro Alves <palves@redhat.com>
3669 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3670 GDB_SIGNAL_0 and gdb_signal_to_string.
3672 2015-11-17 Pedro Alves <palves@redhat.com>
3674 * win32-low.c (handle_output_debug_string): Remove parameter.
3675 (win32_kill): Remove our_status local and adjust call to
3676 handle_output_debug_string.
3677 (get_child_debug_event): Adjust call to
3678 handle_output_debug_string.
3680 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3682 * linux-mips-low.c (mips_fill_gregset): Add cast.
3683 (mips_store_gregset): Likewise.
3684 (mips_fill_fpregset): Likewise.
3685 (mips_store_fpregset): Likewise.
3687 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3689 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3692 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3694 * linux-mips-low.c (mips_linux_new_thread): Change type of
3695 watch_type to enum target_hw_bp_type.
3697 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3699 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3700 Change return type to arm_hwbp_type.
3702 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3704 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3705 (arm_store_gregset): Likewise.
3706 * linux-arm-low.c (arm_get_hwcap): Likewise.
3707 (arm_read_description): Likewise.
3709 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3711 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3713 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3715 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3716 (ppc_fill_vsxregset): Likewise.
3717 (ppc_store_vsxregset): Likewise.
3718 (ppc_fill_vrregset): Likewise.
3719 (ppc_store_vrregset): Likewise.
3720 (ppc_fill_evrregset): Likewise.
3721 (ppc_store_evrregset): Likewise.
3723 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3725 * linux-ppc-low.c (ppc_usrregs_info): Remove
3726 forward-declaration.
3727 (ppc_arch_setup): Move lower in file.
3729 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3731 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3732 (ps_pdwrite): Likewise.
3734 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3736 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3737 to after assert checks.
3739 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3741 * proc-service.c (ps_pdread): Add/adjust casts.
3742 (ps_pdwrite): Add/adjust casts.
3744 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3746 * server.c (handle_search_memory_1): Cast return value of
3749 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3751 * server.c (write_qxfer_response): Change type of data to
3754 2015-10-29 Pedro Alves <palves@redhat.com>
3756 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3758 2015-10-29 Pedro Alves <palves@redhat.com>
3760 * tracepoint.c (clear_installed_tracepoints): Add casts.
3762 2015-10-29 Pedro Alves <palves@redhat.com>
3764 * server.c (handle_v_cont, process_serial_event): Add enum
3765 gdb_signal casts to signal parsing code.
3767 2015-10-29 Pedro Alves <palves@redhat.com>
3769 * linux-low.h (NULL_REGSET): Define.
3770 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3771 * linux-arm-low.c (arm_regsets): Likewise.
3772 * linux-crisv32-low.c (cris_regsets): Likewise.
3773 * linux-m68k-low.c (m68k_regsets): Likewise.
3774 * linux-mips-low.c (mips_regsets): Likewise.
3775 * linux-nios2-low.c (nios2_regsets): Likewise.
3776 * linux-ppc-low.c (ppc_regsets): Likewise.
3777 * linux-s390-low.c (s390_regsets): Likewise.
3778 * linux-sh-low.c (sh_regsets): Likewise.
3779 * linux-sparc-low.c (sparc_regsets): Likewise.
3780 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3781 * linux-tile-low.c (tile_regsets): Likewise.
3782 * linux-x86-low.c (x86_regsets): Likewise.
3783 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3785 2015-10-29 Pedro Alves <palves@redhat.com>
3787 * linux-low.h (NULL_REGSET): Define.
3788 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3789 * linux-arm-low.c (arm_regsets): Likewise.
3790 * linux-crisv32-low.c (cris_regsets): Likewise.
3791 * linux-m68k-low.c (m68k_regsets): Likewise.
3792 * linux-mips-low.c (mips_regsets): Likewise.
3793 * linux-nios2-low.c (nios2_regsets): Likewise.
3794 * linux-ppc-low.c (ppc_regsets): Likewise.
3795 * linux-s390-low.c (s390_regsets): Likewise.
3796 * linux-sh-low.c (sh_regsets): Likewise.
3797 * linux-sparc-low.c (sparc_regsets): Likewise.
3798 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3799 * linux-tile-low.c (tile_regsets): Likewise.
3800 * linux-x86-low.c (x86_regsets): Likewise.
3801 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3803 2015-10-26 Doug Evans <dje@google.com>
3805 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3807 2015-10-26 Doug Evans <dje@google.com>
3809 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3811 2015-10-26 Doug Evans <dje@google.com>
3813 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3815 (attach_thread, find_new_threads_callback): Ditto.
3817 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3819 * mem-break.h (set_breakpoint_data): Remove.
3821 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3823 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3824 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3825 (initialize_low): Remove set_breakpoint_data call.
3826 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3827 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3828 (initialize_low): Remove set_breakpoint_data call.
3829 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3830 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3831 (initialize_low): Remove set_breakpoint_data call.
3833 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3835 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3836 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3837 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3838 * target.h (target_breakpoint_kind_from_pc): New macro.
3840 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3842 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3843 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3844 the default breakpoint kind.
3846 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3848 * linux-arm-low.c (arm_supports_z_point_type): Add software
3851 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3853 * linux-arm-low.c: Refactor breakpoint definitions.
3854 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3855 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3857 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3859 * Makefile.in: Add arm.c/o.
3860 * configure.srv: Likewise.
3861 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3862 (arm_breakpoint_kind_from_pc): New function.
3863 (arm_sw_breakpoint_from_kind): Return proper kind.
3864 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3866 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3868 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3870 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3871 (struct raw_breakpoint) <size>: Remove.
3872 (struct raw_breakpoint) <kind>: Add.
3873 (bp_size): New function.
3874 (bp_opcode): Likewise.
3875 (find_raw_breakpoint_at): Adjust for kind.
3876 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3877 (remove_memory_breakpoint): Adjust for kind call bp_size.
3878 (set_raw_breakpoint_at): Adjust for kind.
3879 (set_breakpoint): Likewise.
3880 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3881 (delete_raw_breakpoint): Adjust for kind.
3882 (delete_breakpoint): Likewise.
3883 (find_gdb_breakpoint): Likewise.
3884 (set_gdb_breakpoint_1): Likewise.
3885 (set_gdb_breakpoint): Likewise.
3886 (delete_gdb_breakpoint_1): Likewise.
3887 (delete_gdb_breakpoint): Likewise.
3888 (uninsert_raw_breakpoint): Likewise.
3889 (reinsert_raw_breakpoint): Likewise.
3890 (set_breakpoint_data): Remove.
3891 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3892 (check_mem_read): Adjust for kind call bp_size.
3893 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3894 (clone_one_breakpoint): Adjust for kind.
3895 * mem-break.h (set_gdb_breakpoint): Likewise.
3896 (delete_gdb_breakpoint): Likewise.
3897 * server.c (process_serial_event): Likewise.
3899 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3901 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3902 (struct linux_target_ops) <breakpoint>: Remove.
3903 (struct linux_target_ops) <breakpoint_len>: Remove.
3904 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3905 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3906 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3907 (arm_sw_breakpoint_from_kind): New function.
3908 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3909 (struct linux_target_ops) <breakpoint>: Remove.
3910 (struct linux_target_ops) <breakpoint_len>: Remove.
3911 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3912 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3913 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3914 (struct linux_target_ops) <breakpoint>: Remove.
3915 (struct linux_target_ops) <breakpoint_len>: Remove.
3916 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3917 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3918 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3919 (struct linux_target_ops) <breakpoint>: Remove.
3920 (struct linux_target_ops) <breakpoint_len>: Remove.
3921 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3922 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3923 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3924 and sw_breakpoint_from_kind to increment the pc.
3925 (linux_breakpoint_kind_from_pc): New function.
3926 (linux_sw_breakpoint_from_kind): New function.
3927 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3928 (initialize_low): Call breakpoint_kind_from_pc and
3929 sw_breakpoint_from_kind to replace breakpoint_data/len.
3930 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3932 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3933 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3934 (struct linux_target_ops) <breakpoint>: Remove.
3935 (struct linux_target_ops) <breakpoint_len>: Remove.
3936 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3937 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3938 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3939 (struct linux_target_ops) <breakpoint>: Remove.
3940 (struct linux_target_ops) <breakpoint_len>: Remove.
3941 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3942 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3943 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3944 (struct linux_target_ops) <breakpoint>: Remove.
3945 (struct linux_target_ops) <breakpoint_len>: Remove.
3946 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3947 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3948 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3949 (struct linux_target_ops) <breakpoint>: Remove.
3950 (struct linux_target_ops) <breakpoint_len>: Remove.
3951 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3952 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3953 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3954 (struct linux_target_ops) <breakpoint>: Remove.
3955 (struct linux_target_ops) <breakpoint_len>: Remove.
3956 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3957 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3958 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3959 (struct linux_target_ops) <breakpoint>: Remove.
3960 (struct linux_target_ops) <breakpoint_len>: Remove.
3961 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3962 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3963 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3964 (struct linux_target_ops) <breakpoint>: Remove.
3965 (struct linux_target_ops) <breakpoint_len>: Remove.
3966 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3967 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3968 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3969 (struct linux_target_ops) <breakpoint>: Remove.
3970 (struct linux_target_ops) <breakpoint_len>: Remove.
3971 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3972 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3973 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3974 (struct linux_target_ops) <breakpoint>: Remove.
3975 (struct linux_target_ops) <breakpoint_len>: Remove.
3976 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3977 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3978 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3979 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3980 (struct linux_target_ops) <breakpoint>: Remove.
3981 (struct linux_target_ops) <breakpoint_len>: Remove.
3982 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3983 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3984 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3985 (struct linux_target_ops) <breakpoint>: Remove.
3986 (struct linux_target_ops) <breakpoint_len>: Remove.
3987 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3988 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3990 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3992 * linux-cris-low.c (cris_get_pc): Remove void arg.
3994 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3996 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3999 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4001 * inferiors.c (thread_pid_matches_callback): New function.
4002 (find_thread_process): New function.
4003 (remove_thread): Reset current_thread.
4004 (remove_process): Assert threads have been removed first.
4006 2015-10-15 Yao Qi <yao.qi@linaro.org>
4008 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4010 (aarch64_remove_point): Likewise.
4011 * regcache.c (regcache_register_size): New function.
4013 2015-10-12 Yao Qi <yao.qi@linaro.org>
4015 * linux-aarch64-low.c: Update all callers as emit_load_store
4016 is renamed to aarch64_emit_load_store.
4018 2015-10-12 Yao Qi <yao.qi@linaro.org>
4020 * linux-aarch64-low.c: Update all callers of function renaming
4021 from emit_insn to aarch64_emit_insn.
4023 2015-10-12 Yao Qi <yao.qi@linaro.org>
4025 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4026 arch/aarch64-insn.h.
4027 (struct aarch64_memory_operand): Likewise.
4029 (emit_insn): Move to arch/aarch64-insn.c.
4030 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4031 (emit_load_store): Move to arch/aarch64-insn.c.
4032 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4033 (can_encode_int32): Remove.
4035 2015-10-12 Yao Qi <yao.qi@linaro.org>
4037 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4038 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4039 (aarch64_relocate_instruction): Likewise.
4040 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4041 (struct aarch64_insn_visitor): Likewise.
4043 2015-10-12 Yao Qi <yao.qi@linaro.org>
4045 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4046 (struct aarch64_insn_visitor): New.
4047 (struct aarch64_insn_relocation_data): New.
4048 (aarch64_ftrace_insn_reloc_b): New function.
4049 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4050 (aarch64_ftrace_insn_reloc_cb): Likewise.
4051 (aarch64_ftrace_insn_reloc_tb): Likewise.
4052 (aarch64_ftrace_insn_reloc_adr): Likewise.
4053 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4054 (aarch64_ftrace_insn_reloc_others): Likewise.
4056 (aarch64_relocate_instruction): Use visitor.
4058 2015-10-12 Yao Qi <yao.qi@linaro.org>
4060 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4061 int. Add argument buf.
4062 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4063 aarch64_relocate_instruction.
4065 2015-10-12 Yao Qi <yao.qi@linaro.org>
4067 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4068 argument insn. Remove local variable insn. Don't call
4070 (aarch64_install_fast_tracepoint_jump_pad): Call
4073 2015-09-30 Yao Qi <yao.qi@linaro.org>
4075 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4076 (emit_load_store_pair): Likewise.
4078 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4080 * dll.c (match_dll): Add cast(s).
4081 (unloaded_dll): Likewise.
4082 * linux-low.c (second_thread_of_pid_p): Likewise.
4083 (delete_lwp_callback): Likewise.
4084 (count_events_callback): Likewise.
4085 (select_event_lwp_callback): Likewise.
4086 (linux_set_resume_request): Likewise.
4087 * server.c (accumulate_file_name_length): Likewise.
4088 (emit_dll_description): Likewise.
4089 (handle_qxfer_threads_worker): Likewise.
4090 (visit_actioned_threads): Likewise.
4091 * thread-db.c (any_thread_of): Likewise.
4092 * tracepoint.c (same_process_p): Likewise.
4093 (match_blocktype): Likewise.
4094 (build_traceframe_info_xml): Likewise.
4096 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4098 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4100 (gdb_unparse_agent_expr): Likewise.
4101 * hostio.c (require_data): Likewise.
4102 (handle_pread): Likewise.
4103 * linux-low.c (disable_regset): Likewise.
4104 (fetch_register): Likewise.
4105 (store_register): Likewise.
4106 (get_dynamic): Likewise.
4107 (linux_qxfer_libraries_svr4): Likewise.
4108 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4109 (set_fast_tracepoint_jump): Likewise.
4110 (uninsert_fast_tracepoint_jumps_at): Likewise.
4111 (reinsert_fast_tracepoint_jumps_at): Likewise.
4112 (validate_inserted_breakpoint): Likewise.
4113 (clone_agent_expr): Likewise.
4114 * regcache.c (init_register_cache): Likewise.
4115 * remote-utils.c (putpkt_binary_1): Likewise.
4116 (decode_M_packet): Likewise.
4117 (decode_X_packet): Likewise.
4118 (look_up_one_symbol): Likewise.
4119 (relocate_instruction): Likewise.
4120 (monitor_output): Likewise.
4121 * server.c (handle_search_memory): Likewise.
4122 (handle_qxfer_exec_file): Likewise.
4123 (handle_qxfer_libraries): Likewise.
4124 (handle_qxfer): Likewise.
4125 (handle_query): Likewise.
4126 (handle_v_cont): Likewise.
4127 (handle_v_run): Likewise.
4128 (captured_main): Likewise.
4129 * target.c (write_inferior_memory): Likewise.
4130 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4131 * tracepoint.c (init_trace_buffer): Likewise.
4132 (add_tracepoint_action): Likewise.
4133 (add_traceframe): Likewise.
4134 (add_traceframe_block): Likewise.
4135 (cmd_qtdpsrc): Likewise.
4136 (cmd_qtdv): Likewise.
4137 (cmd_qtstatus): Likewise.
4138 (response_source): Likewise.
4139 (response_tsv): Likewise.
4140 (cmd_qtnotes): Likewise.
4141 (gdb_collect): Likewise.
4142 (initialize_tracepoint): Likewise.
4144 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4146 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4147 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4148 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4150 (enum aarch64_condition_codes): New enum.
4151 (w0): New static global.
4154 (struct aarch64_memory_operand) <type>: New
4155 MEMORY_OPERAND_POSTINDEX type.
4156 (postindex_memory_operand): New helper function.
4157 (emit_ret): New function.
4158 (emit_load_store_pair): New function, factored out of emit_stp
4159 with support for MEMORY_OPERAND_POSTINDEX.
4160 (emit_stp): Rewrite using emit_load_store_pair.
4161 (emit_ldp): New function.
4162 (emit_load_store): Likewise.
4163 (emit_ldr): Mention post-index instruction in comment.
4164 (emit_ldrh): New function.
4165 (emit_ldrb): New function.
4166 (emit_ldrsw): Mention post-index instruction in comment.
4167 (emit_str): Likewise.
4168 (emit_subs): New function.
4169 (emit_cmp): Likewise.
4170 (emit_and): Likewise.
4171 (emit_orr): Likewise.
4172 (emit_orn): Likewise.
4173 (emit_eor): Likewise.
4174 (emit_mvn): Likewise.
4175 (emit_lslv): Likewise.
4176 (emit_lsrv): Likewise.
4177 (emit_asrv): Likewise.
4178 (emit_mul): Likewise.
4179 (emit_sbfm): Likewise.
4180 (emit_sbfx): Likewise.
4181 (emit_ubfm): Likewise.
4182 (emit_ubfx): Likewise.
4183 (emit_csinc): Likewise.
4184 (emit_cset): Likewise.
4185 (emit_nop): Likewise.
4186 (emit_ops_insns): New helper function.
4187 (emit_pop): Likewise.
4188 (emit_push): Likewise.
4189 (aarch64_emit_prologue): New function.
4190 (aarch64_emit_epilogue): Likewise.
4191 (aarch64_emit_add): Likewise.
4192 (aarch64_emit_sub): Likewise.
4193 (aarch64_emit_mul): Likewise.
4194 (aarch64_emit_lsh): Likewise.
4195 (aarch64_emit_rsh_signed): Likewise.
4196 (aarch64_emit_rsh_unsigned): Likewise.
4197 (aarch64_emit_ext): Likewise.
4198 (aarch64_emit_log_not): Likewise.
4199 (aarch64_emit_bit_and): Likewise.
4200 (aarch64_emit_bit_or): Likewise.
4201 (aarch64_emit_bit_xor): Likewise.
4202 (aarch64_emit_bit_not): Likewise.
4203 (aarch64_emit_equal): Likewise.
4204 (aarch64_emit_less_signed): Likewise.
4205 (aarch64_emit_less_unsigned): Likewise.
4206 (aarch64_emit_ref): Likewise.
4207 (aarch64_emit_if_goto): Likewise.
4208 (aarch64_emit_goto): Likewise.
4209 (aarch64_write_goto_address): Likewise.
4210 (aarch64_emit_const): Likewise.
4211 (aarch64_emit_call): Likewise.
4212 (aarch64_emit_reg): Likewise.
4213 (aarch64_emit_pop): Likewise.
4214 (aarch64_emit_stack_flush): Likewise.
4215 (aarch64_emit_zero_ext): Likewise.
4216 (aarch64_emit_swap): Likewise.
4217 (aarch64_emit_stack_adjust): Likewise.
4218 (aarch64_emit_int_call_1): Likewise.
4219 (aarch64_emit_void_call_2): Likewise.
4220 (aarch64_emit_eq_goto): Likewise.
4221 (aarch64_emit_ne_goto): Likewise.
4222 (aarch64_emit_lt_goto): Likewise.
4223 (aarch64_emit_le_goto): Likewise.
4224 (aarch64_emit_gt_goto): Likewise.
4225 (aarch64_emit_ge_got): Likewise.
4226 (aarch64_emit_ops_impl): New static global variable.
4227 (aarch64_emit_ops): New target function, return
4228 &aarch64_emit_ops_impl.
4229 (struct linux_target_ops): Install it.
4231 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4233 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4234 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4236 * linux-aarch64-ipa.c: New file.
4237 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4239 (aarch64_get_thread_area): New target method.
4240 (extract_signed_bitfield): New helper function.
4241 (aarch64_decode_ldr_literal): New function.
4242 (enum aarch64_opcodes): New enum.
4243 (struct aarch64_register): New struct.
4244 (struct aarch64_operand): New struct.
4245 (x0): New static global.
4254 (aarch64_register): New helper function.
4255 (register_operand): Likewise.
4256 (immediate_operand): Likewise.
4257 (struct aarch64_memory_operand): New struct.
4258 (offset_memory_operand): New helper function.
4259 (preindex_memory_operand): Likewise.
4260 (enum aarch64_system_control_registers): New enum.
4261 (ENCODE): New macro.
4262 (emit_insn): New helper function.
4263 (emit_b): New function.
4264 (emit_bcond): Likewise.
4265 (emit_cb): Likewise.
4266 (emit_tb): Likewise.
4267 (emit_blr): Likewise.
4268 (emit_stp): Likewise.
4269 (emit_ldp_q_offset): Likewise.
4270 (emit_stp_q_offset): Likewise.
4271 (emit_load_store): Likewise.
4272 (emit_ldr): Likewise.
4273 (emit_ldrsw): Likewise.
4274 (emit_str): Likewise.
4275 (emit_ldaxr): Likewise.
4276 (emit_stxr): Likewise.
4277 (emit_stlr): Likewise.
4278 (emit_data_processing_reg): Likewise.
4279 (emit_data_processing): Likewise.
4280 (emit_add): Likewise.
4281 (emit_sub): Likewise.
4282 (emit_mov): Likewise.
4283 (emit_movk): Likewise.
4284 (emit_mov_addr): Likewise.
4285 (emit_mrs): Likewise.
4286 (emit_msr): Likewise.
4287 (emit_sevl): Likewise.
4288 (emit_wfe): Likewise.
4289 (append_insns): Likewise.
4290 (can_encode_int32_in): New helper function.
4291 (aarch64_relocate_instruction): New function.
4292 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4293 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4294 (struct linux_target_ops): Install aarch64_get_thread_area,
4295 aarch64_install_fast_tracepoint_jump_pad and
4296 aarch64_get_min_fast_tracepoint_insn_len.
4298 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4300 * Makefile.in (aarch64-insn.o): New rule.
4301 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4303 2015-09-21 Yao Qi <yao.qi@linaro.org>
4305 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4307 2015-09-21 Yao Qi <yao.qi@linaro.org>
4309 * tracepoint.c (max_jump_pad_size): Remove.
4311 2015-09-18 Yao Qi <yao.qi@linaro.org>
4313 * linux-aarch64-low.c: Don't include sys/uio.h.
4314 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4316 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4318 * tracepoint.c (eval_result_type): Change prototype.
4319 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4321 2015-09-15 Pedro Alves <palves@redhat.com>
4323 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4324 Check whether to report exec events instead of checking whether
4325 multiprocess is enabled.
4327 2015-09-15 Pedro Alves <palves@redhat.com>
4330 * remote-utils.c (prepare_resume_reply): Merge
4331 TARGET_WAITKIND_VFORK_DONE switch case with the
4332 TARGET_WAITKIND_FORKED case.
4334 2015-09-15 Yao Qi <yao.qi@linaro.org>
4336 * server.c (handle_query): Check string comparison using
4337 "else if" instead of "if".
4339 2015-09-15 Yao Qi <yao.qi@linaro.org>
4341 * server.c (vCont_supported): New global variable.
4342 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4343 matches. Append ";vContSupported+" to own_buf.
4344 (handle_v_requests): Append ";s;S" to own_buf if target supports
4345 hardware single step or vCont_supported is false.
4346 (capture_main): Set vCont_supported to zero.
4348 2015-09-15 Yao Qi <yao.qi@linaro.org>
4350 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4352 (linux_supports_hardware_single_step): ... New function.
4353 (linux_target_ops): Update.
4354 * lynx-low.c (lynx_target_ops): Set field
4355 supports_hardware_single_step to target_can_do_hardware_single_step.
4356 * nto-low.c (nto_target_ops): Likewise.
4357 * spu-low.c (spu_target_ops): Likewise.
4358 * win32-low.c (win32_target_ops): Likewise.
4359 * target.c (target_can_do_hardware_single_step): New function.
4360 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4361 Remove. <supports_hardware_single_step>: New field.
4362 (target_supports_conditional_breakpoints): Remove.
4363 (target_supports_hardware_single_step): New macro.
4364 (target_can_do_hardware_single_step): Declare.
4365 * server.c (handle_query): Use target_supports_hardware_single_step
4366 instead of target_supports_conditional_breakpoints.
4368 2015-09-15 Yao Qi <yao.qi@linaro.org>
4370 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4372 (struct linux_target_ops the_low_target): Install
4373 aarch64_linux_siginfo_fixup.
4375 2015-09-11 Don Breazeal <donb@codesourcery.com>
4376 Luis Machado <lgustavo@codesourcery.com>
4378 * linux-low.c (linux_mourn): Static declaration.
4379 (linux_arch_setup): Move in front of
4380 handle_extended_wait.
4381 (linux_arch_setup_thread): New function.
4382 (handle_extended_wait): Handle exec events. Call
4383 linux_arch_setup_thread. Make event_lwp argument a
4384 pointer-to-a-pointer.
4385 (check_zombie_leaders): Do not check stopped threads.
4386 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4387 (linux_low_filter_event): Add lwp and thread for exec'ing
4388 non-leader thread if leader thread has been deleted.
4389 Refactor code into linux_arch_setup_thread and call it.
4390 Pass child lwp pointer by reference to handle_extended_wait.
4391 (linux_wait_for_event_filtered): Update comment.
4392 (linux_wait_1): Prevent clobbering exec event status.
4393 (linux_supports_exec_events): New function.
4394 (linux_target_ops) <supports_exec_events>: Initialize new member.
4395 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4397 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4398 * server.c (report_exec_events): New global variable.
4399 (handle_query): Handle qSupported query for exec-events feature.
4400 (captured_main): Initialize report_exec_events.
4401 * server.h (report_exec_events): Declare new global variable.
4402 * target.h (struct target_ops) <supports_exec_events>: New
4404 (target_supports_exec_events): New macro.
4405 * win32-low.c (win32_target_ops) <supports_exec_events>:
4406 Initialize new member.
4408 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4410 * linux-low.c (linux_low_enable_btrace): Remove.
4411 (linux_target_ops): Replace linux_low_enable_btrace with
4412 linux_enable_btrace.
4414 2015-09-03 Yao Qi <yao.qi@linaro.org>
4416 * linux-aarch64-low.c (aarch64_insert_point): Call
4417 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4420 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4422 * linux-low.c (check_stopped_by_breakpoint): Use
4423 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4425 2015-08-27 Pedro Alves <palves@redhat.com>
4427 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4429 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4431 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4432 the XNEW-family equivalent.
4433 (compile_bytecodes): Likewise.
4434 * dll.c (loaded_dll): Likewise.
4435 * event-loop.c (append_callback_event): Likewise.
4436 (create_file_handler): Likewise.
4437 (create_file_event): Likewise.
4438 * hostio.c (handle_open): Likewise.
4439 * inferiors.c (add_thread): Likewise.
4440 (add_process): Likewise.
4441 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4442 * linux-arm-low.c (arm_new_process): Likewise.
4443 (arm_new_thread): Likewise.
4444 * linux-low.c (add_to_pid_list): Likewise.
4445 (linux_add_process): Likewise.
4446 (handle_extended_wait): Likewise.
4447 (add_lwp): Likewise.
4448 (enqueue_one_deferred_signal): Likewise.
4449 (enqueue_pending_signal): Likewise.
4450 (linux_resume_one_lwp_throw): Likewise.
4451 (linux_resume_one_thread): Likewise.
4452 (linux_read_memory): Likewise.
4453 (linux_write_memory): Likewise.
4454 * linux-mips-low.c (mips_linux_new_process): Likewise.
4455 (mips_linux_new_thread): Likewise.
4456 (mips_add_watchpoint): Likewise.
4457 * linux-x86-low.c (initialize_low_arch): Likewise.
4458 * lynx-low.c (lynx_add_process): Likewise.
4459 * mem-break.c (set_raw_breakpoint_at): Likewise.
4460 (set_breakpoint): Likewise.
4461 (add_condition_to_breakpoint): Likewise.
4462 (add_commands_to_breakpoint): Likewise.
4463 (clone_agent_expr): Likewise.
4464 (clone_one_breakpoint): Likewise.
4465 * regcache.c (new_register_cache): Likewise.
4466 * remote-utils.c (look_up_one_symbol): Likewise.
4467 * server.c (queue_stop_reply): Likewise.
4468 (start_inferior): Likewise.
4469 (queue_stop_reply_callback): Likewise.
4470 (handle_target_event): Likewise.
4471 * spu-low.c (fetch_ppc_memory): Likewise.
4472 (store_ppc_memory): Likewise.
4473 * target.c (set_target_ops): Likewise.
4474 * thread-db.c (thread_db_load_search): Likewise.
4475 (try_thread_db_load_1): Likewise.
4476 * tracepoint.c (add_tracepoint): Likewise.
4477 (add_tracepoint_action): Likewise.
4478 (create_trace_state_variable): Likewise.
4479 (cmd_qtdpsrc): Likewise.
4480 (cmd_qtro): Likewise.
4481 (add_while_stepping_state): Likewise.
4482 * win32-low.c (child_add_thread): Likewise.
4483 (get_image_name): Likewise.
4485 2015-08-25 Yao Qi <yao.qi@linaro.org>
4487 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4489 2015-08-25 Yao Qi <yao.qi@linaro.org>
4491 * Makefile.in (aarch64-linux.o): New rule.
4492 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4494 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4495 (aarch64_init_debug_reg_state): Make it extern.
4496 (aarch64_linux_prepare_to_resume): Remove.
4498 2015-08-25 Yao Qi <yao.qi@linaro.org>
4500 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4501 lwp_arch_private_info and ptid_of_lwp.
4503 2015-08-25 Yao Qi <yao.qi@linaro.org>
4505 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4506 Find proc_info by find_process_pid. All callers updated.
4508 2015-08-25 Yao Qi <yao.qi@linaro.org>
4510 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4512 (debug_reg_change_callback): Remove.
4513 (aarch64_notify_debug_reg_change): Remove.
4515 2015-08-25 Yao Qi <yao.qi@linaro.org>
4517 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4518 Call current_lwp_ptid.
4520 2015-08-25 Yao Qi <yao.qi@linaro.org>
4522 * linux-aarch64-low.c (debug_reg_change_callback): Use
4525 2015-08-25 Yao Qi <yao.qi@linaro.org>
4527 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4529 2015-08-25 Yao Qi <yao.qi@linaro.org>
4531 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4533 2015-08-25 Yao Qi <yao.qi@linaro.org>
4535 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4538 2015-08-25 Yao Qi <yao.qi@linaro.org>
4540 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4542 (debug_reg_change_callback): Remove argument entry and add argument
4543 lwp. Remove local variable thread. Don't print thread id in the
4544 debugging output. Don't check whether pid of thread equals to pid.
4545 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4546 iterate_over_lwps instead find_inferior.
4548 2015-08-24 Pedro Alves <palves@redhat.com>
4550 * inferiors.c (get_first_process): New function.
4551 * inferiors.h (get_first_process): New declaration.
4552 * remote-utils.c (read_ptid): Default to the first process in the
4553 list, instead of to the current thread's process.
4555 2015-08-24 Pedro Alves <palves@redhat.com>
4557 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4558 * event-loop.c: Likewise.
4559 * remote-utils.c: Likewise.
4560 * tracepoint.c: Likewise.
4562 2015-08-24 Pedro Alves <palves@redhat.com>
4564 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4567 2015-08-21 Pedro Alves <palves@redhat.com>
4569 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4570 instead of literal 1.
4572 2015-08-21 Pedro Alves <palves@redhat.com>
4574 * tdesc.c (default_description): Explicitly zero-initialize.
4576 2015-08-21 Pedro Alves <palves@redhat.com>
4579 * inferiors.c (remove_thread): Discard any pending stop reply for
4581 * server.c (remove_all_on_match_pid): Rename to ...
4582 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4584 (discard_queued_stop_replies): Change parameter to a ptid. Now
4586 (handle_v_kill, kill_inferior_callback, captured_main)
4587 (process_serial_event): Adjust.
4588 * server.h (discard_queued_stop_replies): Declare.
4590 2015-08-21 Pedro Alves <palves@redhat.com>
4592 * linux-low.c (wait_for_sigstop): Always switch to no thread
4593 selected if the previously current thread dies.
4594 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4595 process instead of the current thread's.
4596 * remote-utils.c (input_interrupt): Don't check if there's no
4598 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4599 current thread to the general thread fails, error out.
4600 (handle_qxfer_auxv, handle_qxfer_libraries)
4601 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4602 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4603 (handle_query): Check if there's a thread selected instead of
4604 checking whether there's any thread in the thread list.
4605 (handle_qxfer_threads, handle_qxfer_btrace)
4606 (handle_qxfer_btrace_conf): Don't error out early if there's no
4607 thread in the thread list.
4608 (handle_v_cont, myresume): Don't set the current thread to the
4610 (process_serial_event) <Hg handling>: Also set thread_id if the
4611 previous general thread is still alive.
4612 (process_serial_event) <g/G handling>: If setting the current
4613 thread to the general thread fails, error out.
4614 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4615 thread's lwp instead of the current thread's.
4616 * target.c (set_desired_thread): If the desired thread was not
4617 found, leave the current thread pointing to NULL. Return an int
4618 (boolean) indicating success.
4619 * target.h (set_desired_thread): Change return type to int.
4621 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4623 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4624 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4626 (ps_get_thread_area): New function.
4628 2015-08-19 Gary Benson <gbenson@redhat.com>
4630 * hostio.c (handle_pread): Do not attempt to read more data
4631 than hostio_reply_with_data can fit in a packet.
4633 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4635 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4637 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4639 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4641 2015-08-06 Pedro Alves <palves@redhat.com>
4643 * tracepoint.c (expr_eval_result): Now an int.
4645 2015-08-06 Pedro Alves <palves@redhat.com>
4647 * gdbthread.h (struct regcache): Forward declare.
4648 (struct thread_info) <regcache_data>: Now a struct regcache
4650 * inferiors.c (inferior_regcache_data)
4651 (set_inferior_regcache_data): Now work with struct regcache
4653 * inferiors.h (struct regcache): Forward declare.
4654 (inferior_regcache_data, set_inferior_regcache_data): Now work
4655 with struct regcache pointers.
4656 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4657 (free_register_cache_thread): Remove struct regcache pointer
4660 2015-08-06 Pedro Alves <palves@redhat.com>
4662 * server.c (captured_main): On error, print the exception message
4663 to stderr, and if run_once is set, throw a quit.
4665 2015-08-06 Pedro Alves <palves@redhat.com>
4667 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4670 2015-08-06 Pedro Alves <palves@redhat.com>
4672 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4673 reading beyond the passed in buffer length.
4675 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4677 * tracepoint.c (symbol_list) <required>: Remove.
4679 2015-08-06 Pedro Alves <palves@redhat.com>
4681 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4682 count if stopping and suspending threads.
4683 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4684 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4685 (linux_detach): Complete an ongoing step-over.
4686 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4688 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4689 (linux_wait_1): If passing a signal to the inferior after
4690 finishing a step-over, unsuspend and re-resume all lwps. If we
4691 see a single-step event but the thread should be continuing, don't
4692 pass the trap to gdb.
4693 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4694 internal_error instead of gdb_assert.
4695 (enqueue_pending_signal): New function.
4696 (check_ptrace_stopped_lwp_gone): Add debug output.
4697 (start_step_over): Use internal_error instead of gdb_assert.
4698 (complete_ongoing_step_over): New function.
4699 (linux_resume_one_thread): Don't resume a suspended thread.
4700 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4703 2015-08-06 Pedro Alves <palves@redhat.com>
4705 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4706 (linux_thread_alive): Use lwp_is_marked_dead.
4707 (extended_event_reported): Delete.
4708 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4709 instead of extended_event_reported.
4710 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4712 (lwp_is_marked_dead): New function.
4713 (lwp_running): Use lwp_is_marked_dead.
4714 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4717 2015-08-06 Pedro Alves <palves@redhat.com>
4719 * linux-low.c (linux_wait_1): Move fork event output out of the
4720 !report_to_gdb check. Pass event_child->waitstatus to
4721 target_waitstatus_to_string instead of ourstatus.
4723 2015-08-04 Yao Qi <yao.qi@linaro.org>
4725 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4726 if current_thread is 32 bit.
4728 2015-08-04 Yao Qi <yao.qi@linaro.org>
4730 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4731 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4732 * server.c (extended_protocol): Remove "static".
4733 * server.h (extended_protocol): Declare it.
4735 2015-08-04 Yao Qi <yao.qi@linaro.org>
4737 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4738 both aarch64 and aarch32.
4739 (aarch64_set_pc): Likewise.
4741 2015-08-04 Yao Qi <yao.qi@linaro.org>
4743 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4744 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4745 arm-with-neon.xml to srv_xmlfiles.
4746 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4747 (is_64bit_tdesc): New function.
4748 (aarch64_linux_read_description): New function.
4749 (aarch64_arch_setup): Call aarch64_linux_read_description.
4750 (regs_info): Rename to regs_info_aarch64.
4751 (aarch64_regs_info): Return right regs_info.
4752 (initialize_low_arch): Call initialize_low_arch_aarch32.
4754 2015-08-04 Yao Qi <yao.qi@linaro.org>
4756 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4757 * linux-aarch32-low.c: New file.
4758 * linux-aarch32-low.h: New file.
4759 * linux-arm-low.c (arm_fill_gregset): Move it to
4760 linux-aarch32-low.c.
4761 (arm_store_gregset): Likewise.
4762 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4763 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4764 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4765 (regs_info): Rename to regs_info_arm.
4766 (arm_regs_info): Return regs_info_aarch32 if
4767 have_ptrace_getregset is 1 and target description is
4768 arm_with_neon or arm_with_vfpv3.
4769 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4770 Call initialize_low_arch_aarch32 instead.
4772 2015-08-04 Yao Qi <yao.qi@linaro.org>
4774 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4775 * linux-low.c: ... here.
4776 * linux-low.h (have_ptrace_getregset): Declare it.
4778 2015-08-04 Pedro Alves <palves@redhat.com>
4780 * thread-db.c (struct thread_db): Use new typedefs.
4781 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4783 (disable_thread_event_reporting): Cast result of dlsym to
4784 destination function pointer type.
4785 (thread_db_mourn): Use td_ta_delete_ftype.
4787 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4789 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4791 (CDX_BREAKPOINT): Define for R2.
4792 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4793 (the_low_target): Add comments.
4795 2015-07-30 Yao Qi <yao.qi@linaro.org>
4797 * linux-arm-low.c (arm_hwcap): Remove it.
4798 (arm_read_description): New local variable arm_hwcap. Don't
4799 set arm_hwcap to zero.
4801 2015-07-30 Yao Qi <yao.qi@linaro.org>
4803 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4804 Use regcache->tdesc instead.
4805 (arm_store_wmmxregset): Likewise.
4806 (arm_fill_vfpregset): Likewise.
4807 (arm_store_vfpregset): Likewise.
4809 2015-07-30 Yao Qi <yao.qi@linaro.org>
4811 * linux-arm-low.c: Include arch/arm.h.
4812 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4813 (arm_store_gregset): Likewise.
4815 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4817 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4818 ptrace's 4th parameter.
4820 2015-07-27 Yao Qi <yao.qi@linaro.org>
4822 * configure.srv (case aarch64*-*-linux*): Don't set
4825 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4827 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4829 * linux-arm-low.c: Likewise.
4830 * linux-cris-low.c: Likewise.
4831 * linux-crisv32-low.c: Likewise.
4832 * linux-low.c: Likewise.
4833 * linux-m68k-low.c: Likewise.
4834 * linux-mips-low.c: Likewise.
4835 * linux-nios2-low.c: Likewise.
4836 * linux-s390-low.c: Likewise.
4837 * linux-sparc-low.c: Likewise.
4838 * linux-tic6x-low.c: Likewise.
4839 * linux-tile-low.c: Likewise.
4840 * linux-x86-low.c: Likewise.
4842 2015-07-24 Pedro Alves <palves@redhat.com>
4844 * config.in: Regenerate.
4845 * configure: Regenerate.
4847 2015-07-24 Pedro Alves <palves@redhat.com>
4849 * acinclude.m4: Include ../ptrace.m4.
4850 * configure.ac: Call GDB_AC_PTRACE.
4851 * config.in, configure: Regenerate.
4853 2015-07-24 Yao Qi <yao.qi@linaro.org>
4855 * linux-low.c (linux_create_inferior): Remove setting to
4856 proc->priv->new_inferior.
4857 (linux_attach): Likewise.
4858 (linux_low_filter_event): Likewise.
4859 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4861 2015-07-24 Yao Qi <yao.qi@linaro.org>
4863 * linux-low.c (linux_arch_setup): New function.
4864 (linux_low_filter_event): If proc->tdesc is NULL and
4865 proc->attached is true, call the_low_target.arch_setup.
4866 Otherwise, keep status pending, and return.
4867 (linux_resume_one_lwp_throw): Don't call get_pc if
4868 thread->while_stepping isn't NULL. Don't call
4869 get_thread_regcache if proc->tdesc is NULL.
4870 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4871 (linux_target_ops): Install arch_setup.
4872 * server.c (start_inferior): Call the_target->arch_setup.
4873 * target.h (struct target_ops) <arch_setup>: New field.
4874 (target_arch_setup): New marco.
4875 * lynx-low.c (lynx_target_ops): Update.
4876 * nto-low.c (nto_target_ops): Update.
4877 * spu-low.c (spu_target_ops): Update.
4878 * win32-low.c (win32_target_ops): Update.
4880 2015-07-24 Yao Qi <yao.qi@linaro.org>
4882 * linux-low.c (linux_add_process): Don't set
4883 proc->priv->new_inferior.
4884 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4885 (linux_attach): Likewise.
4887 2015-07-24 Yao Qi <yao.qi@linaro.org>
4889 * server.c (start_inferior): Code refactor.
4891 2015-07-24 Yao Qi <yao.qi@linaro.org>
4893 * server.c (process_serial_event): Set general_thread.
4895 2015-07-21 Yao Qi <yao.qi@linaro.org>
4897 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4898 aarch64_linux_get_debug_reg_capacity.
4900 2015-07-17 Yao Qi <yao.qi@linaro.org>
4902 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4903 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4904 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4905 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4906 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4907 (AARCH64_HWP_ALIGNMENT): Likewise.
4908 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4909 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4910 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4911 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4912 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4913 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4914 (struct aarch64_debug_reg_state): Likewise.
4915 (struct arch_lwp_info): Likewise.
4916 (aarch64_align_watchpoint): Likewise.
4917 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4918 (aarch64_watchpoint_length): Likewise.
4919 (aarch64_point_encode_ctrl_reg): Likewise
4920 (aarch64_point_is_aligned): Likewise.
4921 (aarch64_align_watchpoint): Likewise.
4922 (aarch64_linux_set_debug_regs):
4923 (aarch64_dr_state_insert_one_point): Likewise.
4924 (aarch64_dr_state_remove_one_point): Likewise.
4925 (aarch64_handle_breakpoint): Likewise.
4926 (aarch64_handle_aligned_watchpoint): Likewise.
4927 (aarch64_handle_unaligned_watchpoint): Likewise.
4928 (aarch64_handle_watchpoint): Likewise.
4930 2015-07-17 Yao Qi <yao.qi@linaro.org>
4932 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4933 and don't aarch64_get_debug_reg_state. All callers update.
4934 (aarch64_handle_aligned_watchpoint): Likewise.
4935 (aarch64_handle_unaligned_watchpoint): Likewise.
4936 (aarch64_handle_watchpoint): Likewise.
4937 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4938 (aarch64_remove_point): Likewise.
4940 2015-07-17 Yao Qi <yao.qi@linaro.org>
4942 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4944 (aarch64_handle_unaligned_watchpoint): Likewise.
4946 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4948 Revert the previous 3 commits:
4949 Move gdb_regex* to common/
4950 Move linux_find_memory_regions_full & co.
4951 gdbserver build-id attribute generator
4953 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4954 Jan Kratochvil <jan.kratochvil@redhat.com>
4956 gdbserver build-id attribute generator.
4957 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4958 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4959 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4961 (get_dynamic): Use find_pdhr to traverse program headers.
4962 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4963 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4964 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4965 (get_hex_build_id): New.
4966 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4967 to reply XML document.
4969 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4970 Jan Kratochvil <jan.kratochvil@redhat.com>
4972 * target.c: Include target/target-utils.h and fcntl.h.
4973 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4974 (target_fileio_read_stralloc): New functions.
4976 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4978 * Makefile.in (OBS): Add gdb_regex.o.
4980 * config.in: Rebuilt.
4981 * configure: Rebuilt.
4983 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4984 Jan Kratochvil <jan.kratochvil@redhat.com>
4986 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4987 * Makefile.in (OBS): Add target-utils.o.
4988 (linux-maps.o, target-utils.o): New.
4989 * configure.srv (srv_linux_obj): Add linux-maps.o.
4991 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4993 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4995 (the_low_target): Install it.
4997 2015-07-14 Pedro Alves <palves@redhat.com>
4999 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5000 Instead, ignore ECHILD, and throw an error for other errnos.
5002 2015-07-10 Pedro Alves <palves@redhat.com>
5004 * event-loop.c (struct callback_event) <data>: Change type to
5005 gdb_client_data instance instead of gdb_client_data pointer.
5006 (append_callback_event): Adjust.
5008 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5010 * linux-aarch64-low.c: Add comments for each linux_target_ops
5011 method. Remove comments already covered in target_ops and
5012 linux_target_ops definitions.
5013 (the_low_target): Add comments for each unimplemented method.
5015 2015-07-09 Yao Qi <yao.qi@linaro.org>
5017 * linux-aarch64-low.c (aarch64_regmap): Remove.
5018 (aarch64_usrregs_info): Remove.
5019 (regs_info): Set field usrregs to NULL.
5021 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5023 * linux-low.c: Include "rsp-low.h"
5024 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5025 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5026 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5027 (handle_btrace_enable_pt): New.
5028 (handle_btrace_general_set): Support "pt".
5029 (handle_btrace_conf_general_set): Support "pt:size".
5031 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5033 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5036 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5038 * linux-aarch64-low.c: Remove comment about endianness.
5039 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5040 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5043 2015-06-24 Gary Benson <gbenson@redhat.com>
5045 * linux-i386-ipa.c (stdint.h): Do not include.
5046 * lynx-i386-low.c (stdint.h): Likewise.
5047 * lynx-ppc-low.c (stdint.h): Likewise.
5048 * mem-break.c (stdint.h): Likewise.
5049 * thread-db.c (stdint.h): Likewise.
5050 * tracepoint.c (stdint.h): Likewise.
5051 * win32-low.c (stdint.h): Likewise.
5053 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5055 * server.c (write_qxfer_response): Update call to
5056 remote_escape_output.
5058 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5059 Jan Kratochvil <jan.kratochvil@redhat.com>
5061 Merge multiple hex conversions.
5062 * gdbreplay.c (tohex): Rename to 'fromhex'.
5063 (logchar): Use fromhex.
5065 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5067 * server.c (handle_qxfer_libraries): Set `version' attribute for
5070 2015-06-10 Gary Benson <gbenson@redhat.com>
5072 * target.h (struct target_ops) <multifs_open>: New field.
5073 <multifs_unlink>: Likewise.
5074 <multifs_readlink>: Likewise.
5075 * linux-low.c (nat/linux-namespaces.h): New include.
5076 (linux_target_ops): Initialize the_target->multifs_open,
5077 the_target->multifs_unlink and the_target->multifs_readlink.
5078 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5079 * hostio.c (hostio_fs_pid): New static variable.
5080 (hostio_handle_new_gdb_connection): New function.
5081 (handle_setfs): Likewise.
5082 (handle_open): Use the_target->multifs_open as appropriate.
5083 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5084 (handle_readlink): Use the_target->multifs_readlink as
5086 (handle_vFile): Handle vFile:setfs packets.
5087 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5088 after target_handle_new_gdb_connection.
5090 2015-06-10 Gary Benson <gbenson@redhat.com>
5092 * configure.ac (AC_CHECK_FUNCS): Add setns.
5093 * config.in: Regenerate.
5094 * configure: Likewise.
5095 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5096 (linux-namespaces.o): New rule.
5097 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5099 2015-06-09 Gary Benson <gbenson@redhat.com>
5101 * hostio.c (handle_open): Process mode argument with
5102 fileio_to_host_mode.
5104 2015-06-01 Yao Qi <yao.qi@linaro.org>
5106 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5107 * linux-x86-low.c: Likewise.
5109 2015-05-28 Don Breazeal <donb@codesourcery.com>
5111 * linux-low.c (handle_extended_wait): Initialize
5112 thread_info.last_resume_kind for new fork children.
5114 2015-05-15 Pedro Alves <palves@redhat.com>
5116 * target.h (target_handle_new_gdb_connection): Rewrite using if
5117 wrapped in do/while.
5119 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5121 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5122 * configure, config.in: Regenerate.
5123 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5126 2015-05-12 Don Breazeal <donb@codesourcery.com>
5128 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5129 PTRACE_EVENT_VFORK_DONE.
5130 (linux_low_ptrace_options, extended_event_reported): Add vfork
5132 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5133 and "vforkdone" for RSP 'T' Stop Reply Packet.
5134 * server.h (report_vfork_events): Declare
5137 2015-05-12 Don Breazeal <donb@codesourcery.com>
5139 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5140 (the_low_target) <new_fork>: Initialize new member.
5141 * linux-arm-low.c (arm_new_fork): New function.
5142 (the_low_target) <new_fork>: Initialize new member.
5143 * linux-low.c (handle_extended_wait): Call new target function
5145 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5146 * linux-mips-low.c (mips_add_watchpoint): New function
5147 extracted from mips_insert_point.
5148 (the_low_target) <new_fork>: Initialize new member.
5149 (mips_linux_new_fork): New function.
5150 (mips_insert_point): Call mips_add_watchpoint.
5151 * linux-x86-low.c (x86_linux_new_fork): New function.
5152 (the_low_target) <new_fork>: Initialize new member.
5154 2015-05-12 Don Breazeal <donb@codesourcery.com>
5156 * linux-low.c (handle_extended_wait): Implement return value,
5157 rename argument 'event_child' to 'event_lwp', handle
5158 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5159 (linux_low_ptrace_options): New function.
5160 (linux_low_filter_event): Call linux_low_ptrace_options,
5161 use different argument fo linux_enable_event_reporting,
5162 use return value from handle_extended_wait.
5163 (extended_event_reported): New function.
5164 (linux_wait_1): Call extended_event_reported and set
5165 status to report fork events.
5166 (linux_write_memory): Add pid to debug message.
5167 (reset_lwp_ptrace_options_callback): New function.
5168 (linux_handle_new_gdb_connection): New function.
5169 (linux_target_ops): Initialize new structure member.
5170 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5171 * lynx-low.c: Initialize new structure member.
5172 * remote-utils.c (prepare_resume_reply): Implement stop reason
5173 "fork" for "T" stop message.
5174 * server.c (handle_query): Call handle_new_gdb_connection.
5175 * server.h (report_fork_events): Declare global flag.
5176 * target.h (struct target_ops) <handle_new_gdb_connection>:
5178 (target_handle_new_gdb_connection): New macro.
5179 * win32-low.c: Initialize new structure member.
5181 2015-05-12 Don Breazeal <donb@codesourcery.com>
5183 * mem-break.c (APPEND_TO_LIST): Define macro.
5184 (clone_agent_expr): New function.
5185 (clone_one_breakpoint): New function.
5186 (clone_all_breakpoints): New function.
5187 * mem-break.h: Declare new functions.
5189 2015-05-12 Don Breazeal <donb@codesourcery.com>
5191 * linux-low.c (linux_supports_fork_events): New function.
5192 (linux_supports_vfork_events): New function.
5193 (linux_target_ops): Initialize new structure members.
5194 (initialize_low): Call linux_check_ptrace_features.
5195 * lynx-low.c (lynx_target_ops): Initialize new structure
5197 * server.c (report_fork_events, report_vfork_events):
5199 (handle_query): Add new features to qSupported packet and
5201 (captured_main): Initialize new global variables.
5202 * target.h (struct target_ops) <supports_fork_events>:
5204 <supports_vfork_events>: New member.
5205 (target_supports_fork_events): New macro.
5206 (target_supports_vfork_events): New macro.
5207 * win32-low.c (win32_target_ops): Initialize new structure
5210 2015-05-12 Gary Benson <gbenson@redhat.com>
5212 * server.c (handle_qxfer_exec_file): Use current process
5215 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5217 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5218 Remove HAVE_PTRACE_GETREGS conditionals.
5219 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5220 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5222 2015-05-08 Yao Qi <yao.qi@linaro.org>
5224 * linux-low.c (linux_supports_conditional_breakpoints): New
5226 (linux_target_ops): Install new target method.
5227 * lynx-low.c (lynx_target_ops): Install NULL hook for
5228 supports_conditional_breakpoints.
5229 * nto-low.c (nto_target_ops): Likewise.
5230 * spu-low.c (spu_target_ops): Likewise.
5231 * win32-low.c (win32_target_ops): Likewise.
5232 * server.c (handle_query): Check
5233 target_supports_conditional_breakpoints.
5234 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5236 (target_supports_conditional_breakpoints): New macro.
5238 2015-05-06 Pedro Alves <palves@redhat.com>
5241 * server.c (start_inferior): If the process exits, mourn it.
5243 2015-04-21 Gary Benson <gbenson@redhat.com>
5245 * hostio.c (fileio_open_flags_to_host): Factored out to
5246 fileio_to_host_openflags in common/fileio.c. Single use
5249 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5251 * linux-xtensa-low.c (xtensa_fill_gregset)
5252 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5255 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5257 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5258 (regs_info): Replace usrregs pointer with NULL.
5260 2015-04-17 Gary Benson <gbenson@redhat.com>
5262 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5263 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5264 * server.c (handle_qxfer_exec_file): New function.
5265 (qxfer_packets): Add exec-file entry.
5266 (handle_query): Report qXfer:exec-file:read as supported packet.
5268 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5270 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5272 2015-04-09 Gary Benson <gbenson@redhat.com>
5274 * hostio-errno.c (errno_to_fileio_error): Remove function.
5275 Update caller to use remote_fileio_to_fio_error.
5277 2015-04-09 Yao Qi <yao.qi@linaro.org>
5279 * linux-low.c (linux_insert_point): Call
5280 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5281 (linux_remove_point): Call remove_memory_breakpoint if type is
5283 * linux-x86-low.c (x86_insert_point): Don't call
5284 insert_memory_breakpoint.
5285 (x86_remove_point): Don't call remove_memory_breakpoint.
5287 2015-04-01 Pedro Alves <palves@redhat.com>
5288 Cleber Rosa <crosa@redhat.com>
5290 * server.c (gdbserver_usage): Reorganize and extend the usage
5293 2015-03-24 Pedro Alves <palves@redhat.com>
5295 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5296 output. Also dump TRAP_TRACE.
5297 (linux_low_filter_event): In debug output, distinguish a
5298 resume_stop SIGSTOP from a delayed SIGSTOP.
5300 2015-03-24 Gary Benson <gbenson@redhat.com>
5302 * linux-x86-low.c (x86_linux_new_thread): Moved to
5304 (x86_linux_prepare_to_resume): Likewise.
5306 2015-03-24 Gary Benson <gbenson@redhat.com>
5308 * Makefile.in (x86-linux-dregs.o): New rule.
5309 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5310 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5311 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5312 (x86_linux_dr_get): Likewise.
5313 (x86_linux_dr_set): Likewise.
5314 (update_debug_registers_callback): Likewise.
5315 (x86_linux_dr_set_addr): Likewise.
5316 (x86_linux_dr_get_addr): Likewise.
5317 (x86_linux_dr_set_control): Likewise.
5318 (x86_linux_dr_get_control): Likewise.
5319 (x86_linux_dr_get_status): Likewise.
5320 (x86_linux_update_debug_registers): Likewise.
5322 2015-03-24 Gary Benson <gbenson@redhat.com>
5324 * linux-x86-low.c (x86_linux_update_debug_registers):
5325 New function, factored out from...
5326 (x86_linux_prepare_to_resume): ...this.
5328 2015-03-24 Gary Benson <gbenson@redhat.com>
5330 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5331 (x86_linux_dr_set): Likewise.
5332 (update_debug_registers_callback): Likewise.
5333 (x86_linux_dr_set_addr): Likewise.
5334 (x86_linux_dr_get_addr): Likewise.
5335 (x86_linux_dr_set_control): Likewise.
5336 (x86_linux_dr_get_control): Likewise.
5337 (x86_linux_dr_get_status): Likewise.
5338 (x86_linux_prepare_to_resume): Likewise.
5340 2015-03-24 Gary Benson <gbenson@redhat.com>
5342 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5343 Use perror_with_name. Pass string through gettext.
5344 (x86_linux_dr_set): Likewise.
5346 2015-03-24 Gary Benson <gbenson@redhat.com>
5348 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5349 (x86_linux_dr_set_addr): ...this.
5350 (x86_dr_low_get_addr): Rename to...
5351 (x86_linux_dr_get_addr): ...this.
5352 (x86_dr_low_set_control): Rename to...
5353 (x86_linux_dr_set_control): ...this.
5354 (x86_dr_low_get_control): Rename to...
5355 (x86_linux_dr_get_control): ...this.
5356 (x86_dr_low_get_status): Rename to...
5357 (x86_linux_dr_get_status): ...this.
5358 (x86_dr_low): Update with new function names.
5360 2015-03-24 Gary Benson <gbenson@redhat.com>
5362 * Makefile.in (x86-linux.o): New rule.
5363 * configure.srv: Add x86-linux.o to relevant targets.
5364 * linux-low.c (lwp_set_arch_private_info): New function.
5365 (lwp_arch_private_info): Likewise.
5366 * linux-x86-low.c: Include nat/x86-linux.h.
5367 (arch_lwp_info): Removed structure.
5368 (update_debug_registers_callback):
5369 Use lwp_set_debug_registers_changed.
5370 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5371 and lwp_set_debug_registers_changed.
5372 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5374 2015-03-24 Gary Benson <gbenson@redhat.com>
5376 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5377 * linux-arm-low.c (arm_new_thread): Likewise.
5378 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5379 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5380 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5381 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5383 2015-03-24 Gary Benson <gbenson@redhat.com>
5385 * linux-low.c (ptid_of_lwp): New function.
5386 (lwp_is_stopped): Likewise.
5387 (lwp_stop_reason): Likewise.
5388 * linux-x86-low.c (update_debug_registers_callback):
5390 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5393 2015-03-24 Gary Benson <gbenson@redhat.com>
5395 * linux-low.h (linux_stop_lwp): Remove declaration.
5397 2015-03-24 Gary Benson <gbenson@redhat.com>
5399 * linux-low.h: Include nat/linux-nat.h.
5400 * linux-low.c (iterate_over_lwps_args): New structure.
5401 (iterate_over_lwps_filter): New function.
5402 (iterate_over_lwps): Likewise.
5403 * linux-x86-low.c (update_debug_registers_callback):
5404 Update signature to what iterate_over_lwps expects.
5405 Remove PID check that iterate_over_lwps now performs.
5406 (x86_dr_low_set_addr): Use iterate_over_lwps.
5407 (x86_dr_low_set_control): Likewise.
5409 2015-03-24 Gary Benson <gbenson@redhat.com>
5411 * linux-x86-low.c (x86_debug_reg_state): New function.
5412 (x86_linux_prepare_to_resume): Use the above.
5414 2015-03-24 Gary Benson <gbenson@redhat.com>
5416 * linux-low.c (current_lwp_ptid): New function.
5417 * linux-x86-low.c: Include nat/linux-nat.h.
5418 (x86_dr_low_get_addr): Use current_lwp_ptid.
5419 (x86_dr_low_get_control): Likewise.
5420 (x86_dr_low_get_status): Likewise.
5422 2015-03-20 Pedro Alves <palves@redhat.com>
5424 * tracepoint.c (cmd_qtstatus): Make "str" const.
5426 2015-03-20 Pedro Alves <palves@redhat.com>
5428 * server.c (handle_general_set): Make "req_str" const.
5430 2015-03-19 Pedro Alves <palves@redhat.com>
5432 * linux-low.c (linux_resume_one_lwp): Rename to ...
5433 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5434 instead call perror_with_name.
5435 (check_ptrace_stopped_lwp_gone): New function.
5436 (linux_resume_one_lwp): Reimplement as wrapper around
5437 linux_resume_one_lwp_throw that swallows errors if the LWP is
5440 2015-03-19 Pedro Alves <palves@redhat.com>
5442 * linux-low.c (count_events_callback, select_event_lwp_callback):
5443 No longer check whether the thread has resume_stop as last resume
5446 2015-03-19 Pedro Alves <palves@redhat.com>
5448 * linux-low.c (count_events_callback, select_event_lwp_callback):
5449 Use the lwp's status_pending_p field, not the thread's.
5451 2015-03-19 Pedro Alves <palves@redhat.com>
5453 * linux-low.c (select_event_lwp_callback): Update comments to
5454 no longer mention SIGTRAP.
5456 2015-03-18 Gary Benson <gbenson@redhat.com>
5458 * server.c (handle_query): Do not report vFile:fstat as supported.
5460 2015-03-11 Gary Benson <gbenson@redhat.com>
5462 * hostio.c (sys/types.h): New include.
5463 (sys/stat.h): Likewise.
5464 (common-remote-fileio.h): Likewise.
5465 (handle_fstat): New function.
5466 (handle_vFile): Handle vFile:fstat packets.
5468 2015-03-11 Gary Benson <gbenson@redhat.com>
5470 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5471 struct stat.st_blocks and struct stat.st_blksize.
5472 * configure: Regenerate.
5473 * config.in: Likewise.
5474 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5475 (OBS): Add common-remote-fileio.o.
5476 (common-remote-fileio.o): New rule.
5478 2015-03-09 Pedro Alves <palves@redhat.com>
5480 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5481 'struct sockaddr' pointer in 'accept' call.
5483 2015-03-09 Pedro Alves <palves@redhat.com>
5486 2015-03-07 Pedro Alves <palves@redhat.com>
5487 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5488 or <winsock2.h> here. Instead include "gdb_socket.h".
5489 (remote_open): Use union gdb_sockaddr_u.
5490 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5491 or <winsock2.h> here. Instead include "gdb_socket.h".
5492 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5493 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5495 (init_named_socket, gdb_agent_helper_thread): Use union
5498 2015-03-07 Pedro Alves <palves@redhat.com>
5500 * configure.ac (build_warnings): Move
5501 -Wdeclaration-after-statement to the C-specific set.
5502 * configure: Regenerate.
5504 2015-03-07 Pedro Alves <palves@redhat.com>
5506 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5507 or <winsock2.h> here. Instead include "gdb_socket.h".
5508 (remote_open): Use union gdb_sockaddr_u.
5509 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5510 or <winsock2.h> here. Instead include "gdb_socket.h".
5511 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5512 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5514 (init_named_socket, gdb_agent_helper_thread): Use union
5517 2015-03-07 Pedro Alves <palves@redhat.com>
5519 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5522 2015-03-06 Yao Qi <yao.qi@linaro.org>
5524 * linux-aarch64-low.c (aarch64_insert_point): Use
5525 show_debug_regs as a boolean.
5526 (aarch64_remove_point): Likewise.
5528 2015-03-05 Pedro Alves <palves@redhat.com>
5530 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5531 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5532 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5533 * nto-low.c (nto_target_ops): Likewise.
5534 * spu-low.c (spu_target_ops): Likewise.
5535 * win32-low.c (win32_target_ops): Likewise.
5537 2015-03-04 Pedro Alves <palves@redhat.com>
5539 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5540 Decide whether a breakpoint triggered based on the SIGTRAP's
5542 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5543 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5544 (linux_low_filter_event): Check for breakpoints before checking
5546 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5548 (linux_stopped_by_sw_breakpoint)
5549 (linux_supports_stopped_by_sw_breakpoint)
5550 (linux_stopped_by_hw_breakpoint)
5551 (linux_supports_stopped_by_hw_breakpoint): New functions.
5552 (linux_target_ops): Install new target methods.
5554 2015-03-04 Pedro Alves <palves@redhat.com>
5556 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5557 * server.c (swbreak_feature, hwbreak_feature): New globals.
5558 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5559 (captured_main): Clear swbreak_feature and hwbreak_feature.
5560 * server.h (swbreak_feature, hwbreak_feature): Declare.
5561 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5562 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5563 supports_stopped_by_hw_breakpoint>: New fields.
5564 (target_supports_stopped_by_sw_breakpoint)
5565 (target_stopped_by_sw_breakpoint)
5566 (target_supports_stopped_by_hw_breakpoint)
5567 (target_stopped_by_hw_breakpoint): Declare.
5569 2015-03-04 Pedro Alves <palves@redhat.com>
5571 enum lwp_stop_reason -> enum target_stop_reason
5572 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5573 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5574 (linux_wait_1, stuck_in_jump_pad_callback)
5575 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5576 (linux_stopped_by_watchpoint):
5577 * linux-low.h (enum lwp_stop_reason): Delete.
5578 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5579 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5581 2015-03-04 Yao Qi <yao.qi@linaro.org>
5583 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5585 2015-03-03 Gary Benson <gbenson@redhat.com>
5587 * hostio.c (handle_vFile): Fix prefix lengths.
5589 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5591 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5594 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5596 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5597 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5598 (clean): Add "rm -f" for above C files.
5599 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5600 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5601 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5602 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5603 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5604 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5605 (init_registers_s390x_vx_linux64)
5606 (init_registers_s390x_tevx_linux64)
5607 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5608 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5610 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5611 (s390_store_vxrs_high): New functions.
5612 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5614 (s390_arch_setup): Add logic for selecting one of the new target
5615 descriptions. Activate the new vector regsets if applicable.
5616 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5617 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5618 and init_registers_s390x_tevx_linux64.
5620 2015-03-01 Pedro Alves <palves@redhat.com>
5622 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5625 2015-02-27 Pedro Alves <palves@redhat.com>
5627 * linux-x86-low.c (u_debugreg_offset): New function.
5628 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5630 2015-02-27 Pedro Alves <palves@redhat.com>
5632 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5633 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5634 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5635 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5636 (ps_lsetfpregs, ps_getpid)
5637 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5638 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5639 (ps_lsetxregs, ps_plog): Declare.
5641 2015-02-27 Pedro Alves <palves@redhat.com>
5643 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5644 IP_AGENT_EXPORT_FUNC.
5645 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5646 IP_AGENT_EXPORT_FUNC.
5647 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5648 (IP_AGENT_EXPORT): Delete.
5649 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5650 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5651 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5652 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5653 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5654 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5655 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5656 (traceframe_read_count, traceframe_write_count)
5657 (traceframes_created, trace_state_variables, get_raw_reg)
5658 (get_trace_state_variable_value, set_trace_state_variable_value)
5659 (ust_loaded, helper_thread_id, cmd_buf): Use
5660 IPA_SYM_EXPORTED_NAME.
5661 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5662 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5663 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5664 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5665 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5666 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5667 EXTERN_C_PUSH/EXTERN_C_POP.
5668 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5669 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5670 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5671 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5672 (traceframe_write_count, traceframe_read_count)
5673 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5674 (about_to_request_buffer_space, get_trace_state_variable_value)
5675 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5676 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5677 EXTERN_C_PUSH/EXTERN_C_POP.
5678 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5679 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5680 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5681 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5682 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5683 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5684 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5685 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5687 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5688 (IP_AGENT_EXPORT_VAR_DECL): Define.
5690 (gdb_agent_get_raw_reg): Declare.
5692 2015-02-27 Tom Tromey <tromey@redhat.com>
5693 Pedro Alves <palves@redhat.com>
5695 Rename symbols whose names are reserved C++ keywords throughout.
5697 2015-02-27 Pedro Alves <palves@redhat.com>
5699 * Makefile.in (COMPILER): New, get it from autoconf.
5700 (CXX): Get from autoconf instead.
5701 (COMPILE.pre): Use COMPILER.
5702 (CC-LD): Rename to ...
5703 (CC_LD): ... this. Use COMPILER.
5704 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5705 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5706 * acinclude.m4: Include build-with-cxx.m4.
5707 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5708 Disable -Werror by default if building in C++ mode.
5709 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5710 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5711 the C++ compiler. Save/restore CXXFLAGS too.
5712 * configure: Regenerate.
5714 2015-02-27 Pedro Alves <palves@redhat.com>
5716 * acinclude.m4: Include libiberty.m4.
5717 * configure.ac: Call libiberty_INIT.
5718 * config.in, configure: Regenerate.
5720 2015-02-26 Pedro Alves <palves@redhat.com>
5722 * linux-low.c (linux_wait_1): When incrementing the PC past a
5723 program breakpoint always use the_low_target.breakpoint_len as
5724 increment, rather than the maximum between that and
5725 the_low_target.decr_pc_after_break.
5727 2015-02-23 Pedro Alves <palves@redhat.com>
5729 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5730 thread was doing a step-over; always adjust the PC if
5731 we stepped over a permanent breakpoint.
5732 (linux_wait_1): If we stepped over breakpoint that was on top of a
5733 permanent breakpoint, manually advance the PC past it.
5735 2015-02-23 Pedro Alves <palves@redhat.com>
5737 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5739 (x86_fill_gregset, x86_store_gregset): Use it when handling
5742 2015-02-20 Pedro Alves <palves@redhat.com>
5744 * thread-db.c: Include "nat/linux-procfs.h".
5745 (thread_db_init): Skip listing new threads if the kernel supports
5746 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5748 2015-02-20 Pedro Alves <palves@redhat.com>
5750 * linux-low.c (status_pending_p_callback): Use ptid_match.
5752 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5754 PR breakpoints/16812
5755 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5756 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5757 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5759 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5761 PR breakpoints/15956
5762 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5764 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5766 * linux-low.c (linux_low_btrace_conf): Print size.
5767 * server.c (handle_btrace_conf_general_set): New.
5768 (hanle_general_set): Call handle_btrace_conf_general_set.
5769 (handle_query): Report Qbtrace-conf:bts:size as supported.
5771 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5773 * linux-low.c (linux_low_enable_btrace): Update parameters.
5774 (linux_low_btrace_conf): New.
5775 (linux_target_ops)<to_btrace_conf>: Initialize.
5776 * server.c (current_btrace_conf): New.
5777 (handle_btrace_enable): Rename to ...
5778 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
5779 to target_enable_btrace. Update comment. Update users.
5780 (handle_qxfer_btrace_conf): New.
5781 (qxfer_packets): Add btrace-conf entry.
5782 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5783 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5784 (target_ops)<read_btrace_conf>: New.
5785 (target_enable_btrace): Update parameters.
5786 (target_read_btrace_conf): New.
5788 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5790 * server.c (handle_btrace_general_set): Remove call to
5791 target_supports_btrace.
5792 (supported_btrace_packets): New.
5793 (handle_query): Call supported_btrace_packets.
5794 * target.h: include btrace-common.h.
5795 (btrace_target_info): Removed.
5796 (supports_btrace, target_supports_btrace): Update parameters.
5798 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5800 * Makefile.in (SFILES): Add common/btrace-common.c.
5801 (OBS): Add common/btrace-common.o.
5802 (btrace-common.o): Add build rules.
5803 * linux-low: Include btrace-common.h.
5804 (linux_low_read_btrace): Use struct btrace_data. Call
5805 btrace_data_init and btrace_data_fini.
5807 2015-02-06 Pedro Alves <palves@redhat.com>
5809 * thread-db.c (find_new_threads_callback): Add debug output.
5811 2015-02-04 Pedro Alves <palves@redhat.com>
5813 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5814 (resume_stopped_resumed_lwps): New function.
5815 (linux_wait_for_event_filtered): Use it.
5817 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5819 * Makefile.in (SFILES): Add linux-personality.c.
5820 (linux-personality.o): New rule.
5821 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5822 list of objects to be built.
5823 * linux-low.c: Include nat/linux-personality.h.
5824 (linux_create_inferior): Remove code to disable address space
5825 randomization (moved to ../nat/linux-personality.c). Create
5826 cleanup to disable address space randomization.
5828 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5830 * Makefile.in (posix-strerror.o): New rule.
5831 (mingw-strerror.o): Likewise.
5832 * configure: Regenerated.
5833 * configure.ac: Source file ../common/common.host. Initialize new
5834 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5836 2015-01-14 Yao Qi <yao@codesourcery.com>
5838 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5839 (ppc-linux.o): New rule.
5840 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5841 * configure.ac: AC_CHECK_FUNCS(getauxval).
5842 * config.in: Re-generated.
5843 * configure: Re-generated.
5844 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5845 ppc64_64bit_inferior_p
5847 2015-01-14 Yao Qi <yao@codesourcery.com>
5849 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5850 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5851 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5852 (PT_ORIG_R3, PT_TRAP): Likewise.
5853 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5854 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5855 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5857 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5859 * i387-fp.c (i387_cache_to_xsave): In look over
5860 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5861 zmmh_low_space field by use of zmmh_high_space.
5863 2015-01-09 Pedro Alves <palves@redhat.com>
5865 * linux-low.c (step_over_bkpt): Move higher up in the file.
5866 (handle_extended_wait): Don't store the stop_pc here.
5867 (get_stop_pc): Adjust comments and rename to ...
5868 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5869 stopped for a software breakpoint or hardware breakpoint.
5870 (thread_still_has_status_pending_p): New function.
5871 (status_pending_p_callback): Use
5872 thread_still_has_status_pending_p. If the event is no longer
5873 interesting, resume the LWP.
5874 (handle_tracepoints): Add assert.
5875 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5876 (wstatus_maybe_breakpoint): New function.
5877 (cancel_breakpoint): Delete function.
5878 (check_stopped_by_watchpoint): New function, factored out from
5879 linux_low_filter_event.
5880 (lp_status_maybe_breakpoint): Delete function.
5881 (linux_low_filter_event): Remove filter_ptid argument.
5882 Leave thread group exits pending here. Store the LWP's stop PC.
5883 Always leave events pending.
5884 (linux_wait_for_event_filtered): Pull all events out of the
5885 kernel, and leave them all pending.
5886 (count_events_callback, select_event_lwp_callback): Consider all
5888 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5889 (select_event_lwp): Only give preference to the stepping LWP in
5890 all-stop mode. Adjust comments.
5891 (ignore_event): New function.
5892 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5893 references to cancel_breakpoints. Adjust to renames. Also give
5894 equal priority to all LWPs that have had events in non-stop mode.
5895 If reporting a software breakpoint event, unadjust the LWP's PC.
5896 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5897 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5899 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5900 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5901 (linux_stopped_by_watchpoint): Adjust.
5902 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5903 * linux-low.h (enum lwp_stop_reason): New.
5904 (struct lwp_info) <stop_pc>: Adjust comment.
5905 <stopped_by_watchpoint>: Delete field.
5906 <stop_reason>: New field.
5907 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5908 * mem-break.c (software_breakpoint_inserted_here)
5909 (hardware_breakpoint_inserted_here): New function.
5910 * mem-break.h (software_breakpoint_inserted_here)
5911 (hardware_breakpoint_inserted_here): Declare.
5912 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5913 (cancel_breakpoints): Delete.
5914 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5915 (upload_fast_traceframes): Remove references to
5918 2015-01-09 Pedro Alves <palves@redhat.com>
5920 * thread-db.c (find_new_threads_callback): Ignore thread if the
5921 kernel thread ID is -1.
5923 2015-01-09 Pedro Alves <palves@redhat.com>
5925 * linux-low.c (linux_attach_fail_reason_string): Move to
5926 nat/linux-ptrace.c, and rename.
5927 (linux_attach_lwp): Update comment.
5928 (attach_proc_task_lwp_callback): New function.
5929 (linux_attach): Adjust to rename and use
5930 linux_proc_attach_tgid_threads.
5931 (linux_attach_fail_reason_string): Delete declaration.
5933 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5935 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5936 * server.c (gdbserver_version): Likewise.
5938 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5940 * remote-utils.c: Include ctype.h.
5941 (input_interrupt): Explicitly handle the case when the char
5942 received is the NUL byte. Improve the printing of non-ASCII
5945 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5947 * linux-low.c (linux_low_filter_event): Update call to
5948 linux_enable_event_reporting following the addition of
5949 a new parameter to that function.
5951 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5954 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5955 (AARCH64_FPCR_REGNO): Likewise.
5956 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5957 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5958 (aarch64_store_fpregset): Likewise.
5960 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5962 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5963 Remove FIXME comment about assumption about N.
5965 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5967 * configure.ac: If large-file support is disabled in GDBserver,
5968 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5969 * configure: Regenerate.
5971 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5973 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5974 warning upon ENODATA from ptrace.
5975 * linux-s390-low.c (s390_store_tdb): New.
5976 (s390_regsets): Add regset for NT_S390_TDB.
5978 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5980 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5981 without a fill_function.
5982 * linux-s390-low.c (s390_fill_last_break): Remove.
5983 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5984 (s390_arch_setup): Use regset's size instead of fill_function for
5987 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5989 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5990 the regset's store function when ptrace returned an error.
5991 * regcache.c (get_thread_regcache): Invalidate register cache
5992 before fetching inferior's registers.
5994 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5996 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5997 while-loop as for-loop.
5998 (regsets_store_inferior_registers): Likewise.
6000 2014-11-28 Yao Qi <yao@codesourcery.com>
6002 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6003 * config.in, configure: Re-generate.
6004 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6007 2014-11-21 Yao Qi <yao@codesourcery.com>
6009 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6010 (AC_CHECK_HEADERS): Remove malloc.h.
6011 * configure: Re-generated.
6012 * config.in: Re-generated.
6013 * server.h: Don't include alloca.h and malloc.h.
6014 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6015 Don't include malloc.h.
6017 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6019 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6020 corresponding ERRNO check in same block.
6022 2014-11-12 Pedro Alves <palves@redhat.com>
6024 * server.c (cont_thread): Update comment.
6025 (start_inferior, attach_inferior): No longer clear cont_thread.
6026 (handle_v_cont): No longer set cont_thread.
6027 (captured_main): Clear cont_thread each time a GDB connects.
6029 2014-11-12 Pedro Alves <palves@redhat.com>
6031 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6032 thread, and don't resume all threads if the Hc thread has exited.
6034 2014-11-12 Pedro Alves <palves@redhat.com>
6036 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6037 the process group instead of to a specific LWP.
6039 2014-10-15 Pedro Alves <palves@redhat.com>
6042 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6044 (arm_set_thread_context): Delete.
6045 (the_low_target): Adjust.
6046 * win32-i386-low.c (debug_registers_changed)
6047 (debug_registers_used): Delete.
6048 (update_debug_registers_callback): New function.
6049 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6050 needing to update their debug registers.
6051 (win32_get_current_dr): New function.
6052 (x86_dr_low_get_addr, x86_dr_low_get_control)
6053 (x86_dr_low_get_status): Fetch the debug register from the thread
6055 (i386_initial_stuff): Adjust.
6056 (i386_get_thread_context): Remove current_event parameter. Don't
6057 clear debug_registers_changed nor copy DR values to
6059 (i386_set_thread_context): Delete.
6060 (i386_prepare_to_resume): New function.
6061 (i386_thread_added): Mark the thread as needing to update irs
6063 (the_low_target): Remove i386_set_thread_context and install
6064 i386_prepare_to_resume.
6065 * win32-low.c (win32_get_thread_context): Adjust.
6066 (win32_set_thread_context): Use SetThreadContext
6068 (win32_prepare_to_resume): New function.
6069 (win32_require_context): New function, factored out from ...
6070 (thread_rec): ... this.
6071 (continue_one_thread): Call win32_prepare_to_resume on each thread
6072 we're about to continue.
6073 (win32_resume): Call win32_prepare_to_resume on the event thread.
6074 * win32-low.h (struct win32_thread_info)
6075 <debug_registers_changed>: New field.
6076 (struct win32_target_ops): Change prototype of set_thread_context,
6077 delete set_thread_context and add prepare_to_resume.
6078 (win32_require_context): New declaration.
6080 2014-10-08 Gary Benson <gbenson@redhat.com>
6082 * server.h: Do not include common-exceptions.h.
6084 2014-10-08 Gary Benson <gbenson@redhat.com>
6086 * server.h: Do not include cleanups.h.
6088 2014-09-30 James Hogan <james.hogan@imgtec.com>
6090 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6093 2014-09-23 Yao Qi <yao@codesourcery.com>
6095 * linux-low.c (lp_status_maybe_breakpoint): New function.
6096 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6097 (count_events_callback): Likewise.
6098 (select_event_lwp_callback): Likewise.
6099 (cancel_breakpoints_callback): Likewise.
6101 2014-09-19 Don Breazeal <donb@codesourcery.com>
6103 * linux-low.c (handle_extended_wait): Call
6104 linux_ptrace_get_extended_event.
6105 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6106 linux_is_extended_waitstatus.
6108 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6110 * Makefile.in (CPPFLAGS): Define.
6111 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6112 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6114 2014-09-16 Gary Benson <gbenson@redhat.com>
6116 * inferiors.h (current_inferior): Renamed as...
6117 (current_thread): New variable. All uses updated.
6118 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6119 (maybe_move_out_of_jump_pad): Likewise.
6120 (cancel_breakpoint): Likewise.
6121 (linux_low_filter_event): Likewise.
6122 (wait_for_sigstop): Likewise.
6123 (linux_resume_one_lwp): Likewise.
6124 (need_step_over_p): Likewise.
6125 (start_step_over): Likewise.
6126 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6127 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6128 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6129 and save_inferior as saved_thread.
6130 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6132 (regcache_invalidate_thread): Likewise.
6133 * remote-utils.c (prepare_resume_reply): Likewise.
6134 * thread-db.c (thread_db_get_tls_address): Likewise.
6135 (disable_thread_event_reporting): Likewise.
6136 (remove_thread_event_breakpoints): Likewise.
6137 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6139 * target.h (set_desired_inferior): Renamed as...
6140 (set_desired_thread): New declaration. All uses updated.
6141 * server.c (myresume): Updated comment to reference thread instead
6143 (handle_serial_event): Likewise.
6144 (handle_target_event): Likewise.
6146 2014-09-12 Tom Tromey <tromey@redhat.com>
6147 Gary Benson <gbenson@redhat.com>
6149 * regcache.h: Include common-regcache.h.
6150 (regcache_read_pc): Don't declare.
6151 * regcache.c (get_thread_regcache_for_ptid): New function.
6153 2014-09-11 Tom Tromey <tromey@redhat.com>
6154 Gary Benson <gbenson@redhat.com>
6156 * symbol.c: New file.
6157 * Makefile.in (SFILES): Add symbol.c.
6158 (OBS): Add symbol.o.
6160 2014-09-11 Gary Benson <gbenson@redhat.com>
6162 * target.c (target_stop_ptid, target_continue_ptid): New
6165 2014-09-11 Tom Tromey <tromey@redhat.com>
6166 Gary Benson <gbenson@redhat.com>
6168 * target.h: Include target/target.h.
6169 * target.c (target_read_memory, target_read_uint32)
6170 (target_write_memory): New functions.
6172 2014-09-11 Gary Benson <gbenson@redhat.com>
6174 * server.h (debug_hw_points): Don't declare.
6175 * server.c (debug_hw_points): Don't define. Replace all uses
6176 with show_debug_regs.
6177 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6178 all uses with show_debug_regs.
6180 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6182 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6183 endianness into account.
6184 (ppc_supply_ptrace_register): Likewise.
6186 2014-09-03 James Hogan <james.hogan@imgtec.com>
6188 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6189 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6191 2014-09-03 Gary Benson <gbenson@redhat.com>
6193 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6194 ALL_DEBUG_ADDRESS_REGISTERS.
6196 2014-09-02 Gary Benson <gbenson@redhat.com>
6198 * i386-low.h: Renamed as...
6199 * x86-low.h: New file. All type, function and variable name
6200 prefixes changed from "i386_" to "x86_". All references updated.
6201 * i386-low.c: Renamed as...
6202 * x86-low.c: New file. All type, function and variable name
6203 prefixes changed from "i386_" to "x86_". All references updated.
6205 2014-09-02 Gary Benson <gbenson@redhat.com>
6207 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6208 (x86_linux_new_thread): Likewise.
6210 2014-08-29 Gary Benson <gbenson@redhat.com>
6212 * server.h (setjmp.h): Do not include.
6213 (toplevel): Do not declare.
6214 (common-exceptions.h): Include.
6215 (cleanups.h): Likewise.
6216 * server.c (toplevel): Do not define.
6217 (exit_code): New static global.
6218 (detach_or_kill_for_exit_cleanup): New function.
6219 (main): New function. Original main renamed to...
6220 (captured_main): New function.
6221 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6223 2014-08-29 Gary Benson <gbenson@redhat.com>
6225 * Makefile.in (SFILES): Add common/common-exceptions.c.
6226 (OBS): Add common-exceptions.o.
6227 (common-exceptions.o): New rule.
6228 * utils.c (prepare_to_throw_exception): New function.
6230 2014-08-29 Gary Benson <gbenson@redhat.com>
6232 * config.in: Regenerate.
6233 * configure: Likewise.
6235 2014-08-29 Gary Benson <gbenson@redhat.com>
6237 * Makefile.in (SFILES): Add common/cleanups.c.
6239 (cleanups.o): New rule.
6241 2014-08-29 Gary Benson <gbenson@redhat.com>
6243 * utils.c (internal_vwarning): New function.
6245 2014-08-28 Gary Benson <gbenson@redhat.com>
6247 * utils.h (fatal): Remove declaration.
6248 * utils.c (fatal): Remove function.
6250 2014-08-28 Gary Benson <gbenson@redhat.com>
6252 * tracepoint.c (gdb_agent_init): Replace fatal with
6254 (initialize_tracepoint): Likewise.
6256 2014-08-28 Gary Benson <gbenson@redhat.com>
6258 * remote-utils.c (remote_prepare): Replace fatal with error.
6260 2014-08-28 Gary Benson <gbenson@redhat.com>
6262 * linux-low.c (linux_async): Replace fatal with warning.
6264 (linux_start_non_stop): Return -1 if linux_async failed.
6266 2014-08-28 Gary Benson <gbenson@redhat.com>
6268 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6270 (i386_dr_low_get_addr): Remove vague comment.
6271 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6274 2014-08-28 Gary Benson <gbenson@redhat.com>
6276 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6277 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6279 (linux_resume_one_lwp): Likewise.
6280 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6282 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6283 with internal_error.
6284 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6285 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6286 (find_register_by_name): Replace fatal with internal_error.
6287 (find_regno): Likewise.
6288 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6289 * thread-db.c (thread_db_create_event): Likewise.
6290 (thread_db_load_search): Likewise.
6291 (try_thread_db_load_1): Likewise.
6292 * tracepoint.c (get_jump_space_head): Replace fatal with
6294 (claim_trampoline_space): Likewise.
6295 (have_fast_tracepoint_trampoline_buffer): Likewise.
6296 (cmd_qtstart): Likewise.
6297 (stop_tracing): Likewise.
6298 (fast_tracepoint_collecting): Likewise.
6299 (target_malloc): Likewise.
6300 (download_tracepoint): Likewise.
6301 (download_trace_state_variables): Replace check with gdb_assert.
6302 (upload_fast_traceframes): Replace fatal with internal_error.
6304 2014-08-19 Tom Tromey <tromey@redhat.com>
6305 Gary Benson <gbenson@redhat.com>
6307 * Makefile.in (SFILES): Add common/common-debug.c.
6308 (OBS): Add common-debug.o.
6309 (common-debug.o): New rule.
6310 * debug.h (debug_printf): Don't declare.
6311 * debug.c (debug_printf): Renamed and rewritten as...
6312 (debug_vprintf): New function.
6314 2014-08-19 Gary Benson <gbenson@redhat.com>
6316 * utils.h: Do not include print-utils.h.
6318 2014-08-19 Tom Tromey <tromey@redhat.com>
6319 Gary Benson <gbenson@redhat.com>
6321 * server.h: Add static assertion.
6322 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6324 2014-08-19 Tom Tromey <tromey@redhat.com>
6325 Gary Benson <gbenson@redhat.com>
6327 * Makefile.in (SFILES): Add common/errors.c.
6328 (OBS): Add errors.o.
6329 (IPA_OBS): Add errors-ipa.o.
6330 (errors.o): New rule.
6331 (errors-ipa.o): Likewise.
6332 * utils.h (perror_with_name, error, warning): Don't declare.
6333 * utils.c (warning): Renamed and rewritten as...
6334 (vwarning): New function.
6335 (error): Renamed and rewritten as...
6336 (verror): New function.
6337 (internal_error): Renamed and rewritten as...
6338 (internal_verror): New function.
6340 2014-08-07 Gary Benson <gbenson@redhat.com>
6342 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6343 * configure: Regenerate.
6344 * config.in: Likewise.
6345 * server.h: Do not include errno.h.
6346 * event-loop.c: Likewise.
6347 * hostio-errno.c: Likewise.
6348 * linux-low.c: Likewise.
6349 * remote-utils.c: Likewise.
6350 * spu-low.c: Likewise.
6351 * utils.c: Likewise.
6352 * gdbreplay.c: Unconditionally include errno.h.
6354 2014-08-07 Gary Benson <gbenson@redhat.com>
6356 * server.h: Do not include string.h.
6357 * event-loop.c: Likewise.
6358 * linux-low.c: Likewise.
6359 * regcache.c: Likewise.
6360 * remote-utils.c: Likewise.
6361 * spu-low.c: Likewise.
6362 * utils.c: Likewise.
6364 2014-08-07 Gary Benson <gbenson@redhat.com>
6366 * server.h: Do not include gdb_assert.h.
6368 2014-08-07 Gary Benson <gbenson@redhat.com>
6370 * server.h: Do not include common-utils.h.
6372 2014-08-07 Gary Benson <gbenson@redhat.com>
6374 * server.h: Do not include ptid.h.
6375 * notif.h: Likewise.
6377 2014-08-07 Gary Benson <gbenson@redhat.com>
6379 * server.h: Do not include gdb_locale.h.
6381 2014-08-07 Gary Benson <gbenson@redhat.com>
6383 * server.h: Do not include gdb/signals.h.
6384 * win32-low.c: Likewise.
6386 2014-08-07 Gary Benson <gbenson@redhat.com>
6388 * server.h: Do not include pathmax.h.
6390 2014-08-07 Gary Benson <gbenson@redhat.com>
6392 * server.h: Do not include libiberty.h.
6393 * linux-bfin-low.c: Likewise.
6395 2014-08-07 Gary Benson <gbenson@redhat.com>
6397 * server.h: Do not include ansidecl.h.
6399 2014-08-07 Gary Benson <gbenson@redhat.com>
6401 * linux-x86-low.c: Do not include stddef.h.
6402 * lynx-ppc-low.c: Likewise.
6403 * tracepoint.c: Likewise.
6405 2014-08-07 Gary Benson <gbenson@redhat.com>
6407 * server.h: Do not include stdarg.h.
6408 * nto-low.c: Likewise.
6410 2014-08-07 Gary Benson <gbenson@redhat.com>
6412 * server.h: Do not include stdlib.h.
6413 * inferiors.c: Likewise.
6414 * linux-low.c: Likewise.
6415 * regcache.c: Likewise.
6416 * spu-low.c: Likewise.
6417 * tracepoint.c: Likewise.
6418 * utils.c: Likewise.
6420 2014-08-07 Gary Benson <gbenson@redhat.com>
6422 * server.h: Do not include stdio.h.
6423 * linux-low.c: Likewise.
6424 * remote-utils.c: Likewise.
6425 * spu-low.c: Likewise.
6426 * utils.c: Likewise.
6427 * wincecompat.c: Likewise.
6429 2014-08-06 Gary Benson <gbenson@redhat.com>
6431 * regcache.c (init_register_cache): Move conditionals inside if.
6433 2014-08-06 Gary Benson <gbenson@redhat.com>
6435 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6437 2014-07-31 Gary Benson <gbenson@redhat.com>
6439 * ax.h: Do not include server.h.
6440 * gdbthread.h: Likewise.
6441 * lynx-low.h: Likewise.
6442 * notif.h: Likewise.
6444 2014-07-30 Gary Benson <gbenson@redhat.com>
6446 * server.h: Include common-defs.h.
6447 Do not include config.h or build-gnulib-gdbserver/config.h.
6449 2014-07-30 Gary Benson <gbenson@redhat.com>
6451 * hostio-errno.c: Move server.h to top of includes list.
6452 * inferiors.c: Likewise.
6453 * linux-x86-low.c: Likewise.
6454 * notif.c: Include server.h.
6456 2014-07-24 Tom Tromey <tromey@redhat.com>
6457 Gary Benson <gbenson@redhat.com>
6459 * server.h (CORE_ADDR): Now unsigned.
6461 2014-07-16 Pedro Alves <palves@redhat.com>
6463 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6465 2014-07-15 Pedro Alves <palves@redhat.com>
6467 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6470 2014-07-11 Pedro Alves <palves@redhat.com>
6472 * linux-low.c (kill_wait_lwp): New function, based on
6473 kill_one_lwp_callback, but use my_waitpid directly.
6474 (kill_one_lwp_callback, linux_kill): Use it.
6476 2014-06-23 Pedro Alves <palves@redhat.com>
6478 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6479 before setting DR0..DR3.
6481 2014-06-20 Gary Benson <gbenson@redhat.com>
6483 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6484 * configure: Regenerated.
6485 * config.in: Likewise.
6487 2014-06-20 Gary Benson <gbenson@redhat.com>
6489 * Makefile.in (SFILES): Update locations for files moved
6491 (object file files): Reordered.
6493 2014-06-20 Gary Benson <gbenson@redhat.com>
6495 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6496 (i386_dr_low_set_addr): Likewise.
6497 (i386_dr_low_get_addr): Likewise.
6498 (i386_dr_low_can_set_control): Likewise.
6499 (i386_dr_low_set_control): Likewise.
6500 (i386_dr_low_get_control): Likewise.
6501 (i386_dr_low_get_status): Likewise.
6502 (i386_get_debug_register_length): Likewise.
6503 * linux-x86-low.c (i386_dr_low_set_addr):
6504 Changed signature. Made static.
6505 (i386_dr_low_get_addr): Likewise.
6506 (i386_dr_low_set_control): Likewise.
6507 (i386_dr_low_get_control): Likewise.
6508 (i386_dr_low_get_status): Likewise.
6509 (i386_dr_low): New global variable.
6510 * win32-i386-low.c (i386_dr_low_set_addr):
6511 Changed signature. Made static.
6512 (i386_dr_low_get_addr): Likewise.
6513 (i386_dr_low_set_control): Likewise.
6514 (i386_dr_low_get_control): Likewise.
6515 (i386_dr_low_get_status): Likewise.
6516 (i386_dr_low): New global variable.
6518 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6520 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6521 * Makefile.in (AR, AR_FLAGS): Define.
6522 * configure: Regenerate.
6524 2014-06-19 Gary Benson <gbenson@redhat.com>
6526 * Makefile.in (i386-dregs.o): New rule.
6527 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6528 * i386-low.c (target.h): Remove include.
6529 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6530 (DR_CONTROL_SHIFT): Likewise.
6531 (DR_CONTROL_SIZE): Likewise.
6532 (DR_RW_EXECUTE): Likewise.
6533 (DR_RW_WRITE): Likewise.
6534 (DR_RW_READ): Likewise.
6535 (DR_RW_IORW): Likewise.
6536 (DR_LEN_1): Likewise.
6537 (DR_LEN_2): Likewise.
6538 (DR_LEN_4): Likewise.
6539 (DR_LEN_8): Likewise.
6540 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6541 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6542 (DR_ENABLE_SIZE): Likewise.
6543 (DR_LOCAL_SLOWDOWN): Likewise.
6544 (DR_GLOBAL_SLOWDOWN): Likewise.
6545 (DR_CONTROL_RESERVED): Likewise.
6546 (I386_DR_CONTROL_MASK): Likewise.
6547 (I386_DR_VACANT): Likewise.
6548 (I386_DR_LOCAL_ENABLE): Likewise.
6549 (I386_DR_GLOBAL_ENABLE): Likewise.
6550 (I386_DR_DISABLE): Likewise.
6551 (I386_DR_SET_RW_LEN): Likewise.
6552 (I386_DR_GET_RW_LEN): Likewise.
6553 (I386_DR_WATCH_HIT): Likewise.
6554 (i386_wp_op_t): Likewise.
6555 (i386_show_dr): Likewise.
6556 (i386_length_and_rw_bits): Likewise.
6557 (i386_insert_aligned_watchpoint): Likewise.
6558 (i386_remove_aligned_watchpoint): Likewise.
6559 (i386_handle_nonaligned_watchpoint): Likewise.
6560 i386_update_inferior_debug_regs(): Likewise.
6561 (i386_dr_insert_watchpoint): Likewise.
6562 (i386_dr_remove_watchpoint): Likewise.
6563 (i386_dr_region_ok_for_watchpoint): Likewise.
6564 (i386_dr_stopped_data_address): Likewise.
6565 (i386_dr_stopped_by_watchpoint): Likewise.
6567 2014-06-19 Gary Benson <gbenson@redhat.com>
6569 * i386-low.c (i386_dr_show): Renamed to
6570 i386_show_dr and made static. All uses updated.
6571 (i386_dr_length_and_rw_bits): Renamed to
6572 i386_length_and_rw_bits and made static.
6574 (i386_dr_insert_aligned_watchpoint): Renamed to
6575 i386_insert_aligned_watchpoint and made static.
6577 (i386_dr_remove_aligned_watchpoint): Renamed to
6578 i386_remove_aligned_watchpoint and made static.
6580 (i386_dr_update_inferior_debug_regs): Renamed to
6581 i386_update_inferior_debug_regs and made static.
6584 2014-06-18 Gary Benson <gbenson@redhat.com>
6586 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6587 (i386_dr_low_can_set_control): Likewise.
6588 (i386_get_debug_register_length): Likewise.
6589 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6590 (i386_dr_low_can_set_control): Likewise.
6591 (i386_get_debug_register_length): Likewise.
6593 2014-06-17 Gary Benson <gbenson@redhat.com>
6595 * i386-low.h (i386-dregs.h): New include.
6596 (DR_FIRSTADDR): Now in i386-dregs.h.
6597 (DR_LASTADDR): Likewise.
6598 (DR_NADDR): Likewise.
6599 (DR_STATUS): Likewise.
6600 (DR_CONTROL): Likewise.
6601 (i386_debug_reg_state): Likewise.
6602 (i386_dr_insert_watchpoint): Likewise.
6603 (i386_dr_remove_watchpoint): Likewise.
6604 (i386_dr_region_ok_for_watchpoint): Likewise.
6605 (i386_dr_stopped_data_address): Likewise.
6606 (i386_dr_stopped_by_watchpoint): Likewise.
6607 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6609 2014-06-18 Gary Benson <gbenson@redhat.com>
6611 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6612 i386_dr_insert_watchpoint.
6613 (i386_low_remove_watchpoint): Renamed to
6614 i386_dr_remove_watchpoint.
6615 (i386_low_region_ok_for_watchpoint): Renamed to
6616 i386_dr_region_ok_for_watchpoint.
6617 (i386_low_stopped_data_address): Renamed to
6618 i386_dr_stopped_data_address.
6619 (i386_low_stopped_by_watchpoint): Renamed to
6620 i386_dr_stopped_by_watchpoint.
6621 * i386-low.c (i386_show_dr): Renamed to
6622 i386_dr_show and made nonstatic. All uses updated.
6623 (i386_length_and_rw_bits): Renamed to
6624 i386_dr_length_and_rw_bits and made nonstatic.
6626 (i386_insert_aligned_watchpoint): Renamed to
6627 i386_dr_insert_aligned_watchpoint and made nonstatic.
6629 (i386_remove_aligned_watchpoint): Renamed to
6630 i386_dr_remove_aligned_watchpoint and made nonstatic.
6632 (i386_update_inferior_debug_regs): Renamed to
6633 i386_dr_update_inferior_debug_regs and made nonstatic.
6635 (i386_low_insert_watchpoint): Renamed to
6636 i386_dr_insert_watchpoint. All uses updated.
6637 (i386_low_remove_watchpoint): Renamed to
6638 i386_dr_remove_watchpoint. All uses updated.
6639 (i386_low_region_ok_for_watchpoint): Renamed to
6640 i386_dr_region_ok_for_watchpoint. All uses updated.
6641 (i386_low_stopped_data_address): Renamed to
6642 i386_dr_stopped_data_address. All uses updated.
6643 (i386_low_stopped_by_watchpoint): Renamed to
6644 i386_dr_stopped_by_watchpoint. All uses updated.
6646 2014-06-18 Gary Benson <gbenson@redhat.com>
6648 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6649 (i386_dr_low_can_set_control): Likewise.
6650 (i386_insert_aligned_watchpoint): New check.
6652 2014-06-18 Gary Benson <gbenson@redhat.com>
6654 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6657 2014-06-18 Gary Benson <gbenson@redhat.com>
6659 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6660 instead of fatal and error.
6661 (i386_handle_nonaligned_watchpoint): Likewise.
6663 2014-06-18 Gary Benson <gbenson@redhat.com>
6665 * i386-low.c (i386_get_debug_register_length): New macro.
6666 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6667 (i386_show_dr): Use debug_printf instead of fprintf. Use
6668 phex to format values.
6670 2014-06-18 Gary Benson <gbenson@redhat.com>
6672 * i386-low.h: Comment changes.
6673 * i386-low.c: Likewise.
6675 2014-06-18 Gary Benson <gbenson@redhat.com>
6677 * i386-low.c: Whitespace changes.
6679 2014-06-12 Tom Tromey <tromey@redhat.com>
6681 * utils.c (freeargv): Remove.
6683 2014-06-12 Tom Tromey <tromey@redhat.com>
6685 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6686 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6687 (parse_debug_format_options): Likewise.
6688 (gdbserver_usage): Likewise.
6689 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6690 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6691 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6693 ($(LIBGNU)): Depend on libiberty.
6694 (all-lib): Recurse into all subdirs.
6695 (install-only): Invoke "install" target in subdirs.
6696 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6698 * configure: Rebuild.
6699 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6700 for vasprintf, vsnprintf, or gettimeofday.
6701 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6704 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6706 * development.sh: Delete.
6707 * Makefile.in (config.status): Adjust dependency on development.sh.
6708 * configure.ac: Adjust development.sh source call.
6709 * configure: Regenerate.
6711 2014-06-02 Pedro Alves <palves@redhat.com>
6713 * ax.c (gdb_free_agent_expr): New function.
6714 * ax.h (gdb_free_agent_expr): New declaration.
6715 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6717 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6719 (clear_breakpoint_conditions_and_commands): New function.
6720 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6721 (clear_breakpoint_conditions_and_commands): New declaration.
6723 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6725 * linux-aarch64-low.c (asm/ptrace.h): Include.
6727 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6729 Fix TLS access for -static -pthread.
6730 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6731 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6732 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6734 2014-05-20 Pedro Alves <palves@redhat.com>
6736 * linux-aarch64-low.c (aarch64_insert_point)
6737 (aarch64_remove_point): No longer check whether the type is
6738 supported here. Adjust to new interface.
6739 (the_low_target): Install aarch64_supports_z_point_type as
6740 supports_z_point_type method.
6741 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6742 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6743 instead of a Z packet char. Adjust.
6744 (arm_supports_z_point_type): New function.
6745 (arm_insert_point, arm_remove_point): Adjust to new interface.
6746 (the_low_target): Install arm_supports_z_point_type.
6747 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6748 (cris_insert_point, cris_remove_point): Adjust to new interface.
6749 Don't check whether the type is supported here.
6750 (the_low_target): Install cris_supports_z_point_type.
6751 * linux-low.c (linux_supports_z_point_type): New function.
6752 (linux_insert_point, linux_remove_point): Adjust to new interface.
6753 * linux-low.h (struct linux_target_ops) <insert_point,
6754 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6755 raw_breakpoint pointer parameter.
6756 <supports_z_point_type>: New method.
6757 * linux-mips-low.c (mips_supports_z_point_type): New function.
6758 (mips_insert_point, mips_remove_point): Adjust to new interface.
6759 Use mips_supports_z_point_type.
6760 (the_low_target): Install mips_supports_z_point_type.
6761 * linux-ppc-low.c (the_low_target): Install NULL as
6762 supports_z_point_type method.
6763 * linux-s390-low.c (the_low_target): Install NULL as
6764 supports_z_point_type method.
6765 * linux-sparc-low.c (the_low_target): Install NULL as
6766 supports_z_point_type method.
6767 * linux-x86-low.c (x86_supports_z_point_type): New function.
6768 (x86_insert_point): Adjust to new insert_point interface. Use
6769 insert_memory_breakpoint. Adjust to new
6770 i386_low_insert_watchpoint interface.
6771 (x86_remove_point): Adjust to remove_point interface. Use
6772 remove_memory_breakpoint. Adjust to new
6773 i386_low_remove_watchpoint interface.
6774 (the_low_target): Install x86_supports_z_point_type.
6775 * lynx-low.c (lynx_target_ops): Install NULL as
6776 supports_z_point_type callback.
6777 * nto-low.c (nto_supports_z_point_type): New.
6778 (nto_insert_point, nto_remove_point): Adjust to new interface.
6779 (nto_target_ops): Install nto_supports_z_point_type.
6780 * mem-break.c: Adjust intro comment.
6781 (struct raw_breakpoint) <raw_type, size>: New fields.
6782 <inserted>: Update comment.
6783 <shlib_disabled>: Delete field.
6784 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6785 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6786 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6787 (raw_bkpt_type_to_target_hw_bp_type): New function.
6788 (find_enabled_raw_code_breakpoint_at): New function.
6789 (find_raw_breakpoint_at): New type and size parameters. Use them.
6790 (insert_memory_breakpoint): New function, based off
6791 set_raw_breakpoint_at.
6792 (remove_memory_breakpoint): New function.
6793 (set_raw_breakpoint_at): Reimplement.
6794 (set_breakpoint): New, based on set_breakpoint_at.
6795 (set_breakpoint_at): Reimplement.
6796 (delete_raw_breakpoint): Go through the_target->remove_point
6797 instead of assuming memory breakpoints.
6798 (find_gdb_breakpoint_at): Delete.
6799 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6800 (find_gdb_breakpoint): New function.
6801 (set_gdb_breakpoint_at): Delete.
6802 (z_type_supported): New function.
6803 (set_gdb_breakpoint_1): New function, loosely based off
6804 set_gdb_breakpoint_at.
6805 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6806 (delete_gdb_breakpoint_at): Delete.
6807 (delete_gdb_breakpoint_1): New function, loosely based off
6808 delete_gdb_breakpoint_at.
6809 (delete_gdb_breakpoint): New function.
6810 (clear_gdb_breakpoint_conditions): Rename to ...
6811 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6813 (add_condition_to_breakpoint): Make static.
6814 (add_breakpoint_condition): Take a struct breakpoint pointer
6815 instead of an address. Adjust.
6816 (gdb_condition_true_at_breakpoint): Rename to ...
6817 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6819 (gdb_condition_true_at_breakpoint): Reimplement.
6820 (add_breakpoint_commands): Take a struct breakpoint pointer
6821 instead of an address. Adjust.
6822 (gdb_no_commands_at_breakpoint): Rename to ...
6823 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6824 parameter. Return true if no breakpoint was found. Change debug
6826 (gdb_no_commands_at_breakpoint): Reimplement.
6827 (run_breakpoint_commands): Rename to ...
6828 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6829 and change return type to boolean.
6830 (run_breakpoint_commands): New function.
6831 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6832 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6833 breakpoint. Go through the_target->remove_point instead of
6834 assuming memory breakpoint.
6835 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6836 software and hardware breakpoints.
6837 (reinsert_raw_breakpoint): Go through the_target->insert_point
6838 instead of assuming memory breakpoint.
6839 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6840 software and hardware breakpoints.
6841 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6842 Check both software and hardware breakpoints.
6843 (validate_inserted_breakpoint): Assert the breakpoint is a
6844 software breakpoint. Set the inserted flag to -1 instead of
6845 setting shlib_disabled.
6846 (delete_disabled_breakpoints): Adjust.
6847 (validate_breakpoints): Only validate software breakpoints.
6848 Adjust to inserted flag change.
6849 (check_mem_read, check_mem_write): Skip breakpoint types other
6850 than software breakpoints. Adjust to inserted flag change.
6851 * mem-break.h (enum raw_bkpt_type): New enum.
6852 (raw_breakpoint, struct process_info): Forward declare.
6853 (Z_packet_to_target_hw_bp_type): Delete declaration.
6854 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6855 (set_gdb_breakpoint, delete_gdb_breakpoint)
6856 (clear_breakpoint_conditions): New declarations.
6857 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6858 (breakpoint_inserted_here): Update comment.
6859 (add_breakpoint_condition, add_breakpoint_commands): Replace
6860 address parameter with a breakpoint pointer parameter.
6861 (gdb_breakpoint_here): Update comment.
6862 (delete_gdb_breakpoint_at): Delete.
6863 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6864 * server.c (process_point_options): Take a struct breakpoint
6865 pointer instead of an address. Adjust.
6866 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6867 delete_gdb_breakpoint.
6868 * spu-low.c (spu_target_ops): Install NULL as
6869 supports_z_point_type method.
6870 * target.h: Include mem-break.h.
6871 (struct target_ops) <prepare_to_access_memory>: Update comment.
6872 <supports_z_point_type>: New field.
6873 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6874 instead of a char. Also take a raw breakpoint pointer.
6875 * win32-arm-low.c (the_low_target): Install NULL as
6876 supports_z_point_type.
6877 * win32-i386-low.c (i386_supports_z_point_type): New function.
6878 (i386_insert_point, i386_remove_point): Adjust to new interface.
6879 (the_low_target): Install i386_supports_z_point_type.
6880 * win32-low.c (win32_supports_z_point_type): New function.
6881 (win32_insert_point, win32_remove_point): Adjust to new interface.
6882 (win32_target_ops): Install win32_supports_z_point_type.
6883 * win32-low.h (struct win32_target_ops):
6884 <supports_z_point_type>: New method.
6885 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6886 instead of a char. Also take a raw breakpoint pointer.
6888 2014-05-20 Pedro Alves <palves@redhat.com>
6890 * mem-break.h: Include break-common.h.
6891 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6892 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6893 (Z_packet_to_target_hw_bp_type): New declaration.
6894 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6895 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6896 (Z_PACKET_ACCESS_WP): Delete macros.
6897 (Z_packet_to_hw_type): Delete function.
6898 * i386-low.h: Don't include break-common.h here.
6899 (Z_packet_to_hw_type): Delete declaration.
6900 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6901 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6902 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6903 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6904 * linux-aarch64-low.c: Don't include break-common.h here.
6905 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6906 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6907 (Z_packet_to_target_hw_bp_type): Delete function.
6908 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6910 (mips_insert_point, mips_remove_point): Use
6911 Z_packet_to_target_hw_bp_type.
6913 2014-05-20 Pedro Alves <palves@redhat.com>
6915 * linux-aarch64-low.c: Include break-common.h.
6916 (enum target_point_type): Delete.
6917 (Z_packet_to_point_type): Rename to ...
6918 (Z_packet_to_target_hw_bp_type): ... this, and return a
6919 target_hw_bp_type instead.
6920 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6921 instead of an enum target_point_type.
6922 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6924 (aarch64_dr_state_insert_one_point)
6925 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6926 (aarch64_handle_aligned_watchpoint)
6927 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6928 Take an enum target_hw_bp_type instead of an enum
6930 (aarch64_supports_z_point_type): New function.
6931 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6932 use Z_packet_to_target_hw_bp_type.
6934 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6936 * configure.ac: Only use -Werror by default when DEVELOPMENT
6938 * configure: Regenerate.
6940 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6942 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6943 * linux-x86-low.c (X86_64_USER_REGS): New.
6944 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6946 2014-04-28 Yao Qi <yao@codesourcery.com>
6948 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6951 2014-04-25 Pedro Alves <palves@redhat.com>
6954 * linux-low.c (linux_attach_fail_reason_string): New function.
6955 (linux_attach_lwp): Delete.
6956 (linux_attach_lwp_1): Rename to ...
6957 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6958 argument. Remove "initial" parameter. Return int instead of
6959 void. Don't error or warn here.
6960 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6961 failure to attach to the tgid. Call warning when failing to
6963 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6964 argument. Remove "initial" parameter. Return int instead of
6965 void. Don't error or warn here.
6966 (linux_attach_fail_reason_string): New declaration.
6967 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6968 interface change. Use linux_attach_fail_reason_string.
6970 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6971 Walfred Tedeschi <walfred.tedeschi@intel.com>
6973 * Makefile.in: Added rules to handle new files
6974 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6975 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6976 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6977 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6978 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6979 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6981 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6982 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6983 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6984 i386/x32-avx512.xml.
6985 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6986 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6987 i386/x32-avx512-linux.xml.
6988 * i387-fp.c (num_avx512_k_registers): New constant for number
6990 (num_avx512_zmmh_low_registers): New constant for number of
6991 lower ZMM registers (0-15).
6992 (num_avx512_zmmh_high_registers): New constant for number of
6993 higher ZMM registers (16-31).
6994 (num_avx512_ymmh_registers): New contant for number of higher
6995 YMM registers (ymm16-31 added by avx521 on x86_64).
6996 (num_avx512_xmm_registers): New constant for number of higher
6997 XMM registers (xmm16-31 added by AVX512 on x86_64).
6998 (struct i387_xsave): Add space for AVX512 registers.
6999 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7000 Add code to handle AVX512 registers.
7001 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7002 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7003 prototypei from generated file.
7004 (tdesc_amd64_avx512_linux): Likewise.
7005 (init_registers_x32_avx512_linux): Likewise.
7006 (tdesc_x32_avx512_linux): Likewise.
7007 (init_registers_i386_avx512_linux): Likewise.
7008 (tdesc_i386_avx512_linux): Likewise.
7009 (x86_64_regmap): Add AVX512 registers.
7010 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7012 (initialize_low_arch): Add code to initialize AVX512 registers.
7014 2014-04-23 Pedro Alves <palves@redhat.com>
7016 * mem-break.c (find_gdb_breakpoint_at): Make static.
7017 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7019 2014-04-23 Pedro Alves <palves@redhat.com>
7021 * i386-low.c: Don't include break-common.h here.
7022 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7023 prototype to take target_hw_bp_type as argument instead of a Z
7025 * i386-low.h: Include break-common.h here.
7026 (Z_packet_to_hw_type): Declare.
7027 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7029 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7030 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7031 (x86_remove_point): Convert the packet number to a
7032 target_hw_bp_type before calling i386_low_remove_watchpoint.
7033 * win32-i386-low.c (i386_insert_point): Convert the packet number
7034 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7035 (i386_remove_point): Convert the packet number to a
7036 target_hw_bp_type before calling i386_low_remove_watchpoint.
7038 2014-04-23 Pedro Alves <palves@redhat.com>
7040 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7042 2014-04-10 Pedro Alves <palves@redhat.com>
7044 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7045 Check if the condition or command is NULL before checking if the
7046 breakpoint is known. On success, return true.
7047 * mem-break.h (add_breakpoint_condition): Document return.
7048 (add_breakpoint_commands): Add describing comment.
7049 * server.c (skip_to_semicolon): New function.
7050 (process_point_options): Use it.
7052 2014-04-09 Pedro Alves <palves@redhat.com>
7054 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7057 2014-02-27 Pedro Alves <palves@redhat.com>
7060 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7062 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7064 (last_thread_of_process_p): Take a PID argument instead of a
7066 (linux_wait_for_lwp): Delete.
7067 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7069 (linux_low_filter_event): New function, party factored out from
7070 linux_wait_for_event.
7071 (linux_wait_for_event): Rename to ...
7072 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7073 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7074 sigsuspend. Check for zombie leaders.
7075 (linux_wait_for_event): Reimplement as wrapper around
7076 linux_wait_for_event_filtered.
7077 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7078 a normal or signal exit is seen, it's the whole process exiting.
7079 (wait_for_sigstop): No longer a for_each_inferior callback.
7080 Rewrite on top of linux_wait_for_event_filtered.
7081 (stop_all_lwps): Call wait_for_sigstop directly.
7082 * server.c (resume, handle_target_event): Handle
7083 TARGET_WAITKIND_NO_RESUMED.
7085 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7087 * win32-low.c (psapi_get_dll_name,
7088 * win32_CreateToolhelp32Snapshot): Delete.
7089 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7090 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7092 (handle_load_dll): Add function description.
7093 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7095 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7097 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7099 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7100 base address when calling win32_add_one_solib.
7101 (handle_load_dll): Delete local variable load_addr.
7102 Remove 0x1000 offset applied to DLL base address when calling
7103 win32_add_one_solib.
7104 (handle_unload_dll): Add comment.
7106 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7108 * win32-low.c (win32_add_all_dlls): Renames
7109 win32_ensure_ntdll_loaded. Rewrite function documentation.
7110 Adjust implementation to always load all DLLs.
7111 Add 0x1000 offset to DLL base address when calling
7112 win32_add_one_solib.
7113 (child_initialization_done): New static global.
7114 (do_initial_child_stuff): Set child_initialization_done to
7115 zero during child initialization, and 1 after. Replace call
7116 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7118 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7119 (handle_unload_dll): Add function documentation.
7120 (get_child_debug_event): Ignore load and unload DLL events
7121 during child initialization.
7123 2014-02-20 Doug Evans <dje@google.com>
7125 Remove global all_lwps.
7126 * inferiors.h (ptid_of): Move here from linux-low.h.
7127 (pid_of, lwpid_of): Ditto.
7128 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7129 parameter is a struct thread_info * now.
7130 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7131 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7132 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7134 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7135 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7136 * linux-arm-low.c (update_registers_callback): Update, "entry"
7137 parameter is a struct thread_info * now.
7138 Fetch lwpid from current_inferior directly.
7139 (arm_insert_point): Pass &all_threads to find_inferior instead of
7141 (arm_remove_point): Ditto.
7142 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7143 (arm_prepare_to_resume): Fetch pid from thread.
7144 (arm_read_description): Fetch lwpid from current_inferior directly.
7145 * linux-low.c (all_lwps): Delete.
7146 (delete_lwp): Delete call to remove_inferior.
7147 (handle_extended_wait): Fetch lwpid from thread.
7148 (add_lwp): Don't set lwp->entry.id. Remove call to
7149 add_inferior_to_list.
7150 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7151 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7152 (kill_one_lwp_callback): Ditto.
7153 (linux_kill): Don't dereference NULL pointer.
7154 Fetch ptid,lwpid from thread.
7155 (get_detach_signal): Fetch ptid from thread.
7156 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7157 Simplify call to regcache_invalidate_thread.
7158 (delete_lwp_callback): Update, "entry" parameter is a
7159 struct thread_info * now. Fetch pid from thread.
7160 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7161 (status_pending_p_callback): Update, "entry" parameter is a
7162 struct thread_info * now. Fetch ptid from thread.
7163 (find_lwp_pid): Update, "entry" parameter is a
7164 struct thread_info * now.
7165 (linux_wait_for_lwp): Fetch pid from thread.
7166 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7167 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7168 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7169 (dequeue_one_deferred_signal): Ditto.
7170 (cancel_breakpoint): Fetch ptid from current_inferior.
7171 (linux_wait_for_event): Pass &all_threads to find_inferior,
7172 not &all_lwps. Fetch ptid, lwpid from thread.
7173 (count_events_callback): Update, "entry" parameter is a
7174 struct thread_info * now.
7175 (select_singlestep_lwp_callback): Ditto.
7176 (select_event_lwp_callback): Ditto.
7177 (cancel_breakpoints_callback): Ditto.
7178 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7180 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7181 (unsuspend_one_lwp): Update, "entry" parameter is a
7182 struct thread_info * now.
7183 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7185 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7186 Fetch lwpid from thread, not lwp.
7187 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7188 Pass &all_threads to find_inferior, not &all_lwps.
7189 (send_sigstop): Fetch lwpid from thread, not lwp.
7190 (send_sigstop_callback): Update, "entry" parameter is a
7191 struct thread_info * now.
7192 (suspend_and_send_sigstop_callback): Ditto.
7193 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7194 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7195 struct thread_info * now.
7196 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7198 (lwp_running): Update, "entry" parameter is a
7199 struct thread_info * now.
7200 (stop_all_lwps): Fetch ptid from thread.
7201 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7202 (linux_resume_one_lwp): Fetch lwpid from thread.
7203 (linux_set_resume_request): Update, "entry" parameter is a
7204 struct thread_info * now. Fetch pid, lwpid from thread.
7205 (resume_status_pending_p): Update, "entry" parameter is a
7206 struct thread_info * now.
7207 (need_step_over_p): Ditto. Fetch lwpid from thread.
7208 (start_step_over): Fetch lwpid from thread.
7209 (linux_resume_one_thread): Update, "entry" parameter is a
7210 struct thread_info * now. Fetch lwpid from thread.
7211 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7212 (proceed_one_lwp): Update, "entry" parameter is a
7213 struct thread_info * now. Fetch lwpid from thread.
7214 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7215 struct thread_info * now.
7216 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7217 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7218 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7220 (regsets_store_inferior_registers): Ditto.
7221 (fetch_register, store_register): Ditto.
7222 (linux_read_memory, linux_write_memory): Ditto.
7223 (linux_request_interrupt): Ditto.
7224 (linux_read_auxv): Ditto.
7225 (linux_xfer_siginfo): Ditto.
7226 (linux_qxfer_spu): Ditto.
7227 (linux_qxfer_libraries_svr4): Ditto.
7228 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7229 moved to inferiors.h.
7231 (get_thread_lwp): Update.
7232 (struct lwp_info): Delete member "entry". Simplify comment for
7235 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7236 current_inferior directly.
7237 (update_watch_registers_callback): Update, "entry" parameter is a
7238 struct thread_info * now. Fetch pid from thread.
7239 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7240 (mips_insert_point): Fetch lwpid from current_inferior.
7241 Pass &all_threads to find_inferior, not &all_lwps.
7242 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7243 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7245 (mips_stopped_data_address): Ditto.
7246 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7248 * linux-tile-low.c (tile_arch_setup): Ditto.
7249 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7250 (update_debug_registers_callback): Update, "entry" parameter is a
7251 struct thread_info * now. Fetch pid from thread.
7252 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7253 Pass &all_threads to find_inferior, not &all_lwps.
7254 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7255 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7256 Pass &all_threads to find_inferior, not &all_lwps.
7257 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7258 (i386_dr_low_get_status): Ditto.
7259 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7260 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7261 (x86_linux_read_description): Ditto.
7262 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7264 2014-02-20 Doug Evans <dje@google.com>
7266 * inferiors.c (get_first_inferior): Fix buglet.
7268 2014-02-19 Doug Evans <dje@google.com>
7270 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7271 * inferiors.c (add_thread): Change result type to struct thread_info *.
7272 All callers updated.
7273 (add_lwp): Call add_thread here instead of in callers.
7274 All callers updated.
7275 * linux-low.h (get_lwp_thread): Rewrite.
7276 (struct lwp_info): New member "thread".
7278 2014-02-19 Doug Evans <dje@google.com>
7280 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7281 All callers updated.
7283 2014-02-19 Doug Evans <dje@google.com>
7285 * inferiors.c (add_thread): Fix whitespace.
7287 2014-02-19 Doug Evans <dje@google.com>
7289 * dll.c (clear_dlls): Replace accessing list implemention details
7291 * gdbthread.h (get_first_thread): Declare.
7292 * inferiors.c (for_each_inferior_with_data): New function.
7293 (get_first_thread): New function.
7294 (find_thread_ptid): Simplify.
7295 (get_first_inferior): New function.
7296 (clear_list): Delete.
7297 (one_inferior_p): New function.
7298 (clear_inferior_list): New function.
7299 (clear_inferiors): Update.
7300 * inferiors.h (for_each_inferior_with_data): Declare.
7301 (clear_inferior_list): Declare.
7302 (one_inferior_p): Declare.
7303 (get_first_inferior): Declare.
7304 * linux-low.c (linux_wait_for_event): Replace accessing list
7305 implemention details with API function.
7306 * server.c (target_running): Ditto.
7307 (accumulate_file_name_length): New function.
7308 (emit_dll_description): New function.
7309 (handle_qxfer_libraries): Replace accessing list implemention
7310 details with API function.
7311 (handle_qxfer_threads_worker): New function.
7312 (handle_qxfer_threads_proper): Replace accessing list implemention
7313 details with API function.
7314 (handle_query): Ditto.
7315 (visit_actioned_threads_callback_ftype): New typedef.
7316 (visit_actioned_threads_data): New struct.
7317 (visit_actioned_threads): Rewrite to be find_inferior callback.
7318 (resume): Call find_inferior.
7319 (handle_status): Replace accessing list implemention
7320 details with API function.
7321 (process_serial_event): Replace accessing list implemention details
7323 * target.c (set_desired_inferior): Replace accessing list implemention
7324 details with API function.
7325 * tracepoint.c (same_process_p): New function.
7326 (gdb_agent_about_to_close): Replace accessing list implemention
7327 details with API function.
7328 * win32-low.c (child_delete_thread): Replace accessing list
7329 implemention details with API function.
7330 (match_dll_by_basename): New function.
7331 (dll_is_loaded_by_basename): New function.
7332 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7333 details call to dll_is_loaded_by_basename.
7335 2014-02-19 Doug Evans <dje@google.com>
7337 * dll.h (struct dll_info): Add comment.
7338 * gdbthread.h (struct thread_info): Add comment.
7339 (current_ptid): Simplify.
7340 * inferiors.c (add_process): Update.
7341 (remove_process): Update.
7342 * inferiors.h (struct process_info): Rename member "head" to "entry".
7343 * linux-low.c (delete_lwp): Update.
7345 (last_thread_of_process_p): Update.
7346 (kill_one_lwp_callback, linux_kill): Update.
7347 (status_pending_p_callback): Update.
7348 (wait_for_sigstop): Update. Simplify read of ptid.
7349 (start_step_over): Update.
7350 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7351 (get_lwp_thread): Update.
7352 (struct lwp_info): Rename member "head" to "entry".
7353 * regcache.h (inferior_list_entry): Delete.
7354 * server.c (kill_inferior_callback): Update.
7355 (detach_or_kill_inferior_callback): Update.
7356 (print_started_pid): Update.
7357 (print_attached_pid): Update.
7358 (process_serial_event): Simplify read of ptid.
7359 * thread-db.c (thread_db_create_event): Update.
7360 (thread_db_get_tls_address): Update.
7361 * win32-low.c (current_inferior_ptid): Simplify.
7363 2014-02-19 Tom Tromey <tromey@redhat.com>
7365 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7367 (target_supports_btrace): Update.
7369 2014-02-14 Yao Qi <yao@codesourcery.com>
7371 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7372 (rsp-low-ipa.o): New target.
7374 2014-02-12 Tom Tromey <tromey@redhat.com>
7376 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7377 convert_ascii_to_int.
7378 * regcache.c (registers_to_string): Likewise.
7379 * remote-utils.c (decode_M_packet): Likewise.
7380 * server.c (process_serial_event): Likewise.
7382 2014-02-12 Tom Tromey <tromey@redhat.com>
7384 * server.c (handle_query, handle_v_run): Use hex2bin, not
7386 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7388 2014-02-12 Tom Tromey <tromey@redhat.com>
7390 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7391 convert_int_to_ascii.
7392 * regcache.c (registers_to_string, collect_register_as_string):
7394 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7396 * server.c (process_serial_event): Likewise.
7397 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7398 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7400 2014-02-12 Tom Tromey <tromey@redhat.com>
7402 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7403 bin2hex, not hexify.
7404 * tracepoint.c (cmd_qtstatus): Likewise.
7406 2014-02-12 Tom Tromey <tromey@redhat.com>
7408 * remote-utils.c (monitor_output): Pass explicit length to
7411 2014-02-12 Tom Tromey <tromey@redhat.com>
7413 * tracepoint.c: Include rsp-low.h.
7414 * server.c: Include rsp-low.h.
7415 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7416 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7418 * remote-utils.c: Include rsp-low.h.
7419 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7420 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7421 (convert_int_to_ascii, convert_ascii_to_int): Move to
7423 * regcache.c: Include rsp-low.h.
7424 * ax.c: Include rsp-low.h.
7425 * Makefile.in (SFILES): Add common/rsp-low.c.
7426 (OBS): Add rsp-low.o.
7427 (rsp-low.o): New target.
7429 2014-02-12 Tom Tromey <tromey@redhat.com>
7431 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7432 Include print-utils.h.
7433 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7434 (plongest, thirty_two, phex_nz): Remove.
7435 * Makefile.in (SFILES): Add common/print-utils.c.
7436 (OBS): Add print-utils.o.
7437 (print-utils-ipa.o): New target.
7438 (print-utils.o): New target.
7439 (IPA_OBJS): Add print-utils-ipa.o.
7441 2014-02-06 Tom Tromey <tromey@redhat.com>
7443 * Makefile.in (SFILES): Fix indentation.
7445 2014-02-05 Doug Evans <dje@google.com>
7447 * linux-low.c (linux_wait_for_event): Improve comment.
7448 (linux_wait_1): Keep current_inferior in sync with event_child.
7450 2014-01-22 Doug Evans <dje@google.com>
7452 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7454 2014-01-22 Doug Evans <dje@google.com>
7456 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7457 * configure: Regenerate.
7458 * config.in: Regenerate.
7459 * Makefile.in (SFILES): Add debug.c.
7461 * debug.c: New file.
7462 * debug.h: New file.
7463 * linux-aarch64-low.c (*): Update all debugging printfs to use
7464 debug_printf instead of fprintf.
7465 * linux-arm-low.c (*): Ditto.
7466 * linux-cris-low.c (*): Ditto.
7467 * linux-crisv32-low.c (*): Ditto.
7468 * linux-m32r-low.c (*): Ditto.
7469 * linux-sparc-low.c (*): Ditto.
7470 * linux-x86.c (*): Ditto.
7471 * linux-low.c (*): Ditto.
7472 (linux_wait_1): Add calls to debug_enter, debug_exit.
7473 (linux_wait): Remove redundant debugging printf.
7474 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7475 (linux_resume, unstop_all_lwps): Ditto.
7476 * mem-break.c (*): Update all debugging printfs to use
7477 debug_printf instead of fprintf.
7478 * remote-utils.c (*): Ditto.
7479 * thread-db.c (*): Ditto.
7480 * server.c #include <ctype.h>, "gdb_vecs.h".
7481 (debug_threads): Moved to debug.c.
7482 (*): Update all debugging printfs to use debug_printf instead of
7484 (start_inferior): Replace call to fflush with call to debug_flush.
7485 (monitor_show_help): Mention set debug-format.
7486 (parse_debug_format_options): New function.
7487 (handle_monitor_command): Handle "monitor set debug-format".
7488 (gdbserver_usage): Mention --debug-format.
7489 (main): Parse --debug-format.
7490 * server.h (debug_threads): Declaration moved to debug.h.
7492 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7493 trace_debug_1 that uses debug_printf.
7494 (tracepoint_look_up_symbols): Update all debugging printfs to use
7495 debug_printf instead of fprintf.
7497 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7499 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7502 2014-01-17 Pedro Alves <palves@redhat.com>
7505 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7506 defined after including gdb_proc_service.h.
7508 2014-01-16 Doug Evans <dje@google.com>
7510 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7511 (match_dll): Use it.
7513 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7515 * target.h (target_ops) <read_btrace>: Change parameters and
7516 return type to allow error reporting.
7517 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7518 trace reading errors on.
7519 * linux-low.c (linux_low_read_btrace): Pass trace reading
7521 (linux_low_disable_btrace): New.
7523 2014-01-15 Doug Evans <dje@google.com>
7525 * inferiors.c (thread_id_to_gdb_id): Delete.
7526 * inferiors.h (thread_id_to_gdb_id): Delete.
7528 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7530 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7531 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7534 2014-01-08 Pedro Alves <palves@redhat.com>
7536 * server.c (handle_status): Don't discard previous queued stop
7537 replies or thread's pending status here.
7538 (main) <disconnection>: Do it here instead.
7540 2014-01-08 Pedro Alves <palves@redhat.com>
7542 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7543 * server.c (visit_actioned_threads, handle_pending_status): New
7545 (handle_v_cont): Factor out parts to ...
7546 (resume): ... this new function. If in all-stop, and a thread
7547 being resumed has a pending status, report it without actually
7549 (myresume): Adjust to use the new 'resume' function.
7550 (clear_pending_status_callback, set_pending_status_callback)
7551 (find_status_pending_thread_callback): New functions.
7552 (handle_status): Handle the case of multiple threads having
7553 interesting statuses to report. Report threads' real last signal
7554 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7555 with an interesting thread to report the status for, instead of
7556 always reporting the status of the first thread.
7558 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7560 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7561 * gdbreplay.c (gdbreplay_version): Likewise.
7563 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7565 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7566 iov.iov_len with the real length in use.
7568 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7570 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7571 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7572 for all targets that use win32-low.c.
7573 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7574 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7576 2013-12-13 Pedro Alves <palves@redhat.com>
7578 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7579 if equal to TARGET_WAITKIND_LOADED.
7580 * win32-low.c (cached_status): New static global.
7581 (win32_wait): Add declaration.
7582 (do_initial_child_stuff): Flush all initial pending debug events
7583 up to the initial breakpoint.
7584 (win32_wait): If CACHED_STATUS was set, return that instead
7585 of doing a real wait. Remove the code resuming the execution
7586 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7587 during the initial phase. Also remove the code changing
7588 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7589 TARGET_WAITKIND_STOPPED.
7591 2013-12-11 Yao Qi <yao@codesourcery.com>
7593 * notif.c (handle_notif_ack): Return 0 if no notification
7596 2013-11-20 Doug Evans <dje@google.com>
7598 * linux-low.c (linux_set_resume_request): Fix comment.
7600 2013-11-20 Doug Evans <dje@google.com>
7602 * linux-low.c (resume_status_pending_p): Tweak comment.
7604 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7606 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7607 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7608 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7609 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7610 (srv_amd64_regobj): Add amd64-mpx.o.
7611 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7612 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7613 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7614 * i387-fp.c (num_pl_bnd_register) Added constant.
7615 (num_pl_bnd_cfg_registers) Added constant.
7616 (struct i387_xsave) Added reserved area and MPX fields.
7617 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7618 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7620 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7621 (init_registers_amd64_mpx_linux): Declare new function.
7622 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7623 (x86_64_regmap): Add MPX registers.
7624 (x86_linux_read_description): Add MPX case.
7625 (initialize_low_arch): Initialize MPX targets.
7627 2013-11-18 Tom Tromey <tromey@redhat.com>
7629 * configure: Rebuild.
7630 * configure.ac: Don't check for stdlib.h.
7631 * gdbreplay.c: Unconditionally include stdlib.h.
7633 2013-11-18 Tom Tromey <tromey@redhat.com>
7635 * config.in: Rebuild.
7636 * configure: Rebuild.
7637 * configure.ac: Don't use AC_HEADER_DIRENT.
7639 2013-11-18 Tom Tromey <tromey@redhat.com>
7641 * server.h: Don't check HAVE_STRING_H.
7642 * gdbreplay.c: Don't check HAVE_STRING_H.
7643 * configure: Rebuild.
7645 2013-11-18 Tom Tromey <tromey@redhat.com>
7647 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7650 2013-11-08 Tom Tromey <tromey@redhat.com>
7652 * configure, config.in: Rebuild.
7653 * configure.ac: Remove unused configury.
7655 2013-11-08 Tom Tromey <tromey@redhat.com>
7657 * acinclude.m4: Include common.m4, codeset.m4.
7658 * configure, config.in: Rebuild.
7659 * configure.ac: Use GDB_AC_COMMON.
7661 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7663 * linux-s390-low.c (HWCAP_S390_TE): New define.
7664 (s390_arch_setup): Consider the TE field in the HWCAP for
7665 determining 'have_regset_tdb'.
7667 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7670 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7673 2013-10-02 Pedro Alves <palves@redhat.com>
7675 * server.c (process_serial_event): Don't output "GDBserver
7676 exiting" if GDB is connected through stdio.
7677 * target.c (mywait): Likewise, be silent if GDB is connected
7680 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7682 * lynx-low.c (lynx_add_threads_after_attach): New function.
7683 (lynx_attach): Remove call to add_thread. Add call to
7684 lynx_add_threads_after_attach instead.
7686 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7688 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7689 * config.in, configure: Regenerated.
7691 2013-09-18 Yao Qi <yao@codesourcery.com>
7694 * server.c (start_inferior): Clear 'resume_info'.
7696 2013-09-16 Jiong Wang <jiwang@tilera.com>
7698 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7701 2013-09-16 Jiong Wang <jiwang@tilera.com>
7703 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7704 linux-tile-low.o to srv_tgtobj.
7706 2013-09-16 Will Newton <will.newton@linaro.org>
7708 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7711 2013-09-06 Pedro Alves <palves@redhat.com>
7713 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7714 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7715 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7716 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7717 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7718 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7720 2013-09-06 Pedro Alves <palves@redhat.com>
7722 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7723 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7725 2013-09-06 Pedro Alves <palves@redhat.com>
7727 * linux-amd64-ipa.c: Include tracepoint.h.
7728 * linux-i386-ipa.c: Include tracepoint.h.
7730 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7732 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7733 (ps_get_thread_area): New function.
7735 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7737 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7738 (initialize_low_arch): Call init_registers_crisv32 rather than
7739 init_register_crisv32.
7741 2013-09-05 Pedro Alves <palves@redhat.com>
7743 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7745 * hostio.h: ... this new file.
7746 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7747 win32-low.c: Include hostio.h.
7749 2013-09-05 Pedro Alves <palves@redhat.com>
7751 * server.h (gdb_client_data, handler_func, callback_handler_func)
7752 (delete_file_handler, add_file_handler, append_callback_event)
7753 (delete_callback_event, start_event_loop, initialize_event_loop):
7754 Move to event-loop.h and include it.
7755 * event-loop.h: New file.
7757 2013-09-05 Pedro Alves <palves@redhat.com>
7759 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7760 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7761 (loaded_dll, unloaded_dll): Move to ...
7762 * dll.h: ... this new file.
7763 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7765 2013-09-05 Pedro Alves <palves@redhat.com>
7767 * server.h (current_process, get_thread_process, all_processes)
7768 (add_inferior_to_list, for_each_inferior, current_inferior)
7769 (remove_inferior, add_process, remove_process, find_process_pid)
7770 (have_started_inferiors_p, have_attached_inferiors_p)
7771 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7772 (clear_inferiors, find_inferior, find_inferior_id)
7773 (inferior_target_data, set_inferior_target_data)
7774 (inferior_regcache_data, set_inferior_regcache_data): Move to
7775 inferiors.h, and include it.
7776 * inferiors.h: New file.
7778 2013-09-05 Pedro Alves <palves@redhat.com>
7780 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7784 2013-09-05 Pedro Alves <palves@redhat.com>
7786 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7788 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7789 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7790 (handle_tracepoint_general_set, handle_tracepoint_query)
7791 (tracepoint_finished_step, tracepoint_was_hit)
7792 (release_while_stepping_state_list, current_traceframe)
7793 (in_readonly_region, traceframe_read_mem)
7794 (fetch_traceframe_registers, traceframe_read_sdata)
7795 (traceframe_read_info, struct fast_tpoint_collect_status)
7796 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7797 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7798 (supply_fast_tracepoint_registers)
7799 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7800 (ipa_tdesc, claim_trampoline_space)
7801 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7802 (agent_mem_read, agent_get_trace_state_variable_value)
7803 (agent_set_trace_state_variable_value, agent_tsv_read)
7804 (agent_mem_read_string, get_raw_reg_func_addr)
7805 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7806 * tracepoint.h: ... this new file.
7808 2013-09-05 Pedro Alves <palves@redhat.com>
7810 * server.h (perror_with_name, error, fatal, warning, paddress)
7811 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7813 * utils.h: New file.
7815 2013-09-05 Pedro Alves <palves@redhat.com>
7817 * server.h (remote_debug, noack_mode, transport_is_reliable)
7818 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7819 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7820 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7821 (write_enn, initialize_async_io, enable_async_io)
7822 (disable_async_io, check_remote_input_interrupt_request)
7823 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7824 (dead_thread_notify, prepare_resume_reply)
7825 (decode_address_to_semicolon, decode_address, decode_m_packet)
7826 (decode_M_packet, decode_X_packet, decode_xfer_write)
7827 (decode_search_memory_packet, unhexify, hexify)
7828 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7829 (look_up_one_symbol, relocate_instruction)
7830 (monitor_output): Move to remote-utils.h, and include it.
7831 * remote-utils.h: New file.
7833 2013-09-05 Pedro Alves <palves@redhat.com>
7835 * server.h (_): Delete.
7837 2013-09-02 Pedro Alves <palves@redhat.com>
7839 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7840 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7842 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7844 2013-09-02 Pierre Muller <muller@sourceware.org>
7846 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7847 or WriteProcessMemory complete successfully and handle
7848 ERROR_PARTIAL_COPY error.
7850 2013-09-02 Pedro Alves <palves@redhat.com>
7852 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7853 error instead of EIO.
7855 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7858 * linux-low.c: Include filestuff.h.
7859 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7860 * lynx-low.c: Include filestuff.h.
7861 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7862 * server.c: Include filestuff.h.
7863 (main): Call notice_open_fds.
7864 * spu-low.c: Include filestuff.h.
7865 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7867 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7869 * Makefile.in: Explain why ../target and ../nat are not
7870 listed as include file search paths.
7871 (linux-waitpid.o): New object file rule.
7872 * configure.srv (srv_native_linux_obj): New variable.
7873 Replace all occurrences of linux native object files with
7874 $srv_native_linux_obj.
7875 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7876 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7877 (linux_enable_event_reporting): Remove declaration.
7878 (my_waitpid): Moved to common/linux-waitpid.c.
7879 (linux_wait_for_event): Pass ptid when calling
7880 linux_enable_event_reporting.
7881 (linux_supports_tracefork_flag): Remove.
7882 (linux_enable_event_reporting): Likewise.
7883 (linux_tracefork_grandchild): Remove.
7884 (STACK_SIZE): Moved to common/linux-ptrace.c.
7885 (linux_tracefork_child): Remove.
7886 (linux_test_for_tracefork): Remove.
7887 (linux_look_up_symbols): Call linux_supports_traceclone.
7888 (initialize_low): Remove call to linux_test_for_tracefork.
7889 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7890 common/linux-ptrace.h.
7891 (PTRACE_TYPE_ARG4): Likewise.
7892 Include linux-ptrace.h.
7894 2013-08-21 Pedro Alves <palves@redhat.com>
7896 * config.in: Renegerate.
7898 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7900 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7901 (SFILES): Remove $(srcdir)/common/target-common.c and
7902 add $(srcdir)/target/waitstatus.c.
7903 (OBS): Remove target-common.o and add waitstatus.o.
7904 (server_h): Remove $(srcdir)/../common/target-common.h and
7905 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7906 and $(srcdir)/../target/waitstatus.h.
7907 (target-common.o): Remove.
7908 (waitstatus.o): New target object file.
7909 * target.h: Do not include target-common.h and
7910 include target/resume.h, target/wait.h and
7911 target/waitstatus.h.
7913 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7915 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7916 to PTRACE_TYPE_ARG3.
7917 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7918 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7920 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7921 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7923 2013-07-27 Jie Zhang <jie@codesourcery.com>
7924 Daniel Jacobowitz <dan@codesourcery.com>
7925 Yao Qi <yao@codesourcery.com>
7927 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7928 (mips-linux-watch.o): New rule.
7929 (mips_linux_watch_h): New variable.
7930 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7932 * linux-mips-low.c: Include mips-linux-watch.h.
7933 (struct arch_process_info, struct arch_lwp_info): New.
7934 (update_watch_registers_callback): New function.
7935 (mips_linux_new_process, mips_linux_new_thread) New functions.
7936 (mips_linux_prepare_to_resume, mips_insert_point): New
7938 (mips_remove_point, mips_stopped_by_watchpoint): New
7940 (rsp_bp_type_to_target_hw_bp_type): New function.
7941 (mips_stopped_data_address): New function.
7942 (the_low_target): Add watchpoint support functions.
7944 2013-07-27 Yao Qi <yao@codesourcery.com>
7946 * i386-low.c: Include break-common.h.
7947 (enum target_hw_bp_type): Remove.
7949 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7951 * Makefile.in (SFILES): /common/target-common.c.
7952 (OBS): Add target-common.o.
7953 (server_h): Add $(srcdir)/../common/target-common.h.
7954 (target-common.o): New target.
7955 * server.c (queue_stop_reply_callback): Free
7956 status string after use.
7957 * target.c (target_waitstatus_to_string): Remove.
7958 * target.h: Include target-common.h.
7959 (resume_kind): Likewise.
7960 (target_waitkind): Likewise.
7961 (target_waitstatus): Likewise.
7962 (TARGET_WNOHANG): Likewise.
7964 2013-07-04 Yao Qi <yao@codesourcery.com>
7966 * Makefile.in (host_alias): Use @host_noncanonical@.
7967 (target_alias): Use @target_noncanonical@.
7968 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7969 ACX_NONCANONICAL_HOST.
7970 * configure: Regenerated.
7973 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7975 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7976 * configure: Rebuild.
7977 * Makefile.in (version_host, version_target): Get from configure.
7978 (version.c): Use $(version_host) and $(version_target).
7980 2013-07-03 Pedro Alves <palves@redhat.com>
7982 * Makefile.in (config.status): Depend on development.sh.
7983 * acinclude.m4: Include libmcheck.m4.
7984 * configure: Regenerate.
7986 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7988 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7989 attribute inside the parentheses.
7990 (winapi_DebugSetProcessKillOnExit): Ditto.
7991 (winapi_DebugBreakProcess): Ditto.
7992 (winapi_GenerateConsoleCtrlEvent): Ditto.
7994 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7996 * notif.h (notif_event): Add a dummy member to avoid compiler
7999 2013-07-01 Pedro Alves <palves@redhat.com>
8001 * hostio.c (HOSTIO_PATH_MAX): Define.
8002 (require_filename, handle_open, handle_unlink, handle_readlink):
8005 2013-07-01 Pedro Alves <palves@redhat.com>
8007 * server.h: Include "pathmax.h".
8008 * linux-low.c: Don't include sys/param.h.
8009 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8011 * win32-low.c: Don't include sys/param.h.
8012 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8014 2013-07-01 Pedro Alves <palves@redhat.com>
8016 * event-loop.c: Don't check HAVE_UNISTD_H before including
8018 * gdbreplay.c: Likewise.
8019 * remote-utils.c: Likewise.
8020 * server.c: Likewise.
8021 * configure.ac: Don't check for unistd.h.
8022 * configure: Regenerate.
8024 2013-06-28 Tom Tromey <tromey@redhat.com>
8026 * Makefile.in (version.c): Use version.in, not
8029 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8031 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8032 * configure: Rebuild.
8033 * Makefile.in (version_host, version_target): Get from configure.
8034 (version.c): Use $(version_host) and $(version_target).
8036 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8038 Fix trace-status to output user name without trailing colon.
8039 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8041 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8043 Fix trace-status to output proper start-time and stop-time.
8044 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8045 output start time and stop time in hex as gdb expects.
8047 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8049 * tracepoint.c (build_traceframe_info_xml): Output trace state
8050 variables present in the trace buffer.
8052 2013-06-24 Tom Tromey <tromey@redhat.com>
8054 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8056 (version.o): Remove.
8057 * gdbreplay.c: Include version.h.
8058 (version, host_name): Don't declare.
8059 * server.h: Include version.h.
8060 (version, host_name): Don't declare.
8062 2013-06-12 Pedro Alves <palves@redhat.com>
8064 * linux-x86-low.c (linux_is_elf64): Delete global.
8065 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8066 with local linux_pid_exe_is_elf_64_file use.
8068 2013-06-11 Pedro Alves <palves@redhat.com>
8070 * linux-low.c (regset_disabled, disable_regset): New functions.
8071 (regsets_fetch_inferior_registers)
8072 (regsets_store_inferior_registers): Use them.
8073 (initialize_regsets_info); Don't allocate the disabled_regsets
8075 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8078 2013-06-11 Pedro Alves <palves@redhat.com>
8080 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8083 2013-06-11 Pedro Alves <palves@redhat.com>
8085 * linux-x86-low.c (initialize_low_arch): Call
8086 init_registers_x32_avx_linux.
8088 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8090 Fix compatibility with Android Bionic.
8091 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8094 2013-06-07 Pedro Alves <palves@redhat.com>
8097 * Makefile.in (OBS): Add tdesc.o.
8098 (IPA_OBJS): Add tdesc-ipa.o.
8099 (tdesc-ipa.o): New rule.
8100 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8102 * linux-low.c (new_inferior): Delete.
8103 (disabled_regsets, num_regsets): Delete.
8104 (linux_add_process): Adjust to set the new per-process
8106 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8107 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8108 was a stop. When calling arch_setup, switch the current inferior
8109 to the thread that got an event.
8110 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8111 (regsets_fetch_inferior_registers)
8112 (regsets_store_inferior_registers): New regsets_info parameter.
8114 (linux_register_in_regsets): New regs_info parameter. Adjust to
8116 (register_addr, fetch_register, store_register): New usrregs_info
8117 parameter. Adjust to use it.
8118 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8119 parameter regs_info. Adjust to use it.
8120 (linux_fetch_registers): Get the current inferior's regs_info, and
8122 (linux_store_registers): Ditto.
8123 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8124 (initialize_low): Don't initialize the target_regsets here. Call
8125 initialize_low_arch.
8126 * linux-low.h (target_regsets): Delete declaration.
8127 (struct regsets_info): New.
8128 (struct usrregs_info): New.
8129 (struct regs_info): New.
8130 (struct process_info_private) <new_inferior>: New field.
8131 (struct linux_target_ops): Delete the num_regs, regmap, and
8132 regset_bitmap fields. New field regs_info.
8133 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8134 * i387-fp.c (num_xmm_registers): Delete.
8135 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8136 calls to new interface.
8137 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8138 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8139 Infer the number of xmm registers from the regcache's target
8141 * i387-fp.h (num_xmm_registers): Delete.
8142 * inferiors.c (add_thread): Don't install the thread's regcache
8144 * proc-service.c (gregset_info): Fetch the current inferior's
8145 regs_info. Adjust to use it.
8146 * regcache.c: Include tdesc.h.
8147 (register_bytes, reg_defs, num_registers)
8148 (gdbserver_expedite_regs): Delete.
8149 (get_thread_regcache): If the thread doesn't have a regcache yet,
8150 create one, instead of aborting gdbserver.
8151 (regcache_invalidate_one): Rename to ...
8152 (regcache_invalidate_thread): ... this.
8153 (regcache_invalidate_one): New.
8154 (regcache_invalidate): Only invalidate registers of the current
8156 (init_register_cache): Add target_desc parameter, and use it.
8157 (new_register_cache): Ditto. Assert the target description has a
8158 non zero registers_size.
8159 (regcache_cpy): Add assertions. Adjust.
8160 (realloc_register_cache, set_register_cache): Delete.
8161 (registers_to_string, registers_from_string): Adjust.
8162 (find_register_by_name, find_regno, find_register_by_number)
8163 (register_cache_size): Add target_desc parameter, and use it.
8164 (free_register_cache_thread, free_register_cache_thread_one)
8165 (regcache_release, register_cache_size): New.
8166 (register_size): Add target_desc parameter, and use it.
8167 (register_data, supply_register, supply_register_zeroed)
8168 (supply_regblock, supply_register_by_name, collect_register)
8169 (collect_register_as_string, collect_register_by_name): Adjust.
8170 * regcache.h (struct target_desc): Forward declare.
8171 (struct regcache) <tdesc>: New field.
8172 (init_register_cache, new_register_cache): Add target_desc
8174 (regcache_invalidate_thread): Declare.
8175 (regcache_invalidate_one): Delete declaration.
8176 (regcache_release): Declare.
8177 (find_register_by_number, register_cache_size, register_size)
8178 (find_regno): Add target_desc parameter.
8179 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8181 * remote-utils.c: Include tdesc.h.
8182 (outreg, prepare_resume_reply): Adjust.
8183 * server.c: Include tdesc.h.
8184 (gdbserver_xmltarget): Delete declaration.
8185 (get_features_xml, process_serial_event): Adjust.
8186 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8188 (struct process_info) <tdesc>: New field.
8189 (ipa_tdesc): Declare.
8190 * tdesc.c: New file.
8191 * tdesc.h: New file.
8192 * tracepoint.c: Include tdesc.h.
8193 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8194 (get_context_regcache): Adjust to pass ipa_tdesc down.
8195 (do_action_at_tracepoint): Adjust to get the register cache size
8196 from the context regcache's description.
8197 (traceframe_walk_blocks): Adjust to get the register cache size
8198 from the current trace frame's description.
8199 (traceframe_get_pc): Adjust to get current trace frame's
8200 description and pass it down.
8201 (gdb_collect): Adjust to get the register cache size from the
8203 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8204 (gdbserver_xmltarget): Delete.
8205 (initialize_low_tracepoint): Set the ipa's target description.
8206 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8207 (initialize_low_tracepoint): Set the ipa's target description.
8208 * linux-x86-low.c: Include tdesc.h.
8209 [__x86_64__] (is_64bit_tdesc): New.
8210 (ps_get_thread_area, x86_get_thread_area): Use it.
8211 (i386_cannot_store_register): Rename to ...
8212 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8213 (i386_cannot_fetch_register): Rename to ...
8214 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8215 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8217 (target_regsets): Rename to ...
8218 (x86_regsets): ... this.
8219 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8221 (x86_siginfo_fixup): Use is_64bit_tdesc.
8222 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8223 (tdesc_x32_avx_linux, tdesc_x32_linux)
8224 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8226 (x86_linux_update_xmltarget): Delete.
8227 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8228 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8229 (AMD64_LINUX_USER64_CS): New.
8230 (x86_linux_read_description): New, based on
8231 x86_linux_update_xmltarget.
8232 (same_process_callback): New.
8233 (x86_arch_setup_process_callback): New.
8234 (x86_linux_update_xmltarget): New.
8235 (x86_regsets_info): New.
8236 (amd64_linux_regs_info): New.
8237 (i386_linux_usrregs_info): New.
8238 (i386_linux_regs_info): New.
8239 (x86_linux_regs_info): New.
8240 (x86_arch_setup): Reimplement.
8241 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8242 (x86_emit_ops): Ditto.
8243 (the_low_target): Adjust. Install x86_linux_regs_info,
8244 x86_cannot_fetch_register, and x86_cannot_store_register.
8245 (initialize_low_arch): New.
8246 * linux-ia64-low.c (tdesc_ia64): Declare.
8247 (ia64_fetch_register): Adjust.
8248 (ia64_usrregs_info, regs_info): New globals.
8249 (ia64_regs_info): New function.
8250 (the_low_target): Adjust.
8251 (initialize_low_arch): New function.
8252 * linux-sparc-low.c (tdesc_sparc64): Declare.
8253 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8255 (sparc_arch_setup): New function.
8256 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8257 (the_low_target): Adjust.
8258 (initialize_low_arch): New function.
8259 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8260 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8261 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8262 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8263 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8264 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8265 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8266 (tdesc_powerpc_isa205_vsx64l): Declare.
8267 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8268 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8269 (ppc_set_pc, ppc_get_hwcap): Adjust.
8270 (ppc_usrregs_info): Forward declare.
8271 (!__powerpc64__) ppc_regmap_adjusted: New global.
8272 (ppc_arch_setup): Adjust to the current process'es target
8274 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8275 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8276 (ppc_store_evrregset): Adjust.
8277 (target_regsets): Rename to ...
8278 (ppc_regsets): ... this, and make static.
8279 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8280 (ppc_regs_info): New function.
8281 (the_low_target): Adjust.
8282 (initialize_low_arch): New function.
8283 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8284 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8285 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8286 (tdesc_s390x_linux64v2): Declare.
8287 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8288 (s390_fill_gregset, s390_store_last_break): Adjust.
8289 (target_regsets): Rename to ...
8290 (s390_regsets): ... this, and make static.
8291 (s390_get_pc, s390_set_pc): Adjust.
8292 (s390_get_hwcap): New target_desc parameter, and use it.
8293 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8294 (s390_arch_setup): Adjust to set the current process'es target
8295 description. Don't adjust the regmap.
8296 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8297 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8298 (regs_info_3264): New globals.
8299 (s390_regs_info): New function.
8300 (the_low_target): Adjust.
8301 (initialize_low_arch): New function.
8302 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8303 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8304 [__mips64] (init_registers_mips_linux)
8305 (init_registers_mips_dsp_linux): Delete defines.
8306 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8307 (have_dsp): New global.
8308 (mips_read_description): New, based on mips_arch_setup.
8309 (mips_arch_setup): Reimplement.
8310 (get_usrregs_info): New function.
8311 (mips_cannot_fetch_register, mips_cannot_store_register)
8312 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8313 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8314 (target_regsets): Rename to ...
8315 (mips_regsets): ... this, and make static.
8316 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8317 (dsp_regs_info, regs_info): New globals.
8318 (mips_regs_info): New function.
8319 (the_low_target): Adjust.
8320 (initialize_low_arch): New function.
8321 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8322 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8324 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8325 (arm_read_description): New, with bits factored from
8327 (arm_arch_setup): Reimplement.
8328 (target_regsets): Rename to ...
8329 (arm_regsets): ... this, and make static.
8330 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8331 (arm_regs_info): New function.
8332 (the_low_target): Adjust.
8333 (initialize_low_arch): New function.
8334 * linux-m68k-low.c (tdesc_m68k): Declare.
8335 (target_regsets): Rename to ...
8336 (m68k_regsets): ... this, and make static.
8337 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8338 (m68k_regs_info): New function.
8339 (m68k_arch_setup): New function.
8340 (the_low_target): Adjust.
8341 (initialize_low_arch): New function.
8342 * linux-sh-low.c (tdesc_sharch): Declare.
8343 (target_regsets): Rename to ...
8344 (sh_regsets): ... this, and make static.
8345 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8346 (sh_regs_info, sh_arch_setup): New functions.
8347 (the_low_target): Adjust.
8348 (initialize_low_arch): New function.
8349 * linux-bfin-low.c (tdesc_bfin): Declare.
8350 (bfin_arch_setup): New function.
8351 (bfin_usrregs_info, regs_info): New globals.
8352 (bfin_regs_info): New function.
8353 (the_low_target): Adjust.
8354 (initialize_low_arch): New function.
8355 * linux-cris-low.c (tdesc_cris): Declare.
8356 (cris_arch_setup): New function.
8357 (cris_usrregs_info, regs_info): New globals.
8358 (cris_regs_info): New function.
8359 (the_low_target): Adjust.
8360 (initialize_low_arch): New function.
8361 * linux-cris-low.c (tdesc_crisv32): Declare.
8362 (cris_arch_setup): New function.
8363 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8364 (cris_regs_info): New function.
8365 (the_low_target): Adjust.
8366 (initialize_low_arch): New function.
8367 * linux-m32r-low.c (tdesc_m32r): Declare.
8368 (m32r_arch_setup): New function.
8369 (m32r_usrregs_info, regs_info): New globals.
8370 (m32r_regs_info): Adjust.
8371 (initialize_low_arch): New function.
8372 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8373 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8374 (tic6x_usrregs_info): Forward declare.
8375 (tic6x_read_description): New function, based on ...
8376 (tic6x_arch_setup): ... this. Reimplement.
8377 (target_regsets): Rename to ...
8378 (tic6x_regsets): ... this, and make static.
8379 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8380 (tic6x_regs_info): New function.
8381 (the_low_target): Adjust.
8382 (initialize_low_arch): New function.
8383 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8384 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8385 (target_regsets): Rename to ...
8386 (xtensa_regsets): ... this, and make static.
8387 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8389 (xtensa_arch_setup, xtensa_regs_info): New functions.
8390 (the_low_target): Adjust.
8391 (initialize_low_arch): New function.
8392 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8393 (nios2_arch_setup): Set the current process'es tdesc.
8394 (target_regsets): Rename to ...
8395 (nios2_regsets): ... this.
8396 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8397 (nios2_regs_info): New function.
8398 (the_low_target): Adjust.
8399 (initialize_low_arch): New function.
8400 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8401 (aarch64_arch_setup): Set the current process'es tdesc.
8402 (target_regsets): Rename to ...
8403 (aarch64_regsets): ... this.
8404 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8405 (aarch64_regs_info): New function.
8406 (the_low_target): Adjust.
8407 (initialize_low_arch): New function.
8408 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8410 (target_regsets): Rename to ...
8411 (tile_regsets): ... this.
8412 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8413 (tile_regs_info): New function.
8414 (tile_arch_setup): Set the current process'es tdesc.
8415 (the_low_target): Adjust.
8416 (initialize_low_arch): New function.
8417 * spu-low.c (tdesc_spu): Declare.
8418 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8419 * win32-arm-low.c (tdesc_arm): Declare.
8420 (arm_arch_setup): New function.
8421 (the_low_target): Install arm_arch_setup instead of
8423 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8424 (init_windows_x86): Rename to ...
8425 (i386_arch_setup): ... this. Set `win32_tdesc'.
8426 (the_low_target): Adjust.
8427 * win32-low.c (win32_tdesc): New global.
8428 (child_add_thread): Don't create the thread cache here.
8429 (do_initial_child_stuff): Set the new process'es tdesc.
8430 * win32-low.h (struct target_desc): Forward declare.
8431 (win32_tdesc): Declare.
8432 * lynx-i386-low.c (tdesc_i386): Declare global.
8433 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8434 * lynx-low.c (lynx_tdesc): New global.
8435 (lynx_add_process): Set the new process'es tdesc.
8436 * lynx-low.h (struct target_desc): Forward declare.
8437 (lynx_tdesc): Declare global.
8438 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8439 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8440 * nto-low.c (nto_tdesc): New global.
8441 (do_attach): Set the new process'es tdesc.
8442 * nto-low.h (struct target_desc): Forward declare.
8443 (nto_tdesc): Declare.
8444 * nto-x86-low.c (tdesc_i386): Declare.
8445 (nto_x86_arch_setup): Set `nto_tdesc'.
8447 2013-06-04 Gary Benson <gbenson@redhat.com>
8449 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8450 to qSupported response when appropriate.
8451 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8452 with nonzero-length annex.
8453 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8454 arguments supplied in annex.
8456 2013-05-31 Doug Evans <dje@google.com>
8459 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8460 64 bits in 64-cross-32 environment.
8462 2013-05-28 Pedro Alves <palves@redhat.com>
8464 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8465 (aarch64-without-fpu.c): Delete rule.
8466 * configure.srv (aarch64*-*-linux*): Remove references to
8467 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8468 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8471 2013-05-24 Pedro Alves <palves@redhat.com>
8473 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8474 instead of strchr/decode_address. Error if the range isn't split
8475 with a ','. Don't assume there's be a ':' in the action.
8477 2013-05-23 Yao Qi <yao@codesourcery.com>
8478 Pedro Alves <palves@redhat.com>
8480 * linux-low.c (lwp_in_step_range): New function.
8481 (linux_wait_1): If the thread was range stepping and stopped
8482 outside the stepping range, report the stop to GDB. Otherwise,
8483 continue stepping. Add range stepping debug output.
8484 (linux_set_resume_request): Copy the step range from the resume
8486 (linux_supports_range_stepping): New.
8487 (linux_target_ops) <supports_range_stepping>: Set to
8488 linux_supports_range_stepping.
8489 * linux-low.h (struct linux_target_ops)
8490 <supports_range_stepping>: New field.
8491 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8492 * linux-x86-low.c (x86_supports_range_stepping): New.
8493 (the_low_target) <supports_range_stepping>: Set to
8494 x86_supports_range_stepping.
8495 * server.c (handle_v_cont): Handle 'r' action.
8496 (handle_v_requests): Append ";r" if the target supports range
8498 * target.h (struct thread_resume) <step_range_start,
8499 step_range_end>: New fields.
8500 (struct target_ops) <supports_range_stepping>:
8502 (target_supports_range_stepping): New macro.
8504 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8506 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8507 confusion in comment.
8509 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8511 * lynx-low.c (struct process_info_private): New type.
8512 (lynx_add_process): New function.
8513 (lynx_create_inferior, lynx_attach): Replace calls to
8514 add_process by calls to lynx_add_process.
8515 (lynx_resume): If PTID is null, then try using
8516 current_process()->private->last_wait_event_ptid.
8518 (lynx_clear_inferiors): Delete. The contents of that function
8519 has been inlined in lynx_mourn;
8520 (lynx_wait_1): Save the ptid in the process's private data.
8521 (lynx_mourn): Free the process' private data. Replace call
8522 to lynx_clear_inferiors by call to clear_inferiors.
8524 2013-05-17 Yao Qi <yao@codesourcery.com>
8526 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8529 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8531 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8532 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8533 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8534 PT_TEXT_END_ADDR guards. Update comments.
8535 (linux_target_op) <read_offsets>: Conditionally define to
8536 linux_read_offsets if the target is UCLIBC and if it defines
8537 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8539 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8540 Andrew Jenner <andrew@codesourcery.com>
8542 * Makefile.in (SFILES): Add linux-nios2-low.c.
8543 (clean): Add action to delete nios2-linux.c.
8544 (nios2-linux.c): New rule.
8545 * configure.srv: Add nios2*-*-linux*.
8546 * linux-nios2-low.c: New.
8548 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8550 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8552 2013-04-25 Hui Zhu <hui@codesourcery.com>
8555 * ax.c (ax_printf): Add fflush.
8557 2013-04-22 Tom Tromey <tromey@redhat.com>
8559 * Makefile.in (SFILES): Add filestuff.c.
8560 (OBS): Add filestuff.o.
8561 (filestuff.o): New target.
8562 * config.in, configure: Rebuild.
8563 * configure.ac: Check for fdwalk, pipe2.
8565 2013-04-17 Pedro Alves <palves@redhat.com>
8567 * configure.ac (USE_THREAD_DB): Delete variable.
8568 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8569 Don't AC_SUBST USE_THREAD_DB.
8570 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8571 * config.in, configure: Regenerate.
8573 2013-04-16 Pedro Alves <palves@redhat.com>
8575 * linux-low.h (struct lwp_info) <thread_known>: Move under
8576 the USE_THREAD_DB #ifdef.
8578 2013-04-16 Pedro Alves <palves@redhat.com>
8580 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8581 (linux-low.o): Delete rule.
8582 * linux-low.h: Always include "gdb_thread_db.h" instead of
8583 conditionally including thread_db.h.
8584 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8587 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8589 * Makefile.in (install-only): Fix make install regression.
8591 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8593 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8594 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8596 * gdbserver.1: Remove.
8598 2013-03-22 Pedro Alves <palves@redhat.com>
8600 * linux-low.c (handle_extended_wait): Don't call
8601 linux_enable_event_reporting.
8603 2013-03-15 Tony Theodore <tonyt@logyst.com>
8606 * Makefile.in (SHELL): Use @SHELL@.
8608 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8610 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8613 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8615 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8616 Remove extraneous NULL element.
8618 2013-03-13 Yao Qi <yao@codesourcery.com>
8620 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8621 'V' block in trace frame.
8623 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8625 * target.h (struct target_ops): Add btrace ops.
8626 (target_supports_btrace): New macro.
8627 (target_enable_btrace): New macro.
8628 (target_disable_btrace): New macro.
8629 (target_read_btrace): New macro.
8630 * gdbthread.h (struct thread_info): Add btrace field.
8631 * server.c: Include btrace-common.h.
8632 (handle_btrace_general_set): New function.
8633 (handle_btrace_enable): New function.
8634 (handle_btrace_disable): New function.
8635 (handle_general_set): Call handle_btrace_general_set.
8636 (handle_qxfer_btrace): New function.
8637 (struct qxfer qxfer_packets[]): Add btrace entry.
8638 * inferiors.c (remove_thread): Disable btrace.
8639 * linux-low: Include linux-btrace.h.
8640 (linux_low_enable_btrace): New function.
8641 (linux_low_read_btrace): New function.
8642 (linux_target_ops): Add btrace ops.
8643 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8644 Add srv_linux_btrace=yes.
8645 (x86_64-*-linux*): Add linux-btrace.o.
8646 Add srv_linux_btrace=yes.
8647 * configure.ac: Define HAVE_LINUX_BTRACE.
8648 * config.in: Regenerated.
8649 * configure: Regenerated.
8651 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8653 * server.c (handle_qxfer): Preserve error message if -3 is
8655 (qxfer): Document the -3 return value.
8657 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8659 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8660 (linux_btrace_h): New variable.
8661 (linux-btrace.o): New rule.
8663 2013-03-08 Stan Shebs <stan@codesourcery.com>
8664 Hafiz Abid Qadeer <abidh@codesourcery.com>
8666 * tracepoint.c (trace_buffer_size): New global.
8667 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8668 (init_trace_buffer): Change to one-argument function. Allocate
8669 trace buffer memory.
8670 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8671 handle QTBuffer:size packet.
8672 (cmd_bigqtbuffer_size): New function.
8673 (initialize_tracepoint): Call init_trace_buffer with
8674 DEFAULT_TRACE_BUFFER_SIZE.
8675 * server.c (handle_query): Add QTBuffer:size in the
8678 2013-03-07 Yao Qi <yao@codesourcery.com>
8680 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8681 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8683 (cmd_qtsp): Adjust condition. Do post increment.
8684 Set cur_action and cur_step_action back to 0.
8686 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8689 * linux-low.c (linux_write_memory): Return early success if LEN is
8692 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8694 * configure.srv: Add x86_64-*-cygwin* as target.
8696 2013-02-28 Tom Tromey <tromey@redhat.com>
8698 * configure.ac: Invoke AC_SYS_LARGEFILE.
8699 * configure, config.in: Rebuild.
8701 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8703 * win32-low.c: Throughout, fix format strings and casts of
8704 printf-like functions to avoid type related warnings on all
8706 (get_child_debug_event): Print dwDebugEventCode as hex since
8707 that's how it's usually documented.
8709 2013-02-28 Yao Qi <yao@codesourcery.com>
8711 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8714 2013-02-27 Jiong Wang <jiwang@tilera.com>
8716 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8717 (reg-tilegx32.c): New rule.
8718 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8719 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8720 different register info initializer according to elf class.
8721 (init_registers_tilgx32): New function. The tilegx32 register info
8723 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8724 (tile_store_gregset): Likewise.
8726 2013-02-27 Yao Qi <yao@codesourcery.com>
8728 * server.c (process_point_options): Print debug message when
8729 debug_threads is true.
8731 2013-02-26 Yao Qi <yao@codesourcery.com>
8733 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8735 2013-02-19 Pedro Alves <palves@redhat.com>
8736 Kai Tietz <ktietz@redhat.com>
8740 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8741 instead of strtoul to extract address from packet.
8742 (process_serial_event) <'z'>: Likewise.
8744 2013-02-18 Yao Qi <yao@codesourcery.com>
8746 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8748 2013-02-14 Pedro Alves <palves@redhat.com>
8752 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8753 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8755 2013-02-14 Pedro Alves <palves@redhat.com>
8757 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8759 2013-02-14 Pedro Alves <palves@redhat.com>
8761 * tracepoint.c (save_string): Delete.
8762 (add_tracepoint_action): Use savestring instead of save_string.
8764 2013-02-12 Pedro Alves <palves@redhat.com>
8766 * linux-xtensa-low.c: Ditto.
8767 * xtensa-xtregs.c: Ditto.
8769 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8771 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8774 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8776 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8777 aarch64_num_wp_regs and aarch64_num_bp_regs to
8778 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8780 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8782 * linux-aarch64-low.c (ps_get_thread_area): Replace
8783 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8785 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8786 Marcus Shawcroft <marcus.shawcroft@arm.com>
8787 Nigel Stephens <nigel.stephens@arm.com>
8788 Yufeng Zhang <yufeng.zhang@arm.com>
8790 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8791 (aarch64.c, aarch64-without-fpu.c): New targets.
8792 * configure.srv (aarch64*-*-linux*): New.
8793 * linux-aarch64-low.c: New file.
8795 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8797 * linux-low.c (handle_extended_wait, linux_create_inferior)
8798 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8799 (dequeue_one_deferred_signal, linux_resume_one_thread)
8800 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8801 (linux_tracefork_grandchild, linux_test_for_tracefork)
8802 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8803 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8804 where the argument is 0.
8806 2013-01-25 Yao Qi <yao@codesourcery.com>
8808 * event-loop.c: Include "queue.h".
8809 (gdb_event_p): New typedef.
8810 (struct gdb_event) <next_event>: Remove.
8811 (event_queue): Change to QUEUE(gdb_event_p).
8812 (async_queue_event): Remove.
8813 (gdb_event_xfree): New.
8814 (initialize_event_loop): New.
8815 (process_event): Use API from QUEUE.
8816 (wait_for_event): Likewise.
8817 * server.c (main): Call initialize_event_loop.
8818 * server.h (initialize_event_loop): Declare.
8820 2013-01-18 Yao Qi <yao@codesourcery.com>
8822 * ax.h (struct eval_agent_expr_context): New.
8823 (gdb_eval_agent_expr): Update declaration.
8824 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8825 TFRAME. Add new argument CTX.
8826 * server.h (struct eval_agent_expr_context): Declare.
8827 (agent_mem_read, agent_tsv_read): Update declaration.
8828 (agent_mem_read_string): Likewise.
8829 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8830 (add_traceframe_block): Add new argument TPOINT.
8831 Increase TPOINT->traceframe_usage.
8832 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8833 eval_tracepoint_agent_expr.
8834 (condition_true_at_tracepoint): Likewise.
8835 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8836 (agent_mem_read_string, agent_tsv_read): Likewise.
8838 2013-01-16 Yao Qi <yao@codesourcery.com>
8840 * linux-low.c (linux_resume_one_lwp): Don't check
8841 'lwp->bp_reinsert != 0'.
8843 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8844 Pedro Alves <palves@redhat.com>
8846 * lynx-low.c (ptrace_request_to_str): Define a temporary
8847 macro and use it to simplify this function's implementation.
8849 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8851 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8854 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8856 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8858 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8860 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8862 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8864 * lynx-low.c (lynx_resume): Use the resume_info parameter
8865 to determine the ptid for the lynx_ptrace call, unless
8866 it is equal to minus_one_ptid, in which case we use the
8867 ptid of the current_inferior.
8868 (lynx_wait_1): After having received a thread create/exit
8869 event, resume the inferior's execution using the signaling
8870 thread's ptid, rather than the old ptid.
8872 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8874 * lynx-low.c (lynx_resume): Delete variable ret.
8876 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8878 * gdbreplay.c (gdbreplay_version): Update copyright year.
8879 * server.c (gdbserver_version): Likewise.
8881 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8883 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8886 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8888 * lynx-low.c (ptrace_request_to_str): Add handling for
8891 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8893 * lynx-low.c (lynx_attach): Delete variable new_process.
8895 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8897 * lynx-low.c (lynx_create_inferior): Delete variable
8900 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8902 * lynx-low.c (ptrace_request_to_str): Do not handle
8903 PTRACE_GETTHREADLIST if this macro does not exist.
8905 2012-12-15 Yao Qi <yao@codesourcery.com>
8907 * Makefile.in (OBS): Add notif.o.
8908 * notif.c, notif.h: New.
8909 * server.c: Include "notif.h".
8910 (struct vstop_notif) <next>: Remove.
8912 (queue_stop_reply): Update.
8913 (push_event, send_next_stop_reply): Remove.
8914 (discard_queued_stop_replies): Update.
8915 (notif_stop): New variable.
8916 (handle_v_stopped): Remove.
8917 (handle_v_requests): Don't call handle_v_stopped. Call
8918 handle_ack_notif instead.
8919 (queue_stop_reply_callback): Call notif_event_enque instead
8920 of queue_stop_reply.
8921 (handle_status): Don't call send_next_stop_reply, call
8922 notif_write_event instead.
8923 (kill_inferior_callback): Likewise.
8924 (detach_or_kill_inferior_callback): Likewise.
8925 (main): Call initialize_notif.
8926 (process_serial_event): Call QUEUE_is_empty.
8927 (handle_target_event): Call notif_push instead of push event.
8928 * server.h (push_event): Remove declaration.
8930 2012-12-10 Tom Tromey <tromey@redhat.com>
8932 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8933 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8936 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8937 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8938 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8939 (amd64-linux-ipa.o, ax.o): Rewrite.
8940 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8941 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8942 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8943 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8944 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8945 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8946 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8947 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8948 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8949 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8950 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8951 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8952 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8953 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8954 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8955 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8956 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8957 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8958 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8959 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8960 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8961 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8962 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8963 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8964 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8965 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8966 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8967 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8968 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8969 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8970 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8971 (reg-tilegx.o): Remove.
8972 (all_object_files): New macro.
8973 Include .deps files.
8974 * aclocal.m4, configure: Rebuild.
8975 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8976 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8977 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8979 2012-12-05 Tom Tromey <tromey@redhat.com>
8982 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8984 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8986 * configure.ac: Check for linux/perf_event.h.
8987 * config.in: Regenerated.
8988 * configure: Regenerated.
8990 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8992 * hostio.c (handle_readlink): Decrease buffer size
8993 parameter passed to readlink by one byte.
8995 2012-11-26 Yao Qi <yao@codesourcery.com>
8997 * configure.ac (build_warnings): Append '-Wempty-body'.
8998 * configure: Regenerated.
8999 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9002 2012-11-15 Pierre Muller <muller@sourceware.org>
9004 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9005 * config.in: Regenerate.
9006 * configure: Regenerate.
9007 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9008 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9009 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9010 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9012 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9013 instead of <sys/wait.h> header.
9014 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9016 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9018 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9019 (various make rules): Remove -DGDBSERVER
9021 2012-11-09 Yao Qi <yao@codesourcery.com>
9023 * spu-low.c (current_ptid): Move it to ..
9024 * gdbthread.h: ... here. New.
9025 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9026 * server.c (myresume, process_serial_event): Likewise.
9027 * thread-db.c (thread_db_find_new_threads): Likewise.
9028 * tracepoint.c (run_inferior_command): Likewise.
9030 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9032 * server.c (handle_search_memory_1): Include access length in
9035 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9037 * linux-crisv32-low.c: Fix compile errors.
9039 2012-09-04 Yao Qi <yao@codesourcery.com>
9041 * tracepoint.c (cmd_qtsv): Adjust debug message.
9042 Don't check CUR_TPOINT.
9044 2012-08-28 Yao Qi <yao@codesourcery.com>
9046 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9047 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9048 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9049 Remove declarations of xmalloc, xreallloc, xstrdup and
9051 * Makefile.in (libiberty_h): New.
9052 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9053 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9055 2012-08-23 Yao Qi <yao@codesourcery.com>
9057 * server.h: Remove declaration of 'xsnprintf'.
9059 2012-08-22 Keith Seitz <keiths@redhat.com>
9061 * server.h: Include build-gnulib-gbserver/config.h.
9062 * gdbreplay.c: Likewise.
9064 2012-08-08 Doug Evans <dje@google.com>
9066 * Makefile.in (SFILES): Add gdb_vecs.c.
9067 (OBS): Add gdb_vecs.o.
9068 (gdb_vecs_h, host_defs_h): New variables.
9069 (thread-db.o): Add $(gdb_vecs_h) dependency.
9070 (gdb_vecs.o): New rule.
9071 * thread-db.c: #include "gdb_vecs.h".
9072 (thread_db_load_search): Use a vector to iterate over path elements.
9073 Handle text appearing after "$pdir".
9075 * configure.ac: Add check for strstr.
9076 * config.in: Regenerate.
9077 * configure: Regenerate.
9079 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9081 * hostio.c (handle_pread): If pread fails, fall back to attempting
9083 (handle_pwrite): Likewise for pwrite.
9085 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9087 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9088 between unsupported TYPE and unimplementable ADDR/LEN combination.
9089 (arm_insert_point): Act on new return value.
9091 2012-07-31 Pedro Alves <palves@redhat.com>
9093 * server.c (process_point_options): Only skip tokens if we find
9094 one that is unrecognized. Don't treat 'X' specially while
9095 skipping unrecognized tokens.
9097 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9099 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9100 to 4-byte-align HW breakpoint addresses for Thumb.
9102 2012-07-27 Yao Qi <yao@codesourcery.com>
9106 * server.h: Declare gdb_agent_about_to_close.
9107 * target.c (kill_inferior): Include "agent.h".
9108 New. Send command 'kill'.
9109 * target.h (kill_inferior): Removed macro.
9110 * tracepoint.c (gdb_agent_about_to_close): New.
9111 (gdb_agent_helper_thread): Handle command 'close'.
9112 Wait endlessly until the inferior stops.
9113 Install gdb_agent_remove_socket to atexit hook.
9114 (agent_socket_name): New static variable.
9115 (gdb_agent_socket_init): Replace local variable 'name' with
9116 'agent_socket_name'.
9117 (gdb_agent_remove_socket): New.
9119 2012-07-27 Yao Qi <yao@codesourcery.com>
9121 * server.c (process_point_options): Stop at 'X' when parsing.
9123 2012-07-19 Michael Eager <eager@eagercon.com>
9125 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9127 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9128 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9129 hardware breakpoint.
9131 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9133 * gdbserver/linux-low.c (initialize_low): Call
9134 linux_ptrace_init_warnings.
9136 2012-07-02 Doug Evans <dje@google.com>
9138 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9141 2012-07-02 Stan Shebs <stan@codesourcery.com>
9143 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9144 (ax.o): Add it to build rule.
9146 (OBS): Add format.o.
9147 (IPA_OBS): Add format.o.
9148 * server.c (handle_query): Claim support for breakpoint commands.
9149 (process_point_options): Add command case.
9150 (process_serial_event): Leave running if there are printfs in
9152 * mem-break.h (any_persistent_commands): Declare.
9153 (add_breakpoint_commands): Declare.
9154 (gdb_no_commands_at_breakpoint): Declare.
9155 (run_breakpoint_commands): Declare.
9156 * mem-break.c (struct point_command_list): New struct.
9157 (struct breakpoint): New field command_list.
9158 (any_persistent_commands): New function.
9159 (add_commands_to_breakpoint): New function.
9160 (add_breakpoint_commands): New function.
9161 (gdb_no_commands_at_breakpoint): New function.
9162 (run_breakpoint_commands): New function.
9163 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9165 * ax.c: Include format.h.
9166 (ax_printf): New function.
9167 (gdb_eval_agent_expr): Add printf opcode.
9169 2012-06-13 Yao Qi <yao@codesourcery.com>
9171 * server.c (start_inferior): Remove duplicated writes to fields
9172 'last_resume_kind' and 'last_status' of 'current_inferior'.
9174 2012-06-12 Yao Qi <yao@codesourcery.com>
9175 Pedro Alves <palves@redhat.com>
9177 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9179 * server.c (handle_v_cont): Extend comment.
9181 2012-06-11 Yao Qi <yao@codesourcery.com>
9183 * linux-low.c (linux_attach): Add 'static'.
9185 2012-06-06 Yao Qi <yao@codesourcery.com>
9187 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9189 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9191 Fix gcc -flto compilation warning.
9192 * server.c (main): Make variable multi_mode and attach volatile.
9194 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9196 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9197 if the platform doesn't know about it.
9199 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9201 * Makefile.in (SFILES): Add linux-tile-low.c.
9202 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9203 * configure.srv: Handle tilegx-*-linux*.
9204 * linux-tile-low.c: New file.
9206 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9208 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9210 2012-05-24 Pedro Alves <palves@redhat.com>
9214 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9216 2012-05-24 Pedro Alves <palves@redhat.com>
9220 Replace target_signal with gdb_signal throughout.
9222 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9224 * linux-low.c (linux_store_registers): Avoid the copying sequence
9225 when no data has been retrieved by ptrace.
9227 2012-05-22 Will Deacon <will.deacon@arm.com>
9229 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9230 Include asm/ptrace.h.
9231 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9234 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9236 * linux-low.c (linux_store_registers): Don't re-retrieve data
9237 with ptrace that has already been obtained from /proc. Always
9238 copy any data retrieved with ptrace to the buffer supplied.
9240 2012-05-11 Yao Qi <yao@codesourcery.com>
9241 Pedro Alves <palves@redhat.com>
9243 * linux-low.c (enum stopping_threads_kind): New.
9244 (stopping_threads): Change type to `enum stopping_threads_kind'.
9245 (handle_extended_wait): If stopping and suspending threads, leave
9246 the new_lwp suspended too.
9247 (linux_wait_for_event): Adjust.
9248 (stop_all_lwps): Set `stopping_threads' to
9249 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9250 whether we're suspending threads or just stopping them. Assert no
9253 2012-04-29 Yao Qi <yao@codesourcery.com>
9255 * server.h: Move some code to ...
9256 * gdbthread.h: ... here. New.
9257 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9258 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9259 (nto-low.o, win32-low.o): Likewise.
9260 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9261 * regcache.c, remote-utils.c, server.c: Likewise.
9262 * target.c, tracepoint.c, win32-low.c: Likewise.
9264 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9266 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9267 (PTRACE_ARG4_TYPE): Likewise.
9268 (PTRACE_XFER_TYPE): Likewise.
9269 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9270 ptrace to PTRACE_ARG3_TYPE.
9271 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9272 (PTRACE_ARG4_TYPE): Likewise.
9273 (PTRACE_XFER_TYPE): Likewise.
9274 (linux_detach_one_lwp): Cast fourth argument of
9275 ptrace to long then PTRACE_ARG4_TYPE.
9276 (regsets_fetch_inferior_registers): Cast third argument of
9277 ptrace to long then PTRACE_ARG3_TYPE.
9278 (regsets_store_inferior_registers): Likewise.
9280 2012-04-20 Pedro Alves <palves@redhat.com>
9282 * configure: Regenerate.
9284 2012-04-19 Pedro Alves <palves@redhat.com>
9286 * Makefile.in (GNULIB_BUILDDIR): New.
9287 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9288 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9289 (all, install-only, uninstall, clean-info, all-lib, clean): No
9290 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9291 (maintainer-clean realclean distclean): Use subdir_do.
9293 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9294 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9295 * acinclude.m4: Include acx_configure_dir.m4.
9296 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9297 calls. Call AC_PROG_RANLIB. Configure gnulib using
9300 (GNULIB_STDINT_H): Adjust.
9301 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9302 * gdbreplay.c: Include build-gnulib/config.h.
9303 * server.h: Likewise.
9304 * aclocal.m4: Regenerate.
9305 * config.in: Regenerate.
9306 * configure: Regenerate.
9308 2012-04-19 Pedro Alves <palves@redhat.com>
9310 * Makefile.in (LIBGNU, INCGNU): Adjust.
9311 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9312 (all, install-only, uninstall, clean-info, all-lib, clean)
9313 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9314 * configure.ac: Adjust AC_OUTPUT output.
9315 * aclocal.m4: Regenerate.
9316 * configure: Regenerate.
9318 2012-04-19 Pedro Alves <palves@redhat.com>
9320 * Makefile.in (generated_files): New.
9321 (server_h): Remove the explicit dependency on config.h, and depend
9322 on $generated_files.
9324 2012-04-19 Pedro Alves <palves@redhat.com>
9326 * Makefile.in (INCGNU): Add -Ignulib.
9328 2012-04-19 Pedro Alves <palves@redhat.com>
9330 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9331 (INCGNU): ... this, and spell out -I here.
9332 (GNULIB_LIB): Rename to ...
9334 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9336 2012-04-19 Pedro Alves <palves@redhat.com>
9338 * config.in: Regenerate.
9340 2012-04-19 Pedro Alves <palves@redhat.com>
9342 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9343 * server.h (memmem): Remove declaration.
9344 * config.in: Regenerate.
9345 * configure: Regenerate.
9347 2012-04-19 Yao Qi <yao@codesourcery.com>
9349 * Makefile.in (SFILES): Add common/vec.c.
9353 2012-04-19 Yao Qi <yao@codesourcery.com>
9355 * remote-utils.c (prepare_resume_reply): Replace with macro
9356 target_core_of_thread.
9357 * server.c (handle_qxfer_threads_proper): Likewise.
9358 * target.h (traget_core_of_thread): New macro.
9360 2012-04-18 Pedro Alves <palves@redhat.com>
9362 * aclocal.m4: Regenerate.
9363 * configure: Regenerate.
9365 2012-04-16 Yao Qi <yao@codesourcery.com>
9367 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9368 duplicated on address.
9370 2012-04-16 Yao Qi <yao@codesourcery.com>
9372 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9373 (struct tracepoint_action_ops) <send>: New field.
9374 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9375 (agent_expr_send, x_tracepoint_action_send): New.
9376 (l_tracepoint_action_send): New.
9377 (cmd_qtdp): Download and install tracepoint
9378 according to `use_agent'.
9379 (run_inferior_command): Add one more parameter `len'.
9381 (tracepoint_send_agent): New.
9382 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9384 2012-04-16 Yao Qi <yao@codesourcery.com>
9386 * tracepoint.c (download_tracepoints): Moved to ...
9387 (cmd_qtstart): ... here.
9389 2012-04-14 Yao Qi <yao@codesourcery.com>
9391 * tracepoint.c: Include inttypes.h.
9392 (struct collect_memory_action): Use sized types.
9393 (struct tracepoint): Likewise.
9394 (cmd_qtdp, stop_tracing): Update print specifiers.
9395 (cmd_qtp, response_tracepoint): Likewise.
9396 (collect_data_at_tracepoint): Likewise.
9397 (collect_data_at_step): Likewise.
9399 2012-04-14 Yao Qi <yao@codesourcery.com>
9401 Import gnulib module inttypes.
9402 * aclocal.m4, config.in, configure: Regenerated.
9404 2012-04-14 Yao Qi <yao@codesourcery.com>
9406 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9407 Makefile and config.status at last.
9409 2012-04-13 Yao Qi <yao@codesourcery.com>
9411 * tracepoint.c: Include stdint.h unconditionally.
9413 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9415 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9416 on BFD_HAVE_SYS_PROCFS_TYPE.
9417 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9418 * configure: Regenerate.
9419 * config.in: Likewise.
9421 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9423 * Makefile.in (clean): Also remove x32.c x32-linux.c
9424 x32-avx.c x32-avx-linux.c.
9425 (x32.o): New target.
9427 (x32-linux.o): Likewise.
9428 (x32-linux.c): Likewise.
9429 (x32-avx.o): Likewise.
9430 (x32-avx.c): Likewise.
9431 (x32-avx-linux.o): Likewise.
9432 (x32-avx-linux.c): Likewise.
9434 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9435 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9436 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9437 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9438 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9439 i386/x32-avx-linux.xml.
9441 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9442 (init_registers_x32_avx_linux): Likwise.
9443 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9444 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9446 2012-04-13 Pedro Alves <palves@redhat.com>
9448 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9449 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9450 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9451 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9454 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9456 * linux-x86-low.c (compat_x32_clock_t): New.
9457 (compat_x32_siginfo_t): Likewise.
9458 (compat_x32_siginfo_from_siginfo): Likewise.
9459 (siginfo_from_compat_x32_siginfo): Likewise.
9460 (linux_is_elf64): Likewise.
9461 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9462 and siginfo_from_compat_x32_siginfo for x32.
9463 (x86_arch_setup): Set linux_is_elf64.
9465 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9468 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9470 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9471 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9472 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9473 compatible with process.
9475 2012-04-12 Yao Qi <yao@codesourcery.com>
9477 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9478 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9479 (install-only, install-info, clean): Handle sub dir gnulib.
9480 (all-lib, am--refresh): New targets.
9481 (memmem.o): Remove target.
9482 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9483 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9484 (AC_REPLACE_FUNCS): Remove memmem.
9485 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9486 (AC_OUTPUT): Generate Makefile in gnulib/.
9487 * aclocal.m4, config.in, configure: Regenerated.
9489 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9491 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9493 2012-04-05 Pedro Alves <palves@redhat.com>
9495 -Werror=strict-aliasing
9497 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9500 2012-04-04 Pedro Alves <palves@redhat.com>
9502 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9503 (sparc_store_gregset_from_stack, sparc_store_gregset)
9504 (sparc_breakpoint_at): Fix formatting.
9506 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9508 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9510 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9511 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9512 * config.in: Regenerate.
9513 * configure: Likewise.
9515 2012-03-29 Pedro Alves <palves@redhat.com>
9517 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9518 Correct ptrace arguments.
9520 2012-03-28 Pedro Alves <palves@redhat.com>
9522 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9523 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9524 (IA64_FR1_REGNUM): New defines.
9525 (ia64_fetch_register): New.
9526 (the_low_target): Install it.
9527 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9529 * linux-low.c (linux_fetch_registers): Try the
9530 the_low_target.fetch_register hook first.
9532 * linux-arm-low.c (the_low_target): Adjust.
9533 * linux-bfin-low.c (the_low_target): Adjust.
9534 * linux-cris-low.c (the_low_target): Adjust.
9535 * linux-crisv32-low.c (the_low_target): Adjust.
9536 * linux-m32r-low.c (the_low_target): Adjust.
9537 * linux-m68k-low.c (the_low_target): Adjust.
9538 * linux-mips-low.c (the_low_target): Adjust.
9539 * linux-ppc-low.c (the_low_target): Adjust.
9540 * linux-s390-low.c (the_low_target): Adjust.
9541 * linux-sh-low.c (the_low_target): Adjust.
9542 * linux-sparc-low.c (the_low_target): Adjust.
9543 * linux-tic6x-low.c (the_low_target): Adjust.
9544 * linux-x86-low.c (the_low_target): Adjust.
9545 * linux-xtensa-low.c (the_low_target): Adjust.
9547 2012-03-26 Pedro Alves <palves@redhat.com>
9549 * server.c (handle_qxfer_libraries): Don't bail early if
9550 the_target->qxfer_libraries_svr4 is not NULL.
9552 2012-03-26 Pedro Alves <palves@redhat.com>
9554 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9556 2012-03-23 Pedro Alves <palves@redhat.com>
9558 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9559 "library-list-svr4" element's start tag when the the DSO list is
9562 2012-03-23 Pedro Alves <palves@redhat.com>
9564 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9565 a variable whose type size is the same as the inferior's pointer
9568 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9570 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9572 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9573 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9574 * linux-low.h: Include <signal.h>.
9575 (struct siginfo): Remove forward declaration.
9576 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9579 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9581 * .gitignore: Ignore more files.
9583 2012-03-19 Pedro Alves <palves@redhat.com>
9584 Jan Kratochvil <jan.kratochvil@redhat.com>
9586 * server.c (cont_thread, general_thread): Add describing comments.
9587 (start_inferior): Clear `cont_thread'.
9588 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9591 2012-03-15 Yao Qi <yao@codesourcery.com>
9593 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9595 (cmd_qtdp): ... here.
9597 2012-03-15 Yao Qi <yao@codesourcery.com>
9599 * tracepoint.c (struct tracepoint_action_ops): New.
9600 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9601 (m_tracepoint_action_download): New.
9602 (r_tracepoint_action_download): New.
9603 (x_tracepoint_action_download): New.
9604 (l_tracepoint_action_download): New.
9605 (add_tracepoint_action): Install `action->ops' according type.
9606 (download_tracepoint_1): Move code `download' function pointer
9607 of various tracepoint_action_ops.
9609 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9611 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9612 linux_ptrace_attach_warnings.
9614 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9616 * Makefile.in (linux-ptrace.o): New.
9617 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9618 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9619 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9620 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9621 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9623 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9625 2012-03-08 Yao Qi <yao@codesourcery.com>
9626 Pedro Alves <palves@redhat.com>
9628 Fix PR server/13392.
9629 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9631 * tracepoint.c (remove_tracepoint): New.
9632 (cmd_qtdp): Call remove_tracepoint when failed to install.
9634 2012-03-07 Pedro Alves <palves@redhat.com>
9636 * linux-low.c (get_detach_signal): New.
9637 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9638 Pass on pending signals to PTRACE_DETACH. Check the result of the
9640 * server.c (program_signals, program_signals_p): New.
9641 (handle_general_set): Handle QProgramSignals.
9642 * server.h (program_signals, program_signals_p): Declare.
9644 2012-03-05 Pedro Alves <palves@redhat.com>
9645 Jan Kratochvil <jan.kratochvil@redhat.com>
9647 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9650 2012-03-03 Yao Qi <yao@codesourcery.com>
9652 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9653 agent_look_up_symbols.
9655 2012-03-03 Yao Qi <yao@codesourcery.com>
9657 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9658 (linux-x86-low.o): Likewise.
9659 * server.h: Remove in_process_agent_loaded.
9660 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9664 2012-03-03 Yao Qi <yao@codesourcery.com>
9666 * tracepoint.c (gdb_agent_capability): New global.
9667 (in_process_agent_loaded_ust): Renamed to
9668 `in_process_agent_supports_ust'.
9670 (in_process_agent_supports_ust): Call agent_capability_check.
9671 (clear_installed_tracepoints): Assert that agent supports
9674 2012-03-03 Yao Qi <yao@codesourcery.com>
9676 * linux-low.c (linux_supports_agent): New.
9677 (linux_target_ops): Initialize field `supports_agent' with
9678 linux_supports_agent.
9679 * target.h (struct target_ops) <supports_agent>: New.
9680 (target_supports_agent): New macro.
9681 * server.c (handle_general_set): Handle packet 'QAgent'.
9682 (handle_query): Send `QAgent+'.
9683 * Makefile.in (server.o): Depends on agent.h.
9685 2012-03-03 Yao Qi <yao@codesourcery.com>
9687 * Makefile.in (OBS): Add agent.o.
9688 Add new rule for agent.o.
9689 Track dependence of tracepoint.c on agent.h.
9690 * tracepoint.c (run_inferior_command_1):
9691 (run_inferior_command): Call agent_run_command.
9692 (gdb_ust_connect_sync_socket): Deleted. Move it to
9694 (resume_thread, stop_thread): Likewise.
9695 (gdb_ust_socket_init): Renamed to ...
9696 (gdb_agent_socket_init): ... New.
9697 (gdb_ust_thread): Renamed to ...
9698 (gdb_agent_helper_thread): ... New.
9699 (gdb_ust_init): Move some code to ...
9700 (gdb_agent_init): ... here. New.
9701 [HAVE_UST]: Call gdb_ust_init.
9702 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9703 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9704 * config.in, configure: Regenerated.
9706 2012-03-02 Pedro Alves <palves@redhat.com>
9708 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9709 * linux-low.c (struct simple_pid_list): New.
9710 (stopped_pids): New a struct simple_pid_list pointer.
9711 (add_to_pid_list, pull_pid_from_list): New.
9712 (handle_extended_wait): Don't assume the first signal new children
9713 report is SIGSTOP. Adjust call to pull_pid_from_list.
9714 (linux_wait_for_lwp): Adjust.
9716 2012-03-02 Yao Qi <yao@codesourcery.com>
9718 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9721 2012-03-02 Yao Qi <yao@codesourcery.com>
9723 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9724 `stop_pc' and `tpoint'. Update caller.
9726 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9728 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9729 * linux-low.c (use_linux_regsets): New macro.
9730 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9731 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9732 (linux_register_in_regsets): New function.
9733 (usr_fetch_inferior_registers): Skip registers covered by
9735 (usr_store_inferior_registers): Likewise.
9736 (usr_fetch_inferior_registers): New macro.
9737 (usr_store_inferior_registers): Likewise.
9738 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9739 (linux_store_registers): Likewise.
9740 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9742 (init_registers_mips64_dsp_linux): Likewise.
9743 (init_registers_mips_linux): New macro.
9744 (init_registers_mips_dsp_linux): Likewise.
9745 (mips_dsp_num_regs): Likewise.
9746 (DSP_BASE, DSP_CONTROL): New fallback macros.
9747 (mips_base_regs): New macro.
9748 (mips_regmap): Use it. Fix the size.
9749 (mips_dsp_regmap): New variable.
9750 (mips_dsp_regset_bitmap): Likewise.
9751 (mips_arch_setup): New function.
9752 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9754 (mips_cannot_store_register): Likewise.
9755 (the_low_target): Update .arch_setup, .num_regs and .regmap
9756 initializers. Add .regset_bitmap initializer.
9757 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9759 * linux-bfin-low.c (the_low_target): Likewise.
9760 * linux-cris-low.c (the_low_target): Likewise.
9761 * linux-crisv32-low.c (the_low_target): Likewise.
9762 * linux-ia64-low.c (the_low_target): Likewise.
9763 * linux-m32r-low.c (the_low_target): Likewise.
9764 * linux-m68k-low.c (the_low_target): Likewise.
9765 * linux-ppc-low.c (the_low_target): Likewise.
9766 * linux-s390-low.c (the_low_target): Likewise.
9767 * linux-sh-low.c (the_low_target): Likewise.
9768 * linux-sparc-low.c (the_low_target): Likewise.
9769 * linux-tic6x-low.c (the_low_target): Likewise.
9770 * linux-x86-low.c (the_low_target): Likewise.
9771 * linux-xtensa-low.c (the_low_target): Likewise.
9772 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9773 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9774 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9776 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9777 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9779 2012-02-29 Yao Qi <yao@codesourcery.com>
9780 Pedro Alves <palves@redhat.com>
9782 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9783 `step_over_finished' is true.
9785 2012-02-27 Pedro Alves <palves@redhat.com>
9787 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9788 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9790 2012-02-27 Pedro Alves <palves@redhat.com>
9793 * linux-low.c (pid_is_stopped): New.
9794 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9796 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9798 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9801 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9803 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9805 2012-02-24 Luis Machado <lgustavo@codesourcery>
9807 * server.c (handle_query): Advertise support for target-side
9808 breakpoint condition evaluation.
9809 (process_point_options): New function.
9810 (process_serial_event): When inserting a breakpoint, check for
9811 a target-side condition that should be evaluated.
9813 * mem-break.c: Include regcache.h and ax.h.
9814 (point_cond_list_t): New data structure.
9815 (breakpoint) <cond_list>: New field.
9816 (find_gdb_breakpoint_at): Make non-static.
9817 (delete_gdb_breakpoint_at): Clear any target-side
9819 (clear_gdb_breakpoint_conditions): New function.
9820 (add_condition_to_breakpoint): Likewise.
9821 (add_breakpoint_condition): Likewise.
9822 (gdb_condition_true_at_breakpoint): Likewise.
9823 (gdb_breakpoint_here): Return result directly instead
9824 of going through a local variable.
9826 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9827 (clear_gdb_breakpoint_conditions): Likewise.
9828 (add_breakpoint_condition): Likewise.
9829 (gdb_condition_true_at_breakpoint): Likewise.
9831 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9832 (need_step_over_p): Take target-side breakpoint condition into
9835 2012-02-24 Luis Machado <lgustavo@codesourcery>
9837 * server.h: Include tracepoint.h.
9838 (agent_mem_read, agent_get_trace_state_variable_value,
9839 agent_set_trace_state_variable_value,
9840 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9841 get_set_tsv_func_addr): New prototypes.
9843 * ax.h: New include file.
9844 * ax.c: New source file.
9846 * tracepoint.c: Include ax.h.
9847 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9848 agent_expr, eval_result_type): Move to ax.h.
9849 (parse_agent_expr): Rename to ...
9850 (gdb_parse_agent_expr): ... this, make it non-static and move
9852 (unparse_agent_expr) Rename to ...
9853 (gdb_unparse_agent_expr): ... this, make it non-static and move
9855 (eval_agent_expr): Rename to ...
9856 (eval_tracepoint_agent_expr): ... this.
9857 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9858 forward declarations.
9859 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9860 (agent_get_trace_state_variable_value): New function.
9861 (agent_set_trace_state_variable_value): New function.
9862 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9863 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9864 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9865 (condition_true_at_tracepoint): Likewise.
9866 (parse_agent_expr): Rename to ...
9867 (gdb_parse_agent_expr): ... this and move to ax.c.
9868 (unparse_agent_expr): Rename to ...
9869 (gdb_unparse_agent_expr): ... this and move to ax.c.
9870 (gdb_agent_op_name): Move to ax.c.
9871 (eval_agent_expr): Rename to ...
9872 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9874 (eval_tracepoint_agent_expr): New function.
9875 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9877 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9879 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9880 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9881 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9882 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9883 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9884 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9885 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9886 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9887 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9888 (compile_bytecodes): Remove forward declaration.
9889 (is_goto_target): Move to ax.c.
9890 (compile_bytecodes): Move to ax.c and call
9891 agent_get_trace_state_variable_value (...) and
9892 agent_set_trace_state_variable_value (...).
9894 * Makefile.in: Update ax.c and IPA dependencies.
9896 2012-02-24 Pedro Alves <palves@redhat.com>
9898 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9899 (cmd_bigqtbuffer_circular): ... this. Only handle
9900 'QTBuffer:circular:'.
9901 (handle_tracepoint_general_set): Adjust.
9903 2012-02-16 Yao Qi <yao@codesourcery.com>
9905 * inferiors.c: Move code to ...
9906 * dll.c: .... here. New.
9907 * server.h: Declare clear_dlls.
9908 * Makefile.in (SFILES): Add dll.c.
9912 2012-02-11 Yao Qi <yao@codesourcery.com>
9914 * server.c: (handle_monitor_command): Add a new parameter
9916 (handle_query): Update caller.
9918 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9920 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9921 * configure, config.in: Regenerate.
9922 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9925 2012-02-02 Pedro Alves <palves@redhat.com>
9927 Try SIGKILL first, then PTRACE_KILL.
9928 * linux-low.c (linux_kill_one_lwp): New.
9929 (linux_kill_one_lwp): Rename to ...
9930 (kill_one_lwp_callback): ... this. Use the new
9933 2012-02-02 Pedro Alves <palves@redhat.com>
9935 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9938 2012-01-27 Pedro Alves <palves@redhat.com>
9940 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9941 (elf_64_file_p): Make static.
9942 (linux_pid_exe_is_elf_64_file): New.
9943 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9944 Delete declarations.
9945 (linux_pid_exe_is_elf_64_file): Declare.
9946 * linux-x86-low.c (x86_arch_setup): Use
9947 linux_pid_exe_is_elf_64_file.
9949 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9951 * linux-low.c (linux_wait_for_event_1): Rename to ...
9952 (linux_wait_for_event): ... here and merge it with former
9953 linux_wait_for_event - new variable wait_ptid, use it.
9954 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9956 2012-01-23 Pedro Alves <palves@redhat.com>
9958 * server.c (main): Avoid yet another case of infinite loop while
9959 detaching/killing after a longjmp.
9961 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9964 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9966 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9968 * hostio.c (handle_readlink): New function.
9969 (handle_vFile): Call it to handle "vFile:readlink" packets.
9971 2012-01-20 Pedro Alves <palves@redhat.com>
9972 Ulrich Weigand <ulrich.weigand@linaro.org>
9974 * server.c (handle_v_requests): Only support vAttach and vRun to
9975 start multiple processes when in extended protocol mode.
9977 2012-01-17 Pedro Alves <palves@redhat.com>
9979 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9980 memalign plus mprotect to allocate the scratch buffer.
9982 2012-01-13 Pedro Alves <palves@redhat.com>
9984 * server.c (attach_inferior): Clear `cont_thread'.
9986 2012-01-13 Pedro Alves <palves@redhat.com>
9988 * server.c (main): Avoid infinite loop while detaching/killing
9991 2012-01-09 Doug Evans <dje@google.com>
9993 * server.c (start_inferior): Set last_ptid in --wrapper case.
9995 2012-01-06 Yao Qi <yao@codesourcery.com>
9997 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9999 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10001 2012-01-04 Yao Qi <yao@codesourcery.com>
10003 * tracepoint.c (cmd_qtdp): Print debug message
10004 for static tracepoint.
10006 2012-01-04 Yao Qi <yao@codesourcery.com>
10008 * tracepoint.c (trace_vdebug): Differentiate debug message
10009 between gdbserver and IPA.
10011 2012-01-03 Yao Qi <yao@codesourcery.com>
10013 * tracepoint.c (tracepoint_was_hit): Don't collect for
10016 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10018 * terminal.h: Reformat copyright header.
10020 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10022 * server.c (gdbserver_version): Update copyright year.
10023 * gdbreplay.c (gdbreplay_version): Likewise.
10025 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10027 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10030 2011-12-18 Hui Zhu <teawater@gmail.com>
10031 * linux-low.c (linux_create_inferior): Save return value to ret.
10033 2011-12-18 Hui Zhu <teawater@gmail.com>
10035 * linux-low.c (linux_create_inferior): Save return value to ret.
10037 2011-12-16 Doug Evans <dje@google.com>
10039 * linux-low.c (linux_create_inferior): If stdio connection,
10040 redirect stdin from /dev/null, stdout to stderr.
10041 * remote-utils.c (remote_is_stdio): New static global.
10042 (remote_connection_is_stdio): New function.
10043 (remote_prepare): Handle stdio connection.
10044 (remote_open): Ditto.
10045 (remote_close): Don't close stdin for stdio connections.
10046 (read_prim,write_prim): New functions. Replace all calls to
10047 read/write to these.
10048 * server.c (main): Watch for "-" argument. Move call to
10049 remote_prepare before start_inferior.
10050 * server.h (STDIO_CONNECTION_NAME): New macro.
10051 (remote_connection_is_stdio): Declare.
10053 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10054 in debugging output.
10056 2011-12-15 Yao Qi <yao@codesourcery.com>
10058 * tracepoint.c: Include sys/syscall.h.
10059 (gdb_ust_thread): Remove preprocessor conditional.
10061 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10063 * linux-low.c (linux_detach_one_lwp): Call
10064 the_low_target.prepare_to_resume before detaching.
10066 2011-12-14 Yao Qi <yao@codesourcery.com>
10068 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10071 2011-12-14 Yao Qi <yao@codesourcery.com>
10073 * i386-low.c (i386_low_stopped_data_address): Initialize local
10074 variable `control'.
10076 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10080 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10081 DR_CONTROL unless necessary. Extend comments.
10082 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10083 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10085 2011-12-13 Yao Qi <yao@codesourcery.com>
10087 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10089 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10091 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10093 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10094 Print new debug message for such case.
10096 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10098 Fix overlapping memcpy.
10099 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10100 the read_inferior_memory transfer.
10101 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10102 write_inferior_memory transfer.
10103 (set_fast_tracepoint_jump): New variable buf. Use it for the
10104 read_inferior_memory and write_inferior_memory transfers.
10105 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10106 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10107 Use it for the write_inferior_memory transfer.
10108 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10111 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10113 * linux-low.c (fetch_register, store_register): Make code
10114 consistent, fix formatting.
10116 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10118 * linux-low.c (usr_store_inferior_registers): Factor out code
10119 to handle individual registers into...
10120 (store_register): ... this new function.
10122 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10124 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10125 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10126 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10127 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10128 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10129 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10130 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10131 (srv_xmlfiles): Add new XML files.
10133 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10135 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10136 (init_registers_s390_linux32v1): Add prototype.
10137 (init_registers_s390_linux32v2): Likewise.
10138 (init_registers_s390_linux64v1): Likewise.
10139 (init_registers_s390_linux64v2): Likewise.
10140 (init_registers_s390x_linux64v1): Likewise.
10141 (init_registers_s390x_linux64v2): Likewise.
10142 (s390_num_regs): Increment to 52.
10143 (s390_regmap): Add orig_r2 register.
10144 (s390_num_regs_3264): Increment to 68.
10145 (s390_regmap_3264): Add orig_r2 register.
10146 (s390_collect_ptrace_register): Handle orig_r2 register.
10147 (s390_supply_ptrace_register): Likewise.
10148 (s390_fill_last_break): New function.
10149 (s390_store_last_break): Likewise.
10150 (s390_fill_system_call): New function.
10151 (s390_store_system_call): Likewise.
10152 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10154 (s390_check_regset): New function.
10155 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10156 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10157 Update target_regsets for available register sets.
10159 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10160 Jan Kratochvil <jan.kratochvil@redhat.com>
10162 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10163 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10165 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10166 * linux-low.h (struct process_info_private): New member r_debug.
10167 * server.c (handle_qxfer_libraries): Call
10168 the_target->qxfer_libraries_svr4.
10169 (handle_qxfer_libraries_svr4): New function.
10170 (qxfer_packets): New entry "libraries-svr4".
10171 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10172 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10173 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10174 PACKET_qXfer_libraries_svr4.
10176 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10178 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10179 PSW address/mask between 8-byte and 16-byte formats.
10180 (s390_supply_ptrace_register): Likewise.
10181 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10182 basic addressing mode bit.
10184 2011-11-24 Stan Shebs <stan@codesourcery.com>
10186 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10188 2011-11-17 Stan Shebs <stan@codesourcery.com>
10190 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10191 (tracing_start_time): New global.
10192 (tracing_stop_time): New global.
10193 (tracing_user_name): New global.
10194 (tracing_notes): New global.
10195 (tracing_stop_note): New global.
10196 (cmd_qtstart): Set traceframe_usage, start_time.
10197 (stop_tracing): Set stop_time.
10198 (cmd_qtstatus): Report additional status.
10199 (cmd_qtp): New function.
10200 (handle_tracepoint_query): Call it.
10201 (cmd_qtnotes): New function.
10202 (handle_tracepoint_general_set): Call it.
10203 (get_timestamp): Rename from tsv_get_timestamp.
10205 2011-11-14 Stan Shebs <stan@codesourcery.com>
10206 Kwok Cheung Yeung <kcy@codesourcery.com>
10208 * linux-x86-low.c (small_jump_insn): New.
10209 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10210 trampoline and error message, build a trampoline and issue a small
10211 jump instruction to it.
10212 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10213 trampoline and error message.
10214 (x86_get_min_fast_tracepoint_insn_len): New.
10215 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10216 * linux-low.h (struct linux_target_ops): Add arguments to
10217 install_fast_tracepoint_jump_pad operation, add new operation.
10218 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10220 (linux_get_min_fast_tracepoint_insn_len): New function.
10221 (linux_target_op): Add new operation.
10222 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10223 (gdb_trampoline_buffer_end): Ditto.
10224 (gdb_trampoline_buffer_error): Ditto.
10225 (struct ipa_sym_addresses): Add fields for new IPA variables.
10226 (symbol_list): Add entries for new IPA variables.
10227 (struct tracepoint): Add fields to hold the address range of the
10228 trampoline used by the tracepoint.
10229 (trampoline_buffer_head): New static variable.
10230 (trampoline_buffer_tail): Ditto.
10231 (claim_trampoline_space): New function.
10232 (have_fast_tracepoint_trampoline_buffer): New function.
10233 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10235 (install_fast_tracepoint): Ditto, also add error buffer argument.
10236 (cmd_qtminftpilen): New function.
10237 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10238 (fast_tracepoint_from_trampoline_address): New function.
10239 (fast_tracepoint_collecting): Handle trampoline as part of jump
10241 (set_trampoline_buffer_space): New function.
10242 (initialize_tracepoint): Initialize new IPA variables.
10243 * target.h (struct target_ops): Add arguments to
10244 install_fast_tracepoint_jump_pad operation, add new
10245 get_min_fast_tracepoint_insn_len operation.
10246 (target_get_min_fast_tracepoint_insn_len): New.
10247 (install_fast_tracepoint_jump_pad): Add arguments.
10248 * server.h (IPA_BUFSIZ): Define.
10249 * linux-i386-ipa.c: Include extra header files.
10250 (initialize_fast_tracepoint_trampoline_buffer): New function.
10251 (initialize_low_tracepoint): Call it.
10252 * server.h (set_trampoline_buffer_space): Declare.
10253 (claim_trampoline_space): Ditto.
10254 (have_fast_tracepoint_trampoline_buffer): Ditto.
10256 2011-11-14 Yao Qi <yao@codesourcery.com>
10258 * server.c (handle_query): Handle InstallInTrace for qSupported.
10259 * tracepoint.c (add_tracepoint): Sort list.
10260 (install_tracepoint, download_tracepoint): New.
10261 (cmd_qtdp): Call them to install and download tracepoints.
10262 (sort_tracepoints): Removed.
10263 (cmd_qtstart): Update.
10265 2011-11-14 Yao Qi <yao@codesourcery.com>
10267 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10268 * mem-break.h: Declare.
10269 * tracepoint.c (cmd_qtstart): Move some code to ...
10270 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10272 (download_tracepoints): Move some code to ...
10273 (download_tracepoint_1): ... here. New.
10275 2011-11-08 Yao Qi <yao@codesourcery.com>
10277 * remote-utils.c (relocate_instruction): A comment fix.
10279 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10281 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10282 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10283 dr_status_mirror and dr_control_mirror from debug_reg_state.
10284 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10285 (i386_initial_stuff): Remove use of deleted globals.
10286 (i386_get_thread_context, i386_set_thread_context,
10287 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10288 from debug_reg_state.
10290 2011-11-05 Yao Qi <yao@codesourcery.com>
10292 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10293 address as TPOINT's.
10295 2011-11-02 Stan Shebs <stan@codesourcery.com>
10297 * tracepoint.c (agent_mem_read_string): New function.
10298 (eval_agent_expr): Call it for tracenz.
10299 * server.c (handle_query): Report support for tracenz.
10301 2011-11-02 Yao Qi <yao@codesourcery.com>
10303 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10305 2011-11-02 Yao Qi <yao@codesourcery.com>
10307 * target.h: Fix a typo in comment.
10309 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10311 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10312 clobber the breakpoints' shadows with fast tracepoint jumps.
10313 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10314 * target.c (write_inferior_memory): Also pass MYADDR down to
10317 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10319 * configure.ac: Check support for personality routine.
10320 * configure: Regenerate.
10321 * config.in: Likewise.
10322 * linux-low.c: Include <sys/personality.h>.
10323 Define ADDR_NO_RANDOMIZE if necessary.
10324 (linux_create_inferior): Disable address space randomization when
10325 forking inferior, if requested.
10326 (linux_supports_disable_randomization): New function.
10327 (linux_target_ops): Install it.
10328 * server.h (disable_randomization): Declare.
10329 * server.c (disable_randomization): New global variable.
10330 (handle_general_set): Handle QDisableRandomization.
10331 (handle_query): Likewise for qSupported.
10332 (main): Support --disable-randomization and --no-disable-randomization
10333 command line arguments.
10334 * target.h (struct target_ops): Add supports_disable_randomization.
10335 (target_supports_disable_randomization): New macro.
10337 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10339 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10341 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10342 [!PT_GETDSBT] (target_loadmap): New definition.
10343 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10344 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10345 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10346 and PT_GETDSBT to LINUX_LOADMAP.
10347 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10348 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10350 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10352 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10353 (arm_linux_hwbp_cap): New static variable.
10354 (arm_linux_get_hwbp_cap): Replace by ...
10355 (arm_linux_init_hwbp_cap): ... this new function.
10356 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10357 (arm_linux_get_hw_watchpoint_count): Likewise.
10358 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10359 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10360 (arm_prepare_to_resume): Use perror_with_name instead of error.
10362 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10364 * linux-arm-low.c: Include <signal.h>.
10365 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10366 (struct arm_linux_hwbp_cap): New data type.
10367 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10368 (struct arm_linux_hw_breakpoint): New data type.
10369 (MAX_BPTS, MAX_WPTS): Define.
10370 (struct arch_process_info, struct arch_lwp_info): New data types.
10371 (arm_linux_get_hwbp_cap): New function.
10372 (arm_linux_get_hw_breakpoint_count): Likewise.
10373 (arm_linux_get_hw_watchpoint_count): Likewise.
10374 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10375 (arm_hwbp_control_initialize): Likewise.
10376 (arm_hwbp_control_is_enabled): Likewise.
10377 (arm_hwbp_control_is_initialized): Likewise.
10378 (arm_hwbp_control_disable): Likewise.
10379 (arm_linux_hw_breakpoint_equal): Likewise.
10380 (arm_linux_hw_point_initialize): Likewise.
10381 (struct update_registers_data): New data structure.
10382 (update_registers_callback: New function.
10383 (arm_insert_point): Likewise.
10384 (arm_remove_point): Likewise.
10385 (arm_stopped_by_watchpoint): Likewise.
10386 (arm_stopped_data_address): Likewise.
10387 (arm_new_process): Likewise.
10388 (arm_new_thread): Likewise.
10389 (arm_prepare_to_resume): Likewise.
10390 (the_low_target): Register arm_insert_point, arm_remove_point,
10391 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10392 arm_new_thread, and arm_prepare_to_resume.
10394 2011-09-15 Stan Shebs <stan@codesourcery.com>
10396 * server.h (struct emit_ops): Add compare-goto fields.
10397 * tracepoint.c (gdb_agent_op_sizes): New table.
10398 (emit_eq_goto): New function.
10399 (emit_ne_goto): New function.
10400 (emit_lt_goto): New function.
10401 (emit_le_goto): New function.
10402 (emit_gt_goto): New function.
10403 (emit_ge_goto): New function.
10404 (is_goto_target): New function.
10405 (compile_bytecodes): Recognize special cases of compare-goto
10406 combinations and call specialized emitters for them.
10407 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10408 (amd64_emit_ne_goto): New function.
10409 (amd64_emit_lt_goto): New function.
10410 (amd64_emit_le_goto): New function.
10411 (amd64_emit_gt_goto): New function.
10412 (amd64_emit_ge_goto): New function.
10413 (amd64_emit_ops): Add the new functions.
10414 (i386_emit_eq_goto): New function.
10415 (i386_emit_ne_goto): New function.
10416 (i386_emit_lt_goto): New function.
10417 (i386_emit_le_goto): New function.
10418 (i386_emit_gt_goto): New function.
10419 (i386_emit_ge_goto): New function.
10420 (i386_emit_ops): Add the new functions.
10422 2011-09-08 Stan Shebs <stan@codesourcery.com>
10424 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10425 (i386_emit_epilogue): Restore %ebx.
10427 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10429 * server.c (step_thread): Remove definition.
10430 (process_serial_event): Don't handle Hs.
10431 * server.h (step_thread): Remove declaration.
10432 * target.c (set_desired_inferior): Remove use of step_thread.
10434 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10436 * linux-low.c: Include linux-procfs.h.
10437 (linux_attach_lwp_1): Update comments.
10438 (linux_attach): Scan for existing threads when attaching to a
10439 process that is the tgid.
10440 * Makefile.in: Update dependencies.
10442 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10444 * configure.srv: Add linux-procfs.o dependencies.
10446 2011-08-14 Yao Qi <yao@codesourcery.com>
10448 * target.h (struct target_ops): Fix indent.
10449 * win32-low.c (win32_target_ops): Fix comment.
10451 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10452 Yao Qi <yao@codesourcery.com>
10454 * Makefile.in (clean): Remove tic6x-*.c files.
10455 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10456 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10457 (tic6x-c64xp-linux.c): Likewise.
10458 * configure.srv: Add support for tic6x-*-uclinux.
10459 * linux-tic6x-low.c: New.
10460 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10462 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10463 Yao Qi <yao@codesourcery.com>
10465 * target.h (struct target_ops): Add read_loadmap.
10466 * linux-low.c (struct target_loadseg): New type.
10467 (struct target_loadmap): New type.
10468 (linux_read_loadmap): New function.
10469 (linux_target_ops): Add linux_read_loadmap.
10470 * server.c (handle_query): Support qXfer:fdpic:read packet.
10471 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10474 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10476 * win32-low.c: Include <stdint.h>.
10478 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10480 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10481 to the inferior here.
10482 (i386_remove_aligned_watchpoint): Ditto.
10483 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10484 fit part of the watchpoint in the debug registers.
10485 (i386_update_inferior_debug_regs): New.
10486 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10487 registers, and only update the inferior on success.
10488 (i386_low_remove_watchpoint): Ditto.
10490 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10492 * linux-low.c (compare_ints, unique, list_threads, show_process,
10493 linux_core_of_thread): Delete.
10494 (linux_target_ops): Change linux_core_of_thread to
10495 linux_common_core_of_thread.
10496 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10497 * utils.c (malloc_failure): Change type of argument.
10498 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10499 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10500 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10501 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10502 (IPA_OBJS): Add common-utils-ipa.o.
10503 (ptid_h, linux_osdata_h): New macros.
10504 (server_h): Add common/common-utils.h, common/xml-utils.h,
10505 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10507 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10508 ptid.o, buffer.o): New rules.
10509 (linux-low.o): Add common/linux-osdata.h as a dependency.
10510 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10511 * configure.ac: Add AC_HEADER_DIRENT check.
10512 * config.in: Regenerate.
10513 * configure: Regenerate.
10514 * remote-utils.c (xml_escape_text): Delete.
10515 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10516 buffer_xml_printf): Move to common/buffer.c.
10517 * server.c (main): Remove call to initialize_inferiors.
10518 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10519 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10520 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10521 internal_error, gdb_assert, gdb_assert_fail): Delete.
10522 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10523 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10525 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10526 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10527 initialize_inferiors): Delete.
10529 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10531 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10534 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10536 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10538 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10540 2011-05-26 Yao Qi <yao@codesourcery.com>
10542 * Makefile.in (thread-db.o): Track dependence to
10543 common/gdb_thread_db.h.
10544 * thread-db.c: include gdb_thread_db.h from right place.
10546 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10548 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10549 __FILE__ and __LINE__ to internal_error.
10551 2011-05-13 Doug Evans <dje@google.com>
10553 * thread-db.c (try_thread_db_load_from_sdir): New function.
10554 (try_thread_db_load_from_dir): New function.
10555 (thread_db_load_search): Handle $sdir, ignore $pdir.
10556 Remove trying of system directories if search of
10557 libthread-db-search-path fails, that is now done via $sdir.
10559 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10561 * server.c (handle_query): Add EnableDisableTracepoints to the list
10562 of supported features.
10563 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10565 (cmd_qtenable_disable): New.
10566 (cmd_qtstart): Install tracepoints even if disabled.
10567 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10568 receiving a QTEnable or QTDisable packet.
10569 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10570 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10572 (gdb_probe): Skip data collection if static tracepoint is disabled.
10574 2011-05-10 Doug Evans <dje@google.com>
10576 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10578 2011-05-04 Doug Evans <dje@google.com>
10580 * linux-low.c (linux_join): Skip process lookup.
10581 * spu-low.c (spu_join): Ditto.
10582 * server.c (join_inferiors_callback): Delete.
10583 (process_serial_event): For 'D' packet (detach) call join_inferior
10586 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10588 * README: Don't mention xscale*-*-linux*.
10589 * configure.srv (xscale*-*-linux*): Don't handle target.
10591 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10593 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10595 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10596 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10597 (i386_emit_void_call_2): Likewise.
10599 2011-04-26 Yao Qi <yao@codesourcery.com>
10601 * linux-low.c: Move common macros to linux-ptrace.h.
10602 Include linux-ptrace.h.
10603 * Makefile.in (linux_ptrace_h): New.
10604 (linux-low.o): Depends on linux-ptrace.h.
10606 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10608 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10609 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10610 (remote_prepare): New function with most of the TCP code from ...
10611 (remote_open): ... here. Detect PORT here unconditionally. Move also
10612 setting transport_is_reliable.
10613 * server.c (run_once): New variable.
10614 (gdbserver_usage): Document it.
10615 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10616 the first run if RUN_ONCE.
10617 * server.h (run_once, remote_prepare): New declarations.
10619 2011-04-19 Tom Tromey <tromey@redhat.com>
10621 * win32-low.c (handle_load_dll): Remove duplicate "the".
10623 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10625 Remove support for old Cygwin 1.5 versions.
10626 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10627 function to avoid warning.
10628 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10631 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10633 * gdbserver/server.h (Macro _): Define it if not available.
10635 2011-03-14 Michael Snyder <msnyder@vmware.com>
10637 * hostio.c (handle_close): Remove unnecessary null test.
10639 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10641 * Makefile.in (maintainer-clean realclean distclean): Remove
10642 "make ... subdir_do" command.
10644 2011-03-10 Michael Snyder <msnyder@vmware.com>
10646 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10648 * server.c (handle_v_run): Free alloced buffer on early return.
10650 2011-03-09 Yao Qi <yao@codesourcery.com>
10653 2011-03-04 Yao Qi <yao@codesourcery.com>
10655 * Makefile.in: Remove GNU make feature --directory.
10657 2011-03-05 Yao Qi <yao@codesourcery.com>
10659 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10660 (subdir_do): New make target. Copied from gdb/Makefile.
10661 (maintainer-clean, realclean, distclean, clean): Call corresponding
10662 make targets in common/Makefile.
10664 2011-02-11 Yao Qi <yao@codesourcery.com>
10666 * configure.ac: Call AC_PROG_RANLIB.
10667 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10668 * configure: Regenerate.
10670 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10672 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10674 2011-03-06 Yao Qi <yao@codesourcery.com>
10676 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10678 2011-03-05 Yao Qi <yao@codesourcery.com>
10680 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10681 (subdir_do): New make target. Copied from gdb/Makefile.
10682 (maintainer-clean, realclean, distclean, clean): Call corresponding
10683 make targets in common/Makefile.
10685 2011-03-04 Yao Qi <yao@codesourcery.com>
10687 * Makefile.in: Remove GNU make feature --directory.
10689 2011-03-04 Michael Snyder <msnyder@vmware.com>
10691 * server.c (queue_stop_reply): Call xmalloc not malloc.
10693 2011-03-02 Michael Snyder <msnyder@vmware.com>
10695 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10697 2011-02-28 Michael Snyder <msnyder@vmware.com>
10699 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10700 (cmd_qtframe): Ditto.
10701 (cmd_qtbuffer): Ditto.
10702 (cmd_bigqtbuffer): Ditto.
10704 * utils.c (decimal2str): Initialize 'width' to nine, then
10705 don't mess with it.
10707 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10709 * hostio.c (require_data): Free *data, not data.
10711 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10713 * hostio.c (require_data): Use free, not xfree.
10715 2011-02-27 Michael Snyder <msnyder@vmware.com>
10717 * server.c (handle_query): Discard unused value.
10719 * hostio.c (require_data): Free malloc memory before returning
10722 2011-02-26 Michael Snyder <msnyder@vmware.com>
10724 * linux-low.c (list_threads): Call closedir for dirent.
10726 2011-02-27 Michael Snyder <msnyder@vmware.com>
10728 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10729 a case statement falls through.
10731 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10733 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10736 2011-02-26 Michael Snyder <msnyder@vmware.com>
10738 * utils.c (decimal2str): Eliminate dead code and dead param.
10739 (pulongest): Drop dead param from call to decimal2str.
10742 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10744 Revert the following patch (not approved yet):
10745 2011-02-21 Hui Zhu <teawater@gmail.com>
10746 * tracepoint.c (tp_printf): New function.
10747 (eval_agent_expr): Handle gdb_agent_op_printf.
10749 2011-02-21 Hui Zhu <teawater@gmail.com>
10751 * tracepoint.c (tp_printf): New function.
10752 (eval_agent_expr): Handle gdb_agent_op_printf.
10754 2011-02-18 Tom Tromey <tromey@redhat.com>
10756 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10757 (tracepoint.o): Likewise.
10758 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10759 (gdb_agent_op_names): Likewise.
10761 2011-02-18 Tom Tromey <tromey@redhat.com>
10763 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10764 gdb_agent_op_rot>: New constants.
10765 (gdb_agent_op_names): Add pick and roll.
10766 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10769 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10771 * aclocal.m4: Regenerated with aclocal-1.11.1.
10773 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10775 * server.c (handle_qxfer_traceframe_info): New.
10776 (qxfer_packets): Register "traceframe-info".
10777 (handle_query): Report support for qXfer:traceframe-info:read+.
10778 * tracepoint.c (match_blocktype): New.
10779 (traceframe_find_block_type): Rename to ...
10780 (traceframe_walk_blocks): ... this. Add callback filter argument,
10782 (traceframe_find_block_type): New, reimplemented on top of
10783 traceframe_walk_blocks.
10784 (build_traceframe_info_xml): New.
10785 (traceframe_read_info): New.
10786 * server.h (traceframe_read_info): Declare.
10788 2011-02-11 Yao Qi <yao@codesourcery.com>
10790 * configure.ac: Call AC_PROG_RANLIB.
10791 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10792 * configure: Regenerate.
10794 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10796 * server.c (gdb_read_memory): Change return semantics to allow
10798 (handle_search_memory_1): Adjust.
10799 (process_serial_event) <'m' packet>: Handle partial transfers.
10800 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10802 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10804 * regcache.c (init_register_cache): Initialize
10805 regcache->register_status.
10806 (free_register_cache): Release regcache->register_status.
10807 (regcache_cpy): Copy register_status.
10808 (registers_to_string): Print 'x's for unavailable registers.
10809 (supply_register): Mark the register's status valid or
10810 unavailable, depending on whether a buffer was passed in or not.
10811 (supply_register_zeroed): New.
10812 (supply_regblock): Mark the registers' status valid or
10813 unavailable, depending on whether a buffer was passed in or not.
10814 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10815 (struct regcache): New `register_status' field.
10816 (supply_register_zeroed): Declare.
10817 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10818 supply_register_zeroed, rather than passing a NULL buffer to
10820 * tracepoint.c (fetch_traceframe_registers): Update comment.
10822 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10824 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10827 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10829 * server.h (decode_xfer_write): Change prototype.
10830 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10831 and don't extract the annex here.
10832 * server.c (decode_xfer_read): Remove `annex' parameter,
10833 and don't extract the annex here.
10834 (decode_xfer): New.
10835 (struct qxfer): New.
10836 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10837 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10838 (handle_qxfer_statictrace): New functions, abstracted out from
10839 handle_query, and made to use the struct qxfer interface.
10840 (handle_threads_qxfer_proper): Rename to ...
10841 (handle_qxfer_threads_proper): ... this.
10842 (handle_threads_qxfer): Rename to ...
10843 (handle_qxfer_threads): ... this. Adjust.
10844 (qxfer_packets): New array.
10845 (handle_qxfer): New function.
10846 (handle_query): Use handle_qxfer.
10848 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10850 * gdbreplay.c: Shorten lines of >= 80 columns.
10851 * linux-low.c: Ditto.
10852 * linux-ppc-low.c: Ditto.
10853 * linux-s390-low.c: Ditto.
10854 * linux-sparc-low.c: Ditto.
10855 * linux-x86-low.c: Ditto.
10856 * linux-xtensa-low.c: Ditto.
10857 * mem-break.c: Ditto.
10858 * nto-low.c: Ditto.
10859 * regcache.h: Ditto.
10860 * remote-utils.c: Ditto.
10863 * thread-db.c: Ditto.
10864 * tracepoint.c: Ditto.
10866 * win32-low.h: Ditto.
10868 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10870 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10873 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10875 * server.c (gdbserver_version): Update copyright year in version
10877 * gdbreplay.c (gdbreplay_version): Ditto.
10879 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10881 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10882 * linux-bfin-low.c: New file.
10883 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10884 PT_DATA_ADDR for BFIN targets.
10885 * Makefile.in (SFILES): Add linux-bfin-low.c.
10886 (clean): Remove reg-bfin.c.
10887 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10888 * README: Mention supported Blackfin targets.
10890 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10892 * .gitignore: New file.
10894 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10896 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10898 2010-10-22 Jie Zhang <jie@codesourcery.com>
10900 * Makefile.in: Add FLAGS_TO_PASS variable.
10901 (install): Remove dependency of install-only and recursively
10902 invoke make for install-only.
10904 2010-10-04 Doug Evans <dje@google.com>
10906 * Makefile.in (uninstall): Use $(DESTDIR).
10908 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10912 * linux-x86-low.c (compat_siginfo_from_siginfo)
10913 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10914 si_code is < 0. Check for si_code == SI_TIMER before checking for
10917 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10919 * lynx-i386-low.c: New file.
10920 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10922 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10924 * lynx-low.c (ptrace_request_to_str): Remove handling for
10925 request values that have been removed in LynxOS 5.x.
10927 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10929 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10932 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10934 * configure.ac: Add --enable-inprocess-agent option.
10935 * configure: Rebuilt.
10937 2010-09-06 Yao Qi <yao@codesourcery.com>
10939 * linux-low.c (linux_kill): Remove unused variable.
10940 (linux_stabilize_threads): Likewise.
10941 * server.c (start_inferior): Likewise.
10942 (queue_stop_reply_callback): Likewise.
10943 * tracepoint.c (do_action_at_tracepoint): Likewise.
10945 2010-09-06 Yao Qi <yao@codesourcery.com>
10947 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10950 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10952 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10954 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10956 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10959 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10961 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10962 gdbserver/lynx-ppc-low.c: New files.
10963 * Makefile.in (lynx_low_h): New variable.
10964 (lynx-low.o, lynx-ppc-low.o): New rules.
10965 * configure.ac: On LynxOS, link with -lnetinet.
10966 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10967 * configure: regenerate.
10969 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10971 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10972 * configure.ac: Add check for vasprintf and vsnprintf.
10973 * configure, config.in: Regenerate.
10974 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10976 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10978 * gdbreplay.c: Move include of alloca.h up, next to include of
10980 * server.h: Add include of malloc.h.
10981 * mem-break.c: Remove include of malloc.h.
10982 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10984 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10986 * Makefile.in (memmem.o): Build with -Wno-error.
10988 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10990 * utils.c (xsnprintf): Make non-static.
10991 * server.h: Add xsnprintf declaration.
10992 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10993 replace calls to snprintf by calls to xsnprintf throughout.
10995 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10997 * configure.ac: Add configure check for alloca.
10998 * configure, config.in: Regenerate.
10999 * server.h: Include alloca.h if it exists.
11000 * gdbreplay.c: Include alloca.h if it exists.
11002 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11004 * linux-low.c (__SIGRTMIN): Define if not already defined.
11005 (linux_create_inferior): Check for __ANDROID__ rather than
11007 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11008 are already deferred.
11009 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11010 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11011 stopped and already has a pending signal to report.
11012 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11013 a pending signal to report or is moving out of a jump pad.
11014 (linux_init_signals): Check for __ANDROID__ rather than
11017 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11019 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11020 debug_threads check. Avoid a linear search when not doing debug
11023 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11025 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11026 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11027 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11028 (process_event): Change local fd's type to gdb_fildes_t.
11029 (create_file_handler): Adjust prototype.
11030 (delete_file_handler): Adjust prototype.
11031 (handle_file_event): Adjust prototype. Use pfildes.
11032 (create_file_event): Adjsut prototype.
11033 * remote-utils.c (remote_desc, listen_desc): Change type to
11035 * server.h: New gdb_fildes_t typedef.
11036 [USE_WIN32API]: Include winsock2.h.
11037 (delete_file_handler, add_file_handler): Adjust prototypes.
11038 (pfildes): Declare.
11039 * utils.c (pfildes): New.
11041 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11043 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11044 * configure: Regenerate.
11046 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11048 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11049 (linux_done_accessing_memory): ... this.
11050 (linux_target_ops): Adjust.
11051 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11052 * nto-low.c (nto_target_ops): Adjust comment.
11053 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11054 * spu-low.c (spu_target_ops): Adjust comment.
11055 * target.h (target_ops): Rename unprepare_to_access_memory field
11056 to done_accessing_memory.
11057 (unprepare_to_access_memory): Rename to ...
11058 (done_accessing_memory): ... this.
11060 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11062 * linux-low.c (linux_prepare_to_access_memory): New.
11063 (linux_unprepare_to_access_memory): New.
11064 (linux_target_ops): Install them.
11065 * server.c (read_memory): Rename to ...
11066 (gdb_read_memory): ... this. Use
11067 prepare_to_access_memory/prepare_to_access_memory.
11068 (write_memory): Rename to ...
11069 (gdb_write_memory): ... this. Use
11070 prepare_to_access_memory/prepare_to_access_memory.
11071 (handle_search_memory_1): Adjust.
11072 (process_serial_event): Adjust.
11073 * target.h (struct target_ops): New fields
11074 prepare_to_access_memory and unprepare_to_access_memory.
11075 (prepare_to_access_memory, unprepare_to_access_memory): New.
11076 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11077 prepare_to_access_memory/prepare_to_access_memory.
11078 * nto-low.c (nto_target_ops): Adjust.
11079 * spu-low.c (spu_target_ops): Adjust.
11080 * win32-low.c (win32_target_ops): Adjust.
11082 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11084 * Makefile.in (WARN_CFLAGS): Get it from configure.
11085 (WERROR_CFLAGS): New.
11086 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11087 * configure.ac: Introduce --enable-werror, which adds -Werror to
11088 the compiler command line. Enabled by default. Disable with
11089 --disable-werror. Add -Wdeclaration-after-statement
11090 Wpointer-arith and -Wformat-nonliteral to warning flags.
11091 * configure: Regenerate.
11093 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11095 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11097 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11099 * gdbreplay.c (remote_error): New.
11101 (expect): Use gdbchar. Check for error reading from GDB.
11102 Clarify sync error output.
11103 (play): Check for errors writing to GDB.
11104 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11105 * remote-utils.c (getpkt): Check for errors writing to the remote
11108 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11110 * linux-low.c (linux_wait_1): Move non-debugging code out of
11111 `debug_threads' control.
11113 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11115 * linux-low.c (linux_wait_1): Don't set last_status here.
11116 * server.c (push_event, queue_stop_reply_callback): Assert we're
11117 not pushing a TARGET_WAITKIND_IGNORE event.
11118 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11119 (myresume, handle_target_event): Set the thread's last_resume_kind
11120 and last_status from the target returned status.
11122 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11126 * linux-x86-low.c (update_debug_registers_callback): New.
11127 (i386_dr_low_set_addr): Use it.
11128 (i386_dr_low_get_addr): New.
11129 (i386_dr_low_set_control): Use update_debug_registers_callback.
11130 (i386_dr_low_get_control): New.
11131 (i386_dr_low_get_status): Adjust.
11132 * linux-low.c (linux_stop_lwp): New.
11133 * linux-low.h (linux_stop_lwp): Declare.
11135 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11136 argument instead of a i386_debug_reg_state.
11137 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11138 a i386_debug_reg_state.
11139 (i386_insert_aligned_watchpoint): Adjust.
11140 (i386_remove_aligned_watchpoint): Adjust.
11141 (i386_low_stopped_data_address): Read the debug registers from the
11142 inferior instead of from the mirrors.
11143 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11144 (i386_dr_low_get_addr): Declare.
11145 (i386_dr_low_get_control): Declare.
11146 (i386_dr_low_get_status): Change prototype.
11148 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11149 (i386_dr_low_get_addr): New.
11150 (i386_dr_low_get_control): New.
11151 (i386_dr_low_get_status): Adjust prototype. Return
11153 (i386_initial_stuff): Clear dr_status_mirror and
11155 (i386_get_thread_context): Adjust.
11156 (i386_set_thread_context): Adjust.
11157 (i386_thread_added): Adjust.
11159 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11161 * linux-low.h (linux_thread_area): Delete declaration.
11163 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11165 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11166 after its termination.
11168 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11170 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11171 (gdb_wants_all_stopped): Delete.
11172 (linux_wait_1): Don't call them.
11173 * server.c (handle_v_cont): Tag all threads as want-stopped.
11174 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11175 stopped as "client-wants-stopped".
11177 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11179 * Makefile.in (signals_h): New.
11180 (server_h): Depend on it.
11181 (server.o): Don't depend on $(signals_def).
11182 (signals.o): Depend on $(signals_def).
11184 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11186 * Makefile.in (signals_def): New.
11187 (server_h): Append include/gdb/signals.h and signals_def.
11188 (server.o): Append signals_def.
11190 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11192 * server.c (handle_target_event): Use target_signal_to_host for
11193 resume_info.sig initialization.
11194 * target.h (struct thread_resume) <sig>: New comment.
11196 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11198 * server.c (handle_query): strcpy() the returned string from paddress()
11199 instead of sprintf().
11200 * utils.c (paddress): Return phex_nz().
11202 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11204 * server.c (handle_v_cont): Call mourn_inferior if process
11206 (myresume): Likewise.
11208 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11210 Static tracepoints, and integration with UST.
11212 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11213 * mem-break.c (uninsert_all_breakpoints)
11214 (reinsert_all_breakpoints): New.
11215 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11216 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11217 (gdb_agent_ust_loaded, helper_thread_id)
11218 (gdb_agent_helper_thread_id): New macros.
11219 (struct ipa_sym_addresses): Add addr_ust_loaded,
11220 addr_helper_thread_id, addr_cmd_buf.
11221 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11222 (in_process_agent_loaded_ust): New.
11223 (write_e_ust_not_loaded): New.
11224 (maybe_write_ipa_ust_not_loaded): New.
11225 (struct collect_static_trace_data_action): New.
11226 (enum tracepoint_type) <static_tracepoint>: New.
11227 (struct tracepoint) <handle>: Mention static tracepoints.
11228 (struct static_tracepoint_ctx): New.
11229 (CMD_BUF_SIZE): New.
11230 (add_tracepoint_action): Handle static tracepoint actions.
11231 (unprobe_marker_at): New.
11232 (clear_installed_tracepoints): Handle static tracepoints.
11233 (cmd_qtdp): Handle static tracepoints.
11234 (probe_marker_at): New.
11235 (cmd_qtstart): Handle static tracepoints.
11236 (response_tracepoint): Handle static tracepoints.
11237 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11238 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11239 (get_context_regcache): Handle static tracepoints.
11240 (do_action_at_tracepoint): Handle static tracepoint actions.
11241 (traceframe_find_block_type): Handle static trace data blocks.
11242 (traceframe_read_sdata): New.
11243 (download_tracepoints): Download static tracepoint actions.
11244 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11245 (GDB_PROBE_NAME): New.
11247 (GET_UST_SYM): New.
11250 (ust_marker_to_static_tracepoint): New.
11252 (collect_ust_data_at_tracepoint): New.
11253 (gdb_ust_probe): New.
11254 (UNIX_PATH_MAX, SOCK_DIR): New.
11255 (gdb_ust_connect_sync_socket): New.
11256 (resume_thread, stop_thread): New.
11257 (run_inferior_command): New.
11258 (init_named_socket): New.
11259 (gdb_ust_socket_init): New.
11260 (cstr_to_hexstr): New.
11262 (first_marker, next_marker): New.
11263 (response_ust_marker): New.
11264 (cmd_qtfstm, cmd_qtsstm): New.
11265 (unprobe_marker_at, probe_marker_at): New.
11266 (cmd_qtstmat, gdb_ust_thread): New.
11267 (gdb_ust_init): New.
11268 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11269 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11270 (ST_REGENTRY): New.
11271 (x86_64_st_collect_regmap): New.
11272 (X86_64_NUM_ST_COLLECT_GREGS): New.
11273 (AMD64_RIP_REGNUM): New.
11274 (supply_static_tracepoint_registers): New.
11275 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11276 (ST_REGENTRY): New.
11277 (i386_st_collect_regmap): New.
11278 (i386_NUM_ST_COLLECT_GREGS): New.
11279 (supply_static_tracepoint_registers): New.
11280 * server.c (handle_query): Handle qXfer:statictrace:read.
11281 <qSupported>: Report support for StaticTracepoints, and
11282 qXfer:statictrace:read features.
11283 * server.h (traceframe_read_sdata)
11284 (supply_static_tracepoint_registers): Declare.
11285 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11286 (unpack_varlen_hex): Include in IPA build.
11287 * Makefile.in (ustlibs, ustinc): New.
11288 (IPA_OBJS): Add remote-utils-ipa.o.
11289 ($(IPA_LIB)): Link -ldl and -lpthread.
11291 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11292 * config.in, configure: Regenerate.
11294 2010-06-20 Ian Lance Taylor <iant@google.com>
11295 Pedro Alves <pedro@codesourcery.com>
11297 * linux-x86-low.c (always_true): Delete.
11298 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11299 trying to fool the compiler with always_true.
11301 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11303 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11304 conditions in gdbserver.
11306 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11308 * spu-low.c (spu_read_memory): Wrap around local store limit.
11309 (spu_write_memory): Likewise.
11311 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11313 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11314 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11316 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11318 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11319 uses with LONGEST uses.
11321 2010-06-14 Stan Shebs <stan@codesourcery.com>
11322 Pedro Alves <pedro@codesourcery.com>
11326 * linux-x86-low.c: Include limits.h.
11328 (always_true): New.
11331 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11332 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11333 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11334 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11335 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11336 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11337 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11338 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11339 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11340 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11341 (amd64_emit_void_call_2): New.
11342 (amd64_emit_ops): New.
11343 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11344 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11345 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11346 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11347 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11348 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11349 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11350 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11351 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11352 (i386_emit_stack_adjust, i386_emit_int_call_1)
11353 (i386_emit_void_call_2): New.
11354 (i386_emit_ops): New.
11355 (x86_emit_ops): New.
11356 (the_low_target): Install x86_emit_ops.
11357 * server.h (struct emit_ops): New.
11358 (get_raw_reg_func_addr): Declare.
11359 (current_insn_ptr, emit_error): Declare.
11360 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11361 (set_trace_state_variable_value): New defines.
11362 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11363 addr_get_trace_state_variable_value and
11364 addr_set_trace_state_variable_value.
11365 (symbol_list): New fields for get_raw_reg,
11366 get_trace_state_variable_value and set_trace_state_variable_value.
11367 (condfn): New typedef.
11368 (struct tracepoint): New field `compiled_cond'.
11369 (do_action_at_tracepoint): Clear compiled_cond.
11370 (get_trace_state_variable_value, set_trace_state_variable_value):
11372 (condition_true_at_tracepoint): If there's a compiled condition,
11374 (current_insn_ptr, emit_error): New globals.
11375 (struct bytecode_address): New.
11376 (get_raw_reg_func_addr): New.
11377 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11378 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11379 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11380 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11381 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11382 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11383 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11384 (compile_tracepoint_condition, compile_bytecodes): New.
11385 * target.h (emit_ops): Forward declare.
11386 (struct target_ops): New field emit_ops.
11387 (target_emit_ops): New.
11388 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11389 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11390 * linux-low.c (linux_emit_ops): New.
11391 (linux_target_ops): Install it.
11392 * linux-low.h (struct linux_target_ops): New field emit_ops.
11394 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11396 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11397 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11399 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11400 Stan Shebs <stan@codesourcery.com>
11402 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11403 (all): Depend on $(extra_libraries).
11404 (install-only): Install the IPA.
11405 (IPA_OBJS, IPA_LIB): New.
11406 (clean): Remove the IPA lib.
11407 (IPAGENT_CFLAGS): New.
11408 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11409 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11410 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11411 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11412 * configure.ac: Check for atomic builtins support in the compiler.
11413 (IPA_DEPFILES, extra_libraries): Define.
11414 * configure.srv (ipa_obj): Add description.
11415 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11416 (i[34567]86-*-linux*): Set ipa_obj.
11417 (x86_64-*-linux*): Set ipa_obj.
11418 * linux-low.c (stabilizing_threads): New.
11419 (supports_fast_tracepoints): New.
11420 (linux_detach): Stabilize threads before detaching.
11421 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11422 the lwp is either not stabilizing, or is moving out of a jump pad.
11423 (linux_fast_tracepoint_collecting): New.
11424 (maybe_move_out_of_jump_pad): New.
11425 (enqueue_one_deferred_signal): New.
11426 (dequeue_one_deferred_signal): New.
11427 (linux_wait_for_event_1): If moving out of a jump pad, defer
11428 pending signals to later.
11429 (linux_stabilize_threads): New.
11430 (linux_wait_1): Check if threads need moving out of jump pads, and
11432 (stuck_in_jump_pad_callback): New.
11433 (move_out_of_jump_pad_callback): New.
11434 (lwp_running): New.
11435 (linux_resume_one_lwp): Handle moving out of jump pads.
11436 (linux_set_resume_request): Dequeue deferred signals.
11437 (need_step_over_p): Also step over fast tracepoint jumps.
11438 (start_step_over): Also uninsert fast tracepoint jumps.
11439 (finish_step_over): Also reinsert fast tracepoint jumps.
11440 (linux_install_fast_tracepoint_jump): New.
11441 (linux_target_ops): Install linux_stabilize_threads and
11442 linux_install_fast_tracepoint_jump_pad.
11443 * linux-low.h (linux_target_ops) <get_thread_area,
11444 install_fast_tracepoint_jump_pad>: New fields.
11445 (struct lwp_info) <collecting_fast_tracepoint,
11446 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11447 (linux_get_thread_area): Declare.
11448 * linux-x86-low.c (jump_insn): New.
11449 (x86_get_thread_area): New.
11450 (append_insns): New.
11451 (push_opcode): New.
11452 (amd64_install_fast_tracepoint_jump_pad): New.
11453 (i386_install_fast_tracepoint_jump_pad): New.
11454 (x86_install_fast_tracepoint_jump_pad): New.
11455 (the_low_target): Install x86_get_thread_area and
11456 x86_install_fast_tracepoint_jump_pad.
11457 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11458 (struct fast_tracepoint_jump): New.
11459 (fast_tracepoint_jump_insn): New.
11460 (fast_tracepoint_jump_shadow): New.
11461 (find_fast_tracepoint_jump_at): New.
11462 (fast_tracepoint_jump_here): New.
11463 (delete_fast_tracepoint_jump): New.
11464 (set_fast_tracepoint_jump): New.
11465 (uninsert_fast_tracepoint_jumps_at): New.
11466 (reinsert_fast_tracepoint_jumps_at): New.
11467 (set_breakpoint_at): Use write_inferior_memory.
11468 (uninsert_raw_breakpoint): Use write_inferior_memory.
11469 (check_mem_read): Mask out fast tracepoint jumps.
11470 (check_mem_write): Mask out fast tracepoint jumps.
11471 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11472 (set_fast_tracepoint_jump): Declare.
11473 (delete_fast_tracepoint_jump)
11474 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11475 (reinsert_fast_tracepoint_jumps_at): Declare.
11476 * regcache.c: Don't compile many functions when building the
11477 in-process agent library.
11478 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11479 the register buffer in the heap.
11480 (free_register_cache): If the register buffer isn't owned by the
11481 regcache, don't free it.
11482 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11483 pre-existing register caches.
11484 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11486 (convert_ascii_to_int): : Constify `from' parameter type.
11487 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11488 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11489 the needed buffer in-place.
11490 (relocate_instruction): New.
11491 * server.c (handle_query) <qSymbols>: If the target supports
11492 tracepoints, give it a chance of looking up symbols. Report
11493 support for fast tracepoints.
11494 (handle_status): Stabilize threads.
11495 (process_serial_event): Adjust.
11496 * server.h (struct fast_tracepoint_jump): Forward declare.
11497 (struct process_info) <fast_tracepoint_jumps>: New field.
11498 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11499 (decode_X_packet, decode_M_packet): Adjust.
11500 (relocate_instruction): Declare.
11501 (in_process_agent_loaded): Declare.
11502 (tracepoint_look_up_symbols): Declare.
11503 (struct fast_tpoint_collect_status): Declare.
11504 (fast_tracepoint_collecting): Declare.
11505 (force_unlock_trace_buffer): Declare.
11506 (handle_tracepoint_bkpts): Declare.
11507 (initialize_low_tracepoint)
11508 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11509 * target.h (struct target_ops) <stabilize_threads,
11510 install_fast_tracepoint_jump_pad>: New fields.
11511 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11512 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11513 [HAVE_STDINT_H]: Include stdint.h.
11514 (trace_debug_1): Rename to ...
11515 (trace_vdebug): ... this.
11516 (trace_debug): Rename to ...
11517 (trace_debug_1): ... this. Add `level' parameter.
11518 (trace_debug): New.
11519 (ATTR_USED, ATTR_NOINLINE): New.
11520 (IP_AGENT_EXPORT): New.
11521 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11522 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11523 (about_to_request_buffer_space, trace_buffer_is_full)
11524 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11525 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11526 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11527 (traceframe_write_count, traceframes_created)
11528 (trace_state_variables)
11529 New renaming defines.
11530 (struct ipa_sym_addresses): New.
11531 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11532 (symbol_list): New.
11533 (ipa_sym_addrs): New.
11534 (all_tracepoint_symbols_looked_up): New.
11535 (in_process_agent_loaded): New.
11536 (write_e_ipa_not_loaded): New.
11537 (maybe_write_ipa_not_loaded): New.
11538 (tracepoint_look_up_symbols): New.
11539 (debug_threads) [IN_PROCESS_AGENT]: New.
11540 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11541 (UNKNOWN_SIDE_EFFECTS): New.
11542 (stop_tracing): New.
11543 (flush_trace_buffer): New.
11544 (stop_tracing_bkpt): New.
11545 (flush_trace_buffer_bkpt): New.
11546 (read_inferior_integer): New.
11547 (read_inferior_uinteger): New.
11548 (read_inferior_data_pointer): New.
11549 (write_inferior_data_pointer): New.
11550 (write_inferior_integer): New.
11551 (write_inferior_uinteger): New.
11552 (struct collect_static_trace_data_action): Delete.
11553 (enum tracepoint_type): New.
11554 (struct tracepoint) <type>: New field `type'.
11555 <actions_str, step_actions, step_actions_str>: Only include in
11557 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11558 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11559 (tracepoints): Use IP_AGENT_EXPORT.
11560 (last_tracepoint): Don't include in the IPA.
11561 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11562 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11563 (alloced_trace_state_variables): New.
11564 (trace_state_variables): Use IP_AGENT_EXPORT.
11565 (traceframe_t): Delete unused variable.
11566 (circular_trace_buffer): Don't include in the IPA.
11567 (trace_buffer_start): Delete.
11568 (struct trace_buffer_control): New.
11569 (trace_buffer_free): Delete.
11570 (struct ipa_trace_buffer_control): New.
11571 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11572 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11574 (trace_buffer_ctrl): New.
11575 (TRACE_BUFFER_CTRL_CURR): New.
11576 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11577 Reimplement as macros.
11578 (trace_buffer_wrap): Delete.
11579 (traceframe_write_count, traceframe_read_count)
11580 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11581 (struct tracepoint_hit_ctx) <type>: New field.
11582 (struct fast_tracepoint_ctx): New.
11583 (memory_barrier): New.
11585 (record_tracepoint_error): Update atomically in the IPA.
11586 (clear_inferior_trace_buffer): New.
11587 (about_to_request_buffer_space): New.
11588 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11589 updating the same buffer.
11590 (add_tracepoint): Default the tracepoint's type to trap
11591 tracepoint, and orig_size to -1.
11592 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11593 internal variables.
11594 (create_trace_state_variable): New parameter `gdb'. Handle it.
11595 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11596 (cmd_qtdp): Handle fast tracepoints.
11597 (cmd_qtdv): Adjust.
11598 (max_jump_pad_size): New.
11599 (gdb_jump_pad_head): New.
11600 (get_jump_space_head): New.
11601 (claim_jump_space): New.
11602 (sort_tracepoints): New.
11603 (MAX_JUMP_SIZE): New.
11604 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11606 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11607 support. Upload fast traceframes, and delete internal IPA
11609 (stop_tracing_handler): New.
11610 (flush_trace_buffer_handler): New.
11611 (cmd_qtstop): Upload fast tracepoints.
11612 (response_tracepoint): Handle fast tracepoints.
11613 (tracepoint_finished_step): Upload fast traceframes. Set the
11614 tracepoint hit context's tracepoint type.
11615 (handle_tracepoint_bkpts): New.
11616 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11617 type. Add comment about fast tracepoints.
11618 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11619 non-existing action_str field.
11620 (get_context_regcache): Handle fast tracepoints.
11621 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11623 (fast_tracepoint_from_jump_pad_address): New.
11624 (fast_tracepoint_from_ipa_tpoint_address): New.
11625 (collecting_t): New.
11626 (force_unlock_trace_buffer): New.
11627 (fast_tracepoint_collecting): New.
11629 (gdb_collect): New.
11630 (write_inferior_data_ptr): New.
11631 (target_tp_heap): New.
11632 (target_malloc): New.
11633 (download_agent_expr): New.
11635 (download_tracepoints): New.
11636 (download_trace_state_variables): New.
11637 (upload_fast_traceframes): New.
11638 (IPA_FIRST_TRACEFRAME): New.
11639 (IPA_NEXT_TRACEFRAME_1): New.
11640 (IPA_NEXT_TRACEFRAME): New.
11641 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11642 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11643 (gdb_jump_pad_buffer_end): New.
11644 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11645 (initialize_tracepoint): Adjust.
11646 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11647 buffer. Initialize the low module.
11648 * utils.c (PREFIX, TOOLNAME): New.
11649 (malloc_failure): Use PREFIX.
11650 (error): In the IPA, an error causes an exit.
11651 (fatal, warning): Use PREFIX.
11652 (internal_error): Use TOOLNAME.
11653 (NUMCELLS): Increase to 10.
11654 * configure, config.in: Regenerate.
11656 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11658 * server.c (handle_query) <qSupported>: Do two passes over the
11659 qSupported string to avoid nesting strtok.
11661 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11663 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11665 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11666 -Wl,--dynamic-list.
11667 * configure: Regenerate.
11668 * proc-service.list: New.
11670 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11672 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11675 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11677 * gdbreplay.c (remote_open): Check error return from socket() call by
11678 its equality to -1 not by it being negative.
11679 * remote-utils.c (remote_open): Likewise.
11681 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11683 * config.h: Regenerate.
11685 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11687 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11688 doesn't provide PTRACE_GET_THREAD_AREA.
11690 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11692 * linux-m68k-low.c: Include <asm/ptrace.h>
11693 (ps_get_thread_area): Implement.
11695 2010-05-03 Doug Evans <dje@google.com>
11697 * event-loop.c (struct callback_event): New struct.
11698 (callback_list): New global.
11699 (append_callback_event, delete_callback_event): New functions.
11700 (process_callback): New function.
11701 (start_event_loop): Call it.
11702 * remote-utils.c (NOT_SCHEDULED): Define.
11703 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11704 moved out of readchar.
11705 (readchar): Rewrite. Call reschedule before returning.
11706 (reset_readchar): New function.
11707 (remote_close): Call it.
11708 (process_remaining, reschedule): New functions.
11709 * server.h (callback_handler_func): New typedef.
11710 (append_callback_event, delete_callback_event): Declare.
11712 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11714 * proc-service.c (ps_pglobal_lookup): Use
11715 thread_db_look_up_one_symbol.
11716 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11717 parameter. Use it instead of all_symbols_looked_up.
11718 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11720 (all_symbols_looked_up): Don't declare.
11721 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11722 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11724 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11725 Set all_symbols_looked_up here.
11726 (thread_db_look_up_one_symbol): New.
11727 (thread_db_get_tls_address): Adjust.
11728 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11729 thread_db object on the heap, and tentatively set it in the
11731 (thread_db_init): Don't set all_symbols_looked_up here.
11732 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11734 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11736 * linux-low.c (linux_kill, linux_detach): Adjust.
11737 (status_pending_p_callback): Remove redundant statement. Check
11738 for !TARGET_WAITIKIND_IGNORE, instead of
11739 TARGET_WAITKIND_STOPPED.
11740 (handle_tracepoints): Make sure LWP is locked. Adjust.
11741 (linux_wait_for_event_1): Adjust.
11742 (linux_cancel_breakpoints): New.
11743 (unsuspend_one_lwp): New.
11744 (unsuspend_all_lwps): New.
11745 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11746 (send_sigstop_callback): Change return type to int, add new
11747 `except' parameter and handle it.
11748 (suspend_and_send_sigstop_callback): New.
11749 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11750 pass them down. If SUSPEND, also increment the lwp's suspend
11752 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11753 (need_step_over_p): Don't consider suspended LWPs.
11754 (start_step_over): Adjust.
11755 (proceed_one_lwp): Change return type to int, add new `except'
11756 parameter and handle it.
11757 (unsuspend_and_proceed_one_lwp): New.
11758 (proceed_all_lwps): Use find_inferior instead of
11760 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11761 also decrement the suspend count of LWPs. Pass `except' down,
11762 instead of hacking its suspend count.
11763 (linux_pause_all): Add `freeze' parameter. Adjust.
11764 (linux_unpause_all): New.
11765 (linux_target_ops): Install linux_unpause_all.
11766 * server.c (handle_status): Adjust.
11767 * target.h (struct target_ops): New fields `unpause_all' and
11768 `cancel_breakpoints'. Add new parameter to `pause_all'.
11769 (pause_all): Add new `freeze' parameter.
11770 (unpause_all): New.
11771 (cancel_breakpoints): New.
11772 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11773 cancel breakpoints.
11774 (cmd_qtstart): Pause threads.
11775 (stop_tracing): Pause threads, and cancel breakpoints.
11776 * win32-low.c (win32_target_ops): Adjust.
11778 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11780 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11781 the inferior right away from here...
11782 (linux_wait_1): ... to here, and adjust to check the thread's
11783 last_resume_kind instead of the lwp's step or stop_expected flags.
11785 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11787 * README: Use consistent `GDB' and `GDBserver' spellings.
11789 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11791 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11792 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11793 (linux_detach_one_lwp): Assume the lwp is stopped.
11794 (any_thread_of): Delete.
11795 (linux_detach): Stop all lwps here. Don't blindly delete all
11797 (delete_lwp_callback): New.
11798 (linux_mourn): Delete all lwps of the process that is gone.
11799 (linux_wait_1): Don't delete the last lwp of the process here.
11800 * mem-break.h (mark_breakpoints_out): Declare.
11801 * mem-break.c (mark_breakpoints_out): New.
11802 (free_all_breakpoints): Use it.
11803 * server.c (handle_target_event): If the process is gone, mark
11805 * thread-db.c (struct thread_db) <create_bp>: New field.
11806 (thread_db_enable_reporting): Fix prototype. Store a thread event
11807 breakpoint reference in the thread_db struct.
11808 (thread_db_load_search): Clear the thread_db object.
11809 (try_thread_db_load_1): Ditto.
11810 (switch_to_process): New.
11811 (disable_thread_event_reporting): Use it.
11812 (remove_thread_event_breakpoints): New.
11813 (thread_db_detach, thread_db_mourn): Use it.
11815 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11817 * linux-low.c (linux_enable_event_reporting): New.
11818 (linux_wait_for_event_1, handle_extended_wait): Use it.
11820 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11822 * linux-low.c (linux_kill_one_lwp, linux_kill)
11823 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11824 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11825 SIGSTOP even if the LWP is stopped.
11826 (send_sigstop_callback): New.
11827 (stop_all_lwps): Use send_sigstop_callback instead.
11828 (linux_resume_one_thread): Adjust.
11829 (proceed_one_lwp): Still proceed an LWP that the client has
11830 requested to stop, if we haven't reported it as stopped yet. Make
11831 sure that LWPs the client want stopped, have a pending SIGSTOP.
11833 2010-04-26 Doug Evans <dje@google.com>
11835 * server.c (handle_general_set): Make static.
11837 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11838 Print received char after testing for error/eof instead of before.
11839 (input_interrupt): Tweak comment.
11841 2010-04-23 Doug Evans <dje@google.com>
11843 * server.c (start_inferior): Print inferior argv if --debug.
11845 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11847 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11848 * nto-x86-low.c: Include server.h
11850 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11852 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11853 be consistent with other sources of this directory.
11854 (init_registers_amd64): Correct name of source file of this function
11857 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11859 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11860 64-bit executables.
11862 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11864 * win32-i386-low.c: Add 64-bit support.
11865 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11866 (init_registers_amd64): Declare.
11867 (mappings): Add 64-bit version of array.
11868 (init_windows_x86): New function.
11869 (the_low_target): Change init_arch field to init_windows_x86.
11871 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11873 * win32-low.c: Adapt to support also 64-bit architecture.
11874 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11875 (get_image_name): Use SIZE_T type for local variable `done'.
11876 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11877 (toolhelp_get_dll_name): Idem.
11878 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11879 Use uintptr_t typecast to avoid warning.
11880 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11881 (handle_exception): Use phex_nz to avoid warning.
11882 (win32_wait): Remove unused local variable `process'.
11884 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11886 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11889 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11891 * configure.ac: Use `ws2_32' library for srv_mingw.
11892 * configure: Regenerate.
11893 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11894 * remote-utils.c: Likewise.
11896 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11898 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11899 if __x86_64__ is defined.
11901 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11903 * configure: Regenerate.
11905 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11907 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11908 * target.h (target_ops): New get_tib_address field.
11909 * win32-low.h (win32_thread_info): Add thread_local_base field.
11910 * win32-low.c (child_add_thread): Add tlb argument.
11911 Set thread_local_base field to TLB.
11912 (get_child_debug_event): Adapt to child_add_thread change.
11913 (win32_get_tib_address): New function.
11914 (win32_target_ops): Set get_tib_address field to
11915 win32_get_tib_address.
11916 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11918 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11920 * linux-low.c (linux_mourn): Also remove the process.
11921 * server.c (handle_target_event): Don't remove the process here.
11922 * nto-low.c (nto_mourn): New.
11923 (nto_target_ops): Install it.
11924 * spu-low.c (spu_mourn): New.
11925 (spu_target_ops): Install it.
11926 * win32-low.c (win32_mourn): New.
11927 (win32_target_ops): Install it.
11929 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11931 * server.h (buffer_xml_printf): Remove redundant `;'.
11933 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11935 * regcache.c (set_register_cache): Invalidate regcaches before
11936 changing the register cache layout.
11937 (regcache_invalidate_one): Allow a NULL regcache.
11938 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11939 regcaches before changing the register cache layout or the target
11942 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11944 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11945 variable warning on Linux/x86-64.
11947 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11949 GDBserver disconnected tracing support.
11951 * linux-low.c (linux_remove_process): Delete.
11952 (add_lwp): Don't set last_resume_kind here.
11953 (linux_kill): Use `mourn'.
11954 (linux_detach): Use `thread_db_detach', and `mourn'.
11955 (linux_mourn): New.
11956 (linux_attach_lwp_1): Adjust comment.
11957 (linux_attach): last_resume_kind moved the thread_info; adjust.
11958 (status_pending_p_callback): Adjust.
11959 (linux_wait_for_event_1): Adjust.
11960 (count_events_callback, select_singlestep_lwp_callback)
11961 (select_event_lwp_callback, cancel_breakpoints_callback)
11962 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11963 (proceed_one_lwp): Adjust.
11964 (linux_async): Add debug output.
11965 (linux_thread_stopped): New.
11966 (linux_pause_all): New.
11967 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11969 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11970 (thread_db_free): Delete declaration.
11971 (thread_db_detach, thread_db_mourn): Declare.
11972 * thread-db.c (thread_db_init): Use thread_db_mourn.
11973 (thread_db_free): Delete, split in two.
11974 (disable_thread_event_reporting): New.
11975 (thread_db_detach): New.
11976 (thread_db_mourn): New.
11978 * server.h (struct thread_info) <last_resume_kind>: New field.
11979 <attached>: Add comment.
11980 <gdb_detached>: New field.
11981 (handler_func): Change return type to int.
11982 (handle_serial_event, handle_target_event): Ditto.
11983 (gdb_connected): Declare.
11985 (disconnected_tracing): Declare.
11986 (stop_tracing): Declare.
11988 * server.c (handle_query) <qSupported>: Report support for
11989 disconnected tracing.
11990 (queue_stop_reply_callback): Account for running threads.
11991 (gdb_wants_thread_stopped): New.
11992 (gdb_wants_all_threads_stopped): New.
11993 (gdb_reattached_process): New.
11994 (handle_status): Clear the `gdb_detached' flag of all processes.
11995 In all-stop, stop all threads.
11996 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11997 (process_serial_event): If the remote connection breaks, or if an
11998 exit was forced with "monitor exit", force an event loop exit.
11999 Handle disconnected tracing on detach.
12000 (handle_serial_event): Adjust.
12001 (handle_target_event): If GDB isn't connected, forward events back
12002 to the inferior, unless the last process exited, in which case,
12003 exit gdbserver. Adjust interface.
12005 * remote-utils.c (remote_open): Don't block in accept. Instead
12006 register an event loop source on the listen socket file
12007 descriptor. Refactor bits into ...
12008 (listen_desc): ... this new global.
12009 (gdb_connected): ... this new function.
12010 (enable_async_notification): ... this new function.
12011 (handle_accept_event): ... this new function.
12012 (remote_close): Clear remote_desc.
12014 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12016 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12018 (mourn_inferior): Define.
12019 (target_process_qsupported): Avoid the dangling else problem.
12020 (thread_stopped): Define.
12021 (pause_all): Define.
12022 (target_waitstatus_to_string): Declare.
12023 * target.c (target_waitstatus_to_string): New.
12025 * tracepoint.c (tracing): Make extern.
12026 (disconnected_tracing): New.
12027 (stop_tracing): Make extern. Handle tracing stops due to GDB
12029 (cmd_qtdisconnected): New.
12030 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12031 (handle_tracepoint_general_set): Handle QTDisconnected.
12033 * event-loop.c (event_handler_func): Change return type to int.
12034 (process_event): Bail out if the event handler wants the event
12036 (handle_file_event): Ditto.
12037 (start_event_loop): Bail out if the event handler wants the event
12040 * nto-low.c (nto_target_ops): Adjust.
12041 * spu-low.c (spu_wait): Don't remove the process here.
12042 (spu_target_ops): Adjust.
12043 * win32-low.c (win32_wait): Don't remove the process here.
12044 (win32_target_ops): Adjust.
12046 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12048 * regcache.c (realloc_register_cache): Invalidate inferior's
12049 regcache before recreating it.
12051 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12053 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12055 2010-04-09 Stan Shebs <stan@codesourcery.com>
12056 Pedro Alves <pedro@codesourcery.com>
12058 * server.h (LONGEST): New.
12059 (struct thread_info) <while_stepping>: New field.
12060 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12062 (initialize_tracepoint, handle_tracepoint_general_set)
12063 (handle_tracepoint_query, tracepoint_finished_step)
12064 (tracepoint_was_hit, release_while_stepping_state_list):
12065 (current_traceframe): Declare.
12066 * server.c (handle_general_set): Handle tracepoint packets.
12067 (read_memory): New.
12068 (write_memory): New.
12069 (handle_search_memory_1): Use read_memory.
12070 (handle_query): Report support for conditional tracepoints, trace
12071 state variables, and tracepoint sources. Handle tracepoint
12073 (main): Initialize the tracepoints module.
12074 (process_serial_event): Handle traceframe reads/writes.
12076 * linux-low.c (handle_tracepoints): New.
12077 (linux_wait_1): Call it.
12078 (linux_resume_one_lwp): Handle while-stepping.
12079 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12080 (linux_target_ops): Install them.
12081 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12083 * linux-x86-low.c (x86_supports_tracepoints): New.
12084 (the_low_target). Install it.
12086 * mem-break.h (delete_breakpoint): Declare.
12087 * mem-break.c (delete_breakpoint): Make external.
12089 * target.h (struct target_ops): Add `supports_tracepoints',
12090 `read_pc', and `write_pc' fields.
12091 (target_supports_tracepoints): Define.
12092 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12095 * regcache.h (struct regcache) <registers_owned>: New field.
12096 (init_register_cache, regcache_cpy): Declare.
12097 (regcache_read_pc, regcache_write_pc): Declare.
12098 (register_cache_size): Declare.
12099 (supply_regblock): Declare.
12100 * regcache.c (init_register_cache): New.
12101 (new_register_cache): Use it.
12102 (regcache_cpy): New.
12103 (register_cache_size): New.
12104 (supply_regblock): New.
12105 (regcache_read_pc, regcache_write_pc): New.
12107 * tracepoint.c: New.
12109 * Makefile.in (OBS): Add tracepoint.o.
12110 (tracepoint.o): New rule.
12112 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12114 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12116 (i386-mmx.c): Likewise.
12117 (i386-mmx-linux.o): Likewise.
12118 (i386-mmx-linux.c): Likewise.
12120 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12121 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12122 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12123 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12125 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12126 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12127 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12129 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12131 * Makefile.in (clean): Updated.
12133 (i386-avx.c): Likewise.
12134 (i386-avx-linux.o): Likewise.
12135 (i386-avx-linux.c): Likewise.
12136 (amd64-avx.o): Likewise.
12137 (amd64-avx.c): Likewise.
12138 (amd64-avx-linux.o): Likewise.
12139 (amd64-avx-linux.c): Likewise.
12141 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12142 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12143 (srv_amd64_regobj): Add amd64-avx.o.
12144 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12145 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12146 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12147 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12148 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12149 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12150 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12152 * i387-fp.c: Include "i386-xstate.h".
12154 (i387_cache_to_xsave): Likewise.
12155 (i387_xsave_to_cache): Likewise.
12156 (x86_xcr0): Likewise.
12158 * i387-fp.h (i387_cache_to_xsave): Likewise.
12159 (i387_xsave_to_cache): Likewise.
12160 (x86_xcr0): Likewise.
12162 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12163 * linux-crisv32-low.c (target_regsets): Likewise.
12164 * linux-m68k-low.c (target_regsets): Likewise.
12165 * linux-mips-low.c (target_regsets): Likewise.
12166 * linux-ppc-low.c (target_regsets): Likewise.
12167 * linux-s390-low.c (target_regsets): Likewise.
12168 * linux-sh-low.c (target_regsets): Likewise.
12169 * linux-sparc-low.c (target_regsets): Likewise.
12170 * linux-xtensa-low.c (target_regsets): Likewise.
12172 * linux-low.c: Include <sys/uio.h>.
12173 (regsets_fetch_inferior_registers): Support nt_type.
12174 (regsets_store_inferior_registers): Likewise.
12175 (linux_process_qsupported): New.
12176 (linux_target_ops): Add linux_process_qsupported.
12178 * linux-low.h (regset_info): Add nt_type.
12179 (linux_target_ops): Add process_qsupported.
12181 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12183 (init_registers_i386_avx_linux): New.
12184 (init_registers_amd64_avx_linux): Likewise.
12185 (xmltarget_i386_linux_no_xml): Likewise.
12186 (xmltarget_amd64_linux_no_xml): Likewise.
12187 (PTRACE_GETREGSET): Likewise.
12188 (PTRACE_SETREGSET): Likewise.
12189 (x86_fill_xstateregset): Likewise.
12190 (x86_store_xstateregset): Likewise.
12191 (use_xml): Likewise.
12192 (x86_linux_update_xmltarget): Likewise.
12193 (x86_linux_process_qsupported): Likewise.
12194 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12195 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12196 init_registers_i386_linux here. Call
12197 x86_linux_update_xmltarget.
12198 (the_low_target): Add x86_linux_process_qsupported.
12200 * server.c (handle_query): Call target_process_qsupported.
12202 * target.h (target_ops): Add process_qsupported.
12203 (target_process_qsupported): New.
12205 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12207 * inferiors.c (add_thread): Set last_status kind to
12208 TARGET_WAITKIND_IGNORE.
12209 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12210 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12211 (linux_wait_1): Move `thread' local definition to block that uses
12212 it. Don't NULL initialize `event_child'.
12213 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12214 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12215 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12217 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12219 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12220 an extended waitstatus, or by a watchpoint.
12221 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12222 thread was stepping or has been stopped by a watchpoint.
12224 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12226 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12227 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12228 of another, then delete the previous, and validate all
12230 (validate_inserted_breakpoint): New.
12231 (delete_disabled_breakpoints): New.
12232 (validate_breakpoints): New.
12233 (check_mem_read): Validate breakpoints before trusting their
12234 shadow. Delete disabled breakpoints.
12235 (check_mem_write): Validate breakpoints before trusting they
12236 should be inserted. Delete disabled breakpoints.
12237 * mem-break.h (validate_breakpoints):
12238 * server.c (handle_query): Validate breakpoints when we see a
12241 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12243 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12244 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12245 if we could tell there's a GDB breakpoint at stop_pc.
12246 (need_step_over_p): Don't do a step over if we find a GDB
12247 breakpoint at the resume PC.
12249 * mem-break.c (struct raw_breakpoint): New.
12250 (enum bkpt_type): New type `gdb_breakpoint'.
12251 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12252 fields. New field `raw'.
12253 (find_raw_breakpoint_at): New.
12254 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12255 breakpoint instead.
12256 (set_breakpoint_at): Adjust.
12257 (delete_raw_breakpoint): New.
12258 (release_breakpoint): New.
12259 (delete_breakpoint): Rename to...
12260 (delete_breakpoint_1): ... this. Add proc parameter. Use
12261 release_breakpoint. Return ENOENT.
12262 (delete_breakpoint): Reimplement.
12263 (find_breakpoint_at): Delete.
12264 (find_gdb_breakpoint_at): New.
12265 (delete_breakpoint_at): Delete.
12266 (set_gdb_breakpoint_at): New.
12267 (delete_gdb_breakpoint_at): New.
12268 (gdb_breakpoint_here): New.
12269 (set_reinsert_breakpoint): Use release_breakpoint.
12270 (uninsert_breakpoint): Rename to ...
12271 (uninsert_raw_breakpoint): ... this.
12272 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12273 (reinsert_raw_breakpoint): Change parameter type to
12275 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12277 (check_breakpoints): Adjust. Use release_breakpoint.
12278 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12279 (breakpoint_inserted_here): Ditto.
12280 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12281 Don't trust the breakpoint's shadow if it is not inserted.
12282 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12283 (delete_all_breakpoints): Adjust.
12284 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12285 use delete_breakpoint_1.
12287 * mem-break.h (breakpoints_supported): Delete declaration.
12288 (set_gdb_breakpoint_at): Declare.
12289 (gdb_breakpoint_here): Declare.
12290 (delete_breakpoint_at): Delete.
12291 (delete_gdb_breakpoint_at): Declare.
12293 * server.h (struct raw_breakpoint): Forward declare.
12294 (struct process_info): New field `raw_breakpoints'.
12296 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12299 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12301 * linux-low.c (status_pending_p_callback): Fix comment.
12302 (linux_wait_for_event_1): Move most of the internal breakpoint
12303 handling from here...
12304 (linux_wait_1): ... to here.
12305 (count_events_callback): New.
12306 (select_singlestep_lwp_callback): New.
12307 (select_event_lwp_callback): New.
12308 (cancel_breakpoints_callback): New.
12309 (select_event_lwp): New.
12310 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12311 priority to all LWPs that have had events that should be reported
12312 to the client. Cancel breakpoints when about to reporting the
12313 event to the client, not while stopping lwps. No longer cancel
12314 finished single-steps here.
12315 (cancel_finished_single_step): Delete.
12316 (cancel_finished_single_steps): Delete.
12318 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12320 * mem-break.c (enum bkpt_type): New.
12321 (struct breakpoint): New field `type'.
12322 (set_breakpoint_at): Change return type to struct breakpoint
12323 pointer. Set type to `other_breakpoint' by default.
12324 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12325 in the breakpoint list.
12326 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12327 (reinsert_breakpoint): Rename to ...
12328 (reinsert_raw_breakpoint): ... this.
12329 (reinsert_breakpoints_at): Adjust.
12330 * mem-break.h (struct breakpoint): Declare.
12331 (set_breakpoint_at): Change return type to struct breakpoint
12334 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12336 * server.c (handle_query): Assign, not compare.
12338 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12340 Teach linux gdbserver to step-over-breakpoints.
12342 * linux-low.c (can_hardware_single_step): New.
12343 (supports_breakpoints): New.
12344 (handle_extended_wait): If stopping threads, read the stop pc of
12345 the new cloned LWP.
12347 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12348 low target doesn't support retrieving the PC.
12349 (add_lwp): Set last_resume_kind to resume_continue.
12350 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12351 (linux_attach): Don't clear stop_expected. Set the lwp's
12352 last_resume_kind to resume_stop.
12353 (linux_detach_one_lwp): Don't check for removed breakpoints.
12354 (check_removed_breakpoint): Delete.
12355 (status_pending_p): Rename to ...
12356 (status_pending_p_callback): ... this. Don't check for removed
12357 breakpoints. Don't consider threads that are stopped from GDB's
12359 (linux_wait_for_lwp): Always read the stop_pc here.
12360 (cancel_breakpoint): New.
12361 (step_over_bkpt): New global.
12362 (linux_wait_for_event_1): Implement stepping over breakpoints.
12363 (gdb_wants_lwp_stopped): New.
12364 (gdb_wants_all_stopped): New.
12365 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12366 single-step traps here. Store the thread's last reported target
12368 (send_sigstop): Don't clear stop_expected. Always set it,
12370 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12371 (cancel_finished_single_step): New.
12372 (cancel_finished_single_steps): New.
12373 (wait_for_sigstop): Don't cancel finished single-step traps here.
12374 (linux_resume_one_lwp): Don't check for removed breakpoints.
12375 Don't set `step' on non-hardware step archs.
12376 (linux_set_resume_request): Ignore resume_stop requests if already
12377 stopping or stopped. Set the lwp's last_resume_kind.
12378 (resume_status_pending_p): Don't check for removed breakpoints.
12379 (need_step_over_p): New.
12380 (start_step_over): New.
12381 (finish_step_over): New.
12382 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12383 requests. Clear the thread's last reported target waitstatus.
12384 Don't use the `suspended' flag. Don't consider pending breakpoints.
12385 (linux_resume): Start a step-over if necessary.
12386 (proceed_one_lwp): New.
12387 (proceed_all_lwps): New.
12388 (unstop_all_lwps): New.
12389 * linux-low.h (struct lwp_info): Rewrite comment for the
12390 `suspended' flag. Add the `stop_pc' field. Delete the
12391 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12392 Add `'last_resume_kind' and `need_step_over' fields.
12393 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12394 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12395 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12396 (set_raw_breakpoint_at): New.
12397 (set_breakpoint_at): Rewrite to use it.
12398 (reinsert_breakpoint_handler): Delete.
12399 (set_reinsert_breakpoint): New.
12400 (reinsert_breakpoint_by_bp): Delete.
12401 (delete_reinsert_breakpoints): New.
12402 (uninsert_breakpoint): Rewrite.
12403 (uninsert_breakpoints_at): New.
12404 (reinsert_breakpoint): Rewrite.
12405 (reinsert_breakpoints_at): New.
12406 (check_breakpoints): Rewrite.
12407 (breakpoint_here): New.
12408 (breakpoint_inserted_here): New.
12409 (check_mem_read): Adjust.
12410 * mem-break.h (breakpoints_supported, breakpoint_here)
12411 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12412 (reinsert_breakpoint_by_bp): Delete declaration.
12413 (delete_reinsert_breakpoints): Declare.
12414 (reinsert_breakpoint): Delete declaration.
12415 (reinsert_breakpoints_at): Declare.
12416 (uninsert_breakpoint): Delete declaration.
12417 (uninsert_breakpoints_at): Declare.
12418 (check_breakpoints): Adjust prototype.
12419 * server.h: Adjust include order.
12420 (struct thread_info): Declare here. Add a `last_status' field.
12422 2010-03-23 Michael Snyder <msnyder@vmware.com>
12424 * server.c (crc32): New function.
12425 (handle_query): Add handling for 'qCRC:' request.
12427 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12429 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12430 lwp had been stopped by a watchpoint.
12432 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12434 * server.h (internal_error): Declare.
12435 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12436 * utils.c (internal_error): New function.
12438 2010-03-15 Andreas Schwab <schwab@redhat.com>
12440 * configure.srv: Fix typo setting srv_regobj.
12442 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12444 * linux-low.c (fetch_register): Avoid passing a non string literal
12446 (usr_store_inferior_registers): Ditto.
12448 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12450 * linux-low.c (linux_write_memory): Bail out early if peeking
12453 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12455 * linux-low.h (struct lwp_info): New fields
12456 `stopped_by_watchpoint' and `stopped_data_address'.
12457 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12458 here, and cache them in the lwp object.
12459 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12461 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12463 (linux_stopped_by_watchpoint): Rewrite.
12464 (linux_stopped_data_address): Rewrite.
12466 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12468 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12469 switching the current inferior, not before.
12471 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12473 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12474 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12475 i386-linux.c and amd64-linux.c.
12476 (reg-i386.o): Removed.
12477 (reg-i386.c): Likewise.
12478 (reg-i386-linux.o): Likewise.
12479 (reg-i386-linux.c): Likewise.
12480 (reg-x86-64.o): Likewise.
12481 (reg-x86-64.c): Likewise.
12482 (reg-x86-64-linux.o): Likewise.
12483 (reg-x86-64-linux.c): Likewise.
12485 (i386.c): Likewise.
12486 (i386-linux.o): Likewise.
12487 (i386-linux.c): Likewise.
12488 (amd64.o): Likewise.
12489 (amd64.c): Likewise.
12490 (amd64-linux.o): Likewise.
12491 (amd64-linux.c): Likewise.
12493 * configure.srv (srv_i386_regobj): New.
12494 (srv_i386_linux_regobj): Likewise.
12495 (srv_amd64_regobj): Likewise.
12496 (srv_amd64_linux_regobj): Likewise.
12497 (srv_i386_32bit_xmlfiles): Likewise.
12498 (srv_i386_64bit_xmlfiles): Likewise.
12499 (srv_i386_xmlfiles): Likewise.
12500 (srv_amd64_xmlfiles): Likewise.
12501 (srv_i386_linux_xmlfiles): Likewise.
12502 (srv_amd64_linux_xmlfiles): Likewise.
12503 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12504 srv_xmlfiles to $srv_i386_xmlfiles.
12505 (i[34567]86-*-mingw32ce*): Likewise.
12506 (i[34567]86-*-mingw*): Likewise.
12507 (i[34567]86-*-nto*): Likewise.
12508 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12509 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12510 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12511 (x86_64-*-linux*): Likewise.
12513 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12514 (init_registers_amd64_linux): New.
12515 (x86_arch_setup): Replace init_registers_x86_64_linux with
12516 init_registers_amd64_linux.
12518 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12520 * configure.ac: Check for libdl. If it is not available link against
12521 static libthread_db.
12522 * configure: Regenerate.
12524 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12528 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12529 handing a read watchpoint.
12530 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12532 2010-02-12 Doug Evans <dje@google.com>
12534 * linux-low.c (linux_supports_tracefork_flag): Document.
12535 (linux_look_up_symbols): Add comment.
12537 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12539 * regcache.c (supply_register): Clear regcache if buf is NULL.
12541 2010-02-02 Nicolas Roche <roche@sourceware.org>
12542 Joel Brobecker <brobecker@adacore.com>
12544 * inferiors.c (find_inferior): Add function documentation.
12545 (unloaded_dll): Handle the case where the unloaded dll has not
12546 been previously registered in the dll list.
12548 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12550 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12551 (thumb2_breakpoint): New.
12552 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12554 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12556 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12557 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12560 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12562 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12564 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12566 * linux-s390-low.c (s390_collect_ptrace_register)
12567 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12569 2010-01-21 Doug Evans <dje@google.com>
12571 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12572 (PTRACE_ARG4_TYPE): New macro.
12573 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12574 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12575 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12576 (usr_store_inferior_registers): Ditto.
12577 (linux_read_memory, linux_write_memory): Ditto.
12578 (linux_test_for_tracefork): Ditto.
12580 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12581 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12583 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12585 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12588 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12590 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12591 prototype to take a regcache. Adjust.
12593 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12595 * regcache.h (struct thread_info): Forward declare.
12596 (struct regcache): New.
12597 (new_register_cache): Adjust prototype.
12598 (get_thread_regcache): Declare.
12599 (free_register_cache): Adjust prototype.
12600 (registers_to_string, registers_from_string): Ditto.
12601 (supply_register, supply_register_by_name, collect_register)
12602 (collect_register_as_string, collect_register_by_name): Ditto.
12603 * regcache.c (struct inferior_regcache_data): Delete.
12604 (get_regcache): Rename to ...
12605 (get_thread_regcache): ... this. Adjust. Switch inferior before
12606 fetching registers.
12607 (regcache_invalidate_one): Adjust.
12608 (regcache_invalidate): Fix prototype.
12609 (new_register_cache): Return the new register cache.
12610 (free_register_cache): Change prototype.
12611 (realloc_register_cache): Adjust.
12612 (registers_to_string): Change prototype to take a regcache. Adjust.
12613 (registers_from_string): Ditto.
12614 (register_data): Ditto.
12615 (supply_register): Ditto.
12616 (supply_register_by_name): Ditto.
12617 (collect_register): Ditto.
12618 (collect_register_as_string): Ditto.
12619 (collect_register_by_name): Ditto.
12620 * server.c (process_serial_event): Adjust.
12621 * linux-low.h (regset_fill_func, regset_store_func): Change
12623 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12625 * linux-low.c (get_stop_pc): Adjust.
12626 (check_removed_breakpoint): Adjust.
12627 (linux_wait_for_event): Adjust.
12628 (linux_resume_one_lwp): Adjust.
12629 (fetch_register): Add regcache parameter. Adjust.
12630 (usr_store_inferior_registers): Ditto.
12631 (regsets_fetch_inferior_registers): Ditto.
12632 (regsets_store_inferior_registers): Ditto.
12633 (linux_fetch_registers, linux_store_registers): Ditto.
12634 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12636 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12638 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12639 prototype to take a regcache.
12640 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12641 * remote-utils.c (convert_ascii_to_int, outreg)
12642 (prepare_resume_reply): Change prototype to take a regcache.
12644 * target.h (struct target_ops) <fetch_registers, store_registers>:
12645 Change prototype to take a regcache.
12646 (fetch_inferior_registers, store_inferior_registers): Change
12647 prototype to take a regcache. Adjust.
12648 * proc-service.c (ps_lgetregs): Adjust.
12649 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12650 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12651 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12652 take a regcache. Adjust.
12653 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12654 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12655 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12656 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12657 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12658 (cris_cannot_fetch_register):
12659 (cris_breakpoint_at): Change prototype to take a regcache.
12661 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12662 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12663 to take a regcache. Adjust.
12664 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12666 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12667 take a regcache. Adjust.
12668 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12669 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12670 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12671 * linux-mips-low.c (mips_get_pc):
12672 (mips_set_pc): Change prototype to take a regcache. Adjust.
12673 (mips_reinsert_addr): Adjust.
12674 (mips_collect_register): Change prototype to take a regcache.
12676 (mips_supply_register):
12677 (mips_collect_register_32bit, mips_supply_register_32bit)
12678 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12679 (mips_store_fpregset): Ditto.
12680 * linux-ppc-low.c (ppc_supply_ptrace_register)
12681 (ppc_supply_ptrace_register): Ditto.
12682 (parse_spufs_run): Adjust.
12683 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12684 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12685 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12686 take a regcache. Adjust.
12687 * linux-s390-low.c (s390_collect_ptrace_register)
12688 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12689 (s390_set_pc): Change prototype to take a regcache. Adjust.
12690 (s390_arch_setup): Adjust.
12691 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12692 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12693 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12694 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12695 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12697 (sparc_breakpoint_at): Adjust.
12698 * linux-xtensa-low.c (xtensa_fill_gregset):
12699 (xtensa_store_gregset):
12700 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12701 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12702 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12703 prototype to take a regcache. Adjust.
12704 * win32-arm-low.c (arm_fetch_inferior_register)
12705 (arm_store_inferior_register): Change prototype to take a
12707 * win32-i386-low.c (i386_fetch_inferior_register)
12708 (i386_store_inferior_register): Change prototype to take a
12710 * win32-low.c (child_fetch_inferior_registers)
12711 (child_store_inferior_registers): Change prototype to take a
12713 (win32_wait): Adjust.
12714 (win32_fetch_inferior_registers): Change prototype to take a
12716 (win32_store_inferior_registers): Adjust.
12717 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12718 store_inferior_register>: Change prototype to take a regcache.
12720 2010-01-20 Doug Evans <dje@google.com>
12722 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12724 (linux_wait_for_event1, linux_init_signals): Ditto.
12725 (W_STOPCODE): Provide definition if missing.
12727 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12729 * linux-low.c (linux_core_of_thread): New.
12730 (compare_ints, show_process, list_threads): New.
12731 (linux_qxfer_osdata): Report threads and cores.
12732 (linux_target_op): Register linux_core_of_thread.
12733 * remote-utils.c (prepare_resume_reply): Report the core.
12734 (buffer_xml_printf): Support %d specifier.
12735 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12737 (handle_query): Handle qXfer:threads. Announce availability
12739 * target.h (struct target_ops): New field core_of_thread.
12741 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12743 * Makefile.in (clean): Remove new generated files.
12744 (reg-s390.o, reg-s390.c): Remove rules.
12745 (reg-s390x.o, reg-s390x.c): Likewise.
12746 (s390-linux32.o, s390-linux32.c): Add rules.
12747 (s390-linux64.o, s390-linux64.c): Likewise.
12748 (s390x-linux64.o, s390x-linux64.c): Likewise.
12749 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12750 * linux-s390-low.c: Include <elf.h>.
12751 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12752 (init_registers_s390): Remove prototype.
12753 (init_registers_s390x): Likewise.
12754 (init_registers_s390_linux32): Add prototype.
12755 (init_registers_s390_linux64): Likewise.
12756 (init_registers_s390x_linux64): Likewise.
12757 (s390_num_regs_3264): New define.
12758 (s390_regmap_3264): New global variable.
12759 (s390_cannot_fetch_register): Remove obsolete check.
12760 (s390_cannot_store_register): Likewise.
12761 (s390_collect_ptrace_register): Handle upper/lower register halves.
12762 (s390_supply_ptrace_register): Likewise.
12763 (s390_fill_gregset): Update to register number changes.
12764 (s390_get_hwcap): New routine.
12765 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12766 Install appropriate regmap and register set.
12768 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12770 * server.c (gdbserver_version): Update copyright year to 2010.
12771 * gdbreplay.c (gdbreplay_version): Likewise.
12773 2009-12-28 Doug Evans <dje@google.com>
12775 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12776 elf/external.h. Include <elf.h> instead but only if necessary.
12778 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12780 * linux-low.c (linux_remove_process): Remove `detaching'
12781 parameter. Don't release/detach from thread_db here.
12782 (linux_kill): Release/detach from thread_db here, ...
12783 (linux_detach): ... and here, before actually detaching.
12784 (linux_wait_1): ... and here, when a process exits.
12785 * thread-db.c (any_thread_of): New.
12786 (thread_db_free): Switch the current inferior to a thread of the
12789 2009-12-21 Doug Evans <dje@google.com>
12791 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12793 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12794 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12795 warning ifndef __NR_tkill. Move setting of errno there too.
12796 Delete unnecessary resetting of errno after syscall.
12797 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12799 * configure.ac: Check for dladdr.
12800 * config.in: Regenerate.
12801 * configure: Regenerate.
12802 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12803 (try_thread_db_load): Update.
12805 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12807 2009-12-18 Doug Evans <dje@google.com>
12809 * event-loop.c: Include unistd.h if it exists.
12811 * linux-low.c (my_waitpid): Move definition away from being in
12812 between linux_tracefork_child/linux_test_for_tracefork.
12814 * gdb_proc_service.h (psaddr_t): Fix type.
12815 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12816 signature to match glibc.
12818 2009-12-16 Doug Evans <dje@google.com>
12820 * linux-low.c (linux_read_memory): Fix argument to read.
12822 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12824 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12825 events, don't leave current_inferior pointing at null.
12827 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12829 * win32-low.c (LOG): Delete.
12830 (OUTMSG): Output to stderr.
12831 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12832 on compile time LOG macro.
12833 (win32_wait): Fix debug output.
12835 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12837 * win32-low.c (win32_add_one_solib): If the dll name is
12838 "ntdll.dll", prepend the system directory to the dll path.
12840 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12842 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12844 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12845 Vladimir Prus <vladimir@codesourcery.com>
12847 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12848 * configure.ac: Check for __mcoldfire__ and set
12849 gdb_cv_m68k_is_coldfire.
12850 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12851 reg-cf.o and reg-m68k.o.
12852 * configure: Regenerated.
12854 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12856 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12857 Pass it to thread_db_free.
12858 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12859 proper `detaching' argument to linux_remove_process.
12860 * linux-low.h (thread_db_free): Add `detaching' parameter.
12861 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12863 (thread_db_free): Add `detaching' parameter. Only
12864 call td_ta_clear_event if detaching from process.
12866 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12868 * thread-db.c (thread_db_free): Fix typo.
12870 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12873 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12875 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12877 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12878 with an i686 compiler.
12879 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12881 * configure: Rebuilt.
12883 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12887 * server.c (handle_search_memory_1): Correct read_addr initialization
12888 in loop for searching subsequent chunks.
12890 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12892 * configure.ac: New --with-libthread-db option.
12893 * thread-db.c: Allow direct dependence on libthread_db.
12894 (thread_db_free): Adjust.
12895 * config.in: Regenerate.
12896 * configure: Likewise.
12898 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12901 * thread-db.c (attach_thread): New function.
12902 (maybe_attach_thread): Return success/failure.
12903 (find_new_threads_callback): Adjust.
12904 (thread_db_find_new_threads): Loop until no new threads.
12906 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12908 * proc-service.c (ps_lgetregs): Formatting.
12910 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12912 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12913 * configure.ac: Adjust.
12914 * linux-low.h (struct process_info_private): Move members to struct
12916 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12917 * linux-low.c (linux_remove_process): Adjust.
12918 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12919 * server.c (handle_query): Move code ...
12920 (handle_monitor_command): ... here. New function.
12921 * target.h (struct target_ops): New member.
12922 * thread-db.c (struct thread_db): New.
12923 (libthread_db_search_path): New variable.
12924 (thread_db_create_event, thread_db_enable_reporting)
12925 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12926 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12927 (try_thread_db_load_1, dladdr_to_soname): New functions.
12928 (try_thread_db_load, thread_db_load_search): New functions.
12929 (thread_db_init): Search for libthread_db.
12930 (thread_db_free): New function.
12931 (thread_db_handle_monitor_command): Likewise.
12932 * config.in: Regenerate.
12933 * configure: Regenerate.
12935 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12937 * spu-low.c (spu_kill): Wait for inferior to terminate.
12938 Call clear_inferiors.
12939 (spu_detach): Call clear_inferiors.
12941 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12943 * aclocal.m4: Regenerate.
12944 * config.in: Likewise.
12945 * configure: Likewise.
12947 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12949 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12950 (parse_spufs_run): New function.
12951 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12952 (ppc_breakpoint_at): Handle SPU breakpoints.
12954 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12956 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12957 (SPUFS_MAGIC): Define.
12958 (spu_enumerate_spu_ids): New function.
12959 (linux_qxfer_spu): New function.
12960 (linux_target_ops): Install linux_qxfer_spu.
12962 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12964 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12965 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12966 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12967 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12968 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12969 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12970 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12971 (init_registers_powerpc_cell32l): Add prototype.
12972 (init_registers_powerpc_cell64l): Likewise.
12973 (ppc_arch_setup): Detect Cell/B.E. architecture.
12975 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12977 * Makefile.in (datarootdir): New variable.
12979 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12981 * linux-low.c (linux_write_memory): Update debugging output.
12982 * Makefile.in (clean): Add new descriptions.
12983 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12984 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12985 * configure.srv: Add new files for arm*-*-linux*.
12986 * linux-arm-low.c: Add new declarations.
12987 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12988 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12989 (HWCAP_VFPv3D16): New.
12990 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12991 instead of __IWMMXT__.
12992 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12993 (arm_arch_setup): New.
12994 (target_regsets): Remove #ifdef. Add VFP regset.
12995 (the_low_target): Use arm_arch_setup.
12997 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12999 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13000 the main thread again.
13002 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13004 Adding Neutrino gdbserver.
13005 * configure: Regenerated.
13006 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13007 * configure.srv (i[34567]86-*-nto*): New target.
13008 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13009 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13010 (nto_comctrl) [__QNX__]: New function.
13011 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13013 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13015 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13018 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13019 Pedro Alves <pedro@codesourcery.com>
13021 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13022 don't support CONTEXT_EXTENDED_REGISTERS.
13023 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13024 (the_low_target): Install them.
13025 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13026 failing with ERROR_PIPE_NOT_CONNECTED.
13028 2009-06-30 Doug Evans <dje@google.com>
13029 Pierre Muller <muller@ics.u-strasbg.fr>
13031 Add h/w watchpoint support to x86-linux, win32-i386.
13032 * Makefile.in (SFILES): Add i386-low.c
13033 (i386_low_h): Define.
13034 (i386-low.o): Add dependencies.
13035 (linux-x86-low.o): Add i386-low.h dependency.
13036 (win32-i386-low.o): Ditto.
13037 * i386-low.c: New file.
13038 * i386-low.h: New file.
13039 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13040 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13041 * linux-low.c (linux_add_process): Initialize arch_private.
13042 (linux_remove_process): Free arch_private.
13043 (add_lwp): Initialize arch_private.
13044 (delete_lwp): Free arch_private.
13045 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13047 * linux-low.h (process_info_private): New member arch_private.
13048 (lwp_info): New member arch_private.
13049 (linux_target_ops): New members new_process, new_thread,
13051 (ptid_of): New macro.
13052 * linux-x86-low.c: Include stddef.h, i386-low.h.
13053 (arch_process_info): New struct.
13054 (arch_lwp_info): New struct.
13055 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13056 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13057 (i386_dr_low_get_status): New function.
13058 (x86_insert_point, x86_remove_point): New functions.
13059 (x86_stopped_by_watchpoint): New function.
13060 (x86_stopped_data_address): New function.
13061 (x86_linux_new_process, x86_linux_new_thread): New functions.
13062 (x86_linux_prepare_to_resume): New function.
13063 (the_low_target): Add entries for insert_point, remove_point,
13064 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13066 * server.c (debug_hw_points): New global.
13067 (monitor_show_help): Document set debug-hw-points.
13068 (handle_query): Process "set debug-hw-points".
13069 * server.h (debug_hw_points): Declare.
13070 (paddress): Declare.
13071 * utils.c (NUMCELLS, CELLSIZE): New macros.
13072 (get_sell, xsnprintf, paddress): New functions.
13073 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13074 remove_point, stopped_by_watchpoint, stopped_data_address.
13075 * win32-i386-low.c: Include i386-low.h.
13076 (debug_reg_state): Replaces dr.
13077 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13078 (i386_dr_low_get_status): New function.
13079 (i386_insert_point, i386_remove_point): New functions.
13080 (i386_stopped_by_watchpoint): New function.
13081 (i386_stopped_data_address): New function.
13082 (i386_initial_stuff): Update.
13083 (get_thread_context,set_thread_context,i386_thread_added): Update.
13084 (the_low_target): Add entries for insert_point,
13085 remove_point, stopped_by_watchpoint, stopped_data_address.
13086 * win32-low.c (win32_insert_watchpoint): New function.
13087 (win32_remove_watchpoint): New function.
13088 (win32_stopped_by_watchpoint): New function.
13089 (win32_stopped_data_address): New function.
13090 (win32_target_ops): Add entries for insert_watchpoint,
13091 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13092 * win32-low.h (win32_target_ops): New members insert_point,
13093 remove_point, stopped_by_watchpoint, stopped_data_address.
13095 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13097 * server.c (process_serial_event): Re-return unsupported, not
13098 error, if the type isn't recognized. Re-allow supporting only
13099 insert or remove packets. Also call require_running for
13100 breakpoints. Add missing break statement to default case. Tidy.
13101 * target.h (struct target_ops): Rename insert_watchpoint to
13102 insert_point, and remove_watchpoint to remove_point.
13104 * linux-low.h (struct linux_target_ops): Likewise.
13105 * linux-low.c (linux_insert_watchpoint): Rename to ...
13106 (linux_insert_point): ... this. Adjust.
13107 (linux_remove_watchpoint): Rename to ...
13108 (linux_remove_point): ... this. Adjust.
13109 (linux_target_ops): Adjust.
13110 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13111 (cris_insert_point): ... this.
13112 (cris_remove_watchpoint): Rename to ...
13113 (cris_remove_point): ... this.
13114 (the_low_target): Adjust.
13116 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13118 * server.c (handle_v_kill): Pass signal_pid to
13119 kill_inferior if multi_process is zero.
13121 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13123 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13124 * target.h (target_ops): Comment for *_watchpoint to make it clear
13125 the functions can get types '0' and '1'.
13127 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13129 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13130 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13131 * regcache.c (get_regcache): Likewise.
13132 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13133 * win32-low.c (child_fetch_inferior_registers): Remove check for
13136 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13137 Pedro Alves <pedro@codesourcery.com>
13139 * target.h (struct target_ops) <supports_multi_process>: New
13141 (target_supports_multi_process): New.
13142 * server.c (handle_query): Even if GDB reports support, only
13143 enable multi-process if the target also supports it. Report
13144 multi-process support only if the target backend supports it.
13145 * linux-low.c (linux_supports_multi_process): New function.
13146 (linux_target_ops): Install it as target_supports_multi_process
13149 2009-05-24 Doug Evans <dje@google.com>
13151 Global renaming of find_thread_pid to find_thread_ptid.
13152 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13153 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13154 All callers updated.
13156 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13157 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13160 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13161 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13162 (linux_resume_one_lwp): Ditto.
13164 2009-05-23 Doug Evans <dje@google.com>
13166 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13167 from struct inferior_list_entry * to struct lwp_info *.
13168 All callers updated.
13170 2009-05-13 Doug Evans <dje@google.com>
13172 * linux-x86-low.c: Don't include assert.h.
13173 (x86_siginfo_fixup): Use fatal, not assert.
13174 (x86_arch_setup): Fix comment.
13176 2009-05-12 Doug Evans <dje@google.com>
13178 Biarch support for i386/amd64 gdbserver.
13179 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13180 Add linux-x86-low.c.
13181 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13182 (linux-x86-low.o): Add.
13183 * linux-x86-64-low.c: Delete.
13184 * linux-i386-low.c: Delete.
13185 * linux-x86-low.c: New file.
13186 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13188 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13190 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13191 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13192 (linux_child_pid_to_exec_file): New function.
13193 (elf_64_header_p, elf_64_file_p): New functions.
13194 (siginfo_fixup): New function.
13195 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13196 give target a chance to convert layout.
13197 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13198 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13200 2009-05-07 Doug Evans <dje@google.com>
13202 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13203 (regsets_store_inferior_registers): Ditto.
13205 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13209 * linux-low.c (must_set_ptrace_flags): Delete.
13210 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13212 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13213 `lwp->must_set_ptrace_flags' instead.
13214 (linux_wait_for_event_1): Set ptrace options here.
13215 (linux_wait_1): ... not here.
13217 2009-04-30 Doug Evans <dje@google.com>
13219 * inferiors.c (started_inferior_callback): New function.
13220 (attached_inferior_callback): New function.
13221 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13222 * server.c (print_started_pid, print_attached_pid): New functions.
13223 (detach_or_kill_for_exit): New function.
13224 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13225 * server.h (have_started_inferiors_p): Declare.
13226 (have_attached_inferiors_p): Declare.
13228 * inferiors.c (remove_process): Fix memory leak, free process.
13229 * linux-low.c (linux_remove_process): New function.
13230 (linux_kill): Call it instead of remove_process.
13231 (linux_detach, linux_wait_1): Ditto.
13233 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13235 * configure.srv: Add x86 Windows CE target.
13237 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13239 * inferiors.c (get_thread_process): Make global.
13240 * server.h (get_thread_process): Add prototype.
13241 * thread-db.c (find_one_thread): Use get_thread_process
13242 instead of current_process.
13243 (thread_db_get_tls_address): Do not crash if called when
13244 thread layer is not yet initialized.
13246 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13248 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13249 * spu-low.c (current_tid): Rename to ...
13250 (current_ptid): ... this.
13251 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13252 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13253 ptid_get_lwp (current_ptid) instead of current_tid.
13254 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13255 instead of current_tid. Use find_process_pid to verify pid
13256 argument is valid. Pass proper argument to remove_process.
13257 (spu_thread_alive): Compare current_ptid instead of current_tid.
13258 (spu_resume): Likewise.
13260 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13262 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13265 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13267 Implement the multiprocess extensions, and add linux multiprocess
13270 * server.h (ULONGEST): Declare.
13271 (struct ptid, ptid_t): New.
13272 (minus_one_ptid, null_ptid): Declare.
13273 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13274 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13275 (struct inferior_list_entry): Change `id' type from unsigned from
13277 (struct sym_cache, struct breakpoint, struct
13278 process_info_private): Forward declare.
13279 (struct process_info): Declare.
13280 (current_process): Declare.
13281 (all_processes): Declare.
13282 (initialize_inferiors): Declare.
13283 (add_thread): Adjust to use ptid_t.
13284 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13285 (add_process, remove_process, find_thread_pid): Declare.
13286 (find_inferior_id): Adjust to use ptid_t.
13287 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13288 (multi_process): Declare.
13289 (push_event): Adjust to use ptid_t.
13290 (read_ptid, write_ptid): Declare.
13291 (prepare_resume_reply): Adjust to use ptid_t.
13292 (clear_symbol_cache): Declare.
13293 * inferiors.c (all_processes): New.
13294 (null_ptid, minus_one_ptid): New.
13295 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13296 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13297 (add_thread): Change unsigned long to ptid. Remove gdb_id
13299 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13300 (gdb_id_to_thread): Rename to ...
13301 (find_thread_pid): ... this. Change unsigned long to ptid.
13302 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13303 (loaded_dll, pull_pid_from_list): Adjust.
13304 (add_process, remove_process, find_process_pid)
13305 (get_thread_process, current_process, initialize_inferiors): New.
13306 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13307 (struct target_waitstatus) <related_pid>: Ditto.
13308 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13309 return type to int.
13310 (struct target_ops) <join>: Add `pid' argument.
13311 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13312 (struct target_ops) <wait>: Add `ptid' field. Change return type
13314 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13315 (mywait): Add `ptid' argument. Change return type to ptid_t.
13316 (target_pid_to_str): Declare.
13317 * target.c (set_desired_inferior): Adjust to use ptids.
13318 (mywait): Add new `ptid' argument. Adjust.
13319 (target_pid_to_str): New.
13320 * mem-break.h (free_all_breakpoints): Declare.
13321 * mem-break.c (breakpoints): Delelete.
13322 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13323 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13324 to use per-process breakpoint list.
13325 (free_all_breakpoints): New.
13326 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13327 (symbol_cache, all_symbols_looked_up): Delete.
13329 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13331 (prepare_resume_reply): Change ptid argument's type from unsigned
13332 long to ptid_t. Adjust. Implement W;process and X;process.
13333 (free_sym_cache, clear_symbol_cache): New.
13334 (look_up_one_symbol): Adjust to per-process symbol cache. *
13335 * server.c (cont_thread, general_thread, step_thread): Change type
13337 (attached): Delete.
13338 (multi_process): New.
13339 (last_ptid): Change type to ptid_t.
13340 (struct vstop_notif) <ptid>: Change type to ptid_t.
13341 (queue_stop_reply, push_event): Change `ptid' argument's type to
13343 (discard_queued_stop_replies): Add `pid' argument.
13344 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13345 changes. Don't reference the `attached' global.
13346 (attach_inferior): Adjust to mywait interface changes.
13347 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13348 features. Handle and report "multiprocess+". Handle
13350 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13352 (handle_v_kill): New.
13353 (handle_v_stopped): Adjust to use target_pid_to_str.
13354 (handle_v_requests): Allow multiple attaches and runs when
13355 multiprocess extensions are in effect. Handle "vKill".
13356 (myresume): Adjust to use ptids.
13357 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13358 (handle_status): Adjust to discard_queued_stop_replies interface
13360 (first_thread_of, kill_inferior_callback)
13361 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13362 (main): Call initialize_inferiors. Adjust to use ptids, killing
13363 and detaching from all inferiors. Handle multiprocess packet
13365 * linux-low.h: Include gdb_proc_service.h.
13366 (struct process_info_private): New.
13367 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13368 <lwpid_of>: Use ptid_get_lwp.
13369 (get_lwp_thread): Adjust.
13370 (struct lwp_info): Add `dead' member.
13371 (find_lwp_pid): Declare.
13372 * linux-low.c (thread_db_active): Delete.
13373 (new_inferior): Adjust comment.
13374 (inferior_pid): Delete.
13375 (linux_add_process): New.
13376 (handle_extended_wait): Adjust.
13377 (add_lwp): Change unsigned long to ptid.
13378 (linux_create_inferior): Add process to processes table. Adjust
13379 to use ptids. Don't set new_inferior here.
13380 (linux_attach_lwp): Rename to ...
13381 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13382 it. Adjust to use ptids.
13383 (linux_attach_lwp): New.
13384 (linux_attach): Add process to processes table. Don't set
13386 (struct counter): New.
13387 (second_thread_of_pid_p, last_thread_of_process_p): New.
13388 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13389 multiple processes.
13390 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13391 processes. Remove process from process table.
13392 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13393 to multiple processes.
13394 (any_thread_of): New.
13395 (linux_detach): Add `pid' argument, and handle it. Remove process
13396 from processes table.
13397 (linux_join): Add `pid' argument. Handle it.
13398 (linux_thread_alive): Change unsighed long argument to ptid_t.
13399 Consider dead lwps as not being alive.
13400 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13401 threads we're not interested in.
13402 (same_lwp, find_lwp_pid): New.
13403 (linux_wait_for_lwp): Change `pid' argument's type from int to
13405 (linux_wait_for_event): Rename to ...
13406 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13407 from int to ptid_t. Adjust.
13408 (linux_wait_for_event): New.
13409 (linux_wait_1): Add `ptid' argument. Change return type to
13410 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13411 that exit from the process table.
13412 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13414 (mark_lwp_dead): New.
13415 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13416 stopping all threads, mark its main lwp as dead.
13417 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13419 (fetch_register, usr_store_inferior_registers)
13420 (regsets_fetch_inferior_registers)
13421 (regsets_store_inferior_registers, linux_read_memory)
13422 (linux_write_memory): Inline `inferior_pid'.
13423 (linux_look_up_symbols): Adjust to use per-process
13424 `thread_db_active'.
13425 (linux_request_interrupt): Adjust to use ptids.
13426 (linux_read_auxv): Inline `inferior_pid'.
13427 (initialize_low): Don't reference thread_db_active.
13428 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13429 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13430 (ps_getpid): Return the pid of the current inferior.
13431 * thread-db.c (proc_handle, thread_agent): Delete.
13432 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13434 (find_one_thread): Change argument type to ptid_t. Adjust to
13436 (maybe_attach_thread): Adjust to per-process data and ptids.
13437 (thread_db_find_new_threads): Ditto.
13438 (thread_db_init): Ditto.
13439 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13440 processes table. Adjust to use ptids.
13441 (spu_kill, spu_detach): Adjust interface. Remove process from
13443 (spu_join, spu_thread_alive): Adjust interface.
13444 (spu_wait): Adjust interface. Remove process from processes
13445 table. Adjust to use ptids.
13446 * win32-low.c (current_inferior_tid): Delete.
13447 (current_inferior_ptid): New.
13448 (debug_event_ptid): New.
13449 (thread_rec): Take a ptid. Adjust.
13450 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13451 (child_delete_thread): Ditto.
13452 (do_initial_child_stuff): Add `attached' argument. Add process to
13454 (child_fetch_inferior_registers, child_store_inferior_registers):
13456 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13457 (win32_attach): Pass 1 to do_initial_child_stuff.
13458 (win32_kill): Adjust interface. Remove process from processes
13460 (win32_detach): Ditto.
13461 (win32_join): Adjust interface.
13462 (win32_thread_alive): Take a ptid.
13463 (win32_resume): Adjust to use ptids.
13464 (get_child_debug_event): Ditto.
13465 (win32_wait): Adjust interface. Remove exiting process from
13468 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13470 Non-stop mode support.
13472 * server.h (non_stop): Declare.
13473 (gdb_client_data, handler_func): Declare.
13474 (delete_file_handler, add_file_handler, start_event_loop):
13476 (handle_serial_event, handle_target_event, push_event)
13477 (putpkt_notif): Declare.
13478 * target.h (enum resume_kind): New.
13479 (struct thread_resume): Replace `step' field by `kind' field.
13480 (TARGET_WNOHANG): Define.
13481 (struct target_ops) <wait>: Add `options' argument.
13482 <supports_non_stop, async, start_non_stop>: New fields.
13483 (target_supports_non_stop, target_async): New.
13484 (start_non_stop): Declare.
13485 (mywait): Add `options' argument.
13486 * target.c (mywait): Add `options' argument. Print child exit
13487 notifications here.
13488 (start_non_stop): New.
13489 * server.c (non_stop, own_buf, mem_buf): New globals.
13490 (struct vstop_notif): New.
13491 (notif_queue): New global.
13492 (queue_stop_reply, push_event, discard_queued_stop_replies)
13493 (send_next_stop_reply): New.
13494 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13496 (attach_inferior): In non-stop mode, don't wait for the target
13498 (handle_general_set): Handle QNonStop.
13499 (handle_query): When handling qC, return the current general
13500 thread, instead of the first thread of the list.
13501 (handle_query): If the backend supports non-stop mode, include
13502 QNonStop+ in the qSupported query response.
13503 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13505 (handle_v_attach, handle_v_run): Handle non-stop mode.
13506 (handle_v_stopped): New.
13507 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13508 (myresume): Adjust to use resume_kind. Handle non-stop.
13509 (queue_stop_reply_callback): New.
13510 (handle_status): Handle non-stop mode.
13511 (main): Clear non_stop flag on reconnection. Use the event-loop.
13512 Refactor serial protocol handling from here ...
13513 (process_serial_event): ... to this new function. When GDB
13514 selects any thread, select one here. In non-stop mode, wait until
13515 GDB acks all pending events before exiting.
13516 (handle_serial_event, handle_target_event): New.
13517 * remote-utils.c (remote_open): Install remote_desc in the event
13519 (remote_close): Remove remote_desc from the event loop.
13520 (putpkt_binary): Rename to...
13521 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13522 (putpkt_binary): New as wrapper around putpkt_binary_1.
13523 (putpkt_notif): New.
13524 (prepare_resume_reply): In non-stop mode, don't change the
13526 * event-loop.c: New.
13527 * Makefile.in (OBJ): Add event-loop.o.
13528 (event-loop.o): New rule.
13530 * linux-low.h (pid_of): Moved here.
13532 (get_lwp_thread): Use lwpid_of.
13533 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13534 * linux-low.c (pid_of): Delete.
13535 (inferior_pid): Use lwpid_of.
13536 (linux_event_pipe): New.
13537 (target_is_async_p): New.
13539 (handle_extended_wait): Use lwpid_of.
13540 (add_lwp): Don't set lwpid field.
13541 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13542 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13543 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13544 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13545 first. Adjust to linux_wait_for_event interface changes. Use
13547 (linux_detach): Don't delete the main lwp here.
13548 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13549 (status_pending_p): Don't consider explicitly suspended lwps.
13550 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13551 pointer. Add OPTIONS argument. Change return type to int. Use
13552 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13553 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13554 pointer. Add status pointer argument. Return a pid instead of a
13555 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13556 changes. In non-stop mode, don't switch to a random thread.
13557 (linux_wait): Rename to...
13558 (linux_wait_1): ... this. Add target_options argument, and handle
13559 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13560 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13561 clean exit and signal exit code. Don't stop all threads in
13562 non-stop mode. In all-stop mode, only stop all threads when
13563 reporting a stop to GDB. Handle explicit thread stop requests.
13564 (async_file_flush, async_file_mark): New.
13566 (send_sigstop): Use lwpid_of.
13567 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13568 interface changes. In non-stop mode, don't switch to a random
13570 (linux_resume_one_lwp): Use lwpid_of.
13571 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13572 (linux_resume_one_thread): ... this. Handle resume_stop. In
13573 non-stop mode, don't look for pending flag in all threads.
13574 (resume_status_pending_p): Don't consider explicitly suspended
13576 (my_waitpid): Reimplement. Emulate __WALL.
13577 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13579 (sigchld_handler, linux_supports_non_stop, linux_async)
13580 (linux_start_non_stop): New.
13581 (linux_target_ops): Register linux_supports_non_stop, linux_async
13582 and linux_start_non_stop.
13583 (initialize_low): Install SIGCHLD handler.
13584 * thread-db.c (thread_db_create_event, find_one_thread)
13585 (thread_db_get_tls_address): Use lwpid_of.
13586 * win32-low.c (win32_detach): Adjust to use resume_kind.
13587 (win32_wait): Add `options' argument.
13588 * spu-low.c (spu_resume): Adjust to use resume_kind.
13589 (spu_wait): Add `options' argument.
13591 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13593 Decouple target code from remote protocol.
13595 * target.h (enum target_waitkind): New.
13596 (struct target_waitstatus): New.
13597 (struct target_ops) <wait>: Return an unsigned long. Take a
13598 target_waitstatus pointer instead of a char pointer.
13599 (mywait): Likewise.
13600 * target.c (mywait): Change prototype to return an unsigned long.
13601 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13602 * server.h (thread_from_wait, old_thread_from_wait): Delete
13604 (prepare_resume_reply): Change prototype to take a
13606 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13607 (last_status, last_ptid): New.
13608 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13609 pid instead of a signal.
13610 (attach_inferior): Remove "status" and "signal" parameters.
13612 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13614 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13615 (handle_v_requests, myresume): Remove "status" and "signal"
13616 parameters. Adjust.
13617 (handle_status): New.
13618 (main): Delete local `status'. Adjust.
13619 * remote-utils.c: Include target.h.
13620 (prepare_resume_reply): Change prototype to take a
13621 target_waitstatus. Adjust.
13623 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13625 * spu-low.c (spu_wait): Adjust.
13626 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13628 (win32_wait): Adjust.
13630 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13632 * target.h (struct thread_resume): Delete leave_stopped member.
13633 (struct target_ops): Add a `n' argument to the `resume' callback.
13634 * server.c (start_inferior): Adjust.
13635 (handle_v_cont, myresume): Adjust.
13636 * linux-low.c (check_removed_breakpoint): Adjust to resume
13637 interface change, and to removed leave_stopped field.
13638 (resume_ptr): Delete.
13639 (struct thread_resume_array): New.
13640 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13641 resume interface change.
13642 (linux_continue_one_thread, linux_queue_one_thread)
13643 (resume_status_pending_p): Check if the resume field is NULL
13644 instead of checking the leave_stopped member.
13645 (linux_resume): Adjust to the target resume interface change.
13646 * spu-low.c (spu_resume): Adjust to the target resume interface
13648 * win32-low.c (win32_detach, win32_resume): Ditto.
13650 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13652 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13654 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13656 (linux_continue_one_thread): Only preserve the stepping flag if
13657 there's a pending breakpoint.
13659 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13661 * server.c (main): After the inferior having exited, call
13662 remote_close before exiting gdbserver.
13664 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13666 Fix size of FPSCR in Power 7 processors.
13667 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13668 (PPC_FEATURE_HAS_DFP): New #define.
13669 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13672 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13674 * server.c (handle_query) Whitespace and formatting.
13676 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13678 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13679 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13680 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13681 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13682 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13683 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13684 Makefile.in, configure.ac: Fix whitespace throughout.
13685 * configure: Regenerate.
13687 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13689 * inferiors.c (find_inferior): Make it safe for the callback
13690 function to delete the currently iterated inferior.
13692 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13694 * Makefile.in (linuw_low_h): Move higher.
13695 (thread-db.o): Depend on $(linux_low_h).
13697 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13699 Rename "process" to "lwp" throughout.
13701 * linux-low.c (all_processes): Rename to...
13702 (all_lwps): ... this.
13703 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13704 (add_process): Rename to ...
13705 (add_lwp): ... this. Adjust.
13706 (linux_create_inferior): Adjust.
13707 (linux_attach_lwp): Adjust.
13708 (linux_attach): Adjust.
13709 (linux_kill_one_process): Rename to ...
13710 (linux_kill_one_lwp): ... this. Adjust.
13711 (linux_kill): Adjust.
13712 (linux_detach_one_process): Rename to ...
13713 (linux_detach_one_lwp): ... this. Adjust.
13714 (linux_detach): Adjust.
13715 (check_removed_breakpoint): Adjust.
13716 (status_pending_p): Adjust.
13717 (linux_wait_for_process): Rename to ...
13718 (linux_wait_for_lwp): ... this. Adjust.
13719 (linux_wait_for_event): Adjust.
13720 (send_sigstop): Adjust.
13721 (wait_for_sigstop): Adjust.
13722 (stop_all_processes): Rename to ...
13723 (stop_all_lwps): ... this.
13724 (linux_resume_one_process): Rename to ...
13725 (linux_resume_one_lwp): ... this. Adjust.
13726 (linux_set_resume_request, linux_continue_one_thread)
13727 (linux_queue_one_thread, resume_status_pending_p)
13728 (usr_store_inferior_registers, regsets_store_inferior_registers)
13729 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13731 * linux-low.h (get_process): Rename to ...
13732 (get_lwp): ... this. Adjust.
13733 (get_thread_process): Rename to ...
13734 (get_thread_lwp): ... this. Adjust.
13735 (get_process_thread): Rename to ...
13736 (get_lwp_thread): ... this. Adjust.
13737 (struct process_info): Rename to ...
13738 (struct lwp_info): ... this.
13739 (all_processes): Rename to ...
13740 (all_lwps): ... this.
13741 * proc-service.c (ps_lgetregs): Adjust.
13742 * thread-db.c (thread_db_create_event, find_one_thread)
13743 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13745 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13747 * server.c (handle_query): Handle "qAttached".
13749 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13751 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13752 GPLv3, update license URL.
13754 2009-03-01 Doug Evans <dje@google.com>
13756 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13757 (server_h): Add gdb_signals.h.
13758 (signals.o): Update.
13759 * server.h (target_signal_from_host,target_signal_to_host_p)
13760 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13762 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13764 * remote-utils.c (getpkt): Also generate remote-debug
13765 information if noack_mode is set.
13767 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13769 * server.c (handle_query): Report qXfer:siginfo:read and
13770 qXfer:siginfo:write as supported and handle them.
13771 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13772 * linux-low.c (linux_xfer_siginfo): New.
13773 (linux_target_ops): Set it.
13775 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13777 * server.c (gdbserver_usage): Mention --remote-debug.
13778 (main): Accept '--remote-debug' switch.
13780 2009-01-18 Doug Evans <dje@google.com>
13782 * regcache.c (new_register_cache): No need to check result of xcalloc.
13783 * server.c (handle_search_memory): Back out calls to xmalloc,
13784 result is checked and error is returned to user upon failure.
13785 (handle_query): Ditto. Add more checks for result of malloc.
13786 (handle_v_cont): Check result of malloc, report error back to
13788 (handle_v_run): Ditto. Call freeargv.
13789 * server.h (freeargv): Declare.
13790 * utils.c (freeargv): New fn.
13792 2009-01-15 Doug Evans <dje@google.com>
13794 * gdbreplay.c (perror_with_name): Make arg const char *.
13795 * server.h (target_signal_to_name): Make return type const char *.
13796 * thread-db.c (thread_db_err_str): Make return type const char *.
13797 * utils.c (perror_with_name): Make arg const char *.
13799 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13801 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13802 when handling a EXIT_PROCESS_DEBUG_EVENT.
13804 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13806 * gdbreplay.c (gdbreplay_version): Update copyright year.
13807 * server.c (gdbserver_version): Likewise.
13809 2009-01-05 Doug Evans <dje@google.com>
13811 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13812 (handle_extended_wait): Improve comment.
13814 2008-12-13 Doug Evans <dje@google.com>
13816 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13817 * server.h (ATTR_MALLOC): New macro.
13818 (xmalloc,xcalloc,xstrdup): Declare.
13819 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13820 * inferiors.c: Ditto.
13821 * linux-low.c: Ditto.
13822 * mem-break.c: Ditto.
13823 * regcache.c: Ditto.
13824 * remote-utils.c: Ditto.
13827 * win32-low.c: Ditto.
13829 2008-12-12 Doug Evans <dje@google.com>
13831 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13832 in debugging printf.
13834 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13836 2008-12-09 Doug Evans <dje@google.com>
13838 * linux-low.h (struct process_info): Delete member tid, unused.
13839 * thread-db.c (find_one_thread): Update.
13840 (maybe_attach_thread): Update.
13842 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13844 * target.h (struct target_ops): Add qxfer_osdata member.
13845 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13847 (linux_qxfer_osdata): New functions.
13848 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13850 * server.c (handle_query): Handle "qXfer:osdata:read:".
13851 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13852 (buffer_xml_printf): New functions.
13853 * server.h (struct buffer): New.
13854 (buffer_grow_str, buffer_grow_str0): New macros.
13855 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13856 (buffer_xml_printf): Declare.
13858 2008-11-24 Doug Evans <dje@google.com>
13860 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13862 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13864 * server.c (handle_v_run): Always use the supplied argument list.
13866 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13868 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13869 (xtensa_regmap_table): Add entry for scompare1.
13871 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13873 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13874 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13875 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13876 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13877 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13878 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13879 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13880 XML target descriptions.
13881 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13882 when inferior is running on an ISA 2.05 or later processor. Add
13883 special case to return offset for full 64-bit slot of FPSCR when
13886 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13888 * Makefile.in (SFILES, clean): Added sparc64 files.
13889 (reg-sparc64.o, reg-sparc64.c): New.
13890 * configure.srv (sparc*-*-linux*): New configuration.
13891 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13892 syscall arguments for SPARC.
13893 (regsets_store_inferior_registers): Likewise.
13894 * linux-sparc-low.c: New file.
13896 2008-10-21 Doug Evans <dje@google.com>
13898 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13899 (READLINE_DIR,READLINE_DEP): Delete.
13900 (INTERNAL_CFLAGS): Update.
13901 (LINTFLAGS): Update.
13903 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13905 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13906 whole argv from the last run, not just argv[0].
13908 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13910 * regcache.c (new_register_cache): Return NULL if the register
13911 cache size isn't known yet.
13912 (free_register_cache): Avoid dereferencing a NULL regcache.
13914 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13916 * configure.srv: Merge MIPS and MIPS64.
13918 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13920 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13922 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13924 * Makefile.in: Add required vsx dependencies.
13926 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13927 Declare init_registers_powerpc_vsx32l.
13928 Declare init_registers_powerpc_vsx64l.
13929 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13930 (ppc_arch_setup): Check for VSX in hwcap.
13931 (ppc_fill_vsxregset): New function.
13932 (ppc_store_vsxregset): New function.
13933 Add new VSX entry in regset_info target_regsets.
13935 * configure.srv: Add new VSX dependencies.
13937 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13939 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13940 (remote_open): Set or clear transport_is_reliable.
13941 (putpkt_binary): Don't expect acks in noack mode.
13942 (getpkt): Don't send ack/nac in noack mode.
13943 * server.c (handle_general_set): Handle QStartNoAckMode.
13944 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13946 (main): Reset noack_mode on every connection.
13947 * server.h (noack_mode): Declare.
13949 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13951 * Makefile.in (GDBREPLAY_OBS): New variable.
13952 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13954 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13955 Daniel Jacobowitz <dan@codesourcery.com>
13957 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13958 (usr_store_inferior_registers): Likewise.
13959 (regsets_store_inferior_registers): Likewise.
13961 2008-07-31 Rolf Jansen <rj@surtec.com>
13962 Pedro Alves <pedro@codesourcery.com>
13964 * configure.ac: Check for memmem declaration.
13965 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13966 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13967 (disable_packet_qfThreadInfo): Unconditionally compile.
13968 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13969 * configure, config.in: Regenerate.
13971 2008-07-28 Doug Kwan <dougkwan@google.com>
13973 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13974 (linux_write_memory): Remove declaration of errno.
13976 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13978 * linux-low.c (handle_extended_wait): Do not use "status"
13979 variable uninitialized.
13981 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13983 * server.c (handle_v_attach): Inhibit reporting dll changes.
13985 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13987 * remote-utils.c (prepare_resume_reply): If requested, don't
13988 output "thread:TID" in the T stop reply.
13990 * server.c (disable_packet_vCont, disable_packet_Tthread)
13991 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13992 (handle_query): If requested, disable support for qC, qfThreadInfo
13994 (handle_v_requests): If requested, disable support for vCont.
13995 (gdbserver_show_disableable): New.
13996 (main): Handle --disable-packet and --disable-packet=LIST.
13998 * server.h (disable_packet_vCont, disable_packet_Tthread)
13999 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14001 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14003 * server.c (gdbserver_usage): Mention --version.
14005 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14007 * Makefile.in (gdbreplay.o): New rule.
14009 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14011 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14012 message, not gdbserver.
14014 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14015 Nathan Sidwell <nathan@codesourcery.com>
14016 Joseph Myers <joseph@codesourcery.com>
14018 * acinclude.m4: Include ../../config/acx.m4.
14019 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14020 * configure, config.in: Regenerate.
14021 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14022 * server.c (gdbserver_version): Print PKGVERSION.
14023 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14024 (main): Adjust gdbserver_usage calls.
14025 * gdbreplay.c (version, host_name): Add declarations.
14026 (gdbreplay_version, gdbreplay_usage): New.
14027 (main): Accept --version and --help options.
14029 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14031 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14032 (arm_breakpoint_at): Handle Thumb.
14033 (the_low_target): Add comment.
14035 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14037 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14039 2008-05-09 Doug Evans <dje@google.com>
14041 * server.h (decode_search_memory_packet): Declare.
14042 * remote-utils.c (decode_search_memory_packet): New fn.
14043 * server.c (handle_search_memory_1): New fn.
14044 (handle_search_memory): New fn.
14045 (handle_query): Process qSearch:memory packets.
14047 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14049 * regcache.c (registers_length): Remove.
14050 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14051 full register packet.
14052 * regcache.h (registers_length): Remove prototype.
14053 * server.h (PBUFSIZ): Define to 16384.
14055 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14057 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14058 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14059 powerpc-64l.o, and powerpc-altivec64l.o.
14060 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14061 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14062 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14063 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14064 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14067 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14068 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14069 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14070 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14071 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14072 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14073 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14074 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14075 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14076 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14079 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14080 (init_registers_powerpc_32l): ... this new prototype.
14081 (init_registers_powerpc_32): Remove, replace by ...
14082 (init_registers_powerpc_altivec32l): ... this new prototype.
14083 (init_registers_powerpc_e500): Remove, replace by ...
14084 (init_registers_powerpc_e500l): ... this new prototype.
14085 (init_registers_ppc64): Remove, replace by ...
14086 (init_registers_powerpc_64l): ... this new prototype.
14087 (init_registers_powerpc_64): Remove, replace by ...
14088 (init_registers_powerpc_altivec64l): ... this new prototype.
14089 (ppc_num_regs): Set to 73.
14090 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14091 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14092 (ppc_cannot_store_register): Handle orig_r3 and trap.
14093 (ppc_arch_setup): Update init_registers_... calls.
14094 (ppc_fill_gregset): Handle orig_r3 and trap.
14096 * inferiors.c (clear_inferiors): Reset current_inferior.
14098 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14100 * acinclude.m4: Add override.m4.
14101 * configure: Regenerate.
14103 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14105 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14106 initial call to init_register_ppc64.
14108 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14110 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14111 single powerpc*-*-linux* case.
14112 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14114 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14116 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14117 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14119 * linux-ppc-low.c: Include <elf.h>.
14120 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14121 (ppc_hwcap): New global variable.
14122 (ppc_regmap): Remove __SPE__ #ifdef sections.
14123 (ppc_regmap_e500): New global variable.
14124 (ppc_cannot_store_register): Update __SPE__ special case.
14125 (ppc_get_hwcap): New function.
14126 (ppc_arch_setup): Use it to determine whether inferior supports
14127 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14128 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14129 Do not access registers if target does not support AltiVec.
14130 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14131 Do not access registers if target does not support SPE.
14132 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14134 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14136 * linux-low.c (disabled_regsets, num_regsets): New.
14137 (use_regsets_p): Delete.
14138 (linux_wait_for_process): Clear disabled_regsets.
14139 (regsets_fetch_inferior_registers): Check and set it.
14140 (regsets_store_inferior_registers): Likewise.
14141 (linux_fetch_registers, linux_store_registers): Do not use
14143 (initialize_low): Allocate disabled_regsets.
14145 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14147 * Makefile.in (LIBOBJS): New.
14148 (OBS): Use LIBOBJS.
14149 (memmem.o): New rule.
14150 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14151 * configure: Regenerated.
14153 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14155 * server.c (handle_query): Never return "unsupported" for
14156 qXfer:features:read queries.
14158 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14160 * server.c (get_features_xml): Fix inverted condition.
14161 (handle_query): Always support qXfer:feature:read.
14163 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14165 * server.c (wrapper_argv): New.
14166 (start_inferior): Handle wrapper_argv. If set, expect an extra
14168 (gdbserver_usage): Document --wrapper.
14169 (main): Parse --wrapper.
14171 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14173 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14174 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14175 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14176 (ppc_set_pc): Likewise.
14177 (ppc_arch_setup): New function.
14178 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14179 of collect_register.
14180 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14182 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14184 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14185 instead of linux-ppc64-low.o.
14186 * linux-ppc64-low.c: Remove file.
14187 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14188 (linux-ppc64-low.o): Remove rule.
14190 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14191 (init_registers_powerpc_64): Likewise.
14192 (ppc_regmap): Conditionally define depending on __powerpc64__.
14193 (ppc_cannot_store_register): Do not special-case "fpscr" when
14194 compiled on __powerpc64__.
14195 (ppc_collect_ptrace_register): New function.
14196 (ppc_supply_ptrace_register): New function.
14197 (ppc_breakpoint): Change type to "unsigned int".
14198 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14199 (the_low_target): Conditionally provide initializers for the
14200 arch_setup member depending on __powerpc64__. Install
14201 collect_ptrace_register and supply_ptrace_register members.
14203 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14205 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14206 * server.c (gdbserver_xmltarget): Define.
14207 (get_features_xml): Use it to replace "target.xml" and arch_string.
14209 * configure.srv: Remove srv_xmltarget. Add XML files that were
14210 mentioned there to srv_xmlfiles instead. Remove conditional tests
14211 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14212 srv_xmlfiles and srv_regobj to include all possible choices.
14213 * configure.ac (srv_xmltarget): Remove.
14214 (srv_xmlfiles): Do not add "target.xml".
14215 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14216 checks for supplementary target information.
14217 * configure: Regenerate.
14218 * Makefile.in (XML_TARGET): Remove.
14219 (target.xml): Remove rule.
14220 (clean): Do not clean up target.xml.
14221 (.PRECIOUS): Do not mention target.xml.
14223 * target.h (struct target_ops): Remove arch_string member.
14224 * linux-low.c (linux_arch_string): Remove.
14225 (linux_target_ops): Remove arch_string initializer.
14226 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14227 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14228 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14229 * spu-low.c (spu_arch_string): Remove.
14230 (spu_target_ops): Remove arch_string initializer.
14231 * win32-low.c (win32_arch_string): Remove.
14232 (win32_target_ops): Remove arch_string initializer.
14233 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14234 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14235 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14237 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14239 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14240 by collect_ptrace_register and supply_ptrace_register hooks.
14241 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14242 instead of checking for the_low_target.left_pad_xfer.
14243 (usr_store_inferior_registers): Use collect_ptrace_register callback
14244 instead of checking for the_low_target.left_pad_xfer.
14246 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14247 (s390_supply_ptrace_register): Likewise.
14248 (s390_fill_gregset): Call s390_collect_ptrace_register.
14249 (the_low_target): Update.
14251 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14252 (ppc_supply_ptrace_register): Likewise.
14253 (the_low_target): Update.
14255 * linux-i386-low.c (the_low_target): Update.
14256 * linux-x86-64-low.c (the_low_target): Update.
14258 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14260 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14261 reg-s390.o and reg-s390x.o.
14263 * linux-low.c (new_inferior): New global variable.
14264 (linux_create_inferior, linux_attach): Set it.
14265 (linux_wait_for_process): Call the_low_target.arch_setup after the
14266 target has stopped for the first time.
14267 (initialize_low): Do not call the_low_target.arch_setup.
14269 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14270 (s390_set_pc): Likewise.
14271 (s390_arch_setup): New function.
14272 (the_low_target): Use s390_arch_setup as arch_setup routine.
14274 * regcache.c (realloc_register_cache): New function.
14275 (set_register_cache): Call it for each existing regcache.
14277 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14279 * server.h (init_registers): Remove prototype.
14281 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14282 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14283 instead of init_registers ().
14284 * linux-arm-low.c (init_registers_arm): Add prototype.
14285 (init_registers_arm_with_iwmmxt): Likewise.
14286 (the_low_target): Add initializer for arch_setup field.
14287 * linux-cris-low.c (init_registers_cris): Add prototype.
14288 (the_low_target): Add initializer for arch_setup field.
14289 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14290 (the_low_target): Add initializer for arch_setup field.
14291 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14292 (the_low_target): Add initializer for arch_setup field.
14293 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14294 (the_low_target): Add initializer for arch_setup field.
14295 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14296 (the_low_target): Add initializer for arch_setup field.
14297 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14298 (the_low_target): Add initializer for arch_setup field.
14299 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14300 (init_registers_mips64_linux): Likewise.
14301 (the_low_target): Add initializer for arch_setup field.
14302 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14303 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14304 (the_low_target): Add initializer for arch_setup field.
14305 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14306 (init_registers_powerpc_64): Likewise.
14307 (the_low_target): Add initializer for arch_setup field.
14308 * linux-s390-low.c (init_registers_s390): Add prototype.
14309 (init_registers_s390x): Likewise.
14310 (the_low_target): Add initializer for arch_setup field.
14311 * linux-sh-low.c (init_registers_sh): Add prototype.
14312 (the_low_target): Add initializer for arch_setup field.
14313 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14314 (the_low_target): Add initializer for arch_setup field.
14315 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14316 (the_low_target): Add initializer for arch_setup field.
14318 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14319 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14320 instead of init_registers ().
14321 * win32-arm-low.c (init_registers_arm): Add prototype.
14322 (the_low_target): Add initializer for arch_setup field.
14323 * win32-i386-low.c (init_registers_i386): Add prototype.
14324 (the_low_target): Add initializer for arch_setup field.
14326 * spu-low.c (init_registers_spu): Add prototype.
14327 (initialize_low): Call initialie_registers_spu () instead of
14328 initialize_registers ().
14330 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14332 * server.c (handle_v_requests): When handling the vRun and vAttach
14333 packets, if already debugging a process, don't kill it. Return an
14336 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14338 * server.c (handle_query): Correct length check.
14340 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14342 * win32-low.c (do_initial_child_stuff): Add process handle
14343 parameter. Set current_process_handle and current_process_id from the
14344 parameters. Clear globals.
14345 (win32_create_inferior): Don't set current_process_handle and
14346 current_process_id here. Instead pass them on the call to
14347 do_initial_child_stuff.
14348 (win32_attach): Likewise.
14349 (win32_clear_inferiors): New.
14350 (win32_kill): Don't close the current process handle or the
14351 current thread handle here. Instead call win32_clear_inferiors.
14352 (win32_detach): Don't open a new handle to the process. Call
14353 win32_clear_inferiors.
14354 (win32_join): Don't rely on current_process_handle; open a new
14355 handle using the process id.
14356 (win32_wait): Call win32_clear_inferiors when the inferior process
14359 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14361 * server.c (monitor_show_help): Add "exit".
14363 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14365 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14366 (clean): Add reg-xtensa.c.
14367 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14368 * configure.srv (xtensa*-*-linux*) New target.
14369 * linux-xtensa-low.c: New.
14370 * xtensa-xtregs.c: New.
14372 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14374 * hostio.c: Don't include errno.h.
14375 (errno_to_fileio_errno): Move to hostio-errno.
14376 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14377 error number outputting to the target->hostio_last_error callback.
14378 (hostio_packet_error): Use FILEIO_EINVAL directly.
14379 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14380 calls to hostio_error.
14381 * hostio-errno.c: New.
14382 * server.h (hostio_last_error_from_errno): Declare.
14383 * target.h (target_ops): Add hostio_last_error member.
14384 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14385 as hostio_last_error handler.
14386 * spu-low.c (spu_target_ops): Likewise.
14387 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14388 (wince_hostio_last_error): New functions.
14389 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14390 as hostio_last_error handler.
14391 (win32_target_ops) [!_WIN32_WCE]: Register
14392 hostio_last_error_from_errno as hostio_last_error handler.
14393 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14394 (hostio-errno.o): New rule.
14395 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14396 * configure.srv (srv_hostio_err_objs): New variable. Default to
14398 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14399 * configure: Regenerate.
14401 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14403 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14404 (linux_kill, linux_detach): Clean up the process list.
14405 * remote-utils.c (remote_open): Improve port number parsing.
14406 (putpkt_binary, input_interrupt): Only send interrupts if the target
14408 * server.c (extended_protocol): Make static.
14409 (attached): Define earlier.
14410 (exit_requested, response_needed, program_argv): New variables.
14411 (target_running): New.
14412 (start_inferior): Clear attached here.
14413 (attach_inferior): Set attached here.
14414 (require_running): Define.
14415 (handle_query): Use require_running and target_running. Implement
14417 (handle_v_attach, handle_v_run): New.
14418 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14419 (gdbserver_usage): Update.
14420 (main): Redo argument parsing. Handle --debug and --multi. Handle
14421 --attach along with other options or after the port. Save
14422 program_argv. Support no initial program. Resynchronize
14423 communication with GDB after an error. Handle "monitor exit".
14424 Use require_running and target_running. Always allow the extended
14425 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14426 restart in extended mode.
14427 * README: Refer to the GDB manual. Update --attach usage.
14429 2007-12-20 Andreas Schwab <schwab@suse.de>
14431 * linux-low.c (STACK_SIZE): Define.
14432 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14433 (linux_test_for_tracefork): Likewise.
14435 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14437 * linux-low.c (linux_wait_for_event): Update messages. Do not
14438 reinsert auto-delete breakpoints.
14439 * mem-break.c (struct breakpoint): Change return type of handler to
14441 (set_breakpoint_at): Update handler type.
14442 (reinsert_breakpoint_handler): Return 1 instead of calling
14444 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14446 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14447 * mem-break.h (set_breakpoint_at): Update handler type.
14448 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14449 * win32-low.c (auto_delete_breakpoint): New.
14450 (get_child_debug_event): Use it.
14452 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14454 * configure.ac: Check for pread and pwrite.
14455 * hostio.c (handle_pread): Fall back to lseek and read.
14456 (handle_pwrite): Fall back to lseek and write.
14457 * config.in, configure: Regenerated.
14459 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14461 * server.c (myresume): Add own_buf argument.
14462 (main): Update calls.
14464 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14466 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14467 * remote-utils.c (remote_open): Do not call disable_async_io.
14468 (block_async_io): Delete.
14469 (unblock_async_io): Make static.
14470 (initialize_async_io): New.
14471 * server.c (handle_v_cont): Handle async I/O here.
14472 (myresume): Likewise. Move other common resume tasks here...
14473 (main): ... from here. Call initialize_async_io. Disable async
14474 I/O before the main loop.
14475 * server.h (initialize_async_io): Declare.
14476 (block_async_io, unblock_async_io): Delete prototypes.
14477 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14479 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14481 * remote-utils.c (readchar): Allow binary data in received messages.
14483 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14485 * win32-low.c (attaching): New global.
14486 (win32_create_inferior): Clear the `attaching' global.
14487 (win32_attach): Set the `attaching' global.
14488 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14489 attaching. Only set a breakpoint at the entry point if not
14492 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14494 * server.c (main): Don't report dll events on the initial
14495 connection on attaches.
14497 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14499 * server.c (main): Relax numerical bases supported for the pid of
14500 the --attach command line argument.
14502 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14504 * win32-low.c (win32_attach): Call OpenProcess before
14505 DebugActiveProcess, not after. Add last error output to error
14508 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14510 * win32-low.c (win32_get_thread_context)
14511 (win32_set_thread_context): New functions.
14512 (thread_rec): Use win32_get_thread_context.
14513 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14514 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14517 2007-12-03 Leo Zayas
14518 Pedro Alves <pedro_alves@portugalmail.pt>
14520 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14522 (child_add_thread): Minor cleanup.
14523 (child_continue): Resume artificially suspended threads before
14524 calling ContinueDebugEvent.
14525 (suspend_one_thread): New.
14526 (fake_breakpoint_event): New.
14527 (get_child_debug_event): Change return type to int. Check here if
14528 gdb sent an interrupt request. If a soft interrupt was requested,
14529 fake a breakpoint event. Return 0 if there is no event to handle,
14531 (win32_wait): Don't check here if gdb sent an interrupt request.
14532 Ensure there is a valid event to handle.
14533 (win32_request_interrupt): Add soft interruption method as last
14536 2007-12-03 Leo Zayas
14537 Pedro Alves <pedro_alves@portugalmail.pt>
14539 * win32-low.h (win32_thread_info): Add descriptions to the
14540 structure members. Replace `suspend_count' counter by a
14542 * win32-low.c (thread_rec): Update condition of when to get the
14543 context from the inferior. Rely on ContextFlags being set if it
14544 has already been retrieved. Only suspend the inferior thread if
14545 we haven't already. Warn if that fails.
14546 (continue_one_thread): s/suspend_count/suspended/. Only call
14547 ResumeThread once. Warn if that fails.
14549 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14551 * win32-low.c (win32_wait): Don't read from the inferior when it
14552 has already exited.
14554 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14556 * Makefile.in (win32_low_h): New variable.
14557 (win32-low.o): Add dependency on $(win32_low_h).
14558 (win32-arm-low.o, win32-i386-low.o): New rules.
14560 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14562 * hostio.c: Correct copyright year.
14564 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14566 * Makefile.in (OBS): Add hostio.o.
14567 (hostio.o): New rule.
14568 * server.h (handle_vFile): Declare.
14569 * hostio.c: New file.
14570 * server.c (handle_v_requests): Take packet_len and new_packet_len
14571 for binary packets. Call handle_vFile.
14572 (main): Update call to handle_v_requests.
14574 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14576 * linux-low.c: Include <sched.h>.
14578 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14580 * linux-low.c (linux_tracefork_grandchild): New.
14581 (linux_tracefork_child): Use clone.
14582 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14584 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14586 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14588 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14590 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14592 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14594 * inferiors.c (change_inferior_id): Delete.
14595 (add_pid_to_list, pull_pid_from_list): New.
14596 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14597 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14598 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14599 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14600 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14601 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14602 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14603 (using_threads): Always set to 1.
14604 (handle_extended_wait): New.
14605 (add_process): Do not set TID.
14606 (linux_create_inferior): Set must_set_ptrace_flags.
14607 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14608 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14609 (linux_thread_alive): Rename TID argument to LWPID.
14610 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14611 (linux_wait_for_event): Do not use TID or check using_threads. Update
14612 call to dead_thread_notify. Call handle_extended_wait.
14613 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14614 (send_sigstop): Delete sigstop_sent.
14615 (wait_for_sigstop): Avoid TID.
14616 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14617 (linux_test_for_tracefork): New.
14618 (linux_lookup_signals): Use thread_db_active and
14619 linux_supports_tracefork_flag.
14620 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14621 * linux-low.h (get_process_thread): Avoid TID.
14622 (struct process_ifo): Move thread_known and tid to the end. Remove
14624 (linux_attach_lwp, thread_db_init): Update prototypes.
14625 * server.h (change_inferior_id): Delete prototype.
14626 (add_pid_to_list, pull_pid_from_list): New prototypes.
14627 * thread-db.c (thread_db_use_events): New.
14628 (find_first_thread): Rename to...
14629 (find_one_thread): ...this. Update callers and messages. Do not
14630 call fatal. Check thread_db_use_events. Do not call
14631 change_inferior_id or new_thread_notify.
14632 (maybe_attach_thread): Update. Do not call new_thread_notify.
14633 (thread_db_init): Set thread_db_use_events. Check use_events.
14634 * utils.c (fatal, warning): Correct message prefix.
14636 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14638 * Makefile.in (clean): Remove new files.
14639 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14640 (powerpc-64.o, powerpc-64.c): New rules.
14641 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14642 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14644 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14646 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14647 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14648 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14649 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14650 (target_regsets): Add AltiVec and SPE register sets.
14651 * configure.ac: Check for AltiVec and SPE.
14652 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14653 (ppc_fill_vrregset, ppc_store_vrregset): New.
14654 (target_regsets): Add AltiVec register set.
14655 * configure: Regenerated.
14657 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14659 * linux-low.c (O_LARGEFILE): Define.
14660 (linux_read_memory): Use /proc/PID/mem.
14661 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14662 * configure, config.in: Regenerated.
14664 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14666 * linux-low.c (linux_wait_for_event): Do not pass signals while
14669 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14671 * win32-low.c (create_process): New.
14672 (win32_create_inferior): Use create_process instead of
14673 CreateProcess. If create_process failed retry appending an ".exe"
14674 suffix. Store the GetLastError result immediatelly after
14675 create_process calls and use it on the call to error.
14677 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14679 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14681 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14683 * configure.ac: Switch license to GPLv3.
14685 2007-08-01 Michael Snyder <msnyder@access-company.com>
14687 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14689 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14691 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14693 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14694 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14695 CloseToolhelp32Snapshot.
14696 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14697 CloseToolhelp32Snapshot.
14699 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14701 * server.c (main): Check for inferior exit before main loop.
14703 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14705 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14706 instead of on tmp_desc.
14708 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14709 Daniel Jacobowitz <dan@codesourcery.com>
14711 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14712 (add_thread): Minor cleanups.
14713 (clear_inferiors): Move lower in the file. Clear the DLL
14715 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14716 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14717 (xml_escape_text): New.
14718 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14720 (handle_v_cont): Report errors.
14721 (gdbserver_version): Update.
14722 (main): Correct size of own_buf. Do not report initial DLL events.
14723 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14724 (unloaded_dll, xml_escape_text): New.
14725 * win32-low.c (enum target_waitkind): Update comments.
14726 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14727 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14728 (win32_EnumProcessModules, win32_GetModuleInformation)
14729 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14730 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14731 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14732 (win32_Module32First, win32_Module32Next, load_toolhelp)
14733 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14734 (get_child_debug_event): Handle DLL events.
14735 (win32_wait): Likewise.
14737 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14739 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14740 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14742 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14744 * win32-low.c (handle_output_debug_string): Ignore event if not
14747 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14749 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14751 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14753 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14755 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14757 * inferiors.c (change_inferior_id): Add comment.
14758 * linux-low.c (check_removed_breakpoint): Add an early
14759 prototype. Improve debug output.
14760 (linux_attach): Doc update.
14761 (linux_detach_one_process, linux_detach): Clean up before releasing
14763 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14764 * linux-low.h (struct process_info): Doc improvement.
14765 * mem-break.c (delete_all_breakpoints): New.
14766 * mem-break.h (delete_all_breakpoints): New prototype.
14767 * thread-db.c (find_first_thread): New.
14768 (thread_db_create_event): Call it instead of
14769 thread_db_find_new_threads. Clean up unused variables.
14770 (maybe_attach_thread): Remove first thread handling.
14771 (thread_db_find_new_threads): Use find_first_thread.
14772 (thread_db_get_tls_address): Likewise.
14774 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14776 * thread-db.c (thread_db_find_new_threads): Add prototype.
14777 (thread_db_create_event): Check for the main thread before adding
14779 (maybe_attach_thread): Only enable event reporting if TID == 0.
14780 (thread_db_get_tls_address): Check for new threads.
14782 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14784 * linux-low.c (linux_create_inferior): Try execv before execvp.
14785 * spu-low.c (spu_create_inferior): Likewise.
14787 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14789 * linux-low.c (linux_create_inferior): Change execv to execvp.
14790 * spu-low.c (spu_create_inferior): Likewies.
14792 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14794 * Makefile.in (clean): Clean new files instead of deleted ones.
14795 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14796 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14798 * configure.srv: Specify XML files and new regformats for MIPS and
14800 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14801 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14802 an entry for the restart register.
14803 (mips_cannot_fetch_register, mips_cannot_store_register)
14804 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14805 register names to match the XML descriptions.
14806 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14807 restart register instead of $0.
14809 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14810 Markus Deuling <deuling@de.ibm.com>
14812 * remote-utils.c (decode_xfer_write): New function.
14813 * server.h (decode_xfer_write): Add prototype.
14814 * server.c (handle_query): Add PACKET_LEN argument. Support
14815 qXfer:spu:read and qXfer:spu:write packets.
14816 (main): Pass packet_len to handle_query.
14817 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14818 * target.h (target_ops): Add qxfer_spu.
14820 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14822 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14823 accessing non-seekable spufs files.
14825 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14827 * server.c (handle_query): Add reply for qC packet.
14829 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14830 Leo Zayas <lerele@champenstudios@com>
14832 * server.h (check_remote_input_interrupt_request): New function.
14833 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14834 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14835 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14836 (check_remote_input_interrupt_request): New function.
14837 * server.h (check_remote_input_interrupt_request): Declare.
14838 * win32-low.c (winapi_DebugBreakProcess,
14839 winapi_GenerateConsoleCtrlEvent): New typedefs.
14840 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14842 (win32_wait): Check for remote interrupt request
14843 with check_remote_input_interrupt_request.
14844 (win32_request_interrupt): New function.
14845 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14847 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14849 * win32-low.c (debug_registers_changed,
14850 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14851 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14852 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14853 (thread_rec): Get context using the low target.
14854 (child_add_thread): Call thread_added on the low target,
14855 which does the same thing.
14857 (do_initial_child_stuff): Remove debug registers references.
14858 Set context using the low target. Resume threads after
14859 setting the contexts.
14860 (child_continue): Remove dead variable. Remove debug
14861 registers references.
14862 (child_fetch_inferior_registers): Go through the low target.
14863 (do_child_store_inferior_registers): Remove.
14864 (child_store_inferior_registers): Go through the low target.
14865 (win32_resume): Remove debug registers references.
14866 Set context using the low target.
14867 (handle_exception): Change return type to void. Don't record
14868 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14869 first chance exception.
14870 (get_child_debug_event): Change return type to void. Remove
14871 goto loop. Always return after waiting for debug event.
14872 (win32_wait): Convert to switch statement. Handle spurious
14875 * win32-i386-low.c (debug_registers_changed,
14876 debug_registers_used): New.
14877 (initial_stuff): Rename to ...
14878 (i386_initial_stuff): ... this. Clear debug registers
14880 (store_debug_registers): Delete.
14881 (i386_get_thread_context): New.
14882 (load_debug_registers): Delete.
14883 (i386_set_thread_context): New.
14884 (i386_thread_added): New.
14885 (single_step): Rename to ...
14886 (i386_single_step): ... this.
14887 (do_fetch_inferior_registers): Rename to ...
14888 (i386_fetch_inferior_register): ... this.
14889 (i386_store_inferior_register): New.
14890 (the_low_target): Adapt to new interface.
14892 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14893 (arm_get_thread_context): New.
14894 (arm_set_thread_context): New.
14896 (do_fetch_inferior_registers): Rename to ...
14897 (arm_fetch_inferior_register): ... this.
14898 (arm_store_inferior_register): New.
14899 (arm_wince_breakpoint): Reimplement as unsigned long.
14900 (arm_wince_breakpoint_len): Define.
14901 (the_low_target): Adapt to new interface.
14903 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14904 load_debug_registers. Add get_thread_context, set_thread_context,
14905 thread_added and store_inferior_register. Rename
14906 fetch_inferior_registers to fetch_inferior_register.
14907 (regptr): Remove declaration.
14909 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14911 * linux-low.c (linux_detach): Change return type to int. Return 0.
14912 * spu-low.c (spu_detach): Likewise.
14914 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14916 * target.h (target_ops): Change return type of detach to int.
14918 (join_inferior): New.
14919 * server.c (main): Don't skip detach support on mingw32.
14920 If the inferior doesn't support detaching return error.
14921 Call join_inferior instead of using waitpid.
14922 * linux-low.c (linux_join): New.
14923 (linux_target_op): Add linux_join.
14924 * spu-low.c (spu_join): New.
14925 (spu_target_ops): Add spu_join.
14926 * win32-low.c (win32_detach): Adapt to new interface.
14927 Reopen current_process_handle before detaching. Issue a child
14928 resume before detaching.
14930 (win32_target_op): Add win32_join.
14932 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14934 * win32-low.c (win32-attach): Fix return value.
14935 * target.h (target_ops): Describe ATTACH return values.
14937 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14939 * win32-low.c (GETPROCADDRESS): Define.
14940 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14941 (winapi_DebugSetProcessKillOnExit): Likewise.
14942 (win32_create_inferior): Force usage of ansi CreateProcessA.
14943 (win32_attach): Use GETPROCADDRESS.
14944 (win32_detach): Likewise.
14946 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14948 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14950 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14952 * win32-low.c: Commit leftover changes from 2007-03-29.
14954 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14956 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14957 fields short instead of int. Add explicit padding.
14958 (i387_cache_to_fsave): Remove unnecessary casts.
14959 (i387_fsave_to_cache): Doc fix.
14960 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14962 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14964 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14965 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14967 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14969 * configure.srv (arm*-*-mingw32ce*): Move near the other
14972 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14974 * configure.ac: Add errno checking.
14975 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14976 sys/file.h and malloc.h.
14977 (AC_CHECK_DECLS): Add perror.
14978 (srv_mingwce): Handle.
14979 * configure.srv (i[34567]86-*-cygwin*): Add
14980 win32-i386-low.o to srv_tgtobj.
14981 (i[34567]86-*-mingw*): Likewise.
14982 (arm*-*-mingw32ce*): Add case.
14983 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14984 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14985 [__MINGW32CE__] (strerror): New function.
14986 [__MINGW32CE__] (errno): Define to GetLastError.
14987 [__MINGW32CE__] (COUNTOF): New macro.
14988 (remote_open): Remove extra close call.
14989 * mem-break.c (delete_breakpoint_at): New function.
14990 * mem-break.h (delete_breakpoint_at): Declare.
14991 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14992 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14993 [USE_WIN32API] (read, write): Add char* casts.
14994 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14995 * server.h: Include wincecompat.h on Windows CE.
14996 [HAVE_ERRNO_H]: Check.
14997 (perror): Declare if not declared.
14998 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14999 (perror_with_name): Remove errno declaration.
15000 * wincecompat.h: New.
15001 * wincecompat.c: New.
15002 * win32-low.h: New.
15003 * win32-arm-low.c: New.
15004 * win32-i386-low.c: New.
15005 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15006 (OUTMSG2): Make it safe.
15008 (COUNTOF): New macro.
15009 (NUM_REGS): Get it from the low target.
15010 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15011 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15012 (thread_rec): Let low target handle debug registers.
15013 (child_add_thread): Likewise.
15014 (child_init_thread_list): Likewise.
15015 (continue_one_thread): Likewise.
15017 (do_child_fetch_inferior_registers): Move to ...
15018 * win32-i386-low.c: ... here, and rename to ...
15019 (do_fetch_inferior_registers): ... this.
15020 * win32-low.c (child_fetch_inferior_registers):
15021 Go through the low target.
15022 (do_child_store_inferior_registers): Use regptr.
15023 (strwinerror): New function.
15024 (win32_create_inferior): Handle Windows CE.
15025 Use strwinerror instead of strerror on Windows error
15026 codes. Add program to the error output.
15027 Don't close the main thread handle on Windows CE.
15028 (win32_attach): Use coredll.dll on Windows CE.
15029 (win32_kill): Close current process and current
15031 (win32_detach): Use coredll.dll on Windows CE.
15032 (win32_resume): Let low target handle debug registers, and
15034 (handle_exception): Add/Remove initial breakpoint. Avoid
15035 non-existant WSTOPSIG on Windows CE.
15036 (win32_read_inferior_memory): Cast to remove warning.
15037 (win32_arch_string): Go through the low target.
15038 (initialize_low): Call set_breakpoint_data with the low
15039 target's breakpoint.
15040 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15041 FOP_REGNUM, mappings): Move to ...
15042 * win32-i386-low.c: ... here.
15043 * win32-low.c (win32_thread_info): Move to ...
15044 * win32-low.h: ... here.
15045 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15046 win32-arm-low.c and wincecompat.c.
15047 (all:): Add $EXEEXT.
15048 (install-only:): Likewise.
15049 (gdbserver:): Likewise.
15050 (gdbreplay:): Likewise.
15051 * config.in: Regenerate.
15052 * configure: Regenerate.
15054 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15056 * win32-low.c: Rename typedef thread_info to
15057 win32_thread_info throughout.
15059 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15061 * win32-i386-low.c: Rename to ...
15062 * win32-low.c: ... this.
15063 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15064 * Makefile.in: Likewise.
15066 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15068 * remote-utils.c (monitor_output): Constify msg parameter.
15069 * server.h (monitor_output): Likewise.
15070 * win32-i386-low.c (handle_output_debug_string): New.
15071 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15072 handle_output_debug_string.
15073 (get_child_debug_event): Likewise.
15075 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15077 * server.c (main): Correct strtoul check.
15079 2007-03-27 Jon Ringle <jon@ringle.org>
15081 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15083 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15085 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15087 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15089 * terminal.h: Check HAVE_SGTTY_H.
15091 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15093 * remote-utils.c (remote_open): Print out the assigned port number.
15095 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15097 * remote-utils.c (monitor_output): New function.
15098 * server.c (debug_threads): Define here.
15099 (monitor_show_help): New function.
15100 (handle_query): Handle qRcmd.
15101 (main): Do not handle 'd' packet.
15102 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15103 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15106 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15108 * Makefile.in (EXEEXT): New.
15109 (clean): Use $(EXEEXT).
15111 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15113 * target.h (target_ops): Rename send_signal to request_interrupt,
15114 and remove enum target_signal parameter.
15115 * linux-low.c (linux_request_interrupt): Rename from
15116 linux_send_signal, and always send SIGINT.
15117 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15118 and always send SIGINT.
15119 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15121 (input_interrupt): Likewise.
15123 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15125 * server.c (get_features_xml): Check if target implemented
15127 * win32-i386-low.c (win32_arch_string): New.
15128 (win32_target_ops): Add win32_arch_string as arch_string member.
15130 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15132 * spu-low.c (spu_arch_string): New.
15133 (spu_target_ops): Add spu_arch_string.
15135 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15137 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15138 * configure.ac: Do not check for terminal.h.
15139 * configure, config.in: Regenerated.
15141 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15143 * Makefile.in (OBS): Add $(XML_BUILTIN).
15144 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15146 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15147 (arm-with-iwmmxt.c): New.
15148 * config.in, configure: Regenerate.
15149 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15150 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15151 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15152 (arm*-*-linux*): Add iWMMXt and regset support.
15153 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15154 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15155 (arm_store_wmmxregset, target_regsets): New.
15156 * server.c (get_features_xml): Take annex argument. Check builtin
15158 (handle_query): Handle multiple annexes.
15160 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15162 * remote-utils.c [USE_WIN32API] (read, write): Define.
15163 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15166 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15168 * linux-i386-low.c (the_low_target): Set arch_string.
15169 * linux-x86-64-low.c (the_low_target): Likewise.
15170 * linux-low.c (linux_arch_string): New.
15171 (linux_target_ops): Add it.
15172 * linux-low.h (struct linux_target_ops): Add arch_string.
15173 * server.c (write_qxfer_response): Use const void * for DATA.
15174 (get_features_xml): New.
15175 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15176 * target.h (struct target_ops): Add arch_string method.
15178 2007-01-03 Denis Pilat <denis.pilat@st.com>
15179 Daniel Jacobowitz <dan@codesourcery.com>
15181 * linux-low.c (linux_kill): Handle being called with no threads.
15182 * win32-i386-low.c (win32_kill): Likewise.
15183 (get_child_debug_event): Clear current_process_handle.
15185 2006-12-30 Denis PILAT <denis.pilat@st.com>
15186 Daniel Jacobowitz <dan@codesourcery.com>
15188 * remote-utils.c (remote_open): Check the type of specified
15189 serial port devices before opening them.
15190 * server.c (main): Kill the inferior if an error occurs during
15191 the first remote_open.
15193 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15195 * README: Update supported targets.
15197 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15199 * Makefile.in (clean): Remove reg-mips64.c.
15200 (reg-mips64.c, reg-mips64.o): New rules.
15201 * configure.srv: Handle mips64. Include regset support for mips.
15202 * linux-mips-low.c (union mips_register): New.
15203 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15204 (mips_breakpoint, mips_breakpoint_at): Use int.
15205 (mips_collect_register, mips_supply_register)
15206 (mips_collect_register_32bit, mips_supply_register_32bit)
15207 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15208 (mips_store_fpregset, target_regsets): New.
15209 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15211 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15213 * configure.srv: Add target "spu*-*-*".
15214 * Makefile.in (clean): Remove reg-spu.c.
15215 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15216 * spu-low.c: New file.
15218 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15220 * configure.ac: Correct td_thr_tls_get_addr test.
15221 * configure: Regenerated.
15223 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15225 * linux-low.c (linux_wait_for_event): Reformat. Use the
15226 pass_signals array.
15227 * remote-utils.c (decode_address_to_semicolon): New.
15228 * server.c (pass_signals, handle_general_set): New.
15229 (handle_query): Mention QPassSignals for qSupported.
15230 (main): Call handle_general_set.
15231 * server.h (pass_signals, decode_address_to_semicolon): New.
15233 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15235 * server.c (handle_query): Correct error handling for read_auxv.
15237 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15239 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15240 and srv_linux_thread_db to yes.
15241 * linux-s390-low.c (s390_fill_gregset): New function.
15242 (target_regsets): Define data structure.
15244 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15246 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15247 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15248 * config.in, configure: Regenerated.
15249 * inferiors.c (gdb_id_to_thread): New function.
15250 (gdb_id_to_thread_id): Use it.
15251 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15252 * linux-low.h (struct process_info): Add th member.
15253 (thread_db_get_tls_address): New prototype.
15254 * remote-utils.c (decode_address): Make non-static.
15255 * server.c (handle_query): Handle qGetTLSAddr.
15256 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15257 * target.h (struct target_ops): Add get_tls_address.
15258 * thread-db.c (maybe_attach_thread): Save the thread handle.
15259 (thread_db_get_tls_address): New.
15261 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15263 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15264 (linux_resume_one_process): Take a siginfo_t *. Update all
15265 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15266 (struct pending_signals): Add a siginfo_t.
15267 (linux_wait_for_process): Always set last_status.
15268 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15269 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15270 * linux-low.h (struct process_info): Add last_status.
15272 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15274 * remote-utils.c (try_rle): New function.
15275 (putpkt_binary): Use it.
15277 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15279 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15280 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15281 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15282 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15283 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15286 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15288 * server.c (terminal_fd): New variable.
15289 (old_foreground_pgrp): Likewise.
15290 (restore_old_foreground_pgrp): New function.
15291 (start_inferior): Record the terminal file descriptor in terminal_fd
15292 and its original foreground group in old_foreground_pgrp. Register
15293 restore_old_foreground_pgrp with atexit().
15295 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15297 * server.c (handle_query): Correct qPart to qXfer.
15299 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15301 * configure.ac: Check for more headers which are missing on
15302 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15303 * configure.srv: Add Cygwin and mingw32.
15304 * remote-utils.c: Don't include headers unconditionally which
15305 are missing on mingw32. Include <winsock.h> for mingw32.
15306 (remote_open): Adjust for mingw32 support. Flush
15307 standard error after writing to it.
15308 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15309 (unblock_async_io, enable_async_io, disable_async_io)
15310 (readchar, getpkt): Update for Winsock support.
15311 (prepare_resume_reply): Expect a protocol signal number.
15312 * server.c: Disable <sys/wait.h> on mingw32.
15313 (start_inferior): Adjust for mingw32 support. Flush
15314 standard error after writing to it.
15315 (attach_inferior): Likewise. Use protocol signal
15317 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15319 * win32-i386-low.c: New file.
15320 * Makefile.in (XM_CLIBS): Set.
15321 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15322 (win32-i386-low.o): New dependency rule.
15323 * linux-low.c (linux_wait): Use target signal numbers.
15324 * target.h (struct target_ops): Doc fix.
15325 * server.h (target_signal_to_name): New prototype.
15326 * gdbreplay.c: Don't include headers unconditionally which
15327 are missing on mingw32. Include <winsock.h> for mingw32.
15328 (remote_close, remote_open): Adjust for Winsock support.
15329 * configure, config.in: Regenerated.
15331 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15333 * server.c (decode_xfer_read, write_qxfer_response): New.
15334 (handle_query): Take a packet length argument. Handle
15335 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15336 the qSupported response.
15337 (main): Update call to handle_query.
15339 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15341 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15342 (putpkt_binary): Renamed from putpkt and adjusted for binary
15344 (putpkt): New wrapper for putpkt_binary.
15345 (readchar): Don't mask off the high bit.
15346 (decode_X_packet): New function.
15347 * server.c (main): Call putpkt_binary if a handler sets the packet
15348 length. Save the length of the incoming packet. Handle 'X'.
15349 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15351 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15353 * server.c (handle_query): Handle qSupported.
15355 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15357 * remote-utils.c (all_symbols_looked_up): New variable.
15358 (look_up_one_symbol): Check it.
15359 * server.h (look_up_one_symbol): New declaration.
15360 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15362 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15364 * Makefile.in (linux-arm-low.o): Update dependencies.
15365 * linux-arm-low.c: Include "gdb_proc_service.h".
15366 (PTRACE_GET_THREAD_AREA): Define.
15367 (ps_get_thread_area): New function.
15369 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15371 * configure.srv (m68k*-*-uclinux*): New target.
15372 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15373 (linux_resume_one_process): Remove extraneous cast.
15374 (linux_read_offsets): New.
15375 (linux_target_op): Add linux_read_offsets on mmuless systems.
15376 * server.c (handle_query): Add qOffsets logic.
15377 * target.h (struct target_ops): Add read_offsets.
15379 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15381 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15382 (PTRACE_GET_THREAD_AREA): Define.
15383 (ps_get_thread_area): New function.
15384 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15385 (linux-x86-64-low.o): Update.
15387 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15389 * configure.ac: Remove checks for prfpregset_t.
15390 * gdb_proc_service.h: New file.
15391 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15392 new "gdb_proc_service.h".
15393 * proc-service.c: Likewise.
15394 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15395 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15396 * Makefile.in (gdb_proc_service_h): Updated.
15397 * configure, config.in: Regenerated.
15399 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15401 * remote-utils.c (prepare_resume_reply): Move declaration
15402 of gdb_id_from_wait to the top of the block.
15404 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15406 * linux-low.c (regsets_store_inferior_registers): Read the regset
15407 from the target before filling it.
15409 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15411 * server.c (attach_inferior): Return SIGTRAP for a successful
15414 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15416 * Makefile.in (OBS): Add version.o.
15417 (STAGESTUFF): Delete.
15418 (version.o): Add dependencies.
15419 (version.c): Replace rule.
15420 (clean): Remove version.c.
15421 * server.c (gdbserver_version): New.
15422 (gdbserver_usage): Use printf.
15423 (main): Handle --version and --help.
15424 * server.h (version, host_name): Add declarations.
15426 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15438 * linux-x86-64-low.c:
15440 * linux-s390-low.c:
15441 * linux-ppc64-low.c:
15443 * linux-mips-low.c:
15444 * linux-m68k-low.c:
15445 * linux-m32r-low.c:
15448 * linux-ia64-low.c:
15449 * linux-i386-low.c:
15450 * linux-crisv32-low.c:
15462 * gdbserver.1: Add (C) after Copyright. Update the FSF
15465 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15467 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15468 (arm_breakpoint_at): Recognize both breakpoints.
15469 (the_low_target): Use the correct breakpoint instruction.
15471 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15473 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15474 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15475 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15476 (the_low_target): Update.
15478 2005-10-25 Andreas Schwab <schwab@suse.de>
15480 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15482 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15483 (ia64_num_regs): Reduce to 462.
15485 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15487 * acinclude.m4: Correct quoting.
15488 * aclocal.m4: Regenerated.
15490 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15491 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15492 (thread_db_init): Call thread_db_err_str.
15493 * configure.ac: Check for TD_VERSION.
15494 * config.in, configure: Regenerated.
15496 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15498 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15500 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15502 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15503 is not available. Define HAVE_PTRACE_GETREGS if it is.
15504 * config.in, configure: Regenerated.
15505 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15506 * linux-i386-low.c, linux-m68k-low.c: Update to use
15507 HAVE_PTRACE_GETREGS.
15508 * linux-low.c (regsets_fetch_inferior_registers)
15509 (regsets_store_inferior_registers): Only return 0 if we processed
15511 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15512 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15514 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15516 * inferiors.c (struct thread_info): Add gdb_id.
15517 (add_thread): Add gdb_id argument.
15518 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15519 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15520 calls to add_thread.
15521 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15522 * server.c (handle_query): Use thread_to_gdb_id.
15523 (handle_v_cont, main): Use gdb_id_to_thread_id.
15524 * server.h (add_thread): Update prototype.
15525 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15528 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15530 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15531 left-padded registers.
15532 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15533 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15535 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15537 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15538 * configure: Regenerate.
15539 * config.in: Regenerate.
15540 * server.h (NEED_DECLARATION_STRERROR):
15541 Replace with !HAVE_DECL_STRERROR.
15543 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15545 * linux-low.c (linux_wait, linux_send_signal): Don't test
15546 an unsigned long variable for > 0 if it could be MAX_ULONG.
15547 * server.c (myresume): Likewise.
15548 * target.c (set_desired_inferior): Likewise.
15550 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15552 * configure.ac: Simplify and improve check for socklen_t.
15553 * configure, config.in: Regenerate.
15555 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15557 * acconfig.h: Remove.
15558 * configure.ac: Add a test for socklen_t. Use three-argument
15559 AC_DEFINE throughout.
15560 * config.in: Regenerated using autoheader 2.59.
15561 * configure: Regenerated.
15563 * gdbreplay.c (socklen_t): Provide a default.
15564 (remote_open): Use socklen_t.
15565 * remote-utils.c (socklen_t): Provide a default.
15566 (remote_open): Use socklen_t.
15567 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15570 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15572 * linux-low.c (linux_read_memory, linux_write_memory)
15573 (linux_read_auxv): Likewise.
15574 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15575 (check_mem_write): Likewise.
15576 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15578 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15579 (registers_from_string, register_data): Likewise.
15580 * server.c (handle_query, main): Likewise.
15581 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15582 (decode_M_packet): Likewise.
15583 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15584 * target.h (struct target_ops): Update read_memory, write_memory,
15586 (read_inferior_memory, write_inferior_memory): Update.
15587 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15588 to unsigned char *.
15589 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15590 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15591 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15592 linux-s390-low.c, linux-sh-low.c: Update for changes in
15593 read_inferior_memory and the_low_target->breakpoint.
15595 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15597 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15598 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15599 * configure.srv: Add powerpc64-*-linux*.
15600 * linux-ppc64-low.c: New file.
15602 2005-05-23 Orjan Friberg <orjanf@axis.com>
15604 * linux-cris-low.c: New file with support for CRIS.
15605 * linux-crisv32-low.c: Ditto for CRISv32.
15606 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15607 (clean): Add reg-cris.c and reg-crisv32.c.
15608 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15609 reg-crisv32.o, and reg-crisv32.c to make rules.
15610 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15611 recognized targets.
15613 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15615 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15616 of sizeof (PTRACE_XFER_TYPE).
15617 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15619 2005-05-12 Orjan Friberg <orjanf@axis.com>
15621 * target.h (struct target_ops): Add insert_watchpoint,
15622 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15623 pointers for hardware watchpoint support.
15624 * linux-low.h (struct linux_target_ops): Ditto.
15625 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15626 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15627 to linux_target_ops.
15628 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15630 * server.c (main): Recognize 'Z' and 'z' packets.
15632 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15634 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15635 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15636 (the_low_target): Add new members.
15638 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15640 * proc-service.c (ps_lgetregs): Search all_processes instead of
15643 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15645 * server.c (start_inferior): Change return type to int.
15646 (attach_inferior): Change sigptr to int *.
15647 (handle_v_cont, handle_v_requests): Change signal to int *.
15648 (main): Change signal to int.
15650 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15652 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15653 * configure.srv: Add m32r*-*-linux*.
15654 * linux-m32r-low.c: New file.
15656 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15658 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15660 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15662 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15663 Take unsigned long arguments for PIDs.
15664 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15665 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15666 (wait_for_sigstop, linux_resume_one_process)
15667 (regsets_fetch_inferior_registers, linux_send_signal)
15668 (linux_read_auxv): Likewise. Update the types of variables holding
15669 PIDs. Update format string specifiers.
15670 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15671 * remote-utils.c (prepare_resume_reply): Likewise.
15672 * server.c (cont_thread, general_thread, step_thread)
15673 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15675 (handle_query): Update format specifiers.
15676 (handle_v_cont, main): Use strtoul for thread IDs.
15677 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15678 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15679 (general_thread, step_thread, thread_from_wait)
15680 (old_thread_from_wait): Update.
15681 * target.h (struct thread_resume): Use unsigned long for THREAD.
15682 (struct target_ops): Use unsigned long for arguments to attach and
15685 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15687 * acinclude.m4: Include bfd/bfd.m4 directly.
15688 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15689 <agriffis@toolchain.org>.
15690 * aclocal.m4, configure: Regenerated.
15692 2005-01-07 Andrew Cagney <cagney@gnu.org>
15694 * configure.ac: Rename configure.in, require autoconf 2.59.
15695 * configure: Re-generate.
15697 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15699 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15700 LIBS when finished.
15701 * aclocal.m4: Regenerated.
15702 * configure: Regenerated.
15704 2004-11-21 Andreas Schwab <schwab@suse.de>
15706 * linux-m68k-low.c (m68k_num_gregs): Define.
15707 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15708 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15709 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15710 (m68k_breakpoint_at): New. Add to the_low_target.
15712 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15713 srv_linux_thread_db to yes.
15715 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15717 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15718 (ARCH_SET_FS): Likewise.
15719 (ARCH_GET_FS): Likewise.
15720 (ARCH_GET_GS): Likewise.
15722 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15724 * linux-i386-low.c (ps_get_thread_area): New.
15725 * linux-x86-64-low.c (ps_get_thread_area): New.
15726 * linux-low.c: Include <sys/syscall.h>.
15727 (linux_kill_one_process): Don't kill the first thread here.
15728 (linux_kill): Kill the first thread here.
15729 (kill_lwp): New function.
15730 (send_sigstop, linux_send_signal): Use it.
15731 * proc-service.c: Clean up #ifdefs.
15732 (fpregset_info): Delete.
15733 (ps_lgetregs): Update and enable implementation.
15734 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15736 * remote-utils.c (struct sym_cache, symbol_cache): New.
15737 (input_interrupt): Print a clearer message.
15738 (async_io_enabled): New variable.
15739 (enable_async_io, disable_async_io): Use it. Update comments.
15740 (look_up_one_symbol): Use the symbol cache.
15741 * thread-db.c (thread_db_look_up_symbols): New function.
15742 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15744 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15746 * configure.in: Test for -rdynamic.
15747 * configure: Regenerated.
15748 * Makefile (INTERNAL_LDFLAGS): New.
15749 (gdbserver, gdbreplay): Use it.
15751 2004-09-02 Andrew Cagney <cagney@gnu.org>
15753 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15755 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15757 * linux-low.c (linux_wait): Clear all_processes list also.
15759 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15761 * linux-low.c: Include <errno.h>. Remove extern declaration of
15764 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15766 * gdbreplay.c, server.h, utils.c: Update copyright years.
15768 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15770 * server.c (main): Print child status or termination signal from
15771 variable 'signal', not 'sig'.
15773 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15775 * linux-low.c (linux_read_memory): Change return type to
15776 int. Check for and return error from ptrace().
15777 * target.c (read_inferior_memory): Change return type to int. Pass
15778 back return status from the_target->read_memory().
15779 * target.h (struct target_ops): Adapt *read_memory() prototype.
15781 (read_inferior_memory): Adapt prototype.
15782 * server.c (main): Return an error packet if
15783 read_inferior_memory() returns an error.
15785 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15787 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15788 Unify with other clean targets.
15790 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15792 * server.c (handle_v_cont): Call set_desired_inferior.
15794 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15796 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15798 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15800 * linux-low.c (linux_wait): Unblock async I/O.
15801 (linux_resume): Block and enable async I/O.
15802 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15803 * server.h (block_async_io, unblock_async_io): Add prototypes.
15805 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15807 * remote-utils.c (remote_open): Print a status notice after
15808 opening a TCP port.
15809 * server.c (attach_inferior): Print a status notice after
15812 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15814 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15816 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15818 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15820 * server.c, target.h: Update copyright years.
15822 2004-02-25 Roland McGrath <roland@redhat.com>
15824 * target.h (struct target_ops): New member `read_auxv'.
15825 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15826 * linux-low.c (linux_read_auxv): New function.
15827 (linux_target_ops): Initialize `read_auxv' member to that.
15829 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15831 Committed by Jim Blandy <jimb@redhat.com>.
15833 * linux-s390-low.c (s390_num_regs): Update.
15834 (s390_regmap): Remove control registers. Use __s390x__ predefine
15835 instead of GPR_SIZE to distiguish s390 and s390x targets.
15837 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15839 * linux-low.c: Update copyright year.
15840 (check_removed_breakpoint): Clear pending_is_breakpoint.
15841 (linux_set_resume_request, linux_queue_one_thread)
15842 (resume_status_pending_p): New functions.
15843 (linux_continue_one_thread): Use process->resume.
15844 (linux_resume): Only resume threads if there are no pending events.
15845 * linux-low.h (struct process_info): Add resume request
15848 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15850 * regcache.c (new_register_cache): Clear the allocated register
15851 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15853 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15855 * linux-low.c (linux_resume): Take a struct thread_resume *
15857 (linux_wait): Update call.
15858 (resume_ptr): New static variable.
15859 (linux_continue_one_thread): Renamed from
15860 linux_continue_one_process. Use resume_ptr.
15861 (linux_resume): Use linux_continue_one_thread.
15862 * server.c (handle_v_cont, handle_v_requests): New functions.
15863 (myresume): New function.
15864 (main): Handle 'v' case.
15865 * target.h (struct thread_resume): New type.
15866 (struct target_ops): Change argument of "resume" to struct
15868 (myresume): Delete macro.
15870 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15872 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15873 (uninstall): Support DESTDIR.
15875 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15877 * configure.srv: Add xscale*linux copy of arm*linux entry.
15879 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15881 * linux-arm-low.c (arm_reinsert_addr): New function.
15882 (the_low_target): Add arm_reinsert_addr.
15884 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15886 * mem-break.c: Remove whitespace at end of file.
15888 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15890 * configure.in: Check whether we need to prototype strerror.
15891 * server.h: Optionally prototype strerror.
15892 * gdbreplay.c (perror_with_name): Use strerror.
15893 * linux-low.c (linux_attach_lwp): Use strerror.
15894 * utils.c (perror_with_name): Use strerror.
15895 * config.in, configure: Regenerated.
15897 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15899 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15900 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15902 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15904 * Makefile.in (SFILES): Update.
15905 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15906 low-sun3.c: Remove files.
15908 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15910 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15911 (linux_detach_one_process, linux_detach): New functions.
15912 (linux_target_ops): Add linux_detach.
15913 * server.c (main): Handle 'D' packet.
15914 * target.h (struct target_ops): Add "detach" member.
15915 (detach_inferior): Define.
15917 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15919 From Kelley Cook <kelleycook@wideopenwest.com>:
15920 * configure.srv: Accept i[34567]86 variants.
15922 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15924 * linux-low.c (linux_wait_for_event): Correct comment typos.
15925 (linux_resume_one_process): Call check_removed_breakpoint.
15926 (linux_send_signal): New function.
15927 (linux_target_ops): Add linux_send_signal.
15928 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15930 * target.h (struct target_ops): Add send_signal.
15932 2003-05-29 Jim Blandy <jimb@redhat.com>
15934 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15935 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15936 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15937 away part of the register's value.
15939 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15941 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15942 (linux_wait_for_event, linux_init_signals): Likewise.
15944 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15946 * configure.in: Check for stdlib.h.
15947 * configure: Regenerated.
15948 * config.in: Regenerated.
15950 2003-01-04 Andreas Schwab <schwab@suse.de>
15952 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15954 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15956 * Makefile.in: Remove obsolete code.
15958 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15960 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15961 defined(PT_FPR0_HI).
15963 2002-11-17 Stuart Hughes <seh@zee2.com>
15965 * linux-arm-low.c (arm_num_regs): Increase.
15966 (arm_regmap): Include status register.
15968 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15970 * linux-low.c (register_addr): Remove incorrect -1 check.
15972 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15974 * linux-low.c (linux_create_inferior): Call setpgid. Return
15976 (unstopped_p, linux_signal_pid): Remove.
15977 (linux_target_ops): Remove linux_signal_pid.
15978 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15979 global instead of target method.
15980 * target.h (struct target_ops): Remove signal_pid. Update comment
15981 for create_inferior.
15982 * server.c (signal_pid): New variable.
15983 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15984 gdbserver. Set the child to be the foreground process group.
15985 (attach_inferior): Set signal_pid.
15987 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15989 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15991 2002-08-20 Jim Blandy <jimb@redhat.com>
15993 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15996 2002-08-01 Andrew Cagney <cagney@redhat.com>
15998 * Makefile.in: Make chill references obsolete.
16000 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16002 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16003 * configure: Regenerate.
16004 * config.in: Regenerate.
16006 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16008 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16009 (perror_with_name, remote_close, remote_open, expect, play): Static.
16011 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16013 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16014 byte offsets instead of an array of indexes.
16015 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16017 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16019 * regcache.c: Add comment.
16021 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16023 * thread-db.c: New file.
16024 * proc-service.c: New file.
16025 * acinclude.m4: New file.
16026 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16027 proc-service.o, and thread-db.o.
16028 (linux-low.o): Add USE_THREAD_DB.
16029 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16030 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16031 * aclocal.m4: Regenerated.
16032 * config.in: Regenerated.
16033 * configure: Regenerated.
16034 * configure.in: Check for proc_service.h, sys/procfs.h,
16035 thread_db.h, and linux/elf.h headrs.
16036 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16037 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16038 Check for -lthread_db and thread support.
16039 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16040 PowerPC, and SuperH.
16041 * i387-fp.c: Constify arguments.
16042 * i387-fp.h: Likewise.
16043 * inferiors.c: (struct thread_info): Renamed from
16044 `struct inferior_info'. Remove PID member. Use generic inferior
16045 list header. All uses updated.
16046 (inferiors, signal_pid): Removed.
16047 (all_threads): New variable.
16048 (get_thread): Define.
16049 (add_inferior_to_list): New function.
16050 (for_each_inferior): New function.
16051 (change_inferior_id): New function.
16052 (add_inferior): Removed.
16053 (remove_inferior): New function.
16054 (add_thread): New function.
16055 (free_one_thread): New function.
16056 (remove_thread): New function.
16057 (clear_inferiors): Use for_each_inferior and free_one_thread.
16058 (find_inferior): New function.
16059 (find_inferior_id): New function.
16060 (inferior_target_data): Update argument type.
16061 (set_inferior_target_data): Likewise.
16062 (inferior_regcache_data): Likewise.
16063 (set_inferior_regcache_data): Likewise.
16064 * linux-low.c (linux_bp_reinsert): Remove.
16065 (all_processes, stopping_threads, using_thrads)
16066 (struct pending_signals, debug_threads, pid_of): New.
16067 (inferior_pid): Replace with macro.
16068 (struct inferior_linux_data): Remove.
16069 (get_stop_pc, add_process): New functions.
16070 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16071 Use add_process and add_thread.
16072 (linux_attach_lwp): New function, based on old linux_attach. Use
16073 add_process and add_thread. Set stop_expected for new threads.
16074 (linux_attach): New function.
16075 (linux_kill_one_process): New function.
16076 (linux_kill): Kill all LWPs.
16077 (linux_thread_alive): Use find_inferior_id.
16078 (check_removed_breakpoints, status_pending_p): New functions.
16079 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16080 Update. Use WNOHANG. Wait for cloned processes also. Update process
16081 struct for the found process.
16082 (linux_wait_for_event): New function.
16083 (linux_wait): Use it. Support LWPs.
16084 (send_sigstop, wait_for_sigstop, stop_all_processes)
16085 (linux_resume_one_process, linux_continue_one_process): New functions.
16086 (linux_resume): Support LWPs.
16087 (REGISTER_RAW_SIZE): Remove.
16088 (fetch_register): Use register_size instead. Call supply_register.
16089 (usr_store_inferior_registers): Likewise. Call collect_register.
16090 Fix recursive case.
16091 (regsets_fetch_inferior_registers): Improve error message.
16092 (regsets_store_inferior_registers): Add debugging.
16093 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16094 (unstopped_p, linux_signal_pid): New functions.
16095 (linux_target_ops): Add linux_signal_pid.
16096 (linux_init_signals): New function.
16097 (initialize_low): Call it. Initialize using_threads.
16098 * regcache.c (inferior_regcache_data): Add valid
16100 (get_regcache): Fetch registers lazily. Add fetch argument
16101 and update all callers.
16102 (regcache_invalidate_one, regcache_invalidate): New
16104 (new_register_cache): Renamed from create_register_cache.
16105 Return the new regcache.
16106 (free_register_cache): Change argument to a void *.
16107 (registers_to_string, registers_from_string): Call get_regcache
16108 with fetch flag set.
16109 (register_data): Make static. Pass fetch flag to get_regcache.
16110 (supply_register): Call get_regcache with fetch flag clear.
16111 (collect_register): Call get_regcache with fetch flag set.
16112 (collect_register_as_string): New function.
16113 * regcache.h: Update.
16114 * remote-utils.c (putpkt): Flush after debug output and use
16116 Handle input interrupts while waiting for an ACK.
16117 (input_interrupt): Use signal_pid method.
16118 (getpkt): Flush after debug output and use stderr.
16119 (outreg): Use collect_register_as_string.
16120 (new_thread_notify, dead_thread_notify): New functions.
16121 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16122 and general_thread.
16123 (look_up_one_symbol): Flush after debug output.
16124 * server.c (step_thread, server_waiting): New variables.
16125 (start_inferior): Don't use signal_pid. Update call to mywait.
16126 (attach_inferior): Update call to mywait.
16127 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16128 (main): Don't fetch/store registers explicitly. Use
16129 set_desired_inferior. Support proposed ``Hs'' packet. Update
16131 * server.h: Update.
16132 (struct inferior_list, struct_inferior_list_entry): New.
16133 * target.c (set_desired_inferior): New.
16134 (write_inferior_memory): Constify.
16135 (mywait): New function.
16136 * target.h: Update.
16137 (struct target_ops): New signal_pid method.
16138 (mywait): Removed macro, added prototype.
16140 * linux-low.h (regset_func): Removed.
16141 (regset_fill_func, regset_store_func): New.
16142 (enum regset_type): New.
16143 (struct regset_info): Add type field. Use new operation types.
16144 (struct linux_target_ops): stop_pc renamed to get_pc.
16145 Add decr_pc_after_break and breakpoint_at.
16146 (get_process, get_thread_proess, get_process_thread)
16147 (strut process_info, all_processes, linux_attach_lwp)
16148 (thread_db_init): New.
16150 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16151 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16152 (the_low_target): Add new members.
16153 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16154 (i386_store_fpxregset): Constify.
16155 (target_regsets): Add new kind identifier.
16156 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16157 (i386_set_pc): Add debugging.
16158 (i386_breakpoint_at): New function.
16159 (the_low_target): Add new members.
16160 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16161 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16162 (mips_breakpoint_at): New.
16163 (the_low_target): Add new members.
16164 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16165 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16166 (the_low_target): Add new members.
16167 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16168 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16169 (the_low_target): Add new members.
16170 * linux-x86-64-low.c (target_regsets): Add new kind
16173 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16175 From Martin Pool <mbp@samba.org>:
16176 * server.c (gdbserver_usage): New function.
16179 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16181 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16182 stop_at -> stop_pc.
16184 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16186 * Makefile.in: Remove obsolete code.
16188 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16190 * linux-low.c (regsets_fetch_inferior_registers),
16191 (regsets_store_inferior_registers): Removed cast to int from
16193 * regcache.h: Added declaration of struct inferior_info.
16195 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16197 * inferiors.c (struct inferior_info): Add regcache_data.
16198 (add_inferior): Call create_register_cache.
16199 (clear_inferiors): Call free_register_cache.
16200 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16201 * regcache.c (struct inferior_regcache_data): New.
16202 (registers): Remove.
16203 (get_regcache): New function.
16204 (create_register_cache, free_register_cache): New functions.
16205 (set_register_cache): Don't initialize the register cache here.
16206 (registers_to_string, registers_from_string, register_data): Call
16208 * regcache.h: Add prototypes.
16209 * server.h: Likewise.
16211 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16213 * mem-break.c: New file.
16214 * mem-break.h: New file.
16215 * Makefile.in: Add mem-break.o rule; update server.h
16217 * inferiors.c (struct inferior_info): Add target_data
16219 (clear_inferiors): Free target_data member if set.
16220 (inferior_target_data, set_inferior_target_data): New functions.
16221 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16222 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16223 * linux-low.c (linux_bp_reinsert): New variable.
16224 (struct inferior_linux_data): New.
16225 (linux_create_inferior): Use set_inferior_target_data.
16226 (linux_attach): Likewise. Call add_inferior.
16227 (linux_wait_for_one_inferior): New function.
16228 (linux_wait): Call it.
16229 (linux_write_memory): Add const.
16230 (initialize_low): Call set_breakpoint_data.
16231 * linux-low.h (struct linux_target_ops): Add breakpoint
16233 * server.c (attach_inferior): Remove extra add_inferior
16235 * server.h: Include mem-break.h. Update inferior.c
16237 * target.c (read_inferior_memory)
16238 (write_inferior_memory): New functions.
16239 * target.h (read_inferior_memory)
16240 (write_inferior_memory): Change macros to prototypes.
16241 (struct target_ops): Update comments. Add const to write_memory
16244 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16246 * linux-low.c (usr_store_inferior_registers): Support
16247 registers which are allowed to fail to store.
16248 * linux-low.h (linux_target_ops): Likewise.
16249 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16250 (ppc_cannot_store_register): FPSCR may not be storable.
16252 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16254 * server.h: Include <string.h> if HAVE_STRING_H.
16255 * ChangeLog: Correct paths in last ChangeLog entry.
16257 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16259 * linux-low.h: Remove obsolete prototypes.
16260 (struct linux_target_ops): New.
16261 (extern the_low_target): New.
16262 * linux-low.c (num_regs, regmap): Remove declarations.
16263 (register_addr): Use the_low_target explicitly.
16264 (fetch_register): Likewise.
16265 (usr_fetch_inferior_registers): Likewise.
16266 (usr_store_inferior_registers): Likewise.
16267 * linux-arm-low.c (num_regs): Remove.
16268 (arm_num_regs): Define.
16269 (arm_regmap): Renamed from regmap, made static.
16270 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16272 (arm_cannot_store_register): Renamed from cannot_store_register,
16274 (the_low_target): New.
16275 * linux-i386-low.c (num_regs): Remove.
16276 (i386_num_regs): Define.
16277 (i386_regmap): Renamed from regmap, made static.
16278 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16280 (i386_cannot_store_register): Renamed from cannot_store_register,
16282 (the_low_target): New.
16283 * linux-ia64-low.c (num_regs): Remove.
16284 (ia64_num_regs): Define.
16285 (ia64_regmap): Renamed from regmap, made static.
16286 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16288 (ia64_cannot_store_register): Renamed from cannot_store_register,
16290 (the_low_target): New.
16291 * linux-m68k-low.c (num_regs): Remove.
16292 (m68k_num_regs): Define.
16293 (m68k_regmap): Renamed from regmap, made static.
16294 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16296 (m68k_cannot_store_register): Renamed from cannot_store_register,
16298 (the_low_target): New.
16299 * linux-mips-low.c (num_regs): Remove.
16300 (mips_num_regs): Define.
16301 (mips_regmap): Renamed from regmap, made static.
16302 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16304 (mips_cannot_store_register): Renamed from cannot_store_register,
16306 (the_low_target): New.
16307 * linux-ppc-low.c (num_regs): Remove.
16308 (ppc_num_regs): Define.
16309 (ppc_regmap): Renamed from regmap, made static.
16310 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16312 (ppc_cannot_store_register): Renamed from cannot_store_register,
16314 (the_low_target): New.
16315 * linux-s390-low.c (num_regs): Remove.
16316 (s390_num_regs): Define.
16317 (s390_regmap): Renamed from regmap, made static.
16318 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16320 (s390_cannot_store_register): Renamed from cannot_store_register,
16322 (the_low_target): New.
16323 * linux-sh-low.c (num_regs): Remove.
16324 (sh_num_regs): Define.
16325 (sh_regmap): Renamed from regmap, made static.
16326 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16328 (sh_cannot_store_register): Renamed from cannot_store_register,
16330 (the_low_target): New.
16331 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16332 (the_low_target): New.
16334 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16336 * Makefile.in: Add stamp-h target.
16337 * configure.in: Create stamp-h.
16338 * configure: Regenerated.
16340 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16342 * inferiors.c: New file.
16343 * target.c: New file.
16344 * target.h: New file.
16345 * Makefile.in: Add target.o and inferiors.o. Update
16347 * linux-low.c (inferior_pid): New static variable,
16348 moved from server.c.
16349 (linux_create_inferior): Renamed from create_inferior.
16350 Call add_inferior. Return 0 on success instead of a PID.
16351 (linux_attach): Renamed from myattach.
16352 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16353 (linux_thread_alive): Renamed from mythread_alive.
16354 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16356 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16357 (regsets_store_inferior_registers): Correct error message.
16358 Add missing ``return 0''.
16359 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16360 (linux_store_registers): Renamed from store_inferior_registers.
16361 (linux_read_memory): Renamed from read_inferior_memory.
16362 (linux_write_memory): Renamed from write_inferior_memory.
16363 (linux_target_ops): New structure.
16364 (initialize_low): Call set_target_ops ().
16365 * remote-utils.c (unhexify): New function.
16366 (hexify): New function.
16367 (input_interrupt): Send signals to ``signal_pid''.
16368 * server.c (inferior_pid): Remove.
16369 (start_inferior): Update create_inferior call.
16370 (attach_inferior): Call add_inferior.
16371 (handle_query): New function.
16372 (main): Call handle_query for `q' packets.
16373 * server.h: Include "target.h". Remove obsolete prototypes.
16374 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16376 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16378 * Makefile.in: Add WARN_CFLAGS. Update configury
16380 * configure.in: Check for <string.h>
16381 * configure: Regenerate.
16382 * config.in: Regenerate.
16383 * gdbreplay.c: Include needed system headers.
16384 (remote_open): Remove strchr prototype.
16385 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16386 * regcache.c (supply_register): Change buf argument to const void *.
16387 (supply_register_by_name): Likewise.
16388 (collect_register): Change buf argument to void *.
16389 (collect_register_by_name): Likewise.
16390 * regcache.h: Add missing prototypes.
16391 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16392 * server.c (handle_query): New function.
16393 (attached): New static variable, moved out of main.
16394 (main): Quiet longjmp clobber warnings.
16395 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16396 * utils.c (error): Remove NORETURN.