1 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3 * configure.srv (aarch64*-*-linux*): Don't include xml.
4 (i[34567]86-*-cygwin*): Likewise.
5 (i[34567]86-*-linux*): Likewise.
6 (i[34567]86-*-lynxos*): Likewise.
7 (i[34567]86-*-mingw32ce*): Likewise.
8 (i[34567]86-*-mingw*): Likewise.
9 (i[34567]86-*-nto*): Likewise.
10 (tic6x-*-uclinux): Likewise.
11 (x86_64-*-linux*): Likewise.
12 (x86_64-*-mingw*): Likewise.
13 (x86_64-*-cygwin*): Likewise.
15 2018-04-18 Alan Hayward <alan.hayward@arm.com>
17 * tdesc.c: Remove xml parameter.
19 2018-04-18 Alan Hayward <alan.hayward@arm.com>
21 * server.c (get_features_xml): Remove cast.
22 * tdesc.c (void target_desc::accept): Fill in function.
23 (tdesc_get_features_xml): Remove old xml creation.
24 (print_xml_feature::visit_pre): Add xml vistor.
25 * tdesc.h (struct target_desc): Make xmltarget mutable.
26 (tdesc_get_features_xml): Remove declaration.
28 2018-04-18 Alan Hayward <alan.hayward@arm.com>
30 * tdesc.c (tdesc_architecture_name): Add new function.
31 (tdesc_osabi_name): Likewise.
32 (tdesc_get_features_xml): Use new functions.
34 2018-04-18 Alan Hayward <alan.hayward@arm.com>
36 * tdesc.c (tdesc_create_flags): Remove.
37 (tdesc_add_flag): Likewise.
38 (tdesc_named_type): Likewise.
39 (tdesc_create_union): Likewise.
40 (tdesc_create_struct): Likewise.
41 (tdesc_create_vector): Likewise.
42 (tdesc_add_bitfield): Likewise.
43 (tdesc_add_field): Likewise.
44 (tdesc_set_struct_size): Likewise.
46 2018-04-18 Alan Hayward <alan.hayward@arm.com>
48 * tdesc.c (~target_desc): Remove implictly deleted items.
49 (init_target_desc): Iterate all features.
50 (tdesc_get_features_xml): Use vector.
51 (tdesc_create_feature): Create feature.
52 * tdesc.h (tdesc_feature) Remove
53 (target_desc): Add features.
55 2018-04-18 Alan Hayward <alan.hayward@arm.com>
57 * Makefile.in: Add common/tdesc.c
58 * tdesc.c (init_target_desc): init all reg_defs from register
60 (tdesc_create_reg): Create tdesc_reg.
61 * tdesc.h (tdesc_feature): Add register vector.
63 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
65 * tdesc.h (struct target_desc) <features>: Change type to
66 std::vector<std::string>.
67 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
69 (tdesc_get_features_xml): Likewise.
70 (tdesc_create_feature): Likewise.
72 2018-03-26 Alan Hayward <alan.hayward@arm.com>
74 * regcache.c (find_register_by_number): Return a ref.
75 (find_regno): Use references.
76 (register_size): Likewise.
77 (register_data): Likewise.
78 * tdesc.c (target_desc::~target_desc): Remove free calls.
79 (target_desc::operator==): Use std::vector compare.
80 (init_target_desc): Use reference.
81 (tdesc_create_reg): Use reg constructors.
82 * tdesc.h (struct target_desc): Replace pointer with object.
84 2018-03-23 Alan Hayward <alan.hayward@arm.com>
86 * regcache.c (find_register_by_number): Make static.
87 (find_regno): Use find_register_by_number
88 * regcache.h (struct reg): Remove declaration.
90 2018-03-23 Alan Hayward <alan.hayward@arm.com>
92 * tdesc.c (target_desc::~target_desc): Move to here.
93 (target_desc::operator==): Likewise.
94 * tdesc.h (target_desc::~target_desc): Move from here.
95 (target_desc::operator==): Likewise.
97 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
99 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
101 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
103 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
105 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
106 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
107 and init_registers_s390_gs_linux64.
109 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
111 * linux-s390-low.c (s390_fill_gs): Remove function.
112 (s390_fill_gsbc): Remove function.
113 (s390_regsets): Set fill functions for the guarded storage regsets
116 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
118 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
119 the word size. Add comment.
120 (s390_get_wordsize): New function.
121 (s390_arch_setup): No longer select a temporary tdesc to fetch the
122 pswm with it. Instead, use s390_get_wordsize to determine the
123 word size first and derive the correct tdesc from that directly.
125 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
127 * Makefile.in: Include silent-rules.mk.
128 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
129 (COMPILE): Add ECHO_CXX.
130 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
131 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
132 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
133 (version-generated.c): Add ECHO_GEN.
134 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
135 (IPAGENT_COMPILE): Add ECHO_CXX.
136 (%-generated.c): Add ECHO_REGDAT.
138 2018-03-14 Tom Tromey <tom@tromey.com>
141 * ax.c (ax_printf): Special case for NULL.
143 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
145 * linux-low.c (linux_qxfer_libraries_svr4): Use
146 xml_escape_text_append.
148 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
150 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
152 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
154 * server.c (handle_general_set): Remove unnecessary xstrdup.
156 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
158 * server.c (parse_debug_format_options): Adjust to
159 delim_string_to_char_ptr_vec changes.
160 * thread-db.c (thread_db_load_search): Adjust to
161 dirnames_to_char_ptr_vec changes.
163 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
165 * target.h (target_enable_btrace, target_disable_btrace)
166 (target_read_btrace, target_read_btrace_conf): Turn macro into
167 inline function. Throw error if target method is not defined.
168 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
169 check for btrace target method. Be prepared to handle exceptions
170 from btrace target methods.
172 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
174 * server.c (captured_main): Change order of error message printed
175 when the current working directory cannot be found.
177 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
179 * server.c: Include "filenames.h" and "pathstuff.h".
180 (program_name): Delete variable.
181 (program_path): New anonymous class.
182 (get_exec_wrapper): Use "program_path" instead of
184 (handle_v_run): Likewise.
185 (captured_main): Likewise.
186 (process_serial_event): Likewise.
188 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
190 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
191 (OBJS): Add "pathstuff.o".
192 * server.c (current_directory): New global variable.
193 (captured_main): Initialize "current_directory".
195 2018-02-26 Alan Hayward <alan.hayward@arm.com>
197 * tdesc.c: Use common/tdesc.h.
200 2018-02-20 Alan Hayward <alan.hayward@arm.com>
201 Simon Marchi <simon.marchi@ericsson.com>
203 * Makefile.in: Switch order of make rules.
205 2018-02-19 Alan Hayward <alan.hayward@arm.com>
207 * Makefile.in: Add common directory in build.
208 * configure.ac: Add common reference.
209 * configure: Regenerate.
211 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
213 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
214 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
215 * spu-low.c (spu_target_ops): Likewise.
216 * win32-low.c (win32_target_ops): Likewise.
217 * server.c (supported_btrace_packets): Report packets unconditionally.
218 * target.h (target_ops) <supports_btrace>: Remove.
219 (target_supports_btrace): Remove.
221 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
223 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
224 (handle_btrace_disable): Change return type to void. Use exceptions
226 (handle_btrace_general_set): Catch exception and copy message to
229 2018-02-08 Tom Tromey <tom@tromey.com>
231 * linux-low.c (install_software_single_step_breakpoints): Use
233 * inferiors.c (make_cleanup_restore_current_thread): Remove.
234 (do_restore_current_thread_cleanup): Remove.
235 * gdbthread.h (make_cleanup_restore_current_thread): Don't
238 2018-02-08 Tom Tromey <tom@tromey.com>
240 * mem-break.c (set_raw_breakpoint_at): Use
241 gdb::unique_xmalloc_ptr.
243 2018-01-30 Pedro Alves <palves@redhat.com>
246 * target.c (target_terminal::terminal_state): Rename to ...
247 (target_terminal::m_terminal_state): ... this.
249 2018-01-19 James Clarke <jrtc27@jrtc27.com>
251 * linux-low.c (handle_extended_wait): Surround call to
252 thread_db_notice_clone with #ifdef USE_THREAD_DB.
254 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
256 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
257 linux_ptrace_attach_fail_reason_string now returning an
259 (linux_attach): Likewise.
260 * thread-db.c (attach_thread): Likewise.
262 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
265 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
266 checking for fs_base/gs_base fields in struct user_regs_struct.
267 * configure: Regenerate.
269 2018-01-16 Yao Qi <yao.qi@linaro.org>
272 * linux-low.c (fetch_register): Call supply_register instead of
275 2018-01-08 Yao Qi <yao.qi@linaro.org>
276 Simon Marchi <simon.marchi@ericsson.com>
278 * Makefile.in (OBS): Remove selftest.o.
279 * configure.ac: Set srv_selftest_objs if $development is true.
280 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
281 * configure: Re-generated.
282 * server.c (captured_main): Wrap variable selftest_filter with
285 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
287 * server.c (parse_debug_format_options): Return std::string.
288 (handle_monitor_command, captured_main): Adjust.
290 2018-01-05 Pedro Alves <palves@redhat.com>
293 * server.c (captured_main): Pass quiet=false to
294 save_original_signals_state.
296 2018-01-01 Joel Brobecker <brobecker@adacore.com>
298 * gdbreplay.c (gdbreplay_version): Update copyright year in
300 * server.c (gdbserver_version): Likewise.
302 2017-12-08 Tom Tromey <tom@tromey.com>
304 * ax.c (ax_printf): Update.
306 2017-12-07 Yao Qi <yao.qi@linaro.org>
308 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
309 aarch64_linux_read_description.
310 * linux-amd64-ipa.c (idx2mask): New array.
311 (get_ipa_tdesc): Move idx2mask out.
312 (initialize_low_tracepoint): Initialize target descriptions.
313 * linux-i386-ipa.c (idx2mask): New array.
314 (get_ipa_tdesc): Move idx2mask out.
315 (initialize_low_tracepoint): Initialize target descriptions.
317 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
319 * tdesc.c (struct tdesc_type): Change return type.
320 (tdesc_add_flag): Change parameter type.
321 (tdesc_add_bitfield): Likewise.
322 (tdesc_add_field): Likewise.
323 (tdesc_set_struct_size): Likewise.
325 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
327 * regcache.c (registers_to_string): Remove unused variable.
329 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
331 * inferiors.c (for_each_inferior_with_data): Remove.
332 * inferiors.h (for_each_inferior_with_data): Remove.
333 * server.c (handle_qxfer_threads_worker): Change parameter type.
334 (handle_qxfer_threads_proper): Use for_each_thread.
336 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
338 * inferiors.c (for_each_inferior): Remove.
339 (clear_inferiors): Use for_each_thread.
340 * inferiors.h (for_each_inferior): Remove.
341 * linux-low.c (linux_wait_for_event_filtered): Use
343 (linux_stabilize_threads): Likewise.
344 * regcache.c (regcache_release): Likewise.
345 * server.c (gdb_wants_all_threads_stopped): Likewise.
346 (clear_pending_status_callback): Remove.
347 (handle_status): Use for_each_thread.
348 (captured_main): Likewise.
349 * win32-low.c (child_init_thread_list): Likewise.
350 (win32_clear_inferiors): Likewise.
351 (fake_breakpoint_event): Likewise.
353 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
355 * inferiors.h (find_inferior): Remove.
356 * inferiors.c (find_inferior): Remove.
358 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
360 * linux-low.c (resume_status_pending_p): Update comment.
361 (need_step_over_p): Update comment.
363 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
365 * linux-low.c (proceed_one_lwp): Return void, change parameter
367 (unsuspend_and_proceed_one_lwp): Likewise.
368 (proceed_all_lwps): Use for_each_thread.
369 (unstop_all_lwps): Likewise.
371 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
373 * linux-low.c (linux_resume_one_thread): Return void, take
375 (linux_resume): Use for_each_thread.
377 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
379 * linux-low.c (send_sigstop_callback): Return void, change
380 parameter type. Rename to...
381 (send_sigstop): ... this.
382 (suspend_and_send_sigstop_callback): Return void, change parameter
384 (suspend_and_send_sigstop): ... this.
385 (stop_all_lwps): Use for_each_thread.
387 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
389 * linux-low.c (lwp_running): Return bool, remove unused
391 (linux_stabilize_threads): Use find_thread.
393 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
395 * linux-low.c (select_singlestep_lwp_callback): Remove.
396 (count_events_callback): Remove.
397 (select_event_lwp_callback): Remove.
398 (select_event_lwp): Use find_thread/for_each_thread.
400 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
402 * linux-low.c (not_stopped_callback): Return bool, take filter
404 (linux_wait_for_event_filtered): Use find_thread.
405 (linux_wait_1): Likewise.
407 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
409 * linux-low.c (same_lwp): Remove.
410 (find_lwp_pid): Use find_thread.
412 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
414 * linux-low.c (delete_lwp_callback): Remove.
415 (linux_mourn): Use for_each_thread.
417 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
419 * linux-low.c (linux_detach_lwp_callback): Return void, remove
420 args parameter, don't check for pid.
421 (linux_detach): Use for_each_thread.
423 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
425 * linux-low.c (struct counter): Remove.
426 (second_thread_of_pid_p): Remove.
427 (last_thread_of_process_p): Use find_thread.
429 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
431 * inferiors.c (find_inferior_in_random): Remove.
432 * inferiors.h (find_inferior_in_random): Remove.
433 * linux-low.c (status_pending_p_callback): Return bool, accept
434 parameter ptid directly.
435 (linux_wait_for_event_filtered): Use find_thread_in_random.
436 (linux_wait_1): Likewise.
438 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
440 * inferiors.c (find_inferior_id): Remove.
441 (find_thread_ptid): Move implemention from find_inferior_id to
443 * inferiors.h (find_inferior_id): Remove.
444 * server.c (handle_status): Use find_thread_ptid.
445 (process_serial_event): Likewise.
446 * thread-db.c (find_one_thread): Likewise.
447 (thread_db_thread_handle): Likewise.
448 * win32-low.c (thread_rec): Likewise.
449 (child_delete_thread): Likewise.
450 (win32_thread_alive): Likewise.
451 (get_child_debug_event): Likewise.
453 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
455 * linux-mips-low.c (update_watch_registers_callback): Return
456 void, remove pid_p parameter, don't check for pid.
457 (mips_insert_point, mips_remove_point): Use for_each_thread.
459 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
461 * lynx.low (lynx_delete_thread_callback): Remove.
462 (lynx_mourn): Use for_each_thread.
464 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
466 * regcache.c (regcache_invalidate_one): Remove.
467 (regcache_invalidate_pid): use for_each_thread.
469 2017-11-26 Tom Tromey <tom@tromey.com>
471 * linux-low.c (linux_create_inferior): Update.
473 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
475 * spu-low.c (spu_create_inferior): Fix typo in argument name.
477 2017-11-24 Alan Hayward <alan.hayward@arm.com>
479 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
480 * linux-aarch64-low.c (initialize_low_arch): Call init func.
481 * linux-aarch64-tdesc-selftest.c: New file.
482 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
484 2017-11-24 Alan Hayward <alan.hayward@arm.com>
486 * configure.srv: Add new file.
487 * linux-aarch64-low.c (initialize_low_arch): Call init func.
488 * linux-aarch64-tdesc-selftest.c: New file.
489 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
491 2017-11-24 Alan Hayward <alan.hayward@arm.com>
493 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
494 * linux-aarch64-low.c (initialize_low_arch): Remove init.
495 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
497 2017-11-24 Alan Hayward <alan.hayward@arm.com>
499 * configure.srv: Add new files.
500 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
501 aarch64_linux_read_description.
502 * linux-aarch64-low.c (aarch64_linux_read_description):
503 Merge with aarch64_arch_setup.
504 (aarch64_arch_setup): Call aarch64_linux_read_description.
505 * linux-aarch64-tdesc.c: New file.
506 * linux-aarch64-tdesc.h: New file.
508 2017-11-24 Yao Qi <yao.qi@linaro.org>
510 * configure.srv: Set $srv_regobj for tic6x-linux.
511 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
512 (tic6x_read_description): Move some code to tic6x_arch_setup.
513 (tic6x_tdesc_test): New function.
514 (initialize_low_arch): Call selftests::register_test.
516 2017-11-22 Yao Qi <yao.qi@linaro.org>
518 * remote-utils.c (prepare_resume_reply): Use memcpy.
520 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
522 * linux-low.c (kill_one_lwp_callback): Return void, take
523 argument directly, don't filter on pid.
524 (linux_kill): Use for_each_thread.
526 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
528 * linux-low.c (need_step_over_p): Return bool, remove dummy
530 (linux_resume, proceed_all_lwps): Use find_thread.
532 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
534 * linux-low.c (resume_status_pending_p): Return bool, remove
536 (linux_resume): Use find_thread.
538 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
540 * linux-low.c (struct thread_resume_array): Remove.
541 (linux_set_resume_request): Return void, take arguments
543 (linux_resume): Use for_each_thread.
545 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
547 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
548 return bool, remove data argument.
549 (linux_stabilize_threads): Use find_thread.
551 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
553 * linux-low.c (unsuspend_one_lwp): Remove.
554 (unsuspend_all_lwps): Use for_each_thread, inline code from
557 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
559 * gdbthread.h (find_thread): Add overload with ptid_t filter.
560 * linux-low.c (struct iterate_over_lwps_args): Remove.
561 (iterate_over_lwps_filter): Remove.
562 (iterate_over_lwps): Use find_thread.
564 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
566 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
567 (linux_handle_new_gdb_connection): Use for_each_thread, inline
568 code from reset_lwp_ptrace_options_callback.
570 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
572 * linux-arm-low.c (struct update_registers_data): Remove.
573 (update_registers_callback): Return void, take arguments
574 directly, don't check thread's pid.
575 (arm_insert_point, arm_remove_point): Use for_each_thread.
577 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
579 * win32-low.c (continue_one_thread): Return void, take argument
581 (child_continue): Use for_each_thread.
583 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
585 * win32-i386-low.c (update_debug_registers_callback): Rename
587 (update_debug_registers): ... this, return void, remove pid_p arg.
588 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
590 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
592 * inferiors.h (struct process_info): Add constructor, initialize
594 <syscalls_to_catch>: Change type to std::vector<int>.
595 * inferiors.c (add_process): Allocate process_info with new.
596 (remove_process): Free process_info with delete.
597 * linux-low.c (handle_extended_wait): Adjust.
598 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
599 * server.c (handle_general_set): Adjust.
601 2017-11-16 Pedro Alves <palves@redhat.com>
603 * remote-utils.c (remote_close): Block SIGIO signals instead of
604 uninstalling the SIGIO handler.
606 2017-11-16 Alan Hayward <alan.hayward@arm.com>
608 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
610 2017-11-16 Yao Qi <yao.qi@linaro.org>
612 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
613 (tic6x_store_gregset): Likewise.
614 (tic6x_usrregs_info): Move it up.
616 2017-11-15 Alan Hayward <alan.hayward@arm.com>
618 * Makefile.in: Update arch rules.
619 * configure.srv: Explicitly mark arch/ files.
621 2017-11-13 Andreas Schwab <schwab@suse.de>
623 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
625 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
627 2017-11-06 Pedro Alves <palves@redhat.com>
629 * config.in, configure: Regenerate.
631 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
633 * target.c (struct thread_search): Remove.
634 (thread_search_callback): Remove.
635 (prepare_to_access_memory): Use for_each_thread instead of
636 find_inferior. Inline code from thread_search_callback.
638 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
640 * server.c (struct visit_actioned_threads_data): Remove.
641 (visit_actioned_threads): Change prototype to take arguments
643 (resume): Use find_thread instead of find_inferior.
645 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
647 * server.c (queue_stop_reply_callback): Change prototype, return
649 (find_status_pending_thread_callback): Remove.
650 (handle_status): Replace find_inferior with find_thread and
653 2017-10-25 Alan Hayward <alan.hayward@arm.com>
655 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
657 (aarch64_store_gregset): Likewise.
658 (aarch64_fill_fpregset): Likewise.
659 (aarch64_store_fpregset): Likewise.
661 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
663 * gdbthread.h (find_thread, for_each_thread): New functions.
664 * inferiors.c (thread_of_pid): Remove.
665 (find_any_thread_of_pid): Use find_thread.
666 * linux-low.c (num_lwps): Use for_each_thread.
668 2017-10-17 Yao Qi <yao.qi@linaro.org>
670 * Makefile.in: Remove one rule.
671 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
673 2017-10-17 Yao Qi <yao.qi@linaro.org>
675 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
676 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
678 2017-10-17 Yao Qi <yao.qi@linaro.org>
680 * configure.srv: Rename arm.o with arch/arm.o.
682 2017-10-17 Yao Qi <yao.qi@linaro.org>
684 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
685 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
686 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
687 (arch-i386.o, arch-amd64.o): Remove rules.
688 (arch/%.o): New rule.
689 Update POSTCOMPILE and COMPILE.pre.
690 * configure.ac: Invoke AC_CONFIG_COMMANDS.
691 * configure: Re-generated.
692 * configure.srv: Replace arch-i386.o with arch/i386.o.
693 Replace arch-amd64.o with arch/amd64.o.
695 2017-10-16 Yao Qi <yao.qi@linaro.org>
697 * configure: Regenerated.
699 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
701 * inferiors.h: (struct inferior_list): Remove.
702 (struct inferior_list_entry); Remove.
703 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
704 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
705 get_first_inferior): Remove.
706 (for_each_inferior, for_each_inferior_with_data, find_inferior,
707 find_inferior_id, find_inferior_in_random): Change signature.
708 * inferiors.c (all_threads): Change type to
709 std::list<thread_info *>.
710 (get_thread): Remove macro.
711 (find_inferior, find_inferior_id): Change signature, implement
713 (find_inferior_in_random): Change signature, implement using
714 find_thread_in_random.
715 (for_each_inferior, for_each_inferior_with_data): Change
716 signature, implement using for_each_thread.
717 (add_inferior_to_list, remove_inferior): Remove.
718 (add_thread, get_first_thread, thread_of_pid,
719 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
720 (get_first_inferior, one_inferior_p, clear_inferior_list):
722 (clear_inferiors, get_thread_process): Update.
723 * gdbthread.h: Include <list>.
724 (struct thread_info) <entry>: Remove field.
726 (all_threads): Change type to std::list<thread_info *>.
727 (get_first_inferior): Add doc.
728 (find_thread, for_each_thread, find_thread_in_random): New
730 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
731 * linux-arm-low.c (update_registers_callback): Update.
732 * linux-low.c (second_thread_of_pid_p): Update.
733 (kill_one_lwp_callback, linux_detach_lwp_callback,
734 delete_lwp_callback, status_pending_p_callback, same_lwp,
735 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
736 iterate_over_lwps, not_stopped_callback,
737 resume_stopped_resumed_lwps, count_events_callback,
738 select_singlestep_lwp_callback, select_event_lwp_callback,
739 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
740 suspend_and_send_sigstop_callback, wait_for_sigstop,
741 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
742 lwp_running, linux_set_resume_request, resume_status_pending_p,
743 need_step_over_p, start_step_over, linux_resume_one_thread,
744 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
745 reset_lwp_ptrace_options_callback): Update.
746 * linux-mips-low.c (update_watch_registers_callback): Update.
747 * regcache.c (regcache_invalidate_one, regcache_invalidate):
749 (free_register_cache_thread_one): Remove.
750 (regcache_release): Update.
751 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
752 handle_qxfer_threads_worker): Update.
753 (handle_query): Update, use list iterator.
754 (visit_actioned_threads, handle_pending_status,
755 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
756 clear_pending_status_callback, set_pending_status_callback,
757 find_status_pending_thread_callback, handle_status,
758 process_serial_event): Update.
759 * target.c (thread_search_callback): Update.
760 * thread-db.c (thread_db_get_tls_address): Update.
761 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
763 * win32-i386-low.c (update_debug_registers_callback): Update.
764 * win32-low.c (delete_thread_info, child_delete_thread,
765 continue_one_thread, suspend_one_thread,
766 get_child_debug_event): Adjust.
768 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
770 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
771 * inferiors.h: Include <list>.
772 (struct process_info) <entry>: Remove field.
774 (pid_of): Change macro to function.
775 (ptid_of, lwpid_of): Remove macro.
776 (all_processes): Change type to std::list<process_info *>.
777 (ALL_PROCESSES): Remove macro.
778 (for_each_process, find_process): New function.
779 * inferiors.c (all_processes): Change type to
780 std::list<process_info *>.
781 (find_thread_process): Adjust.
782 (add_process): Likewise.
783 (remove_process): Likewise.
784 (find_process_pid): Likewise.
785 (get_first_process): Likewise.
786 (started_inferior_callback): Remove.
787 (have_started_inferiors_p): Adjust.
788 (attached_inferior_callback): Remove.
789 (have_attached_inferiors_p): Adjust.
790 * linux-low.c (check_zombie_leaders): Likewise.
791 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
792 (x86_linux_update_xmltarget): Adjust.
793 * server.c (handle_query): Likewise.
794 (gdb_reattached_process): Remove.
795 (handle_status): Adjust.
796 (kill_inferior_callback): Likewise.
797 (detach_or_kill_inferior): Remove.
798 (print_started_pid): Likewise.
799 (print_attached_pid): Likewise.
800 (detach_or_kill_for_exit): Update.
801 (process_serial_event): Likewise.
802 * linux-arm-low.c (arm_new_fork): Likewise.
804 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
806 * dll.h: Include <list>.
807 (struct dll_info): Add constructor.
808 <entry>: Remove field.
809 (all_dlls): Change type to std::list<dll_info>.
810 * dll.c: Include <algorithm>.
811 (get_dll): Remove macro.
812 (all_dlls): Change type to std::list<dll_info *>.
813 (free_one_dll): Remove.
814 (match_dll): Likewise.
815 (loaded_dll): Adjust.
816 (unloaded_dll): Adjust to all_dlls type change, use
817 std::find_if. Inline code from match_dll.
818 (clear_dlls): Adjust to all_dlls type change.
819 * server.c (emit_dll_description): Remove.
820 (handle_qxfer_libraries): Adjust to all_dlls type change,
821 integrate emit_dll_description's functionality.
823 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
825 * linux-low.h (struct linux_target_ops) <delete_process>: New
827 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
828 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
829 (struct linux_target_ops): Add delete_process callback.
830 * linux-arm-low.c (arm_delete_process): New.
831 (struct linux_target_ops): Add delete_process callback.
832 * linux-bfin-low.c (struct linux_target_ops): Likewise.
833 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
834 * linux-m32r-low.c (struct linux_target_ops): Likewise.
835 * linux-mips-low.c (mips_linux_delete_process): New.
836 (struct linux_target_ops): Add delete_process callback.
837 * linux-ppc-low.c (struct linux_target_ops): Likewise.
838 * linux-s390-low.c (struct linux_target_ops): Likewise.
839 * linux-sh-low.c (struct linux_target_ops): Likewise.
840 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
841 * linux-tile-low.c (struct linux_target_ops): Likewise.
842 * linux-x86-low.c (x86_linux_delete_process): New.
843 (struct linux_target_ops): Add delete_process callback.
844 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
846 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
848 * linux-aarch64-low.c (the_low_target): Add thread delete
850 * linux-arm-low.c (arm_delete_thread): New function.
851 (the_low_target): Add thread delete callback.
852 * linux-bfin-low.c (the_low_target): Likewise.
853 * linux-crisv32-low.c (the_low_target): Likewise.
854 * linux-low.c (delete_lwp): Invoke delete_thread callback if
856 * linux-low.h (struct linux_target_ops) <delete_thread>: New
858 * linux-m32r-low.c (the_low_target): Add thread delete callback.
859 * linux-mips-low.c (mips_linux_delete_thread): New function.
860 (the_low_target): Add thread delete callback.
861 * linux-ppc-low.c (the_low_target): Likewise.
862 * linux-s390-low.c (the_low_target): Likewise.
863 * linux-sh-low.c (the_low_target): Likewise.
864 * linux-tic6x-low.c (the_low_target): Likewise.
865 * linux-tile-low.c (the_low_target): Likewise.
866 * linux-x86-low.c (the_low_target): Likewise.
867 * linux-xtensa-low.c (the_low_target): Likewise.
869 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
871 * win32-low.c: Include "common-inferior.h".
873 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
875 * inferiors.c (set_inferior_cwd): New function.
876 * server.c (handle_general_set): Handle QSetWorkingDir packet.
877 (handle_query): Inform that QSetWorkingDir is supported.
878 * win32-low.c (create_process): Pass the inferior's cwd to
881 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
883 * inferiors.c (current_inferior_cwd): New global variable.
884 (get_inferior_cwd): New function.
885 * inferiors.h (struct process_info) <cwd>: New field.
887 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
889 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
890 (OBS): Add gdb_tilde_expand.o.
892 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
894 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
895 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
897 2017-09-29 Pedro Alves <palves@redhat.com>
899 * ax.c (gdb_parse_agent_expr): Constify.
900 * ax.h (gdb_parse_agent_expr): Constify.
901 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
903 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
904 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
905 * remote-utils.h (read_ptid): Constify.
906 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
907 (process_point_options, process_serial_event): Constify.
908 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
909 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
910 (cmd_qtbuffer): Constify.
912 2017-09-29 Pedro Alves <palves@redhat.com>
914 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
917 2017-09-29 Pedro Alves <palves@redhat.com>
919 * linux-low.c (handle_extended_wait): Pass parent thread instead
920 of process to thread_db_notice_clone.
921 * linux-low.h (thread_db_notice_clone): Replace parent process
922 parameter with parent thread parameter.
923 * thread-db.c (find_one_thread): Add comment.
924 (thread_db_notice_clone): Replace parent process parameter with
925 parent thread parameter. Temporarily switch to the parent thread.
927 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
929 * gdbthread.h: Include "common-gdbthread.h".
930 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
931 "if" when validating the ptid.
932 * remote-utils.c: Include "gdbthread.h".
933 (prepare_resume_reply): Use "switch_to_thread".
934 * target.c (done_accessing_memory): Likewise.
936 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
938 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
939 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
940 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
941 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
942 s390x-gs-linux64-ipa.o to ipa_obj.
943 * linux-s390-low.c (HWCAP_S390_GS): New define.
944 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
946 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
947 (s390_arch_setup): Check for guarded-storage support and choose
949 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
950 init_registers_s390x_gs_linux64.
951 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
953 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
954 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
956 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
958 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
960 2017-09-21 Kevin Buettner <kevinb@redhat.com>
962 * linux-low.h (struct lwp_info): Add new field, thread_handle.
963 (thread_db_thread_handle): Declare.
964 * linux-low.c (linux_target_ops): Initialize thread_handle.
965 * server.c (handle_qxfer_threads_worker): Add support for
967 * target.h (struct target_ops): Add new function pointer,
969 (target_thread_handle): Define.
970 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
972 (thread_db_thread_handle): New function.
974 2017-09-21 Kevin Buettner <kevinb@redhat.com>
976 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
977 * linux-low.h (thread_db_notice_clone): Declare.
978 * thread-db.c (thread_db_notice_clone): New function.
980 2017-09-21 Pedro Alves <palves@redhat.com>
982 * server.c (gdb_read_memory, handle_status, process_serial_event)
983 (handle_serial_event, handle_target_event): Adjust to
984 set_desired_thread prototype change.
985 * target.c (set_desired_thread): Remove 'use_general' parameter
987 * target.h (set_desired_thread): Remove 'use_general' parameter.
989 2017-09-20 Tom Tromey <tom@tromey.com>
991 * target.c (target_terminal::terminal_state): Define.
992 (target_terminal::init): Rename from target_terminal_init.
993 (target_terminal::inferior): Rename from
994 target_terminal_inferior.
995 (target_terminal::ours): Rename from target_terminal_ours.
996 (target_terminal::ours_for_output, target_terminal::info): New.
998 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1000 * server.c (accumulate_file_name_length): Remove.
1001 (emit_dll_description): Adjust to std::string change.
1002 (handle_qxfer_libraries): Use std::string to hold document.
1004 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1006 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1007 return type of xml_escape_text.
1008 * server.c (emit_dll_description): Likewise.
1010 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1012 * server.c (captured_main): Accept argument for --selftest.
1013 Update run_tests call.
1014 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1015 when registering selftests.
1017 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1019 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1020 instead of "VEC" for "target_desc.reg_defs".
1021 (regcache_cpy): Likewise.
1022 (registers_to_string): Likewise.
1023 (registers_from_string): Likewise.
1024 (find_regno): Likewise.
1025 (supply_regblock): Likewise.
1026 (regcache_raw_read_unsigned): Likewise.
1027 * tdesc.c (init_target_desc): Likewise.
1028 (tdesc_create_reg): Likewise.
1029 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1030 (struct target_desc) <reg_defs>: Convert to "std::vector".
1031 (target_desc): Do not initialize "reg_defs".
1032 (~target_desc): Update code to use "std::vector" instead of "VEC"
1033 for "target_desc.reg_defs".
1034 (operator==): Likewise.
1036 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1038 * inferiors.h (thread_to_gdb_id): Remove.
1039 * inferiors.c (thread_to_gdb_id): Remove.
1040 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1041 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1042 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1044 * nto-low.c (nto_fetch_registers, nto_store_registers,
1045 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1047 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1049 * inferiors.h (gdb_id_to_thread_id): Remove.
1050 * inferiors.c (gdb_id_to_thread_id): Remove.
1051 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1052 removal. Move pid declaration closer to where it's used.
1054 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1056 * server.c (handle_detach): New function.
1057 (process_serial_event): Move code out, call handle_detach.
1059 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1061 * server.c (require_running): Rename to ...
1062 (require_running_or_return): ... this ...
1063 (require_running_or_break): ... and this.
1064 (handle_query, process_serial_event): Adjust.
1066 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1068 * linux-low.c (linux_set_resume_request): Remove unused
1071 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1073 * server.c (first_thread_of): Remove.
1074 (process_serial_event): Replace usage of first_thread_of with
1075 find_any_thread_of_pid.
1076 * tracepoint.c (same_process_p): Remove.
1077 (gdb_agent_about_to_close): Replace usage of same_process_p with
1078 find_any_thread_of_pid.
1079 * linux-x86-low.c (same_process_callback): Remove.
1080 (x86_arch_setup_process_callback): Replace usage of
1081 same_process_callback with find_any_thread_of_pid.
1082 * thread-db.c (any_thread_of): Remove.
1083 (switch_to_process): Replace usage of any_thread_of with
1084 find_any_thread_of_pid.
1085 * inferiors.c (thread_pid_matches_callback): Remove.
1086 (find_thread_process): Adjust to use find_any_thread_of_pid.
1088 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1090 * regcache.c (get_thread_regcache): Guard calls to "memset"
1093 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1095 * linux-low.c (handle_extended_wait): Use
1096 "allocate_target_description" instead of "XNEW".
1097 * linux-x86-low.c (initialize_low_arch): Likewise.
1099 2017-09-05 Yao Qi <yao.qi@linaro.org>
1101 * configure.srv (srv_i386_regobj): Remove.
1102 (srv_amd64_regobj): Remove.
1103 (srv_regobj): Set it to "" for x86 non-linux targets.
1104 * linux-x86-tdesc.c (i386_linux_read_description):
1105 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1106 (init_registers_i386): Remove the declaration.
1107 (tdesc_i386): Remove the declaration.
1108 (lynx_i386_arch_setup): Call i386_create_target_description.
1109 * nto-x86-low.c: Likewise.
1110 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1111 [!__x86_64__]: include arch/i386.h.
1112 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1114 2017-09-05 Yao Qi <yao.qi@linaro.org>
1116 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1117 i386/amd64-XXX-linux from it.
1119 2017-09-05 Yao Qi <yao.qi@linaro.org>
1121 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1123 (ipa_amd64_linux_regobj): Remove.
1124 (ipa_x32_linux_regobj): Remove.
1126 2017-09-05 Yao Qi <yao.qi@linaro.org>
1128 * Makefile.in (arch-amd64.o): New rule.
1129 * configure.srv: Append arch-amd64.o.
1130 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1131 (get_ipa_tdesc): Call amd64_linux_read_description.
1132 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1133 and init_registers_amd64_XXX.
1134 * linux-x86-low.c (x86_linux_read_description): Call
1135 amd64_linux_read_description.
1136 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1137 (initialize_low_arch): Don't call init_registers_x32_XXX and
1138 init_registers_amd64_XXX.
1139 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1140 and tdesc_amd64_XXX.
1141 [__x86_64__] (amd64_tdesc_test): New function.
1142 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1143 and init_registers_amd64_XXX.
1144 * linux-x86-tdesc.c: Include arch/amd64.h.
1145 (xcr0_to_tdesc_idx): New function.
1146 (i386_linux_read_description): New function.
1147 (amd64_get_ipa_tdesc_idx): New function.
1148 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1149 (amd64_get_ipa_tdesc): Declare.
1151 2017-09-05 Yao Qi <yao.qi@linaro.org>
1153 * configure.srv (srv_i386_linux_xmlfiles): Remove
1154 i386/i386-XXX-linux.xml from it.
1156 2017-09-05 Yao Qi <yao.qi@linaro.org>
1158 * configure.srv: Set srv_i386_linux_regobj empty if $development
1160 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1161 initialize_low_tdesc.
1162 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1163 with #if initialize_low_tdesc.
1164 * linux-x86-tdesc-selftest.c: New file.
1165 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1167 2017-09-05 Yao Qi <yao.qi@linaro.org>
1169 * Makefile.in (arch-i386.o): New rule.
1170 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1171 (x86_64-*-linux*): Likewise.
1172 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1173 include arch/i386.h.
1174 (i386_linux_read_description): Remove code and call
1175 i386_create_target_description.
1176 * tdesc.c (allocate_target_description): New function.
1177 * tdesc.h (set_tdesc_architecture): Remove declaration.
1178 (set_tdesc_osabi): Likewise.
1180 2017-09-05 Yao Qi <yao.qi@linaro.org>
1182 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1183 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1184 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1186 * server.c (get_features_xml): Call tdesc_get_features_xml.
1187 * tdesc.c (set_tdesc_architecture): New function.
1188 (set_tdesc_osabi): New function.
1189 (tdesc_get_features_xml): New function.
1190 (tdesc_create_feature): Add an argument.
1191 * tdesc.h (struct target_desc) <features>: New field.
1192 <arch, osabi>: New field.
1193 (~target_desc): xfree features, arch, and osabi.
1194 (target_desc::oerator==): Don't compare .xmltarget.
1195 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1196 (set_tdesc_osabi): Likewise.
1197 (tdesc_get_features_xml): Likewise.
1199 2017-09-05 Yao Qi <yao.qi@linaro.org>
1201 * linux-x86-tdesc.c: Include selftest.h.
1202 (i386_tdesc_test): New function.
1203 (initialize_low_tdesc): Call selftests::register_test.
1204 * tdesc.h: Include regdef.h.
1205 (target_desc): Override operator == and !=.
1207 2017-09-05 Yao Qi <yao.qi@linaro.org>
1209 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1210 (ipa_obj): Likewise.
1211 * linux-i386-ipa.c: Include common/x86-xstate.h
1212 (get_ipa_tdesc): Call i386_linux_read_description.
1213 (initialize_low_tracepoint): Don't call init_registers_XXX
1214 functions, call initialize_low_tdesc instead.
1215 * linux-x86-low.c (x86_linux_read_description): Call
1216 i386_linux_read_description.
1217 (initialize_low_arch): Don't call init_registers_i386_XXX
1218 functions, call initialize_low_tdesc.
1219 * linux-x86-tdesc.c: New file.
1220 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1221 (i386_get_ipa_tdesc_idx): Declare.
1222 (i386_get_ipa_tdesc): Declare.
1223 (initialize_low_tdesc): Declare.
1225 2017-09-05 Yao Qi <yao.qi@linaro.org>
1227 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1230 2017-09-05 Yao Qi <yao.qi@linaro.org>
1232 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1233 * regcache.c (get_thread_regcache): Use VEC_length.
1234 (init_register_cache): Likewise.
1235 (regcache_cpy): Likewise.
1236 (registers_to_string): Iterate reg_defs via VEC_iterate.
1237 (find_regno): Likewise.
1238 (find_register_by_number): Use VEC_index.
1239 (register_size): Call find_register_by_number.
1240 (register_data): Call find_register_by_number.
1241 (supply_regblock): Use VEC_length.
1242 (regcache_raw_read_unsigned): Likewise.
1243 * tdesc.c (init_target_desc): Iterate reg_defs via
1245 (default_description): Update initializer.
1246 (copy_target_description): Don't update field num_registers.
1247 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1248 <num_registers>: Remove.
1250 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1252 * Makefile.in (.SECONDARY): Define target.
1254 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1256 * linux-low.c (linux_wait_1): Adjust.
1257 * server.c (queue_stop_reply_callback): Adjust.
1259 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1261 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1262 QEnvironmentUnset and QEnvironmentReset packets.
1263 (handle_query): Inform remote that QEnvironmentHexEncoded,
1264 QEnvironmentUnset and QEnvironmentReset are supported.
1266 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1268 * inferiors.h (inferior_target_data): Rename to ...
1269 (thread_target_data): ... this.
1270 (inferior_regcache_data): Rename to ...
1271 (thread_regcache_data): ... this.
1272 (set_inferior_regcache_data): Rename to ...
1273 (set_thread_regcache_data): ... this.
1274 * inferiors.c (inferior_target_data): Rename to ...
1275 (thread_target_data): ... this.
1276 (inferior_regcache_data): Rename to ...
1277 (thread_regcache_data): ... this.
1278 (set_inferior_regcache_data): Rename to ...
1279 (set_thread_regcache_data): ... this.
1280 (free_one_thread): Update.
1281 * linux-low.h (get_thread_lwp): Update.
1282 * regcache.c (get_thread_regcache): Update.
1283 (regcache_invalidate_thread): Update.
1284 (free_register_cache_thread): Update.
1285 * win32-i386-low.c (update_debug_registers_callback): Update.
1286 (win32_get_current_dr): Update.
1287 * win32-low.c (thread_rec): Update.
1288 (delete_thread_info): Update.
1289 (continue_one_thread): Update.
1290 (suspend_one_thread): Update.
1292 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1294 * inferiors.c (set_inferior_target_data): Remove.
1295 * inferiors.h (set_inferior_target_data): Remove.
1297 2017-08-18 Yao Qi <yao.qi@linaro.org>
1299 * Makefile.in (OBS): Add selftest.o.
1300 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1301 * configure, config.in: Re-generated.
1302 * server.c: Include common/sefltest.h.
1303 (captured_main): Handle option --selftest.
1305 2017-08-09 Yao Qi <yao.qi@linaro.org>
1307 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1308 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1309 i386-avx-mpx.o and i386-mmx.o.
1310 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1311 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1312 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1313 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1314 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1315 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1316 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1317 i386/amd64-avx-mpx.xml.
1319 2017-08-09 Yao Qi <yao.qi@linaro.org>
1321 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1322 and x32-avx-avx512.o.
1323 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1324 i386/x32-avx-avx512.xml.
1326 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1328 * tracepoint.h (enum class fast_tpoint_collect_result): New
1330 (fast_tracepoint_collecting): Change return type to
1331 fast_tpoint_collect_result.
1332 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1333 * linux-low.h: Include tracepoint.h.
1334 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1335 fast_tpoint_collect_result.
1336 * linux-low.c (handle_tracepoints): Adjust.
1337 (linux_fast_tracepoint_collecting): Change return type to
1338 fast_tpoint_collect_result.
1339 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1340 linux_wait_1, stuck_in_jump_pad_callback,
1341 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1342 proceed_one_lwp): Adjust to type change.
1344 2017-07-10 Yao Qi <yao.qi@linaro.org>
1346 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1348 2017-06-29 Yao Qi <yao.qi@linaro.org>
1350 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1352 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1354 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1356 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1358 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1360 * linux-low.c (linux_create_inferior): Adjust code to access the
1361 environment information via 'gdb_environ' class.
1362 * lynx-low.c (lynx_create_inferior): Likewise.
1363 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1364 (get_environ): Return a pointer to 'our_environ'.
1365 (captured_main): Initialize 'our_environ'.
1366 * server.h (get_environ): Adjust prototype.
1367 * spu-low.c (spu_create_inferior): Adjust code to access the
1368 environment information via 'gdb_environ' class.
1370 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1372 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1373 usage of "register" keyword.
1375 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1377 * configure: Re-generate.
1379 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1381 * configure: Re-generate.
1383 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1385 * Makefile.in (COMPILE.pre): Add "-x c++".
1387 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1389 * fork-child.c: Conditionally include <signal.h>.
1391 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1393 * server.c (handle_general_set): Handle new packet
1394 "QStartupWithShell".
1395 (handle_query): Add "QStartupWithShell" to the list of supported
1397 (gdbserver_usage): Add help text explaining the
1398 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1400 (captured_main): Recognize and act upon the presence of the new
1403 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1404 Pedro Alves <palves@redhat.com>
1406 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1407 * configure: Regenerate.
1408 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1410 (i[34567]86-*-lynxos*): Likewise.
1411 (spu*-*-*): Likewise.
1412 * fork-child.c: New file.
1413 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1415 (linux_ptrace_fun): New function.
1416 (linux_create_inferior): Adjust function prototype to reflect
1417 change on "target.h". Adjust function code to use
1419 (linux_request_interrupt): Delete "signal_pid".
1420 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1421 (lynx_ptrace_fun): New function.
1422 (lynx_create_inferior): Adjust function prototype to reflect
1423 change on "target.h". Adjust function code to use
1425 * nto-low.c (nto_create_inferior): Adjust function prototype and
1426 code to reflect change on "target.h". Update comments.
1427 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1428 "common-terminal.h" and "environ.h".
1429 (terminal_fd): Moved to fork-child.c.
1430 (old_foreground_pgrp): Likewise.
1431 (restore_old_foreground_pgrp): Likewise.
1432 (last_status): Make it global.
1433 (last_ptid): Likewise.
1434 (our_environ): New variable.
1435 (startup_with_shell): Likewise.
1436 (program_name): Likewise.
1437 (program_argv): Rename to...
1438 (program_args): ...this.
1439 (wrapper_argv): New variable.
1440 (start_inferior): Delete function.
1441 (get_exec_wrapper): New function.
1442 (get_exec_file): Likewise.
1443 (get_environ): Likewise.
1444 (prefork_hook): Likewise.
1445 (post_fork_inferior): Likewise.
1446 (postfork_hook): Likewise.
1447 (postfork_child_hook): Likewise.
1448 (handle_v_run): Update code to deal with arguments coming from the
1449 remote host. Update calls from "start_inferior" to
1451 (captured_main): Likewise. Initialize environment variable. Call
1453 * server.h (post_fork_inferior): New prototype.
1454 (get_environ): Likewise.
1455 (last_status): Declare.
1456 (last_ptid): Likewise.
1457 (signal_pid): Likewise.
1458 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1459 (spu_ptrace_fun): New function.
1460 (spu_create_inferior): Adjust function prototype to reflect change
1461 on "target.h". Adjust function code to use "fork_inferior".
1462 * target.c (target_terminal_init): New function.
1463 (target_terminal_inferior): Likewise.
1464 (target_terminal_ours): Likewise.
1465 * target.h: Include <vector>.
1466 (struct target_ops) <create_inferior>: Update prototype.
1467 (create_inferior): Update macro.
1468 * utils.c (gdb_flush_out_err): New function.
1469 * win32-low.c (win32_create_inferior): Adjust function prototype
1470 and code to reflect change on "target.h".
1472 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1474 * inferiors.c (switch_to_thread): New function.
1476 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1478 * Makefile.in (SFILE): Add "common/job-control.c".
1479 (OBS): Add "job-control.o".
1481 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1483 * Makefile: Remove "@host_makefile_frag@".
1485 2017-05-05 Pedro Alves <palves@redhat.com>
1487 * configure: Regenerate.
1489 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1491 * configure: Regenerate.
1493 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1495 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1496 software_single_step change of return type to
1497 std::vector<CORE_ADDR>.
1498 * linux-low.c (install_software_single_step_breakpoints):
1500 * linux-low.h (install_software_single_step_breakpoints):
1503 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1505 * remote-utils.c: Include "gdb_termios.h" instead of
1507 * terminal.h: Delete file.
1509 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1511 * server.c: Include <vector>.
1512 <program_argv, wrapper_argv>: Convert to std::vector.
1513 (start_inferior): Rewrite function to use C++.
1514 (handle_v_run): Likewise. Update code that calculates the argv
1515 based on the vRun packet; use C++.
1516 (captured_main): Likewise.
1518 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1520 * server.c (handle_v_cont): Initialize thread_resume::thread
1523 2017-04-05 Pedro Alves <palves@redhat.com>
1525 * configure: Regenerate.
1527 2017-04-05 Pedro Alves <palves@redhat.com>
1529 * gdbreplay.c (sync_error): Constify.
1530 * linux-x86-low.c (push_opcode): Constify.
1532 2017-04-05 Pedro Alves <palves@redhat.com>
1534 * win32-low.c (get_child_debug_event)
1535 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1536 Report TARGET_WAITKIND_SPURIOUS instead.
1538 2017-04-05 Pedro Alves <palves@redhat.com>
1540 * remote-utils.c (remote_prepare, remote_open): Constify.
1541 * remote-utils.h (remote_prepare, remote_open): Constify.
1542 * server.c (captured_main): Constify 'port' handling.
1544 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1546 * Makefile.in (clean): Clear .deps.
1548 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1550 * .gitignore: Remove generated files, replace with wildcard.
1551 * (clean): Replace removal of generated files with wildcard.
1552 (version.c): Replace with...
1553 (version-generated.c): ...this.
1554 (xml-builtin.c): Replace with...
1555 (xml-builtin-generated.c): ...this.
1556 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1557 (%.c: *regformats*): Replace with...
1558 (%-generated.c: *regformats*): ...this.
1560 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1562 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1563 (xtensa_fill_gregset): Call collect_register_by_name for
1565 (xtensa_store_gregset): Call supply_register_by_name for
1568 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1570 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1571 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1572 (xtensa_store_gregset): Call supply_register for all registers in
1573 a0_regnum..a0_regnum + C0_NREGS range.
1575 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1577 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1578 (ax-ipa.o: ax.c): Remove.
1579 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1580 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1581 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1582 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1583 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1585 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1587 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1588 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1589 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1590 (errors-ipa.o: ../common/errors.c): Remove.
1591 (format-ipa.o: ../common/format.c): Remove.
1592 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1594 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1596 * Makefile.in (%-ipa.o: %.c): New rule.
1597 (tracepoint-ipa.o: tracepoint.c): Remove.
1598 (utils-ipa.o: utils.c): Remove.
1599 (remote-utils-ipa.o: remote-utils.c): Remove.
1600 (regcache-ipa.o: regcache.c): Remove.
1601 (i386-linux-ipa.o: i386-linux.c): Remove.
1602 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1603 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1604 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1605 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1606 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1607 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1608 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1609 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1610 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1611 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1612 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1613 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1614 (aarch64-ipa.o: aarch64.c): Remove.
1615 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1616 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1617 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1618 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1619 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1620 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1621 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1622 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1623 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1624 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1625 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1626 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1627 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1628 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1629 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1630 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1631 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1632 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1633 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1634 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1635 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1636 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1637 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1638 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1639 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1640 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1641 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1642 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1643 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1644 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1645 (tdesc-ipa.o: tdesc.c): Remove.
1646 (x32-linux-ipa.o: x32-linux.c): Remove.
1647 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1648 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1650 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1652 * Makefile.in (%.o: ../arch/%.c): New rule.
1653 (arm.o: ../arch/arm.c): Remove.
1654 (arm-linux.o: ../arch/arm-linux.c): Remove.
1655 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1656 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1658 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1660 * Makefile.in (%.o: ../nat/%.c): New rule.
1661 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1662 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1663 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1664 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1665 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1666 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1667 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1668 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1669 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1670 (linux-personality.o: ../nat/linux-personality.c): Remove.
1671 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1672 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1673 (x86-linux.o: ../nat/x86-linux.c): Remove.
1674 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1675 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1677 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1679 * Makefile.in (%.o: ../common/%.c): New rule.
1680 (signals.o: ../common/signals.c): Remove.
1681 (print-utils.o: ../common/print-utils.c): Remove.
1682 (rsp-low.o: ../common/rsp-low.c): Remove.
1683 (common-utils.o: ../common/common-utils.c): Remove.
1684 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1685 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1686 (vec.o: ../common/vec.c): Remove.
1687 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1688 (xml-utils.o: ../common/xml-utils.c): Remove.
1689 (ptid.o: ../common/ptid.c): Remove.
1690 (buffer.o: ../common/buffer.c): Remove.
1691 (format.o: ../common/format.c): Remove.
1692 (filestuff.o: ../common/filestuff.c): Remove.
1693 (agent.o: ../common/agent.c): Remove.
1694 (errors.o: ../common/errors.c): Remove.
1695 (environ.o: ../common/environ.c): Remove.
1696 (common-debug.o: ../common/common-debug.c): Remove.
1697 (cleanups.o: ../common/cleanups.c): Remove.
1698 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1699 (fileio.o: ../common/fileio.c): Remove.
1700 (common-regcache.o: ../common/common-regcache.c): Remove.
1701 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1702 (new-op.o: ../common/new-op.c): Remove.
1703 (btrace-common.o: ../common/btrace-common.c): Remove.
1705 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1707 * Makefile.in (%.o: ../target/%.c): New rule.
1708 (waitstatus.o: ../target/waitstatus.c): Remove.
1710 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1713 (%.c: ../regformats/%.dat,
1714 (%.c: ../regformats/arm/%.dat,
1715 (%.c: ../regformats/i386/%.dat,
1716 (%.c: ../regformats/rs6000/%.dat): New rules.
1717 (aarch64.c): Remove.
1718 (reg-arm.c): Remove.
1719 (arm-with-iwmmxt.c): Remove.
1720 (arm-with-vfpv2.c): Remove.
1721 (arm-with-vfpv3.c): Remove.
1722 (arm-with-neon.c): Remove.
1723 (reg-bfin.c): Remove.
1724 (reg-cris.c): Remove.
1725 (reg-crisv32.c): Remove.
1727 (i386-linux.c): Remove.
1728 (i386-avx.c): Remove.
1729 (i386-avx-linux.c): Remove.
1730 (i386-avx-avx512.c): Remove.
1731 (i386-avx-avx512-linux.c): Remove.
1732 (i386-mpx.c): Remove.
1733 (i386-mpx-linux.c): Remove.
1734 (i386-avx-mpx-avx512-pku.c): Remove.
1735 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1736 (i386-avx-mpx.c): Remove.
1737 (i386-avx-mpx-linux.c): Remove.
1738 (i386-mmx.c): Remove.
1739 (i386-mmx-linux.c): Remove.
1740 (reg-ia64.c): Remove.
1741 (reg-m32r.c): Remove.
1742 (reg-m68k.c): Remove.
1744 (mips-linux.c): Remove.
1745 (mips-dsp-linux.c): Remove.
1746 (mips64-linux.c): Remove.
1747 (mips64-dsp-linux.c): Remove.
1748 (nios2-linux.c): Remove.
1749 (powerpc-32.c): Remove.
1750 (powerpc-32l.c): Remove.
1751 (powerpc-altivec32l.c): Remove.
1752 (powerpc-cell32l.c): Remove.
1753 (powerpc-vsx32l.c): Remove.
1754 (powerpc-isa205-32l.c): Remove.
1755 (powerpc-isa205-altivec32l.c): Remove.
1756 (powerpc-isa205-vsx32l.c): Remove.
1757 (powerpc-e500l.c): Remove.
1758 (powerpc-64l.c): Remove.
1759 (powerpc-altivec64l.c): Remove.
1760 (powerpc-cell64l.c): Remove.
1761 (powerpc-vsx64l.c): Remove.
1762 (powerpc-isa205-64l.c): Remove.
1763 (powerpc-isa205-altivec64l.c): Remove.
1764 (powerpc-isa205-vsx64l.c): Remove.
1765 (s390-linux32.c): Remove.
1766 (s390-linux32v1.c): Remove.
1767 (s390-linux32v2.c): Remove.
1768 (s390-linux64.c): Remove.
1769 (s390-linux64v1.c): Remove.
1770 (s390-linux64v2.c): Remove.
1771 (s390-te-linux64.c): Remove.
1772 (s390-vx-linux64.c): Remove.
1773 (s390-tevx-linux64.c): Remove.
1774 (s390x-linux64.c): Remove.
1775 (s390x-linux64v1.c): Remove.
1776 (s390x-linux64v2.c): Remove.
1777 (s390x-te-linux64.c): Remove.
1778 (s390x-vx-linux64.c): Remove.
1779 (s390x-tevx-linux64.c): Remove.
1780 (tic6x-c64xp-linux.c): Remove.
1781 (tic6x-c64x-linux.c): Remove.
1782 (tic6x-c62x-linux.c): Remove.
1784 (reg-sparc64.c): Remove.
1785 (reg-spu.c): Remove.
1787 (amd64-linux.c): Remove.
1788 (amd64-avx.c): Remove.
1789 (amd64-avx-linux.c): Remove.
1790 (amd64-avx-avx512.c): Remove.
1791 (amd64-avx-avx512-linux.c): Remove.
1792 (amd64-mpx.c): Remove.
1793 (amd64-mpx-linux.c): Remove.
1794 (amd64-avx-mpx-avx512-pku.c): Remove.
1795 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1796 (amd64-avx-mpx.c): Remove.
1797 (amd64-avx-mpx-linux.c): Remove.
1799 (x32-linux.c): Remove.
1800 (x32-avx.c): Remove.
1801 (x32-avx-linux.c): Remove.
1802 (x32-avx-avx512.c): Remove.
1803 (x32-avx-avx512-linux.c): Remove.
1804 (reg-xtensa.c): Remove.
1805 (reg-tilegx.c): Remove.
1806 (reg-tilegx32.c): Remove.
1808 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1810 * Makefile.in (SFILES): Add "common/environ.c".
1811 (OBJS): Add "common/environ.h".
1813 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1815 * configure.ac: Check if the fs_base and gs_base members of
1816 `struct user_regs_struct' exist.
1817 * config.in: Regenerated.
1818 * configure: Likewise.
1820 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1822 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1824 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1825 (get_next_pcs_syscall_next_pc): Likewise.
1827 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1829 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1830 * nto-x86-low.c: Likewise.
1832 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1834 * Makefile.in: Include disable-implicit-rules.mk.
1836 2016-11-23 Pedro Alves <palves@redhat.com>
1838 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1839 (debug_vprintf): Use std::chrono::steady_clock instead of
1840 gettimeofday. Use '.' instead of ':'.
1841 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1842 (get_timestamp): Use std::chrono::steady_clock instead of
1845 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1847 * Makefile.in: Fix whitespace formatting.
1849 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1851 * Makefile.in (SFILES, OBS): Flatten list and order
1854 2016-11-23 Pedro Alves <palves@redhat.com>
1856 * event-loop.c (handle_file_event): Use warning.
1857 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1858 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1861 2016-11-23 Pedro Alves <palves@redhat.com>
1863 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1865 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1866 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1867 debug_printf and debug_flush for debug output.
1868 * server.c (handle_general_set): Likewise.
1869 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1872 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1874 * Makefile.in (.c.o): Replace rule with ...
1875 (%.o: %.c): ... this one.
1877 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1879 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1880 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1882 * configure.ac: Remove checks for the make program.
1883 * configure: Re-generate.
1885 2016-10-28 Pedro Alves <palves@redhat.com>
1887 * Makefile.in (CXX_DIALECT): Get from configure.
1888 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1889 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1890 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1891 * config.in: Regenerate.
1892 * configure: Regenerate.
1894 2016-10-27 Yao Qi <yao.qi@linaro.org>
1896 * linux-low.c (linux_supports_range_stepping): Return true if
1897 can_software_single_step return true.
1899 2016-10-27 Yao Qi <yao.qi@linaro.org>
1901 * inferiors.c (find_inferior_in_random): New function.
1902 * inferiors.h (find_inferior_in_random): Declare.
1903 * linux-low.c (linux_wait_for_event_filtered): Call
1904 find_inferior_in_random instead of find_inferior.
1906 2016-10-27 Yao Qi <yao.qi@linaro.org>
1908 * linux-low.c (linux_wait_1): If single-step breakpoints are
1909 inserted, remove them.
1911 2016-10-26 Pedro Alves <palves@redhat.com>
1913 * linux-low.c (handle_extended_wait): Link parent/child fork
1915 (linux_wait_1): Unlink them.
1916 (linux_set_resume_request): Ignore resume requests for
1917 already-resumed and unhandled fork child threads.
1918 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1919 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1921 (handle_v_requests) <vCont>: Don't call require_running.
1922 * server.h (in_queued_stop_replies): New declaration.
1924 2016-10-24 Yao Qi <yao.qi@linaro.org>
1927 * linux-aarch64-low.c (append_insns): Cast the return value to
1930 2016-10-10 Yao Qi <yao.qi@linaro.org>
1932 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1934 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1936 * target.c (target_supports_multi_process): New function, moved
1938 * target.h (target_supports_multi_process): ... here. Remove
1941 2016-10-05 Tom Tromey <tom@tromey.com>
1944 * tracepoint.c (handle_tracepoint_bkpts): Check
1945 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1947 2016-10-05 Yao Qi <yao.qi@linaro.org>
1949 * configure.srv: Update the path of arm-*.xml files.
1951 2016-10-05 Terry Guo <terry.guo@arm.com>
1952 Yao Qi <yao.qi@linaro.org>
1954 * Makefile.in: Adjust the path of rules.
1955 * configure.srv: Update the path of xml files.
1956 * regformats/arm-with-iwmmxt.dat: Regenerated.
1957 * regformats/arm-with-neon.dat: Likewise.
1958 * regformats/arm-with-vfpv2.dat: Likewise.
1959 * regformats/arm-with-vfpv3.dat Likewise.
1961 2016-09-30 Yao Qi <yao.qi@linaro.org>
1964 * target.c (target_stop_and_wait): Don't call
1965 target_continue_no_signal, use resume_stop instead.
1967 2016-09-26 Yao Qi <yao.qi@linaro.org>
1969 * linux-low.c (linux_wait_1): Call debug_exit.
1971 2016-09-23 Pedro Alves <palves@redhat.com>
1973 * Makefile.in (SFILES): Add common/new-op.c.
1974 (OBS): Add common/new-op.o.
1975 (new-op.o): New rule.
1977 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1979 * .gitinore: Ignore more files.
1981 2016-09-21 Yao Qi <yao.qi@linaro.org>
1983 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1986 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1988 * server.c (start_inferior): Call target_mourn_inferior instead of
1989 mourn_inferior; pass ptid_t argument to it.
1991 (handle_target_event): Likewise.
1992 * target.c (target_mourn_inferior): New function.
1993 * target.h (mourn_inferior): Delete macro.
1995 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1997 * linux-low.c (lwp_is_stepping): New function.
1999 2016-09-06 Carl Love <cel@us.ibm.com>
2001 * server.c (start_inferior): Fixed comment, requested comment change
2002 didn't get updated correctly. Removed reference to ptrace () call as
2003 it is only true on Linux systems.
2005 2016-09-06 Carl Love <cel@us.ibm.com>
2007 * server.c (start_inferior): Do not call
2008 function target_post_create_inferior () if the
2009 inferior process has already exited.
2011 2016-09-05 Pedro Alves <palves@redhat.com>
2013 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2014 (COMPILE.pre, CC_LD): Use CXX directly.
2015 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2016 * acinclude.m4: Don't include build-with-cxx.m4.
2017 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2018 * configure: Regenerate.
2020 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2023 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2024 call writing data to own_buf.
2026 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2028 * target.c (mywait): Call target_wait instead of
2030 (target_wait): New function.
2032 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2034 * server.c (start_inferior): New variable 'ptid'. Replace calls
2035 to the_target->resume by target_continue{,_no_signal}, depending
2037 * target.c (target_stop_and_wait): Call target_continue_no_signal
2038 instead of the_target->resume.
2039 (target_continue): New function.
2041 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2043 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2045 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2048 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2050 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2051 * linux-arm-low.c (ps_get_thread_area): Likewise.
2052 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2053 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2054 * linux-mips-low.c (ps_get_thread_area): Likewise.
2055 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2056 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2057 * linux-x86-low.c (ps_get_thread_area): Likewise.
2058 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2060 2016-08-19 Pedro Alves <palves@redhat.com>
2062 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2064 2016-08-19 Pedro Alves <palves@redhat.com>
2066 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2067 comment. Use memcpy instead of casting through unsigned long.
2069 2016-08-19 Pedro Alves <palves@redhat.com>
2071 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2072 allocating around 0x80000000.
2074 2016-08-19 Pedro Alves <palves@redhat.com>
2077 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2078 (x32-avx512-linux-ipa.o): New rules.
2079 * configure.ac (x86_64-*-linux*): New x32 check.
2080 * configure.srv (ipa_x32_linux_regobj): New.
2081 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2082 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2084 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2086 * configure: Regenerate.
2088 2016-08-09 Pedro Alves <palves@redhat.com>
2091 * Makefile.in (OBS): Add signals-state-save-restore.o.
2092 (signals-state-save-restore.o): New rule.
2093 * config.in: Regenerate.
2094 * configure: Regenerate.
2095 * linux-low.c: Include "signals-state-save-restore.h".
2096 (linux_create_inferior): Call
2097 restore_original_signals_state.
2098 * server.c: Include "dispositions-save-restore.h".
2099 (captured_main): Call save_original_signals_state.
2101 2016-08-05 Pedro Alves <palves@redhat.com>
2103 * configure: Regenerate.
2105 2016-08-04 Yao Qi <yao.qi@linaro.org>
2107 * linux-low.c (regsets_fetch_inferior_registers): Check
2108 errno is ESRCH or not.
2110 2016-08-02 Yao Qi <yao.qi@linaro.org>
2112 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2113 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2114 (thread_db_load_search): Update.
2115 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2116 td_ta_set_event and td_ta_event_getmsg.
2118 2016-07-26 Pedro Alves <palves@redhat.com>
2121 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2122 of unsigned long for 64-bit registers and use uint32_t instead of
2123 unsigned int for 32-bit registers.
2125 2016-07-26 Pedro Alves <palves@redhat.com>
2127 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2130 2016-07-21 Tom Tromey <tom@tromey.com>
2132 * configure: Rebuild.
2134 2016-07-21 Yao Qi <yao.qi@linaro.org>
2136 * mem-break.c (find_gdb_breakpoint): Cast bp to
2137 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2139 2016-07-21 Yao Qi <yao.qi@linaro.org>
2141 * server.c (handle_v_requests): Support s and S actions
2142 if target_supports_software_single_step return true.
2144 2016-07-21 Yao Qi <yao.qi@linaro.org>
2146 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2147 is resume_step, call maybe_hw_step.
2148 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2150 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2152 (proceed_one_lwp): If resume request is resume_step, install
2153 reinsert breakpoints and call maybe_hw_step.
2155 2016-07-21 Yao Qi <yao.qi@linaro.org>
2157 * linux-low.c (proceed_one_lwp): Declare.
2158 (linux_resume_one_thread): Remove local variable 'step'.
2159 Lift code enqueue signal. Call proceed_one_lwp instead of
2160 linux_resume_one_lwp.
2162 2016-07-21 Yao Qi <yao.qi@linaro.org>
2164 * linux-low.c (linux_resume_one_thread): Call
2165 enqueue_pending_signal.
2167 2016-07-21 Yao Qi <yao.qi@linaro.org>
2169 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2170 * inferiors.c (do_restore_current_thread_cleanup): New function.
2171 (make_cleanup_restore_current_thread): Likewise.
2172 * linux-low.c (install_software_single_step_breakpoints): Call
2173 make_cleanup_restore_current_thread. Switch current_thread to
2176 2016-07-21 Yao Qi <yao.qi@linaro.org>
2178 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2179 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2180 (clone_one_breakpoint): Likewise.
2181 (delete_reinsert_breakpoints): Change parameter to thread.
2183 (has_reinsert_breakpoints): Likewise.
2184 (uninsert_reinsert_breakpoints): Likewise.
2185 (reinsert_reinsert_breakpoints): Likewise.
2186 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2187 (delete_reinsert_breakpoints): Likewise.
2188 (reinsert_reinsert_breakpoints): Likewise.
2189 (uninsert_reinsert_breakpoints): Likewise.
2190 (has_reinsert_breakpoints): Likewise.
2192 2016-07-21 Yao Qi <yao.qi@linaro.org>
2194 * inferiors.c (get_thread_process): Make parameter const.
2195 * inferiors.h (get_thread_process): Update declaration.
2196 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2197 Add new parameters child_thread and parent_thread. Callers
2199 * mem-break.h (clone_all_breakpoints): Update declaration.
2201 2016-07-21 Yao Qi <yao.qi@linaro.org>
2203 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2204 <command_list, handler>: Remove.
2205 (struct gdb_breakpoint): New.
2206 (struct other_breakpoint): New.
2207 (struct reinsert_breakpoint): New.
2208 (is_gdb_breakpoint): New function.
2209 (any_persistent_commands): Update command_list if
2210 is_gdb_breakpoint returns true.
2211 (set_breakpoint): Create breakpoints according to their types.
2212 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2213 (set_gdb_breakpoint_1): Likewise.
2214 (set_gdb_breakpoint): Likewise.
2215 (clear_breakpoint_conditions): Change parameter type to
2216 'struct gdb_breakpoint *'.
2217 (clear_breakpoint_commands): Likewise.
2218 (clear_breakpoint_conditions_and_commands): Likewise.
2219 (add_condition_to_breakpoint): Likewise.
2220 (add_breakpoint_condition): Likewise.
2221 (add_commands_to_breakpoint): Likewise.
2222 (check_breakpoints): Check other_breakpoint.
2223 (clone_one_breakpoint): Clone breakpopint according to its type.
2224 * mem-break.h (struct gdb_breakpoint): Declare.
2225 (set_gdb_breakpoint): Update declaration.
2226 (clear_breakpoint_conditions_and_commands): Likewise.
2227 (add_breakpoint_condition): Likewise.
2228 (add_breakpoint_commands): Likewise.
2229 * server.c (process_point_options): Change parameter type to
2230 'struct gdb_breakpoint *'.
2232 2016-07-21 Yao Qi <yao.qi@linaro.org>
2234 * mem-break.c (set_breakpoint_at): Rename it to ...
2235 (set_breakpoint_type_at): ... it.
2236 (set_breakpoint_at): Call set_breakpoint_type_at.
2237 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2238 * mem-break.h (set_breakpoint_at): Update comments.
2240 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2242 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2244 (nios2_store_gregset): Likewise.
2246 2016-07-01 Pedro Alves <palves@redhat.com>
2247 Antoine Tremblay <antoine.tremblay@ericsson.com>
2249 * linux-low.c: Change interface to take the target lwp_info
2250 pointer directly and return void. Handle detaching from a zombie
2252 (linux_detach_lwp_callback): New function.
2253 (linux_detach): Detach from the leader thread after detaching from
2256 2016-06-28 Yao Qi <yao.qi@linaro.org>
2258 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2259 for variable new_offset.
2260 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2261 (aarch64_ftrace_insn_reloc_cb): Likewise.
2262 (aarch64_ftrace_insn_reloc_tb): Likewise.
2263 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2264 PRIx64 instead of PRIx32.
2266 2016-06-28 Yao Qi <yao.qi@linaro.org>
2268 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2269 (the_low_target): Install arm_get_syscall_trapinfo.
2271 2016-06-28 Yao Qi <yao.qi@linaro.org>
2273 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2275 (the_low_target): Install aarch64_get_syscall_trapinfo.
2277 2016-06-28 Yao Qi <yao.qi@linaro.org>
2279 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2281 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2282 Remove parameter sysno.
2283 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2286 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2288 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2289 (s390_emit_ne_goto): Likewise.
2290 (s390_emit_lt_goto): Likewise.
2291 (s390_emit_le_goto): Likewise.
2292 (s390_emit_gt_goto): Likewise.
2293 (s390_emit_ge_goto): Likewise.
2294 (s390x_emit_eq_goto): Likewise.
2295 (s390x_emit_ne_goto): Likewise.
2296 (s390x_emit_lt_goto): Likewise.
2297 (s390x_emit_le_goto): Likewise.
2298 (s390x_emit_gt_goto): Likewise.
2299 (s390x_emit_ge_goto): Likewise.
2300 (s390_emit_ops_impl): Mark variable static.
2301 (s390x_emit_ops): Likewise.
2303 2016-06-17 Yao Qi <yao.qi@linaro.org>
2305 * linux-low.c (handle_extended_wait): Call
2306 uninsert_reinsert_breakpoints for the parent process. Remove
2307 reinsert breakpoints from the child process. Reinsert them to
2308 the parent process when vfork is done.
2309 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2310 (reinsert_reinsert_breakpoints): New function.
2311 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2312 (reinsert_reinsert_breakpoints): Declare.
2314 2016-06-17 Yao Qi <yao.qi@linaro.org>
2316 * linux-low.c (handle_extended_wait): If the parent is doing
2317 step-over, remove the reinsert breakpoints from the forked child.
2319 2016-06-17 Yao Qi <yao.qi@linaro.org>
2321 * linux-low.c (unsuspend_all_lwps): Declare.
2322 (linux_low_filter_event): If thread exited, call finish_step_over.
2323 If step-over is finished, unsuspend other threads.
2325 2016-06-17 Yao Qi <yao.qi@linaro.org>
2327 * linux-low.c (linux_resume_one_lwp_throw): Assert
2328 has_reinsert_breakpoints returns false.
2329 * mem-break.c (delete_disabled_breakpoints): Assert
2330 bp type isn't reinsert_breakpoint.
2332 2016-06-17 Yao Qi <yao.qi@linaro.org>
2334 * linux-low.c (maybe_hw_step): New function.
2335 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2336 (finish_step_over): Switch current_thread to lwp temporarily,
2337 and assert has_reinsert_breakpoints returns true.
2338 (proceed_one_lwp): Call maybe_hw_step.
2339 * mem-break.c (has_reinsert_breakpoints): New function.
2340 * mem-break.h (has_reinsert_breakpoints): Declare.
2342 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2344 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2346 2016-05-17 Yao Qi <yao.qi@linaro.org>
2348 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2349 instead of find_inferior.
2351 2016-05-05 Yao Qi <yao.qi@linaro.org>
2353 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2354 Initialize res to zero.
2356 2016-05-05 Yao Qi <yao.qi@linaro.org>
2358 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2361 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2363 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2364 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2365 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2367 2016-04-28 Par Olsson <par.olsson@windriver.com>
2368 Simon Marchi <simon.marchi@ericsson.com>
2370 * tracepoint.c (write_inferior_int8): New function.
2371 (cmd_qtenable_disable): Write enable flag using
2372 write_inferior_int8.
2374 2016-04-25 Yao Qi <yao.qi@linaro.org>
2376 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2377 (need_step_over_p): Return zero if the LWP has pending signals
2378 can be delivered on software single step target.
2380 2016-04-25 Yao Qi <yao.qi@linaro.org>
2382 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2383 return instead of error.
2385 2016-04-22 Yao Qi <yao.qi@linaro.org>
2387 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2390 2016-04-22 Yao Qi <yao.qi@linaro.org>
2392 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2393 signal when stepping over breakpoint with software single
2396 2016-04-21 Pedro Alves <palves@redhat.com>
2398 * linux-s390-low.c (s390_collect_ptrace_register)
2399 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2401 (s390_check_regset): Use void * instead of gdb_byte *.
2403 2016-04-20 Pedro Alves <palves@redhat.com>
2405 * configure: Renegerate.
2407 2016-04-20 Yao Qi <yao.qi@linaro.org>
2409 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2410 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2412 (arm_store_gregset): Likewise.
2414 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2416 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2417 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2418 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2419 (amd64-avx-mpx-linux.c): New rules.
2420 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2421 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2422 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2423 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2424 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2425 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2426 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2427 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2428 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2429 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2430 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2431 * linux-x86-low.c (x86_linux_read_description): Add case for
2432 X86_XSTATE_AVX_MPX_MASK.
2433 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2434 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2435 init_registers_i386_avx_mpx_linux.
2436 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2437 (initialize_low_tracepoint): Call
2438 init_registers_i386_avx_mpx_linux.
2439 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2440 (initialize_low_tracepoint): Call
2441 init_registers_amd64_avx_mpx_linux.
2442 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2443 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2444 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2447 2016-04-18 Pedro Alves <palves@redhat.com>
2449 * configure: Regenerate.
2451 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2453 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2454 (aarch64_emit_sub): Likewise.
2456 2016-04-12 Pedro Alves <palves@redhat.com>
2458 * utils.c (prepare_to_throw_exception): Delete.
2460 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2462 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2464 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2466 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2468 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2470 * linux-aarch64-ipa.c: Add <elf.h> include.
2471 * linux-ppc-ipa.c: Add <elf.h> include.
2472 * linux-s390-ipa.c: Add <elf.h> include.
2474 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2476 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2477 (get_raw_reg_ptr): Likewise.
2478 (get_trace_state_variable_value_ptr): Likewise.
2479 (set_trace_state_variable_value_ptr): Likewise.
2480 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2483 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2484 Marcin Kościelnicki <koriakin@0x04.net>
2487 * linux-ppc-low.c (emit_insns): New function.
2488 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2489 (ppc_emit_prologue): New function.
2490 (ppc_emit_epilogue): New function.
2491 (ppc_emit_add): New function.
2492 (ppc_emit_sub): New function.
2493 (ppc_emit_mul): New function.
2494 (ppc_emit_lsh): New function.
2495 (ppc_emit_rsh_signed): New function.
2496 (ppc_emit_rsh_unsigned): New function.
2497 (ppc_emit_ext): New function.
2498 (ppc_emit_zero_ext): New function.
2499 (ppc_emit_log_not): New function.
2500 (ppc_emit_bit_and): New function.
2501 (ppc_emit_bit_or): New function.
2502 (ppc_emit_bit_xor): New function.
2503 (ppc_emit_bit_not): New function.
2504 (ppc_emit_equal): New function.
2505 (ppc_emit_less_signed): New function.
2506 (ppc_emit_less_unsigned): New function.
2507 (ppc_emit_ref): New function.
2508 (ppc_emit_const): New function.
2509 (ppc_emit_reg): New function.
2510 (ppc_emit_pop): New function.
2511 (ppc_emit_stack_flush): New function.
2512 (ppc_emit_swap): New function.
2513 (ppc_emit_stack_adjust): New function.
2514 (ppc_emit_call): New function.
2515 (ppc_emit_int_call_1): New function.
2516 (ppc_emit_void_call_2): New function.
2517 (ppc_emit_if_goto): New function.
2518 (ppc_emit_goto): New function.
2519 (ppc_emit_eq_goto): New function.
2520 (ppc_emit_ne_goto): New function.
2521 (ppc_emit_lt_goto): New function.
2522 (ppc_emit_le_goto): New function.
2523 (ppc_emit_gt_goto): New function.
2524 (ppc_emit_ge_goto): New function.
2525 (ppc_write_goto_address): New function.
2526 (ppc_emit_ops_impl): New static variable.
2527 (ppc64v1_emit_prologue): New function.
2528 (ppc64v2_emit_prologue): New function.
2529 (ppc64_emit_epilogue): New function.
2530 (ppc64_emit_add): New function.
2531 (ppc64_emit_sub): New function.
2532 (ppc64_emit_mul): New function.
2533 (ppc64_emit_lsh): New function.
2534 (ppc64_emit_rsh_signed): New function.
2535 (ppc64_emit_rsh_unsigned): New function.
2536 (ppc64_emit_ext): New function.
2537 (ppc64_emit_zero_ext): New function.
2538 (ppc64_emit_log_not): New function.
2539 (ppc64_emit_bit_and): New function.
2540 (ppc64_emit_bit_or): New function.
2541 (ppc64_emit_bit_xor): New function.
2542 (ppc64_emit_bit_not): New function.
2543 (ppc64_emit_equal): New function.
2544 (ppc64_emit_less_signed): New function.
2545 (ppc64_emit_less_unsigned): New function.
2546 (ppc64_emit_ref): New function.
2547 (ppc64_emit_const): New function.
2548 (ppc64v1_emit_reg): New function.
2549 (ppc64v2_emit_reg): New function.
2550 (ppc64_emit_pop): New function.
2551 (ppc64_emit_stack_flush): New function.
2552 (ppc64_emit_swap): New function.
2553 (ppc64v1_emit_call): New function.
2554 (ppc64v2_emit_call): New function.
2555 (ppc64v1_emit_int_call_1): New function.
2556 (ppc64v2_emit_int_call_1): New function.
2557 (ppc64v1_emit_void_call_2): New function.
2558 (ppc64v2_emit_void_call_2): New function.
2559 (ppc64_emit_if_goto): New function.
2560 (ppc64_emit_eq_goto): New function.
2561 (ppc64_emit_ne_goto): New function.
2562 (ppc64_emit_lt_goto): New function.
2563 (ppc64_emit_le_goto): New function.
2564 (ppc64_emit_gt_goto): New function.
2565 (ppc64_emit_ge_goto): New function.
2566 (ppc64v1_emit_ops_impl): New static variable.
2567 (ppc64v2_emit_ops_impl): New static variable.
2568 (ppc_emit_ops): New function.
2569 (linux_low_target): Wire in ppc_emit_ops.
2571 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2572 Marcin Kościelnicki <koriakin@0x04.net>
2575 * Makefile.in: Add powerpc-*-ipa.o
2576 * configure.srv: Add ipa_obj for powerpc*-linux.
2577 * linux-ppc-ipa.c: New file.
2578 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2580 (PPC_FIELD): New macro.
2581 (PPC_SEXT): New macro.
2582 (PPC_OP6): New macro.
2583 (PPC_BO): New macro.
2584 (PPC_LI): New macro.
2585 (PPC_BD): New macro.
2586 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2587 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2588 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2589 (ppc_get_thread_area): New function.
2590 (is_elfv2_inferior): New function.
2591 (gen_ds_form): New function.
2592 (GEN_STD): New macro.
2593 (GEN_STDU): New macro.
2594 (GEN_LD): New macro.
2595 (GEN_LDU): New macro.
2596 (gen_d_form): New function.
2597 (GEN_ADDI): New macro.
2598 (GEN_ADDIS): New macro.
2599 (GEN_LI): New macro.
2600 (GEN_LIS): New macro.
2601 (GEN_ORI): New macro.
2602 (GEN_ORIS): New macro.
2603 (GEN_LWZ): New macro.
2604 (GEN_STW): New macro.
2605 (GEN_STWU): New macro.
2606 (gen_xfx_form): New function.
2607 (GEN_MFSPR): New macro.
2608 (GEN_MTSPR): New macro.
2609 (GEN_MFCR): New macro.
2610 (GEN_MTCR): New macro.
2611 (GEN_SYNC): New macro.
2612 (GEN_LWSYNC): New macro.
2613 (gen_x_form): New function.
2614 (GEN_OR): New macro.
2615 (GEN_MR): New macro.
2616 (GEN_LWARX): New macro.
2617 (GEN_STWCX): New macro.
2618 (GEN_CMPW): New macro.
2619 (gen_md_form): New function.
2620 (GEN_RLDICL): New macro.
2621 (GEN_RLDICR): New macro.
2622 (gen_i_form): New function.
2624 (GEN_BL): New macro.
2625 (gen_b_form): New function.
2626 (GEN_BNE): New macro.
2627 (GEN_LOAD): New macro.
2628 (GEN_STORE): New macro.
2629 (gen_limm): New function.
2630 (gen_atomic_xchg): New function.
2631 (gen_call): New function.
2632 (ppc_relocate_instruction): New function.
2633 (ppc_install_fast_tracepoint_jump_pad): New function.
2634 (ppc_get_min_fast_tracepoint_insn_len): New function.
2635 (ppc_get_ipa_tdesc_idx): New function.
2636 (the_low_target): Wire in the new functions.
2637 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2639 * linux-ppc-tdesc.h: New file.
2641 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2643 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2644 (alloc_jump_pad_buffer): New function.
2645 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2646 (alloc_jump_pad_buffer): New function.
2647 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2648 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2649 (alloc_jump_pad_buffer): New function.
2650 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2651 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2652 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2653 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2655 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2657 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2658 * linux-amd64-ipa.c: Likewise.
2659 * linux-i386-ipa.c: Likewise.
2660 * linux-s390-ipa.c: Likewise.
2661 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2662 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2663 set_trace_state_variable_value_ptr.
2664 (struct ipa_sym_addresses): Likewise.
2665 (symbol_list): Likewise.
2666 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2667 accessing gdb_collect directly.
2668 (gdb_collect_ptr_type): New typedef.
2669 (get_raw_reg_ptr_type): New typedef.
2670 (get_trace_state_variable_value_ptr_type): New typedef.
2671 (set_trace_state_variable_value_ptr_type): New typedef.
2672 (gdb_collect_ptr): New global.
2673 (get_raw_reg_ptr): New global.
2674 (get_trace_state_variable_value_ptr): New global.
2675 (set_trace_state_variable_value_ptr): New global.
2676 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2677 accessing get_raw_reg directly.
2678 (get_get_tsv_func_addr): Likewise for
2679 get_trace_state_variable_value_ptr.
2680 (get_set_tsv_func_addr): Likewise for
2681 set_trace_state_variable_value_ptr.
2682 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2684 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2686 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2688 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2690 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2692 (relocate_instruction): Remove own_buf.
2693 * server.c (own_buf): Make global.
2694 (handle_v_requests): Make global.
2695 * server.h (own_buf): New declaration.
2696 (handle_v_requests): New prototype.
2698 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2701 * linux-s390-low.c (add_insns): New function.
2702 (s390_emit_prologue): New function.
2703 (s390_emit_epilogue): New function.
2704 (s390_emit_add): New function.
2705 (s390_emit_sub): New function.
2706 (s390_emit_mul): New function.
2707 (s390_emit_lsh): New function.
2708 (s390_emit_rsh_signed): New function.
2709 (s390_emit_rsh_unsigned): New function.
2710 (s390_emit_ext): New function.
2711 (s390_emit_log_not): New function.
2712 (s390_emit_bit_and): New function.
2713 (s390_emit_bit_or): New function.
2714 (s390_emit_bit_xor): New function.
2715 (s390_emit_bit_not): New function.
2716 (s390_emit_equal): New function.
2717 (s390_emit_less_signed): New function.
2718 (s390_emit_less_unsigned): New function.
2719 (s390_emit_ref): New function.
2720 (s390_emit_if_goto): New function.
2721 (s390_emit_goto): New function.
2722 (s390_write_goto_address): New function.
2723 (s390_emit_litpool): New function.
2724 (s390_emit_const): New function.
2725 (s390_emit_call): New function.
2726 (s390_emit_reg): New function.
2727 (s390_emit_pop): New function.
2728 (s390_emit_stack_flush): New function.
2729 (s390_emit_zero_ext): New function.
2730 (s390_emit_swap): New function.
2731 (s390_emit_stack_adjust): New function.
2732 (s390_emit_set_r2): New function.
2733 (s390_emit_int_call_1): New function.
2734 (s390_emit_void_call_2): New function.
2735 (s390_emit_eq_goto): New function.
2736 (s390_emit_ne_goto): New function.
2737 (s390_emit_lt_goto): New function.
2738 (s390_emit_le_goto): New function.
2739 (s390_emit_gt_goto): New function.
2740 (s390_emit_ge_goto): New function.
2741 (s390x_emit_prologue): New function.
2742 (s390x_emit_epilogue): New function.
2743 (s390x_emit_add): New function.
2744 (s390x_emit_sub): New function.
2745 (s390x_emit_mul): New function.
2746 (s390x_emit_lsh): New function.
2747 (s390x_emit_rsh_signed): New function.
2748 (s390x_emit_rsh_unsigned): New function.
2749 (s390x_emit_ext): New function.
2750 (s390x_emit_log_not): New function.
2751 (s390x_emit_bit_and): New function.
2752 (s390x_emit_bit_or): New function.
2753 (s390x_emit_bit_xor): New function.
2754 (s390x_emit_bit_not): New function.
2755 (s390x_emit_equal): New function.
2756 (s390x_emit_less_signed): New function.
2757 (s390x_emit_less_unsigned): New function.
2758 (s390x_emit_ref): New function.
2759 (s390x_emit_if_goto): New function.
2760 (s390x_emit_const): New function.
2761 (s390x_emit_call): New function.
2762 (s390x_emit_reg): New function.
2763 (s390x_emit_pop): New function.
2764 (s390x_emit_stack_flush): New function.
2765 (s390x_emit_zero_ext): New function.
2766 (s390x_emit_swap): New function.
2767 (s390x_emit_stack_adjust): New function.
2768 (s390x_emit_int_call_1): New function.
2769 (s390x_emit_void_call_2): New function.
2770 (s390x_emit_eq_goto): New function.
2771 (s390x_emit_ne_goto): New function.
2772 (s390x_emit_lt_goto): New function.
2773 (s390x_emit_le_goto): New function.
2774 (s390x_emit_gt_goto): New function.
2775 (s390x_emit_ge_goto): New function.
2776 (s390_emit_ops): New function.
2777 (struct linux_target_ops): Fill in emit_ops hook.
2779 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2782 * Makefile.in: Add s390 IPA files.
2783 * configure.srv: Build IPA for s390.
2784 * linux-s390-ipa.c: New file.
2785 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2786 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2787 (tdesc_s390_linux32): Likewise.
2788 (init_registers_s390_linux32v1): Likewise.
2789 (tdesc_s390_linux32v1): Likewise.
2790 (init_registers_s390_linux32v2): Likewise.
2791 (tdesc_s390_linux32v2): Likewise.
2792 (init_registers_s390_linux64): Likewise.
2793 (tdesc_s390_linux64): Likewise.
2794 (init_registers_s390_linux64v1): Likewise.
2795 (tdesc_s390_linux64v1): Likewise.
2796 (init_registers_s390_linux64v2): Likewise.
2797 (tdesc_s390_linux64v2): Likewise.
2798 (init_registers_s390_te_linux64): Likewise.
2799 (tdesc_s390_te_linux64): Likewise.
2800 (init_registers_s390_vx_linux64): Likewise.
2801 (tdesc_s390_vx_linux64): Likewise.
2802 (init_registers_s390_tevx_linux64): Likewise.
2803 (tdesc_s390_tevx_linux64): Likewise.
2804 (init_registers_s390x_linux64): Likewise.
2805 (tdesc_s390x_linux64): Likewise.
2806 (init_registers_s390x_linux64v1): Likewise.
2807 (tdesc_s390x_linux64v1): Likewise.
2808 (init_registers_s390x_linux64v2): Likewise.
2809 (tdesc_s390x_linux64v2): Likewise.
2810 (init_registers_s390x_te_linux64): Likewise.
2811 (tdesc_s390x_te_linux64): Likewise.
2812 (init_registers_s390x_vx_linux64): Likewise.
2813 (tdesc_s390x_vx_linux64): Likewise.
2814 (init_registers_s390x_tevx_linux64): Likewise.
2815 (tdesc_s390x_tevx_linux64): Likewise.
2816 (have_hwcap_s390_vx): New static variable.
2817 (s390_arch_setup): Fill have_hwcap_s390_vx.
2818 (s390_get_thread_area): New function.
2819 (s390_ft_entry_gpr_esa): New const.
2820 (s390_ft_entry_gpr_zarch): New const.
2821 (s390_ft_entry_misc): New const.
2822 (s390_ft_entry_fr): New const.
2823 (s390_ft_entry_vr): New const.
2824 (s390_ft_main_31): New const.
2825 (s390_ft_main_64): New const.
2826 (s390_ft_exit_fr): New const.
2827 (s390_ft_exit_vr): New const.
2828 (s390_ft_exit_misc): New const.
2829 (s390_ft_exit_gpr_esa): New const.
2830 (s390_ft_exit_gpr_zarch): New const.
2831 (append_insns): New function.
2832 (s390_relocate_instruction): New function.
2833 (s390_install_fast_tracepoint_jump_pad): New function.
2834 (s390_get_min_fast_tracepoint_insn_len): New function.
2835 (s390_get_ipa_tdesc_idx): New function.
2836 (struct linux_target_ops): Wire in the above functions.
2837 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2838 * linux-s390-tdesc.h: New file.
2840 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2842 * linux-s390-low.c (s390_supports_tracepoints): New function.
2843 (struct linux_target_ops): Fill supports_tracepoints hook.
2845 2016-03-18 Yao Qi <yao.qi@linaro.org>
2847 * linux-low.c (lwp_signal_can_be_delivered): New function.
2848 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2850 2016-03-18 Yao Qi <yao.qi@linaro.org>
2852 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2853 0 if signal is enqueued. Remove 'signal' from one debugging
2854 message. Move one debugging message to some lines below.
2855 Remove code setting 'signal' to 0.
2857 2016-03-18 Yao Qi <yao.qi@linaro.org>
2859 * linux-low.c (linux_low_filter_event): Remove redundant
2860 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2862 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2864 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2865 (struct linux_target_ops): Wire in the above.
2867 2016-03-03 Yao Qi <yao.qi@linaro.org>
2869 * linux-low.c: Update comments to start_step_over.
2871 2016-03-03 Yao Qi <yao.qi@linaro.org>
2874 * linux-low.c (handle_extended_wait): Set child suspended
2875 if event_lwp->bp_reinsert isn't zero.
2877 2016-03-02 Yao Qi <yao.qi@linaro.org>
2879 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2880 enqueue_pending_signal.
2882 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2884 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2887 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2889 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2890 (s390_regmap_3264) [!__s390x__]: New global.
2891 (s390_collect_ptrace_register): Skip map entries containing -1.
2892 (s390_supply_ptrace_register): Ditto.
2893 (s390_fill_gprs_high): New function.
2894 (s390_store_gprs_high): New function.
2895 (s390_regsets): Add NT_S390_HIGH_GPRS.
2896 (s390_get_hwcap): Enable on 31-bit.
2897 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2898 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2899 Detect NT_S390_HIGH_GPRS.
2900 (s390_usrregs_info_3264): Enable on 31-bit.
2901 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2902 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2904 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2907 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2908 * configure.srv: Ditto.
2909 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2910 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2911 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2912 (init_registers_amd64_linux): Remove prototype.
2913 (tdesc_amd64_linux): Remove declaration.
2914 (get_ipa_tdesc): New function.
2915 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2916 initialize remaining tdescs.
2917 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2918 (init_registers_i386_linux): Remove prototype.
2919 (tdesc_i386_linux): Remove declaration.
2920 (get_ipa_tdesc): New function.
2921 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2922 initialize remaining tdescs.
2923 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2924 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2925 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2926 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2927 (x86_get_ipa_tdesc_idx): New function.
2928 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2929 * linux-x86-tdesc.h: New file.
2930 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2931 (target_get_ipa_tdesc_idx): New macro.
2932 * tracepoint.c (ipa_tdesc_idx): New macro.
2933 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2934 (symbol_list): Add ipa_tdesc_idx.
2935 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2936 (ipa_tdesc): Remove.
2937 (ipa_tdesc_idx): New variable.
2938 (get_context_regcache): Use get_ipa_tdesc.
2939 (gdb_collect): Ditto.
2941 * tracepoint.h (get_ipa_tdesc): New prototype.
2942 (ipa_tdesc): Remove.
2944 2016-02-24 Pedro Alves <palves@redhat.com>
2946 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2947 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2948 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2949 Factor out common code between the USE_SIGTRAP_SIGINFO and
2950 !USE_SIGTRAP_SIGINFO blocks.
2951 (linux_low_filter_event): Call save_stop_reason instead of
2952 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2954 (linux_wait_1): Update comments.
2956 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2958 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2959 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2960 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2961 ppc_insert_point, ppc_remove_point.
2963 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2965 * linux-s390-low.c (s390_supports_z_point_type): New function.
2966 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2968 2016-02-16 Yao Qi <yao.qi@linaro.org>
2970 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2971 PC. Get pc from regcache_read_pc.
2973 2016-02-12 Yao Qi <yao.qi@linaro.org>
2975 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2976 or linux_get_pc_32bit.
2977 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2979 2016-02-12 Yao Qi <yao.qi@linaro.org>
2981 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2982 arm_linux_get_next_pcs_fixup.
2984 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2986 * tracepoint.c (x_tracepoint_action_download): Change
2987 write_inferior_data_ptr to write_inferior_data_pointer.
2988 (cmd_qtstart): Likewise.
2989 (write_inferior_data_ptr): Remove.
2990 (download_agent_expr): Change write_inferior_data_ptr to
2991 write_inferior_data_pointer.
2992 (download_tracepoint_1): Likewise.
2993 (download_tracepoint): Likewise.
2994 (download_trace_state_variables): Likewise.
2996 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2997 Marcin Kościelnicki <koriakin@0x04.net>
2999 * tracepoint.c (struct tracepoint_action_ops): Remove.
3000 (struct tracepoint_action): Remove ops.
3001 (m_tracepoint_action_download, r_tracepoint_action_download)
3002 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3003 size and offset accordingly.
3004 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3005 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3006 (tracepoint_action_send, tracepoint_action_download): New functions.
3007 Helpers for trace action handlers.
3008 (add_tracepoint_action): Remove setup actions ops.
3009 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3011 2016-02-10 Yao Qi <yao.qi@linaro.org>
3013 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3015 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3017 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3019 * configure: Regenerate.
3021 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3023 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3024 void * to gdb_byte *.
3025 * linux-low.c (siginfo_fixup): Likewise.
3026 (linux_xfer_siginfo): Likewise.
3027 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3029 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3031 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3033 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3035 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3037 * linux-x86-low.c [__x86_64__]: Include
3038 "nat/amd64-linux-siginfo.h".
3039 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3040 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3041 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3042 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3043 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3044 (cpt_si_fd, si_timerid, si_overrun): Move from
3045 nat/amd64-linux-siginfo.c.
3046 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3048 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3050 * server.c (skip_to_semicolon): Remove.
3051 (process_point_options): Use strchrnul instead of
3054 2016-01-26 Yao Qi <yao.qi@linaro.org>
3056 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3057 * linux-low.c (install_software_single_step_breakpoints): Don't
3058 call regcache_read_pc.
3059 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3062 2016-01-26 Yao Qi <yao.qi@linaro.org>
3064 * linux-low.c (install_software_single_step_breakpoints): Call
3065 regcache_read_pc instead of get_pc.
3067 2016-01-26 Yao Qi <yao.qi@linaro.org>
3069 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3070 (unblock_async_io): Rename to ...
3071 (block_unblock_async_io): ... it. New function.
3072 (enable_async_io): Don't install SIGIO handler. Unblock it
3074 (disable_async_io): Don't ignore SIGIO. Block it instead.
3075 (initialize_async_io): Install SIGIO handler. Don't call
3078 2016-01-26 Yao Qi <yao.qi@linaro.org>
3080 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3081 first character is '\003', call *the_target->request_interrupt.
3083 2016-01-25 Yao Qi <yao.qi@linaro.org>
3085 * remote-utils.c (new_thread_notify): Remove.
3086 (dead_thread_notify): Likewise.
3087 * remote-utils.h (new_thread_notify): Remove declaration.
3088 (dead_thread_notify): Likewise.
3090 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3092 * gdb.trace/pending.exp: Fix expected message on continue.
3094 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3096 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3097 it works properly on big-endian machines where sizeof (CORE_ADDR)
3100 2016-01-21 Pedro Alves <palves@redhat.com>
3102 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3103 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3104 * configure: Regenerate.
3106 2016-01-21 Yao Qi <yao.qi@linaro.org>
3108 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3109 is_thumb and set it according to CPSR saved on the stack.
3110 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3111 arm_sigreturn_next_pc.
3113 2016-01-18 Yao Qi <yao.qi@linaro.org>
3115 * linux-low.c (linux_set_pc_64bit): New function.
3116 (linux_get_pc_64bit): New function.
3117 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3119 * linux-sparc-low.c (debug_threads): Remove declaration.
3120 (sparc_get_pc): Remove.
3121 (the_low_target): Use linux_get_pc_64bit instead of
3123 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3124 (the_low_target): Use linux_get_pc_64bit and
3127 2016-01-18 Yao Qi <yao.qi@linaro.org>
3129 * linux-arm-low.c (debug_threads): Remove declaration.
3130 (arm_get_pc, arm_set_pc): Remove.
3131 (the_low_target): Use linux_get_pc_32bit and
3133 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3134 (the_low_target): Use linux_get_pc_32bit and
3136 * linux-cris-low.c (debug_threads): Remove declaration.
3137 (cris_get_pc, cris_set_pc,): Remove.
3138 (the_low_target): Use linux_get_pc_32bit and
3140 * linux-crisv32-low.c (debug_threads): Remove declaration.
3141 (cris_get_pc, cris_set_pc): Remove.
3142 (the_low_target): Use linux_get_pc_32bit and
3144 * linux-low.c: Include inttypes.h.
3145 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3146 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3147 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3148 (the_low_target): Use linux_get_pc_32bit and
3150 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3151 (the_low_target): Use linux_get_pc_32bit and
3153 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3154 (the_low_target): Use linux_get_pc_32bit and
3156 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3157 (the_low_target): Use linux_get_pc_32bit and
3159 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3160 (the_low_target): Use linux_get_pc_32bit and
3163 2016-01-18 Gary Benson <gbenson@redhat.com>
3165 * configure.ac (AC_FUNC_FORK): New check.
3166 * config.in: Regenerate.
3167 * configure: Likewise.
3169 2016-01-14 Yao Qi <yao.qi@linaro.org>
3171 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3172 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3173 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3174 arm_get_next_pcs_ctor.
3176 2016-01-12 Josh Stone <jistone@redhat.com>
3177 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3179 * inferiors.h: Include "gdb_vecs.h".
3180 (struct process_info): Add syscalls_to_catch.
3181 * inferiors.c (remove_process): Free syscalls_to_catch.
3182 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3183 syscall_return stops.
3184 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3185 * server.c (handle_general_set): Handle QCatchSyscalls.
3186 (handle_query): Report support for QCatchSyscalls.
3187 * target.h (struct target_ops): Add supports_catch_syscall.
3188 (target_supports_catch_syscall): New macro.
3189 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3190 (struct lwp_info): Add syscall_state.
3191 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3192 Maintain syscall_state and syscalls_to_catch across exec.
3193 (get_syscall_trapinfo): New function, proxy to the_low_target.
3194 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3195 (linux_low_filter_event): Toggle syscall_state entry/return for
3196 syscall traps, and set it ignored for all others.
3197 (gdb_catching_syscalls_p): New function.
3198 (gdb_catch_this_syscall_p): New function.
3199 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3200 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3201 (linux_supports_catch_syscall): New function.
3202 (linux_target_ops): Install it.
3203 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3204 (the_low_target): Install it.
3206 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3208 * acinclude.m4: Include new ../warning.m4 file.
3209 * configure: Regenerated.
3210 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3212 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3214 * ax.c (is_goto_target): Mark static.
3215 * linux-low.c (register_addr): Likewise.
3216 (linux_fetch_registers, linux_store_registers): Likewise.
3217 * mem-break.c (any_persistent_commands): Fix old prototype.
3218 (add_commands_to_breakpoint): Mark static.
3219 * regcache.c (find_register_by_name): Delete unused func.
3220 * remote-utils.c (hex_or_minus_one): Mark static.
3221 * server.c (monitor_show_help): Mark static.
3222 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3223 handle_v_requests): Likewise.
3225 2016-01-12 Pedro Alves <palves@redhat.com>
3227 Remove use of the registered trademark symbol throughout.
3229 2016-01-08 Yao Qi <yao.qi@linaro.org>
3231 * remote-utils.c (getpkt): If c is '\003', call target hook
3234 2016-01-06 Yao Qi <yao.qi@linaro.org>
3236 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3237 linux-aarch32-low.c.
3238 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3239 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3240 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3241 (thumb2_breakpoint): Declare.
3242 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3243 linux-aarch32-low.h.
3244 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3245 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3246 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3248 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3250 * gdbreplay.c (gdbreplay_version): Change copyright year in
3252 * server.c (gdbserver_version): Likewise.
3254 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3256 * server.c (crc32_table): Delete.
3257 (crc32): Use libiberty's xcrc32 function.
3259 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3261 * lynx-low.c (lynx_delete_thread_callback): New function.
3262 (lynx_mourn): Properly delete our process and all of its
3263 threads. Remove call to clear_inferiors.
3265 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3267 * target.c (thread_search_callback): Add check that
3268 the thread_stopped target callback is not NULL before
3271 2015-12-21 Yao Qi <yao.qi@linaro.org>
3273 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3276 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3278 * server.c (handle_query): Call target_supports_software_single_step.
3280 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3282 * linux-low.c (single_step): New function.
3283 (linux_resume_one_lwp_throw): Call single_step.
3284 (start_step_over): Likewise.
3286 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3288 * Makefile.in (SFILES): Append arch/arm-linux.c,
3289 arch/arm-get-next-pcs.c.
3290 (arm-linux.o): New rule.
3291 (arm-get-next-pcs.o): New rule.
3292 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3294 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3295 to linux-aarch32-low.c.
3296 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3297 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3298 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3299 (thumb2_breakpoint_len): Likewise.
3300 (arm_is_thumb_mode): Make non-static.
3301 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3302 from linux-aarch32-low.c.
3303 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3304 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3305 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3306 (thumb2_breakpoint_len): Likewise.
3307 (arm_is_thumb_mode): New declaration.
3308 * linux-arm-low.c: Include arch/arm-linux.h
3309 aarch/arm-get-next-pcs.h, sys/syscall.h.
3310 (get_next_pcs_ops): New struct.
3311 (get_next_pcs_addr_bits_remove): New function.
3312 (get_next_pcs_is_thumb): New function.
3313 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3314 (arm_sigreturn_next_pc): Likewise.
3315 (get_next_pcs_syscall_next_pc): Likewise.
3316 (arm_gdbserver_get_next_pcs): Likewise.
3317 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3319 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3320 * server.h: Include gdb_vecs.h.
3322 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3324 * Makefile.in (SFILES): Append common/common-regcache.c.
3325 (OBS): Append common-regcache.o.
3326 (common-regcache.o): New rule.
3327 * regcache.c (init_register_cache): Initialize cache to
3329 (regcache_raw_read_unsigned): New function.
3330 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3331 register_status enum.
3333 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3335 * linux-aarch64-low.c (the_low_targets): Rename
3336 breakpoint_reinsert_addr to get_next_pcs.
3337 * linux-arm-low.c (the_low_targets): Likewise.
3338 * linux-bfin-low.c (the_low_targets): Likewise.
3339 * linux-cris-low.c (the_low_targets): Likewise.
3340 * linux-crisv32-low.c (the_low_targets): Likewise.
3341 * linux-low.c (can_software_single_step): Likewise.
3342 (install_software_single_step_breakpoints): New function.
3343 (start_step_over): Use install_software_single_step_breakpoints.
3344 * linux-low.h: New CORE_ADDR vector.
3345 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3347 * linux-mips-low.c (the_low_targets): Likewise.
3348 * linux-nios2-low.c (the_low_targets): Likewise.
3349 * linux-sparc-low.c (the_low_targets): Likewise.
3351 2015-12-17 Pedro Alves <palves@redhat.com>
3353 * linux-low.c (linux_kill_one_lwp): Remove references to
3355 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3357 (linux_init_signals): Delete.
3358 (initialize_low): Adjust.
3359 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3361 2015-12-16 Pedro Alves <palves@redhat.com>
3363 * configure.ac (compiler warning flags): When testing a
3364 -Wno-foo option, check whether -Wfoo works instead.
3365 * configure: Regenerate.
3367 2015-12-11 Don Breazeal <donb@codesourcery.com>
3369 * server.c (process_serial_event): Don't exit from gdbserver
3370 in remote mode if there are still active inferiors.
3372 2015-12-11 Yao Qi <yao.qi@linaro.org>
3374 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3375 arm_breakpoint_at if the process is 32-bit.
3377 2015-12-11 Yao Qi <yao.qi@linaro.org>
3379 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3382 2015-12-07 Yao Qi <yao.qi@linaro.org>
3384 * configure.srv: Append arm.o to srv_tgtobj for
3385 aarch64*-*-linux* target.
3386 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3387 from linux-arm-low.c.
3388 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3389 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3390 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3391 (thumb2_breakpoint_len): Likewise.
3392 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3393 (arm_breakpoint_kinds): Likewise.
3394 (arm_breakpoint_kind_from_pc): Likewise.
3395 (arm_sw_breakpoint_from_kind): Likewise.
3396 (arm_breakpoint_kind_from_current_state): Likewise.
3397 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3398 (arm_sw_breakpoint_from_kind): Declare.
3399 (arm_breakpoint_kind_from_current_state): Declare.
3400 (arm_breakpoint_at): Declare.
3401 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3402 arm_sw_breakpoint_from_kind if process is 32-bit.
3403 (aarch64_breakpoint_kind_from_pc): New function.
3404 (aarch64_breakpoint_kind_from_current_state): New function.
3405 (the_low_target): Initialize fields breakpoint_kind_from_pc
3406 and breakpoint_kind_from_current_state.
3407 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3408 linux-aarch32-low.c.
3409 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3410 (arm_breakpoint, arm_breakpoint_len): Likewise.
3411 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3412 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3413 (arm_is_thumb_mode): Likewise.
3414 (arm_breakpoint_at): Likewise.
3415 (arm_breakpoint_kind_from_pc): Likewise.
3416 (arm_sw_breakpoint_from_kind): Likewise.
3417 (arm_breakpoint_kind_from_current_state): Likewise.
3420 2015-08-04 Yao Qi <yao.qi@linaro.org>
3422 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3423 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3424 * server.c (extended_protocol): Remove "static".
3425 * server.h (extended_protocol): Declare it.
3427 2015-12-04 Josh Stone <jistone@redhat.com>
3429 * target.h (struct target_ops) <arch_setup>: Rename to ...
3430 (struct target_ops) <post_create_inferior>: ... this.
3431 (target_arch_setup): Rename to ...
3432 (target_post_create_inferior): ... this, calling post_create_inferior.
3433 * server.c (start_inferior): Update target_arch_setup calls to
3434 target_post_create_inferior.
3435 * linux-low.c (linux_low_ptrace_options): Forward declare.
3436 (linux_arch_setup): Update its comment for general use.
3437 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3438 (struct linux_target_ops): Use linux_post_create_inferior.
3439 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3440 to post_create_inferior.
3441 * nto-low.c (struct nto_target_ops): Likewise.
3442 * spu-low.c (struct spu_target_ops): Likewise.
3443 * win32-low.c (struct win32_target_ops): Likewise.
3445 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3447 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3449 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3451 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3452 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3453 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3454 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3455 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3456 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3457 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3458 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3459 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3460 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3461 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3462 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3464 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3466 * linux-low.c (linux_look_up_symbols): Don't call
3467 linux_supports_traceclone.
3468 * linux-low.h (thread_db_init): Remove use_events argument.
3469 * thread-db.c (thread_db_use_event): Remove global variable.
3470 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3471 (struct thread_db) <td_create_bp>: Remove field.
3472 (thread_db_create_event): Remove function.
3473 (thread_db_enable_reporting): Likewise.
3474 (find_one_thread): Don't check for thread_db_use_events.
3475 (attach_thread): Likewise.
3476 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3477 (try_thread_db_load_1): Don't check for thread_db_use_events.
3478 (thread_db_init): Remove use_events argument and thread events
3480 (remove_thread_event_breakpoints): Remove function.
3481 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3483 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3485 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3487 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3488 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3489 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3490 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3491 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3493 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3495 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3496 * linux-low.c (can_hardware_single_step): Use
3497 supports_hardware_single_step.
3498 (can_software_single_step): New function.
3499 (start_step_over): Call can_software_single_step.
3500 (linux_supports_hardware_single_step): New function.
3501 (struct target_ops) <supports_software_single_step>: Initialize.
3502 * linux-low.h (struct linux_target_ops)
3503 <supports_hardware_single_step>: Initialize.
3504 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3505 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3506 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3507 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3508 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3509 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3510 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3511 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3512 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3513 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3515 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3516 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3518 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3519 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3520 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3522 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3523 * target.h (struct target_ops): <supports_software_single_step>:
3525 (target_supports_software_single_step): New macro.
3527 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3529 * linux-low.c (linux_wait_1): Fix pc advance condition.
3530 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3531 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3533 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3535 * linux-arm-low.c (arm_is_thumb_mode): New function.
3536 (arm_breakpoint_at): Use arm_is_thumb_mode.
3537 (arm_breakpoint_kind_from_current_state): New function.
3538 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3540 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3541 (linux_breakpoint_kind_from_current_state): New function.
3542 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3543 * linux-low.h (struct linux_target_ops)
3544 <breakpoint_kind_from_current_state>: New field.
3545 * target.h (struct target_ops): Likewise.
3546 (target_breakpoint_kind_from_current_state): New macro.
3548 2015-11-30 Pedro Alves <palves@redhat.com>
3550 * linux-low.c (linux_resume): Wake up the event loop before
3553 2015-11-30 Pedro Alves <palves@redhat.com>
3555 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3557 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3559 * target.c (struct thread_search): New structure.
3560 (thread_search_callback): New function.
3561 (prev_general_thread): New global.
3562 (prepare_to_access_memory, done_accessing_memory): New functions.
3563 * target.h (prepare_to_access_memory, done_accessing_memory):
3564 Replace macros with function declarations.
3566 2015-11-30 Pedro Alves <palves@redhat.com>
3569 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3570 report TARGET_WAITKIND_NO_RESUMED.
3571 * remote-utils.c (prepare_resume_reply): Handle
3572 TARGET_WAITKIND_NO_RESUMED.
3573 * server.c (report_no_resumed): New global.
3574 (handle_query) <qSupported>: Handle "no-resumed+". Report
3575 "no-resumed+" support.
3576 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3577 return error if the client doesn't support no-resumed events.
3578 (push_stop_notification): New function.
3579 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3580 events if the client supports them.
3582 2015-11-30 Pedro Alves <palves@redhat.com>
3584 * linux-low.c (thread_still_has_status_pending_p): Don't check
3586 (lwp_resumed): New function.
3587 (status_pending_p_callback): Return early if the LWP is not
3588 supposed to be resumed.
3590 2015-11-30 Pedro Alves <palves@redhat.com>
3592 * linux-low.c (handle_extended_wait): Assert that the LWP's
3593 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3594 thread create events, leave the new child's status pending.
3595 (linux_low_filter_event): If GDB wants to hear about thread exit
3596 events, leave the LWP marked dead and don't delete it.
3597 (linux_wait_for_event_filtered): Don't check for thread exit.
3598 (filter_exit_event): New function.
3599 (linux_wait_1): Use it, when returning an exit event.
3600 (linux_resume_one_lwp_throw): Assert that the LWP's
3601 waitstatus is TARGET_WAITKIND_IGNORE.
3602 * remote-utils.c (prepare_resume_reply): Handle
3603 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3604 * server.c (report_thread_events): New global.
3605 (handle_general_set): Handle QThreadEvents.
3606 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3607 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3608 TARGET_WAITKIND_THREAD_EXITED.
3609 * server.h (report_thread_events): Declare.
3611 2015-11-30 Pedro Alves <palves@redhat.com>
3613 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3614 the thread's last_resume_kind was resume_stop.
3616 2015-11-30 Pedro Alves <palves@redhat.com>
3618 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3621 2015-11-30 Pedro Alves <palves@redhat.com>
3623 * server.c (handle_v_requests): Handle vCtrlC.
3625 2015-11-30 Pedro Alves <palves@redhat.com>
3627 * gdbthread.h (find_any_thread_of_pid): Declare.
3628 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3630 * server.c (handle_query): If current_thread is NULL, look for
3631 another thread of the selected process.
3633 2015-11-26 Daniel Colascione <dancol@dancol.org>
3634 Simon Marchi <simon.marchi@ericsson.com>
3636 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3637 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3639 * target.h (struct target_ops) <thread_name>: New field.
3640 (target_thread_name): New macro.
3642 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3644 * regcache.h (regcache_invalidate_pid): Add declaration.
3645 * regcache.c (regcache_invalidate_pid): New function, extracted
3646 from regcache_invalidate.
3647 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3648 Add trivial documentation comment.
3649 * lynx-low.c: Use regcache_invalidate_pid instead of
3650 regcache_invalidate.
3652 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3654 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3655 and Elf64_auxv_t if the target is Android.
3657 2015-11-22 Doug Evans <xdje42@gmail.com>
3659 * target.h: #include <sys/types.h>.
3661 2015-11-19 Pedro Alves <palves@redhat.com>
3663 * linux-low.c (linux_process_qsupported): Change prototype.
3665 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3667 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3668 and adjust to loop over all features.
3669 * server.c (handle_query) <qSupported>: Adjust to call
3670 target_process_qsupported once, passing it a vector of unprocessed
3672 * target.h (struct target_ops) <process_qsupported>: Change
3674 (target_process_qsupported): Adjust.
3676 2015-11-19 Pedro Alves <palves@redhat.com>
3678 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3680 * configure: Regenerate.
3682 2015-11-19 Pedro Alves <palves@redhat.com>
3684 * configure: Regenerate.
3686 2015-11-19 Yao Qi <yao.qi@linaro.org>
3688 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3691 2015-11-19 Yao Qi <yao.qi@linaro.org>
3693 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3694 (struct aarch64_operand): Move enum out.
3696 2015-11-19 Yao Qi <yao.qi@linaro.org>
3698 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3699 struct user_fpsimd_state *.
3700 (aarch64_store_fpregset): Likewise.
3702 2015-11-19 Yao Qi <yao.qi@linaro.org>
3704 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3705 struct user_pt_regs *.
3706 (aarch64_store_gregset): Likewise.
3708 2015-11-18 Pedro Alves <palves@redhat.com>
3710 * Makefile.in (all_object_files): Add $IPA_OBJS.
3712 2015-11-17 Pedro Alves <palves@redhat.com>
3714 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3715 GDB_SIGNAL_0 and gdb_signal_to_string.
3717 2015-11-17 Pedro Alves <palves@redhat.com>
3719 * win32-low.c (handle_output_debug_string): Remove parameter.
3720 (win32_kill): Remove our_status local and adjust call to
3721 handle_output_debug_string.
3722 (get_child_debug_event): Adjust call to
3723 handle_output_debug_string.
3725 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3727 * linux-mips-low.c (mips_fill_gregset): Add cast.
3728 (mips_store_gregset): Likewise.
3729 (mips_fill_fpregset): Likewise.
3730 (mips_store_fpregset): Likewise.
3732 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3734 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3737 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3739 * linux-mips-low.c (mips_linux_new_thread): Change type of
3740 watch_type to enum target_hw_bp_type.
3742 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3744 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3745 Change return type to arm_hwbp_type.
3747 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3749 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3750 (arm_store_gregset): Likewise.
3751 * linux-arm-low.c (arm_get_hwcap): Likewise.
3752 (arm_read_description): Likewise.
3754 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3756 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3758 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3760 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3761 (ppc_fill_vsxregset): Likewise.
3762 (ppc_store_vsxregset): Likewise.
3763 (ppc_fill_vrregset): Likewise.
3764 (ppc_store_vrregset): Likewise.
3765 (ppc_fill_evrregset): Likewise.
3766 (ppc_store_evrregset): Likewise.
3768 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3770 * linux-ppc-low.c (ppc_usrregs_info): Remove
3771 forward-declaration.
3772 (ppc_arch_setup): Move lower in file.
3774 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3776 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3777 (ps_pdwrite): Likewise.
3779 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3781 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3782 to after assert checks.
3784 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3786 * proc-service.c (ps_pdread): Add/adjust casts.
3787 (ps_pdwrite): Add/adjust casts.
3789 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3791 * server.c (handle_search_memory_1): Cast return value of
3794 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3796 * server.c (write_qxfer_response): Change type of data to
3799 2015-10-29 Pedro Alves <palves@redhat.com>
3801 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3803 2015-10-29 Pedro Alves <palves@redhat.com>
3805 * tracepoint.c (clear_installed_tracepoints): Add casts.
3807 2015-10-29 Pedro Alves <palves@redhat.com>
3809 * server.c (handle_v_cont, process_serial_event): Add enum
3810 gdb_signal casts to signal parsing code.
3812 2015-10-29 Pedro Alves <palves@redhat.com>
3814 * linux-low.h (NULL_REGSET): Define.
3815 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3816 * linux-arm-low.c (arm_regsets): Likewise.
3817 * linux-crisv32-low.c (cris_regsets): Likewise.
3818 * linux-m68k-low.c (m68k_regsets): Likewise.
3819 * linux-mips-low.c (mips_regsets): Likewise.
3820 * linux-nios2-low.c (nios2_regsets): Likewise.
3821 * linux-ppc-low.c (ppc_regsets): Likewise.
3822 * linux-s390-low.c (s390_regsets): Likewise.
3823 * linux-sh-low.c (sh_regsets): Likewise.
3824 * linux-sparc-low.c (sparc_regsets): Likewise.
3825 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3826 * linux-tile-low.c (tile_regsets): Likewise.
3827 * linux-x86-low.c (x86_regsets): Likewise.
3828 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3830 2015-10-29 Pedro Alves <palves@redhat.com>
3832 * linux-low.h (NULL_REGSET): Define.
3833 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3834 * linux-arm-low.c (arm_regsets): Likewise.
3835 * linux-crisv32-low.c (cris_regsets): Likewise.
3836 * linux-m68k-low.c (m68k_regsets): Likewise.
3837 * linux-mips-low.c (mips_regsets): Likewise.
3838 * linux-nios2-low.c (nios2_regsets): Likewise.
3839 * linux-ppc-low.c (ppc_regsets): Likewise.
3840 * linux-s390-low.c (s390_regsets): Likewise.
3841 * linux-sh-low.c (sh_regsets): Likewise.
3842 * linux-sparc-low.c (sparc_regsets): Likewise.
3843 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3844 * linux-tile-low.c (tile_regsets): Likewise.
3845 * linux-x86-low.c (x86_regsets): Likewise.
3846 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3848 2015-10-26 Doug Evans <dje@google.com>
3850 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3852 2015-10-26 Doug Evans <dje@google.com>
3854 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3856 2015-10-26 Doug Evans <dje@google.com>
3858 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3860 (attach_thread, find_new_threads_callback): Ditto.
3862 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3864 * mem-break.h (set_breakpoint_data): Remove.
3866 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3868 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3869 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3870 (initialize_low): Remove set_breakpoint_data call.
3871 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3872 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3873 (initialize_low): Remove set_breakpoint_data call.
3874 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3875 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3876 (initialize_low): Remove set_breakpoint_data call.
3878 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3880 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3881 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3882 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3883 * target.h (target_breakpoint_kind_from_pc): New macro.
3885 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3887 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3888 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3889 the default breakpoint kind.
3891 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3893 * linux-arm-low.c (arm_supports_z_point_type): Add software
3896 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3898 * linux-arm-low.c: Refactor breakpoint definitions.
3899 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3900 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3902 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3904 * Makefile.in: Add arm.c/o.
3905 * configure.srv: Likewise.
3906 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3907 (arm_breakpoint_kind_from_pc): New function.
3908 (arm_sw_breakpoint_from_kind): Return proper kind.
3909 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3911 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3913 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3915 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3916 (struct raw_breakpoint) <size>: Remove.
3917 (struct raw_breakpoint) <kind>: Add.
3918 (bp_size): New function.
3919 (bp_opcode): Likewise.
3920 (find_raw_breakpoint_at): Adjust for kind.
3921 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3922 (remove_memory_breakpoint): Adjust for kind call bp_size.
3923 (set_raw_breakpoint_at): Adjust for kind.
3924 (set_breakpoint): Likewise.
3925 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3926 (delete_raw_breakpoint): Adjust for kind.
3927 (delete_breakpoint): Likewise.
3928 (find_gdb_breakpoint): Likewise.
3929 (set_gdb_breakpoint_1): Likewise.
3930 (set_gdb_breakpoint): Likewise.
3931 (delete_gdb_breakpoint_1): Likewise.
3932 (delete_gdb_breakpoint): Likewise.
3933 (uninsert_raw_breakpoint): Likewise.
3934 (reinsert_raw_breakpoint): Likewise.
3935 (set_breakpoint_data): Remove.
3936 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3937 (check_mem_read): Adjust for kind call bp_size.
3938 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3939 (clone_one_breakpoint): Adjust for kind.
3940 * mem-break.h (set_gdb_breakpoint): Likewise.
3941 (delete_gdb_breakpoint): Likewise.
3942 * server.c (process_serial_event): Likewise.
3944 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3946 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3947 (struct linux_target_ops) <breakpoint>: Remove.
3948 (struct linux_target_ops) <breakpoint_len>: Remove.
3949 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3950 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3951 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3952 (arm_sw_breakpoint_from_kind): New function.
3953 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3954 (struct linux_target_ops) <breakpoint>: Remove.
3955 (struct linux_target_ops) <breakpoint_len>: Remove.
3956 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3957 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3958 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3959 (struct linux_target_ops) <breakpoint>: Remove.
3960 (struct linux_target_ops) <breakpoint_len>: Remove.
3961 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3962 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3963 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3964 (struct linux_target_ops) <breakpoint>: Remove.
3965 (struct linux_target_ops) <breakpoint_len>: Remove.
3966 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3967 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3968 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3969 and sw_breakpoint_from_kind to increment the pc.
3970 (linux_breakpoint_kind_from_pc): New function.
3971 (linux_sw_breakpoint_from_kind): New function.
3972 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3973 (initialize_low): Call breakpoint_kind_from_pc and
3974 sw_breakpoint_from_kind to replace breakpoint_data/len.
3975 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3977 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3978 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3979 (struct linux_target_ops) <breakpoint>: Remove.
3980 (struct linux_target_ops) <breakpoint_len>: Remove.
3981 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3982 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3983 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3984 (struct linux_target_ops) <breakpoint>: Remove.
3985 (struct linux_target_ops) <breakpoint_len>: Remove.
3986 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3987 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3988 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3989 (struct linux_target_ops) <breakpoint>: Remove.
3990 (struct linux_target_ops) <breakpoint_len>: Remove.
3991 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3992 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3993 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3994 (struct linux_target_ops) <breakpoint>: Remove.
3995 (struct linux_target_ops) <breakpoint_len>: Remove.
3996 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3997 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3998 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3999 (struct linux_target_ops) <breakpoint>: Remove.
4000 (struct linux_target_ops) <breakpoint_len>: Remove.
4001 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4002 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4003 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4004 (struct linux_target_ops) <breakpoint>: Remove.
4005 (struct linux_target_ops) <breakpoint_len>: Remove.
4006 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4007 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4008 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4009 (struct linux_target_ops) <breakpoint>: Remove.
4010 (struct linux_target_ops) <breakpoint_len>: Remove.
4011 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4012 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4013 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4014 (struct linux_target_ops) <breakpoint>: Remove.
4015 (struct linux_target_ops) <breakpoint_len>: Remove.
4016 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4017 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4018 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4019 (struct linux_target_ops) <breakpoint>: Remove.
4020 (struct linux_target_ops) <breakpoint_len>: Remove.
4021 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4022 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4023 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4024 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4025 (struct linux_target_ops) <breakpoint>: Remove.
4026 (struct linux_target_ops) <breakpoint_len>: Remove.
4027 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4028 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4029 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4030 (struct linux_target_ops) <breakpoint>: Remove.
4031 (struct linux_target_ops) <breakpoint_len>: Remove.
4032 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4033 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4035 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4037 * linux-cris-low.c (cris_get_pc): Remove void arg.
4039 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4041 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4044 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4046 * inferiors.c (thread_pid_matches_callback): New function.
4047 (find_thread_process): New function.
4048 (remove_thread): Reset current_thread.
4049 (remove_process): Assert threads have been removed first.
4051 2015-10-15 Yao Qi <yao.qi@linaro.org>
4053 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4055 (aarch64_remove_point): Likewise.
4056 * regcache.c (regcache_register_size): New function.
4058 2015-10-12 Yao Qi <yao.qi@linaro.org>
4060 * linux-aarch64-low.c: Update all callers as emit_load_store
4061 is renamed to aarch64_emit_load_store.
4063 2015-10-12 Yao Qi <yao.qi@linaro.org>
4065 * linux-aarch64-low.c: Update all callers of function renaming
4066 from emit_insn to aarch64_emit_insn.
4068 2015-10-12 Yao Qi <yao.qi@linaro.org>
4070 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4071 arch/aarch64-insn.h.
4072 (struct aarch64_memory_operand): Likewise.
4074 (emit_insn): Move to arch/aarch64-insn.c.
4075 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4076 (emit_load_store): Move to arch/aarch64-insn.c.
4077 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4078 (can_encode_int32): Remove.
4080 2015-10-12 Yao Qi <yao.qi@linaro.org>
4082 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4083 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4084 (aarch64_relocate_instruction): Likewise.
4085 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4086 (struct aarch64_insn_visitor): Likewise.
4088 2015-10-12 Yao Qi <yao.qi@linaro.org>
4090 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4091 (struct aarch64_insn_visitor): New.
4092 (struct aarch64_insn_relocation_data): New.
4093 (aarch64_ftrace_insn_reloc_b): New function.
4094 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4095 (aarch64_ftrace_insn_reloc_cb): Likewise.
4096 (aarch64_ftrace_insn_reloc_tb): Likewise.
4097 (aarch64_ftrace_insn_reloc_adr): Likewise.
4098 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4099 (aarch64_ftrace_insn_reloc_others): Likewise.
4101 (aarch64_relocate_instruction): Use visitor.
4103 2015-10-12 Yao Qi <yao.qi@linaro.org>
4105 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4106 int. Add argument buf.
4107 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4108 aarch64_relocate_instruction.
4110 2015-10-12 Yao Qi <yao.qi@linaro.org>
4112 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4113 argument insn. Remove local variable insn. Don't call
4115 (aarch64_install_fast_tracepoint_jump_pad): Call
4118 2015-09-30 Yao Qi <yao.qi@linaro.org>
4120 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4121 (emit_load_store_pair): Likewise.
4123 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4125 * dll.c (match_dll): Add cast(s).
4126 (unloaded_dll): Likewise.
4127 * linux-low.c (second_thread_of_pid_p): Likewise.
4128 (delete_lwp_callback): Likewise.
4129 (count_events_callback): Likewise.
4130 (select_event_lwp_callback): Likewise.
4131 (linux_set_resume_request): Likewise.
4132 * server.c (accumulate_file_name_length): Likewise.
4133 (emit_dll_description): Likewise.
4134 (handle_qxfer_threads_worker): Likewise.
4135 (visit_actioned_threads): Likewise.
4136 * thread-db.c (any_thread_of): Likewise.
4137 * tracepoint.c (same_process_p): Likewise.
4138 (match_blocktype): Likewise.
4139 (build_traceframe_info_xml): Likewise.
4141 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4143 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4145 (gdb_unparse_agent_expr): Likewise.
4146 * hostio.c (require_data): Likewise.
4147 (handle_pread): Likewise.
4148 * linux-low.c (disable_regset): Likewise.
4149 (fetch_register): Likewise.
4150 (store_register): Likewise.
4151 (get_dynamic): Likewise.
4152 (linux_qxfer_libraries_svr4): Likewise.
4153 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4154 (set_fast_tracepoint_jump): Likewise.
4155 (uninsert_fast_tracepoint_jumps_at): Likewise.
4156 (reinsert_fast_tracepoint_jumps_at): Likewise.
4157 (validate_inserted_breakpoint): Likewise.
4158 (clone_agent_expr): Likewise.
4159 * regcache.c (init_register_cache): Likewise.
4160 * remote-utils.c (putpkt_binary_1): Likewise.
4161 (decode_M_packet): Likewise.
4162 (decode_X_packet): Likewise.
4163 (look_up_one_symbol): Likewise.
4164 (relocate_instruction): Likewise.
4165 (monitor_output): Likewise.
4166 * server.c (handle_search_memory): Likewise.
4167 (handle_qxfer_exec_file): Likewise.
4168 (handle_qxfer_libraries): Likewise.
4169 (handle_qxfer): Likewise.
4170 (handle_query): Likewise.
4171 (handle_v_cont): Likewise.
4172 (handle_v_run): Likewise.
4173 (captured_main): Likewise.
4174 * target.c (write_inferior_memory): Likewise.
4175 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4176 * tracepoint.c (init_trace_buffer): Likewise.
4177 (add_tracepoint_action): Likewise.
4178 (add_traceframe): Likewise.
4179 (add_traceframe_block): Likewise.
4180 (cmd_qtdpsrc): Likewise.
4181 (cmd_qtdv): Likewise.
4182 (cmd_qtstatus): Likewise.
4183 (response_source): Likewise.
4184 (response_tsv): Likewise.
4185 (cmd_qtnotes): Likewise.
4186 (gdb_collect): Likewise.
4187 (initialize_tracepoint): Likewise.
4189 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4191 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4192 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4193 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4195 (enum aarch64_condition_codes): New enum.
4196 (w0): New static global.
4199 (struct aarch64_memory_operand) <type>: New
4200 MEMORY_OPERAND_POSTINDEX type.
4201 (postindex_memory_operand): New helper function.
4202 (emit_ret): New function.
4203 (emit_load_store_pair): New function, factored out of emit_stp
4204 with support for MEMORY_OPERAND_POSTINDEX.
4205 (emit_stp): Rewrite using emit_load_store_pair.
4206 (emit_ldp): New function.
4207 (emit_load_store): Likewise.
4208 (emit_ldr): Mention post-index instruction in comment.
4209 (emit_ldrh): New function.
4210 (emit_ldrb): New function.
4211 (emit_ldrsw): Mention post-index instruction in comment.
4212 (emit_str): Likewise.
4213 (emit_subs): New function.
4214 (emit_cmp): Likewise.
4215 (emit_and): Likewise.
4216 (emit_orr): Likewise.
4217 (emit_orn): Likewise.
4218 (emit_eor): Likewise.
4219 (emit_mvn): Likewise.
4220 (emit_lslv): Likewise.
4221 (emit_lsrv): Likewise.
4222 (emit_asrv): Likewise.
4223 (emit_mul): Likewise.
4224 (emit_sbfm): Likewise.
4225 (emit_sbfx): Likewise.
4226 (emit_ubfm): Likewise.
4227 (emit_ubfx): Likewise.
4228 (emit_csinc): Likewise.
4229 (emit_cset): Likewise.
4230 (emit_nop): Likewise.
4231 (emit_ops_insns): New helper function.
4232 (emit_pop): Likewise.
4233 (emit_push): Likewise.
4234 (aarch64_emit_prologue): New function.
4235 (aarch64_emit_epilogue): Likewise.
4236 (aarch64_emit_add): Likewise.
4237 (aarch64_emit_sub): Likewise.
4238 (aarch64_emit_mul): Likewise.
4239 (aarch64_emit_lsh): Likewise.
4240 (aarch64_emit_rsh_signed): Likewise.
4241 (aarch64_emit_rsh_unsigned): Likewise.
4242 (aarch64_emit_ext): Likewise.
4243 (aarch64_emit_log_not): Likewise.
4244 (aarch64_emit_bit_and): Likewise.
4245 (aarch64_emit_bit_or): Likewise.
4246 (aarch64_emit_bit_xor): Likewise.
4247 (aarch64_emit_bit_not): Likewise.
4248 (aarch64_emit_equal): Likewise.
4249 (aarch64_emit_less_signed): Likewise.
4250 (aarch64_emit_less_unsigned): Likewise.
4251 (aarch64_emit_ref): Likewise.
4252 (aarch64_emit_if_goto): Likewise.
4253 (aarch64_emit_goto): Likewise.
4254 (aarch64_write_goto_address): Likewise.
4255 (aarch64_emit_const): Likewise.
4256 (aarch64_emit_call): Likewise.
4257 (aarch64_emit_reg): Likewise.
4258 (aarch64_emit_pop): Likewise.
4259 (aarch64_emit_stack_flush): Likewise.
4260 (aarch64_emit_zero_ext): Likewise.
4261 (aarch64_emit_swap): Likewise.
4262 (aarch64_emit_stack_adjust): Likewise.
4263 (aarch64_emit_int_call_1): Likewise.
4264 (aarch64_emit_void_call_2): Likewise.
4265 (aarch64_emit_eq_goto): Likewise.
4266 (aarch64_emit_ne_goto): Likewise.
4267 (aarch64_emit_lt_goto): Likewise.
4268 (aarch64_emit_le_goto): Likewise.
4269 (aarch64_emit_gt_goto): Likewise.
4270 (aarch64_emit_ge_got): Likewise.
4271 (aarch64_emit_ops_impl): New static global variable.
4272 (aarch64_emit_ops): New target function, return
4273 &aarch64_emit_ops_impl.
4274 (struct linux_target_ops): Install it.
4276 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4278 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4279 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4281 * linux-aarch64-ipa.c: New file.
4282 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4284 (aarch64_get_thread_area): New target method.
4285 (extract_signed_bitfield): New helper function.
4286 (aarch64_decode_ldr_literal): New function.
4287 (enum aarch64_opcodes): New enum.
4288 (struct aarch64_register): New struct.
4289 (struct aarch64_operand): New struct.
4290 (x0): New static global.
4299 (aarch64_register): New helper function.
4300 (register_operand): Likewise.
4301 (immediate_operand): Likewise.
4302 (struct aarch64_memory_operand): New struct.
4303 (offset_memory_operand): New helper function.
4304 (preindex_memory_operand): Likewise.
4305 (enum aarch64_system_control_registers): New enum.
4306 (ENCODE): New macro.
4307 (emit_insn): New helper function.
4308 (emit_b): New function.
4309 (emit_bcond): Likewise.
4310 (emit_cb): Likewise.
4311 (emit_tb): Likewise.
4312 (emit_blr): Likewise.
4313 (emit_stp): Likewise.
4314 (emit_ldp_q_offset): Likewise.
4315 (emit_stp_q_offset): Likewise.
4316 (emit_load_store): Likewise.
4317 (emit_ldr): Likewise.
4318 (emit_ldrsw): Likewise.
4319 (emit_str): Likewise.
4320 (emit_ldaxr): Likewise.
4321 (emit_stxr): Likewise.
4322 (emit_stlr): Likewise.
4323 (emit_data_processing_reg): Likewise.
4324 (emit_data_processing): Likewise.
4325 (emit_add): Likewise.
4326 (emit_sub): Likewise.
4327 (emit_mov): Likewise.
4328 (emit_movk): Likewise.
4329 (emit_mov_addr): Likewise.
4330 (emit_mrs): Likewise.
4331 (emit_msr): Likewise.
4332 (emit_sevl): Likewise.
4333 (emit_wfe): Likewise.
4334 (append_insns): Likewise.
4335 (can_encode_int32_in): New helper function.
4336 (aarch64_relocate_instruction): New function.
4337 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4338 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4339 (struct linux_target_ops): Install aarch64_get_thread_area,
4340 aarch64_install_fast_tracepoint_jump_pad and
4341 aarch64_get_min_fast_tracepoint_insn_len.
4343 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4345 * Makefile.in (aarch64-insn.o): New rule.
4346 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4348 2015-09-21 Yao Qi <yao.qi@linaro.org>
4350 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4352 2015-09-21 Yao Qi <yao.qi@linaro.org>
4354 * tracepoint.c (max_jump_pad_size): Remove.
4356 2015-09-18 Yao Qi <yao.qi@linaro.org>
4358 * linux-aarch64-low.c: Don't include sys/uio.h.
4359 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4361 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4363 * tracepoint.c (eval_result_type): Change prototype.
4364 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4366 2015-09-15 Pedro Alves <palves@redhat.com>
4368 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4369 Check whether to report exec events instead of checking whether
4370 multiprocess is enabled.
4372 2015-09-15 Pedro Alves <palves@redhat.com>
4375 * remote-utils.c (prepare_resume_reply): Merge
4376 TARGET_WAITKIND_VFORK_DONE switch case with the
4377 TARGET_WAITKIND_FORKED case.
4379 2015-09-15 Yao Qi <yao.qi@linaro.org>
4381 * server.c (handle_query): Check string comparison using
4382 "else if" instead of "if".
4384 2015-09-15 Yao Qi <yao.qi@linaro.org>
4386 * server.c (vCont_supported): New global variable.
4387 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4388 matches. Append ";vContSupported+" to own_buf.
4389 (handle_v_requests): Append ";s;S" to own_buf if target supports
4390 hardware single step or vCont_supported is false.
4391 (capture_main): Set vCont_supported to zero.
4393 2015-09-15 Yao Qi <yao.qi@linaro.org>
4395 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4397 (linux_supports_hardware_single_step): ... New function.
4398 (linux_target_ops): Update.
4399 * lynx-low.c (lynx_target_ops): Set field
4400 supports_hardware_single_step to target_can_do_hardware_single_step.
4401 * nto-low.c (nto_target_ops): Likewise.
4402 * spu-low.c (spu_target_ops): Likewise.
4403 * win32-low.c (win32_target_ops): Likewise.
4404 * target.c (target_can_do_hardware_single_step): New function.
4405 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4406 Remove. <supports_hardware_single_step>: New field.
4407 (target_supports_conditional_breakpoints): Remove.
4408 (target_supports_hardware_single_step): New macro.
4409 (target_can_do_hardware_single_step): Declare.
4410 * server.c (handle_query): Use target_supports_hardware_single_step
4411 instead of target_supports_conditional_breakpoints.
4413 2015-09-15 Yao Qi <yao.qi@linaro.org>
4415 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4417 (struct linux_target_ops the_low_target): Install
4418 aarch64_linux_siginfo_fixup.
4420 2015-09-11 Don Breazeal <donb@codesourcery.com>
4421 Luis Machado <lgustavo@codesourcery.com>
4423 * linux-low.c (linux_mourn): Static declaration.
4424 (linux_arch_setup): Move in front of
4425 handle_extended_wait.
4426 (linux_arch_setup_thread): New function.
4427 (handle_extended_wait): Handle exec events. Call
4428 linux_arch_setup_thread. Make event_lwp argument a
4429 pointer-to-a-pointer.
4430 (check_zombie_leaders): Do not check stopped threads.
4431 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4432 (linux_low_filter_event): Add lwp and thread for exec'ing
4433 non-leader thread if leader thread has been deleted.
4434 Refactor code into linux_arch_setup_thread and call it.
4435 Pass child lwp pointer by reference to handle_extended_wait.
4436 (linux_wait_for_event_filtered): Update comment.
4437 (linux_wait_1): Prevent clobbering exec event status.
4438 (linux_supports_exec_events): New function.
4439 (linux_target_ops) <supports_exec_events>: Initialize new member.
4440 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4442 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4443 * server.c (report_exec_events): New global variable.
4444 (handle_query): Handle qSupported query for exec-events feature.
4445 (captured_main): Initialize report_exec_events.
4446 * server.h (report_exec_events): Declare new global variable.
4447 * target.h (struct target_ops) <supports_exec_events>: New
4449 (target_supports_exec_events): New macro.
4450 * win32-low.c (win32_target_ops) <supports_exec_events>:
4451 Initialize new member.
4453 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4455 * linux-low.c (linux_low_enable_btrace): Remove.
4456 (linux_target_ops): Replace linux_low_enable_btrace with
4457 linux_enable_btrace.
4459 2015-09-03 Yao Qi <yao.qi@linaro.org>
4461 * linux-aarch64-low.c (aarch64_insert_point): Call
4462 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4465 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4467 * linux-low.c (check_stopped_by_breakpoint): Use
4468 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4470 2015-08-27 Pedro Alves <palves@redhat.com>
4472 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4474 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4476 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4477 the XNEW-family equivalent.
4478 (compile_bytecodes): Likewise.
4479 * dll.c (loaded_dll): Likewise.
4480 * event-loop.c (append_callback_event): Likewise.
4481 (create_file_handler): Likewise.
4482 (create_file_event): Likewise.
4483 * hostio.c (handle_open): Likewise.
4484 * inferiors.c (add_thread): Likewise.
4485 (add_process): Likewise.
4486 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4487 * linux-arm-low.c (arm_new_process): Likewise.
4488 (arm_new_thread): Likewise.
4489 * linux-low.c (add_to_pid_list): Likewise.
4490 (linux_add_process): Likewise.
4491 (handle_extended_wait): Likewise.
4492 (add_lwp): Likewise.
4493 (enqueue_one_deferred_signal): Likewise.
4494 (enqueue_pending_signal): Likewise.
4495 (linux_resume_one_lwp_throw): Likewise.
4496 (linux_resume_one_thread): Likewise.
4497 (linux_read_memory): Likewise.
4498 (linux_write_memory): Likewise.
4499 * linux-mips-low.c (mips_linux_new_process): Likewise.
4500 (mips_linux_new_thread): Likewise.
4501 (mips_add_watchpoint): Likewise.
4502 * linux-x86-low.c (initialize_low_arch): Likewise.
4503 * lynx-low.c (lynx_add_process): Likewise.
4504 * mem-break.c (set_raw_breakpoint_at): Likewise.
4505 (set_breakpoint): Likewise.
4506 (add_condition_to_breakpoint): Likewise.
4507 (add_commands_to_breakpoint): Likewise.
4508 (clone_agent_expr): Likewise.
4509 (clone_one_breakpoint): Likewise.
4510 * regcache.c (new_register_cache): Likewise.
4511 * remote-utils.c (look_up_one_symbol): Likewise.
4512 * server.c (queue_stop_reply): Likewise.
4513 (start_inferior): Likewise.
4514 (queue_stop_reply_callback): Likewise.
4515 (handle_target_event): Likewise.
4516 * spu-low.c (fetch_ppc_memory): Likewise.
4517 (store_ppc_memory): Likewise.
4518 * target.c (set_target_ops): Likewise.
4519 * thread-db.c (thread_db_load_search): Likewise.
4520 (try_thread_db_load_1): Likewise.
4521 * tracepoint.c (add_tracepoint): Likewise.
4522 (add_tracepoint_action): Likewise.
4523 (create_trace_state_variable): Likewise.
4524 (cmd_qtdpsrc): Likewise.
4525 (cmd_qtro): Likewise.
4526 (add_while_stepping_state): Likewise.
4527 * win32-low.c (child_add_thread): Likewise.
4528 (get_image_name): Likewise.
4530 2015-08-25 Yao Qi <yao.qi@linaro.org>
4532 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4534 2015-08-25 Yao Qi <yao.qi@linaro.org>
4536 * Makefile.in (aarch64-linux.o): New rule.
4537 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4539 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4540 (aarch64_init_debug_reg_state): Make it extern.
4541 (aarch64_linux_prepare_to_resume): Remove.
4543 2015-08-25 Yao Qi <yao.qi@linaro.org>
4545 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4546 lwp_arch_private_info and ptid_of_lwp.
4548 2015-08-25 Yao Qi <yao.qi@linaro.org>
4550 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4551 Find proc_info by find_process_pid. All callers updated.
4553 2015-08-25 Yao Qi <yao.qi@linaro.org>
4555 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4557 (debug_reg_change_callback): Remove.
4558 (aarch64_notify_debug_reg_change): Remove.
4560 2015-08-25 Yao Qi <yao.qi@linaro.org>
4562 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4563 Call current_lwp_ptid.
4565 2015-08-25 Yao Qi <yao.qi@linaro.org>
4567 * linux-aarch64-low.c (debug_reg_change_callback): Use
4570 2015-08-25 Yao Qi <yao.qi@linaro.org>
4572 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4574 2015-08-25 Yao Qi <yao.qi@linaro.org>
4576 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4578 2015-08-25 Yao Qi <yao.qi@linaro.org>
4580 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4583 2015-08-25 Yao Qi <yao.qi@linaro.org>
4585 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4587 (debug_reg_change_callback): Remove argument entry and add argument
4588 lwp. Remove local variable thread. Don't print thread id in the
4589 debugging output. Don't check whether pid of thread equals to pid.
4590 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4591 iterate_over_lwps instead find_inferior.
4593 2015-08-24 Pedro Alves <palves@redhat.com>
4595 * inferiors.c (get_first_process): New function.
4596 * inferiors.h (get_first_process): New declaration.
4597 * remote-utils.c (read_ptid): Default to the first process in the
4598 list, instead of to the current thread's process.
4600 2015-08-24 Pedro Alves <palves@redhat.com>
4602 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4603 * event-loop.c: Likewise.
4604 * remote-utils.c: Likewise.
4605 * tracepoint.c: Likewise.
4607 2015-08-24 Pedro Alves <palves@redhat.com>
4609 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4612 2015-08-21 Pedro Alves <palves@redhat.com>
4614 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4615 instead of literal 1.
4617 2015-08-21 Pedro Alves <palves@redhat.com>
4619 * tdesc.c (default_description): Explicitly zero-initialize.
4621 2015-08-21 Pedro Alves <palves@redhat.com>
4624 * inferiors.c (remove_thread): Discard any pending stop reply for
4626 * server.c (remove_all_on_match_pid): Rename to ...
4627 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4629 (discard_queued_stop_replies): Change parameter to a ptid. Now
4631 (handle_v_kill, kill_inferior_callback, captured_main)
4632 (process_serial_event): Adjust.
4633 * server.h (discard_queued_stop_replies): Declare.
4635 2015-08-21 Pedro Alves <palves@redhat.com>
4637 * linux-low.c (wait_for_sigstop): Always switch to no thread
4638 selected if the previously current thread dies.
4639 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4640 process instead of the current thread's.
4641 * remote-utils.c (input_interrupt): Don't check if there's no
4643 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4644 current thread to the general thread fails, error out.
4645 (handle_qxfer_auxv, handle_qxfer_libraries)
4646 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4647 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4648 (handle_query): Check if there's a thread selected instead of
4649 checking whether there's any thread in the thread list.
4650 (handle_qxfer_threads, handle_qxfer_btrace)
4651 (handle_qxfer_btrace_conf): Don't error out early if there's no
4652 thread in the thread list.
4653 (handle_v_cont, myresume): Don't set the current thread to the
4655 (process_serial_event) <Hg handling>: Also set thread_id if the
4656 previous general thread is still alive.
4657 (process_serial_event) <g/G handling>: If setting the current
4658 thread to the general thread fails, error out.
4659 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4660 thread's lwp instead of the current thread's.
4661 * target.c (set_desired_thread): If the desired thread was not
4662 found, leave the current thread pointing to NULL. Return an int
4663 (boolean) indicating success.
4664 * target.h (set_desired_thread): Change return type to int.
4666 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4668 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4669 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4671 (ps_get_thread_area): New function.
4673 2015-08-19 Gary Benson <gbenson@redhat.com>
4675 * hostio.c (handle_pread): Do not attempt to read more data
4676 than hostio_reply_with_data can fit in a packet.
4678 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4680 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4682 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4684 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4686 2015-08-06 Pedro Alves <palves@redhat.com>
4688 * tracepoint.c (expr_eval_result): Now an int.
4690 2015-08-06 Pedro Alves <palves@redhat.com>
4692 * gdbthread.h (struct regcache): Forward declare.
4693 (struct thread_info) <regcache_data>: Now a struct regcache
4695 * inferiors.c (inferior_regcache_data)
4696 (set_inferior_regcache_data): Now work with struct regcache
4698 * inferiors.h (struct regcache): Forward declare.
4699 (inferior_regcache_data, set_inferior_regcache_data): Now work
4700 with struct regcache pointers.
4701 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4702 (free_register_cache_thread): Remove struct regcache pointer
4705 2015-08-06 Pedro Alves <palves@redhat.com>
4707 * server.c (captured_main): On error, print the exception message
4708 to stderr, and if run_once is set, throw a quit.
4710 2015-08-06 Pedro Alves <palves@redhat.com>
4712 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4715 2015-08-06 Pedro Alves <palves@redhat.com>
4717 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4718 reading beyond the passed in buffer length.
4720 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4722 * tracepoint.c (symbol_list) <required>: Remove.
4724 2015-08-06 Pedro Alves <palves@redhat.com>
4726 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4727 count if stopping and suspending threads.
4728 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4729 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4730 (linux_detach): Complete an ongoing step-over.
4731 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4733 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4734 (linux_wait_1): If passing a signal to the inferior after
4735 finishing a step-over, unsuspend and re-resume all lwps. If we
4736 see a single-step event but the thread should be continuing, don't
4737 pass the trap to gdb.
4738 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4739 internal_error instead of gdb_assert.
4740 (enqueue_pending_signal): New function.
4741 (check_ptrace_stopped_lwp_gone): Add debug output.
4742 (start_step_over): Use internal_error instead of gdb_assert.
4743 (complete_ongoing_step_over): New function.
4744 (linux_resume_one_thread): Don't resume a suspended thread.
4745 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4748 2015-08-06 Pedro Alves <palves@redhat.com>
4750 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4751 (linux_thread_alive): Use lwp_is_marked_dead.
4752 (extended_event_reported): Delete.
4753 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4754 instead of extended_event_reported.
4755 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4757 (lwp_is_marked_dead): New function.
4758 (lwp_running): Use lwp_is_marked_dead.
4759 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4762 2015-08-06 Pedro Alves <palves@redhat.com>
4764 * linux-low.c (linux_wait_1): Move fork event output out of the
4765 !report_to_gdb check. Pass event_child->waitstatus to
4766 target_waitstatus_to_string instead of ourstatus.
4768 2015-08-04 Yao Qi <yao.qi@linaro.org>
4770 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4771 if current_thread is 32 bit.
4773 2015-08-04 Yao Qi <yao.qi@linaro.org>
4775 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4776 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4777 * server.c (extended_protocol): Remove "static".
4778 * server.h (extended_protocol): Declare it.
4780 2015-08-04 Yao Qi <yao.qi@linaro.org>
4782 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4783 both aarch64 and aarch32.
4784 (aarch64_set_pc): Likewise.
4786 2015-08-04 Yao Qi <yao.qi@linaro.org>
4788 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4789 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4790 arm-with-neon.xml to srv_xmlfiles.
4791 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4792 (is_64bit_tdesc): New function.
4793 (aarch64_linux_read_description): New function.
4794 (aarch64_arch_setup): Call aarch64_linux_read_description.
4795 (regs_info): Rename to regs_info_aarch64.
4796 (aarch64_regs_info): Return right regs_info.
4797 (initialize_low_arch): Call initialize_low_arch_aarch32.
4799 2015-08-04 Yao Qi <yao.qi@linaro.org>
4801 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4802 * linux-aarch32-low.c: New file.
4803 * linux-aarch32-low.h: New file.
4804 * linux-arm-low.c (arm_fill_gregset): Move it to
4805 linux-aarch32-low.c.
4806 (arm_store_gregset): Likewise.
4807 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4808 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4809 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4810 (regs_info): Rename to regs_info_arm.
4811 (arm_regs_info): Return regs_info_aarch32 if
4812 have_ptrace_getregset is 1 and target description is
4813 arm_with_neon or arm_with_vfpv3.
4814 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4815 Call initialize_low_arch_aarch32 instead.
4817 2015-08-04 Yao Qi <yao.qi@linaro.org>
4819 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4820 * linux-low.c: ... here.
4821 * linux-low.h (have_ptrace_getregset): Declare it.
4823 2015-08-04 Pedro Alves <palves@redhat.com>
4825 * thread-db.c (struct thread_db): Use new typedefs.
4826 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4828 (disable_thread_event_reporting): Cast result of dlsym to
4829 destination function pointer type.
4830 (thread_db_mourn): Use td_ta_delete_ftype.
4832 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4834 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4836 (CDX_BREAKPOINT): Define for R2.
4837 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4838 (the_low_target): Add comments.
4840 2015-07-30 Yao Qi <yao.qi@linaro.org>
4842 * linux-arm-low.c (arm_hwcap): Remove it.
4843 (arm_read_description): New local variable arm_hwcap. Don't
4844 set arm_hwcap to zero.
4846 2015-07-30 Yao Qi <yao.qi@linaro.org>
4848 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4849 Use regcache->tdesc instead.
4850 (arm_store_wmmxregset): Likewise.
4851 (arm_fill_vfpregset): Likewise.
4852 (arm_store_vfpregset): Likewise.
4854 2015-07-30 Yao Qi <yao.qi@linaro.org>
4856 * linux-arm-low.c: Include arch/arm.h.
4857 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4858 (arm_store_gregset): Likewise.
4860 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4862 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4863 ptrace's 4th parameter.
4865 2015-07-27 Yao Qi <yao.qi@linaro.org>
4867 * configure.srv (case aarch64*-*-linux*): Don't set
4870 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4872 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4874 * linux-arm-low.c: Likewise.
4875 * linux-cris-low.c: Likewise.
4876 * linux-crisv32-low.c: Likewise.
4877 * linux-low.c: Likewise.
4878 * linux-m68k-low.c: Likewise.
4879 * linux-mips-low.c: Likewise.
4880 * linux-nios2-low.c: Likewise.
4881 * linux-s390-low.c: Likewise.
4882 * linux-sparc-low.c: Likewise.
4883 * linux-tic6x-low.c: Likewise.
4884 * linux-tile-low.c: Likewise.
4885 * linux-x86-low.c: Likewise.
4887 2015-07-24 Pedro Alves <palves@redhat.com>
4889 * config.in: Regenerate.
4890 * configure: Regenerate.
4892 2015-07-24 Pedro Alves <palves@redhat.com>
4894 * acinclude.m4: Include ../ptrace.m4.
4895 * configure.ac: Call GDB_AC_PTRACE.
4896 * config.in, configure: Regenerate.
4898 2015-07-24 Yao Qi <yao.qi@linaro.org>
4900 * linux-low.c (linux_create_inferior): Remove setting to
4901 proc->priv->new_inferior.
4902 (linux_attach): Likewise.
4903 (linux_low_filter_event): Likewise.
4904 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4906 2015-07-24 Yao Qi <yao.qi@linaro.org>
4908 * linux-low.c (linux_arch_setup): New function.
4909 (linux_low_filter_event): If proc->tdesc is NULL and
4910 proc->attached is true, call the_low_target.arch_setup.
4911 Otherwise, keep status pending, and return.
4912 (linux_resume_one_lwp_throw): Don't call get_pc if
4913 thread->while_stepping isn't NULL. Don't call
4914 get_thread_regcache if proc->tdesc is NULL.
4915 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4916 (linux_target_ops): Install arch_setup.
4917 * server.c (start_inferior): Call the_target->arch_setup.
4918 * target.h (struct target_ops) <arch_setup>: New field.
4919 (target_arch_setup): New marco.
4920 * lynx-low.c (lynx_target_ops): Update.
4921 * nto-low.c (nto_target_ops): Update.
4922 * spu-low.c (spu_target_ops): Update.
4923 * win32-low.c (win32_target_ops): Update.
4925 2015-07-24 Yao Qi <yao.qi@linaro.org>
4927 * linux-low.c (linux_add_process): Don't set
4928 proc->priv->new_inferior.
4929 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4930 (linux_attach): Likewise.
4932 2015-07-24 Yao Qi <yao.qi@linaro.org>
4934 * server.c (start_inferior): Code refactor.
4936 2015-07-24 Yao Qi <yao.qi@linaro.org>
4938 * server.c (process_serial_event): Set general_thread.
4940 2015-07-21 Yao Qi <yao.qi@linaro.org>
4942 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4943 aarch64_linux_get_debug_reg_capacity.
4945 2015-07-17 Yao Qi <yao.qi@linaro.org>
4947 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4948 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4949 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4950 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4951 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4952 (AARCH64_HWP_ALIGNMENT): Likewise.
4953 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4954 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4955 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4956 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4957 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4958 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4959 (struct aarch64_debug_reg_state): Likewise.
4960 (struct arch_lwp_info): Likewise.
4961 (aarch64_align_watchpoint): Likewise.
4962 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4963 (aarch64_watchpoint_length): Likewise.
4964 (aarch64_point_encode_ctrl_reg): Likewise
4965 (aarch64_point_is_aligned): Likewise.
4966 (aarch64_align_watchpoint): Likewise.
4967 (aarch64_linux_set_debug_regs):
4968 (aarch64_dr_state_insert_one_point): Likewise.
4969 (aarch64_dr_state_remove_one_point): Likewise.
4970 (aarch64_handle_breakpoint): Likewise.
4971 (aarch64_handle_aligned_watchpoint): Likewise.
4972 (aarch64_handle_unaligned_watchpoint): Likewise.
4973 (aarch64_handle_watchpoint): Likewise.
4975 2015-07-17 Yao Qi <yao.qi@linaro.org>
4977 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4978 and don't aarch64_get_debug_reg_state. All callers update.
4979 (aarch64_handle_aligned_watchpoint): Likewise.
4980 (aarch64_handle_unaligned_watchpoint): Likewise.
4981 (aarch64_handle_watchpoint): Likewise.
4982 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4983 (aarch64_remove_point): Likewise.
4985 2015-07-17 Yao Qi <yao.qi@linaro.org>
4987 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4989 (aarch64_handle_unaligned_watchpoint): Likewise.
4991 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4993 Revert the previous 3 commits:
4994 Move gdb_regex* to common/
4995 Move linux_find_memory_regions_full & co.
4996 gdbserver build-id attribute generator
4998 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4999 Jan Kratochvil <jan.kratochvil@redhat.com>
5001 gdbserver build-id attribute generator.
5002 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5003 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5004 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5006 (get_dynamic): Use find_pdhr to traverse program headers.
5007 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5008 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5009 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5010 (get_hex_build_id): New.
5011 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5012 to reply XML document.
5014 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5015 Jan Kratochvil <jan.kratochvil@redhat.com>
5017 * target.c: Include target/target-utils.h and fcntl.h.
5018 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5019 (target_fileio_read_stralloc): New functions.
5021 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5023 * Makefile.in (OBS): Add gdb_regex.o.
5025 * config.in: Rebuilt.
5026 * configure: Rebuilt.
5028 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5029 Jan Kratochvil <jan.kratochvil@redhat.com>
5031 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5032 * Makefile.in (OBS): Add target-utils.o.
5033 (linux-maps.o, target-utils.o): New.
5034 * configure.srv (srv_linux_obj): Add linux-maps.o.
5036 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5038 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5040 (the_low_target): Install it.
5042 2015-07-14 Pedro Alves <palves@redhat.com>
5044 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5045 Instead, ignore ECHILD, and throw an error for other errnos.
5047 2015-07-10 Pedro Alves <palves@redhat.com>
5049 * event-loop.c (struct callback_event) <data>: Change type to
5050 gdb_client_data instance instead of gdb_client_data pointer.
5051 (append_callback_event): Adjust.
5053 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5055 * linux-aarch64-low.c: Add comments for each linux_target_ops
5056 method. Remove comments already covered in target_ops and
5057 linux_target_ops definitions.
5058 (the_low_target): Add comments for each unimplemented method.
5060 2015-07-09 Yao Qi <yao.qi@linaro.org>
5062 * linux-aarch64-low.c (aarch64_regmap): Remove.
5063 (aarch64_usrregs_info): Remove.
5064 (regs_info): Set field usrregs to NULL.
5066 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5068 * linux-low.c: Include "rsp-low.h"
5069 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5070 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5071 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5072 (handle_btrace_enable_pt): New.
5073 (handle_btrace_general_set): Support "pt".
5074 (handle_btrace_conf_general_set): Support "pt:size".
5076 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5078 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5081 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5083 * linux-aarch64-low.c: Remove comment about endianness.
5084 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5085 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5088 2015-06-24 Gary Benson <gbenson@redhat.com>
5090 * linux-i386-ipa.c (stdint.h): Do not include.
5091 * lynx-i386-low.c (stdint.h): Likewise.
5092 * lynx-ppc-low.c (stdint.h): Likewise.
5093 * mem-break.c (stdint.h): Likewise.
5094 * thread-db.c (stdint.h): Likewise.
5095 * tracepoint.c (stdint.h): Likewise.
5096 * win32-low.c (stdint.h): Likewise.
5098 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5100 * server.c (write_qxfer_response): Update call to
5101 remote_escape_output.
5103 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5104 Jan Kratochvil <jan.kratochvil@redhat.com>
5106 Merge multiple hex conversions.
5107 * gdbreplay.c (tohex): Rename to 'fromhex'.
5108 (logchar): Use fromhex.
5110 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5112 * server.c (handle_qxfer_libraries): Set `version' attribute for
5115 2015-06-10 Gary Benson <gbenson@redhat.com>
5117 * target.h (struct target_ops) <multifs_open>: New field.
5118 <multifs_unlink>: Likewise.
5119 <multifs_readlink>: Likewise.
5120 * linux-low.c (nat/linux-namespaces.h): New include.
5121 (linux_target_ops): Initialize the_target->multifs_open,
5122 the_target->multifs_unlink and the_target->multifs_readlink.
5123 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5124 * hostio.c (hostio_fs_pid): New static variable.
5125 (hostio_handle_new_gdb_connection): New function.
5126 (handle_setfs): Likewise.
5127 (handle_open): Use the_target->multifs_open as appropriate.
5128 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5129 (handle_readlink): Use the_target->multifs_readlink as
5131 (handle_vFile): Handle vFile:setfs packets.
5132 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5133 after target_handle_new_gdb_connection.
5135 2015-06-10 Gary Benson <gbenson@redhat.com>
5137 * configure.ac (AC_CHECK_FUNCS): Add setns.
5138 * config.in: Regenerate.
5139 * configure: Likewise.
5140 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5141 (linux-namespaces.o): New rule.
5142 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5144 2015-06-09 Gary Benson <gbenson@redhat.com>
5146 * hostio.c (handle_open): Process mode argument with
5147 fileio_to_host_mode.
5149 2015-06-01 Yao Qi <yao.qi@linaro.org>
5151 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5152 * linux-x86-low.c: Likewise.
5154 2015-05-28 Don Breazeal <donb@codesourcery.com>
5156 * linux-low.c (handle_extended_wait): Initialize
5157 thread_info.last_resume_kind for new fork children.
5159 2015-05-15 Pedro Alves <palves@redhat.com>
5161 * target.h (target_handle_new_gdb_connection): Rewrite using if
5162 wrapped in do/while.
5164 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5166 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5167 * configure, config.in: Regenerate.
5168 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5171 2015-05-12 Don Breazeal <donb@codesourcery.com>
5173 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5174 PTRACE_EVENT_VFORK_DONE.
5175 (linux_low_ptrace_options, extended_event_reported): Add vfork
5177 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5178 and "vforkdone" for RSP 'T' Stop Reply Packet.
5179 * server.h (report_vfork_events): Declare
5182 2015-05-12 Don Breazeal <donb@codesourcery.com>
5184 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5185 (the_low_target) <new_fork>: Initialize new member.
5186 * linux-arm-low.c (arm_new_fork): New function.
5187 (the_low_target) <new_fork>: Initialize new member.
5188 * linux-low.c (handle_extended_wait): Call new target function
5190 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5191 * linux-mips-low.c (mips_add_watchpoint): New function
5192 extracted from mips_insert_point.
5193 (the_low_target) <new_fork>: Initialize new member.
5194 (mips_linux_new_fork): New function.
5195 (mips_insert_point): Call mips_add_watchpoint.
5196 * linux-x86-low.c (x86_linux_new_fork): New function.
5197 (the_low_target) <new_fork>: Initialize new member.
5199 2015-05-12 Don Breazeal <donb@codesourcery.com>
5201 * linux-low.c (handle_extended_wait): Implement return value,
5202 rename argument 'event_child' to 'event_lwp', handle
5203 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5204 (linux_low_ptrace_options): New function.
5205 (linux_low_filter_event): Call linux_low_ptrace_options,
5206 use different argument fo linux_enable_event_reporting,
5207 use return value from handle_extended_wait.
5208 (extended_event_reported): New function.
5209 (linux_wait_1): Call extended_event_reported and set
5210 status to report fork events.
5211 (linux_write_memory): Add pid to debug message.
5212 (reset_lwp_ptrace_options_callback): New function.
5213 (linux_handle_new_gdb_connection): New function.
5214 (linux_target_ops): Initialize new structure member.
5215 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5216 * lynx-low.c: Initialize new structure member.
5217 * remote-utils.c (prepare_resume_reply): Implement stop reason
5218 "fork" for "T" stop message.
5219 * server.c (handle_query): Call handle_new_gdb_connection.
5220 * server.h (report_fork_events): Declare global flag.
5221 * target.h (struct target_ops) <handle_new_gdb_connection>:
5223 (target_handle_new_gdb_connection): New macro.
5224 * win32-low.c: Initialize new structure member.
5226 2015-05-12 Don Breazeal <donb@codesourcery.com>
5228 * mem-break.c (APPEND_TO_LIST): Define macro.
5229 (clone_agent_expr): New function.
5230 (clone_one_breakpoint): New function.
5231 (clone_all_breakpoints): New function.
5232 * mem-break.h: Declare new functions.
5234 2015-05-12 Don Breazeal <donb@codesourcery.com>
5236 * linux-low.c (linux_supports_fork_events): New function.
5237 (linux_supports_vfork_events): New function.
5238 (linux_target_ops): Initialize new structure members.
5239 (initialize_low): Call linux_check_ptrace_features.
5240 * lynx-low.c (lynx_target_ops): Initialize new structure
5242 * server.c (report_fork_events, report_vfork_events):
5244 (handle_query): Add new features to qSupported packet and
5246 (captured_main): Initialize new global variables.
5247 * target.h (struct target_ops) <supports_fork_events>:
5249 <supports_vfork_events>: New member.
5250 (target_supports_fork_events): New macro.
5251 (target_supports_vfork_events): New macro.
5252 * win32-low.c (win32_target_ops): Initialize new structure
5255 2015-05-12 Gary Benson <gbenson@redhat.com>
5257 * server.c (handle_qxfer_exec_file): Use current process
5260 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5262 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5263 Remove HAVE_PTRACE_GETREGS conditionals.
5264 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5265 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5267 2015-05-08 Yao Qi <yao.qi@linaro.org>
5269 * linux-low.c (linux_supports_conditional_breakpoints): New
5271 (linux_target_ops): Install new target method.
5272 * lynx-low.c (lynx_target_ops): Install NULL hook for
5273 supports_conditional_breakpoints.
5274 * nto-low.c (nto_target_ops): Likewise.
5275 * spu-low.c (spu_target_ops): Likewise.
5276 * win32-low.c (win32_target_ops): Likewise.
5277 * server.c (handle_query): Check
5278 target_supports_conditional_breakpoints.
5279 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5281 (target_supports_conditional_breakpoints): New macro.
5283 2015-05-06 Pedro Alves <palves@redhat.com>
5286 * server.c (start_inferior): If the process exits, mourn it.
5288 2015-04-21 Gary Benson <gbenson@redhat.com>
5290 * hostio.c (fileio_open_flags_to_host): Factored out to
5291 fileio_to_host_openflags in common/fileio.c. Single use
5294 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5296 * linux-xtensa-low.c (xtensa_fill_gregset)
5297 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5300 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5302 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5303 (regs_info): Replace usrregs pointer with NULL.
5305 2015-04-17 Gary Benson <gbenson@redhat.com>
5307 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5308 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5309 * server.c (handle_qxfer_exec_file): New function.
5310 (qxfer_packets): Add exec-file entry.
5311 (handle_query): Report qXfer:exec-file:read as supported packet.
5313 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5315 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5317 2015-04-09 Gary Benson <gbenson@redhat.com>
5319 * hostio-errno.c (errno_to_fileio_error): Remove function.
5320 Update caller to use remote_fileio_to_fio_error.
5322 2015-04-09 Yao Qi <yao.qi@linaro.org>
5324 * linux-low.c (linux_insert_point): Call
5325 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5326 (linux_remove_point): Call remove_memory_breakpoint if type is
5328 * linux-x86-low.c (x86_insert_point): Don't call
5329 insert_memory_breakpoint.
5330 (x86_remove_point): Don't call remove_memory_breakpoint.
5332 2015-04-01 Pedro Alves <palves@redhat.com>
5333 Cleber Rosa <crosa@redhat.com>
5335 * server.c (gdbserver_usage): Reorganize and extend the usage
5338 2015-03-24 Pedro Alves <palves@redhat.com>
5340 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5341 output. Also dump TRAP_TRACE.
5342 (linux_low_filter_event): In debug output, distinguish a
5343 resume_stop SIGSTOP from a delayed SIGSTOP.
5345 2015-03-24 Gary Benson <gbenson@redhat.com>
5347 * linux-x86-low.c (x86_linux_new_thread): Moved to
5349 (x86_linux_prepare_to_resume): Likewise.
5351 2015-03-24 Gary Benson <gbenson@redhat.com>
5353 * Makefile.in (x86-linux-dregs.o): New rule.
5354 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5355 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5356 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5357 (x86_linux_dr_get): Likewise.
5358 (x86_linux_dr_set): Likewise.
5359 (update_debug_registers_callback): Likewise.
5360 (x86_linux_dr_set_addr): Likewise.
5361 (x86_linux_dr_get_addr): Likewise.
5362 (x86_linux_dr_set_control): Likewise.
5363 (x86_linux_dr_get_control): Likewise.
5364 (x86_linux_dr_get_status): Likewise.
5365 (x86_linux_update_debug_registers): Likewise.
5367 2015-03-24 Gary Benson <gbenson@redhat.com>
5369 * linux-x86-low.c (x86_linux_update_debug_registers):
5370 New function, factored out from...
5371 (x86_linux_prepare_to_resume): ...this.
5373 2015-03-24 Gary Benson <gbenson@redhat.com>
5375 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5376 (x86_linux_dr_set): Likewise.
5377 (update_debug_registers_callback): Likewise.
5378 (x86_linux_dr_set_addr): Likewise.
5379 (x86_linux_dr_get_addr): Likewise.
5380 (x86_linux_dr_set_control): Likewise.
5381 (x86_linux_dr_get_control): Likewise.
5382 (x86_linux_dr_get_status): Likewise.
5383 (x86_linux_prepare_to_resume): Likewise.
5385 2015-03-24 Gary Benson <gbenson@redhat.com>
5387 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5388 Use perror_with_name. Pass string through gettext.
5389 (x86_linux_dr_set): Likewise.
5391 2015-03-24 Gary Benson <gbenson@redhat.com>
5393 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5394 (x86_linux_dr_set_addr): ...this.
5395 (x86_dr_low_get_addr): Rename to...
5396 (x86_linux_dr_get_addr): ...this.
5397 (x86_dr_low_set_control): Rename to...
5398 (x86_linux_dr_set_control): ...this.
5399 (x86_dr_low_get_control): Rename to...
5400 (x86_linux_dr_get_control): ...this.
5401 (x86_dr_low_get_status): Rename to...
5402 (x86_linux_dr_get_status): ...this.
5403 (x86_dr_low): Update with new function names.
5405 2015-03-24 Gary Benson <gbenson@redhat.com>
5407 * Makefile.in (x86-linux.o): New rule.
5408 * configure.srv: Add x86-linux.o to relevant targets.
5409 * linux-low.c (lwp_set_arch_private_info): New function.
5410 (lwp_arch_private_info): Likewise.
5411 * linux-x86-low.c: Include nat/x86-linux.h.
5412 (arch_lwp_info): Removed structure.
5413 (update_debug_registers_callback):
5414 Use lwp_set_debug_registers_changed.
5415 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5416 and lwp_set_debug_registers_changed.
5417 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5419 2015-03-24 Gary Benson <gbenson@redhat.com>
5421 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5422 * linux-arm-low.c (arm_new_thread): Likewise.
5423 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5424 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5425 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5426 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5428 2015-03-24 Gary Benson <gbenson@redhat.com>
5430 * linux-low.c (ptid_of_lwp): New function.
5431 (lwp_is_stopped): Likewise.
5432 (lwp_stop_reason): Likewise.
5433 * linux-x86-low.c (update_debug_registers_callback):
5435 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5438 2015-03-24 Gary Benson <gbenson@redhat.com>
5440 * linux-low.h (linux_stop_lwp): Remove declaration.
5442 2015-03-24 Gary Benson <gbenson@redhat.com>
5444 * linux-low.h: Include nat/linux-nat.h.
5445 * linux-low.c (iterate_over_lwps_args): New structure.
5446 (iterate_over_lwps_filter): New function.
5447 (iterate_over_lwps): Likewise.
5448 * linux-x86-low.c (update_debug_registers_callback):
5449 Update signature to what iterate_over_lwps expects.
5450 Remove PID check that iterate_over_lwps now performs.
5451 (x86_dr_low_set_addr): Use iterate_over_lwps.
5452 (x86_dr_low_set_control): Likewise.
5454 2015-03-24 Gary Benson <gbenson@redhat.com>
5456 * linux-x86-low.c (x86_debug_reg_state): New function.
5457 (x86_linux_prepare_to_resume): Use the above.
5459 2015-03-24 Gary Benson <gbenson@redhat.com>
5461 * linux-low.c (current_lwp_ptid): New function.
5462 * linux-x86-low.c: Include nat/linux-nat.h.
5463 (x86_dr_low_get_addr): Use current_lwp_ptid.
5464 (x86_dr_low_get_control): Likewise.
5465 (x86_dr_low_get_status): Likewise.
5467 2015-03-20 Pedro Alves <palves@redhat.com>
5469 * tracepoint.c (cmd_qtstatus): Make "str" const.
5471 2015-03-20 Pedro Alves <palves@redhat.com>
5473 * server.c (handle_general_set): Make "req_str" const.
5475 2015-03-19 Pedro Alves <palves@redhat.com>
5477 * linux-low.c (linux_resume_one_lwp): Rename to ...
5478 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5479 instead call perror_with_name.
5480 (check_ptrace_stopped_lwp_gone): New function.
5481 (linux_resume_one_lwp): Reimplement as wrapper around
5482 linux_resume_one_lwp_throw that swallows errors if the LWP is
5485 2015-03-19 Pedro Alves <palves@redhat.com>
5487 * linux-low.c (count_events_callback, select_event_lwp_callback):
5488 No longer check whether the thread has resume_stop as last resume
5491 2015-03-19 Pedro Alves <palves@redhat.com>
5493 * linux-low.c (count_events_callback, select_event_lwp_callback):
5494 Use the lwp's status_pending_p field, not the thread's.
5496 2015-03-19 Pedro Alves <palves@redhat.com>
5498 * linux-low.c (select_event_lwp_callback): Update comments to
5499 no longer mention SIGTRAP.
5501 2015-03-18 Gary Benson <gbenson@redhat.com>
5503 * server.c (handle_query): Do not report vFile:fstat as supported.
5505 2015-03-11 Gary Benson <gbenson@redhat.com>
5507 * hostio.c (sys/types.h): New include.
5508 (sys/stat.h): Likewise.
5509 (common-remote-fileio.h): Likewise.
5510 (handle_fstat): New function.
5511 (handle_vFile): Handle vFile:fstat packets.
5513 2015-03-11 Gary Benson <gbenson@redhat.com>
5515 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5516 struct stat.st_blocks and struct stat.st_blksize.
5517 * configure: Regenerate.
5518 * config.in: Likewise.
5519 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5520 (OBS): Add common-remote-fileio.o.
5521 (common-remote-fileio.o): New rule.
5523 2015-03-09 Pedro Alves <palves@redhat.com>
5525 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5526 'struct sockaddr' pointer in 'accept' call.
5528 2015-03-09 Pedro Alves <palves@redhat.com>
5531 2015-03-07 Pedro Alves <palves@redhat.com>
5532 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5533 or <winsock2.h> here. Instead include "gdb_socket.h".
5534 (remote_open): Use union gdb_sockaddr_u.
5535 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5536 or <winsock2.h> here. Instead include "gdb_socket.h".
5537 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5538 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5540 (init_named_socket, gdb_agent_helper_thread): Use union
5543 2015-03-07 Pedro Alves <palves@redhat.com>
5545 * configure.ac (build_warnings): Move
5546 -Wdeclaration-after-statement to the C-specific set.
5547 * configure: Regenerate.
5549 2015-03-07 Pedro Alves <palves@redhat.com>
5551 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5552 or <winsock2.h> here. Instead include "gdb_socket.h".
5553 (remote_open): Use union gdb_sockaddr_u.
5554 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5555 or <winsock2.h> here. Instead include "gdb_socket.h".
5556 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5557 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5559 (init_named_socket, gdb_agent_helper_thread): Use union
5562 2015-03-07 Pedro Alves <palves@redhat.com>
5564 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5567 2015-03-06 Yao Qi <yao.qi@linaro.org>
5569 * linux-aarch64-low.c (aarch64_insert_point): Use
5570 show_debug_regs as a boolean.
5571 (aarch64_remove_point): Likewise.
5573 2015-03-05 Pedro Alves <palves@redhat.com>
5575 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5576 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5577 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5578 * nto-low.c (nto_target_ops): Likewise.
5579 * spu-low.c (spu_target_ops): Likewise.
5580 * win32-low.c (win32_target_ops): Likewise.
5582 2015-03-04 Pedro Alves <palves@redhat.com>
5584 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5585 Decide whether a breakpoint triggered based on the SIGTRAP's
5587 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5588 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5589 (linux_low_filter_event): Check for breakpoints before checking
5591 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5593 (linux_stopped_by_sw_breakpoint)
5594 (linux_supports_stopped_by_sw_breakpoint)
5595 (linux_stopped_by_hw_breakpoint)
5596 (linux_supports_stopped_by_hw_breakpoint): New functions.
5597 (linux_target_ops): Install new target methods.
5599 2015-03-04 Pedro Alves <palves@redhat.com>
5601 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5602 * server.c (swbreak_feature, hwbreak_feature): New globals.
5603 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5604 (captured_main): Clear swbreak_feature and hwbreak_feature.
5605 * server.h (swbreak_feature, hwbreak_feature): Declare.
5606 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5607 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5608 supports_stopped_by_hw_breakpoint>: New fields.
5609 (target_supports_stopped_by_sw_breakpoint)
5610 (target_stopped_by_sw_breakpoint)
5611 (target_supports_stopped_by_hw_breakpoint)
5612 (target_stopped_by_hw_breakpoint): Declare.
5614 2015-03-04 Pedro Alves <palves@redhat.com>
5616 enum lwp_stop_reason -> enum target_stop_reason
5617 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5618 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5619 (linux_wait_1, stuck_in_jump_pad_callback)
5620 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5621 (linux_stopped_by_watchpoint):
5622 * linux-low.h (enum lwp_stop_reason): Delete.
5623 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5624 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5626 2015-03-04 Yao Qi <yao.qi@linaro.org>
5628 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5630 2015-03-03 Gary Benson <gbenson@redhat.com>
5632 * hostio.c (handle_vFile): Fix prefix lengths.
5634 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5636 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5639 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5641 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5642 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5643 (clean): Add "rm -f" for above C files.
5644 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5645 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5646 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5647 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5648 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5649 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5650 (init_registers_s390x_vx_linux64)
5651 (init_registers_s390x_tevx_linux64)
5652 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5653 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5655 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5656 (s390_store_vxrs_high): New functions.
5657 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5659 (s390_arch_setup): Add logic for selecting one of the new target
5660 descriptions. Activate the new vector regsets if applicable.
5661 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5662 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5663 and init_registers_s390x_tevx_linux64.
5665 2015-03-01 Pedro Alves <palves@redhat.com>
5667 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5670 2015-02-27 Pedro Alves <palves@redhat.com>
5672 * linux-x86-low.c (u_debugreg_offset): New function.
5673 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5675 2015-02-27 Pedro Alves <palves@redhat.com>
5677 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5678 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5679 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5680 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5681 (ps_lsetfpregs, ps_getpid)
5682 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5683 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5684 (ps_lsetxregs, ps_plog): Declare.
5686 2015-02-27 Pedro Alves <palves@redhat.com>
5688 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5689 IP_AGENT_EXPORT_FUNC.
5690 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5691 IP_AGENT_EXPORT_FUNC.
5692 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5693 (IP_AGENT_EXPORT): Delete.
5694 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5695 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5696 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5697 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5698 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5699 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5700 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5701 (traceframe_read_count, traceframe_write_count)
5702 (traceframes_created, trace_state_variables, get_raw_reg)
5703 (get_trace_state_variable_value, set_trace_state_variable_value)
5704 (ust_loaded, helper_thread_id, cmd_buf): Use
5705 IPA_SYM_EXPORTED_NAME.
5706 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5707 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5708 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5709 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5710 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5711 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5712 EXTERN_C_PUSH/EXTERN_C_POP.
5713 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5714 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5715 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5716 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5717 (traceframe_write_count, traceframe_read_count)
5718 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5719 (about_to_request_buffer_space, get_trace_state_variable_value)
5720 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5721 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5722 EXTERN_C_PUSH/EXTERN_C_POP.
5723 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5724 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5725 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5726 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5727 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5728 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5729 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5730 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5732 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5733 (IP_AGENT_EXPORT_VAR_DECL): Define.
5735 (gdb_agent_get_raw_reg): Declare.
5737 2015-02-27 Tom Tromey <tromey@redhat.com>
5738 Pedro Alves <palves@redhat.com>
5740 Rename symbols whose names are reserved C++ keywords throughout.
5742 2015-02-27 Pedro Alves <palves@redhat.com>
5744 * Makefile.in (COMPILER): New, get it from autoconf.
5745 (CXX): Get from autoconf instead.
5746 (COMPILE.pre): Use COMPILER.
5747 (CC-LD): Rename to ...
5748 (CC_LD): ... this. Use COMPILER.
5749 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5750 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5751 * acinclude.m4: Include build-with-cxx.m4.
5752 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5753 Disable -Werror by default if building in C++ mode.
5754 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5755 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5756 the C++ compiler. Save/restore CXXFLAGS too.
5757 * configure: Regenerate.
5759 2015-02-27 Pedro Alves <palves@redhat.com>
5761 * acinclude.m4: Include libiberty.m4.
5762 * configure.ac: Call libiberty_INIT.
5763 * config.in, configure: Regenerate.
5765 2015-02-26 Pedro Alves <palves@redhat.com>
5767 * linux-low.c (linux_wait_1): When incrementing the PC past a
5768 program breakpoint always use the_low_target.breakpoint_len as
5769 increment, rather than the maximum between that and
5770 the_low_target.decr_pc_after_break.
5772 2015-02-23 Pedro Alves <palves@redhat.com>
5774 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5775 thread was doing a step-over; always adjust the PC if
5776 we stepped over a permanent breakpoint.
5777 (linux_wait_1): If we stepped over breakpoint that was on top of a
5778 permanent breakpoint, manually advance the PC past it.
5780 2015-02-23 Pedro Alves <palves@redhat.com>
5782 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5784 (x86_fill_gregset, x86_store_gregset): Use it when handling
5787 2015-02-20 Pedro Alves <palves@redhat.com>
5789 * thread-db.c: Include "nat/linux-procfs.h".
5790 (thread_db_init): Skip listing new threads if the kernel supports
5791 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5793 2015-02-20 Pedro Alves <palves@redhat.com>
5795 * linux-low.c (status_pending_p_callback): Use ptid_match.
5797 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5799 PR breakpoints/16812
5800 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5801 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5802 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5804 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5806 PR breakpoints/15956
5807 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5809 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5811 * linux-low.c (linux_low_btrace_conf): Print size.
5812 * server.c (handle_btrace_conf_general_set): New.
5813 (hanle_general_set): Call handle_btrace_conf_general_set.
5814 (handle_query): Report Qbtrace-conf:bts:size as supported.
5816 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5818 * linux-low.c (linux_low_enable_btrace): Update parameters.
5819 (linux_low_btrace_conf): New.
5820 (linux_target_ops)<to_btrace_conf>: Initialize.
5821 * server.c (current_btrace_conf): New.
5822 (handle_btrace_enable): Rename to ...
5823 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
5824 to target_enable_btrace. Update comment. Update users.
5825 (handle_qxfer_btrace_conf): New.
5826 (qxfer_packets): Add btrace-conf entry.
5827 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5828 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5829 (target_ops)<read_btrace_conf>: New.
5830 (target_enable_btrace): Update parameters.
5831 (target_read_btrace_conf): New.
5833 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5835 * server.c (handle_btrace_general_set): Remove call to
5836 target_supports_btrace.
5837 (supported_btrace_packets): New.
5838 (handle_query): Call supported_btrace_packets.
5839 * target.h: include btrace-common.h.
5840 (btrace_target_info): Removed.
5841 (supports_btrace, target_supports_btrace): Update parameters.
5843 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5845 * Makefile.in (SFILES): Add common/btrace-common.c.
5846 (OBS): Add common/btrace-common.o.
5847 (btrace-common.o): Add build rules.
5848 * linux-low: Include btrace-common.h.
5849 (linux_low_read_btrace): Use struct btrace_data. Call
5850 btrace_data_init and btrace_data_fini.
5852 2015-02-06 Pedro Alves <palves@redhat.com>
5854 * thread-db.c (find_new_threads_callback): Add debug output.
5856 2015-02-04 Pedro Alves <palves@redhat.com>
5858 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5859 (resume_stopped_resumed_lwps): New function.
5860 (linux_wait_for_event_filtered): Use it.
5862 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5864 * Makefile.in (SFILES): Add linux-personality.c.
5865 (linux-personality.o): New rule.
5866 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5867 list of objects to be built.
5868 * linux-low.c: Include nat/linux-personality.h.
5869 (linux_create_inferior): Remove code to disable address space
5870 randomization (moved to ../nat/linux-personality.c). Create
5871 cleanup to disable address space randomization.
5873 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5875 * Makefile.in (posix-strerror.o): New rule.
5876 (mingw-strerror.o): Likewise.
5877 * configure: Regenerated.
5878 * configure.ac: Source file ../common/common.host. Initialize new
5879 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5881 2015-01-14 Yao Qi <yao@codesourcery.com>
5883 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5884 (ppc-linux.o): New rule.
5885 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5886 * configure.ac: AC_CHECK_FUNCS(getauxval).
5887 * config.in: Re-generated.
5888 * configure: Re-generated.
5889 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5890 ppc64_64bit_inferior_p
5892 2015-01-14 Yao Qi <yao@codesourcery.com>
5894 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5895 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5896 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5897 (PT_ORIG_R3, PT_TRAP): Likewise.
5898 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5899 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5900 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5902 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5904 * i387-fp.c (i387_cache_to_xsave): In look over
5905 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5906 zmmh_low_space field by use of zmmh_high_space.
5908 2015-01-09 Pedro Alves <palves@redhat.com>
5910 * linux-low.c (step_over_bkpt): Move higher up in the file.
5911 (handle_extended_wait): Don't store the stop_pc here.
5912 (get_stop_pc): Adjust comments and rename to ...
5913 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5914 stopped for a software breakpoint or hardware breakpoint.
5915 (thread_still_has_status_pending_p): New function.
5916 (status_pending_p_callback): Use
5917 thread_still_has_status_pending_p. If the event is no longer
5918 interesting, resume the LWP.
5919 (handle_tracepoints): Add assert.
5920 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5921 (wstatus_maybe_breakpoint): New function.
5922 (cancel_breakpoint): Delete function.
5923 (check_stopped_by_watchpoint): New function, factored out from
5924 linux_low_filter_event.
5925 (lp_status_maybe_breakpoint): Delete function.
5926 (linux_low_filter_event): Remove filter_ptid argument.
5927 Leave thread group exits pending here. Store the LWP's stop PC.
5928 Always leave events pending.
5929 (linux_wait_for_event_filtered): Pull all events out of the
5930 kernel, and leave them all pending.
5931 (count_events_callback, select_event_lwp_callback): Consider all
5933 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5934 (select_event_lwp): Only give preference to the stepping LWP in
5935 all-stop mode. Adjust comments.
5936 (ignore_event): New function.
5937 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5938 references to cancel_breakpoints. Adjust to renames. Also give
5939 equal priority to all LWPs that have had events in non-stop mode.
5940 If reporting a software breakpoint event, unadjust the LWP's PC.
5941 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5942 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5944 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5945 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5946 (linux_stopped_by_watchpoint): Adjust.
5947 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5948 * linux-low.h (enum lwp_stop_reason): New.
5949 (struct lwp_info) <stop_pc>: Adjust comment.
5950 <stopped_by_watchpoint>: Delete field.
5951 <stop_reason>: New field.
5952 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5953 * mem-break.c (software_breakpoint_inserted_here)
5954 (hardware_breakpoint_inserted_here): New function.
5955 * mem-break.h (software_breakpoint_inserted_here)
5956 (hardware_breakpoint_inserted_here): Declare.
5957 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5958 (cancel_breakpoints): Delete.
5959 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5960 (upload_fast_traceframes): Remove references to
5963 2015-01-09 Pedro Alves <palves@redhat.com>
5965 * thread-db.c (find_new_threads_callback): Ignore thread if the
5966 kernel thread ID is -1.
5968 2015-01-09 Pedro Alves <palves@redhat.com>
5970 * linux-low.c (linux_attach_fail_reason_string): Move to
5971 nat/linux-ptrace.c, and rename.
5972 (linux_attach_lwp): Update comment.
5973 (attach_proc_task_lwp_callback): New function.
5974 (linux_attach): Adjust to rename and use
5975 linux_proc_attach_tgid_threads.
5976 (linux_attach_fail_reason_string): Delete declaration.
5978 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5980 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5981 * server.c (gdbserver_version): Likewise.
5983 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5985 * remote-utils.c: Include ctype.h.
5986 (input_interrupt): Explicitly handle the case when the char
5987 received is the NUL byte. Improve the printing of non-ASCII
5990 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5992 * linux-low.c (linux_low_filter_event): Update call to
5993 linux_enable_event_reporting following the addition of
5994 a new parameter to that function.
5996 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5999 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6000 (AARCH64_FPCR_REGNO): Likewise.
6001 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6002 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6003 (aarch64_store_fpregset): Likewise.
6005 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6007 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6008 Remove FIXME comment about assumption about N.
6010 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6012 * configure.ac: If large-file support is disabled in GDBserver,
6013 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6014 * configure: Regenerate.
6016 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6018 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6019 warning upon ENODATA from ptrace.
6020 * linux-s390-low.c (s390_store_tdb): New.
6021 (s390_regsets): Add regset for NT_S390_TDB.
6023 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6025 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6026 without a fill_function.
6027 * linux-s390-low.c (s390_fill_last_break): Remove.
6028 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6029 (s390_arch_setup): Use regset's size instead of fill_function for
6032 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6034 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6035 the regset's store function when ptrace returned an error.
6036 * regcache.c (get_thread_regcache): Invalidate register cache
6037 before fetching inferior's registers.
6039 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6041 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6042 while-loop as for-loop.
6043 (regsets_store_inferior_registers): Likewise.
6045 2014-11-28 Yao Qi <yao@codesourcery.com>
6047 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6048 * config.in, configure: Re-generate.
6049 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6052 2014-11-21 Yao Qi <yao@codesourcery.com>
6054 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6055 (AC_CHECK_HEADERS): Remove malloc.h.
6056 * configure: Re-generated.
6057 * config.in: Re-generated.
6058 * server.h: Don't include alloca.h and malloc.h.
6059 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6060 Don't include malloc.h.
6062 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6064 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6065 corresponding ERRNO check in same block.
6067 2014-11-12 Pedro Alves <palves@redhat.com>
6069 * server.c (cont_thread): Update comment.
6070 (start_inferior, attach_inferior): No longer clear cont_thread.
6071 (handle_v_cont): No longer set cont_thread.
6072 (captured_main): Clear cont_thread each time a GDB connects.
6074 2014-11-12 Pedro Alves <palves@redhat.com>
6076 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6077 thread, and don't resume all threads if the Hc thread has exited.
6079 2014-11-12 Pedro Alves <palves@redhat.com>
6081 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6082 the process group instead of to a specific LWP.
6084 2014-10-15 Pedro Alves <palves@redhat.com>
6087 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6089 (arm_set_thread_context): Delete.
6090 (the_low_target): Adjust.
6091 * win32-i386-low.c (debug_registers_changed)
6092 (debug_registers_used): Delete.
6093 (update_debug_registers_callback): New function.
6094 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6095 needing to update their debug registers.
6096 (win32_get_current_dr): New function.
6097 (x86_dr_low_get_addr, x86_dr_low_get_control)
6098 (x86_dr_low_get_status): Fetch the debug register from the thread
6100 (i386_initial_stuff): Adjust.
6101 (i386_get_thread_context): Remove current_event parameter. Don't
6102 clear debug_registers_changed nor copy DR values to
6104 (i386_set_thread_context): Delete.
6105 (i386_prepare_to_resume): New function.
6106 (i386_thread_added): Mark the thread as needing to update irs
6108 (the_low_target): Remove i386_set_thread_context and install
6109 i386_prepare_to_resume.
6110 * win32-low.c (win32_get_thread_context): Adjust.
6111 (win32_set_thread_context): Use SetThreadContext
6113 (win32_prepare_to_resume): New function.
6114 (win32_require_context): New function, factored out from ...
6115 (thread_rec): ... this.
6116 (continue_one_thread): Call win32_prepare_to_resume on each thread
6117 we're about to continue.
6118 (win32_resume): Call win32_prepare_to_resume on the event thread.
6119 * win32-low.h (struct win32_thread_info)
6120 <debug_registers_changed>: New field.
6121 (struct win32_target_ops): Change prototype of set_thread_context,
6122 delete set_thread_context and add prepare_to_resume.
6123 (win32_require_context): New declaration.
6125 2014-10-08 Gary Benson <gbenson@redhat.com>
6127 * server.h: Do not include common-exceptions.h.
6129 2014-10-08 Gary Benson <gbenson@redhat.com>
6131 * server.h: Do not include cleanups.h.
6133 2014-09-30 James Hogan <james.hogan@imgtec.com>
6135 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6138 2014-09-23 Yao Qi <yao@codesourcery.com>
6140 * linux-low.c (lp_status_maybe_breakpoint): New function.
6141 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6142 (count_events_callback): Likewise.
6143 (select_event_lwp_callback): Likewise.
6144 (cancel_breakpoints_callback): Likewise.
6146 2014-09-19 Don Breazeal <donb@codesourcery.com>
6148 * linux-low.c (handle_extended_wait): Call
6149 linux_ptrace_get_extended_event.
6150 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6151 linux_is_extended_waitstatus.
6153 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6155 * Makefile.in (CPPFLAGS): Define.
6156 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6157 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6159 2014-09-16 Gary Benson <gbenson@redhat.com>
6161 * inferiors.h (current_inferior): Renamed as...
6162 (current_thread): New variable. All uses updated.
6163 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6164 (maybe_move_out_of_jump_pad): Likewise.
6165 (cancel_breakpoint): Likewise.
6166 (linux_low_filter_event): Likewise.
6167 (wait_for_sigstop): Likewise.
6168 (linux_resume_one_lwp): Likewise.
6169 (need_step_over_p): Likewise.
6170 (start_step_over): Likewise.
6171 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6172 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6173 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6174 and save_inferior as saved_thread.
6175 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6177 (regcache_invalidate_thread): Likewise.
6178 * remote-utils.c (prepare_resume_reply): Likewise.
6179 * thread-db.c (thread_db_get_tls_address): Likewise.
6180 (disable_thread_event_reporting): Likewise.
6181 (remove_thread_event_breakpoints): Likewise.
6182 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6184 * target.h (set_desired_inferior): Renamed as...
6185 (set_desired_thread): New declaration. All uses updated.
6186 * server.c (myresume): Updated comment to reference thread instead
6188 (handle_serial_event): Likewise.
6189 (handle_target_event): Likewise.
6191 2014-09-12 Tom Tromey <tromey@redhat.com>
6192 Gary Benson <gbenson@redhat.com>
6194 * regcache.h: Include common-regcache.h.
6195 (regcache_read_pc): Don't declare.
6196 * regcache.c (get_thread_regcache_for_ptid): New function.
6198 2014-09-11 Tom Tromey <tromey@redhat.com>
6199 Gary Benson <gbenson@redhat.com>
6201 * symbol.c: New file.
6202 * Makefile.in (SFILES): Add symbol.c.
6203 (OBS): Add symbol.o.
6205 2014-09-11 Gary Benson <gbenson@redhat.com>
6207 * target.c (target_stop_ptid, target_continue_ptid): New
6210 2014-09-11 Tom Tromey <tromey@redhat.com>
6211 Gary Benson <gbenson@redhat.com>
6213 * target.h: Include target/target.h.
6214 * target.c (target_read_memory, target_read_uint32)
6215 (target_write_memory): New functions.
6217 2014-09-11 Gary Benson <gbenson@redhat.com>
6219 * server.h (debug_hw_points): Don't declare.
6220 * server.c (debug_hw_points): Don't define. Replace all uses
6221 with show_debug_regs.
6222 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6223 all uses with show_debug_regs.
6225 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6227 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6228 endianness into account.
6229 (ppc_supply_ptrace_register): Likewise.
6231 2014-09-03 James Hogan <james.hogan@imgtec.com>
6233 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6234 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6236 2014-09-03 Gary Benson <gbenson@redhat.com>
6238 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6239 ALL_DEBUG_ADDRESS_REGISTERS.
6241 2014-09-02 Gary Benson <gbenson@redhat.com>
6243 * i386-low.h: Renamed as...
6244 * x86-low.h: New file. All type, function and variable name
6245 prefixes changed from "i386_" to "x86_". All references updated.
6246 * i386-low.c: Renamed as...
6247 * x86-low.c: New file. All type, function and variable name
6248 prefixes changed from "i386_" to "x86_". All references updated.
6250 2014-09-02 Gary Benson <gbenson@redhat.com>
6252 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6253 (x86_linux_new_thread): Likewise.
6255 2014-08-29 Gary Benson <gbenson@redhat.com>
6257 * server.h (setjmp.h): Do not include.
6258 (toplevel): Do not declare.
6259 (common-exceptions.h): Include.
6260 (cleanups.h): Likewise.
6261 * server.c (toplevel): Do not define.
6262 (exit_code): New static global.
6263 (detach_or_kill_for_exit_cleanup): New function.
6264 (main): New function. Original main renamed to...
6265 (captured_main): New function.
6266 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6268 2014-08-29 Gary Benson <gbenson@redhat.com>
6270 * Makefile.in (SFILES): Add common/common-exceptions.c.
6271 (OBS): Add common-exceptions.o.
6272 (common-exceptions.o): New rule.
6273 * utils.c (prepare_to_throw_exception): New function.
6275 2014-08-29 Gary Benson <gbenson@redhat.com>
6277 * config.in: Regenerate.
6278 * configure: Likewise.
6280 2014-08-29 Gary Benson <gbenson@redhat.com>
6282 * Makefile.in (SFILES): Add common/cleanups.c.
6284 (cleanups.o): New rule.
6286 2014-08-29 Gary Benson <gbenson@redhat.com>
6288 * utils.c (internal_vwarning): New function.
6290 2014-08-28 Gary Benson <gbenson@redhat.com>
6292 * utils.h (fatal): Remove declaration.
6293 * utils.c (fatal): Remove function.
6295 2014-08-28 Gary Benson <gbenson@redhat.com>
6297 * tracepoint.c (gdb_agent_init): Replace fatal with
6299 (initialize_tracepoint): Likewise.
6301 2014-08-28 Gary Benson <gbenson@redhat.com>
6303 * remote-utils.c (remote_prepare): Replace fatal with error.
6305 2014-08-28 Gary Benson <gbenson@redhat.com>
6307 * linux-low.c (linux_async): Replace fatal with warning.
6309 (linux_start_non_stop): Return -1 if linux_async failed.
6311 2014-08-28 Gary Benson <gbenson@redhat.com>
6313 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6315 (i386_dr_low_get_addr): Remove vague comment.
6316 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6319 2014-08-28 Gary Benson <gbenson@redhat.com>
6321 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6322 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6324 (linux_resume_one_lwp): Likewise.
6325 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6327 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6328 with internal_error.
6329 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6330 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6331 (find_register_by_name): Replace fatal with internal_error.
6332 (find_regno): Likewise.
6333 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6334 * thread-db.c (thread_db_create_event): Likewise.
6335 (thread_db_load_search): Likewise.
6336 (try_thread_db_load_1): Likewise.
6337 * tracepoint.c (get_jump_space_head): Replace fatal with
6339 (claim_trampoline_space): Likewise.
6340 (have_fast_tracepoint_trampoline_buffer): Likewise.
6341 (cmd_qtstart): Likewise.
6342 (stop_tracing): Likewise.
6343 (fast_tracepoint_collecting): Likewise.
6344 (target_malloc): Likewise.
6345 (download_tracepoint): Likewise.
6346 (download_trace_state_variables): Replace check with gdb_assert.
6347 (upload_fast_traceframes): Replace fatal with internal_error.
6349 2014-08-19 Tom Tromey <tromey@redhat.com>
6350 Gary Benson <gbenson@redhat.com>
6352 * Makefile.in (SFILES): Add common/common-debug.c.
6353 (OBS): Add common-debug.o.
6354 (common-debug.o): New rule.
6355 * debug.h (debug_printf): Don't declare.
6356 * debug.c (debug_printf): Renamed and rewritten as...
6357 (debug_vprintf): New function.
6359 2014-08-19 Gary Benson <gbenson@redhat.com>
6361 * utils.h: Do not include print-utils.h.
6363 2014-08-19 Tom Tromey <tromey@redhat.com>
6364 Gary Benson <gbenson@redhat.com>
6366 * server.h: Add static assertion.
6367 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6369 2014-08-19 Tom Tromey <tromey@redhat.com>
6370 Gary Benson <gbenson@redhat.com>
6372 * Makefile.in (SFILES): Add common/errors.c.
6373 (OBS): Add errors.o.
6374 (IPA_OBS): Add errors-ipa.o.
6375 (errors.o): New rule.
6376 (errors-ipa.o): Likewise.
6377 * utils.h (perror_with_name, error, warning): Don't declare.
6378 * utils.c (warning): Renamed and rewritten as...
6379 (vwarning): New function.
6380 (error): Renamed and rewritten as...
6381 (verror): New function.
6382 (internal_error): Renamed and rewritten as...
6383 (internal_verror): New function.
6385 2014-08-07 Gary Benson <gbenson@redhat.com>
6387 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6388 * configure: Regenerate.
6389 * config.in: Likewise.
6390 * server.h: Do not include errno.h.
6391 * event-loop.c: Likewise.
6392 * hostio-errno.c: Likewise.
6393 * linux-low.c: Likewise.
6394 * remote-utils.c: Likewise.
6395 * spu-low.c: Likewise.
6396 * utils.c: Likewise.
6397 * gdbreplay.c: Unconditionally include errno.h.
6399 2014-08-07 Gary Benson <gbenson@redhat.com>
6401 * server.h: Do not include string.h.
6402 * event-loop.c: Likewise.
6403 * linux-low.c: Likewise.
6404 * regcache.c: Likewise.
6405 * remote-utils.c: Likewise.
6406 * spu-low.c: Likewise.
6407 * utils.c: Likewise.
6409 2014-08-07 Gary Benson <gbenson@redhat.com>
6411 * server.h: Do not include gdb_assert.h.
6413 2014-08-07 Gary Benson <gbenson@redhat.com>
6415 * server.h: Do not include common-utils.h.
6417 2014-08-07 Gary Benson <gbenson@redhat.com>
6419 * server.h: Do not include ptid.h.
6420 * notif.h: Likewise.
6422 2014-08-07 Gary Benson <gbenson@redhat.com>
6424 * server.h: Do not include gdb_locale.h.
6426 2014-08-07 Gary Benson <gbenson@redhat.com>
6428 * server.h: Do not include gdb/signals.h.
6429 * win32-low.c: Likewise.
6431 2014-08-07 Gary Benson <gbenson@redhat.com>
6433 * server.h: Do not include pathmax.h.
6435 2014-08-07 Gary Benson <gbenson@redhat.com>
6437 * server.h: Do not include libiberty.h.
6438 * linux-bfin-low.c: Likewise.
6440 2014-08-07 Gary Benson <gbenson@redhat.com>
6442 * server.h: Do not include ansidecl.h.
6444 2014-08-07 Gary Benson <gbenson@redhat.com>
6446 * linux-x86-low.c: Do not include stddef.h.
6447 * lynx-ppc-low.c: Likewise.
6448 * tracepoint.c: Likewise.
6450 2014-08-07 Gary Benson <gbenson@redhat.com>
6452 * server.h: Do not include stdarg.h.
6453 * nto-low.c: Likewise.
6455 2014-08-07 Gary Benson <gbenson@redhat.com>
6457 * server.h: Do not include stdlib.h.
6458 * inferiors.c: Likewise.
6459 * linux-low.c: Likewise.
6460 * regcache.c: Likewise.
6461 * spu-low.c: Likewise.
6462 * tracepoint.c: Likewise.
6463 * utils.c: Likewise.
6465 2014-08-07 Gary Benson <gbenson@redhat.com>
6467 * server.h: Do not include stdio.h.
6468 * linux-low.c: Likewise.
6469 * remote-utils.c: Likewise.
6470 * spu-low.c: Likewise.
6471 * utils.c: Likewise.
6472 * wincecompat.c: Likewise.
6474 2014-08-06 Gary Benson <gbenson@redhat.com>
6476 * regcache.c (init_register_cache): Move conditionals inside if.
6478 2014-08-06 Gary Benson <gbenson@redhat.com>
6480 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6482 2014-07-31 Gary Benson <gbenson@redhat.com>
6484 * ax.h: Do not include server.h.
6485 * gdbthread.h: Likewise.
6486 * lynx-low.h: Likewise.
6487 * notif.h: Likewise.
6489 2014-07-30 Gary Benson <gbenson@redhat.com>
6491 * server.h: Include common-defs.h.
6492 Do not include config.h or build-gnulib-gdbserver/config.h.
6494 2014-07-30 Gary Benson <gbenson@redhat.com>
6496 * hostio-errno.c: Move server.h to top of includes list.
6497 * inferiors.c: Likewise.
6498 * linux-x86-low.c: Likewise.
6499 * notif.c: Include server.h.
6501 2014-07-24 Tom Tromey <tromey@redhat.com>
6502 Gary Benson <gbenson@redhat.com>
6504 * server.h (CORE_ADDR): Now unsigned.
6506 2014-07-16 Pedro Alves <palves@redhat.com>
6508 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6510 2014-07-15 Pedro Alves <palves@redhat.com>
6512 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6515 2014-07-11 Pedro Alves <palves@redhat.com>
6517 * linux-low.c (kill_wait_lwp): New function, based on
6518 kill_one_lwp_callback, but use my_waitpid directly.
6519 (kill_one_lwp_callback, linux_kill): Use it.
6521 2014-06-23 Pedro Alves <palves@redhat.com>
6523 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6524 before setting DR0..DR3.
6526 2014-06-20 Gary Benson <gbenson@redhat.com>
6528 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6529 * configure: Regenerated.
6530 * config.in: Likewise.
6532 2014-06-20 Gary Benson <gbenson@redhat.com>
6534 * Makefile.in (SFILES): Update locations for files moved
6536 (object file files): Reordered.
6538 2014-06-20 Gary Benson <gbenson@redhat.com>
6540 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6541 (i386_dr_low_set_addr): Likewise.
6542 (i386_dr_low_get_addr): Likewise.
6543 (i386_dr_low_can_set_control): Likewise.
6544 (i386_dr_low_set_control): Likewise.
6545 (i386_dr_low_get_control): Likewise.
6546 (i386_dr_low_get_status): Likewise.
6547 (i386_get_debug_register_length): Likewise.
6548 * linux-x86-low.c (i386_dr_low_set_addr):
6549 Changed signature. Made static.
6550 (i386_dr_low_get_addr): Likewise.
6551 (i386_dr_low_set_control): Likewise.
6552 (i386_dr_low_get_control): Likewise.
6553 (i386_dr_low_get_status): Likewise.
6554 (i386_dr_low): New global variable.
6555 * win32-i386-low.c (i386_dr_low_set_addr):
6556 Changed signature. Made static.
6557 (i386_dr_low_get_addr): Likewise.
6558 (i386_dr_low_set_control): Likewise.
6559 (i386_dr_low_get_control): Likewise.
6560 (i386_dr_low_get_status): Likewise.
6561 (i386_dr_low): New global variable.
6563 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6565 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6566 * Makefile.in (AR, AR_FLAGS): Define.
6567 * configure: Regenerate.
6569 2014-06-19 Gary Benson <gbenson@redhat.com>
6571 * Makefile.in (i386-dregs.o): New rule.
6572 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6573 * i386-low.c (target.h): Remove include.
6574 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6575 (DR_CONTROL_SHIFT): Likewise.
6576 (DR_CONTROL_SIZE): Likewise.
6577 (DR_RW_EXECUTE): Likewise.
6578 (DR_RW_WRITE): Likewise.
6579 (DR_RW_READ): Likewise.
6580 (DR_RW_IORW): Likewise.
6581 (DR_LEN_1): Likewise.
6582 (DR_LEN_2): Likewise.
6583 (DR_LEN_4): Likewise.
6584 (DR_LEN_8): Likewise.
6585 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6586 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6587 (DR_ENABLE_SIZE): Likewise.
6588 (DR_LOCAL_SLOWDOWN): Likewise.
6589 (DR_GLOBAL_SLOWDOWN): Likewise.
6590 (DR_CONTROL_RESERVED): Likewise.
6591 (I386_DR_CONTROL_MASK): Likewise.
6592 (I386_DR_VACANT): Likewise.
6593 (I386_DR_LOCAL_ENABLE): Likewise.
6594 (I386_DR_GLOBAL_ENABLE): Likewise.
6595 (I386_DR_DISABLE): Likewise.
6596 (I386_DR_SET_RW_LEN): Likewise.
6597 (I386_DR_GET_RW_LEN): Likewise.
6598 (I386_DR_WATCH_HIT): Likewise.
6599 (i386_wp_op_t): Likewise.
6600 (i386_show_dr): Likewise.
6601 (i386_length_and_rw_bits): Likewise.
6602 (i386_insert_aligned_watchpoint): Likewise.
6603 (i386_remove_aligned_watchpoint): Likewise.
6604 (i386_handle_nonaligned_watchpoint): Likewise.
6605 i386_update_inferior_debug_regs(): Likewise.
6606 (i386_dr_insert_watchpoint): Likewise.
6607 (i386_dr_remove_watchpoint): Likewise.
6608 (i386_dr_region_ok_for_watchpoint): Likewise.
6609 (i386_dr_stopped_data_address): Likewise.
6610 (i386_dr_stopped_by_watchpoint): Likewise.
6612 2014-06-19 Gary Benson <gbenson@redhat.com>
6614 * i386-low.c (i386_dr_show): Renamed to
6615 i386_show_dr and made static. All uses updated.
6616 (i386_dr_length_and_rw_bits): Renamed to
6617 i386_length_and_rw_bits and made static.
6619 (i386_dr_insert_aligned_watchpoint): Renamed to
6620 i386_insert_aligned_watchpoint and made static.
6622 (i386_dr_remove_aligned_watchpoint): Renamed to
6623 i386_remove_aligned_watchpoint and made static.
6625 (i386_dr_update_inferior_debug_regs): Renamed to
6626 i386_update_inferior_debug_regs and made static.
6629 2014-06-18 Gary Benson <gbenson@redhat.com>
6631 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6632 (i386_dr_low_can_set_control): Likewise.
6633 (i386_get_debug_register_length): Likewise.
6634 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6635 (i386_dr_low_can_set_control): Likewise.
6636 (i386_get_debug_register_length): Likewise.
6638 2014-06-17 Gary Benson <gbenson@redhat.com>
6640 * i386-low.h (i386-dregs.h): New include.
6641 (DR_FIRSTADDR): Now in i386-dregs.h.
6642 (DR_LASTADDR): Likewise.
6643 (DR_NADDR): Likewise.
6644 (DR_STATUS): Likewise.
6645 (DR_CONTROL): Likewise.
6646 (i386_debug_reg_state): Likewise.
6647 (i386_dr_insert_watchpoint): Likewise.
6648 (i386_dr_remove_watchpoint): Likewise.
6649 (i386_dr_region_ok_for_watchpoint): Likewise.
6650 (i386_dr_stopped_data_address): Likewise.
6651 (i386_dr_stopped_by_watchpoint): Likewise.
6652 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6654 2014-06-18 Gary Benson <gbenson@redhat.com>
6656 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6657 i386_dr_insert_watchpoint.
6658 (i386_low_remove_watchpoint): Renamed to
6659 i386_dr_remove_watchpoint.
6660 (i386_low_region_ok_for_watchpoint): Renamed to
6661 i386_dr_region_ok_for_watchpoint.
6662 (i386_low_stopped_data_address): Renamed to
6663 i386_dr_stopped_data_address.
6664 (i386_low_stopped_by_watchpoint): Renamed to
6665 i386_dr_stopped_by_watchpoint.
6666 * i386-low.c (i386_show_dr): Renamed to
6667 i386_dr_show and made nonstatic. All uses updated.
6668 (i386_length_and_rw_bits): Renamed to
6669 i386_dr_length_and_rw_bits and made nonstatic.
6671 (i386_insert_aligned_watchpoint): Renamed to
6672 i386_dr_insert_aligned_watchpoint and made nonstatic.
6674 (i386_remove_aligned_watchpoint): Renamed to
6675 i386_dr_remove_aligned_watchpoint and made nonstatic.
6677 (i386_update_inferior_debug_regs): Renamed to
6678 i386_dr_update_inferior_debug_regs and made nonstatic.
6680 (i386_low_insert_watchpoint): Renamed to
6681 i386_dr_insert_watchpoint. All uses updated.
6682 (i386_low_remove_watchpoint): Renamed to
6683 i386_dr_remove_watchpoint. All uses updated.
6684 (i386_low_region_ok_for_watchpoint): Renamed to
6685 i386_dr_region_ok_for_watchpoint. All uses updated.
6686 (i386_low_stopped_data_address): Renamed to
6687 i386_dr_stopped_data_address. All uses updated.
6688 (i386_low_stopped_by_watchpoint): Renamed to
6689 i386_dr_stopped_by_watchpoint. All uses updated.
6691 2014-06-18 Gary Benson <gbenson@redhat.com>
6693 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6694 (i386_dr_low_can_set_control): Likewise.
6695 (i386_insert_aligned_watchpoint): New check.
6697 2014-06-18 Gary Benson <gbenson@redhat.com>
6699 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6702 2014-06-18 Gary Benson <gbenson@redhat.com>
6704 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6705 instead of fatal and error.
6706 (i386_handle_nonaligned_watchpoint): Likewise.
6708 2014-06-18 Gary Benson <gbenson@redhat.com>
6710 * i386-low.c (i386_get_debug_register_length): New macro.
6711 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6712 (i386_show_dr): Use debug_printf instead of fprintf. Use
6713 phex to format values.
6715 2014-06-18 Gary Benson <gbenson@redhat.com>
6717 * i386-low.h: Comment changes.
6718 * i386-low.c: Likewise.
6720 2014-06-18 Gary Benson <gbenson@redhat.com>
6722 * i386-low.c: Whitespace changes.
6724 2014-06-12 Tom Tromey <tromey@redhat.com>
6726 * utils.c (freeargv): Remove.
6728 2014-06-12 Tom Tromey <tromey@redhat.com>
6730 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6731 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6732 (parse_debug_format_options): Likewise.
6733 (gdbserver_usage): Likewise.
6734 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6735 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6736 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6738 ($(LIBGNU)): Depend on libiberty.
6739 (all-lib): Recurse into all subdirs.
6740 (install-only): Invoke "install" target in subdirs.
6741 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6743 * configure: Rebuild.
6744 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6745 for vasprintf, vsnprintf, or gettimeofday.
6746 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6749 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6751 * development.sh: Delete.
6752 * Makefile.in (config.status): Adjust dependency on development.sh.
6753 * configure.ac: Adjust development.sh source call.
6754 * configure: Regenerate.
6756 2014-06-02 Pedro Alves <palves@redhat.com>
6758 * ax.c (gdb_free_agent_expr): New function.
6759 * ax.h (gdb_free_agent_expr): New declaration.
6760 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6762 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6764 (clear_breakpoint_conditions_and_commands): New function.
6765 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6766 (clear_breakpoint_conditions_and_commands): New declaration.
6768 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6770 * linux-aarch64-low.c (asm/ptrace.h): Include.
6772 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6774 Fix TLS access for -static -pthread.
6775 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6776 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6777 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6779 2014-05-20 Pedro Alves <palves@redhat.com>
6781 * linux-aarch64-low.c (aarch64_insert_point)
6782 (aarch64_remove_point): No longer check whether the type is
6783 supported here. Adjust to new interface.
6784 (the_low_target): Install aarch64_supports_z_point_type as
6785 supports_z_point_type method.
6786 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6787 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6788 instead of a Z packet char. Adjust.
6789 (arm_supports_z_point_type): New function.
6790 (arm_insert_point, arm_remove_point): Adjust to new interface.
6791 (the_low_target): Install arm_supports_z_point_type.
6792 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6793 (cris_insert_point, cris_remove_point): Adjust to new interface.
6794 Don't check whether the type is supported here.
6795 (the_low_target): Install cris_supports_z_point_type.
6796 * linux-low.c (linux_supports_z_point_type): New function.
6797 (linux_insert_point, linux_remove_point): Adjust to new interface.
6798 * linux-low.h (struct linux_target_ops) <insert_point,
6799 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6800 raw_breakpoint pointer parameter.
6801 <supports_z_point_type>: New method.
6802 * linux-mips-low.c (mips_supports_z_point_type): New function.
6803 (mips_insert_point, mips_remove_point): Adjust to new interface.
6804 Use mips_supports_z_point_type.
6805 (the_low_target): Install mips_supports_z_point_type.
6806 * linux-ppc-low.c (the_low_target): Install NULL as
6807 supports_z_point_type method.
6808 * linux-s390-low.c (the_low_target): Install NULL as
6809 supports_z_point_type method.
6810 * linux-sparc-low.c (the_low_target): Install NULL as
6811 supports_z_point_type method.
6812 * linux-x86-low.c (x86_supports_z_point_type): New function.
6813 (x86_insert_point): Adjust to new insert_point interface. Use
6814 insert_memory_breakpoint. Adjust to new
6815 i386_low_insert_watchpoint interface.
6816 (x86_remove_point): Adjust to remove_point interface. Use
6817 remove_memory_breakpoint. Adjust to new
6818 i386_low_remove_watchpoint interface.
6819 (the_low_target): Install x86_supports_z_point_type.
6820 * lynx-low.c (lynx_target_ops): Install NULL as
6821 supports_z_point_type callback.
6822 * nto-low.c (nto_supports_z_point_type): New.
6823 (nto_insert_point, nto_remove_point): Adjust to new interface.
6824 (nto_target_ops): Install nto_supports_z_point_type.
6825 * mem-break.c: Adjust intro comment.
6826 (struct raw_breakpoint) <raw_type, size>: New fields.
6827 <inserted>: Update comment.
6828 <shlib_disabled>: Delete field.
6829 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6830 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6831 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6832 (raw_bkpt_type_to_target_hw_bp_type): New function.
6833 (find_enabled_raw_code_breakpoint_at): New function.
6834 (find_raw_breakpoint_at): New type and size parameters. Use them.
6835 (insert_memory_breakpoint): New function, based off
6836 set_raw_breakpoint_at.
6837 (remove_memory_breakpoint): New function.
6838 (set_raw_breakpoint_at): Reimplement.
6839 (set_breakpoint): New, based on set_breakpoint_at.
6840 (set_breakpoint_at): Reimplement.
6841 (delete_raw_breakpoint): Go through the_target->remove_point
6842 instead of assuming memory breakpoints.
6843 (find_gdb_breakpoint_at): Delete.
6844 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6845 (find_gdb_breakpoint): New function.
6846 (set_gdb_breakpoint_at): Delete.
6847 (z_type_supported): New function.
6848 (set_gdb_breakpoint_1): New function, loosely based off
6849 set_gdb_breakpoint_at.
6850 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6851 (delete_gdb_breakpoint_at): Delete.
6852 (delete_gdb_breakpoint_1): New function, loosely based off
6853 delete_gdb_breakpoint_at.
6854 (delete_gdb_breakpoint): New function.
6855 (clear_gdb_breakpoint_conditions): Rename to ...
6856 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6858 (add_condition_to_breakpoint): Make static.
6859 (add_breakpoint_condition): Take a struct breakpoint pointer
6860 instead of an address. Adjust.
6861 (gdb_condition_true_at_breakpoint): Rename to ...
6862 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6864 (gdb_condition_true_at_breakpoint): Reimplement.
6865 (add_breakpoint_commands): Take a struct breakpoint pointer
6866 instead of an address. Adjust.
6867 (gdb_no_commands_at_breakpoint): Rename to ...
6868 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6869 parameter. Return true if no breakpoint was found. Change debug
6871 (gdb_no_commands_at_breakpoint): Reimplement.
6872 (run_breakpoint_commands): Rename to ...
6873 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6874 and change return type to boolean.
6875 (run_breakpoint_commands): New function.
6876 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6877 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6878 breakpoint. Go through the_target->remove_point instead of
6879 assuming memory breakpoint.
6880 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6881 software and hardware breakpoints.
6882 (reinsert_raw_breakpoint): Go through the_target->insert_point
6883 instead of assuming memory breakpoint.
6884 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6885 software and hardware breakpoints.
6886 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6887 Check both software and hardware breakpoints.
6888 (validate_inserted_breakpoint): Assert the breakpoint is a
6889 software breakpoint. Set the inserted flag to -1 instead of
6890 setting shlib_disabled.
6891 (delete_disabled_breakpoints): Adjust.
6892 (validate_breakpoints): Only validate software breakpoints.
6893 Adjust to inserted flag change.
6894 (check_mem_read, check_mem_write): Skip breakpoint types other
6895 than software breakpoints. Adjust to inserted flag change.
6896 * mem-break.h (enum raw_bkpt_type): New enum.
6897 (raw_breakpoint, struct process_info): Forward declare.
6898 (Z_packet_to_target_hw_bp_type): Delete declaration.
6899 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6900 (set_gdb_breakpoint, delete_gdb_breakpoint)
6901 (clear_breakpoint_conditions): New declarations.
6902 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6903 (breakpoint_inserted_here): Update comment.
6904 (add_breakpoint_condition, add_breakpoint_commands): Replace
6905 address parameter with a breakpoint pointer parameter.
6906 (gdb_breakpoint_here): Update comment.
6907 (delete_gdb_breakpoint_at): Delete.
6908 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6909 * server.c (process_point_options): Take a struct breakpoint
6910 pointer instead of an address. Adjust.
6911 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6912 delete_gdb_breakpoint.
6913 * spu-low.c (spu_target_ops): Install NULL as
6914 supports_z_point_type method.
6915 * target.h: Include mem-break.h.
6916 (struct target_ops) <prepare_to_access_memory>: Update comment.
6917 <supports_z_point_type>: New field.
6918 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6919 instead of a char. Also take a raw breakpoint pointer.
6920 * win32-arm-low.c (the_low_target): Install NULL as
6921 supports_z_point_type.
6922 * win32-i386-low.c (i386_supports_z_point_type): New function.
6923 (i386_insert_point, i386_remove_point): Adjust to new interface.
6924 (the_low_target): Install i386_supports_z_point_type.
6925 * win32-low.c (win32_supports_z_point_type): New function.
6926 (win32_insert_point, win32_remove_point): Adjust to new interface.
6927 (win32_target_ops): Install win32_supports_z_point_type.
6928 * win32-low.h (struct win32_target_ops):
6929 <supports_z_point_type>: New method.
6930 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6931 instead of a char. Also take a raw breakpoint pointer.
6933 2014-05-20 Pedro Alves <palves@redhat.com>
6935 * mem-break.h: Include break-common.h.
6936 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6937 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6938 (Z_packet_to_target_hw_bp_type): New declaration.
6939 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6940 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6941 (Z_PACKET_ACCESS_WP): Delete macros.
6942 (Z_packet_to_hw_type): Delete function.
6943 * i386-low.h: Don't include break-common.h here.
6944 (Z_packet_to_hw_type): Delete declaration.
6945 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6946 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6947 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6948 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6949 * linux-aarch64-low.c: Don't include break-common.h here.
6950 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6951 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6952 (Z_packet_to_target_hw_bp_type): Delete function.
6953 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6955 (mips_insert_point, mips_remove_point): Use
6956 Z_packet_to_target_hw_bp_type.
6958 2014-05-20 Pedro Alves <palves@redhat.com>
6960 * linux-aarch64-low.c: Include break-common.h.
6961 (enum target_point_type): Delete.
6962 (Z_packet_to_point_type): Rename to ...
6963 (Z_packet_to_target_hw_bp_type): ... this, and return a
6964 target_hw_bp_type instead.
6965 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6966 instead of an enum target_point_type.
6967 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6969 (aarch64_dr_state_insert_one_point)
6970 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6971 (aarch64_handle_aligned_watchpoint)
6972 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6973 Take an enum target_hw_bp_type instead of an enum
6975 (aarch64_supports_z_point_type): New function.
6976 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6977 use Z_packet_to_target_hw_bp_type.
6979 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6981 * configure.ac: Only use -Werror by default when DEVELOPMENT
6983 * configure: Regenerate.
6985 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6987 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6988 * linux-x86-low.c (X86_64_USER_REGS): New.
6989 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6991 2014-04-28 Yao Qi <yao@codesourcery.com>
6993 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6996 2014-04-25 Pedro Alves <palves@redhat.com>
6999 * linux-low.c (linux_attach_fail_reason_string): New function.
7000 (linux_attach_lwp): Delete.
7001 (linux_attach_lwp_1): Rename to ...
7002 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7003 argument. Remove "initial" parameter. Return int instead of
7004 void. Don't error or warn here.
7005 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7006 failure to attach to the tgid. Call warning when failing to
7008 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7009 argument. Remove "initial" parameter. Return int instead of
7010 void. Don't error or warn here.
7011 (linux_attach_fail_reason_string): New declaration.
7012 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7013 interface change. Use linux_attach_fail_reason_string.
7015 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7016 Walfred Tedeschi <walfred.tedeschi@intel.com>
7018 * Makefile.in: Added rules to handle new files
7019 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7020 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7021 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7022 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7023 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7024 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7026 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7027 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7028 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7029 i386/x32-avx512.xml.
7030 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7031 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7032 i386/x32-avx512-linux.xml.
7033 * i387-fp.c (num_avx512_k_registers): New constant for number
7035 (num_avx512_zmmh_low_registers): New constant for number of
7036 lower ZMM registers (0-15).
7037 (num_avx512_zmmh_high_registers): New constant for number of
7038 higher ZMM registers (16-31).
7039 (num_avx512_ymmh_registers): New contant for number of higher
7040 YMM registers (ymm16-31 added by avx521 on x86_64).
7041 (num_avx512_xmm_registers): New constant for number of higher
7042 XMM registers (xmm16-31 added by AVX512 on x86_64).
7043 (struct i387_xsave): Add space for AVX512 registers.
7044 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7045 Add code to handle AVX512 registers.
7046 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7047 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7048 prototypei from generated file.
7049 (tdesc_amd64_avx512_linux): Likewise.
7050 (init_registers_x32_avx512_linux): Likewise.
7051 (tdesc_x32_avx512_linux): Likewise.
7052 (init_registers_i386_avx512_linux): Likewise.
7053 (tdesc_i386_avx512_linux): Likewise.
7054 (x86_64_regmap): Add AVX512 registers.
7055 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7057 (initialize_low_arch): Add code to initialize AVX512 registers.
7059 2014-04-23 Pedro Alves <palves@redhat.com>
7061 * mem-break.c (find_gdb_breakpoint_at): Make static.
7062 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7064 2014-04-23 Pedro Alves <palves@redhat.com>
7066 * i386-low.c: Don't include break-common.h here.
7067 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7068 prototype to take target_hw_bp_type as argument instead of a Z
7070 * i386-low.h: Include break-common.h here.
7071 (Z_packet_to_hw_type): Declare.
7072 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7074 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7075 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7076 (x86_remove_point): Convert the packet number to a
7077 target_hw_bp_type before calling i386_low_remove_watchpoint.
7078 * win32-i386-low.c (i386_insert_point): Convert the packet number
7079 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7080 (i386_remove_point): Convert the packet number to a
7081 target_hw_bp_type before calling i386_low_remove_watchpoint.
7083 2014-04-23 Pedro Alves <palves@redhat.com>
7085 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7087 2014-04-10 Pedro Alves <palves@redhat.com>
7089 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7090 Check if the condition or command is NULL before checking if the
7091 breakpoint is known. On success, return true.
7092 * mem-break.h (add_breakpoint_condition): Document return.
7093 (add_breakpoint_commands): Add describing comment.
7094 * server.c (skip_to_semicolon): New function.
7095 (process_point_options): Use it.
7097 2014-04-09 Pedro Alves <palves@redhat.com>
7099 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7102 2014-02-27 Pedro Alves <palves@redhat.com>
7105 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7107 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7109 (last_thread_of_process_p): Take a PID argument instead of a
7111 (linux_wait_for_lwp): Delete.
7112 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7114 (linux_low_filter_event): New function, party factored out from
7115 linux_wait_for_event.
7116 (linux_wait_for_event): Rename to ...
7117 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7118 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7119 sigsuspend. Check for zombie leaders.
7120 (linux_wait_for_event): Reimplement as wrapper around
7121 linux_wait_for_event_filtered.
7122 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7123 a normal or signal exit is seen, it's the whole process exiting.
7124 (wait_for_sigstop): No longer a for_each_inferior callback.
7125 Rewrite on top of linux_wait_for_event_filtered.
7126 (stop_all_lwps): Call wait_for_sigstop directly.
7127 * server.c (resume, handle_target_event): Handle
7128 TARGET_WAITKIND_NO_RESUMED.
7130 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7132 * win32-low.c (psapi_get_dll_name,
7133 * win32_CreateToolhelp32Snapshot): Delete.
7134 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7135 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7137 (handle_load_dll): Add function description.
7138 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7140 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7142 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7144 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7145 base address when calling win32_add_one_solib.
7146 (handle_load_dll): Delete local variable load_addr.
7147 Remove 0x1000 offset applied to DLL base address when calling
7148 win32_add_one_solib.
7149 (handle_unload_dll): Add comment.
7151 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7153 * win32-low.c (win32_add_all_dlls): Renames
7154 win32_ensure_ntdll_loaded. Rewrite function documentation.
7155 Adjust implementation to always load all DLLs.
7156 Add 0x1000 offset to DLL base address when calling
7157 win32_add_one_solib.
7158 (child_initialization_done): New static global.
7159 (do_initial_child_stuff): Set child_initialization_done to
7160 zero during child initialization, and 1 after. Replace call
7161 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7163 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7164 (handle_unload_dll): Add function documentation.
7165 (get_child_debug_event): Ignore load and unload DLL events
7166 during child initialization.
7168 2014-02-20 Doug Evans <dje@google.com>
7170 Remove global all_lwps.
7171 * inferiors.h (ptid_of): Move here from linux-low.h.
7172 (pid_of, lwpid_of): Ditto.
7173 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7174 parameter is a struct thread_info * now.
7175 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7176 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7177 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7179 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7180 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7181 * linux-arm-low.c (update_registers_callback): Update, "entry"
7182 parameter is a struct thread_info * now.
7183 Fetch lwpid from current_inferior directly.
7184 (arm_insert_point): Pass &all_threads to find_inferior instead of
7186 (arm_remove_point): Ditto.
7187 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7188 (arm_prepare_to_resume): Fetch pid from thread.
7189 (arm_read_description): Fetch lwpid from current_inferior directly.
7190 * linux-low.c (all_lwps): Delete.
7191 (delete_lwp): Delete call to remove_inferior.
7192 (handle_extended_wait): Fetch lwpid from thread.
7193 (add_lwp): Don't set lwp->entry.id. Remove call to
7194 add_inferior_to_list.
7195 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7196 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7197 (kill_one_lwp_callback): Ditto.
7198 (linux_kill): Don't dereference NULL pointer.
7199 Fetch ptid,lwpid from thread.
7200 (get_detach_signal): Fetch ptid from thread.
7201 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7202 Simplify call to regcache_invalidate_thread.
7203 (delete_lwp_callback): Update, "entry" parameter is a
7204 struct thread_info * now. Fetch pid from thread.
7205 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7206 (status_pending_p_callback): Update, "entry" parameter is a
7207 struct thread_info * now. Fetch ptid from thread.
7208 (find_lwp_pid): Update, "entry" parameter is a
7209 struct thread_info * now.
7210 (linux_wait_for_lwp): Fetch pid from thread.
7211 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7212 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7213 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7214 (dequeue_one_deferred_signal): Ditto.
7215 (cancel_breakpoint): Fetch ptid from current_inferior.
7216 (linux_wait_for_event): Pass &all_threads to find_inferior,
7217 not &all_lwps. Fetch ptid, lwpid from thread.
7218 (count_events_callback): Update, "entry" parameter is a
7219 struct thread_info * now.
7220 (select_singlestep_lwp_callback): Ditto.
7221 (select_event_lwp_callback): Ditto.
7222 (cancel_breakpoints_callback): Ditto.
7223 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7225 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7226 (unsuspend_one_lwp): Update, "entry" parameter is a
7227 struct thread_info * now.
7228 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7230 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7231 Fetch lwpid from thread, not lwp.
7232 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7233 Pass &all_threads to find_inferior, not &all_lwps.
7234 (send_sigstop): Fetch lwpid from thread, not lwp.
7235 (send_sigstop_callback): Update, "entry" parameter is a
7236 struct thread_info * now.
7237 (suspend_and_send_sigstop_callback): Ditto.
7238 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7239 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7240 struct thread_info * now.
7241 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7243 (lwp_running): Update, "entry" parameter is a
7244 struct thread_info * now.
7245 (stop_all_lwps): Fetch ptid from thread.
7246 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7247 (linux_resume_one_lwp): Fetch lwpid from thread.
7248 (linux_set_resume_request): Update, "entry" parameter is a
7249 struct thread_info * now. Fetch pid, lwpid from thread.
7250 (resume_status_pending_p): Update, "entry" parameter is a
7251 struct thread_info * now.
7252 (need_step_over_p): Ditto. Fetch lwpid from thread.
7253 (start_step_over): Fetch lwpid from thread.
7254 (linux_resume_one_thread): Update, "entry" parameter is a
7255 struct thread_info * now. Fetch lwpid from thread.
7256 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7257 (proceed_one_lwp): Update, "entry" parameter is a
7258 struct thread_info * now. Fetch lwpid from thread.
7259 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7260 struct thread_info * now.
7261 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7262 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7263 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7265 (regsets_store_inferior_registers): Ditto.
7266 (fetch_register, store_register): Ditto.
7267 (linux_read_memory, linux_write_memory): Ditto.
7268 (linux_request_interrupt): Ditto.
7269 (linux_read_auxv): Ditto.
7270 (linux_xfer_siginfo): Ditto.
7271 (linux_qxfer_spu): Ditto.
7272 (linux_qxfer_libraries_svr4): Ditto.
7273 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7274 moved to inferiors.h.
7276 (get_thread_lwp): Update.
7277 (struct lwp_info): Delete member "entry". Simplify comment for
7280 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7281 current_inferior directly.
7282 (update_watch_registers_callback): Update, "entry" parameter is a
7283 struct thread_info * now. Fetch pid from thread.
7284 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7285 (mips_insert_point): Fetch lwpid from current_inferior.
7286 Pass &all_threads to find_inferior, not &all_lwps.
7287 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7288 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7290 (mips_stopped_data_address): Ditto.
7291 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7293 * linux-tile-low.c (tile_arch_setup): Ditto.
7294 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7295 (update_debug_registers_callback): Update, "entry" parameter is a
7296 struct thread_info * now. Fetch pid from thread.
7297 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7298 Pass &all_threads to find_inferior, not &all_lwps.
7299 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7300 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7301 Pass &all_threads to find_inferior, not &all_lwps.
7302 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7303 (i386_dr_low_get_status): Ditto.
7304 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7305 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7306 (x86_linux_read_description): Ditto.
7307 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7309 2014-02-20 Doug Evans <dje@google.com>
7311 * inferiors.c (get_first_inferior): Fix buglet.
7313 2014-02-19 Doug Evans <dje@google.com>
7315 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7316 * inferiors.c (add_thread): Change result type to struct thread_info *.
7317 All callers updated.
7318 (add_lwp): Call add_thread here instead of in callers.
7319 All callers updated.
7320 * linux-low.h (get_lwp_thread): Rewrite.
7321 (struct lwp_info): New member "thread".
7323 2014-02-19 Doug Evans <dje@google.com>
7325 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7326 All callers updated.
7328 2014-02-19 Doug Evans <dje@google.com>
7330 * inferiors.c (add_thread): Fix whitespace.
7332 2014-02-19 Doug Evans <dje@google.com>
7334 * dll.c (clear_dlls): Replace accessing list implemention details
7336 * gdbthread.h (get_first_thread): Declare.
7337 * inferiors.c (for_each_inferior_with_data): New function.
7338 (get_first_thread): New function.
7339 (find_thread_ptid): Simplify.
7340 (get_first_inferior): New function.
7341 (clear_list): Delete.
7342 (one_inferior_p): New function.
7343 (clear_inferior_list): New function.
7344 (clear_inferiors): Update.
7345 * inferiors.h (for_each_inferior_with_data): Declare.
7346 (clear_inferior_list): Declare.
7347 (one_inferior_p): Declare.
7348 (get_first_inferior): Declare.
7349 * linux-low.c (linux_wait_for_event): Replace accessing list
7350 implemention details with API function.
7351 * server.c (target_running): Ditto.
7352 (accumulate_file_name_length): New function.
7353 (emit_dll_description): New function.
7354 (handle_qxfer_libraries): Replace accessing list implemention
7355 details with API function.
7356 (handle_qxfer_threads_worker): New function.
7357 (handle_qxfer_threads_proper): Replace accessing list implemention
7358 details with API function.
7359 (handle_query): Ditto.
7360 (visit_actioned_threads_callback_ftype): New typedef.
7361 (visit_actioned_threads_data): New struct.
7362 (visit_actioned_threads): Rewrite to be find_inferior callback.
7363 (resume): Call find_inferior.
7364 (handle_status): Replace accessing list implemention
7365 details with API function.
7366 (process_serial_event): Replace accessing list implemention details
7368 * target.c (set_desired_inferior): Replace accessing list implemention
7369 details with API function.
7370 * tracepoint.c (same_process_p): New function.
7371 (gdb_agent_about_to_close): Replace accessing list implemention
7372 details with API function.
7373 * win32-low.c (child_delete_thread): Replace accessing list
7374 implemention details with API function.
7375 (match_dll_by_basename): New function.
7376 (dll_is_loaded_by_basename): New function.
7377 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7378 details call to dll_is_loaded_by_basename.
7380 2014-02-19 Doug Evans <dje@google.com>
7382 * dll.h (struct dll_info): Add comment.
7383 * gdbthread.h (struct thread_info): Add comment.
7384 (current_ptid): Simplify.
7385 * inferiors.c (add_process): Update.
7386 (remove_process): Update.
7387 * inferiors.h (struct process_info): Rename member "head" to "entry".
7388 * linux-low.c (delete_lwp): Update.
7390 (last_thread_of_process_p): Update.
7391 (kill_one_lwp_callback, linux_kill): Update.
7392 (status_pending_p_callback): Update.
7393 (wait_for_sigstop): Update. Simplify read of ptid.
7394 (start_step_over): Update.
7395 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7396 (get_lwp_thread): Update.
7397 (struct lwp_info): Rename member "head" to "entry".
7398 * regcache.h (inferior_list_entry): Delete.
7399 * server.c (kill_inferior_callback): Update.
7400 (detach_or_kill_inferior_callback): Update.
7401 (print_started_pid): Update.
7402 (print_attached_pid): Update.
7403 (process_serial_event): Simplify read of ptid.
7404 * thread-db.c (thread_db_create_event): Update.
7405 (thread_db_get_tls_address): Update.
7406 * win32-low.c (current_inferior_ptid): Simplify.
7408 2014-02-19 Tom Tromey <tromey@redhat.com>
7410 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7412 (target_supports_btrace): Update.
7414 2014-02-14 Yao Qi <yao@codesourcery.com>
7416 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7417 (rsp-low-ipa.o): New target.
7419 2014-02-12 Tom Tromey <tromey@redhat.com>
7421 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7422 convert_ascii_to_int.
7423 * regcache.c (registers_to_string): Likewise.
7424 * remote-utils.c (decode_M_packet): Likewise.
7425 * server.c (process_serial_event): Likewise.
7427 2014-02-12 Tom Tromey <tromey@redhat.com>
7429 * server.c (handle_query, handle_v_run): Use hex2bin, not
7431 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7433 2014-02-12 Tom Tromey <tromey@redhat.com>
7435 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7436 convert_int_to_ascii.
7437 * regcache.c (registers_to_string, collect_register_as_string):
7439 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7441 * server.c (process_serial_event): Likewise.
7442 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7443 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7445 2014-02-12 Tom Tromey <tromey@redhat.com>
7447 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7448 bin2hex, not hexify.
7449 * tracepoint.c (cmd_qtstatus): Likewise.
7451 2014-02-12 Tom Tromey <tromey@redhat.com>
7453 * remote-utils.c (monitor_output): Pass explicit length to
7456 2014-02-12 Tom Tromey <tromey@redhat.com>
7458 * tracepoint.c: Include rsp-low.h.
7459 * server.c: Include rsp-low.h.
7460 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7461 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7463 * remote-utils.c: Include rsp-low.h.
7464 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7465 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7466 (convert_int_to_ascii, convert_ascii_to_int): Move to
7468 * regcache.c: Include rsp-low.h.
7469 * ax.c: Include rsp-low.h.
7470 * Makefile.in (SFILES): Add common/rsp-low.c.
7471 (OBS): Add rsp-low.o.
7472 (rsp-low.o): New target.
7474 2014-02-12 Tom Tromey <tromey@redhat.com>
7476 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7477 Include print-utils.h.
7478 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7479 (plongest, thirty_two, phex_nz): Remove.
7480 * Makefile.in (SFILES): Add common/print-utils.c.
7481 (OBS): Add print-utils.o.
7482 (print-utils-ipa.o): New target.
7483 (print-utils.o): New target.
7484 (IPA_OBJS): Add print-utils-ipa.o.
7486 2014-02-06 Tom Tromey <tromey@redhat.com>
7488 * Makefile.in (SFILES): Fix indentation.
7490 2014-02-05 Doug Evans <dje@google.com>
7492 * linux-low.c (linux_wait_for_event): Improve comment.
7493 (linux_wait_1): Keep current_inferior in sync with event_child.
7495 2014-01-22 Doug Evans <dje@google.com>
7497 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7499 2014-01-22 Doug Evans <dje@google.com>
7501 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7502 * configure: Regenerate.
7503 * config.in: Regenerate.
7504 * Makefile.in (SFILES): Add debug.c.
7506 * debug.c: New file.
7507 * debug.h: New file.
7508 * linux-aarch64-low.c (*): Update all debugging printfs to use
7509 debug_printf instead of fprintf.
7510 * linux-arm-low.c (*): Ditto.
7511 * linux-cris-low.c (*): Ditto.
7512 * linux-crisv32-low.c (*): Ditto.
7513 * linux-m32r-low.c (*): Ditto.
7514 * linux-sparc-low.c (*): Ditto.
7515 * linux-x86.c (*): Ditto.
7516 * linux-low.c (*): Ditto.
7517 (linux_wait_1): Add calls to debug_enter, debug_exit.
7518 (linux_wait): Remove redundant debugging printf.
7519 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7520 (linux_resume, unstop_all_lwps): Ditto.
7521 * mem-break.c (*): Update all debugging printfs to use
7522 debug_printf instead of fprintf.
7523 * remote-utils.c (*): Ditto.
7524 * thread-db.c (*): Ditto.
7525 * server.c #include <ctype.h>, "gdb_vecs.h".
7526 (debug_threads): Moved to debug.c.
7527 (*): Update all debugging printfs to use debug_printf instead of
7529 (start_inferior): Replace call to fflush with call to debug_flush.
7530 (monitor_show_help): Mention set debug-format.
7531 (parse_debug_format_options): New function.
7532 (handle_monitor_command): Handle "monitor set debug-format".
7533 (gdbserver_usage): Mention --debug-format.
7534 (main): Parse --debug-format.
7535 * server.h (debug_threads): Declaration moved to debug.h.
7537 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7538 trace_debug_1 that uses debug_printf.
7539 (tracepoint_look_up_symbols): Update all debugging printfs to use
7540 debug_printf instead of fprintf.
7542 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7544 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7547 2014-01-17 Pedro Alves <palves@redhat.com>
7550 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7551 defined after including gdb_proc_service.h.
7553 2014-01-16 Doug Evans <dje@google.com>
7555 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7556 (match_dll): Use it.
7558 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7560 * target.h (target_ops) <read_btrace>: Change parameters and
7561 return type to allow error reporting.
7562 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7563 trace reading errors on.
7564 * linux-low.c (linux_low_read_btrace): Pass trace reading
7566 (linux_low_disable_btrace): New.
7568 2014-01-15 Doug Evans <dje@google.com>
7570 * inferiors.c (thread_id_to_gdb_id): Delete.
7571 * inferiors.h (thread_id_to_gdb_id): Delete.
7573 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7575 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7576 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7579 2014-01-08 Pedro Alves <palves@redhat.com>
7581 * server.c (handle_status): Don't discard previous queued stop
7582 replies or thread's pending status here.
7583 (main) <disconnection>: Do it here instead.
7585 2014-01-08 Pedro Alves <palves@redhat.com>
7587 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7588 * server.c (visit_actioned_threads, handle_pending_status): New
7590 (handle_v_cont): Factor out parts to ...
7591 (resume): ... this new function. If in all-stop, and a thread
7592 being resumed has a pending status, report it without actually
7594 (myresume): Adjust to use the new 'resume' function.
7595 (clear_pending_status_callback, set_pending_status_callback)
7596 (find_status_pending_thread_callback): New functions.
7597 (handle_status): Handle the case of multiple threads having
7598 interesting statuses to report. Report threads' real last signal
7599 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7600 with an interesting thread to report the status for, instead of
7601 always reporting the status of the first thread.
7603 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7605 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7606 * gdbreplay.c (gdbreplay_version): Likewise.
7608 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7610 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7611 iov.iov_len with the real length in use.
7613 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7615 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7616 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7617 for all targets that use win32-low.c.
7618 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7619 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7621 2013-12-13 Pedro Alves <palves@redhat.com>
7623 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7624 if equal to TARGET_WAITKIND_LOADED.
7625 * win32-low.c (cached_status): New static global.
7626 (win32_wait): Add declaration.
7627 (do_initial_child_stuff): Flush all initial pending debug events
7628 up to the initial breakpoint.
7629 (win32_wait): If CACHED_STATUS was set, return that instead
7630 of doing a real wait. Remove the code resuming the execution
7631 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7632 during the initial phase. Also remove the code changing
7633 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7634 TARGET_WAITKIND_STOPPED.
7636 2013-12-11 Yao Qi <yao@codesourcery.com>
7638 * notif.c (handle_notif_ack): Return 0 if no notification
7641 2013-11-20 Doug Evans <dje@google.com>
7643 * linux-low.c (linux_set_resume_request): Fix comment.
7645 2013-11-20 Doug Evans <dje@google.com>
7647 * linux-low.c (resume_status_pending_p): Tweak comment.
7649 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7651 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7652 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7653 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7654 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7655 (srv_amd64_regobj): Add amd64-mpx.o.
7656 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7657 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7658 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7659 * i387-fp.c (num_pl_bnd_register) Added constant.
7660 (num_pl_bnd_cfg_registers) Added constant.
7661 (struct i387_xsave) Added reserved area and MPX fields.
7662 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7663 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7665 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7666 (init_registers_amd64_mpx_linux): Declare new function.
7667 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7668 (x86_64_regmap): Add MPX registers.
7669 (x86_linux_read_description): Add MPX case.
7670 (initialize_low_arch): Initialize MPX targets.
7672 2013-11-18 Tom Tromey <tromey@redhat.com>
7674 * configure: Rebuild.
7675 * configure.ac: Don't check for stdlib.h.
7676 * gdbreplay.c: Unconditionally include stdlib.h.
7678 2013-11-18 Tom Tromey <tromey@redhat.com>
7680 * config.in: Rebuild.
7681 * configure: Rebuild.
7682 * configure.ac: Don't use AC_HEADER_DIRENT.
7684 2013-11-18 Tom Tromey <tromey@redhat.com>
7686 * server.h: Don't check HAVE_STRING_H.
7687 * gdbreplay.c: Don't check HAVE_STRING_H.
7688 * configure: Rebuild.
7690 2013-11-18 Tom Tromey <tromey@redhat.com>
7692 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7695 2013-11-08 Tom Tromey <tromey@redhat.com>
7697 * configure, config.in: Rebuild.
7698 * configure.ac: Remove unused configury.
7700 2013-11-08 Tom Tromey <tromey@redhat.com>
7702 * acinclude.m4: Include common.m4, codeset.m4.
7703 * configure, config.in: Rebuild.
7704 * configure.ac: Use GDB_AC_COMMON.
7706 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7708 * linux-s390-low.c (HWCAP_S390_TE): New define.
7709 (s390_arch_setup): Consider the TE field in the HWCAP for
7710 determining 'have_regset_tdb'.
7712 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7715 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7718 2013-10-02 Pedro Alves <palves@redhat.com>
7720 * server.c (process_serial_event): Don't output "GDBserver
7721 exiting" if GDB is connected through stdio.
7722 * target.c (mywait): Likewise, be silent if GDB is connected
7725 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7727 * lynx-low.c (lynx_add_threads_after_attach): New function.
7728 (lynx_attach): Remove call to add_thread. Add call to
7729 lynx_add_threads_after_attach instead.
7731 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7733 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7734 * config.in, configure: Regenerated.
7736 2013-09-18 Yao Qi <yao@codesourcery.com>
7739 * server.c (start_inferior): Clear 'resume_info'.
7741 2013-09-16 Jiong Wang <jiwang@tilera.com>
7743 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7746 2013-09-16 Jiong Wang <jiwang@tilera.com>
7748 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7749 linux-tile-low.o to srv_tgtobj.
7751 2013-09-16 Will Newton <will.newton@linaro.org>
7753 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7756 2013-09-06 Pedro Alves <palves@redhat.com>
7758 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7759 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7760 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7761 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7762 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7763 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7765 2013-09-06 Pedro Alves <palves@redhat.com>
7767 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7768 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7770 2013-09-06 Pedro Alves <palves@redhat.com>
7772 * linux-amd64-ipa.c: Include tracepoint.h.
7773 * linux-i386-ipa.c: Include tracepoint.h.
7775 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7777 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7778 (ps_get_thread_area): New function.
7780 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7782 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7783 (initialize_low_arch): Call init_registers_crisv32 rather than
7784 init_register_crisv32.
7786 2013-09-05 Pedro Alves <palves@redhat.com>
7788 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7790 * hostio.h: ... this new file.
7791 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7792 win32-low.c: Include hostio.h.
7794 2013-09-05 Pedro Alves <palves@redhat.com>
7796 * server.h (gdb_client_data, handler_func, callback_handler_func)
7797 (delete_file_handler, add_file_handler, append_callback_event)
7798 (delete_callback_event, start_event_loop, initialize_event_loop):
7799 Move to event-loop.h and include it.
7800 * event-loop.h: New file.
7802 2013-09-05 Pedro Alves <palves@redhat.com>
7804 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7805 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7806 (loaded_dll, unloaded_dll): Move to ...
7807 * dll.h: ... this new file.
7808 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7810 2013-09-05 Pedro Alves <palves@redhat.com>
7812 * server.h (current_process, get_thread_process, all_processes)
7813 (add_inferior_to_list, for_each_inferior, current_inferior)
7814 (remove_inferior, add_process, remove_process, find_process_pid)
7815 (have_started_inferiors_p, have_attached_inferiors_p)
7816 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7817 (clear_inferiors, find_inferior, find_inferior_id)
7818 (inferior_target_data, set_inferior_target_data)
7819 (inferior_regcache_data, set_inferior_regcache_data): Move to
7820 inferiors.h, and include it.
7821 * inferiors.h: New file.
7823 2013-09-05 Pedro Alves <palves@redhat.com>
7825 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7829 2013-09-05 Pedro Alves <palves@redhat.com>
7831 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7833 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7834 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7835 (handle_tracepoint_general_set, handle_tracepoint_query)
7836 (tracepoint_finished_step, tracepoint_was_hit)
7837 (release_while_stepping_state_list, current_traceframe)
7838 (in_readonly_region, traceframe_read_mem)
7839 (fetch_traceframe_registers, traceframe_read_sdata)
7840 (traceframe_read_info, struct fast_tpoint_collect_status)
7841 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7842 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7843 (supply_fast_tracepoint_registers)
7844 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7845 (ipa_tdesc, claim_trampoline_space)
7846 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7847 (agent_mem_read, agent_get_trace_state_variable_value)
7848 (agent_set_trace_state_variable_value, agent_tsv_read)
7849 (agent_mem_read_string, get_raw_reg_func_addr)
7850 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7851 * tracepoint.h: ... this new file.
7853 2013-09-05 Pedro Alves <palves@redhat.com>
7855 * server.h (perror_with_name, error, fatal, warning, paddress)
7856 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7858 * utils.h: New file.
7860 2013-09-05 Pedro Alves <palves@redhat.com>
7862 * server.h (remote_debug, noack_mode, transport_is_reliable)
7863 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7864 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7865 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7866 (write_enn, initialize_async_io, enable_async_io)
7867 (disable_async_io, check_remote_input_interrupt_request)
7868 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7869 (dead_thread_notify, prepare_resume_reply)
7870 (decode_address_to_semicolon, decode_address, decode_m_packet)
7871 (decode_M_packet, decode_X_packet, decode_xfer_write)
7872 (decode_search_memory_packet, unhexify, hexify)
7873 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7874 (look_up_one_symbol, relocate_instruction)
7875 (monitor_output): Move to remote-utils.h, and include it.
7876 * remote-utils.h: New file.
7878 2013-09-05 Pedro Alves <palves@redhat.com>
7880 * server.h (_): Delete.
7882 2013-09-02 Pedro Alves <palves@redhat.com>
7884 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7885 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7887 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7889 2013-09-02 Pierre Muller <muller@sourceware.org>
7891 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7892 or WriteProcessMemory complete successfully and handle
7893 ERROR_PARTIAL_COPY error.
7895 2013-09-02 Pedro Alves <palves@redhat.com>
7897 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7898 error instead of EIO.
7900 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7903 * linux-low.c: Include filestuff.h.
7904 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7905 * lynx-low.c: Include filestuff.h.
7906 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7907 * server.c: Include filestuff.h.
7908 (main): Call notice_open_fds.
7909 * spu-low.c: Include filestuff.h.
7910 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7912 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7914 * Makefile.in: Explain why ../target and ../nat are not
7915 listed as include file search paths.
7916 (linux-waitpid.o): New object file rule.
7917 * configure.srv (srv_native_linux_obj): New variable.
7918 Replace all occurrences of linux native object files with
7919 $srv_native_linux_obj.
7920 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7921 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7922 (linux_enable_event_reporting): Remove declaration.
7923 (my_waitpid): Moved to common/linux-waitpid.c.
7924 (linux_wait_for_event): Pass ptid when calling
7925 linux_enable_event_reporting.
7926 (linux_supports_tracefork_flag): Remove.
7927 (linux_enable_event_reporting): Likewise.
7928 (linux_tracefork_grandchild): Remove.
7929 (STACK_SIZE): Moved to common/linux-ptrace.c.
7930 (linux_tracefork_child): Remove.
7931 (linux_test_for_tracefork): Remove.
7932 (linux_look_up_symbols): Call linux_supports_traceclone.
7933 (initialize_low): Remove call to linux_test_for_tracefork.
7934 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7935 common/linux-ptrace.h.
7936 (PTRACE_TYPE_ARG4): Likewise.
7937 Include linux-ptrace.h.
7939 2013-08-21 Pedro Alves <palves@redhat.com>
7941 * config.in: Renegerate.
7943 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7945 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7946 (SFILES): Remove $(srcdir)/common/target-common.c and
7947 add $(srcdir)/target/waitstatus.c.
7948 (OBS): Remove target-common.o and add waitstatus.o.
7949 (server_h): Remove $(srcdir)/../common/target-common.h and
7950 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7951 and $(srcdir)/../target/waitstatus.h.
7952 (target-common.o): Remove.
7953 (waitstatus.o): New target object file.
7954 * target.h: Do not include target-common.h and
7955 include target/resume.h, target/wait.h and
7956 target/waitstatus.h.
7958 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7960 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7961 to PTRACE_TYPE_ARG3.
7962 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7963 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7965 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7966 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7968 2013-07-27 Jie Zhang <jie@codesourcery.com>
7969 Daniel Jacobowitz <dan@codesourcery.com>
7970 Yao Qi <yao@codesourcery.com>
7972 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7973 (mips-linux-watch.o): New rule.
7974 (mips_linux_watch_h): New variable.
7975 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7977 * linux-mips-low.c: Include mips-linux-watch.h.
7978 (struct arch_process_info, struct arch_lwp_info): New.
7979 (update_watch_registers_callback): New function.
7980 (mips_linux_new_process, mips_linux_new_thread) New functions.
7981 (mips_linux_prepare_to_resume, mips_insert_point): New
7983 (mips_remove_point, mips_stopped_by_watchpoint): New
7985 (rsp_bp_type_to_target_hw_bp_type): New function.
7986 (mips_stopped_data_address): New function.
7987 (the_low_target): Add watchpoint support functions.
7989 2013-07-27 Yao Qi <yao@codesourcery.com>
7991 * i386-low.c: Include break-common.h.
7992 (enum target_hw_bp_type): Remove.
7994 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7996 * Makefile.in (SFILES): /common/target-common.c.
7997 (OBS): Add target-common.o.
7998 (server_h): Add $(srcdir)/../common/target-common.h.
7999 (target-common.o): New target.
8000 * server.c (queue_stop_reply_callback): Free
8001 status string after use.
8002 * target.c (target_waitstatus_to_string): Remove.
8003 * target.h: Include target-common.h.
8004 (resume_kind): Likewise.
8005 (target_waitkind): Likewise.
8006 (target_waitstatus): Likewise.
8007 (TARGET_WNOHANG): Likewise.
8009 2013-07-04 Yao Qi <yao@codesourcery.com>
8011 * Makefile.in (host_alias): Use @host_noncanonical@.
8012 (target_alias): Use @target_noncanonical@.
8013 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8014 ACX_NONCANONICAL_HOST.
8015 * configure: Regenerated.
8018 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8020 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8021 * configure: Rebuild.
8022 * Makefile.in (version_host, version_target): Get from configure.
8023 (version.c): Use $(version_host) and $(version_target).
8025 2013-07-03 Pedro Alves <palves@redhat.com>
8027 * Makefile.in (config.status): Depend on development.sh.
8028 * acinclude.m4: Include libmcheck.m4.
8029 * configure: Regenerate.
8031 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8033 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8034 attribute inside the parentheses.
8035 (winapi_DebugSetProcessKillOnExit): Ditto.
8036 (winapi_DebugBreakProcess): Ditto.
8037 (winapi_GenerateConsoleCtrlEvent): Ditto.
8039 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8041 * notif.h (notif_event): Add a dummy member to avoid compiler
8044 2013-07-01 Pedro Alves <palves@redhat.com>
8046 * hostio.c (HOSTIO_PATH_MAX): Define.
8047 (require_filename, handle_open, handle_unlink, handle_readlink):
8050 2013-07-01 Pedro Alves <palves@redhat.com>
8052 * server.h: Include "pathmax.h".
8053 * linux-low.c: Don't include sys/param.h.
8054 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8056 * win32-low.c: Don't include sys/param.h.
8057 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8059 2013-07-01 Pedro Alves <palves@redhat.com>
8061 * event-loop.c: Don't check HAVE_UNISTD_H before including
8063 * gdbreplay.c: Likewise.
8064 * remote-utils.c: Likewise.
8065 * server.c: Likewise.
8066 * configure.ac: Don't check for unistd.h.
8067 * configure: Regenerate.
8069 2013-06-28 Tom Tromey <tromey@redhat.com>
8071 * Makefile.in (version.c): Use version.in, not
8074 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8076 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8077 * configure: Rebuild.
8078 * Makefile.in (version_host, version_target): Get from configure.
8079 (version.c): Use $(version_host) and $(version_target).
8081 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8083 Fix trace-status to output user name without trailing colon.
8084 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8086 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8088 Fix trace-status to output proper start-time and stop-time.
8089 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8090 output start time and stop time in hex as gdb expects.
8092 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8094 * tracepoint.c (build_traceframe_info_xml): Output trace state
8095 variables present in the trace buffer.
8097 2013-06-24 Tom Tromey <tromey@redhat.com>
8099 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8101 (version.o): Remove.
8102 * gdbreplay.c: Include version.h.
8103 (version, host_name): Don't declare.
8104 * server.h: Include version.h.
8105 (version, host_name): Don't declare.
8107 2013-06-12 Pedro Alves <palves@redhat.com>
8109 * linux-x86-low.c (linux_is_elf64): Delete global.
8110 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8111 with local linux_pid_exe_is_elf_64_file use.
8113 2013-06-11 Pedro Alves <palves@redhat.com>
8115 * linux-low.c (regset_disabled, disable_regset): New functions.
8116 (regsets_fetch_inferior_registers)
8117 (regsets_store_inferior_registers): Use them.
8118 (initialize_regsets_info); Don't allocate the disabled_regsets
8120 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8123 2013-06-11 Pedro Alves <palves@redhat.com>
8125 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8128 2013-06-11 Pedro Alves <palves@redhat.com>
8130 * linux-x86-low.c (initialize_low_arch): Call
8131 init_registers_x32_avx_linux.
8133 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8135 Fix compatibility with Android Bionic.
8136 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8139 2013-06-07 Pedro Alves <palves@redhat.com>
8142 * Makefile.in (OBS): Add tdesc.o.
8143 (IPA_OBJS): Add tdesc-ipa.o.
8144 (tdesc-ipa.o): New rule.
8145 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8147 * linux-low.c (new_inferior): Delete.
8148 (disabled_regsets, num_regsets): Delete.
8149 (linux_add_process): Adjust to set the new per-process
8151 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8152 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8153 was a stop. When calling arch_setup, switch the current inferior
8154 to the thread that got an event.
8155 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8156 (regsets_fetch_inferior_registers)
8157 (regsets_store_inferior_registers): New regsets_info parameter.
8159 (linux_register_in_regsets): New regs_info parameter. Adjust to
8161 (register_addr, fetch_register, store_register): New usrregs_info
8162 parameter. Adjust to use it.
8163 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8164 parameter regs_info. Adjust to use it.
8165 (linux_fetch_registers): Get the current inferior's regs_info, and
8167 (linux_store_registers): Ditto.
8168 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8169 (initialize_low): Don't initialize the target_regsets here. Call
8170 initialize_low_arch.
8171 * linux-low.h (target_regsets): Delete declaration.
8172 (struct regsets_info): New.
8173 (struct usrregs_info): New.
8174 (struct regs_info): New.
8175 (struct process_info_private) <new_inferior>: New field.
8176 (struct linux_target_ops): Delete the num_regs, regmap, and
8177 regset_bitmap fields. New field regs_info.
8178 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8179 * i387-fp.c (num_xmm_registers): Delete.
8180 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8181 calls to new interface.
8182 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8183 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8184 Infer the number of xmm registers from the regcache's target
8186 * i387-fp.h (num_xmm_registers): Delete.
8187 * inferiors.c (add_thread): Don't install the thread's regcache
8189 * proc-service.c (gregset_info): Fetch the current inferior's
8190 regs_info. Adjust to use it.
8191 * regcache.c: Include tdesc.h.
8192 (register_bytes, reg_defs, num_registers)
8193 (gdbserver_expedite_regs): Delete.
8194 (get_thread_regcache): If the thread doesn't have a regcache yet,
8195 create one, instead of aborting gdbserver.
8196 (regcache_invalidate_one): Rename to ...
8197 (regcache_invalidate_thread): ... this.
8198 (regcache_invalidate_one): New.
8199 (regcache_invalidate): Only invalidate registers of the current
8201 (init_register_cache): Add target_desc parameter, and use it.
8202 (new_register_cache): Ditto. Assert the target description has a
8203 non zero registers_size.
8204 (regcache_cpy): Add assertions. Adjust.
8205 (realloc_register_cache, set_register_cache): Delete.
8206 (registers_to_string, registers_from_string): Adjust.
8207 (find_register_by_name, find_regno, find_register_by_number)
8208 (register_cache_size): Add target_desc parameter, and use it.
8209 (free_register_cache_thread, free_register_cache_thread_one)
8210 (regcache_release, register_cache_size): New.
8211 (register_size): Add target_desc parameter, and use it.
8212 (register_data, supply_register, supply_register_zeroed)
8213 (supply_regblock, supply_register_by_name, collect_register)
8214 (collect_register_as_string, collect_register_by_name): Adjust.
8215 * regcache.h (struct target_desc): Forward declare.
8216 (struct regcache) <tdesc>: New field.
8217 (init_register_cache, new_register_cache): Add target_desc
8219 (regcache_invalidate_thread): Declare.
8220 (regcache_invalidate_one): Delete declaration.
8221 (regcache_release): Declare.
8222 (find_register_by_number, register_cache_size, register_size)
8223 (find_regno): Add target_desc parameter.
8224 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8226 * remote-utils.c: Include tdesc.h.
8227 (outreg, prepare_resume_reply): Adjust.
8228 * server.c: Include tdesc.h.
8229 (gdbserver_xmltarget): Delete declaration.
8230 (get_features_xml, process_serial_event): Adjust.
8231 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8233 (struct process_info) <tdesc>: New field.
8234 (ipa_tdesc): Declare.
8235 * tdesc.c: New file.
8236 * tdesc.h: New file.
8237 * tracepoint.c: Include tdesc.h.
8238 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8239 (get_context_regcache): Adjust to pass ipa_tdesc down.
8240 (do_action_at_tracepoint): Adjust to get the register cache size
8241 from the context regcache's description.
8242 (traceframe_walk_blocks): Adjust to get the register cache size
8243 from the current trace frame's description.
8244 (traceframe_get_pc): Adjust to get current trace frame's
8245 description and pass it down.
8246 (gdb_collect): Adjust to get the register cache size from the
8248 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8249 (gdbserver_xmltarget): Delete.
8250 (initialize_low_tracepoint): Set the ipa's target description.
8251 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8252 (initialize_low_tracepoint): Set the ipa's target description.
8253 * linux-x86-low.c: Include tdesc.h.
8254 [__x86_64__] (is_64bit_tdesc): New.
8255 (ps_get_thread_area, x86_get_thread_area): Use it.
8256 (i386_cannot_store_register): Rename to ...
8257 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8258 (i386_cannot_fetch_register): Rename to ...
8259 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8260 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8262 (target_regsets): Rename to ...
8263 (x86_regsets): ... this.
8264 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8266 (x86_siginfo_fixup): Use is_64bit_tdesc.
8267 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8268 (tdesc_x32_avx_linux, tdesc_x32_linux)
8269 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8271 (x86_linux_update_xmltarget): Delete.
8272 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8273 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8274 (AMD64_LINUX_USER64_CS): New.
8275 (x86_linux_read_description): New, based on
8276 x86_linux_update_xmltarget.
8277 (same_process_callback): New.
8278 (x86_arch_setup_process_callback): New.
8279 (x86_linux_update_xmltarget): New.
8280 (x86_regsets_info): New.
8281 (amd64_linux_regs_info): New.
8282 (i386_linux_usrregs_info): New.
8283 (i386_linux_regs_info): New.
8284 (x86_linux_regs_info): New.
8285 (x86_arch_setup): Reimplement.
8286 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8287 (x86_emit_ops): Ditto.
8288 (the_low_target): Adjust. Install x86_linux_regs_info,
8289 x86_cannot_fetch_register, and x86_cannot_store_register.
8290 (initialize_low_arch): New.
8291 * linux-ia64-low.c (tdesc_ia64): Declare.
8292 (ia64_fetch_register): Adjust.
8293 (ia64_usrregs_info, regs_info): New globals.
8294 (ia64_regs_info): New function.
8295 (the_low_target): Adjust.
8296 (initialize_low_arch): New function.
8297 * linux-sparc-low.c (tdesc_sparc64): Declare.
8298 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8300 (sparc_arch_setup): New function.
8301 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8302 (the_low_target): Adjust.
8303 (initialize_low_arch): New function.
8304 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8305 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8306 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8307 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8308 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8309 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8310 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8311 (tdesc_powerpc_isa205_vsx64l): Declare.
8312 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8313 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8314 (ppc_set_pc, ppc_get_hwcap): Adjust.
8315 (ppc_usrregs_info): Forward declare.
8316 (!__powerpc64__) ppc_regmap_adjusted: New global.
8317 (ppc_arch_setup): Adjust to the current process'es target
8319 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8320 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8321 (ppc_store_evrregset): Adjust.
8322 (target_regsets): Rename to ...
8323 (ppc_regsets): ... this, and make static.
8324 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8325 (ppc_regs_info): New function.
8326 (the_low_target): Adjust.
8327 (initialize_low_arch): New function.
8328 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8329 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8330 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8331 (tdesc_s390x_linux64v2): Declare.
8332 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8333 (s390_fill_gregset, s390_store_last_break): Adjust.
8334 (target_regsets): Rename to ...
8335 (s390_regsets): ... this, and make static.
8336 (s390_get_pc, s390_set_pc): Adjust.
8337 (s390_get_hwcap): New target_desc parameter, and use it.
8338 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8339 (s390_arch_setup): Adjust to set the current process'es target
8340 description. Don't adjust the regmap.
8341 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8342 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8343 (regs_info_3264): New globals.
8344 (s390_regs_info): New function.
8345 (the_low_target): Adjust.
8346 (initialize_low_arch): New function.
8347 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8348 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8349 [__mips64] (init_registers_mips_linux)
8350 (init_registers_mips_dsp_linux): Delete defines.
8351 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8352 (have_dsp): New global.
8353 (mips_read_description): New, based on mips_arch_setup.
8354 (mips_arch_setup): Reimplement.
8355 (get_usrregs_info): New function.
8356 (mips_cannot_fetch_register, mips_cannot_store_register)
8357 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8358 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8359 (target_regsets): Rename to ...
8360 (mips_regsets): ... this, and make static.
8361 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8362 (dsp_regs_info, regs_info): New globals.
8363 (mips_regs_info): New function.
8364 (the_low_target): Adjust.
8365 (initialize_low_arch): New function.
8366 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8367 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8369 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8370 (arm_read_description): New, with bits factored from
8372 (arm_arch_setup): Reimplement.
8373 (target_regsets): Rename to ...
8374 (arm_regsets): ... this, and make static.
8375 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8376 (arm_regs_info): New function.
8377 (the_low_target): Adjust.
8378 (initialize_low_arch): New function.
8379 * linux-m68k-low.c (tdesc_m68k): Declare.
8380 (target_regsets): Rename to ...
8381 (m68k_regsets): ... this, and make static.
8382 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8383 (m68k_regs_info): New function.
8384 (m68k_arch_setup): New function.
8385 (the_low_target): Adjust.
8386 (initialize_low_arch): New function.
8387 * linux-sh-low.c (tdesc_sharch): Declare.
8388 (target_regsets): Rename to ...
8389 (sh_regsets): ... this, and make static.
8390 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8391 (sh_regs_info, sh_arch_setup): New functions.
8392 (the_low_target): Adjust.
8393 (initialize_low_arch): New function.
8394 * linux-bfin-low.c (tdesc_bfin): Declare.
8395 (bfin_arch_setup): New function.
8396 (bfin_usrregs_info, regs_info): New globals.
8397 (bfin_regs_info): New function.
8398 (the_low_target): Adjust.
8399 (initialize_low_arch): New function.
8400 * linux-cris-low.c (tdesc_cris): Declare.
8401 (cris_arch_setup): New function.
8402 (cris_usrregs_info, regs_info): New globals.
8403 (cris_regs_info): New function.
8404 (the_low_target): Adjust.
8405 (initialize_low_arch): New function.
8406 * linux-cris-low.c (tdesc_crisv32): Declare.
8407 (cris_arch_setup): New function.
8408 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8409 (cris_regs_info): New function.
8410 (the_low_target): Adjust.
8411 (initialize_low_arch): New function.
8412 * linux-m32r-low.c (tdesc_m32r): Declare.
8413 (m32r_arch_setup): New function.
8414 (m32r_usrregs_info, regs_info): New globals.
8415 (m32r_regs_info): Adjust.
8416 (initialize_low_arch): New function.
8417 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8418 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8419 (tic6x_usrregs_info): Forward declare.
8420 (tic6x_read_description): New function, based on ...
8421 (tic6x_arch_setup): ... this. Reimplement.
8422 (target_regsets): Rename to ...
8423 (tic6x_regsets): ... this, and make static.
8424 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8425 (tic6x_regs_info): New function.
8426 (the_low_target): Adjust.
8427 (initialize_low_arch): New function.
8428 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8429 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8430 (target_regsets): Rename to ...
8431 (xtensa_regsets): ... this, and make static.
8432 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8434 (xtensa_arch_setup, xtensa_regs_info): New functions.
8435 (the_low_target): Adjust.
8436 (initialize_low_arch): New function.
8437 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8438 (nios2_arch_setup): Set the current process'es tdesc.
8439 (target_regsets): Rename to ...
8440 (nios2_regsets): ... this.
8441 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8442 (nios2_regs_info): New function.
8443 (the_low_target): Adjust.
8444 (initialize_low_arch): New function.
8445 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8446 (aarch64_arch_setup): Set the current process'es tdesc.
8447 (target_regsets): Rename to ...
8448 (aarch64_regsets): ... this.
8449 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8450 (aarch64_regs_info): New function.
8451 (the_low_target): Adjust.
8452 (initialize_low_arch): New function.
8453 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8455 (target_regsets): Rename to ...
8456 (tile_regsets): ... this.
8457 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8458 (tile_regs_info): New function.
8459 (tile_arch_setup): Set the current process'es tdesc.
8460 (the_low_target): Adjust.
8461 (initialize_low_arch): New function.
8462 * spu-low.c (tdesc_spu): Declare.
8463 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8464 * win32-arm-low.c (tdesc_arm): Declare.
8465 (arm_arch_setup): New function.
8466 (the_low_target): Install arm_arch_setup instead of
8468 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8469 (init_windows_x86): Rename to ...
8470 (i386_arch_setup): ... this. Set `win32_tdesc'.
8471 (the_low_target): Adjust.
8472 * win32-low.c (win32_tdesc): New global.
8473 (child_add_thread): Don't create the thread cache here.
8474 (do_initial_child_stuff): Set the new process'es tdesc.
8475 * win32-low.h (struct target_desc): Forward declare.
8476 (win32_tdesc): Declare.
8477 * lynx-i386-low.c (tdesc_i386): Declare global.
8478 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8479 * lynx-low.c (lynx_tdesc): New global.
8480 (lynx_add_process): Set the new process'es tdesc.
8481 * lynx-low.h (struct target_desc): Forward declare.
8482 (lynx_tdesc): Declare global.
8483 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8484 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8485 * nto-low.c (nto_tdesc): New global.
8486 (do_attach): Set the new process'es tdesc.
8487 * nto-low.h (struct target_desc): Forward declare.
8488 (nto_tdesc): Declare.
8489 * nto-x86-low.c (tdesc_i386): Declare.
8490 (nto_x86_arch_setup): Set `nto_tdesc'.
8492 2013-06-04 Gary Benson <gbenson@redhat.com>
8494 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8495 to qSupported response when appropriate.
8496 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8497 with nonzero-length annex.
8498 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8499 arguments supplied in annex.
8501 2013-05-31 Doug Evans <dje@google.com>
8504 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8505 64 bits in 64-cross-32 environment.
8507 2013-05-28 Pedro Alves <palves@redhat.com>
8509 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8510 (aarch64-without-fpu.c): Delete rule.
8511 * configure.srv (aarch64*-*-linux*): Remove references to
8512 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8513 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8516 2013-05-24 Pedro Alves <palves@redhat.com>
8518 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8519 instead of strchr/decode_address. Error if the range isn't split
8520 with a ','. Don't assume there's be a ':' in the action.
8522 2013-05-23 Yao Qi <yao@codesourcery.com>
8523 Pedro Alves <palves@redhat.com>
8525 * linux-low.c (lwp_in_step_range): New function.
8526 (linux_wait_1): If the thread was range stepping and stopped
8527 outside the stepping range, report the stop to GDB. Otherwise,
8528 continue stepping. Add range stepping debug output.
8529 (linux_set_resume_request): Copy the step range from the resume
8531 (linux_supports_range_stepping): New.
8532 (linux_target_ops) <supports_range_stepping>: Set to
8533 linux_supports_range_stepping.
8534 * linux-low.h (struct linux_target_ops)
8535 <supports_range_stepping>: New field.
8536 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8537 * linux-x86-low.c (x86_supports_range_stepping): New.
8538 (the_low_target) <supports_range_stepping>: Set to
8539 x86_supports_range_stepping.
8540 * server.c (handle_v_cont): Handle 'r' action.
8541 (handle_v_requests): Append ";r" if the target supports range
8543 * target.h (struct thread_resume) <step_range_start,
8544 step_range_end>: New fields.
8545 (struct target_ops) <supports_range_stepping>:
8547 (target_supports_range_stepping): New macro.
8549 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8551 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8552 confusion in comment.
8554 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8556 * lynx-low.c (struct process_info_private): New type.
8557 (lynx_add_process): New function.
8558 (lynx_create_inferior, lynx_attach): Replace calls to
8559 add_process by calls to lynx_add_process.
8560 (lynx_resume): If PTID is null, then try using
8561 current_process()->private->last_wait_event_ptid.
8563 (lynx_clear_inferiors): Delete. The contents of that function
8564 has been inlined in lynx_mourn;
8565 (lynx_wait_1): Save the ptid in the process's private data.
8566 (lynx_mourn): Free the process' private data. Replace call
8567 to lynx_clear_inferiors by call to clear_inferiors.
8569 2013-05-17 Yao Qi <yao@codesourcery.com>
8571 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8574 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8576 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8577 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8578 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8579 PT_TEXT_END_ADDR guards. Update comments.
8580 (linux_target_op) <read_offsets>: Conditionally define to
8581 linux_read_offsets if the target is UCLIBC and if it defines
8582 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8584 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8585 Andrew Jenner <andrew@codesourcery.com>
8587 * Makefile.in (SFILES): Add linux-nios2-low.c.
8588 (clean): Add action to delete nios2-linux.c.
8589 (nios2-linux.c): New rule.
8590 * configure.srv: Add nios2*-*-linux*.
8591 * linux-nios2-low.c: New.
8593 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8595 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8597 2013-04-25 Hui Zhu <hui@codesourcery.com>
8600 * ax.c (ax_printf): Add fflush.
8602 2013-04-22 Tom Tromey <tromey@redhat.com>
8604 * Makefile.in (SFILES): Add filestuff.c.
8605 (OBS): Add filestuff.o.
8606 (filestuff.o): New target.
8607 * config.in, configure: Rebuild.
8608 * configure.ac: Check for fdwalk, pipe2.
8610 2013-04-17 Pedro Alves <palves@redhat.com>
8612 * configure.ac (USE_THREAD_DB): Delete variable.
8613 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8614 Don't AC_SUBST USE_THREAD_DB.
8615 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8616 * config.in, configure: Regenerate.
8618 2013-04-16 Pedro Alves <palves@redhat.com>
8620 * linux-low.h (struct lwp_info) <thread_known>: Move under
8621 the USE_THREAD_DB #ifdef.
8623 2013-04-16 Pedro Alves <palves@redhat.com>
8625 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8626 (linux-low.o): Delete rule.
8627 * linux-low.h: Always include "gdb_thread_db.h" instead of
8628 conditionally including thread_db.h.
8629 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8632 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8634 * Makefile.in (install-only): Fix make install regression.
8636 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8638 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8639 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8641 * gdbserver.1: Remove.
8643 2013-03-22 Pedro Alves <palves@redhat.com>
8645 * linux-low.c (handle_extended_wait): Don't call
8646 linux_enable_event_reporting.
8648 2013-03-15 Tony Theodore <tonyt@logyst.com>
8651 * Makefile.in (SHELL): Use @SHELL@.
8653 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8655 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8658 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8660 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8661 Remove extraneous NULL element.
8663 2013-03-13 Yao Qi <yao@codesourcery.com>
8665 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8666 'V' block in trace frame.
8668 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8670 * target.h (struct target_ops): Add btrace ops.
8671 (target_supports_btrace): New macro.
8672 (target_enable_btrace): New macro.
8673 (target_disable_btrace): New macro.
8674 (target_read_btrace): New macro.
8675 * gdbthread.h (struct thread_info): Add btrace field.
8676 * server.c: Include btrace-common.h.
8677 (handle_btrace_general_set): New function.
8678 (handle_btrace_enable): New function.
8679 (handle_btrace_disable): New function.
8680 (handle_general_set): Call handle_btrace_general_set.
8681 (handle_qxfer_btrace): New function.
8682 (struct qxfer qxfer_packets[]): Add btrace entry.
8683 * inferiors.c (remove_thread): Disable btrace.
8684 * linux-low: Include linux-btrace.h.
8685 (linux_low_enable_btrace): New function.
8686 (linux_low_read_btrace): New function.
8687 (linux_target_ops): Add btrace ops.
8688 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8689 Add srv_linux_btrace=yes.
8690 (x86_64-*-linux*): Add linux-btrace.o.
8691 Add srv_linux_btrace=yes.
8692 * configure.ac: Define HAVE_LINUX_BTRACE.
8693 * config.in: Regenerated.
8694 * configure: Regenerated.
8696 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8698 * server.c (handle_qxfer): Preserve error message if -3 is
8700 (qxfer): Document the -3 return value.
8702 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8704 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8705 (linux_btrace_h): New variable.
8706 (linux-btrace.o): New rule.
8708 2013-03-08 Stan Shebs <stan@codesourcery.com>
8709 Hafiz Abid Qadeer <abidh@codesourcery.com>
8711 * tracepoint.c (trace_buffer_size): New global.
8712 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8713 (init_trace_buffer): Change to one-argument function. Allocate
8714 trace buffer memory.
8715 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8716 handle QTBuffer:size packet.
8717 (cmd_bigqtbuffer_size): New function.
8718 (initialize_tracepoint): Call init_trace_buffer with
8719 DEFAULT_TRACE_BUFFER_SIZE.
8720 * server.c (handle_query): Add QTBuffer:size in the
8723 2013-03-07 Yao Qi <yao@codesourcery.com>
8725 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8726 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8728 (cmd_qtsp): Adjust condition. Do post increment.
8729 Set cur_action and cur_step_action back to 0.
8731 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8734 * linux-low.c (linux_write_memory): Return early success if LEN is
8737 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8739 * configure.srv: Add x86_64-*-cygwin* as target.
8741 2013-02-28 Tom Tromey <tromey@redhat.com>
8743 * configure.ac: Invoke AC_SYS_LARGEFILE.
8744 * configure, config.in: Rebuild.
8746 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8748 * win32-low.c: Throughout, fix format strings and casts of
8749 printf-like functions to avoid type related warnings on all
8751 (get_child_debug_event): Print dwDebugEventCode as hex since
8752 that's how it's usually documented.
8754 2013-02-28 Yao Qi <yao@codesourcery.com>
8756 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8759 2013-02-27 Jiong Wang <jiwang@tilera.com>
8761 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8762 (reg-tilegx32.c): New rule.
8763 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8764 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8765 different register info initializer according to elf class.
8766 (init_registers_tilgx32): New function. The tilegx32 register info
8768 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8769 (tile_store_gregset): Likewise.
8771 2013-02-27 Yao Qi <yao@codesourcery.com>
8773 * server.c (process_point_options): Print debug message when
8774 debug_threads is true.
8776 2013-02-26 Yao Qi <yao@codesourcery.com>
8778 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8780 2013-02-19 Pedro Alves <palves@redhat.com>
8781 Kai Tietz <ktietz@redhat.com>
8785 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8786 instead of strtoul to extract address from packet.
8787 (process_serial_event) <'z'>: Likewise.
8789 2013-02-18 Yao Qi <yao@codesourcery.com>
8791 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8793 2013-02-14 Pedro Alves <palves@redhat.com>
8797 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8798 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8800 2013-02-14 Pedro Alves <palves@redhat.com>
8802 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8804 2013-02-14 Pedro Alves <palves@redhat.com>
8806 * tracepoint.c (save_string): Delete.
8807 (add_tracepoint_action): Use savestring instead of save_string.
8809 2013-02-12 Pedro Alves <palves@redhat.com>
8811 * linux-xtensa-low.c: Ditto.
8812 * xtensa-xtregs.c: Ditto.
8814 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8816 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8819 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8821 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8822 aarch64_num_wp_regs and aarch64_num_bp_regs to
8823 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8825 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8827 * linux-aarch64-low.c (ps_get_thread_area): Replace
8828 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8830 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8831 Marcus Shawcroft <marcus.shawcroft@arm.com>
8832 Nigel Stephens <nigel.stephens@arm.com>
8833 Yufeng Zhang <yufeng.zhang@arm.com>
8835 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8836 (aarch64.c, aarch64-without-fpu.c): New targets.
8837 * configure.srv (aarch64*-*-linux*): New.
8838 * linux-aarch64-low.c: New file.
8840 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8842 * linux-low.c (handle_extended_wait, linux_create_inferior)
8843 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8844 (dequeue_one_deferred_signal, linux_resume_one_thread)
8845 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8846 (linux_tracefork_grandchild, linux_test_for_tracefork)
8847 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8848 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8849 where the argument is 0.
8851 2013-01-25 Yao Qi <yao@codesourcery.com>
8853 * event-loop.c: Include "queue.h".
8854 (gdb_event_p): New typedef.
8855 (struct gdb_event) <next_event>: Remove.
8856 (event_queue): Change to QUEUE(gdb_event_p).
8857 (async_queue_event): Remove.
8858 (gdb_event_xfree): New.
8859 (initialize_event_loop): New.
8860 (process_event): Use API from QUEUE.
8861 (wait_for_event): Likewise.
8862 * server.c (main): Call initialize_event_loop.
8863 * server.h (initialize_event_loop): Declare.
8865 2013-01-18 Yao Qi <yao@codesourcery.com>
8867 * ax.h (struct eval_agent_expr_context): New.
8868 (gdb_eval_agent_expr): Update declaration.
8869 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8870 TFRAME. Add new argument CTX.
8871 * server.h (struct eval_agent_expr_context): Declare.
8872 (agent_mem_read, agent_tsv_read): Update declaration.
8873 (agent_mem_read_string): Likewise.
8874 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8875 (add_traceframe_block): Add new argument TPOINT.
8876 Increase TPOINT->traceframe_usage.
8877 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8878 eval_tracepoint_agent_expr.
8879 (condition_true_at_tracepoint): Likewise.
8880 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8881 (agent_mem_read_string, agent_tsv_read): Likewise.
8883 2013-01-16 Yao Qi <yao@codesourcery.com>
8885 * linux-low.c (linux_resume_one_lwp): Don't check
8886 'lwp->bp_reinsert != 0'.
8888 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8889 Pedro Alves <palves@redhat.com>
8891 * lynx-low.c (ptrace_request_to_str): Define a temporary
8892 macro and use it to simplify this function's implementation.
8894 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8896 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8899 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8901 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8903 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8905 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8907 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8909 * lynx-low.c (lynx_resume): Use the resume_info parameter
8910 to determine the ptid for the lynx_ptrace call, unless
8911 it is equal to minus_one_ptid, in which case we use the
8912 ptid of the current_inferior.
8913 (lynx_wait_1): After having received a thread create/exit
8914 event, resume the inferior's execution using the signaling
8915 thread's ptid, rather than the old ptid.
8917 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8919 * lynx-low.c (lynx_resume): Delete variable ret.
8921 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8923 * gdbreplay.c (gdbreplay_version): Update copyright year.
8924 * server.c (gdbserver_version): Likewise.
8926 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8928 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8931 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8933 * lynx-low.c (ptrace_request_to_str): Add handling for
8936 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8938 * lynx-low.c (lynx_attach): Delete variable new_process.
8940 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8942 * lynx-low.c (lynx_create_inferior): Delete variable
8945 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8947 * lynx-low.c (ptrace_request_to_str): Do not handle
8948 PTRACE_GETTHREADLIST if this macro does not exist.
8950 2012-12-15 Yao Qi <yao@codesourcery.com>
8952 * Makefile.in (OBS): Add notif.o.
8953 * notif.c, notif.h: New.
8954 * server.c: Include "notif.h".
8955 (struct vstop_notif) <next>: Remove.
8957 (queue_stop_reply): Update.
8958 (push_event, send_next_stop_reply): Remove.
8959 (discard_queued_stop_replies): Update.
8960 (notif_stop): New variable.
8961 (handle_v_stopped): Remove.
8962 (handle_v_requests): Don't call handle_v_stopped. Call
8963 handle_ack_notif instead.
8964 (queue_stop_reply_callback): Call notif_event_enque instead
8965 of queue_stop_reply.
8966 (handle_status): Don't call send_next_stop_reply, call
8967 notif_write_event instead.
8968 (kill_inferior_callback): Likewise.
8969 (detach_or_kill_inferior_callback): Likewise.
8970 (main): Call initialize_notif.
8971 (process_serial_event): Call QUEUE_is_empty.
8972 (handle_target_event): Call notif_push instead of push event.
8973 * server.h (push_event): Remove declaration.
8975 2012-12-10 Tom Tromey <tromey@redhat.com>
8977 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8978 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8981 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8982 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8983 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8984 (amd64-linux-ipa.o, ax.o): Rewrite.
8985 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8986 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8987 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8988 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8989 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8990 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8991 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8992 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8993 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8994 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8995 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8996 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8997 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8998 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8999 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9000 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9001 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9002 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9003 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9004 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9005 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9006 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9007 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9008 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9009 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9010 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9011 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9012 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9013 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9014 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9015 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9016 (reg-tilegx.o): Remove.
9017 (all_object_files): New macro.
9018 Include .deps files.
9019 * aclocal.m4, configure: Rebuild.
9020 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9021 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9022 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9024 2012-12-05 Tom Tromey <tromey@redhat.com>
9027 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9029 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9031 * configure.ac: Check for linux/perf_event.h.
9032 * config.in: Regenerated.
9033 * configure: Regenerated.
9035 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9037 * hostio.c (handle_readlink): Decrease buffer size
9038 parameter passed to readlink by one byte.
9040 2012-11-26 Yao Qi <yao@codesourcery.com>
9042 * configure.ac (build_warnings): Append '-Wempty-body'.
9043 * configure: Regenerated.
9044 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9047 2012-11-15 Pierre Muller <muller@sourceware.org>
9049 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9050 * config.in: Regenerate.
9051 * configure: Regenerate.
9052 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9053 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9054 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9055 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9057 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9058 instead of <sys/wait.h> header.
9059 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9061 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9063 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9064 (various make rules): Remove -DGDBSERVER
9066 2012-11-09 Yao Qi <yao@codesourcery.com>
9068 * spu-low.c (current_ptid): Move it to ..
9069 * gdbthread.h: ... here. New.
9070 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9071 * server.c (myresume, process_serial_event): Likewise.
9072 * thread-db.c (thread_db_find_new_threads): Likewise.
9073 * tracepoint.c (run_inferior_command): Likewise.
9075 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9077 * server.c (handle_search_memory_1): Include access length in
9080 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9082 * linux-crisv32-low.c: Fix compile errors.
9084 2012-09-04 Yao Qi <yao@codesourcery.com>
9086 * tracepoint.c (cmd_qtsv): Adjust debug message.
9087 Don't check CUR_TPOINT.
9089 2012-08-28 Yao Qi <yao@codesourcery.com>
9091 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9092 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9093 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9094 Remove declarations of xmalloc, xreallloc, xstrdup and
9096 * Makefile.in (libiberty_h): New.
9097 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9098 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9100 2012-08-23 Yao Qi <yao@codesourcery.com>
9102 * server.h: Remove declaration of 'xsnprintf'.
9104 2012-08-22 Keith Seitz <keiths@redhat.com>
9106 * server.h: Include build-gnulib-gbserver/config.h.
9107 * gdbreplay.c: Likewise.
9109 2012-08-08 Doug Evans <dje@google.com>
9111 * Makefile.in (SFILES): Add gdb_vecs.c.
9112 (OBS): Add gdb_vecs.o.
9113 (gdb_vecs_h, host_defs_h): New variables.
9114 (thread-db.o): Add $(gdb_vecs_h) dependency.
9115 (gdb_vecs.o): New rule.
9116 * thread-db.c: #include "gdb_vecs.h".
9117 (thread_db_load_search): Use a vector to iterate over path elements.
9118 Handle text appearing after "$pdir".
9120 * configure.ac: Add check for strstr.
9121 * config.in: Regenerate.
9122 * configure: Regenerate.
9124 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9126 * hostio.c (handle_pread): If pread fails, fall back to attempting
9128 (handle_pwrite): Likewise for pwrite.
9130 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9132 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9133 between unsupported TYPE and unimplementable ADDR/LEN combination.
9134 (arm_insert_point): Act on new return value.
9136 2012-07-31 Pedro Alves <palves@redhat.com>
9138 * server.c (process_point_options): Only skip tokens if we find
9139 one that is unrecognized. Don't treat 'X' specially while
9140 skipping unrecognized tokens.
9142 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9144 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9145 to 4-byte-align HW breakpoint addresses for Thumb.
9147 2012-07-27 Yao Qi <yao@codesourcery.com>
9151 * server.h: Declare gdb_agent_about_to_close.
9152 * target.c (kill_inferior): Include "agent.h".
9153 New. Send command 'kill'.
9154 * target.h (kill_inferior): Removed macro.
9155 * tracepoint.c (gdb_agent_about_to_close): New.
9156 (gdb_agent_helper_thread): Handle command 'close'.
9157 Wait endlessly until the inferior stops.
9158 Install gdb_agent_remove_socket to atexit hook.
9159 (agent_socket_name): New static variable.
9160 (gdb_agent_socket_init): Replace local variable 'name' with
9161 'agent_socket_name'.
9162 (gdb_agent_remove_socket): New.
9164 2012-07-27 Yao Qi <yao@codesourcery.com>
9166 * server.c (process_point_options): Stop at 'X' when parsing.
9168 2012-07-19 Michael Eager <eager@eagercon.com>
9170 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9172 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9173 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9174 hardware breakpoint.
9176 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9178 * gdbserver/linux-low.c (initialize_low): Call
9179 linux_ptrace_init_warnings.
9181 2012-07-02 Doug Evans <dje@google.com>
9183 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9186 2012-07-02 Stan Shebs <stan@codesourcery.com>
9188 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9189 (ax.o): Add it to build rule.
9191 (OBS): Add format.o.
9192 (IPA_OBS): Add format.o.
9193 * server.c (handle_query): Claim support for breakpoint commands.
9194 (process_point_options): Add command case.
9195 (process_serial_event): Leave running if there are printfs in
9197 * mem-break.h (any_persistent_commands): Declare.
9198 (add_breakpoint_commands): Declare.
9199 (gdb_no_commands_at_breakpoint): Declare.
9200 (run_breakpoint_commands): Declare.
9201 * mem-break.c (struct point_command_list): New struct.
9202 (struct breakpoint): New field command_list.
9203 (any_persistent_commands): New function.
9204 (add_commands_to_breakpoint): New function.
9205 (add_breakpoint_commands): New function.
9206 (gdb_no_commands_at_breakpoint): New function.
9207 (run_breakpoint_commands): New function.
9208 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9210 * ax.c: Include format.h.
9211 (ax_printf): New function.
9212 (gdb_eval_agent_expr): Add printf opcode.
9214 2012-06-13 Yao Qi <yao@codesourcery.com>
9216 * server.c (start_inferior): Remove duplicated writes to fields
9217 'last_resume_kind' and 'last_status' of 'current_inferior'.
9219 2012-06-12 Yao Qi <yao@codesourcery.com>
9220 Pedro Alves <palves@redhat.com>
9222 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9224 * server.c (handle_v_cont): Extend comment.
9226 2012-06-11 Yao Qi <yao@codesourcery.com>
9228 * linux-low.c (linux_attach): Add 'static'.
9230 2012-06-06 Yao Qi <yao@codesourcery.com>
9232 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9234 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9236 Fix gcc -flto compilation warning.
9237 * server.c (main): Make variable multi_mode and attach volatile.
9239 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9241 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9242 if the platform doesn't know about it.
9244 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9246 * Makefile.in (SFILES): Add linux-tile-low.c.
9247 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9248 * configure.srv: Handle tilegx-*-linux*.
9249 * linux-tile-low.c: New file.
9251 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9253 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9255 2012-05-24 Pedro Alves <palves@redhat.com>
9259 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9261 2012-05-24 Pedro Alves <palves@redhat.com>
9265 Replace target_signal with gdb_signal throughout.
9267 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9269 * linux-low.c (linux_store_registers): Avoid the copying sequence
9270 when no data has been retrieved by ptrace.
9272 2012-05-22 Will Deacon <will.deacon@arm.com>
9274 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9275 Include asm/ptrace.h.
9276 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9279 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9281 * linux-low.c (linux_store_registers): Don't re-retrieve data
9282 with ptrace that has already been obtained from /proc. Always
9283 copy any data retrieved with ptrace to the buffer supplied.
9285 2012-05-11 Yao Qi <yao@codesourcery.com>
9286 Pedro Alves <palves@redhat.com>
9288 * linux-low.c (enum stopping_threads_kind): New.
9289 (stopping_threads): Change type to `enum stopping_threads_kind'.
9290 (handle_extended_wait): If stopping and suspending threads, leave
9291 the new_lwp suspended too.
9292 (linux_wait_for_event): Adjust.
9293 (stop_all_lwps): Set `stopping_threads' to
9294 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9295 whether we're suspending threads or just stopping them. Assert no
9298 2012-04-29 Yao Qi <yao@codesourcery.com>
9300 * server.h: Move some code to ...
9301 * gdbthread.h: ... here. New.
9302 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9303 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9304 (nto-low.o, win32-low.o): Likewise.
9305 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9306 * regcache.c, remote-utils.c, server.c: Likewise.
9307 * target.c, tracepoint.c, win32-low.c: Likewise.
9309 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9311 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9312 (PTRACE_ARG4_TYPE): Likewise.
9313 (PTRACE_XFER_TYPE): Likewise.
9314 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9315 ptrace to PTRACE_ARG3_TYPE.
9316 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9317 (PTRACE_ARG4_TYPE): Likewise.
9318 (PTRACE_XFER_TYPE): Likewise.
9319 (linux_detach_one_lwp): Cast fourth argument of
9320 ptrace to long then PTRACE_ARG4_TYPE.
9321 (regsets_fetch_inferior_registers): Cast third argument of
9322 ptrace to long then PTRACE_ARG3_TYPE.
9323 (regsets_store_inferior_registers): Likewise.
9325 2012-04-20 Pedro Alves <palves@redhat.com>
9327 * configure: Regenerate.
9329 2012-04-19 Pedro Alves <palves@redhat.com>
9331 * Makefile.in (GNULIB_BUILDDIR): New.
9332 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9333 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9334 (all, install-only, uninstall, clean-info, all-lib, clean): No
9335 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9336 (maintainer-clean realclean distclean): Use subdir_do.
9338 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9339 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9340 * acinclude.m4: Include acx_configure_dir.m4.
9341 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9342 calls. Call AC_PROG_RANLIB. Configure gnulib using
9345 (GNULIB_STDINT_H): Adjust.
9346 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9347 * gdbreplay.c: Include build-gnulib/config.h.
9348 * server.h: Likewise.
9349 * aclocal.m4: Regenerate.
9350 * config.in: Regenerate.
9351 * configure: Regenerate.
9353 2012-04-19 Pedro Alves <palves@redhat.com>
9355 * Makefile.in (LIBGNU, INCGNU): Adjust.
9356 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9357 (all, install-only, uninstall, clean-info, all-lib, clean)
9358 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9359 * configure.ac: Adjust AC_OUTPUT output.
9360 * aclocal.m4: Regenerate.
9361 * configure: Regenerate.
9363 2012-04-19 Pedro Alves <palves@redhat.com>
9365 * Makefile.in (generated_files): New.
9366 (server_h): Remove the explicit dependency on config.h, and depend
9367 on $generated_files.
9369 2012-04-19 Pedro Alves <palves@redhat.com>
9371 * Makefile.in (INCGNU): Add -Ignulib.
9373 2012-04-19 Pedro Alves <palves@redhat.com>
9375 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9376 (INCGNU): ... this, and spell out -I here.
9377 (GNULIB_LIB): Rename to ...
9379 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9381 2012-04-19 Pedro Alves <palves@redhat.com>
9383 * config.in: Regenerate.
9385 2012-04-19 Pedro Alves <palves@redhat.com>
9387 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9388 * server.h (memmem): Remove declaration.
9389 * config.in: Regenerate.
9390 * configure: Regenerate.
9392 2012-04-19 Yao Qi <yao@codesourcery.com>
9394 * Makefile.in (SFILES): Add common/vec.c.
9398 2012-04-19 Yao Qi <yao@codesourcery.com>
9400 * remote-utils.c (prepare_resume_reply): Replace with macro
9401 target_core_of_thread.
9402 * server.c (handle_qxfer_threads_proper): Likewise.
9403 * target.h (traget_core_of_thread): New macro.
9405 2012-04-18 Pedro Alves <palves@redhat.com>
9407 * aclocal.m4: Regenerate.
9408 * configure: Regenerate.
9410 2012-04-16 Yao Qi <yao@codesourcery.com>
9412 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9413 duplicated on address.
9415 2012-04-16 Yao Qi <yao@codesourcery.com>
9417 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9418 (struct tracepoint_action_ops) <send>: New field.
9419 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9420 (agent_expr_send, x_tracepoint_action_send): New.
9421 (l_tracepoint_action_send): New.
9422 (cmd_qtdp): Download and install tracepoint
9423 according to `use_agent'.
9424 (run_inferior_command): Add one more parameter `len'.
9426 (tracepoint_send_agent): New.
9427 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9429 2012-04-16 Yao Qi <yao@codesourcery.com>
9431 * tracepoint.c (download_tracepoints): Moved to ...
9432 (cmd_qtstart): ... here.
9434 2012-04-14 Yao Qi <yao@codesourcery.com>
9436 * tracepoint.c: Include inttypes.h.
9437 (struct collect_memory_action): Use sized types.
9438 (struct tracepoint): Likewise.
9439 (cmd_qtdp, stop_tracing): Update print specifiers.
9440 (cmd_qtp, response_tracepoint): Likewise.
9441 (collect_data_at_tracepoint): Likewise.
9442 (collect_data_at_step): Likewise.
9444 2012-04-14 Yao Qi <yao@codesourcery.com>
9446 Import gnulib module inttypes.
9447 * aclocal.m4, config.in, configure: Regenerated.
9449 2012-04-14 Yao Qi <yao@codesourcery.com>
9451 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9452 Makefile and config.status at last.
9454 2012-04-13 Yao Qi <yao@codesourcery.com>
9456 * tracepoint.c: Include stdint.h unconditionally.
9458 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9460 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9461 on BFD_HAVE_SYS_PROCFS_TYPE.
9462 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9463 * configure: Regenerate.
9464 * config.in: Likewise.
9466 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9468 * Makefile.in (clean): Also remove x32.c x32-linux.c
9469 x32-avx.c x32-avx-linux.c.
9470 (x32.o): New target.
9472 (x32-linux.o): Likewise.
9473 (x32-linux.c): Likewise.
9474 (x32-avx.o): Likewise.
9475 (x32-avx.c): Likewise.
9476 (x32-avx-linux.o): Likewise.
9477 (x32-avx-linux.c): Likewise.
9479 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9480 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9481 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9482 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9483 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9484 i386/x32-avx-linux.xml.
9486 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9487 (init_registers_x32_avx_linux): Likwise.
9488 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9489 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9491 2012-04-13 Pedro Alves <palves@redhat.com>
9493 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9494 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9495 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9496 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9499 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9501 * linux-x86-low.c (compat_x32_clock_t): New.
9502 (compat_x32_siginfo_t): Likewise.
9503 (compat_x32_siginfo_from_siginfo): Likewise.
9504 (siginfo_from_compat_x32_siginfo): Likewise.
9505 (linux_is_elf64): Likewise.
9506 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9507 and siginfo_from_compat_x32_siginfo for x32.
9508 (x86_arch_setup): Set linux_is_elf64.
9510 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9513 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9515 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9516 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9517 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9518 compatible with process.
9520 2012-04-12 Yao Qi <yao@codesourcery.com>
9522 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9523 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9524 (install-only, install-info, clean): Handle sub dir gnulib.
9525 (all-lib, am--refresh): New targets.
9526 (memmem.o): Remove target.
9527 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9528 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9529 (AC_REPLACE_FUNCS): Remove memmem.
9530 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9531 (AC_OUTPUT): Generate Makefile in gnulib/.
9532 * aclocal.m4, config.in, configure: Regenerated.
9534 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9536 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9538 2012-04-05 Pedro Alves <palves@redhat.com>
9540 -Werror=strict-aliasing
9542 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9545 2012-04-04 Pedro Alves <palves@redhat.com>
9547 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9548 (sparc_store_gregset_from_stack, sparc_store_gregset)
9549 (sparc_breakpoint_at): Fix formatting.
9551 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9553 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9555 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9556 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9557 * config.in: Regenerate.
9558 * configure: Likewise.
9560 2012-03-29 Pedro Alves <palves@redhat.com>
9562 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9563 Correct ptrace arguments.
9565 2012-03-28 Pedro Alves <palves@redhat.com>
9567 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9568 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9569 (IA64_FR1_REGNUM): New defines.
9570 (ia64_fetch_register): New.
9571 (the_low_target): Install it.
9572 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9574 * linux-low.c (linux_fetch_registers): Try the
9575 the_low_target.fetch_register hook first.
9577 * linux-arm-low.c (the_low_target): Adjust.
9578 * linux-bfin-low.c (the_low_target): Adjust.
9579 * linux-cris-low.c (the_low_target): Adjust.
9580 * linux-crisv32-low.c (the_low_target): Adjust.
9581 * linux-m32r-low.c (the_low_target): Adjust.
9582 * linux-m68k-low.c (the_low_target): Adjust.
9583 * linux-mips-low.c (the_low_target): Adjust.
9584 * linux-ppc-low.c (the_low_target): Adjust.
9585 * linux-s390-low.c (the_low_target): Adjust.
9586 * linux-sh-low.c (the_low_target): Adjust.
9587 * linux-sparc-low.c (the_low_target): Adjust.
9588 * linux-tic6x-low.c (the_low_target): Adjust.
9589 * linux-x86-low.c (the_low_target): Adjust.
9590 * linux-xtensa-low.c (the_low_target): Adjust.
9592 2012-03-26 Pedro Alves <palves@redhat.com>
9594 * server.c (handle_qxfer_libraries): Don't bail early if
9595 the_target->qxfer_libraries_svr4 is not NULL.
9597 2012-03-26 Pedro Alves <palves@redhat.com>
9599 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9601 2012-03-23 Pedro Alves <palves@redhat.com>
9603 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9604 "library-list-svr4" element's start tag when the the DSO list is
9607 2012-03-23 Pedro Alves <palves@redhat.com>
9609 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9610 a variable whose type size is the same as the inferior's pointer
9613 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9615 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9617 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9618 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9619 * linux-low.h: Include <signal.h>.
9620 (struct siginfo): Remove forward declaration.
9621 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9624 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9626 * .gitignore: Ignore more files.
9628 2012-03-19 Pedro Alves <palves@redhat.com>
9629 Jan Kratochvil <jan.kratochvil@redhat.com>
9631 * server.c (cont_thread, general_thread): Add describing comments.
9632 (start_inferior): Clear `cont_thread'.
9633 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9636 2012-03-15 Yao Qi <yao@codesourcery.com>
9638 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9640 (cmd_qtdp): ... here.
9642 2012-03-15 Yao Qi <yao@codesourcery.com>
9644 * tracepoint.c (struct tracepoint_action_ops): New.
9645 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9646 (m_tracepoint_action_download): New.
9647 (r_tracepoint_action_download): New.
9648 (x_tracepoint_action_download): New.
9649 (l_tracepoint_action_download): New.
9650 (add_tracepoint_action): Install `action->ops' according type.
9651 (download_tracepoint_1): Move code `download' function pointer
9652 of various tracepoint_action_ops.
9654 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9656 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9657 linux_ptrace_attach_warnings.
9659 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9661 * Makefile.in (linux-ptrace.o): New.
9662 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9663 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9664 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9665 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9666 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9668 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9670 2012-03-08 Yao Qi <yao@codesourcery.com>
9671 Pedro Alves <palves@redhat.com>
9673 Fix PR server/13392.
9674 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9676 * tracepoint.c (remove_tracepoint): New.
9677 (cmd_qtdp): Call remove_tracepoint when failed to install.
9679 2012-03-07 Pedro Alves <palves@redhat.com>
9681 * linux-low.c (get_detach_signal): New.
9682 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9683 Pass on pending signals to PTRACE_DETACH. Check the result of the
9685 * server.c (program_signals, program_signals_p): New.
9686 (handle_general_set): Handle QProgramSignals.
9687 * server.h (program_signals, program_signals_p): Declare.
9689 2012-03-05 Pedro Alves <palves@redhat.com>
9690 Jan Kratochvil <jan.kratochvil@redhat.com>
9692 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9695 2012-03-03 Yao Qi <yao@codesourcery.com>
9697 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9698 agent_look_up_symbols.
9700 2012-03-03 Yao Qi <yao@codesourcery.com>
9702 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9703 (linux-x86-low.o): Likewise.
9704 * server.h: Remove in_process_agent_loaded.
9705 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9709 2012-03-03 Yao Qi <yao@codesourcery.com>
9711 * tracepoint.c (gdb_agent_capability): New global.
9712 (in_process_agent_loaded_ust): Renamed to
9713 `in_process_agent_supports_ust'.
9715 (in_process_agent_supports_ust): Call agent_capability_check.
9716 (clear_installed_tracepoints): Assert that agent supports
9719 2012-03-03 Yao Qi <yao@codesourcery.com>
9721 * linux-low.c (linux_supports_agent): New.
9722 (linux_target_ops): Initialize field `supports_agent' with
9723 linux_supports_agent.
9724 * target.h (struct target_ops) <supports_agent>: New.
9725 (target_supports_agent): New macro.
9726 * server.c (handle_general_set): Handle packet 'QAgent'.
9727 (handle_query): Send `QAgent+'.
9728 * Makefile.in (server.o): Depends on agent.h.
9730 2012-03-03 Yao Qi <yao@codesourcery.com>
9732 * Makefile.in (OBS): Add agent.o.
9733 Add new rule for agent.o.
9734 Track dependence of tracepoint.c on agent.h.
9735 * tracepoint.c (run_inferior_command_1):
9736 (run_inferior_command): Call agent_run_command.
9737 (gdb_ust_connect_sync_socket): Deleted. Move it to
9739 (resume_thread, stop_thread): Likewise.
9740 (gdb_ust_socket_init): Renamed to ...
9741 (gdb_agent_socket_init): ... New.
9742 (gdb_ust_thread): Renamed to ...
9743 (gdb_agent_helper_thread): ... New.
9744 (gdb_ust_init): Move some code to ...
9745 (gdb_agent_init): ... here. New.
9746 [HAVE_UST]: Call gdb_ust_init.
9747 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9748 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9749 * config.in, configure: Regenerated.
9751 2012-03-02 Pedro Alves <palves@redhat.com>
9753 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9754 * linux-low.c (struct simple_pid_list): New.
9755 (stopped_pids): New a struct simple_pid_list pointer.
9756 (add_to_pid_list, pull_pid_from_list): New.
9757 (handle_extended_wait): Don't assume the first signal new children
9758 report is SIGSTOP. Adjust call to pull_pid_from_list.
9759 (linux_wait_for_lwp): Adjust.
9761 2012-03-02 Yao Qi <yao@codesourcery.com>
9763 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9766 2012-03-02 Yao Qi <yao@codesourcery.com>
9768 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9769 `stop_pc' and `tpoint'. Update caller.
9771 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9773 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9774 * linux-low.c (use_linux_regsets): New macro.
9775 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9776 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9777 (linux_register_in_regsets): New function.
9778 (usr_fetch_inferior_registers): Skip registers covered by
9780 (usr_store_inferior_registers): Likewise.
9781 (usr_fetch_inferior_registers): New macro.
9782 (usr_store_inferior_registers): Likewise.
9783 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9784 (linux_store_registers): Likewise.
9785 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9787 (init_registers_mips64_dsp_linux): Likewise.
9788 (init_registers_mips_linux): New macro.
9789 (init_registers_mips_dsp_linux): Likewise.
9790 (mips_dsp_num_regs): Likewise.
9791 (DSP_BASE, DSP_CONTROL): New fallback macros.
9792 (mips_base_regs): New macro.
9793 (mips_regmap): Use it. Fix the size.
9794 (mips_dsp_regmap): New variable.
9795 (mips_dsp_regset_bitmap): Likewise.
9796 (mips_arch_setup): New function.
9797 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9799 (mips_cannot_store_register): Likewise.
9800 (the_low_target): Update .arch_setup, .num_regs and .regmap
9801 initializers. Add .regset_bitmap initializer.
9802 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9804 * linux-bfin-low.c (the_low_target): Likewise.
9805 * linux-cris-low.c (the_low_target): Likewise.
9806 * linux-crisv32-low.c (the_low_target): Likewise.
9807 * linux-ia64-low.c (the_low_target): Likewise.
9808 * linux-m32r-low.c (the_low_target): Likewise.
9809 * linux-m68k-low.c (the_low_target): Likewise.
9810 * linux-ppc-low.c (the_low_target): Likewise.
9811 * linux-s390-low.c (the_low_target): Likewise.
9812 * linux-sh-low.c (the_low_target): Likewise.
9813 * linux-sparc-low.c (the_low_target): Likewise.
9814 * linux-tic6x-low.c (the_low_target): Likewise.
9815 * linux-x86-low.c (the_low_target): Likewise.
9816 * linux-xtensa-low.c (the_low_target): Likewise.
9817 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9818 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9819 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9821 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9822 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9824 2012-02-29 Yao Qi <yao@codesourcery.com>
9825 Pedro Alves <palves@redhat.com>
9827 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9828 `step_over_finished' is true.
9830 2012-02-27 Pedro Alves <palves@redhat.com>
9832 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9833 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9835 2012-02-27 Pedro Alves <palves@redhat.com>
9838 * linux-low.c (pid_is_stopped): New.
9839 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9841 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9843 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9846 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9848 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9850 2012-02-24 Luis Machado <lgustavo@codesourcery>
9852 * server.c (handle_query): Advertise support for target-side
9853 breakpoint condition evaluation.
9854 (process_point_options): New function.
9855 (process_serial_event): When inserting a breakpoint, check for
9856 a target-side condition that should be evaluated.
9858 * mem-break.c: Include regcache.h and ax.h.
9859 (point_cond_list_t): New data structure.
9860 (breakpoint) <cond_list>: New field.
9861 (find_gdb_breakpoint_at): Make non-static.
9862 (delete_gdb_breakpoint_at): Clear any target-side
9864 (clear_gdb_breakpoint_conditions): New function.
9865 (add_condition_to_breakpoint): Likewise.
9866 (add_breakpoint_condition): Likewise.
9867 (gdb_condition_true_at_breakpoint): Likewise.
9868 (gdb_breakpoint_here): Return result directly instead
9869 of going through a local variable.
9871 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9872 (clear_gdb_breakpoint_conditions): Likewise.
9873 (add_breakpoint_condition): Likewise.
9874 (gdb_condition_true_at_breakpoint): Likewise.
9876 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9877 (need_step_over_p): Take target-side breakpoint condition into
9880 2012-02-24 Luis Machado <lgustavo@codesourcery>
9882 * server.h: Include tracepoint.h.
9883 (agent_mem_read, agent_get_trace_state_variable_value,
9884 agent_set_trace_state_variable_value,
9885 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9886 get_set_tsv_func_addr): New prototypes.
9888 * ax.h: New include file.
9889 * ax.c: New source file.
9891 * tracepoint.c: Include ax.h.
9892 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9893 agent_expr, eval_result_type): Move to ax.h.
9894 (parse_agent_expr): Rename to ...
9895 (gdb_parse_agent_expr): ... this, make it non-static and move
9897 (unparse_agent_expr) Rename to ...
9898 (gdb_unparse_agent_expr): ... this, make it non-static and move
9900 (eval_agent_expr): Rename to ...
9901 (eval_tracepoint_agent_expr): ... this.
9902 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9903 forward declarations.
9904 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9905 (agent_get_trace_state_variable_value): New function.
9906 (agent_set_trace_state_variable_value): New function.
9907 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9908 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9909 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9910 (condition_true_at_tracepoint): Likewise.
9911 (parse_agent_expr): Rename to ...
9912 (gdb_parse_agent_expr): ... this and move to ax.c.
9913 (unparse_agent_expr): Rename to ...
9914 (gdb_unparse_agent_expr): ... this and move to ax.c.
9915 (gdb_agent_op_name): Move to ax.c.
9916 (eval_agent_expr): Rename to ...
9917 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9919 (eval_tracepoint_agent_expr): New function.
9920 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9922 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9924 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9925 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9926 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9927 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9928 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9929 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9930 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9931 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9932 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9933 (compile_bytecodes): Remove forward declaration.
9934 (is_goto_target): Move to ax.c.
9935 (compile_bytecodes): Move to ax.c and call
9936 agent_get_trace_state_variable_value (...) and
9937 agent_set_trace_state_variable_value (...).
9939 * Makefile.in: Update ax.c and IPA dependencies.
9941 2012-02-24 Pedro Alves <palves@redhat.com>
9943 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9944 (cmd_bigqtbuffer_circular): ... this. Only handle
9945 'QTBuffer:circular:'.
9946 (handle_tracepoint_general_set): Adjust.
9948 2012-02-16 Yao Qi <yao@codesourcery.com>
9950 * inferiors.c: Move code to ...
9951 * dll.c: .... here. New.
9952 * server.h: Declare clear_dlls.
9953 * Makefile.in (SFILES): Add dll.c.
9957 2012-02-11 Yao Qi <yao@codesourcery.com>
9959 * server.c: (handle_monitor_command): Add a new parameter
9961 (handle_query): Update caller.
9963 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9965 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9966 * configure, config.in: Regenerate.
9967 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9970 2012-02-02 Pedro Alves <palves@redhat.com>
9972 Try SIGKILL first, then PTRACE_KILL.
9973 * linux-low.c (linux_kill_one_lwp): New.
9974 (linux_kill_one_lwp): Rename to ...
9975 (kill_one_lwp_callback): ... this. Use the new
9978 2012-02-02 Pedro Alves <palves@redhat.com>
9980 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9983 2012-01-27 Pedro Alves <palves@redhat.com>
9985 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9986 (elf_64_file_p): Make static.
9987 (linux_pid_exe_is_elf_64_file): New.
9988 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9989 Delete declarations.
9990 (linux_pid_exe_is_elf_64_file): Declare.
9991 * linux-x86-low.c (x86_arch_setup): Use
9992 linux_pid_exe_is_elf_64_file.
9994 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9996 * linux-low.c (linux_wait_for_event_1): Rename to ...
9997 (linux_wait_for_event): ... here and merge it with former
9998 linux_wait_for_event - new variable wait_ptid, use it.
9999 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10001 2012-01-23 Pedro Alves <palves@redhat.com>
10003 * server.c (main): Avoid yet another case of infinite loop while
10004 detaching/killing after a longjmp.
10006 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10009 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10011 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10013 * hostio.c (handle_readlink): New function.
10014 (handle_vFile): Call it to handle "vFile:readlink" packets.
10016 2012-01-20 Pedro Alves <palves@redhat.com>
10017 Ulrich Weigand <ulrich.weigand@linaro.org>
10019 * server.c (handle_v_requests): Only support vAttach and vRun to
10020 start multiple processes when in extended protocol mode.
10022 2012-01-17 Pedro Alves <palves@redhat.com>
10024 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10025 memalign plus mprotect to allocate the scratch buffer.
10027 2012-01-13 Pedro Alves <palves@redhat.com>
10029 * server.c (attach_inferior): Clear `cont_thread'.
10031 2012-01-13 Pedro Alves <palves@redhat.com>
10033 * server.c (main): Avoid infinite loop while detaching/killing
10036 2012-01-09 Doug Evans <dje@google.com>
10038 * server.c (start_inferior): Set last_ptid in --wrapper case.
10040 2012-01-06 Yao Qi <yao@codesourcery.com>
10042 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10044 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10046 2012-01-04 Yao Qi <yao@codesourcery.com>
10048 * tracepoint.c (cmd_qtdp): Print debug message
10049 for static tracepoint.
10051 2012-01-04 Yao Qi <yao@codesourcery.com>
10053 * tracepoint.c (trace_vdebug): Differentiate debug message
10054 between gdbserver and IPA.
10056 2012-01-03 Yao Qi <yao@codesourcery.com>
10058 * tracepoint.c (tracepoint_was_hit): Don't collect for
10061 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10063 * terminal.h: Reformat copyright header.
10065 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10067 * server.c (gdbserver_version): Update copyright year.
10068 * gdbreplay.c (gdbreplay_version): Likewise.
10070 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10072 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10075 2011-12-18 Hui Zhu <teawater@gmail.com>
10076 * linux-low.c (linux_create_inferior): Save return value to ret.
10078 2011-12-18 Hui Zhu <teawater@gmail.com>
10080 * linux-low.c (linux_create_inferior): Save return value to ret.
10082 2011-12-16 Doug Evans <dje@google.com>
10084 * linux-low.c (linux_create_inferior): If stdio connection,
10085 redirect stdin from /dev/null, stdout to stderr.
10086 * remote-utils.c (remote_is_stdio): New static global.
10087 (remote_connection_is_stdio): New function.
10088 (remote_prepare): Handle stdio connection.
10089 (remote_open): Ditto.
10090 (remote_close): Don't close stdin for stdio connections.
10091 (read_prim,write_prim): New functions. Replace all calls to
10092 read/write to these.
10093 * server.c (main): Watch for "-" argument. Move call to
10094 remote_prepare before start_inferior.
10095 * server.h (STDIO_CONNECTION_NAME): New macro.
10096 (remote_connection_is_stdio): Declare.
10098 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10099 in debugging output.
10101 2011-12-15 Yao Qi <yao@codesourcery.com>
10103 * tracepoint.c: Include sys/syscall.h.
10104 (gdb_ust_thread): Remove preprocessor conditional.
10106 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10108 * linux-low.c (linux_detach_one_lwp): Call
10109 the_low_target.prepare_to_resume before detaching.
10111 2011-12-14 Yao Qi <yao@codesourcery.com>
10113 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10116 2011-12-14 Yao Qi <yao@codesourcery.com>
10118 * i386-low.c (i386_low_stopped_data_address): Initialize local
10119 variable `control'.
10121 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10125 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10126 DR_CONTROL unless necessary. Extend comments.
10127 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10128 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10130 2011-12-13 Yao Qi <yao@codesourcery.com>
10132 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10134 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10136 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10138 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10139 Print new debug message for such case.
10141 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10143 Fix overlapping memcpy.
10144 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10145 the read_inferior_memory transfer.
10146 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10147 write_inferior_memory transfer.
10148 (set_fast_tracepoint_jump): New variable buf. Use it for the
10149 read_inferior_memory and write_inferior_memory transfers.
10150 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10151 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10152 Use it for the write_inferior_memory transfer.
10153 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10156 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10158 * linux-low.c (fetch_register, store_register): Make code
10159 consistent, fix formatting.
10161 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10163 * linux-low.c (usr_store_inferior_registers): Factor out code
10164 to handle individual registers into...
10165 (store_register): ... this new function.
10167 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10169 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10170 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10171 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10172 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10173 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10174 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10175 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10176 (srv_xmlfiles): Add new XML files.
10178 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10180 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10181 (init_registers_s390_linux32v1): Add prototype.
10182 (init_registers_s390_linux32v2): Likewise.
10183 (init_registers_s390_linux64v1): Likewise.
10184 (init_registers_s390_linux64v2): Likewise.
10185 (init_registers_s390x_linux64v1): Likewise.
10186 (init_registers_s390x_linux64v2): Likewise.
10187 (s390_num_regs): Increment to 52.
10188 (s390_regmap): Add orig_r2 register.
10189 (s390_num_regs_3264): Increment to 68.
10190 (s390_regmap_3264): Add orig_r2 register.
10191 (s390_collect_ptrace_register): Handle orig_r2 register.
10192 (s390_supply_ptrace_register): Likewise.
10193 (s390_fill_last_break): New function.
10194 (s390_store_last_break): Likewise.
10195 (s390_fill_system_call): New function.
10196 (s390_store_system_call): Likewise.
10197 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10199 (s390_check_regset): New function.
10200 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10201 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10202 Update target_regsets for available register sets.
10204 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10205 Jan Kratochvil <jan.kratochvil@redhat.com>
10207 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10208 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10210 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10211 * linux-low.h (struct process_info_private): New member r_debug.
10212 * server.c (handle_qxfer_libraries): Call
10213 the_target->qxfer_libraries_svr4.
10214 (handle_qxfer_libraries_svr4): New function.
10215 (qxfer_packets): New entry "libraries-svr4".
10216 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10217 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10218 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10219 PACKET_qXfer_libraries_svr4.
10221 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10223 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10224 PSW address/mask between 8-byte and 16-byte formats.
10225 (s390_supply_ptrace_register): Likewise.
10226 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10227 basic addressing mode bit.
10229 2011-11-24 Stan Shebs <stan@codesourcery.com>
10231 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10233 2011-11-17 Stan Shebs <stan@codesourcery.com>
10235 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10236 (tracing_start_time): New global.
10237 (tracing_stop_time): New global.
10238 (tracing_user_name): New global.
10239 (tracing_notes): New global.
10240 (tracing_stop_note): New global.
10241 (cmd_qtstart): Set traceframe_usage, start_time.
10242 (stop_tracing): Set stop_time.
10243 (cmd_qtstatus): Report additional status.
10244 (cmd_qtp): New function.
10245 (handle_tracepoint_query): Call it.
10246 (cmd_qtnotes): New function.
10247 (handle_tracepoint_general_set): Call it.
10248 (get_timestamp): Rename from tsv_get_timestamp.
10250 2011-11-14 Stan Shebs <stan@codesourcery.com>
10251 Kwok Cheung Yeung <kcy@codesourcery.com>
10253 * linux-x86-low.c (small_jump_insn): New.
10254 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10255 trampoline and error message, build a trampoline and issue a small
10256 jump instruction to it.
10257 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10258 trampoline and error message.
10259 (x86_get_min_fast_tracepoint_insn_len): New.
10260 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10261 * linux-low.h (struct linux_target_ops): Add arguments to
10262 install_fast_tracepoint_jump_pad operation, add new operation.
10263 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10265 (linux_get_min_fast_tracepoint_insn_len): New function.
10266 (linux_target_op): Add new operation.
10267 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10268 (gdb_trampoline_buffer_end): Ditto.
10269 (gdb_trampoline_buffer_error): Ditto.
10270 (struct ipa_sym_addresses): Add fields for new IPA variables.
10271 (symbol_list): Add entries for new IPA variables.
10272 (struct tracepoint): Add fields to hold the address range of the
10273 trampoline used by the tracepoint.
10274 (trampoline_buffer_head): New static variable.
10275 (trampoline_buffer_tail): Ditto.
10276 (claim_trampoline_space): New function.
10277 (have_fast_tracepoint_trampoline_buffer): New function.
10278 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10280 (install_fast_tracepoint): Ditto, also add error buffer argument.
10281 (cmd_qtminftpilen): New function.
10282 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10283 (fast_tracepoint_from_trampoline_address): New function.
10284 (fast_tracepoint_collecting): Handle trampoline as part of jump
10286 (set_trampoline_buffer_space): New function.
10287 (initialize_tracepoint): Initialize new IPA variables.
10288 * target.h (struct target_ops): Add arguments to
10289 install_fast_tracepoint_jump_pad operation, add new
10290 get_min_fast_tracepoint_insn_len operation.
10291 (target_get_min_fast_tracepoint_insn_len): New.
10292 (install_fast_tracepoint_jump_pad): Add arguments.
10293 * server.h (IPA_BUFSIZ): Define.
10294 * linux-i386-ipa.c: Include extra header files.
10295 (initialize_fast_tracepoint_trampoline_buffer): New function.
10296 (initialize_low_tracepoint): Call it.
10297 * server.h (set_trampoline_buffer_space): Declare.
10298 (claim_trampoline_space): Ditto.
10299 (have_fast_tracepoint_trampoline_buffer): Ditto.
10301 2011-11-14 Yao Qi <yao@codesourcery.com>
10303 * server.c (handle_query): Handle InstallInTrace for qSupported.
10304 * tracepoint.c (add_tracepoint): Sort list.
10305 (install_tracepoint, download_tracepoint): New.
10306 (cmd_qtdp): Call them to install and download tracepoints.
10307 (sort_tracepoints): Removed.
10308 (cmd_qtstart): Update.
10310 2011-11-14 Yao Qi <yao@codesourcery.com>
10312 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10313 * mem-break.h: Declare.
10314 * tracepoint.c (cmd_qtstart): Move some code to ...
10315 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10317 (download_tracepoints): Move some code to ...
10318 (download_tracepoint_1): ... here. New.
10320 2011-11-08 Yao Qi <yao@codesourcery.com>
10322 * remote-utils.c (relocate_instruction): A comment fix.
10324 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10326 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10327 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10328 dr_status_mirror and dr_control_mirror from debug_reg_state.
10329 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10330 (i386_initial_stuff): Remove use of deleted globals.
10331 (i386_get_thread_context, i386_set_thread_context,
10332 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10333 from debug_reg_state.
10335 2011-11-05 Yao Qi <yao@codesourcery.com>
10337 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10338 address as TPOINT's.
10340 2011-11-02 Stan Shebs <stan@codesourcery.com>
10342 * tracepoint.c (agent_mem_read_string): New function.
10343 (eval_agent_expr): Call it for tracenz.
10344 * server.c (handle_query): Report support for tracenz.
10346 2011-11-02 Yao Qi <yao@codesourcery.com>
10348 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10350 2011-11-02 Yao Qi <yao@codesourcery.com>
10352 * target.h: Fix a typo in comment.
10354 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10356 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10357 clobber the breakpoints' shadows with fast tracepoint jumps.
10358 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10359 * target.c (write_inferior_memory): Also pass MYADDR down to
10362 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10364 * configure.ac: Check support for personality routine.
10365 * configure: Regenerate.
10366 * config.in: Likewise.
10367 * linux-low.c: Include <sys/personality.h>.
10368 Define ADDR_NO_RANDOMIZE if necessary.
10369 (linux_create_inferior): Disable address space randomization when
10370 forking inferior, if requested.
10371 (linux_supports_disable_randomization): New function.
10372 (linux_target_ops): Install it.
10373 * server.h (disable_randomization): Declare.
10374 * server.c (disable_randomization): New global variable.
10375 (handle_general_set): Handle QDisableRandomization.
10376 (handle_query): Likewise for qSupported.
10377 (main): Support --disable-randomization and --no-disable-randomization
10378 command line arguments.
10379 * target.h (struct target_ops): Add supports_disable_randomization.
10380 (target_supports_disable_randomization): New macro.
10382 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10384 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10386 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10387 [!PT_GETDSBT] (target_loadmap): New definition.
10388 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10389 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10390 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10391 and PT_GETDSBT to LINUX_LOADMAP.
10392 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10393 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10395 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10397 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10398 (arm_linux_hwbp_cap): New static variable.
10399 (arm_linux_get_hwbp_cap): Replace by ...
10400 (arm_linux_init_hwbp_cap): ... this new function.
10401 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10402 (arm_linux_get_hw_watchpoint_count): Likewise.
10403 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10404 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10405 (arm_prepare_to_resume): Use perror_with_name instead of error.
10407 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10409 * linux-arm-low.c: Include <signal.h>.
10410 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10411 (struct arm_linux_hwbp_cap): New data type.
10412 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10413 (struct arm_linux_hw_breakpoint): New data type.
10414 (MAX_BPTS, MAX_WPTS): Define.
10415 (struct arch_process_info, struct arch_lwp_info): New data types.
10416 (arm_linux_get_hwbp_cap): New function.
10417 (arm_linux_get_hw_breakpoint_count): Likewise.
10418 (arm_linux_get_hw_watchpoint_count): Likewise.
10419 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10420 (arm_hwbp_control_initialize): Likewise.
10421 (arm_hwbp_control_is_enabled): Likewise.
10422 (arm_hwbp_control_is_initialized): Likewise.
10423 (arm_hwbp_control_disable): Likewise.
10424 (arm_linux_hw_breakpoint_equal): Likewise.
10425 (arm_linux_hw_point_initialize): Likewise.
10426 (struct update_registers_data): New data structure.
10427 (update_registers_callback: New function.
10428 (arm_insert_point): Likewise.
10429 (arm_remove_point): Likewise.
10430 (arm_stopped_by_watchpoint): Likewise.
10431 (arm_stopped_data_address): Likewise.
10432 (arm_new_process): Likewise.
10433 (arm_new_thread): Likewise.
10434 (arm_prepare_to_resume): Likewise.
10435 (the_low_target): Register arm_insert_point, arm_remove_point,
10436 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10437 arm_new_thread, and arm_prepare_to_resume.
10439 2011-09-15 Stan Shebs <stan@codesourcery.com>
10441 * server.h (struct emit_ops): Add compare-goto fields.
10442 * tracepoint.c (gdb_agent_op_sizes): New table.
10443 (emit_eq_goto): New function.
10444 (emit_ne_goto): New function.
10445 (emit_lt_goto): New function.
10446 (emit_le_goto): New function.
10447 (emit_gt_goto): New function.
10448 (emit_ge_goto): New function.
10449 (is_goto_target): New function.
10450 (compile_bytecodes): Recognize special cases of compare-goto
10451 combinations and call specialized emitters for them.
10452 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10453 (amd64_emit_ne_goto): New function.
10454 (amd64_emit_lt_goto): New function.
10455 (amd64_emit_le_goto): New function.
10456 (amd64_emit_gt_goto): New function.
10457 (amd64_emit_ge_goto): New function.
10458 (amd64_emit_ops): Add the new functions.
10459 (i386_emit_eq_goto): New function.
10460 (i386_emit_ne_goto): New function.
10461 (i386_emit_lt_goto): New function.
10462 (i386_emit_le_goto): New function.
10463 (i386_emit_gt_goto): New function.
10464 (i386_emit_ge_goto): New function.
10465 (i386_emit_ops): Add the new functions.
10467 2011-09-08 Stan Shebs <stan@codesourcery.com>
10469 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10470 (i386_emit_epilogue): Restore %ebx.
10472 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10474 * server.c (step_thread): Remove definition.
10475 (process_serial_event): Don't handle Hs.
10476 * server.h (step_thread): Remove declaration.
10477 * target.c (set_desired_inferior): Remove use of step_thread.
10479 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10481 * linux-low.c: Include linux-procfs.h.
10482 (linux_attach_lwp_1): Update comments.
10483 (linux_attach): Scan for existing threads when attaching to a
10484 process that is the tgid.
10485 * Makefile.in: Update dependencies.
10487 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10489 * configure.srv: Add linux-procfs.o dependencies.
10491 2011-08-14 Yao Qi <yao@codesourcery.com>
10493 * target.h (struct target_ops): Fix indent.
10494 * win32-low.c (win32_target_ops): Fix comment.
10496 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10497 Yao Qi <yao@codesourcery.com>
10499 * Makefile.in (clean): Remove tic6x-*.c files.
10500 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10501 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10502 (tic6x-c64xp-linux.c): Likewise.
10503 * configure.srv: Add support for tic6x-*-uclinux.
10504 * linux-tic6x-low.c: New.
10505 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10507 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10508 Yao Qi <yao@codesourcery.com>
10510 * target.h (struct target_ops): Add read_loadmap.
10511 * linux-low.c (struct target_loadseg): New type.
10512 (struct target_loadmap): New type.
10513 (linux_read_loadmap): New function.
10514 (linux_target_ops): Add linux_read_loadmap.
10515 * server.c (handle_query): Support qXfer:fdpic:read packet.
10516 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10519 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10521 * win32-low.c: Include <stdint.h>.
10523 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10525 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10526 to the inferior here.
10527 (i386_remove_aligned_watchpoint): Ditto.
10528 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10529 fit part of the watchpoint in the debug registers.
10530 (i386_update_inferior_debug_regs): New.
10531 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10532 registers, and only update the inferior on success.
10533 (i386_low_remove_watchpoint): Ditto.
10535 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10537 * linux-low.c (compare_ints, unique, list_threads, show_process,
10538 linux_core_of_thread): Delete.
10539 (linux_target_ops): Change linux_core_of_thread to
10540 linux_common_core_of_thread.
10541 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10542 * utils.c (malloc_failure): Change type of argument.
10543 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10544 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10545 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10546 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10547 (IPA_OBJS): Add common-utils-ipa.o.
10548 (ptid_h, linux_osdata_h): New macros.
10549 (server_h): Add common/common-utils.h, common/xml-utils.h,
10550 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10552 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10553 ptid.o, buffer.o): New rules.
10554 (linux-low.o): Add common/linux-osdata.h as a dependency.
10555 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10556 * configure.ac: Add AC_HEADER_DIRENT check.
10557 * config.in: Regenerate.
10558 * configure: Regenerate.
10559 * remote-utils.c (xml_escape_text): Delete.
10560 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10561 buffer_xml_printf): Move to common/buffer.c.
10562 * server.c (main): Remove call to initialize_inferiors.
10563 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10564 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10565 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10566 internal_error, gdb_assert, gdb_assert_fail): Delete.
10567 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10568 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10570 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10571 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10572 initialize_inferiors): Delete.
10574 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10576 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10579 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10581 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10583 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10585 2011-05-26 Yao Qi <yao@codesourcery.com>
10587 * Makefile.in (thread-db.o): Track dependence to
10588 common/gdb_thread_db.h.
10589 * thread-db.c: include gdb_thread_db.h from right place.
10591 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10593 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10594 __FILE__ and __LINE__ to internal_error.
10596 2011-05-13 Doug Evans <dje@google.com>
10598 * thread-db.c (try_thread_db_load_from_sdir): New function.
10599 (try_thread_db_load_from_dir): New function.
10600 (thread_db_load_search): Handle $sdir, ignore $pdir.
10601 Remove trying of system directories if search of
10602 libthread-db-search-path fails, that is now done via $sdir.
10604 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10606 * server.c (handle_query): Add EnableDisableTracepoints to the list
10607 of supported features.
10608 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10610 (cmd_qtenable_disable): New.
10611 (cmd_qtstart): Install tracepoints even if disabled.
10612 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10613 receiving a QTEnable or QTDisable packet.
10614 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10615 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10617 (gdb_probe): Skip data collection if static tracepoint is disabled.
10619 2011-05-10 Doug Evans <dje@google.com>
10621 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10623 2011-05-04 Doug Evans <dje@google.com>
10625 * linux-low.c (linux_join): Skip process lookup.
10626 * spu-low.c (spu_join): Ditto.
10627 * server.c (join_inferiors_callback): Delete.
10628 (process_serial_event): For 'D' packet (detach) call join_inferior
10631 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10633 * README: Don't mention xscale*-*-linux*.
10634 * configure.srv (xscale*-*-linux*): Don't handle target.
10636 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10638 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10640 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10641 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10642 (i386_emit_void_call_2): Likewise.
10644 2011-04-26 Yao Qi <yao@codesourcery.com>
10646 * linux-low.c: Move common macros to linux-ptrace.h.
10647 Include linux-ptrace.h.
10648 * Makefile.in (linux_ptrace_h): New.
10649 (linux-low.o): Depends on linux-ptrace.h.
10651 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10653 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10654 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10655 (remote_prepare): New function with most of the TCP code from ...
10656 (remote_open): ... here. Detect PORT here unconditionally. Move also
10657 setting transport_is_reliable.
10658 * server.c (run_once): New variable.
10659 (gdbserver_usage): Document it.
10660 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10661 the first run if RUN_ONCE.
10662 * server.h (run_once, remote_prepare): New declarations.
10664 2011-04-19 Tom Tromey <tromey@redhat.com>
10666 * win32-low.c (handle_load_dll): Remove duplicate "the".
10668 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10670 Remove support for old Cygwin 1.5 versions.
10671 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10672 function to avoid warning.
10673 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10676 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10678 * gdbserver/server.h (Macro _): Define it if not available.
10680 2011-03-14 Michael Snyder <msnyder@vmware.com>
10682 * hostio.c (handle_close): Remove unnecessary null test.
10684 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10686 * Makefile.in (maintainer-clean realclean distclean): Remove
10687 "make ... subdir_do" command.
10689 2011-03-10 Michael Snyder <msnyder@vmware.com>
10691 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10693 * server.c (handle_v_run): Free alloced buffer on early return.
10695 2011-03-09 Yao Qi <yao@codesourcery.com>
10698 2011-03-04 Yao Qi <yao@codesourcery.com>
10700 * Makefile.in: Remove GNU make feature --directory.
10702 2011-03-05 Yao Qi <yao@codesourcery.com>
10704 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10705 (subdir_do): New make target. Copied from gdb/Makefile.
10706 (maintainer-clean, realclean, distclean, clean): Call corresponding
10707 make targets in common/Makefile.
10709 2011-02-11 Yao Qi <yao@codesourcery.com>
10711 * configure.ac: Call AC_PROG_RANLIB.
10712 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10713 * configure: Regenerate.
10715 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10717 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10719 2011-03-06 Yao Qi <yao@codesourcery.com>
10721 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10723 2011-03-05 Yao Qi <yao@codesourcery.com>
10725 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10726 (subdir_do): New make target. Copied from gdb/Makefile.
10727 (maintainer-clean, realclean, distclean, clean): Call corresponding
10728 make targets in common/Makefile.
10730 2011-03-04 Yao Qi <yao@codesourcery.com>
10732 * Makefile.in: Remove GNU make feature --directory.
10734 2011-03-04 Michael Snyder <msnyder@vmware.com>
10736 * server.c (queue_stop_reply): Call xmalloc not malloc.
10738 2011-03-02 Michael Snyder <msnyder@vmware.com>
10740 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10742 2011-02-28 Michael Snyder <msnyder@vmware.com>
10744 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10745 (cmd_qtframe): Ditto.
10746 (cmd_qtbuffer): Ditto.
10747 (cmd_bigqtbuffer): Ditto.
10749 * utils.c (decimal2str): Initialize 'width' to nine, then
10750 don't mess with it.
10752 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10754 * hostio.c (require_data): Free *data, not data.
10756 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10758 * hostio.c (require_data): Use free, not xfree.
10760 2011-02-27 Michael Snyder <msnyder@vmware.com>
10762 * server.c (handle_query): Discard unused value.
10764 * hostio.c (require_data): Free malloc memory before returning
10767 2011-02-26 Michael Snyder <msnyder@vmware.com>
10769 * linux-low.c (list_threads): Call closedir for dirent.
10771 2011-02-27 Michael Snyder <msnyder@vmware.com>
10773 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10774 a case statement falls through.
10776 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10778 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10781 2011-02-26 Michael Snyder <msnyder@vmware.com>
10783 * utils.c (decimal2str): Eliminate dead code and dead param.
10784 (pulongest): Drop dead param from call to decimal2str.
10787 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10789 Revert the following patch (not approved yet):
10790 2011-02-21 Hui Zhu <teawater@gmail.com>
10791 * tracepoint.c (tp_printf): New function.
10792 (eval_agent_expr): Handle gdb_agent_op_printf.
10794 2011-02-21 Hui Zhu <teawater@gmail.com>
10796 * tracepoint.c (tp_printf): New function.
10797 (eval_agent_expr): Handle gdb_agent_op_printf.
10799 2011-02-18 Tom Tromey <tromey@redhat.com>
10801 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10802 (tracepoint.o): Likewise.
10803 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10804 (gdb_agent_op_names): Likewise.
10806 2011-02-18 Tom Tromey <tromey@redhat.com>
10808 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10809 gdb_agent_op_rot>: New constants.
10810 (gdb_agent_op_names): Add pick and roll.
10811 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10814 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10816 * aclocal.m4: Regenerated with aclocal-1.11.1.
10818 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10820 * server.c (handle_qxfer_traceframe_info): New.
10821 (qxfer_packets): Register "traceframe-info".
10822 (handle_query): Report support for qXfer:traceframe-info:read+.
10823 * tracepoint.c (match_blocktype): New.
10824 (traceframe_find_block_type): Rename to ...
10825 (traceframe_walk_blocks): ... this. Add callback filter argument,
10827 (traceframe_find_block_type): New, reimplemented on top of
10828 traceframe_walk_blocks.
10829 (build_traceframe_info_xml): New.
10830 (traceframe_read_info): New.
10831 * server.h (traceframe_read_info): Declare.
10833 2011-02-11 Yao Qi <yao@codesourcery.com>
10835 * configure.ac: Call AC_PROG_RANLIB.
10836 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10837 * configure: Regenerate.
10839 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10841 * server.c (gdb_read_memory): Change return semantics to allow
10843 (handle_search_memory_1): Adjust.
10844 (process_serial_event) <'m' packet>: Handle partial transfers.
10845 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10847 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10849 * regcache.c (init_register_cache): Initialize
10850 regcache->register_status.
10851 (free_register_cache): Release regcache->register_status.
10852 (regcache_cpy): Copy register_status.
10853 (registers_to_string): Print 'x's for unavailable registers.
10854 (supply_register): Mark the register's status valid or
10855 unavailable, depending on whether a buffer was passed in or not.
10856 (supply_register_zeroed): New.
10857 (supply_regblock): Mark the registers' status valid or
10858 unavailable, depending on whether a buffer was passed in or not.
10859 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10860 (struct regcache): New `register_status' field.
10861 (supply_register_zeroed): Declare.
10862 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10863 supply_register_zeroed, rather than passing a NULL buffer to
10865 * tracepoint.c (fetch_traceframe_registers): Update comment.
10867 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10869 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10872 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10874 * server.h (decode_xfer_write): Change prototype.
10875 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10876 and don't extract the annex here.
10877 * server.c (decode_xfer_read): Remove `annex' parameter,
10878 and don't extract the annex here.
10879 (decode_xfer): New.
10880 (struct qxfer): New.
10881 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10882 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10883 (handle_qxfer_statictrace): New functions, abstracted out from
10884 handle_query, and made to use the struct qxfer interface.
10885 (handle_threads_qxfer_proper): Rename to ...
10886 (handle_qxfer_threads_proper): ... this.
10887 (handle_threads_qxfer): Rename to ...
10888 (handle_qxfer_threads): ... this. Adjust.
10889 (qxfer_packets): New array.
10890 (handle_qxfer): New function.
10891 (handle_query): Use handle_qxfer.
10893 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10895 * gdbreplay.c: Shorten lines of >= 80 columns.
10896 * linux-low.c: Ditto.
10897 * linux-ppc-low.c: Ditto.
10898 * linux-s390-low.c: Ditto.
10899 * linux-sparc-low.c: Ditto.
10900 * linux-x86-low.c: Ditto.
10901 * linux-xtensa-low.c: Ditto.
10902 * mem-break.c: Ditto.
10903 * nto-low.c: Ditto.
10904 * regcache.h: Ditto.
10905 * remote-utils.c: Ditto.
10908 * thread-db.c: Ditto.
10909 * tracepoint.c: Ditto.
10911 * win32-low.h: Ditto.
10913 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10915 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10918 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10920 * server.c (gdbserver_version): Update copyright year in version
10922 * gdbreplay.c (gdbreplay_version): Ditto.
10924 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10926 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10927 * linux-bfin-low.c: New file.
10928 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10929 PT_DATA_ADDR for BFIN targets.
10930 * Makefile.in (SFILES): Add linux-bfin-low.c.
10931 (clean): Remove reg-bfin.c.
10932 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10933 * README: Mention supported Blackfin targets.
10935 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10937 * .gitignore: New file.
10939 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10941 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10943 2010-10-22 Jie Zhang <jie@codesourcery.com>
10945 * Makefile.in: Add FLAGS_TO_PASS variable.
10946 (install): Remove dependency of install-only and recursively
10947 invoke make for install-only.
10949 2010-10-04 Doug Evans <dje@google.com>
10951 * Makefile.in (uninstall): Use $(DESTDIR).
10953 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10957 * linux-x86-low.c (compat_siginfo_from_siginfo)
10958 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10959 si_code is < 0. Check for si_code == SI_TIMER before checking for
10962 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10964 * lynx-i386-low.c: New file.
10965 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10967 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10969 * lynx-low.c (ptrace_request_to_str): Remove handling for
10970 request values that have been removed in LynxOS 5.x.
10972 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10974 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10977 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10979 * configure.ac: Add --enable-inprocess-agent option.
10980 * configure: Rebuilt.
10982 2010-09-06 Yao Qi <yao@codesourcery.com>
10984 * linux-low.c (linux_kill): Remove unused variable.
10985 (linux_stabilize_threads): Likewise.
10986 * server.c (start_inferior): Likewise.
10987 (queue_stop_reply_callback): Likewise.
10988 * tracepoint.c (do_action_at_tracepoint): Likewise.
10990 2010-09-06 Yao Qi <yao@codesourcery.com>
10992 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10995 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10997 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10999 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11001 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11004 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11006 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11007 gdbserver/lynx-ppc-low.c: New files.
11008 * Makefile.in (lynx_low_h): New variable.
11009 (lynx-low.o, lynx-ppc-low.o): New rules.
11010 * configure.ac: On LynxOS, link with -lnetinet.
11011 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11012 * configure: regenerate.
11014 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11016 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11017 * configure.ac: Add check for vasprintf and vsnprintf.
11018 * configure, config.in: Regenerate.
11019 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11021 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11023 * gdbreplay.c: Move include of alloca.h up, next to include of
11025 * server.h: Add include of malloc.h.
11026 * mem-break.c: Remove include of malloc.h.
11027 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11029 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11031 * Makefile.in (memmem.o): Build with -Wno-error.
11033 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11035 * utils.c (xsnprintf): Make non-static.
11036 * server.h: Add xsnprintf declaration.
11037 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11038 replace calls to snprintf by calls to xsnprintf throughout.
11040 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11042 * configure.ac: Add configure check for alloca.
11043 * configure, config.in: Regenerate.
11044 * server.h: Include alloca.h if it exists.
11045 * gdbreplay.c: Include alloca.h if it exists.
11047 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11049 * linux-low.c (__SIGRTMIN): Define if not already defined.
11050 (linux_create_inferior): Check for __ANDROID__ rather than
11052 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11053 are already deferred.
11054 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11055 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11056 stopped and already has a pending signal to report.
11057 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11058 a pending signal to report or is moving out of a jump pad.
11059 (linux_init_signals): Check for __ANDROID__ rather than
11062 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11064 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11065 debug_threads check. Avoid a linear search when not doing debug
11068 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11070 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11071 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11072 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11073 (process_event): Change local fd's type to gdb_fildes_t.
11074 (create_file_handler): Adjust prototype.
11075 (delete_file_handler): Adjust prototype.
11076 (handle_file_event): Adjust prototype. Use pfildes.
11077 (create_file_event): Adjsut prototype.
11078 * remote-utils.c (remote_desc, listen_desc): Change type to
11080 * server.h: New gdb_fildes_t typedef.
11081 [USE_WIN32API]: Include winsock2.h.
11082 (delete_file_handler, add_file_handler): Adjust prototypes.
11083 (pfildes): Declare.
11084 * utils.c (pfildes): New.
11086 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11088 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11089 * configure: Regenerate.
11091 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11093 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11094 (linux_done_accessing_memory): ... this.
11095 (linux_target_ops): Adjust.
11096 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11097 * nto-low.c (nto_target_ops): Adjust comment.
11098 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11099 * spu-low.c (spu_target_ops): Adjust comment.
11100 * target.h (target_ops): Rename unprepare_to_access_memory field
11101 to done_accessing_memory.
11102 (unprepare_to_access_memory): Rename to ...
11103 (done_accessing_memory): ... this.
11105 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11107 * linux-low.c (linux_prepare_to_access_memory): New.
11108 (linux_unprepare_to_access_memory): New.
11109 (linux_target_ops): Install them.
11110 * server.c (read_memory): Rename to ...
11111 (gdb_read_memory): ... this. Use
11112 prepare_to_access_memory/prepare_to_access_memory.
11113 (write_memory): Rename to ...
11114 (gdb_write_memory): ... this. Use
11115 prepare_to_access_memory/prepare_to_access_memory.
11116 (handle_search_memory_1): Adjust.
11117 (process_serial_event): Adjust.
11118 * target.h (struct target_ops): New fields
11119 prepare_to_access_memory and unprepare_to_access_memory.
11120 (prepare_to_access_memory, unprepare_to_access_memory): New.
11121 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11122 prepare_to_access_memory/prepare_to_access_memory.
11123 * nto-low.c (nto_target_ops): Adjust.
11124 * spu-low.c (spu_target_ops): Adjust.
11125 * win32-low.c (win32_target_ops): Adjust.
11127 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11129 * Makefile.in (WARN_CFLAGS): Get it from configure.
11130 (WERROR_CFLAGS): New.
11131 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11132 * configure.ac: Introduce --enable-werror, which adds -Werror to
11133 the compiler command line. Enabled by default. Disable with
11134 --disable-werror. Add -Wdeclaration-after-statement
11135 Wpointer-arith and -Wformat-nonliteral to warning flags.
11136 * configure: Regenerate.
11138 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11140 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11142 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11144 * gdbreplay.c (remote_error): New.
11146 (expect): Use gdbchar. Check for error reading from GDB.
11147 Clarify sync error output.
11148 (play): Check for errors writing to GDB.
11149 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11150 * remote-utils.c (getpkt): Check for errors writing to the remote
11153 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11155 * linux-low.c (linux_wait_1): Move non-debugging code out of
11156 `debug_threads' control.
11158 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11160 * linux-low.c (linux_wait_1): Don't set last_status here.
11161 * server.c (push_event, queue_stop_reply_callback): Assert we're
11162 not pushing a TARGET_WAITKIND_IGNORE event.
11163 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11164 (myresume, handle_target_event): Set the thread's last_resume_kind
11165 and last_status from the target returned status.
11167 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11171 * linux-x86-low.c (update_debug_registers_callback): New.
11172 (i386_dr_low_set_addr): Use it.
11173 (i386_dr_low_get_addr): New.
11174 (i386_dr_low_set_control): Use update_debug_registers_callback.
11175 (i386_dr_low_get_control): New.
11176 (i386_dr_low_get_status): Adjust.
11177 * linux-low.c (linux_stop_lwp): New.
11178 * linux-low.h (linux_stop_lwp): Declare.
11180 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11181 argument instead of a i386_debug_reg_state.
11182 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11183 a i386_debug_reg_state.
11184 (i386_insert_aligned_watchpoint): Adjust.
11185 (i386_remove_aligned_watchpoint): Adjust.
11186 (i386_low_stopped_data_address): Read the debug registers from the
11187 inferior instead of from the mirrors.
11188 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11189 (i386_dr_low_get_addr): Declare.
11190 (i386_dr_low_get_control): Declare.
11191 (i386_dr_low_get_status): Change prototype.
11193 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11194 (i386_dr_low_get_addr): New.
11195 (i386_dr_low_get_control): New.
11196 (i386_dr_low_get_status): Adjust prototype. Return
11198 (i386_initial_stuff): Clear dr_status_mirror and
11200 (i386_get_thread_context): Adjust.
11201 (i386_set_thread_context): Adjust.
11202 (i386_thread_added): Adjust.
11204 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11206 * linux-low.h (linux_thread_area): Delete declaration.
11208 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11210 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11211 after its termination.
11213 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11215 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11216 (gdb_wants_all_stopped): Delete.
11217 (linux_wait_1): Don't call them.
11218 * server.c (handle_v_cont): Tag all threads as want-stopped.
11219 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11220 stopped as "client-wants-stopped".
11222 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11224 * Makefile.in (signals_h): New.
11225 (server_h): Depend on it.
11226 (server.o): Don't depend on $(signals_def).
11227 (signals.o): Depend on $(signals_def).
11229 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11231 * Makefile.in (signals_def): New.
11232 (server_h): Append include/gdb/signals.h and signals_def.
11233 (server.o): Append signals_def.
11235 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11237 * server.c (handle_target_event): Use target_signal_to_host for
11238 resume_info.sig initialization.
11239 * target.h (struct thread_resume) <sig>: New comment.
11241 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11243 * server.c (handle_query): strcpy() the returned string from paddress()
11244 instead of sprintf().
11245 * utils.c (paddress): Return phex_nz().
11247 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11249 * server.c (handle_v_cont): Call mourn_inferior if process
11251 (myresume): Likewise.
11253 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11255 Static tracepoints, and integration with UST.
11257 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11258 * mem-break.c (uninsert_all_breakpoints)
11259 (reinsert_all_breakpoints): New.
11260 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11261 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11262 (gdb_agent_ust_loaded, helper_thread_id)
11263 (gdb_agent_helper_thread_id): New macros.
11264 (struct ipa_sym_addresses): Add addr_ust_loaded,
11265 addr_helper_thread_id, addr_cmd_buf.
11266 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11267 (in_process_agent_loaded_ust): New.
11268 (write_e_ust_not_loaded): New.
11269 (maybe_write_ipa_ust_not_loaded): New.
11270 (struct collect_static_trace_data_action): New.
11271 (enum tracepoint_type) <static_tracepoint>: New.
11272 (struct tracepoint) <handle>: Mention static tracepoints.
11273 (struct static_tracepoint_ctx): New.
11274 (CMD_BUF_SIZE): New.
11275 (add_tracepoint_action): Handle static tracepoint actions.
11276 (unprobe_marker_at): New.
11277 (clear_installed_tracepoints): Handle static tracepoints.
11278 (cmd_qtdp): Handle static tracepoints.
11279 (probe_marker_at): New.
11280 (cmd_qtstart): Handle static tracepoints.
11281 (response_tracepoint): Handle static tracepoints.
11282 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11283 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11284 (get_context_regcache): Handle static tracepoints.
11285 (do_action_at_tracepoint): Handle static tracepoint actions.
11286 (traceframe_find_block_type): Handle static trace data blocks.
11287 (traceframe_read_sdata): New.
11288 (download_tracepoints): Download static tracepoint actions.
11289 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11290 (GDB_PROBE_NAME): New.
11292 (GET_UST_SYM): New.
11295 (ust_marker_to_static_tracepoint): New.
11297 (collect_ust_data_at_tracepoint): New.
11298 (gdb_ust_probe): New.
11299 (UNIX_PATH_MAX, SOCK_DIR): New.
11300 (gdb_ust_connect_sync_socket): New.
11301 (resume_thread, stop_thread): New.
11302 (run_inferior_command): New.
11303 (init_named_socket): New.
11304 (gdb_ust_socket_init): New.
11305 (cstr_to_hexstr): New.
11307 (first_marker, next_marker): New.
11308 (response_ust_marker): New.
11309 (cmd_qtfstm, cmd_qtsstm): New.
11310 (unprobe_marker_at, probe_marker_at): New.
11311 (cmd_qtstmat, gdb_ust_thread): New.
11312 (gdb_ust_init): New.
11313 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11314 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11315 (ST_REGENTRY): New.
11316 (x86_64_st_collect_regmap): New.
11317 (X86_64_NUM_ST_COLLECT_GREGS): New.
11318 (AMD64_RIP_REGNUM): New.
11319 (supply_static_tracepoint_registers): New.
11320 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11321 (ST_REGENTRY): New.
11322 (i386_st_collect_regmap): New.
11323 (i386_NUM_ST_COLLECT_GREGS): New.
11324 (supply_static_tracepoint_registers): New.
11325 * server.c (handle_query): Handle qXfer:statictrace:read.
11326 <qSupported>: Report support for StaticTracepoints, and
11327 qXfer:statictrace:read features.
11328 * server.h (traceframe_read_sdata)
11329 (supply_static_tracepoint_registers): Declare.
11330 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11331 (unpack_varlen_hex): Include in IPA build.
11332 * Makefile.in (ustlibs, ustinc): New.
11333 (IPA_OBJS): Add remote-utils-ipa.o.
11334 ($(IPA_LIB)): Link -ldl and -lpthread.
11336 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11337 * config.in, configure: Regenerate.
11339 2010-06-20 Ian Lance Taylor <iant@google.com>
11340 Pedro Alves <pedro@codesourcery.com>
11342 * linux-x86-low.c (always_true): Delete.
11343 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11344 trying to fool the compiler with always_true.
11346 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11348 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11349 conditions in gdbserver.
11351 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11353 * spu-low.c (spu_read_memory): Wrap around local store limit.
11354 (spu_write_memory): Likewise.
11356 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11358 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11359 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11361 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11363 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11364 uses with LONGEST uses.
11366 2010-06-14 Stan Shebs <stan@codesourcery.com>
11367 Pedro Alves <pedro@codesourcery.com>
11371 * linux-x86-low.c: Include limits.h.
11373 (always_true): New.
11376 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11377 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11378 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11379 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11380 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11381 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11382 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11383 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11384 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11385 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11386 (amd64_emit_void_call_2): New.
11387 (amd64_emit_ops): New.
11388 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11389 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11390 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11391 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11392 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11393 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11394 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11395 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11396 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11397 (i386_emit_stack_adjust, i386_emit_int_call_1)
11398 (i386_emit_void_call_2): New.
11399 (i386_emit_ops): New.
11400 (x86_emit_ops): New.
11401 (the_low_target): Install x86_emit_ops.
11402 * server.h (struct emit_ops): New.
11403 (get_raw_reg_func_addr): Declare.
11404 (current_insn_ptr, emit_error): Declare.
11405 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11406 (set_trace_state_variable_value): New defines.
11407 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11408 addr_get_trace_state_variable_value and
11409 addr_set_trace_state_variable_value.
11410 (symbol_list): New fields for get_raw_reg,
11411 get_trace_state_variable_value and set_trace_state_variable_value.
11412 (condfn): New typedef.
11413 (struct tracepoint): New field `compiled_cond'.
11414 (do_action_at_tracepoint): Clear compiled_cond.
11415 (get_trace_state_variable_value, set_trace_state_variable_value):
11417 (condition_true_at_tracepoint): If there's a compiled condition,
11419 (current_insn_ptr, emit_error): New globals.
11420 (struct bytecode_address): New.
11421 (get_raw_reg_func_addr): New.
11422 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11423 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11424 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11425 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11426 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11427 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11428 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11429 (compile_tracepoint_condition, compile_bytecodes): New.
11430 * target.h (emit_ops): Forward declare.
11431 (struct target_ops): New field emit_ops.
11432 (target_emit_ops): New.
11433 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11434 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11435 * linux-low.c (linux_emit_ops): New.
11436 (linux_target_ops): Install it.
11437 * linux-low.h (struct linux_target_ops): New field emit_ops.
11439 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11441 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11442 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11444 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11445 Stan Shebs <stan@codesourcery.com>
11447 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11448 (all): Depend on $(extra_libraries).
11449 (install-only): Install the IPA.
11450 (IPA_OBJS, IPA_LIB): New.
11451 (clean): Remove the IPA lib.
11452 (IPAGENT_CFLAGS): New.
11453 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11454 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11455 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11456 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11457 * configure.ac: Check for atomic builtins support in the compiler.
11458 (IPA_DEPFILES, extra_libraries): Define.
11459 * configure.srv (ipa_obj): Add description.
11460 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11461 (i[34567]86-*-linux*): Set ipa_obj.
11462 (x86_64-*-linux*): Set ipa_obj.
11463 * linux-low.c (stabilizing_threads): New.
11464 (supports_fast_tracepoints): New.
11465 (linux_detach): Stabilize threads before detaching.
11466 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11467 the lwp is either not stabilizing, or is moving out of a jump pad.
11468 (linux_fast_tracepoint_collecting): New.
11469 (maybe_move_out_of_jump_pad): New.
11470 (enqueue_one_deferred_signal): New.
11471 (dequeue_one_deferred_signal): New.
11472 (linux_wait_for_event_1): If moving out of a jump pad, defer
11473 pending signals to later.
11474 (linux_stabilize_threads): New.
11475 (linux_wait_1): Check if threads need moving out of jump pads, and
11477 (stuck_in_jump_pad_callback): New.
11478 (move_out_of_jump_pad_callback): New.
11479 (lwp_running): New.
11480 (linux_resume_one_lwp): Handle moving out of jump pads.
11481 (linux_set_resume_request): Dequeue deferred signals.
11482 (need_step_over_p): Also step over fast tracepoint jumps.
11483 (start_step_over): Also uninsert fast tracepoint jumps.
11484 (finish_step_over): Also reinsert fast tracepoint jumps.
11485 (linux_install_fast_tracepoint_jump): New.
11486 (linux_target_ops): Install linux_stabilize_threads and
11487 linux_install_fast_tracepoint_jump_pad.
11488 * linux-low.h (linux_target_ops) <get_thread_area,
11489 install_fast_tracepoint_jump_pad>: New fields.
11490 (struct lwp_info) <collecting_fast_tracepoint,
11491 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11492 (linux_get_thread_area): Declare.
11493 * linux-x86-low.c (jump_insn): New.
11494 (x86_get_thread_area): New.
11495 (append_insns): New.
11496 (push_opcode): New.
11497 (amd64_install_fast_tracepoint_jump_pad): New.
11498 (i386_install_fast_tracepoint_jump_pad): New.
11499 (x86_install_fast_tracepoint_jump_pad): New.
11500 (the_low_target): Install x86_get_thread_area and
11501 x86_install_fast_tracepoint_jump_pad.
11502 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11503 (struct fast_tracepoint_jump): New.
11504 (fast_tracepoint_jump_insn): New.
11505 (fast_tracepoint_jump_shadow): New.
11506 (find_fast_tracepoint_jump_at): New.
11507 (fast_tracepoint_jump_here): New.
11508 (delete_fast_tracepoint_jump): New.
11509 (set_fast_tracepoint_jump): New.
11510 (uninsert_fast_tracepoint_jumps_at): New.
11511 (reinsert_fast_tracepoint_jumps_at): New.
11512 (set_breakpoint_at): Use write_inferior_memory.
11513 (uninsert_raw_breakpoint): Use write_inferior_memory.
11514 (check_mem_read): Mask out fast tracepoint jumps.
11515 (check_mem_write): Mask out fast tracepoint jumps.
11516 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11517 (set_fast_tracepoint_jump): Declare.
11518 (delete_fast_tracepoint_jump)
11519 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11520 (reinsert_fast_tracepoint_jumps_at): Declare.
11521 * regcache.c: Don't compile many functions when building the
11522 in-process agent library.
11523 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11524 the register buffer in the heap.
11525 (free_register_cache): If the register buffer isn't owned by the
11526 regcache, don't free it.
11527 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11528 pre-existing register caches.
11529 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11531 (convert_ascii_to_int): : Constify `from' parameter type.
11532 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11533 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11534 the needed buffer in-place.
11535 (relocate_instruction): New.
11536 * server.c (handle_query) <qSymbols>: If the target supports
11537 tracepoints, give it a chance of looking up symbols. Report
11538 support for fast tracepoints.
11539 (handle_status): Stabilize threads.
11540 (process_serial_event): Adjust.
11541 * server.h (struct fast_tracepoint_jump): Forward declare.
11542 (struct process_info) <fast_tracepoint_jumps>: New field.
11543 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11544 (decode_X_packet, decode_M_packet): Adjust.
11545 (relocate_instruction): Declare.
11546 (in_process_agent_loaded): Declare.
11547 (tracepoint_look_up_symbols): Declare.
11548 (struct fast_tpoint_collect_status): Declare.
11549 (fast_tracepoint_collecting): Declare.
11550 (force_unlock_trace_buffer): Declare.
11551 (handle_tracepoint_bkpts): Declare.
11552 (initialize_low_tracepoint)
11553 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11554 * target.h (struct target_ops) <stabilize_threads,
11555 install_fast_tracepoint_jump_pad>: New fields.
11556 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11557 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11558 [HAVE_STDINT_H]: Include stdint.h.
11559 (trace_debug_1): Rename to ...
11560 (trace_vdebug): ... this.
11561 (trace_debug): Rename to ...
11562 (trace_debug_1): ... this. Add `level' parameter.
11563 (trace_debug): New.
11564 (ATTR_USED, ATTR_NOINLINE): New.
11565 (IP_AGENT_EXPORT): New.
11566 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11567 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11568 (about_to_request_buffer_space, trace_buffer_is_full)
11569 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11570 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11571 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11572 (traceframe_write_count, traceframes_created)
11573 (trace_state_variables)
11574 New renaming defines.
11575 (struct ipa_sym_addresses): New.
11576 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11577 (symbol_list): New.
11578 (ipa_sym_addrs): New.
11579 (all_tracepoint_symbols_looked_up): New.
11580 (in_process_agent_loaded): New.
11581 (write_e_ipa_not_loaded): New.
11582 (maybe_write_ipa_not_loaded): New.
11583 (tracepoint_look_up_symbols): New.
11584 (debug_threads) [IN_PROCESS_AGENT]: New.
11585 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11586 (UNKNOWN_SIDE_EFFECTS): New.
11587 (stop_tracing): New.
11588 (flush_trace_buffer): New.
11589 (stop_tracing_bkpt): New.
11590 (flush_trace_buffer_bkpt): New.
11591 (read_inferior_integer): New.
11592 (read_inferior_uinteger): New.
11593 (read_inferior_data_pointer): New.
11594 (write_inferior_data_pointer): New.
11595 (write_inferior_integer): New.
11596 (write_inferior_uinteger): New.
11597 (struct collect_static_trace_data_action): Delete.
11598 (enum tracepoint_type): New.
11599 (struct tracepoint) <type>: New field `type'.
11600 <actions_str, step_actions, step_actions_str>: Only include in
11602 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11603 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11604 (tracepoints): Use IP_AGENT_EXPORT.
11605 (last_tracepoint): Don't include in the IPA.
11606 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11607 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11608 (alloced_trace_state_variables): New.
11609 (trace_state_variables): Use IP_AGENT_EXPORT.
11610 (traceframe_t): Delete unused variable.
11611 (circular_trace_buffer): Don't include in the IPA.
11612 (trace_buffer_start): Delete.
11613 (struct trace_buffer_control): New.
11614 (trace_buffer_free): Delete.
11615 (struct ipa_trace_buffer_control): New.
11616 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11617 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11619 (trace_buffer_ctrl): New.
11620 (TRACE_BUFFER_CTRL_CURR): New.
11621 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11622 Reimplement as macros.
11623 (trace_buffer_wrap): Delete.
11624 (traceframe_write_count, traceframe_read_count)
11625 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11626 (struct tracepoint_hit_ctx) <type>: New field.
11627 (struct fast_tracepoint_ctx): New.
11628 (memory_barrier): New.
11630 (record_tracepoint_error): Update atomically in the IPA.
11631 (clear_inferior_trace_buffer): New.
11632 (about_to_request_buffer_space): New.
11633 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11634 updating the same buffer.
11635 (add_tracepoint): Default the tracepoint's type to trap
11636 tracepoint, and orig_size to -1.
11637 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11638 internal variables.
11639 (create_trace_state_variable): New parameter `gdb'. Handle it.
11640 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11641 (cmd_qtdp): Handle fast tracepoints.
11642 (cmd_qtdv): Adjust.
11643 (max_jump_pad_size): New.
11644 (gdb_jump_pad_head): New.
11645 (get_jump_space_head): New.
11646 (claim_jump_space): New.
11647 (sort_tracepoints): New.
11648 (MAX_JUMP_SIZE): New.
11649 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11651 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11652 support. Upload fast traceframes, and delete internal IPA
11654 (stop_tracing_handler): New.
11655 (flush_trace_buffer_handler): New.
11656 (cmd_qtstop): Upload fast tracepoints.
11657 (response_tracepoint): Handle fast tracepoints.
11658 (tracepoint_finished_step): Upload fast traceframes. Set the
11659 tracepoint hit context's tracepoint type.
11660 (handle_tracepoint_bkpts): New.
11661 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11662 type. Add comment about fast tracepoints.
11663 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11664 non-existing action_str field.
11665 (get_context_regcache): Handle fast tracepoints.
11666 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11668 (fast_tracepoint_from_jump_pad_address): New.
11669 (fast_tracepoint_from_ipa_tpoint_address): New.
11670 (collecting_t): New.
11671 (force_unlock_trace_buffer): New.
11672 (fast_tracepoint_collecting): New.
11674 (gdb_collect): New.
11675 (write_inferior_data_ptr): New.
11676 (target_tp_heap): New.
11677 (target_malloc): New.
11678 (download_agent_expr): New.
11680 (download_tracepoints): New.
11681 (download_trace_state_variables): New.
11682 (upload_fast_traceframes): New.
11683 (IPA_FIRST_TRACEFRAME): New.
11684 (IPA_NEXT_TRACEFRAME_1): New.
11685 (IPA_NEXT_TRACEFRAME): New.
11686 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11687 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11688 (gdb_jump_pad_buffer_end): New.
11689 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11690 (initialize_tracepoint): Adjust.
11691 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11692 buffer. Initialize the low module.
11693 * utils.c (PREFIX, TOOLNAME): New.
11694 (malloc_failure): Use PREFIX.
11695 (error): In the IPA, an error causes an exit.
11696 (fatal, warning): Use PREFIX.
11697 (internal_error): Use TOOLNAME.
11698 (NUMCELLS): Increase to 10.
11699 * configure, config.in: Regenerate.
11701 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11703 * server.c (handle_query) <qSupported>: Do two passes over the
11704 qSupported string to avoid nesting strtok.
11706 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11708 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11710 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11711 -Wl,--dynamic-list.
11712 * configure: Regenerate.
11713 * proc-service.list: New.
11715 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11717 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11720 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11722 * gdbreplay.c (remote_open): Check error return from socket() call by
11723 its equality to -1 not by it being negative.
11724 * remote-utils.c (remote_open): Likewise.
11726 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11728 * config.h: Regenerate.
11730 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11732 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11733 doesn't provide PTRACE_GET_THREAD_AREA.
11735 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11737 * linux-m68k-low.c: Include <asm/ptrace.h>
11738 (ps_get_thread_area): Implement.
11740 2010-05-03 Doug Evans <dje@google.com>
11742 * event-loop.c (struct callback_event): New struct.
11743 (callback_list): New global.
11744 (append_callback_event, delete_callback_event): New functions.
11745 (process_callback): New function.
11746 (start_event_loop): Call it.
11747 * remote-utils.c (NOT_SCHEDULED): Define.
11748 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11749 moved out of readchar.
11750 (readchar): Rewrite. Call reschedule before returning.
11751 (reset_readchar): New function.
11752 (remote_close): Call it.
11753 (process_remaining, reschedule): New functions.
11754 * server.h (callback_handler_func): New typedef.
11755 (append_callback_event, delete_callback_event): Declare.
11757 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11759 * proc-service.c (ps_pglobal_lookup): Use
11760 thread_db_look_up_one_symbol.
11761 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11762 parameter. Use it instead of all_symbols_looked_up.
11763 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11765 (all_symbols_looked_up): Don't declare.
11766 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11767 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11769 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11770 Set all_symbols_looked_up here.
11771 (thread_db_look_up_one_symbol): New.
11772 (thread_db_get_tls_address): Adjust.
11773 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11774 thread_db object on the heap, and tentatively set it in the
11776 (thread_db_init): Don't set all_symbols_looked_up here.
11777 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11779 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11781 * linux-low.c (linux_kill, linux_detach): Adjust.
11782 (status_pending_p_callback): Remove redundant statement. Check
11783 for !TARGET_WAITIKIND_IGNORE, instead of
11784 TARGET_WAITKIND_STOPPED.
11785 (handle_tracepoints): Make sure LWP is locked. Adjust.
11786 (linux_wait_for_event_1): Adjust.
11787 (linux_cancel_breakpoints): New.
11788 (unsuspend_one_lwp): New.
11789 (unsuspend_all_lwps): New.
11790 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11791 (send_sigstop_callback): Change return type to int, add new
11792 `except' parameter and handle it.
11793 (suspend_and_send_sigstop_callback): New.
11794 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11795 pass them down. If SUSPEND, also increment the lwp's suspend
11797 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11798 (need_step_over_p): Don't consider suspended LWPs.
11799 (start_step_over): Adjust.
11800 (proceed_one_lwp): Change return type to int, add new `except'
11801 parameter and handle it.
11802 (unsuspend_and_proceed_one_lwp): New.
11803 (proceed_all_lwps): Use find_inferior instead of
11805 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11806 also decrement the suspend count of LWPs. Pass `except' down,
11807 instead of hacking its suspend count.
11808 (linux_pause_all): Add `freeze' parameter. Adjust.
11809 (linux_unpause_all): New.
11810 (linux_target_ops): Install linux_unpause_all.
11811 * server.c (handle_status): Adjust.
11812 * target.h (struct target_ops): New fields `unpause_all' and
11813 `cancel_breakpoints'. Add new parameter to `pause_all'.
11814 (pause_all): Add new `freeze' parameter.
11815 (unpause_all): New.
11816 (cancel_breakpoints): New.
11817 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11818 cancel breakpoints.
11819 (cmd_qtstart): Pause threads.
11820 (stop_tracing): Pause threads, and cancel breakpoints.
11821 * win32-low.c (win32_target_ops): Adjust.
11823 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11825 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11826 the inferior right away from here...
11827 (linux_wait_1): ... to here, and adjust to check the thread's
11828 last_resume_kind instead of the lwp's step or stop_expected flags.
11830 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11832 * README: Use consistent `GDB' and `GDBserver' spellings.
11834 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11836 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11837 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11838 (linux_detach_one_lwp): Assume the lwp is stopped.
11839 (any_thread_of): Delete.
11840 (linux_detach): Stop all lwps here. Don't blindly delete all
11842 (delete_lwp_callback): New.
11843 (linux_mourn): Delete all lwps of the process that is gone.
11844 (linux_wait_1): Don't delete the last lwp of the process here.
11845 * mem-break.h (mark_breakpoints_out): Declare.
11846 * mem-break.c (mark_breakpoints_out): New.
11847 (free_all_breakpoints): Use it.
11848 * server.c (handle_target_event): If the process is gone, mark
11850 * thread-db.c (struct thread_db) <create_bp>: New field.
11851 (thread_db_enable_reporting): Fix prototype. Store a thread event
11852 breakpoint reference in the thread_db struct.
11853 (thread_db_load_search): Clear the thread_db object.
11854 (try_thread_db_load_1): Ditto.
11855 (switch_to_process): New.
11856 (disable_thread_event_reporting): Use it.
11857 (remove_thread_event_breakpoints): New.
11858 (thread_db_detach, thread_db_mourn): Use it.
11860 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11862 * linux-low.c (linux_enable_event_reporting): New.
11863 (linux_wait_for_event_1, handle_extended_wait): Use it.
11865 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11867 * linux-low.c (linux_kill_one_lwp, linux_kill)
11868 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11869 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11870 SIGSTOP even if the LWP is stopped.
11871 (send_sigstop_callback): New.
11872 (stop_all_lwps): Use send_sigstop_callback instead.
11873 (linux_resume_one_thread): Adjust.
11874 (proceed_one_lwp): Still proceed an LWP that the client has
11875 requested to stop, if we haven't reported it as stopped yet. Make
11876 sure that LWPs the client want stopped, have a pending SIGSTOP.
11878 2010-04-26 Doug Evans <dje@google.com>
11880 * server.c (handle_general_set): Make static.
11882 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11883 Print received char after testing for error/eof instead of before.
11884 (input_interrupt): Tweak comment.
11886 2010-04-23 Doug Evans <dje@google.com>
11888 * server.c (start_inferior): Print inferior argv if --debug.
11890 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11892 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11893 * nto-x86-low.c: Include server.h
11895 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11897 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11898 be consistent with other sources of this directory.
11899 (init_registers_amd64): Correct name of source file of this function
11902 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11904 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11905 64-bit executables.
11907 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11909 * win32-i386-low.c: Add 64-bit support.
11910 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11911 (init_registers_amd64): Declare.
11912 (mappings): Add 64-bit version of array.
11913 (init_windows_x86): New function.
11914 (the_low_target): Change init_arch field to init_windows_x86.
11916 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11918 * win32-low.c: Adapt to support also 64-bit architecture.
11919 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11920 (get_image_name): Use SIZE_T type for local variable `done'.
11921 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11922 (toolhelp_get_dll_name): Idem.
11923 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11924 Use uintptr_t typecast to avoid warning.
11925 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11926 (handle_exception): Use phex_nz to avoid warning.
11927 (win32_wait): Remove unused local variable `process'.
11929 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11931 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11934 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11936 * configure.ac: Use `ws2_32' library for srv_mingw.
11937 * configure: Regenerate.
11938 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11939 * remote-utils.c: Likewise.
11941 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11943 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11944 if __x86_64__ is defined.
11946 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11948 * configure: Regenerate.
11950 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11952 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11953 * target.h (target_ops): New get_tib_address field.
11954 * win32-low.h (win32_thread_info): Add thread_local_base field.
11955 * win32-low.c (child_add_thread): Add tlb argument.
11956 Set thread_local_base field to TLB.
11957 (get_child_debug_event): Adapt to child_add_thread change.
11958 (win32_get_tib_address): New function.
11959 (win32_target_ops): Set get_tib_address field to
11960 win32_get_tib_address.
11961 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11963 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11965 * linux-low.c (linux_mourn): Also remove the process.
11966 * server.c (handle_target_event): Don't remove the process here.
11967 * nto-low.c (nto_mourn): New.
11968 (nto_target_ops): Install it.
11969 * spu-low.c (spu_mourn): New.
11970 (spu_target_ops): Install it.
11971 * win32-low.c (win32_mourn): New.
11972 (win32_target_ops): Install it.
11974 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11976 * server.h (buffer_xml_printf): Remove redundant `;'.
11978 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11980 * regcache.c (set_register_cache): Invalidate regcaches before
11981 changing the register cache layout.
11982 (regcache_invalidate_one): Allow a NULL regcache.
11983 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11984 regcaches before changing the register cache layout or the target
11987 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11989 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11990 variable warning on Linux/x86-64.
11992 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11994 GDBserver disconnected tracing support.
11996 * linux-low.c (linux_remove_process): Delete.
11997 (add_lwp): Don't set last_resume_kind here.
11998 (linux_kill): Use `mourn'.
11999 (linux_detach): Use `thread_db_detach', and `mourn'.
12000 (linux_mourn): New.
12001 (linux_attach_lwp_1): Adjust comment.
12002 (linux_attach): last_resume_kind moved the thread_info; adjust.
12003 (status_pending_p_callback): Adjust.
12004 (linux_wait_for_event_1): Adjust.
12005 (count_events_callback, select_singlestep_lwp_callback)
12006 (select_event_lwp_callback, cancel_breakpoints_callback)
12007 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12008 (proceed_one_lwp): Adjust.
12009 (linux_async): Add debug output.
12010 (linux_thread_stopped): New.
12011 (linux_pause_all): New.
12012 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12014 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12015 (thread_db_free): Delete declaration.
12016 (thread_db_detach, thread_db_mourn): Declare.
12017 * thread-db.c (thread_db_init): Use thread_db_mourn.
12018 (thread_db_free): Delete, split in two.
12019 (disable_thread_event_reporting): New.
12020 (thread_db_detach): New.
12021 (thread_db_mourn): New.
12023 * server.h (struct thread_info) <last_resume_kind>: New field.
12024 <attached>: Add comment.
12025 <gdb_detached>: New field.
12026 (handler_func): Change return type to int.
12027 (handle_serial_event, handle_target_event): Ditto.
12028 (gdb_connected): Declare.
12030 (disconnected_tracing): Declare.
12031 (stop_tracing): Declare.
12033 * server.c (handle_query) <qSupported>: Report support for
12034 disconnected tracing.
12035 (queue_stop_reply_callback): Account for running threads.
12036 (gdb_wants_thread_stopped): New.
12037 (gdb_wants_all_threads_stopped): New.
12038 (gdb_reattached_process): New.
12039 (handle_status): Clear the `gdb_detached' flag of all processes.
12040 In all-stop, stop all threads.
12041 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12042 (process_serial_event): If the remote connection breaks, or if an
12043 exit was forced with "monitor exit", force an event loop exit.
12044 Handle disconnected tracing on detach.
12045 (handle_serial_event): Adjust.
12046 (handle_target_event): If GDB isn't connected, forward events back
12047 to the inferior, unless the last process exited, in which case,
12048 exit gdbserver. Adjust interface.
12050 * remote-utils.c (remote_open): Don't block in accept. Instead
12051 register an event loop source on the listen socket file
12052 descriptor. Refactor bits into ...
12053 (listen_desc): ... this new global.
12054 (gdb_connected): ... this new function.
12055 (enable_async_notification): ... this new function.
12056 (handle_accept_event): ... this new function.
12057 (remote_close): Clear remote_desc.
12059 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12061 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12063 (mourn_inferior): Define.
12064 (target_process_qsupported): Avoid the dangling else problem.
12065 (thread_stopped): Define.
12066 (pause_all): Define.
12067 (target_waitstatus_to_string): Declare.
12068 * target.c (target_waitstatus_to_string): New.
12070 * tracepoint.c (tracing): Make extern.
12071 (disconnected_tracing): New.
12072 (stop_tracing): Make extern. Handle tracing stops due to GDB
12074 (cmd_qtdisconnected): New.
12075 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12076 (handle_tracepoint_general_set): Handle QTDisconnected.
12078 * event-loop.c (event_handler_func): Change return type to int.
12079 (process_event): Bail out if the event handler wants the event
12081 (handle_file_event): Ditto.
12082 (start_event_loop): Bail out if the event handler wants the event
12085 * nto-low.c (nto_target_ops): Adjust.
12086 * spu-low.c (spu_wait): Don't remove the process here.
12087 (spu_target_ops): Adjust.
12088 * win32-low.c (win32_wait): Don't remove the process here.
12089 (win32_target_ops): Adjust.
12091 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12093 * regcache.c (realloc_register_cache): Invalidate inferior's
12094 regcache before recreating it.
12096 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12098 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12100 2010-04-09 Stan Shebs <stan@codesourcery.com>
12101 Pedro Alves <pedro@codesourcery.com>
12103 * server.h (LONGEST): New.
12104 (struct thread_info) <while_stepping>: New field.
12105 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12107 (initialize_tracepoint, handle_tracepoint_general_set)
12108 (handle_tracepoint_query, tracepoint_finished_step)
12109 (tracepoint_was_hit, release_while_stepping_state_list):
12110 (current_traceframe): Declare.
12111 * server.c (handle_general_set): Handle tracepoint packets.
12112 (read_memory): New.
12113 (write_memory): New.
12114 (handle_search_memory_1): Use read_memory.
12115 (handle_query): Report support for conditional tracepoints, trace
12116 state variables, and tracepoint sources. Handle tracepoint
12118 (main): Initialize the tracepoints module.
12119 (process_serial_event): Handle traceframe reads/writes.
12121 * linux-low.c (handle_tracepoints): New.
12122 (linux_wait_1): Call it.
12123 (linux_resume_one_lwp): Handle while-stepping.
12124 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12125 (linux_target_ops): Install them.
12126 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12128 * linux-x86-low.c (x86_supports_tracepoints): New.
12129 (the_low_target). Install it.
12131 * mem-break.h (delete_breakpoint): Declare.
12132 * mem-break.c (delete_breakpoint): Make external.
12134 * target.h (struct target_ops): Add `supports_tracepoints',
12135 `read_pc', and `write_pc' fields.
12136 (target_supports_tracepoints): Define.
12137 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12140 * regcache.h (struct regcache) <registers_owned>: New field.
12141 (init_register_cache, regcache_cpy): Declare.
12142 (regcache_read_pc, regcache_write_pc): Declare.
12143 (register_cache_size): Declare.
12144 (supply_regblock): Declare.
12145 * regcache.c (init_register_cache): New.
12146 (new_register_cache): Use it.
12147 (regcache_cpy): New.
12148 (register_cache_size): New.
12149 (supply_regblock): New.
12150 (regcache_read_pc, regcache_write_pc): New.
12152 * tracepoint.c: New.
12154 * Makefile.in (OBS): Add tracepoint.o.
12155 (tracepoint.o): New rule.
12157 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12159 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12161 (i386-mmx.c): Likewise.
12162 (i386-mmx-linux.o): Likewise.
12163 (i386-mmx-linux.c): Likewise.
12165 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12166 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12167 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12168 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12170 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12171 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12172 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12174 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12176 * Makefile.in (clean): Updated.
12178 (i386-avx.c): Likewise.
12179 (i386-avx-linux.o): Likewise.
12180 (i386-avx-linux.c): Likewise.
12181 (amd64-avx.o): Likewise.
12182 (amd64-avx.c): Likewise.
12183 (amd64-avx-linux.o): Likewise.
12184 (amd64-avx-linux.c): Likewise.
12186 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12187 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12188 (srv_amd64_regobj): Add amd64-avx.o.
12189 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12190 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12191 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12192 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12193 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12194 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12195 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12197 * i387-fp.c: Include "i386-xstate.h".
12199 (i387_cache_to_xsave): Likewise.
12200 (i387_xsave_to_cache): Likewise.
12201 (x86_xcr0): Likewise.
12203 * i387-fp.h (i387_cache_to_xsave): Likewise.
12204 (i387_xsave_to_cache): Likewise.
12205 (x86_xcr0): Likewise.
12207 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12208 * linux-crisv32-low.c (target_regsets): Likewise.
12209 * linux-m68k-low.c (target_regsets): Likewise.
12210 * linux-mips-low.c (target_regsets): Likewise.
12211 * linux-ppc-low.c (target_regsets): Likewise.
12212 * linux-s390-low.c (target_regsets): Likewise.
12213 * linux-sh-low.c (target_regsets): Likewise.
12214 * linux-sparc-low.c (target_regsets): Likewise.
12215 * linux-xtensa-low.c (target_regsets): Likewise.
12217 * linux-low.c: Include <sys/uio.h>.
12218 (regsets_fetch_inferior_registers): Support nt_type.
12219 (regsets_store_inferior_registers): Likewise.
12220 (linux_process_qsupported): New.
12221 (linux_target_ops): Add linux_process_qsupported.
12223 * linux-low.h (regset_info): Add nt_type.
12224 (linux_target_ops): Add process_qsupported.
12226 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12228 (init_registers_i386_avx_linux): New.
12229 (init_registers_amd64_avx_linux): Likewise.
12230 (xmltarget_i386_linux_no_xml): Likewise.
12231 (xmltarget_amd64_linux_no_xml): Likewise.
12232 (PTRACE_GETREGSET): Likewise.
12233 (PTRACE_SETREGSET): Likewise.
12234 (x86_fill_xstateregset): Likewise.
12235 (x86_store_xstateregset): Likewise.
12236 (use_xml): Likewise.
12237 (x86_linux_update_xmltarget): Likewise.
12238 (x86_linux_process_qsupported): Likewise.
12239 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12240 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12241 init_registers_i386_linux here. Call
12242 x86_linux_update_xmltarget.
12243 (the_low_target): Add x86_linux_process_qsupported.
12245 * server.c (handle_query): Call target_process_qsupported.
12247 * target.h (target_ops): Add process_qsupported.
12248 (target_process_qsupported): New.
12250 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12252 * inferiors.c (add_thread): Set last_status kind to
12253 TARGET_WAITKIND_IGNORE.
12254 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12255 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12256 (linux_wait_1): Move `thread' local definition to block that uses
12257 it. Don't NULL initialize `event_child'.
12258 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12259 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12260 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12262 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12264 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12265 an extended waitstatus, or by a watchpoint.
12266 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12267 thread was stepping or has been stopped by a watchpoint.
12269 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12271 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12272 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12273 of another, then delete the previous, and validate all
12275 (validate_inserted_breakpoint): New.
12276 (delete_disabled_breakpoints): New.
12277 (validate_breakpoints): New.
12278 (check_mem_read): Validate breakpoints before trusting their
12279 shadow. Delete disabled breakpoints.
12280 (check_mem_write): Validate breakpoints before trusting they
12281 should be inserted. Delete disabled breakpoints.
12282 * mem-break.h (validate_breakpoints):
12283 * server.c (handle_query): Validate breakpoints when we see a
12286 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12288 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12289 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12290 if we could tell there's a GDB breakpoint at stop_pc.
12291 (need_step_over_p): Don't do a step over if we find a GDB
12292 breakpoint at the resume PC.
12294 * mem-break.c (struct raw_breakpoint): New.
12295 (enum bkpt_type): New type `gdb_breakpoint'.
12296 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12297 fields. New field `raw'.
12298 (find_raw_breakpoint_at): New.
12299 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12300 breakpoint instead.
12301 (set_breakpoint_at): Adjust.
12302 (delete_raw_breakpoint): New.
12303 (release_breakpoint): New.
12304 (delete_breakpoint): Rename to...
12305 (delete_breakpoint_1): ... this. Add proc parameter. Use
12306 release_breakpoint. Return ENOENT.
12307 (delete_breakpoint): Reimplement.
12308 (find_breakpoint_at): Delete.
12309 (find_gdb_breakpoint_at): New.
12310 (delete_breakpoint_at): Delete.
12311 (set_gdb_breakpoint_at): New.
12312 (delete_gdb_breakpoint_at): New.
12313 (gdb_breakpoint_here): New.
12314 (set_reinsert_breakpoint): Use release_breakpoint.
12315 (uninsert_breakpoint): Rename to ...
12316 (uninsert_raw_breakpoint): ... this.
12317 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12318 (reinsert_raw_breakpoint): Change parameter type to
12320 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12322 (check_breakpoints): Adjust. Use release_breakpoint.
12323 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12324 (breakpoint_inserted_here): Ditto.
12325 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12326 Don't trust the breakpoint's shadow if it is not inserted.
12327 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12328 (delete_all_breakpoints): Adjust.
12329 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12330 use delete_breakpoint_1.
12332 * mem-break.h (breakpoints_supported): Delete declaration.
12333 (set_gdb_breakpoint_at): Declare.
12334 (gdb_breakpoint_here): Declare.
12335 (delete_breakpoint_at): Delete.
12336 (delete_gdb_breakpoint_at): Declare.
12338 * server.h (struct raw_breakpoint): Forward declare.
12339 (struct process_info): New field `raw_breakpoints'.
12341 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12344 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12346 * linux-low.c (status_pending_p_callback): Fix comment.
12347 (linux_wait_for_event_1): Move most of the internal breakpoint
12348 handling from here...
12349 (linux_wait_1): ... to here.
12350 (count_events_callback): New.
12351 (select_singlestep_lwp_callback): New.
12352 (select_event_lwp_callback): New.
12353 (cancel_breakpoints_callback): New.
12354 (select_event_lwp): New.
12355 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12356 priority to all LWPs that have had events that should be reported
12357 to the client. Cancel breakpoints when about to reporting the
12358 event to the client, not while stopping lwps. No longer cancel
12359 finished single-steps here.
12360 (cancel_finished_single_step): Delete.
12361 (cancel_finished_single_steps): Delete.
12363 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12365 * mem-break.c (enum bkpt_type): New.
12366 (struct breakpoint): New field `type'.
12367 (set_breakpoint_at): Change return type to struct breakpoint
12368 pointer. Set type to `other_breakpoint' by default.
12369 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12370 in the breakpoint list.
12371 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12372 (reinsert_breakpoint): Rename to ...
12373 (reinsert_raw_breakpoint): ... this.
12374 (reinsert_breakpoints_at): Adjust.
12375 * mem-break.h (struct breakpoint): Declare.
12376 (set_breakpoint_at): Change return type to struct breakpoint
12379 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12381 * server.c (handle_query): Assign, not compare.
12383 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12385 Teach linux gdbserver to step-over-breakpoints.
12387 * linux-low.c (can_hardware_single_step): New.
12388 (supports_breakpoints): New.
12389 (handle_extended_wait): If stopping threads, read the stop pc of
12390 the new cloned LWP.
12392 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12393 low target doesn't support retrieving the PC.
12394 (add_lwp): Set last_resume_kind to resume_continue.
12395 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12396 (linux_attach): Don't clear stop_expected. Set the lwp's
12397 last_resume_kind to resume_stop.
12398 (linux_detach_one_lwp): Don't check for removed breakpoints.
12399 (check_removed_breakpoint): Delete.
12400 (status_pending_p): Rename to ...
12401 (status_pending_p_callback): ... this. Don't check for removed
12402 breakpoints. Don't consider threads that are stopped from GDB's
12404 (linux_wait_for_lwp): Always read the stop_pc here.
12405 (cancel_breakpoint): New.
12406 (step_over_bkpt): New global.
12407 (linux_wait_for_event_1): Implement stepping over breakpoints.
12408 (gdb_wants_lwp_stopped): New.
12409 (gdb_wants_all_stopped): New.
12410 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12411 single-step traps here. Store the thread's last reported target
12413 (send_sigstop): Don't clear stop_expected. Always set it,
12415 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12416 (cancel_finished_single_step): New.
12417 (cancel_finished_single_steps): New.
12418 (wait_for_sigstop): Don't cancel finished single-step traps here.
12419 (linux_resume_one_lwp): Don't check for removed breakpoints.
12420 Don't set `step' on non-hardware step archs.
12421 (linux_set_resume_request): Ignore resume_stop requests if already
12422 stopping or stopped. Set the lwp's last_resume_kind.
12423 (resume_status_pending_p): Don't check for removed breakpoints.
12424 (need_step_over_p): New.
12425 (start_step_over): New.
12426 (finish_step_over): New.
12427 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12428 requests. Clear the thread's last reported target waitstatus.
12429 Don't use the `suspended' flag. Don't consider pending breakpoints.
12430 (linux_resume): Start a step-over if necessary.
12431 (proceed_one_lwp): New.
12432 (proceed_all_lwps): New.
12433 (unstop_all_lwps): New.
12434 * linux-low.h (struct lwp_info): Rewrite comment for the
12435 `suspended' flag. Add the `stop_pc' field. Delete the
12436 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12437 Add `'last_resume_kind' and `need_step_over' fields.
12438 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12439 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12440 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12441 (set_raw_breakpoint_at): New.
12442 (set_breakpoint_at): Rewrite to use it.
12443 (reinsert_breakpoint_handler): Delete.
12444 (set_reinsert_breakpoint): New.
12445 (reinsert_breakpoint_by_bp): Delete.
12446 (delete_reinsert_breakpoints): New.
12447 (uninsert_breakpoint): Rewrite.
12448 (uninsert_breakpoints_at): New.
12449 (reinsert_breakpoint): Rewrite.
12450 (reinsert_breakpoints_at): New.
12451 (check_breakpoints): Rewrite.
12452 (breakpoint_here): New.
12453 (breakpoint_inserted_here): New.
12454 (check_mem_read): Adjust.
12455 * mem-break.h (breakpoints_supported, breakpoint_here)
12456 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12457 (reinsert_breakpoint_by_bp): Delete declaration.
12458 (delete_reinsert_breakpoints): Declare.
12459 (reinsert_breakpoint): Delete declaration.
12460 (reinsert_breakpoints_at): Declare.
12461 (uninsert_breakpoint): Delete declaration.
12462 (uninsert_breakpoints_at): Declare.
12463 (check_breakpoints): Adjust prototype.
12464 * server.h: Adjust include order.
12465 (struct thread_info): Declare here. Add a `last_status' field.
12467 2010-03-23 Michael Snyder <msnyder@vmware.com>
12469 * server.c (crc32): New function.
12470 (handle_query): Add handling for 'qCRC:' request.
12472 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12474 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12475 lwp had been stopped by a watchpoint.
12477 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12479 * server.h (internal_error): Declare.
12480 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12481 * utils.c (internal_error): New function.
12483 2010-03-15 Andreas Schwab <schwab@redhat.com>
12485 * configure.srv: Fix typo setting srv_regobj.
12487 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12489 * linux-low.c (fetch_register): Avoid passing a non string literal
12491 (usr_store_inferior_registers): Ditto.
12493 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12495 * linux-low.c (linux_write_memory): Bail out early if peeking
12498 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12500 * linux-low.h (struct lwp_info): New fields
12501 `stopped_by_watchpoint' and `stopped_data_address'.
12502 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12503 here, and cache them in the lwp object.
12504 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12506 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12508 (linux_stopped_by_watchpoint): Rewrite.
12509 (linux_stopped_data_address): Rewrite.
12511 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12513 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12514 switching the current inferior, not before.
12516 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12518 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12519 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12520 i386-linux.c and amd64-linux.c.
12521 (reg-i386.o): Removed.
12522 (reg-i386.c): Likewise.
12523 (reg-i386-linux.o): Likewise.
12524 (reg-i386-linux.c): Likewise.
12525 (reg-x86-64.o): Likewise.
12526 (reg-x86-64.c): Likewise.
12527 (reg-x86-64-linux.o): Likewise.
12528 (reg-x86-64-linux.c): Likewise.
12530 (i386.c): Likewise.
12531 (i386-linux.o): Likewise.
12532 (i386-linux.c): Likewise.
12533 (amd64.o): Likewise.
12534 (amd64.c): Likewise.
12535 (amd64-linux.o): Likewise.
12536 (amd64-linux.c): Likewise.
12538 * configure.srv (srv_i386_regobj): New.
12539 (srv_i386_linux_regobj): Likewise.
12540 (srv_amd64_regobj): Likewise.
12541 (srv_amd64_linux_regobj): Likewise.
12542 (srv_i386_32bit_xmlfiles): Likewise.
12543 (srv_i386_64bit_xmlfiles): Likewise.
12544 (srv_i386_xmlfiles): Likewise.
12545 (srv_amd64_xmlfiles): Likewise.
12546 (srv_i386_linux_xmlfiles): Likewise.
12547 (srv_amd64_linux_xmlfiles): Likewise.
12548 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12549 srv_xmlfiles to $srv_i386_xmlfiles.
12550 (i[34567]86-*-mingw32ce*): Likewise.
12551 (i[34567]86-*-mingw*): Likewise.
12552 (i[34567]86-*-nto*): Likewise.
12553 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12554 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12555 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12556 (x86_64-*-linux*): Likewise.
12558 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12559 (init_registers_amd64_linux): New.
12560 (x86_arch_setup): Replace init_registers_x86_64_linux with
12561 init_registers_amd64_linux.
12563 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12565 * configure.ac: Check for libdl. If it is not available link against
12566 static libthread_db.
12567 * configure: Regenerate.
12569 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12573 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12574 handing a read watchpoint.
12575 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12577 2010-02-12 Doug Evans <dje@google.com>
12579 * linux-low.c (linux_supports_tracefork_flag): Document.
12580 (linux_look_up_symbols): Add comment.
12582 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12584 * regcache.c (supply_register): Clear regcache if buf is NULL.
12586 2010-02-02 Nicolas Roche <roche@sourceware.org>
12587 Joel Brobecker <brobecker@adacore.com>
12589 * inferiors.c (find_inferior): Add function documentation.
12590 (unloaded_dll): Handle the case where the unloaded dll has not
12591 been previously registered in the dll list.
12593 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12595 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12596 (thumb2_breakpoint): New.
12597 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12599 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12601 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12602 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12605 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12607 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12609 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12611 * linux-s390-low.c (s390_collect_ptrace_register)
12612 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12614 2010-01-21 Doug Evans <dje@google.com>
12616 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12617 (PTRACE_ARG4_TYPE): New macro.
12618 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12619 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12620 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12621 (usr_store_inferior_registers): Ditto.
12622 (linux_read_memory, linux_write_memory): Ditto.
12623 (linux_test_for_tracefork): Ditto.
12625 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12626 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12628 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12630 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12633 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12635 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12636 prototype to take a regcache. Adjust.
12638 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12640 * regcache.h (struct thread_info): Forward declare.
12641 (struct regcache): New.
12642 (new_register_cache): Adjust prototype.
12643 (get_thread_regcache): Declare.
12644 (free_register_cache): Adjust prototype.
12645 (registers_to_string, registers_from_string): Ditto.
12646 (supply_register, supply_register_by_name, collect_register)
12647 (collect_register_as_string, collect_register_by_name): Ditto.
12648 * regcache.c (struct inferior_regcache_data): Delete.
12649 (get_regcache): Rename to ...
12650 (get_thread_regcache): ... this. Adjust. Switch inferior before
12651 fetching registers.
12652 (regcache_invalidate_one): Adjust.
12653 (regcache_invalidate): Fix prototype.
12654 (new_register_cache): Return the new register cache.
12655 (free_register_cache): Change prototype.
12656 (realloc_register_cache): Adjust.
12657 (registers_to_string): Change prototype to take a regcache. Adjust.
12658 (registers_from_string): Ditto.
12659 (register_data): Ditto.
12660 (supply_register): Ditto.
12661 (supply_register_by_name): Ditto.
12662 (collect_register): Ditto.
12663 (collect_register_as_string): Ditto.
12664 (collect_register_by_name): Ditto.
12665 * server.c (process_serial_event): Adjust.
12666 * linux-low.h (regset_fill_func, regset_store_func): Change
12668 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12670 * linux-low.c (get_stop_pc): Adjust.
12671 (check_removed_breakpoint): Adjust.
12672 (linux_wait_for_event): Adjust.
12673 (linux_resume_one_lwp): Adjust.
12674 (fetch_register): Add regcache parameter. Adjust.
12675 (usr_store_inferior_registers): Ditto.
12676 (regsets_fetch_inferior_registers): Ditto.
12677 (regsets_store_inferior_registers): Ditto.
12678 (linux_fetch_registers, linux_store_registers): Ditto.
12679 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12681 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12683 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12684 prototype to take a regcache.
12685 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12686 * remote-utils.c (convert_ascii_to_int, outreg)
12687 (prepare_resume_reply): Change prototype to take a regcache.
12689 * target.h (struct target_ops) <fetch_registers, store_registers>:
12690 Change prototype to take a regcache.
12691 (fetch_inferior_registers, store_inferior_registers): Change
12692 prototype to take a regcache. Adjust.
12693 * proc-service.c (ps_lgetregs): Adjust.
12694 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12695 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12696 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12697 take a regcache. Adjust.
12698 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12699 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12700 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12701 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12702 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12703 (cris_cannot_fetch_register):
12704 (cris_breakpoint_at): Change prototype to take a regcache.
12706 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12707 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12708 to take a regcache. Adjust.
12709 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12711 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12712 take a regcache. Adjust.
12713 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12714 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12715 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12716 * linux-mips-low.c (mips_get_pc):
12717 (mips_set_pc): Change prototype to take a regcache. Adjust.
12718 (mips_reinsert_addr): Adjust.
12719 (mips_collect_register): Change prototype to take a regcache.
12721 (mips_supply_register):
12722 (mips_collect_register_32bit, mips_supply_register_32bit)
12723 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12724 (mips_store_fpregset): Ditto.
12725 * linux-ppc-low.c (ppc_supply_ptrace_register)
12726 (ppc_supply_ptrace_register): Ditto.
12727 (parse_spufs_run): Adjust.
12728 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12729 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12730 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12731 take a regcache. Adjust.
12732 * linux-s390-low.c (s390_collect_ptrace_register)
12733 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12734 (s390_set_pc): Change prototype to take a regcache. Adjust.
12735 (s390_arch_setup): Adjust.
12736 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12737 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12738 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12739 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12740 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12742 (sparc_breakpoint_at): Adjust.
12743 * linux-xtensa-low.c (xtensa_fill_gregset):
12744 (xtensa_store_gregset):
12745 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12746 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12747 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12748 prototype to take a regcache. Adjust.
12749 * win32-arm-low.c (arm_fetch_inferior_register)
12750 (arm_store_inferior_register): Change prototype to take a
12752 * win32-i386-low.c (i386_fetch_inferior_register)
12753 (i386_store_inferior_register): Change prototype to take a
12755 * win32-low.c (child_fetch_inferior_registers)
12756 (child_store_inferior_registers): Change prototype to take a
12758 (win32_wait): Adjust.
12759 (win32_fetch_inferior_registers): Change prototype to take a
12761 (win32_store_inferior_registers): Adjust.
12762 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12763 store_inferior_register>: Change prototype to take a regcache.
12765 2010-01-20 Doug Evans <dje@google.com>
12767 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12769 (linux_wait_for_event1, linux_init_signals): Ditto.
12770 (W_STOPCODE): Provide definition if missing.
12772 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12774 * linux-low.c (linux_core_of_thread): New.
12775 (compare_ints, show_process, list_threads): New.
12776 (linux_qxfer_osdata): Report threads and cores.
12777 (linux_target_op): Register linux_core_of_thread.
12778 * remote-utils.c (prepare_resume_reply): Report the core.
12779 (buffer_xml_printf): Support %d specifier.
12780 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12782 (handle_query): Handle qXfer:threads. Announce availability
12784 * target.h (struct target_ops): New field core_of_thread.
12786 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12788 * Makefile.in (clean): Remove new generated files.
12789 (reg-s390.o, reg-s390.c): Remove rules.
12790 (reg-s390x.o, reg-s390x.c): Likewise.
12791 (s390-linux32.o, s390-linux32.c): Add rules.
12792 (s390-linux64.o, s390-linux64.c): Likewise.
12793 (s390x-linux64.o, s390x-linux64.c): Likewise.
12794 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12795 * linux-s390-low.c: Include <elf.h>.
12796 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12797 (init_registers_s390): Remove prototype.
12798 (init_registers_s390x): Likewise.
12799 (init_registers_s390_linux32): Add prototype.
12800 (init_registers_s390_linux64): Likewise.
12801 (init_registers_s390x_linux64): Likewise.
12802 (s390_num_regs_3264): New define.
12803 (s390_regmap_3264): New global variable.
12804 (s390_cannot_fetch_register): Remove obsolete check.
12805 (s390_cannot_store_register): Likewise.
12806 (s390_collect_ptrace_register): Handle upper/lower register halves.
12807 (s390_supply_ptrace_register): Likewise.
12808 (s390_fill_gregset): Update to register number changes.
12809 (s390_get_hwcap): New routine.
12810 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12811 Install appropriate regmap and register set.
12813 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12815 * server.c (gdbserver_version): Update copyright year to 2010.
12816 * gdbreplay.c (gdbreplay_version): Likewise.
12818 2009-12-28 Doug Evans <dje@google.com>
12820 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12821 elf/external.h. Include <elf.h> instead but only if necessary.
12823 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12825 * linux-low.c (linux_remove_process): Remove `detaching'
12826 parameter. Don't release/detach from thread_db here.
12827 (linux_kill): Release/detach from thread_db here, ...
12828 (linux_detach): ... and here, before actually detaching.
12829 (linux_wait_1): ... and here, when a process exits.
12830 * thread-db.c (any_thread_of): New.
12831 (thread_db_free): Switch the current inferior to a thread of the
12834 2009-12-21 Doug Evans <dje@google.com>
12836 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12838 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12839 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12840 warning ifndef __NR_tkill. Move setting of errno there too.
12841 Delete unnecessary resetting of errno after syscall.
12842 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12844 * configure.ac: Check for dladdr.
12845 * config.in: Regenerate.
12846 * configure: Regenerate.
12847 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12848 (try_thread_db_load): Update.
12850 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12852 2009-12-18 Doug Evans <dje@google.com>
12854 * event-loop.c: Include unistd.h if it exists.
12856 * linux-low.c (my_waitpid): Move definition away from being in
12857 between linux_tracefork_child/linux_test_for_tracefork.
12859 * gdb_proc_service.h (psaddr_t): Fix type.
12860 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12861 signature to match glibc.
12863 2009-12-16 Doug Evans <dje@google.com>
12865 * linux-low.c (linux_read_memory): Fix argument to read.
12867 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12869 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12870 events, don't leave current_inferior pointing at null.
12872 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12874 * win32-low.c (LOG): Delete.
12875 (OUTMSG): Output to stderr.
12876 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12877 on compile time LOG macro.
12878 (win32_wait): Fix debug output.
12880 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12882 * win32-low.c (win32_add_one_solib): If the dll name is
12883 "ntdll.dll", prepend the system directory to the dll path.
12885 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12887 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12889 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12890 Vladimir Prus <vladimir@codesourcery.com>
12892 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12893 * configure.ac: Check for __mcoldfire__ and set
12894 gdb_cv_m68k_is_coldfire.
12895 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12896 reg-cf.o and reg-m68k.o.
12897 * configure: Regenerated.
12899 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12901 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12902 Pass it to thread_db_free.
12903 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12904 proper `detaching' argument to linux_remove_process.
12905 * linux-low.h (thread_db_free): Add `detaching' parameter.
12906 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12908 (thread_db_free): Add `detaching' parameter. Only
12909 call td_ta_clear_event if detaching from process.
12911 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12913 * thread-db.c (thread_db_free): Fix typo.
12915 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12918 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12920 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12922 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12923 with an i686 compiler.
12924 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12926 * configure: Rebuilt.
12928 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12932 * server.c (handle_search_memory_1): Correct read_addr initialization
12933 in loop for searching subsequent chunks.
12935 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12937 * configure.ac: New --with-libthread-db option.
12938 * thread-db.c: Allow direct dependence on libthread_db.
12939 (thread_db_free): Adjust.
12940 * config.in: Regenerate.
12941 * configure: Likewise.
12943 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12946 * thread-db.c (attach_thread): New function.
12947 (maybe_attach_thread): Return success/failure.
12948 (find_new_threads_callback): Adjust.
12949 (thread_db_find_new_threads): Loop until no new threads.
12951 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12953 * proc-service.c (ps_lgetregs): Formatting.
12955 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12957 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12958 * configure.ac: Adjust.
12959 * linux-low.h (struct process_info_private): Move members to struct
12961 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12962 * linux-low.c (linux_remove_process): Adjust.
12963 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12964 * server.c (handle_query): Move code ...
12965 (handle_monitor_command): ... here. New function.
12966 * target.h (struct target_ops): New member.
12967 * thread-db.c (struct thread_db): New.
12968 (libthread_db_search_path): New variable.
12969 (thread_db_create_event, thread_db_enable_reporting)
12970 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12971 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12972 (try_thread_db_load_1, dladdr_to_soname): New functions.
12973 (try_thread_db_load, thread_db_load_search): New functions.
12974 (thread_db_init): Search for libthread_db.
12975 (thread_db_free): New function.
12976 (thread_db_handle_monitor_command): Likewise.
12977 * config.in: Regenerate.
12978 * configure: Regenerate.
12980 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12982 * spu-low.c (spu_kill): Wait for inferior to terminate.
12983 Call clear_inferiors.
12984 (spu_detach): Call clear_inferiors.
12986 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12988 * aclocal.m4: Regenerate.
12989 * config.in: Likewise.
12990 * configure: Likewise.
12992 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12994 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12995 (parse_spufs_run): New function.
12996 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12997 (ppc_breakpoint_at): Handle SPU breakpoints.
12999 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13001 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13002 (SPUFS_MAGIC): Define.
13003 (spu_enumerate_spu_ids): New function.
13004 (linux_qxfer_spu): New function.
13005 (linux_target_ops): Install linux_qxfer_spu.
13007 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13009 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13010 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13011 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13012 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13013 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13014 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13015 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13016 (init_registers_powerpc_cell32l): Add prototype.
13017 (init_registers_powerpc_cell64l): Likewise.
13018 (ppc_arch_setup): Detect Cell/B.E. architecture.
13020 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13022 * Makefile.in (datarootdir): New variable.
13024 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13026 * linux-low.c (linux_write_memory): Update debugging output.
13027 * Makefile.in (clean): Add new descriptions.
13028 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13029 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13030 * configure.srv: Add new files for arm*-*-linux*.
13031 * linux-arm-low.c: Add new declarations.
13032 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13033 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13034 (HWCAP_VFPv3D16): New.
13035 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13036 instead of __IWMMXT__.
13037 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13038 (arm_arch_setup): New.
13039 (target_regsets): Remove #ifdef. Add VFP regset.
13040 (the_low_target): Use arm_arch_setup.
13042 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13044 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13045 the main thread again.
13047 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13049 Adding Neutrino gdbserver.
13050 * configure: Regenerated.
13051 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13052 * configure.srv (i[34567]86-*-nto*): New target.
13053 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13054 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13055 (nto_comctrl) [__QNX__]: New function.
13056 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13058 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13060 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13063 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13064 Pedro Alves <pedro@codesourcery.com>
13066 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13067 don't support CONTEXT_EXTENDED_REGISTERS.
13068 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13069 (the_low_target): Install them.
13070 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13071 failing with ERROR_PIPE_NOT_CONNECTED.
13073 2009-06-30 Doug Evans <dje@google.com>
13074 Pierre Muller <muller@ics.u-strasbg.fr>
13076 Add h/w watchpoint support to x86-linux, win32-i386.
13077 * Makefile.in (SFILES): Add i386-low.c
13078 (i386_low_h): Define.
13079 (i386-low.o): Add dependencies.
13080 (linux-x86-low.o): Add i386-low.h dependency.
13081 (win32-i386-low.o): Ditto.
13082 * i386-low.c: New file.
13083 * i386-low.h: New file.
13084 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13085 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13086 * linux-low.c (linux_add_process): Initialize arch_private.
13087 (linux_remove_process): Free arch_private.
13088 (add_lwp): Initialize arch_private.
13089 (delete_lwp): Free arch_private.
13090 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13092 * linux-low.h (process_info_private): New member arch_private.
13093 (lwp_info): New member arch_private.
13094 (linux_target_ops): New members new_process, new_thread,
13096 (ptid_of): New macro.
13097 * linux-x86-low.c: Include stddef.h, i386-low.h.
13098 (arch_process_info): New struct.
13099 (arch_lwp_info): New struct.
13100 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13101 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13102 (i386_dr_low_get_status): New function.
13103 (x86_insert_point, x86_remove_point): New functions.
13104 (x86_stopped_by_watchpoint): New function.
13105 (x86_stopped_data_address): New function.
13106 (x86_linux_new_process, x86_linux_new_thread): New functions.
13107 (x86_linux_prepare_to_resume): New function.
13108 (the_low_target): Add entries for insert_point, remove_point,
13109 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13111 * server.c (debug_hw_points): New global.
13112 (monitor_show_help): Document set debug-hw-points.
13113 (handle_query): Process "set debug-hw-points".
13114 * server.h (debug_hw_points): Declare.
13115 (paddress): Declare.
13116 * utils.c (NUMCELLS, CELLSIZE): New macros.
13117 (get_sell, xsnprintf, paddress): New functions.
13118 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13119 remove_point, stopped_by_watchpoint, stopped_data_address.
13120 * win32-i386-low.c: Include i386-low.h.
13121 (debug_reg_state): Replaces dr.
13122 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13123 (i386_dr_low_get_status): New function.
13124 (i386_insert_point, i386_remove_point): New functions.
13125 (i386_stopped_by_watchpoint): New function.
13126 (i386_stopped_data_address): New function.
13127 (i386_initial_stuff): Update.
13128 (get_thread_context,set_thread_context,i386_thread_added): Update.
13129 (the_low_target): Add entries for insert_point,
13130 remove_point, stopped_by_watchpoint, stopped_data_address.
13131 * win32-low.c (win32_insert_watchpoint): New function.
13132 (win32_remove_watchpoint): New function.
13133 (win32_stopped_by_watchpoint): New function.
13134 (win32_stopped_data_address): New function.
13135 (win32_target_ops): Add entries for insert_watchpoint,
13136 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13137 * win32-low.h (win32_target_ops): New members insert_point,
13138 remove_point, stopped_by_watchpoint, stopped_data_address.
13140 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13142 * server.c (process_serial_event): Re-return unsupported, not
13143 error, if the type isn't recognized. Re-allow supporting only
13144 insert or remove packets. Also call require_running for
13145 breakpoints. Add missing break statement to default case. Tidy.
13146 * target.h (struct target_ops): Rename insert_watchpoint to
13147 insert_point, and remove_watchpoint to remove_point.
13149 * linux-low.h (struct linux_target_ops): Likewise.
13150 * linux-low.c (linux_insert_watchpoint): Rename to ...
13151 (linux_insert_point): ... this. Adjust.
13152 (linux_remove_watchpoint): Rename to ...
13153 (linux_remove_point): ... this. Adjust.
13154 (linux_target_ops): Adjust.
13155 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13156 (cris_insert_point): ... this.
13157 (cris_remove_watchpoint): Rename to ...
13158 (cris_remove_point): ... this.
13159 (the_low_target): Adjust.
13161 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13163 * server.c (handle_v_kill): Pass signal_pid to
13164 kill_inferior if multi_process is zero.
13166 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13168 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13169 * target.h (target_ops): Comment for *_watchpoint to make it clear
13170 the functions can get types '0' and '1'.
13172 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13174 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13175 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13176 * regcache.c (get_regcache): Likewise.
13177 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13178 * win32-low.c (child_fetch_inferior_registers): Remove check for
13181 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13182 Pedro Alves <pedro@codesourcery.com>
13184 * target.h (struct target_ops) <supports_multi_process>: New
13186 (target_supports_multi_process): New.
13187 * server.c (handle_query): Even if GDB reports support, only
13188 enable multi-process if the target also supports it. Report
13189 multi-process support only if the target backend supports it.
13190 * linux-low.c (linux_supports_multi_process): New function.
13191 (linux_target_ops): Install it as target_supports_multi_process
13194 2009-05-24 Doug Evans <dje@google.com>
13196 Global renaming of find_thread_pid to find_thread_ptid.
13197 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13198 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13199 All callers updated.
13201 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13202 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13205 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13206 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13207 (linux_resume_one_lwp): Ditto.
13209 2009-05-23 Doug Evans <dje@google.com>
13211 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13212 from struct inferior_list_entry * to struct lwp_info *.
13213 All callers updated.
13215 2009-05-13 Doug Evans <dje@google.com>
13217 * linux-x86-low.c: Don't include assert.h.
13218 (x86_siginfo_fixup): Use fatal, not assert.
13219 (x86_arch_setup): Fix comment.
13221 2009-05-12 Doug Evans <dje@google.com>
13223 Biarch support for i386/amd64 gdbserver.
13224 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13225 Add linux-x86-low.c.
13226 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13227 (linux-x86-low.o): Add.
13228 * linux-x86-64-low.c: Delete.
13229 * linux-i386-low.c: Delete.
13230 * linux-x86-low.c: New file.
13231 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13233 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13235 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13236 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13237 (linux_child_pid_to_exec_file): New function.
13238 (elf_64_header_p, elf_64_file_p): New functions.
13239 (siginfo_fixup): New function.
13240 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13241 give target a chance to convert layout.
13242 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13243 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13245 2009-05-07 Doug Evans <dje@google.com>
13247 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13248 (regsets_store_inferior_registers): Ditto.
13250 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13254 * linux-low.c (must_set_ptrace_flags): Delete.
13255 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13257 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13258 `lwp->must_set_ptrace_flags' instead.
13259 (linux_wait_for_event_1): Set ptrace options here.
13260 (linux_wait_1): ... not here.
13262 2009-04-30 Doug Evans <dje@google.com>
13264 * inferiors.c (started_inferior_callback): New function.
13265 (attached_inferior_callback): New function.
13266 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13267 * server.c (print_started_pid, print_attached_pid): New functions.
13268 (detach_or_kill_for_exit): New function.
13269 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13270 * server.h (have_started_inferiors_p): Declare.
13271 (have_attached_inferiors_p): Declare.
13273 * inferiors.c (remove_process): Fix memory leak, free process.
13274 * linux-low.c (linux_remove_process): New function.
13275 (linux_kill): Call it instead of remove_process.
13276 (linux_detach, linux_wait_1): Ditto.
13278 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13280 * configure.srv: Add x86 Windows CE target.
13282 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13284 * inferiors.c (get_thread_process): Make global.
13285 * server.h (get_thread_process): Add prototype.
13286 * thread-db.c (find_one_thread): Use get_thread_process
13287 instead of current_process.
13288 (thread_db_get_tls_address): Do not crash if called when
13289 thread layer is not yet initialized.
13291 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13293 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13294 * spu-low.c (current_tid): Rename to ...
13295 (current_ptid): ... this.
13296 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13297 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13298 ptid_get_lwp (current_ptid) instead of current_tid.
13299 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13300 instead of current_tid. Use find_process_pid to verify pid
13301 argument is valid. Pass proper argument to remove_process.
13302 (spu_thread_alive): Compare current_ptid instead of current_tid.
13303 (spu_resume): Likewise.
13305 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13307 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13310 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13312 Implement the multiprocess extensions, and add linux multiprocess
13315 * server.h (ULONGEST): Declare.
13316 (struct ptid, ptid_t): New.
13317 (minus_one_ptid, null_ptid): Declare.
13318 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13319 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13320 (struct inferior_list_entry): Change `id' type from unsigned from
13322 (struct sym_cache, struct breakpoint, struct
13323 process_info_private): Forward declare.
13324 (struct process_info): Declare.
13325 (current_process): Declare.
13326 (all_processes): Declare.
13327 (initialize_inferiors): Declare.
13328 (add_thread): Adjust to use ptid_t.
13329 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13330 (add_process, remove_process, find_thread_pid): Declare.
13331 (find_inferior_id): Adjust to use ptid_t.
13332 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13333 (multi_process): Declare.
13334 (push_event): Adjust to use ptid_t.
13335 (read_ptid, write_ptid): Declare.
13336 (prepare_resume_reply): Adjust to use ptid_t.
13337 (clear_symbol_cache): Declare.
13338 * inferiors.c (all_processes): New.
13339 (null_ptid, minus_one_ptid): New.
13340 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13341 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13342 (add_thread): Change unsigned long to ptid. Remove gdb_id
13344 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13345 (gdb_id_to_thread): Rename to ...
13346 (find_thread_pid): ... this. Change unsigned long to ptid.
13347 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13348 (loaded_dll, pull_pid_from_list): Adjust.
13349 (add_process, remove_process, find_process_pid)
13350 (get_thread_process, current_process, initialize_inferiors): New.
13351 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13352 (struct target_waitstatus) <related_pid>: Ditto.
13353 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13354 return type to int.
13355 (struct target_ops) <join>: Add `pid' argument.
13356 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13357 (struct target_ops) <wait>: Add `ptid' field. Change return type
13359 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13360 (mywait): Add `ptid' argument. Change return type to ptid_t.
13361 (target_pid_to_str): Declare.
13362 * target.c (set_desired_inferior): Adjust to use ptids.
13363 (mywait): Add new `ptid' argument. Adjust.
13364 (target_pid_to_str): New.
13365 * mem-break.h (free_all_breakpoints): Declare.
13366 * mem-break.c (breakpoints): Delelete.
13367 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13368 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13369 to use per-process breakpoint list.
13370 (free_all_breakpoints): New.
13371 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13372 (symbol_cache, all_symbols_looked_up): Delete.
13374 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13376 (prepare_resume_reply): Change ptid argument's type from unsigned
13377 long to ptid_t. Adjust. Implement W;process and X;process.
13378 (free_sym_cache, clear_symbol_cache): New.
13379 (look_up_one_symbol): Adjust to per-process symbol cache. *
13380 * server.c (cont_thread, general_thread, step_thread): Change type
13382 (attached): Delete.
13383 (multi_process): New.
13384 (last_ptid): Change type to ptid_t.
13385 (struct vstop_notif) <ptid>: Change type to ptid_t.
13386 (queue_stop_reply, push_event): Change `ptid' argument's type to
13388 (discard_queued_stop_replies): Add `pid' argument.
13389 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13390 changes. Don't reference the `attached' global.
13391 (attach_inferior): Adjust to mywait interface changes.
13392 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13393 features. Handle and report "multiprocess+". Handle
13395 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13397 (handle_v_kill): New.
13398 (handle_v_stopped): Adjust to use target_pid_to_str.
13399 (handle_v_requests): Allow multiple attaches and runs when
13400 multiprocess extensions are in effect. Handle "vKill".
13401 (myresume): Adjust to use ptids.
13402 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13403 (handle_status): Adjust to discard_queued_stop_replies interface
13405 (first_thread_of, kill_inferior_callback)
13406 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13407 (main): Call initialize_inferiors. Adjust to use ptids, killing
13408 and detaching from all inferiors. Handle multiprocess packet
13410 * linux-low.h: Include gdb_proc_service.h.
13411 (struct process_info_private): New.
13412 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13413 <lwpid_of>: Use ptid_get_lwp.
13414 (get_lwp_thread): Adjust.
13415 (struct lwp_info): Add `dead' member.
13416 (find_lwp_pid): Declare.
13417 * linux-low.c (thread_db_active): Delete.
13418 (new_inferior): Adjust comment.
13419 (inferior_pid): Delete.
13420 (linux_add_process): New.
13421 (handle_extended_wait): Adjust.
13422 (add_lwp): Change unsigned long to ptid.
13423 (linux_create_inferior): Add process to processes table. Adjust
13424 to use ptids. Don't set new_inferior here.
13425 (linux_attach_lwp): Rename to ...
13426 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13427 it. Adjust to use ptids.
13428 (linux_attach_lwp): New.
13429 (linux_attach): Add process to processes table. Don't set
13431 (struct counter): New.
13432 (second_thread_of_pid_p, last_thread_of_process_p): New.
13433 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13434 multiple processes.
13435 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13436 processes. Remove process from process table.
13437 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13438 to multiple processes.
13439 (any_thread_of): New.
13440 (linux_detach): Add `pid' argument, and handle it. Remove process
13441 from processes table.
13442 (linux_join): Add `pid' argument. Handle it.
13443 (linux_thread_alive): Change unsighed long argument to ptid_t.
13444 Consider dead lwps as not being alive.
13445 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13446 threads we're not interested in.
13447 (same_lwp, find_lwp_pid): New.
13448 (linux_wait_for_lwp): Change `pid' argument's type from int to
13450 (linux_wait_for_event): Rename to ...
13451 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13452 from int to ptid_t. Adjust.
13453 (linux_wait_for_event): New.
13454 (linux_wait_1): Add `ptid' argument. Change return type to
13455 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13456 that exit from the process table.
13457 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13459 (mark_lwp_dead): New.
13460 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13461 stopping all threads, mark its main lwp as dead.
13462 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13464 (fetch_register, usr_store_inferior_registers)
13465 (regsets_fetch_inferior_registers)
13466 (regsets_store_inferior_registers, linux_read_memory)
13467 (linux_write_memory): Inline `inferior_pid'.
13468 (linux_look_up_symbols): Adjust to use per-process
13469 `thread_db_active'.
13470 (linux_request_interrupt): Adjust to use ptids.
13471 (linux_read_auxv): Inline `inferior_pid'.
13472 (initialize_low): Don't reference thread_db_active.
13473 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13474 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13475 (ps_getpid): Return the pid of the current inferior.
13476 * thread-db.c (proc_handle, thread_agent): Delete.
13477 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13479 (find_one_thread): Change argument type to ptid_t. Adjust to
13481 (maybe_attach_thread): Adjust to per-process data and ptids.
13482 (thread_db_find_new_threads): Ditto.
13483 (thread_db_init): Ditto.
13484 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13485 processes table. Adjust to use ptids.
13486 (spu_kill, spu_detach): Adjust interface. Remove process from
13488 (spu_join, spu_thread_alive): Adjust interface.
13489 (spu_wait): Adjust interface. Remove process from processes
13490 table. Adjust to use ptids.
13491 * win32-low.c (current_inferior_tid): Delete.
13492 (current_inferior_ptid): New.
13493 (debug_event_ptid): New.
13494 (thread_rec): Take a ptid. Adjust.
13495 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13496 (child_delete_thread): Ditto.
13497 (do_initial_child_stuff): Add `attached' argument. Add process to
13499 (child_fetch_inferior_registers, child_store_inferior_registers):
13501 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13502 (win32_attach): Pass 1 to do_initial_child_stuff.
13503 (win32_kill): Adjust interface. Remove process from processes
13505 (win32_detach): Ditto.
13506 (win32_join): Adjust interface.
13507 (win32_thread_alive): Take a ptid.
13508 (win32_resume): Adjust to use ptids.
13509 (get_child_debug_event): Ditto.
13510 (win32_wait): Adjust interface. Remove exiting process from
13513 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13515 Non-stop mode support.
13517 * server.h (non_stop): Declare.
13518 (gdb_client_data, handler_func): Declare.
13519 (delete_file_handler, add_file_handler, start_event_loop):
13521 (handle_serial_event, handle_target_event, push_event)
13522 (putpkt_notif): Declare.
13523 * target.h (enum resume_kind): New.
13524 (struct thread_resume): Replace `step' field by `kind' field.
13525 (TARGET_WNOHANG): Define.
13526 (struct target_ops) <wait>: Add `options' argument.
13527 <supports_non_stop, async, start_non_stop>: New fields.
13528 (target_supports_non_stop, target_async): New.
13529 (start_non_stop): Declare.
13530 (mywait): Add `options' argument.
13531 * target.c (mywait): Add `options' argument. Print child exit
13532 notifications here.
13533 (start_non_stop): New.
13534 * server.c (non_stop, own_buf, mem_buf): New globals.
13535 (struct vstop_notif): New.
13536 (notif_queue): New global.
13537 (queue_stop_reply, push_event, discard_queued_stop_replies)
13538 (send_next_stop_reply): New.
13539 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13541 (attach_inferior): In non-stop mode, don't wait for the target
13543 (handle_general_set): Handle QNonStop.
13544 (handle_query): When handling qC, return the current general
13545 thread, instead of the first thread of the list.
13546 (handle_query): If the backend supports non-stop mode, include
13547 QNonStop+ in the qSupported query response.
13548 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13550 (handle_v_attach, handle_v_run): Handle non-stop mode.
13551 (handle_v_stopped): New.
13552 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13553 (myresume): Adjust to use resume_kind. Handle non-stop.
13554 (queue_stop_reply_callback): New.
13555 (handle_status): Handle non-stop mode.
13556 (main): Clear non_stop flag on reconnection. Use the event-loop.
13557 Refactor serial protocol handling from here ...
13558 (process_serial_event): ... to this new function. When GDB
13559 selects any thread, select one here. In non-stop mode, wait until
13560 GDB acks all pending events before exiting.
13561 (handle_serial_event, handle_target_event): New.
13562 * remote-utils.c (remote_open): Install remote_desc in the event
13564 (remote_close): Remove remote_desc from the event loop.
13565 (putpkt_binary): Rename to...
13566 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13567 (putpkt_binary): New as wrapper around putpkt_binary_1.
13568 (putpkt_notif): New.
13569 (prepare_resume_reply): In non-stop mode, don't change the
13571 * event-loop.c: New.
13572 * Makefile.in (OBJ): Add event-loop.o.
13573 (event-loop.o): New rule.
13575 * linux-low.h (pid_of): Moved here.
13577 (get_lwp_thread): Use lwpid_of.
13578 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13579 * linux-low.c (pid_of): Delete.
13580 (inferior_pid): Use lwpid_of.
13581 (linux_event_pipe): New.
13582 (target_is_async_p): New.
13584 (handle_extended_wait): Use lwpid_of.
13585 (add_lwp): Don't set lwpid field.
13586 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13587 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13588 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13589 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13590 first. Adjust to linux_wait_for_event interface changes. Use
13592 (linux_detach): Don't delete the main lwp here.
13593 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13594 (status_pending_p): Don't consider explicitly suspended lwps.
13595 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13596 pointer. Add OPTIONS argument. Change return type to int. Use
13597 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13598 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13599 pointer. Add status pointer argument. Return a pid instead of a
13600 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13601 changes. In non-stop mode, don't switch to a random thread.
13602 (linux_wait): Rename to...
13603 (linux_wait_1): ... this. Add target_options argument, and handle
13604 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13605 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13606 clean exit and signal exit code. Don't stop all threads in
13607 non-stop mode. In all-stop mode, only stop all threads when
13608 reporting a stop to GDB. Handle explicit thread stop requests.
13609 (async_file_flush, async_file_mark): New.
13611 (send_sigstop): Use lwpid_of.
13612 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13613 interface changes. In non-stop mode, don't switch to a random
13615 (linux_resume_one_lwp): Use lwpid_of.
13616 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13617 (linux_resume_one_thread): ... this. Handle resume_stop. In
13618 non-stop mode, don't look for pending flag in all threads.
13619 (resume_status_pending_p): Don't consider explicitly suspended
13621 (my_waitpid): Reimplement. Emulate __WALL.
13622 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13624 (sigchld_handler, linux_supports_non_stop, linux_async)
13625 (linux_start_non_stop): New.
13626 (linux_target_ops): Register linux_supports_non_stop, linux_async
13627 and linux_start_non_stop.
13628 (initialize_low): Install SIGCHLD handler.
13629 * thread-db.c (thread_db_create_event, find_one_thread)
13630 (thread_db_get_tls_address): Use lwpid_of.
13631 * win32-low.c (win32_detach): Adjust to use resume_kind.
13632 (win32_wait): Add `options' argument.
13633 * spu-low.c (spu_resume): Adjust to use resume_kind.
13634 (spu_wait): Add `options' argument.
13636 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13638 Decouple target code from remote protocol.
13640 * target.h (enum target_waitkind): New.
13641 (struct target_waitstatus): New.
13642 (struct target_ops) <wait>: Return an unsigned long. Take a
13643 target_waitstatus pointer instead of a char pointer.
13644 (mywait): Likewise.
13645 * target.c (mywait): Change prototype to return an unsigned long.
13646 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13647 * server.h (thread_from_wait, old_thread_from_wait): Delete
13649 (prepare_resume_reply): Change prototype to take a
13651 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13652 (last_status, last_ptid): New.
13653 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13654 pid instead of a signal.
13655 (attach_inferior): Remove "status" and "signal" parameters.
13657 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13659 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13660 (handle_v_requests, myresume): Remove "status" and "signal"
13661 parameters. Adjust.
13662 (handle_status): New.
13663 (main): Delete local `status'. Adjust.
13664 * remote-utils.c: Include target.h.
13665 (prepare_resume_reply): Change prototype to take a
13666 target_waitstatus. Adjust.
13668 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13670 * spu-low.c (spu_wait): Adjust.
13671 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13673 (win32_wait): Adjust.
13675 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13677 * target.h (struct thread_resume): Delete leave_stopped member.
13678 (struct target_ops): Add a `n' argument to the `resume' callback.
13679 * server.c (start_inferior): Adjust.
13680 (handle_v_cont, myresume): Adjust.
13681 * linux-low.c (check_removed_breakpoint): Adjust to resume
13682 interface change, and to removed leave_stopped field.
13683 (resume_ptr): Delete.
13684 (struct thread_resume_array): New.
13685 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13686 resume interface change.
13687 (linux_continue_one_thread, linux_queue_one_thread)
13688 (resume_status_pending_p): Check if the resume field is NULL
13689 instead of checking the leave_stopped member.
13690 (linux_resume): Adjust to the target resume interface change.
13691 * spu-low.c (spu_resume): Adjust to the target resume interface
13693 * win32-low.c (win32_detach, win32_resume): Ditto.
13695 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13697 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13699 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13701 (linux_continue_one_thread): Only preserve the stepping flag if
13702 there's a pending breakpoint.
13704 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13706 * server.c (main): After the inferior having exited, call
13707 remote_close before exiting gdbserver.
13709 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13711 Fix size of FPSCR in Power 7 processors.
13712 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13713 (PPC_FEATURE_HAS_DFP): New #define.
13714 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13717 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13719 * server.c (handle_query) Whitespace and formatting.
13721 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13723 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13724 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13725 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13726 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13727 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13728 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13729 Makefile.in, configure.ac: Fix whitespace throughout.
13730 * configure: Regenerate.
13732 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13734 * inferiors.c (find_inferior): Make it safe for the callback
13735 function to delete the currently iterated inferior.
13737 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13739 * Makefile.in (linuw_low_h): Move higher.
13740 (thread-db.o): Depend on $(linux_low_h).
13742 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13744 Rename "process" to "lwp" throughout.
13746 * linux-low.c (all_processes): Rename to...
13747 (all_lwps): ... this.
13748 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13749 (add_process): Rename to ...
13750 (add_lwp): ... this. Adjust.
13751 (linux_create_inferior): Adjust.
13752 (linux_attach_lwp): Adjust.
13753 (linux_attach): Adjust.
13754 (linux_kill_one_process): Rename to ...
13755 (linux_kill_one_lwp): ... this. Adjust.
13756 (linux_kill): Adjust.
13757 (linux_detach_one_process): Rename to ...
13758 (linux_detach_one_lwp): ... this. Adjust.
13759 (linux_detach): Adjust.
13760 (check_removed_breakpoint): Adjust.
13761 (status_pending_p): Adjust.
13762 (linux_wait_for_process): Rename to ...
13763 (linux_wait_for_lwp): ... this. Adjust.
13764 (linux_wait_for_event): Adjust.
13765 (send_sigstop): Adjust.
13766 (wait_for_sigstop): Adjust.
13767 (stop_all_processes): Rename to ...
13768 (stop_all_lwps): ... this.
13769 (linux_resume_one_process): Rename to ...
13770 (linux_resume_one_lwp): ... this. Adjust.
13771 (linux_set_resume_request, linux_continue_one_thread)
13772 (linux_queue_one_thread, resume_status_pending_p)
13773 (usr_store_inferior_registers, regsets_store_inferior_registers)
13774 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13776 * linux-low.h (get_process): Rename to ...
13777 (get_lwp): ... this. Adjust.
13778 (get_thread_process): Rename to ...
13779 (get_thread_lwp): ... this. Adjust.
13780 (get_process_thread): Rename to ...
13781 (get_lwp_thread): ... this. Adjust.
13782 (struct process_info): Rename to ...
13783 (struct lwp_info): ... this.
13784 (all_processes): Rename to ...
13785 (all_lwps): ... this.
13786 * proc-service.c (ps_lgetregs): Adjust.
13787 * thread-db.c (thread_db_create_event, find_one_thread)
13788 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13790 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13792 * server.c (handle_query): Handle "qAttached".
13794 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13796 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13797 GPLv3, update license URL.
13799 2009-03-01 Doug Evans <dje@google.com>
13801 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13802 (server_h): Add gdb_signals.h.
13803 (signals.o): Update.
13804 * server.h (target_signal_from_host,target_signal_to_host_p)
13805 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13807 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13809 * remote-utils.c (getpkt): Also generate remote-debug
13810 information if noack_mode is set.
13812 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13814 * server.c (handle_query): Report qXfer:siginfo:read and
13815 qXfer:siginfo:write as supported and handle them.
13816 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13817 * linux-low.c (linux_xfer_siginfo): New.
13818 (linux_target_ops): Set it.
13820 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13822 * server.c (gdbserver_usage): Mention --remote-debug.
13823 (main): Accept '--remote-debug' switch.
13825 2009-01-18 Doug Evans <dje@google.com>
13827 * regcache.c (new_register_cache): No need to check result of xcalloc.
13828 * server.c (handle_search_memory): Back out calls to xmalloc,
13829 result is checked and error is returned to user upon failure.
13830 (handle_query): Ditto. Add more checks for result of malloc.
13831 (handle_v_cont): Check result of malloc, report error back to
13833 (handle_v_run): Ditto. Call freeargv.
13834 * server.h (freeargv): Declare.
13835 * utils.c (freeargv): New fn.
13837 2009-01-15 Doug Evans <dje@google.com>
13839 * gdbreplay.c (perror_with_name): Make arg const char *.
13840 * server.h (target_signal_to_name): Make return type const char *.
13841 * thread-db.c (thread_db_err_str): Make return type const char *.
13842 * utils.c (perror_with_name): Make arg const char *.
13844 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13846 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13847 when handling a EXIT_PROCESS_DEBUG_EVENT.
13849 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13851 * gdbreplay.c (gdbreplay_version): Update copyright year.
13852 * server.c (gdbserver_version): Likewise.
13854 2009-01-05 Doug Evans <dje@google.com>
13856 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13857 (handle_extended_wait): Improve comment.
13859 2008-12-13 Doug Evans <dje@google.com>
13861 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13862 * server.h (ATTR_MALLOC): New macro.
13863 (xmalloc,xcalloc,xstrdup): Declare.
13864 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13865 * inferiors.c: Ditto.
13866 * linux-low.c: Ditto.
13867 * mem-break.c: Ditto.
13868 * regcache.c: Ditto.
13869 * remote-utils.c: Ditto.
13872 * win32-low.c: Ditto.
13874 2008-12-12 Doug Evans <dje@google.com>
13876 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13877 in debugging printf.
13879 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13881 2008-12-09 Doug Evans <dje@google.com>
13883 * linux-low.h (struct process_info): Delete member tid, unused.
13884 * thread-db.c (find_one_thread): Update.
13885 (maybe_attach_thread): Update.
13887 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13889 * target.h (struct target_ops): Add qxfer_osdata member.
13890 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13892 (linux_qxfer_osdata): New functions.
13893 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13895 * server.c (handle_query): Handle "qXfer:osdata:read:".
13896 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13897 (buffer_xml_printf): New functions.
13898 * server.h (struct buffer): New.
13899 (buffer_grow_str, buffer_grow_str0): New macros.
13900 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13901 (buffer_xml_printf): Declare.
13903 2008-11-24 Doug Evans <dje@google.com>
13905 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13907 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13909 * server.c (handle_v_run): Always use the supplied argument list.
13911 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13913 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13914 (xtensa_regmap_table): Add entry for scompare1.
13916 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13918 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13919 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13920 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13921 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13922 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13923 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13924 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13925 XML target descriptions.
13926 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13927 when inferior is running on an ISA 2.05 or later processor. Add
13928 special case to return offset for full 64-bit slot of FPSCR when
13931 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13933 * Makefile.in (SFILES, clean): Added sparc64 files.
13934 (reg-sparc64.o, reg-sparc64.c): New.
13935 * configure.srv (sparc*-*-linux*): New configuration.
13936 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13937 syscall arguments for SPARC.
13938 (regsets_store_inferior_registers): Likewise.
13939 * linux-sparc-low.c: New file.
13941 2008-10-21 Doug Evans <dje@google.com>
13943 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13944 (READLINE_DIR,READLINE_DEP): Delete.
13945 (INTERNAL_CFLAGS): Update.
13946 (LINTFLAGS): Update.
13948 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13950 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13951 whole argv from the last run, not just argv[0].
13953 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13955 * regcache.c (new_register_cache): Return NULL if the register
13956 cache size isn't known yet.
13957 (free_register_cache): Avoid dereferencing a NULL regcache.
13959 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13961 * configure.srv: Merge MIPS and MIPS64.
13963 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13965 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13967 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13969 * Makefile.in: Add required vsx dependencies.
13971 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13972 Declare init_registers_powerpc_vsx32l.
13973 Declare init_registers_powerpc_vsx64l.
13974 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13975 (ppc_arch_setup): Check for VSX in hwcap.
13976 (ppc_fill_vsxregset): New function.
13977 (ppc_store_vsxregset): New function.
13978 Add new VSX entry in regset_info target_regsets.
13980 * configure.srv: Add new VSX dependencies.
13982 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13984 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13985 (remote_open): Set or clear transport_is_reliable.
13986 (putpkt_binary): Don't expect acks in noack mode.
13987 (getpkt): Don't send ack/nac in noack mode.
13988 * server.c (handle_general_set): Handle QStartNoAckMode.
13989 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13991 (main): Reset noack_mode on every connection.
13992 * server.h (noack_mode): Declare.
13994 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13996 * Makefile.in (GDBREPLAY_OBS): New variable.
13997 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13999 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14000 Daniel Jacobowitz <dan@codesourcery.com>
14002 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14003 (usr_store_inferior_registers): Likewise.
14004 (regsets_store_inferior_registers): Likewise.
14006 2008-07-31 Rolf Jansen <rj@surtec.com>
14007 Pedro Alves <pedro@codesourcery.com>
14009 * configure.ac: Check for memmem declaration.
14010 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14011 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14012 (disable_packet_qfThreadInfo): Unconditionally compile.
14013 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14014 * configure, config.in: Regenerate.
14016 2008-07-28 Doug Kwan <dougkwan@google.com>
14018 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14019 (linux_write_memory): Remove declaration of errno.
14021 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14023 * linux-low.c (handle_extended_wait): Do not use "status"
14024 variable uninitialized.
14026 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14028 * server.c (handle_v_attach): Inhibit reporting dll changes.
14030 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14032 * remote-utils.c (prepare_resume_reply): If requested, don't
14033 output "thread:TID" in the T stop reply.
14035 * server.c (disable_packet_vCont, disable_packet_Tthread)
14036 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14037 (handle_query): If requested, disable support for qC, qfThreadInfo
14039 (handle_v_requests): If requested, disable support for vCont.
14040 (gdbserver_show_disableable): New.
14041 (main): Handle --disable-packet and --disable-packet=LIST.
14043 * server.h (disable_packet_vCont, disable_packet_Tthread)
14044 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14046 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14048 * server.c (gdbserver_usage): Mention --version.
14050 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14052 * Makefile.in (gdbreplay.o): New rule.
14054 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14056 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14057 message, not gdbserver.
14059 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14060 Nathan Sidwell <nathan@codesourcery.com>
14061 Joseph Myers <joseph@codesourcery.com>
14063 * acinclude.m4: Include ../../config/acx.m4.
14064 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14065 * configure, config.in: Regenerate.
14066 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14067 * server.c (gdbserver_version): Print PKGVERSION.
14068 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14069 (main): Adjust gdbserver_usage calls.
14070 * gdbreplay.c (version, host_name): Add declarations.
14071 (gdbreplay_version, gdbreplay_usage): New.
14072 (main): Accept --version and --help options.
14074 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14076 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14077 (arm_breakpoint_at): Handle Thumb.
14078 (the_low_target): Add comment.
14080 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14082 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14084 2008-05-09 Doug Evans <dje@google.com>
14086 * server.h (decode_search_memory_packet): Declare.
14087 * remote-utils.c (decode_search_memory_packet): New fn.
14088 * server.c (handle_search_memory_1): New fn.
14089 (handle_search_memory): New fn.
14090 (handle_query): Process qSearch:memory packets.
14092 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14094 * regcache.c (registers_length): Remove.
14095 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14096 full register packet.
14097 * regcache.h (registers_length): Remove prototype.
14098 * server.h (PBUFSIZ): Define to 16384.
14100 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14102 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14103 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14104 powerpc-64l.o, and powerpc-altivec64l.o.
14105 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14106 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14107 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14108 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14109 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14112 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14113 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14114 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14115 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14116 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14117 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14118 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14119 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14120 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14121 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14124 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14125 (init_registers_powerpc_32l): ... this new prototype.
14126 (init_registers_powerpc_32): Remove, replace by ...
14127 (init_registers_powerpc_altivec32l): ... this new prototype.
14128 (init_registers_powerpc_e500): Remove, replace by ...
14129 (init_registers_powerpc_e500l): ... this new prototype.
14130 (init_registers_ppc64): Remove, replace by ...
14131 (init_registers_powerpc_64l): ... this new prototype.
14132 (init_registers_powerpc_64): Remove, replace by ...
14133 (init_registers_powerpc_altivec64l): ... this new prototype.
14134 (ppc_num_regs): Set to 73.
14135 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14136 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14137 (ppc_cannot_store_register): Handle orig_r3 and trap.
14138 (ppc_arch_setup): Update init_registers_... calls.
14139 (ppc_fill_gregset): Handle orig_r3 and trap.
14141 * inferiors.c (clear_inferiors): Reset current_inferior.
14143 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14145 * acinclude.m4: Add override.m4.
14146 * configure: Regenerate.
14148 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14150 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14151 initial call to init_register_ppc64.
14153 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14155 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14156 single powerpc*-*-linux* case.
14157 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14159 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14161 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14162 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14164 * linux-ppc-low.c: Include <elf.h>.
14165 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14166 (ppc_hwcap): New global variable.
14167 (ppc_regmap): Remove __SPE__ #ifdef sections.
14168 (ppc_regmap_e500): New global variable.
14169 (ppc_cannot_store_register): Update __SPE__ special case.
14170 (ppc_get_hwcap): New function.
14171 (ppc_arch_setup): Use it to determine whether inferior supports
14172 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14173 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14174 Do not access registers if target does not support AltiVec.
14175 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14176 Do not access registers if target does not support SPE.
14177 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14179 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14181 * linux-low.c (disabled_regsets, num_regsets): New.
14182 (use_regsets_p): Delete.
14183 (linux_wait_for_process): Clear disabled_regsets.
14184 (regsets_fetch_inferior_registers): Check and set it.
14185 (regsets_store_inferior_registers): Likewise.
14186 (linux_fetch_registers, linux_store_registers): Do not use
14188 (initialize_low): Allocate disabled_regsets.
14190 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14192 * Makefile.in (LIBOBJS): New.
14193 (OBS): Use LIBOBJS.
14194 (memmem.o): New rule.
14195 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14196 * configure: Regenerated.
14198 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14200 * server.c (handle_query): Never return "unsupported" for
14201 qXfer:features:read queries.
14203 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14205 * server.c (get_features_xml): Fix inverted condition.
14206 (handle_query): Always support qXfer:feature:read.
14208 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14210 * server.c (wrapper_argv): New.
14211 (start_inferior): Handle wrapper_argv. If set, expect an extra
14213 (gdbserver_usage): Document --wrapper.
14214 (main): Parse --wrapper.
14216 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14218 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14219 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14220 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14221 (ppc_set_pc): Likewise.
14222 (ppc_arch_setup): New function.
14223 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14224 of collect_register.
14225 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14227 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14229 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14230 instead of linux-ppc64-low.o.
14231 * linux-ppc64-low.c: Remove file.
14232 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14233 (linux-ppc64-low.o): Remove rule.
14235 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14236 (init_registers_powerpc_64): Likewise.
14237 (ppc_regmap): Conditionally define depending on __powerpc64__.
14238 (ppc_cannot_store_register): Do not special-case "fpscr" when
14239 compiled on __powerpc64__.
14240 (ppc_collect_ptrace_register): New function.
14241 (ppc_supply_ptrace_register): New function.
14242 (ppc_breakpoint): Change type to "unsigned int".
14243 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14244 (the_low_target): Conditionally provide initializers for the
14245 arch_setup member depending on __powerpc64__. Install
14246 collect_ptrace_register and supply_ptrace_register members.
14248 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14250 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14251 * server.c (gdbserver_xmltarget): Define.
14252 (get_features_xml): Use it to replace "target.xml" and arch_string.
14254 * configure.srv: Remove srv_xmltarget. Add XML files that were
14255 mentioned there to srv_xmlfiles instead. Remove conditional tests
14256 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14257 srv_xmlfiles and srv_regobj to include all possible choices.
14258 * configure.ac (srv_xmltarget): Remove.
14259 (srv_xmlfiles): Do not add "target.xml".
14260 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14261 checks for supplementary target information.
14262 * configure: Regenerate.
14263 * Makefile.in (XML_TARGET): Remove.
14264 (target.xml): Remove rule.
14265 (clean): Do not clean up target.xml.
14266 (.PRECIOUS): Do not mention target.xml.
14268 * target.h (struct target_ops): Remove arch_string member.
14269 * linux-low.c (linux_arch_string): Remove.
14270 (linux_target_ops): Remove arch_string initializer.
14271 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14272 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14273 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14274 * spu-low.c (spu_arch_string): Remove.
14275 (spu_target_ops): Remove arch_string initializer.
14276 * win32-low.c (win32_arch_string): Remove.
14277 (win32_target_ops): Remove arch_string initializer.
14278 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14279 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14280 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14282 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14284 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14285 by collect_ptrace_register and supply_ptrace_register hooks.
14286 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14287 instead of checking for the_low_target.left_pad_xfer.
14288 (usr_store_inferior_registers): Use collect_ptrace_register callback
14289 instead of checking for the_low_target.left_pad_xfer.
14291 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14292 (s390_supply_ptrace_register): Likewise.
14293 (s390_fill_gregset): Call s390_collect_ptrace_register.
14294 (the_low_target): Update.
14296 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14297 (ppc_supply_ptrace_register): Likewise.
14298 (the_low_target): Update.
14300 * linux-i386-low.c (the_low_target): Update.
14301 * linux-x86-64-low.c (the_low_target): Update.
14303 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14305 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14306 reg-s390.o and reg-s390x.o.
14308 * linux-low.c (new_inferior): New global variable.
14309 (linux_create_inferior, linux_attach): Set it.
14310 (linux_wait_for_process): Call the_low_target.arch_setup after the
14311 target has stopped for the first time.
14312 (initialize_low): Do not call the_low_target.arch_setup.
14314 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14315 (s390_set_pc): Likewise.
14316 (s390_arch_setup): New function.
14317 (the_low_target): Use s390_arch_setup as arch_setup routine.
14319 * regcache.c (realloc_register_cache): New function.
14320 (set_register_cache): Call it for each existing regcache.
14322 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14324 * server.h (init_registers): Remove prototype.
14326 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14327 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14328 instead of init_registers ().
14329 * linux-arm-low.c (init_registers_arm): Add prototype.
14330 (init_registers_arm_with_iwmmxt): Likewise.
14331 (the_low_target): Add initializer for arch_setup field.
14332 * linux-cris-low.c (init_registers_cris): Add prototype.
14333 (the_low_target): Add initializer for arch_setup field.
14334 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14335 (the_low_target): Add initializer for arch_setup field.
14336 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14337 (the_low_target): Add initializer for arch_setup field.
14338 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14339 (the_low_target): Add initializer for arch_setup field.
14340 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14341 (the_low_target): Add initializer for arch_setup field.
14342 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14343 (the_low_target): Add initializer for arch_setup field.
14344 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14345 (init_registers_mips64_linux): Likewise.
14346 (the_low_target): Add initializer for arch_setup field.
14347 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14348 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14349 (the_low_target): Add initializer for arch_setup field.
14350 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14351 (init_registers_powerpc_64): Likewise.
14352 (the_low_target): Add initializer for arch_setup field.
14353 * linux-s390-low.c (init_registers_s390): Add prototype.
14354 (init_registers_s390x): Likewise.
14355 (the_low_target): Add initializer for arch_setup field.
14356 * linux-sh-low.c (init_registers_sh): Add prototype.
14357 (the_low_target): Add initializer for arch_setup field.
14358 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14359 (the_low_target): Add initializer for arch_setup field.
14360 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14361 (the_low_target): Add initializer for arch_setup field.
14363 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14364 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14365 instead of init_registers ().
14366 * win32-arm-low.c (init_registers_arm): Add prototype.
14367 (the_low_target): Add initializer for arch_setup field.
14368 * win32-i386-low.c (init_registers_i386): Add prototype.
14369 (the_low_target): Add initializer for arch_setup field.
14371 * spu-low.c (init_registers_spu): Add prototype.
14372 (initialize_low): Call initialie_registers_spu () instead of
14373 initialize_registers ().
14375 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14377 * server.c (handle_v_requests): When handling the vRun and vAttach
14378 packets, if already debugging a process, don't kill it. Return an
14381 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14383 * server.c (handle_query): Correct length check.
14385 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14387 * win32-low.c (do_initial_child_stuff): Add process handle
14388 parameter. Set current_process_handle and current_process_id from the
14389 parameters. Clear globals.
14390 (win32_create_inferior): Don't set current_process_handle and
14391 current_process_id here. Instead pass them on the call to
14392 do_initial_child_stuff.
14393 (win32_attach): Likewise.
14394 (win32_clear_inferiors): New.
14395 (win32_kill): Don't close the current process handle or the
14396 current thread handle here. Instead call win32_clear_inferiors.
14397 (win32_detach): Don't open a new handle to the process. Call
14398 win32_clear_inferiors.
14399 (win32_join): Don't rely on current_process_handle; open a new
14400 handle using the process id.
14401 (win32_wait): Call win32_clear_inferiors when the inferior process
14404 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14406 * server.c (monitor_show_help): Add "exit".
14408 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14410 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14411 (clean): Add reg-xtensa.c.
14412 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14413 * configure.srv (xtensa*-*-linux*) New target.
14414 * linux-xtensa-low.c: New.
14415 * xtensa-xtregs.c: New.
14417 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14419 * hostio.c: Don't include errno.h.
14420 (errno_to_fileio_errno): Move to hostio-errno.
14421 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14422 error number outputting to the target->hostio_last_error callback.
14423 (hostio_packet_error): Use FILEIO_EINVAL directly.
14424 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14425 calls to hostio_error.
14426 * hostio-errno.c: New.
14427 * server.h (hostio_last_error_from_errno): Declare.
14428 * target.h (target_ops): Add hostio_last_error member.
14429 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14430 as hostio_last_error handler.
14431 * spu-low.c (spu_target_ops): Likewise.
14432 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14433 (wince_hostio_last_error): New functions.
14434 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14435 as hostio_last_error handler.
14436 (win32_target_ops) [!_WIN32_WCE]: Register
14437 hostio_last_error_from_errno as hostio_last_error handler.
14438 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14439 (hostio-errno.o): New rule.
14440 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14441 * configure.srv (srv_hostio_err_objs): New variable. Default to
14443 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14444 * configure: Regenerate.
14446 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14448 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14449 (linux_kill, linux_detach): Clean up the process list.
14450 * remote-utils.c (remote_open): Improve port number parsing.
14451 (putpkt_binary, input_interrupt): Only send interrupts if the target
14453 * server.c (extended_protocol): Make static.
14454 (attached): Define earlier.
14455 (exit_requested, response_needed, program_argv): New variables.
14456 (target_running): New.
14457 (start_inferior): Clear attached here.
14458 (attach_inferior): Set attached here.
14459 (require_running): Define.
14460 (handle_query): Use require_running and target_running. Implement
14462 (handle_v_attach, handle_v_run): New.
14463 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14464 (gdbserver_usage): Update.
14465 (main): Redo argument parsing. Handle --debug and --multi. Handle
14466 --attach along with other options or after the port. Save
14467 program_argv. Support no initial program. Resynchronize
14468 communication with GDB after an error. Handle "monitor exit".
14469 Use require_running and target_running. Always allow the extended
14470 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14471 restart in extended mode.
14472 * README: Refer to the GDB manual. Update --attach usage.
14474 2007-12-20 Andreas Schwab <schwab@suse.de>
14476 * linux-low.c (STACK_SIZE): Define.
14477 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14478 (linux_test_for_tracefork): Likewise.
14480 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14482 * linux-low.c (linux_wait_for_event): Update messages. Do not
14483 reinsert auto-delete breakpoints.
14484 * mem-break.c (struct breakpoint): Change return type of handler to
14486 (set_breakpoint_at): Update handler type.
14487 (reinsert_breakpoint_handler): Return 1 instead of calling
14489 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14491 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14492 * mem-break.h (set_breakpoint_at): Update handler type.
14493 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14494 * win32-low.c (auto_delete_breakpoint): New.
14495 (get_child_debug_event): Use it.
14497 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14499 * configure.ac: Check for pread and pwrite.
14500 * hostio.c (handle_pread): Fall back to lseek and read.
14501 (handle_pwrite): Fall back to lseek and write.
14502 * config.in, configure: Regenerated.
14504 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14506 * server.c (myresume): Add own_buf argument.
14507 (main): Update calls.
14509 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14511 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14512 * remote-utils.c (remote_open): Do not call disable_async_io.
14513 (block_async_io): Delete.
14514 (unblock_async_io): Make static.
14515 (initialize_async_io): New.
14516 * server.c (handle_v_cont): Handle async I/O here.
14517 (myresume): Likewise. Move other common resume tasks here...
14518 (main): ... from here. Call initialize_async_io. Disable async
14519 I/O before the main loop.
14520 * server.h (initialize_async_io): Declare.
14521 (block_async_io, unblock_async_io): Delete prototypes.
14522 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14524 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14526 * remote-utils.c (readchar): Allow binary data in received messages.
14528 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14530 * win32-low.c (attaching): New global.
14531 (win32_create_inferior): Clear the `attaching' global.
14532 (win32_attach): Set the `attaching' global.
14533 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14534 attaching. Only set a breakpoint at the entry point if not
14537 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14539 * server.c (main): Don't report dll events on the initial
14540 connection on attaches.
14542 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14544 * server.c (main): Relax numerical bases supported for the pid of
14545 the --attach command line argument.
14547 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14549 * win32-low.c (win32_attach): Call OpenProcess before
14550 DebugActiveProcess, not after. Add last error output to error
14553 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14555 * win32-low.c (win32_get_thread_context)
14556 (win32_set_thread_context): New functions.
14557 (thread_rec): Use win32_get_thread_context.
14558 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14559 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14562 2007-12-03 Leo Zayas
14563 Pedro Alves <pedro_alves@portugalmail.pt>
14565 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14567 (child_add_thread): Minor cleanup.
14568 (child_continue): Resume artificially suspended threads before
14569 calling ContinueDebugEvent.
14570 (suspend_one_thread): New.
14571 (fake_breakpoint_event): New.
14572 (get_child_debug_event): Change return type to int. Check here if
14573 gdb sent an interrupt request. If a soft interrupt was requested,
14574 fake a breakpoint event. Return 0 if there is no event to handle,
14576 (win32_wait): Don't check here if gdb sent an interrupt request.
14577 Ensure there is a valid event to handle.
14578 (win32_request_interrupt): Add soft interruption method as last
14581 2007-12-03 Leo Zayas
14582 Pedro Alves <pedro_alves@portugalmail.pt>
14584 * win32-low.h (win32_thread_info): Add descriptions to the
14585 structure members. Replace `suspend_count' counter by a
14587 * win32-low.c (thread_rec): Update condition of when to get the
14588 context from the inferior. Rely on ContextFlags being set if it
14589 has already been retrieved. Only suspend the inferior thread if
14590 we haven't already. Warn if that fails.
14591 (continue_one_thread): s/suspend_count/suspended/. Only call
14592 ResumeThread once. Warn if that fails.
14594 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14596 * win32-low.c (win32_wait): Don't read from the inferior when it
14597 has already exited.
14599 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14601 * Makefile.in (win32_low_h): New variable.
14602 (win32-low.o): Add dependency on $(win32_low_h).
14603 (win32-arm-low.o, win32-i386-low.o): New rules.
14605 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14607 * hostio.c: Correct copyright year.
14609 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14611 * Makefile.in (OBS): Add hostio.o.
14612 (hostio.o): New rule.
14613 * server.h (handle_vFile): Declare.
14614 * hostio.c: New file.
14615 * server.c (handle_v_requests): Take packet_len and new_packet_len
14616 for binary packets. Call handle_vFile.
14617 (main): Update call to handle_v_requests.
14619 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14621 * linux-low.c: Include <sched.h>.
14623 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14625 * linux-low.c (linux_tracefork_grandchild): New.
14626 (linux_tracefork_child): Use clone.
14627 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14629 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14631 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14633 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14635 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14637 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14639 * inferiors.c (change_inferior_id): Delete.
14640 (add_pid_to_list, pull_pid_from_list): New.
14641 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14642 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14643 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14644 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14645 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14646 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14647 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14648 (using_threads): Always set to 1.
14649 (handle_extended_wait): New.
14650 (add_process): Do not set TID.
14651 (linux_create_inferior): Set must_set_ptrace_flags.
14652 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14653 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14654 (linux_thread_alive): Rename TID argument to LWPID.
14655 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14656 (linux_wait_for_event): Do not use TID or check using_threads. Update
14657 call to dead_thread_notify. Call handle_extended_wait.
14658 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14659 (send_sigstop): Delete sigstop_sent.
14660 (wait_for_sigstop): Avoid TID.
14661 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14662 (linux_test_for_tracefork): New.
14663 (linux_lookup_signals): Use thread_db_active and
14664 linux_supports_tracefork_flag.
14665 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14666 * linux-low.h (get_process_thread): Avoid TID.
14667 (struct process_ifo): Move thread_known and tid to the end. Remove
14669 (linux_attach_lwp, thread_db_init): Update prototypes.
14670 * server.h (change_inferior_id): Delete prototype.
14671 (add_pid_to_list, pull_pid_from_list): New prototypes.
14672 * thread-db.c (thread_db_use_events): New.
14673 (find_first_thread): Rename to...
14674 (find_one_thread): ...this. Update callers and messages. Do not
14675 call fatal. Check thread_db_use_events. Do not call
14676 change_inferior_id or new_thread_notify.
14677 (maybe_attach_thread): Update. Do not call new_thread_notify.
14678 (thread_db_init): Set thread_db_use_events. Check use_events.
14679 * utils.c (fatal, warning): Correct message prefix.
14681 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14683 * Makefile.in (clean): Remove new files.
14684 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14685 (powerpc-64.o, powerpc-64.c): New rules.
14686 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14687 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14689 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14691 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14692 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14693 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14694 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14695 (target_regsets): Add AltiVec and SPE register sets.
14696 * configure.ac: Check for AltiVec and SPE.
14697 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14698 (ppc_fill_vrregset, ppc_store_vrregset): New.
14699 (target_regsets): Add AltiVec register set.
14700 * configure: Regenerated.
14702 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14704 * linux-low.c (O_LARGEFILE): Define.
14705 (linux_read_memory): Use /proc/PID/mem.
14706 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14707 * configure, config.in: Regenerated.
14709 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14711 * linux-low.c (linux_wait_for_event): Do not pass signals while
14714 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14716 * win32-low.c (create_process): New.
14717 (win32_create_inferior): Use create_process instead of
14718 CreateProcess. If create_process failed retry appending an ".exe"
14719 suffix. Store the GetLastError result immediatelly after
14720 create_process calls and use it on the call to error.
14722 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14724 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14726 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14728 * configure.ac: Switch license to GPLv3.
14730 2007-08-01 Michael Snyder <msnyder@access-company.com>
14732 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14734 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14736 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14738 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14739 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14740 CloseToolhelp32Snapshot.
14741 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14742 CloseToolhelp32Snapshot.
14744 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14746 * server.c (main): Check for inferior exit before main loop.
14748 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14750 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14751 instead of on tmp_desc.
14753 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14754 Daniel Jacobowitz <dan@codesourcery.com>
14756 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14757 (add_thread): Minor cleanups.
14758 (clear_inferiors): Move lower in the file. Clear the DLL
14760 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14761 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14762 (xml_escape_text): New.
14763 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14765 (handle_v_cont): Report errors.
14766 (gdbserver_version): Update.
14767 (main): Correct size of own_buf. Do not report initial DLL events.
14768 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14769 (unloaded_dll, xml_escape_text): New.
14770 * win32-low.c (enum target_waitkind): Update comments.
14771 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14772 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14773 (win32_EnumProcessModules, win32_GetModuleInformation)
14774 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14775 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14776 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14777 (win32_Module32First, win32_Module32Next, load_toolhelp)
14778 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14779 (get_child_debug_event): Handle DLL events.
14780 (win32_wait): Likewise.
14782 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14784 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14785 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14787 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14789 * win32-low.c (handle_output_debug_string): Ignore event if not
14792 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14794 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14796 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14798 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14800 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14802 * inferiors.c (change_inferior_id): Add comment.
14803 * linux-low.c (check_removed_breakpoint): Add an early
14804 prototype. Improve debug output.
14805 (linux_attach): Doc update.
14806 (linux_detach_one_process, linux_detach): Clean up before releasing
14808 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14809 * linux-low.h (struct process_info): Doc improvement.
14810 * mem-break.c (delete_all_breakpoints): New.
14811 * mem-break.h (delete_all_breakpoints): New prototype.
14812 * thread-db.c (find_first_thread): New.
14813 (thread_db_create_event): Call it instead of
14814 thread_db_find_new_threads. Clean up unused variables.
14815 (maybe_attach_thread): Remove first thread handling.
14816 (thread_db_find_new_threads): Use find_first_thread.
14817 (thread_db_get_tls_address): Likewise.
14819 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14821 * thread-db.c (thread_db_find_new_threads): Add prototype.
14822 (thread_db_create_event): Check for the main thread before adding
14824 (maybe_attach_thread): Only enable event reporting if TID == 0.
14825 (thread_db_get_tls_address): Check for new threads.
14827 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14829 * linux-low.c (linux_create_inferior): Try execv before execvp.
14830 * spu-low.c (spu_create_inferior): Likewise.
14832 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14834 * linux-low.c (linux_create_inferior): Change execv to execvp.
14835 * spu-low.c (spu_create_inferior): Likewies.
14837 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14839 * Makefile.in (clean): Clean new files instead of deleted ones.
14840 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14841 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14843 * configure.srv: Specify XML files and new regformats for MIPS and
14845 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14846 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14847 an entry for the restart register.
14848 (mips_cannot_fetch_register, mips_cannot_store_register)
14849 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14850 register names to match the XML descriptions.
14851 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14852 restart register instead of $0.
14854 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14855 Markus Deuling <deuling@de.ibm.com>
14857 * remote-utils.c (decode_xfer_write): New function.
14858 * server.h (decode_xfer_write): Add prototype.
14859 * server.c (handle_query): Add PACKET_LEN argument. Support
14860 qXfer:spu:read and qXfer:spu:write packets.
14861 (main): Pass packet_len to handle_query.
14862 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14863 * target.h (target_ops): Add qxfer_spu.
14865 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14867 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14868 accessing non-seekable spufs files.
14870 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14872 * server.c (handle_query): Add reply for qC packet.
14874 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14875 Leo Zayas <lerele@champenstudios@com>
14877 * server.h (check_remote_input_interrupt_request): New function.
14878 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14879 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14880 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14881 (check_remote_input_interrupt_request): New function.
14882 * server.h (check_remote_input_interrupt_request): Declare.
14883 * win32-low.c (winapi_DebugBreakProcess,
14884 winapi_GenerateConsoleCtrlEvent): New typedefs.
14885 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14887 (win32_wait): Check for remote interrupt request
14888 with check_remote_input_interrupt_request.
14889 (win32_request_interrupt): New function.
14890 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14892 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14894 * win32-low.c (debug_registers_changed,
14895 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14896 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14897 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14898 (thread_rec): Get context using the low target.
14899 (child_add_thread): Call thread_added on the low target,
14900 which does the same thing.
14902 (do_initial_child_stuff): Remove debug registers references.
14903 Set context using the low target. Resume threads after
14904 setting the contexts.
14905 (child_continue): Remove dead variable. Remove debug
14906 registers references.
14907 (child_fetch_inferior_registers): Go through the low target.
14908 (do_child_store_inferior_registers): Remove.
14909 (child_store_inferior_registers): Go through the low target.
14910 (win32_resume): Remove debug registers references.
14911 Set context using the low target.
14912 (handle_exception): Change return type to void. Don't record
14913 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14914 first chance exception.
14915 (get_child_debug_event): Change return type to void. Remove
14916 goto loop. Always return after waiting for debug event.
14917 (win32_wait): Convert to switch statement. Handle spurious
14920 * win32-i386-low.c (debug_registers_changed,
14921 debug_registers_used): New.
14922 (initial_stuff): Rename to ...
14923 (i386_initial_stuff): ... this. Clear debug registers
14925 (store_debug_registers): Delete.
14926 (i386_get_thread_context): New.
14927 (load_debug_registers): Delete.
14928 (i386_set_thread_context): New.
14929 (i386_thread_added): New.
14930 (single_step): Rename to ...
14931 (i386_single_step): ... this.
14932 (do_fetch_inferior_registers): Rename to ...
14933 (i386_fetch_inferior_register): ... this.
14934 (i386_store_inferior_register): New.
14935 (the_low_target): Adapt to new interface.
14937 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14938 (arm_get_thread_context): New.
14939 (arm_set_thread_context): New.
14941 (do_fetch_inferior_registers): Rename to ...
14942 (arm_fetch_inferior_register): ... this.
14943 (arm_store_inferior_register): New.
14944 (arm_wince_breakpoint): Reimplement as unsigned long.
14945 (arm_wince_breakpoint_len): Define.
14946 (the_low_target): Adapt to new interface.
14948 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14949 load_debug_registers. Add get_thread_context, set_thread_context,
14950 thread_added and store_inferior_register. Rename
14951 fetch_inferior_registers to fetch_inferior_register.
14952 (regptr): Remove declaration.
14954 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14956 * linux-low.c (linux_detach): Change return type to int. Return 0.
14957 * spu-low.c (spu_detach): Likewise.
14959 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14961 * target.h (target_ops): Change return type of detach to int.
14963 (join_inferior): New.
14964 * server.c (main): Don't skip detach support on mingw32.
14965 If the inferior doesn't support detaching return error.
14966 Call join_inferior instead of using waitpid.
14967 * linux-low.c (linux_join): New.
14968 (linux_target_op): Add linux_join.
14969 * spu-low.c (spu_join): New.
14970 (spu_target_ops): Add spu_join.
14971 * win32-low.c (win32_detach): Adapt to new interface.
14972 Reopen current_process_handle before detaching. Issue a child
14973 resume before detaching.
14975 (win32_target_op): Add win32_join.
14977 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14979 * win32-low.c (win32-attach): Fix return value.
14980 * target.h (target_ops): Describe ATTACH return values.
14982 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14984 * win32-low.c (GETPROCADDRESS): Define.
14985 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14986 (winapi_DebugSetProcessKillOnExit): Likewise.
14987 (win32_create_inferior): Force usage of ansi CreateProcessA.
14988 (win32_attach): Use GETPROCADDRESS.
14989 (win32_detach): Likewise.
14991 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14993 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14995 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14997 * win32-low.c: Commit leftover changes from 2007-03-29.
14999 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15001 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15002 fields short instead of int. Add explicit padding.
15003 (i387_cache_to_fsave): Remove unnecessary casts.
15004 (i387_fsave_to_cache): Doc fix.
15005 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15007 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15009 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15010 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15012 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15014 * configure.srv (arm*-*-mingw32ce*): Move near the other
15017 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15019 * configure.ac: Add errno checking.
15020 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15021 sys/file.h and malloc.h.
15022 (AC_CHECK_DECLS): Add perror.
15023 (srv_mingwce): Handle.
15024 * configure.srv (i[34567]86-*-cygwin*): Add
15025 win32-i386-low.o to srv_tgtobj.
15026 (i[34567]86-*-mingw*): Likewise.
15027 (arm*-*-mingw32ce*): Add case.
15028 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15029 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15030 [__MINGW32CE__] (strerror): New function.
15031 [__MINGW32CE__] (errno): Define to GetLastError.
15032 [__MINGW32CE__] (COUNTOF): New macro.
15033 (remote_open): Remove extra close call.
15034 * mem-break.c (delete_breakpoint_at): New function.
15035 * mem-break.h (delete_breakpoint_at): Declare.
15036 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15037 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15038 [USE_WIN32API] (read, write): Add char* casts.
15039 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15040 * server.h: Include wincecompat.h on Windows CE.
15041 [HAVE_ERRNO_H]: Check.
15042 (perror): Declare if not declared.
15043 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15044 (perror_with_name): Remove errno declaration.
15045 * wincecompat.h: New.
15046 * wincecompat.c: New.
15047 * win32-low.h: New.
15048 * win32-arm-low.c: New.
15049 * win32-i386-low.c: New.
15050 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15051 (OUTMSG2): Make it safe.
15053 (COUNTOF): New macro.
15054 (NUM_REGS): Get it from the low target.
15055 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15056 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15057 (thread_rec): Let low target handle debug registers.
15058 (child_add_thread): Likewise.
15059 (child_init_thread_list): Likewise.
15060 (continue_one_thread): Likewise.
15062 (do_child_fetch_inferior_registers): Move to ...
15063 * win32-i386-low.c: ... here, and rename to ...
15064 (do_fetch_inferior_registers): ... this.
15065 * win32-low.c (child_fetch_inferior_registers):
15066 Go through the low target.
15067 (do_child_store_inferior_registers): Use regptr.
15068 (strwinerror): New function.
15069 (win32_create_inferior): Handle Windows CE.
15070 Use strwinerror instead of strerror on Windows error
15071 codes. Add program to the error output.
15072 Don't close the main thread handle on Windows CE.
15073 (win32_attach): Use coredll.dll on Windows CE.
15074 (win32_kill): Close current process and current
15076 (win32_detach): Use coredll.dll on Windows CE.
15077 (win32_resume): Let low target handle debug registers, and
15079 (handle_exception): Add/Remove initial breakpoint. Avoid
15080 non-existant WSTOPSIG on Windows CE.
15081 (win32_read_inferior_memory): Cast to remove warning.
15082 (win32_arch_string): Go through the low target.
15083 (initialize_low): Call set_breakpoint_data with the low
15084 target's breakpoint.
15085 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15086 FOP_REGNUM, mappings): Move to ...
15087 * win32-i386-low.c: ... here.
15088 * win32-low.c (win32_thread_info): Move to ...
15089 * win32-low.h: ... here.
15090 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15091 win32-arm-low.c and wincecompat.c.
15092 (all:): Add $EXEEXT.
15093 (install-only:): Likewise.
15094 (gdbserver:): Likewise.
15095 (gdbreplay:): Likewise.
15096 * config.in: Regenerate.
15097 * configure: Regenerate.
15099 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15101 * win32-low.c: Rename typedef thread_info to
15102 win32_thread_info throughout.
15104 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15106 * win32-i386-low.c: Rename to ...
15107 * win32-low.c: ... this.
15108 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15109 * Makefile.in: Likewise.
15111 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15113 * remote-utils.c (monitor_output): Constify msg parameter.
15114 * server.h (monitor_output): Likewise.
15115 * win32-i386-low.c (handle_output_debug_string): New.
15116 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15117 handle_output_debug_string.
15118 (get_child_debug_event): Likewise.
15120 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15122 * server.c (main): Correct strtoul check.
15124 2007-03-27 Jon Ringle <jon@ringle.org>
15126 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15128 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15130 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15132 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15134 * terminal.h: Check HAVE_SGTTY_H.
15136 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15138 * remote-utils.c (remote_open): Print out the assigned port number.
15140 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15142 * remote-utils.c (monitor_output): New function.
15143 * server.c (debug_threads): Define here.
15144 (monitor_show_help): New function.
15145 (handle_query): Handle qRcmd.
15146 (main): Do not handle 'd' packet.
15147 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15148 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15151 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15153 * Makefile.in (EXEEXT): New.
15154 (clean): Use $(EXEEXT).
15156 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15158 * target.h (target_ops): Rename send_signal to request_interrupt,
15159 and remove enum target_signal parameter.
15160 * linux-low.c (linux_request_interrupt): Rename from
15161 linux_send_signal, and always send SIGINT.
15162 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15163 and always send SIGINT.
15164 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15166 (input_interrupt): Likewise.
15168 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15170 * server.c (get_features_xml): Check if target implemented
15172 * win32-i386-low.c (win32_arch_string): New.
15173 (win32_target_ops): Add win32_arch_string as arch_string member.
15175 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15177 * spu-low.c (spu_arch_string): New.
15178 (spu_target_ops): Add spu_arch_string.
15180 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15182 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15183 * configure.ac: Do not check for terminal.h.
15184 * configure, config.in: Regenerated.
15186 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15188 * Makefile.in (OBS): Add $(XML_BUILTIN).
15189 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15191 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15192 (arm-with-iwmmxt.c): New.
15193 * config.in, configure: Regenerate.
15194 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15195 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15196 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15197 (arm*-*-linux*): Add iWMMXt and regset support.
15198 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15199 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15200 (arm_store_wmmxregset, target_regsets): New.
15201 * server.c (get_features_xml): Take annex argument. Check builtin
15203 (handle_query): Handle multiple annexes.
15205 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15207 * remote-utils.c [USE_WIN32API] (read, write): Define.
15208 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15211 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15213 * linux-i386-low.c (the_low_target): Set arch_string.
15214 * linux-x86-64-low.c (the_low_target): Likewise.
15215 * linux-low.c (linux_arch_string): New.
15216 (linux_target_ops): Add it.
15217 * linux-low.h (struct linux_target_ops): Add arch_string.
15218 * server.c (write_qxfer_response): Use const void * for DATA.
15219 (get_features_xml): New.
15220 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15221 * target.h (struct target_ops): Add arch_string method.
15223 2007-01-03 Denis Pilat <denis.pilat@st.com>
15224 Daniel Jacobowitz <dan@codesourcery.com>
15226 * linux-low.c (linux_kill): Handle being called with no threads.
15227 * win32-i386-low.c (win32_kill): Likewise.
15228 (get_child_debug_event): Clear current_process_handle.
15230 2006-12-30 Denis PILAT <denis.pilat@st.com>
15231 Daniel Jacobowitz <dan@codesourcery.com>
15233 * remote-utils.c (remote_open): Check the type of specified
15234 serial port devices before opening them.
15235 * server.c (main): Kill the inferior if an error occurs during
15236 the first remote_open.
15238 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15240 * README: Update supported targets.
15242 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15244 * Makefile.in (clean): Remove reg-mips64.c.
15245 (reg-mips64.c, reg-mips64.o): New rules.
15246 * configure.srv: Handle mips64. Include regset support for mips.
15247 * linux-mips-low.c (union mips_register): New.
15248 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15249 (mips_breakpoint, mips_breakpoint_at): Use int.
15250 (mips_collect_register, mips_supply_register)
15251 (mips_collect_register_32bit, mips_supply_register_32bit)
15252 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15253 (mips_store_fpregset, target_regsets): New.
15254 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15256 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15258 * configure.srv: Add target "spu*-*-*".
15259 * Makefile.in (clean): Remove reg-spu.c.
15260 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15261 * spu-low.c: New file.
15263 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15265 * configure.ac: Correct td_thr_tls_get_addr test.
15266 * configure: Regenerated.
15268 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15270 * linux-low.c (linux_wait_for_event): Reformat. Use the
15271 pass_signals array.
15272 * remote-utils.c (decode_address_to_semicolon): New.
15273 * server.c (pass_signals, handle_general_set): New.
15274 (handle_query): Mention QPassSignals for qSupported.
15275 (main): Call handle_general_set.
15276 * server.h (pass_signals, decode_address_to_semicolon): New.
15278 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15280 * server.c (handle_query): Correct error handling for read_auxv.
15282 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15284 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15285 and srv_linux_thread_db to yes.
15286 * linux-s390-low.c (s390_fill_gregset): New function.
15287 (target_regsets): Define data structure.
15289 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15291 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15292 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15293 * config.in, configure: Regenerated.
15294 * inferiors.c (gdb_id_to_thread): New function.
15295 (gdb_id_to_thread_id): Use it.
15296 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15297 * linux-low.h (struct process_info): Add th member.
15298 (thread_db_get_tls_address): New prototype.
15299 * remote-utils.c (decode_address): Make non-static.
15300 * server.c (handle_query): Handle qGetTLSAddr.
15301 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15302 * target.h (struct target_ops): Add get_tls_address.
15303 * thread-db.c (maybe_attach_thread): Save the thread handle.
15304 (thread_db_get_tls_address): New.
15306 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15308 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15309 (linux_resume_one_process): Take a siginfo_t *. Update all
15310 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15311 (struct pending_signals): Add a siginfo_t.
15312 (linux_wait_for_process): Always set last_status.
15313 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15314 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15315 * linux-low.h (struct process_info): Add last_status.
15317 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15319 * remote-utils.c (try_rle): New function.
15320 (putpkt_binary): Use it.
15322 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15324 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15325 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15326 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15327 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15328 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15331 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15333 * server.c (terminal_fd): New variable.
15334 (old_foreground_pgrp): Likewise.
15335 (restore_old_foreground_pgrp): New function.
15336 (start_inferior): Record the terminal file descriptor in terminal_fd
15337 and its original foreground group in old_foreground_pgrp. Register
15338 restore_old_foreground_pgrp with atexit().
15340 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15342 * server.c (handle_query): Correct qPart to qXfer.
15344 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15346 * configure.ac: Check for more headers which are missing on
15347 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15348 * configure.srv: Add Cygwin and mingw32.
15349 * remote-utils.c: Don't include headers unconditionally which
15350 are missing on mingw32. Include <winsock.h> for mingw32.
15351 (remote_open): Adjust for mingw32 support. Flush
15352 standard error after writing to it.
15353 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15354 (unblock_async_io, enable_async_io, disable_async_io)
15355 (readchar, getpkt): Update for Winsock support.
15356 (prepare_resume_reply): Expect a protocol signal number.
15357 * server.c: Disable <sys/wait.h> on mingw32.
15358 (start_inferior): Adjust for mingw32 support. Flush
15359 standard error after writing to it.
15360 (attach_inferior): Likewise. Use protocol signal
15362 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15364 * win32-i386-low.c: New file.
15365 * Makefile.in (XM_CLIBS): Set.
15366 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15367 (win32-i386-low.o): New dependency rule.
15368 * linux-low.c (linux_wait): Use target signal numbers.
15369 * target.h (struct target_ops): Doc fix.
15370 * server.h (target_signal_to_name): New prototype.
15371 * gdbreplay.c: Don't include headers unconditionally which
15372 are missing on mingw32. Include <winsock.h> for mingw32.
15373 (remote_close, remote_open): Adjust for Winsock support.
15374 * configure, config.in: Regenerated.
15376 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15378 * server.c (decode_xfer_read, write_qxfer_response): New.
15379 (handle_query): Take a packet length argument. Handle
15380 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15381 the qSupported response.
15382 (main): Update call to handle_query.
15384 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15386 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15387 (putpkt_binary): Renamed from putpkt and adjusted for binary
15389 (putpkt): New wrapper for putpkt_binary.
15390 (readchar): Don't mask off the high bit.
15391 (decode_X_packet): New function.
15392 * server.c (main): Call putpkt_binary if a handler sets the packet
15393 length. Save the length of the incoming packet. Handle 'X'.
15394 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15396 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15398 * server.c (handle_query): Handle qSupported.
15400 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15402 * remote-utils.c (all_symbols_looked_up): New variable.
15403 (look_up_one_symbol): Check it.
15404 * server.h (look_up_one_symbol): New declaration.
15405 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15407 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15409 * Makefile.in (linux-arm-low.o): Update dependencies.
15410 * linux-arm-low.c: Include "gdb_proc_service.h".
15411 (PTRACE_GET_THREAD_AREA): Define.
15412 (ps_get_thread_area): New function.
15414 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15416 * configure.srv (m68k*-*-uclinux*): New target.
15417 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15418 (linux_resume_one_process): Remove extraneous cast.
15419 (linux_read_offsets): New.
15420 (linux_target_op): Add linux_read_offsets on mmuless systems.
15421 * server.c (handle_query): Add qOffsets logic.
15422 * target.h (struct target_ops): Add read_offsets.
15424 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15426 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15427 (PTRACE_GET_THREAD_AREA): Define.
15428 (ps_get_thread_area): New function.
15429 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15430 (linux-x86-64-low.o): Update.
15432 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15434 * configure.ac: Remove checks for prfpregset_t.
15435 * gdb_proc_service.h: New file.
15436 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15437 new "gdb_proc_service.h".
15438 * proc-service.c: Likewise.
15439 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15440 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15441 * Makefile.in (gdb_proc_service_h): Updated.
15442 * configure, config.in: Regenerated.
15444 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15446 * remote-utils.c (prepare_resume_reply): Move declaration
15447 of gdb_id_from_wait to the top of the block.
15449 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15451 * linux-low.c (regsets_store_inferior_registers): Read the regset
15452 from the target before filling it.
15454 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15456 * server.c (attach_inferior): Return SIGTRAP for a successful
15459 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15461 * Makefile.in (OBS): Add version.o.
15462 (STAGESTUFF): Delete.
15463 (version.o): Add dependencies.
15464 (version.c): Replace rule.
15465 (clean): Remove version.c.
15466 * server.c (gdbserver_version): New.
15467 (gdbserver_usage): Use printf.
15468 (main): Handle --version and --help.
15469 * server.h (version, host_name): Add declarations.
15471 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15483 * linux-x86-64-low.c:
15485 * linux-s390-low.c:
15486 * linux-ppc64-low.c:
15488 * linux-mips-low.c:
15489 * linux-m68k-low.c:
15490 * linux-m32r-low.c:
15493 * linux-ia64-low.c:
15494 * linux-i386-low.c:
15495 * linux-crisv32-low.c:
15507 * gdbserver.1: Add (C) after Copyright. Update the FSF
15510 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15512 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15513 (arm_breakpoint_at): Recognize both breakpoints.
15514 (the_low_target): Use the correct breakpoint instruction.
15516 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15518 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15519 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15520 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15521 (the_low_target): Update.
15523 2005-10-25 Andreas Schwab <schwab@suse.de>
15525 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15527 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15528 (ia64_num_regs): Reduce to 462.
15530 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15532 * acinclude.m4: Correct quoting.
15533 * aclocal.m4: Regenerated.
15535 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15536 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15537 (thread_db_init): Call thread_db_err_str.
15538 * configure.ac: Check for TD_VERSION.
15539 * config.in, configure: Regenerated.
15541 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15543 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15545 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15547 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15548 is not available. Define HAVE_PTRACE_GETREGS if it is.
15549 * config.in, configure: Regenerated.
15550 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15551 * linux-i386-low.c, linux-m68k-low.c: Update to use
15552 HAVE_PTRACE_GETREGS.
15553 * linux-low.c (regsets_fetch_inferior_registers)
15554 (regsets_store_inferior_registers): Only return 0 if we processed
15556 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15557 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15559 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15561 * inferiors.c (struct thread_info): Add gdb_id.
15562 (add_thread): Add gdb_id argument.
15563 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15564 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15565 calls to add_thread.
15566 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15567 * server.c (handle_query): Use thread_to_gdb_id.
15568 (handle_v_cont, main): Use gdb_id_to_thread_id.
15569 * server.h (add_thread): Update prototype.
15570 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15573 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15575 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15576 left-padded registers.
15577 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15578 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15580 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15582 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15583 * configure: Regenerate.
15584 * config.in: Regenerate.
15585 * server.h (NEED_DECLARATION_STRERROR):
15586 Replace with !HAVE_DECL_STRERROR.
15588 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15590 * linux-low.c (linux_wait, linux_send_signal): Don't test
15591 an unsigned long variable for > 0 if it could be MAX_ULONG.
15592 * server.c (myresume): Likewise.
15593 * target.c (set_desired_inferior): Likewise.
15595 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15597 * configure.ac: Simplify and improve check for socklen_t.
15598 * configure, config.in: Regenerate.
15600 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15602 * acconfig.h: Remove.
15603 * configure.ac: Add a test for socklen_t. Use three-argument
15604 AC_DEFINE throughout.
15605 * config.in: Regenerated using autoheader 2.59.
15606 * configure: Regenerated.
15608 * gdbreplay.c (socklen_t): Provide a default.
15609 (remote_open): Use socklen_t.
15610 * remote-utils.c (socklen_t): Provide a default.
15611 (remote_open): Use socklen_t.
15612 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15615 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15617 * linux-low.c (linux_read_memory, linux_write_memory)
15618 (linux_read_auxv): Likewise.
15619 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15620 (check_mem_write): Likewise.
15621 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15623 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15624 (registers_from_string, register_data): Likewise.
15625 * server.c (handle_query, main): Likewise.
15626 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15627 (decode_M_packet): Likewise.
15628 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15629 * target.h (struct target_ops): Update read_memory, write_memory,
15631 (read_inferior_memory, write_inferior_memory): Update.
15632 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15633 to unsigned char *.
15634 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15635 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15636 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15637 linux-s390-low.c, linux-sh-low.c: Update for changes in
15638 read_inferior_memory and the_low_target->breakpoint.
15640 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15642 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15643 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15644 * configure.srv: Add powerpc64-*-linux*.
15645 * linux-ppc64-low.c: New file.
15647 2005-05-23 Orjan Friberg <orjanf@axis.com>
15649 * linux-cris-low.c: New file with support for CRIS.
15650 * linux-crisv32-low.c: Ditto for CRISv32.
15651 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15652 (clean): Add reg-cris.c and reg-crisv32.c.
15653 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15654 reg-crisv32.o, and reg-crisv32.c to make rules.
15655 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15656 recognized targets.
15658 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15660 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15661 of sizeof (PTRACE_XFER_TYPE).
15662 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15664 2005-05-12 Orjan Friberg <orjanf@axis.com>
15666 * target.h (struct target_ops): Add insert_watchpoint,
15667 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15668 pointers for hardware watchpoint support.
15669 * linux-low.h (struct linux_target_ops): Ditto.
15670 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15671 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15672 to linux_target_ops.
15673 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15675 * server.c (main): Recognize 'Z' and 'z' packets.
15677 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15679 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15680 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15681 (the_low_target): Add new members.
15683 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15685 * proc-service.c (ps_lgetregs): Search all_processes instead of
15688 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15690 * server.c (start_inferior): Change return type to int.
15691 (attach_inferior): Change sigptr to int *.
15692 (handle_v_cont, handle_v_requests): Change signal to int *.
15693 (main): Change signal to int.
15695 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15697 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15698 * configure.srv: Add m32r*-*-linux*.
15699 * linux-m32r-low.c: New file.
15701 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15703 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15705 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15707 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15708 Take unsigned long arguments for PIDs.
15709 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15710 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15711 (wait_for_sigstop, linux_resume_one_process)
15712 (regsets_fetch_inferior_registers, linux_send_signal)
15713 (linux_read_auxv): Likewise. Update the types of variables holding
15714 PIDs. Update format string specifiers.
15715 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15716 * remote-utils.c (prepare_resume_reply): Likewise.
15717 * server.c (cont_thread, general_thread, step_thread)
15718 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15720 (handle_query): Update format specifiers.
15721 (handle_v_cont, main): Use strtoul for thread IDs.
15722 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15723 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15724 (general_thread, step_thread, thread_from_wait)
15725 (old_thread_from_wait): Update.
15726 * target.h (struct thread_resume): Use unsigned long for THREAD.
15727 (struct target_ops): Use unsigned long for arguments to attach and
15730 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15732 * acinclude.m4: Include bfd/bfd.m4 directly.
15733 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15734 <agriffis@toolchain.org>.
15735 * aclocal.m4, configure: Regenerated.
15737 2005-01-07 Andrew Cagney <cagney@gnu.org>
15739 * configure.ac: Rename configure.in, require autoconf 2.59.
15740 * configure: Re-generate.
15742 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15744 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15745 LIBS when finished.
15746 * aclocal.m4: Regenerated.
15747 * configure: Regenerated.
15749 2004-11-21 Andreas Schwab <schwab@suse.de>
15751 * linux-m68k-low.c (m68k_num_gregs): Define.
15752 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15753 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15754 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15755 (m68k_breakpoint_at): New. Add to the_low_target.
15757 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15758 srv_linux_thread_db to yes.
15760 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15762 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15763 (ARCH_SET_FS): Likewise.
15764 (ARCH_GET_FS): Likewise.
15765 (ARCH_GET_GS): Likewise.
15767 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15769 * linux-i386-low.c (ps_get_thread_area): New.
15770 * linux-x86-64-low.c (ps_get_thread_area): New.
15771 * linux-low.c: Include <sys/syscall.h>.
15772 (linux_kill_one_process): Don't kill the first thread here.
15773 (linux_kill): Kill the first thread here.
15774 (kill_lwp): New function.
15775 (send_sigstop, linux_send_signal): Use it.
15776 * proc-service.c: Clean up #ifdefs.
15777 (fpregset_info): Delete.
15778 (ps_lgetregs): Update and enable implementation.
15779 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15781 * remote-utils.c (struct sym_cache, symbol_cache): New.
15782 (input_interrupt): Print a clearer message.
15783 (async_io_enabled): New variable.
15784 (enable_async_io, disable_async_io): Use it. Update comments.
15785 (look_up_one_symbol): Use the symbol cache.
15786 * thread-db.c (thread_db_look_up_symbols): New function.
15787 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15789 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15791 * configure.in: Test for -rdynamic.
15792 * configure: Regenerated.
15793 * Makefile (INTERNAL_LDFLAGS): New.
15794 (gdbserver, gdbreplay): Use it.
15796 2004-09-02 Andrew Cagney <cagney@gnu.org>
15798 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15800 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15802 * linux-low.c (linux_wait): Clear all_processes list also.
15804 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15806 * linux-low.c: Include <errno.h>. Remove extern declaration of
15809 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15811 * gdbreplay.c, server.h, utils.c: Update copyright years.
15813 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15815 * server.c (main): Print child status or termination signal from
15816 variable 'signal', not 'sig'.
15818 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15820 * linux-low.c (linux_read_memory): Change return type to
15821 int. Check for and return error from ptrace().
15822 * target.c (read_inferior_memory): Change return type to int. Pass
15823 back return status from the_target->read_memory().
15824 * target.h (struct target_ops): Adapt *read_memory() prototype.
15826 (read_inferior_memory): Adapt prototype.
15827 * server.c (main): Return an error packet if
15828 read_inferior_memory() returns an error.
15830 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15832 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15833 Unify with other clean targets.
15835 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15837 * server.c (handle_v_cont): Call set_desired_inferior.
15839 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15841 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15843 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15845 * linux-low.c (linux_wait): Unblock async I/O.
15846 (linux_resume): Block and enable async I/O.
15847 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15848 * server.h (block_async_io, unblock_async_io): Add prototypes.
15850 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15852 * remote-utils.c (remote_open): Print a status notice after
15853 opening a TCP port.
15854 * server.c (attach_inferior): Print a status notice after
15857 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15859 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15861 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15863 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15865 * server.c, target.h: Update copyright years.
15867 2004-02-25 Roland McGrath <roland@redhat.com>
15869 * target.h (struct target_ops): New member `read_auxv'.
15870 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15871 * linux-low.c (linux_read_auxv): New function.
15872 (linux_target_ops): Initialize `read_auxv' member to that.
15874 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15876 Committed by Jim Blandy <jimb@redhat.com>.
15878 * linux-s390-low.c (s390_num_regs): Update.
15879 (s390_regmap): Remove control registers. Use __s390x__ predefine
15880 instead of GPR_SIZE to distiguish s390 and s390x targets.
15882 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15884 * linux-low.c: Update copyright year.
15885 (check_removed_breakpoint): Clear pending_is_breakpoint.
15886 (linux_set_resume_request, linux_queue_one_thread)
15887 (resume_status_pending_p): New functions.
15888 (linux_continue_one_thread): Use process->resume.
15889 (linux_resume): Only resume threads if there are no pending events.
15890 * linux-low.h (struct process_info): Add resume request
15893 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15895 * regcache.c (new_register_cache): Clear the allocated register
15896 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15898 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15900 * linux-low.c (linux_resume): Take a struct thread_resume *
15902 (linux_wait): Update call.
15903 (resume_ptr): New static variable.
15904 (linux_continue_one_thread): Renamed from
15905 linux_continue_one_process. Use resume_ptr.
15906 (linux_resume): Use linux_continue_one_thread.
15907 * server.c (handle_v_cont, handle_v_requests): New functions.
15908 (myresume): New function.
15909 (main): Handle 'v' case.
15910 * target.h (struct thread_resume): New type.
15911 (struct target_ops): Change argument of "resume" to struct
15913 (myresume): Delete macro.
15915 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15917 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15918 (uninstall): Support DESTDIR.
15920 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15922 * configure.srv: Add xscale*linux copy of arm*linux entry.
15924 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15926 * linux-arm-low.c (arm_reinsert_addr): New function.
15927 (the_low_target): Add arm_reinsert_addr.
15929 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15931 * mem-break.c: Remove whitespace at end of file.
15933 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15935 * configure.in: Check whether we need to prototype strerror.
15936 * server.h: Optionally prototype strerror.
15937 * gdbreplay.c (perror_with_name): Use strerror.
15938 * linux-low.c (linux_attach_lwp): Use strerror.
15939 * utils.c (perror_with_name): Use strerror.
15940 * config.in, configure: Regenerated.
15942 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15944 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15945 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15947 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15949 * Makefile.in (SFILES): Update.
15950 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15951 low-sun3.c: Remove files.
15953 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15955 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15956 (linux_detach_one_process, linux_detach): New functions.
15957 (linux_target_ops): Add linux_detach.
15958 * server.c (main): Handle 'D' packet.
15959 * target.h (struct target_ops): Add "detach" member.
15960 (detach_inferior): Define.
15962 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15964 From Kelley Cook <kelleycook@wideopenwest.com>:
15965 * configure.srv: Accept i[34567]86 variants.
15967 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15969 * linux-low.c (linux_wait_for_event): Correct comment typos.
15970 (linux_resume_one_process): Call check_removed_breakpoint.
15971 (linux_send_signal): New function.
15972 (linux_target_ops): Add linux_send_signal.
15973 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15975 * target.h (struct target_ops): Add send_signal.
15977 2003-05-29 Jim Blandy <jimb@redhat.com>
15979 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15980 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15981 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15982 away part of the register's value.
15984 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15986 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15987 (linux_wait_for_event, linux_init_signals): Likewise.
15989 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15991 * configure.in: Check for stdlib.h.
15992 * configure: Regenerated.
15993 * config.in: Regenerated.
15995 2003-01-04 Andreas Schwab <schwab@suse.de>
15997 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15999 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16001 * Makefile.in: Remove obsolete code.
16003 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16005 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16006 defined(PT_FPR0_HI).
16008 2002-11-17 Stuart Hughes <seh@zee2.com>
16010 * linux-arm-low.c (arm_num_regs): Increase.
16011 (arm_regmap): Include status register.
16013 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16015 * linux-low.c (register_addr): Remove incorrect -1 check.
16017 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16019 * linux-low.c (linux_create_inferior): Call setpgid. Return
16021 (unstopped_p, linux_signal_pid): Remove.
16022 (linux_target_ops): Remove linux_signal_pid.
16023 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16024 global instead of target method.
16025 * target.h (struct target_ops): Remove signal_pid. Update comment
16026 for create_inferior.
16027 * server.c (signal_pid): New variable.
16028 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16029 gdbserver. Set the child to be the foreground process group.
16030 (attach_inferior): Set signal_pid.
16032 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16034 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16036 2002-08-20 Jim Blandy <jimb@redhat.com>
16038 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16041 2002-08-01 Andrew Cagney <cagney@redhat.com>
16043 * Makefile.in: Make chill references obsolete.
16045 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16047 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16048 * configure: Regenerate.
16049 * config.in: Regenerate.
16051 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16053 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16054 (perror_with_name, remote_close, remote_open, expect, play): Static.
16056 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16058 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16059 byte offsets instead of an array of indexes.
16060 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16062 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16064 * regcache.c: Add comment.
16066 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16068 * thread-db.c: New file.
16069 * proc-service.c: New file.
16070 * acinclude.m4: New file.
16071 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16072 proc-service.o, and thread-db.o.
16073 (linux-low.o): Add USE_THREAD_DB.
16074 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16075 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16076 * aclocal.m4: Regenerated.
16077 * config.in: Regenerated.
16078 * configure: Regenerated.
16079 * configure.in: Check for proc_service.h, sys/procfs.h,
16080 thread_db.h, and linux/elf.h headrs.
16081 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16082 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16083 Check for -lthread_db and thread support.
16084 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16085 PowerPC, and SuperH.
16086 * i387-fp.c: Constify arguments.
16087 * i387-fp.h: Likewise.
16088 * inferiors.c: (struct thread_info): Renamed from
16089 `struct inferior_info'. Remove PID member. Use generic inferior
16090 list header. All uses updated.
16091 (inferiors, signal_pid): Removed.
16092 (all_threads): New variable.
16093 (get_thread): Define.
16094 (add_inferior_to_list): New function.
16095 (for_each_inferior): New function.
16096 (change_inferior_id): New function.
16097 (add_inferior): Removed.
16098 (remove_inferior): New function.
16099 (add_thread): New function.
16100 (free_one_thread): New function.
16101 (remove_thread): New function.
16102 (clear_inferiors): Use for_each_inferior and free_one_thread.
16103 (find_inferior): New function.
16104 (find_inferior_id): New function.
16105 (inferior_target_data): Update argument type.
16106 (set_inferior_target_data): Likewise.
16107 (inferior_regcache_data): Likewise.
16108 (set_inferior_regcache_data): Likewise.
16109 * linux-low.c (linux_bp_reinsert): Remove.
16110 (all_processes, stopping_threads, using_thrads)
16111 (struct pending_signals, debug_threads, pid_of): New.
16112 (inferior_pid): Replace with macro.
16113 (struct inferior_linux_data): Remove.
16114 (get_stop_pc, add_process): New functions.
16115 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16116 Use add_process and add_thread.
16117 (linux_attach_lwp): New function, based on old linux_attach. Use
16118 add_process and add_thread. Set stop_expected for new threads.
16119 (linux_attach): New function.
16120 (linux_kill_one_process): New function.
16121 (linux_kill): Kill all LWPs.
16122 (linux_thread_alive): Use find_inferior_id.
16123 (check_removed_breakpoints, status_pending_p): New functions.
16124 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16125 Update. Use WNOHANG. Wait for cloned processes also. Update process
16126 struct for the found process.
16127 (linux_wait_for_event): New function.
16128 (linux_wait): Use it. Support LWPs.
16129 (send_sigstop, wait_for_sigstop, stop_all_processes)
16130 (linux_resume_one_process, linux_continue_one_process): New functions.
16131 (linux_resume): Support LWPs.
16132 (REGISTER_RAW_SIZE): Remove.
16133 (fetch_register): Use register_size instead. Call supply_register.
16134 (usr_store_inferior_registers): Likewise. Call collect_register.
16135 Fix recursive case.
16136 (regsets_fetch_inferior_registers): Improve error message.
16137 (regsets_store_inferior_registers): Add debugging.
16138 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16139 (unstopped_p, linux_signal_pid): New functions.
16140 (linux_target_ops): Add linux_signal_pid.
16141 (linux_init_signals): New function.
16142 (initialize_low): Call it. Initialize using_threads.
16143 * regcache.c (inferior_regcache_data): Add valid
16145 (get_regcache): Fetch registers lazily. Add fetch argument
16146 and update all callers.
16147 (regcache_invalidate_one, regcache_invalidate): New
16149 (new_register_cache): Renamed from create_register_cache.
16150 Return the new regcache.
16151 (free_register_cache): Change argument to a void *.
16152 (registers_to_string, registers_from_string): Call get_regcache
16153 with fetch flag set.
16154 (register_data): Make static. Pass fetch flag to get_regcache.
16155 (supply_register): Call get_regcache with fetch flag clear.
16156 (collect_register): Call get_regcache with fetch flag set.
16157 (collect_register_as_string): New function.
16158 * regcache.h: Update.
16159 * remote-utils.c (putpkt): Flush after debug output and use
16161 Handle input interrupts while waiting for an ACK.
16162 (input_interrupt): Use signal_pid method.
16163 (getpkt): Flush after debug output and use stderr.
16164 (outreg): Use collect_register_as_string.
16165 (new_thread_notify, dead_thread_notify): New functions.
16166 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16167 and general_thread.
16168 (look_up_one_symbol): Flush after debug output.
16169 * server.c (step_thread, server_waiting): New variables.
16170 (start_inferior): Don't use signal_pid. Update call to mywait.
16171 (attach_inferior): Update call to mywait.
16172 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16173 (main): Don't fetch/store registers explicitly. Use
16174 set_desired_inferior. Support proposed ``Hs'' packet. Update
16176 * server.h: Update.
16177 (struct inferior_list, struct_inferior_list_entry): New.
16178 * target.c (set_desired_inferior): New.
16179 (write_inferior_memory): Constify.
16180 (mywait): New function.
16181 * target.h: Update.
16182 (struct target_ops): New signal_pid method.
16183 (mywait): Removed macro, added prototype.
16185 * linux-low.h (regset_func): Removed.
16186 (regset_fill_func, regset_store_func): New.
16187 (enum regset_type): New.
16188 (struct regset_info): Add type field. Use new operation types.
16189 (struct linux_target_ops): stop_pc renamed to get_pc.
16190 Add decr_pc_after_break and breakpoint_at.
16191 (get_process, get_thread_proess, get_process_thread)
16192 (strut process_info, all_processes, linux_attach_lwp)
16193 (thread_db_init): New.
16195 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16196 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16197 (the_low_target): Add new members.
16198 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16199 (i386_store_fpxregset): Constify.
16200 (target_regsets): Add new kind identifier.
16201 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16202 (i386_set_pc): Add debugging.
16203 (i386_breakpoint_at): New function.
16204 (the_low_target): Add new members.
16205 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16206 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16207 (mips_breakpoint_at): New.
16208 (the_low_target): Add new members.
16209 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16210 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16211 (the_low_target): Add new members.
16212 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16213 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16214 (the_low_target): Add new members.
16215 * linux-x86-64-low.c (target_regsets): Add new kind
16218 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16220 From Martin Pool <mbp@samba.org>:
16221 * server.c (gdbserver_usage): New function.
16224 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16226 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16227 stop_at -> stop_pc.
16229 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16231 * Makefile.in: Remove obsolete code.
16233 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16235 * linux-low.c (regsets_fetch_inferior_registers),
16236 (regsets_store_inferior_registers): Removed cast to int from
16238 * regcache.h: Added declaration of struct inferior_info.
16240 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16242 * inferiors.c (struct inferior_info): Add regcache_data.
16243 (add_inferior): Call create_register_cache.
16244 (clear_inferiors): Call free_register_cache.
16245 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16246 * regcache.c (struct inferior_regcache_data): New.
16247 (registers): Remove.
16248 (get_regcache): New function.
16249 (create_register_cache, free_register_cache): New functions.
16250 (set_register_cache): Don't initialize the register cache here.
16251 (registers_to_string, registers_from_string, register_data): Call
16253 * regcache.h: Add prototypes.
16254 * server.h: Likewise.
16256 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16258 * mem-break.c: New file.
16259 * mem-break.h: New file.
16260 * Makefile.in: Add mem-break.o rule; update server.h
16262 * inferiors.c (struct inferior_info): Add target_data
16264 (clear_inferiors): Free target_data member if set.
16265 (inferior_target_data, set_inferior_target_data): New functions.
16266 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16267 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16268 * linux-low.c (linux_bp_reinsert): New variable.
16269 (struct inferior_linux_data): New.
16270 (linux_create_inferior): Use set_inferior_target_data.
16271 (linux_attach): Likewise. Call add_inferior.
16272 (linux_wait_for_one_inferior): New function.
16273 (linux_wait): Call it.
16274 (linux_write_memory): Add const.
16275 (initialize_low): Call set_breakpoint_data.
16276 * linux-low.h (struct linux_target_ops): Add breakpoint
16278 * server.c (attach_inferior): Remove extra add_inferior
16280 * server.h: Include mem-break.h. Update inferior.c
16282 * target.c (read_inferior_memory)
16283 (write_inferior_memory): New functions.
16284 * target.h (read_inferior_memory)
16285 (write_inferior_memory): Change macros to prototypes.
16286 (struct target_ops): Update comments. Add const to write_memory
16289 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16291 * linux-low.c (usr_store_inferior_registers): Support
16292 registers which are allowed to fail to store.
16293 * linux-low.h (linux_target_ops): Likewise.
16294 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16295 (ppc_cannot_store_register): FPSCR may not be storable.
16297 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16299 * server.h: Include <string.h> if HAVE_STRING_H.
16300 * ChangeLog: Correct paths in last ChangeLog entry.
16302 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16304 * linux-low.h: Remove obsolete prototypes.
16305 (struct linux_target_ops): New.
16306 (extern the_low_target): New.
16307 * linux-low.c (num_regs, regmap): Remove declarations.
16308 (register_addr): Use the_low_target explicitly.
16309 (fetch_register): Likewise.
16310 (usr_fetch_inferior_registers): Likewise.
16311 (usr_store_inferior_registers): Likewise.
16312 * linux-arm-low.c (num_regs): Remove.
16313 (arm_num_regs): Define.
16314 (arm_regmap): Renamed from regmap, made static.
16315 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16317 (arm_cannot_store_register): Renamed from cannot_store_register,
16319 (the_low_target): New.
16320 * linux-i386-low.c (num_regs): Remove.
16321 (i386_num_regs): Define.
16322 (i386_regmap): Renamed from regmap, made static.
16323 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16325 (i386_cannot_store_register): Renamed from cannot_store_register,
16327 (the_low_target): New.
16328 * linux-ia64-low.c (num_regs): Remove.
16329 (ia64_num_regs): Define.
16330 (ia64_regmap): Renamed from regmap, made static.
16331 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16333 (ia64_cannot_store_register): Renamed from cannot_store_register,
16335 (the_low_target): New.
16336 * linux-m68k-low.c (num_regs): Remove.
16337 (m68k_num_regs): Define.
16338 (m68k_regmap): Renamed from regmap, made static.
16339 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16341 (m68k_cannot_store_register): Renamed from cannot_store_register,
16343 (the_low_target): New.
16344 * linux-mips-low.c (num_regs): Remove.
16345 (mips_num_regs): Define.
16346 (mips_regmap): Renamed from regmap, made static.
16347 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16349 (mips_cannot_store_register): Renamed from cannot_store_register,
16351 (the_low_target): New.
16352 * linux-ppc-low.c (num_regs): Remove.
16353 (ppc_num_regs): Define.
16354 (ppc_regmap): Renamed from regmap, made static.
16355 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16357 (ppc_cannot_store_register): Renamed from cannot_store_register,
16359 (the_low_target): New.
16360 * linux-s390-low.c (num_regs): Remove.
16361 (s390_num_regs): Define.
16362 (s390_regmap): Renamed from regmap, made static.
16363 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16365 (s390_cannot_store_register): Renamed from cannot_store_register,
16367 (the_low_target): New.
16368 * linux-sh-low.c (num_regs): Remove.
16369 (sh_num_regs): Define.
16370 (sh_regmap): Renamed from regmap, made static.
16371 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16373 (sh_cannot_store_register): Renamed from cannot_store_register,
16375 (the_low_target): New.
16376 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16377 (the_low_target): New.
16379 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16381 * Makefile.in: Add stamp-h target.
16382 * configure.in: Create stamp-h.
16383 * configure: Regenerated.
16385 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16387 * inferiors.c: New file.
16388 * target.c: New file.
16389 * target.h: New file.
16390 * Makefile.in: Add target.o and inferiors.o. Update
16392 * linux-low.c (inferior_pid): New static variable,
16393 moved from server.c.
16394 (linux_create_inferior): Renamed from create_inferior.
16395 Call add_inferior. Return 0 on success instead of a PID.
16396 (linux_attach): Renamed from myattach.
16397 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16398 (linux_thread_alive): Renamed from mythread_alive.
16399 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16401 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16402 (regsets_store_inferior_registers): Correct error message.
16403 Add missing ``return 0''.
16404 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16405 (linux_store_registers): Renamed from store_inferior_registers.
16406 (linux_read_memory): Renamed from read_inferior_memory.
16407 (linux_write_memory): Renamed from write_inferior_memory.
16408 (linux_target_ops): New structure.
16409 (initialize_low): Call set_target_ops ().
16410 * remote-utils.c (unhexify): New function.
16411 (hexify): New function.
16412 (input_interrupt): Send signals to ``signal_pid''.
16413 * server.c (inferior_pid): Remove.
16414 (start_inferior): Update create_inferior call.
16415 (attach_inferior): Call add_inferior.
16416 (handle_query): New function.
16417 (main): Call handle_query for `q' packets.
16418 * server.h: Include "target.h". Remove obsolete prototypes.
16419 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16421 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16423 * Makefile.in: Add WARN_CFLAGS. Update configury
16425 * configure.in: Check for <string.h>
16426 * configure: Regenerate.
16427 * config.in: Regenerate.
16428 * gdbreplay.c: Include needed system headers.
16429 (remote_open): Remove strchr prototype.
16430 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16431 * regcache.c (supply_register): Change buf argument to const void *.
16432 (supply_register_by_name): Likewise.
16433 (collect_register): Change buf argument to void *.
16434 (collect_register_by_name): Likewise.
16435 * regcache.h: Add missing prototypes.
16436 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16437 * server.c (handle_query): New function.
16438 (attached): New static variable, moved out of main.
16439 (main): Quiet longjmp clobber warnings.
16440 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16441 * utils.c (error): Remove NORETURN.