1 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3 * tdesc.c (tdesc_architecture_name): Add new function.
4 (tdesc_osabi_name): Likewise.
5 (tdesc_get_features_xml): Use new functions.
7 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9 * tdesc.c (tdesc_create_flags): Remove.
10 (tdesc_add_flag): Likewise.
11 (tdesc_named_type): Likewise.
12 (tdesc_create_union): Likewise.
13 (tdesc_create_struct): Likewise.
14 (tdesc_create_vector): Likewise.
15 (tdesc_add_bitfield): Likewise.
16 (tdesc_add_field): Likewise.
17 (tdesc_set_struct_size): Likewise.
19 2018-04-18 Alan Hayward <alan.hayward@arm.com>
21 * tdesc.c (~target_desc): Remove implictly deleted items.
22 (init_target_desc): Iterate all features.
23 (tdesc_get_features_xml): Use vector.
24 (tdesc_create_feature): Create feature.
25 * tdesc.h (tdesc_feature) Remove
26 (target_desc): Add features.
28 2018-04-18 Alan Hayward <alan.hayward@arm.com>
30 * Makefile.in: Add common/tdesc.c
31 * tdesc.c (init_target_desc): init all reg_defs from register
33 (tdesc_create_reg): Create tdesc_reg.
34 * tdesc.h (tdesc_feature): Add register vector.
36 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
38 * tdesc.h (struct target_desc) <features>: Change type to
39 std::vector<std::string>.
40 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
42 (tdesc_get_features_xml): Likewise.
43 (tdesc_create_feature): Likewise.
45 2018-03-26 Alan Hayward <alan.hayward@arm.com>
47 * regcache.c (find_register_by_number): Return a ref.
48 (find_regno): Use references.
49 (register_size): Likewise.
50 (register_data): Likewise.
51 * tdesc.c (target_desc::~target_desc): Remove free calls.
52 (target_desc::operator==): Use std::vector compare.
53 (init_target_desc): Use reference.
54 (tdesc_create_reg): Use reg constructors.
55 * tdesc.h (struct target_desc): Replace pointer with object.
57 2018-03-23 Alan Hayward <alan.hayward@arm.com>
59 * regcache.c (find_register_by_number): Make static.
60 (find_regno): Use find_register_by_number
61 * regcache.h (struct reg): Remove declaration.
63 2018-03-23 Alan Hayward <alan.hayward@arm.com>
65 * tdesc.c (target_desc::~target_desc): Move to here.
66 (target_desc::operator==): Likewise.
67 * tdesc.h (target_desc::~target_desc): Move from here.
68 (target_desc::operator==): Likewise.
70 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
72 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
74 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
76 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
78 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
79 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
80 and init_registers_s390_gs_linux64.
82 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
84 * linux-s390-low.c (s390_fill_gs): Remove function.
85 (s390_fill_gsbc): Remove function.
86 (s390_regsets): Set fill functions for the guarded storage regsets
89 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
91 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
92 the word size. Add comment.
93 (s390_get_wordsize): New function.
94 (s390_arch_setup): No longer select a temporary tdesc to fetch the
95 pswm with it. Instead, use s390_get_wordsize to determine the
96 word size first and derive the correct tdesc from that directly.
98 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
100 * Makefile.in: Include silent-rules.mk.
101 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
102 (COMPILE): Add ECHO_CXX.
103 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
104 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
105 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
106 (version-generated.c): Add ECHO_GEN.
107 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
108 (IPAGENT_COMPILE): Add ECHO_CXX.
109 (%-generated.c): Add ECHO_REGDAT.
111 2018-03-14 Tom Tromey <tom@tromey.com>
114 * ax.c (ax_printf): Special case for NULL.
116 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
118 * linux-low.c (linux_qxfer_libraries_svr4): Use
119 xml_escape_text_append.
121 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
123 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
125 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
127 * server.c (handle_general_set): Remove unnecessary xstrdup.
129 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
131 * server.c (parse_debug_format_options): Adjust to
132 delim_string_to_char_ptr_vec changes.
133 * thread-db.c (thread_db_load_search): Adjust to
134 dirnames_to_char_ptr_vec changes.
136 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
138 * target.h (target_enable_btrace, target_disable_btrace)
139 (target_read_btrace, target_read_btrace_conf): Turn macro into
140 inline function. Throw error if target method is not defined.
141 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
142 check for btrace target method. Be prepared to handle exceptions
143 from btrace target methods.
145 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
147 * server.c (captured_main): Change order of error message printed
148 when the current working directory cannot be found.
150 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
152 * server.c: Include "filenames.h" and "pathstuff.h".
153 (program_name): Delete variable.
154 (program_path): New anonymous class.
155 (get_exec_wrapper): Use "program_path" instead of
157 (handle_v_run): Likewise.
158 (captured_main): Likewise.
159 (process_serial_event): Likewise.
161 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
163 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
164 (OBJS): Add "pathstuff.o".
165 * server.c (current_directory): New global variable.
166 (captured_main): Initialize "current_directory".
168 2018-02-26 Alan Hayward <alan.hayward@arm.com>
170 * tdesc.c: Use common/tdesc.h.
173 2018-02-20 Alan Hayward <alan.hayward@arm.com>
174 Simon Marchi <simon.marchi@ericsson.com>
176 * Makefile.in: Switch order of make rules.
178 2018-02-19 Alan Hayward <alan.hayward@arm.com>
180 * Makefile.in: Add common directory in build.
181 * configure.ac: Add common reference.
182 * configure: Regenerate.
184 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
186 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
187 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
188 * spu-low.c (spu_target_ops): Likewise.
189 * win32-low.c (win32_target_ops): Likewise.
190 * server.c (supported_btrace_packets): Report packets unconditionally.
191 * target.h (target_ops) <supports_btrace>: Remove.
192 (target_supports_btrace): Remove.
194 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
196 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
197 (handle_btrace_disable): Change return type to void. Use exceptions
199 (handle_btrace_general_set): Catch exception and copy message to
202 2018-02-08 Tom Tromey <tom@tromey.com>
204 * linux-low.c (install_software_single_step_breakpoints): Use
206 * inferiors.c (make_cleanup_restore_current_thread): Remove.
207 (do_restore_current_thread_cleanup): Remove.
208 * gdbthread.h (make_cleanup_restore_current_thread): Don't
211 2018-02-08 Tom Tromey <tom@tromey.com>
213 * mem-break.c (set_raw_breakpoint_at): Use
214 gdb::unique_xmalloc_ptr.
216 2018-01-30 Pedro Alves <palves@redhat.com>
219 * target.c (target_terminal::terminal_state): Rename to ...
220 (target_terminal::m_terminal_state): ... this.
222 2018-01-19 James Clarke <jrtc27@jrtc27.com>
224 * linux-low.c (handle_extended_wait): Surround call to
225 thread_db_notice_clone with #ifdef USE_THREAD_DB.
227 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
229 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
230 linux_ptrace_attach_fail_reason_string now returning an
232 (linux_attach): Likewise.
233 * thread-db.c (attach_thread): Likewise.
235 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
238 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
239 checking for fs_base/gs_base fields in struct user_regs_struct.
240 * configure: Regenerate.
242 2018-01-16 Yao Qi <yao.qi@linaro.org>
245 * linux-low.c (fetch_register): Call supply_register instead of
248 2018-01-08 Yao Qi <yao.qi@linaro.org>
249 Simon Marchi <simon.marchi@ericsson.com>
251 * Makefile.in (OBS): Remove selftest.o.
252 * configure.ac: Set srv_selftest_objs if $development is true.
253 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
254 * configure: Re-generated.
255 * server.c (captured_main): Wrap variable selftest_filter with
258 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
260 * server.c (parse_debug_format_options): Return std::string.
261 (handle_monitor_command, captured_main): Adjust.
263 2018-01-05 Pedro Alves <palves@redhat.com>
266 * server.c (captured_main): Pass quiet=false to
267 save_original_signals_state.
269 2018-01-01 Joel Brobecker <brobecker@adacore.com>
271 * gdbreplay.c (gdbreplay_version): Update copyright year in
273 * server.c (gdbserver_version): Likewise.
275 2017-12-08 Tom Tromey <tom@tromey.com>
277 * ax.c (ax_printf): Update.
279 2017-12-07 Yao Qi <yao.qi@linaro.org>
281 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
282 aarch64_linux_read_description.
283 * linux-amd64-ipa.c (idx2mask): New array.
284 (get_ipa_tdesc): Move idx2mask out.
285 (initialize_low_tracepoint): Initialize target descriptions.
286 * linux-i386-ipa.c (idx2mask): New array.
287 (get_ipa_tdesc): Move idx2mask out.
288 (initialize_low_tracepoint): Initialize target descriptions.
290 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
292 * tdesc.c (struct tdesc_type): Change return type.
293 (tdesc_add_flag): Change parameter type.
294 (tdesc_add_bitfield): Likewise.
295 (tdesc_add_field): Likewise.
296 (tdesc_set_struct_size): Likewise.
298 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
300 * regcache.c (registers_to_string): Remove unused variable.
302 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
304 * inferiors.c (for_each_inferior_with_data): Remove.
305 * inferiors.h (for_each_inferior_with_data): Remove.
306 * server.c (handle_qxfer_threads_worker): Change parameter type.
307 (handle_qxfer_threads_proper): Use for_each_thread.
309 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
311 * inferiors.c (for_each_inferior): Remove.
312 (clear_inferiors): Use for_each_thread.
313 * inferiors.h (for_each_inferior): Remove.
314 * linux-low.c (linux_wait_for_event_filtered): Use
316 (linux_stabilize_threads): Likewise.
317 * regcache.c (regcache_release): Likewise.
318 * server.c (gdb_wants_all_threads_stopped): Likewise.
319 (clear_pending_status_callback): Remove.
320 (handle_status): Use for_each_thread.
321 (captured_main): Likewise.
322 * win32-low.c (child_init_thread_list): Likewise.
323 (win32_clear_inferiors): Likewise.
324 (fake_breakpoint_event): Likewise.
326 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
328 * inferiors.h (find_inferior): Remove.
329 * inferiors.c (find_inferior): Remove.
331 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
333 * linux-low.c (resume_status_pending_p): Update comment.
334 (need_step_over_p): Update comment.
336 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
338 * linux-low.c (proceed_one_lwp): Return void, change parameter
340 (unsuspend_and_proceed_one_lwp): Likewise.
341 (proceed_all_lwps): Use for_each_thread.
342 (unstop_all_lwps): Likewise.
344 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
346 * linux-low.c (linux_resume_one_thread): Return void, take
348 (linux_resume): Use for_each_thread.
350 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
352 * linux-low.c (send_sigstop_callback): Return void, change
353 parameter type. Rename to...
354 (send_sigstop): ... this.
355 (suspend_and_send_sigstop_callback): Return void, change parameter
357 (suspend_and_send_sigstop): ... this.
358 (stop_all_lwps): Use for_each_thread.
360 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
362 * linux-low.c (lwp_running): Return bool, remove unused
364 (linux_stabilize_threads): Use find_thread.
366 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
368 * linux-low.c (select_singlestep_lwp_callback): Remove.
369 (count_events_callback): Remove.
370 (select_event_lwp_callback): Remove.
371 (select_event_lwp): Use find_thread/for_each_thread.
373 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
375 * linux-low.c (not_stopped_callback): Return bool, take filter
377 (linux_wait_for_event_filtered): Use find_thread.
378 (linux_wait_1): Likewise.
380 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
382 * linux-low.c (same_lwp): Remove.
383 (find_lwp_pid): Use find_thread.
385 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
387 * linux-low.c (delete_lwp_callback): Remove.
388 (linux_mourn): Use for_each_thread.
390 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
392 * linux-low.c (linux_detach_lwp_callback): Return void, remove
393 args parameter, don't check for pid.
394 (linux_detach): Use for_each_thread.
396 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
398 * linux-low.c (struct counter): Remove.
399 (second_thread_of_pid_p): Remove.
400 (last_thread_of_process_p): Use find_thread.
402 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
404 * inferiors.c (find_inferior_in_random): Remove.
405 * inferiors.h (find_inferior_in_random): Remove.
406 * linux-low.c (status_pending_p_callback): Return bool, accept
407 parameter ptid directly.
408 (linux_wait_for_event_filtered): Use find_thread_in_random.
409 (linux_wait_1): Likewise.
411 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
413 * inferiors.c (find_inferior_id): Remove.
414 (find_thread_ptid): Move implemention from find_inferior_id to
416 * inferiors.h (find_inferior_id): Remove.
417 * server.c (handle_status): Use find_thread_ptid.
418 (process_serial_event): Likewise.
419 * thread-db.c (find_one_thread): Likewise.
420 (thread_db_thread_handle): Likewise.
421 * win32-low.c (thread_rec): Likewise.
422 (child_delete_thread): Likewise.
423 (win32_thread_alive): Likewise.
424 (get_child_debug_event): Likewise.
426 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
428 * linux-mips-low.c (update_watch_registers_callback): Return
429 void, remove pid_p parameter, don't check for pid.
430 (mips_insert_point, mips_remove_point): Use for_each_thread.
432 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
434 * lynx.low (lynx_delete_thread_callback): Remove.
435 (lynx_mourn): Use for_each_thread.
437 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
439 * regcache.c (regcache_invalidate_one): Remove.
440 (regcache_invalidate_pid): use for_each_thread.
442 2017-11-26 Tom Tromey <tom@tromey.com>
444 * linux-low.c (linux_create_inferior): Update.
446 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
448 * spu-low.c (spu_create_inferior): Fix typo in argument name.
450 2017-11-24 Alan Hayward <alan.hayward@arm.com>
452 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
453 * linux-aarch64-low.c (initialize_low_arch): Call init func.
454 * linux-aarch64-tdesc-selftest.c: New file.
455 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
457 2017-11-24 Alan Hayward <alan.hayward@arm.com>
459 * configure.srv: Add new file.
460 * linux-aarch64-low.c (initialize_low_arch): Call init func.
461 * linux-aarch64-tdesc-selftest.c: New file.
462 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
464 2017-11-24 Alan Hayward <alan.hayward@arm.com>
466 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
467 * linux-aarch64-low.c (initialize_low_arch): Remove init.
468 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
470 2017-11-24 Alan Hayward <alan.hayward@arm.com>
472 * configure.srv: Add new files.
473 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
474 aarch64_linux_read_description.
475 * linux-aarch64-low.c (aarch64_linux_read_description):
476 Merge with aarch64_arch_setup.
477 (aarch64_arch_setup): Call aarch64_linux_read_description.
478 * linux-aarch64-tdesc.c: New file.
479 * linux-aarch64-tdesc.h: New file.
481 2017-11-24 Yao Qi <yao.qi@linaro.org>
483 * configure.srv: Set $srv_regobj for tic6x-linux.
484 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
485 (tic6x_read_description): Move some code to tic6x_arch_setup.
486 (tic6x_tdesc_test): New function.
487 (initialize_low_arch): Call selftests::register_test.
489 2017-11-22 Yao Qi <yao.qi@linaro.org>
491 * remote-utils.c (prepare_resume_reply): Use memcpy.
493 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
495 * linux-low.c (kill_one_lwp_callback): Return void, take
496 argument directly, don't filter on pid.
497 (linux_kill): Use for_each_thread.
499 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
501 * linux-low.c (need_step_over_p): Return bool, remove dummy
503 (linux_resume, proceed_all_lwps): Use find_thread.
505 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
507 * linux-low.c (resume_status_pending_p): Return bool, remove
509 (linux_resume): Use find_thread.
511 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
513 * linux-low.c (struct thread_resume_array): Remove.
514 (linux_set_resume_request): Return void, take arguments
516 (linux_resume): Use for_each_thread.
518 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
520 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
521 return bool, remove data argument.
522 (linux_stabilize_threads): Use find_thread.
524 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
526 * linux-low.c (unsuspend_one_lwp): Remove.
527 (unsuspend_all_lwps): Use for_each_thread, inline code from
530 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
532 * gdbthread.h (find_thread): Add overload with ptid_t filter.
533 * linux-low.c (struct iterate_over_lwps_args): Remove.
534 (iterate_over_lwps_filter): Remove.
535 (iterate_over_lwps): Use find_thread.
537 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
539 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
540 (linux_handle_new_gdb_connection): Use for_each_thread, inline
541 code from reset_lwp_ptrace_options_callback.
543 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
545 * linux-arm-low.c (struct update_registers_data): Remove.
546 (update_registers_callback): Return void, take arguments
547 directly, don't check thread's pid.
548 (arm_insert_point, arm_remove_point): Use for_each_thread.
550 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
552 * win32-low.c (continue_one_thread): Return void, take argument
554 (child_continue): Use for_each_thread.
556 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
558 * win32-i386-low.c (update_debug_registers_callback): Rename
560 (update_debug_registers): ... this, return void, remove pid_p arg.
561 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
563 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
565 * inferiors.h (struct process_info): Add constructor, initialize
567 <syscalls_to_catch>: Change type to std::vector<int>.
568 * inferiors.c (add_process): Allocate process_info with new.
569 (remove_process): Free process_info with delete.
570 * linux-low.c (handle_extended_wait): Adjust.
571 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
572 * server.c (handle_general_set): Adjust.
574 2017-11-16 Pedro Alves <palves@redhat.com>
576 * remote-utils.c (remote_close): Block SIGIO signals instead of
577 uninstalling the SIGIO handler.
579 2017-11-16 Alan Hayward <alan.hayward@arm.com>
581 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
583 2017-11-16 Yao Qi <yao.qi@linaro.org>
585 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
586 (tic6x_store_gregset): Likewise.
587 (tic6x_usrregs_info): Move it up.
589 2017-11-15 Alan Hayward <alan.hayward@arm.com>
591 * Makefile.in: Update arch rules.
592 * configure.srv: Explicitly mark arch/ files.
594 2017-11-13 Andreas Schwab <schwab@suse.de>
596 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
598 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
600 2017-11-06 Pedro Alves <palves@redhat.com>
602 * config.in, configure: Regenerate.
604 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
606 * target.c (struct thread_search): Remove.
607 (thread_search_callback): Remove.
608 (prepare_to_access_memory): Use for_each_thread instead of
609 find_inferior. Inline code from thread_search_callback.
611 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
613 * server.c (struct visit_actioned_threads_data): Remove.
614 (visit_actioned_threads): Change prototype to take arguments
616 (resume): Use find_thread instead of find_inferior.
618 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
620 * server.c (queue_stop_reply_callback): Change prototype, return
622 (find_status_pending_thread_callback): Remove.
623 (handle_status): Replace find_inferior with find_thread and
626 2017-10-25 Alan Hayward <alan.hayward@arm.com>
628 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
630 (aarch64_store_gregset): Likewise.
631 (aarch64_fill_fpregset): Likewise.
632 (aarch64_store_fpregset): Likewise.
634 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
636 * gdbthread.h (find_thread, for_each_thread): New functions.
637 * inferiors.c (thread_of_pid): Remove.
638 (find_any_thread_of_pid): Use find_thread.
639 * linux-low.c (num_lwps): Use for_each_thread.
641 2017-10-17 Yao Qi <yao.qi@linaro.org>
643 * Makefile.in: Remove one rule.
644 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
646 2017-10-17 Yao Qi <yao.qi@linaro.org>
648 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
649 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
651 2017-10-17 Yao Qi <yao.qi@linaro.org>
653 * configure.srv: Rename arm.o with arch/arm.o.
655 2017-10-17 Yao Qi <yao.qi@linaro.org>
657 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
658 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
659 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
660 (arch-i386.o, arch-amd64.o): Remove rules.
661 (arch/%.o): New rule.
662 Update POSTCOMPILE and COMPILE.pre.
663 * configure.ac: Invoke AC_CONFIG_COMMANDS.
664 * configure: Re-generated.
665 * configure.srv: Replace arch-i386.o with arch/i386.o.
666 Replace arch-amd64.o with arch/amd64.o.
668 2017-10-16 Yao Qi <yao.qi@linaro.org>
670 * configure: Regenerated.
672 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
674 * inferiors.h: (struct inferior_list): Remove.
675 (struct inferior_list_entry); Remove.
676 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
677 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
678 get_first_inferior): Remove.
679 (for_each_inferior, for_each_inferior_with_data, find_inferior,
680 find_inferior_id, find_inferior_in_random): Change signature.
681 * inferiors.c (all_threads): Change type to
682 std::list<thread_info *>.
683 (get_thread): Remove macro.
684 (find_inferior, find_inferior_id): Change signature, implement
686 (find_inferior_in_random): Change signature, implement using
687 find_thread_in_random.
688 (for_each_inferior, for_each_inferior_with_data): Change
689 signature, implement using for_each_thread.
690 (add_inferior_to_list, remove_inferior): Remove.
691 (add_thread, get_first_thread, thread_of_pid,
692 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
693 (get_first_inferior, one_inferior_p, clear_inferior_list):
695 (clear_inferiors, get_thread_process): Update.
696 * gdbthread.h: Include <list>.
697 (struct thread_info) <entry>: Remove field.
699 (all_threads): Change type to std::list<thread_info *>.
700 (get_first_inferior): Add doc.
701 (find_thread, for_each_thread, find_thread_in_random): New
703 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
704 * linux-arm-low.c (update_registers_callback): Update.
705 * linux-low.c (second_thread_of_pid_p): Update.
706 (kill_one_lwp_callback, linux_detach_lwp_callback,
707 delete_lwp_callback, status_pending_p_callback, same_lwp,
708 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
709 iterate_over_lwps, not_stopped_callback,
710 resume_stopped_resumed_lwps, count_events_callback,
711 select_singlestep_lwp_callback, select_event_lwp_callback,
712 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
713 suspend_and_send_sigstop_callback, wait_for_sigstop,
714 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
715 lwp_running, linux_set_resume_request, resume_status_pending_p,
716 need_step_over_p, start_step_over, linux_resume_one_thread,
717 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
718 reset_lwp_ptrace_options_callback): Update.
719 * linux-mips-low.c (update_watch_registers_callback): Update.
720 * regcache.c (regcache_invalidate_one, regcache_invalidate):
722 (free_register_cache_thread_one): Remove.
723 (regcache_release): Update.
724 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
725 handle_qxfer_threads_worker): Update.
726 (handle_query): Update, use list iterator.
727 (visit_actioned_threads, handle_pending_status,
728 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
729 clear_pending_status_callback, set_pending_status_callback,
730 find_status_pending_thread_callback, handle_status,
731 process_serial_event): Update.
732 * target.c (thread_search_callback): Update.
733 * thread-db.c (thread_db_get_tls_address): Update.
734 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
736 * win32-i386-low.c (update_debug_registers_callback): Update.
737 * win32-low.c (delete_thread_info, child_delete_thread,
738 continue_one_thread, suspend_one_thread,
739 get_child_debug_event): Adjust.
741 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
743 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
744 * inferiors.h: Include <list>.
745 (struct process_info) <entry>: Remove field.
747 (pid_of): Change macro to function.
748 (ptid_of, lwpid_of): Remove macro.
749 (all_processes): Change type to std::list<process_info *>.
750 (ALL_PROCESSES): Remove macro.
751 (for_each_process, find_process): New function.
752 * inferiors.c (all_processes): Change type to
753 std::list<process_info *>.
754 (find_thread_process): Adjust.
755 (add_process): Likewise.
756 (remove_process): Likewise.
757 (find_process_pid): Likewise.
758 (get_first_process): Likewise.
759 (started_inferior_callback): Remove.
760 (have_started_inferiors_p): Adjust.
761 (attached_inferior_callback): Remove.
762 (have_attached_inferiors_p): Adjust.
763 * linux-low.c (check_zombie_leaders): Likewise.
764 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
765 (x86_linux_update_xmltarget): Adjust.
766 * server.c (handle_query): Likewise.
767 (gdb_reattached_process): Remove.
768 (handle_status): Adjust.
769 (kill_inferior_callback): Likewise.
770 (detach_or_kill_inferior): Remove.
771 (print_started_pid): Likewise.
772 (print_attached_pid): Likewise.
773 (detach_or_kill_for_exit): Update.
774 (process_serial_event): Likewise.
775 * linux-arm-low.c (arm_new_fork): Likewise.
777 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
779 * dll.h: Include <list>.
780 (struct dll_info): Add constructor.
781 <entry>: Remove field.
782 (all_dlls): Change type to std::list<dll_info>.
783 * dll.c: Include <algorithm>.
784 (get_dll): Remove macro.
785 (all_dlls): Change type to std::list<dll_info *>.
786 (free_one_dll): Remove.
787 (match_dll): Likewise.
788 (loaded_dll): Adjust.
789 (unloaded_dll): Adjust to all_dlls type change, use
790 std::find_if. Inline code from match_dll.
791 (clear_dlls): Adjust to all_dlls type change.
792 * server.c (emit_dll_description): Remove.
793 (handle_qxfer_libraries): Adjust to all_dlls type change,
794 integrate emit_dll_description's functionality.
796 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
798 * linux-low.h (struct linux_target_ops) <delete_process>: New
800 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
801 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
802 (struct linux_target_ops): Add delete_process callback.
803 * linux-arm-low.c (arm_delete_process): New.
804 (struct linux_target_ops): Add delete_process callback.
805 * linux-bfin-low.c (struct linux_target_ops): Likewise.
806 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
807 * linux-m32r-low.c (struct linux_target_ops): Likewise.
808 * linux-mips-low.c (mips_linux_delete_process): New.
809 (struct linux_target_ops): Add delete_process callback.
810 * linux-ppc-low.c (struct linux_target_ops): Likewise.
811 * linux-s390-low.c (struct linux_target_ops): Likewise.
812 * linux-sh-low.c (struct linux_target_ops): Likewise.
813 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
814 * linux-tile-low.c (struct linux_target_ops): Likewise.
815 * linux-x86-low.c (x86_linux_delete_process): New.
816 (struct linux_target_ops): Add delete_process callback.
817 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
819 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
821 * linux-aarch64-low.c (the_low_target): Add thread delete
823 * linux-arm-low.c (arm_delete_thread): New function.
824 (the_low_target): Add thread delete callback.
825 * linux-bfin-low.c (the_low_target): Likewise.
826 * linux-crisv32-low.c (the_low_target): Likewise.
827 * linux-low.c (delete_lwp): Invoke delete_thread callback if
829 * linux-low.h (struct linux_target_ops) <delete_thread>: New
831 * linux-m32r-low.c (the_low_target): Add thread delete callback.
832 * linux-mips-low.c (mips_linux_delete_thread): New function.
833 (the_low_target): Add thread delete callback.
834 * linux-ppc-low.c (the_low_target): Likewise.
835 * linux-s390-low.c (the_low_target): Likewise.
836 * linux-sh-low.c (the_low_target): Likewise.
837 * linux-tic6x-low.c (the_low_target): Likewise.
838 * linux-tile-low.c (the_low_target): Likewise.
839 * linux-x86-low.c (the_low_target): Likewise.
840 * linux-xtensa-low.c (the_low_target): Likewise.
842 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
844 * win32-low.c: Include "common-inferior.h".
846 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
848 * inferiors.c (set_inferior_cwd): New function.
849 * server.c (handle_general_set): Handle QSetWorkingDir packet.
850 (handle_query): Inform that QSetWorkingDir is supported.
851 * win32-low.c (create_process): Pass the inferior's cwd to
854 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
856 * inferiors.c (current_inferior_cwd): New global variable.
857 (get_inferior_cwd): New function.
858 * inferiors.h (struct process_info) <cwd>: New field.
860 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
862 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
863 (OBS): Add gdb_tilde_expand.o.
865 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
867 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
868 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
870 2017-09-29 Pedro Alves <palves@redhat.com>
872 * ax.c (gdb_parse_agent_expr): Constify.
873 * ax.h (gdb_parse_agent_expr): Constify.
874 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
876 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
877 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
878 * remote-utils.h (read_ptid): Constify.
879 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
880 (process_point_options, process_serial_event): Constify.
881 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
882 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
883 (cmd_qtbuffer): Constify.
885 2017-09-29 Pedro Alves <palves@redhat.com>
887 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
890 2017-09-29 Pedro Alves <palves@redhat.com>
892 * linux-low.c (handle_extended_wait): Pass parent thread instead
893 of process to thread_db_notice_clone.
894 * linux-low.h (thread_db_notice_clone): Replace parent process
895 parameter with parent thread parameter.
896 * thread-db.c (find_one_thread): Add comment.
897 (thread_db_notice_clone): Replace parent process parameter with
898 parent thread parameter. Temporarily switch to the parent thread.
900 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
902 * gdbthread.h: Include "common-gdbthread.h".
903 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
904 "if" when validating the ptid.
905 * remote-utils.c: Include "gdbthread.h".
906 (prepare_resume_reply): Use "switch_to_thread".
907 * target.c (done_accessing_memory): Likewise.
909 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
911 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
912 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
913 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
914 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
915 s390x-gs-linux64-ipa.o to ipa_obj.
916 * linux-s390-low.c (HWCAP_S390_GS): New define.
917 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
919 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
920 (s390_arch_setup): Check for guarded-storage support and choose
922 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
923 init_registers_s390x_gs_linux64.
924 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
926 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
927 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
929 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
931 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
933 2017-09-21 Kevin Buettner <kevinb@redhat.com>
935 * linux-low.h (struct lwp_info): Add new field, thread_handle.
936 (thread_db_thread_handle): Declare.
937 * linux-low.c (linux_target_ops): Initialize thread_handle.
938 * server.c (handle_qxfer_threads_worker): Add support for
940 * target.h (struct target_ops): Add new function pointer,
942 (target_thread_handle): Define.
943 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
945 (thread_db_thread_handle): New function.
947 2017-09-21 Kevin Buettner <kevinb@redhat.com>
949 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
950 * linux-low.h (thread_db_notice_clone): Declare.
951 * thread-db.c (thread_db_notice_clone): New function.
953 2017-09-21 Pedro Alves <palves@redhat.com>
955 * server.c (gdb_read_memory, handle_status, process_serial_event)
956 (handle_serial_event, handle_target_event): Adjust to
957 set_desired_thread prototype change.
958 * target.c (set_desired_thread): Remove 'use_general' parameter
960 * target.h (set_desired_thread): Remove 'use_general' parameter.
962 2017-09-20 Tom Tromey <tom@tromey.com>
964 * target.c (target_terminal::terminal_state): Define.
965 (target_terminal::init): Rename from target_terminal_init.
966 (target_terminal::inferior): Rename from
967 target_terminal_inferior.
968 (target_terminal::ours): Rename from target_terminal_ours.
969 (target_terminal::ours_for_output, target_terminal::info): New.
971 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
973 * server.c (accumulate_file_name_length): Remove.
974 (emit_dll_description): Adjust to std::string change.
975 (handle_qxfer_libraries): Use std::string to hold document.
977 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
979 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
980 return type of xml_escape_text.
981 * server.c (emit_dll_description): Likewise.
983 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
985 * server.c (captured_main): Accept argument for --selftest.
986 Update run_tests call.
987 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
988 when registering selftests.
990 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
992 * regcache.c (get_thread_regcache): Update code to use "std::vector"
993 instead of "VEC" for "target_desc.reg_defs".
994 (regcache_cpy): Likewise.
995 (registers_to_string): Likewise.
996 (registers_from_string): Likewise.
997 (find_regno): Likewise.
998 (supply_regblock): Likewise.
999 (regcache_raw_read_unsigned): Likewise.
1000 * tdesc.c (init_target_desc): Likewise.
1001 (tdesc_create_reg): Likewise.
1002 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1003 (struct target_desc) <reg_defs>: Convert to "std::vector".
1004 (target_desc): Do not initialize "reg_defs".
1005 (~target_desc): Update code to use "std::vector" instead of "VEC"
1006 for "target_desc.reg_defs".
1007 (operator==): Likewise.
1009 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1011 * inferiors.h (thread_to_gdb_id): Remove.
1012 * inferiors.c (thread_to_gdb_id): Remove.
1013 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1014 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1015 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1017 * nto-low.c (nto_fetch_registers, nto_store_registers,
1018 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1020 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1022 * inferiors.h (gdb_id_to_thread_id): Remove.
1023 * inferiors.c (gdb_id_to_thread_id): Remove.
1024 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1025 removal. Move pid declaration closer to where it's used.
1027 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1029 * server.c (handle_detach): New function.
1030 (process_serial_event): Move code out, call handle_detach.
1032 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1034 * server.c (require_running): Rename to ...
1035 (require_running_or_return): ... this ...
1036 (require_running_or_break): ... and this.
1037 (handle_query, process_serial_event): Adjust.
1039 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1041 * linux-low.c (linux_set_resume_request): Remove unused
1044 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1046 * server.c (first_thread_of): Remove.
1047 (process_serial_event): Replace usage of first_thread_of with
1048 find_any_thread_of_pid.
1049 * tracepoint.c (same_process_p): Remove.
1050 (gdb_agent_about_to_close): Replace usage of same_process_p with
1051 find_any_thread_of_pid.
1052 * linux-x86-low.c (same_process_callback): Remove.
1053 (x86_arch_setup_process_callback): Replace usage of
1054 same_process_callback with find_any_thread_of_pid.
1055 * thread-db.c (any_thread_of): Remove.
1056 (switch_to_process): Replace usage of any_thread_of with
1057 find_any_thread_of_pid.
1058 * inferiors.c (thread_pid_matches_callback): Remove.
1059 (find_thread_process): Adjust to use find_any_thread_of_pid.
1061 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1063 * regcache.c (get_thread_regcache): Guard calls to "memset"
1066 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1068 * linux-low.c (handle_extended_wait): Use
1069 "allocate_target_description" instead of "XNEW".
1070 * linux-x86-low.c (initialize_low_arch): Likewise.
1072 2017-09-05 Yao Qi <yao.qi@linaro.org>
1074 * configure.srv (srv_i386_regobj): Remove.
1075 (srv_amd64_regobj): Remove.
1076 (srv_regobj): Set it to "" for x86 non-linux targets.
1077 * linux-x86-tdesc.c (i386_linux_read_description):
1078 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1079 (init_registers_i386): Remove the declaration.
1080 (tdesc_i386): Remove the declaration.
1081 (lynx_i386_arch_setup): Call i386_create_target_description.
1082 * nto-x86-low.c: Likewise.
1083 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1084 [!__x86_64__]: include arch/i386.h.
1085 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1087 2017-09-05 Yao Qi <yao.qi@linaro.org>
1089 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1090 i386/amd64-XXX-linux from it.
1092 2017-09-05 Yao Qi <yao.qi@linaro.org>
1094 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1096 (ipa_amd64_linux_regobj): Remove.
1097 (ipa_x32_linux_regobj): Remove.
1099 2017-09-05 Yao Qi <yao.qi@linaro.org>
1101 * Makefile.in (arch-amd64.o): New rule.
1102 * configure.srv: Append arch-amd64.o.
1103 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1104 (get_ipa_tdesc): Call amd64_linux_read_description.
1105 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1106 and init_registers_amd64_XXX.
1107 * linux-x86-low.c (x86_linux_read_description): Call
1108 amd64_linux_read_description.
1109 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1110 (initialize_low_arch): Don't call init_registers_x32_XXX and
1111 init_registers_amd64_XXX.
1112 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1113 and tdesc_amd64_XXX.
1114 [__x86_64__] (amd64_tdesc_test): New function.
1115 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1116 and init_registers_amd64_XXX.
1117 * linux-x86-tdesc.c: Include arch/amd64.h.
1118 (xcr0_to_tdesc_idx): New function.
1119 (i386_linux_read_description): New function.
1120 (amd64_get_ipa_tdesc_idx): New function.
1121 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1122 (amd64_get_ipa_tdesc): Declare.
1124 2017-09-05 Yao Qi <yao.qi@linaro.org>
1126 * configure.srv (srv_i386_linux_xmlfiles): Remove
1127 i386/i386-XXX-linux.xml from it.
1129 2017-09-05 Yao Qi <yao.qi@linaro.org>
1131 * configure.srv: Set srv_i386_linux_regobj empty if $development
1133 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1134 initialize_low_tdesc.
1135 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1136 with #if initialize_low_tdesc.
1137 * linux-x86-tdesc-selftest.c: New file.
1138 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1140 2017-09-05 Yao Qi <yao.qi@linaro.org>
1142 * Makefile.in (arch-i386.o): New rule.
1143 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1144 (x86_64-*-linux*): Likewise.
1145 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1146 include arch/i386.h.
1147 (i386_linux_read_description): Remove code and call
1148 i386_create_target_description.
1149 * tdesc.c (allocate_target_description): New function.
1150 * tdesc.h (set_tdesc_architecture): Remove declaration.
1151 (set_tdesc_osabi): Likewise.
1153 2017-09-05 Yao Qi <yao.qi@linaro.org>
1155 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1156 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1157 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1159 * server.c (get_features_xml): Call tdesc_get_features_xml.
1160 * tdesc.c (set_tdesc_architecture): New function.
1161 (set_tdesc_osabi): New function.
1162 (tdesc_get_features_xml): New function.
1163 (tdesc_create_feature): Add an argument.
1164 * tdesc.h (struct target_desc) <features>: New field.
1165 <arch, osabi>: New field.
1166 (~target_desc): xfree features, arch, and osabi.
1167 (target_desc::oerator==): Don't compare .xmltarget.
1168 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1169 (set_tdesc_osabi): Likewise.
1170 (tdesc_get_features_xml): Likewise.
1172 2017-09-05 Yao Qi <yao.qi@linaro.org>
1174 * linux-x86-tdesc.c: Include selftest.h.
1175 (i386_tdesc_test): New function.
1176 (initialize_low_tdesc): Call selftests::register_test.
1177 * tdesc.h: Include regdef.h.
1178 (target_desc): Override operator == and !=.
1180 2017-09-05 Yao Qi <yao.qi@linaro.org>
1182 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1183 (ipa_obj): Likewise.
1184 * linux-i386-ipa.c: Include common/x86-xstate.h
1185 (get_ipa_tdesc): Call i386_linux_read_description.
1186 (initialize_low_tracepoint): Don't call init_registers_XXX
1187 functions, call initialize_low_tdesc instead.
1188 * linux-x86-low.c (x86_linux_read_description): Call
1189 i386_linux_read_description.
1190 (initialize_low_arch): Don't call init_registers_i386_XXX
1191 functions, call initialize_low_tdesc.
1192 * linux-x86-tdesc.c: New file.
1193 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1194 (i386_get_ipa_tdesc_idx): Declare.
1195 (i386_get_ipa_tdesc): Declare.
1196 (initialize_low_tdesc): Declare.
1198 2017-09-05 Yao Qi <yao.qi@linaro.org>
1200 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1203 2017-09-05 Yao Qi <yao.qi@linaro.org>
1205 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1206 * regcache.c (get_thread_regcache): Use VEC_length.
1207 (init_register_cache): Likewise.
1208 (regcache_cpy): Likewise.
1209 (registers_to_string): Iterate reg_defs via VEC_iterate.
1210 (find_regno): Likewise.
1211 (find_register_by_number): Use VEC_index.
1212 (register_size): Call find_register_by_number.
1213 (register_data): Call find_register_by_number.
1214 (supply_regblock): Use VEC_length.
1215 (regcache_raw_read_unsigned): Likewise.
1216 * tdesc.c (init_target_desc): Iterate reg_defs via
1218 (default_description): Update initializer.
1219 (copy_target_description): Don't update field num_registers.
1220 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1221 <num_registers>: Remove.
1223 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1225 * Makefile.in (.SECONDARY): Define target.
1227 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1229 * linux-low.c (linux_wait_1): Adjust.
1230 * server.c (queue_stop_reply_callback): Adjust.
1232 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1234 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1235 QEnvironmentUnset and QEnvironmentReset packets.
1236 (handle_query): Inform remote that QEnvironmentHexEncoded,
1237 QEnvironmentUnset and QEnvironmentReset are supported.
1239 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1241 * inferiors.h (inferior_target_data): Rename to ...
1242 (thread_target_data): ... this.
1243 (inferior_regcache_data): Rename to ...
1244 (thread_regcache_data): ... this.
1245 (set_inferior_regcache_data): Rename to ...
1246 (set_thread_regcache_data): ... this.
1247 * inferiors.c (inferior_target_data): Rename to ...
1248 (thread_target_data): ... this.
1249 (inferior_regcache_data): Rename to ...
1250 (thread_regcache_data): ... this.
1251 (set_inferior_regcache_data): Rename to ...
1252 (set_thread_regcache_data): ... this.
1253 (free_one_thread): Update.
1254 * linux-low.h (get_thread_lwp): Update.
1255 * regcache.c (get_thread_regcache): Update.
1256 (regcache_invalidate_thread): Update.
1257 (free_register_cache_thread): Update.
1258 * win32-i386-low.c (update_debug_registers_callback): Update.
1259 (win32_get_current_dr): Update.
1260 * win32-low.c (thread_rec): Update.
1261 (delete_thread_info): Update.
1262 (continue_one_thread): Update.
1263 (suspend_one_thread): Update.
1265 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1267 * inferiors.c (set_inferior_target_data): Remove.
1268 * inferiors.h (set_inferior_target_data): Remove.
1270 2017-08-18 Yao Qi <yao.qi@linaro.org>
1272 * Makefile.in (OBS): Add selftest.o.
1273 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1274 * configure, config.in: Re-generated.
1275 * server.c: Include common/sefltest.h.
1276 (captured_main): Handle option --selftest.
1278 2017-08-09 Yao Qi <yao.qi@linaro.org>
1280 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1281 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1282 i386-avx-mpx.o and i386-mmx.o.
1283 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1284 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1285 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1286 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1287 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1288 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1289 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1290 i386/amd64-avx-mpx.xml.
1292 2017-08-09 Yao Qi <yao.qi@linaro.org>
1294 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1295 and x32-avx-avx512.o.
1296 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1297 i386/x32-avx-avx512.xml.
1299 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1301 * tracepoint.h (enum class fast_tpoint_collect_result): New
1303 (fast_tracepoint_collecting): Change return type to
1304 fast_tpoint_collect_result.
1305 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1306 * linux-low.h: Include tracepoint.h.
1307 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1308 fast_tpoint_collect_result.
1309 * linux-low.c (handle_tracepoints): Adjust.
1310 (linux_fast_tracepoint_collecting): Change return type to
1311 fast_tpoint_collect_result.
1312 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1313 linux_wait_1, stuck_in_jump_pad_callback,
1314 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1315 proceed_one_lwp): Adjust to type change.
1317 2017-07-10 Yao Qi <yao.qi@linaro.org>
1319 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1321 2017-06-29 Yao Qi <yao.qi@linaro.org>
1323 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1325 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1327 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1329 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1331 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1333 * linux-low.c (linux_create_inferior): Adjust code to access the
1334 environment information via 'gdb_environ' class.
1335 * lynx-low.c (lynx_create_inferior): Likewise.
1336 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1337 (get_environ): Return a pointer to 'our_environ'.
1338 (captured_main): Initialize 'our_environ'.
1339 * server.h (get_environ): Adjust prototype.
1340 * spu-low.c (spu_create_inferior): Adjust code to access the
1341 environment information via 'gdb_environ' class.
1343 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1345 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1346 usage of "register" keyword.
1348 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1350 * configure: Re-generate.
1352 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1354 * configure: Re-generate.
1356 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1358 * Makefile.in (COMPILE.pre): Add "-x c++".
1360 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1362 * fork-child.c: Conditionally include <signal.h>.
1364 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1366 * server.c (handle_general_set): Handle new packet
1367 "QStartupWithShell".
1368 (handle_query): Add "QStartupWithShell" to the list of supported
1370 (gdbserver_usage): Add help text explaining the
1371 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1373 (captured_main): Recognize and act upon the presence of the new
1376 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1377 Pedro Alves <palves@redhat.com>
1379 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1380 * configure: Regenerate.
1381 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1383 (i[34567]86-*-lynxos*): Likewise.
1384 (spu*-*-*): Likewise.
1385 * fork-child.c: New file.
1386 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1388 (linux_ptrace_fun): New function.
1389 (linux_create_inferior): Adjust function prototype to reflect
1390 change on "target.h". Adjust function code to use
1392 (linux_request_interrupt): Delete "signal_pid".
1393 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1394 (lynx_ptrace_fun): New function.
1395 (lynx_create_inferior): Adjust function prototype to reflect
1396 change on "target.h". Adjust function code to use
1398 * nto-low.c (nto_create_inferior): Adjust function prototype and
1399 code to reflect change on "target.h". Update comments.
1400 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1401 "common-terminal.h" and "environ.h".
1402 (terminal_fd): Moved to fork-child.c.
1403 (old_foreground_pgrp): Likewise.
1404 (restore_old_foreground_pgrp): Likewise.
1405 (last_status): Make it global.
1406 (last_ptid): Likewise.
1407 (our_environ): New variable.
1408 (startup_with_shell): Likewise.
1409 (program_name): Likewise.
1410 (program_argv): Rename to...
1411 (program_args): ...this.
1412 (wrapper_argv): New variable.
1413 (start_inferior): Delete function.
1414 (get_exec_wrapper): New function.
1415 (get_exec_file): Likewise.
1416 (get_environ): Likewise.
1417 (prefork_hook): Likewise.
1418 (post_fork_inferior): Likewise.
1419 (postfork_hook): Likewise.
1420 (postfork_child_hook): Likewise.
1421 (handle_v_run): Update code to deal with arguments coming from the
1422 remote host. Update calls from "start_inferior" to
1424 (captured_main): Likewise. Initialize environment variable. Call
1426 * server.h (post_fork_inferior): New prototype.
1427 (get_environ): Likewise.
1428 (last_status): Declare.
1429 (last_ptid): Likewise.
1430 (signal_pid): Likewise.
1431 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1432 (spu_ptrace_fun): New function.
1433 (spu_create_inferior): Adjust function prototype to reflect change
1434 on "target.h". Adjust function code to use "fork_inferior".
1435 * target.c (target_terminal_init): New function.
1436 (target_terminal_inferior): Likewise.
1437 (target_terminal_ours): Likewise.
1438 * target.h: Include <vector>.
1439 (struct target_ops) <create_inferior>: Update prototype.
1440 (create_inferior): Update macro.
1441 * utils.c (gdb_flush_out_err): New function.
1442 * win32-low.c (win32_create_inferior): Adjust function prototype
1443 and code to reflect change on "target.h".
1445 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1447 * inferiors.c (switch_to_thread): New function.
1449 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1451 * Makefile.in (SFILE): Add "common/job-control.c".
1452 (OBS): Add "job-control.o".
1454 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1456 * Makefile: Remove "@host_makefile_frag@".
1458 2017-05-05 Pedro Alves <palves@redhat.com>
1460 * configure: Regenerate.
1462 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1464 * configure: Regenerate.
1466 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1468 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1469 software_single_step change of return type to
1470 std::vector<CORE_ADDR>.
1471 * linux-low.c (install_software_single_step_breakpoints):
1473 * linux-low.h (install_software_single_step_breakpoints):
1476 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1478 * remote-utils.c: Include "gdb_termios.h" instead of
1480 * terminal.h: Delete file.
1482 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1484 * server.c: Include <vector>.
1485 <program_argv, wrapper_argv>: Convert to std::vector.
1486 (start_inferior): Rewrite function to use C++.
1487 (handle_v_run): Likewise. Update code that calculates the argv
1488 based on the vRun packet; use C++.
1489 (captured_main): Likewise.
1491 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1493 * server.c (handle_v_cont): Initialize thread_resume::thread
1496 2017-04-05 Pedro Alves <palves@redhat.com>
1498 * configure: Regenerate.
1500 2017-04-05 Pedro Alves <palves@redhat.com>
1502 * gdbreplay.c (sync_error): Constify.
1503 * linux-x86-low.c (push_opcode): Constify.
1505 2017-04-05 Pedro Alves <palves@redhat.com>
1507 * win32-low.c (get_child_debug_event)
1508 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1509 Report TARGET_WAITKIND_SPURIOUS instead.
1511 2017-04-05 Pedro Alves <palves@redhat.com>
1513 * remote-utils.c (remote_prepare, remote_open): Constify.
1514 * remote-utils.h (remote_prepare, remote_open): Constify.
1515 * server.c (captured_main): Constify 'port' handling.
1517 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1519 * Makefile.in (clean): Clear .deps.
1521 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1523 * .gitignore: Remove generated files, replace with wildcard.
1524 * (clean): Replace removal of generated files with wildcard.
1525 (version.c): Replace with...
1526 (version-generated.c): ...this.
1527 (xml-builtin.c): Replace with...
1528 (xml-builtin-generated.c): ...this.
1529 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1530 (%.c: *regformats*): Replace with...
1531 (%-generated.c: *regformats*): ...this.
1533 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1535 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1536 (xtensa_fill_gregset): Call collect_register_by_name for
1538 (xtensa_store_gregset): Call supply_register_by_name for
1541 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1543 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1544 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1545 (xtensa_store_gregset): Call supply_register for all registers in
1546 a0_regnum..a0_regnum + C0_NREGS range.
1548 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1550 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1551 (ax-ipa.o: ax.c): Remove.
1552 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1553 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1554 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1555 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1556 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1558 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1560 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1561 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1562 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1563 (errors-ipa.o: ../common/errors.c): Remove.
1564 (format-ipa.o: ../common/format.c): Remove.
1565 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1567 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1569 * Makefile.in (%-ipa.o: %.c): New rule.
1570 (tracepoint-ipa.o: tracepoint.c): Remove.
1571 (utils-ipa.o: utils.c): Remove.
1572 (remote-utils-ipa.o: remote-utils.c): Remove.
1573 (regcache-ipa.o: regcache.c): Remove.
1574 (i386-linux-ipa.o: i386-linux.c): Remove.
1575 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1576 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1577 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1578 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1579 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1580 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1581 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1582 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1583 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1584 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1585 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1586 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1587 (aarch64-ipa.o: aarch64.c): Remove.
1588 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1589 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1590 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1591 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1592 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1593 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1594 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1595 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1596 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1597 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1598 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1599 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1600 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1601 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1602 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1603 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1604 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1605 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1606 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1607 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1608 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1609 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1610 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1611 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1612 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1613 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1614 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1615 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1616 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1617 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1618 (tdesc-ipa.o: tdesc.c): Remove.
1619 (x32-linux-ipa.o: x32-linux.c): Remove.
1620 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1621 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1623 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1625 * Makefile.in (%.o: ../arch/%.c): New rule.
1626 (arm.o: ../arch/arm.c): Remove.
1627 (arm-linux.o: ../arch/arm-linux.c): Remove.
1628 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1629 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1631 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1633 * Makefile.in (%.o: ../nat/%.c): New rule.
1634 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1635 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1636 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1637 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1638 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1639 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1640 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1641 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1642 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1643 (linux-personality.o: ../nat/linux-personality.c): Remove.
1644 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1645 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1646 (x86-linux.o: ../nat/x86-linux.c): Remove.
1647 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1648 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1650 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1652 * Makefile.in (%.o: ../common/%.c): New rule.
1653 (signals.o: ../common/signals.c): Remove.
1654 (print-utils.o: ../common/print-utils.c): Remove.
1655 (rsp-low.o: ../common/rsp-low.c): Remove.
1656 (common-utils.o: ../common/common-utils.c): Remove.
1657 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1658 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1659 (vec.o: ../common/vec.c): Remove.
1660 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1661 (xml-utils.o: ../common/xml-utils.c): Remove.
1662 (ptid.o: ../common/ptid.c): Remove.
1663 (buffer.o: ../common/buffer.c): Remove.
1664 (format.o: ../common/format.c): Remove.
1665 (filestuff.o: ../common/filestuff.c): Remove.
1666 (agent.o: ../common/agent.c): Remove.
1667 (errors.o: ../common/errors.c): Remove.
1668 (environ.o: ../common/environ.c): Remove.
1669 (common-debug.o: ../common/common-debug.c): Remove.
1670 (cleanups.o: ../common/cleanups.c): Remove.
1671 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1672 (fileio.o: ../common/fileio.c): Remove.
1673 (common-regcache.o: ../common/common-regcache.c): Remove.
1674 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1675 (new-op.o: ../common/new-op.c): Remove.
1676 (btrace-common.o: ../common/btrace-common.c): Remove.
1678 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1680 * Makefile.in (%.o: ../target/%.c): New rule.
1681 (waitstatus.o: ../target/waitstatus.c): Remove.
1683 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1686 (%.c: ../regformats/%.dat,
1687 (%.c: ../regformats/arm/%.dat,
1688 (%.c: ../regformats/i386/%.dat,
1689 (%.c: ../regformats/rs6000/%.dat): New rules.
1690 (aarch64.c): Remove.
1691 (reg-arm.c): Remove.
1692 (arm-with-iwmmxt.c): Remove.
1693 (arm-with-vfpv2.c): Remove.
1694 (arm-with-vfpv3.c): Remove.
1695 (arm-with-neon.c): Remove.
1696 (reg-bfin.c): Remove.
1697 (reg-cris.c): Remove.
1698 (reg-crisv32.c): Remove.
1700 (i386-linux.c): Remove.
1701 (i386-avx.c): Remove.
1702 (i386-avx-linux.c): Remove.
1703 (i386-avx-avx512.c): Remove.
1704 (i386-avx-avx512-linux.c): Remove.
1705 (i386-mpx.c): Remove.
1706 (i386-mpx-linux.c): Remove.
1707 (i386-avx-mpx-avx512-pku.c): Remove.
1708 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1709 (i386-avx-mpx.c): Remove.
1710 (i386-avx-mpx-linux.c): Remove.
1711 (i386-mmx.c): Remove.
1712 (i386-mmx-linux.c): Remove.
1713 (reg-ia64.c): Remove.
1714 (reg-m32r.c): Remove.
1715 (reg-m68k.c): Remove.
1717 (mips-linux.c): Remove.
1718 (mips-dsp-linux.c): Remove.
1719 (mips64-linux.c): Remove.
1720 (mips64-dsp-linux.c): Remove.
1721 (nios2-linux.c): Remove.
1722 (powerpc-32.c): Remove.
1723 (powerpc-32l.c): Remove.
1724 (powerpc-altivec32l.c): Remove.
1725 (powerpc-cell32l.c): Remove.
1726 (powerpc-vsx32l.c): Remove.
1727 (powerpc-isa205-32l.c): Remove.
1728 (powerpc-isa205-altivec32l.c): Remove.
1729 (powerpc-isa205-vsx32l.c): Remove.
1730 (powerpc-e500l.c): Remove.
1731 (powerpc-64l.c): Remove.
1732 (powerpc-altivec64l.c): Remove.
1733 (powerpc-cell64l.c): Remove.
1734 (powerpc-vsx64l.c): Remove.
1735 (powerpc-isa205-64l.c): Remove.
1736 (powerpc-isa205-altivec64l.c): Remove.
1737 (powerpc-isa205-vsx64l.c): Remove.
1738 (s390-linux32.c): Remove.
1739 (s390-linux32v1.c): Remove.
1740 (s390-linux32v2.c): Remove.
1741 (s390-linux64.c): Remove.
1742 (s390-linux64v1.c): Remove.
1743 (s390-linux64v2.c): Remove.
1744 (s390-te-linux64.c): Remove.
1745 (s390-vx-linux64.c): Remove.
1746 (s390-tevx-linux64.c): Remove.
1747 (s390x-linux64.c): Remove.
1748 (s390x-linux64v1.c): Remove.
1749 (s390x-linux64v2.c): Remove.
1750 (s390x-te-linux64.c): Remove.
1751 (s390x-vx-linux64.c): Remove.
1752 (s390x-tevx-linux64.c): Remove.
1753 (tic6x-c64xp-linux.c): Remove.
1754 (tic6x-c64x-linux.c): Remove.
1755 (tic6x-c62x-linux.c): Remove.
1757 (reg-sparc64.c): Remove.
1758 (reg-spu.c): Remove.
1760 (amd64-linux.c): Remove.
1761 (amd64-avx.c): Remove.
1762 (amd64-avx-linux.c): Remove.
1763 (amd64-avx-avx512.c): Remove.
1764 (amd64-avx-avx512-linux.c): Remove.
1765 (amd64-mpx.c): Remove.
1766 (amd64-mpx-linux.c): Remove.
1767 (amd64-avx-mpx-avx512-pku.c): Remove.
1768 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1769 (amd64-avx-mpx.c): Remove.
1770 (amd64-avx-mpx-linux.c): Remove.
1772 (x32-linux.c): Remove.
1773 (x32-avx.c): Remove.
1774 (x32-avx-linux.c): Remove.
1775 (x32-avx-avx512.c): Remove.
1776 (x32-avx-avx512-linux.c): Remove.
1777 (reg-xtensa.c): Remove.
1778 (reg-tilegx.c): Remove.
1779 (reg-tilegx32.c): Remove.
1781 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1783 * Makefile.in (SFILES): Add "common/environ.c".
1784 (OBJS): Add "common/environ.h".
1786 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1788 * configure.ac: Check if the fs_base and gs_base members of
1789 `struct user_regs_struct' exist.
1790 * config.in: Regenerated.
1791 * configure: Likewise.
1793 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1795 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1797 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1798 (get_next_pcs_syscall_next_pc): Likewise.
1800 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1802 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1803 * nto-x86-low.c: Likewise.
1805 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1807 * Makefile.in: Include disable-implicit-rules.mk.
1809 2016-11-23 Pedro Alves <palves@redhat.com>
1811 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1812 (debug_vprintf): Use std::chrono::steady_clock instead of
1813 gettimeofday. Use '.' instead of ':'.
1814 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1815 (get_timestamp): Use std::chrono::steady_clock instead of
1818 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1820 * Makefile.in: Fix whitespace formatting.
1822 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1824 * Makefile.in (SFILES, OBS): Flatten list and order
1827 2016-11-23 Pedro Alves <palves@redhat.com>
1829 * event-loop.c (handle_file_event): Use warning.
1830 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1831 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1834 2016-11-23 Pedro Alves <palves@redhat.com>
1836 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1838 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1839 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1840 debug_printf and debug_flush for debug output.
1841 * server.c (handle_general_set): Likewise.
1842 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1845 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1847 * Makefile.in (.c.o): Replace rule with ...
1848 (%.o: %.c): ... this one.
1850 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1852 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1853 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1855 * configure.ac: Remove checks for the make program.
1856 * configure: Re-generate.
1858 2016-10-28 Pedro Alves <palves@redhat.com>
1860 * Makefile.in (CXX_DIALECT): Get from configure.
1861 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1862 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1863 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1864 * config.in: Regenerate.
1865 * configure: Regenerate.
1867 2016-10-27 Yao Qi <yao.qi@linaro.org>
1869 * linux-low.c (linux_supports_range_stepping): Return true if
1870 can_software_single_step return true.
1872 2016-10-27 Yao Qi <yao.qi@linaro.org>
1874 * inferiors.c (find_inferior_in_random): New function.
1875 * inferiors.h (find_inferior_in_random): Declare.
1876 * linux-low.c (linux_wait_for_event_filtered): Call
1877 find_inferior_in_random instead of find_inferior.
1879 2016-10-27 Yao Qi <yao.qi@linaro.org>
1881 * linux-low.c (linux_wait_1): If single-step breakpoints are
1882 inserted, remove them.
1884 2016-10-26 Pedro Alves <palves@redhat.com>
1886 * linux-low.c (handle_extended_wait): Link parent/child fork
1888 (linux_wait_1): Unlink them.
1889 (linux_set_resume_request): Ignore resume requests for
1890 already-resumed and unhandled fork child threads.
1891 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1892 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1894 (handle_v_requests) <vCont>: Don't call require_running.
1895 * server.h (in_queued_stop_replies): New declaration.
1897 2016-10-24 Yao Qi <yao.qi@linaro.org>
1900 * linux-aarch64-low.c (append_insns): Cast the return value to
1903 2016-10-10 Yao Qi <yao.qi@linaro.org>
1905 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1907 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1909 * target.c (target_supports_multi_process): New function, moved
1911 * target.h (target_supports_multi_process): ... here. Remove
1914 2016-10-05 Tom Tromey <tom@tromey.com>
1917 * tracepoint.c (handle_tracepoint_bkpts): Check
1918 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1920 2016-10-05 Yao Qi <yao.qi@linaro.org>
1922 * configure.srv: Update the path of arm-*.xml files.
1924 2016-10-05 Terry Guo <terry.guo@arm.com>
1925 Yao Qi <yao.qi@linaro.org>
1927 * Makefile.in: Adjust the path of rules.
1928 * configure.srv: Update the path of xml files.
1929 * regformats/arm-with-iwmmxt.dat: Regenerated.
1930 * regformats/arm-with-neon.dat: Likewise.
1931 * regformats/arm-with-vfpv2.dat: Likewise.
1932 * regformats/arm-with-vfpv3.dat Likewise.
1934 2016-09-30 Yao Qi <yao.qi@linaro.org>
1937 * target.c (target_stop_and_wait): Don't call
1938 target_continue_no_signal, use resume_stop instead.
1940 2016-09-26 Yao Qi <yao.qi@linaro.org>
1942 * linux-low.c (linux_wait_1): Call debug_exit.
1944 2016-09-23 Pedro Alves <palves@redhat.com>
1946 * Makefile.in (SFILES): Add common/new-op.c.
1947 (OBS): Add common/new-op.o.
1948 (new-op.o): New rule.
1950 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1952 * .gitinore: Ignore more files.
1954 2016-09-21 Yao Qi <yao.qi@linaro.org>
1956 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1959 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1961 * server.c (start_inferior): Call target_mourn_inferior instead of
1962 mourn_inferior; pass ptid_t argument to it.
1964 (handle_target_event): Likewise.
1965 * target.c (target_mourn_inferior): New function.
1966 * target.h (mourn_inferior): Delete macro.
1968 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1970 * linux-low.c (lwp_is_stepping): New function.
1972 2016-09-06 Carl Love <cel@us.ibm.com>
1974 * server.c (start_inferior): Fixed comment, requested comment change
1975 didn't get updated correctly. Removed reference to ptrace () call as
1976 it is only true on Linux systems.
1978 2016-09-06 Carl Love <cel@us.ibm.com>
1980 * server.c (start_inferior): Do not call
1981 function target_post_create_inferior () if the
1982 inferior process has already exited.
1984 2016-09-05 Pedro Alves <palves@redhat.com>
1986 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1987 (COMPILE.pre, CC_LD): Use CXX directly.
1988 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1989 * acinclude.m4: Don't include build-with-cxx.m4.
1990 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1991 * configure: Regenerate.
1993 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1996 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1997 call writing data to own_buf.
1999 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2001 * target.c (mywait): Call target_wait instead of
2003 (target_wait): New function.
2005 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2007 * server.c (start_inferior): New variable 'ptid'. Replace calls
2008 to the_target->resume by target_continue{,_no_signal}, depending
2010 * target.c (target_stop_and_wait): Call target_continue_no_signal
2011 instead of the_target->resume.
2012 (target_continue): New function.
2014 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2016 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2018 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2023 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2024 * linux-arm-low.c (ps_get_thread_area): Likewise.
2025 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2026 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2027 * linux-mips-low.c (ps_get_thread_area): Likewise.
2028 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2029 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2030 * linux-x86-low.c (ps_get_thread_area): Likewise.
2031 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2033 2016-08-19 Pedro Alves <palves@redhat.com>
2035 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2037 2016-08-19 Pedro Alves <palves@redhat.com>
2039 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2040 comment. Use memcpy instead of casting through unsigned long.
2042 2016-08-19 Pedro Alves <palves@redhat.com>
2044 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2045 allocating around 0x80000000.
2047 2016-08-19 Pedro Alves <palves@redhat.com>
2050 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2051 (x32-avx512-linux-ipa.o): New rules.
2052 * configure.ac (x86_64-*-linux*): New x32 check.
2053 * configure.srv (ipa_x32_linux_regobj): New.
2054 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2055 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2057 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2059 * configure: Regenerate.
2061 2016-08-09 Pedro Alves <palves@redhat.com>
2064 * Makefile.in (OBS): Add signals-state-save-restore.o.
2065 (signals-state-save-restore.o): New rule.
2066 * config.in: Regenerate.
2067 * configure: Regenerate.
2068 * linux-low.c: Include "signals-state-save-restore.h".
2069 (linux_create_inferior): Call
2070 restore_original_signals_state.
2071 * server.c: Include "dispositions-save-restore.h".
2072 (captured_main): Call save_original_signals_state.
2074 2016-08-05 Pedro Alves <palves@redhat.com>
2076 * configure: Regenerate.
2078 2016-08-04 Yao Qi <yao.qi@linaro.org>
2080 * linux-low.c (regsets_fetch_inferior_registers): Check
2081 errno is ESRCH or not.
2083 2016-08-02 Yao Qi <yao.qi@linaro.org>
2085 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2086 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2087 (thread_db_load_search): Update.
2088 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2089 td_ta_set_event and td_ta_event_getmsg.
2091 2016-07-26 Pedro Alves <palves@redhat.com>
2094 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2095 of unsigned long for 64-bit registers and use uint32_t instead of
2096 unsigned int for 32-bit registers.
2098 2016-07-26 Pedro Alves <palves@redhat.com>
2100 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2103 2016-07-21 Tom Tromey <tom@tromey.com>
2105 * configure: Rebuild.
2107 2016-07-21 Yao Qi <yao.qi@linaro.org>
2109 * mem-break.c (find_gdb_breakpoint): Cast bp to
2110 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2112 2016-07-21 Yao Qi <yao.qi@linaro.org>
2114 * server.c (handle_v_requests): Support s and S actions
2115 if target_supports_software_single_step return true.
2117 2016-07-21 Yao Qi <yao.qi@linaro.org>
2119 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2120 is resume_step, call maybe_hw_step.
2121 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2123 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2125 (proceed_one_lwp): If resume request is resume_step, install
2126 reinsert breakpoints and call maybe_hw_step.
2128 2016-07-21 Yao Qi <yao.qi@linaro.org>
2130 * linux-low.c (proceed_one_lwp): Declare.
2131 (linux_resume_one_thread): Remove local variable 'step'.
2132 Lift code enqueue signal. Call proceed_one_lwp instead of
2133 linux_resume_one_lwp.
2135 2016-07-21 Yao Qi <yao.qi@linaro.org>
2137 * linux-low.c (linux_resume_one_thread): Call
2138 enqueue_pending_signal.
2140 2016-07-21 Yao Qi <yao.qi@linaro.org>
2142 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2143 * inferiors.c (do_restore_current_thread_cleanup): New function.
2144 (make_cleanup_restore_current_thread): Likewise.
2145 * linux-low.c (install_software_single_step_breakpoints): Call
2146 make_cleanup_restore_current_thread. Switch current_thread to
2149 2016-07-21 Yao Qi <yao.qi@linaro.org>
2151 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2152 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2153 (clone_one_breakpoint): Likewise.
2154 (delete_reinsert_breakpoints): Change parameter to thread.
2156 (has_reinsert_breakpoints): Likewise.
2157 (uninsert_reinsert_breakpoints): Likewise.
2158 (reinsert_reinsert_breakpoints): Likewise.
2159 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2160 (delete_reinsert_breakpoints): Likewise.
2161 (reinsert_reinsert_breakpoints): Likewise.
2162 (uninsert_reinsert_breakpoints): Likewise.
2163 (has_reinsert_breakpoints): Likewise.
2165 2016-07-21 Yao Qi <yao.qi@linaro.org>
2167 * inferiors.c (get_thread_process): Make parameter const.
2168 * inferiors.h (get_thread_process): Update declaration.
2169 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2170 Add new parameters child_thread and parent_thread. Callers
2172 * mem-break.h (clone_all_breakpoints): Update declaration.
2174 2016-07-21 Yao Qi <yao.qi@linaro.org>
2176 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2177 <command_list, handler>: Remove.
2178 (struct gdb_breakpoint): New.
2179 (struct other_breakpoint): New.
2180 (struct reinsert_breakpoint): New.
2181 (is_gdb_breakpoint): New function.
2182 (any_persistent_commands): Update command_list if
2183 is_gdb_breakpoint returns true.
2184 (set_breakpoint): Create breakpoints according to their types.
2185 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2186 (set_gdb_breakpoint_1): Likewise.
2187 (set_gdb_breakpoint): Likewise.
2188 (clear_breakpoint_conditions): Change parameter type to
2189 'struct gdb_breakpoint *'.
2190 (clear_breakpoint_commands): Likewise.
2191 (clear_breakpoint_conditions_and_commands): Likewise.
2192 (add_condition_to_breakpoint): Likewise.
2193 (add_breakpoint_condition): Likewise.
2194 (add_commands_to_breakpoint): Likewise.
2195 (check_breakpoints): Check other_breakpoint.
2196 (clone_one_breakpoint): Clone breakpopint according to its type.
2197 * mem-break.h (struct gdb_breakpoint): Declare.
2198 (set_gdb_breakpoint): Update declaration.
2199 (clear_breakpoint_conditions_and_commands): Likewise.
2200 (add_breakpoint_condition): Likewise.
2201 (add_breakpoint_commands): Likewise.
2202 * server.c (process_point_options): Change parameter type to
2203 'struct gdb_breakpoint *'.
2205 2016-07-21 Yao Qi <yao.qi@linaro.org>
2207 * mem-break.c (set_breakpoint_at): Rename it to ...
2208 (set_breakpoint_type_at): ... it.
2209 (set_breakpoint_at): Call set_breakpoint_type_at.
2210 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2211 * mem-break.h (set_breakpoint_at): Update comments.
2213 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2215 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2217 (nios2_store_gregset): Likewise.
2219 2016-07-01 Pedro Alves <palves@redhat.com>
2220 Antoine Tremblay <antoine.tremblay@ericsson.com>
2222 * linux-low.c: Change interface to take the target lwp_info
2223 pointer directly and return void. Handle detaching from a zombie
2225 (linux_detach_lwp_callback): New function.
2226 (linux_detach): Detach from the leader thread after detaching from
2229 2016-06-28 Yao Qi <yao.qi@linaro.org>
2231 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2232 for variable new_offset.
2233 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2234 (aarch64_ftrace_insn_reloc_cb): Likewise.
2235 (aarch64_ftrace_insn_reloc_tb): Likewise.
2236 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2237 PRIx64 instead of PRIx32.
2239 2016-06-28 Yao Qi <yao.qi@linaro.org>
2241 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2242 (the_low_target): Install arm_get_syscall_trapinfo.
2244 2016-06-28 Yao Qi <yao.qi@linaro.org>
2246 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2248 (the_low_target): Install aarch64_get_syscall_trapinfo.
2250 2016-06-28 Yao Qi <yao.qi@linaro.org>
2252 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2254 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2255 Remove parameter sysno.
2256 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2259 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2261 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2262 (s390_emit_ne_goto): Likewise.
2263 (s390_emit_lt_goto): Likewise.
2264 (s390_emit_le_goto): Likewise.
2265 (s390_emit_gt_goto): Likewise.
2266 (s390_emit_ge_goto): Likewise.
2267 (s390x_emit_eq_goto): Likewise.
2268 (s390x_emit_ne_goto): Likewise.
2269 (s390x_emit_lt_goto): Likewise.
2270 (s390x_emit_le_goto): Likewise.
2271 (s390x_emit_gt_goto): Likewise.
2272 (s390x_emit_ge_goto): Likewise.
2273 (s390_emit_ops_impl): Mark variable static.
2274 (s390x_emit_ops): Likewise.
2276 2016-06-17 Yao Qi <yao.qi@linaro.org>
2278 * linux-low.c (handle_extended_wait): Call
2279 uninsert_reinsert_breakpoints for the parent process. Remove
2280 reinsert breakpoints from the child process. Reinsert them to
2281 the parent process when vfork is done.
2282 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2283 (reinsert_reinsert_breakpoints): New function.
2284 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2285 (reinsert_reinsert_breakpoints): Declare.
2287 2016-06-17 Yao Qi <yao.qi@linaro.org>
2289 * linux-low.c (handle_extended_wait): If the parent is doing
2290 step-over, remove the reinsert breakpoints from the forked child.
2292 2016-06-17 Yao Qi <yao.qi@linaro.org>
2294 * linux-low.c (unsuspend_all_lwps): Declare.
2295 (linux_low_filter_event): If thread exited, call finish_step_over.
2296 If step-over is finished, unsuspend other threads.
2298 2016-06-17 Yao Qi <yao.qi@linaro.org>
2300 * linux-low.c (linux_resume_one_lwp_throw): Assert
2301 has_reinsert_breakpoints returns false.
2302 * mem-break.c (delete_disabled_breakpoints): Assert
2303 bp type isn't reinsert_breakpoint.
2305 2016-06-17 Yao Qi <yao.qi@linaro.org>
2307 * linux-low.c (maybe_hw_step): New function.
2308 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2309 (finish_step_over): Switch current_thread to lwp temporarily,
2310 and assert has_reinsert_breakpoints returns true.
2311 (proceed_one_lwp): Call maybe_hw_step.
2312 * mem-break.c (has_reinsert_breakpoints): New function.
2313 * mem-break.h (has_reinsert_breakpoints): Declare.
2315 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2317 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2319 2016-05-17 Yao Qi <yao.qi@linaro.org>
2321 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2322 instead of find_inferior.
2324 2016-05-05 Yao Qi <yao.qi@linaro.org>
2326 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2327 Initialize res to zero.
2329 2016-05-05 Yao Qi <yao.qi@linaro.org>
2331 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2334 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2336 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2337 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2338 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2340 2016-04-28 Par Olsson <par.olsson@windriver.com>
2341 Simon Marchi <simon.marchi@ericsson.com>
2343 * tracepoint.c (write_inferior_int8): New function.
2344 (cmd_qtenable_disable): Write enable flag using
2345 write_inferior_int8.
2347 2016-04-25 Yao Qi <yao.qi@linaro.org>
2349 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2350 (need_step_over_p): Return zero if the LWP has pending signals
2351 can be delivered on software single step target.
2353 2016-04-25 Yao Qi <yao.qi@linaro.org>
2355 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2356 return instead of error.
2358 2016-04-22 Yao Qi <yao.qi@linaro.org>
2360 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2363 2016-04-22 Yao Qi <yao.qi@linaro.org>
2365 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2366 signal when stepping over breakpoint with software single
2369 2016-04-21 Pedro Alves <palves@redhat.com>
2371 * linux-s390-low.c (s390_collect_ptrace_register)
2372 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2374 (s390_check_regset): Use void * instead of gdb_byte *.
2376 2016-04-20 Pedro Alves <palves@redhat.com>
2378 * configure: Renegerate.
2380 2016-04-20 Yao Qi <yao.qi@linaro.org>
2382 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2383 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2385 (arm_store_gregset): Likewise.
2387 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2389 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2390 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2391 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2392 (amd64-avx-mpx-linux.c): New rules.
2393 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2394 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2395 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2396 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2397 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2398 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2399 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2400 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2401 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2402 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2403 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2404 * linux-x86-low.c (x86_linux_read_description): Add case for
2405 X86_XSTATE_AVX_MPX_MASK.
2406 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2407 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2408 init_registers_i386_avx_mpx_linux.
2409 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2410 (initialize_low_tracepoint): Call
2411 init_registers_i386_avx_mpx_linux.
2412 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2413 (initialize_low_tracepoint): Call
2414 init_registers_amd64_avx_mpx_linux.
2415 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2416 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2417 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2420 2016-04-18 Pedro Alves <palves@redhat.com>
2422 * configure: Regenerate.
2424 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2426 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2427 (aarch64_emit_sub): Likewise.
2429 2016-04-12 Pedro Alves <palves@redhat.com>
2431 * utils.c (prepare_to_throw_exception): Delete.
2433 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2435 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2437 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2439 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2441 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2443 * linux-aarch64-ipa.c: Add <elf.h> include.
2444 * linux-ppc-ipa.c: Add <elf.h> include.
2445 * linux-s390-ipa.c: Add <elf.h> include.
2447 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2449 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2450 (get_raw_reg_ptr): Likewise.
2451 (get_trace_state_variable_value_ptr): Likewise.
2452 (set_trace_state_variable_value_ptr): Likewise.
2453 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2456 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2457 Marcin Kościelnicki <koriakin@0x04.net>
2460 * linux-ppc-low.c (emit_insns): New function.
2461 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2462 (ppc_emit_prologue): New function.
2463 (ppc_emit_epilogue): New function.
2464 (ppc_emit_add): New function.
2465 (ppc_emit_sub): New function.
2466 (ppc_emit_mul): New function.
2467 (ppc_emit_lsh): New function.
2468 (ppc_emit_rsh_signed): New function.
2469 (ppc_emit_rsh_unsigned): New function.
2470 (ppc_emit_ext): New function.
2471 (ppc_emit_zero_ext): New function.
2472 (ppc_emit_log_not): New function.
2473 (ppc_emit_bit_and): New function.
2474 (ppc_emit_bit_or): New function.
2475 (ppc_emit_bit_xor): New function.
2476 (ppc_emit_bit_not): New function.
2477 (ppc_emit_equal): New function.
2478 (ppc_emit_less_signed): New function.
2479 (ppc_emit_less_unsigned): New function.
2480 (ppc_emit_ref): New function.
2481 (ppc_emit_const): New function.
2482 (ppc_emit_reg): New function.
2483 (ppc_emit_pop): New function.
2484 (ppc_emit_stack_flush): New function.
2485 (ppc_emit_swap): New function.
2486 (ppc_emit_stack_adjust): New function.
2487 (ppc_emit_call): New function.
2488 (ppc_emit_int_call_1): New function.
2489 (ppc_emit_void_call_2): New function.
2490 (ppc_emit_if_goto): New function.
2491 (ppc_emit_goto): New function.
2492 (ppc_emit_eq_goto): New function.
2493 (ppc_emit_ne_goto): New function.
2494 (ppc_emit_lt_goto): New function.
2495 (ppc_emit_le_goto): New function.
2496 (ppc_emit_gt_goto): New function.
2497 (ppc_emit_ge_goto): New function.
2498 (ppc_write_goto_address): New function.
2499 (ppc_emit_ops_impl): New static variable.
2500 (ppc64v1_emit_prologue): New function.
2501 (ppc64v2_emit_prologue): New function.
2502 (ppc64_emit_epilogue): New function.
2503 (ppc64_emit_add): New function.
2504 (ppc64_emit_sub): New function.
2505 (ppc64_emit_mul): New function.
2506 (ppc64_emit_lsh): New function.
2507 (ppc64_emit_rsh_signed): New function.
2508 (ppc64_emit_rsh_unsigned): New function.
2509 (ppc64_emit_ext): New function.
2510 (ppc64_emit_zero_ext): New function.
2511 (ppc64_emit_log_not): New function.
2512 (ppc64_emit_bit_and): New function.
2513 (ppc64_emit_bit_or): New function.
2514 (ppc64_emit_bit_xor): New function.
2515 (ppc64_emit_bit_not): New function.
2516 (ppc64_emit_equal): New function.
2517 (ppc64_emit_less_signed): New function.
2518 (ppc64_emit_less_unsigned): New function.
2519 (ppc64_emit_ref): New function.
2520 (ppc64_emit_const): New function.
2521 (ppc64v1_emit_reg): New function.
2522 (ppc64v2_emit_reg): New function.
2523 (ppc64_emit_pop): New function.
2524 (ppc64_emit_stack_flush): New function.
2525 (ppc64_emit_swap): New function.
2526 (ppc64v1_emit_call): New function.
2527 (ppc64v2_emit_call): New function.
2528 (ppc64v1_emit_int_call_1): New function.
2529 (ppc64v2_emit_int_call_1): New function.
2530 (ppc64v1_emit_void_call_2): New function.
2531 (ppc64v2_emit_void_call_2): New function.
2532 (ppc64_emit_if_goto): New function.
2533 (ppc64_emit_eq_goto): New function.
2534 (ppc64_emit_ne_goto): New function.
2535 (ppc64_emit_lt_goto): New function.
2536 (ppc64_emit_le_goto): New function.
2537 (ppc64_emit_gt_goto): New function.
2538 (ppc64_emit_ge_goto): New function.
2539 (ppc64v1_emit_ops_impl): New static variable.
2540 (ppc64v2_emit_ops_impl): New static variable.
2541 (ppc_emit_ops): New function.
2542 (linux_low_target): Wire in ppc_emit_ops.
2544 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2545 Marcin Kościelnicki <koriakin@0x04.net>
2548 * Makefile.in: Add powerpc-*-ipa.o
2549 * configure.srv: Add ipa_obj for powerpc*-linux.
2550 * linux-ppc-ipa.c: New file.
2551 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2553 (PPC_FIELD): New macro.
2554 (PPC_SEXT): New macro.
2555 (PPC_OP6): New macro.
2556 (PPC_BO): New macro.
2557 (PPC_LI): New macro.
2558 (PPC_BD): New macro.
2559 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2560 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2561 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2562 (ppc_get_thread_area): New function.
2563 (is_elfv2_inferior): New function.
2564 (gen_ds_form): New function.
2565 (GEN_STD): New macro.
2566 (GEN_STDU): New macro.
2567 (GEN_LD): New macro.
2568 (GEN_LDU): New macro.
2569 (gen_d_form): New function.
2570 (GEN_ADDI): New macro.
2571 (GEN_ADDIS): New macro.
2572 (GEN_LI): New macro.
2573 (GEN_LIS): New macro.
2574 (GEN_ORI): New macro.
2575 (GEN_ORIS): New macro.
2576 (GEN_LWZ): New macro.
2577 (GEN_STW): New macro.
2578 (GEN_STWU): New macro.
2579 (gen_xfx_form): New function.
2580 (GEN_MFSPR): New macro.
2581 (GEN_MTSPR): New macro.
2582 (GEN_MFCR): New macro.
2583 (GEN_MTCR): New macro.
2584 (GEN_SYNC): New macro.
2585 (GEN_LWSYNC): New macro.
2586 (gen_x_form): New function.
2587 (GEN_OR): New macro.
2588 (GEN_MR): New macro.
2589 (GEN_LWARX): New macro.
2590 (GEN_STWCX): New macro.
2591 (GEN_CMPW): New macro.
2592 (gen_md_form): New function.
2593 (GEN_RLDICL): New macro.
2594 (GEN_RLDICR): New macro.
2595 (gen_i_form): New function.
2597 (GEN_BL): New macro.
2598 (gen_b_form): New function.
2599 (GEN_BNE): New macro.
2600 (GEN_LOAD): New macro.
2601 (GEN_STORE): New macro.
2602 (gen_limm): New function.
2603 (gen_atomic_xchg): New function.
2604 (gen_call): New function.
2605 (ppc_relocate_instruction): New function.
2606 (ppc_install_fast_tracepoint_jump_pad): New function.
2607 (ppc_get_min_fast_tracepoint_insn_len): New function.
2608 (ppc_get_ipa_tdesc_idx): New function.
2609 (the_low_target): Wire in the new functions.
2610 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2612 * linux-ppc-tdesc.h: New file.
2614 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2616 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2617 (alloc_jump_pad_buffer): New function.
2618 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2619 (alloc_jump_pad_buffer): New function.
2620 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2621 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2622 (alloc_jump_pad_buffer): New function.
2623 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2624 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2625 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2626 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2628 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2630 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2631 * linux-amd64-ipa.c: Likewise.
2632 * linux-i386-ipa.c: Likewise.
2633 * linux-s390-ipa.c: Likewise.
2634 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2635 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2636 set_trace_state_variable_value_ptr.
2637 (struct ipa_sym_addresses): Likewise.
2638 (symbol_list): Likewise.
2639 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2640 accessing gdb_collect directly.
2641 (gdb_collect_ptr_type): New typedef.
2642 (get_raw_reg_ptr_type): New typedef.
2643 (get_trace_state_variable_value_ptr_type): New typedef.
2644 (set_trace_state_variable_value_ptr_type): New typedef.
2645 (gdb_collect_ptr): New global.
2646 (get_raw_reg_ptr): New global.
2647 (get_trace_state_variable_value_ptr): New global.
2648 (set_trace_state_variable_value_ptr): New global.
2649 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2650 accessing get_raw_reg directly.
2651 (get_get_tsv_func_addr): Likewise for
2652 get_trace_state_variable_value_ptr.
2653 (get_set_tsv_func_addr): Likewise for
2654 set_trace_state_variable_value_ptr.
2655 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2657 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2659 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2661 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2663 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2665 (relocate_instruction): Remove own_buf.
2666 * server.c (own_buf): Make global.
2667 (handle_v_requests): Make global.
2668 * server.h (own_buf): New declaration.
2669 (handle_v_requests): New prototype.
2671 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2674 * linux-s390-low.c (add_insns): New function.
2675 (s390_emit_prologue): New function.
2676 (s390_emit_epilogue): New function.
2677 (s390_emit_add): New function.
2678 (s390_emit_sub): New function.
2679 (s390_emit_mul): New function.
2680 (s390_emit_lsh): New function.
2681 (s390_emit_rsh_signed): New function.
2682 (s390_emit_rsh_unsigned): New function.
2683 (s390_emit_ext): New function.
2684 (s390_emit_log_not): New function.
2685 (s390_emit_bit_and): New function.
2686 (s390_emit_bit_or): New function.
2687 (s390_emit_bit_xor): New function.
2688 (s390_emit_bit_not): New function.
2689 (s390_emit_equal): New function.
2690 (s390_emit_less_signed): New function.
2691 (s390_emit_less_unsigned): New function.
2692 (s390_emit_ref): New function.
2693 (s390_emit_if_goto): New function.
2694 (s390_emit_goto): New function.
2695 (s390_write_goto_address): New function.
2696 (s390_emit_litpool): New function.
2697 (s390_emit_const): New function.
2698 (s390_emit_call): New function.
2699 (s390_emit_reg): New function.
2700 (s390_emit_pop): New function.
2701 (s390_emit_stack_flush): New function.
2702 (s390_emit_zero_ext): New function.
2703 (s390_emit_swap): New function.
2704 (s390_emit_stack_adjust): New function.
2705 (s390_emit_set_r2): New function.
2706 (s390_emit_int_call_1): New function.
2707 (s390_emit_void_call_2): New function.
2708 (s390_emit_eq_goto): New function.
2709 (s390_emit_ne_goto): New function.
2710 (s390_emit_lt_goto): New function.
2711 (s390_emit_le_goto): New function.
2712 (s390_emit_gt_goto): New function.
2713 (s390_emit_ge_goto): New function.
2714 (s390x_emit_prologue): New function.
2715 (s390x_emit_epilogue): New function.
2716 (s390x_emit_add): New function.
2717 (s390x_emit_sub): New function.
2718 (s390x_emit_mul): New function.
2719 (s390x_emit_lsh): New function.
2720 (s390x_emit_rsh_signed): New function.
2721 (s390x_emit_rsh_unsigned): New function.
2722 (s390x_emit_ext): New function.
2723 (s390x_emit_log_not): New function.
2724 (s390x_emit_bit_and): New function.
2725 (s390x_emit_bit_or): New function.
2726 (s390x_emit_bit_xor): New function.
2727 (s390x_emit_bit_not): New function.
2728 (s390x_emit_equal): New function.
2729 (s390x_emit_less_signed): New function.
2730 (s390x_emit_less_unsigned): New function.
2731 (s390x_emit_ref): New function.
2732 (s390x_emit_if_goto): New function.
2733 (s390x_emit_const): New function.
2734 (s390x_emit_call): New function.
2735 (s390x_emit_reg): New function.
2736 (s390x_emit_pop): New function.
2737 (s390x_emit_stack_flush): New function.
2738 (s390x_emit_zero_ext): New function.
2739 (s390x_emit_swap): New function.
2740 (s390x_emit_stack_adjust): New function.
2741 (s390x_emit_int_call_1): New function.
2742 (s390x_emit_void_call_2): New function.
2743 (s390x_emit_eq_goto): New function.
2744 (s390x_emit_ne_goto): New function.
2745 (s390x_emit_lt_goto): New function.
2746 (s390x_emit_le_goto): New function.
2747 (s390x_emit_gt_goto): New function.
2748 (s390x_emit_ge_goto): New function.
2749 (s390_emit_ops): New function.
2750 (struct linux_target_ops): Fill in emit_ops hook.
2752 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2755 * Makefile.in: Add s390 IPA files.
2756 * configure.srv: Build IPA for s390.
2757 * linux-s390-ipa.c: New file.
2758 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2759 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2760 (tdesc_s390_linux32): Likewise.
2761 (init_registers_s390_linux32v1): Likewise.
2762 (tdesc_s390_linux32v1): Likewise.
2763 (init_registers_s390_linux32v2): Likewise.
2764 (tdesc_s390_linux32v2): Likewise.
2765 (init_registers_s390_linux64): Likewise.
2766 (tdesc_s390_linux64): Likewise.
2767 (init_registers_s390_linux64v1): Likewise.
2768 (tdesc_s390_linux64v1): Likewise.
2769 (init_registers_s390_linux64v2): Likewise.
2770 (tdesc_s390_linux64v2): Likewise.
2771 (init_registers_s390_te_linux64): Likewise.
2772 (tdesc_s390_te_linux64): Likewise.
2773 (init_registers_s390_vx_linux64): Likewise.
2774 (tdesc_s390_vx_linux64): Likewise.
2775 (init_registers_s390_tevx_linux64): Likewise.
2776 (tdesc_s390_tevx_linux64): Likewise.
2777 (init_registers_s390x_linux64): Likewise.
2778 (tdesc_s390x_linux64): Likewise.
2779 (init_registers_s390x_linux64v1): Likewise.
2780 (tdesc_s390x_linux64v1): Likewise.
2781 (init_registers_s390x_linux64v2): Likewise.
2782 (tdesc_s390x_linux64v2): Likewise.
2783 (init_registers_s390x_te_linux64): Likewise.
2784 (tdesc_s390x_te_linux64): Likewise.
2785 (init_registers_s390x_vx_linux64): Likewise.
2786 (tdesc_s390x_vx_linux64): Likewise.
2787 (init_registers_s390x_tevx_linux64): Likewise.
2788 (tdesc_s390x_tevx_linux64): Likewise.
2789 (have_hwcap_s390_vx): New static variable.
2790 (s390_arch_setup): Fill have_hwcap_s390_vx.
2791 (s390_get_thread_area): New function.
2792 (s390_ft_entry_gpr_esa): New const.
2793 (s390_ft_entry_gpr_zarch): New const.
2794 (s390_ft_entry_misc): New const.
2795 (s390_ft_entry_fr): New const.
2796 (s390_ft_entry_vr): New const.
2797 (s390_ft_main_31): New const.
2798 (s390_ft_main_64): New const.
2799 (s390_ft_exit_fr): New const.
2800 (s390_ft_exit_vr): New const.
2801 (s390_ft_exit_misc): New const.
2802 (s390_ft_exit_gpr_esa): New const.
2803 (s390_ft_exit_gpr_zarch): New const.
2804 (append_insns): New function.
2805 (s390_relocate_instruction): New function.
2806 (s390_install_fast_tracepoint_jump_pad): New function.
2807 (s390_get_min_fast_tracepoint_insn_len): New function.
2808 (s390_get_ipa_tdesc_idx): New function.
2809 (struct linux_target_ops): Wire in the above functions.
2810 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2811 * linux-s390-tdesc.h: New file.
2813 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2815 * linux-s390-low.c (s390_supports_tracepoints): New function.
2816 (struct linux_target_ops): Fill supports_tracepoints hook.
2818 2016-03-18 Yao Qi <yao.qi@linaro.org>
2820 * linux-low.c (lwp_signal_can_be_delivered): New function.
2821 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2823 2016-03-18 Yao Qi <yao.qi@linaro.org>
2825 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2826 0 if signal is enqueued. Remove 'signal' from one debugging
2827 message. Move one debugging message to some lines below.
2828 Remove code setting 'signal' to 0.
2830 2016-03-18 Yao Qi <yao.qi@linaro.org>
2832 * linux-low.c (linux_low_filter_event): Remove redundant
2833 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2835 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2837 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2838 (struct linux_target_ops): Wire in the above.
2840 2016-03-03 Yao Qi <yao.qi@linaro.org>
2842 * linux-low.c: Update comments to start_step_over.
2844 2016-03-03 Yao Qi <yao.qi@linaro.org>
2847 * linux-low.c (handle_extended_wait): Set child suspended
2848 if event_lwp->bp_reinsert isn't zero.
2850 2016-03-02 Yao Qi <yao.qi@linaro.org>
2852 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2853 enqueue_pending_signal.
2855 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2857 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2860 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2862 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2863 (s390_regmap_3264) [!__s390x__]: New global.
2864 (s390_collect_ptrace_register): Skip map entries containing -1.
2865 (s390_supply_ptrace_register): Ditto.
2866 (s390_fill_gprs_high): New function.
2867 (s390_store_gprs_high): New function.
2868 (s390_regsets): Add NT_S390_HIGH_GPRS.
2869 (s390_get_hwcap): Enable on 31-bit.
2870 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2871 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2872 Detect NT_S390_HIGH_GPRS.
2873 (s390_usrregs_info_3264): Enable on 31-bit.
2874 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2875 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2877 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2880 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2881 * configure.srv: Ditto.
2882 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2883 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2884 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2885 (init_registers_amd64_linux): Remove prototype.
2886 (tdesc_amd64_linux): Remove declaration.
2887 (get_ipa_tdesc): New function.
2888 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2889 initialize remaining tdescs.
2890 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2891 (init_registers_i386_linux): Remove prototype.
2892 (tdesc_i386_linux): Remove declaration.
2893 (get_ipa_tdesc): New function.
2894 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2895 initialize remaining tdescs.
2896 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2897 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2898 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2899 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2900 (x86_get_ipa_tdesc_idx): New function.
2901 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2902 * linux-x86-tdesc.h: New file.
2903 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2904 (target_get_ipa_tdesc_idx): New macro.
2905 * tracepoint.c (ipa_tdesc_idx): New macro.
2906 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2907 (symbol_list): Add ipa_tdesc_idx.
2908 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2909 (ipa_tdesc): Remove.
2910 (ipa_tdesc_idx): New variable.
2911 (get_context_regcache): Use get_ipa_tdesc.
2912 (gdb_collect): Ditto.
2914 * tracepoint.h (get_ipa_tdesc): New prototype.
2915 (ipa_tdesc): Remove.
2917 2016-02-24 Pedro Alves <palves@redhat.com>
2919 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2920 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2921 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2922 Factor out common code between the USE_SIGTRAP_SIGINFO and
2923 !USE_SIGTRAP_SIGINFO blocks.
2924 (linux_low_filter_event): Call save_stop_reason instead of
2925 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2927 (linux_wait_1): Update comments.
2929 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2931 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2932 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2933 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2934 ppc_insert_point, ppc_remove_point.
2936 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2938 * linux-s390-low.c (s390_supports_z_point_type): New function.
2939 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2941 2016-02-16 Yao Qi <yao.qi@linaro.org>
2943 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2944 PC. Get pc from regcache_read_pc.
2946 2016-02-12 Yao Qi <yao.qi@linaro.org>
2948 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2949 or linux_get_pc_32bit.
2950 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2952 2016-02-12 Yao Qi <yao.qi@linaro.org>
2954 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2955 arm_linux_get_next_pcs_fixup.
2957 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2959 * tracepoint.c (x_tracepoint_action_download): Change
2960 write_inferior_data_ptr to write_inferior_data_pointer.
2961 (cmd_qtstart): Likewise.
2962 (write_inferior_data_ptr): Remove.
2963 (download_agent_expr): Change write_inferior_data_ptr to
2964 write_inferior_data_pointer.
2965 (download_tracepoint_1): Likewise.
2966 (download_tracepoint): Likewise.
2967 (download_trace_state_variables): Likewise.
2969 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2970 Marcin Kościelnicki <koriakin@0x04.net>
2972 * tracepoint.c (struct tracepoint_action_ops): Remove.
2973 (struct tracepoint_action): Remove ops.
2974 (m_tracepoint_action_download, r_tracepoint_action_download)
2975 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2976 size and offset accordingly.
2977 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2978 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2979 (tracepoint_action_send, tracepoint_action_download): New functions.
2980 Helpers for trace action handlers.
2981 (add_tracepoint_action): Remove setup actions ops.
2982 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2984 2016-02-10 Yao Qi <yao.qi@linaro.org>
2986 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2988 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2990 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2992 * configure: Regenerate.
2994 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2996 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2997 void * to gdb_byte *.
2998 * linux-low.c (siginfo_fixup): Likewise.
2999 (linux_xfer_siginfo): Likewise.
3000 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3002 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3004 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3006 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3008 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3010 * linux-x86-low.c [__x86_64__]: Include
3011 "nat/amd64-linux-siginfo.h".
3012 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3013 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3014 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3015 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3016 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3017 (cpt_si_fd, si_timerid, si_overrun): Move from
3018 nat/amd64-linux-siginfo.c.
3019 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3021 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3023 * server.c (skip_to_semicolon): Remove.
3024 (process_point_options): Use strchrnul instead of
3027 2016-01-26 Yao Qi <yao.qi@linaro.org>
3029 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3030 * linux-low.c (install_software_single_step_breakpoints): Don't
3031 call regcache_read_pc.
3032 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3035 2016-01-26 Yao Qi <yao.qi@linaro.org>
3037 * linux-low.c (install_software_single_step_breakpoints): Call
3038 regcache_read_pc instead of get_pc.
3040 2016-01-26 Yao Qi <yao.qi@linaro.org>
3042 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3043 (unblock_async_io): Rename to ...
3044 (block_unblock_async_io): ... it. New function.
3045 (enable_async_io): Don't install SIGIO handler. Unblock it
3047 (disable_async_io): Don't ignore SIGIO. Block it instead.
3048 (initialize_async_io): Install SIGIO handler. Don't call
3051 2016-01-26 Yao Qi <yao.qi@linaro.org>
3053 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3054 first character is '\003', call *the_target->request_interrupt.
3056 2016-01-25 Yao Qi <yao.qi@linaro.org>
3058 * remote-utils.c (new_thread_notify): Remove.
3059 (dead_thread_notify): Likewise.
3060 * remote-utils.h (new_thread_notify): Remove declaration.
3061 (dead_thread_notify): Likewise.
3063 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3065 * gdb.trace/pending.exp: Fix expected message on continue.
3067 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3069 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3070 it works properly on big-endian machines where sizeof (CORE_ADDR)
3073 2016-01-21 Pedro Alves <palves@redhat.com>
3075 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3076 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3077 * configure: Regenerate.
3079 2016-01-21 Yao Qi <yao.qi@linaro.org>
3081 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3082 is_thumb and set it according to CPSR saved on the stack.
3083 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3084 arm_sigreturn_next_pc.
3086 2016-01-18 Yao Qi <yao.qi@linaro.org>
3088 * linux-low.c (linux_set_pc_64bit): New function.
3089 (linux_get_pc_64bit): New function.
3090 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3092 * linux-sparc-low.c (debug_threads): Remove declaration.
3093 (sparc_get_pc): Remove.
3094 (the_low_target): Use linux_get_pc_64bit instead of
3096 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3097 (the_low_target): Use linux_get_pc_64bit and
3100 2016-01-18 Yao Qi <yao.qi@linaro.org>
3102 * linux-arm-low.c (debug_threads): Remove declaration.
3103 (arm_get_pc, arm_set_pc): Remove.
3104 (the_low_target): Use linux_get_pc_32bit and
3106 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3107 (the_low_target): Use linux_get_pc_32bit and
3109 * linux-cris-low.c (debug_threads): Remove declaration.
3110 (cris_get_pc, cris_set_pc,): Remove.
3111 (the_low_target): Use linux_get_pc_32bit and
3113 * linux-crisv32-low.c (debug_threads): Remove declaration.
3114 (cris_get_pc, cris_set_pc): Remove.
3115 (the_low_target): Use linux_get_pc_32bit and
3117 * linux-low.c: Include inttypes.h.
3118 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3119 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3120 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3121 (the_low_target): Use linux_get_pc_32bit and
3123 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3124 (the_low_target): Use linux_get_pc_32bit and
3126 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3127 (the_low_target): Use linux_get_pc_32bit and
3129 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3130 (the_low_target): Use linux_get_pc_32bit and
3132 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3133 (the_low_target): Use linux_get_pc_32bit and
3136 2016-01-18 Gary Benson <gbenson@redhat.com>
3138 * configure.ac (AC_FUNC_FORK): New check.
3139 * config.in: Regenerate.
3140 * configure: Likewise.
3142 2016-01-14 Yao Qi <yao.qi@linaro.org>
3144 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3145 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3146 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3147 arm_get_next_pcs_ctor.
3149 2016-01-12 Josh Stone <jistone@redhat.com>
3150 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3152 * inferiors.h: Include "gdb_vecs.h".
3153 (struct process_info): Add syscalls_to_catch.
3154 * inferiors.c (remove_process): Free syscalls_to_catch.
3155 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3156 syscall_return stops.
3157 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3158 * server.c (handle_general_set): Handle QCatchSyscalls.
3159 (handle_query): Report support for QCatchSyscalls.
3160 * target.h (struct target_ops): Add supports_catch_syscall.
3161 (target_supports_catch_syscall): New macro.
3162 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3163 (struct lwp_info): Add syscall_state.
3164 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3165 Maintain syscall_state and syscalls_to_catch across exec.
3166 (get_syscall_trapinfo): New function, proxy to the_low_target.
3167 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3168 (linux_low_filter_event): Toggle syscall_state entry/return for
3169 syscall traps, and set it ignored for all others.
3170 (gdb_catching_syscalls_p): New function.
3171 (gdb_catch_this_syscall_p): New function.
3172 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3173 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3174 (linux_supports_catch_syscall): New function.
3175 (linux_target_ops): Install it.
3176 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3177 (the_low_target): Install it.
3179 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3181 * acinclude.m4: Include new ../warning.m4 file.
3182 * configure: Regenerated.
3183 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3185 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3187 * ax.c (is_goto_target): Mark static.
3188 * linux-low.c (register_addr): Likewise.
3189 (linux_fetch_registers, linux_store_registers): Likewise.
3190 * mem-break.c (any_persistent_commands): Fix old prototype.
3191 (add_commands_to_breakpoint): Mark static.
3192 * regcache.c (find_register_by_name): Delete unused func.
3193 * remote-utils.c (hex_or_minus_one): Mark static.
3194 * server.c (monitor_show_help): Mark static.
3195 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3196 handle_v_requests): Likewise.
3198 2016-01-12 Pedro Alves <palves@redhat.com>
3200 Remove use of the registered trademark symbol throughout.
3202 2016-01-08 Yao Qi <yao.qi@linaro.org>
3204 * remote-utils.c (getpkt): If c is '\003', call target hook
3207 2016-01-06 Yao Qi <yao.qi@linaro.org>
3209 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3210 linux-aarch32-low.c.
3211 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3212 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3213 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3214 (thumb2_breakpoint): Declare.
3215 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3216 linux-aarch32-low.h.
3217 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3218 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3219 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3221 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3223 * gdbreplay.c (gdbreplay_version): Change copyright year in
3225 * server.c (gdbserver_version): Likewise.
3227 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3229 * server.c (crc32_table): Delete.
3230 (crc32): Use libiberty's xcrc32 function.
3232 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3234 * lynx-low.c (lynx_delete_thread_callback): New function.
3235 (lynx_mourn): Properly delete our process and all of its
3236 threads. Remove call to clear_inferiors.
3238 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3240 * target.c (thread_search_callback): Add check that
3241 the thread_stopped target callback is not NULL before
3244 2015-12-21 Yao Qi <yao.qi@linaro.org>
3246 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3249 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3251 * server.c (handle_query): Call target_supports_software_single_step.
3253 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3255 * linux-low.c (single_step): New function.
3256 (linux_resume_one_lwp_throw): Call single_step.
3257 (start_step_over): Likewise.
3259 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3261 * Makefile.in (SFILES): Append arch/arm-linux.c,
3262 arch/arm-get-next-pcs.c.
3263 (arm-linux.o): New rule.
3264 (arm-get-next-pcs.o): New rule.
3265 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3267 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3268 to linux-aarch32-low.c.
3269 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3270 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3271 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3272 (thumb2_breakpoint_len): Likewise.
3273 (arm_is_thumb_mode): Make non-static.
3274 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3275 from linux-aarch32-low.c.
3276 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3277 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3278 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3279 (thumb2_breakpoint_len): Likewise.
3280 (arm_is_thumb_mode): New declaration.
3281 * linux-arm-low.c: Include arch/arm-linux.h
3282 aarch/arm-get-next-pcs.h, sys/syscall.h.
3283 (get_next_pcs_ops): New struct.
3284 (get_next_pcs_addr_bits_remove): New function.
3285 (get_next_pcs_is_thumb): New function.
3286 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3287 (arm_sigreturn_next_pc): Likewise.
3288 (get_next_pcs_syscall_next_pc): Likewise.
3289 (arm_gdbserver_get_next_pcs): Likewise.
3290 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3292 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3293 * server.h: Include gdb_vecs.h.
3295 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3297 * Makefile.in (SFILES): Append common/common-regcache.c.
3298 (OBS): Append common-regcache.o.
3299 (common-regcache.o): New rule.
3300 * regcache.c (init_register_cache): Initialize cache to
3302 (regcache_raw_read_unsigned): New function.
3303 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3304 register_status enum.
3306 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3308 * linux-aarch64-low.c (the_low_targets): Rename
3309 breakpoint_reinsert_addr to get_next_pcs.
3310 * linux-arm-low.c (the_low_targets): Likewise.
3311 * linux-bfin-low.c (the_low_targets): Likewise.
3312 * linux-cris-low.c (the_low_targets): Likewise.
3313 * linux-crisv32-low.c (the_low_targets): Likewise.
3314 * linux-low.c (can_software_single_step): Likewise.
3315 (install_software_single_step_breakpoints): New function.
3316 (start_step_over): Use install_software_single_step_breakpoints.
3317 * linux-low.h: New CORE_ADDR vector.
3318 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3320 * linux-mips-low.c (the_low_targets): Likewise.
3321 * linux-nios2-low.c (the_low_targets): Likewise.
3322 * linux-sparc-low.c (the_low_targets): Likewise.
3324 2015-12-17 Pedro Alves <palves@redhat.com>
3326 * linux-low.c (linux_kill_one_lwp): Remove references to
3328 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3330 (linux_init_signals): Delete.
3331 (initialize_low): Adjust.
3332 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3334 2015-12-16 Pedro Alves <palves@redhat.com>
3336 * configure.ac (compiler warning flags): When testing a
3337 -Wno-foo option, check whether -Wfoo works instead.
3338 * configure: Regenerate.
3340 2015-12-11 Don Breazeal <donb@codesourcery.com>
3342 * server.c (process_serial_event): Don't exit from gdbserver
3343 in remote mode if there are still active inferiors.
3345 2015-12-11 Yao Qi <yao.qi@linaro.org>
3347 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3348 arm_breakpoint_at if the process is 32-bit.
3350 2015-12-11 Yao Qi <yao.qi@linaro.org>
3352 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3355 2015-12-07 Yao Qi <yao.qi@linaro.org>
3357 * configure.srv: Append arm.o to srv_tgtobj for
3358 aarch64*-*-linux* target.
3359 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3360 from linux-arm-low.c.
3361 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3362 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3363 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3364 (thumb2_breakpoint_len): Likewise.
3365 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3366 (arm_breakpoint_kinds): Likewise.
3367 (arm_breakpoint_kind_from_pc): Likewise.
3368 (arm_sw_breakpoint_from_kind): Likewise.
3369 (arm_breakpoint_kind_from_current_state): Likewise.
3370 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3371 (arm_sw_breakpoint_from_kind): Declare.
3372 (arm_breakpoint_kind_from_current_state): Declare.
3373 (arm_breakpoint_at): Declare.
3374 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3375 arm_sw_breakpoint_from_kind if process is 32-bit.
3376 (aarch64_breakpoint_kind_from_pc): New function.
3377 (aarch64_breakpoint_kind_from_current_state): New function.
3378 (the_low_target): Initialize fields breakpoint_kind_from_pc
3379 and breakpoint_kind_from_current_state.
3380 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3381 linux-aarch32-low.c.
3382 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3383 (arm_breakpoint, arm_breakpoint_len): Likewise.
3384 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3385 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3386 (arm_is_thumb_mode): Likewise.
3387 (arm_breakpoint_at): Likewise.
3388 (arm_breakpoint_kind_from_pc): Likewise.
3389 (arm_sw_breakpoint_from_kind): Likewise.
3390 (arm_breakpoint_kind_from_current_state): Likewise.
3393 2015-08-04 Yao Qi <yao.qi@linaro.org>
3395 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3396 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3397 * server.c (extended_protocol): Remove "static".
3398 * server.h (extended_protocol): Declare it.
3400 2015-12-04 Josh Stone <jistone@redhat.com>
3402 * target.h (struct target_ops) <arch_setup>: Rename to ...
3403 (struct target_ops) <post_create_inferior>: ... this.
3404 (target_arch_setup): Rename to ...
3405 (target_post_create_inferior): ... this, calling post_create_inferior.
3406 * server.c (start_inferior): Update target_arch_setup calls to
3407 target_post_create_inferior.
3408 * linux-low.c (linux_low_ptrace_options): Forward declare.
3409 (linux_arch_setup): Update its comment for general use.
3410 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3411 (struct linux_target_ops): Use linux_post_create_inferior.
3412 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3413 to post_create_inferior.
3414 * nto-low.c (struct nto_target_ops): Likewise.
3415 * spu-low.c (struct spu_target_ops): Likewise.
3416 * win32-low.c (struct win32_target_ops): Likewise.
3418 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3420 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3422 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3424 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3425 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3426 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3427 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3428 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3429 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3430 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3431 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3432 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3433 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3434 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3435 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3437 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3439 * linux-low.c (linux_look_up_symbols): Don't call
3440 linux_supports_traceclone.
3441 * linux-low.h (thread_db_init): Remove use_events argument.
3442 * thread-db.c (thread_db_use_event): Remove global variable.
3443 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3444 (struct thread_db) <td_create_bp>: Remove field.
3445 (thread_db_create_event): Remove function.
3446 (thread_db_enable_reporting): Likewise.
3447 (find_one_thread): Don't check for thread_db_use_events.
3448 (attach_thread): Likewise.
3449 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3450 (try_thread_db_load_1): Don't check for thread_db_use_events.
3451 (thread_db_init): Remove use_events argument and thread events
3453 (remove_thread_event_breakpoints): Remove function.
3454 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3456 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3458 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3460 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3461 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3462 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3463 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3464 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3466 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3468 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3469 * linux-low.c (can_hardware_single_step): Use
3470 supports_hardware_single_step.
3471 (can_software_single_step): New function.
3472 (start_step_over): Call can_software_single_step.
3473 (linux_supports_hardware_single_step): New function.
3474 (struct target_ops) <supports_software_single_step>: Initialize.
3475 * linux-low.h (struct linux_target_ops)
3476 <supports_hardware_single_step>: Initialize.
3477 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3478 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3479 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3480 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3481 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3482 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3483 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3484 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3485 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3486 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3488 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3489 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3491 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3492 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3493 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3495 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3496 * target.h (struct target_ops): <supports_software_single_step>:
3498 (target_supports_software_single_step): New macro.
3500 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3502 * linux-low.c (linux_wait_1): Fix pc advance condition.
3503 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3504 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3506 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3508 * linux-arm-low.c (arm_is_thumb_mode): New function.
3509 (arm_breakpoint_at): Use arm_is_thumb_mode.
3510 (arm_breakpoint_kind_from_current_state): New function.
3511 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3513 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3514 (linux_breakpoint_kind_from_current_state): New function.
3515 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3516 * linux-low.h (struct linux_target_ops)
3517 <breakpoint_kind_from_current_state>: New field.
3518 * target.h (struct target_ops): Likewise.
3519 (target_breakpoint_kind_from_current_state): New macro.
3521 2015-11-30 Pedro Alves <palves@redhat.com>
3523 * linux-low.c (linux_resume): Wake up the event loop before
3526 2015-11-30 Pedro Alves <palves@redhat.com>
3528 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3530 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3532 * target.c (struct thread_search): New structure.
3533 (thread_search_callback): New function.
3534 (prev_general_thread): New global.
3535 (prepare_to_access_memory, done_accessing_memory): New functions.
3536 * target.h (prepare_to_access_memory, done_accessing_memory):
3537 Replace macros with function declarations.
3539 2015-11-30 Pedro Alves <palves@redhat.com>
3542 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3543 report TARGET_WAITKIND_NO_RESUMED.
3544 * remote-utils.c (prepare_resume_reply): Handle
3545 TARGET_WAITKIND_NO_RESUMED.
3546 * server.c (report_no_resumed): New global.
3547 (handle_query) <qSupported>: Handle "no-resumed+". Report
3548 "no-resumed+" support.
3549 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3550 return error if the client doesn't support no-resumed events.
3551 (push_stop_notification): New function.
3552 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3553 events if the client supports them.
3555 2015-11-30 Pedro Alves <palves@redhat.com>
3557 * linux-low.c (thread_still_has_status_pending_p): Don't check
3559 (lwp_resumed): New function.
3560 (status_pending_p_callback): Return early if the LWP is not
3561 supposed to be resumed.
3563 2015-11-30 Pedro Alves <palves@redhat.com>
3565 * linux-low.c (handle_extended_wait): Assert that the LWP's
3566 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3567 thread create events, leave the new child's status pending.
3568 (linux_low_filter_event): If GDB wants to hear about thread exit
3569 events, leave the LWP marked dead and don't delete it.
3570 (linux_wait_for_event_filtered): Don't check for thread exit.
3571 (filter_exit_event): New function.
3572 (linux_wait_1): Use it, when returning an exit event.
3573 (linux_resume_one_lwp_throw): Assert that the LWP's
3574 waitstatus is TARGET_WAITKIND_IGNORE.
3575 * remote-utils.c (prepare_resume_reply): Handle
3576 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3577 * server.c (report_thread_events): New global.
3578 (handle_general_set): Handle QThreadEvents.
3579 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3580 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3581 TARGET_WAITKIND_THREAD_EXITED.
3582 * server.h (report_thread_events): Declare.
3584 2015-11-30 Pedro Alves <palves@redhat.com>
3586 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3587 the thread's last_resume_kind was resume_stop.
3589 2015-11-30 Pedro Alves <palves@redhat.com>
3591 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3594 2015-11-30 Pedro Alves <palves@redhat.com>
3596 * server.c (handle_v_requests): Handle vCtrlC.
3598 2015-11-30 Pedro Alves <palves@redhat.com>
3600 * gdbthread.h (find_any_thread_of_pid): Declare.
3601 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3603 * server.c (handle_query): If current_thread is NULL, look for
3604 another thread of the selected process.
3606 2015-11-26 Daniel Colascione <dancol@dancol.org>
3607 Simon Marchi <simon.marchi@ericsson.com>
3609 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3610 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3612 * target.h (struct target_ops) <thread_name>: New field.
3613 (target_thread_name): New macro.
3615 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3617 * regcache.h (regcache_invalidate_pid): Add declaration.
3618 * regcache.c (regcache_invalidate_pid): New function, extracted
3619 from regcache_invalidate.
3620 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3621 Add trivial documentation comment.
3622 * lynx-low.c: Use regcache_invalidate_pid instead of
3623 regcache_invalidate.
3625 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3627 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3628 and Elf64_auxv_t if the target is Android.
3630 2015-11-22 Doug Evans <xdje42@gmail.com>
3632 * target.h: #include <sys/types.h>.
3634 2015-11-19 Pedro Alves <palves@redhat.com>
3636 * linux-low.c (linux_process_qsupported): Change prototype.
3638 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3640 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3641 and adjust to loop over all features.
3642 * server.c (handle_query) <qSupported>: Adjust to call
3643 target_process_qsupported once, passing it a vector of unprocessed
3645 * target.h (struct target_ops) <process_qsupported>: Change
3647 (target_process_qsupported): Adjust.
3649 2015-11-19 Pedro Alves <palves@redhat.com>
3651 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3653 * configure: Regenerate.
3655 2015-11-19 Pedro Alves <palves@redhat.com>
3657 * configure: Regenerate.
3659 2015-11-19 Yao Qi <yao.qi@linaro.org>
3661 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3664 2015-11-19 Yao Qi <yao.qi@linaro.org>
3666 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3667 (struct aarch64_operand): Move enum out.
3669 2015-11-19 Yao Qi <yao.qi@linaro.org>
3671 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3672 struct user_fpsimd_state *.
3673 (aarch64_store_fpregset): Likewise.
3675 2015-11-19 Yao Qi <yao.qi@linaro.org>
3677 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3678 struct user_pt_regs *.
3679 (aarch64_store_gregset): Likewise.
3681 2015-11-18 Pedro Alves <palves@redhat.com>
3683 * Makefile.in (all_object_files): Add $IPA_OBJS.
3685 2015-11-17 Pedro Alves <palves@redhat.com>
3687 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3688 GDB_SIGNAL_0 and gdb_signal_to_string.
3690 2015-11-17 Pedro Alves <palves@redhat.com>
3692 * win32-low.c (handle_output_debug_string): Remove parameter.
3693 (win32_kill): Remove our_status local and adjust call to
3694 handle_output_debug_string.
3695 (get_child_debug_event): Adjust call to
3696 handle_output_debug_string.
3698 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3700 * linux-mips-low.c (mips_fill_gregset): Add cast.
3701 (mips_store_gregset): Likewise.
3702 (mips_fill_fpregset): Likewise.
3703 (mips_store_fpregset): Likewise.
3705 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3707 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3710 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3712 * linux-mips-low.c (mips_linux_new_thread): Change type of
3713 watch_type to enum target_hw_bp_type.
3715 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3717 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3718 Change return type to arm_hwbp_type.
3720 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3722 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3723 (arm_store_gregset): Likewise.
3724 * linux-arm-low.c (arm_get_hwcap): Likewise.
3725 (arm_read_description): Likewise.
3727 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3729 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3731 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3733 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3734 (ppc_fill_vsxregset): Likewise.
3735 (ppc_store_vsxregset): Likewise.
3736 (ppc_fill_vrregset): Likewise.
3737 (ppc_store_vrregset): Likewise.
3738 (ppc_fill_evrregset): Likewise.
3739 (ppc_store_evrregset): Likewise.
3741 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3743 * linux-ppc-low.c (ppc_usrregs_info): Remove
3744 forward-declaration.
3745 (ppc_arch_setup): Move lower in file.
3747 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3749 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3750 (ps_pdwrite): Likewise.
3752 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3754 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3755 to after assert checks.
3757 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3759 * proc-service.c (ps_pdread): Add/adjust casts.
3760 (ps_pdwrite): Add/adjust casts.
3762 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3764 * server.c (handle_search_memory_1): Cast return value of
3767 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3769 * server.c (write_qxfer_response): Change type of data to
3772 2015-10-29 Pedro Alves <palves@redhat.com>
3774 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3776 2015-10-29 Pedro Alves <palves@redhat.com>
3778 * tracepoint.c (clear_installed_tracepoints): Add casts.
3780 2015-10-29 Pedro Alves <palves@redhat.com>
3782 * server.c (handle_v_cont, process_serial_event): Add enum
3783 gdb_signal casts to signal parsing code.
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-29 Pedro Alves <palves@redhat.com>
3805 * linux-low.h (NULL_REGSET): Define.
3806 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3807 * linux-arm-low.c (arm_regsets): Likewise.
3808 * linux-crisv32-low.c (cris_regsets): Likewise.
3809 * linux-m68k-low.c (m68k_regsets): Likewise.
3810 * linux-mips-low.c (mips_regsets): Likewise.
3811 * linux-nios2-low.c (nios2_regsets): Likewise.
3812 * linux-ppc-low.c (ppc_regsets): Likewise.
3813 * linux-s390-low.c (s390_regsets): Likewise.
3814 * linux-sh-low.c (sh_regsets): Likewise.
3815 * linux-sparc-low.c (sparc_regsets): Likewise.
3816 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3817 * linux-tile-low.c (tile_regsets): Likewise.
3818 * linux-x86-low.c (x86_regsets): Likewise.
3819 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3821 2015-10-26 Doug Evans <dje@google.com>
3823 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3825 2015-10-26 Doug Evans <dje@google.com>
3827 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3829 2015-10-26 Doug Evans <dje@google.com>
3831 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3833 (attach_thread, find_new_threads_callback): Ditto.
3835 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3837 * mem-break.h (set_breakpoint_data): Remove.
3839 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3841 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3842 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3843 (initialize_low): Remove set_breakpoint_data call.
3844 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3845 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3846 (initialize_low): Remove set_breakpoint_data call.
3847 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3848 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3849 (initialize_low): Remove set_breakpoint_data call.
3851 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3853 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3854 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3855 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3856 * target.h (target_breakpoint_kind_from_pc): New macro.
3858 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3860 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3861 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3862 the default breakpoint kind.
3864 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3866 * linux-arm-low.c (arm_supports_z_point_type): Add software
3869 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3871 * linux-arm-low.c: Refactor breakpoint definitions.
3872 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3873 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3875 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3877 * Makefile.in: Add arm.c/o.
3878 * configure.srv: Likewise.
3879 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3880 (arm_breakpoint_kind_from_pc): New function.
3881 (arm_sw_breakpoint_from_kind): Return proper kind.
3882 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3884 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3886 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3888 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3889 (struct raw_breakpoint) <size>: Remove.
3890 (struct raw_breakpoint) <kind>: Add.
3891 (bp_size): New function.
3892 (bp_opcode): Likewise.
3893 (find_raw_breakpoint_at): Adjust for kind.
3894 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3895 (remove_memory_breakpoint): Adjust for kind call bp_size.
3896 (set_raw_breakpoint_at): Adjust for kind.
3897 (set_breakpoint): Likewise.
3898 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3899 (delete_raw_breakpoint): Adjust for kind.
3900 (delete_breakpoint): Likewise.
3901 (find_gdb_breakpoint): Likewise.
3902 (set_gdb_breakpoint_1): Likewise.
3903 (set_gdb_breakpoint): Likewise.
3904 (delete_gdb_breakpoint_1): Likewise.
3905 (delete_gdb_breakpoint): Likewise.
3906 (uninsert_raw_breakpoint): Likewise.
3907 (reinsert_raw_breakpoint): Likewise.
3908 (set_breakpoint_data): Remove.
3909 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3910 (check_mem_read): Adjust for kind call bp_size.
3911 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3912 (clone_one_breakpoint): Adjust for kind.
3913 * mem-break.h (set_gdb_breakpoint): Likewise.
3914 (delete_gdb_breakpoint): Likewise.
3915 * server.c (process_serial_event): Likewise.
3917 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3919 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3920 (struct linux_target_ops) <breakpoint>: Remove.
3921 (struct linux_target_ops) <breakpoint_len>: Remove.
3922 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3923 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3924 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3925 (arm_sw_breakpoint_from_kind): New function.
3926 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3927 (struct linux_target_ops) <breakpoint>: Remove.
3928 (struct linux_target_ops) <breakpoint_len>: Remove.
3929 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3930 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3931 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3932 (struct linux_target_ops) <breakpoint>: Remove.
3933 (struct linux_target_ops) <breakpoint_len>: Remove.
3934 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3935 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3936 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3937 (struct linux_target_ops) <breakpoint>: Remove.
3938 (struct linux_target_ops) <breakpoint_len>: Remove.
3939 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3940 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3941 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3942 and sw_breakpoint_from_kind to increment the pc.
3943 (linux_breakpoint_kind_from_pc): New function.
3944 (linux_sw_breakpoint_from_kind): New function.
3945 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3946 (initialize_low): Call breakpoint_kind_from_pc and
3947 sw_breakpoint_from_kind to replace breakpoint_data/len.
3948 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3950 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3951 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3952 (struct linux_target_ops) <breakpoint>: Remove.
3953 (struct linux_target_ops) <breakpoint_len>: Remove.
3954 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3955 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3956 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3957 (struct linux_target_ops) <breakpoint>: Remove.
3958 (struct linux_target_ops) <breakpoint_len>: Remove.
3959 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3960 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3961 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3962 (struct linux_target_ops) <breakpoint>: Remove.
3963 (struct linux_target_ops) <breakpoint_len>: Remove.
3964 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3965 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3966 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3967 (struct linux_target_ops) <breakpoint>: Remove.
3968 (struct linux_target_ops) <breakpoint_len>: Remove.
3969 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3970 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3971 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3972 (struct linux_target_ops) <breakpoint>: Remove.
3973 (struct linux_target_ops) <breakpoint_len>: Remove.
3974 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3975 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3976 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3977 (struct linux_target_ops) <breakpoint>: Remove.
3978 (struct linux_target_ops) <breakpoint_len>: Remove.
3979 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3980 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3981 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3982 (struct linux_target_ops) <breakpoint>: Remove.
3983 (struct linux_target_ops) <breakpoint_len>: Remove.
3984 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3985 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3986 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3987 (struct linux_target_ops) <breakpoint>: Remove.
3988 (struct linux_target_ops) <breakpoint_len>: Remove.
3989 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3990 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3991 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3992 (struct linux_target_ops) <breakpoint>: Remove.
3993 (struct linux_target_ops) <breakpoint_len>: Remove.
3994 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3995 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3996 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3997 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3998 (struct linux_target_ops) <breakpoint>: Remove.
3999 (struct linux_target_ops) <breakpoint_len>: Remove.
4000 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4001 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4002 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4003 (struct linux_target_ops) <breakpoint>: Remove.
4004 (struct linux_target_ops) <breakpoint_len>: Remove.
4005 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4006 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4008 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4010 * linux-cris-low.c (cris_get_pc): Remove void arg.
4012 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4014 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4017 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4019 * inferiors.c (thread_pid_matches_callback): New function.
4020 (find_thread_process): New function.
4021 (remove_thread): Reset current_thread.
4022 (remove_process): Assert threads have been removed first.
4024 2015-10-15 Yao Qi <yao.qi@linaro.org>
4026 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4028 (aarch64_remove_point): Likewise.
4029 * regcache.c (regcache_register_size): New function.
4031 2015-10-12 Yao Qi <yao.qi@linaro.org>
4033 * linux-aarch64-low.c: Update all callers as emit_load_store
4034 is renamed to aarch64_emit_load_store.
4036 2015-10-12 Yao Qi <yao.qi@linaro.org>
4038 * linux-aarch64-low.c: Update all callers of function renaming
4039 from emit_insn to aarch64_emit_insn.
4041 2015-10-12 Yao Qi <yao.qi@linaro.org>
4043 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4044 arch/aarch64-insn.h.
4045 (struct aarch64_memory_operand): Likewise.
4047 (emit_insn): Move to arch/aarch64-insn.c.
4048 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4049 (emit_load_store): Move to arch/aarch64-insn.c.
4050 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4051 (can_encode_int32): Remove.
4053 2015-10-12 Yao Qi <yao.qi@linaro.org>
4055 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4056 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4057 (aarch64_relocate_instruction): Likewise.
4058 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4059 (struct aarch64_insn_visitor): Likewise.
4061 2015-10-12 Yao Qi <yao.qi@linaro.org>
4063 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4064 (struct aarch64_insn_visitor): New.
4065 (struct aarch64_insn_relocation_data): New.
4066 (aarch64_ftrace_insn_reloc_b): New function.
4067 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4068 (aarch64_ftrace_insn_reloc_cb): Likewise.
4069 (aarch64_ftrace_insn_reloc_tb): Likewise.
4070 (aarch64_ftrace_insn_reloc_adr): Likewise.
4071 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4072 (aarch64_ftrace_insn_reloc_others): Likewise.
4074 (aarch64_relocate_instruction): Use visitor.
4076 2015-10-12 Yao Qi <yao.qi@linaro.org>
4078 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4079 int. Add argument buf.
4080 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4081 aarch64_relocate_instruction.
4083 2015-10-12 Yao Qi <yao.qi@linaro.org>
4085 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4086 argument insn. Remove local variable insn. Don't call
4088 (aarch64_install_fast_tracepoint_jump_pad): Call
4091 2015-09-30 Yao Qi <yao.qi@linaro.org>
4093 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4094 (emit_load_store_pair): Likewise.
4096 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4098 * dll.c (match_dll): Add cast(s).
4099 (unloaded_dll): Likewise.
4100 * linux-low.c (second_thread_of_pid_p): Likewise.
4101 (delete_lwp_callback): Likewise.
4102 (count_events_callback): Likewise.
4103 (select_event_lwp_callback): Likewise.
4104 (linux_set_resume_request): Likewise.
4105 * server.c (accumulate_file_name_length): Likewise.
4106 (emit_dll_description): Likewise.
4107 (handle_qxfer_threads_worker): Likewise.
4108 (visit_actioned_threads): Likewise.
4109 * thread-db.c (any_thread_of): Likewise.
4110 * tracepoint.c (same_process_p): Likewise.
4111 (match_blocktype): Likewise.
4112 (build_traceframe_info_xml): Likewise.
4114 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4116 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4118 (gdb_unparse_agent_expr): Likewise.
4119 * hostio.c (require_data): Likewise.
4120 (handle_pread): Likewise.
4121 * linux-low.c (disable_regset): Likewise.
4122 (fetch_register): Likewise.
4123 (store_register): Likewise.
4124 (get_dynamic): Likewise.
4125 (linux_qxfer_libraries_svr4): Likewise.
4126 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4127 (set_fast_tracepoint_jump): Likewise.
4128 (uninsert_fast_tracepoint_jumps_at): Likewise.
4129 (reinsert_fast_tracepoint_jumps_at): Likewise.
4130 (validate_inserted_breakpoint): Likewise.
4131 (clone_agent_expr): Likewise.
4132 * regcache.c (init_register_cache): Likewise.
4133 * remote-utils.c (putpkt_binary_1): Likewise.
4134 (decode_M_packet): Likewise.
4135 (decode_X_packet): Likewise.
4136 (look_up_one_symbol): Likewise.
4137 (relocate_instruction): Likewise.
4138 (monitor_output): Likewise.
4139 * server.c (handle_search_memory): Likewise.
4140 (handle_qxfer_exec_file): Likewise.
4141 (handle_qxfer_libraries): Likewise.
4142 (handle_qxfer): Likewise.
4143 (handle_query): Likewise.
4144 (handle_v_cont): Likewise.
4145 (handle_v_run): Likewise.
4146 (captured_main): Likewise.
4147 * target.c (write_inferior_memory): Likewise.
4148 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4149 * tracepoint.c (init_trace_buffer): Likewise.
4150 (add_tracepoint_action): Likewise.
4151 (add_traceframe): Likewise.
4152 (add_traceframe_block): Likewise.
4153 (cmd_qtdpsrc): Likewise.
4154 (cmd_qtdv): Likewise.
4155 (cmd_qtstatus): Likewise.
4156 (response_source): Likewise.
4157 (response_tsv): Likewise.
4158 (cmd_qtnotes): Likewise.
4159 (gdb_collect): Likewise.
4160 (initialize_tracepoint): Likewise.
4162 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4164 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4165 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4166 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4168 (enum aarch64_condition_codes): New enum.
4169 (w0): New static global.
4172 (struct aarch64_memory_operand) <type>: New
4173 MEMORY_OPERAND_POSTINDEX type.
4174 (postindex_memory_operand): New helper function.
4175 (emit_ret): New function.
4176 (emit_load_store_pair): New function, factored out of emit_stp
4177 with support for MEMORY_OPERAND_POSTINDEX.
4178 (emit_stp): Rewrite using emit_load_store_pair.
4179 (emit_ldp): New function.
4180 (emit_load_store): Likewise.
4181 (emit_ldr): Mention post-index instruction in comment.
4182 (emit_ldrh): New function.
4183 (emit_ldrb): New function.
4184 (emit_ldrsw): Mention post-index instruction in comment.
4185 (emit_str): Likewise.
4186 (emit_subs): New function.
4187 (emit_cmp): Likewise.
4188 (emit_and): Likewise.
4189 (emit_orr): Likewise.
4190 (emit_orn): Likewise.
4191 (emit_eor): Likewise.
4192 (emit_mvn): Likewise.
4193 (emit_lslv): Likewise.
4194 (emit_lsrv): Likewise.
4195 (emit_asrv): Likewise.
4196 (emit_mul): Likewise.
4197 (emit_sbfm): Likewise.
4198 (emit_sbfx): Likewise.
4199 (emit_ubfm): Likewise.
4200 (emit_ubfx): Likewise.
4201 (emit_csinc): Likewise.
4202 (emit_cset): Likewise.
4203 (emit_nop): Likewise.
4204 (emit_ops_insns): New helper function.
4205 (emit_pop): Likewise.
4206 (emit_push): Likewise.
4207 (aarch64_emit_prologue): New function.
4208 (aarch64_emit_epilogue): Likewise.
4209 (aarch64_emit_add): Likewise.
4210 (aarch64_emit_sub): Likewise.
4211 (aarch64_emit_mul): Likewise.
4212 (aarch64_emit_lsh): Likewise.
4213 (aarch64_emit_rsh_signed): Likewise.
4214 (aarch64_emit_rsh_unsigned): Likewise.
4215 (aarch64_emit_ext): Likewise.
4216 (aarch64_emit_log_not): Likewise.
4217 (aarch64_emit_bit_and): Likewise.
4218 (aarch64_emit_bit_or): Likewise.
4219 (aarch64_emit_bit_xor): Likewise.
4220 (aarch64_emit_bit_not): Likewise.
4221 (aarch64_emit_equal): Likewise.
4222 (aarch64_emit_less_signed): Likewise.
4223 (aarch64_emit_less_unsigned): Likewise.
4224 (aarch64_emit_ref): Likewise.
4225 (aarch64_emit_if_goto): Likewise.
4226 (aarch64_emit_goto): Likewise.
4227 (aarch64_write_goto_address): Likewise.
4228 (aarch64_emit_const): Likewise.
4229 (aarch64_emit_call): Likewise.
4230 (aarch64_emit_reg): Likewise.
4231 (aarch64_emit_pop): Likewise.
4232 (aarch64_emit_stack_flush): Likewise.
4233 (aarch64_emit_zero_ext): Likewise.
4234 (aarch64_emit_swap): Likewise.
4235 (aarch64_emit_stack_adjust): Likewise.
4236 (aarch64_emit_int_call_1): Likewise.
4237 (aarch64_emit_void_call_2): Likewise.
4238 (aarch64_emit_eq_goto): Likewise.
4239 (aarch64_emit_ne_goto): Likewise.
4240 (aarch64_emit_lt_goto): Likewise.
4241 (aarch64_emit_le_goto): Likewise.
4242 (aarch64_emit_gt_goto): Likewise.
4243 (aarch64_emit_ge_got): Likewise.
4244 (aarch64_emit_ops_impl): New static global variable.
4245 (aarch64_emit_ops): New target function, return
4246 &aarch64_emit_ops_impl.
4247 (struct linux_target_ops): Install it.
4249 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4251 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4252 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4254 * linux-aarch64-ipa.c: New file.
4255 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4257 (aarch64_get_thread_area): New target method.
4258 (extract_signed_bitfield): New helper function.
4259 (aarch64_decode_ldr_literal): New function.
4260 (enum aarch64_opcodes): New enum.
4261 (struct aarch64_register): New struct.
4262 (struct aarch64_operand): New struct.
4263 (x0): New static global.
4272 (aarch64_register): New helper function.
4273 (register_operand): Likewise.
4274 (immediate_operand): Likewise.
4275 (struct aarch64_memory_operand): New struct.
4276 (offset_memory_operand): New helper function.
4277 (preindex_memory_operand): Likewise.
4278 (enum aarch64_system_control_registers): New enum.
4279 (ENCODE): New macro.
4280 (emit_insn): New helper function.
4281 (emit_b): New function.
4282 (emit_bcond): Likewise.
4283 (emit_cb): Likewise.
4284 (emit_tb): Likewise.
4285 (emit_blr): Likewise.
4286 (emit_stp): Likewise.
4287 (emit_ldp_q_offset): Likewise.
4288 (emit_stp_q_offset): Likewise.
4289 (emit_load_store): Likewise.
4290 (emit_ldr): Likewise.
4291 (emit_ldrsw): Likewise.
4292 (emit_str): Likewise.
4293 (emit_ldaxr): Likewise.
4294 (emit_stxr): Likewise.
4295 (emit_stlr): Likewise.
4296 (emit_data_processing_reg): Likewise.
4297 (emit_data_processing): Likewise.
4298 (emit_add): Likewise.
4299 (emit_sub): Likewise.
4300 (emit_mov): Likewise.
4301 (emit_movk): Likewise.
4302 (emit_mov_addr): Likewise.
4303 (emit_mrs): Likewise.
4304 (emit_msr): Likewise.
4305 (emit_sevl): Likewise.
4306 (emit_wfe): Likewise.
4307 (append_insns): Likewise.
4308 (can_encode_int32_in): New helper function.
4309 (aarch64_relocate_instruction): New function.
4310 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4311 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4312 (struct linux_target_ops): Install aarch64_get_thread_area,
4313 aarch64_install_fast_tracepoint_jump_pad and
4314 aarch64_get_min_fast_tracepoint_insn_len.
4316 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4318 * Makefile.in (aarch64-insn.o): New rule.
4319 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4321 2015-09-21 Yao Qi <yao.qi@linaro.org>
4323 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4325 2015-09-21 Yao Qi <yao.qi@linaro.org>
4327 * tracepoint.c (max_jump_pad_size): Remove.
4329 2015-09-18 Yao Qi <yao.qi@linaro.org>
4331 * linux-aarch64-low.c: Don't include sys/uio.h.
4332 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4334 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4336 * tracepoint.c (eval_result_type): Change prototype.
4337 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4339 2015-09-15 Pedro Alves <palves@redhat.com>
4341 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4342 Check whether to report exec events instead of checking whether
4343 multiprocess is enabled.
4345 2015-09-15 Pedro Alves <palves@redhat.com>
4348 * remote-utils.c (prepare_resume_reply): Merge
4349 TARGET_WAITKIND_VFORK_DONE switch case with the
4350 TARGET_WAITKIND_FORKED case.
4352 2015-09-15 Yao Qi <yao.qi@linaro.org>
4354 * server.c (handle_query): Check string comparison using
4355 "else if" instead of "if".
4357 2015-09-15 Yao Qi <yao.qi@linaro.org>
4359 * server.c (vCont_supported): New global variable.
4360 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4361 matches. Append ";vContSupported+" to own_buf.
4362 (handle_v_requests): Append ";s;S" to own_buf if target supports
4363 hardware single step or vCont_supported is false.
4364 (capture_main): Set vCont_supported to zero.
4366 2015-09-15 Yao Qi <yao.qi@linaro.org>
4368 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4370 (linux_supports_hardware_single_step): ... New function.
4371 (linux_target_ops): Update.
4372 * lynx-low.c (lynx_target_ops): Set field
4373 supports_hardware_single_step to target_can_do_hardware_single_step.
4374 * nto-low.c (nto_target_ops): Likewise.
4375 * spu-low.c (spu_target_ops): Likewise.
4376 * win32-low.c (win32_target_ops): Likewise.
4377 * target.c (target_can_do_hardware_single_step): New function.
4378 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4379 Remove. <supports_hardware_single_step>: New field.
4380 (target_supports_conditional_breakpoints): Remove.
4381 (target_supports_hardware_single_step): New macro.
4382 (target_can_do_hardware_single_step): Declare.
4383 * server.c (handle_query): Use target_supports_hardware_single_step
4384 instead of target_supports_conditional_breakpoints.
4386 2015-09-15 Yao Qi <yao.qi@linaro.org>
4388 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4390 (struct linux_target_ops the_low_target): Install
4391 aarch64_linux_siginfo_fixup.
4393 2015-09-11 Don Breazeal <donb@codesourcery.com>
4394 Luis Machado <lgustavo@codesourcery.com>
4396 * linux-low.c (linux_mourn): Static declaration.
4397 (linux_arch_setup): Move in front of
4398 handle_extended_wait.
4399 (linux_arch_setup_thread): New function.
4400 (handle_extended_wait): Handle exec events. Call
4401 linux_arch_setup_thread. Make event_lwp argument a
4402 pointer-to-a-pointer.
4403 (check_zombie_leaders): Do not check stopped threads.
4404 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4405 (linux_low_filter_event): Add lwp and thread for exec'ing
4406 non-leader thread if leader thread has been deleted.
4407 Refactor code into linux_arch_setup_thread and call it.
4408 Pass child lwp pointer by reference to handle_extended_wait.
4409 (linux_wait_for_event_filtered): Update comment.
4410 (linux_wait_1): Prevent clobbering exec event status.
4411 (linux_supports_exec_events): New function.
4412 (linux_target_ops) <supports_exec_events>: Initialize new member.
4413 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4415 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4416 * server.c (report_exec_events): New global variable.
4417 (handle_query): Handle qSupported query for exec-events feature.
4418 (captured_main): Initialize report_exec_events.
4419 * server.h (report_exec_events): Declare new global variable.
4420 * target.h (struct target_ops) <supports_exec_events>: New
4422 (target_supports_exec_events): New macro.
4423 * win32-low.c (win32_target_ops) <supports_exec_events>:
4424 Initialize new member.
4426 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4428 * linux-low.c (linux_low_enable_btrace): Remove.
4429 (linux_target_ops): Replace linux_low_enable_btrace with
4430 linux_enable_btrace.
4432 2015-09-03 Yao Qi <yao.qi@linaro.org>
4434 * linux-aarch64-low.c (aarch64_insert_point): Call
4435 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4438 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4440 * linux-low.c (check_stopped_by_breakpoint): Use
4441 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4443 2015-08-27 Pedro Alves <palves@redhat.com>
4445 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4447 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4449 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4450 the XNEW-family equivalent.
4451 (compile_bytecodes): Likewise.
4452 * dll.c (loaded_dll): Likewise.
4453 * event-loop.c (append_callback_event): Likewise.
4454 (create_file_handler): Likewise.
4455 (create_file_event): Likewise.
4456 * hostio.c (handle_open): Likewise.
4457 * inferiors.c (add_thread): Likewise.
4458 (add_process): Likewise.
4459 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4460 * linux-arm-low.c (arm_new_process): Likewise.
4461 (arm_new_thread): Likewise.
4462 * linux-low.c (add_to_pid_list): Likewise.
4463 (linux_add_process): Likewise.
4464 (handle_extended_wait): Likewise.
4465 (add_lwp): Likewise.
4466 (enqueue_one_deferred_signal): Likewise.
4467 (enqueue_pending_signal): Likewise.
4468 (linux_resume_one_lwp_throw): Likewise.
4469 (linux_resume_one_thread): Likewise.
4470 (linux_read_memory): Likewise.
4471 (linux_write_memory): Likewise.
4472 * linux-mips-low.c (mips_linux_new_process): Likewise.
4473 (mips_linux_new_thread): Likewise.
4474 (mips_add_watchpoint): Likewise.
4475 * linux-x86-low.c (initialize_low_arch): Likewise.
4476 * lynx-low.c (lynx_add_process): Likewise.
4477 * mem-break.c (set_raw_breakpoint_at): Likewise.
4478 (set_breakpoint): Likewise.
4479 (add_condition_to_breakpoint): Likewise.
4480 (add_commands_to_breakpoint): Likewise.
4481 (clone_agent_expr): Likewise.
4482 (clone_one_breakpoint): Likewise.
4483 * regcache.c (new_register_cache): Likewise.
4484 * remote-utils.c (look_up_one_symbol): Likewise.
4485 * server.c (queue_stop_reply): Likewise.
4486 (start_inferior): Likewise.
4487 (queue_stop_reply_callback): Likewise.
4488 (handle_target_event): Likewise.
4489 * spu-low.c (fetch_ppc_memory): Likewise.
4490 (store_ppc_memory): Likewise.
4491 * target.c (set_target_ops): Likewise.
4492 * thread-db.c (thread_db_load_search): Likewise.
4493 (try_thread_db_load_1): Likewise.
4494 * tracepoint.c (add_tracepoint): Likewise.
4495 (add_tracepoint_action): Likewise.
4496 (create_trace_state_variable): Likewise.
4497 (cmd_qtdpsrc): Likewise.
4498 (cmd_qtro): Likewise.
4499 (add_while_stepping_state): Likewise.
4500 * win32-low.c (child_add_thread): Likewise.
4501 (get_image_name): Likewise.
4503 2015-08-25 Yao Qi <yao.qi@linaro.org>
4505 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4507 2015-08-25 Yao Qi <yao.qi@linaro.org>
4509 * Makefile.in (aarch64-linux.o): New rule.
4510 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4512 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4513 (aarch64_init_debug_reg_state): Make it extern.
4514 (aarch64_linux_prepare_to_resume): Remove.
4516 2015-08-25 Yao Qi <yao.qi@linaro.org>
4518 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4519 lwp_arch_private_info and ptid_of_lwp.
4521 2015-08-25 Yao Qi <yao.qi@linaro.org>
4523 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4524 Find proc_info by find_process_pid. All callers updated.
4526 2015-08-25 Yao Qi <yao.qi@linaro.org>
4528 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4530 (debug_reg_change_callback): Remove.
4531 (aarch64_notify_debug_reg_change): Remove.
4533 2015-08-25 Yao Qi <yao.qi@linaro.org>
4535 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4536 Call current_lwp_ptid.
4538 2015-08-25 Yao Qi <yao.qi@linaro.org>
4540 * linux-aarch64-low.c (debug_reg_change_callback): Use
4543 2015-08-25 Yao Qi <yao.qi@linaro.org>
4545 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4547 2015-08-25 Yao Qi <yao.qi@linaro.org>
4549 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4551 2015-08-25 Yao Qi <yao.qi@linaro.org>
4553 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4556 2015-08-25 Yao Qi <yao.qi@linaro.org>
4558 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4560 (debug_reg_change_callback): Remove argument entry and add argument
4561 lwp. Remove local variable thread. Don't print thread id in the
4562 debugging output. Don't check whether pid of thread equals to pid.
4563 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4564 iterate_over_lwps instead find_inferior.
4566 2015-08-24 Pedro Alves <palves@redhat.com>
4568 * inferiors.c (get_first_process): New function.
4569 * inferiors.h (get_first_process): New declaration.
4570 * remote-utils.c (read_ptid): Default to the first process in the
4571 list, instead of to the current thread's process.
4573 2015-08-24 Pedro Alves <palves@redhat.com>
4575 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4576 * event-loop.c: Likewise.
4577 * remote-utils.c: Likewise.
4578 * tracepoint.c: Likewise.
4580 2015-08-24 Pedro Alves <palves@redhat.com>
4582 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4585 2015-08-21 Pedro Alves <palves@redhat.com>
4587 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4588 instead of literal 1.
4590 2015-08-21 Pedro Alves <palves@redhat.com>
4592 * tdesc.c (default_description): Explicitly zero-initialize.
4594 2015-08-21 Pedro Alves <palves@redhat.com>
4597 * inferiors.c (remove_thread): Discard any pending stop reply for
4599 * server.c (remove_all_on_match_pid): Rename to ...
4600 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4602 (discard_queued_stop_replies): Change parameter to a ptid. Now
4604 (handle_v_kill, kill_inferior_callback, captured_main)
4605 (process_serial_event): Adjust.
4606 * server.h (discard_queued_stop_replies): Declare.
4608 2015-08-21 Pedro Alves <palves@redhat.com>
4610 * linux-low.c (wait_for_sigstop): Always switch to no thread
4611 selected if the previously current thread dies.
4612 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4613 process instead of the current thread's.
4614 * remote-utils.c (input_interrupt): Don't check if there's no
4616 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4617 current thread to the general thread fails, error out.
4618 (handle_qxfer_auxv, handle_qxfer_libraries)
4619 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4620 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4621 (handle_query): Check if there's a thread selected instead of
4622 checking whether there's any thread in the thread list.
4623 (handle_qxfer_threads, handle_qxfer_btrace)
4624 (handle_qxfer_btrace_conf): Don't error out early if there's no
4625 thread in the thread list.
4626 (handle_v_cont, myresume): Don't set the current thread to the
4628 (process_serial_event) <Hg handling>: Also set thread_id if the
4629 previous general thread is still alive.
4630 (process_serial_event) <g/G handling>: If setting the current
4631 thread to the general thread fails, error out.
4632 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4633 thread's lwp instead of the current thread's.
4634 * target.c (set_desired_thread): If the desired thread was not
4635 found, leave the current thread pointing to NULL. Return an int
4636 (boolean) indicating success.
4637 * target.h (set_desired_thread): Change return type to int.
4639 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4641 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4642 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4644 (ps_get_thread_area): New function.
4646 2015-08-19 Gary Benson <gbenson@redhat.com>
4648 * hostio.c (handle_pread): Do not attempt to read more data
4649 than hostio_reply_with_data can fit in a packet.
4651 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4653 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4655 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4657 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4659 2015-08-06 Pedro Alves <palves@redhat.com>
4661 * tracepoint.c (expr_eval_result): Now an int.
4663 2015-08-06 Pedro Alves <palves@redhat.com>
4665 * gdbthread.h (struct regcache): Forward declare.
4666 (struct thread_info) <regcache_data>: Now a struct regcache
4668 * inferiors.c (inferior_regcache_data)
4669 (set_inferior_regcache_data): Now work with struct regcache
4671 * inferiors.h (struct regcache): Forward declare.
4672 (inferior_regcache_data, set_inferior_regcache_data): Now work
4673 with struct regcache pointers.
4674 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4675 (free_register_cache_thread): Remove struct regcache pointer
4678 2015-08-06 Pedro Alves <palves@redhat.com>
4680 * server.c (captured_main): On error, print the exception message
4681 to stderr, and if run_once is set, throw a quit.
4683 2015-08-06 Pedro Alves <palves@redhat.com>
4685 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4688 2015-08-06 Pedro Alves <palves@redhat.com>
4690 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4691 reading beyond the passed in buffer length.
4693 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4695 * tracepoint.c (symbol_list) <required>: Remove.
4697 2015-08-06 Pedro Alves <palves@redhat.com>
4699 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4700 count if stopping and suspending threads.
4701 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4702 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4703 (linux_detach): Complete an ongoing step-over.
4704 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4706 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4707 (linux_wait_1): If passing a signal to the inferior after
4708 finishing a step-over, unsuspend and re-resume all lwps. If we
4709 see a single-step event but the thread should be continuing, don't
4710 pass the trap to gdb.
4711 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4712 internal_error instead of gdb_assert.
4713 (enqueue_pending_signal): New function.
4714 (check_ptrace_stopped_lwp_gone): Add debug output.
4715 (start_step_over): Use internal_error instead of gdb_assert.
4716 (complete_ongoing_step_over): New function.
4717 (linux_resume_one_thread): Don't resume a suspended thread.
4718 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4721 2015-08-06 Pedro Alves <palves@redhat.com>
4723 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4724 (linux_thread_alive): Use lwp_is_marked_dead.
4725 (extended_event_reported): Delete.
4726 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4727 instead of extended_event_reported.
4728 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4730 (lwp_is_marked_dead): New function.
4731 (lwp_running): Use lwp_is_marked_dead.
4732 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4735 2015-08-06 Pedro Alves <palves@redhat.com>
4737 * linux-low.c (linux_wait_1): Move fork event output out of the
4738 !report_to_gdb check. Pass event_child->waitstatus to
4739 target_waitstatus_to_string instead of ourstatus.
4741 2015-08-04 Yao Qi <yao.qi@linaro.org>
4743 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4744 if current_thread is 32 bit.
4746 2015-08-04 Yao Qi <yao.qi@linaro.org>
4748 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4749 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4750 * server.c (extended_protocol): Remove "static".
4751 * server.h (extended_protocol): Declare it.
4753 2015-08-04 Yao Qi <yao.qi@linaro.org>
4755 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4756 both aarch64 and aarch32.
4757 (aarch64_set_pc): Likewise.
4759 2015-08-04 Yao Qi <yao.qi@linaro.org>
4761 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4762 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4763 arm-with-neon.xml to srv_xmlfiles.
4764 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4765 (is_64bit_tdesc): New function.
4766 (aarch64_linux_read_description): New function.
4767 (aarch64_arch_setup): Call aarch64_linux_read_description.
4768 (regs_info): Rename to regs_info_aarch64.
4769 (aarch64_regs_info): Return right regs_info.
4770 (initialize_low_arch): Call initialize_low_arch_aarch32.
4772 2015-08-04 Yao Qi <yao.qi@linaro.org>
4774 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4775 * linux-aarch32-low.c: New file.
4776 * linux-aarch32-low.h: New file.
4777 * linux-arm-low.c (arm_fill_gregset): Move it to
4778 linux-aarch32-low.c.
4779 (arm_store_gregset): Likewise.
4780 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4781 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4782 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4783 (regs_info): Rename to regs_info_arm.
4784 (arm_regs_info): Return regs_info_aarch32 if
4785 have_ptrace_getregset is 1 and target description is
4786 arm_with_neon or arm_with_vfpv3.
4787 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4788 Call initialize_low_arch_aarch32 instead.
4790 2015-08-04 Yao Qi <yao.qi@linaro.org>
4792 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4793 * linux-low.c: ... here.
4794 * linux-low.h (have_ptrace_getregset): Declare it.
4796 2015-08-04 Pedro Alves <palves@redhat.com>
4798 * thread-db.c (struct thread_db): Use new typedefs.
4799 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4801 (disable_thread_event_reporting): Cast result of dlsym to
4802 destination function pointer type.
4803 (thread_db_mourn): Use td_ta_delete_ftype.
4805 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4807 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4809 (CDX_BREAKPOINT): Define for R2.
4810 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4811 (the_low_target): Add comments.
4813 2015-07-30 Yao Qi <yao.qi@linaro.org>
4815 * linux-arm-low.c (arm_hwcap): Remove it.
4816 (arm_read_description): New local variable arm_hwcap. Don't
4817 set arm_hwcap to zero.
4819 2015-07-30 Yao Qi <yao.qi@linaro.org>
4821 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4822 Use regcache->tdesc instead.
4823 (arm_store_wmmxregset): Likewise.
4824 (arm_fill_vfpregset): Likewise.
4825 (arm_store_vfpregset): Likewise.
4827 2015-07-30 Yao Qi <yao.qi@linaro.org>
4829 * linux-arm-low.c: Include arch/arm.h.
4830 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4831 (arm_store_gregset): Likewise.
4833 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4835 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4836 ptrace's 4th parameter.
4838 2015-07-27 Yao Qi <yao.qi@linaro.org>
4840 * configure.srv (case aarch64*-*-linux*): Don't set
4843 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4845 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4847 * linux-arm-low.c: Likewise.
4848 * linux-cris-low.c: Likewise.
4849 * linux-crisv32-low.c: Likewise.
4850 * linux-low.c: Likewise.
4851 * linux-m68k-low.c: Likewise.
4852 * linux-mips-low.c: Likewise.
4853 * linux-nios2-low.c: Likewise.
4854 * linux-s390-low.c: Likewise.
4855 * linux-sparc-low.c: Likewise.
4856 * linux-tic6x-low.c: Likewise.
4857 * linux-tile-low.c: Likewise.
4858 * linux-x86-low.c: Likewise.
4860 2015-07-24 Pedro Alves <palves@redhat.com>
4862 * config.in: Regenerate.
4863 * configure: Regenerate.
4865 2015-07-24 Pedro Alves <palves@redhat.com>
4867 * acinclude.m4: Include ../ptrace.m4.
4868 * configure.ac: Call GDB_AC_PTRACE.
4869 * config.in, configure: Regenerate.
4871 2015-07-24 Yao Qi <yao.qi@linaro.org>
4873 * linux-low.c (linux_create_inferior): Remove setting to
4874 proc->priv->new_inferior.
4875 (linux_attach): Likewise.
4876 (linux_low_filter_event): Likewise.
4877 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4879 2015-07-24 Yao Qi <yao.qi@linaro.org>
4881 * linux-low.c (linux_arch_setup): New function.
4882 (linux_low_filter_event): If proc->tdesc is NULL and
4883 proc->attached is true, call the_low_target.arch_setup.
4884 Otherwise, keep status pending, and return.
4885 (linux_resume_one_lwp_throw): Don't call get_pc if
4886 thread->while_stepping isn't NULL. Don't call
4887 get_thread_regcache if proc->tdesc is NULL.
4888 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4889 (linux_target_ops): Install arch_setup.
4890 * server.c (start_inferior): Call the_target->arch_setup.
4891 * target.h (struct target_ops) <arch_setup>: New field.
4892 (target_arch_setup): New marco.
4893 * lynx-low.c (lynx_target_ops): Update.
4894 * nto-low.c (nto_target_ops): Update.
4895 * spu-low.c (spu_target_ops): Update.
4896 * win32-low.c (win32_target_ops): Update.
4898 2015-07-24 Yao Qi <yao.qi@linaro.org>
4900 * linux-low.c (linux_add_process): Don't set
4901 proc->priv->new_inferior.
4902 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4903 (linux_attach): Likewise.
4905 2015-07-24 Yao Qi <yao.qi@linaro.org>
4907 * server.c (start_inferior): Code refactor.
4909 2015-07-24 Yao Qi <yao.qi@linaro.org>
4911 * server.c (process_serial_event): Set general_thread.
4913 2015-07-21 Yao Qi <yao.qi@linaro.org>
4915 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4916 aarch64_linux_get_debug_reg_capacity.
4918 2015-07-17 Yao Qi <yao.qi@linaro.org>
4920 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4921 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4922 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4923 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4924 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4925 (AARCH64_HWP_ALIGNMENT): Likewise.
4926 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4927 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4928 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4929 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4930 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4931 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4932 (struct aarch64_debug_reg_state): Likewise.
4933 (struct arch_lwp_info): Likewise.
4934 (aarch64_align_watchpoint): Likewise.
4935 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4936 (aarch64_watchpoint_length): Likewise.
4937 (aarch64_point_encode_ctrl_reg): Likewise
4938 (aarch64_point_is_aligned): Likewise.
4939 (aarch64_align_watchpoint): Likewise.
4940 (aarch64_linux_set_debug_regs):
4941 (aarch64_dr_state_insert_one_point): Likewise.
4942 (aarch64_dr_state_remove_one_point): Likewise.
4943 (aarch64_handle_breakpoint): Likewise.
4944 (aarch64_handle_aligned_watchpoint): Likewise.
4945 (aarch64_handle_unaligned_watchpoint): Likewise.
4946 (aarch64_handle_watchpoint): Likewise.
4948 2015-07-17 Yao Qi <yao.qi@linaro.org>
4950 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4951 and don't aarch64_get_debug_reg_state. All callers update.
4952 (aarch64_handle_aligned_watchpoint): Likewise.
4953 (aarch64_handle_unaligned_watchpoint): Likewise.
4954 (aarch64_handle_watchpoint): Likewise.
4955 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4956 (aarch64_remove_point): Likewise.
4958 2015-07-17 Yao Qi <yao.qi@linaro.org>
4960 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4962 (aarch64_handle_unaligned_watchpoint): Likewise.
4964 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4966 Revert the previous 3 commits:
4967 Move gdb_regex* to common/
4968 Move linux_find_memory_regions_full & co.
4969 gdbserver build-id attribute generator
4971 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4972 Jan Kratochvil <jan.kratochvil@redhat.com>
4974 gdbserver build-id attribute generator.
4975 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4976 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4977 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4979 (get_dynamic): Use find_pdhr to traverse program headers.
4980 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4981 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4982 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4983 (get_hex_build_id): New.
4984 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4985 to reply XML document.
4987 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4988 Jan Kratochvil <jan.kratochvil@redhat.com>
4990 * target.c: Include target/target-utils.h and fcntl.h.
4991 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4992 (target_fileio_read_stralloc): New functions.
4994 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4996 * Makefile.in (OBS): Add gdb_regex.o.
4998 * config.in: Rebuilt.
4999 * configure: Rebuilt.
5001 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5002 Jan Kratochvil <jan.kratochvil@redhat.com>
5004 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5005 * Makefile.in (OBS): Add target-utils.o.
5006 (linux-maps.o, target-utils.o): New.
5007 * configure.srv (srv_linux_obj): Add linux-maps.o.
5009 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5011 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5013 (the_low_target): Install it.
5015 2015-07-14 Pedro Alves <palves@redhat.com>
5017 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5018 Instead, ignore ECHILD, and throw an error for other errnos.
5020 2015-07-10 Pedro Alves <palves@redhat.com>
5022 * event-loop.c (struct callback_event) <data>: Change type to
5023 gdb_client_data instance instead of gdb_client_data pointer.
5024 (append_callback_event): Adjust.
5026 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5028 * linux-aarch64-low.c: Add comments for each linux_target_ops
5029 method. Remove comments already covered in target_ops and
5030 linux_target_ops definitions.
5031 (the_low_target): Add comments for each unimplemented method.
5033 2015-07-09 Yao Qi <yao.qi@linaro.org>
5035 * linux-aarch64-low.c (aarch64_regmap): Remove.
5036 (aarch64_usrregs_info): Remove.
5037 (regs_info): Set field usrregs to NULL.
5039 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5041 * linux-low.c: Include "rsp-low.h"
5042 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5043 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5044 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5045 (handle_btrace_enable_pt): New.
5046 (handle_btrace_general_set): Support "pt".
5047 (handle_btrace_conf_general_set): Support "pt:size".
5049 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5051 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5054 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5056 * linux-aarch64-low.c: Remove comment about endianness.
5057 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5058 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5061 2015-06-24 Gary Benson <gbenson@redhat.com>
5063 * linux-i386-ipa.c (stdint.h): Do not include.
5064 * lynx-i386-low.c (stdint.h): Likewise.
5065 * lynx-ppc-low.c (stdint.h): Likewise.
5066 * mem-break.c (stdint.h): Likewise.
5067 * thread-db.c (stdint.h): Likewise.
5068 * tracepoint.c (stdint.h): Likewise.
5069 * win32-low.c (stdint.h): Likewise.
5071 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5073 * server.c (write_qxfer_response): Update call to
5074 remote_escape_output.
5076 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5077 Jan Kratochvil <jan.kratochvil@redhat.com>
5079 Merge multiple hex conversions.
5080 * gdbreplay.c (tohex): Rename to 'fromhex'.
5081 (logchar): Use fromhex.
5083 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5085 * server.c (handle_qxfer_libraries): Set `version' attribute for
5088 2015-06-10 Gary Benson <gbenson@redhat.com>
5090 * target.h (struct target_ops) <multifs_open>: New field.
5091 <multifs_unlink>: Likewise.
5092 <multifs_readlink>: Likewise.
5093 * linux-low.c (nat/linux-namespaces.h): New include.
5094 (linux_target_ops): Initialize the_target->multifs_open,
5095 the_target->multifs_unlink and the_target->multifs_readlink.
5096 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5097 * hostio.c (hostio_fs_pid): New static variable.
5098 (hostio_handle_new_gdb_connection): New function.
5099 (handle_setfs): Likewise.
5100 (handle_open): Use the_target->multifs_open as appropriate.
5101 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5102 (handle_readlink): Use the_target->multifs_readlink as
5104 (handle_vFile): Handle vFile:setfs packets.
5105 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5106 after target_handle_new_gdb_connection.
5108 2015-06-10 Gary Benson <gbenson@redhat.com>
5110 * configure.ac (AC_CHECK_FUNCS): Add setns.
5111 * config.in: Regenerate.
5112 * configure: Likewise.
5113 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5114 (linux-namespaces.o): New rule.
5115 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5117 2015-06-09 Gary Benson <gbenson@redhat.com>
5119 * hostio.c (handle_open): Process mode argument with
5120 fileio_to_host_mode.
5122 2015-06-01 Yao Qi <yao.qi@linaro.org>
5124 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5125 * linux-x86-low.c: Likewise.
5127 2015-05-28 Don Breazeal <donb@codesourcery.com>
5129 * linux-low.c (handle_extended_wait): Initialize
5130 thread_info.last_resume_kind for new fork children.
5132 2015-05-15 Pedro Alves <palves@redhat.com>
5134 * target.h (target_handle_new_gdb_connection): Rewrite using if
5135 wrapped in do/while.
5137 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5139 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5140 * configure, config.in: Regenerate.
5141 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5144 2015-05-12 Don Breazeal <donb@codesourcery.com>
5146 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5147 PTRACE_EVENT_VFORK_DONE.
5148 (linux_low_ptrace_options, extended_event_reported): Add vfork
5150 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5151 and "vforkdone" for RSP 'T' Stop Reply Packet.
5152 * server.h (report_vfork_events): Declare
5155 2015-05-12 Don Breazeal <donb@codesourcery.com>
5157 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5158 (the_low_target) <new_fork>: Initialize new member.
5159 * linux-arm-low.c (arm_new_fork): New function.
5160 (the_low_target) <new_fork>: Initialize new member.
5161 * linux-low.c (handle_extended_wait): Call new target function
5163 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5164 * linux-mips-low.c (mips_add_watchpoint): New function
5165 extracted from mips_insert_point.
5166 (the_low_target) <new_fork>: Initialize new member.
5167 (mips_linux_new_fork): New function.
5168 (mips_insert_point): Call mips_add_watchpoint.
5169 * linux-x86-low.c (x86_linux_new_fork): New function.
5170 (the_low_target) <new_fork>: Initialize new member.
5172 2015-05-12 Don Breazeal <donb@codesourcery.com>
5174 * linux-low.c (handle_extended_wait): Implement return value,
5175 rename argument 'event_child' to 'event_lwp', handle
5176 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5177 (linux_low_ptrace_options): New function.
5178 (linux_low_filter_event): Call linux_low_ptrace_options,
5179 use different argument fo linux_enable_event_reporting,
5180 use return value from handle_extended_wait.
5181 (extended_event_reported): New function.
5182 (linux_wait_1): Call extended_event_reported and set
5183 status to report fork events.
5184 (linux_write_memory): Add pid to debug message.
5185 (reset_lwp_ptrace_options_callback): New function.
5186 (linux_handle_new_gdb_connection): New function.
5187 (linux_target_ops): Initialize new structure member.
5188 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5189 * lynx-low.c: Initialize new structure member.
5190 * remote-utils.c (prepare_resume_reply): Implement stop reason
5191 "fork" for "T" stop message.
5192 * server.c (handle_query): Call handle_new_gdb_connection.
5193 * server.h (report_fork_events): Declare global flag.
5194 * target.h (struct target_ops) <handle_new_gdb_connection>:
5196 (target_handle_new_gdb_connection): New macro.
5197 * win32-low.c: Initialize new structure member.
5199 2015-05-12 Don Breazeal <donb@codesourcery.com>
5201 * mem-break.c (APPEND_TO_LIST): Define macro.
5202 (clone_agent_expr): New function.
5203 (clone_one_breakpoint): New function.
5204 (clone_all_breakpoints): New function.
5205 * mem-break.h: Declare new functions.
5207 2015-05-12 Don Breazeal <donb@codesourcery.com>
5209 * linux-low.c (linux_supports_fork_events): New function.
5210 (linux_supports_vfork_events): New function.
5211 (linux_target_ops): Initialize new structure members.
5212 (initialize_low): Call linux_check_ptrace_features.
5213 * lynx-low.c (lynx_target_ops): Initialize new structure
5215 * server.c (report_fork_events, report_vfork_events):
5217 (handle_query): Add new features to qSupported packet and
5219 (captured_main): Initialize new global variables.
5220 * target.h (struct target_ops) <supports_fork_events>:
5222 <supports_vfork_events>: New member.
5223 (target_supports_fork_events): New macro.
5224 (target_supports_vfork_events): New macro.
5225 * win32-low.c (win32_target_ops): Initialize new structure
5228 2015-05-12 Gary Benson <gbenson@redhat.com>
5230 * server.c (handle_qxfer_exec_file): Use current process
5233 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5235 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5236 Remove HAVE_PTRACE_GETREGS conditionals.
5237 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5238 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5240 2015-05-08 Yao Qi <yao.qi@linaro.org>
5242 * linux-low.c (linux_supports_conditional_breakpoints): New
5244 (linux_target_ops): Install new target method.
5245 * lynx-low.c (lynx_target_ops): Install NULL hook for
5246 supports_conditional_breakpoints.
5247 * nto-low.c (nto_target_ops): Likewise.
5248 * spu-low.c (spu_target_ops): Likewise.
5249 * win32-low.c (win32_target_ops): Likewise.
5250 * server.c (handle_query): Check
5251 target_supports_conditional_breakpoints.
5252 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5254 (target_supports_conditional_breakpoints): New macro.
5256 2015-05-06 Pedro Alves <palves@redhat.com>
5259 * server.c (start_inferior): If the process exits, mourn it.
5261 2015-04-21 Gary Benson <gbenson@redhat.com>
5263 * hostio.c (fileio_open_flags_to_host): Factored out to
5264 fileio_to_host_openflags in common/fileio.c. Single use
5267 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5269 * linux-xtensa-low.c (xtensa_fill_gregset)
5270 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5273 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5275 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5276 (regs_info): Replace usrregs pointer with NULL.
5278 2015-04-17 Gary Benson <gbenson@redhat.com>
5280 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5281 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5282 * server.c (handle_qxfer_exec_file): New function.
5283 (qxfer_packets): Add exec-file entry.
5284 (handle_query): Report qXfer:exec-file:read as supported packet.
5286 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5288 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5290 2015-04-09 Gary Benson <gbenson@redhat.com>
5292 * hostio-errno.c (errno_to_fileio_error): Remove function.
5293 Update caller to use remote_fileio_to_fio_error.
5295 2015-04-09 Yao Qi <yao.qi@linaro.org>
5297 * linux-low.c (linux_insert_point): Call
5298 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5299 (linux_remove_point): Call remove_memory_breakpoint if type is
5301 * linux-x86-low.c (x86_insert_point): Don't call
5302 insert_memory_breakpoint.
5303 (x86_remove_point): Don't call remove_memory_breakpoint.
5305 2015-04-01 Pedro Alves <palves@redhat.com>
5306 Cleber Rosa <crosa@redhat.com>
5308 * server.c (gdbserver_usage): Reorganize and extend the usage
5311 2015-03-24 Pedro Alves <palves@redhat.com>
5313 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5314 output. Also dump TRAP_TRACE.
5315 (linux_low_filter_event): In debug output, distinguish a
5316 resume_stop SIGSTOP from a delayed SIGSTOP.
5318 2015-03-24 Gary Benson <gbenson@redhat.com>
5320 * linux-x86-low.c (x86_linux_new_thread): Moved to
5322 (x86_linux_prepare_to_resume): Likewise.
5324 2015-03-24 Gary Benson <gbenson@redhat.com>
5326 * Makefile.in (x86-linux-dregs.o): New rule.
5327 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5328 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5329 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5330 (x86_linux_dr_get): Likewise.
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_update_debug_registers): Likewise.
5340 2015-03-24 Gary Benson <gbenson@redhat.com>
5342 * linux-x86-low.c (x86_linux_update_debug_registers):
5343 New function, factored out from...
5344 (x86_linux_prepare_to_resume): ...this.
5346 2015-03-24 Gary Benson <gbenson@redhat.com>
5348 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5349 (x86_linux_dr_set): Likewise.
5350 (update_debug_registers_callback): Likewise.
5351 (x86_linux_dr_set_addr): Likewise.
5352 (x86_linux_dr_get_addr): Likewise.
5353 (x86_linux_dr_set_control): Likewise.
5354 (x86_linux_dr_get_control): Likewise.
5355 (x86_linux_dr_get_status): Likewise.
5356 (x86_linux_prepare_to_resume): Likewise.
5358 2015-03-24 Gary Benson <gbenson@redhat.com>
5360 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5361 Use perror_with_name. Pass string through gettext.
5362 (x86_linux_dr_set): Likewise.
5364 2015-03-24 Gary Benson <gbenson@redhat.com>
5366 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5367 (x86_linux_dr_set_addr): ...this.
5368 (x86_dr_low_get_addr): Rename to...
5369 (x86_linux_dr_get_addr): ...this.
5370 (x86_dr_low_set_control): Rename to...
5371 (x86_linux_dr_set_control): ...this.
5372 (x86_dr_low_get_control): Rename to...
5373 (x86_linux_dr_get_control): ...this.
5374 (x86_dr_low_get_status): Rename to...
5375 (x86_linux_dr_get_status): ...this.
5376 (x86_dr_low): Update with new function names.
5378 2015-03-24 Gary Benson <gbenson@redhat.com>
5380 * Makefile.in (x86-linux.o): New rule.
5381 * configure.srv: Add x86-linux.o to relevant targets.
5382 * linux-low.c (lwp_set_arch_private_info): New function.
5383 (lwp_arch_private_info): Likewise.
5384 * linux-x86-low.c: Include nat/x86-linux.h.
5385 (arch_lwp_info): Removed structure.
5386 (update_debug_registers_callback):
5387 Use lwp_set_debug_registers_changed.
5388 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5389 and lwp_set_debug_registers_changed.
5390 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5392 2015-03-24 Gary Benson <gbenson@redhat.com>
5394 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5395 * linux-arm-low.c (arm_new_thread): Likewise.
5396 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5397 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5398 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5399 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5401 2015-03-24 Gary Benson <gbenson@redhat.com>
5403 * linux-low.c (ptid_of_lwp): New function.
5404 (lwp_is_stopped): Likewise.
5405 (lwp_stop_reason): Likewise.
5406 * linux-x86-low.c (update_debug_registers_callback):
5408 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5411 2015-03-24 Gary Benson <gbenson@redhat.com>
5413 * linux-low.h (linux_stop_lwp): Remove declaration.
5415 2015-03-24 Gary Benson <gbenson@redhat.com>
5417 * linux-low.h: Include nat/linux-nat.h.
5418 * linux-low.c (iterate_over_lwps_args): New structure.
5419 (iterate_over_lwps_filter): New function.
5420 (iterate_over_lwps): Likewise.
5421 * linux-x86-low.c (update_debug_registers_callback):
5422 Update signature to what iterate_over_lwps expects.
5423 Remove PID check that iterate_over_lwps now performs.
5424 (x86_dr_low_set_addr): Use iterate_over_lwps.
5425 (x86_dr_low_set_control): Likewise.
5427 2015-03-24 Gary Benson <gbenson@redhat.com>
5429 * linux-x86-low.c (x86_debug_reg_state): New function.
5430 (x86_linux_prepare_to_resume): Use the above.
5432 2015-03-24 Gary Benson <gbenson@redhat.com>
5434 * linux-low.c (current_lwp_ptid): New function.
5435 * linux-x86-low.c: Include nat/linux-nat.h.
5436 (x86_dr_low_get_addr): Use current_lwp_ptid.
5437 (x86_dr_low_get_control): Likewise.
5438 (x86_dr_low_get_status): Likewise.
5440 2015-03-20 Pedro Alves <palves@redhat.com>
5442 * tracepoint.c (cmd_qtstatus): Make "str" const.
5444 2015-03-20 Pedro Alves <palves@redhat.com>
5446 * server.c (handle_general_set): Make "req_str" const.
5448 2015-03-19 Pedro Alves <palves@redhat.com>
5450 * linux-low.c (linux_resume_one_lwp): Rename to ...
5451 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5452 instead call perror_with_name.
5453 (check_ptrace_stopped_lwp_gone): New function.
5454 (linux_resume_one_lwp): Reimplement as wrapper around
5455 linux_resume_one_lwp_throw that swallows errors if the LWP is
5458 2015-03-19 Pedro Alves <palves@redhat.com>
5460 * linux-low.c (count_events_callback, select_event_lwp_callback):
5461 No longer check whether the thread has resume_stop as last resume
5464 2015-03-19 Pedro Alves <palves@redhat.com>
5466 * linux-low.c (count_events_callback, select_event_lwp_callback):
5467 Use the lwp's status_pending_p field, not the thread's.
5469 2015-03-19 Pedro Alves <palves@redhat.com>
5471 * linux-low.c (select_event_lwp_callback): Update comments to
5472 no longer mention SIGTRAP.
5474 2015-03-18 Gary Benson <gbenson@redhat.com>
5476 * server.c (handle_query): Do not report vFile:fstat as supported.
5478 2015-03-11 Gary Benson <gbenson@redhat.com>
5480 * hostio.c (sys/types.h): New include.
5481 (sys/stat.h): Likewise.
5482 (common-remote-fileio.h): Likewise.
5483 (handle_fstat): New function.
5484 (handle_vFile): Handle vFile:fstat packets.
5486 2015-03-11 Gary Benson <gbenson@redhat.com>
5488 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5489 struct stat.st_blocks and struct stat.st_blksize.
5490 * configure: Regenerate.
5491 * config.in: Likewise.
5492 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5493 (OBS): Add common-remote-fileio.o.
5494 (common-remote-fileio.o): New rule.
5496 2015-03-09 Pedro Alves <palves@redhat.com>
5498 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5499 'struct sockaddr' pointer in 'accept' call.
5501 2015-03-09 Pedro Alves <palves@redhat.com>
5504 2015-03-07 Pedro Alves <palves@redhat.com>
5505 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5506 or <winsock2.h> here. Instead include "gdb_socket.h".
5507 (remote_open): Use union gdb_sockaddr_u.
5508 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5509 or <winsock2.h> here. Instead include "gdb_socket.h".
5510 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5511 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5513 (init_named_socket, gdb_agent_helper_thread): Use union
5516 2015-03-07 Pedro Alves <palves@redhat.com>
5518 * configure.ac (build_warnings): Move
5519 -Wdeclaration-after-statement to the C-specific set.
5520 * configure: Regenerate.
5522 2015-03-07 Pedro Alves <palves@redhat.com>
5524 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5525 or <winsock2.h> here. Instead include "gdb_socket.h".
5526 (remote_open): Use union gdb_sockaddr_u.
5527 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5528 or <winsock2.h> here. Instead include "gdb_socket.h".
5529 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5530 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5532 (init_named_socket, gdb_agent_helper_thread): Use union
5535 2015-03-07 Pedro Alves <palves@redhat.com>
5537 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5540 2015-03-06 Yao Qi <yao.qi@linaro.org>
5542 * linux-aarch64-low.c (aarch64_insert_point): Use
5543 show_debug_regs as a boolean.
5544 (aarch64_remove_point): Likewise.
5546 2015-03-05 Pedro Alves <palves@redhat.com>
5548 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5549 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5550 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5551 * nto-low.c (nto_target_ops): Likewise.
5552 * spu-low.c (spu_target_ops): Likewise.
5553 * win32-low.c (win32_target_ops): Likewise.
5555 2015-03-04 Pedro Alves <palves@redhat.com>
5557 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5558 Decide whether a breakpoint triggered based on the SIGTRAP's
5560 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5561 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5562 (linux_low_filter_event): Check for breakpoints before checking
5564 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5566 (linux_stopped_by_sw_breakpoint)
5567 (linux_supports_stopped_by_sw_breakpoint)
5568 (linux_stopped_by_hw_breakpoint)
5569 (linux_supports_stopped_by_hw_breakpoint): New functions.
5570 (linux_target_ops): Install new target methods.
5572 2015-03-04 Pedro Alves <palves@redhat.com>
5574 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5575 * server.c (swbreak_feature, hwbreak_feature): New globals.
5576 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5577 (captured_main): Clear swbreak_feature and hwbreak_feature.
5578 * server.h (swbreak_feature, hwbreak_feature): Declare.
5579 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5580 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5581 supports_stopped_by_hw_breakpoint>: New fields.
5582 (target_supports_stopped_by_sw_breakpoint)
5583 (target_stopped_by_sw_breakpoint)
5584 (target_supports_stopped_by_hw_breakpoint)
5585 (target_stopped_by_hw_breakpoint): Declare.
5587 2015-03-04 Pedro Alves <palves@redhat.com>
5589 enum lwp_stop_reason -> enum target_stop_reason
5590 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5591 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5592 (linux_wait_1, stuck_in_jump_pad_callback)
5593 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5594 (linux_stopped_by_watchpoint):
5595 * linux-low.h (enum lwp_stop_reason): Delete.
5596 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5597 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5599 2015-03-04 Yao Qi <yao.qi@linaro.org>
5601 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5603 2015-03-03 Gary Benson <gbenson@redhat.com>
5605 * hostio.c (handle_vFile): Fix prefix lengths.
5607 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5609 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5612 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5614 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5615 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5616 (clean): Add "rm -f" for above C files.
5617 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5618 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5619 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5620 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5621 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5622 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5623 (init_registers_s390x_vx_linux64)
5624 (init_registers_s390x_tevx_linux64)
5625 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5626 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5628 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5629 (s390_store_vxrs_high): New functions.
5630 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5632 (s390_arch_setup): Add logic for selecting one of the new target
5633 descriptions. Activate the new vector regsets if applicable.
5634 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5635 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5636 and init_registers_s390x_tevx_linux64.
5638 2015-03-01 Pedro Alves <palves@redhat.com>
5640 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5643 2015-02-27 Pedro Alves <palves@redhat.com>
5645 * linux-x86-low.c (u_debugreg_offset): New function.
5646 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5648 2015-02-27 Pedro Alves <palves@redhat.com>
5650 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5651 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5652 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5653 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5654 (ps_lsetfpregs, ps_getpid)
5655 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5656 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5657 (ps_lsetxregs, ps_plog): Declare.
5659 2015-02-27 Pedro Alves <palves@redhat.com>
5661 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5662 IP_AGENT_EXPORT_FUNC.
5663 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5664 IP_AGENT_EXPORT_FUNC.
5665 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5666 (IP_AGENT_EXPORT): Delete.
5667 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5668 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5669 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5670 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5671 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5672 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5673 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5674 (traceframe_read_count, traceframe_write_count)
5675 (traceframes_created, trace_state_variables, get_raw_reg)
5676 (get_trace_state_variable_value, set_trace_state_variable_value)
5677 (ust_loaded, helper_thread_id, cmd_buf): Use
5678 IPA_SYM_EXPORTED_NAME.
5679 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5680 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5681 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5682 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5683 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5684 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5685 EXTERN_C_PUSH/EXTERN_C_POP.
5686 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5687 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5688 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5689 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5690 (traceframe_write_count, traceframe_read_count)
5691 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5692 (about_to_request_buffer_space, get_trace_state_variable_value)
5693 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5694 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5695 EXTERN_C_PUSH/EXTERN_C_POP.
5696 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5697 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5698 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5699 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5700 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5701 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5702 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5703 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5705 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5706 (IP_AGENT_EXPORT_VAR_DECL): Define.
5708 (gdb_agent_get_raw_reg): Declare.
5710 2015-02-27 Tom Tromey <tromey@redhat.com>
5711 Pedro Alves <palves@redhat.com>
5713 Rename symbols whose names are reserved C++ keywords throughout.
5715 2015-02-27 Pedro Alves <palves@redhat.com>
5717 * Makefile.in (COMPILER): New, get it from autoconf.
5718 (CXX): Get from autoconf instead.
5719 (COMPILE.pre): Use COMPILER.
5720 (CC-LD): Rename to ...
5721 (CC_LD): ... this. Use COMPILER.
5722 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5723 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5724 * acinclude.m4: Include build-with-cxx.m4.
5725 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5726 Disable -Werror by default if building in C++ mode.
5727 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5728 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5729 the C++ compiler. Save/restore CXXFLAGS too.
5730 * configure: Regenerate.
5732 2015-02-27 Pedro Alves <palves@redhat.com>
5734 * acinclude.m4: Include libiberty.m4.
5735 * configure.ac: Call libiberty_INIT.
5736 * config.in, configure: Regenerate.
5738 2015-02-26 Pedro Alves <palves@redhat.com>
5740 * linux-low.c (linux_wait_1): When incrementing the PC past a
5741 program breakpoint always use the_low_target.breakpoint_len as
5742 increment, rather than the maximum between that and
5743 the_low_target.decr_pc_after_break.
5745 2015-02-23 Pedro Alves <palves@redhat.com>
5747 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5748 thread was doing a step-over; always adjust the PC if
5749 we stepped over a permanent breakpoint.
5750 (linux_wait_1): If we stepped over breakpoint that was on top of a
5751 permanent breakpoint, manually advance the PC past it.
5753 2015-02-23 Pedro Alves <palves@redhat.com>
5755 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5757 (x86_fill_gregset, x86_store_gregset): Use it when handling
5760 2015-02-20 Pedro Alves <palves@redhat.com>
5762 * thread-db.c: Include "nat/linux-procfs.h".
5763 (thread_db_init): Skip listing new threads if the kernel supports
5764 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5766 2015-02-20 Pedro Alves <palves@redhat.com>
5768 * linux-low.c (status_pending_p_callback): Use ptid_match.
5770 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5772 PR breakpoints/16812
5773 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5774 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5775 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5777 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5779 PR breakpoints/15956
5780 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5782 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5784 * linux-low.c (linux_low_btrace_conf): Print size.
5785 * server.c (handle_btrace_conf_general_set): New.
5786 (hanle_general_set): Call handle_btrace_conf_general_set.
5787 (handle_query): Report Qbtrace-conf:bts:size as supported.
5789 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5791 * linux-low.c (linux_low_enable_btrace): Update parameters.
5792 (linux_low_btrace_conf): New.
5793 (linux_target_ops)<to_btrace_conf>: Initialize.
5794 * server.c (current_btrace_conf): New.
5795 (handle_btrace_enable): Rename to ...
5796 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
5797 to target_enable_btrace. Update comment. Update users.
5798 (handle_qxfer_btrace_conf): New.
5799 (qxfer_packets): Add btrace-conf entry.
5800 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5801 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5802 (target_ops)<read_btrace_conf>: New.
5803 (target_enable_btrace): Update parameters.
5804 (target_read_btrace_conf): New.
5806 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5808 * server.c (handle_btrace_general_set): Remove call to
5809 target_supports_btrace.
5810 (supported_btrace_packets): New.
5811 (handle_query): Call supported_btrace_packets.
5812 * target.h: include btrace-common.h.
5813 (btrace_target_info): Removed.
5814 (supports_btrace, target_supports_btrace): Update parameters.
5816 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5818 * Makefile.in (SFILES): Add common/btrace-common.c.
5819 (OBS): Add common/btrace-common.o.
5820 (btrace-common.o): Add build rules.
5821 * linux-low: Include btrace-common.h.
5822 (linux_low_read_btrace): Use struct btrace_data. Call
5823 btrace_data_init and btrace_data_fini.
5825 2015-02-06 Pedro Alves <palves@redhat.com>
5827 * thread-db.c (find_new_threads_callback): Add debug output.
5829 2015-02-04 Pedro Alves <palves@redhat.com>
5831 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5832 (resume_stopped_resumed_lwps): New function.
5833 (linux_wait_for_event_filtered): Use it.
5835 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5837 * Makefile.in (SFILES): Add linux-personality.c.
5838 (linux-personality.o): New rule.
5839 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5840 list of objects to be built.
5841 * linux-low.c: Include nat/linux-personality.h.
5842 (linux_create_inferior): Remove code to disable address space
5843 randomization (moved to ../nat/linux-personality.c). Create
5844 cleanup to disable address space randomization.
5846 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5848 * Makefile.in (posix-strerror.o): New rule.
5849 (mingw-strerror.o): Likewise.
5850 * configure: Regenerated.
5851 * configure.ac: Source file ../common/common.host. Initialize new
5852 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5854 2015-01-14 Yao Qi <yao@codesourcery.com>
5856 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5857 (ppc-linux.o): New rule.
5858 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5859 * configure.ac: AC_CHECK_FUNCS(getauxval).
5860 * config.in: Re-generated.
5861 * configure: Re-generated.
5862 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5863 ppc64_64bit_inferior_p
5865 2015-01-14 Yao Qi <yao@codesourcery.com>
5867 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5868 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5869 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5870 (PT_ORIG_R3, PT_TRAP): Likewise.
5871 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5872 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5873 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5875 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5877 * i387-fp.c (i387_cache_to_xsave): In look over
5878 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5879 zmmh_low_space field by use of zmmh_high_space.
5881 2015-01-09 Pedro Alves <palves@redhat.com>
5883 * linux-low.c (step_over_bkpt): Move higher up in the file.
5884 (handle_extended_wait): Don't store the stop_pc here.
5885 (get_stop_pc): Adjust comments and rename to ...
5886 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5887 stopped for a software breakpoint or hardware breakpoint.
5888 (thread_still_has_status_pending_p): New function.
5889 (status_pending_p_callback): Use
5890 thread_still_has_status_pending_p. If the event is no longer
5891 interesting, resume the LWP.
5892 (handle_tracepoints): Add assert.
5893 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5894 (wstatus_maybe_breakpoint): New function.
5895 (cancel_breakpoint): Delete function.
5896 (check_stopped_by_watchpoint): New function, factored out from
5897 linux_low_filter_event.
5898 (lp_status_maybe_breakpoint): Delete function.
5899 (linux_low_filter_event): Remove filter_ptid argument.
5900 Leave thread group exits pending here. Store the LWP's stop PC.
5901 Always leave events pending.
5902 (linux_wait_for_event_filtered): Pull all events out of the
5903 kernel, and leave them all pending.
5904 (count_events_callback, select_event_lwp_callback): Consider all
5906 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5907 (select_event_lwp): Only give preference to the stepping LWP in
5908 all-stop mode. Adjust comments.
5909 (ignore_event): New function.
5910 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5911 references to cancel_breakpoints. Adjust to renames. Also give
5912 equal priority to all LWPs that have had events in non-stop mode.
5913 If reporting a software breakpoint event, unadjust the LWP's PC.
5914 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5915 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5917 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5918 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5919 (linux_stopped_by_watchpoint): Adjust.
5920 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5921 * linux-low.h (enum lwp_stop_reason): New.
5922 (struct lwp_info) <stop_pc>: Adjust comment.
5923 <stopped_by_watchpoint>: Delete field.
5924 <stop_reason>: New field.
5925 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5926 * mem-break.c (software_breakpoint_inserted_here)
5927 (hardware_breakpoint_inserted_here): New function.
5928 * mem-break.h (software_breakpoint_inserted_here)
5929 (hardware_breakpoint_inserted_here): Declare.
5930 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5931 (cancel_breakpoints): Delete.
5932 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5933 (upload_fast_traceframes): Remove references to
5936 2015-01-09 Pedro Alves <palves@redhat.com>
5938 * thread-db.c (find_new_threads_callback): Ignore thread if the
5939 kernel thread ID is -1.
5941 2015-01-09 Pedro Alves <palves@redhat.com>
5943 * linux-low.c (linux_attach_fail_reason_string): Move to
5944 nat/linux-ptrace.c, and rename.
5945 (linux_attach_lwp): Update comment.
5946 (attach_proc_task_lwp_callback): New function.
5947 (linux_attach): Adjust to rename and use
5948 linux_proc_attach_tgid_threads.
5949 (linux_attach_fail_reason_string): Delete declaration.
5951 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5953 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5954 * server.c (gdbserver_version): Likewise.
5956 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5958 * remote-utils.c: Include ctype.h.
5959 (input_interrupt): Explicitly handle the case when the char
5960 received is the NUL byte. Improve the printing of non-ASCII
5963 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5965 * linux-low.c (linux_low_filter_event): Update call to
5966 linux_enable_event_reporting following the addition of
5967 a new parameter to that function.
5969 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5972 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5973 (AARCH64_FPCR_REGNO): Likewise.
5974 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5975 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5976 (aarch64_store_fpregset): Likewise.
5978 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5980 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5981 Remove FIXME comment about assumption about N.
5983 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5985 * configure.ac: If large-file support is disabled in GDBserver,
5986 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5987 * configure: Regenerate.
5989 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5991 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5992 warning upon ENODATA from ptrace.
5993 * linux-s390-low.c (s390_store_tdb): New.
5994 (s390_regsets): Add regset for NT_S390_TDB.
5996 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5998 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5999 without a fill_function.
6000 * linux-s390-low.c (s390_fill_last_break): Remove.
6001 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6002 (s390_arch_setup): Use regset's size instead of fill_function for
6005 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6007 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6008 the regset's store function when ptrace returned an error.
6009 * regcache.c (get_thread_regcache): Invalidate register cache
6010 before fetching inferior's registers.
6012 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6014 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6015 while-loop as for-loop.
6016 (regsets_store_inferior_registers): Likewise.
6018 2014-11-28 Yao Qi <yao@codesourcery.com>
6020 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6021 * config.in, configure: Re-generate.
6022 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6025 2014-11-21 Yao Qi <yao@codesourcery.com>
6027 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6028 (AC_CHECK_HEADERS): Remove malloc.h.
6029 * configure: Re-generated.
6030 * config.in: Re-generated.
6031 * server.h: Don't include alloca.h and malloc.h.
6032 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6033 Don't include malloc.h.
6035 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6037 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6038 corresponding ERRNO check in same block.
6040 2014-11-12 Pedro Alves <palves@redhat.com>
6042 * server.c (cont_thread): Update comment.
6043 (start_inferior, attach_inferior): No longer clear cont_thread.
6044 (handle_v_cont): No longer set cont_thread.
6045 (captured_main): Clear cont_thread each time a GDB connects.
6047 2014-11-12 Pedro Alves <palves@redhat.com>
6049 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6050 thread, and don't resume all threads if the Hc thread has exited.
6052 2014-11-12 Pedro Alves <palves@redhat.com>
6054 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6055 the process group instead of to a specific LWP.
6057 2014-10-15 Pedro Alves <palves@redhat.com>
6060 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6062 (arm_set_thread_context): Delete.
6063 (the_low_target): Adjust.
6064 * win32-i386-low.c (debug_registers_changed)
6065 (debug_registers_used): Delete.
6066 (update_debug_registers_callback): New function.
6067 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6068 needing to update their debug registers.
6069 (win32_get_current_dr): New function.
6070 (x86_dr_low_get_addr, x86_dr_low_get_control)
6071 (x86_dr_low_get_status): Fetch the debug register from the thread
6073 (i386_initial_stuff): Adjust.
6074 (i386_get_thread_context): Remove current_event parameter. Don't
6075 clear debug_registers_changed nor copy DR values to
6077 (i386_set_thread_context): Delete.
6078 (i386_prepare_to_resume): New function.
6079 (i386_thread_added): Mark the thread as needing to update irs
6081 (the_low_target): Remove i386_set_thread_context and install
6082 i386_prepare_to_resume.
6083 * win32-low.c (win32_get_thread_context): Adjust.
6084 (win32_set_thread_context): Use SetThreadContext
6086 (win32_prepare_to_resume): New function.
6087 (win32_require_context): New function, factored out from ...
6088 (thread_rec): ... this.
6089 (continue_one_thread): Call win32_prepare_to_resume on each thread
6090 we're about to continue.
6091 (win32_resume): Call win32_prepare_to_resume on the event thread.
6092 * win32-low.h (struct win32_thread_info)
6093 <debug_registers_changed>: New field.
6094 (struct win32_target_ops): Change prototype of set_thread_context,
6095 delete set_thread_context and add prepare_to_resume.
6096 (win32_require_context): New declaration.
6098 2014-10-08 Gary Benson <gbenson@redhat.com>
6100 * server.h: Do not include common-exceptions.h.
6102 2014-10-08 Gary Benson <gbenson@redhat.com>
6104 * server.h: Do not include cleanups.h.
6106 2014-09-30 James Hogan <james.hogan@imgtec.com>
6108 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6111 2014-09-23 Yao Qi <yao@codesourcery.com>
6113 * linux-low.c (lp_status_maybe_breakpoint): New function.
6114 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6115 (count_events_callback): Likewise.
6116 (select_event_lwp_callback): Likewise.
6117 (cancel_breakpoints_callback): Likewise.
6119 2014-09-19 Don Breazeal <donb@codesourcery.com>
6121 * linux-low.c (handle_extended_wait): Call
6122 linux_ptrace_get_extended_event.
6123 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6124 linux_is_extended_waitstatus.
6126 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6128 * Makefile.in (CPPFLAGS): Define.
6129 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6130 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6132 2014-09-16 Gary Benson <gbenson@redhat.com>
6134 * inferiors.h (current_inferior): Renamed as...
6135 (current_thread): New variable. All uses updated.
6136 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6137 (maybe_move_out_of_jump_pad): Likewise.
6138 (cancel_breakpoint): Likewise.
6139 (linux_low_filter_event): Likewise.
6140 (wait_for_sigstop): Likewise.
6141 (linux_resume_one_lwp): Likewise.
6142 (need_step_over_p): Likewise.
6143 (start_step_over): Likewise.
6144 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6145 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6146 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6147 and save_inferior as saved_thread.
6148 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6150 (regcache_invalidate_thread): Likewise.
6151 * remote-utils.c (prepare_resume_reply): Likewise.
6152 * thread-db.c (thread_db_get_tls_address): Likewise.
6153 (disable_thread_event_reporting): Likewise.
6154 (remove_thread_event_breakpoints): Likewise.
6155 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6157 * target.h (set_desired_inferior): Renamed as...
6158 (set_desired_thread): New declaration. All uses updated.
6159 * server.c (myresume): Updated comment to reference thread instead
6161 (handle_serial_event): Likewise.
6162 (handle_target_event): Likewise.
6164 2014-09-12 Tom Tromey <tromey@redhat.com>
6165 Gary Benson <gbenson@redhat.com>
6167 * regcache.h: Include common-regcache.h.
6168 (regcache_read_pc): Don't declare.
6169 * regcache.c (get_thread_regcache_for_ptid): New function.
6171 2014-09-11 Tom Tromey <tromey@redhat.com>
6172 Gary Benson <gbenson@redhat.com>
6174 * symbol.c: New file.
6175 * Makefile.in (SFILES): Add symbol.c.
6176 (OBS): Add symbol.o.
6178 2014-09-11 Gary Benson <gbenson@redhat.com>
6180 * target.c (target_stop_ptid, target_continue_ptid): New
6183 2014-09-11 Tom Tromey <tromey@redhat.com>
6184 Gary Benson <gbenson@redhat.com>
6186 * target.h: Include target/target.h.
6187 * target.c (target_read_memory, target_read_uint32)
6188 (target_write_memory): New functions.
6190 2014-09-11 Gary Benson <gbenson@redhat.com>
6192 * server.h (debug_hw_points): Don't declare.
6193 * server.c (debug_hw_points): Don't define. Replace all uses
6194 with show_debug_regs.
6195 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6196 all uses with show_debug_regs.
6198 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6200 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6201 endianness into account.
6202 (ppc_supply_ptrace_register): Likewise.
6204 2014-09-03 James Hogan <james.hogan@imgtec.com>
6206 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6207 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6209 2014-09-03 Gary Benson <gbenson@redhat.com>
6211 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6212 ALL_DEBUG_ADDRESS_REGISTERS.
6214 2014-09-02 Gary Benson <gbenson@redhat.com>
6216 * i386-low.h: Renamed as...
6217 * x86-low.h: New file. All type, function and variable name
6218 prefixes changed from "i386_" to "x86_". All references updated.
6219 * i386-low.c: Renamed as...
6220 * x86-low.c: New file. All type, function and variable name
6221 prefixes changed from "i386_" to "x86_". All references updated.
6223 2014-09-02 Gary Benson <gbenson@redhat.com>
6225 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6226 (x86_linux_new_thread): Likewise.
6228 2014-08-29 Gary Benson <gbenson@redhat.com>
6230 * server.h (setjmp.h): Do not include.
6231 (toplevel): Do not declare.
6232 (common-exceptions.h): Include.
6233 (cleanups.h): Likewise.
6234 * server.c (toplevel): Do not define.
6235 (exit_code): New static global.
6236 (detach_or_kill_for_exit_cleanup): New function.
6237 (main): New function. Original main renamed to...
6238 (captured_main): New function.
6239 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6241 2014-08-29 Gary Benson <gbenson@redhat.com>
6243 * Makefile.in (SFILES): Add common/common-exceptions.c.
6244 (OBS): Add common-exceptions.o.
6245 (common-exceptions.o): New rule.
6246 * utils.c (prepare_to_throw_exception): New function.
6248 2014-08-29 Gary Benson <gbenson@redhat.com>
6250 * config.in: Regenerate.
6251 * configure: Likewise.
6253 2014-08-29 Gary Benson <gbenson@redhat.com>
6255 * Makefile.in (SFILES): Add common/cleanups.c.
6257 (cleanups.o): New rule.
6259 2014-08-29 Gary Benson <gbenson@redhat.com>
6261 * utils.c (internal_vwarning): New function.
6263 2014-08-28 Gary Benson <gbenson@redhat.com>
6265 * utils.h (fatal): Remove declaration.
6266 * utils.c (fatal): Remove function.
6268 2014-08-28 Gary Benson <gbenson@redhat.com>
6270 * tracepoint.c (gdb_agent_init): Replace fatal with
6272 (initialize_tracepoint): Likewise.
6274 2014-08-28 Gary Benson <gbenson@redhat.com>
6276 * remote-utils.c (remote_prepare): Replace fatal with error.
6278 2014-08-28 Gary Benson <gbenson@redhat.com>
6280 * linux-low.c (linux_async): Replace fatal with warning.
6282 (linux_start_non_stop): Return -1 if linux_async failed.
6284 2014-08-28 Gary Benson <gbenson@redhat.com>
6286 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6288 (i386_dr_low_get_addr): Remove vague comment.
6289 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6292 2014-08-28 Gary Benson <gbenson@redhat.com>
6294 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6295 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6297 (linux_resume_one_lwp): Likewise.
6298 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6300 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6301 with internal_error.
6302 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6303 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6304 (find_register_by_name): Replace fatal with internal_error.
6305 (find_regno): Likewise.
6306 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6307 * thread-db.c (thread_db_create_event): Likewise.
6308 (thread_db_load_search): Likewise.
6309 (try_thread_db_load_1): Likewise.
6310 * tracepoint.c (get_jump_space_head): Replace fatal with
6312 (claim_trampoline_space): Likewise.
6313 (have_fast_tracepoint_trampoline_buffer): Likewise.
6314 (cmd_qtstart): Likewise.
6315 (stop_tracing): Likewise.
6316 (fast_tracepoint_collecting): Likewise.
6317 (target_malloc): Likewise.
6318 (download_tracepoint): Likewise.
6319 (download_trace_state_variables): Replace check with gdb_assert.
6320 (upload_fast_traceframes): Replace fatal with internal_error.
6322 2014-08-19 Tom Tromey <tromey@redhat.com>
6323 Gary Benson <gbenson@redhat.com>
6325 * Makefile.in (SFILES): Add common/common-debug.c.
6326 (OBS): Add common-debug.o.
6327 (common-debug.o): New rule.
6328 * debug.h (debug_printf): Don't declare.
6329 * debug.c (debug_printf): Renamed and rewritten as...
6330 (debug_vprintf): New function.
6332 2014-08-19 Gary Benson <gbenson@redhat.com>
6334 * utils.h: Do not include print-utils.h.
6336 2014-08-19 Tom Tromey <tromey@redhat.com>
6337 Gary Benson <gbenson@redhat.com>
6339 * server.h: Add static assertion.
6340 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6342 2014-08-19 Tom Tromey <tromey@redhat.com>
6343 Gary Benson <gbenson@redhat.com>
6345 * Makefile.in (SFILES): Add common/errors.c.
6346 (OBS): Add errors.o.
6347 (IPA_OBS): Add errors-ipa.o.
6348 (errors.o): New rule.
6349 (errors-ipa.o): Likewise.
6350 * utils.h (perror_with_name, error, warning): Don't declare.
6351 * utils.c (warning): Renamed and rewritten as...
6352 (vwarning): New function.
6353 (error): Renamed and rewritten as...
6354 (verror): New function.
6355 (internal_error): Renamed and rewritten as...
6356 (internal_verror): New function.
6358 2014-08-07 Gary Benson <gbenson@redhat.com>
6360 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6361 * configure: Regenerate.
6362 * config.in: Likewise.
6363 * server.h: Do not include errno.h.
6364 * event-loop.c: Likewise.
6365 * hostio-errno.c: Likewise.
6366 * linux-low.c: Likewise.
6367 * remote-utils.c: Likewise.
6368 * spu-low.c: Likewise.
6369 * utils.c: Likewise.
6370 * gdbreplay.c: Unconditionally include errno.h.
6372 2014-08-07 Gary Benson <gbenson@redhat.com>
6374 * server.h: Do not include string.h.
6375 * event-loop.c: Likewise.
6376 * linux-low.c: Likewise.
6377 * regcache.c: Likewise.
6378 * remote-utils.c: Likewise.
6379 * spu-low.c: Likewise.
6380 * utils.c: Likewise.
6382 2014-08-07 Gary Benson <gbenson@redhat.com>
6384 * server.h: Do not include gdb_assert.h.
6386 2014-08-07 Gary Benson <gbenson@redhat.com>
6388 * server.h: Do not include common-utils.h.
6390 2014-08-07 Gary Benson <gbenson@redhat.com>
6392 * server.h: Do not include ptid.h.
6393 * notif.h: Likewise.
6395 2014-08-07 Gary Benson <gbenson@redhat.com>
6397 * server.h: Do not include gdb_locale.h.
6399 2014-08-07 Gary Benson <gbenson@redhat.com>
6401 * server.h: Do not include gdb/signals.h.
6402 * win32-low.c: Likewise.
6404 2014-08-07 Gary Benson <gbenson@redhat.com>
6406 * server.h: Do not include pathmax.h.
6408 2014-08-07 Gary Benson <gbenson@redhat.com>
6410 * server.h: Do not include libiberty.h.
6411 * linux-bfin-low.c: Likewise.
6413 2014-08-07 Gary Benson <gbenson@redhat.com>
6415 * server.h: Do not include ansidecl.h.
6417 2014-08-07 Gary Benson <gbenson@redhat.com>
6419 * linux-x86-low.c: Do not include stddef.h.
6420 * lynx-ppc-low.c: Likewise.
6421 * tracepoint.c: Likewise.
6423 2014-08-07 Gary Benson <gbenson@redhat.com>
6425 * server.h: Do not include stdarg.h.
6426 * nto-low.c: Likewise.
6428 2014-08-07 Gary Benson <gbenson@redhat.com>
6430 * server.h: Do not include stdlib.h.
6431 * inferiors.c: Likewise.
6432 * linux-low.c: Likewise.
6433 * regcache.c: Likewise.
6434 * spu-low.c: Likewise.
6435 * tracepoint.c: Likewise.
6436 * utils.c: Likewise.
6438 2014-08-07 Gary Benson <gbenson@redhat.com>
6440 * server.h: Do not include stdio.h.
6441 * linux-low.c: Likewise.
6442 * remote-utils.c: Likewise.
6443 * spu-low.c: Likewise.
6444 * utils.c: Likewise.
6445 * wincecompat.c: Likewise.
6447 2014-08-06 Gary Benson <gbenson@redhat.com>
6449 * regcache.c (init_register_cache): Move conditionals inside if.
6451 2014-08-06 Gary Benson <gbenson@redhat.com>
6453 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6455 2014-07-31 Gary Benson <gbenson@redhat.com>
6457 * ax.h: Do not include server.h.
6458 * gdbthread.h: Likewise.
6459 * lynx-low.h: Likewise.
6460 * notif.h: Likewise.
6462 2014-07-30 Gary Benson <gbenson@redhat.com>
6464 * server.h: Include common-defs.h.
6465 Do not include config.h or build-gnulib-gdbserver/config.h.
6467 2014-07-30 Gary Benson <gbenson@redhat.com>
6469 * hostio-errno.c: Move server.h to top of includes list.
6470 * inferiors.c: Likewise.
6471 * linux-x86-low.c: Likewise.
6472 * notif.c: Include server.h.
6474 2014-07-24 Tom Tromey <tromey@redhat.com>
6475 Gary Benson <gbenson@redhat.com>
6477 * server.h (CORE_ADDR): Now unsigned.
6479 2014-07-16 Pedro Alves <palves@redhat.com>
6481 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6483 2014-07-15 Pedro Alves <palves@redhat.com>
6485 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6488 2014-07-11 Pedro Alves <palves@redhat.com>
6490 * linux-low.c (kill_wait_lwp): New function, based on
6491 kill_one_lwp_callback, but use my_waitpid directly.
6492 (kill_one_lwp_callback, linux_kill): Use it.
6494 2014-06-23 Pedro Alves <palves@redhat.com>
6496 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6497 before setting DR0..DR3.
6499 2014-06-20 Gary Benson <gbenson@redhat.com>
6501 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6502 * configure: Regenerated.
6503 * config.in: Likewise.
6505 2014-06-20 Gary Benson <gbenson@redhat.com>
6507 * Makefile.in (SFILES): Update locations for files moved
6509 (object file files): Reordered.
6511 2014-06-20 Gary Benson <gbenson@redhat.com>
6513 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6514 (i386_dr_low_set_addr): Likewise.
6515 (i386_dr_low_get_addr): Likewise.
6516 (i386_dr_low_can_set_control): Likewise.
6517 (i386_dr_low_set_control): Likewise.
6518 (i386_dr_low_get_control): Likewise.
6519 (i386_dr_low_get_status): Likewise.
6520 (i386_get_debug_register_length): Likewise.
6521 * linux-x86-low.c (i386_dr_low_set_addr):
6522 Changed signature. Made static.
6523 (i386_dr_low_get_addr): Likewise.
6524 (i386_dr_low_set_control): Likewise.
6525 (i386_dr_low_get_control): Likewise.
6526 (i386_dr_low_get_status): Likewise.
6527 (i386_dr_low): New global variable.
6528 * win32-i386-low.c (i386_dr_low_set_addr):
6529 Changed signature. Made static.
6530 (i386_dr_low_get_addr): Likewise.
6531 (i386_dr_low_set_control): Likewise.
6532 (i386_dr_low_get_control): Likewise.
6533 (i386_dr_low_get_status): Likewise.
6534 (i386_dr_low): New global variable.
6536 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6538 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6539 * Makefile.in (AR, AR_FLAGS): Define.
6540 * configure: Regenerate.
6542 2014-06-19 Gary Benson <gbenson@redhat.com>
6544 * Makefile.in (i386-dregs.o): New rule.
6545 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6546 * i386-low.c (target.h): Remove include.
6547 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6548 (DR_CONTROL_SHIFT): Likewise.
6549 (DR_CONTROL_SIZE): Likewise.
6550 (DR_RW_EXECUTE): Likewise.
6551 (DR_RW_WRITE): Likewise.
6552 (DR_RW_READ): Likewise.
6553 (DR_RW_IORW): Likewise.
6554 (DR_LEN_1): Likewise.
6555 (DR_LEN_2): Likewise.
6556 (DR_LEN_4): Likewise.
6557 (DR_LEN_8): Likewise.
6558 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6559 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6560 (DR_ENABLE_SIZE): Likewise.
6561 (DR_LOCAL_SLOWDOWN): Likewise.
6562 (DR_GLOBAL_SLOWDOWN): Likewise.
6563 (DR_CONTROL_RESERVED): Likewise.
6564 (I386_DR_CONTROL_MASK): Likewise.
6565 (I386_DR_VACANT): Likewise.
6566 (I386_DR_LOCAL_ENABLE): Likewise.
6567 (I386_DR_GLOBAL_ENABLE): Likewise.
6568 (I386_DR_DISABLE): Likewise.
6569 (I386_DR_SET_RW_LEN): Likewise.
6570 (I386_DR_GET_RW_LEN): Likewise.
6571 (I386_DR_WATCH_HIT): Likewise.
6572 (i386_wp_op_t): Likewise.
6573 (i386_show_dr): Likewise.
6574 (i386_length_and_rw_bits): Likewise.
6575 (i386_insert_aligned_watchpoint): Likewise.
6576 (i386_remove_aligned_watchpoint): Likewise.
6577 (i386_handle_nonaligned_watchpoint): Likewise.
6578 i386_update_inferior_debug_regs(): Likewise.
6579 (i386_dr_insert_watchpoint): Likewise.
6580 (i386_dr_remove_watchpoint): Likewise.
6581 (i386_dr_region_ok_for_watchpoint): Likewise.
6582 (i386_dr_stopped_data_address): Likewise.
6583 (i386_dr_stopped_by_watchpoint): Likewise.
6585 2014-06-19 Gary Benson <gbenson@redhat.com>
6587 * i386-low.c (i386_dr_show): Renamed to
6588 i386_show_dr and made static. All uses updated.
6589 (i386_dr_length_and_rw_bits): Renamed to
6590 i386_length_and_rw_bits and made static.
6592 (i386_dr_insert_aligned_watchpoint): Renamed to
6593 i386_insert_aligned_watchpoint and made static.
6595 (i386_dr_remove_aligned_watchpoint): Renamed to
6596 i386_remove_aligned_watchpoint and made static.
6598 (i386_dr_update_inferior_debug_regs): Renamed to
6599 i386_update_inferior_debug_regs and made static.
6602 2014-06-18 Gary Benson <gbenson@redhat.com>
6604 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6605 (i386_dr_low_can_set_control): Likewise.
6606 (i386_get_debug_register_length): Likewise.
6607 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6608 (i386_dr_low_can_set_control): Likewise.
6609 (i386_get_debug_register_length): Likewise.
6611 2014-06-17 Gary Benson <gbenson@redhat.com>
6613 * i386-low.h (i386-dregs.h): New include.
6614 (DR_FIRSTADDR): Now in i386-dregs.h.
6615 (DR_LASTADDR): Likewise.
6616 (DR_NADDR): Likewise.
6617 (DR_STATUS): Likewise.
6618 (DR_CONTROL): Likewise.
6619 (i386_debug_reg_state): Likewise.
6620 (i386_dr_insert_watchpoint): Likewise.
6621 (i386_dr_remove_watchpoint): Likewise.
6622 (i386_dr_region_ok_for_watchpoint): Likewise.
6623 (i386_dr_stopped_data_address): Likewise.
6624 (i386_dr_stopped_by_watchpoint): Likewise.
6625 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6627 2014-06-18 Gary Benson <gbenson@redhat.com>
6629 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6630 i386_dr_insert_watchpoint.
6631 (i386_low_remove_watchpoint): Renamed to
6632 i386_dr_remove_watchpoint.
6633 (i386_low_region_ok_for_watchpoint): Renamed to
6634 i386_dr_region_ok_for_watchpoint.
6635 (i386_low_stopped_data_address): Renamed to
6636 i386_dr_stopped_data_address.
6637 (i386_low_stopped_by_watchpoint): Renamed to
6638 i386_dr_stopped_by_watchpoint.
6639 * i386-low.c (i386_show_dr): Renamed to
6640 i386_dr_show and made nonstatic. All uses updated.
6641 (i386_length_and_rw_bits): Renamed to
6642 i386_dr_length_and_rw_bits and made nonstatic.
6644 (i386_insert_aligned_watchpoint): Renamed to
6645 i386_dr_insert_aligned_watchpoint and made nonstatic.
6647 (i386_remove_aligned_watchpoint): Renamed to
6648 i386_dr_remove_aligned_watchpoint and made nonstatic.
6650 (i386_update_inferior_debug_regs): Renamed to
6651 i386_dr_update_inferior_debug_regs and made nonstatic.
6653 (i386_low_insert_watchpoint): Renamed to
6654 i386_dr_insert_watchpoint. All uses updated.
6655 (i386_low_remove_watchpoint): Renamed to
6656 i386_dr_remove_watchpoint. All uses updated.
6657 (i386_low_region_ok_for_watchpoint): Renamed to
6658 i386_dr_region_ok_for_watchpoint. All uses updated.
6659 (i386_low_stopped_data_address): Renamed to
6660 i386_dr_stopped_data_address. All uses updated.
6661 (i386_low_stopped_by_watchpoint): Renamed to
6662 i386_dr_stopped_by_watchpoint. All uses updated.
6664 2014-06-18 Gary Benson <gbenson@redhat.com>
6666 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6667 (i386_dr_low_can_set_control): Likewise.
6668 (i386_insert_aligned_watchpoint): New check.
6670 2014-06-18 Gary Benson <gbenson@redhat.com>
6672 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6675 2014-06-18 Gary Benson <gbenson@redhat.com>
6677 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6678 instead of fatal and error.
6679 (i386_handle_nonaligned_watchpoint): Likewise.
6681 2014-06-18 Gary Benson <gbenson@redhat.com>
6683 * i386-low.c (i386_get_debug_register_length): New macro.
6684 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6685 (i386_show_dr): Use debug_printf instead of fprintf. Use
6686 phex to format values.
6688 2014-06-18 Gary Benson <gbenson@redhat.com>
6690 * i386-low.h: Comment changes.
6691 * i386-low.c: Likewise.
6693 2014-06-18 Gary Benson <gbenson@redhat.com>
6695 * i386-low.c: Whitespace changes.
6697 2014-06-12 Tom Tromey <tromey@redhat.com>
6699 * utils.c (freeargv): Remove.
6701 2014-06-12 Tom Tromey <tromey@redhat.com>
6703 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6704 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6705 (parse_debug_format_options): Likewise.
6706 (gdbserver_usage): Likewise.
6707 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6708 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6709 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6711 ($(LIBGNU)): Depend on libiberty.
6712 (all-lib): Recurse into all subdirs.
6713 (install-only): Invoke "install" target in subdirs.
6714 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6716 * configure: Rebuild.
6717 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6718 for vasprintf, vsnprintf, or gettimeofday.
6719 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6722 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6724 * development.sh: Delete.
6725 * Makefile.in (config.status): Adjust dependency on development.sh.
6726 * configure.ac: Adjust development.sh source call.
6727 * configure: Regenerate.
6729 2014-06-02 Pedro Alves <palves@redhat.com>
6731 * ax.c (gdb_free_agent_expr): New function.
6732 * ax.h (gdb_free_agent_expr): New declaration.
6733 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6735 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6737 (clear_breakpoint_conditions_and_commands): New function.
6738 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6739 (clear_breakpoint_conditions_and_commands): New declaration.
6741 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6743 * linux-aarch64-low.c (asm/ptrace.h): Include.
6745 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6747 Fix TLS access for -static -pthread.
6748 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6749 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6750 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6752 2014-05-20 Pedro Alves <palves@redhat.com>
6754 * linux-aarch64-low.c (aarch64_insert_point)
6755 (aarch64_remove_point): No longer check whether the type is
6756 supported here. Adjust to new interface.
6757 (the_low_target): Install aarch64_supports_z_point_type as
6758 supports_z_point_type method.
6759 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6760 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6761 instead of a Z packet char. Adjust.
6762 (arm_supports_z_point_type): New function.
6763 (arm_insert_point, arm_remove_point): Adjust to new interface.
6764 (the_low_target): Install arm_supports_z_point_type.
6765 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6766 (cris_insert_point, cris_remove_point): Adjust to new interface.
6767 Don't check whether the type is supported here.
6768 (the_low_target): Install cris_supports_z_point_type.
6769 * linux-low.c (linux_supports_z_point_type): New function.
6770 (linux_insert_point, linux_remove_point): Adjust to new interface.
6771 * linux-low.h (struct linux_target_ops) <insert_point,
6772 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6773 raw_breakpoint pointer parameter.
6774 <supports_z_point_type>: New method.
6775 * linux-mips-low.c (mips_supports_z_point_type): New function.
6776 (mips_insert_point, mips_remove_point): Adjust to new interface.
6777 Use mips_supports_z_point_type.
6778 (the_low_target): Install mips_supports_z_point_type.
6779 * linux-ppc-low.c (the_low_target): Install NULL as
6780 supports_z_point_type method.
6781 * linux-s390-low.c (the_low_target): Install NULL as
6782 supports_z_point_type method.
6783 * linux-sparc-low.c (the_low_target): Install NULL as
6784 supports_z_point_type method.
6785 * linux-x86-low.c (x86_supports_z_point_type): New function.
6786 (x86_insert_point): Adjust to new insert_point interface. Use
6787 insert_memory_breakpoint. Adjust to new
6788 i386_low_insert_watchpoint interface.
6789 (x86_remove_point): Adjust to remove_point interface. Use
6790 remove_memory_breakpoint. Adjust to new
6791 i386_low_remove_watchpoint interface.
6792 (the_low_target): Install x86_supports_z_point_type.
6793 * lynx-low.c (lynx_target_ops): Install NULL as
6794 supports_z_point_type callback.
6795 * nto-low.c (nto_supports_z_point_type): New.
6796 (nto_insert_point, nto_remove_point): Adjust to new interface.
6797 (nto_target_ops): Install nto_supports_z_point_type.
6798 * mem-break.c: Adjust intro comment.
6799 (struct raw_breakpoint) <raw_type, size>: New fields.
6800 <inserted>: Update comment.
6801 <shlib_disabled>: Delete field.
6802 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6803 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6804 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6805 (raw_bkpt_type_to_target_hw_bp_type): New function.
6806 (find_enabled_raw_code_breakpoint_at): New function.
6807 (find_raw_breakpoint_at): New type and size parameters. Use them.
6808 (insert_memory_breakpoint): New function, based off
6809 set_raw_breakpoint_at.
6810 (remove_memory_breakpoint): New function.
6811 (set_raw_breakpoint_at): Reimplement.
6812 (set_breakpoint): New, based on set_breakpoint_at.
6813 (set_breakpoint_at): Reimplement.
6814 (delete_raw_breakpoint): Go through the_target->remove_point
6815 instead of assuming memory breakpoints.
6816 (find_gdb_breakpoint_at): Delete.
6817 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6818 (find_gdb_breakpoint): New function.
6819 (set_gdb_breakpoint_at): Delete.
6820 (z_type_supported): New function.
6821 (set_gdb_breakpoint_1): New function, loosely based off
6822 set_gdb_breakpoint_at.
6823 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6824 (delete_gdb_breakpoint_at): Delete.
6825 (delete_gdb_breakpoint_1): New function, loosely based off
6826 delete_gdb_breakpoint_at.
6827 (delete_gdb_breakpoint): New function.
6828 (clear_gdb_breakpoint_conditions): Rename to ...
6829 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6831 (add_condition_to_breakpoint): Make static.
6832 (add_breakpoint_condition): Take a struct breakpoint pointer
6833 instead of an address. Adjust.
6834 (gdb_condition_true_at_breakpoint): Rename to ...
6835 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6837 (gdb_condition_true_at_breakpoint): Reimplement.
6838 (add_breakpoint_commands): Take a struct breakpoint pointer
6839 instead of an address. Adjust.
6840 (gdb_no_commands_at_breakpoint): Rename to ...
6841 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6842 parameter. Return true if no breakpoint was found. Change debug
6844 (gdb_no_commands_at_breakpoint): Reimplement.
6845 (run_breakpoint_commands): Rename to ...
6846 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6847 and change return type to boolean.
6848 (run_breakpoint_commands): New function.
6849 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6850 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6851 breakpoint. Go through the_target->remove_point instead of
6852 assuming memory breakpoint.
6853 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6854 software and hardware breakpoints.
6855 (reinsert_raw_breakpoint): Go through the_target->insert_point
6856 instead of assuming memory breakpoint.
6857 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6858 software and hardware breakpoints.
6859 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6860 Check both software and hardware breakpoints.
6861 (validate_inserted_breakpoint): Assert the breakpoint is a
6862 software breakpoint. Set the inserted flag to -1 instead of
6863 setting shlib_disabled.
6864 (delete_disabled_breakpoints): Adjust.
6865 (validate_breakpoints): Only validate software breakpoints.
6866 Adjust to inserted flag change.
6867 (check_mem_read, check_mem_write): Skip breakpoint types other
6868 than software breakpoints. Adjust to inserted flag change.
6869 * mem-break.h (enum raw_bkpt_type): New enum.
6870 (raw_breakpoint, struct process_info): Forward declare.
6871 (Z_packet_to_target_hw_bp_type): Delete declaration.
6872 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6873 (set_gdb_breakpoint, delete_gdb_breakpoint)
6874 (clear_breakpoint_conditions): New declarations.
6875 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6876 (breakpoint_inserted_here): Update comment.
6877 (add_breakpoint_condition, add_breakpoint_commands): Replace
6878 address parameter with a breakpoint pointer parameter.
6879 (gdb_breakpoint_here): Update comment.
6880 (delete_gdb_breakpoint_at): Delete.
6881 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6882 * server.c (process_point_options): Take a struct breakpoint
6883 pointer instead of an address. Adjust.
6884 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6885 delete_gdb_breakpoint.
6886 * spu-low.c (spu_target_ops): Install NULL as
6887 supports_z_point_type method.
6888 * target.h: Include mem-break.h.
6889 (struct target_ops) <prepare_to_access_memory>: Update comment.
6890 <supports_z_point_type>: New field.
6891 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6892 instead of a char. Also take a raw breakpoint pointer.
6893 * win32-arm-low.c (the_low_target): Install NULL as
6894 supports_z_point_type.
6895 * win32-i386-low.c (i386_supports_z_point_type): New function.
6896 (i386_insert_point, i386_remove_point): Adjust to new interface.
6897 (the_low_target): Install i386_supports_z_point_type.
6898 * win32-low.c (win32_supports_z_point_type): New function.
6899 (win32_insert_point, win32_remove_point): Adjust to new interface.
6900 (win32_target_ops): Install win32_supports_z_point_type.
6901 * win32-low.h (struct win32_target_ops):
6902 <supports_z_point_type>: New method.
6903 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6904 instead of a char. Also take a raw breakpoint pointer.
6906 2014-05-20 Pedro Alves <palves@redhat.com>
6908 * mem-break.h: Include break-common.h.
6909 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6910 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6911 (Z_packet_to_target_hw_bp_type): New declaration.
6912 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6913 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6914 (Z_PACKET_ACCESS_WP): Delete macros.
6915 (Z_packet_to_hw_type): Delete function.
6916 * i386-low.h: Don't include break-common.h here.
6917 (Z_packet_to_hw_type): Delete declaration.
6918 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6919 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6920 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6921 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6922 * linux-aarch64-low.c: Don't include break-common.h here.
6923 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6924 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6925 (Z_packet_to_target_hw_bp_type): Delete function.
6926 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6928 (mips_insert_point, mips_remove_point): Use
6929 Z_packet_to_target_hw_bp_type.
6931 2014-05-20 Pedro Alves <palves@redhat.com>
6933 * linux-aarch64-low.c: Include break-common.h.
6934 (enum target_point_type): Delete.
6935 (Z_packet_to_point_type): Rename to ...
6936 (Z_packet_to_target_hw_bp_type): ... this, and return a
6937 target_hw_bp_type instead.
6938 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6939 instead of an enum target_point_type.
6940 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6942 (aarch64_dr_state_insert_one_point)
6943 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6944 (aarch64_handle_aligned_watchpoint)
6945 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6946 Take an enum target_hw_bp_type instead of an enum
6948 (aarch64_supports_z_point_type): New function.
6949 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6950 use Z_packet_to_target_hw_bp_type.
6952 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6954 * configure.ac: Only use -Werror by default when DEVELOPMENT
6956 * configure: Regenerate.
6958 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6960 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6961 * linux-x86-low.c (X86_64_USER_REGS): New.
6962 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6964 2014-04-28 Yao Qi <yao@codesourcery.com>
6966 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6969 2014-04-25 Pedro Alves <palves@redhat.com>
6972 * linux-low.c (linux_attach_fail_reason_string): New function.
6973 (linux_attach_lwp): Delete.
6974 (linux_attach_lwp_1): Rename to ...
6975 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6976 argument. Remove "initial" parameter. Return int instead of
6977 void. Don't error or warn here.
6978 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6979 failure to attach to the tgid. Call warning when failing to
6981 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6982 argument. Remove "initial" parameter. Return int instead of
6983 void. Don't error or warn here.
6984 (linux_attach_fail_reason_string): New declaration.
6985 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6986 interface change. Use linux_attach_fail_reason_string.
6988 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6989 Walfred Tedeschi <walfred.tedeschi@intel.com>
6991 * Makefile.in: Added rules to handle new files
6992 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6993 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6994 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6995 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6996 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6997 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6999 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7000 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7001 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7002 i386/x32-avx512.xml.
7003 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7004 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7005 i386/x32-avx512-linux.xml.
7006 * i387-fp.c (num_avx512_k_registers): New constant for number
7008 (num_avx512_zmmh_low_registers): New constant for number of
7009 lower ZMM registers (0-15).
7010 (num_avx512_zmmh_high_registers): New constant for number of
7011 higher ZMM registers (16-31).
7012 (num_avx512_ymmh_registers): New contant for number of higher
7013 YMM registers (ymm16-31 added by avx521 on x86_64).
7014 (num_avx512_xmm_registers): New constant for number of higher
7015 XMM registers (xmm16-31 added by AVX512 on x86_64).
7016 (struct i387_xsave): Add space for AVX512 registers.
7017 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7018 Add code to handle AVX512 registers.
7019 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7020 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7021 prototypei from generated file.
7022 (tdesc_amd64_avx512_linux): Likewise.
7023 (init_registers_x32_avx512_linux): Likewise.
7024 (tdesc_x32_avx512_linux): Likewise.
7025 (init_registers_i386_avx512_linux): Likewise.
7026 (tdesc_i386_avx512_linux): Likewise.
7027 (x86_64_regmap): Add AVX512 registers.
7028 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7030 (initialize_low_arch): Add code to initialize AVX512 registers.
7032 2014-04-23 Pedro Alves <palves@redhat.com>
7034 * mem-break.c (find_gdb_breakpoint_at): Make static.
7035 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7037 2014-04-23 Pedro Alves <palves@redhat.com>
7039 * i386-low.c: Don't include break-common.h here.
7040 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7041 prototype to take target_hw_bp_type as argument instead of a Z
7043 * i386-low.h: Include break-common.h here.
7044 (Z_packet_to_hw_type): Declare.
7045 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7047 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7048 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7049 (x86_remove_point): Convert the packet number to a
7050 target_hw_bp_type before calling i386_low_remove_watchpoint.
7051 * win32-i386-low.c (i386_insert_point): Convert the packet number
7052 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7053 (i386_remove_point): Convert the packet number to a
7054 target_hw_bp_type before calling i386_low_remove_watchpoint.
7056 2014-04-23 Pedro Alves <palves@redhat.com>
7058 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7060 2014-04-10 Pedro Alves <palves@redhat.com>
7062 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7063 Check if the condition or command is NULL before checking if the
7064 breakpoint is known. On success, return true.
7065 * mem-break.h (add_breakpoint_condition): Document return.
7066 (add_breakpoint_commands): Add describing comment.
7067 * server.c (skip_to_semicolon): New function.
7068 (process_point_options): Use it.
7070 2014-04-09 Pedro Alves <palves@redhat.com>
7072 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7075 2014-02-27 Pedro Alves <palves@redhat.com>
7078 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7080 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7082 (last_thread_of_process_p): Take a PID argument instead of a
7084 (linux_wait_for_lwp): Delete.
7085 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7087 (linux_low_filter_event): New function, party factored out from
7088 linux_wait_for_event.
7089 (linux_wait_for_event): Rename to ...
7090 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7091 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7092 sigsuspend. Check for zombie leaders.
7093 (linux_wait_for_event): Reimplement as wrapper around
7094 linux_wait_for_event_filtered.
7095 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7096 a normal or signal exit is seen, it's the whole process exiting.
7097 (wait_for_sigstop): No longer a for_each_inferior callback.
7098 Rewrite on top of linux_wait_for_event_filtered.
7099 (stop_all_lwps): Call wait_for_sigstop directly.
7100 * server.c (resume, handle_target_event): Handle
7101 TARGET_WAITKIND_NO_RESUMED.
7103 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7105 * win32-low.c (psapi_get_dll_name,
7106 * win32_CreateToolhelp32Snapshot): Delete.
7107 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7108 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7110 (handle_load_dll): Add function description.
7111 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7113 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7115 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7117 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7118 base address when calling win32_add_one_solib.
7119 (handle_load_dll): Delete local variable load_addr.
7120 Remove 0x1000 offset applied to DLL base address when calling
7121 win32_add_one_solib.
7122 (handle_unload_dll): Add comment.
7124 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7126 * win32-low.c (win32_add_all_dlls): Renames
7127 win32_ensure_ntdll_loaded. Rewrite function documentation.
7128 Adjust implementation to always load all DLLs.
7129 Add 0x1000 offset to DLL base address when calling
7130 win32_add_one_solib.
7131 (child_initialization_done): New static global.
7132 (do_initial_child_stuff): Set child_initialization_done to
7133 zero during child initialization, and 1 after. Replace call
7134 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7136 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7137 (handle_unload_dll): Add function documentation.
7138 (get_child_debug_event): Ignore load and unload DLL events
7139 during child initialization.
7141 2014-02-20 Doug Evans <dje@google.com>
7143 Remove global all_lwps.
7144 * inferiors.h (ptid_of): Move here from linux-low.h.
7145 (pid_of, lwpid_of): Ditto.
7146 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7147 parameter is a struct thread_info * now.
7148 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7149 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7150 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7152 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7153 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7154 * linux-arm-low.c (update_registers_callback): Update, "entry"
7155 parameter is a struct thread_info * now.
7156 Fetch lwpid from current_inferior directly.
7157 (arm_insert_point): Pass &all_threads to find_inferior instead of
7159 (arm_remove_point): Ditto.
7160 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7161 (arm_prepare_to_resume): Fetch pid from thread.
7162 (arm_read_description): Fetch lwpid from current_inferior directly.
7163 * linux-low.c (all_lwps): Delete.
7164 (delete_lwp): Delete call to remove_inferior.
7165 (handle_extended_wait): Fetch lwpid from thread.
7166 (add_lwp): Don't set lwp->entry.id. Remove call to
7167 add_inferior_to_list.
7168 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7169 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7170 (kill_one_lwp_callback): Ditto.
7171 (linux_kill): Don't dereference NULL pointer.
7172 Fetch ptid,lwpid from thread.
7173 (get_detach_signal): Fetch ptid from thread.
7174 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7175 Simplify call to regcache_invalidate_thread.
7176 (delete_lwp_callback): Update, "entry" parameter is a
7177 struct thread_info * now. Fetch pid from thread.
7178 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7179 (status_pending_p_callback): Update, "entry" parameter is a
7180 struct thread_info * now. Fetch ptid from thread.
7181 (find_lwp_pid): Update, "entry" parameter is a
7182 struct thread_info * now.
7183 (linux_wait_for_lwp): Fetch pid from thread.
7184 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7185 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7186 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7187 (dequeue_one_deferred_signal): Ditto.
7188 (cancel_breakpoint): Fetch ptid from current_inferior.
7189 (linux_wait_for_event): Pass &all_threads to find_inferior,
7190 not &all_lwps. Fetch ptid, lwpid from thread.
7191 (count_events_callback): Update, "entry" parameter is a
7192 struct thread_info * now.
7193 (select_singlestep_lwp_callback): Ditto.
7194 (select_event_lwp_callback): Ditto.
7195 (cancel_breakpoints_callback): Ditto.
7196 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7198 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7199 (unsuspend_one_lwp): Update, "entry" parameter is a
7200 struct thread_info * now.
7201 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7203 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7204 Fetch lwpid from thread, not lwp.
7205 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7206 Pass &all_threads to find_inferior, not &all_lwps.
7207 (send_sigstop): Fetch lwpid from thread, not lwp.
7208 (send_sigstop_callback): Update, "entry" parameter is a
7209 struct thread_info * now.
7210 (suspend_and_send_sigstop_callback): Ditto.
7211 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7212 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7213 struct thread_info * now.
7214 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7216 (lwp_running): Update, "entry" parameter is a
7217 struct thread_info * now.
7218 (stop_all_lwps): Fetch ptid from thread.
7219 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7220 (linux_resume_one_lwp): Fetch lwpid from thread.
7221 (linux_set_resume_request): Update, "entry" parameter is a
7222 struct thread_info * now. Fetch pid, lwpid from thread.
7223 (resume_status_pending_p): Update, "entry" parameter is a
7224 struct thread_info * now.
7225 (need_step_over_p): Ditto. Fetch lwpid from thread.
7226 (start_step_over): Fetch lwpid from thread.
7227 (linux_resume_one_thread): Update, "entry" parameter is a
7228 struct thread_info * now. Fetch lwpid from thread.
7229 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7230 (proceed_one_lwp): Update, "entry" parameter is a
7231 struct thread_info * now. Fetch lwpid from thread.
7232 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7233 struct thread_info * now.
7234 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7235 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7236 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7238 (regsets_store_inferior_registers): Ditto.
7239 (fetch_register, store_register): Ditto.
7240 (linux_read_memory, linux_write_memory): Ditto.
7241 (linux_request_interrupt): Ditto.
7242 (linux_read_auxv): Ditto.
7243 (linux_xfer_siginfo): Ditto.
7244 (linux_qxfer_spu): Ditto.
7245 (linux_qxfer_libraries_svr4): Ditto.
7246 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7247 moved to inferiors.h.
7249 (get_thread_lwp): Update.
7250 (struct lwp_info): Delete member "entry". Simplify comment for
7253 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7254 current_inferior directly.
7255 (update_watch_registers_callback): Update, "entry" parameter is a
7256 struct thread_info * now. Fetch pid from thread.
7257 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7258 (mips_insert_point): Fetch lwpid from current_inferior.
7259 Pass &all_threads to find_inferior, not &all_lwps.
7260 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7261 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7263 (mips_stopped_data_address): Ditto.
7264 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7266 * linux-tile-low.c (tile_arch_setup): Ditto.
7267 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7268 (update_debug_registers_callback): Update, "entry" parameter is a
7269 struct thread_info * now. Fetch pid from thread.
7270 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7271 Pass &all_threads to find_inferior, not &all_lwps.
7272 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7273 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7274 Pass &all_threads to find_inferior, not &all_lwps.
7275 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7276 (i386_dr_low_get_status): Ditto.
7277 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7278 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7279 (x86_linux_read_description): Ditto.
7280 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7282 2014-02-20 Doug Evans <dje@google.com>
7284 * inferiors.c (get_first_inferior): Fix buglet.
7286 2014-02-19 Doug Evans <dje@google.com>
7288 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7289 * inferiors.c (add_thread): Change result type to struct thread_info *.
7290 All callers updated.
7291 (add_lwp): Call add_thread here instead of in callers.
7292 All callers updated.
7293 * linux-low.h (get_lwp_thread): Rewrite.
7294 (struct lwp_info): New member "thread".
7296 2014-02-19 Doug Evans <dje@google.com>
7298 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7299 All callers updated.
7301 2014-02-19 Doug Evans <dje@google.com>
7303 * inferiors.c (add_thread): Fix whitespace.
7305 2014-02-19 Doug Evans <dje@google.com>
7307 * dll.c (clear_dlls): Replace accessing list implemention details
7309 * gdbthread.h (get_first_thread): Declare.
7310 * inferiors.c (for_each_inferior_with_data): New function.
7311 (get_first_thread): New function.
7312 (find_thread_ptid): Simplify.
7313 (get_first_inferior): New function.
7314 (clear_list): Delete.
7315 (one_inferior_p): New function.
7316 (clear_inferior_list): New function.
7317 (clear_inferiors): Update.
7318 * inferiors.h (for_each_inferior_with_data): Declare.
7319 (clear_inferior_list): Declare.
7320 (one_inferior_p): Declare.
7321 (get_first_inferior): Declare.
7322 * linux-low.c (linux_wait_for_event): Replace accessing list
7323 implemention details with API function.
7324 * server.c (target_running): Ditto.
7325 (accumulate_file_name_length): New function.
7326 (emit_dll_description): New function.
7327 (handle_qxfer_libraries): Replace accessing list implemention
7328 details with API function.
7329 (handle_qxfer_threads_worker): New function.
7330 (handle_qxfer_threads_proper): Replace accessing list implemention
7331 details with API function.
7332 (handle_query): Ditto.
7333 (visit_actioned_threads_callback_ftype): New typedef.
7334 (visit_actioned_threads_data): New struct.
7335 (visit_actioned_threads): Rewrite to be find_inferior callback.
7336 (resume): Call find_inferior.
7337 (handle_status): Replace accessing list implemention
7338 details with API function.
7339 (process_serial_event): Replace accessing list implemention details
7341 * target.c (set_desired_inferior): Replace accessing list implemention
7342 details with API function.
7343 * tracepoint.c (same_process_p): New function.
7344 (gdb_agent_about_to_close): Replace accessing list implemention
7345 details with API function.
7346 * win32-low.c (child_delete_thread): Replace accessing list
7347 implemention details with API function.
7348 (match_dll_by_basename): New function.
7349 (dll_is_loaded_by_basename): New function.
7350 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7351 details call to dll_is_loaded_by_basename.
7353 2014-02-19 Doug Evans <dje@google.com>
7355 * dll.h (struct dll_info): Add comment.
7356 * gdbthread.h (struct thread_info): Add comment.
7357 (current_ptid): Simplify.
7358 * inferiors.c (add_process): Update.
7359 (remove_process): Update.
7360 * inferiors.h (struct process_info): Rename member "head" to "entry".
7361 * linux-low.c (delete_lwp): Update.
7363 (last_thread_of_process_p): Update.
7364 (kill_one_lwp_callback, linux_kill): Update.
7365 (status_pending_p_callback): Update.
7366 (wait_for_sigstop): Update. Simplify read of ptid.
7367 (start_step_over): Update.
7368 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7369 (get_lwp_thread): Update.
7370 (struct lwp_info): Rename member "head" to "entry".
7371 * regcache.h (inferior_list_entry): Delete.
7372 * server.c (kill_inferior_callback): Update.
7373 (detach_or_kill_inferior_callback): Update.
7374 (print_started_pid): Update.
7375 (print_attached_pid): Update.
7376 (process_serial_event): Simplify read of ptid.
7377 * thread-db.c (thread_db_create_event): Update.
7378 (thread_db_get_tls_address): Update.
7379 * win32-low.c (current_inferior_ptid): Simplify.
7381 2014-02-19 Tom Tromey <tromey@redhat.com>
7383 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7385 (target_supports_btrace): Update.
7387 2014-02-14 Yao Qi <yao@codesourcery.com>
7389 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7390 (rsp-low-ipa.o): New target.
7392 2014-02-12 Tom Tromey <tromey@redhat.com>
7394 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7395 convert_ascii_to_int.
7396 * regcache.c (registers_to_string): Likewise.
7397 * remote-utils.c (decode_M_packet): Likewise.
7398 * server.c (process_serial_event): Likewise.
7400 2014-02-12 Tom Tromey <tromey@redhat.com>
7402 * server.c (handle_query, handle_v_run): Use hex2bin, not
7404 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7406 2014-02-12 Tom Tromey <tromey@redhat.com>
7408 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7409 convert_int_to_ascii.
7410 * regcache.c (registers_to_string, collect_register_as_string):
7412 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7414 * server.c (process_serial_event): Likewise.
7415 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7416 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7418 2014-02-12 Tom Tromey <tromey@redhat.com>
7420 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7421 bin2hex, not hexify.
7422 * tracepoint.c (cmd_qtstatus): Likewise.
7424 2014-02-12 Tom Tromey <tromey@redhat.com>
7426 * remote-utils.c (monitor_output): Pass explicit length to
7429 2014-02-12 Tom Tromey <tromey@redhat.com>
7431 * tracepoint.c: Include rsp-low.h.
7432 * server.c: Include rsp-low.h.
7433 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7434 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7436 * remote-utils.c: Include rsp-low.h.
7437 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7438 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7439 (convert_int_to_ascii, convert_ascii_to_int): Move to
7441 * regcache.c: Include rsp-low.h.
7442 * ax.c: Include rsp-low.h.
7443 * Makefile.in (SFILES): Add common/rsp-low.c.
7444 (OBS): Add rsp-low.o.
7445 (rsp-low.o): New target.
7447 2014-02-12 Tom Tromey <tromey@redhat.com>
7449 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7450 Include print-utils.h.
7451 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7452 (plongest, thirty_two, phex_nz): Remove.
7453 * Makefile.in (SFILES): Add common/print-utils.c.
7454 (OBS): Add print-utils.o.
7455 (print-utils-ipa.o): New target.
7456 (print-utils.o): New target.
7457 (IPA_OBJS): Add print-utils-ipa.o.
7459 2014-02-06 Tom Tromey <tromey@redhat.com>
7461 * Makefile.in (SFILES): Fix indentation.
7463 2014-02-05 Doug Evans <dje@google.com>
7465 * linux-low.c (linux_wait_for_event): Improve comment.
7466 (linux_wait_1): Keep current_inferior in sync with event_child.
7468 2014-01-22 Doug Evans <dje@google.com>
7470 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7472 2014-01-22 Doug Evans <dje@google.com>
7474 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7475 * configure: Regenerate.
7476 * config.in: Regenerate.
7477 * Makefile.in (SFILES): Add debug.c.
7479 * debug.c: New file.
7480 * debug.h: New file.
7481 * linux-aarch64-low.c (*): Update all debugging printfs to use
7482 debug_printf instead of fprintf.
7483 * linux-arm-low.c (*): Ditto.
7484 * linux-cris-low.c (*): Ditto.
7485 * linux-crisv32-low.c (*): Ditto.
7486 * linux-m32r-low.c (*): Ditto.
7487 * linux-sparc-low.c (*): Ditto.
7488 * linux-x86.c (*): Ditto.
7489 * linux-low.c (*): Ditto.
7490 (linux_wait_1): Add calls to debug_enter, debug_exit.
7491 (linux_wait): Remove redundant debugging printf.
7492 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7493 (linux_resume, unstop_all_lwps): Ditto.
7494 * mem-break.c (*): Update all debugging printfs to use
7495 debug_printf instead of fprintf.
7496 * remote-utils.c (*): Ditto.
7497 * thread-db.c (*): Ditto.
7498 * server.c #include <ctype.h>, "gdb_vecs.h".
7499 (debug_threads): Moved to debug.c.
7500 (*): Update all debugging printfs to use debug_printf instead of
7502 (start_inferior): Replace call to fflush with call to debug_flush.
7503 (monitor_show_help): Mention set debug-format.
7504 (parse_debug_format_options): New function.
7505 (handle_monitor_command): Handle "monitor set debug-format".
7506 (gdbserver_usage): Mention --debug-format.
7507 (main): Parse --debug-format.
7508 * server.h (debug_threads): Declaration moved to debug.h.
7510 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7511 trace_debug_1 that uses debug_printf.
7512 (tracepoint_look_up_symbols): Update all debugging printfs to use
7513 debug_printf instead of fprintf.
7515 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7517 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7520 2014-01-17 Pedro Alves <palves@redhat.com>
7523 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7524 defined after including gdb_proc_service.h.
7526 2014-01-16 Doug Evans <dje@google.com>
7528 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7529 (match_dll): Use it.
7531 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7533 * target.h (target_ops) <read_btrace>: Change parameters and
7534 return type to allow error reporting.
7535 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7536 trace reading errors on.
7537 * linux-low.c (linux_low_read_btrace): Pass trace reading
7539 (linux_low_disable_btrace): New.
7541 2014-01-15 Doug Evans <dje@google.com>
7543 * inferiors.c (thread_id_to_gdb_id): Delete.
7544 * inferiors.h (thread_id_to_gdb_id): Delete.
7546 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7548 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7549 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7552 2014-01-08 Pedro Alves <palves@redhat.com>
7554 * server.c (handle_status): Don't discard previous queued stop
7555 replies or thread's pending status here.
7556 (main) <disconnection>: Do it here instead.
7558 2014-01-08 Pedro Alves <palves@redhat.com>
7560 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7561 * server.c (visit_actioned_threads, handle_pending_status): New
7563 (handle_v_cont): Factor out parts to ...
7564 (resume): ... this new function. If in all-stop, and a thread
7565 being resumed has a pending status, report it without actually
7567 (myresume): Adjust to use the new 'resume' function.
7568 (clear_pending_status_callback, set_pending_status_callback)
7569 (find_status_pending_thread_callback): New functions.
7570 (handle_status): Handle the case of multiple threads having
7571 interesting statuses to report. Report threads' real last signal
7572 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7573 with an interesting thread to report the status for, instead of
7574 always reporting the status of the first thread.
7576 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7578 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7579 * gdbreplay.c (gdbreplay_version): Likewise.
7581 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7583 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7584 iov.iov_len with the real length in use.
7586 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7588 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7589 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7590 for all targets that use win32-low.c.
7591 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7592 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7594 2013-12-13 Pedro Alves <palves@redhat.com>
7596 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7597 if equal to TARGET_WAITKIND_LOADED.
7598 * win32-low.c (cached_status): New static global.
7599 (win32_wait): Add declaration.
7600 (do_initial_child_stuff): Flush all initial pending debug events
7601 up to the initial breakpoint.
7602 (win32_wait): If CACHED_STATUS was set, return that instead
7603 of doing a real wait. Remove the code resuming the execution
7604 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7605 during the initial phase. Also remove the code changing
7606 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7607 TARGET_WAITKIND_STOPPED.
7609 2013-12-11 Yao Qi <yao@codesourcery.com>
7611 * notif.c (handle_notif_ack): Return 0 if no notification
7614 2013-11-20 Doug Evans <dje@google.com>
7616 * linux-low.c (linux_set_resume_request): Fix comment.
7618 2013-11-20 Doug Evans <dje@google.com>
7620 * linux-low.c (resume_status_pending_p): Tweak comment.
7622 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7624 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7625 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7626 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7627 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7628 (srv_amd64_regobj): Add amd64-mpx.o.
7629 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7630 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7631 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7632 * i387-fp.c (num_pl_bnd_register) Added constant.
7633 (num_pl_bnd_cfg_registers) Added constant.
7634 (struct i387_xsave) Added reserved area and MPX fields.
7635 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7636 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7638 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7639 (init_registers_amd64_mpx_linux): Declare new function.
7640 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7641 (x86_64_regmap): Add MPX registers.
7642 (x86_linux_read_description): Add MPX case.
7643 (initialize_low_arch): Initialize MPX targets.
7645 2013-11-18 Tom Tromey <tromey@redhat.com>
7647 * configure: Rebuild.
7648 * configure.ac: Don't check for stdlib.h.
7649 * gdbreplay.c: Unconditionally include stdlib.h.
7651 2013-11-18 Tom Tromey <tromey@redhat.com>
7653 * config.in: Rebuild.
7654 * configure: Rebuild.
7655 * configure.ac: Don't use AC_HEADER_DIRENT.
7657 2013-11-18 Tom Tromey <tromey@redhat.com>
7659 * server.h: Don't check HAVE_STRING_H.
7660 * gdbreplay.c: Don't check HAVE_STRING_H.
7661 * configure: Rebuild.
7663 2013-11-18 Tom Tromey <tromey@redhat.com>
7665 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7668 2013-11-08 Tom Tromey <tromey@redhat.com>
7670 * configure, config.in: Rebuild.
7671 * configure.ac: Remove unused configury.
7673 2013-11-08 Tom Tromey <tromey@redhat.com>
7675 * acinclude.m4: Include common.m4, codeset.m4.
7676 * configure, config.in: Rebuild.
7677 * configure.ac: Use GDB_AC_COMMON.
7679 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7681 * linux-s390-low.c (HWCAP_S390_TE): New define.
7682 (s390_arch_setup): Consider the TE field in the HWCAP for
7683 determining 'have_regset_tdb'.
7685 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7688 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7691 2013-10-02 Pedro Alves <palves@redhat.com>
7693 * server.c (process_serial_event): Don't output "GDBserver
7694 exiting" if GDB is connected through stdio.
7695 * target.c (mywait): Likewise, be silent if GDB is connected
7698 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7700 * lynx-low.c (lynx_add_threads_after_attach): New function.
7701 (lynx_attach): Remove call to add_thread. Add call to
7702 lynx_add_threads_after_attach instead.
7704 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7706 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7707 * config.in, configure: Regenerated.
7709 2013-09-18 Yao Qi <yao@codesourcery.com>
7712 * server.c (start_inferior): Clear 'resume_info'.
7714 2013-09-16 Jiong Wang <jiwang@tilera.com>
7716 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7719 2013-09-16 Jiong Wang <jiwang@tilera.com>
7721 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7722 linux-tile-low.o to srv_tgtobj.
7724 2013-09-16 Will Newton <will.newton@linaro.org>
7726 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7729 2013-09-06 Pedro Alves <palves@redhat.com>
7731 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7732 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7733 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7734 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7735 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7736 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7738 2013-09-06 Pedro Alves <palves@redhat.com>
7740 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7741 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7743 2013-09-06 Pedro Alves <palves@redhat.com>
7745 * linux-amd64-ipa.c: Include tracepoint.h.
7746 * linux-i386-ipa.c: Include tracepoint.h.
7748 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7750 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7751 (ps_get_thread_area): New function.
7753 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7755 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7756 (initialize_low_arch): Call init_registers_crisv32 rather than
7757 init_register_crisv32.
7759 2013-09-05 Pedro Alves <palves@redhat.com>
7761 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7763 * hostio.h: ... this new file.
7764 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7765 win32-low.c: Include hostio.h.
7767 2013-09-05 Pedro Alves <palves@redhat.com>
7769 * server.h (gdb_client_data, handler_func, callback_handler_func)
7770 (delete_file_handler, add_file_handler, append_callback_event)
7771 (delete_callback_event, start_event_loop, initialize_event_loop):
7772 Move to event-loop.h and include it.
7773 * event-loop.h: New file.
7775 2013-09-05 Pedro Alves <palves@redhat.com>
7777 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7778 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7779 (loaded_dll, unloaded_dll): Move to ...
7780 * dll.h: ... this new file.
7781 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7783 2013-09-05 Pedro Alves <palves@redhat.com>
7785 * server.h (current_process, get_thread_process, all_processes)
7786 (add_inferior_to_list, for_each_inferior, current_inferior)
7787 (remove_inferior, add_process, remove_process, find_process_pid)
7788 (have_started_inferiors_p, have_attached_inferiors_p)
7789 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7790 (clear_inferiors, find_inferior, find_inferior_id)
7791 (inferior_target_data, set_inferior_target_data)
7792 (inferior_regcache_data, set_inferior_regcache_data): Move to
7793 inferiors.h, and include it.
7794 * inferiors.h: New file.
7796 2013-09-05 Pedro Alves <palves@redhat.com>
7798 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7802 2013-09-05 Pedro Alves <palves@redhat.com>
7804 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7806 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7807 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7808 (handle_tracepoint_general_set, handle_tracepoint_query)
7809 (tracepoint_finished_step, tracepoint_was_hit)
7810 (release_while_stepping_state_list, current_traceframe)
7811 (in_readonly_region, traceframe_read_mem)
7812 (fetch_traceframe_registers, traceframe_read_sdata)
7813 (traceframe_read_info, struct fast_tpoint_collect_status)
7814 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7815 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7816 (supply_fast_tracepoint_registers)
7817 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7818 (ipa_tdesc, claim_trampoline_space)
7819 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7820 (agent_mem_read, agent_get_trace_state_variable_value)
7821 (agent_set_trace_state_variable_value, agent_tsv_read)
7822 (agent_mem_read_string, get_raw_reg_func_addr)
7823 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7824 * tracepoint.h: ... this new file.
7826 2013-09-05 Pedro Alves <palves@redhat.com>
7828 * server.h (perror_with_name, error, fatal, warning, paddress)
7829 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7831 * utils.h: New file.
7833 2013-09-05 Pedro Alves <palves@redhat.com>
7835 * server.h (remote_debug, noack_mode, transport_is_reliable)
7836 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7837 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7838 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7839 (write_enn, initialize_async_io, enable_async_io)
7840 (disable_async_io, check_remote_input_interrupt_request)
7841 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7842 (dead_thread_notify, prepare_resume_reply)
7843 (decode_address_to_semicolon, decode_address, decode_m_packet)
7844 (decode_M_packet, decode_X_packet, decode_xfer_write)
7845 (decode_search_memory_packet, unhexify, hexify)
7846 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7847 (look_up_one_symbol, relocate_instruction)
7848 (monitor_output): Move to remote-utils.h, and include it.
7849 * remote-utils.h: New file.
7851 2013-09-05 Pedro Alves <palves@redhat.com>
7853 * server.h (_): Delete.
7855 2013-09-02 Pedro Alves <palves@redhat.com>
7857 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7858 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7860 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7862 2013-09-02 Pierre Muller <muller@sourceware.org>
7864 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7865 or WriteProcessMemory complete successfully and handle
7866 ERROR_PARTIAL_COPY error.
7868 2013-09-02 Pedro Alves <palves@redhat.com>
7870 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7871 error instead of EIO.
7873 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7876 * linux-low.c: Include filestuff.h.
7877 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7878 * lynx-low.c: Include filestuff.h.
7879 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7880 * server.c: Include filestuff.h.
7881 (main): Call notice_open_fds.
7882 * spu-low.c: Include filestuff.h.
7883 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7885 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7887 * Makefile.in: Explain why ../target and ../nat are not
7888 listed as include file search paths.
7889 (linux-waitpid.o): New object file rule.
7890 * configure.srv (srv_native_linux_obj): New variable.
7891 Replace all occurrences of linux native object files with
7892 $srv_native_linux_obj.
7893 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7894 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7895 (linux_enable_event_reporting): Remove declaration.
7896 (my_waitpid): Moved to common/linux-waitpid.c.
7897 (linux_wait_for_event): Pass ptid when calling
7898 linux_enable_event_reporting.
7899 (linux_supports_tracefork_flag): Remove.
7900 (linux_enable_event_reporting): Likewise.
7901 (linux_tracefork_grandchild): Remove.
7902 (STACK_SIZE): Moved to common/linux-ptrace.c.
7903 (linux_tracefork_child): Remove.
7904 (linux_test_for_tracefork): Remove.
7905 (linux_look_up_symbols): Call linux_supports_traceclone.
7906 (initialize_low): Remove call to linux_test_for_tracefork.
7907 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7908 common/linux-ptrace.h.
7909 (PTRACE_TYPE_ARG4): Likewise.
7910 Include linux-ptrace.h.
7912 2013-08-21 Pedro Alves <palves@redhat.com>
7914 * config.in: Renegerate.
7916 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7918 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7919 (SFILES): Remove $(srcdir)/common/target-common.c and
7920 add $(srcdir)/target/waitstatus.c.
7921 (OBS): Remove target-common.o and add waitstatus.o.
7922 (server_h): Remove $(srcdir)/../common/target-common.h and
7923 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7924 and $(srcdir)/../target/waitstatus.h.
7925 (target-common.o): Remove.
7926 (waitstatus.o): New target object file.
7927 * target.h: Do not include target-common.h and
7928 include target/resume.h, target/wait.h and
7929 target/waitstatus.h.
7931 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7933 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7934 to PTRACE_TYPE_ARG3.
7935 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7936 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7938 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7939 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7941 2013-07-27 Jie Zhang <jie@codesourcery.com>
7942 Daniel Jacobowitz <dan@codesourcery.com>
7943 Yao Qi <yao@codesourcery.com>
7945 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7946 (mips-linux-watch.o): New rule.
7947 (mips_linux_watch_h): New variable.
7948 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7950 * linux-mips-low.c: Include mips-linux-watch.h.
7951 (struct arch_process_info, struct arch_lwp_info): New.
7952 (update_watch_registers_callback): New function.
7953 (mips_linux_new_process, mips_linux_new_thread) New functions.
7954 (mips_linux_prepare_to_resume, mips_insert_point): New
7956 (mips_remove_point, mips_stopped_by_watchpoint): New
7958 (rsp_bp_type_to_target_hw_bp_type): New function.
7959 (mips_stopped_data_address): New function.
7960 (the_low_target): Add watchpoint support functions.
7962 2013-07-27 Yao Qi <yao@codesourcery.com>
7964 * i386-low.c: Include break-common.h.
7965 (enum target_hw_bp_type): Remove.
7967 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7969 * Makefile.in (SFILES): /common/target-common.c.
7970 (OBS): Add target-common.o.
7971 (server_h): Add $(srcdir)/../common/target-common.h.
7972 (target-common.o): New target.
7973 * server.c (queue_stop_reply_callback): Free
7974 status string after use.
7975 * target.c (target_waitstatus_to_string): Remove.
7976 * target.h: Include target-common.h.
7977 (resume_kind): Likewise.
7978 (target_waitkind): Likewise.
7979 (target_waitstatus): Likewise.
7980 (TARGET_WNOHANG): Likewise.
7982 2013-07-04 Yao Qi <yao@codesourcery.com>
7984 * Makefile.in (host_alias): Use @host_noncanonical@.
7985 (target_alias): Use @target_noncanonical@.
7986 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7987 ACX_NONCANONICAL_HOST.
7988 * configure: Regenerated.
7991 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7993 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7994 * configure: Rebuild.
7995 * Makefile.in (version_host, version_target): Get from configure.
7996 (version.c): Use $(version_host) and $(version_target).
7998 2013-07-03 Pedro Alves <palves@redhat.com>
8000 * Makefile.in (config.status): Depend on development.sh.
8001 * acinclude.m4: Include libmcheck.m4.
8002 * configure: Regenerate.
8004 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8006 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8007 attribute inside the parentheses.
8008 (winapi_DebugSetProcessKillOnExit): Ditto.
8009 (winapi_DebugBreakProcess): Ditto.
8010 (winapi_GenerateConsoleCtrlEvent): Ditto.
8012 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8014 * notif.h (notif_event): Add a dummy member to avoid compiler
8017 2013-07-01 Pedro Alves <palves@redhat.com>
8019 * hostio.c (HOSTIO_PATH_MAX): Define.
8020 (require_filename, handle_open, handle_unlink, handle_readlink):
8023 2013-07-01 Pedro Alves <palves@redhat.com>
8025 * server.h: Include "pathmax.h".
8026 * linux-low.c: Don't include sys/param.h.
8027 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8029 * win32-low.c: Don't include sys/param.h.
8030 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8032 2013-07-01 Pedro Alves <palves@redhat.com>
8034 * event-loop.c: Don't check HAVE_UNISTD_H before including
8036 * gdbreplay.c: Likewise.
8037 * remote-utils.c: Likewise.
8038 * server.c: Likewise.
8039 * configure.ac: Don't check for unistd.h.
8040 * configure: Regenerate.
8042 2013-06-28 Tom Tromey <tromey@redhat.com>
8044 * Makefile.in (version.c): Use version.in, not
8047 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8049 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8050 * configure: Rebuild.
8051 * Makefile.in (version_host, version_target): Get from configure.
8052 (version.c): Use $(version_host) and $(version_target).
8054 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8056 Fix trace-status to output user name without trailing colon.
8057 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8059 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8061 Fix trace-status to output proper start-time and stop-time.
8062 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8063 output start time and stop time in hex as gdb expects.
8065 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8067 * tracepoint.c (build_traceframe_info_xml): Output trace state
8068 variables present in the trace buffer.
8070 2013-06-24 Tom Tromey <tromey@redhat.com>
8072 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8074 (version.o): Remove.
8075 * gdbreplay.c: Include version.h.
8076 (version, host_name): Don't declare.
8077 * server.h: Include version.h.
8078 (version, host_name): Don't declare.
8080 2013-06-12 Pedro Alves <palves@redhat.com>
8082 * linux-x86-low.c (linux_is_elf64): Delete global.
8083 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8084 with local linux_pid_exe_is_elf_64_file use.
8086 2013-06-11 Pedro Alves <palves@redhat.com>
8088 * linux-low.c (regset_disabled, disable_regset): New functions.
8089 (regsets_fetch_inferior_registers)
8090 (regsets_store_inferior_registers): Use them.
8091 (initialize_regsets_info); Don't allocate the disabled_regsets
8093 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8096 2013-06-11 Pedro Alves <palves@redhat.com>
8098 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8101 2013-06-11 Pedro Alves <palves@redhat.com>
8103 * linux-x86-low.c (initialize_low_arch): Call
8104 init_registers_x32_avx_linux.
8106 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8108 Fix compatibility with Android Bionic.
8109 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8112 2013-06-07 Pedro Alves <palves@redhat.com>
8115 * Makefile.in (OBS): Add tdesc.o.
8116 (IPA_OBJS): Add tdesc-ipa.o.
8117 (tdesc-ipa.o): New rule.
8118 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8120 * linux-low.c (new_inferior): Delete.
8121 (disabled_regsets, num_regsets): Delete.
8122 (linux_add_process): Adjust to set the new per-process
8124 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8125 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8126 was a stop. When calling arch_setup, switch the current inferior
8127 to the thread that got an event.
8128 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8129 (regsets_fetch_inferior_registers)
8130 (regsets_store_inferior_registers): New regsets_info parameter.
8132 (linux_register_in_regsets): New regs_info parameter. Adjust to
8134 (register_addr, fetch_register, store_register): New usrregs_info
8135 parameter. Adjust to use it.
8136 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8137 parameter regs_info. Adjust to use it.
8138 (linux_fetch_registers): Get the current inferior's regs_info, and
8140 (linux_store_registers): Ditto.
8141 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8142 (initialize_low): Don't initialize the target_regsets here. Call
8143 initialize_low_arch.
8144 * linux-low.h (target_regsets): Delete declaration.
8145 (struct regsets_info): New.
8146 (struct usrregs_info): New.
8147 (struct regs_info): New.
8148 (struct process_info_private) <new_inferior>: New field.
8149 (struct linux_target_ops): Delete the num_regs, regmap, and
8150 regset_bitmap fields. New field regs_info.
8151 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8152 * i387-fp.c (num_xmm_registers): Delete.
8153 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8154 calls to new interface.
8155 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8156 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8157 Infer the number of xmm registers from the regcache's target
8159 * i387-fp.h (num_xmm_registers): Delete.
8160 * inferiors.c (add_thread): Don't install the thread's regcache
8162 * proc-service.c (gregset_info): Fetch the current inferior's
8163 regs_info. Adjust to use it.
8164 * regcache.c: Include tdesc.h.
8165 (register_bytes, reg_defs, num_registers)
8166 (gdbserver_expedite_regs): Delete.
8167 (get_thread_regcache): If the thread doesn't have a regcache yet,
8168 create one, instead of aborting gdbserver.
8169 (regcache_invalidate_one): Rename to ...
8170 (regcache_invalidate_thread): ... this.
8171 (regcache_invalidate_one): New.
8172 (regcache_invalidate): Only invalidate registers of the current
8174 (init_register_cache): Add target_desc parameter, and use it.
8175 (new_register_cache): Ditto. Assert the target description has a
8176 non zero registers_size.
8177 (regcache_cpy): Add assertions. Adjust.
8178 (realloc_register_cache, set_register_cache): Delete.
8179 (registers_to_string, registers_from_string): Adjust.
8180 (find_register_by_name, find_regno, find_register_by_number)
8181 (register_cache_size): Add target_desc parameter, and use it.
8182 (free_register_cache_thread, free_register_cache_thread_one)
8183 (regcache_release, register_cache_size): New.
8184 (register_size): Add target_desc parameter, and use it.
8185 (register_data, supply_register, supply_register_zeroed)
8186 (supply_regblock, supply_register_by_name, collect_register)
8187 (collect_register_as_string, collect_register_by_name): Adjust.
8188 * regcache.h (struct target_desc): Forward declare.
8189 (struct regcache) <tdesc>: New field.
8190 (init_register_cache, new_register_cache): Add target_desc
8192 (regcache_invalidate_thread): Declare.
8193 (regcache_invalidate_one): Delete declaration.
8194 (regcache_release): Declare.
8195 (find_register_by_number, register_cache_size, register_size)
8196 (find_regno): Add target_desc parameter.
8197 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8199 * remote-utils.c: Include tdesc.h.
8200 (outreg, prepare_resume_reply): Adjust.
8201 * server.c: Include tdesc.h.
8202 (gdbserver_xmltarget): Delete declaration.
8203 (get_features_xml, process_serial_event): Adjust.
8204 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8206 (struct process_info) <tdesc>: New field.
8207 (ipa_tdesc): Declare.
8208 * tdesc.c: New file.
8209 * tdesc.h: New file.
8210 * tracepoint.c: Include tdesc.h.
8211 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8212 (get_context_regcache): Adjust to pass ipa_tdesc down.
8213 (do_action_at_tracepoint): Adjust to get the register cache size
8214 from the context regcache's description.
8215 (traceframe_walk_blocks): Adjust to get the register cache size
8216 from the current trace frame's description.
8217 (traceframe_get_pc): Adjust to get current trace frame's
8218 description and pass it down.
8219 (gdb_collect): Adjust to get the register cache size from the
8221 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8222 (gdbserver_xmltarget): Delete.
8223 (initialize_low_tracepoint): Set the ipa's target description.
8224 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8225 (initialize_low_tracepoint): Set the ipa's target description.
8226 * linux-x86-low.c: Include tdesc.h.
8227 [__x86_64__] (is_64bit_tdesc): New.
8228 (ps_get_thread_area, x86_get_thread_area): Use it.
8229 (i386_cannot_store_register): Rename to ...
8230 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8231 (i386_cannot_fetch_register): Rename to ...
8232 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8233 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8235 (target_regsets): Rename to ...
8236 (x86_regsets): ... this.
8237 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8239 (x86_siginfo_fixup): Use is_64bit_tdesc.
8240 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8241 (tdesc_x32_avx_linux, tdesc_x32_linux)
8242 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8244 (x86_linux_update_xmltarget): Delete.
8245 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8246 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8247 (AMD64_LINUX_USER64_CS): New.
8248 (x86_linux_read_description): New, based on
8249 x86_linux_update_xmltarget.
8250 (same_process_callback): New.
8251 (x86_arch_setup_process_callback): New.
8252 (x86_linux_update_xmltarget): New.
8253 (x86_regsets_info): New.
8254 (amd64_linux_regs_info): New.
8255 (i386_linux_usrregs_info): New.
8256 (i386_linux_regs_info): New.
8257 (x86_linux_regs_info): New.
8258 (x86_arch_setup): Reimplement.
8259 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8260 (x86_emit_ops): Ditto.
8261 (the_low_target): Adjust. Install x86_linux_regs_info,
8262 x86_cannot_fetch_register, and x86_cannot_store_register.
8263 (initialize_low_arch): New.
8264 * linux-ia64-low.c (tdesc_ia64): Declare.
8265 (ia64_fetch_register): Adjust.
8266 (ia64_usrregs_info, regs_info): New globals.
8267 (ia64_regs_info): New function.
8268 (the_low_target): Adjust.
8269 (initialize_low_arch): New function.
8270 * linux-sparc-low.c (tdesc_sparc64): Declare.
8271 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8273 (sparc_arch_setup): New function.
8274 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8275 (the_low_target): Adjust.
8276 (initialize_low_arch): New function.
8277 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8278 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8279 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8280 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8281 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8282 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8283 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8284 (tdesc_powerpc_isa205_vsx64l): Declare.
8285 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8286 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8287 (ppc_set_pc, ppc_get_hwcap): Adjust.
8288 (ppc_usrregs_info): Forward declare.
8289 (!__powerpc64__) ppc_regmap_adjusted: New global.
8290 (ppc_arch_setup): Adjust to the current process'es target
8292 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8293 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8294 (ppc_store_evrregset): Adjust.
8295 (target_regsets): Rename to ...
8296 (ppc_regsets): ... this, and make static.
8297 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8298 (ppc_regs_info): New function.
8299 (the_low_target): Adjust.
8300 (initialize_low_arch): New function.
8301 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8302 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8303 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8304 (tdesc_s390x_linux64v2): Declare.
8305 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8306 (s390_fill_gregset, s390_store_last_break): Adjust.
8307 (target_regsets): Rename to ...
8308 (s390_regsets): ... this, and make static.
8309 (s390_get_pc, s390_set_pc): Adjust.
8310 (s390_get_hwcap): New target_desc parameter, and use it.
8311 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8312 (s390_arch_setup): Adjust to set the current process'es target
8313 description. Don't adjust the regmap.
8314 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8315 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8316 (regs_info_3264): New globals.
8317 (s390_regs_info): New function.
8318 (the_low_target): Adjust.
8319 (initialize_low_arch): New function.
8320 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8321 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8322 [__mips64] (init_registers_mips_linux)
8323 (init_registers_mips_dsp_linux): Delete defines.
8324 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8325 (have_dsp): New global.
8326 (mips_read_description): New, based on mips_arch_setup.
8327 (mips_arch_setup): Reimplement.
8328 (get_usrregs_info): New function.
8329 (mips_cannot_fetch_register, mips_cannot_store_register)
8330 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8331 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8332 (target_regsets): Rename to ...
8333 (mips_regsets): ... this, and make static.
8334 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8335 (dsp_regs_info, regs_info): New globals.
8336 (mips_regs_info): New function.
8337 (the_low_target): Adjust.
8338 (initialize_low_arch): New function.
8339 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8340 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8342 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8343 (arm_read_description): New, with bits factored from
8345 (arm_arch_setup): Reimplement.
8346 (target_regsets): Rename to ...
8347 (arm_regsets): ... this, and make static.
8348 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8349 (arm_regs_info): New function.
8350 (the_low_target): Adjust.
8351 (initialize_low_arch): New function.
8352 * linux-m68k-low.c (tdesc_m68k): Declare.
8353 (target_regsets): Rename to ...
8354 (m68k_regsets): ... this, and make static.
8355 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8356 (m68k_regs_info): New function.
8357 (m68k_arch_setup): New function.
8358 (the_low_target): Adjust.
8359 (initialize_low_arch): New function.
8360 * linux-sh-low.c (tdesc_sharch): Declare.
8361 (target_regsets): Rename to ...
8362 (sh_regsets): ... this, and make static.
8363 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8364 (sh_regs_info, sh_arch_setup): New functions.
8365 (the_low_target): Adjust.
8366 (initialize_low_arch): New function.
8367 * linux-bfin-low.c (tdesc_bfin): Declare.
8368 (bfin_arch_setup): New function.
8369 (bfin_usrregs_info, regs_info): New globals.
8370 (bfin_regs_info): New function.
8371 (the_low_target): Adjust.
8372 (initialize_low_arch): New function.
8373 * linux-cris-low.c (tdesc_cris): Declare.
8374 (cris_arch_setup): New function.
8375 (cris_usrregs_info, regs_info): New globals.
8376 (cris_regs_info): New function.
8377 (the_low_target): Adjust.
8378 (initialize_low_arch): New function.
8379 * linux-cris-low.c (tdesc_crisv32): Declare.
8380 (cris_arch_setup): New function.
8381 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8382 (cris_regs_info): New function.
8383 (the_low_target): Adjust.
8384 (initialize_low_arch): New function.
8385 * linux-m32r-low.c (tdesc_m32r): Declare.
8386 (m32r_arch_setup): New function.
8387 (m32r_usrregs_info, regs_info): New globals.
8388 (m32r_regs_info): Adjust.
8389 (initialize_low_arch): New function.
8390 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8391 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8392 (tic6x_usrregs_info): Forward declare.
8393 (tic6x_read_description): New function, based on ...
8394 (tic6x_arch_setup): ... this. Reimplement.
8395 (target_regsets): Rename to ...
8396 (tic6x_regsets): ... this, and make static.
8397 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8398 (tic6x_regs_info): New function.
8399 (the_low_target): Adjust.
8400 (initialize_low_arch): New function.
8401 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8402 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8403 (target_regsets): Rename to ...
8404 (xtensa_regsets): ... this, and make static.
8405 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8407 (xtensa_arch_setup, xtensa_regs_info): New functions.
8408 (the_low_target): Adjust.
8409 (initialize_low_arch): New function.
8410 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8411 (nios2_arch_setup): Set the current process'es tdesc.
8412 (target_regsets): Rename to ...
8413 (nios2_regsets): ... this.
8414 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8415 (nios2_regs_info): New function.
8416 (the_low_target): Adjust.
8417 (initialize_low_arch): New function.
8418 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8419 (aarch64_arch_setup): Set the current process'es tdesc.
8420 (target_regsets): Rename to ...
8421 (aarch64_regsets): ... this.
8422 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8423 (aarch64_regs_info): New function.
8424 (the_low_target): Adjust.
8425 (initialize_low_arch): New function.
8426 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8428 (target_regsets): Rename to ...
8429 (tile_regsets): ... this.
8430 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8431 (tile_regs_info): New function.
8432 (tile_arch_setup): Set the current process'es tdesc.
8433 (the_low_target): Adjust.
8434 (initialize_low_arch): New function.
8435 * spu-low.c (tdesc_spu): Declare.
8436 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8437 * win32-arm-low.c (tdesc_arm): Declare.
8438 (arm_arch_setup): New function.
8439 (the_low_target): Install arm_arch_setup instead of
8441 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8442 (init_windows_x86): Rename to ...
8443 (i386_arch_setup): ... this. Set `win32_tdesc'.
8444 (the_low_target): Adjust.
8445 * win32-low.c (win32_tdesc): New global.
8446 (child_add_thread): Don't create the thread cache here.
8447 (do_initial_child_stuff): Set the new process'es tdesc.
8448 * win32-low.h (struct target_desc): Forward declare.
8449 (win32_tdesc): Declare.
8450 * lynx-i386-low.c (tdesc_i386): Declare global.
8451 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8452 * lynx-low.c (lynx_tdesc): New global.
8453 (lynx_add_process): Set the new process'es tdesc.
8454 * lynx-low.h (struct target_desc): Forward declare.
8455 (lynx_tdesc): Declare global.
8456 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8457 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8458 * nto-low.c (nto_tdesc): New global.
8459 (do_attach): Set the new process'es tdesc.
8460 * nto-low.h (struct target_desc): Forward declare.
8461 (nto_tdesc): Declare.
8462 * nto-x86-low.c (tdesc_i386): Declare.
8463 (nto_x86_arch_setup): Set `nto_tdesc'.
8465 2013-06-04 Gary Benson <gbenson@redhat.com>
8467 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8468 to qSupported response when appropriate.
8469 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8470 with nonzero-length annex.
8471 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8472 arguments supplied in annex.
8474 2013-05-31 Doug Evans <dje@google.com>
8477 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8478 64 bits in 64-cross-32 environment.
8480 2013-05-28 Pedro Alves <palves@redhat.com>
8482 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8483 (aarch64-without-fpu.c): Delete rule.
8484 * configure.srv (aarch64*-*-linux*): Remove references to
8485 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8486 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8489 2013-05-24 Pedro Alves <palves@redhat.com>
8491 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8492 instead of strchr/decode_address. Error if the range isn't split
8493 with a ','. Don't assume there's be a ':' in the action.
8495 2013-05-23 Yao Qi <yao@codesourcery.com>
8496 Pedro Alves <palves@redhat.com>
8498 * linux-low.c (lwp_in_step_range): New function.
8499 (linux_wait_1): If the thread was range stepping and stopped
8500 outside the stepping range, report the stop to GDB. Otherwise,
8501 continue stepping. Add range stepping debug output.
8502 (linux_set_resume_request): Copy the step range from the resume
8504 (linux_supports_range_stepping): New.
8505 (linux_target_ops) <supports_range_stepping>: Set to
8506 linux_supports_range_stepping.
8507 * linux-low.h (struct linux_target_ops)
8508 <supports_range_stepping>: New field.
8509 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8510 * linux-x86-low.c (x86_supports_range_stepping): New.
8511 (the_low_target) <supports_range_stepping>: Set to
8512 x86_supports_range_stepping.
8513 * server.c (handle_v_cont): Handle 'r' action.
8514 (handle_v_requests): Append ";r" if the target supports range
8516 * target.h (struct thread_resume) <step_range_start,
8517 step_range_end>: New fields.
8518 (struct target_ops) <supports_range_stepping>:
8520 (target_supports_range_stepping): New macro.
8522 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8524 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8525 confusion in comment.
8527 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8529 * lynx-low.c (struct process_info_private): New type.
8530 (lynx_add_process): New function.
8531 (lynx_create_inferior, lynx_attach): Replace calls to
8532 add_process by calls to lynx_add_process.
8533 (lynx_resume): If PTID is null, then try using
8534 current_process()->private->last_wait_event_ptid.
8536 (lynx_clear_inferiors): Delete. The contents of that function
8537 has been inlined in lynx_mourn;
8538 (lynx_wait_1): Save the ptid in the process's private data.
8539 (lynx_mourn): Free the process' private data. Replace call
8540 to lynx_clear_inferiors by call to clear_inferiors.
8542 2013-05-17 Yao Qi <yao@codesourcery.com>
8544 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8547 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8549 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8550 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8551 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8552 PT_TEXT_END_ADDR guards. Update comments.
8553 (linux_target_op) <read_offsets>: Conditionally define to
8554 linux_read_offsets if the target is UCLIBC and if it defines
8555 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8557 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8558 Andrew Jenner <andrew@codesourcery.com>
8560 * Makefile.in (SFILES): Add linux-nios2-low.c.
8561 (clean): Add action to delete nios2-linux.c.
8562 (nios2-linux.c): New rule.
8563 * configure.srv: Add nios2*-*-linux*.
8564 * linux-nios2-low.c: New.
8566 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8568 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8570 2013-04-25 Hui Zhu <hui@codesourcery.com>
8573 * ax.c (ax_printf): Add fflush.
8575 2013-04-22 Tom Tromey <tromey@redhat.com>
8577 * Makefile.in (SFILES): Add filestuff.c.
8578 (OBS): Add filestuff.o.
8579 (filestuff.o): New target.
8580 * config.in, configure: Rebuild.
8581 * configure.ac: Check for fdwalk, pipe2.
8583 2013-04-17 Pedro Alves <palves@redhat.com>
8585 * configure.ac (USE_THREAD_DB): Delete variable.
8586 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8587 Don't AC_SUBST USE_THREAD_DB.
8588 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8589 * config.in, configure: Regenerate.
8591 2013-04-16 Pedro Alves <palves@redhat.com>
8593 * linux-low.h (struct lwp_info) <thread_known>: Move under
8594 the USE_THREAD_DB #ifdef.
8596 2013-04-16 Pedro Alves <palves@redhat.com>
8598 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8599 (linux-low.o): Delete rule.
8600 * linux-low.h: Always include "gdb_thread_db.h" instead of
8601 conditionally including thread_db.h.
8602 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8605 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8607 * Makefile.in (install-only): Fix make install regression.
8609 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8611 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8612 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8614 * gdbserver.1: Remove.
8616 2013-03-22 Pedro Alves <palves@redhat.com>
8618 * linux-low.c (handle_extended_wait): Don't call
8619 linux_enable_event_reporting.
8621 2013-03-15 Tony Theodore <tonyt@logyst.com>
8624 * Makefile.in (SHELL): Use @SHELL@.
8626 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8628 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8631 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8633 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8634 Remove extraneous NULL element.
8636 2013-03-13 Yao Qi <yao@codesourcery.com>
8638 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8639 'V' block in trace frame.
8641 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8643 * target.h (struct target_ops): Add btrace ops.
8644 (target_supports_btrace): New macro.
8645 (target_enable_btrace): New macro.
8646 (target_disable_btrace): New macro.
8647 (target_read_btrace): New macro.
8648 * gdbthread.h (struct thread_info): Add btrace field.
8649 * server.c: Include btrace-common.h.
8650 (handle_btrace_general_set): New function.
8651 (handle_btrace_enable): New function.
8652 (handle_btrace_disable): New function.
8653 (handle_general_set): Call handle_btrace_general_set.
8654 (handle_qxfer_btrace): New function.
8655 (struct qxfer qxfer_packets[]): Add btrace entry.
8656 * inferiors.c (remove_thread): Disable btrace.
8657 * linux-low: Include linux-btrace.h.
8658 (linux_low_enable_btrace): New function.
8659 (linux_low_read_btrace): New function.
8660 (linux_target_ops): Add btrace ops.
8661 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8662 Add srv_linux_btrace=yes.
8663 (x86_64-*-linux*): Add linux-btrace.o.
8664 Add srv_linux_btrace=yes.
8665 * configure.ac: Define HAVE_LINUX_BTRACE.
8666 * config.in: Regenerated.
8667 * configure: Regenerated.
8669 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8671 * server.c (handle_qxfer): Preserve error message if -3 is
8673 (qxfer): Document the -3 return value.
8675 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8677 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8678 (linux_btrace_h): New variable.
8679 (linux-btrace.o): New rule.
8681 2013-03-08 Stan Shebs <stan@codesourcery.com>
8682 Hafiz Abid Qadeer <abidh@codesourcery.com>
8684 * tracepoint.c (trace_buffer_size): New global.
8685 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8686 (init_trace_buffer): Change to one-argument function. Allocate
8687 trace buffer memory.
8688 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8689 handle QTBuffer:size packet.
8690 (cmd_bigqtbuffer_size): New function.
8691 (initialize_tracepoint): Call init_trace_buffer with
8692 DEFAULT_TRACE_BUFFER_SIZE.
8693 * server.c (handle_query): Add QTBuffer:size in the
8696 2013-03-07 Yao Qi <yao@codesourcery.com>
8698 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8699 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8701 (cmd_qtsp): Adjust condition. Do post increment.
8702 Set cur_action and cur_step_action back to 0.
8704 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8707 * linux-low.c (linux_write_memory): Return early success if LEN is
8710 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8712 * configure.srv: Add x86_64-*-cygwin* as target.
8714 2013-02-28 Tom Tromey <tromey@redhat.com>
8716 * configure.ac: Invoke AC_SYS_LARGEFILE.
8717 * configure, config.in: Rebuild.
8719 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8721 * win32-low.c: Throughout, fix format strings and casts of
8722 printf-like functions to avoid type related warnings on all
8724 (get_child_debug_event): Print dwDebugEventCode as hex since
8725 that's how it's usually documented.
8727 2013-02-28 Yao Qi <yao@codesourcery.com>
8729 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8732 2013-02-27 Jiong Wang <jiwang@tilera.com>
8734 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8735 (reg-tilegx32.c): New rule.
8736 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8737 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8738 different register info initializer according to elf class.
8739 (init_registers_tilgx32): New function. The tilegx32 register info
8741 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8742 (tile_store_gregset): Likewise.
8744 2013-02-27 Yao Qi <yao@codesourcery.com>
8746 * server.c (process_point_options): Print debug message when
8747 debug_threads is true.
8749 2013-02-26 Yao Qi <yao@codesourcery.com>
8751 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8753 2013-02-19 Pedro Alves <palves@redhat.com>
8754 Kai Tietz <ktietz@redhat.com>
8758 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8759 instead of strtoul to extract address from packet.
8760 (process_serial_event) <'z'>: Likewise.
8762 2013-02-18 Yao Qi <yao@codesourcery.com>
8764 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8766 2013-02-14 Pedro Alves <palves@redhat.com>
8770 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8771 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8773 2013-02-14 Pedro Alves <palves@redhat.com>
8775 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8777 2013-02-14 Pedro Alves <palves@redhat.com>
8779 * tracepoint.c (save_string): Delete.
8780 (add_tracepoint_action): Use savestring instead of save_string.
8782 2013-02-12 Pedro Alves <palves@redhat.com>
8784 * linux-xtensa-low.c: Ditto.
8785 * xtensa-xtregs.c: Ditto.
8787 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8789 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8792 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8794 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8795 aarch64_num_wp_regs and aarch64_num_bp_regs to
8796 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8798 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8800 * linux-aarch64-low.c (ps_get_thread_area): Replace
8801 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8803 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8804 Marcus Shawcroft <marcus.shawcroft@arm.com>
8805 Nigel Stephens <nigel.stephens@arm.com>
8806 Yufeng Zhang <yufeng.zhang@arm.com>
8808 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8809 (aarch64.c, aarch64-without-fpu.c): New targets.
8810 * configure.srv (aarch64*-*-linux*): New.
8811 * linux-aarch64-low.c: New file.
8813 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8815 * linux-low.c (handle_extended_wait, linux_create_inferior)
8816 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8817 (dequeue_one_deferred_signal, linux_resume_one_thread)
8818 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8819 (linux_tracefork_grandchild, linux_test_for_tracefork)
8820 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8821 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8822 where the argument is 0.
8824 2013-01-25 Yao Qi <yao@codesourcery.com>
8826 * event-loop.c: Include "queue.h".
8827 (gdb_event_p): New typedef.
8828 (struct gdb_event) <next_event>: Remove.
8829 (event_queue): Change to QUEUE(gdb_event_p).
8830 (async_queue_event): Remove.
8831 (gdb_event_xfree): New.
8832 (initialize_event_loop): New.
8833 (process_event): Use API from QUEUE.
8834 (wait_for_event): Likewise.
8835 * server.c (main): Call initialize_event_loop.
8836 * server.h (initialize_event_loop): Declare.
8838 2013-01-18 Yao Qi <yao@codesourcery.com>
8840 * ax.h (struct eval_agent_expr_context): New.
8841 (gdb_eval_agent_expr): Update declaration.
8842 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8843 TFRAME. Add new argument CTX.
8844 * server.h (struct eval_agent_expr_context): Declare.
8845 (agent_mem_read, agent_tsv_read): Update declaration.
8846 (agent_mem_read_string): Likewise.
8847 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8848 (add_traceframe_block): Add new argument TPOINT.
8849 Increase TPOINT->traceframe_usage.
8850 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8851 eval_tracepoint_agent_expr.
8852 (condition_true_at_tracepoint): Likewise.
8853 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8854 (agent_mem_read_string, agent_tsv_read): Likewise.
8856 2013-01-16 Yao Qi <yao@codesourcery.com>
8858 * linux-low.c (linux_resume_one_lwp): Don't check
8859 'lwp->bp_reinsert != 0'.
8861 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8862 Pedro Alves <palves@redhat.com>
8864 * lynx-low.c (ptrace_request_to_str): Define a temporary
8865 macro and use it to simplify this function's implementation.
8867 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8869 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8872 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8874 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8876 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8878 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8880 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8882 * lynx-low.c (lynx_resume): Use the resume_info parameter
8883 to determine the ptid for the lynx_ptrace call, unless
8884 it is equal to minus_one_ptid, in which case we use the
8885 ptid of the current_inferior.
8886 (lynx_wait_1): After having received a thread create/exit
8887 event, resume the inferior's execution using the signaling
8888 thread's ptid, rather than the old ptid.
8890 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8892 * lynx-low.c (lynx_resume): Delete variable ret.
8894 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8896 * gdbreplay.c (gdbreplay_version): Update copyright year.
8897 * server.c (gdbserver_version): Likewise.
8899 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8901 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8904 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8906 * lynx-low.c (ptrace_request_to_str): Add handling for
8909 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8911 * lynx-low.c (lynx_attach): Delete variable new_process.
8913 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8915 * lynx-low.c (lynx_create_inferior): Delete variable
8918 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8920 * lynx-low.c (ptrace_request_to_str): Do not handle
8921 PTRACE_GETTHREADLIST if this macro does not exist.
8923 2012-12-15 Yao Qi <yao@codesourcery.com>
8925 * Makefile.in (OBS): Add notif.o.
8926 * notif.c, notif.h: New.
8927 * server.c: Include "notif.h".
8928 (struct vstop_notif) <next>: Remove.
8930 (queue_stop_reply): Update.
8931 (push_event, send_next_stop_reply): Remove.
8932 (discard_queued_stop_replies): Update.
8933 (notif_stop): New variable.
8934 (handle_v_stopped): Remove.
8935 (handle_v_requests): Don't call handle_v_stopped. Call
8936 handle_ack_notif instead.
8937 (queue_stop_reply_callback): Call notif_event_enque instead
8938 of queue_stop_reply.
8939 (handle_status): Don't call send_next_stop_reply, call
8940 notif_write_event instead.
8941 (kill_inferior_callback): Likewise.
8942 (detach_or_kill_inferior_callback): Likewise.
8943 (main): Call initialize_notif.
8944 (process_serial_event): Call QUEUE_is_empty.
8945 (handle_target_event): Call notif_push instead of push event.
8946 * server.h (push_event): Remove declaration.
8948 2012-12-10 Tom Tromey <tromey@redhat.com>
8950 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8951 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8954 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8955 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8956 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8957 (amd64-linux-ipa.o, ax.o): Rewrite.
8958 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8959 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8960 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8961 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8962 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8963 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8964 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8965 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8966 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8967 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8968 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8969 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8970 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8971 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8972 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8973 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8974 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8975 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8976 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8977 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8978 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8979 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8980 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8981 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8982 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8983 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8984 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8985 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8986 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8987 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8988 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8989 (reg-tilegx.o): Remove.
8990 (all_object_files): New macro.
8991 Include .deps files.
8992 * aclocal.m4, configure: Rebuild.
8993 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8994 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8995 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8997 2012-12-05 Tom Tromey <tromey@redhat.com>
9000 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9002 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9004 * configure.ac: Check for linux/perf_event.h.
9005 * config.in: Regenerated.
9006 * configure: Regenerated.
9008 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9010 * hostio.c (handle_readlink): Decrease buffer size
9011 parameter passed to readlink by one byte.
9013 2012-11-26 Yao Qi <yao@codesourcery.com>
9015 * configure.ac (build_warnings): Append '-Wempty-body'.
9016 * configure: Regenerated.
9017 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9020 2012-11-15 Pierre Muller <muller@sourceware.org>
9022 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9023 * config.in: Regenerate.
9024 * configure: Regenerate.
9025 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9026 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9027 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9028 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9030 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9031 instead of <sys/wait.h> header.
9032 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9034 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9036 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9037 (various make rules): Remove -DGDBSERVER
9039 2012-11-09 Yao Qi <yao@codesourcery.com>
9041 * spu-low.c (current_ptid): Move it to ..
9042 * gdbthread.h: ... here. New.
9043 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9044 * server.c (myresume, process_serial_event): Likewise.
9045 * thread-db.c (thread_db_find_new_threads): Likewise.
9046 * tracepoint.c (run_inferior_command): Likewise.
9048 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9050 * server.c (handle_search_memory_1): Include access length in
9053 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9055 * linux-crisv32-low.c: Fix compile errors.
9057 2012-09-04 Yao Qi <yao@codesourcery.com>
9059 * tracepoint.c (cmd_qtsv): Adjust debug message.
9060 Don't check CUR_TPOINT.
9062 2012-08-28 Yao Qi <yao@codesourcery.com>
9064 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9065 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9066 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9067 Remove declarations of xmalloc, xreallloc, xstrdup and
9069 * Makefile.in (libiberty_h): New.
9070 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9071 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9073 2012-08-23 Yao Qi <yao@codesourcery.com>
9075 * server.h: Remove declaration of 'xsnprintf'.
9077 2012-08-22 Keith Seitz <keiths@redhat.com>
9079 * server.h: Include build-gnulib-gbserver/config.h.
9080 * gdbreplay.c: Likewise.
9082 2012-08-08 Doug Evans <dje@google.com>
9084 * Makefile.in (SFILES): Add gdb_vecs.c.
9085 (OBS): Add gdb_vecs.o.
9086 (gdb_vecs_h, host_defs_h): New variables.
9087 (thread-db.o): Add $(gdb_vecs_h) dependency.
9088 (gdb_vecs.o): New rule.
9089 * thread-db.c: #include "gdb_vecs.h".
9090 (thread_db_load_search): Use a vector to iterate over path elements.
9091 Handle text appearing after "$pdir".
9093 * configure.ac: Add check for strstr.
9094 * config.in: Regenerate.
9095 * configure: Regenerate.
9097 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9099 * hostio.c (handle_pread): If pread fails, fall back to attempting
9101 (handle_pwrite): Likewise for pwrite.
9103 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9105 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9106 between unsupported TYPE and unimplementable ADDR/LEN combination.
9107 (arm_insert_point): Act on new return value.
9109 2012-07-31 Pedro Alves <palves@redhat.com>
9111 * server.c (process_point_options): Only skip tokens if we find
9112 one that is unrecognized. Don't treat 'X' specially while
9113 skipping unrecognized tokens.
9115 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9117 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9118 to 4-byte-align HW breakpoint addresses for Thumb.
9120 2012-07-27 Yao Qi <yao@codesourcery.com>
9124 * server.h: Declare gdb_agent_about_to_close.
9125 * target.c (kill_inferior): Include "agent.h".
9126 New. Send command 'kill'.
9127 * target.h (kill_inferior): Removed macro.
9128 * tracepoint.c (gdb_agent_about_to_close): New.
9129 (gdb_agent_helper_thread): Handle command 'close'.
9130 Wait endlessly until the inferior stops.
9131 Install gdb_agent_remove_socket to atexit hook.
9132 (agent_socket_name): New static variable.
9133 (gdb_agent_socket_init): Replace local variable 'name' with
9134 'agent_socket_name'.
9135 (gdb_agent_remove_socket): New.
9137 2012-07-27 Yao Qi <yao@codesourcery.com>
9139 * server.c (process_point_options): Stop at 'X' when parsing.
9141 2012-07-19 Michael Eager <eager@eagercon.com>
9143 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9145 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9146 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9147 hardware breakpoint.
9149 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9151 * gdbserver/linux-low.c (initialize_low): Call
9152 linux_ptrace_init_warnings.
9154 2012-07-02 Doug Evans <dje@google.com>
9156 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9159 2012-07-02 Stan Shebs <stan@codesourcery.com>
9161 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9162 (ax.o): Add it to build rule.
9164 (OBS): Add format.o.
9165 (IPA_OBS): Add format.o.
9166 * server.c (handle_query): Claim support for breakpoint commands.
9167 (process_point_options): Add command case.
9168 (process_serial_event): Leave running if there are printfs in
9170 * mem-break.h (any_persistent_commands): Declare.
9171 (add_breakpoint_commands): Declare.
9172 (gdb_no_commands_at_breakpoint): Declare.
9173 (run_breakpoint_commands): Declare.
9174 * mem-break.c (struct point_command_list): New struct.
9175 (struct breakpoint): New field command_list.
9176 (any_persistent_commands): New function.
9177 (add_commands_to_breakpoint): New function.
9178 (add_breakpoint_commands): New function.
9179 (gdb_no_commands_at_breakpoint): New function.
9180 (run_breakpoint_commands): New function.
9181 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9183 * ax.c: Include format.h.
9184 (ax_printf): New function.
9185 (gdb_eval_agent_expr): Add printf opcode.
9187 2012-06-13 Yao Qi <yao@codesourcery.com>
9189 * server.c (start_inferior): Remove duplicated writes to fields
9190 'last_resume_kind' and 'last_status' of 'current_inferior'.
9192 2012-06-12 Yao Qi <yao@codesourcery.com>
9193 Pedro Alves <palves@redhat.com>
9195 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9197 * server.c (handle_v_cont): Extend comment.
9199 2012-06-11 Yao Qi <yao@codesourcery.com>
9201 * linux-low.c (linux_attach): Add 'static'.
9203 2012-06-06 Yao Qi <yao@codesourcery.com>
9205 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9207 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9209 Fix gcc -flto compilation warning.
9210 * server.c (main): Make variable multi_mode and attach volatile.
9212 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9214 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9215 if the platform doesn't know about it.
9217 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9219 * Makefile.in (SFILES): Add linux-tile-low.c.
9220 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9221 * configure.srv: Handle tilegx-*-linux*.
9222 * linux-tile-low.c: New file.
9224 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9226 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9228 2012-05-24 Pedro Alves <palves@redhat.com>
9232 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9234 2012-05-24 Pedro Alves <palves@redhat.com>
9238 Replace target_signal with gdb_signal throughout.
9240 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9242 * linux-low.c (linux_store_registers): Avoid the copying sequence
9243 when no data has been retrieved by ptrace.
9245 2012-05-22 Will Deacon <will.deacon@arm.com>
9247 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9248 Include asm/ptrace.h.
9249 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9252 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9254 * linux-low.c (linux_store_registers): Don't re-retrieve data
9255 with ptrace that has already been obtained from /proc. Always
9256 copy any data retrieved with ptrace to the buffer supplied.
9258 2012-05-11 Yao Qi <yao@codesourcery.com>
9259 Pedro Alves <palves@redhat.com>
9261 * linux-low.c (enum stopping_threads_kind): New.
9262 (stopping_threads): Change type to `enum stopping_threads_kind'.
9263 (handle_extended_wait): If stopping and suspending threads, leave
9264 the new_lwp suspended too.
9265 (linux_wait_for_event): Adjust.
9266 (stop_all_lwps): Set `stopping_threads' to
9267 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9268 whether we're suspending threads or just stopping them. Assert no
9271 2012-04-29 Yao Qi <yao@codesourcery.com>
9273 * server.h: Move some code to ...
9274 * gdbthread.h: ... here. New.
9275 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9276 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9277 (nto-low.o, win32-low.o): Likewise.
9278 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9279 * regcache.c, remote-utils.c, server.c: Likewise.
9280 * target.c, tracepoint.c, win32-low.c: Likewise.
9282 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9284 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9285 (PTRACE_ARG4_TYPE): Likewise.
9286 (PTRACE_XFER_TYPE): Likewise.
9287 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9288 ptrace to PTRACE_ARG3_TYPE.
9289 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9290 (PTRACE_ARG4_TYPE): Likewise.
9291 (PTRACE_XFER_TYPE): Likewise.
9292 (linux_detach_one_lwp): Cast fourth argument of
9293 ptrace to long then PTRACE_ARG4_TYPE.
9294 (regsets_fetch_inferior_registers): Cast third argument of
9295 ptrace to long then PTRACE_ARG3_TYPE.
9296 (regsets_store_inferior_registers): Likewise.
9298 2012-04-20 Pedro Alves <palves@redhat.com>
9300 * configure: Regenerate.
9302 2012-04-19 Pedro Alves <palves@redhat.com>
9304 * Makefile.in (GNULIB_BUILDDIR): New.
9305 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9306 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9307 (all, install-only, uninstall, clean-info, all-lib, clean): No
9308 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9309 (maintainer-clean realclean distclean): Use subdir_do.
9311 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9312 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9313 * acinclude.m4: Include acx_configure_dir.m4.
9314 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9315 calls. Call AC_PROG_RANLIB. Configure gnulib using
9318 (GNULIB_STDINT_H): Adjust.
9319 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9320 * gdbreplay.c: Include build-gnulib/config.h.
9321 * server.h: Likewise.
9322 * aclocal.m4: Regenerate.
9323 * config.in: Regenerate.
9324 * configure: Regenerate.
9326 2012-04-19 Pedro Alves <palves@redhat.com>
9328 * Makefile.in (LIBGNU, INCGNU): Adjust.
9329 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9330 (all, install-only, uninstall, clean-info, all-lib, clean)
9331 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9332 * configure.ac: Adjust AC_OUTPUT output.
9333 * aclocal.m4: Regenerate.
9334 * configure: Regenerate.
9336 2012-04-19 Pedro Alves <palves@redhat.com>
9338 * Makefile.in (generated_files): New.
9339 (server_h): Remove the explicit dependency on config.h, and depend
9340 on $generated_files.
9342 2012-04-19 Pedro Alves <palves@redhat.com>
9344 * Makefile.in (INCGNU): Add -Ignulib.
9346 2012-04-19 Pedro Alves <palves@redhat.com>
9348 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9349 (INCGNU): ... this, and spell out -I here.
9350 (GNULIB_LIB): Rename to ...
9352 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9354 2012-04-19 Pedro Alves <palves@redhat.com>
9356 * config.in: Regenerate.
9358 2012-04-19 Pedro Alves <palves@redhat.com>
9360 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9361 * server.h (memmem): Remove declaration.
9362 * config.in: Regenerate.
9363 * configure: Regenerate.
9365 2012-04-19 Yao Qi <yao@codesourcery.com>
9367 * Makefile.in (SFILES): Add common/vec.c.
9371 2012-04-19 Yao Qi <yao@codesourcery.com>
9373 * remote-utils.c (prepare_resume_reply): Replace with macro
9374 target_core_of_thread.
9375 * server.c (handle_qxfer_threads_proper): Likewise.
9376 * target.h (traget_core_of_thread): New macro.
9378 2012-04-18 Pedro Alves <palves@redhat.com>
9380 * aclocal.m4: Regenerate.
9381 * configure: Regenerate.
9383 2012-04-16 Yao Qi <yao@codesourcery.com>
9385 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9386 duplicated on address.
9388 2012-04-16 Yao Qi <yao@codesourcery.com>
9390 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9391 (struct tracepoint_action_ops) <send>: New field.
9392 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9393 (agent_expr_send, x_tracepoint_action_send): New.
9394 (l_tracepoint_action_send): New.
9395 (cmd_qtdp): Download and install tracepoint
9396 according to `use_agent'.
9397 (run_inferior_command): Add one more parameter `len'.
9399 (tracepoint_send_agent): New.
9400 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9402 2012-04-16 Yao Qi <yao@codesourcery.com>
9404 * tracepoint.c (download_tracepoints): Moved to ...
9405 (cmd_qtstart): ... here.
9407 2012-04-14 Yao Qi <yao@codesourcery.com>
9409 * tracepoint.c: Include inttypes.h.
9410 (struct collect_memory_action): Use sized types.
9411 (struct tracepoint): Likewise.
9412 (cmd_qtdp, stop_tracing): Update print specifiers.
9413 (cmd_qtp, response_tracepoint): Likewise.
9414 (collect_data_at_tracepoint): Likewise.
9415 (collect_data_at_step): Likewise.
9417 2012-04-14 Yao Qi <yao@codesourcery.com>
9419 Import gnulib module inttypes.
9420 * aclocal.m4, config.in, configure: Regenerated.
9422 2012-04-14 Yao Qi <yao@codesourcery.com>
9424 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9425 Makefile and config.status at last.
9427 2012-04-13 Yao Qi <yao@codesourcery.com>
9429 * tracepoint.c: Include stdint.h unconditionally.
9431 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9433 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9434 on BFD_HAVE_SYS_PROCFS_TYPE.
9435 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9436 * configure: Regenerate.
9437 * config.in: Likewise.
9439 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9441 * Makefile.in (clean): Also remove x32.c x32-linux.c
9442 x32-avx.c x32-avx-linux.c.
9443 (x32.o): New target.
9445 (x32-linux.o): Likewise.
9446 (x32-linux.c): Likewise.
9447 (x32-avx.o): Likewise.
9448 (x32-avx.c): Likewise.
9449 (x32-avx-linux.o): Likewise.
9450 (x32-avx-linux.c): Likewise.
9452 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9453 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9454 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9455 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9456 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9457 i386/x32-avx-linux.xml.
9459 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9460 (init_registers_x32_avx_linux): Likwise.
9461 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9462 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9464 2012-04-13 Pedro Alves <palves@redhat.com>
9466 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9467 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9468 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9469 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9472 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9474 * linux-x86-low.c (compat_x32_clock_t): New.
9475 (compat_x32_siginfo_t): Likewise.
9476 (compat_x32_siginfo_from_siginfo): Likewise.
9477 (siginfo_from_compat_x32_siginfo): Likewise.
9478 (linux_is_elf64): Likewise.
9479 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9480 and siginfo_from_compat_x32_siginfo for x32.
9481 (x86_arch_setup): Set linux_is_elf64.
9483 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9486 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9488 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9489 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9490 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9491 compatible with process.
9493 2012-04-12 Yao Qi <yao@codesourcery.com>
9495 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9496 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9497 (install-only, install-info, clean): Handle sub dir gnulib.
9498 (all-lib, am--refresh): New targets.
9499 (memmem.o): Remove target.
9500 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9501 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9502 (AC_REPLACE_FUNCS): Remove memmem.
9503 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9504 (AC_OUTPUT): Generate Makefile in gnulib/.
9505 * aclocal.m4, config.in, configure: Regenerated.
9507 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9509 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9511 2012-04-05 Pedro Alves <palves@redhat.com>
9513 -Werror=strict-aliasing
9515 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9518 2012-04-04 Pedro Alves <palves@redhat.com>
9520 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9521 (sparc_store_gregset_from_stack, sparc_store_gregset)
9522 (sparc_breakpoint_at): Fix formatting.
9524 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9526 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9528 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9529 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9530 * config.in: Regenerate.
9531 * configure: Likewise.
9533 2012-03-29 Pedro Alves <palves@redhat.com>
9535 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9536 Correct ptrace arguments.
9538 2012-03-28 Pedro Alves <palves@redhat.com>
9540 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9541 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9542 (IA64_FR1_REGNUM): New defines.
9543 (ia64_fetch_register): New.
9544 (the_low_target): Install it.
9545 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9547 * linux-low.c (linux_fetch_registers): Try the
9548 the_low_target.fetch_register hook first.
9550 * linux-arm-low.c (the_low_target): Adjust.
9551 * linux-bfin-low.c (the_low_target): Adjust.
9552 * linux-cris-low.c (the_low_target): Adjust.
9553 * linux-crisv32-low.c (the_low_target): Adjust.
9554 * linux-m32r-low.c (the_low_target): Adjust.
9555 * linux-m68k-low.c (the_low_target): Adjust.
9556 * linux-mips-low.c (the_low_target): Adjust.
9557 * linux-ppc-low.c (the_low_target): Adjust.
9558 * linux-s390-low.c (the_low_target): Adjust.
9559 * linux-sh-low.c (the_low_target): Adjust.
9560 * linux-sparc-low.c (the_low_target): Adjust.
9561 * linux-tic6x-low.c (the_low_target): Adjust.
9562 * linux-x86-low.c (the_low_target): Adjust.
9563 * linux-xtensa-low.c (the_low_target): Adjust.
9565 2012-03-26 Pedro Alves <palves@redhat.com>
9567 * server.c (handle_qxfer_libraries): Don't bail early if
9568 the_target->qxfer_libraries_svr4 is not NULL.
9570 2012-03-26 Pedro Alves <palves@redhat.com>
9572 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9574 2012-03-23 Pedro Alves <palves@redhat.com>
9576 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9577 "library-list-svr4" element's start tag when the the DSO list is
9580 2012-03-23 Pedro Alves <palves@redhat.com>
9582 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9583 a variable whose type size is the same as the inferior's pointer
9586 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9588 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9590 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9591 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9592 * linux-low.h: Include <signal.h>.
9593 (struct siginfo): Remove forward declaration.
9594 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9597 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9599 * .gitignore: Ignore more files.
9601 2012-03-19 Pedro Alves <palves@redhat.com>
9602 Jan Kratochvil <jan.kratochvil@redhat.com>
9604 * server.c (cont_thread, general_thread): Add describing comments.
9605 (start_inferior): Clear `cont_thread'.
9606 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9609 2012-03-15 Yao Qi <yao@codesourcery.com>
9611 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9613 (cmd_qtdp): ... here.
9615 2012-03-15 Yao Qi <yao@codesourcery.com>
9617 * tracepoint.c (struct tracepoint_action_ops): New.
9618 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9619 (m_tracepoint_action_download): New.
9620 (r_tracepoint_action_download): New.
9621 (x_tracepoint_action_download): New.
9622 (l_tracepoint_action_download): New.
9623 (add_tracepoint_action): Install `action->ops' according type.
9624 (download_tracepoint_1): Move code `download' function pointer
9625 of various tracepoint_action_ops.
9627 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9629 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9630 linux_ptrace_attach_warnings.
9632 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9634 * Makefile.in (linux-ptrace.o): New.
9635 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9636 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9637 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9638 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9639 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9641 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9643 2012-03-08 Yao Qi <yao@codesourcery.com>
9644 Pedro Alves <palves@redhat.com>
9646 Fix PR server/13392.
9647 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9649 * tracepoint.c (remove_tracepoint): New.
9650 (cmd_qtdp): Call remove_tracepoint when failed to install.
9652 2012-03-07 Pedro Alves <palves@redhat.com>
9654 * linux-low.c (get_detach_signal): New.
9655 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9656 Pass on pending signals to PTRACE_DETACH. Check the result of the
9658 * server.c (program_signals, program_signals_p): New.
9659 (handle_general_set): Handle QProgramSignals.
9660 * server.h (program_signals, program_signals_p): Declare.
9662 2012-03-05 Pedro Alves <palves@redhat.com>
9663 Jan Kratochvil <jan.kratochvil@redhat.com>
9665 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9668 2012-03-03 Yao Qi <yao@codesourcery.com>
9670 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9671 agent_look_up_symbols.
9673 2012-03-03 Yao Qi <yao@codesourcery.com>
9675 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9676 (linux-x86-low.o): Likewise.
9677 * server.h: Remove in_process_agent_loaded.
9678 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9682 2012-03-03 Yao Qi <yao@codesourcery.com>
9684 * tracepoint.c (gdb_agent_capability): New global.
9685 (in_process_agent_loaded_ust): Renamed to
9686 `in_process_agent_supports_ust'.
9688 (in_process_agent_supports_ust): Call agent_capability_check.
9689 (clear_installed_tracepoints): Assert that agent supports
9692 2012-03-03 Yao Qi <yao@codesourcery.com>
9694 * linux-low.c (linux_supports_agent): New.
9695 (linux_target_ops): Initialize field `supports_agent' with
9696 linux_supports_agent.
9697 * target.h (struct target_ops) <supports_agent>: New.
9698 (target_supports_agent): New macro.
9699 * server.c (handle_general_set): Handle packet 'QAgent'.
9700 (handle_query): Send `QAgent+'.
9701 * Makefile.in (server.o): Depends on agent.h.
9703 2012-03-03 Yao Qi <yao@codesourcery.com>
9705 * Makefile.in (OBS): Add agent.o.
9706 Add new rule for agent.o.
9707 Track dependence of tracepoint.c on agent.h.
9708 * tracepoint.c (run_inferior_command_1):
9709 (run_inferior_command): Call agent_run_command.
9710 (gdb_ust_connect_sync_socket): Deleted. Move it to
9712 (resume_thread, stop_thread): Likewise.
9713 (gdb_ust_socket_init): Renamed to ...
9714 (gdb_agent_socket_init): ... New.
9715 (gdb_ust_thread): Renamed to ...
9716 (gdb_agent_helper_thread): ... New.
9717 (gdb_ust_init): Move some code to ...
9718 (gdb_agent_init): ... here. New.
9719 [HAVE_UST]: Call gdb_ust_init.
9720 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9721 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9722 * config.in, configure: Regenerated.
9724 2012-03-02 Pedro Alves <palves@redhat.com>
9726 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9727 * linux-low.c (struct simple_pid_list): New.
9728 (stopped_pids): New a struct simple_pid_list pointer.
9729 (add_to_pid_list, pull_pid_from_list): New.
9730 (handle_extended_wait): Don't assume the first signal new children
9731 report is SIGSTOP. Adjust call to pull_pid_from_list.
9732 (linux_wait_for_lwp): Adjust.
9734 2012-03-02 Yao Qi <yao@codesourcery.com>
9736 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9739 2012-03-02 Yao Qi <yao@codesourcery.com>
9741 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9742 `stop_pc' and `tpoint'. Update caller.
9744 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9746 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9747 * linux-low.c (use_linux_regsets): New macro.
9748 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9749 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9750 (linux_register_in_regsets): New function.
9751 (usr_fetch_inferior_registers): Skip registers covered by
9753 (usr_store_inferior_registers): Likewise.
9754 (usr_fetch_inferior_registers): New macro.
9755 (usr_store_inferior_registers): Likewise.
9756 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9757 (linux_store_registers): Likewise.
9758 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9760 (init_registers_mips64_dsp_linux): Likewise.
9761 (init_registers_mips_linux): New macro.
9762 (init_registers_mips_dsp_linux): Likewise.
9763 (mips_dsp_num_regs): Likewise.
9764 (DSP_BASE, DSP_CONTROL): New fallback macros.
9765 (mips_base_regs): New macro.
9766 (mips_regmap): Use it. Fix the size.
9767 (mips_dsp_regmap): New variable.
9768 (mips_dsp_regset_bitmap): Likewise.
9769 (mips_arch_setup): New function.
9770 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9772 (mips_cannot_store_register): Likewise.
9773 (the_low_target): Update .arch_setup, .num_regs and .regmap
9774 initializers. Add .regset_bitmap initializer.
9775 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9777 * linux-bfin-low.c (the_low_target): Likewise.
9778 * linux-cris-low.c (the_low_target): Likewise.
9779 * linux-crisv32-low.c (the_low_target): Likewise.
9780 * linux-ia64-low.c (the_low_target): Likewise.
9781 * linux-m32r-low.c (the_low_target): Likewise.
9782 * linux-m68k-low.c (the_low_target): Likewise.
9783 * linux-ppc-low.c (the_low_target): Likewise.
9784 * linux-s390-low.c (the_low_target): Likewise.
9785 * linux-sh-low.c (the_low_target): Likewise.
9786 * linux-sparc-low.c (the_low_target): Likewise.
9787 * linux-tic6x-low.c (the_low_target): Likewise.
9788 * linux-x86-low.c (the_low_target): Likewise.
9789 * linux-xtensa-low.c (the_low_target): Likewise.
9790 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9791 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9792 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9794 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9795 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9797 2012-02-29 Yao Qi <yao@codesourcery.com>
9798 Pedro Alves <palves@redhat.com>
9800 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9801 `step_over_finished' is true.
9803 2012-02-27 Pedro Alves <palves@redhat.com>
9805 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9806 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9808 2012-02-27 Pedro Alves <palves@redhat.com>
9811 * linux-low.c (pid_is_stopped): New.
9812 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9814 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9816 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9819 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9821 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9823 2012-02-24 Luis Machado <lgustavo@codesourcery>
9825 * server.c (handle_query): Advertise support for target-side
9826 breakpoint condition evaluation.
9827 (process_point_options): New function.
9828 (process_serial_event): When inserting a breakpoint, check for
9829 a target-side condition that should be evaluated.
9831 * mem-break.c: Include regcache.h and ax.h.
9832 (point_cond_list_t): New data structure.
9833 (breakpoint) <cond_list>: New field.
9834 (find_gdb_breakpoint_at): Make non-static.
9835 (delete_gdb_breakpoint_at): Clear any target-side
9837 (clear_gdb_breakpoint_conditions): New function.
9838 (add_condition_to_breakpoint): Likewise.
9839 (add_breakpoint_condition): Likewise.
9840 (gdb_condition_true_at_breakpoint): Likewise.
9841 (gdb_breakpoint_here): Return result directly instead
9842 of going through a local variable.
9844 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9845 (clear_gdb_breakpoint_conditions): Likewise.
9846 (add_breakpoint_condition): Likewise.
9847 (gdb_condition_true_at_breakpoint): Likewise.
9849 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9850 (need_step_over_p): Take target-side breakpoint condition into
9853 2012-02-24 Luis Machado <lgustavo@codesourcery>
9855 * server.h: Include tracepoint.h.
9856 (agent_mem_read, agent_get_trace_state_variable_value,
9857 agent_set_trace_state_variable_value,
9858 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9859 get_set_tsv_func_addr): New prototypes.
9861 * ax.h: New include file.
9862 * ax.c: New source file.
9864 * tracepoint.c: Include ax.h.
9865 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9866 agent_expr, eval_result_type): Move to ax.h.
9867 (parse_agent_expr): Rename to ...
9868 (gdb_parse_agent_expr): ... this, make it non-static and move
9870 (unparse_agent_expr) Rename to ...
9871 (gdb_unparse_agent_expr): ... this, make it non-static and move
9873 (eval_agent_expr): Rename to ...
9874 (eval_tracepoint_agent_expr): ... this.
9875 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9876 forward declarations.
9877 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9878 (agent_get_trace_state_variable_value): New function.
9879 (agent_set_trace_state_variable_value): New function.
9880 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9881 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9882 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9883 (condition_true_at_tracepoint): Likewise.
9884 (parse_agent_expr): Rename to ...
9885 (gdb_parse_agent_expr): ... this and move to ax.c.
9886 (unparse_agent_expr): Rename to ...
9887 (gdb_unparse_agent_expr): ... this and move to ax.c.
9888 (gdb_agent_op_name): Move to ax.c.
9889 (eval_agent_expr): Rename to ...
9890 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9892 (eval_tracepoint_agent_expr): New function.
9893 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9895 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9897 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9898 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9899 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9900 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9901 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9902 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9903 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9904 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9905 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9906 (compile_bytecodes): Remove forward declaration.
9907 (is_goto_target): Move to ax.c.
9908 (compile_bytecodes): Move to ax.c and call
9909 agent_get_trace_state_variable_value (...) and
9910 agent_set_trace_state_variable_value (...).
9912 * Makefile.in: Update ax.c and IPA dependencies.
9914 2012-02-24 Pedro Alves <palves@redhat.com>
9916 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9917 (cmd_bigqtbuffer_circular): ... this. Only handle
9918 'QTBuffer:circular:'.
9919 (handle_tracepoint_general_set): Adjust.
9921 2012-02-16 Yao Qi <yao@codesourcery.com>
9923 * inferiors.c: Move code to ...
9924 * dll.c: .... here. New.
9925 * server.h: Declare clear_dlls.
9926 * Makefile.in (SFILES): Add dll.c.
9930 2012-02-11 Yao Qi <yao@codesourcery.com>
9932 * server.c: (handle_monitor_command): Add a new parameter
9934 (handle_query): Update caller.
9936 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9938 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9939 * configure, config.in: Regenerate.
9940 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9943 2012-02-02 Pedro Alves <palves@redhat.com>
9945 Try SIGKILL first, then PTRACE_KILL.
9946 * linux-low.c (linux_kill_one_lwp): New.
9947 (linux_kill_one_lwp): Rename to ...
9948 (kill_one_lwp_callback): ... this. Use the new
9951 2012-02-02 Pedro Alves <palves@redhat.com>
9953 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9956 2012-01-27 Pedro Alves <palves@redhat.com>
9958 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9959 (elf_64_file_p): Make static.
9960 (linux_pid_exe_is_elf_64_file): New.
9961 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9962 Delete declarations.
9963 (linux_pid_exe_is_elf_64_file): Declare.
9964 * linux-x86-low.c (x86_arch_setup): Use
9965 linux_pid_exe_is_elf_64_file.
9967 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9969 * linux-low.c (linux_wait_for_event_1): Rename to ...
9970 (linux_wait_for_event): ... here and merge it with former
9971 linux_wait_for_event - new variable wait_ptid, use it.
9972 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9974 2012-01-23 Pedro Alves <palves@redhat.com>
9976 * server.c (main): Avoid yet another case of infinite loop while
9977 detaching/killing after a longjmp.
9979 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9982 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9984 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9986 * hostio.c (handle_readlink): New function.
9987 (handle_vFile): Call it to handle "vFile:readlink" packets.
9989 2012-01-20 Pedro Alves <palves@redhat.com>
9990 Ulrich Weigand <ulrich.weigand@linaro.org>
9992 * server.c (handle_v_requests): Only support vAttach and vRun to
9993 start multiple processes when in extended protocol mode.
9995 2012-01-17 Pedro Alves <palves@redhat.com>
9997 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9998 memalign plus mprotect to allocate the scratch buffer.
10000 2012-01-13 Pedro Alves <palves@redhat.com>
10002 * server.c (attach_inferior): Clear `cont_thread'.
10004 2012-01-13 Pedro Alves <palves@redhat.com>
10006 * server.c (main): Avoid infinite loop while detaching/killing
10009 2012-01-09 Doug Evans <dje@google.com>
10011 * server.c (start_inferior): Set last_ptid in --wrapper case.
10013 2012-01-06 Yao Qi <yao@codesourcery.com>
10015 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10017 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10019 2012-01-04 Yao Qi <yao@codesourcery.com>
10021 * tracepoint.c (cmd_qtdp): Print debug message
10022 for static tracepoint.
10024 2012-01-04 Yao Qi <yao@codesourcery.com>
10026 * tracepoint.c (trace_vdebug): Differentiate debug message
10027 between gdbserver and IPA.
10029 2012-01-03 Yao Qi <yao@codesourcery.com>
10031 * tracepoint.c (tracepoint_was_hit): Don't collect for
10034 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10036 * terminal.h: Reformat copyright header.
10038 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10040 * server.c (gdbserver_version): Update copyright year.
10041 * gdbreplay.c (gdbreplay_version): Likewise.
10043 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10045 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10048 2011-12-18 Hui Zhu <teawater@gmail.com>
10049 * linux-low.c (linux_create_inferior): Save return value to ret.
10051 2011-12-18 Hui Zhu <teawater@gmail.com>
10053 * linux-low.c (linux_create_inferior): Save return value to ret.
10055 2011-12-16 Doug Evans <dje@google.com>
10057 * linux-low.c (linux_create_inferior): If stdio connection,
10058 redirect stdin from /dev/null, stdout to stderr.
10059 * remote-utils.c (remote_is_stdio): New static global.
10060 (remote_connection_is_stdio): New function.
10061 (remote_prepare): Handle stdio connection.
10062 (remote_open): Ditto.
10063 (remote_close): Don't close stdin for stdio connections.
10064 (read_prim,write_prim): New functions. Replace all calls to
10065 read/write to these.
10066 * server.c (main): Watch for "-" argument. Move call to
10067 remote_prepare before start_inferior.
10068 * server.h (STDIO_CONNECTION_NAME): New macro.
10069 (remote_connection_is_stdio): Declare.
10071 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10072 in debugging output.
10074 2011-12-15 Yao Qi <yao@codesourcery.com>
10076 * tracepoint.c: Include sys/syscall.h.
10077 (gdb_ust_thread): Remove preprocessor conditional.
10079 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10081 * linux-low.c (linux_detach_one_lwp): Call
10082 the_low_target.prepare_to_resume before detaching.
10084 2011-12-14 Yao Qi <yao@codesourcery.com>
10086 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10089 2011-12-14 Yao Qi <yao@codesourcery.com>
10091 * i386-low.c (i386_low_stopped_data_address): Initialize local
10092 variable `control'.
10094 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10098 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10099 DR_CONTROL unless necessary. Extend comments.
10100 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10101 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10103 2011-12-13 Yao Qi <yao@codesourcery.com>
10105 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10107 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10109 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10111 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10112 Print new debug message for such case.
10114 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10116 Fix overlapping memcpy.
10117 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10118 the read_inferior_memory transfer.
10119 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10120 write_inferior_memory transfer.
10121 (set_fast_tracepoint_jump): New variable buf. Use it for the
10122 read_inferior_memory and write_inferior_memory transfers.
10123 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10124 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10125 Use it for the write_inferior_memory transfer.
10126 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10129 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10131 * linux-low.c (fetch_register, store_register): Make code
10132 consistent, fix formatting.
10134 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10136 * linux-low.c (usr_store_inferior_registers): Factor out code
10137 to handle individual registers into...
10138 (store_register): ... this new function.
10140 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10142 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10143 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10144 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10145 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10146 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10147 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10148 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10149 (srv_xmlfiles): Add new XML files.
10151 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10153 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10154 (init_registers_s390_linux32v1): Add prototype.
10155 (init_registers_s390_linux32v2): Likewise.
10156 (init_registers_s390_linux64v1): Likewise.
10157 (init_registers_s390_linux64v2): Likewise.
10158 (init_registers_s390x_linux64v1): Likewise.
10159 (init_registers_s390x_linux64v2): Likewise.
10160 (s390_num_regs): Increment to 52.
10161 (s390_regmap): Add orig_r2 register.
10162 (s390_num_regs_3264): Increment to 68.
10163 (s390_regmap_3264): Add orig_r2 register.
10164 (s390_collect_ptrace_register): Handle orig_r2 register.
10165 (s390_supply_ptrace_register): Likewise.
10166 (s390_fill_last_break): New function.
10167 (s390_store_last_break): Likewise.
10168 (s390_fill_system_call): New function.
10169 (s390_store_system_call): Likewise.
10170 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10172 (s390_check_regset): New function.
10173 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10174 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10175 Update target_regsets for available register sets.
10177 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10178 Jan Kratochvil <jan.kratochvil@redhat.com>
10180 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10181 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10183 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10184 * linux-low.h (struct process_info_private): New member r_debug.
10185 * server.c (handle_qxfer_libraries): Call
10186 the_target->qxfer_libraries_svr4.
10187 (handle_qxfer_libraries_svr4): New function.
10188 (qxfer_packets): New entry "libraries-svr4".
10189 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10190 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10191 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10192 PACKET_qXfer_libraries_svr4.
10194 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10196 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10197 PSW address/mask between 8-byte and 16-byte formats.
10198 (s390_supply_ptrace_register): Likewise.
10199 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10200 basic addressing mode bit.
10202 2011-11-24 Stan Shebs <stan@codesourcery.com>
10204 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10206 2011-11-17 Stan Shebs <stan@codesourcery.com>
10208 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10209 (tracing_start_time): New global.
10210 (tracing_stop_time): New global.
10211 (tracing_user_name): New global.
10212 (tracing_notes): New global.
10213 (tracing_stop_note): New global.
10214 (cmd_qtstart): Set traceframe_usage, start_time.
10215 (stop_tracing): Set stop_time.
10216 (cmd_qtstatus): Report additional status.
10217 (cmd_qtp): New function.
10218 (handle_tracepoint_query): Call it.
10219 (cmd_qtnotes): New function.
10220 (handle_tracepoint_general_set): Call it.
10221 (get_timestamp): Rename from tsv_get_timestamp.
10223 2011-11-14 Stan Shebs <stan@codesourcery.com>
10224 Kwok Cheung Yeung <kcy@codesourcery.com>
10226 * linux-x86-low.c (small_jump_insn): New.
10227 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10228 trampoline and error message, build a trampoline and issue a small
10229 jump instruction to it.
10230 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10231 trampoline and error message.
10232 (x86_get_min_fast_tracepoint_insn_len): New.
10233 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10234 * linux-low.h (struct linux_target_ops): Add arguments to
10235 install_fast_tracepoint_jump_pad operation, add new operation.
10236 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10238 (linux_get_min_fast_tracepoint_insn_len): New function.
10239 (linux_target_op): Add new operation.
10240 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10241 (gdb_trampoline_buffer_end): Ditto.
10242 (gdb_trampoline_buffer_error): Ditto.
10243 (struct ipa_sym_addresses): Add fields for new IPA variables.
10244 (symbol_list): Add entries for new IPA variables.
10245 (struct tracepoint): Add fields to hold the address range of the
10246 trampoline used by the tracepoint.
10247 (trampoline_buffer_head): New static variable.
10248 (trampoline_buffer_tail): Ditto.
10249 (claim_trampoline_space): New function.
10250 (have_fast_tracepoint_trampoline_buffer): New function.
10251 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10253 (install_fast_tracepoint): Ditto, also add error buffer argument.
10254 (cmd_qtminftpilen): New function.
10255 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10256 (fast_tracepoint_from_trampoline_address): New function.
10257 (fast_tracepoint_collecting): Handle trampoline as part of jump
10259 (set_trampoline_buffer_space): New function.
10260 (initialize_tracepoint): Initialize new IPA variables.
10261 * target.h (struct target_ops): Add arguments to
10262 install_fast_tracepoint_jump_pad operation, add new
10263 get_min_fast_tracepoint_insn_len operation.
10264 (target_get_min_fast_tracepoint_insn_len): New.
10265 (install_fast_tracepoint_jump_pad): Add arguments.
10266 * server.h (IPA_BUFSIZ): Define.
10267 * linux-i386-ipa.c: Include extra header files.
10268 (initialize_fast_tracepoint_trampoline_buffer): New function.
10269 (initialize_low_tracepoint): Call it.
10270 * server.h (set_trampoline_buffer_space): Declare.
10271 (claim_trampoline_space): Ditto.
10272 (have_fast_tracepoint_trampoline_buffer): Ditto.
10274 2011-11-14 Yao Qi <yao@codesourcery.com>
10276 * server.c (handle_query): Handle InstallInTrace for qSupported.
10277 * tracepoint.c (add_tracepoint): Sort list.
10278 (install_tracepoint, download_tracepoint): New.
10279 (cmd_qtdp): Call them to install and download tracepoints.
10280 (sort_tracepoints): Removed.
10281 (cmd_qtstart): Update.
10283 2011-11-14 Yao Qi <yao@codesourcery.com>
10285 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10286 * mem-break.h: Declare.
10287 * tracepoint.c (cmd_qtstart): Move some code to ...
10288 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10290 (download_tracepoints): Move some code to ...
10291 (download_tracepoint_1): ... here. New.
10293 2011-11-08 Yao Qi <yao@codesourcery.com>
10295 * remote-utils.c (relocate_instruction): A comment fix.
10297 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10299 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10300 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10301 dr_status_mirror and dr_control_mirror from debug_reg_state.
10302 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10303 (i386_initial_stuff): Remove use of deleted globals.
10304 (i386_get_thread_context, i386_set_thread_context,
10305 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10306 from debug_reg_state.
10308 2011-11-05 Yao Qi <yao@codesourcery.com>
10310 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10311 address as TPOINT's.
10313 2011-11-02 Stan Shebs <stan@codesourcery.com>
10315 * tracepoint.c (agent_mem_read_string): New function.
10316 (eval_agent_expr): Call it for tracenz.
10317 * server.c (handle_query): Report support for tracenz.
10319 2011-11-02 Yao Qi <yao@codesourcery.com>
10321 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10323 2011-11-02 Yao Qi <yao@codesourcery.com>
10325 * target.h: Fix a typo in comment.
10327 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10329 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10330 clobber the breakpoints' shadows with fast tracepoint jumps.
10331 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10332 * target.c (write_inferior_memory): Also pass MYADDR down to
10335 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10337 * configure.ac: Check support for personality routine.
10338 * configure: Regenerate.
10339 * config.in: Likewise.
10340 * linux-low.c: Include <sys/personality.h>.
10341 Define ADDR_NO_RANDOMIZE if necessary.
10342 (linux_create_inferior): Disable address space randomization when
10343 forking inferior, if requested.
10344 (linux_supports_disable_randomization): New function.
10345 (linux_target_ops): Install it.
10346 * server.h (disable_randomization): Declare.
10347 * server.c (disable_randomization): New global variable.
10348 (handle_general_set): Handle QDisableRandomization.
10349 (handle_query): Likewise for qSupported.
10350 (main): Support --disable-randomization and --no-disable-randomization
10351 command line arguments.
10352 * target.h (struct target_ops): Add supports_disable_randomization.
10353 (target_supports_disable_randomization): New macro.
10355 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10357 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10359 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10360 [!PT_GETDSBT] (target_loadmap): New definition.
10361 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10362 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10363 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10364 and PT_GETDSBT to LINUX_LOADMAP.
10365 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10366 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10368 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10370 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10371 (arm_linux_hwbp_cap): New static variable.
10372 (arm_linux_get_hwbp_cap): Replace by ...
10373 (arm_linux_init_hwbp_cap): ... this new function.
10374 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10375 (arm_linux_get_hw_watchpoint_count): Likewise.
10376 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10377 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10378 (arm_prepare_to_resume): Use perror_with_name instead of error.
10380 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10382 * linux-arm-low.c: Include <signal.h>.
10383 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10384 (struct arm_linux_hwbp_cap): New data type.
10385 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10386 (struct arm_linux_hw_breakpoint): New data type.
10387 (MAX_BPTS, MAX_WPTS): Define.
10388 (struct arch_process_info, struct arch_lwp_info): New data types.
10389 (arm_linux_get_hwbp_cap): New function.
10390 (arm_linux_get_hw_breakpoint_count): Likewise.
10391 (arm_linux_get_hw_watchpoint_count): Likewise.
10392 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10393 (arm_hwbp_control_initialize): Likewise.
10394 (arm_hwbp_control_is_enabled): Likewise.
10395 (arm_hwbp_control_is_initialized): Likewise.
10396 (arm_hwbp_control_disable): Likewise.
10397 (arm_linux_hw_breakpoint_equal): Likewise.
10398 (arm_linux_hw_point_initialize): Likewise.
10399 (struct update_registers_data): New data structure.
10400 (update_registers_callback: New function.
10401 (arm_insert_point): Likewise.
10402 (arm_remove_point): Likewise.
10403 (arm_stopped_by_watchpoint): Likewise.
10404 (arm_stopped_data_address): Likewise.
10405 (arm_new_process): Likewise.
10406 (arm_new_thread): Likewise.
10407 (arm_prepare_to_resume): Likewise.
10408 (the_low_target): Register arm_insert_point, arm_remove_point,
10409 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10410 arm_new_thread, and arm_prepare_to_resume.
10412 2011-09-15 Stan Shebs <stan@codesourcery.com>
10414 * server.h (struct emit_ops): Add compare-goto fields.
10415 * tracepoint.c (gdb_agent_op_sizes): New table.
10416 (emit_eq_goto): New function.
10417 (emit_ne_goto): New function.
10418 (emit_lt_goto): New function.
10419 (emit_le_goto): New function.
10420 (emit_gt_goto): New function.
10421 (emit_ge_goto): New function.
10422 (is_goto_target): New function.
10423 (compile_bytecodes): Recognize special cases of compare-goto
10424 combinations and call specialized emitters for them.
10425 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10426 (amd64_emit_ne_goto): New function.
10427 (amd64_emit_lt_goto): New function.
10428 (amd64_emit_le_goto): New function.
10429 (amd64_emit_gt_goto): New function.
10430 (amd64_emit_ge_goto): New function.
10431 (amd64_emit_ops): Add the new functions.
10432 (i386_emit_eq_goto): New function.
10433 (i386_emit_ne_goto): New function.
10434 (i386_emit_lt_goto): New function.
10435 (i386_emit_le_goto): New function.
10436 (i386_emit_gt_goto): New function.
10437 (i386_emit_ge_goto): New function.
10438 (i386_emit_ops): Add the new functions.
10440 2011-09-08 Stan Shebs <stan@codesourcery.com>
10442 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10443 (i386_emit_epilogue): Restore %ebx.
10445 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10447 * server.c (step_thread): Remove definition.
10448 (process_serial_event): Don't handle Hs.
10449 * server.h (step_thread): Remove declaration.
10450 * target.c (set_desired_inferior): Remove use of step_thread.
10452 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10454 * linux-low.c: Include linux-procfs.h.
10455 (linux_attach_lwp_1): Update comments.
10456 (linux_attach): Scan for existing threads when attaching to a
10457 process that is the tgid.
10458 * Makefile.in: Update dependencies.
10460 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10462 * configure.srv: Add linux-procfs.o dependencies.
10464 2011-08-14 Yao Qi <yao@codesourcery.com>
10466 * target.h (struct target_ops): Fix indent.
10467 * win32-low.c (win32_target_ops): Fix comment.
10469 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10470 Yao Qi <yao@codesourcery.com>
10472 * Makefile.in (clean): Remove tic6x-*.c files.
10473 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10474 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10475 (tic6x-c64xp-linux.c): Likewise.
10476 * configure.srv: Add support for tic6x-*-uclinux.
10477 * linux-tic6x-low.c: New.
10478 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10480 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10481 Yao Qi <yao@codesourcery.com>
10483 * target.h (struct target_ops): Add read_loadmap.
10484 * linux-low.c (struct target_loadseg): New type.
10485 (struct target_loadmap): New type.
10486 (linux_read_loadmap): New function.
10487 (linux_target_ops): Add linux_read_loadmap.
10488 * server.c (handle_query): Support qXfer:fdpic:read packet.
10489 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10492 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10494 * win32-low.c: Include <stdint.h>.
10496 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10498 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10499 to the inferior here.
10500 (i386_remove_aligned_watchpoint): Ditto.
10501 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10502 fit part of the watchpoint in the debug registers.
10503 (i386_update_inferior_debug_regs): New.
10504 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10505 registers, and only update the inferior on success.
10506 (i386_low_remove_watchpoint): Ditto.
10508 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10510 * linux-low.c (compare_ints, unique, list_threads, show_process,
10511 linux_core_of_thread): Delete.
10512 (linux_target_ops): Change linux_core_of_thread to
10513 linux_common_core_of_thread.
10514 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10515 * utils.c (malloc_failure): Change type of argument.
10516 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10517 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10518 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10519 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10520 (IPA_OBJS): Add common-utils-ipa.o.
10521 (ptid_h, linux_osdata_h): New macros.
10522 (server_h): Add common/common-utils.h, common/xml-utils.h,
10523 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10525 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10526 ptid.o, buffer.o): New rules.
10527 (linux-low.o): Add common/linux-osdata.h as a dependency.
10528 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10529 * configure.ac: Add AC_HEADER_DIRENT check.
10530 * config.in: Regenerate.
10531 * configure: Regenerate.
10532 * remote-utils.c (xml_escape_text): Delete.
10533 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10534 buffer_xml_printf): Move to common/buffer.c.
10535 * server.c (main): Remove call to initialize_inferiors.
10536 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10537 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10538 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10539 internal_error, gdb_assert, gdb_assert_fail): Delete.
10540 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10541 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10543 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10544 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10545 initialize_inferiors): Delete.
10547 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10549 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10552 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10554 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10556 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10558 2011-05-26 Yao Qi <yao@codesourcery.com>
10560 * Makefile.in (thread-db.o): Track dependence to
10561 common/gdb_thread_db.h.
10562 * thread-db.c: include gdb_thread_db.h from right place.
10564 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10566 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10567 __FILE__ and __LINE__ to internal_error.
10569 2011-05-13 Doug Evans <dje@google.com>
10571 * thread-db.c (try_thread_db_load_from_sdir): New function.
10572 (try_thread_db_load_from_dir): New function.
10573 (thread_db_load_search): Handle $sdir, ignore $pdir.
10574 Remove trying of system directories if search of
10575 libthread-db-search-path fails, that is now done via $sdir.
10577 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10579 * server.c (handle_query): Add EnableDisableTracepoints to the list
10580 of supported features.
10581 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10583 (cmd_qtenable_disable): New.
10584 (cmd_qtstart): Install tracepoints even if disabled.
10585 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10586 receiving a QTEnable or QTDisable packet.
10587 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10588 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10590 (gdb_probe): Skip data collection if static tracepoint is disabled.
10592 2011-05-10 Doug Evans <dje@google.com>
10594 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10596 2011-05-04 Doug Evans <dje@google.com>
10598 * linux-low.c (linux_join): Skip process lookup.
10599 * spu-low.c (spu_join): Ditto.
10600 * server.c (join_inferiors_callback): Delete.
10601 (process_serial_event): For 'D' packet (detach) call join_inferior
10604 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10606 * README: Don't mention xscale*-*-linux*.
10607 * configure.srv (xscale*-*-linux*): Don't handle target.
10609 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10611 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10613 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10614 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10615 (i386_emit_void_call_2): Likewise.
10617 2011-04-26 Yao Qi <yao@codesourcery.com>
10619 * linux-low.c: Move common macros to linux-ptrace.h.
10620 Include linux-ptrace.h.
10621 * Makefile.in (linux_ptrace_h): New.
10622 (linux-low.o): Depends on linux-ptrace.h.
10624 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10626 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10627 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10628 (remote_prepare): New function with most of the TCP code from ...
10629 (remote_open): ... here. Detect PORT here unconditionally. Move also
10630 setting transport_is_reliable.
10631 * server.c (run_once): New variable.
10632 (gdbserver_usage): Document it.
10633 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10634 the first run if RUN_ONCE.
10635 * server.h (run_once, remote_prepare): New declarations.
10637 2011-04-19 Tom Tromey <tromey@redhat.com>
10639 * win32-low.c (handle_load_dll): Remove duplicate "the".
10641 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10643 Remove support for old Cygwin 1.5 versions.
10644 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10645 function to avoid warning.
10646 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10649 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10651 * gdbserver/server.h (Macro _): Define it if not available.
10653 2011-03-14 Michael Snyder <msnyder@vmware.com>
10655 * hostio.c (handle_close): Remove unnecessary null test.
10657 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10659 * Makefile.in (maintainer-clean realclean distclean): Remove
10660 "make ... subdir_do" command.
10662 2011-03-10 Michael Snyder <msnyder@vmware.com>
10664 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10666 * server.c (handle_v_run): Free alloced buffer on early return.
10668 2011-03-09 Yao Qi <yao@codesourcery.com>
10671 2011-03-04 Yao Qi <yao@codesourcery.com>
10673 * Makefile.in: Remove GNU make feature --directory.
10675 2011-03-05 Yao Qi <yao@codesourcery.com>
10677 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10678 (subdir_do): New make target. Copied from gdb/Makefile.
10679 (maintainer-clean, realclean, distclean, clean): Call corresponding
10680 make targets in common/Makefile.
10682 2011-02-11 Yao Qi <yao@codesourcery.com>
10684 * configure.ac: Call AC_PROG_RANLIB.
10685 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10686 * configure: Regenerate.
10688 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10690 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10692 2011-03-06 Yao Qi <yao@codesourcery.com>
10694 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10696 2011-03-05 Yao Qi <yao@codesourcery.com>
10698 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10699 (subdir_do): New make target. Copied from gdb/Makefile.
10700 (maintainer-clean, realclean, distclean, clean): Call corresponding
10701 make targets in common/Makefile.
10703 2011-03-04 Yao Qi <yao@codesourcery.com>
10705 * Makefile.in: Remove GNU make feature --directory.
10707 2011-03-04 Michael Snyder <msnyder@vmware.com>
10709 * server.c (queue_stop_reply): Call xmalloc not malloc.
10711 2011-03-02 Michael Snyder <msnyder@vmware.com>
10713 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10715 2011-02-28 Michael Snyder <msnyder@vmware.com>
10717 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10718 (cmd_qtframe): Ditto.
10719 (cmd_qtbuffer): Ditto.
10720 (cmd_bigqtbuffer): Ditto.
10722 * utils.c (decimal2str): Initialize 'width' to nine, then
10723 don't mess with it.
10725 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10727 * hostio.c (require_data): Free *data, not data.
10729 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10731 * hostio.c (require_data): Use free, not xfree.
10733 2011-02-27 Michael Snyder <msnyder@vmware.com>
10735 * server.c (handle_query): Discard unused value.
10737 * hostio.c (require_data): Free malloc memory before returning
10740 2011-02-26 Michael Snyder <msnyder@vmware.com>
10742 * linux-low.c (list_threads): Call closedir for dirent.
10744 2011-02-27 Michael Snyder <msnyder@vmware.com>
10746 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10747 a case statement falls through.
10749 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10751 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10754 2011-02-26 Michael Snyder <msnyder@vmware.com>
10756 * utils.c (decimal2str): Eliminate dead code and dead param.
10757 (pulongest): Drop dead param from call to decimal2str.
10760 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10762 Revert the following patch (not approved yet):
10763 2011-02-21 Hui Zhu <teawater@gmail.com>
10764 * tracepoint.c (tp_printf): New function.
10765 (eval_agent_expr): Handle gdb_agent_op_printf.
10767 2011-02-21 Hui Zhu <teawater@gmail.com>
10769 * tracepoint.c (tp_printf): New function.
10770 (eval_agent_expr): Handle gdb_agent_op_printf.
10772 2011-02-18 Tom Tromey <tromey@redhat.com>
10774 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10775 (tracepoint.o): Likewise.
10776 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10777 (gdb_agent_op_names): Likewise.
10779 2011-02-18 Tom Tromey <tromey@redhat.com>
10781 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10782 gdb_agent_op_rot>: New constants.
10783 (gdb_agent_op_names): Add pick and roll.
10784 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10787 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10789 * aclocal.m4: Regenerated with aclocal-1.11.1.
10791 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10793 * server.c (handle_qxfer_traceframe_info): New.
10794 (qxfer_packets): Register "traceframe-info".
10795 (handle_query): Report support for qXfer:traceframe-info:read+.
10796 * tracepoint.c (match_blocktype): New.
10797 (traceframe_find_block_type): Rename to ...
10798 (traceframe_walk_blocks): ... this. Add callback filter argument,
10800 (traceframe_find_block_type): New, reimplemented on top of
10801 traceframe_walk_blocks.
10802 (build_traceframe_info_xml): New.
10803 (traceframe_read_info): New.
10804 * server.h (traceframe_read_info): Declare.
10806 2011-02-11 Yao Qi <yao@codesourcery.com>
10808 * configure.ac: Call AC_PROG_RANLIB.
10809 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10810 * configure: Regenerate.
10812 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10814 * server.c (gdb_read_memory): Change return semantics to allow
10816 (handle_search_memory_1): Adjust.
10817 (process_serial_event) <'m' packet>: Handle partial transfers.
10818 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10820 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10822 * regcache.c (init_register_cache): Initialize
10823 regcache->register_status.
10824 (free_register_cache): Release regcache->register_status.
10825 (regcache_cpy): Copy register_status.
10826 (registers_to_string): Print 'x's for unavailable registers.
10827 (supply_register): Mark the register's status valid or
10828 unavailable, depending on whether a buffer was passed in or not.
10829 (supply_register_zeroed): New.
10830 (supply_regblock): Mark the registers' status valid or
10831 unavailable, depending on whether a buffer was passed in or not.
10832 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10833 (struct regcache): New `register_status' field.
10834 (supply_register_zeroed): Declare.
10835 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10836 supply_register_zeroed, rather than passing a NULL buffer to
10838 * tracepoint.c (fetch_traceframe_registers): Update comment.
10840 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10842 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10845 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10847 * server.h (decode_xfer_write): Change prototype.
10848 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10849 and don't extract the annex here.
10850 * server.c (decode_xfer_read): Remove `annex' parameter,
10851 and don't extract the annex here.
10852 (decode_xfer): New.
10853 (struct qxfer): New.
10854 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10855 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10856 (handle_qxfer_statictrace): New functions, abstracted out from
10857 handle_query, and made to use the struct qxfer interface.
10858 (handle_threads_qxfer_proper): Rename to ...
10859 (handle_qxfer_threads_proper): ... this.
10860 (handle_threads_qxfer): Rename to ...
10861 (handle_qxfer_threads): ... this. Adjust.
10862 (qxfer_packets): New array.
10863 (handle_qxfer): New function.
10864 (handle_query): Use handle_qxfer.
10866 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10868 * gdbreplay.c: Shorten lines of >= 80 columns.
10869 * linux-low.c: Ditto.
10870 * linux-ppc-low.c: Ditto.
10871 * linux-s390-low.c: Ditto.
10872 * linux-sparc-low.c: Ditto.
10873 * linux-x86-low.c: Ditto.
10874 * linux-xtensa-low.c: Ditto.
10875 * mem-break.c: Ditto.
10876 * nto-low.c: Ditto.
10877 * regcache.h: Ditto.
10878 * remote-utils.c: Ditto.
10881 * thread-db.c: Ditto.
10882 * tracepoint.c: Ditto.
10884 * win32-low.h: Ditto.
10886 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10888 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10891 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10893 * server.c (gdbserver_version): Update copyright year in version
10895 * gdbreplay.c (gdbreplay_version): Ditto.
10897 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10899 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10900 * linux-bfin-low.c: New file.
10901 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10902 PT_DATA_ADDR for BFIN targets.
10903 * Makefile.in (SFILES): Add linux-bfin-low.c.
10904 (clean): Remove reg-bfin.c.
10905 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10906 * README: Mention supported Blackfin targets.
10908 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10910 * .gitignore: New file.
10912 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10914 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10916 2010-10-22 Jie Zhang <jie@codesourcery.com>
10918 * Makefile.in: Add FLAGS_TO_PASS variable.
10919 (install): Remove dependency of install-only and recursively
10920 invoke make for install-only.
10922 2010-10-04 Doug Evans <dje@google.com>
10924 * Makefile.in (uninstall): Use $(DESTDIR).
10926 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10930 * linux-x86-low.c (compat_siginfo_from_siginfo)
10931 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10932 si_code is < 0. Check for si_code == SI_TIMER before checking for
10935 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10937 * lynx-i386-low.c: New file.
10938 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10940 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10942 * lynx-low.c (ptrace_request_to_str): Remove handling for
10943 request values that have been removed in LynxOS 5.x.
10945 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10947 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10950 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10952 * configure.ac: Add --enable-inprocess-agent option.
10953 * configure: Rebuilt.
10955 2010-09-06 Yao Qi <yao@codesourcery.com>
10957 * linux-low.c (linux_kill): Remove unused variable.
10958 (linux_stabilize_threads): Likewise.
10959 * server.c (start_inferior): Likewise.
10960 (queue_stop_reply_callback): Likewise.
10961 * tracepoint.c (do_action_at_tracepoint): Likewise.
10963 2010-09-06 Yao Qi <yao@codesourcery.com>
10965 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10968 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10970 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10972 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10974 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10977 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10979 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10980 gdbserver/lynx-ppc-low.c: New files.
10981 * Makefile.in (lynx_low_h): New variable.
10982 (lynx-low.o, lynx-ppc-low.o): New rules.
10983 * configure.ac: On LynxOS, link with -lnetinet.
10984 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10985 * configure: regenerate.
10987 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10989 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10990 * configure.ac: Add check for vasprintf and vsnprintf.
10991 * configure, config.in: Regenerate.
10992 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10994 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10996 * gdbreplay.c: Move include of alloca.h up, next to include of
10998 * server.h: Add include of malloc.h.
10999 * mem-break.c: Remove include of malloc.h.
11000 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11002 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11004 * Makefile.in (memmem.o): Build with -Wno-error.
11006 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11008 * utils.c (xsnprintf): Make non-static.
11009 * server.h: Add xsnprintf declaration.
11010 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11011 replace calls to snprintf by calls to xsnprintf throughout.
11013 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11015 * configure.ac: Add configure check for alloca.
11016 * configure, config.in: Regenerate.
11017 * server.h: Include alloca.h if it exists.
11018 * gdbreplay.c: Include alloca.h if it exists.
11020 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11022 * linux-low.c (__SIGRTMIN): Define if not already defined.
11023 (linux_create_inferior): Check for __ANDROID__ rather than
11025 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11026 are already deferred.
11027 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11028 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11029 stopped and already has a pending signal to report.
11030 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11031 a pending signal to report or is moving out of a jump pad.
11032 (linux_init_signals): Check for __ANDROID__ rather than
11035 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11037 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11038 debug_threads check. Avoid a linear search when not doing debug
11041 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11043 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11044 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11045 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11046 (process_event): Change local fd's type to gdb_fildes_t.
11047 (create_file_handler): Adjust prototype.
11048 (delete_file_handler): Adjust prototype.
11049 (handle_file_event): Adjust prototype. Use pfildes.
11050 (create_file_event): Adjsut prototype.
11051 * remote-utils.c (remote_desc, listen_desc): Change type to
11053 * server.h: New gdb_fildes_t typedef.
11054 [USE_WIN32API]: Include winsock2.h.
11055 (delete_file_handler, add_file_handler): Adjust prototypes.
11056 (pfildes): Declare.
11057 * utils.c (pfildes): New.
11059 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11061 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11062 * configure: Regenerate.
11064 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11066 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11067 (linux_done_accessing_memory): ... this.
11068 (linux_target_ops): Adjust.
11069 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11070 * nto-low.c (nto_target_ops): Adjust comment.
11071 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11072 * spu-low.c (spu_target_ops): Adjust comment.
11073 * target.h (target_ops): Rename unprepare_to_access_memory field
11074 to done_accessing_memory.
11075 (unprepare_to_access_memory): Rename to ...
11076 (done_accessing_memory): ... this.
11078 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11080 * linux-low.c (linux_prepare_to_access_memory): New.
11081 (linux_unprepare_to_access_memory): New.
11082 (linux_target_ops): Install them.
11083 * server.c (read_memory): Rename to ...
11084 (gdb_read_memory): ... this. Use
11085 prepare_to_access_memory/prepare_to_access_memory.
11086 (write_memory): Rename to ...
11087 (gdb_write_memory): ... this. Use
11088 prepare_to_access_memory/prepare_to_access_memory.
11089 (handle_search_memory_1): Adjust.
11090 (process_serial_event): Adjust.
11091 * target.h (struct target_ops): New fields
11092 prepare_to_access_memory and unprepare_to_access_memory.
11093 (prepare_to_access_memory, unprepare_to_access_memory): New.
11094 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11095 prepare_to_access_memory/prepare_to_access_memory.
11096 * nto-low.c (nto_target_ops): Adjust.
11097 * spu-low.c (spu_target_ops): Adjust.
11098 * win32-low.c (win32_target_ops): Adjust.
11100 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11102 * Makefile.in (WARN_CFLAGS): Get it from configure.
11103 (WERROR_CFLAGS): New.
11104 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11105 * configure.ac: Introduce --enable-werror, which adds -Werror to
11106 the compiler command line. Enabled by default. Disable with
11107 --disable-werror. Add -Wdeclaration-after-statement
11108 Wpointer-arith and -Wformat-nonliteral to warning flags.
11109 * configure: Regenerate.
11111 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11113 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11115 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11117 * gdbreplay.c (remote_error): New.
11119 (expect): Use gdbchar. Check for error reading from GDB.
11120 Clarify sync error output.
11121 (play): Check for errors writing to GDB.
11122 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11123 * remote-utils.c (getpkt): Check for errors writing to the remote
11126 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11128 * linux-low.c (linux_wait_1): Move non-debugging code out of
11129 `debug_threads' control.
11131 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11133 * linux-low.c (linux_wait_1): Don't set last_status here.
11134 * server.c (push_event, queue_stop_reply_callback): Assert we're
11135 not pushing a TARGET_WAITKIND_IGNORE event.
11136 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11137 (myresume, handle_target_event): Set the thread's last_resume_kind
11138 and last_status from the target returned status.
11140 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11144 * linux-x86-low.c (update_debug_registers_callback): New.
11145 (i386_dr_low_set_addr): Use it.
11146 (i386_dr_low_get_addr): New.
11147 (i386_dr_low_set_control): Use update_debug_registers_callback.
11148 (i386_dr_low_get_control): New.
11149 (i386_dr_low_get_status): Adjust.
11150 * linux-low.c (linux_stop_lwp): New.
11151 * linux-low.h (linux_stop_lwp): Declare.
11153 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11154 argument instead of a i386_debug_reg_state.
11155 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11156 a i386_debug_reg_state.
11157 (i386_insert_aligned_watchpoint): Adjust.
11158 (i386_remove_aligned_watchpoint): Adjust.
11159 (i386_low_stopped_data_address): Read the debug registers from the
11160 inferior instead of from the mirrors.
11161 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11162 (i386_dr_low_get_addr): Declare.
11163 (i386_dr_low_get_control): Declare.
11164 (i386_dr_low_get_status): Change prototype.
11166 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11167 (i386_dr_low_get_addr): New.
11168 (i386_dr_low_get_control): New.
11169 (i386_dr_low_get_status): Adjust prototype. Return
11171 (i386_initial_stuff): Clear dr_status_mirror and
11173 (i386_get_thread_context): Adjust.
11174 (i386_set_thread_context): Adjust.
11175 (i386_thread_added): Adjust.
11177 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11179 * linux-low.h (linux_thread_area): Delete declaration.
11181 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11183 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11184 after its termination.
11186 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11188 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11189 (gdb_wants_all_stopped): Delete.
11190 (linux_wait_1): Don't call them.
11191 * server.c (handle_v_cont): Tag all threads as want-stopped.
11192 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11193 stopped as "client-wants-stopped".
11195 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11197 * Makefile.in (signals_h): New.
11198 (server_h): Depend on it.
11199 (server.o): Don't depend on $(signals_def).
11200 (signals.o): Depend on $(signals_def).
11202 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11204 * Makefile.in (signals_def): New.
11205 (server_h): Append include/gdb/signals.h and signals_def.
11206 (server.o): Append signals_def.
11208 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11210 * server.c (handle_target_event): Use target_signal_to_host for
11211 resume_info.sig initialization.
11212 * target.h (struct thread_resume) <sig>: New comment.
11214 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11216 * server.c (handle_query): strcpy() the returned string from paddress()
11217 instead of sprintf().
11218 * utils.c (paddress): Return phex_nz().
11220 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11222 * server.c (handle_v_cont): Call mourn_inferior if process
11224 (myresume): Likewise.
11226 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11228 Static tracepoints, and integration with UST.
11230 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11231 * mem-break.c (uninsert_all_breakpoints)
11232 (reinsert_all_breakpoints): New.
11233 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11234 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11235 (gdb_agent_ust_loaded, helper_thread_id)
11236 (gdb_agent_helper_thread_id): New macros.
11237 (struct ipa_sym_addresses): Add addr_ust_loaded,
11238 addr_helper_thread_id, addr_cmd_buf.
11239 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11240 (in_process_agent_loaded_ust): New.
11241 (write_e_ust_not_loaded): New.
11242 (maybe_write_ipa_ust_not_loaded): New.
11243 (struct collect_static_trace_data_action): New.
11244 (enum tracepoint_type) <static_tracepoint>: New.
11245 (struct tracepoint) <handle>: Mention static tracepoints.
11246 (struct static_tracepoint_ctx): New.
11247 (CMD_BUF_SIZE): New.
11248 (add_tracepoint_action): Handle static tracepoint actions.
11249 (unprobe_marker_at): New.
11250 (clear_installed_tracepoints): Handle static tracepoints.
11251 (cmd_qtdp): Handle static tracepoints.
11252 (probe_marker_at): New.
11253 (cmd_qtstart): Handle static tracepoints.
11254 (response_tracepoint): Handle static tracepoints.
11255 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11256 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11257 (get_context_regcache): Handle static tracepoints.
11258 (do_action_at_tracepoint): Handle static tracepoint actions.
11259 (traceframe_find_block_type): Handle static trace data blocks.
11260 (traceframe_read_sdata): New.
11261 (download_tracepoints): Download static tracepoint actions.
11262 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11263 (GDB_PROBE_NAME): New.
11265 (GET_UST_SYM): New.
11268 (ust_marker_to_static_tracepoint): New.
11270 (collect_ust_data_at_tracepoint): New.
11271 (gdb_ust_probe): New.
11272 (UNIX_PATH_MAX, SOCK_DIR): New.
11273 (gdb_ust_connect_sync_socket): New.
11274 (resume_thread, stop_thread): New.
11275 (run_inferior_command): New.
11276 (init_named_socket): New.
11277 (gdb_ust_socket_init): New.
11278 (cstr_to_hexstr): New.
11280 (first_marker, next_marker): New.
11281 (response_ust_marker): New.
11282 (cmd_qtfstm, cmd_qtsstm): New.
11283 (unprobe_marker_at, probe_marker_at): New.
11284 (cmd_qtstmat, gdb_ust_thread): New.
11285 (gdb_ust_init): New.
11286 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11287 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11288 (ST_REGENTRY): New.
11289 (x86_64_st_collect_regmap): New.
11290 (X86_64_NUM_ST_COLLECT_GREGS): New.
11291 (AMD64_RIP_REGNUM): New.
11292 (supply_static_tracepoint_registers): New.
11293 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11294 (ST_REGENTRY): New.
11295 (i386_st_collect_regmap): New.
11296 (i386_NUM_ST_COLLECT_GREGS): New.
11297 (supply_static_tracepoint_registers): New.
11298 * server.c (handle_query): Handle qXfer:statictrace:read.
11299 <qSupported>: Report support for StaticTracepoints, and
11300 qXfer:statictrace:read features.
11301 * server.h (traceframe_read_sdata)
11302 (supply_static_tracepoint_registers): Declare.
11303 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11304 (unpack_varlen_hex): Include in IPA build.
11305 * Makefile.in (ustlibs, ustinc): New.
11306 (IPA_OBJS): Add remote-utils-ipa.o.
11307 ($(IPA_LIB)): Link -ldl and -lpthread.
11309 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11310 * config.in, configure: Regenerate.
11312 2010-06-20 Ian Lance Taylor <iant@google.com>
11313 Pedro Alves <pedro@codesourcery.com>
11315 * linux-x86-low.c (always_true): Delete.
11316 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11317 trying to fool the compiler with always_true.
11319 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11321 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11322 conditions in gdbserver.
11324 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11326 * spu-low.c (spu_read_memory): Wrap around local store limit.
11327 (spu_write_memory): Likewise.
11329 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11331 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11332 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11334 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11336 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11337 uses with LONGEST uses.
11339 2010-06-14 Stan Shebs <stan@codesourcery.com>
11340 Pedro Alves <pedro@codesourcery.com>
11344 * linux-x86-low.c: Include limits.h.
11346 (always_true): New.
11349 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11350 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11351 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11352 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11353 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11354 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11355 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11356 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11357 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11358 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11359 (amd64_emit_void_call_2): New.
11360 (amd64_emit_ops): New.
11361 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11362 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11363 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11364 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11365 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11366 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11367 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11368 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11369 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11370 (i386_emit_stack_adjust, i386_emit_int_call_1)
11371 (i386_emit_void_call_2): New.
11372 (i386_emit_ops): New.
11373 (x86_emit_ops): New.
11374 (the_low_target): Install x86_emit_ops.
11375 * server.h (struct emit_ops): New.
11376 (get_raw_reg_func_addr): Declare.
11377 (current_insn_ptr, emit_error): Declare.
11378 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11379 (set_trace_state_variable_value): New defines.
11380 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11381 addr_get_trace_state_variable_value and
11382 addr_set_trace_state_variable_value.
11383 (symbol_list): New fields for get_raw_reg,
11384 get_trace_state_variable_value and set_trace_state_variable_value.
11385 (condfn): New typedef.
11386 (struct tracepoint): New field `compiled_cond'.
11387 (do_action_at_tracepoint): Clear compiled_cond.
11388 (get_trace_state_variable_value, set_trace_state_variable_value):
11390 (condition_true_at_tracepoint): If there's a compiled condition,
11392 (current_insn_ptr, emit_error): New globals.
11393 (struct bytecode_address): New.
11394 (get_raw_reg_func_addr): New.
11395 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11396 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11397 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11398 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11399 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11400 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11401 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11402 (compile_tracepoint_condition, compile_bytecodes): New.
11403 * target.h (emit_ops): Forward declare.
11404 (struct target_ops): New field emit_ops.
11405 (target_emit_ops): New.
11406 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11407 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11408 * linux-low.c (linux_emit_ops): New.
11409 (linux_target_ops): Install it.
11410 * linux-low.h (struct linux_target_ops): New field emit_ops.
11412 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11414 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11415 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11417 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11418 Stan Shebs <stan@codesourcery.com>
11420 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11421 (all): Depend on $(extra_libraries).
11422 (install-only): Install the IPA.
11423 (IPA_OBJS, IPA_LIB): New.
11424 (clean): Remove the IPA lib.
11425 (IPAGENT_CFLAGS): New.
11426 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11427 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11428 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11429 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11430 * configure.ac: Check for atomic builtins support in the compiler.
11431 (IPA_DEPFILES, extra_libraries): Define.
11432 * configure.srv (ipa_obj): Add description.
11433 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11434 (i[34567]86-*-linux*): Set ipa_obj.
11435 (x86_64-*-linux*): Set ipa_obj.
11436 * linux-low.c (stabilizing_threads): New.
11437 (supports_fast_tracepoints): New.
11438 (linux_detach): Stabilize threads before detaching.
11439 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11440 the lwp is either not stabilizing, or is moving out of a jump pad.
11441 (linux_fast_tracepoint_collecting): New.
11442 (maybe_move_out_of_jump_pad): New.
11443 (enqueue_one_deferred_signal): New.
11444 (dequeue_one_deferred_signal): New.
11445 (linux_wait_for_event_1): If moving out of a jump pad, defer
11446 pending signals to later.
11447 (linux_stabilize_threads): New.
11448 (linux_wait_1): Check if threads need moving out of jump pads, and
11450 (stuck_in_jump_pad_callback): New.
11451 (move_out_of_jump_pad_callback): New.
11452 (lwp_running): New.
11453 (linux_resume_one_lwp): Handle moving out of jump pads.
11454 (linux_set_resume_request): Dequeue deferred signals.
11455 (need_step_over_p): Also step over fast tracepoint jumps.
11456 (start_step_over): Also uninsert fast tracepoint jumps.
11457 (finish_step_over): Also reinsert fast tracepoint jumps.
11458 (linux_install_fast_tracepoint_jump): New.
11459 (linux_target_ops): Install linux_stabilize_threads and
11460 linux_install_fast_tracepoint_jump_pad.
11461 * linux-low.h (linux_target_ops) <get_thread_area,
11462 install_fast_tracepoint_jump_pad>: New fields.
11463 (struct lwp_info) <collecting_fast_tracepoint,
11464 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11465 (linux_get_thread_area): Declare.
11466 * linux-x86-low.c (jump_insn): New.
11467 (x86_get_thread_area): New.
11468 (append_insns): New.
11469 (push_opcode): New.
11470 (amd64_install_fast_tracepoint_jump_pad): New.
11471 (i386_install_fast_tracepoint_jump_pad): New.
11472 (x86_install_fast_tracepoint_jump_pad): New.
11473 (the_low_target): Install x86_get_thread_area and
11474 x86_install_fast_tracepoint_jump_pad.
11475 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11476 (struct fast_tracepoint_jump): New.
11477 (fast_tracepoint_jump_insn): New.
11478 (fast_tracepoint_jump_shadow): New.
11479 (find_fast_tracepoint_jump_at): New.
11480 (fast_tracepoint_jump_here): New.
11481 (delete_fast_tracepoint_jump): New.
11482 (set_fast_tracepoint_jump): New.
11483 (uninsert_fast_tracepoint_jumps_at): New.
11484 (reinsert_fast_tracepoint_jumps_at): New.
11485 (set_breakpoint_at): Use write_inferior_memory.
11486 (uninsert_raw_breakpoint): Use write_inferior_memory.
11487 (check_mem_read): Mask out fast tracepoint jumps.
11488 (check_mem_write): Mask out fast tracepoint jumps.
11489 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11490 (set_fast_tracepoint_jump): Declare.
11491 (delete_fast_tracepoint_jump)
11492 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11493 (reinsert_fast_tracepoint_jumps_at): Declare.
11494 * regcache.c: Don't compile many functions when building the
11495 in-process agent library.
11496 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11497 the register buffer in the heap.
11498 (free_register_cache): If the register buffer isn't owned by the
11499 regcache, don't free it.
11500 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11501 pre-existing register caches.
11502 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11504 (convert_ascii_to_int): : Constify `from' parameter type.
11505 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11506 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11507 the needed buffer in-place.
11508 (relocate_instruction): New.
11509 * server.c (handle_query) <qSymbols>: If the target supports
11510 tracepoints, give it a chance of looking up symbols. Report
11511 support for fast tracepoints.
11512 (handle_status): Stabilize threads.
11513 (process_serial_event): Adjust.
11514 * server.h (struct fast_tracepoint_jump): Forward declare.
11515 (struct process_info) <fast_tracepoint_jumps>: New field.
11516 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11517 (decode_X_packet, decode_M_packet): Adjust.
11518 (relocate_instruction): Declare.
11519 (in_process_agent_loaded): Declare.
11520 (tracepoint_look_up_symbols): Declare.
11521 (struct fast_tpoint_collect_status): Declare.
11522 (fast_tracepoint_collecting): Declare.
11523 (force_unlock_trace_buffer): Declare.
11524 (handle_tracepoint_bkpts): Declare.
11525 (initialize_low_tracepoint)
11526 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11527 * target.h (struct target_ops) <stabilize_threads,
11528 install_fast_tracepoint_jump_pad>: New fields.
11529 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11530 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11531 [HAVE_STDINT_H]: Include stdint.h.
11532 (trace_debug_1): Rename to ...
11533 (trace_vdebug): ... this.
11534 (trace_debug): Rename to ...
11535 (trace_debug_1): ... this. Add `level' parameter.
11536 (trace_debug): New.
11537 (ATTR_USED, ATTR_NOINLINE): New.
11538 (IP_AGENT_EXPORT): New.
11539 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11540 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11541 (about_to_request_buffer_space, trace_buffer_is_full)
11542 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11543 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11544 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11545 (traceframe_write_count, traceframes_created)
11546 (trace_state_variables)
11547 New renaming defines.
11548 (struct ipa_sym_addresses): New.
11549 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11550 (symbol_list): New.
11551 (ipa_sym_addrs): New.
11552 (all_tracepoint_symbols_looked_up): New.
11553 (in_process_agent_loaded): New.
11554 (write_e_ipa_not_loaded): New.
11555 (maybe_write_ipa_not_loaded): New.
11556 (tracepoint_look_up_symbols): New.
11557 (debug_threads) [IN_PROCESS_AGENT]: New.
11558 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11559 (UNKNOWN_SIDE_EFFECTS): New.
11560 (stop_tracing): New.
11561 (flush_trace_buffer): New.
11562 (stop_tracing_bkpt): New.
11563 (flush_trace_buffer_bkpt): New.
11564 (read_inferior_integer): New.
11565 (read_inferior_uinteger): New.
11566 (read_inferior_data_pointer): New.
11567 (write_inferior_data_pointer): New.
11568 (write_inferior_integer): New.
11569 (write_inferior_uinteger): New.
11570 (struct collect_static_trace_data_action): Delete.
11571 (enum tracepoint_type): New.
11572 (struct tracepoint) <type>: New field `type'.
11573 <actions_str, step_actions, step_actions_str>: Only include in
11575 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11576 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11577 (tracepoints): Use IP_AGENT_EXPORT.
11578 (last_tracepoint): Don't include in the IPA.
11579 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11580 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11581 (alloced_trace_state_variables): New.
11582 (trace_state_variables): Use IP_AGENT_EXPORT.
11583 (traceframe_t): Delete unused variable.
11584 (circular_trace_buffer): Don't include in the IPA.
11585 (trace_buffer_start): Delete.
11586 (struct trace_buffer_control): New.
11587 (trace_buffer_free): Delete.
11588 (struct ipa_trace_buffer_control): New.
11589 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11590 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11592 (trace_buffer_ctrl): New.
11593 (TRACE_BUFFER_CTRL_CURR): New.
11594 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11595 Reimplement as macros.
11596 (trace_buffer_wrap): Delete.
11597 (traceframe_write_count, traceframe_read_count)
11598 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11599 (struct tracepoint_hit_ctx) <type>: New field.
11600 (struct fast_tracepoint_ctx): New.
11601 (memory_barrier): New.
11603 (record_tracepoint_error): Update atomically in the IPA.
11604 (clear_inferior_trace_buffer): New.
11605 (about_to_request_buffer_space): New.
11606 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11607 updating the same buffer.
11608 (add_tracepoint): Default the tracepoint's type to trap
11609 tracepoint, and orig_size to -1.
11610 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11611 internal variables.
11612 (create_trace_state_variable): New parameter `gdb'. Handle it.
11613 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11614 (cmd_qtdp): Handle fast tracepoints.
11615 (cmd_qtdv): Adjust.
11616 (max_jump_pad_size): New.
11617 (gdb_jump_pad_head): New.
11618 (get_jump_space_head): New.
11619 (claim_jump_space): New.
11620 (sort_tracepoints): New.
11621 (MAX_JUMP_SIZE): New.
11622 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11624 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11625 support. Upload fast traceframes, and delete internal IPA
11627 (stop_tracing_handler): New.
11628 (flush_trace_buffer_handler): New.
11629 (cmd_qtstop): Upload fast tracepoints.
11630 (response_tracepoint): Handle fast tracepoints.
11631 (tracepoint_finished_step): Upload fast traceframes. Set the
11632 tracepoint hit context's tracepoint type.
11633 (handle_tracepoint_bkpts): New.
11634 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11635 type. Add comment about fast tracepoints.
11636 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11637 non-existing action_str field.
11638 (get_context_regcache): Handle fast tracepoints.
11639 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11641 (fast_tracepoint_from_jump_pad_address): New.
11642 (fast_tracepoint_from_ipa_tpoint_address): New.
11643 (collecting_t): New.
11644 (force_unlock_trace_buffer): New.
11645 (fast_tracepoint_collecting): New.
11647 (gdb_collect): New.
11648 (write_inferior_data_ptr): New.
11649 (target_tp_heap): New.
11650 (target_malloc): New.
11651 (download_agent_expr): New.
11653 (download_tracepoints): New.
11654 (download_trace_state_variables): New.
11655 (upload_fast_traceframes): New.
11656 (IPA_FIRST_TRACEFRAME): New.
11657 (IPA_NEXT_TRACEFRAME_1): New.
11658 (IPA_NEXT_TRACEFRAME): New.
11659 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11660 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11661 (gdb_jump_pad_buffer_end): New.
11662 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11663 (initialize_tracepoint): Adjust.
11664 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11665 buffer. Initialize the low module.
11666 * utils.c (PREFIX, TOOLNAME): New.
11667 (malloc_failure): Use PREFIX.
11668 (error): In the IPA, an error causes an exit.
11669 (fatal, warning): Use PREFIX.
11670 (internal_error): Use TOOLNAME.
11671 (NUMCELLS): Increase to 10.
11672 * configure, config.in: Regenerate.
11674 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11676 * server.c (handle_query) <qSupported>: Do two passes over the
11677 qSupported string to avoid nesting strtok.
11679 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11681 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11683 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11684 -Wl,--dynamic-list.
11685 * configure: Regenerate.
11686 * proc-service.list: New.
11688 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11690 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11693 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11695 * gdbreplay.c (remote_open): Check error return from socket() call by
11696 its equality to -1 not by it being negative.
11697 * remote-utils.c (remote_open): Likewise.
11699 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11701 * config.h: Regenerate.
11703 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11705 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11706 doesn't provide PTRACE_GET_THREAD_AREA.
11708 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11710 * linux-m68k-low.c: Include <asm/ptrace.h>
11711 (ps_get_thread_area): Implement.
11713 2010-05-03 Doug Evans <dje@google.com>
11715 * event-loop.c (struct callback_event): New struct.
11716 (callback_list): New global.
11717 (append_callback_event, delete_callback_event): New functions.
11718 (process_callback): New function.
11719 (start_event_loop): Call it.
11720 * remote-utils.c (NOT_SCHEDULED): Define.
11721 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11722 moved out of readchar.
11723 (readchar): Rewrite. Call reschedule before returning.
11724 (reset_readchar): New function.
11725 (remote_close): Call it.
11726 (process_remaining, reschedule): New functions.
11727 * server.h (callback_handler_func): New typedef.
11728 (append_callback_event, delete_callback_event): Declare.
11730 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11732 * proc-service.c (ps_pglobal_lookup): Use
11733 thread_db_look_up_one_symbol.
11734 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11735 parameter. Use it instead of all_symbols_looked_up.
11736 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11738 (all_symbols_looked_up): Don't declare.
11739 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11740 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11742 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11743 Set all_symbols_looked_up here.
11744 (thread_db_look_up_one_symbol): New.
11745 (thread_db_get_tls_address): Adjust.
11746 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11747 thread_db object on the heap, and tentatively set it in the
11749 (thread_db_init): Don't set all_symbols_looked_up here.
11750 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11752 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11754 * linux-low.c (linux_kill, linux_detach): Adjust.
11755 (status_pending_p_callback): Remove redundant statement. Check
11756 for !TARGET_WAITIKIND_IGNORE, instead of
11757 TARGET_WAITKIND_STOPPED.
11758 (handle_tracepoints): Make sure LWP is locked. Adjust.
11759 (linux_wait_for_event_1): Adjust.
11760 (linux_cancel_breakpoints): New.
11761 (unsuspend_one_lwp): New.
11762 (unsuspend_all_lwps): New.
11763 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11764 (send_sigstop_callback): Change return type to int, add new
11765 `except' parameter and handle it.
11766 (suspend_and_send_sigstop_callback): New.
11767 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11768 pass them down. If SUSPEND, also increment the lwp's suspend
11770 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11771 (need_step_over_p): Don't consider suspended LWPs.
11772 (start_step_over): Adjust.
11773 (proceed_one_lwp): Change return type to int, add new `except'
11774 parameter and handle it.
11775 (unsuspend_and_proceed_one_lwp): New.
11776 (proceed_all_lwps): Use find_inferior instead of
11778 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11779 also decrement the suspend count of LWPs. Pass `except' down,
11780 instead of hacking its suspend count.
11781 (linux_pause_all): Add `freeze' parameter. Adjust.
11782 (linux_unpause_all): New.
11783 (linux_target_ops): Install linux_unpause_all.
11784 * server.c (handle_status): Adjust.
11785 * target.h (struct target_ops): New fields `unpause_all' and
11786 `cancel_breakpoints'. Add new parameter to `pause_all'.
11787 (pause_all): Add new `freeze' parameter.
11788 (unpause_all): New.
11789 (cancel_breakpoints): New.
11790 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11791 cancel breakpoints.
11792 (cmd_qtstart): Pause threads.
11793 (stop_tracing): Pause threads, and cancel breakpoints.
11794 * win32-low.c (win32_target_ops): Adjust.
11796 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11798 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11799 the inferior right away from here...
11800 (linux_wait_1): ... to here, and adjust to check the thread's
11801 last_resume_kind instead of the lwp's step or stop_expected flags.
11803 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11805 * README: Use consistent `GDB' and `GDBserver' spellings.
11807 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11809 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11810 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11811 (linux_detach_one_lwp): Assume the lwp is stopped.
11812 (any_thread_of): Delete.
11813 (linux_detach): Stop all lwps here. Don't blindly delete all
11815 (delete_lwp_callback): New.
11816 (linux_mourn): Delete all lwps of the process that is gone.
11817 (linux_wait_1): Don't delete the last lwp of the process here.
11818 * mem-break.h (mark_breakpoints_out): Declare.
11819 * mem-break.c (mark_breakpoints_out): New.
11820 (free_all_breakpoints): Use it.
11821 * server.c (handle_target_event): If the process is gone, mark
11823 * thread-db.c (struct thread_db) <create_bp>: New field.
11824 (thread_db_enable_reporting): Fix prototype. Store a thread event
11825 breakpoint reference in the thread_db struct.
11826 (thread_db_load_search): Clear the thread_db object.
11827 (try_thread_db_load_1): Ditto.
11828 (switch_to_process): New.
11829 (disable_thread_event_reporting): Use it.
11830 (remove_thread_event_breakpoints): New.
11831 (thread_db_detach, thread_db_mourn): Use it.
11833 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11835 * linux-low.c (linux_enable_event_reporting): New.
11836 (linux_wait_for_event_1, handle_extended_wait): Use it.
11838 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11840 * linux-low.c (linux_kill_one_lwp, linux_kill)
11841 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11842 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11843 SIGSTOP even if the LWP is stopped.
11844 (send_sigstop_callback): New.
11845 (stop_all_lwps): Use send_sigstop_callback instead.
11846 (linux_resume_one_thread): Adjust.
11847 (proceed_one_lwp): Still proceed an LWP that the client has
11848 requested to stop, if we haven't reported it as stopped yet. Make
11849 sure that LWPs the client want stopped, have a pending SIGSTOP.
11851 2010-04-26 Doug Evans <dje@google.com>
11853 * server.c (handle_general_set): Make static.
11855 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11856 Print received char after testing for error/eof instead of before.
11857 (input_interrupt): Tweak comment.
11859 2010-04-23 Doug Evans <dje@google.com>
11861 * server.c (start_inferior): Print inferior argv if --debug.
11863 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11865 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11866 * nto-x86-low.c: Include server.h
11868 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11870 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11871 be consistent with other sources of this directory.
11872 (init_registers_amd64): Correct name of source file of this function
11875 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11877 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11878 64-bit executables.
11880 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11882 * win32-i386-low.c: Add 64-bit support.
11883 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11884 (init_registers_amd64): Declare.
11885 (mappings): Add 64-bit version of array.
11886 (init_windows_x86): New function.
11887 (the_low_target): Change init_arch field to init_windows_x86.
11889 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11891 * win32-low.c: Adapt to support also 64-bit architecture.
11892 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11893 (get_image_name): Use SIZE_T type for local variable `done'.
11894 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11895 (toolhelp_get_dll_name): Idem.
11896 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11897 Use uintptr_t typecast to avoid warning.
11898 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11899 (handle_exception): Use phex_nz to avoid warning.
11900 (win32_wait): Remove unused local variable `process'.
11902 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11904 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11907 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11909 * configure.ac: Use `ws2_32' library for srv_mingw.
11910 * configure: Regenerate.
11911 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11912 * remote-utils.c: Likewise.
11914 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11916 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11917 if __x86_64__ is defined.
11919 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11921 * configure: Regenerate.
11923 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11925 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11926 * target.h (target_ops): New get_tib_address field.
11927 * win32-low.h (win32_thread_info): Add thread_local_base field.
11928 * win32-low.c (child_add_thread): Add tlb argument.
11929 Set thread_local_base field to TLB.
11930 (get_child_debug_event): Adapt to child_add_thread change.
11931 (win32_get_tib_address): New function.
11932 (win32_target_ops): Set get_tib_address field to
11933 win32_get_tib_address.
11934 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11936 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11938 * linux-low.c (linux_mourn): Also remove the process.
11939 * server.c (handle_target_event): Don't remove the process here.
11940 * nto-low.c (nto_mourn): New.
11941 (nto_target_ops): Install it.
11942 * spu-low.c (spu_mourn): New.
11943 (spu_target_ops): Install it.
11944 * win32-low.c (win32_mourn): New.
11945 (win32_target_ops): Install it.
11947 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11949 * server.h (buffer_xml_printf): Remove redundant `;'.
11951 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11953 * regcache.c (set_register_cache): Invalidate regcaches before
11954 changing the register cache layout.
11955 (regcache_invalidate_one): Allow a NULL regcache.
11956 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11957 regcaches before changing the register cache layout or the target
11960 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11962 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11963 variable warning on Linux/x86-64.
11965 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11967 GDBserver disconnected tracing support.
11969 * linux-low.c (linux_remove_process): Delete.
11970 (add_lwp): Don't set last_resume_kind here.
11971 (linux_kill): Use `mourn'.
11972 (linux_detach): Use `thread_db_detach', and `mourn'.
11973 (linux_mourn): New.
11974 (linux_attach_lwp_1): Adjust comment.
11975 (linux_attach): last_resume_kind moved the thread_info; adjust.
11976 (status_pending_p_callback): Adjust.
11977 (linux_wait_for_event_1): Adjust.
11978 (count_events_callback, select_singlestep_lwp_callback)
11979 (select_event_lwp_callback, cancel_breakpoints_callback)
11980 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11981 (proceed_one_lwp): Adjust.
11982 (linux_async): Add debug output.
11983 (linux_thread_stopped): New.
11984 (linux_pause_all): New.
11985 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11987 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11988 (thread_db_free): Delete declaration.
11989 (thread_db_detach, thread_db_mourn): Declare.
11990 * thread-db.c (thread_db_init): Use thread_db_mourn.
11991 (thread_db_free): Delete, split in two.
11992 (disable_thread_event_reporting): New.
11993 (thread_db_detach): New.
11994 (thread_db_mourn): New.
11996 * server.h (struct thread_info) <last_resume_kind>: New field.
11997 <attached>: Add comment.
11998 <gdb_detached>: New field.
11999 (handler_func): Change return type to int.
12000 (handle_serial_event, handle_target_event): Ditto.
12001 (gdb_connected): Declare.
12003 (disconnected_tracing): Declare.
12004 (stop_tracing): Declare.
12006 * server.c (handle_query) <qSupported>: Report support for
12007 disconnected tracing.
12008 (queue_stop_reply_callback): Account for running threads.
12009 (gdb_wants_thread_stopped): New.
12010 (gdb_wants_all_threads_stopped): New.
12011 (gdb_reattached_process): New.
12012 (handle_status): Clear the `gdb_detached' flag of all processes.
12013 In all-stop, stop all threads.
12014 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12015 (process_serial_event): If the remote connection breaks, or if an
12016 exit was forced with "monitor exit", force an event loop exit.
12017 Handle disconnected tracing on detach.
12018 (handle_serial_event): Adjust.
12019 (handle_target_event): If GDB isn't connected, forward events back
12020 to the inferior, unless the last process exited, in which case,
12021 exit gdbserver. Adjust interface.
12023 * remote-utils.c (remote_open): Don't block in accept. Instead
12024 register an event loop source on the listen socket file
12025 descriptor. Refactor bits into ...
12026 (listen_desc): ... this new global.
12027 (gdb_connected): ... this new function.
12028 (enable_async_notification): ... this new function.
12029 (handle_accept_event): ... this new function.
12030 (remote_close): Clear remote_desc.
12032 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12034 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12036 (mourn_inferior): Define.
12037 (target_process_qsupported): Avoid the dangling else problem.
12038 (thread_stopped): Define.
12039 (pause_all): Define.
12040 (target_waitstatus_to_string): Declare.
12041 * target.c (target_waitstatus_to_string): New.
12043 * tracepoint.c (tracing): Make extern.
12044 (disconnected_tracing): New.
12045 (stop_tracing): Make extern. Handle tracing stops due to GDB
12047 (cmd_qtdisconnected): New.
12048 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12049 (handle_tracepoint_general_set): Handle QTDisconnected.
12051 * event-loop.c (event_handler_func): Change return type to int.
12052 (process_event): Bail out if the event handler wants the event
12054 (handle_file_event): Ditto.
12055 (start_event_loop): Bail out if the event handler wants the event
12058 * nto-low.c (nto_target_ops): Adjust.
12059 * spu-low.c (spu_wait): Don't remove the process here.
12060 (spu_target_ops): Adjust.
12061 * win32-low.c (win32_wait): Don't remove the process here.
12062 (win32_target_ops): Adjust.
12064 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12066 * regcache.c (realloc_register_cache): Invalidate inferior's
12067 regcache before recreating it.
12069 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12071 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12073 2010-04-09 Stan Shebs <stan@codesourcery.com>
12074 Pedro Alves <pedro@codesourcery.com>
12076 * server.h (LONGEST): New.
12077 (struct thread_info) <while_stepping>: New field.
12078 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12080 (initialize_tracepoint, handle_tracepoint_general_set)
12081 (handle_tracepoint_query, tracepoint_finished_step)
12082 (tracepoint_was_hit, release_while_stepping_state_list):
12083 (current_traceframe): Declare.
12084 * server.c (handle_general_set): Handle tracepoint packets.
12085 (read_memory): New.
12086 (write_memory): New.
12087 (handle_search_memory_1): Use read_memory.
12088 (handle_query): Report support for conditional tracepoints, trace
12089 state variables, and tracepoint sources. Handle tracepoint
12091 (main): Initialize the tracepoints module.
12092 (process_serial_event): Handle traceframe reads/writes.
12094 * linux-low.c (handle_tracepoints): New.
12095 (linux_wait_1): Call it.
12096 (linux_resume_one_lwp): Handle while-stepping.
12097 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12098 (linux_target_ops): Install them.
12099 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12101 * linux-x86-low.c (x86_supports_tracepoints): New.
12102 (the_low_target). Install it.
12104 * mem-break.h (delete_breakpoint): Declare.
12105 * mem-break.c (delete_breakpoint): Make external.
12107 * target.h (struct target_ops): Add `supports_tracepoints',
12108 `read_pc', and `write_pc' fields.
12109 (target_supports_tracepoints): Define.
12110 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12113 * regcache.h (struct regcache) <registers_owned>: New field.
12114 (init_register_cache, regcache_cpy): Declare.
12115 (regcache_read_pc, regcache_write_pc): Declare.
12116 (register_cache_size): Declare.
12117 (supply_regblock): Declare.
12118 * regcache.c (init_register_cache): New.
12119 (new_register_cache): Use it.
12120 (regcache_cpy): New.
12121 (register_cache_size): New.
12122 (supply_regblock): New.
12123 (regcache_read_pc, regcache_write_pc): New.
12125 * tracepoint.c: New.
12127 * Makefile.in (OBS): Add tracepoint.o.
12128 (tracepoint.o): New rule.
12130 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12132 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12134 (i386-mmx.c): Likewise.
12135 (i386-mmx-linux.o): Likewise.
12136 (i386-mmx-linux.c): Likewise.
12138 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12139 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12140 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12141 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12143 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12144 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12145 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12147 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12149 * Makefile.in (clean): Updated.
12151 (i386-avx.c): Likewise.
12152 (i386-avx-linux.o): Likewise.
12153 (i386-avx-linux.c): Likewise.
12154 (amd64-avx.o): Likewise.
12155 (amd64-avx.c): Likewise.
12156 (amd64-avx-linux.o): Likewise.
12157 (amd64-avx-linux.c): Likewise.
12159 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12160 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12161 (srv_amd64_regobj): Add amd64-avx.o.
12162 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12163 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12164 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12165 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12166 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12167 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12168 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12170 * i387-fp.c: Include "i386-xstate.h".
12172 (i387_cache_to_xsave): Likewise.
12173 (i387_xsave_to_cache): Likewise.
12174 (x86_xcr0): Likewise.
12176 * i387-fp.h (i387_cache_to_xsave): Likewise.
12177 (i387_xsave_to_cache): Likewise.
12178 (x86_xcr0): Likewise.
12180 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12181 * linux-crisv32-low.c (target_regsets): Likewise.
12182 * linux-m68k-low.c (target_regsets): Likewise.
12183 * linux-mips-low.c (target_regsets): Likewise.
12184 * linux-ppc-low.c (target_regsets): Likewise.
12185 * linux-s390-low.c (target_regsets): Likewise.
12186 * linux-sh-low.c (target_regsets): Likewise.
12187 * linux-sparc-low.c (target_regsets): Likewise.
12188 * linux-xtensa-low.c (target_regsets): Likewise.
12190 * linux-low.c: Include <sys/uio.h>.
12191 (regsets_fetch_inferior_registers): Support nt_type.
12192 (regsets_store_inferior_registers): Likewise.
12193 (linux_process_qsupported): New.
12194 (linux_target_ops): Add linux_process_qsupported.
12196 * linux-low.h (regset_info): Add nt_type.
12197 (linux_target_ops): Add process_qsupported.
12199 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12201 (init_registers_i386_avx_linux): New.
12202 (init_registers_amd64_avx_linux): Likewise.
12203 (xmltarget_i386_linux_no_xml): Likewise.
12204 (xmltarget_amd64_linux_no_xml): Likewise.
12205 (PTRACE_GETREGSET): Likewise.
12206 (PTRACE_SETREGSET): Likewise.
12207 (x86_fill_xstateregset): Likewise.
12208 (x86_store_xstateregset): Likewise.
12209 (use_xml): Likewise.
12210 (x86_linux_update_xmltarget): Likewise.
12211 (x86_linux_process_qsupported): Likewise.
12212 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12213 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12214 init_registers_i386_linux here. Call
12215 x86_linux_update_xmltarget.
12216 (the_low_target): Add x86_linux_process_qsupported.
12218 * server.c (handle_query): Call target_process_qsupported.
12220 * target.h (target_ops): Add process_qsupported.
12221 (target_process_qsupported): New.
12223 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12225 * inferiors.c (add_thread): Set last_status kind to
12226 TARGET_WAITKIND_IGNORE.
12227 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12228 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12229 (linux_wait_1): Move `thread' local definition to block that uses
12230 it. Don't NULL initialize `event_child'.
12231 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12232 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12233 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12235 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12237 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12238 an extended waitstatus, or by a watchpoint.
12239 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12240 thread was stepping or has been stopped by a watchpoint.
12242 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12244 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12245 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12246 of another, then delete the previous, and validate all
12248 (validate_inserted_breakpoint): New.
12249 (delete_disabled_breakpoints): New.
12250 (validate_breakpoints): New.
12251 (check_mem_read): Validate breakpoints before trusting their
12252 shadow. Delete disabled breakpoints.
12253 (check_mem_write): Validate breakpoints before trusting they
12254 should be inserted. Delete disabled breakpoints.
12255 * mem-break.h (validate_breakpoints):
12256 * server.c (handle_query): Validate breakpoints when we see a
12259 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12261 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12262 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12263 if we could tell there's a GDB breakpoint at stop_pc.
12264 (need_step_over_p): Don't do a step over if we find a GDB
12265 breakpoint at the resume PC.
12267 * mem-break.c (struct raw_breakpoint): New.
12268 (enum bkpt_type): New type `gdb_breakpoint'.
12269 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12270 fields. New field `raw'.
12271 (find_raw_breakpoint_at): New.
12272 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12273 breakpoint instead.
12274 (set_breakpoint_at): Adjust.
12275 (delete_raw_breakpoint): New.
12276 (release_breakpoint): New.
12277 (delete_breakpoint): Rename to...
12278 (delete_breakpoint_1): ... this. Add proc parameter. Use
12279 release_breakpoint. Return ENOENT.
12280 (delete_breakpoint): Reimplement.
12281 (find_breakpoint_at): Delete.
12282 (find_gdb_breakpoint_at): New.
12283 (delete_breakpoint_at): Delete.
12284 (set_gdb_breakpoint_at): New.
12285 (delete_gdb_breakpoint_at): New.
12286 (gdb_breakpoint_here): New.
12287 (set_reinsert_breakpoint): Use release_breakpoint.
12288 (uninsert_breakpoint): Rename to ...
12289 (uninsert_raw_breakpoint): ... this.
12290 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12291 (reinsert_raw_breakpoint): Change parameter type to
12293 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12295 (check_breakpoints): Adjust. Use release_breakpoint.
12296 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12297 (breakpoint_inserted_here): Ditto.
12298 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12299 Don't trust the breakpoint's shadow if it is not inserted.
12300 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12301 (delete_all_breakpoints): Adjust.
12302 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12303 use delete_breakpoint_1.
12305 * mem-break.h (breakpoints_supported): Delete declaration.
12306 (set_gdb_breakpoint_at): Declare.
12307 (gdb_breakpoint_here): Declare.
12308 (delete_breakpoint_at): Delete.
12309 (delete_gdb_breakpoint_at): Declare.
12311 * server.h (struct raw_breakpoint): Forward declare.
12312 (struct process_info): New field `raw_breakpoints'.
12314 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12317 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12319 * linux-low.c (status_pending_p_callback): Fix comment.
12320 (linux_wait_for_event_1): Move most of the internal breakpoint
12321 handling from here...
12322 (linux_wait_1): ... to here.
12323 (count_events_callback): New.
12324 (select_singlestep_lwp_callback): New.
12325 (select_event_lwp_callback): New.
12326 (cancel_breakpoints_callback): New.
12327 (select_event_lwp): New.
12328 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12329 priority to all LWPs that have had events that should be reported
12330 to the client. Cancel breakpoints when about to reporting the
12331 event to the client, not while stopping lwps. No longer cancel
12332 finished single-steps here.
12333 (cancel_finished_single_step): Delete.
12334 (cancel_finished_single_steps): Delete.
12336 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12338 * mem-break.c (enum bkpt_type): New.
12339 (struct breakpoint): New field `type'.
12340 (set_breakpoint_at): Change return type to struct breakpoint
12341 pointer. Set type to `other_breakpoint' by default.
12342 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12343 in the breakpoint list.
12344 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12345 (reinsert_breakpoint): Rename to ...
12346 (reinsert_raw_breakpoint): ... this.
12347 (reinsert_breakpoints_at): Adjust.
12348 * mem-break.h (struct breakpoint): Declare.
12349 (set_breakpoint_at): Change return type to struct breakpoint
12352 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12354 * server.c (handle_query): Assign, not compare.
12356 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12358 Teach linux gdbserver to step-over-breakpoints.
12360 * linux-low.c (can_hardware_single_step): New.
12361 (supports_breakpoints): New.
12362 (handle_extended_wait): If stopping threads, read the stop pc of
12363 the new cloned LWP.
12365 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12366 low target doesn't support retrieving the PC.
12367 (add_lwp): Set last_resume_kind to resume_continue.
12368 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12369 (linux_attach): Don't clear stop_expected. Set the lwp's
12370 last_resume_kind to resume_stop.
12371 (linux_detach_one_lwp): Don't check for removed breakpoints.
12372 (check_removed_breakpoint): Delete.
12373 (status_pending_p): Rename to ...
12374 (status_pending_p_callback): ... this. Don't check for removed
12375 breakpoints. Don't consider threads that are stopped from GDB's
12377 (linux_wait_for_lwp): Always read the stop_pc here.
12378 (cancel_breakpoint): New.
12379 (step_over_bkpt): New global.
12380 (linux_wait_for_event_1): Implement stepping over breakpoints.
12381 (gdb_wants_lwp_stopped): New.
12382 (gdb_wants_all_stopped): New.
12383 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12384 single-step traps here. Store the thread's last reported target
12386 (send_sigstop): Don't clear stop_expected. Always set it,
12388 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12389 (cancel_finished_single_step): New.
12390 (cancel_finished_single_steps): New.
12391 (wait_for_sigstop): Don't cancel finished single-step traps here.
12392 (linux_resume_one_lwp): Don't check for removed breakpoints.
12393 Don't set `step' on non-hardware step archs.
12394 (linux_set_resume_request): Ignore resume_stop requests if already
12395 stopping or stopped. Set the lwp's last_resume_kind.
12396 (resume_status_pending_p): Don't check for removed breakpoints.
12397 (need_step_over_p): New.
12398 (start_step_over): New.
12399 (finish_step_over): New.
12400 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12401 requests. Clear the thread's last reported target waitstatus.
12402 Don't use the `suspended' flag. Don't consider pending breakpoints.
12403 (linux_resume): Start a step-over if necessary.
12404 (proceed_one_lwp): New.
12405 (proceed_all_lwps): New.
12406 (unstop_all_lwps): New.
12407 * linux-low.h (struct lwp_info): Rewrite comment for the
12408 `suspended' flag. Add the `stop_pc' field. Delete the
12409 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12410 Add `'last_resume_kind' and `need_step_over' fields.
12411 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12412 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12413 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12414 (set_raw_breakpoint_at): New.
12415 (set_breakpoint_at): Rewrite to use it.
12416 (reinsert_breakpoint_handler): Delete.
12417 (set_reinsert_breakpoint): New.
12418 (reinsert_breakpoint_by_bp): Delete.
12419 (delete_reinsert_breakpoints): New.
12420 (uninsert_breakpoint): Rewrite.
12421 (uninsert_breakpoints_at): New.
12422 (reinsert_breakpoint): Rewrite.
12423 (reinsert_breakpoints_at): New.
12424 (check_breakpoints): Rewrite.
12425 (breakpoint_here): New.
12426 (breakpoint_inserted_here): New.
12427 (check_mem_read): Adjust.
12428 * mem-break.h (breakpoints_supported, breakpoint_here)
12429 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12430 (reinsert_breakpoint_by_bp): Delete declaration.
12431 (delete_reinsert_breakpoints): Declare.
12432 (reinsert_breakpoint): Delete declaration.
12433 (reinsert_breakpoints_at): Declare.
12434 (uninsert_breakpoint): Delete declaration.
12435 (uninsert_breakpoints_at): Declare.
12436 (check_breakpoints): Adjust prototype.
12437 * server.h: Adjust include order.
12438 (struct thread_info): Declare here. Add a `last_status' field.
12440 2010-03-23 Michael Snyder <msnyder@vmware.com>
12442 * server.c (crc32): New function.
12443 (handle_query): Add handling for 'qCRC:' request.
12445 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12447 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12448 lwp had been stopped by a watchpoint.
12450 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12452 * server.h (internal_error): Declare.
12453 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12454 * utils.c (internal_error): New function.
12456 2010-03-15 Andreas Schwab <schwab@redhat.com>
12458 * configure.srv: Fix typo setting srv_regobj.
12460 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12462 * linux-low.c (fetch_register): Avoid passing a non string literal
12464 (usr_store_inferior_registers): Ditto.
12466 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12468 * linux-low.c (linux_write_memory): Bail out early if peeking
12471 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12473 * linux-low.h (struct lwp_info): New fields
12474 `stopped_by_watchpoint' and `stopped_data_address'.
12475 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12476 here, and cache them in the lwp object.
12477 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12479 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12481 (linux_stopped_by_watchpoint): Rewrite.
12482 (linux_stopped_data_address): Rewrite.
12484 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12486 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12487 switching the current inferior, not before.
12489 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12491 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12492 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12493 i386-linux.c and amd64-linux.c.
12494 (reg-i386.o): Removed.
12495 (reg-i386.c): Likewise.
12496 (reg-i386-linux.o): Likewise.
12497 (reg-i386-linux.c): Likewise.
12498 (reg-x86-64.o): Likewise.
12499 (reg-x86-64.c): Likewise.
12500 (reg-x86-64-linux.o): Likewise.
12501 (reg-x86-64-linux.c): Likewise.
12503 (i386.c): Likewise.
12504 (i386-linux.o): Likewise.
12505 (i386-linux.c): Likewise.
12506 (amd64.o): Likewise.
12507 (amd64.c): Likewise.
12508 (amd64-linux.o): Likewise.
12509 (amd64-linux.c): Likewise.
12511 * configure.srv (srv_i386_regobj): New.
12512 (srv_i386_linux_regobj): Likewise.
12513 (srv_amd64_regobj): Likewise.
12514 (srv_amd64_linux_regobj): Likewise.
12515 (srv_i386_32bit_xmlfiles): Likewise.
12516 (srv_i386_64bit_xmlfiles): Likewise.
12517 (srv_i386_xmlfiles): Likewise.
12518 (srv_amd64_xmlfiles): Likewise.
12519 (srv_i386_linux_xmlfiles): Likewise.
12520 (srv_amd64_linux_xmlfiles): Likewise.
12521 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12522 srv_xmlfiles to $srv_i386_xmlfiles.
12523 (i[34567]86-*-mingw32ce*): Likewise.
12524 (i[34567]86-*-mingw*): Likewise.
12525 (i[34567]86-*-nto*): Likewise.
12526 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12527 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12528 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12529 (x86_64-*-linux*): Likewise.
12531 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12532 (init_registers_amd64_linux): New.
12533 (x86_arch_setup): Replace init_registers_x86_64_linux with
12534 init_registers_amd64_linux.
12536 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12538 * configure.ac: Check for libdl. If it is not available link against
12539 static libthread_db.
12540 * configure: Regenerate.
12542 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12546 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12547 handing a read watchpoint.
12548 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12550 2010-02-12 Doug Evans <dje@google.com>
12552 * linux-low.c (linux_supports_tracefork_flag): Document.
12553 (linux_look_up_symbols): Add comment.
12555 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12557 * regcache.c (supply_register): Clear regcache if buf is NULL.
12559 2010-02-02 Nicolas Roche <roche@sourceware.org>
12560 Joel Brobecker <brobecker@adacore.com>
12562 * inferiors.c (find_inferior): Add function documentation.
12563 (unloaded_dll): Handle the case where the unloaded dll has not
12564 been previously registered in the dll list.
12566 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12568 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12569 (thumb2_breakpoint): New.
12570 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12572 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12574 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12575 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12578 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12580 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12582 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12584 * linux-s390-low.c (s390_collect_ptrace_register)
12585 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12587 2010-01-21 Doug Evans <dje@google.com>
12589 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12590 (PTRACE_ARG4_TYPE): New macro.
12591 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12592 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12593 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12594 (usr_store_inferior_registers): Ditto.
12595 (linux_read_memory, linux_write_memory): Ditto.
12596 (linux_test_for_tracefork): Ditto.
12598 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12599 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12601 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12603 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12606 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12608 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12609 prototype to take a regcache. Adjust.
12611 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12613 * regcache.h (struct thread_info): Forward declare.
12614 (struct regcache): New.
12615 (new_register_cache): Adjust prototype.
12616 (get_thread_regcache): Declare.
12617 (free_register_cache): Adjust prototype.
12618 (registers_to_string, registers_from_string): Ditto.
12619 (supply_register, supply_register_by_name, collect_register)
12620 (collect_register_as_string, collect_register_by_name): Ditto.
12621 * regcache.c (struct inferior_regcache_data): Delete.
12622 (get_regcache): Rename to ...
12623 (get_thread_regcache): ... this. Adjust. Switch inferior before
12624 fetching registers.
12625 (regcache_invalidate_one): Adjust.
12626 (regcache_invalidate): Fix prototype.
12627 (new_register_cache): Return the new register cache.
12628 (free_register_cache): Change prototype.
12629 (realloc_register_cache): Adjust.
12630 (registers_to_string): Change prototype to take a regcache. Adjust.
12631 (registers_from_string): Ditto.
12632 (register_data): Ditto.
12633 (supply_register): Ditto.
12634 (supply_register_by_name): Ditto.
12635 (collect_register): Ditto.
12636 (collect_register_as_string): Ditto.
12637 (collect_register_by_name): Ditto.
12638 * server.c (process_serial_event): Adjust.
12639 * linux-low.h (regset_fill_func, regset_store_func): Change
12641 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12643 * linux-low.c (get_stop_pc): Adjust.
12644 (check_removed_breakpoint): Adjust.
12645 (linux_wait_for_event): Adjust.
12646 (linux_resume_one_lwp): Adjust.
12647 (fetch_register): Add regcache parameter. Adjust.
12648 (usr_store_inferior_registers): Ditto.
12649 (regsets_fetch_inferior_registers): Ditto.
12650 (regsets_store_inferior_registers): Ditto.
12651 (linux_fetch_registers, linux_store_registers): Ditto.
12652 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12654 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12656 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12657 prototype to take a regcache.
12658 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12659 * remote-utils.c (convert_ascii_to_int, outreg)
12660 (prepare_resume_reply): Change prototype to take a regcache.
12662 * target.h (struct target_ops) <fetch_registers, store_registers>:
12663 Change prototype to take a regcache.
12664 (fetch_inferior_registers, store_inferior_registers): Change
12665 prototype to take a regcache. Adjust.
12666 * proc-service.c (ps_lgetregs): Adjust.
12667 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12668 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12669 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12670 take a regcache. Adjust.
12671 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12672 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12673 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12674 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12675 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12676 (cris_cannot_fetch_register):
12677 (cris_breakpoint_at): Change prototype to take a regcache.
12679 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12680 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12681 to take a regcache. Adjust.
12682 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12684 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12685 take a regcache. Adjust.
12686 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12687 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12688 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12689 * linux-mips-low.c (mips_get_pc):
12690 (mips_set_pc): Change prototype to take a regcache. Adjust.
12691 (mips_reinsert_addr): Adjust.
12692 (mips_collect_register): Change prototype to take a regcache.
12694 (mips_supply_register):
12695 (mips_collect_register_32bit, mips_supply_register_32bit)
12696 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12697 (mips_store_fpregset): Ditto.
12698 * linux-ppc-low.c (ppc_supply_ptrace_register)
12699 (ppc_supply_ptrace_register): Ditto.
12700 (parse_spufs_run): Adjust.
12701 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12702 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12703 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12704 take a regcache. Adjust.
12705 * linux-s390-low.c (s390_collect_ptrace_register)
12706 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12707 (s390_set_pc): Change prototype to take a regcache. Adjust.
12708 (s390_arch_setup): Adjust.
12709 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12710 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12711 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12712 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12713 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12715 (sparc_breakpoint_at): Adjust.
12716 * linux-xtensa-low.c (xtensa_fill_gregset):
12717 (xtensa_store_gregset):
12718 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12719 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12720 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12721 prototype to take a regcache. Adjust.
12722 * win32-arm-low.c (arm_fetch_inferior_register)
12723 (arm_store_inferior_register): Change prototype to take a
12725 * win32-i386-low.c (i386_fetch_inferior_register)
12726 (i386_store_inferior_register): Change prototype to take a
12728 * win32-low.c (child_fetch_inferior_registers)
12729 (child_store_inferior_registers): Change prototype to take a
12731 (win32_wait): Adjust.
12732 (win32_fetch_inferior_registers): Change prototype to take a
12734 (win32_store_inferior_registers): Adjust.
12735 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12736 store_inferior_register>: Change prototype to take a regcache.
12738 2010-01-20 Doug Evans <dje@google.com>
12740 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12742 (linux_wait_for_event1, linux_init_signals): Ditto.
12743 (W_STOPCODE): Provide definition if missing.
12745 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12747 * linux-low.c (linux_core_of_thread): New.
12748 (compare_ints, show_process, list_threads): New.
12749 (linux_qxfer_osdata): Report threads and cores.
12750 (linux_target_op): Register linux_core_of_thread.
12751 * remote-utils.c (prepare_resume_reply): Report the core.
12752 (buffer_xml_printf): Support %d specifier.
12753 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12755 (handle_query): Handle qXfer:threads. Announce availability
12757 * target.h (struct target_ops): New field core_of_thread.
12759 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12761 * Makefile.in (clean): Remove new generated files.
12762 (reg-s390.o, reg-s390.c): Remove rules.
12763 (reg-s390x.o, reg-s390x.c): Likewise.
12764 (s390-linux32.o, s390-linux32.c): Add rules.
12765 (s390-linux64.o, s390-linux64.c): Likewise.
12766 (s390x-linux64.o, s390x-linux64.c): Likewise.
12767 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12768 * linux-s390-low.c: Include <elf.h>.
12769 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12770 (init_registers_s390): Remove prototype.
12771 (init_registers_s390x): Likewise.
12772 (init_registers_s390_linux32): Add prototype.
12773 (init_registers_s390_linux64): Likewise.
12774 (init_registers_s390x_linux64): Likewise.
12775 (s390_num_regs_3264): New define.
12776 (s390_regmap_3264): New global variable.
12777 (s390_cannot_fetch_register): Remove obsolete check.
12778 (s390_cannot_store_register): Likewise.
12779 (s390_collect_ptrace_register): Handle upper/lower register halves.
12780 (s390_supply_ptrace_register): Likewise.
12781 (s390_fill_gregset): Update to register number changes.
12782 (s390_get_hwcap): New routine.
12783 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12784 Install appropriate regmap and register set.
12786 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12788 * server.c (gdbserver_version): Update copyright year to 2010.
12789 * gdbreplay.c (gdbreplay_version): Likewise.
12791 2009-12-28 Doug Evans <dje@google.com>
12793 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12794 elf/external.h. Include <elf.h> instead but only if necessary.
12796 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12798 * linux-low.c (linux_remove_process): Remove `detaching'
12799 parameter. Don't release/detach from thread_db here.
12800 (linux_kill): Release/detach from thread_db here, ...
12801 (linux_detach): ... and here, before actually detaching.
12802 (linux_wait_1): ... and here, when a process exits.
12803 * thread-db.c (any_thread_of): New.
12804 (thread_db_free): Switch the current inferior to a thread of the
12807 2009-12-21 Doug Evans <dje@google.com>
12809 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12811 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12812 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12813 warning ifndef __NR_tkill. Move setting of errno there too.
12814 Delete unnecessary resetting of errno after syscall.
12815 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12817 * configure.ac: Check for dladdr.
12818 * config.in: Regenerate.
12819 * configure: Regenerate.
12820 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12821 (try_thread_db_load): Update.
12823 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12825 2009-12-18 Doug Evans <dje@google.com>
12827 * event-loop.c: Include unistd.h if it exists.
12829 * linux-low.c (my_waitpid): Move definition away from being in
12830 between linux_tracefork_child/linux_test_for_tracefork.
12832 * gdb_proc_service.h (psaddr_t): Fix type.
12833 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12834 signature to match glibc.
12836 2009-12-16 Doug Evans <dje@google.com>
12838 * linux-low.c (linux_read_memory): Fix argument to read.
12840 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12842 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12843 events, don't leave current_inferior pointing at null.
12845 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12847 * win32-low.c (LOG): Delete.
12848 (OUTMSG): Output to stderr.
12849 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12850 on compile time LOG macro.
12851 (win32_wait): Fix debug output.
12853 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12855 * win32-low.c (win32_add_one_solib): If the dll name is
12856 "ntdll.dll", prepend the system directory to the dll path.
12858 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12860 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12862 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12863 Vladimir Prus <vladimir@codesourcery.com>
12865 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12866 * configure.ac: Check for __mcoldfire__ and set
12867 gdb_cv_m68k_is_coldfire.
12868 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12869 reg-cf.o and reg-m68k.o.
12870 * configure: Regenerated.
12872 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12874 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12875 Pass it to thread_db_free.
12876 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12877 proper `detaching' argument to linux_remove_process.
12878 * linux-low.h (thread_db_free): Add `detaching' parameter.
12879 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12881 (thread_db_free): Add `detaching' parameter. Only
12882 call td_ta_clear_event if detaching from process.
12884 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12886 * thread-db.c (thread_db_free): Fix typo.
12888 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12891 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12893 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12895 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12896 with an i686 compiler.
12897 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12899 * configure: Rebuilt.
12901 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12905 * server.c (handle_search_memory_1): Correct read_addr initialization
12906 in loop for searching subsequent chunks.
12908 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12910 * configure.ac: New --with-libthread-db option.
12911 * thread-db.c: Allow direct dependence on libthread_db.
12912 (thread_db_free): Adjust.
12913 * config.in: Regenerate.
12914 * configure: Likewise.
12916 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12919 * thread-db.c (attach_thread): New function.
12920 (maybe_attach_thread): Return success/failure.
12921 (find_new_threads_callback): Adjust.
12922 (thread_db_find_new_threads): Loop until no new threads.
12924 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12926 * proc-service.c (ps_lgetregs): Formatting.
12928 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12930 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12931 * configure.ac: Adjust.
12932 * linux-low.h (struct process_info_private): Move members to struct
12934 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12935 * linux-low.c (linux_remove_process): Adjust.
12936 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12937 * server.c (handle_query): Move code ...
12938 (handle_monitor_command): ... here. New function.
12939 * target.h (struct target_ops): New member.
12940 * thread-db.c (struct thread_db): New.
12941 (libthread_db_search_path): New variable.
12942 (thread_db_create_event, thread_db_enable_reporting)
12943 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12944 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12945 (try_thread_db_load_1, dladdr_to_soname): New functions.
12946 (try_thread_db_load, thread_db_load_search): New functions.
12947 (thread_db_init): Search for libthread_db.
12948 (thread_db_free): New function.
12949 (thread_db_handle_monitor_command): Likewise.
12950 * config.in: Regenerate.
12951 * configure: Regenerate.
12953 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12955 * spu-low.c (spu_kill): Wait for inferior to terminate.
12956 Call clear_inferiors.
12957 (spu_detach): Call clear_inferiors.
12959 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12961 * aclocal.m4: Regenerate.
12962 * config.in: Likewise.
12963 * configure: Likewise.
12965 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12967 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12968 (parse_spufs_run): New function.
12969 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12970 (ppc_breakpoint_at): Handle SPU breakpoints.
12972 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12974 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12975 (SPUFS_MAGIC): Define.
12976 (spu_enumerate_spu_ids): New function.
12977 (linux_qxfer_spu): New function.
12978 (linux_target_ops): Install linux_qxfer_spu.
12980 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12982 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12983 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12984 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12985 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12986 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12987 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12988 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12989 (init_registers_powerpc_cell32l): Add prototype.
12990 (init_registers_powerpc_cell64l): Likewise.
12991 (ppc_arch_setup): Detect Cell/B.E. architecture.
12993 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12995 * Makefile.in (datarootdir): New variable.
12997 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12999 * linux-low.c (linux_write_memory): Update debugging output.
13000 * Makefile.in (clean): Add new descriptions.
13001 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13002 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13003 * configure.srv: Add new files for arm*-*-linux*.
13004 * linux-arm-low.c: Add new declarations.
13005 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13006 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13007 (HWCAP_VFPv3D16): New.
13008 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13009 instead of __IWMMXT__.
13010 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13011 (arm_arch_setup): New.
13012 (target_regsets): Remove #ifdef. Add VFP regset.
13013 (the_low_target): Use arm_arch_setup.
13015 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13017 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13018 the main thread again.
13020 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13022 Adding Neutrino gdbserver.
13023 * configure: Regenerated.
13024 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13025 * configure.srv (i[34567]86-*-nto*): New target.
13026 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13027 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13028 (nto_comctrl) [__QNX__]: New function.
13029 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13031 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13033 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13036 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13037 Pedro Alves <pedro@codesourcery.com>
13039 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13040 don't support CONTEXT_EXTENDED_REGISTERS.
13041 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13042 (the_low_target): Install them.
13043 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13044 failing with ERROR_PIPE_NOT_CONNECTED.
13046 2009-06-30 Doug Evans <dje@google.com>
13047 Pierre Muller <muller@ics.u-strasbg.fr>
13049 Add h/w watchpoint support to x86-linux, win32-i386.
13050 * Makefile.in (SFILES): Add i386-low.c
13051 (i386_low_h): Define.
13052 (i386-low.o): Add dependencies.
13053 (linux-x86-low.o): Add i386-low.h dependency.
13054 (win32-i386-low.o): Ditto.
13055 * i386-low.c: New file.
13056 * i386-low.h: New file.
13057 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13058 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13059 * linux-low.c (linux_add_process): Initialize arch_private.
13060 (linux_remove_process): Free arch_private.
13061 (add_lwp): Initialize arch_private.
13062 (delete_lwp): Free arch_private.
13063 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13065 * linux-low.h (process_info_private): New member arch_private.
13066 (lwp_info): New member arch_private.
13067 (linux_target_ops): New members new_process, new_thread,
13069 (ptid_of): New macro.
13070 * linux-x86-low.c: Include stddef.h, i386-low.h.
13071 (arch_process_info): New struct.
13072 (arch_lwp_info): New struct.
13073 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13074 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13075 (i386_dr_low_get_status): New function.
13076 (x86_insert_point, x86_remove_point): New functions.
13077 (x86_stopped_by_watchpoint): New function.
13078 (x86_stopped_data_address): New function.
13079 (x86_linux_new_process, x86_linux_new_thread): New functions.
13080 (x86_linux_prepare_to_resume): New function.
13081 (the_low_target): Add entries for insert_point, remove_point,
13082 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13084 * server.c (debug_hw_points): New global.
13085 (monitor_show_help): Document set debug-hw-points.
13086 (handle_query): Process "set debug-hw-points".
13087 * server.h (debug_hw_points): Declare.
13088 (paddress): Declare.
13089 * utils.c (NUMCELLS, CELLSIZE): New macros.
13090 (get_sell, xsnprintf, paddress): New functions.
13091 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13092 remove_point, stopped_by_watchpoint, stopped_data_address.
13093 * win32-i386-low.c: Include i386-low.h.
13094 (debug_reg_state): Replaces dr.
13095 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13096 (i386_dr_low_get_status): New function.
13097 (i386_insert_point, i386_remove_point): New functions.
13098 (i386_stopped_by_watchpoint): New function.
13099 (i386_stopped_data_address): New function.
13100 (i386_initial_stuff): Update.
13101 (get_thread_context,set_thread_context,i386_thread_added): Update.
13102 (the_low_target): Add entries for insert_point,
13103 remove_point, stopped_by_watchpoint, stopped_data_address.
13104 * win32-low.c (win32_insert_watchpoint): New function.
13105 (win32_remove_watchpoint): New function.
13106 (win32_stopped_by_watchpoint): New function.
13107 (win32_stopped_data_address): New function.
13108 (win32_target_ops): Add entries for insert_watchpoint,
13109 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13110 * win32-low.h (win32_target_ops): New members insert_point,
13111 remove_point, stopped_by_watchpoint, stopped_data_address.
13113 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13115 * server.c (process_serial_event): Re-return unsupported, not
13116 error, if the type isn't recognized. Re-allow supporting only
13117 insert or remove packets. Also call require_running for
13118 breakpoints. Add missing break statement to default case. Tidy.
13119 * target.h (struct target_ops): Rename insert_watchpoint to
13120 insert_point, and remove_watchpoint to remove_point.
13122 * linux-low.h (struct linux_target_ops): Likewise.
13123 * linux-low.c (linux_insert_watchpoint): Rename to ...
13124 (linux_insert_point): ... this. Adjust.
13125 (linux_remove_watchpoint): Rename to ...
13126 (linux_remove_point): ... this. Adjust.
13127 (linux_target_ops): Adjust.
13128 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13129 (cris_insert_point): ... this.
13130 (cris_remove_watchpoint): Rename to ...
13131 (cris_remove_point): ... this.
13132 (the_low_target): Adjust.
13134 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13136 * server.c (handle_v_kill): Pass signal_pid to
13137 kill_inferior if multi_process is zero.
13139 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13141 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13142 * target.h (target_ops): Comment for *_watchpoint to make it clear
13143 the functions can get types '0' and '1'.
13145 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13147 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13148 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13149 * regcache.c (get_regcache): Likewise.
13150 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13151 * win32-low.c (child_fetch_inferior_registers): Remove check for
13154 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13155 Pedro Alves <pedro@codesourcery.com>
13157 * target.h (struct target_ops) <supports_multi_process>: New
13159 (target_supports_multi_process): New.
13160 * server.c (handle_query): Even if GDB reports support, only
13161 enable multi-process if the target also supports it. Report
13162 multi-process support only if the target backend supports it.
13163 * linux-low.c (linux_supports_multi_process): New function.
13164 (linux_target_ops): Install it as target_supports_multi_process
13167 2009-05-24 Doug Evans <dje@google.com>
13169 Global renaming of find_thread_pid to find_thread_ptid.
13170 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13171 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13172 All callers updated.
13174 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13175 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13178 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13179 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13180 (linux_resume_one_lwp): Ditto.
13182 2009-05-23 Doug Evans <dje@google.com>
13184 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13185 from struct inferior_list_entry * to struct lwp_info *.
13186 All callers updated.
13188 2009-05-13 Doug Evans <dje@google.com>
13190 * linux-x86-low.c: Don't include assert.h.
13191 (x86_siginfo_fixup): Use fatal, not assert.
13192 (x86_arch_setup): Fix comment.
13194 2009-05-12 Doug Evans <dje@google.com>
13196 Biarch support for i386/amd64 gdbserver.
13197 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13198 Add linux-x86-low.c.
13199 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13200 (linux-x86-low.o): Add.
13201 * linux-x86-64-low.c: Delete.
13202 * linux-i386-low.c: Delete.
13203 * linux-x86-low.c: New file.
13204 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13206 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13208 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13209 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13210 (linux_child_pid_to_exec_file): New function.
13211 (elf_64_header_p, elf_64_file_p): New functions.
13212 (siginfo_fixup): New function.
13213 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13214 give target a chance to convert layout.
13215 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13216 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13218 2009-05-07 Doug Evans <dje@google.com>
13220 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13221 (regsets_store_inferior_registers): Ditto.
13223 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13227 * linux-low.c (must_set_ptrace_flags): Delete.
13228 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13230 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13231 `lwp->must_set_ptrace_flags' instead.
13232 (linux_wait_for_event_1): Set ptrace options here.
13233 (linux_wait_1): ... not here.
13235 2009-04-30 Doug Evans <dje@google.com>
13237 * inferiors.c (started_inferior_callback): New function.
13238 (attached_inferior_callback): New function.
13239 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13240 * server.c (print_started_pid, print_attached_pid): New functions.
13241 (detach_or_kill_for_exit): New function.
13242 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13243 * server.h (have_started_inferiors_p): Declare.
13244 (have_attached_inferiors_p): Declare.
13246 * inferiors.c (remove_process): Fix memory leak, free process.
13247 * linux-low.c (linux_remove_process): New function.
13248 (linux_kill): Call it instead of remove_process.
13249 (linux_detach, linux_wait_1): Ditto.
13251 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13253 * configure.srv: Add x86 Windows CE target.
13255 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13257 * inferiors.c (get_thread_process): Make global.
13258 * server.h (get_thread_process): Add prototype.
13259 * thread-db.c (find_one_thread): Use get_thread_process
13260 instead of current_process.
13261 (thread_db_get_tls_address): Do not crash if called when
13262 thread layer is not yet initialized.
13264 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13266 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13267 * spu-low.c (current_tid): Rename to ...
13268 (current_ptid): ... this.
13269 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13270 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13271 ptid_get_lwp (current_ptid) instead of current_tid.
13272 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13273 instead of current_tid. Use find_process_pid to verify pid
13274 argument is valid. Pass proper argument to remove_process.
13275 (spu_thread_alive): Compare current_ptid instead of current_tid.
13276 (spu_resume): Likewise.
13278 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13280 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13283 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13285 Implement the multiprocess extensions, and add linux multiprocess
13288 * server.h (ULONGEST): Declare.
13289 (struct ptid, ptid_t): New.
13290 (minus_one_ptid, null_ptid): Declare.
13291 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13292 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13293 (struct inferior_list_entry): Change `id' type from unsigned from
13295 (struct sym_cache, struct breakpoint, struct
13296 process_info_private): Forward declare.
13297 (struct process_info): Declare.
13298 (current_process): Declare.
13299 (all_processes): Declare.
13300 (initialize_inferiors): Declare.
13301 (add_thread): Adjust to use ptid_t.
13302 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13303 (add_process, remove_process, find_thread_pid): Declare.
13304 (find_inferior_id): Adjust to use ptid_t.
13305 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13306 (multi_process): Declare.
13307 (push_event): Adjust to use ptid_t.
13308 (read_ptid, write_ptid): Declare.
13309 (prepare_resume_reply): Adjust to use ptid_t.
13310 (clear_symbol_cache): Declare.
13311 * inferiors.c (all_processes): New.
13312 (null_ptid, minus_one_ptid): New.
13313 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13314 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13315 (add_thread): Change unsigned long to ptid. Remove gdb_id
13317 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13318 (gdb_id_to_thread): Rename to ...
13319 (find_thread_pid): ... this. Change unsigned long to ptid.
13320 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13321 (loaded_dll, pull_pid_from_list): Adjust.
13322 (add_process, remove_process, find_process_pid)
13323 (get_thread_process, current_process, initialize_inferiors): New.
13324 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13325 (struct target_waitstatus) <related_pid>: Ditto.
13326 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13327 return type to int.
13328 (struct target_ops) <join>: Add `pid' argument.
13329 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13330 (struct target_ops) <wait>: Add `ptid' field. Change return type
13332 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13333 (mywait): Add `ptid' argument. Change return type to ptid_t.
13334 (target_pid_to_str): Declare.
13335 * target.c (set_desired_inferior): Adjust to use ptids.
13336 (mywait): Add new `ptid' argument. Adjust.
13337 (target_pid_to_str): New.
13338 * mem-break.h (free_all_breakpoints): Declare.
13339 * mem-break.c (breakpoints): Delelete.
13340 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13341 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13342 to use per-process breakpoint list.
13343 (free_all_breakpoints): New.
13344 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13345 (symbol_cache, all_symbols_looked_up): Delete.
13347 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13349 (prepare_resume_reply): Change ptid argument's type from unsigned
13350 long to ptid_t. Adjust. Implement W;process and X;process.
13351 (free_sym_cache, clear_symbol_cache): New.
13352 (look_up_one_symbol): Adjust to per-process symbol cache. *
13353 * server.c (cont_thread, general_thread, step_thread): Change type
13355 (attached): Delete.
13356 (multi_process): New.
13357 (last_ptid): Change type to ptid_t.
13358 (struct vstop_notif) <ptid>: Change type to ptid_t.
13359 (queue_stop_reply, push_event): Change `ptid' argument's type to
13361 (discard_queued_stop_replies): Add `pid' argument.
13362 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13363 changes. Don't reference the `attached' global.
13364 (attach_inferior): Adjust to mywait interface changes.
13365 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13366 features. Handle and report "multiprocess+". Handle
13368 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13370 (handle_v_kill): New.
13371 (handle_v_stopped): Adjust to use target_pid_to_str.
13372 (handle_v_requests): Allow multiple attaches and runs when
13373 multiprocess extensions are in effect. Handle "vKill".
13374 (myresume): Adjust to use ptids.
13375 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13376 (handle_status): Adjust to discard_queued_stop_replies interface
13378 (first_thread_of, kill_inferior_callback)
13379 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13380 (main): Call initialize_inferiors. Adjust to use ptids, killing
13381 and detaching from all inferiors. Handle multiprocess packet
13383 * linux-low.h: Include gdb_proc_service.h.
13384 (struct process_info_private): New.
13385 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13386 <lwpid_of>: Use ptid_get_lwp.
13387 (get_lwp_thread): Adjust.
13388 (struct lwp_info): Add `dead' member.
13389 (find_lwp_pid): Declare.
13390 * linux-low.c (thread_db_active): Delete.
13391 (new_inferior): Adjust comment.
13392 (inferior_pid): Delete.
13393 (linux_add_process): New.
13394 (handle_extended_wait): Adjust.
13395 (add_lwp): Change unsigned long to ptid.
13396 (linux_create_inferior): Add process to processes table. Adjust
13397 to use ptids. Don't set new_inferior here.
13398 (linux_attach_lwp): Rename to ...
13399 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13400 it. Adjust to use ptids.
13401 (linux_attach_lwp): New.
13402 (linux_attach): Add process to processes table. Don't set
13404 (struct counter): New.
13405 (second_thread_of_pid_p, last_thread_of_process_p): New.
13406 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13407 multiple processes.
13408 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13409 processes. Remove process from process table.
13410 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13411 to multiple processes.
13412 (any_thread_of): New.
13413 (linux_detach): Add `pid' argument, and handle it. Remove process
13414 from processes table.
13415 (linux_join): Add `pid' argument. Handle it.
13416 (linux_thread_alive): Change unsighed long argument to ptid_t.
13417 Consider dead lwps as not being alive.
13418 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13419 threads we're not interested in.
13420 (same_lwp, find_lwp_pid): New.
13421 (linux_wait_for_lwp): Change `pid' argument's type from int to
13423 (linux_wait_for_event): Rename to ...
13424 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13425 from int to ptid_t. Adjust.
13426 (linux_wait_for_event): New.
13427 (linux_wait_1): Add `ptid' argument. Change return type to
13428 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13429 that exit from the process table.
13430 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13432 (mark_lwp_dead): New.
13433 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13434 stopping all threads, mark its main lwp as dead.
13435 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13437 (fetch_register, usr_store_inferior_registers)
13438 (regsets_fetch_inferior_registers)
13439 (regsets_store_inferior_registers, linux_read_memory)
13440 (linux_write_memory): Inline `inferior_pid'.
13441 (linux_look_up_symbols): Adjust to use per-process
13442 `thread_db_active'.
13443 (linux_request_interrupt): Adjust to use ptids.
13444 (linux_read_auxv): Inline `inferior_pid'.
13445 (initialize_low): Don't reference thread_db_active.
13446 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13447 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13448 (ps_getpid): Return the pid of the current inferior.
13449 * thread-db.c (proc_handle, thread_agent): Delete.
13450 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13452 (find_one_thread): Change argument type to ptid_t. Adjust to
13454 (maybe_attach_thread): Adjust to per-process data and ptids.
13455 (thread_db_find_new_threads): Ditto.
13456 (thread_db_init): Ditto.
13457 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13458 processes table. Adjust to use ptids.
13459 (spu_kill, spu_detach): Adjust interface. Remove process from
13461 (spu_join, spu_thread_alive): Adjust interface.
13462 (spu_wait): Adjust interface. Remove process from processes
13463 table. Adjust to use ptids.
13464 * win32-low.c (current_inferior_tid): Delete.
13465 (current_inferior_ptid): New.
13466 (debug_event_ptid): New.
13467 (thread_rec): Take a ptid. Adjust.
13468 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13469 (child_delete_thread): Ditto.
13470 (do_initial_child_stuff): Add `attached' argument. Add process to
13472 (child_fetch_inferior_registers, child_store_inferior_registers):
13474 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13475 (win32_attach): Pass 1 to do_initial_child_stuff.
13476 (win32_kill): Adjust interface. Remove process from processes
13478 (win32_detach): Ditto.
13479 (win32_join): Adjust interface.
13480 (win32_thread_alive): Take a ptid.
13481 (win32_resume): Adjust to use ptids.
13482 (get_child_debug_event): Ditto.
13483 (win32_wait): Adjust interface. Remove exiting process from
13486 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13488 Non-stop mode support.
13490 * server.h (non_stop): Declare.
13491 (gdb_client_data, handler_func): Declare.
13492 (delete_file_handler, add_file_handler, start_event_loop):
13494 (handle_serial_event, handle_target_event, push_event)
13495 (putpkt_notif): Declare.
13496 * target.h (enum resume_kind): New.
13497 (struct thread_resume): Replace `step' field by `kind' field.
13498 (TARGET_WNOHANG): Define.
13499 (struct target_ops) <wait>: Add `options' argument.
13500 <supports_non_stop, async, start_non_stop>: New fields.
13501 (target_supports_non_stop, target_async): New.
13502 (start_non_stop): Declare.
13503 (mywait): Add `options' argument.
13504 * target.c (mywait): Add `options' argument. Print child exit
13505 notifications here.
13506 (start_non_stop): New.
13507 * server.c (non_stop, own_buf, mem_buf): New globals.
13508 (struct vstop_notif): New.
13509 (notif_queue): New global.
13510 (queue_stop_reply, push_event, discard_queued_stop_replies)
13511 (send_next_stop_reply): New.
13512 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13514 (attach_inferior): In non-stop mode, don't wait for the target
13516 (handle_general_set): Handle QNonStop.
13517 (handle_query): When handling qC, return the current general
13518 thread, instead of the first thread of the list.
13519 (handle_query): If the backend supports non-stop mode, include
13520 QNonStop+ in the qSupported query response.
13521 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13523 (handle_v_attach, handle_v_run): Handle non-stop mode.
13524 (handle_v_stopped): New.
13525 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13526 (myresume): Adjust to use resume_kind. Handle non-stop.
13527 (queue_stop_reply_callback): New.
13528 (handle_status): Handle non-stop mode.
13529 (main): Clear non_stop flag on reconnection. Use the event-loop.
13530 Refactor serial protocol handling from here ...
13531 (process_serial_event): ... to this new function. When GDB
13532 selects any thread, select one here. In non-stop mode, wait until
13533 GDB acks all pending events before exiting.
13534 (handle_serial_event, handle_target_event): New.
13535 * remote-utils.c (remote_open): Install remote_desc in the event
13537 (remote_close): Remove remote_desc from the event loop.
13538 (putpkt_binary): Rename to...
13539 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13540 (putpkt_binary): New as wrapper around putpkt_binary_1.
13541 (putpkt_notif): New.
13542 (prepare_resume_reply): In non-stop mode, don't change the
13544 * event-loop.c: New.
13545 * Makefile.in (OBJ): Add event-loop.o.
13546 (event-loop.o): New rule.
13548 * linux-low.h (pid_of): Moved here.
13550 (get_lwp_thread): Use lwpid_of.
13551 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13552 * linux-low.c (pid_of): Delete.
13553 (inferior_pid): Use lwpid_of.
13554 (linux_event_pipe): New.
13555 (target_is_async_p): New.
13557 (handle_extended_wait): Use lwpid_of.
13558 (add_lwp): Don't set lwpid field.
13559 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13560 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13561 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13562 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13563 first. Adjust to linux_wait_for_event interface changes. Use
13565 (linux_detach): Don't delete the main lwp here.
13566 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13567 (status_pending_p): Don't consider explicitly suspended lwps.
13568 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13569 pointer. Add OPTIONS argument. Change return type to int. Use
13570 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13571 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13572 pointer. Add status pointer argument. Return a pid instead of a
13573 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13574 changes. In non-stop mode, don't switch to a random thread.
13575 (linux_wait): Rename to...
13576 (linux_wait_1): ... this. Add target_options argument, and handle
13577 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13578 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13579 clean exit and signal exit code. Don't stop all threads in
13580 non-stop mode. In all-stop mode, only stop all threads when
13581 reporting a stop to GDB. Handle explicit thread stop requests.
13582 (async_file_flush, async_file_mark): New.
13584 (send_sigstop): Use lwpid_of.
13585 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13586 interface changes. In non-stop mode, don't switch to a random
13588 (linux_resume_one_lwp): Use lwpid_of.
13589 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13590 (linux_resume_one_thread): ... this. Handle resume_stop. In
13591 non-stop mode, don't look for pending flag in all threads.
13592 (resume_status_pending_p): Don't consider explicitly suspended
13594 (my_waitpid): Reimplement. Emulate __WALL.
13595 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13597 (sigchld_handler, linux_supports_non_stop, linux_async)
13598 (linux_start_non_stop): New.
13599 (linux_target_ops): Register linux_supports_non_stop, linux_async
13600 and linux_start_non_stop.
13601 (initialize_low): Install SIGCHLD handler.
13602 * thread-db.c (thread_db_create_event, find_one_thread)
13603 (thread_db_get_tls_address): Use lwpid_of.
13604 * win32-low.c (win32_detach): Adjust to use resume_kind.
13605 (win32_wait): Add `options' argument.
13606 * spu-low.c (spu_resume): Adjust to use resume_kind.
13607 (spu_wait): Add `options' argument.
13609 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13611 Decouple target code from remote protocol.
13613 * target.h (enum target_waitkind): New.
13614 (struct target_waitstatus): New.
13615 (struct target_ops) <wait>: Return an unsigned long. Take a
13616 target_waitstatus pointer instead of a char pointer.
13617 (mywait): Likewise.
13618 * target.c (mywait): Change prototype to return an unsigned long.
13619 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13620 * server.h (thread_from_wait, old_thread_from_wait): Delete
13622 (prepare_resume_reply): Change prototype to take a
13624 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13625 (last_status, last_ptid): New.
13626 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13627 pid instead of a signal.
13628 (attach_inferior): Remove "status" and "signal" parameters.
13630 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13632 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13633 (handle_v_requests, myresume): Remove "status" and "signal"
13634 parameters. Adjust.
13635 (handle_status): New.
13636 (main): Delete local `status'. Adjust.
13637 * remote-utils.c: Include target.h.
13638 (prepare_resume_reply): Change prototype to take a
13639 target_waitstatus. Adjust.
13641 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13643 * spu-low.c (spu_wait): Adjust.
13644 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13646 (win32_wait): Adjust.
13648 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13650 * target.h (struct thread_resume): Delete leave_stopped member.
13651 (struct target_ops): Add a `n' argument to the `resume' callback.
13652 * server.c (start_inferior): Adjust.
13653 (handle_v_cont, myresume): Adjust.
13654 * linux-low.c (check_removed_breakpoint): Adjust to resume
13655 interface change, and to removed leave_stopped field.
13656 (resume_ptr): Delete.
13657 (struct thread_resume_array): New.
13658 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13659 resume interface change.
13660 (linux_continue_one_thread, linux_queue_one_thread)
13661 (resume_status_pending_p): Check if the resume field is NULL
13662 instead of checking the leave_stopped member.
13663 (linux_resume): Adjust to the target resume interface change.
13664 * spu-low.c (spu_resume): Adjust to the target resume interface
13666 * win32-low.c (win32_detach, win32_resume): Ditto.
13668 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13670 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13672 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13674 (linux_continue_one_thread): Only preserve the stepping flag if
13675 there's a pending breakpoint.
13677 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13679 * server.c (main): After the inferior having exited, call
13680 remote_close before exiting gdbserver.
13682 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13684 Fix size of FPSCR in Power 7 processors.
13685 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13686 (PPC_FEATURE_HAS_DFP): New #define.
13687 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13690 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13692 * server.c (handle_query) Whitespace and formatting.
13694 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13696 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13697 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13698 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13699 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13700 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13701 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13702 Makefile.in, configure.ac: Fix whitespace throughout.
13703 * configure: Regenerate.
13705 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13707 * inferiors.c (find_inferior): Make it safe for the callback
13708 function to delete the currently iterated inferior.
13710 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13712 * Makefile.in (linuw_low_h): Move higher.
13713 (thread-db.o): Depend on $(linux_low_h).
13715 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13717 Rename "process" to "lwp" throughout.
13719 * linux-low.c (all_processes): Rename to...
13720 (all_lwps): ... this.
13721 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13722 (add_process): Rename to ...
13723 (add_lwp): ... this. Adjust.
13724 (linux_create_inferior): Adjust.
13725 (linux_attach_lwp): Adjust.
13726 (linux_attach): Adjust.
13727 (linux_kill_one_process): Rename to ...
13728 (linux_kill_one_lwp): ... this. Adjust.
13729 (linux_kill): Adjust.
13730 (linux_detach_one_process): Rename to ...
13731 (linux_detach_one_lwp): ... this. Adjust.
13732 (linux_detach): Adjust.
13733 (check_removed_breakpoint): Adjust.
13734 (status_pending_p): Adjust.
13735 (linux_wait_for_process): Rename to ...
13736 (linux_wait_for_lwp): ... this. Adjust.
13737 (linux_wait_for_event): Adjust.
13738 (send_sigstop): Adjust.
13739 (wait_for_sigstop): Adjust.
13740 (stop_all_processes): Rename to ...
13741 (stop_all_lwps): ... this.
13742 (linux_resume_one_process): Rename to ...
13743 (linux_resume_one_lwp): ... this. Adjust.
13744 (linux_set_resume_request, linux_continue_one_thread)
13745 (linux_queue_one_thread, resume_status_pending_p)
13746 (usr_store_inferior_registers, regsets_store_inferior_registers)
13747 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13749 * linux-low.h (get_process): Rename to ...
13750 (get_lwp): ... this. Adjust.
13751 (get_thread_process): Rename to ...
13752 (get_thread_lwp): ... this. Adjust.
13753 (get_process_thread): Rename to ...
13754 (get_lwp_thread): ... this. Adjust.
13755 (struct process_info): Rename to ...
13756 (struct lwp_info): ... this.
13757 (all_processes): Rename to ...
13758 (all_lwps): ... this.
13759 * proc-service.c (ps_lgetregs): Adjust.
13760 * thread-db.c (thread_db_create_event, find_one_thread)
13761 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13763 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13765 * server.c (handle_query): Handle "qAttached".
13767 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13769 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13770 GPLv3, update license URL.
13772 2009-03-01 Doug Evans <dje@google.com>
13774 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13775 (server_h): Add gdb_signals.h.
13776 (signals.o): Update.
13777 * server.h (target_signal_from_host,target_signal_to_host_p)
13778 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13780 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13782 * remote-utils.c (getpkt): Also generate remote-debug
13783 information if noack_mode is set.
13785 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13787 * server.c (handle_query): Report qXfer:siginfo:read and
13788 qXfer:siginfo:write as supported and handle them.
13789 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13790 * linux-low.c (linux_xfer_siginfo): New.
13791 (linux_target_ops): Set it.
13793 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13795 * server.c (gdbserver_usage): Mention --remote-debug.
13796 (main): Accept '--remote-debug' switch.
13798 2009-01-18 Doug Evans <dje@google.com>
13800 * regcache.c (new_register_cache): No need to check result of xcalloc.
13801 * server.c (handle_search_memory): Back out calls to xmalloc,
13802 result is checked and error is returned to user upon failure.
13803 (handle_query): Ditto. Add more checks for result of malloc.
13804 (handle_v_cont): Check result of malloc, report error back to
13806 (handle_v_run): Ditto. Call freeargv.
13807 * server.h (freeargv): Declare.
13808 * utils.c (freeargv): New fn.
13810 2009-01-15 Doug Evans <dje@google.com>
13812 * gdbreplay.c (perror_with_name): Make arg const char *.
13813 * server.h (target_signal_to_name): Make return type const char *.
13814 * thread-db.c (thread_db_err_str): Make return type const char *.
13815 * utils.c (perror_with_name): Make arg const char *.
13817 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13819 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13820 when handling a EXIT_PROCESS_DEBUG_EVENT.
13822 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13824 * gdbreplay.c (gdbreplay_version): Update copyright year.
13825 * server.c (gdbserver_version): Likewise.
13827 2009-01-05 Doug Evans <dje@google.com>
13829 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13830 (handle_extended_wait): Improve comment.
13832 2008-12-13 Doug Evans <dje@google.com>
13834 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13835 * server.h (ATTR_MALLOC): New macro.
13836 (xmalloc,xcalloc,xstrdup): Declare.
13837 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13838 * inferiors.c: Ditto.
13839 * linux-low.c: Ditto.
13840 * mem-break.c: Ditto.
13841 * regcache.c: Ditto.
13842 * remote-utils.c: Ditto.
13845 * win32-low.c: Ditto.
13847 2008-12-12 Doug Evans <dje@google.com>
13849 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13850 in debugging printf.
13852 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13854 2008-12-09 Doug Evans <dje@google.com>
13856 * linux-low.h (struct process_info): Delete member tid, unused.
13857 * thread-db.c (find_one_thread): Update.
13858 (maybe_attach_thread): Update.
13860 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13862 * target.h (struct target_ops): Add qxfer_osdata member.
13863 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13865 (linux_qxfer_osdata): New functions.
13866 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13868 * server.c (handle_query): Handle "qXfer:osdata:read:".
13869 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13870 (buffer_xml_printf): New functions.
13871 * server.h (struct buffer): New.
13872 (buffer_grow_str, buffer_grow_str0): New macros.
13873 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13874 (buffer_xml_printf): Declare.
13876 2008-11-24 Doug Evans <dje@google.com>
13878 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13880 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13882 * server.c (handle_v_run): Always use the supplied argument list.
13884 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13886 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13887 (xtensa_regmap_table): Add entry for scompare1.
13889 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13891 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13892 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13893 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13894 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13895 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13896 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13897 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13898 XML target descriptions.
13899 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13900 when inferior is running on an ISA 2.05 or later processor. Add
13901 special case to return offset for full 64-bit slot of FPSCR when
13904 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13906 * Makefile.in (SFILES, clean): Added sparc64 files.
13907 (reg-sparc64.o, reg-sparc64.c): New.
13908 * configure.srv (sparc*-*-linux*): New configuration.
13909 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13910 syscall arguments for SPARC.
13911 (regsets_store_inferior_registers): Likewise.
13912 * linux-sparc-low.c: New file.
13914 2008-10-21 Doug Evans <dje@google.com>
13916 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13917 (READLINE_DIR,READLINE_DEP): Delete.
13918 (INTERNAL_CFLAGS): Update.
13919 (LINTFLAGS): Update.
13921 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13923 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13924 whole argv from the last run, not just argv[0].
13926 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13928 * regcache.c (new_register_cache): Return NULL if the register
13929 cache size isn't known yet.
13930 (free_register_cache): Avoid dereferencing a NULL regcache.
13932 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13934 * configure.srv: Merge MIPS and MIPS64.
13936 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13938 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13940 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13942 * Makefile.in: Add required vsx dependencies.
13944 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13945 Declare init_registers_powerpc_vsx32l.
13946 Declare init_registers_powerpc_vsx64l.
13947 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13948 (ppc_arch_setup): Check for VSX in hwcap.
13949 (ppc_fill_vsxregset): New function.
13950 (ppc_store_vsxregset): New function.
13951 Add new VSX entry in regset_info target_regsets.
13953 * configure.srv: Add new VSX dependencies.
13955 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13957 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13958 (remote_open): Set or clear transport_is_reliable.
13959 (putpkt_binary): Don't expect acks in noack mode.
13960 (getpkt): Don't send ack/nac in noack mode.
13961 * server.c (handle_general_set): Handle QStartNoAckMode.
13962 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13964 (main): Reset noack_mode on every connection.
13965 * server.h (noack_mode): Declare.
13967 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13969 * Makefile.in (GDBREPLAY_OBS): New variable.
13970 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13972 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13973 Daniel Jacobowitz <dan@codesourcery.com>
13975 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13976 (usr_store_inferior_registers): Likewise.
13977 (regsets_store_inferior_registers): Likewise.
13979 2008-07-31 Rolf Jansen <rj@surtec.com>
13980 Pedro Alves <pedro@codesourcery.com>
13982 * configure.ac: Check for memmem declaration.
13983 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13984 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13985 (disable_packet_qfThreadInfo): Unconditionally compile.
13986 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13987 * configure, config.in: Regenerate.
13989 2008-07-28 Doug Kwan <dougkwan@google.com>
13991 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13992 (linux_write_memory): Remove declaration of errno.
13994 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13996 * linux-low.c (handle_extended_wait): Do not use "status"
13997 variable uninitialized.
13999 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14001 * server.c (handle_v_attach): Inhibit reporting dll changes.
14003 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14005 * remote-utils.c (prepare_resume_reply): If requested, don't
14006 output "thread:TID" in the T stop reply.
14008 * server.c (disable_packet_vCont, disable_packet_Tthread)
14009 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14010 (handle_query): If requested, disable support for qC, qfThreadInfo
14012 (handle_v_requests): If requested, disable support for vCont.
14013 (gdbserver_show_disableable): New.
14014 (main): Handle --disable-packet and --disable-packet=LIST.
14016 * server.h (disable_packet_vCont, disable_packet_Tthread)
14017 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14019 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14021 * server.c (gdbserver_usage): Mention --version.
14023 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14025 * Makefile.in (gdbreplay.o): New rule.
14027 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14029 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14030 message, not gdbserver.
14032 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14033 Nathan Sidwell <nathan@codesourcery.com>
14034 Joseph Myers <joseph@codesourcery.com>
14036 * acinclude.m4: Include ../../config/acx.m4.
14037 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14038 * configure, config.in: Regenerate.
14039 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14040 * server.c (gdbserver_version): Print PKGVERSION.
14041 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14042 (main): Adjust gdbserver_usage calls.
14043 * gdbreplay.c (version, host_name): Add declarations.
14044 (gdbreplay_version, gdbreplay_usage): New.
14045 (main): Accept --version and --help options.
14047 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14049 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14050 (arm_breakpoint_at): Handle Thumb.
14051 (the_low_target): Add comment.
14053 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14055 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14057 2008-05-09 Doug Evans <dje@google.com>
14059 * server.h (decode_search_memory_packet): Declare.
14060 * remote-utils.c (decode_search_memory_packet): New fn.
14061 * server.c (handle_search_memory_1): New fn.
14062 (handle_search_memory): New fn.
14063 (handle_query): Process qSearch:memory packets.
14065 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14067 * regcache.c (registers_length): Remove.
14068 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14069 full register packet.
14070 * regcache.h (registers_length): Remove prototype.
14071 * server.h (PBUFSIZ): Define to 16384.
14073 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14075 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14076 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14077 powerpc-64l.o, and powerpc-altivec64l.o.
14078 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14079 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14080 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14081 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14082 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14085 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14086 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14087 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14088 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14089 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14090 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14091 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14092 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14093 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14094 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14097 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14098 (init_registers_powerpc_32l): ... this new prototype.
14099 (init_registers_powerpc_32): Remove, replace by ...
14100 (init_registers_powerpc_altivec32l): ... this new prototype.
14101 (init_registers_powerpc_e500): Remove, replace by ...
14102 (init_registers_powerpc_e500l): ... this new prototype.
14103 (init_registers_ppc64): Remove, replace by ...
14104 (init_registers_powerpc_64l): ... this new prototype.
14105 (init_registers_powerpc_64): Remove, replace by ...
14106 (init_registers_powerpc_altivec64l): ... this new prototype.
14107 (ppc_num_regs): Set to 73.
14108 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14109 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14110 (ppc_cannot_store_register): Handle orig_r3 and trap.
14111 (ppc_arch_setup): Update init_registers_... calls.
14112 (ppc_fill_gregset): Handle orig_r3 and trap.
14114 * inferiors.c (clear_inferiors): Reset current_inferior.
14116 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14118 * acinclude.m4: Add override.m4.
14119 * configure: Regenerate.
14121 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14123 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14124 initial call to init_register_ppc64.
14126 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14128 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14129 single powerpc*-*-linux* case.
14130 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14132 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14134 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14135 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14137 * linux-ppc-low.c: Include <elf.h>.
14138 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14139 (ppc_hwcap): New global variable.
14140 (ppc_regmap): Remove __SPE__ #ifdef sections.
14141 (ppc_regmap_e500): New global variable.
14142 (ppc_cannot_store_register): Update __SPE__ special case.
14143 (ppc_get_hwcap): New function.
14144 (ppc_arch_setup): Use it to determine whether inferior supports
14145 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14146 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14147 Do not access registers if target does not support AltiVec.
14148 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14149 Do not access registers if target does not support SPE.
14150 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14152 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14154 * linux-low.c (disabled_regsets, num_regsets): New.
14155 (use_regsets_p): Delete.
14156 (linux_wait_for_process): Clear disabled_regsets.
14157 (regsets_fetch_inferior_registers): Check and set it.
14158 (regsets_store_inferior_registers): Likewise.
14159 (linux_fetch_registers, linux_store_registers): Do not use
14161 (initialize_low): Allocate disabled_regsets.
14163 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14165 * Makefile.in (LIBOBJS): New.
14166 (OBS): Use LIBOBJS.
14167 (memmem.o): New rule.
14168 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14169 * configure: Regenerated.
14171 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14173 * server.c (handle_query): Never return "unsupported" for
14174 qXfer:features:read queries.
14176 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14178 * server.c (get_features_xml): Fix inverted condition.
14179 (handle_query): Always support qXfer:feature:read.
14181 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14183 * server.c (wrapper_argv): New.
14184 (start_inferior): Handle wrapper_argv. If set, expect an extra
14186 (gdbserver_usage): Document --wrapper.
14187 (main): Parse --wrapper.
14189 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14191 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14192 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14193 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14194 (ppc_set_pc): Likewise.
14195 (ppc_arch_setup): New function.
14196 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14197 of collect_register.
14198 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14200 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14202 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14203 instead of linux-ppc64-low.o.
14204 * linux-ppc64-low.c: Remove file.
14205 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14206 (linux-ppc64-low.o): Remove rule.
14208 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14209 (init_registers_powerpc_64): Likewise.
14210 (ppc_regmap): Conditionally define depending on __powerpc64__.
14211 (ppc_cannot_store_register): Do not special-case "fpscr" when
14212 compiled on __powerpc64__.
14213 (ppc_collect_ptrace_register): New function.
14214 (ppc_supply_ptrace_register): New function.
14215 (ppc_breakpoint): Change type to "unsigned int".
14216 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14217 (the_low_target): Conditionally provide initializers for the
14218 arch_setup member depending on __powerpc64__. Install
14219 collect_ptrace_register and supply_ptrace_register members.
14221 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14223 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14224 * server.c (gdbserver_xmltarget): Define.
14225 (get_features_xml): Use it to replace "target.xml" and arch_string.
14227 * configure.srv: Remove srv_xmltarget. Add XML files that were
14228 mentioned there to srv_xmlfiles instead. Remove conditional tests
14229 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14230 srv_xmlfiles and srv_regobj to include all possible choices.
14231 * configure.ac (srv_xmltarget): Remove.
14232 (srv_xmlfiles): Do not add "target.xml".
14233 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14234 checks for supplementary target information.
14235 * configure: Regenerate.
14236 * Makefile.in (XML_TARGET): Remove.
14237 (target.xml): Remove rule.
14238 (clean): Do not clean up target.xml.
14239 (.PRECIOUS): Do not mention target.xml.
14241 * target.h (struct target_ops): Remove arch_string member.
14242 * linux-low.c (linux_arch_string): Remove.
14243 (linux_target_ops): Remove arch_string initializer.
14244 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14245 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14246 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14247 * spu-low.c (spu_arch_string): Remove.
14248 (spu_target_ops): Remove arch_string initializer.
14249 * win32-low.c (win32_arch_string): Remove.
14250 (win32_target_ops): Remove arch_string initializer.
14251 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14252 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14253 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14255 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14257 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14258 by collect_ptrace_register and supply_ptrace_register hooks.
14259 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14260 instead of checking for the_low_target.left_pad_xfer.
14261 (usr_store_inferior_registers): Use collect_ptrace_register callback
14262 instead of checking for the_low_target.left_pad_xfer.
14264 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14265 (s390_supply_ptrace_register): Likewise.
14266 (s390_fill_gregset): Call s390_collect_ptrace_register.
14267 (the_low_target): Update.
14269 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14270 (ppc_supply_ptrace_register): Likewise.
14271 (the_low_target): Update.
14273 * linux-i386-low.c (the_low_target): Update.
14274 * linux-x86-64-low.c (the_low_target): Update.
14276 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14278 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14279 reg-s390.o and reg-s390x.o.
14281 * linux-low.c (new_inferior): New global variable.
14282 (linux_create_inferior, linux_attach): Set it.
14283 (linux_wait_for_process): Call the_low_target.arch_setup after the
14284 target has stopped for the first time.
14285 (initialize_low): Do not call the_low_target.arch_setup.
14287 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14288 (s390_set_pc): Likewise.
14289 (s390_arch_setup): New function.
14290 (the_low_target): Use s390_arch_setup as arch_setup routine.
14292 * regcache.c (realloc_register_cache): New function.
14293 (set_register_cache): Call it for each existing regcache.
14295 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14297 * server.h (init_registers): Remove prototype.
14299 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14300 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14301 instead of init_registers ().
14302 * linux-arm-low.c (init_registers_arm): Add prototype.
14303 (init_registers_arm_with_iwmmxt): Likewise.
14304 (the_low_target): Add initializer for arch_setup field.
14305 * linux-cris-low.c (init_registers_cris): Add prototype.
14306 (the_low_target): Add initializer for arch_setup field.
14307 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14308 (the_low_target): Add initializer for arch_setup field.
14309 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14310 (the_low_target): Add initializer for arch_setup field.
14311 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14312 (the_low_target): Add initializer for arch_setup field.
14313 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14314 (the_low_target): Add initializer for arch_setup field.
14315 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14316 (the_low_target): Add initializer for arch_setup field.
14317 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14318 (init_registers_mips64_linux): Likewise.
14319 (the_low_target): Add initializer for arch_setup field.
14320 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14321 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14322 (the_low_target): Add initializer for arch_setup field.
14323 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14324 (init_registers_powerpc_64): Likewise.
14325 (the_low_target): Add initializer for arch_setup field.
14326 * linux-s390-low.c (init_registers_s390): Add prototype.
14327 (init_registers_s390x): Likewise.
14328 (the_low_target): Add initializer for arch_setup field.
14329 * linux-sh-low.c (init_registers_sh): Add prototype.
14330 (the_low_target): Add initializer for arch_setup field.
14331 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14332 (the_low_target): Add initializer for arch_setup field.
14333 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14334 (the_low_target): Add initializer for arch_setup field.
14336 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14337 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14338 instead of init_registers ().
14339 * win32-arm-low.c (init_registers_arm): Add prototype.
14340 (the_low_target): Add initializer for arch_setup field.
14341 * win32-i386-low.c (init_registers_i386): Add prototype.
14342 (the_low_target): Add initializer for arch_setup field.
14344 * spu-low.c (init_registers_spu): Add prototype.
14345 (initialize_low): Call initialie_registers_spu () instead of
14346 initialize_registers ().
14348 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14350 * server.c (handle_v_requests): When handling the vRun and vAttach
14351 packets, if already debugging a process, don't kill it. Return an
14354 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14356 * server.c (handle_query): Correct length check.
14358 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14360 * win32-low.c (do_initial_child_stuff): Add process handle
14361 parameter. Set current_process_handle and current_process_id from the
14362 parameters. Clear globals.
14363 (win32_create_inferior): Don't set current_process_handle and
14364 current_process_id here. Instead pass them on the call to
14365 do_initial_child_stuff.
14366 (win32_attach): Likewise.
14367 (win32_clear_inferiors): New.
14368 (win32_kill): Don't close the current process handle or the
14369 current thread handle here. Instead call win32_clear_inferiors.
14370 (win32_detach): Don't open a new handle to the process. Call
14371 win32_clear_inferiors.
14372 (win32_join): Don't rely on current_process_handle; open a new
14373 handle using the process id.
14374 (win32_wait): Call win32_clear_inferiors when the inferior process
14377 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14379 * server.c (monitor_show_help): Add "exit".
14381 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14383 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14384 (clean): Add reg-xtensa.c.
14385 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14386 * configure.srv (xtensa*-*-linux*) New target.
14387 * linux-xtensa-low.c: New.
14388 * xtensa-xtregs.c: New.
14390 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14392 * hostio.c: Don't include errno.h.
14393 (errno_to_fileio_errno): Move to hostio-errno.
14394 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14395 error number outputting to the target->hostio_last_error callback.
14396 (hostio_packet_error): Use FILEIO_EINVAL directly.
14397 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14398 calls to hostio_error.
14399 * hostio-errno.c: New.
14400 * server.h (hostio_last_error_from_errno): Declare.
14401 * target.h (target_ops): Add hostio_last_error member.
14402 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14403 as hostio_last_error handler.
14404 * spu-low.c (spu_target_ops): Likewise.
14405 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14406 (wince_hostio_last_error): New functions.
14407 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14408 as hostio_last_error handler.
14409 (win32_target_ops) [!_WIN32_WCE]: Register
14410 hostio_last_error_from_errno as hostio_last_error handler.
14411 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14412 (hostio-errno.o): New rule.
14413 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14414 * configure.srv (srv_hostio_err_objs): New variable. Default to
14416 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14417 * configure: Regenerate.
14419 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14421 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14422 (linux_kill, linux_detach): Clean up the process list.
14423 * remote-utils.c (remote_open): Improve port number parsing.
14424 (putpkt_binary, input_interrupt): Only send interrupts if the target
14426 * server.c (extended_protocol): Make static.
14427 (attached): Define earlier.
14428 (exit_requested, response_needed, program_argv): New variables.
14429 (target_running): New.
14430 (start_inferior): Clear attached here.
14431 (attach_inferior): Set attached here.
14432 (require_running): Define.
14433 (handle_query): Use require_running and target_running. Implement
14435 (handle_v_attach, handle_v_run): New.
14436 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14437 (gdbserver_usage): Update.
14438 (main): Redo argument parsing. Handle --debug and --multi. Handle
14439 --attach along with other options or after the port. Save
14440 program_argv. Support no initial program. Resynchronize
14441 communication with GDB after an error. Handle "monitor exit".
14442 Use require_running and target_running. Always allow the extended
14443 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14444 restart in extended mode.
14445 * README: Refer to the GDB manual. Update --attach usage.
14447 2007-12-20 Andreas Schwab <schwab@suse.de>
14449 * linux-low.c (STACK_SIZE): Define.
14450 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14451 (linux_test_for_tracefork): Likewise.
14453 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14455 * linux-low.c (linux_wait_for_event): Update messages. Do not
14456 reinsert auto-delete breakpoints.
14457 * mem-break.c (struct breakpoint): Change return type of handler to
14459 (set_breakpoint_at): Update handler type.
14460 (reinsert_breakpoint_handler): Return 1 instead of calling
14462 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14464 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14465 * mem-break.h (set_breakpoint_at): Update handler type.
14466 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14467 * win32-low.c (auto_delete_breakpoint): New.
14468 (get_child_debug_event): Use it.
14470 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14472 * configure.ac: Check for pread and pwrite.
14473 * hostio.c (handle_pread): Fall back to lseek and read.
14474 (handle_pwrite): Fall back to lseek and write.
14475 * config.in, configure: Regenerated.
14477 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14479 * server.c (myresume): Add own_buf argument.
14480 (main): Update calls.
14482 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14484 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14485 * remote-utils.c (remote_open): Do not call disable_async_io.
14486 (block_async_io): Delete.
14487 (unblock_async_io): Make static.
14488 (initialize_async_io): New.
14489 * server.c (handle_v_cont): Handle async I/O here.
14490 (myresume): Likewise. Move other common resume tasks here...
14491 (main): ... from here. Call initialize_async_io. Disable async
14492 I/O before the main loop.
14493 * server.h (initialize_async_io): Declare.
14494 (block_async_io, unblock_async_io): Delete prototypes.
14495 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14497 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14499 * remote-utils.c (readchar): Allow binary data in received messages.
14501 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14503 * win32-low.c (attaching): New global.
14504 (win32_create_inferior): Clear the `attaching' global.
14505 (win32_attach): Set the `attaching' global.
14506 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14507 attaching. Only set a breakpoint at the entry point if not
14510 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14512 * server.c (main): Don't report dll events on the initial
14513 connection on attaches.
14515 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14517 * server.c (main): Relax numerical bases supported for the pid of
14518 the --attach command line argument.
14520 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14522 * win32-low.c (win32_attach): Call OpenProcess before
14523 DebugActiveProcess, not after. Add last error output to error
14526 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14528 * win32-low.c (win32_get_thread_context)
14529 (win32_set_thread_context): New functions.
14530 (thread_rec): Use win32_get_thread_context.
14531 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14532 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14535 2007-12-03 Leo Zayas
14536 Pedro Alves <pedro_alves@portugalmail.pt>
14538 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14540 (child_add_thread): Minor cleanup.
14541 (child_continue): Resume artificially suspended threads before
14542 calling ContinueDebugEvent.
14543 (suspend_one_thread): New.
14544 (fake_breakpoint_event): New.
14545 (get_child_debug_event): Change return type to int. Check here if
14546 gdb sent an interrupt request. If a soft interrupt was requested,
14547 fake a breakpoint event. Return 0 if there is no event to handle,
14549 (win32_wait): Don't check here if gdb sent an interrupt request.
14550 Ensure there is a valid event to handle.
14551 (win32_request_interrupt): Add soft interruption method as last
14554 2007-12-03 Leo Zayas
14555 Pedro Alves <pedro_alves@portugalmail.pt>
14557 * win32-low.h (win32_thread_info): Add descriptions to the
14558 structure members. Replace `suspend_count' counter by a
14560 * win32-low.c (thread_rec): Update condition of when to get the
14561 context from the inferior. Rely on ContextFlags being set if it
14562 has already been retrieved. Only suspend the inferior thread if
14563 we haven't already. Warn if that fails.
14564 (continue_one_thread): s/suspend_count/suspended/. Only call
14565 ResumeThread once. Warn if that fails.
14567 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14569 * win32-low.c (win32_wait): Don't read from the inferior when it
14570 has already exited.
14572 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14574 * Makefile.in (win32_low_h): New variable.
14575 (win32-low.o): Add dependency on $(win32_low_h).
14576 (win32-arm-low.o, win32-i386-low.o): New rules.
14578 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14580 * hostio.c: Correct copyright year.
14582 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14584 * Makefile.in (OBS): Add hostio.o.
14585 (hostio.o): New rule.
14586 * server.h (handle_vFile): Declare.
14587 * hostio.c: New file.
14588 * server.c (handle_v_requests): Take packet_len and new_packet_len
14589 for binary packets. Call handle_vFile.
14590 (main): Update call to handle_v_requests.
14592 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14594 * linux-low.c: Include <sched.h>.
14596 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14598 * linux-low.c (linux_tracefork_grandchild): New.
14599 (linux_tracefork_child): Use clone.
14600 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14602 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14604 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14606 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14608 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14610 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14612 * inferiors.c (change_inferior_id): Delete.
14613 (add_pid_to_list, pull_pid_from_list): New.
14614 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14615 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14616 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14617 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14618 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14619 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14620 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14621 (using_threads): Always set to 1.
14622 (handle_extended_wait): New.
14623 (add_process): Do not set TID.
14624 (linux_create_inferior): Set must_set_ptrace_flags.
14625 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14626 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14627 (linux_thread_alive): Rename TID argument to LWPID.
14628 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14629 (linux_wait_for_event): Do not use TID or check using_threads. Update
14630 call to dead_thread_notify. Call handle_extended_wait.
14631 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14632 (send_sigstop): Delete sigstop_sent.
14633 (wait_for_sigstop): Avoid TID.
14634 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14635 (linux_test_for_tracefork): New.
14636 (linux_lookup_signals): Use thread_db_active and
14637 linux_supports_tracefork_flag.
14638 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14639 * linux-low.h (get_process_thread): Avoid TID.
14640 (struct process_ifo): Move thread_known and tid to the end. Remove
14642 (linux_attach_lwp, thread_db_init): Update prototypes.
14643 * server.h (change_inferior_id): Delete prototype.
14644 (add_pid_to_list, pull_pid_from_list): New prototypes.
14645 * thread-db.c (thread_db_use_events): New.
14646 (find_first_thread): Rename to...
14647 (find_one_thread): ...this. Update callers and messages. Do not
14648 call fatal. Check thread_db_use_events. Do not call
14649 change_inferior_id or new_thread_notify.
14650 (maybe_attach_thread): Update. Do not call new_thread_notify.
14651 (thread_db_init): Set thread_db_use_events. Check use_events.
14652 * utils.c (fatal, warning): Correct message prefix.
14654 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14656 * Makefile.in (clean): Remove new files.
14657 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14658 (powerpc-64.o, powerpc-64.c): New rules.
14659 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14660 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14662 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14664 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14665 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14666 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14667 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14668 (target_regsets): Add AltiVec and SPE register sets.
14669 * configure.ac: Check for AltiVec and SPE.
14670 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14671 (ppc_fill_vrregset, ppc_store_vrregset): New.
14672 (target_regsets): Add AltiVec register set.
14673 * configure: Regenerated.
14675 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14677 * linux-low.c (O_LARGEFILE): Define.
14678 (linux_read_memory): Use /proc/PID/mem.
14679 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14680 * configure, config.in: Regenerated.
14682 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14684 * linux-low.c (linux_wait_for_event): Do not pass signals while
14687 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14689 * win32-low.c (create_process): New.
14690 (win32_create_inferior): Use create_process instead of
14691 CreateProcess. If create_process failed retry appending an ".exe"
14692 suffix. Store the GetLastError result immediatelly after
14693 create_process calls and use it on the call to error.
14695 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14697 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14699 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14701 * configure.ac: Switch license to GPLv3.
14703 2007-08-01 Michael Snyder <msnyder@access-company.com>
14705 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14707 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14709 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14711 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14712 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14713 CloseToolhelp32Snapshot.
14714 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14715 CloseToolhelp32Snapshot.
14717 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14719 * server.c (main): Check for inferior exit before main loop.
14721 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14723 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14724 instead of on tmp_desc.
14726 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14727 Daniel Jacobowitz <dan@codesourcery.com>
14729 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14730 (add_thread): Minor cleanups.
14731 (clear_inferiors): Move lower in the file. Clear the DLL
14733 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14734 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14735 (xml_escape_text): New.
14736 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14738 (handle_v_cont): Report errors.
14739 (gdbserver_version): Update.
14740 (main): Correct size of own_buf. Do not report initial DLL events.
14741 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14742 (unloaded_dll, xml_escape_text): New.
14743 * win32-low.c (enum target_waitkind): Update comments.
14744 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14745 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14746 (win32_EnumProcessModules, win32_GetModuleInformation)
14747 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14748 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14749 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14750 (win32_Module32First, win32_Module32Next, load_toolhelp)
14751 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14752 (get_child_debug_event): Handle DLL events.
14753 (win32_wait): Likewise.
14755 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14757 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14758 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14760 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14762 * win32-low.c (handle_output_debug_string): Ignore event if not
14765 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14767 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14769 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14771 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14773 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14775 * inferiors.c (change_inferior_id): Add comment.
14776 * linux-low.c (check_removed_breakpoint): Add an early
14777 prototype. Improve debug output.
14778 (linux_attach): Doc update.
14779 (linux_detach_one_process, linux_detach): Clean up before releasing
14781 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14782 * linux-low.h (struct process_info): Doc improvement.
14783 * mem-break.c (delete_all_breakpoints): New.
14784 * mem-break.h (delete_all_breakpoints): New prototype.
14785 * thread-db.c (find_first_thread): New.
14786 (thread_db_create_event): Call it instead of
14787 thread_db_find_new_threads. Clean up unused variables.
14788 (maybe_attach_thread): Remove first thread handling.
14789 (thread_db_find_new_threads): Use find_first_thread.
14790 (thread_db_get_tls_address): Likewise.
14792 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14794 * thread-db.c (thread_db_find_new_threads): Add prototype.
14795 (thread_db_create_event): Check for the main thread before adding
14797 (maybe_attach_thread): Only enable event reporting if TID == 0.
14798 (thread_db_get_tls_address): Check for new threads.
14800 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14802 * linux-low.c (linux_create_inferior): Try execv before execvp.
14803 * spu-low.c (spu_create_inferior): Likewise.
14805 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14807 * linux-low.c (linux_create_inferior): Change execv to execvp.
14808 * spu-low.c (spu_create_inferior): Likewies.
14810 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14812 * Makefile.in (clean): Clean new files instead of deleted ones.
14813 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14814 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14816 * configure.srv: Specify XML files and new regformats for MIPS and
14818 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14819 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14820 an entry for the restart register.
14821 (mips_cannot_fetch_register, mips_cannot_store_register)
14822 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14823 register names to match the XML descriptions.
14824 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14825 restart register instead of $0.
14827 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14828 Markus Deuling <deuling@de.ibm.com>
14830 * remote-utils.c (decode_xfer_write): New function.
14831 * server.h (decode_xfer_write): Add prototype.
14832 * server.c (handle_query): Add PACKET_LEN argument. Support
14833 qXfer:spu:read and qXfer:spu:write packets.
14834 (main): Pass packet_len to handle_query.
14835 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14836 * target.h (target_ops): Add qxfer_spu.
14838 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14840 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14841 accessing non-seekable spufs files.
14843 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14845 * server.c (handle_query): Add reply for qC packet.
14847 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14848 Leo Zayas <lerele@champenstudios@com>
14850 * server.h (check_remote_input_interrupt_request): New function.
14851 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14852 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14853 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14854 (check_remote_input_interrupt_request): New function.
14855 * server.h (check_remote_input_interrupt_request): Declare.
14856 * win32-low.c (winapi_DebugBreakProcess,
14857 winapi_GenerateConsoleCtrlEvent): New typedefs.
14858 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14860 (win32_wait): Check for remote interrupt request
14861 with check_remote_input_interrupt_request.
14862 (win32_request_interrupt): New function.
14863 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14865 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14867 * win32-low.c (debug_registers_changed,
14868 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14869 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14870 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14871 (thread_rec): Get context using the low target.
14872 (child_add_thread): Call thread_added on the low target,
14873 which does the same thing.
14875 (do_initial_child_stuff): Remove debug registers references.
14876 Set context using the low target. Resume threads after
14877 setting the contexts.
14878 (child_continue): Remove dead variable. Remove debug
14879 registers references.
14880 (child_fetch_inferior_registers): Go through the low target.
14881 (do_child_store_inferior_registers): Remove.
14882 (child_store_inferior_registers): Go through the low target.
14883 (win32_resume): Remove debug registers references.
14884 Set context using the low target.
14885 (handle_exception): Change return type to void. Don't record
14886 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14887 first chance exception.
14888 (get_child_debug_event): Change return type to void. Remove
14889 goto loop. Always return after waiting for debug event.
14890 (win32_wait): Convert to switch statement. Handle spurious
14893 * win32-i386-low.c (debug_registers_changed,
14894 debug_registers_used): New.
14895 (initial_stuff): Rename to ...
14896 (i386_initial_stuff): ... this. Clear debug registers
14898 (store_debug_registers): Delete.
14899 (i386_get_thread_context): New.
14900 (load_debug_registers): Delete.
14901 (i386_set_thread_context): New.
14902 (i386_thread_added): New.
14903 (single_step): Rename to ...
14904 (i386_single_step): ... this.
14905 (do_fetch_inferior_registers): Rename to ...
14906 (i386_fetch_inferior_register): ... this.
14907 (i386_store_inferior_register): New.
14908 (the_low_target): Adapt to new interface.
14910 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14911 (arm_get_thread_context): New.
14912 (arm_set_thread_context): New.
14914 (do_fetch_inferior_registers): Rename to ...
14915 (arm_fetch_inferior_register): ... this.
14916 (arm_store_inferior_register): New.
14917 (arm_wince_breakpoint): Reimplement as unsigned long.
14918 (arm_wince_breakpoint_len): Define.
14919 (the_low_target): Adapt to new interface.
14921 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14922 load_debug_registers. Add get_thread_context, set_thread_context,
14923 thread_added and store_inferior_register. Rename
14924 fetch_inferior_registers to fetch_inferior_register.
14925 (regptr): Remove declaration.
14927 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14929 * linux-low.c (linux_detach): Change return type to int. Return 0.
14930 * spu-low.c (spu_detach): Likewise.
14932 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14934 * target.h (target_ops): Change return type of detach to int.
14936 (join_inferior): New.
14937 * server.c (main): Don't skip detach support on mingw32.
14938 If the inferior doesn't support detaching return error.
14939 Call join_inferior instead of using waitpid.
14940 * linux-low.c (linux_join): New.
14941 (linux_target_op): Add linux_join.
14942 * spu-low.c (spu_join): New.
14943 (spu_target_ops): Add spu_join.
14944 * win32-low.c (win32_detach): Adapt to new interface.
14945 Reopen current_process_handle before detaching. Issue a child
14946 resume before detaching.
14948 (win32_target_op): Add win32_join.
14950 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14952 * win32-low.c (win32-attach): Fix return value.
14953 * target.h (target_ops): Describe ATTACH return values.
14955 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14957 * win32-low.c (GETPROCADDRESS): Define.
14958 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14959 (winapi_DebugSetProcessKillOnExit): Likewise.
14960 (win32_create_inferior): Force usage of ansi CreateProcessA.
14961 (win32_attach): Use GETPROCADDRESS.
14962 (win32_detach): Likewise.
14964 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14966 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14968 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14970 * win32-low.c: Commit leftover changes from 2007-03-29.
14972 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14974 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14975 fields short instead of int. Add explicit padding.
14976 (i387_cache_to_fsave): Remove unnecessary casts.
14977 (i387_fsave_to_cache): Doc fix.
14978 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14980 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14982 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14983 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14985 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14987 * configure.srv (arm*-*-mingw32ce*): Move near the other
14990 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14992 * configure.ac: Add errno checking.
14993 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14994 sys/file.h and malloc.h.
14995 (AC_CHECK_DECLS): Add perror.
14996 (srv_mingwce): Handle.
14997 * configure.srv (i[34567]86-*-cygwin*): Add
14998 win32-i386-low.o to srv_tgtobj.
14999 (i[34567]86-*-mingw*): Likewise.
15000 (arm*-*-mingw32ce*): Add case.
15001 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15002 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15003 [__MINGW32CE__] (strerror): New function.
15004 [__MINGW32CE__] (errno): Define to GetLastError.
15005 [__MINGW32CE__] (COUNTOF): New macro.
15006 (remote_open): Remove extra close call.
15007 * mem-break.c (delete_breakpoint_at): New function.
15008 * mem-break.h (delete_breakpoint_at): Declare.
15009 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15010 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15011 [USE_WIN32API] (read, write): Add char* casts.
15012 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15013 * server.h: Include wincecompat.h on Windows CE.
15014 [HAVE_ERRNO_H]: Check.
15015 (perror): Declare if not declared.
15016 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15017 (perror_with_name): Remove errno declaration.
15018 * wincecompat.h: New.
15019 * wincecompat.c: New.
15020 * win32-low.h: New.
15021 * win32-arm-low.c: New.
15022 * win32-i386-low.c: New.
15023 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15024 (OUTMSG2): Make it safe.
15026 (COUNTOF): New macro.
15027 (NUM_REGS): Get it from the low target.
15028 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15029 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15030 (thread_rec): Let low target handle debug registers.
15031 (child_add_thread): Likewise.
15032 (child_init_thread_list): Likewise.
15033 (continue_one_thread): Likewise.
15035 (do_child_fetch_inferior_registers): Move to ...
15036 * win32-i386-low.c: ... here, and rename to ...
15037 (do_fetch_inferior_registers): ... this.
15038 * win32-low.c (child_fetch_inferior_registers):
15039 Go through the low target.
15040 (do_child_store_inferior_registers): Use regptr.
15041 (strwinerror): New function.
15042 (win32_create_inferior): Handle Windows CE.
15043 Use strwinerror instead of strerror on Windows error
15044 codes. Add program to the error output.
15045 Don't close the main thread handle on Windows CE.
15046 (win32_attach): Use coredll.dll on Windows CE.
15047 (win32_kill): Close current process and current
15049 (win32_detach): Use coredll.dll on Windows CE.
15050 (win32_resume): Let low target handle debug registers, and
15052 (handle_exception): Add/Remove initial breakpoint. Avoid
15053 non-existant WSTOPSIG on Windows CE.
15054 (win32_read_inferior_memory): Cast to remove warning.
15055 (win32_arch_string): Go through the low target.
15056 (initialize_low): Call set_breakpoint_data with the low
15057 target's breakpoint.
15058 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15059 FOP_REGNUM, mappings): Move to ...
15060 * win32-i386-low.c: ... here.
15061 * win32-low.c (win32_thread_info): Move to ...
15062 * win32-low.h: ... here.
15063 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15064 win32-arm-low.c and wincecompat.c.
15065 (all:): Add $EXEEXT.
15066 (install-only:): Likewise.
15067 (gdbserver:): Likewise.
15068 (gdbreplay:): Likewise.
15069 * config.in: Regenerate.
15070 * configure: Regenerate.
15072 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15074 * win32-low.c: Rename typedef thread_info to
15075 win32_thread_info throughout.
15077 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15079 * win32-i386-low.c: Rename to ...
15080 * win32-low.c: ... this.
15081 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15082 * Makefile.in: Likewise.
15084 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15086 * remote-utils.c (monitor_output): Constify msg parameter.
15087 * server.h (monitor_output): Likewise.
15088 * win32-i386-low.c (handle_output_debug_string): New.
15089 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15090 handle_output_debug_string.
15091 (get_child_debug_event): Likewise.
15093 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15095 * server.c (main): Correct strtoul check.
15097 2007-03-27 Jon Ringle <jon@ringle.org>
15099 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15101 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15103 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15105 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15107 * terminal.h: Check HAVE_SGTTY_H.
15109 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15111 * remote-utils.c (remote_open): Print out the assigned port number.
15113 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15115 * remote-utils.c (monitor_output): New function.
15116 * server.c (debug_threads): Define here.
15117 (monitor_show_help): New function.
15118 (handle_query): Handle qRcmd.
15119 (main): Do not handle 'd' packet.
15120 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15121 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15124 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15126 * Makefile.in (EXEEXT): New.
15127 (clean): Use $(EXEEXT).
15129 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15131 * target.h (target_ops): Rename send_signal to request_interrupt,
15132 and remove enum target_signal parameter.
15133 * linux-low.c (linux_request_interrupt): Rename from
15134 linux_send_signal, and always send SIGINT.
15135 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15136 and always send SIGINT.
15137 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15139 (input_interrupt): Likewise.
15141 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15143 * server.c (get_features_xml): Check if target implemented
15145 * win32-i386-low.c (win32_arch_string): New.
15146 (win32_target_ops): Add win32_arch_string as arch_string member.
15148 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15150 * spu-low.c (spu_arch_string): New.
15151 (spu_target_ops): Add spu_arch_string.
15153 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15155 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15156 * configure.ac: Do not check for terminal.h.
15157 * configure, config.in: Regenerated.
15159 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15161 * Makefile.in (OBS): Add $(XML_BUILTIN).
15162 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15164 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15165 (arm-with-iwmmxt.c): New.
15166 * config.in, configure: Regenerate.
15167 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15168 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15169 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15170 (arm*-*-linux*): Add iWMMXt and regset support.
15171 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15172 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15173 (arm_store_wmmxregset, target_regsets): New.
15174 * server.c (get_features_xml): Take annex argument. Check builtin
15176 (handle_query): Handle multiple annexes.
15178 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15180 * remote-utils.c [USE_WIN32API] (read, write): Define.
15181 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15184 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15186 * linux-i386-low.c (the_low_target): Set arch_string.
15187 * linux-x86-64-low.c (the_low_target): Likewise.
15188 * linux-low.c (linux_arch_string): New.
15189 (linux_target_ops): Add it.
15190 * linux-low.h (struct linux_target_ops): Add arch_string.
15191 * server.c (write_qxfer_response): Use const void * for DATA.
15192 (get_features_xml): New.
15193 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15194 * target.h (struct target_ops): Add arch_string method.
15196 2007-01-03 Denis Pilat <denis.pilat@st.com>
15197 Daniel Jacobowitz <dan@codesourcery.com>
15199 * linux-low.c (linux_kill): Handle being called with no threads.
15200 * win32-i386-low.c (win32_kill): Likewise.
15201 (get_child_debug_event): Clear current_process_handle.
15203 2006-12-30 Denis PILAT <denis.pilat@st.com>
15204 Daniel Jacobowitz <dan@codesourcery.com>
15206 * remote-utils.c (remote_open): Check the type of specified
15207 serial port devices before opening them.
15208 * server.c (main): Kill the inferior if an error occurs during
15209 the first remote_open.
15211 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15213 * README: Update supported targets.
15215 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15217 * Makefile.in (clean): Remove reg-mips64.c.
15218 (reg-mips64.c, reg-mips64.o): New rules.
15219 * configure.srv: Handle mips64. Include regset support for mips.
15220 * linux-mips-low.c (union mips_register): New.
15221 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15222 (mips_breakpoint, mips_breakpoint_at): Use int.
15223 (mips_collect_register, mips_supply_register)
15224 (mips_collect_register_32bit, mips_supply_register_32bit)
15225 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15226 (mips_store_fpregset, target_regsets): New.
15227 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15229 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15231 * configure.srv: Add target "spu*-*-*".
15232 * Makefile.in (clean): Remove reg-spu.c.
15233 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15234 * spu-low.c: New file.
15236 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15238 * configure.ac: Correct td_thr_tls_get_addr test.
15239 * configure: Regenerated.
15241 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15243 * linux-low.c (linux_wait_for_event): Reformat. Use the
15244 pass_signals array.
15245 * remote-utils.c (decode_address_to_semicolon): New.
15246 * server.c (pass_signals, handle_general_set): New.
15247 (handle_query): Mention QPassSignals for qSupported.
15248 (main): Call handle_general_set.
15249 * server.h (pass_signals, decode_address_to_semicolon): New.
15251 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15253 * server.c (handle_query): Correct error handling for read_auxv.
15255 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15257 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15258 and srv_linux_thread_db to yes.
15259 * linux-s390-low.c (s390_fill_gregset): New function.
15260 (target_regsets): Define data structure.
15262 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15264 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15265 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15266 * config.in, configure: Regenerated.
15267 * inferiors.c (gdb_id_to_thread): New function.
15268 (gdb_id_to_thread_id): Use it.
15269 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15270 * linux-low.h (struct process_info): Add th member.
15271 (thread_db_get_tls_address): New prototype.
15272 * remote-utils.c (decode_address): Make non-static.
15273 * server.c (handle_query): Handle qGetTLSAddr.
15274 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15275 * target.h (struct target_ops): Add get_tls_address.
15276 * thread-db.c (maybe_attach_thread): Save the thread handle.
15277 (thread_db_get_tls_address): New.
15279 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15281 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15282 (linux_resume_one_process): Take a siginfo_t *. Update all
15283 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15284 (struct pending_signals): Add a siginfo_t.
15285 (linux_wait_for_process): Always set last_status.
15286 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15287 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15288 * linux-low.h (struct process_info): Add last_status.
15290 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15292 * remote-utils.c (try_rle): New function.
15293 (putpkt_binary): Use it.
15295 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15297 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15298 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15299 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15300 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15301 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15304 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15306 * server.c (terminal_fd): New variable.
15307 (old_foreground_pgrp): Likewise.
15308 (restore_old_foreground_pgrp): New function.
15309 (start_inferior): Record the terminal file descriptor in terminal_fd
15310 and its original foreground group in old_foreground_pgrp. Register
15311 restore_old_foreground_pgrp with atexit().
15313 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15315 * server.c (handle_query): Correct qPart to qXfer.
15317 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15319 * configure.ac: Check for more headers which are missing on
15320 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15321 * configure.srv: Add Cygwin and mingw32.
15322 * remote-utils.c: Don't include headers unconditionally which
15323 are missing on mingw32. Include <winsock.h> for mingw32.
15324 (remote_open): Adjust for mingw32 support. Flush
15325 standard error after writing to it.
15326 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15327 (unblock_async_io, enable_async_io, disable_async_io)
15328 (readchar, getpkt): Update for Winsock support.
15329 (prepare_resume_reply): Expect a protocol signal number.
15330 * server.c: Disable <sys/wait.h> on mingw32.
15331 (start_inferior): Adjust for mingw32 support. Flush
15332 standard error after writing to it.
15333 (attach_inferior): Likewise. Use protocol signal
15335 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15337 * win32-i386-low.c: New file.
15338 * Makefile.in (XM_CLIBS): Set.
15339 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15340 (win32-i386-low.o): New dependency rule.
15341 * linux-low.c (linux_wait): Use target signal numbers.
15342 * target.h (struct target_ops): Doc fix.
15343 * server.h (target_signal_to_name): New prototype.
15344 * gdbreplay.c: Don't include headers unconditionally which
15345 are missing on mingw32. Include <winsock.h> for mingw32.
15346 (remote_close, remote_open): Adjust for Winsock support.
15347 * configure, config.in: Regenerated.
15349 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15351 * server.c (decode_xfer_read, write_qxfer_response): New.
15352 (handle_query): Take a packet length argument. Handle
15353 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15354 the qSupported response.
15355 (main): Update call to handle_query.
15357 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15359 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15360 (putpkt_binary): Renamed from putpkt and adjusted for binary
15362 (putpkt): New wrapper for putpkt_binary.
15363 (readchar): Don't mask off the high bit.
15364 (decode_X_packet): New function.
15365 * server.c (main): Call putpkt_binary if a handler sets the packet
15366 length. Save the length of the incoming packet. Handle 'X'.
15367 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15369 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15371 * server.c (handle_query): Handle qSupported.
15373 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15375 * remote-utils.c (all_symbols_looked_up): New variable.
15376 (look_up_one_symbol): Check it.
15377 * server.h (look_up_one_symbol): New declaration.
15378 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15380 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15382 * Makefile.in (linux-arm-low.o): Update dependencies.
15383 * linux-arm-low.c: Include "gdb_proc_service.h".
15384 (PTRACE_GET_THREAD_AREA): Define.
15385 (ps_get_thread_area): New function.
15387 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15389 * configure.srv (m68k*-*-uclinux*): New target.
15390 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15391 (linux_resume_one_process): Remove extraneous cast.
15392 (linux_read_offsets): New.
15393 (linux_target_op): Add linux_read_offsets on mmuless systems.
15394 * server.c (handle_query): Add qOffsets logic.
15395 * target.h (struct target_ops): Add read_offsets.
15397 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15399 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15400 (PTRACE_GET_THREAD_AREA): Define.
15401 (ps_get_thread_area): New function.
15402 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15403 (linux-x86-64-low.o): Update.
15405 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15407 * configure.ac: Remove checks for prfpregset_t.
15408 * gdb_proc_service.h: New file.
15409 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15410 new "gdb_proc_service.h".
15411 * proc-service.c: Likewise.
15412 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15413 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15414 * Makefile.in (gdb_proc_service_h): Updated.
15415 * configure, config.in: Regenerated.
15417 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15419 * remote-utils.c (prepare_resume_reply): Move declaration
15420 of gdb_id_from_wait to the top of the block.
15422 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15424 * linux-low.c (regsets_store_inferior_registers): Read the regset
15425 from the target before filling it.
15427 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15429 * server.c (attach_inferior): Return SIGTRAP for a successful
15432 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15434 * Makefile.in (OBS): Add version.o.
15435 (STAGESTUFF): Delete.
15436 (version.o): Add dependencies.
15437 (version.c): Replace rule.
15438 (clean): Remove version.c.
15439 * server.c (gdbserver_version): New.
15440 (gdbserver_usage): Use printf.
15441 (main): Handle --version and --help.
15442 * server.h (version, host_name): Add declarations.
15444 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15456 * linux-x86-64-low.c:
15458 * linux-s390-low.c:
15459 * linux-ppc64-low.c:
15461 * linux-mips-low.c:
15462 * linux-m68k-low.c:
15463 * linux-m32r-low.c:
15466 * linux-ia64-low.c:
15467 * linux-i386-low.c:
15468 * linux-crisv32-low.c:
15480 * gdbserver.1: Add (C) after Copyright. Update the FSF
15483 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15485 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15486 (arm_breakpoint_at): Recognize both breakpoints.
15487 (the_low_target): Use the correct breakpoint instruction.
15489 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15491 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15492 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15493 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15494 (the_low_target): Update.
15496 2005-10-25 Andreas Schwab <schwab@suse.de>
15498 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15500 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15501 (ia64_num_regs): Reduce to 462.
15503 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15505 * acinclude.m4: Correct quoting.
15506 * aclocal.m4: Regenerated.
15508 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15509 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15510 (thread_db_init): Call thread_db_err_str.
15511 * configure.ac: Check for TD_VERSION.
15512 * config.in, configure: Regenerated.
15514 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15516 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15518 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15520 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15521 is not available. Define HAVE_PTRACE_GETREGS if it is.
15522 * config.in, configure: Regenerated.
15523 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15524 * linux-i386-low.c, linux-m68k-low.c: Update to use
15525 HAVE_PTRACE_GETREGS.
15526 * linux-low.c (regsets_fetch_inferior_registers)
15527 (regsets_store_inferior_registers): Only return 0 if we processed
15529 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15530 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15532 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15534 * inferiors.c (struct thread_info): Add gdb_id.
15535 (add_thread): Add gdb_id argument.
15536 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15537 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15538 calls to add_thread.
15539 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15540 * server.c (handle_query): Use thread_to_gdb_id.
15541 (handle_v_cont, main): Use gdb_id_to_thread_id.
15542 * server.h (add_thread): Update prototype.
15543 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15546 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15548 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15549 left-padded registers.
15550 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15551 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15553 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15555 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15556 * configure: Regenerate.
15557 * config.in: Regenerate.
15558 * server.h (NEED_DECLARATION_STRERROR):
15559 Replace with !HAVE_DECL_STRERROR.
15561 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15563 * linux-low.c (linux_wait, linux_send_signal): Don't test
15564 an unsigned long variable for > 0 if it could be MAX_ULONG.
15565 * server.c (myresume): Likewise.
15566 * target.c (set_desired_inferior): Likewise.
15568 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15570 * configure.ac: Simplify and improve check for socklen_t.
15571 * configure, config.in: Regenerate.
15573 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15575 * acconfig.h: Remove.
15576 * configure.ac: Add a test for socklen_t. Use three-argument
15577 AC_DEFINE throughout.
15578 * config.in: Regenerated using autoheader 2.59.
15579 * configure: Regenerated.
15581 * gdbreplay.c (socklen_t): Provide a default.
15582 (remote_open): Use socklen_t.
15583 * remote-utils.c (socklen_t): Provide a default.
15584 (remote_open): Use socklen_t.
15585 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15588 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15590 * linux-low.c (linux_read_memory, linux_write_memory)
15591 (linux_read_auxv): Likewise.
15592 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15593 (check_mem_write): Likewise.
15594 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15596 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15597 (registers_from_string, register_data): Likewise.
15598 * server.c (handle_query, main): Likewise.
15599 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15600 (decode_M_packet): Likewise.
15601 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15602 * target.h (struct target_ops): Update read_memory, write_memory,
15604 (read_inferior_memory, write_inferior_memory): Update.
15605 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15606 to unsigned char *.
15607 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15608 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15609 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15610 linux-s390-low.c, linux-sh-low.c: Update for changes in
15611 read_inferior_memory and the_low_target->breakpoint.
15613 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15615 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15616 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15617 * configure.srv: Add powerpc64-*-linux*.
15618 * linux-ppc64-low.c: New file.
15620 2005-05-23 Orjan Friberg <orjanf@axis.com>
15622 * linux-cris-low.c: New file with support for CRIS.
15623 * linux-crisv32-low.c: Ditto for CRISv32.
15624 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15625 (clean): Add reg-cris.c and reg-crisv32.c.
15626 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15627 reg-crisv32.o, and reg-crisv32.c to make rules.
15628 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15629 recognized targets.
15631 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15633 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15634 of sizeof (PTRACE_XFER_TYPE).
15635 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15637 2005-05-12 Orjan Friberg <orjanf@axis.com>
15639 * target.h (struct target_ops): Add insert_watchpoint,
15640 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15641 pointers for hardware watchpoint support.
15642 * linux-low.h (struct linux_target_ops): Ditto.
15643 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15644 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15645 to linux_target_ops.
15646 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15648 * server.c (main): Recognize 'Z' and 'z' packets.
15650 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15652 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15653 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15654 (the_low_target): Add new members.
15656 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15658 * proc-service.c (ps_lgetregs): Search all_processes instead of
15661 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15663 * server.c (start_inferior): Change return type to int.
15664 (attach_inferior): Change sigptr to int *.
15665 (handle_v_cont, handle_v_requests): Change signal to int *.
15666 (main): Change signal to int.
15668 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15670 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15671 * configure.srv: Add m32r*-*-linux*.
15672 * linux-m32r-low.c: New file.
15674 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15676 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15678 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15680 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15681 Take unsigned long arguments for PIDs.
15682 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15683 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15684 (wait_for_sigstop, linux_resume_one_process)
15685 (regsets_fetch_inferior_registers, linux_send_signal)
15686 (linux_read_auxv): Likewise. Update the types of variables holding
15687 PIDs. Update format string specifiers.
15688 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15689 * remote-utils.c (prepare_resume_reply): Likewise.
15690 * server.c (cont_thread, general_thread, step_thread)
15691 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15693 (handle_query): Update format specifiers.
15694 (handle_v_cont, main): Use strtoul for thread IDs.
15695 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15696 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15697 (general_thread, step_thread, thread_from_wait)
15698 (old_thread_from_wait): Update.
15699 * target.h (struct thread_resume): Use unsigned long for THREAD.
15700 (struct target_ops): Use unsigned long for arguments to attach and
15703 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15705 * acinclude.m4: Include bfd/bfd.m4 directly.
15706 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15707 <agriffis@toolchain.org>.
15708 * aclocal.m4, configure: Regenerated.
15710 2005-01-07 Andrew Cagney <cagney@gnu.org>
15712 * configure.ac: Rename configure.in, require autoconf 2.59.
15713 * configure: Re-generate.
15715 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15717 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15718 LIBS when finished.
15719 * aclocal.m4: Regenerated.
15720 * configure: Regenerated.
15722 2004-11-21 Andreas Schwab <schwab@suse.de>
15724 * linux-m68k-low.c (m68k_num_gregs): Define.
15725 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15726 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15727 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15728 (m68k_breakpoint_at): New. Add to the_low_target.
15730 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15731 srv_linux_thread_db to yes.
15733 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15735 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15736 (ARCH_SET_FS): Likewise.
15737 (ARCH_GET_FS): Likewise.
15738 (ARCH_GET_GS): Likewise.
15740 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15742 * linux-i386-low.c (ps_get_thread_area): New.
15743 * linux-x86-64-low.c (ps_get_thread_area): New.
15744 * linux-low.c: Include <sys/syscall.h>.
15745 (linux_kill_one_process): Don't kill the first thread here.
15746 (linux_kill): Kill the first thread here.
15747 (kill_lwp): New function.
15748 (send_sigstop, linux_send_signal): Use it.
15749 * proc-service.c: Clean up #ifdefs.
15750 (fpregset_info): Delete.
15751 (ps_lgetregs): Update and enable implementation.
15752 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15754 * remote-utils.c (struct sym_cache, symbol_cache): New.
15755 (input_interrupt): Print a clearer message.
15756 (async_io_enabled): New variable.
15757 (enable_async_io, disable_async_io): Use it. Update comments.
15758 (look_up_one_symbol): Use the symbol cache.
15759 * thread-db.c (thread_db_look_up_symbols): New function.
15760 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15762 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15764 * configure.in: Test for -rdynamic.
15765 * configure: Regenerated.
15766 * Makefile (INTERNAL_LDFLAGS): New.
15767 (gdbserver, gdbreplay): Use it.
15769 2004-09-02 Andrew Cagney <cagney@gnu.org>
15771 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15773 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15775 * linux-low.c (linux_wait): Clear all_processes list also.
15777 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15779 * linux-low.c: Include <errno.h>. Remove extern declaration of
15782 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15784 * gdbreplay.c, server.h, utils.c: Update copyright years.
15786 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15788 * server.c (main): Print child status or termination signal from
15789 variable 'signal', not 'sig'.
15791 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15793 * linux-low.c (linux_read_memory): Change return type to
15794 int. Check for and return error from ptrace().
15795 * target.c (read_inferior_memory): Change return type to int. Pass
15796 back return status from the_target->read_memory().
15797 * target.h (struct target_ops): Adapt *read_memory() prototype.
15799 (read_inferior_memory): Adapt prototype.
15800 * server.c (main): Return an error packet if
15801 read_inferior_memory() returns an error.
15803 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15805 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15806 Unify with other clean targets.
15808 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15810 * server.c (handle_v_cont): Call set_desired_inferior.
15812 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15814 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15816 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15818 * linux-low.c (linux_wait): Unblock async I/O.
15819 (linux_resume): Block and enable async I/O.
15820 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15821 * server.h (block_async_io, unblock_async_io): Add prototypes.
15823 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15825 * remote-utils.c (remote_open): Print a status notice after
15826 opening a TCP port.
15827 * server.c (attach_inferior): Print a status notice after
15830 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15832 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15834 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15836 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15838 * server.c, target.h: Update copyright years.
15840 2004-02-25 Roland McGrath <roland@redhat.com>
15842 * target.h (struct target_ops): New member `read_auxv'.
15843 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15844 * linux-low.c (linux_read_auxv): New function.
15845 (linux_target_ops): Initialize `read_auxv' member to that.
15847 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15849 Committed by Jim Blandy <jimb@redhat.com>.
15851 * linux-s390-low.c (s390_num_regs): Update.
15852 (s390_regmap): Remove control registers. Use __s390x__ predefine
15853 instead of GPR_SIZE to distiguish s390 and s390x targets.
15855 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15857 * linux-low.c: Update copyright year.
15858 (check_removed_breakpoint): Clear pending_is_breakpoint.
15859 (linux_set_resume_request, linux_queue_one_thread)
15860 (resume_status_pending_p): New functions.
15861 (linux_continue_one_thread): Use process->resume.
15862 (linux_resume): Only resume threads if there are no pending events.
15863 * linux-low.h (struct process_info): Add resume request
15866 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15868 * regcache.c (new_register_cache): Clear the allocated register
15869 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15871 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15873 * linux-low.c (linux_resume): Take a struct thread_resume *
15875 (linux_wait): Update call.
15876 (resume_ptr): New static variable.
15877 (linux_continue_one_thread): Renamed from
15878 linux_continue_one_process. Use resume_ptr.
15879 (linux_resume): Use linux_continue_one_thread.
15880 * server.c (handle_v_cont, handle_v_requests): New functions.
15881 (myresume): New function.
15882 (main): Handle 'v' case.
15883 * target.h (struct thread_resume): New type.
15884 (struct target_ops): Change argument of "resume" to struct
15886 (myresume): Delete macro.
15888 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15890 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15891 (uninstall): Support DESTDIR.
15893 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15895 * configure.srv: Add xscale*linux copy of arm*linux entry.
15897 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15899 * linux-arm-low.c (arm_reinsert_addr): New function.
15900 (the_low_target): Add arm_reinsert_addr.
15902 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15904 * mem-break.c: Remove whitespace at end of file.
15906 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15908 * configure.in: Check whether we need to prototype strerror.
15909 * server.h: Optionally prototype strerror.
15910 * gdbreplay.c (perror_with_name): Use strerror.
15911 * linux-low.c (linux_attach_lwp): Use strerror.
15912 * utils.c (perror_with_name): Use strerror.
15913 * config.in, configure: Regenerated.
15915 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15917 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15918 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15920 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15922 * Makefile.in (SFILES): Update.
15923 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15924 low-sun3.c: Remove files.
15926 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15928 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15929 (linux_detach_one_process, linux_detach): New functions.
15930 (linux_target_ops): Add linux_detach.
15931 * server.c (main): Handle 'D' packet.
15932 * target.h (struct target_ops): Add "detach" member.
15933 (detach_inferior): Define.
15935 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15937 From Kelley Cook <kelleycook@wideopenwest.com>:
15938 * configure.srv: Accept i[34567]86 variants.
15940 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15942 * linux-low.c (linux_wait_for_event): Correct comment typos.
15943 (linux_resume_one_process): Call check_removed_breakpoint.
15944 (linux_send_signal): New function.
15945 (linux_target_ops): Add linux_send_signal.
15946 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15948 * target.h (struct target_ops): Add send_signal.
15950 2003-05-29 Jim Blandy <jimb@redhat.com>
15952 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15953 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15954 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15955 away part of the register's value.
15957 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15959 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15960 (linux_wait_for_event, linux_init_signals): Likewise.
15962 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15964 * configure.in: Check for stdlib.h.
15965 * configure: Regenerated.
15966 * config.in: Regenerated.
15968 2003-01-04 Andreas Schwab <schwab@suse.de>
15970 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15972 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15974 * Makefile.in: Remove obsolete code.
15976 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15978 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15979 defined(PT_FPR0_HI).
15981 2002-11-17 Stuart Hughes <seh@zee2.com>
15983 * linux-arm-low.c (arm_num_regs): Increase.
15984 (arm_regmap): Include status register.
15986 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15988 * linux-low.c (register_addr): Remove incorrect -1 check.
15990 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15992 * linux-low.c (linux_create_inferior): Call setpgid. Return
15994 (unstopped_p, linux_signal_pid): Remove.
15995 (linux_target_ops): Remove linux_signal_pid.
15996 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15997 global instead of target method.
15998 * target.h (struct target_ops): Remove signal_pid. Update comment
15999 for create_inferior.
16000 * server.c (signal_pid): New variable.
16001 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16002 gdbserver. Set the child to be the foreground process group.
16003 (attach_inferior): Set signal_pid.
16005 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16007 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16009 2002-08-20 Jim Blandy <jimb@redhat.com>
16011 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16014 2002-08-01 Andrew Cagney <cagney@redhat.com>
16016 * Makefile.in: Make chill references obsolete.
16018 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16020 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16021 * configure: Regenerate.
16022 * config.in: Regenerate.
16024 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16026 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16027 (perror_with_name, remote_close, remote_open, expect, play): Static.
16029 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16031 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16032 byte offsets instead of an array of indexes.
16033 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16035 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16037 * regcache.c: Add comment.
16039 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16041 * thread-db.c: New file.
16042 * proc-service.c: New file.
16043 * acinclude.m4: New file.
16044 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16045 proc-service.o, and thread-db.o.
16046 (linux-low.o): Add USE_THREAD_DB.
16047 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16048 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16049 * aclocal.m4: Regenerated.
16050 * config.in: Regenerated.
16051 * configure: Regenerated.
16052 * configure.in: Check for proc_service.h, sys/procfs.h,
16053 thread_db.h, and linux/elf.h headrs.
16054 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16055 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16056 Check for -lthread_db and thread support.
16057 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16058 PowerPC, and SuperH.
16059 * i387-fp.c: Constify arguments.
16060 * i387-fp.h: Likewise.
16061 * inferiors.c: (struct thread_info): Renamed from
16062 `struct inferior_info'. Remove PID member. Use generic inferior
16063 list header. All uses updated.
16064 (inferiors, signal_pid): Removed.
16065 (all_threads): New variable.
16066 (get_thread): Define.
16067 (add_inferior_to_list): New function.
16068 (for_each_inferior): New function.
16069 (change_inferior_id): New function.
16070 (add_inferior): Removed.
16071 (remove_inferior): New function.
16072 (add_thread): New function.
16073 (free_one_thread): New function.
16074 (remove_thread): New function.
16075 (clear_inferiors): Use for_each_inferior and free_one_thread.
16076 (find_inferior): New function.
16077 (find_inferior_id): New function.
16078 (inferior_target_data): Update argument type.
16079 (set_inferior_target_data): Likewise.
16080 (inferior_regcache_data): Likewise.
16081 (set_inferior_regcache_data): Likewise.
16082 * linux-low.c (linux_bp_reinsert): Remove.
16083 (all_processes, stopping_threads, using_thrads)
16084 (struct pending_signals, debug_threads, pid_of): New.
16085 (inferior_pid): Replace with macro.
16086 (struct inferior_linux_data): Remove.
16087 (get_stop_pc, add_process): New functions.
16088 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16089 Use add_process and add_thread.
16090 (linux_attach_lwp): New function, based on old linux_attach. Use
16091 add_process and add_thread. Set stop_expected for new threads.
16092 (linux_attach): New function.
16093 (linux_kill_one_process): New function.
16094 (linux_kill): Kill all LWPs.
16095 (linux_thread_alive): Use find_inferior_id.
16096 (check_removed_breakpoints, status_pending_p): New functions.
16097 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16098 Update. Use WNOHANG. Wait for cloned processes also. Update process
16099 struct for the found process.
16100 (linux_wait_for_event): New function.
16101 (linux_wait): Use it. Support LWPs.
16102 (send_sigstop, wait_for_sigstop, stop_all_processes)
16103 (linux_resume_one_process, linux_continue_one_process): New functions.
16104 (linux_resume): Support LWPs.
16105 (REGISTER_RAW_SIZE): Remove.
16106 (fetch_register): Use register_size instead. Call supply_register.
16107 (usr_store_inferior_registers): Likewise. Call collect_register.
16108 Fix recursive case.
16109 (regsets_fetch_inferior_registers): Improve error message.
16110 (regsets_store_inferior_registers): Add debugging.
16111 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16112 (unstopped_p, linux_signal_pid): New functions.
16113 (linux_target_ops): Add linux_signal_pid.
16114 (linux_init_signals): New function.
16115 (initialize_low): Call it. Initialize using_threads.
16116 * regcache.c (inferior_regcache_data): Add valid
16118 (get_regcache): Fetch registers lazily. Add fetch argument
16119 and update all callers.
16120 (regcache_invalidate_one, regcache_invalidate): New
16122 (new_register_cache): Renamed from create_register_cache.
16123 Return the new regcache.
16124 (free_register_cache): Change argument to a void *.
16125 (registers_to_string, registers_from_string): Call get_regcache
16126 with fetch flag set.
16127 (register_data): Make static. Pass fetch flag to get_regcache.
16128 (supply_register): Call get_regcache with fetch flag clear.
16129 (collect_register): Call get_regcache with fetch flag set.
16130 (collect_register_as_string): New function.
16131 * regcache.h: Update.
16132 * remote-utils.c (putpkt): Flush after debug output and use
16134 Handle input interrupts while waiting for an ACK.
16135 (input_interrupt): Use signal_pid method.
16136 (getpkt): Flush after debug output and use stderr.
16137 (outreg): Use collect_register_as_string.
16138 (new_thread_notify, dead_thread_notify): New functions.
16139 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16140 and general_thread.
16141 (look_up_one_symbol): Flush after debug output.
16142 * server.c (step_thread, server_waiting): New variables.
16143 (start_inferior): Don't use signal_pid. Update call to mywait.
16144 (attach_inferior): Update call to mywait.
16145 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16146 (main): Don't fetch/store registers explicitly. Use
16147 set_desired_inferior. Support proposed ``Hs'' packet. Update
16149 * server.h: Update.
16150 (struct inferior_list, struct_inferior_list_entry): New.
16151 * target.c (set_desired_inferior): New.
16152 (write_inferior_memory): Constify.
16153 (mywait): New function.
16154 * target.h: Update.
16155 (struct target_ops): New signal_pid method.
16156 (mywait): Removed macro, added prototype.
16158 * linux-low.h (regset_func): Removed.
16159 (regset_fill_func, regset_store_func): New.
16160 (enum regset_type): New.
16161 (struct regset_info): Add type field. Use new operation types.
16162 (struct linux_target_ops): stop_pc renamed to get_pc.
16163 Add decr_pc_after_break and breakpoint_at.
16164 (get_process, get_thread_proess, get_process_thread)
16165 (strut process_info, all_processes, linux_attach_lwp)
16166 (thread_db_init): New.
16168 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16169 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16170 (the_low_target): Add new members.
16171 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16172 (i386_store_fpxregset): Constify.
16173 (target_regsets): Add new kind identifier.
16174 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16175 (i386_set_pc): Add debugging.
16176 (i386_breakpoint_at): New function.
16177 (the_low_target): Add new members.
16178 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16179 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16180 (mips_breakpoint_at): New.
16181 (the_low_target): Add new members.
16182 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16183 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16184 (the_low_target): Add new members.
16185 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16186 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16187 (the_low_target): Add new members.
16188 * linux-x86-64-low.c (target_regsets): Add new kind
16191 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16193 From Martin Pool <mbp@samba.org>:
16194 * server.c (gdbserver_usage): New function.
16197 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16199 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16200 stop_at -> stop_pc.
16202 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16204 * Makefile.in: Remove obsolete code.
16206 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16208 * linux-low.c (regsets_fetch_inferior_registers),
16209 (regsets_store_inferior_registers): Removed cast to int from
16211 * regcache.h: Added declaration of struct inferior_info.
16213 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16215 * inferiors.c (struct inferior_info): Add regcache_data.
16216 (add_inferior): Call create_register_cache.
16217 (clear_inferiors): Call free_register_cache.
16218 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16219 * regcache.c (struct inferior_regcache_data): New.
16220 (registers): Remove.
16221 (get_regcache): New function.
16222 (create_register_cache, free_register_cache): New functions.
16223 (set_register_cache): Don't initialize the register cache here.
16224 (registers_to_string, registers_from_string, register_data): Call
16226 * regcache.h: Add prototypes.
16227 * server.h: Likewise.
16229 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16231 * mem-break.c: New file.
16232 * mem-break.h: New file.
16233 * Makefile.in: Add mem-break.o rule; update server.h
16235 * inferiors.c (struct inferior_info): Add target_data
16237 (clear_inferiors): Free target_data member if set.
16238 (inferior_target_data, set_inferior_target_data): New functions.
16239 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16240 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16241 * linux-low.c (linux_bp_reinsert): New variable.
16242 (struct inferior_linux_data): New.
16243 (linux_create_inferior): Use set_inferior_target_data.
16244 (linux_attach): Likewise. Call add_inferior.
16245 (linux_wait_for_one_inferior): New function.
16246 (linux_wait): Call it.
16247 (linux_write_memory): Add const.
16248 (initialize_low): Call set_breakpoint_data.
16249 * linux-low.h (struct linux_target_ops): Add breakpoint
16251 * server.c (attach_inferior): Remove extra add_inferior
16253 * server.h: Include mem-break.h. Update inferior.c
16255 * target.c (read_inferior_memory)
16256 (write_inferior_memory): New functions.
16257 * target.h (read_inferior_memory)
16258 (write_inferior_memory): Change macros to prototypes.
16259 (struct target_ops): Update comments. Add const to write_memory
16262 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16264 * linux-low.c (usr_store_inferior_registers): Support
16265 registers which are allowed to fail to store.
16266 * linux-low.h (linux_target_ops): Likewise.
16267 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16268 (ppc_cannot_store_register): FPSCR may not be storable.
16270 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16272 * server.h: Include <string.h> if HAVE_STRING_H.
16273 * ChangeLog: Correct paths in last ChangeLog entry.
16275 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16277 * linux-low.h: Remove obsolete prototypes.
16278 (struct linux_target_ops): New.
16279 (extern the_low_target): New.
16280 * linux-low.c (num_regs, regmap): Remove declarations.
16281 (register_addr): Use the_low_target explicitly.
16282 (fetch_register): Likewise.
16283 (usr_fetch_inferior_registers): Likewise.
16284 (usr_store_inferior_registers): Likewise.
16285 * linux-arm-low.c (num_regs): Remove.
16286 (arm_num_regs): Define.
16287 (arm_regmap): Renamed from regmap, made static.
16288 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16290 (arm_cannot_store_register): Renamed from cannot_store_register,
16292 (the_low_target): New.
16293 * linux-i386-low.c (num_regs): Remove.
16294 (i386_num_regs): Define.
16295 (i386_regmap): Renamed from regmap, made static.
16296 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16298 (i386_cannot_store_register): Renamed from cannot_store_register,
16300 (the_low_target): New.
16301 * linux-ia64-low.c (num_regs): Remove.
16302 (ia64_num_regs): Define.
16303 (ia64_regmap): Renamed from regmap, made static.
16304 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16306 (ia64_cannot_store_register): Renamed from cannot_store_register,
16308 (the_low_target): New.
16309 * linux-m68k-low.c (num_regs): Remove.
16310 (m68k_num_regs): Define.
16311 (m68k_regmap): Renamed from regmap, made static.
16312 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16314 (m68k_cannot_store_register): Renamed from cannot_store_register,
16316 (the_low_target): New.
16317 * linux-mips-low.c (num_regs): Remove.
16318 (mips_num_regs): Define.
16319 (mips_regmap): Renamed from regmap, made static.
16320 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16322 (mips_cannot_store_register): Renamed from cannot_store_register,
16324 (the_low_target): New.
16325 * linux-ppc-low.c (num_regs): Remove.
16326 (ppc_num_regs): Define.
16327 (ppc_regmap): Renamed from regmap, made static.
16328 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16330 (ppc_cannot_store_register): Renamed from cannot_store_register,
16332 (the_low_target): New.
16333 * linux-s390-low.c (num_regs): Remove.
16334 (s390_num_regs): Define.
16335 (s390_regmap): Renamed from regmap, made static.
16336 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16338 (s390_cannot_store_register): Renamed from cannot_store_register,
16340 (the_low_target): New.
16341 * linux-sh-low.c (num_regs): Remove.
16342 (sh_num_regs): Define.
16343 (sh_regmap): Renamed from regmap, made static.
16344 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16346 (sh_cannot_store_register): Renamed from cannot_store_register,
16348 (the_low_target): New.
16349 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16350 (the_low_target): New.
16352 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16354 * Makefile.in: Add stamp-h target.
16355 * configure.in: Create stamp-h.
16356 * configure: Regenerated.
16358 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16360 * inferiors.c: New file.
16361 * target.c: New file.
16362 * target.h: New file.
16363 * Makefile.in: Add target.o and inferiors.o. Update
16365 * linux-low.c (inferior_pid): New static variable,
16366 moved from server.c.
16367 (linux_create_inferior): Renamed from create_inferior.
16368 Call add_inferior. Return 0 on success instead of a PID.
16369 (linux_attach): Renamed from myattach.
16370 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16371 (linux_thread_alive): Renamed from mythread_alive.
16372 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16374 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16375 (regsets_store_inferior_registers): Correct error message.
16376 Add missing ``return 0''.
16377 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16378 (linux_store_registers): Renamed from store_inferior_registers.
16379 (linux_read_memory): Renamed from read_inferior_memory.
16380 (linux_write_memory): Renamed from write_inferior_memory.
16381 (linux_target_ops): New structure.
16382 (initialize_low): Call set_target_ops ().
16383 * remote-utils.c (unhexify): New function.
16384 (hexify): New function.
16385 (input_interrupt): Send signals to ``signal_pid''.
16386 * server.c (inferior_pid): Remove.
16387 (start_inferior): Update create_inferior call.
16388 (attach_inferior): Call add_inferior.
16389 (handle_query): New function.
16390 (main): Call handle_query for `q' packets.
16391 * server.h: Include "target.h". Remove obsolete prototypes.
16392 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16394 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16396 * Makefile.in: Add WARN_CFLAGS. Update configury
16398 * configure.in: Check for <string.h>
16399 * configure: Regenerate.
16400 * config.in: Regenerate.
16401 * gdbreplay.c: Include needed system headers.
16402 (remote_open): Remove strchr prototype.
16403 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16404 * regcache.c (supply_register): Change buf argument to const void *.
16405 (supply_register_by_name): Likewise.
16406 (collect_register): Change buf argument to void *.
16407 (collect_register_by_name): Likewise.
16408 * regcache.h: Add missing prototypes.
16409 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16410 * server.c (handle_query): New function.
16411 (attached): New static variable, moved out of main.
16412 (main): Quiet longjmp clobber warnings.
16413 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16414 * utils.c (error): Remove NORETURN.