1 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
7 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
10 (ppc_store_vsxregset): Likewise.
11 (ppc_fill_vrregset): Likewise.
12 (ppc_store_vrregset): Likewise.
13 (ppc_fill_evrregset): Likewise.
14 (ppc_store_evrregset): Likewise.
15 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
16 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
19 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
21 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
22 wordsize of the inferior. Call ppc_linux_target_wordsize.
24 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
26 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
27 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
28 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
29 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
30 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
31 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
32 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
33 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
34 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
35 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
36 (tdesc_powerpc_e500l): Remove.
37 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
38 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
39 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
40 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
42 (ppc_arch_setup): Remove target description matching code. Fill a
43 ppc_linux_features struct and call ppc_linux_match_description
46 2018-05-22 Maciej W. Rozycki <macro@mips.com>
48 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
49 width of the requested register exceeds the width of the
51 (mips_cannot_store_register): Likewise.
53 2018-05-21 Maciej W. Rozycki <macro@mips.com>
55 * linux-mips-low.c (mips_fetch_register): New function. Update
57 (mips_store_gregset): Supply 0 rather than $restart for $zero.
58 (the_low_target): Wire `mips_fetch_register'.
60 2018-05-10 Joel Brobecker <brobecker@adacore.com>
62 * lynx-i386-low.c (LYNXOS_178): New macro.
63 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
64 the layout on LynxOS-178.
65 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
66 handle floating point registers that are not supported by
69 2018-05-10 Tom Tromey <tom@tromey.com>
73 2018-05-10 Joel Brobecker <brobecker@adacore.com>
76 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
77 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
78 Use it to set the expedite_regs field in the given tdesc.
79 * x86-tdesc.h: New file.
80 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
81 Adjust following the addition of the new expedite_regs parameter
83 * linux-tic6x-low.c (tic6x_read_description): Likewise.
84 * linux-x86-tdesc.c: #include "x86-tdesc.h".
85 (i386_linux_read_description, amd64_linux_read_description):
86 Adjust following the addition of the new expedite_regs parameter
88 * lynx-i386-low.c: #include "x86-tdesc.h".
89 (lynx_i386_arch_setup): Adjust following the addition of the new
90 expedite_regs parameter to init_target_desc.
91 * nto-x86-low.c: #include "x86-tdesc.h".
92 (nto_x86_arch_setup): Adjust following the addition of the new
93 expedite_regs parameter to init_target_desc.
94 * win32-i386-low.c: #include "x86-tdesc.h".
95 (i386_arch_setup): Adjust following the addition of the new
96 expedite_regs parameter to init_target_desc.
98 2018-05-10 Joel Brobecker <brobecker@adacore.com>
101 * win32-low.c (win32_create_inferior): Add call to my_wait
102 setting last_status global.
104 2018-05-10 Joel Brobecker <brobecker@adacore.com>
107 * win32-low.c (create_process): Only call gdb_tilde_expand if
108 inferior_cwd is not NULL.
110 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
112 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
113 registers to the cache if their values have changed.
114 (i387_xsave_to_cache): Provide default values for x87 control
115 registers when these features are available, but disabled.
116 * regcache.c (supply_register_by_name_zeroed): New function.
117 * regcache.h (supply_register_by_name_zeroed): Declare new
120 2018-05-07 Tom Tromey <tom@tromey.com>
122 * configure: Rebuild.
124 2018-05-04 Tom Tromey <tom@tromey.com>
126 * configure: Rebuild.
128 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
129 Pedro Alves <palves@redhat.com>
131 * linux-aarch64-low.c (aarch64_stopped_data_address):
134 2018-04-27 Tom Tromey <tom@tromey.com>
136 * configure: Rebuild.
138 2018-04-23 Tom Tromey <tom@tromey.com>
140 * configure: Rebuild.
142 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
144 * Makefile.in (depcomp): Add "..".
145 (all_deps_files): New and use it.
147 2018-04-18 Alan Hayward <alan.hayward@arm.com>
149 * configure.srv (aarch64*-*-linux*): Don't include xml.
150 (i[34567]86-*-cygwin*): Likewise.
151 (i[34567]86-*-linux*): Likewise.
152 (i[34567]86-*-lynxos*): Likewise.
153 (i[34567]86-*-mingw32ce*): Likewise.
154 (i[34567]86-*-mingw*): Likewise.
155 (i[34567]86-*-nto*): Likewise.
156 (tic6x-*-uclinux): Likewise.
157 (x86_64-*-linux*): Likewise.
158 (x86_64-*-mingw*): Likewise.
159 (x86_64-*-cygwin*): Likewise.
161 2018-04-18 Alan Hayward <alan.hayward@arm.com>
163 * tdesc.c: Remove xml parameter.
165 2018-04-18 Alan Hayward <alan.hayward@arm.com>
167 * server.c (get_features_xml): Remove cast.
168 * tdesc.c (void target_desc::accept): Fill in function.
169 (tdesc_get_features_xml): Remove old xml creation.
170 (print_xml_feature::visit_pre): Add xml vistor.
171 * tdesc.h (struct target_desc): Make xmltarget mutable.
172 (tdesc_get_features_xml): Remove declaration.
174 2018-04-18 Alan Hayward <alan.hayward@arm.com>
176 * tdesc.c (tdesc_architecture_name): Add new function.
177 (tdesc_osabi_name): Likewise.
178 (tdesc_get_features_xml): Use new functions.
180 2018-04-18 Alan Hayward <alan.hayward@arm.com>
182 * tdesc.c (tdesc_create_flags): Remove.
183 (tdesc_add_flag): Likewise.
184 (tdesc_named_type): Likewise.
185 (tdesc_create_union): Likewise.
186 (tdesc_create_struct): Likewise.
187 (tdesc_create_vector): Likewise.
188 (tdesc_add_bitfield): Likewise.
189 (tdesc_add_field): Likewise.
190 (tdesc_set_struct_size): Likewise.
192 2018-04-18 Alan Hayward <alan.hayward@arm.com>
194 * tdesc.c (~target_desc): Remove implictly deleted items.
195 (init_target_desc): Iterate all features.
196 (tdesc_get_features_xml): Use vector.
197 (tdesc_create_feature): Create feature.
198 * tdesc.h (tdesc_feature) Remove
199 (target_desc): Add features.
201 2018-04-18 Alan Hayward <alan.hayward@arm.com>
203 * Makefile.in: Add common/tdesc.c
204 * tdesc.c (init_target_desc): init all reg_defs from register
206 (tdesc_create_reg): Create tdesc_reg.
207 * tdesc.h (tdesc_feature): Add register vector.
209 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
211 * tdesc.h (struct target_desc) <features>: Change type to
212 std::vector<std::string>.
213 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
215 (tdesc_get_features_xml): Likewise.
216 (tdesc_create_feature): Likewise.
218 2018-03-26 Alan Hayward <alan.hayward@arm.com>
220 * regcache.c (find_register_by_number): Return a ref.
221 (find_regno): Use references.
222 (register_size): Likewise.
223 (register_data): Likewise.
224 * tdesc.c (target_desc::~target_desc): Remove free calls.
225 (target_desc::operator==): Use std::vector compare.
226 (init_target_desc): Use reference.
227 (tdesc_create_reg): Use reg constructors.
228 * tdesc.h (struct target_desc): Replace pointer with object.
230 2018-03-23 Alan Hayward <alan.hayward@arm.com>
232 * regcache.c (find_register_by_number): Make static.
233 (find_regno): Use find_register_by_number
234 * regcache.h (struct reg): Remove declaration.
236 2018-03-23 Alan Hayward <alan.hayward@arm.com>
238 * tdesc.c (target_desc::~target_desc): Move to here.
239 (target_desc::operator==): Likewise.
240 * tdesc.h (target_desc::~target_desc): Move from here.
241 (target_desc::operator==): Likewise.
243 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
245 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
247 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
249 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
251 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
252 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
253 and init_registers_s390_gs_linux64.
255 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
257 * linux-s390-low.c (s390_fill_gs): Remove function.
258 (s390_fill_gsbc): Remove function.
259 (s390_regsets): Set fill functions for the guarded storage regsets
262 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
264 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
265 the word size. Add comment.
266 (s390_get_wordsize): New function.
267 (s390_arch_setup): No longer select a temporary tdesc to fetch the
268 pswm with it. Instead, use s390_get_wordsize to determine the
269 word size first and derive the correct tdesc from that directly.
271 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
273 * Makefile.in: Include silent-rules.mk.
274 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
275 (COMPILE): Add ECHO_CXX.
276 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
277 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
278 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
279 (version-generated.c): Add ECHO_GEN.
280 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
281 (IPAGENT_COMPILE): Add ECHO_CXX.
282 (%-generated.c): Add ECHO_REGDAT.
284 2018-03-14 Tom Tromey <tom@tromey.com>
287 * ax.c (ax_printf): Special case for NULL.
289 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
291 * linux-low.c (linux_qxfer_libraries_svr4): Use
292 xml_escape_text_append.
294 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
296 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
298 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
300 * server.c (handle_general_set): Remove unnecessary xstrdup.
302 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
304 * server.c (parse_debug_format_options): Adjust to
305 delim_string_to_char_ptr_vec changes.
306 * thread-db.c (thread_db_load_search): Adjust to
307 dirnames_to_char_ptr_vec changes.
309 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
311 * target.h (target_enable_btrace, target_disable_btrace)
312 (target_read_btrace, target_read_btrace_conf): Turn macro into
313 inline function. Throw error if target method is not defined.
314 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
315 check for btrace target method. Be prepared to handle exceptions
316 from btrace target methods.
318 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
320 * server.c (captured_main): Change order of error message printed
321 when the current working directory cannot be found.
323 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
325 * server.c: Include "filenames.h" and "pathstuff.h".
326 (program_name): Delete variable.
327 (program_path): New anonymous class.
328 (get_exec_wrapper): Use "program_path" instead of
330 (handle_v_run): Likewise.
331 (captured_main): Likewise.
332 (process_serial_event): Likewise.
334 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
336 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
337 (OBJS): Add "pathstuff.o".
338 * server.c (current_directory): New global variable.
339 (captured_main): Initialize "current_directory".
341 2018-02-26 Alan Hayward <alan.hayward@arm.com>
343 * tdesc.c: Use common/tdesc.h.
346 2018-02-20 Alan Hayward <alan.hayward@arm.com>
347 Simon Marchi <simon.marchi@ericsson.com>
349 * Makefile.in: Switch order of make rules.
351 2018-02-19 Alan Hayward <alan.hayward@arm.com>
353 * Makefile.in: Add common directory in build.
354 * configure.ac: Add common reference.
355 * configure: Regenerate.
357 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
359 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
360 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
361 * spu-low.c (spu_target_ops): Likewise.
362 * win32-low.c (win32_target_ops): Likewise.
363 * server.c (supported_btrace_packets): Report packets unconditionally.
364 * target.h (target_ops) <supports_btrace>: Remove.
365 (target_supports_btrace): Remove.
367 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
369 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
370 (handle_btrace_disable): Change return type to void. Use exceptions
372 (handle_btrace_general_set): Catch exception and copy message to
375 2018-02-08 Tom Tromey <tom@tromey.com>
377 * linux-low.c (install_software_single_step_breakpoints): Use
379 * inferiors.c (make_cleanup_restore_current_thread): Remove.
380 (do_restore_current_thread_cleanup): Remove.
381 * gdbthread.h (make_cleanup_restore_current_thread): Don't
384 2018-02-08 Tom Tromey <tom@tromey.com>
386 * mem-break.c (set_raw_breakpoint_at): Use
387 gdb::unique_xmalloc_ptr.
389 2018-01-30 Pedro Alves <palves@redhat.com>
392 * target.c (target_terminal::terminal_state): Rename to ...
393 (target_terminal::m_terminal_state): ... this.
395 2018-01-19 James Clarke <jrtc27@jrtc27.com>
397 * linux-low.c (handle_extended_wait): Surround call to
398 thread_db_notice_clone with #ifdef USE_THREAD_DB.
400 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
402 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
403 linux_ptrace_attach_fail_reason_string now returning an
405 (linux_attach): Likewise.
406 * thread-db.c (attach_thread): Likewise.
408 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
411 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
412 checking for fs_base/gs_base fields in struct user_regs_struct.
413 * configure: Regenerate.
415 2018-01-16 Yao Qi <yao.qi@linaro.org>
418 * linux-low.c (fetch_register): Call supply_register instead of
421 2018-01-08 Yao Qi <yao.qi@linaro.org>
422 Simon Marchi <simon.marchi@ericsson.com>
424 * Makefile.in (OBS): Remove selftest.o.
425 * configure.ac: Set srv_selftest_objs if $development is true.
426 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
427 * configure: Re-generated.
428 * server.c (captured_main): Wrap variable selftest_filter with
431 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
433 * server.c (parse_debug_format_options): Return std::string.
434 (handle_monitor_command, captured_main): Adjust.
436 2018-01-05 Pedro Alves <palves@redhat.com>
439 * server.c (captured_main): Pass quiet=false to
440 save_original_signals_state.
442 2018-01-01 Joel Brobecker <brobecker@adacore.com>
444 * gdbreplay.c (gdbreplay_version): Update copyright year in
446 * server.c (gdbserver_version): Likewise.
448 2017-12-08 Tom Tromey <tom@tromey.com>
450 * ax.c (ax_printf): Update.
452 2017-12-07 Yao Qi <yao.qi@linaro.org>
454 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
455 aarch64_linux_read_description.
456 * linux-amd64-ipa.c (idx2mask): New array.
457 (get_ipa_tdesc): Move idx2mask out.
458 (initialize_low_tracepoint): Initialize target descriptions.
459 * linux-i386-ipa.c (idx2mask): New array.
460 (get_ipa_tdesc): Move idx2mask out.
461 (initialize_low_tracepoint): Initialize target descriptions.
463 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
465 * tdesc.c (struct tdesc_type): Change return type.
466 (tdesc_add_flag): Change parameter type.
467 (tdesc_add_bitfield): Likewise.
468 (tdesc_add_field): Likewise.
469 (tdesc_set_struct_size): Likewise.
471 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
473 * regcache.c (registers_to_string): Remove unused variable.
475 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
477 * inferiors.c (for_each_inferior_with_data): Remove.
478 * inferiors.h (for_each_inferior_with_data): Remove.
479 * server.c (handle_qxfer_threads_worker): Change parameter type.
480 (handle_qxfer_threads_proper): Use for_each_thread.
482 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
484 * inferiors.c (for_each_inferior): Remove.
485 (clear_inferiors): Use for_each_thread.
486 * inferiors.h (for_each_inferior): Remove.
487 * linux-low.c (linux_wait_for_event_filtered): Use
489 (linux_stabilize_threads): Likewise.
490 * regcache.c (regcache_release): Likewise.
491 * server.c (gdb_wants_all_threads_stopped): Likewise.
492 (clear_pending_status_callback): Remove.
493 (handle_status): Use for_each_thread.
494 (captured_main): Likewise.
495 * win32-low.c (child_init_thread_list): Likewise.
496 (win32_clear_inferiors): Likewise.
497 (fake_breakpoint_event): Likewise.
499 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
501 * inferiors.h (find_inferior): Remove.
502 * inferiors.c (find_inferior): Remove.
504 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
506 * linux-low.c (resume_status_pending_p): Update comment.
507 (need_step_over_p): Update comment.
509 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
511 * linux-low.c (proceed_one_lwp): Return void, change parameter
513 (unsuspend_and_proceed_one_lwp): Likewise.
514 (proceed_all_lwps): Use for_each_thread.
515 (unstop_all_lwps): Likewise.
517 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
519 * linux-low.c (linux_resume_one_thread): Return void, take
521 (linux_resume): Use for_each_thread.
523 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
525 * linux-low.c (send_sigstop_callback): Return void, change
526 parameter type. Rename to...
527 (send_sigstop): ... this.
528 (suspend_and_send_sigstop_callback): Return void, change parameter
530 (suspend_and_send_sigstop): ... this.
531 (stop_all_lwps): Use for_each_thread.
533 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
535 * linux-low.c (lwp_running): Return bool, remove unused
537 (linux_stabilize_threads): Use find_thread.
539 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
541 * linux-low.c (select_singlestep_lwp_callback): Remove.
542 (count_events_callback): Remove.
543 (select_event_lwp_callback): Remove.
544 (select_event_lwp): Use find_thread/for_each_thread.
546 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
548 * linux-low.c (not_stopped_callback): Return bool, take filter
550 (linux_wait_for_event_filtered): Use find_thread.
551 (linux_wait_1): Likewise.
553 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
555 * linux-low.c (same_lwp): Remove.
556 (find_lwp_pid): Use find_thread.
558 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
560 * linux-low.c (delete_lwp_callback): Remove.
561 (linux_mourn): Use for_each_thread.
563 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
565 * linux-low.c (linux_detach_lwp_callback): Return void, remove
566 args parameter, don't check for pid.
567 (linux_detach): Use for_each_thread.
569 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
571 * linux-low.c (struct counter): Remove.
572 (second_thread_of_pid_p): Remove.
573 (last_thread_of_process_p): Use find_thread.
575 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
577 * inferiors.c (find_inferior_in_random): Remove.
578 * inferiors.h (find_inferior_in_random): Remove.
579 * linux-low.c (status_pending_p_callback): Return bool, accept
580 parameter ptid directly.
581 (linux_wait_for_event_filtered): Use find_thread_in_random.
582 (linux_wait_1): Likewise.
584 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
586 * inferiors.c (find_inferior_id): Remove.
587 (find_thread_ptid): Move implemention from find_inferior_id to
589 * inferiors.h (find_inferior_id): Remove.
590 * server.c (handle_status): Use find_thread_ptid.
591 (process_serial_event): Likewise.
592 * thread-db.c (find_one_thread): Likewise.
593 (thread_db_thread_handle): Likewise.
594 * win32-low.c (thread_rec): Likewise.
595 (child_delete_thread): Likewise.
596 (win32_thread_alive): Likewise.
597 (get_child_debug_event): Likewise.
599 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
601 * linux-mips-low.c (update_watch_registers_callback): Return
602 void, remove pid_p parameter, don't check for pid.
603 (mips_insert_point, mips_remove_point): Use for_each_thread.
605 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
607 * lynx.low (lynx_delete_thread_callback): Remove.
608 (lynx_mourn): Use for_each_thread.
610 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
612 * regcache.c (regcache_invalidate_one): Remove.
613 (regcache_invalidate_pid): use for_each_thread.
615 2017-11-26 Tom Tromey <tom@tromey.com>
617 * linux-low.c (linux_create_inferior): Update.
619 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
621 * spu-low.c (spu_create_inferior): Fix typo in argument name.
623 2017-11-24 Alan Hayward <alan.hayward@arm.com>
625 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
626 * linux-aarch64-low.c (initialize_low_arch): Call init func.
627 * linux-aarch64-tdesc-selftest.c: New file.
628 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
630 2017-11-24 Alan Hayward <alan.hayward@arm.com>
632 * configure.srv: Add new file.
633 * linux-aarch64-low.c (initialize_low_arch): Call init func.
634 * linux-aarch64-tdesc-selftest.c: New file.
635 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
637 2017-11-24 Alan Hayward <alan.hayward@arm.com>
639 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
640 * linux-aarch64-low.c (initialize_low_arch): Remove init.
641 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
643 2017-11-24 Alan Hayward <alan.hayward@arm.com>
645 * configure.srv: Add new files.
646 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
647 aarch64_linux_read_description.
648 * linux-aarch64-low.c (aarch64_linux_read_description):
649 Merge with aarch64_arch_setup.
650 (aarch64_arch_setup): Call aarch64_linux_read_description.
651 * linux-aarch64-tdesc.c: New file.
652 * linux-aarch64-tdesc.h: New file.
654 2017-11-24 Yao Qi <yao.qi@linaro.org>
656 * configure.srv: Set $srv_regobj for tic6x-linux.
657 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
658 (tic6x_read_description): Move some code to tic6x_arch_setup.
659 (tic6x_tdesc_test): New function.
660 (initialize_low_arch): Call selftests::register_test.
662 2017-11-22 Yao Qi <yao.qi@linaro.org>
664 * remote-utils.c (prepare_resume_reply): Use memcpy.
666 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
668 * linux-low.c (kill_one_lwp_callback): Return void, take
669 argument directly, don't filter on pid.
670 (linux_kill): Use for_each_thread.
672 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
674 * linux-low.c (need_step_over_p): Return bool, remove dummy
676 (linux_resume, proceed_all_lwps): Use find_thread.
678 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
680 * linux-low.c (resume_status_pending_p): Return bool, remove
682 (linux_resume): Use find_thread.
684 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
686 * linux-low.c (struct thread_resume_array): Remove.
687 (linux_set_resume_request): Return void, take arguments
689 (linux_resume): Use for_each_thread.
691 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
693 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
694 return bool, remove data argument.
695 (linux_stabilize_threads): Use find_thread.
697 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
699 * linux-low.c (unsuspend_one_lwp): Remove.
700 (unsuspend_all_lwps): Use for_each_thread, inline code from
703 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
705 * gdbthread.h (find_thread): Add overload with ptid_t filter.
706 * linux-low.c (struct iterate_over_lwps_args): Remove.
707 (iterate_over_lwps_filter): Remove.
708 (iterate_over_lwps): Use find_thread.
710 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
712 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
713 (linux_handle_new_gdb_connection): Use for_each_thread, inline
714 code from reset_lwp_ptrace_options_callback.
716 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
718 * linux-arm-low.c (struct update_registers_data): Remove.
719 (update_registers_callback): Return void, take arguments
720 directly, don't check thread's pid.
721 (arm_insert_point, arm_remove_point): Use for_each_thread.
723 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
725 * win32-low.c (continue_one_thread): Return void, take argument
727 (child_continue): Use for_each_thread.
729 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
731 * win32-i386-low.c (update_debug_registers_callback): Rename
733 (update_debug_registers): ... this, return void, remove pid_p arg.
734 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
736 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
738 * inferiors.h (struct process_info): Add constructor, initialize
740 <syscalls_to_catch>: Change type to std::vector<int>.
741 * inferiors.c (add_process): Allocate process_info with new.
742 (remove_process): Free process_info with delete.
743 * linux-low.c (handle_extended_wait): Adjust.
744 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
745 * server.c (handle_general_set): Adjust.
747 2017-11-16 Pedro Alves <palves@redhat.com>
749 * remote-utils.c (remote_close): Block SIGIO signals instead of
750 uninstalling the SIGIO handler.
752 2017-11-16 Alan Hayward <alan.hayward@arm.com>
754 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
756 2017-11-16 Yao Qi <yao.qi@linaro.org>
758 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
759 (tic6x_store_gregset): Likewise.
760 (tic6x_usrregs_info): Move it up.
762 2017-11-15 Alan Hayward <alan.hayward@arm.com>
764 * Makefile.in: Update arch rules.
765 * configure.srv: Explicitly mark arch/ files.
767 2017-11-13 Andreas Schwab <schwab@suse.de>
769 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
771 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
773 2017-11-06 Pedro Alves <palves@redhat.com>
775 * config.in, configure: Regenerate.
777 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
779 * target.c (struct thread_search): Remove.
780 (thread_search_callback): Remove.
781 (prepare_to_access_memory): Use for_each_thread instead of
782 find_inferior. Inline code from thread_search_callback.
784 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
786 * server.c (struct visit_actioned_threads_data): Remove.
787 (visit_actioned_threads): Change prototype to take arguments
789 (resume): Use find_thread instead of find_inferior.
791 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
793 * server.c (queue_stop_reply_callback): Change prototype, return
795 (find_status_pending_thread_callback): Remove.
796 (handle_status): Replace find_inferior with find_thread and
799 2017-10-25 Alan Hayward <alan.hayward@arm.com>
801 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
803 (aarch64_store_gregset): Likewise.
804 (aarch64_fill_fpregset): Likewise.
805 (aarch64_store_fpregset): Likewise.
807 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
809 * gdbthread.h (find_thread, for_each_thread): New functions.
810 * inferiors.c (thread_of_pid): Remove.
811 (find_any_thread_of_pid): Use find_thread.
812 * linux-low.c (num_lwps): Use for_each_thread.
814 2017-10-17 Yao Qi <yao.qi@linaro.org>
816 * Makefile.in: Remove one rule.
817 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
819 2017-10-17 Yao Qi <yao.qi@linaro.org>
821 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
822 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
824 2017-10-17 Yao Qi <yao.qi@linaro.org>
826 * configure.srv: Rename arm.o with arch/arm.o.
828 2017-10-17 Yao Qi <yao.qi@linaro.org>
830 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
831 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
832 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
833 (arch-i386.o, arch-amd64.o): Remove rules.
834 (arch/%.o): New rule.
835 Update POSTCOMPILE and COMPILE.pre.
836 * configure.ac: Invoke AC_CONFIG_COMMANDS.
837 * configure: Re-generated.
838 * configure.srv: Replace arch-i386.o with arch/i386.o.
839 Replace arch-amd64.o with arch/amd64.o.
841 2017-10-16 Yao Qi <yao.qi@linaro.org>
843 * configure: Regenerated.
845 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
847 * inferiors.h: (struct inferior_list): Remove.
848 (struct inferior_list_entry); Remove.
849 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
850 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
851 get_first_inferior): Remove.
852 (for_each_inferior, for_each_inferior_with_data, find_inferior,
853 find_inferior_id, find_inferior_in_random): Change signature.
854 * inferiors.c (all_threads): Change type to
855 std::list<thread_info *>.
856 (get_thread): Remove macro.
857 (find_inferior, find_inferior_id): Change signature, implement
859 (find_inferior_in_random): Change signature, implement using
860 find_thread_in_random.
861 (for_each_inferior, for_each_inferior_with_data): Change
862 signature, implement using for_each_thread.
863 (add_inferior_to_list, remove_inferior): Remove.
864 (add_thread, get_first_thread, thread_of_pid,
865 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
866 (get_first_inferior, one_inferior_p, clear_inferior_list):
868 (clear_inferiors, get_thread_process): Update.
869 * gdbthread.h: Include <list>.
870 (struct thread_info) <entry>: Remove field.
872 (all_threads): Change type to std::list<thread_info *>.
873 (get_first_inferior): Add doc.
874 (find_thread, for_each_thread, find_thread_in_random): New
876 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
877 * linux-arm-low.c (update_registers_callback): Update.
878 * linux-low.c (second_thread_of_pid_p): Update.
879 (kill_one_lwp_callback, linux_detach_lwp_callback,
880 delete_lwp_callback, status_pending_p_callback, same_lwp,
881 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
882 iterate_over_lwps, not_stopped_callback,
883 resume_stopped_resumed_lwps, count_events_callback,
884 select_singlestep_lwp_callback, select_event_lwp_callback,
885 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
886 suspend_and_send_sigstop_callback, wait_for_sigstop,
887 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
888 lwp_running, linux_set_resume_request, resume_status_pending_p,
889 need_step_over_p, start_step_over, linux_resume_one_thread,
890 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
891 reset_lwp_ptrace_options_callback): Update.
892 * linux-mips-low.c (update_watch_registers_callback): Update.
893 * regcache.c (regcache_invalidate_one, regcache_invalidate):
895 (free_register_cache_thread_one): Remove.
896 (regcache_release): Update.
897 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
898 handle_qxfer_threads_worker): Update.
899 (handle_query): Update, use list iterator.
900 (visit_actioned_threads, handle_pending_status,
901 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
902 clear_pending_status_callback, set_pending_status_callback,
903 find_status_pending_thread_callback, handle_status,
904 process_serial_event): Update.
905 * target.c (thread_search_callback): Update.
906 * thread-db.c (thread_db_get_tls_address): Update.
907 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
909 * win32-i386-low.c (update_debug_registers_callback): Update.
910 * win32-low.c (delete_thread_info, child_delete_thread,
911 continue_one_thread, suspend_one_thread,
912 get_child_debug_event): Adjust.
914 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
916 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
917 * inferiors.h: Include <list>.
918 (struct process_info) <entry>: Remove field.
920 (pid_of): Change macro to function.
921 (ptid_of, lwpid_of): Remove macro.
922 (all_processes): Change type to std::list<process_info *>.
923 (ALL_PROCESSES): Remove macro.
924 (for_each_process, find_process): New function.
925 * inferiors.c (all_processes): Change type to
926 std::list<process_info *>.
927 (find_thread_process): Adjust.
928 (add_process): Likewise.
929 (remove_process): Likewise.
930 (find_process_pid): Likewise.
931 (get_first_process): Likewise.
932 (started_inferior_callback): Remove.
933 (have_started_inferiors_p): Adjust.
934 (attached_inferior_callback): Remove.
935 (have_attached_inferiors_p): Adjust.
936 * linux-low.c (check_zombie_leaders): Likewise.
937 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
938 (x86_linux_update_xmltarget): Adjust.
939 * server.c (handle_query): Likewise.
940 (gdb_reattached_process): Remove.
941 (handle_status): Adjust.
942 (kill_inferior_callback): Likewise.
943 (detach_or_kill_inferior): Remove.
944 (print_started_pid): Likewise.
945 (print_attached_pid): Likewise.
946 (detach_or_kill_for_exit): Update.
947 (process_serial_event): Likewise.
948 * linux-arm-low.c (arm_new_fork): Likewise.
950 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
952 * dll.h: Include <list>.
953 (struct dll_info): Add constructor.
954 <entry>: Remove field.
955 (all_dlls): Change type to std::list<dll_info>.
956 * dll.c: Include <algorithm>.
957 (get_dll): Remove macro.
958 (all_dlls): Change type to std::list<dll_info *>.
959 (free_one_dll): Remove.
960 (match_dll): Likewise.
961 (loaded_dll): Adjust.
962 (unloaded_dll): Adjust to all_dlls type change, use
963 std::find_if. Inline code from match_dll.
964 (clear_dlls): Adjust to all_dlls type change.
965 * server.c (emit_dll_description): Remove.
966 (handle_qxfer_libraries): Adjust to all_dlls type change,
967 integrate emit_dll_description's functionality.
969 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
971 * linux-low.h (struct linux_target_ops) <delete_process>: New
973 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
974 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
975 (struct linux_target_ops): Add delete_process callback.
976 * linux-arm-low.c (arm_delete_process): New.
977 (struct linux_target_ops): Add delete_process callback.
978 * linux-bfin-low.c (struct linux_target_ops): Likewise.
979 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
980 * linux-m32r-low.c (struct linux_target_ops): Likewise.
981 * linux-mips-low.c (mips_linux_delete_process): New.
982 (struct linux_target_ops): Add delete_process callback.
983 * linux-ppc-low.c (struct linux_target_ops): Likewise.
984 * linux-s390-low.c (struct linux_target_ops): Likewise.
985 * linux-sh-low.c (struct linux_target_ops): Likewise.
986 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
987 * linux-tile-low.c (struct linux_target_ops): Likewise.
988 * linux-x86-low.c (x86_linux_delete_process): New.
989 (struct linux_target_ops): Add delete_process callback.
990 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
992 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
994 * linux-aarch64-low.c (the_low_target): Add thread delete
996 * linux-arm-low.c (arm_delete_thread): New function.
997 (the_low_target): Add thread delete callback.
998 * linux-bfin-low.c (the_low_target): Likewise.
999 * linux-crisv32-low.c (the_low_target): Likewise.
1000 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1002 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1004 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1005 * linux-mips-low.c (mips_linux_delete_thread): New function.
1006 (the_low_target): Add thread delete callback.
1007 * linux-ppc-low.c (the_low_target): Likewise.
1008 * linux-s390-low.c (the_low_target): Likewise.
1009 * linux-sh-low.c (the_low_target): Likewise.
1010 * linux-tic6x-low.c (the_low_target): Likewise.
1011 * linux-tile-low.c (the_low_target): Likewise.
1012 * linux-x86-low.c (the_low_target): Likewise.
1013 * linux-xtensa-low.c (the_low_target): Likewise.
1015 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1017 * win32-low.c: Include "common-inferior.h".
1019 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1021 * inferiors.c (set_inferior_cwd): New function.
1022 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1023 (handle_query): Inform that QSetWorkingDir is supported.
1024 * win32-low.c (create_process): Pass the inferior's cwd to
1027 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1029 * inferiors.c (current_inferior_cwd): New global variable.
1030 (get_inferior_cwd): New function.
1031 * inferiors.h (struct process_info) <cwd>: New field.
1033 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1035 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1036 (OBS): Add gdb_tilde_expand.o.
1038 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1040 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1041 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1043 2017-09-29 Pedro Alves <palves@redhat.com>
1045 * ax.c (gdb_parse_agent_expr): Constify.
1046 * ax.h (gdb_parse_agent_expr): Constify.
1047 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1049 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1050 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1051 * remote-utils.h (read_ptid): Constify.
1052 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1053 (process_point_options, process_serial_event): Constify.
1054 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1055 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1056 (cmd_qtbuffer): Constify.
1058 2017-09-29 Pedro Alves <palves@redhat.com>
1060 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1063 2017-09-29 Pedro Alves <palves@redhat.com>
1065 * linux-low.c (handle_extended_wait): Pass parent thread instead
1066 of process to thread_db_notice_clone.
1067 * linux-low.h (thread_db_notice_clone): Replace parent process
1068 parameter with parent thread parameter.
1069 * thread-db.c (find_one_thread): Add comment.
1070 (thread_db_notice_clone): Replace parent process parameter with
1071 parent thread parameter. Temporarily switch to the parent thread.
1073 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1075 * gdbthread.h: Include "common-gdbthread.h".
1076 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1077 "if" when validating the ptid.
1078 * remote-utils.c: Include "gdbthread.h".
1079 (prepare_resume_reply): Use "switch_to_thread".
1080 * target.c (done_accessing_memory): Likewise.
1082 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1084 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1085 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1086 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1087 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1088 s390x-gs-linux64-ipa.o to ipa_obj.
1089 * linux-s390-low.c (HWCAP_S390_GS): New define.
1090 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1092 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1093 (s390_arch_setup): Check for guarded-storage support and choose
1095 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1096 init_registers_s390x_gs_linux64.
1097 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1099 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1100 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1102 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1104 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1106 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1108 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1109 (thread_db_thread_handle): Declare.
1110 * linux-low.c (linux_target_ops): Initialize thread_handle.
1111 * server.c (handle_qxfer_threads_worker): Add support for
1113 * target.h (struct target_ops): Add new function pointer,
1115 (target_thread_handle): Define.
1116 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1118 (thread_db_thread_handle): New function.
1120 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1122 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1123 * linux-low.h (thread_db_notice_clone): Declare.
1124 * thread-db.c (thread_db_notice_clone): New function.
1126 2017-09-21 Pedro Alves <palves@redhat.com>
1128 * server.c (gdb_read_memory, handle_status, process_serial_event)
1129 (handle_serial_event, handle_target_event): Adjust to
1130 set_desired_thread prototype change.
1131 * target.c (set_desired_thread): Remove 'use_general' parameter
1133 * target.h (set_desired_thread): Remove 'use_general' parameter.
1135 2017-09-20 Tom Tromey <tom@tromey.com>
1137 * target.c (target_terminal::terminal_state): Define.
1138 (target_terminal::init): Rename from target_terminal_init.
1139 (target_terminal::inferior): Rename from
1140 target_terminal_inferior.
1141 (target_terminal::ours): Rename from target_terminal_ours.
1142 (target_terminal::ours_for_output, target_terminal::info): New.
1144 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1146 * server.c (accumulate_file_name_length): Remove.
1147 (emit_dll_description): Adjust to std::string change.
1148 (handle_qxfer_libraries): Use std::string to hold document.
1150 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1152 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1153 return type of xml_escape_text.
1154 * server.c (emit_dll_description): Likewise.
1156 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1158 * server.c (captured_main): Accept argument for --selftest.
1159 Update run_tests call.
1160 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1161 when registering selftests.
1163 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1165 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1166 instead of "VEC" for "target_desc.reg_defs".
1167 (regcache_cpy): Likewise.
1168 (registers_to_string): Likewise.
1169 (registers_from_string): Likewise.
1170 (find_regno): Likewise.
1171 (supply_regblock): Likewise.
1172 (regcache_raw_read_unsigned): Likewise.
1173 * tdesc.c (init_target_desc): Likewise.
1174 (tdesc_create_reg): Likewise.
1175 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1176 (struct target_desc) <reg_defs>: Convert to "std::vector".
1177 (target_desc): Do not initialize "reg_defs".
1178 (~target_desc): Update code to use "std::vector" instead of "VEC"
1179 for "target_desc.reg_defs".
1180 (operator==): Likewise.
1182 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1184 * inferiors.h (thread_to_gdb_id): Remove.
1185 * inferiors.c (thread_to_gdb_id): Remove.
1186 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1187 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1188 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1190 * nto-low.c (nto_fetch_registers, nto_store_registers,
1191 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1193 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1195 * inferiors.h (gdb_id_to_thread_id): Remove.
1196 * inferiors.c (gdb_id_to_thread_id): Remove.
1197 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1198 removal. Move pid declaration closer to where it's used.
1200 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1202 * server.c (handle_detach): New function.
1203 (process_serial_event): Move code out, call handle_detach.
1205 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1207 * server.c (require_running): Rename to ...
1208 (require_running_or_return): ... this ...
1209 (require_running_or_break): ... and this.
1210 (handle_query, process_serial_event): Adjust.
1212 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1214 * linux-low.c (linux_set_resume_request): Remove unused
1217 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1219 * server.c (first_thread_of): Remove.
1220 (process_serial_event): Replace usage of first_thread_of with
1221 find_any_thread_of_pid.
1222 * tracepoint.c (same_process_p): Remove.
1223 (gdb_agent_about_to_close): Replace usage of same_process_p with
1224 find_any_thread_of_pid.
1225 * linux-x86-low.c (same_process_callback): Remove.
1226 (x86_arch_setup_process_callback): Replace usage of
1227 same_process_callback with find_any_thread_of_pid.
1228 * thread-db.c (any_thread_of): Remove.
1229 (switch_to_process): Replace usage of any_thread_of with
1230 find_any_thread_of_pid.
1231 * inferiors.c (thread_pid_matches_callback): Remove.
1232 (find_thread_process): Adjust to use find_any_thread_of_pid.
1234 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1236 * regcache.c (get_thread_regcache): Guard calls to "memset"
1239 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1241 * linux-low.c (handle_extended_wait): Use
1242 "allocate_target_description" instead of "XNEW".
1243 * linux-x86-low.c (initialize_low_arch): Likewise.
1245 2017-09-05 Yao Qi <yao.qi@linaro.org>
1247 * configure.srv (srv_i386_regobj): Remove.
1248 (srv_amd64_regobj): Remove.
1249 (srv_regobj): Set it to "" for x86 non-linux targets.
1250 * linux-x86-tdesc.c (i386_linux_read_description):
1251 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1252 (init_registers_i386): Remove the declaration.
1253 (tdesc_i386): Remove the declaration.
1254 (lynx_i386_arch_setup): Call i386_create_target_description.
1255 * nto-x86-low.c: Likewise.
1256 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1257 [!__x86_64__]: include arch/i386.h.
1258 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1260 2017-09-05 Yao Qi <yao.qi@linaro.org>
1262 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1263 i386/amd64-XXX-linux from it.
1265 2017-09-05 Yao Qi <yao.qi@linaro.org>
1267 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1269 (ipa_amd64_linux_regobj): Remove.
1270 (ipa_x32_linux_regobj): Remove.
1272 2017-09-05 Yao Qi <yao.qi@linaro.org>
1274 * Makefile.in (arch-amd64.o): New rule.
1275 * configure.srv: Append arch-amd64.o.
1276 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1277 (get_ipa_tdesc): Call amd64_linux_read_description.
1278 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1279 and init_registers_amd64_XXX.
1280 * linux-x86-low.c (x86_linux_read_description): Call
1281 amd64_linux_read_description.
1282 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1283 (initialize_low_arch): Don't call init_registers_x32_XXX and
1284 init_registers_amd64_XXX.
1285 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1286 and tdesc_amd64_XXX.
1287 [__x86_64__] (amd64_tdesc_test): New function.
1288 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1289 and init_registers_amd64_XXX.
1290 * linux-x86-tdesc.c: Include arch/amd64.h.
1291 (xcr0_to_tdesc_idx): New function.
1292 (i386_linux_read_description): New function.
1293 (amd64_get_ipa_tdesc_idx): New function.
1294 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1295 (amd64_get_ipa_tdesc): Declare.
1297 2017-09-05 Yao Qi <yao.qi@linaro.org>
1299 * configure.srv (srv_i386_linux_xmlfiles): Remove
1300 i386/i386-XXX-linux.xml from it.
1302 2017-09-05 Yao Qi <yao.qi@linaro.org>
1304 * configure.srv: Set srv_i386_linux_regobj empty if $development
1306 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1307 initialize_low_tdesc.
1308 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1309 with #if initialize_low_tdesc.
1310 * linux-x86-tdesc-selftest.c: New file.
1311 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1313 2017-09-05 Yao Qi <yao.qi@linaro.org>
1315 * Makefile.in (arch-i386.o): New rule.
1316 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1317 (x86_64-*-linux*): Likewise.
1318 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1319 include arch/i386.h.
1320 (i386_linux_read_description): Remove code and call
1321 i386_create_target_description.
1322 * tdesc.c (allocate_target_description): New function.
1323 * tdesc.h (set_tdesc_architecture): Remove declaration.
1324 (set_tdesc_osabi): Likewise.
1326 2017-09-05 Yao Qi <yao.qi@linaro.org>
1328 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1329 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1330 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1332 * server.c (get_features_xml): Call tdesc_get_features_xml.
1333 * tdesc.c (set_tdesc_architecture): New function.
1334 (set_tdesc_osabi): New function.
1335 (tdesc_get_features_xml): New function.
1336 (tdesc_create_feature): Add an argument.
1337 * tdesc.h (struct target_desc) <features>: New field.
1338 <arch, osabi>: New field.
1339 (~target_desc): xfree features, arch, and osabi.
1340 (target_desc::oerator==): Don't compare .xmltarget.
1341 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1342 (set_tdesc_osabi): Likewise.
1343 (tdesc_get_features_xml): Likewise.
1345 2017-09-05 Yao Qi <yao.qi@linaro.org>
1347 * linux-x86-tdesc.c: Include selftest.h.
1348 (i386_tdesc_test): New function.
1349 (initialize_low_tdesc): Call selftests::register_test.
1350 * tdesc.h: Include regdef.h.
1351 (target_desc): Override operator == and !=.
1353 2017-09-05 Yao Qi <yao.qi@linaro.org>
1355 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1356 (ipa_obj): Likewise.
1357 * linux-i386-ipa.c: Include common/x86-xstate.h
1358 (get_ipa_tdesc): Call i386_linux_read_description.
1359 (initialize_low_tracepoint): Don't call init_registers_XXX
1360 functions, call initialize_low_tdesc instead.
1361 * linux-x86-low.c (x86_linux_read_description): Call
1362 i386_linux_read_description.
1363 (initialize_low_arch): Don't call init_registers_i386_XXX
1364 functions, call initialize_low_tdesc.
1365 * linux-x86-tdesc.c: New file.
1366 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1367 (i386_get_ipa_tdesc_idx): Declare.
1368 (i386_get_ipa_tdesc): Declare.
1369 (initialize_low_tdesc): Declare.
1371 2017-09-05 Yao Qi <yao.qi@linaro.org>
1373 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1376 2017-09-05 Yao Qi <yao.qi@linaro.org>
1378 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1379 * regcache.c (get_thread_regcache): Use VEC_length.
1380 (init_register_cache): Likewise.
1381 (regcache_cpy): Likewise.
1382 (registers_to_string): Iterate reg_defs via VEC_iterate.
1383 (find_regno): Likewise.
1384 (find_register_by_number): Use VEC_index.
1385 (register_size): Call find_register_by_number.
1386 (register_data): Call find_register_by_number.
1387 (supply_regblock): Use VEC_length.
1388 (regcache_raw_read_unsigned): Likewise.
1389 * tdesc.c (init_target_desc): Iterate reg_defs via
1391 (default_description): Update initializer.
1392 (copy_target_description): Don't update field num_registers.
1393 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1394 <num_registers>: Remove.
1396 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1398 * Makefile.in (.SECONDARY): Define target.
1400 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1402 * linux-low.c (linux_wait_1): Adjust.
1403 * server.c (queue_stop_reply_callback): Adjust.
1405 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1407 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1408 QEnvironmentUnset and QEnvironmentReset packets.
1409 (handle_query): Inform remote that QEnvironmentHexEncoded,
1410 QEnvironmentUnset and QEnvironmentReset are supported.
1412 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1414 * inferiors.h (inferior_target_data): Rename to ...
1415 (thread_target_data): ... this.
1416 (inferior_regcache_data): Rename to ...
1417 (thread_regcache_data): ... this.
1418 (set_inferior_regcache_data): Rename to ...
1419 (set_thread_regcache_data): ... this.
1420 * inferiors.c (inferior_target_data): Rename to ...
1421 (thread_target_data): ... this.
1422 (inferior_regcache_data): Rename to ...
1423 (thread_regcache_data): ... this.
1424 (set_inferior_regcache_data): Rename to ...
1425 (set_thread_regcache_data): ... this.
1426 (free_one_thread): Update.
1427 * linux-low.h (get_thread_lwp): Update.
1428 * regcache.c (get_thread_regcache): Update.
1429 (regcache_invalidate_thread): Update.
1430 (free_register_cache_thread): Update.
1431 * win32-i386-low.c (update_debug_registers_callback): Update.
1432 (win32_get_current_dr): Update.
1433 * win32-low.c (thread_rec): Update.
1434 (delete_thread_info): Update.
1435 (continue_one_thread): Update.
1436 (suspend_one_thread): Update.
1438 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1440 * inferiors.c (set_inferior_target_data): Remove.
1441 * inferiors.h (set_inferior_target_data): Remove.
1443 2017-08-18 Yao Qi <yao.qi@linaro.org>
1445 * Makefile.in (OBS): Add selftest.o.
1446 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1447 * configure, config.in: Re-generated.
1448 * server.c: Include common/sefltest.h.
1449 (captured_main): Handle option --selftest.
1451 2017-08-09 Yao Qi <yao.qi@linaro.org>
1453 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1454 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1455 i386-avx-mpx.o and i386-mmx.o.
1456 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1457 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1458 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1459 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1460 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1461 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1462 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1463 i386/amd64-avx-mpx.xml.
1465 2017-08-09 Yao Qi <yao.qi@linaro.org>
1467 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1468 and x32-avx-avx512.o.
1469 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1470 i386/x32-avx-avx512.xml.
1472 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1474 * tracepoint.h (enum class fast_tpoint_collect_result): New
1476 (fast_tracepoint_collecting): Change return type to
1477 fast_tpoint_collect_result.
1478 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1479 * linux-low.h: Include tracepoint.h.
1480 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1481 fast_tpoint_collect_result.
1482 * linux-low.c (handle_tracepoints): Adjust.
1483 (linux_fast_tracepoint_collecting): Change return type to
1484 fast_tpoint_collect_result.
1485 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1486 linux_wait_1, stuck_in_jump_pad_callback,
1487 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1488 proceed_one_lwp): Adjust to type change.
1490 2017-07-10 Yao Qi <yao.qi@linaro.org>
1492 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1494 2017-06-29 Yao Qi <yao.qi@linaro.org>
1496 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1498 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1500 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1502 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1504 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1506 * linux-low.c (linux_create_inferior): Adjust code to access the
1507 environment information via 'gdb_environ' class.
1508 * lynx-low.c (lynx_create_inferior): Likewise.
1509 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1510 (get_environ): Return a pointer to 'our_environ'.
1511 (captured_main): Initialize 'our_environ'.
1512 * server.h (get_environ): Adjust prototype.
1513 * spu-low.c (spu_create_inferior): Adjust code to access the
1514 environment information via 'gdb_environ' class.
1516 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1518 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1519 usage of "register" keyword.
1521 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1523 * configure: Re-generate.
1525 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1527 * configure: Re-generate.
1529 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1531 * Makefile.in (COMPILE.pre): Add "-x c++".
1533 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1535 * fork-child.c: Conditionally include <signal.h>.
1537 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1539 * server.c (handle_general_set): Handle new packet
1540 "QStartupWithShell".
1541 (handle_query): Add "QStartupWithShell" to the list of supported
1543 (gdbserver_usage): Add help text explaining the
1544 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1546 (captured_main): Recognize and act upon the presence of the new
1549 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1550 Pedro Alves <palves@redhat.com>
1552 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1553 * configure: Regenerate.
1554 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1556 (i[34567]86-*-lynxos*): Likewise.
1557 (spu*-*-*): Likewise.
1558 * fork-child.c: New file.
1559 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1561 (linux_ptrace_fun): New function.
1562 (linux_create_inferior): Adjust function prototype to reflect
1563 change on "target.h". Adjust function code to use
1565 (linux_request_interrupt): Delete "signal_pid".
1566 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1567 (lynx_ptrace_fun): New function.
1568 (lynx_create_inferior): Adjust function prototype to reflect
1569 change on "target.h". Adjust function code to use
1571 * nto-low.c (nto_create_inferior): Adjust function prototype and
1572 code to reflect change on "target.h". Update comments.
1573 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1574 "common-terminal.h" and "environ.h".
1575 (terminal_fd): Moved to fork-child.c.
1576 (old_foreground_pgrp): Likewise.
1577 (restore_old_foreground_pgrp): Likewise.
1578 (last_status): Make it global.
1579 (last_ptid): Likewise.
1580 (our_environ): New variable.
1581 (startup_with_shell): Likewise.
1582 (program_name): Likewise.
1583 (program_argv): Rename to...
1584 (program_args): ...this.
1585 (wrapper_argv): New variable.
1586 (start_inferior): Delete function.
1587 (get_exec_wrapper): New function.
1588 (get_exec_file): Likewise.
1589 (get_environ): Likewise.
1590 (prefork_hook): Likewise.
1591 (post_fork_inferior): Likewise.
1592 (postfork_hook): Likewise.
1593 (postfork_child_hook): Likewise.
1594 (handle_v_run): Update code to deal with arguments coming from the
1595 remote host. Update calls from "start_inferior" to
1597 (captured_main): Likewise. Initialize environment variable. Call
1599 * server.h (post_fork_inferior): New prototype.
1600 (get_environ): Likewise.
1601 (last_status): Declare.
1602 (last_ptid): Likewise.
1603 (signal_pid): Likewise.
1604 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1605 (spu_ptrace_fun): New function.
1606 (spu_create_inferior): Adjust function prototype to reflect change
1607 on "target.h". Adjust function code to use "fork_inferior".
1608 * target.c (target_terminal_init): New function.
1609 (target_terminal_inferior): Likewise.
1610 (target_terminal_ours): Likewise.
1611 * target.h: Include <vector>.
1612 (struct target_ops) <create_inferior>: Update prototype.
1613 (create_inferior): Update macro.
1614 * utils.c (gdb_flush_out_err): New function.
1615 * win32-low.c (win32_create_inferior): Adjust function prototype
1616 and code to reflect change on "target.h".
1618 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1620 * inferiors.c (switch_to_thread): New function.
1622 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1624 * Makefile.in (SFILE): Add "common/job-control.c".
1625 (OBS): Add "job-control.o".
1627 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1629 * Makefile: Remove "@host_makefile_frag@".
1631 2017-05-05 Pedro Alves <palves@redhat.com>
1633 * configure: Regenerate.
1635 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1637 * configure: Regenerate.
1639 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1641 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1642 software_single_step change of return type to
1643 std::vector<CORE_ADDR>.
1644 * linux-low.c (install_software_single_step_breakpoints):
1646 * linux-low.h (install_software_single_step_breakpoints):
1649 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1651 * remote-utils.c: Include "gdb_termios.h" instead of
1653 * terminal.h: Delete file.
1655 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1657 * server.c: Include <vector>.
1658 <program_argv, wrapper_argv>: Convert to std::vector.
1659 (start_inferior): Rewrite function to use C++.
1660 (handle_v_run): Likewise. Update code that calculates the argv
1661 based on the vRun packet; use C++.
1662 (captured_main): Likewise.
1664 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1666 * server.c (handle_v_cont): Initialize thread_resume::thread
1669 2017-04-05 Pedro Alves <palves@redhat.com>
1671 * configure: Regenerate.
1673 2017-04-05 Pedro Alves <palves@redhat.com>
1675 * gdbreplay.c (sync_error): Constify.
1676 * linux-x86-low.c (push_opcode): Constify.
1678 2017-04-05 Pedro Alves <palves@redhat.com>
1680 * win32-low.c (get_child_debug_event)
1681 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1682 Report TARGET_WAITKIND_SPURIOUS instead.
1684 2017-04-05 Pedro Alves <palves@redhat.com>
1686 * remote-utils.c (remote_prepare, remote_open): Constify.
1687 * remote-utils.h (remote_prepare, remote_open): Constify.
1688 * server.c (captured_main): Constify 'port' handling.
1690 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1692 * Makefile.in (clean): Clear .deps.
1694 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1696 * .gitignore: Remove generated files, replace with wildcard.
1697 * (clean): Replace removal of generated files with wildcard.
1698 (version.c): Replace with...
1699 (version-generated.c): ...this.
1700 (xml-builtin.c): Replace with...
1701 (xml-builtin-generated.c): ...this.
1702 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1703 (%.c: *regformats*): Replace with...
1704 (%-generated.c: *regformats*): ...this.
1706 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1708 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1709 (xtensa_fill_gregset): Call collect_register_by_name for
1711 (xtensa_store_gregset): Call supply_register_by_name for
1714 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1716 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1717 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1718 (xtensa_store_gregset): Call supply_register for all registers in
1719 a0_regnum..a0_regnum + C0_NREGS range.
1721 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1723 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1724 (ax-ipa.o: ax.c): Remove.
1725 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1726 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1727 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1728 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1729 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1731 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1733 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1734 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1735 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1736 (errors-ipa.o: ../common/errors.c): Remove.
1737 (format-ipa.o: ../common/format.c): Remove.
1738 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1740 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1742 * Makefile.in (%-ipa.o: %.c): New rule.
1743 (tracepoint-ipa.o: tracepoint.c): Remove.
1744 (utils-ipa.o: utils.c): Remove.
1745 (remote-utils-ipa.o: remote-utils.c): Remove.
1746 (regcache-ipa.o: regcache.c): Remove.
1747 (i386-linux-ipa.o: i386-linux.c): Remove.
1748 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1749 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1750 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1751 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1752 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1753 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1754 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1755 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1756 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1757 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1758 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1759 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1760 (aarch64-ipa.o: aarch64.c): Remove.
1761 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1762 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1763 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1764 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1765 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1766 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1767 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1768 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1769 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1770 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1771 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1772 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1773 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1774 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1775 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1776 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1777 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1778 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1779 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1780 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1781 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1782 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1783 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1784 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1785 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1786 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1787 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1788 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1789 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1790 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1791 (tdesc-ipa.o: tdesc.c): Remove.
1792 (x32-linux-ipa.o: x32-linux.c): Remove.
1793 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1794 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1796 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1798 * Makefile.in (%.o: ../arch/%.c): New rule.
1799 (arm.o: ../arch/arm.c): Remove.
1800 (arm-linux.o: ../arch/arm-linux.c): Remove.
1801 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1802 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1804 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1806 * Makefile.in (%.o: ../nat/%.c): New rule.
1807 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1808 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1809 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1810 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1811 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1812 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1813 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1814 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1815 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1816 (linux-personality.o: ../nat/linux-personality.c): Remove.
1817 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1818 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1819 (x86-linux.o: ../nat/x86-linux.c): Remove.
1820 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1821 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1823 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1825 * Makefile.in (%.o: ../common/%.c): New rule.
1826 (signals.o: ../common/signals.c): Remove.
1827 (print-utils.o: ../common/print-utils.c): Remove.
1828 (rsp-low.o: ../common/rsp-low.c): Remove.
1829 (common-utils.o: ../common/common-utils.c): Remove.
1830 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1831 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1832 (vec.o: ../common/vec.c): Remove.
1833 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1834 (xml-utils.o: ../common/xml-utils.c): Remove.
1835 (ptid.o: ../common/ptid.c): Remove.
1836 (buffer.o: ../common/buffer.c): Remove.
1837 (format.o: ../common/format.c): Remove.
1838 (filestuff.o: ../common/filestuff.c): Remove.
1839 (agent.o: ../common/agent.c): Remove.
1840 (errors.o: ../common/errors.c): Remove.
1841 (environ.o: ../common/environ.c): Remove.
1842 (common-debug.o: ../common/common-debug.c): Remove.
1843 (cleanups.o: ../common/cleanups.c): Remove.
1844 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1845 (fileio.o: ../common/fileio.c): Remove.
1846 (common-regcache.o: ../common/common-regcache.c): Remove.
1847 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1848 (new-op.o: ../common/new-op.c): Remove.
1849 (btrace-common.o: ../common/btrace-common.c): Remove.
1851 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1853 * Makefile.in (%.o: ../target/%.c): New rule.
1854 (waitstatus.o: ../target/waitstatus.c): Remove.
1856 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1859 (%.c: ../regformats/%.dat,
1860 (%.c: ../regformats/arm/%.dat,
1861 (%.c: ../regformats/i386/%.dat,
1862 (%.c: ../regformats/rs6000/%.dat): New rules.
1863 (aarch64.c): Remove.
1864 (reg-arm.c): Remove.
1865 (arm-with-iwmmxt.c): Remove.
1866 (arm-with-vfpv2.c): Remove.
1867 (arm-with-vfpv3.c): Remove.
1868 (arm-with-neon.c): Remove.
1869 (reg-bfin.c): Remove.
1870 (reg-cris.c): Remove.
1871 (reg-crisv32.c): Remove.
1873 (i386-linux.c): Remove.
1874 (i386-avx.c): Remove.
1875 (i386-avx-linux.c): Remove.
1876 (i386-avx-avx512.c): Remove.
1877 (i386-avx-avx512-linux.c): Remove.
1878 (i386-mpx.c): Remove.
1879 (i386-mpx-linux.c): Remove.
1880 (i386-avx-mpx-avx512-pku.c): Remove.
1881 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1882 (i386-avx-mpx.c): Remove.
1883 (i386-avx-mpx-linux.c): Remove.
1884 (i386-mmx.c): Remove.
1885 (i386-mmx-linux.c): Remove.
1886 (reg-ia64.c): Remove.
1887 (reg-m32r.c): Remove.
1888 (reg-m68k.c): Remove.
1890 (mips-linux.c): Remove.
1891 (mips-dsp-linux.c): Remove.
1892 (mips64-linux.c): Remove.
1893 (mips64-dsp-linux.c): Remove.
1894 (nios2-linux.c): Remove.
1895 (powerpc-32.c): Remove.
1896 (powerpc-32l.c): Remove.
1897 (powerpc-altivec32l.c): Remove.
1898 (powerpc-cell32l.c): Remove.
1899 (powerpc-vsx32l.c): Remove.
1900 (powerpc-isa205-32l.c): Remove.
1901 (powerpc-isa205-altivec32l.c): Remove.
1902 (powerpc-isa205-vsx32l.c): Remove.
1903 (powerpc-e500l.c): Remove.
1904 (powerpc-64l.c): Remove.
1905 (powerpc-altivec64l.c): Remove.
1906 (powerpc-cell64l.c): Remove.
1907 (powerpc-vsx64l.c): Remove.
1908 (powerpc-isa205-64l.c): Remove.
1909 (powerpc-isa205-altivec64l.c): Remove.
1910 (powerpc-isa205-vsx64l.c): Remove.
1911 (s390-linux32.c): Remove.
1912 (s390-linux32v1.c): Remove.
1913 (s390-linux32v2.c): Remove.
1914 (s390-linux64.c): Remove.
1915 (s390-linux64v1.c): Remove.
1916 (s390-linux64v2.c): Remove.
1917 (s390-te-linux64.c): Remove.
1918 (s390-vx-linux64.c): Remove.
1919 (s390-tevx-linux64.c): Remove.
1920 (s390x-linux64.c): Remove.
1921 (s390x-linux64v1.c): Remove.
1922 (s390x-linux64v2.c): Remove.
1923 (s390x-te-linux64.c): Remove.
1924 (s390x-vx-linux64.c): Remove.
1925 (s390x-tevx-linux64.c): Remove.
1926 (tic6x-c64xp-linux.c): Remove.
1927 (tic6x-c64x-linux.c): Remove.
1928 (tic6x-c62x-linux.c): Remove.
1930 (reg-sparc64.c): Remove.
1931 (reg-spu.c): Remove.
1933 (amd64-linux.c): Remove.
1934 (amd64-avx.c): Remove.
1935 (amd64-avx-linux.c): Remove.
1936 (amd64-avx-avx512.c): Remove.
1937 (amd64-avx-avx512-linux.c): Remove.
1938 (amd64-mpx.c): Remove.
1939 (amd64-mpx-linux.c): Remove.
1940 (amd64-avx-mpx-avx512-pku.c): Remove.
1941 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1942 (amd64-avx-mpx.c): Remove.
1943 (amd64-avx-mpx-linux.c): Remove.
1945 (x32-linux.c): Remove.
1946 (x32-avx.c): Remove.
1947 (x32-avx-linux.c): Remove.
1948 (x32-avx-avx512.c): Remove.
1949 (x32-avx-avx512-linux.c): Remove.
1950 (reg-xtensa.c): Remove.
1951 (reg-tilegx.c): Remove.
1952 (reg-tilegx32.c): Remove.
1954 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1956 * Makefile.in (SFILES): Add "common/environ.c".
1957 (OBJS): Add "common/environ.h".
1959 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1961 * configure.ac: Check if the fs_base and gs_base members of
1962 `struct user_regs_struct' exist.
1963 * config.in: Regenerated.
1964 * configure: Likewise.
1966 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1968 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1970 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1971 (get_next_pcs_syscall_next_pc): Likewise.
1973 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1975 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1976 * nto-x86-low.c: Likewise.
1978 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1980 * Makefile.in: Include disable-implicit-rules.mk.
1982 2016-11-23 Pedro Alves <palves@redhat.com>
1984 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1985 (debug_vprintf): Use std::chrono::steady_clock instead of
1986 gettimeofday. Use '.' instead of ':'.
1987 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1988 (get_timestamp): Use std::chrono::steady_clock instead of
1991 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1993 * Makefile.in: Fix whitespace formatting.
1995 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1997 * Makefile.in (SFILES, OBS): Flatten list and order
2000 2016-11-23 Pedro Alves <palves@redhat.com>
2002 * event-loop.c (handle_file_event): Use warning.
2003 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2004 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2007 2016-11-23 Pedro Alves <palves@redhat.com>
2009 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2011 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2012 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2013 debug_printf and debug_flush for debug output.
2014 * server.c (handle_general_set): Likewise.
2015 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2018 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2020 * Makefile.in (.c.o): Replace rule with ...
2021 (%.o: %.c): ... this one.
2023 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2025 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2026 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2028 * configure.ac: Remove checks for the make program.
2029 * configure: Re-generate.
2031 2016-10-28 Pedro Alves <palves@redhat.com>
2033 * Makefile.in (CXX_DIALECT): Get from configure.
2034 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2035 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2036 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2037 * config.in: Regenerate.
2038 * configure: Regenerate.
2040 2016-10-27 Yao Qi <yao.qi@linaro.org>
2042 * linux-low.c (linux_supports_range_stepping): Return true if
2043 can_software_single_step return true.
2045 2016-10-27 Yao Qi <yao.qi@linaro.org>
2047 * inferiors.c (find_inferior_in_random): New function.
2048 * inferiors.h (find_inferior_in_random): Declare.
2049 * linux-low.c (linux_wait_for_event_filtered): Call
2050 find_inferior_in_random instead of find_inferior.
2052 2016-10-27 Yao Qi <yao.qi@linaro.org>
2054 * linux-low.c (linux_wait_1): If single-step breakpoints are
2055 inserted, remove them.
2057 2016-10-26 Pedro Alves <palves@redhat.com>
2059 * linux-low.c (handle_extended_wait): Link parent/child fork
2061 (linux_wait_1): Unlink them.
2062 (linux_set_resume_request): Ignore resume requests for
2063 already-resumed and unhandled fork child threads.
2064 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2065 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2067 (handle_v_requests) <vCont>: Don't call require_running.
2068 * server.h (in_queued_stop_replies): New declaration.
2070 2016-10-24 Yao Qi <yao.qi@linaro.org>
2073 * linux-aarch64-low.c (append_insns): Cast the return value to
2076 2016-10-10 Yao Qi <yao.qi@linaro.org>
2078 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2080 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2082 * target.c (target_supports_multi_process): New function, moved
2084 * target.h (target_supports_multi_process): ... here. Remove
2087 2016-10-05 Tom Tromey <tom@tromey.com>
2090 * tracepoint.c (handle_tracepoint_bkpts): Check
2091 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2093 2016-10-05 Yao Qi <yao.qi@linaro.org>
2095 * configure.srv: Update the path of arm-*.xml files.
2097 2016-10-05 Terry Guo <terry.guo@arm.com>
2098 Yao Qi <yao.qi@linaro.org>
2100 * Makefile.in: Adjust the path of rules.
2101 * configure.srv: Update the path of xml files.
2102 * regformats/arm-with-iwmmxt.dat: Regenerated.
2103 * regformats/arm-with-neon.dat: Likewise.
2104 * regformats/arm-with-vfpv2.dat: Likewise.
2105 * regformats/arm-with-vfpv3.dat Likewise.
2107 2016-09-30 Yao Qi <yao.qi@linaro.org>
2110 * target.c (target_stop_and_wait): Don't call
2111 target_continue_no_signal, use resume_stop instead.
2113 2016-09-26 Yao Qi <yao.qi@linaro.org>
2115 * linux-low.c (linux_wait_1): Call debug_exit.
2117 2016-09-23 Pedro Alves <palves@redhat.com>
2119 * Makefile.in (SFILES): Add common/new-op.c.
2120 (OBS): Add common/new-op.o.
2121 (new-op.o): New rule.
2123 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2125 * .gitinore: Ignore more files.
2127 2016-09-21 Yao Qi <yao.qi@linaro.org>
2129 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2132 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2134 * server.c (start_inferior): Call target_mourn_inferior instead of
2135 mourn_inferior; pass ptid_t argument to it.
2137 (handle_target_event): Likewise.
2138 * target.c (target_mourn_inferior): New function.
2139 * target.h (mourn_inferior): Delete macro.
2141 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2143 * linux-low.c (lwp_is_stepping): New function.
2145 2016-09-06 Carl Love <cel@us.ibm.com>
2147 * server.c (start_inferior): Fixed comment, requested comment change
2148 didn't get updated correctly. Removed reference to ptrace () call as
2149 it is only true on Linux systems.
2151 2016-09-06 Carl Love <cel@us.ibm.com>
2153 * server.c (start_inferior): Do not call
2154 function target_post_create_inferior () if the
2155 inferior process has already exited.
2157 2016-09-05 Pedro Alves <palves@redhat.com>
2159 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2160 (COMPILE.pre, CC_LD): Use CXX directly.
2161 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2162 * acinclude.m4: Don't include build-with-cxx.m4.
2163 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2164 * configure: Regenerate.
2166 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2169 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2170 call writing data to own_buf.
2172 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2174 * target.c (mywait): Call target_wait instead of
2176 (target_wait): New function.
2178 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2180 * server.c (start_inferior): New variable 'ptid'. Replace calls
2181 to the_target->resume by target_continue{,_no_signal}, depending
2183 * target.c (target_stop_and_wait): Call target_continue_no_signal
2184 instead of the_target->resume.
2185 (target_continue): New function.
2187 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2189 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2191 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2194 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2196 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2197 * linux-arm-low.c (ps_get_thread_area): Likewise.
2198 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2199 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2200 * linux-mips-low.c (ps_get_thread_area): Likewise.
2201 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2202 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2203 * linux-x86-low.c (ps_get_thread_area): Likewise.
2204 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2206 2016-08-19 Pedro Alves <palves@redhat.com>
2208 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2210 2016-08-19 Pedro Alves <palves@redhat.com>
2212 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2213 comment. Use memcpy instead of casting through unsigned long.
2215 2016-08-19 Pedro Alves <palves@redhat.com>
2217 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2218 allocating around 0x80000000.
2220 2016-08-19 Pedro Alves <palves@redhat.com>
2223 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2224 (x32-avx512-linux-ipa.o): New rules.
2225 * configure.ac (x86_64-*-linux*): New x32 check.
2226 * configure.srv (ipa_x32_linux_regobj): New.
2227 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2228 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2230 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2232 * configure: Regenerate.
2234 2016-08-09 Pedro Alves <palves@redhat.com>
2237 * Makefile.in (OBS): Add signals-state-save-restore.o.
2238 (signals-state-save-restore.o): New rule.
2239 * config.in: Regenerate.
2240 * configure: Regenerate.
2241 * linux-low.c: Include "signals-state-save-restore.h".
2242 (linux_create_inferior): Call
2243 restore_original_signals_state.
2244 * server.c: Include "dispositions-save-restore.h".
2245 (captured_main): Call save_original_signals_state.
2247 2016-08-05 Pedro Alves <palves@redhat.com>
2249 * configure: Regenerate.
2251 2016-08-04 Yao Qi <yao.qi@linaro.org>
2253 * linux-low.c (regsets_fetch_inferior_registers): Check
2254 errno is ESRCH or not.
2256 2016-08-02 Yao Qi <yao.qi@linaro.org>
2258 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2259 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2260 (thread_db_load_search): Update.
2261 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2262 td_ta_set_event and td_ta_event_getmsg.
2264 2016-07-26 Pedro Alves <palves@redhat.com>
2267 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2268 of unsigned long for 64-bit registers and use uint32_t instead of
2269 unsigned int for 32-bit registers.
2271 2016-07-26 Pedro Alves <palves@redhat.com>
2273 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2276 2016-07-21 Tom Tromey <tom@tromey.com>
2278 * configure: Rebuild.
2280 2016-07-21 Yao Qi <yao.qi@linaro.org>
2282 * mem-break.c (find_gdb_breakpoint): Cast bp to
2283 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2285 2016-07-21 Yao Qi <yao.qi@linaro.org>
2287 * server.c (handle_v_requests): Support s and S actions
2288 if target_supports_software_single_step return true.
2290 2016-07-21 Yao Qi <yao.qi@linaro.org>
2292 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2293 is resume_step, call maybe_hw_step.
2294 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2296 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2298 (proceed_one_lwp): If resume request is resume_step, install
2299 reinsert breakpoints and call maybe_hw_step.
2301 2016-07-21 Yao Qi <yao.qi@linaro.org>
2303 * linux-low.c (proceed_one_lwp): Declare.
2304 (linux_resume_one_thread): Remove local variable 'step'.
2305 Lift code enqueue signal. Call proceed_one_lwp instead of
2306 linux_resume_one_lwp.
2308 2016-07-21 Yao Qi <yao.qi@linaro.org>
2310 * linux-low.c (linux_resume_one_thread): Call
2311 enqueue_pending_signal.
2313 2016-07-21 Yao Qi <yao.qi@linaro.org>
2315 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2316 * inferiors.c (do_restore_current_thread_cleanup): New function.
2317 (make_cleanup_restore_current_thread): Likewise.
2318 * linux-low.c (install_software_single_step_breakpoints): Call
2319 make_cleanup_restore_current_thread. Switch current_thread to
2322 2016-07-21 Yao Qi <yao.qi@linaro.org>
2324 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2325 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2326 (clone_one_breakpoint): Likewise.
2327 (delete_reinsert_breakpoints): Change parameter to thread.
2329 (has_reinsert_breakpoints): Likewise.
2330 (uninsert_reinsert_breakpoints): Likewise.
2331 (reinsert_reinsert_breakpoints): Likewise.
2332 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2333 (delete_reinsert_breakpoints): Likewise.
2334 (reinsert_reinsert_breakpoints): Likewise.
2335 (uninsert_reinsert_breakpoints): Likewise.
2336 (has_reinsert_breakpoints): Likewise.
2338 2016-07-21 Yao Qi <yao.qi@linaro.org>
2340 * inferiors.c (get_thread_process): Make parameter const.
2341 * inferiors.h (get_thread_process): Update declaration.
2342 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2343 Add new parameters child_thread and parent_thread. Callers
2345 * mem-break.h (clone_all_breakpoints): Update declaration.
2347 2016-07-21 Yao Qi <yao.qi@linaro.org>
2349 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2350 <command_list, handler>: Remove.
2351 (struct gdb_breakpoint): New.
2352 (struct other_breakpoint): New.
2353 (struct reinsert_breakpoint): New.
2354 (is_gdb_breakpoint): New function.
2355 (any_persistent_commands): Update command_list if
2356 is_gdb_breakpoint returns true.
2357 (set_breakpoint): Create breakpoints according to their types.
2358 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2359 (set_gdb_breakpoint_1): Likewise.
2360 (set_gdb_breakpoint): Likewise.
2361 (clear_breakpoint_conditions): Change parameter type to
2362 'struct gdb_breakpoint *'.
2363 (clear_breakpoint_commands): Likewise.
2364 (clear_breakpoint_conditions_and_commands): Likewise.
2365 (add_condition_to_breakpoint): Likewise.
2366 (add_breakpoint_condition): Likewise.
2367 (add_commands_to_breakpoint): Likewise.
2368 (check_breakpoints): Check other_breakpoint.
2369 (clone_one_breakpoint): Clone breakpopint according to its type.
2370 * mem-break.h (struct gdb_breakpoint): Declare.
2371 (set_gdb_breakpoint): Update declaration.
2372 (clear_breakpoint_conditions_and_commands): Likewise.
2373 (add_breakpoint_condition): Likewise.
2374 (add_breakpoint_commands): Likewise.
2375 * server.c (process_point_options): Change parameter type to
2376 'struct gdb_breakpoint *'.
2378 2016-07-21 Yao Qi <yao.qi@linaro.org>
2380 * mem-break.c (set_breakpoint_at): Rename it to ...
2381 (set_breakpoint_type_at): ... it.
2382 (set_breakpoint_at): Call set_breakpoint_type_at.
2383 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2384 * mem-break.h (set_breakpoint_at): Update comments.
2386 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2388 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2390 (nios2_store_gregset): Likewise.
2392 2016-07-01 Pedro Alves <palves@redhat.com>
2393 Antoine Tremblay <antoine.tremblay@ericsson.com>
2395 * linux-low.c: Change interface to take the target lwp_info
2396 pointer directly and return void. Handle detaching from a zombie
2398 (linux_detach_lwp_callback): New function.
2399 (linux_detach): Detach from the leader thread after detaching from
2402 2016-06-28 Yao Qi <yao.qi@linaro.org>
2404 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2405 for variable new_offset.
2406 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2407 (aarch64_ftrace_insn_reloc_cb): Likewise.
2408 (aarch64_ftrace_insn_reloc_tb): Likewise.
2409 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2410 PRIx64 instead of PRIx32.
2412 2016-06-28 Yao Qi <yao.qi@linaro.org>
2414 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2415 (the_low_target): Install arm_get_syscall_trapinfo.
2417 2016-06-28 Yao Qi <yao.qi@linaro.org>
2419 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2421 (the_low_target): Install aarch64_get_syscall_trapinfo.
2423 2016-06-28 Yao Qi <yao.qi@linaro.org>
2425 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2427 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2428 Remove parameter sysno.
2429 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2432 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2434 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2435 (s390_emit_ne_goto): Likewise.
2436 (s390_emit_lt_goto): Likewise.
2437 (s390_emit_le_goto): Likewise.
2438 (s390_emit_gt_goto): Likewise.
2439 (s390_emit_ge_goto): Likewise.
2440 (s390x_emit_eq_goto): Likewise.
2441 (s390x_emit_ne_goto): Likewise.
2442 (s390x_emit_lt_goto): Likewise.
2443 (s390x_emit_le_goto): Likewise.
2444 (s390x_emit_gt_goto): Likewise.
2445 (s390x_emit_ge_goto): Likewise.
2446 (s390_emit_ops_impl): Mark variable static.
2447 (s390x_emit_ops): Likewise.
2449 2016-06-17 Yao Qi <yao.qi@linaro.org>
2451 * linux-low.c (handle_extended_wait): Call
2452 uninsert_reinsert_breakpoints for the parent process. Remove
2453 reinsert breakpoints from the child process. Reinsert them to
2454 the parent process when vfork is done.
2455 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2456 (reinsert_reinsert_breakpoints): New function.
2457 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2458 (reinsert_reinsert_breakpoints): Declare.
2460 2016-06-17 Yao Qi <yao.qi@linaro.org>
2462 * linux-low.c (handle_extended_wait): If the parent is doing
2463 step-over, remove the reinsert breakpoints from the forked child.
2465 2016-06-17 Yao Qi <yao.qi@linaro.org>
2467 * linux-low.c (unsuspend_all_lwps): Declare.
2468 (linux_low_filter_event): If thread exited, call finish_step_over.
2469 If step-over is finished, unsuspend other threads.
2471 2016-06-17 Yao Qi <yao.qi@linaro.org>
2473 * linux-low.c (linux_resume_one_lwp_throw): Assert
2474 has_reinsert_breakpoints returns false.
2475 * mem-break.c (delete_disabled_breakpoints): Assert
2476 bp type isn't reinsert_breakpoint.
2478 2016-06-17 Yao Qi <yao.qi@linaro.org>
2480 * linux-low.c (maybe_hw_step): New function.
2481 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2482 (finish_step_over): Switch current_thread to lwp temporarily,
2483 and assert has_reinsert_breakpoints returns true.
2484 (proceed_one_lwp): Call maybe_hw_step.
2485 * mem-break.c (has_reinsert_breakpoints): New function.
2486 * mem-break.h (has_reinsert_breakpoints): Declare.
2488 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2490 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2492 2016-05-17 Yao Qi <yao.qi@linaro.org>
2494 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2495 instead of find_inferior.
2497 2016-05-05 Yao Qi <yao.qi@linaro.org>
2499 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2500 Initialize res to zero.
2502 2016-05-05 Yao Qi <yao.qi@linaro.org>
2504 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2507 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2509 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2510 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2511 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2513 2016-04-28 Par Olsson <par.olsson@windriver.com>
2514 Simon Marchi <simon.marchi@ericsson.com>
2516 * tracepoint.c (write_inferior_int8): New function.
2517 (cmd_qtenable_disable): Write enable flag using
2518 write_inferior_int8.
2520 2016-04-25 Yao Qi <yao.qi@linaro.org>
2522 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2523 (need_step_over_p): Return zero if the LWP has pending signals
2524 can be delivered on software single step target.
2526 2016-04-25 Yao Qi <yao.qi@linaro.org>
2528 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2529 return instead of error.
2531 2016-04-22 Yao Qi <yao.qi@linaro.org>
2533 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2536 2016-04-22 Yao Qi <yao.qi@linaro.org>
2538 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2539 signal when stepping over breakpoint with software single
2542 2016-04-21 Pedro Alves <palves@redhat.com>
2544 * linux-s390-low.c (s390_collect_ptrace_register)
2545 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2547 (s390_check_regset): Use void * instead of gdb_byte *.
2549 2016-04-20 Pedro Alves <palves@redhat.com>
2551 * configure: Renegerate.
2553 2016-04-20 Yao Qi <yao.qi@linaro.org>
2555 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2556 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2558 (arm_store_gregset): Likewise.
2560 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2562 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2563 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2564 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2565 (amd64-avx-mpx-linux.c): New rules.
2566 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2567 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2568 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2569 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2570 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2571 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2572 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2573 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2574 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2575 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2576 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2577 * linux-x86-low.c (x86_linux_read_description): Add case for
2578 X86_XSTATE_AVX_MPX_MASK.
2579 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2580 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2581 init_registers_i386_avx_mpx_linux.
2582 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2583 (initialize_low_tracepoint): Call
2584 init_registers_i386_avx_mpx_linux.
2585 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2586 (initialize_low_tracepoint): Call
2587 init_registers_amd64_avx_mpx_linux.
2588 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2589 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2590 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2593 2016-04-18 Pedro Alves <palves@redhat.com>
2595 * configure: Regenerate.
2597 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2599 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2600 (aarch64_emit_sub): Likewise.
2602 2016-04-12 Pedro Alves <palves@redhat.com>
2604 * utils.c (prepare_to_throw_exception): Delete.
2606 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2608 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2610 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2612 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2614 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2616 * linux-aarch64-ipa.c: Add <elf.h> include.
2617 * linux-ppc-ipa.c: Add <elf.h> include.
2618 * linux-s390-ipa.c: Add <elf.h> include.
2620 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2622 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2623 (get_raw_reg_ptr): Likewise.
2624 (get_trace_state_variable_value_ptr): Likewise.
2625 (set_trace_state_variable_value_ptr): Likewise.
2626 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2629 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2630 Marcin Kościelnicki <koriakin@0x04.net>
2633 * linux-ppc-low.c (emit_insns): New function.
2634 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2635 (ppc_emit_prologue): New function.
2636 (ppc_emit_epilogue): New function.
2637 (ppc_emit_add): New function.
2638 (ppc_emit_sub): New function.
2639 (ppc_emit_mul): New function.
2640 (ppc_emit_lsh): New function.
2641 (ppc_emit_rsh_signed): New function.
2642 (ppc_emit_rsh_unsigned): New function.
2643 (ppc_emit_ext): New function.
2644 (ppc_emit_zero_ext): New function.
2645 (ppc_emit_log_not): New function.
2646 (ppc_emit_bit_and): New function.
2647 (ppc_emit_bit_or): New function.
2648 (ppc_emit_bit_xor): New function.
2649 (ppc_emit_bit_not): New function.
2650 (ppc_emit_equal): New function.
2651 (ppc_emit_less_signed): New function.
2652 (ppc_emit_less_unsigned): New function.
2653 (ppc_emit_ref): New function.
2654 (ppc_emit_const): New function.
2655 (ppc_emit_reg): New function.
2656 (ppc_emit_pop): New function.
2657 (ppc_emit_stack_flush): New function.
2658 (ppc_emit_swap): New function.
2659 (ppc_emit_stack_adjust): New function.
2660 (ppc_emit_call): New function.
2661 (ppc_emit_int_call_1): New function.
2662 (ppc_emit_void_call_2): New function.
2663 (ppc_emit_if_goto): New function.
2664 (ppc_emit_goto): New function.
2665 (ppc_emit_eq_goto): New function.
2666 (ppc_emit_ne_goto): New function.
2667 (ppc_emit_lt_goto): New function.
2668 (ppc_emit_le_goto): New function.
2669 (ppc_emit_gt_goto): New function.
2670 (ppc_emit_ge_goto): New function.
2671 (ppc_write_goto_address): New function.
2672 (ppc_emit_ops_impl): New static variable.
2673 (ppc64v1_emit_prologue): New function.
2674 (ppc64v2_emit_prologue): New function.
2675 (ppc64_emit_epilogue): New function.
2676 (ppc64_emit_add): New function.
2677 (ppc64_emit_sub): New function.
2678 (ppc64_emit_mul): New function.
2679 (ppc64_emit_lsh): New function.
2680 (ppc64_emit_rsh_signed): New function.
2681 (ppc64_emit_rsh_unsigned): New function.
2682 (ppc64_emit_ext): New function.
2683 (ppc64_emit_zero_ext): New function.
2684 (ppc64_emit_log_not): New function.
2685 (ppc64_emit_bit_and): New function.
2686 (ppc64_emit_bit_or): New function.
2687 (ppc64_emit_bit_xor): New function.
2688 (ppc64_emit_bit_not): New function.
2689 (ppc64_emit_equal): New function.
2690 (ppc64_emit_less_signed): New function.
2691 (ppc64_emit_less_unsigned): New function.
2692 (ppc64_emit_ref): New function.
2693 (ppc64_emit_const): New function.
2694 (ppc64v1_emit_reg): New function.
2695 (ppc64v2_emit_reg): New function.
2696 (ppc64_emit_pop): New function.
2697 (ppc64_emit_stack_flush): New function.
2698 (ppc64_emit_swap): New function.
2699 (ppc64v1_emit_call): New function.
2700 (ppc64v2_emit_call): New function.
2701 (ppc64v1_emit_int_call_1): New function.
2702 (ppc64v2_emit_int_call_1): New function.
2703 (ppc64v1_emit_void_call_2): New function.
2704 (ppc64v2_emit_void_call_2): New function.
2705 (ppc64_emit_if_goto): New function.
2706 (ppc64_emit_eq_goto): New function.
2707 (ppc64_emit_ne_goto): New function.
2708 (ppc64_emit_lt_goto): New function.
2709 (ppc64_emit_le_goto): New function.
2710 (ppc64_emit_gt_goto): New function.
2711 (ppc64_emit_ge_goto): New function.
2712 (ppc64v1_emit_ops_impl): New static variable.
2713 (ppc64v2_emit_ops_impl): New static variable.
2714 (ppc_emit_ops): New function.
2715 (linux_low_target): Wire in ppc_emit_ops.
2717 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2718 Marcin Kościelnicki <koriakin@0x04.net>
2721 * Makefile.in: Add powerpc-*-ipa.o
2722 * configure.srv: Add ipa_obj for powerpc*-linux.
2723 * linux-ppc-ipa.c: New file.
2724 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2726 (PPC_FIELD): New macro.
2727 (PPC_SEXT): New macro.
2728 (PPC_OP6): New macro.
2729 (PPC_BO): New macro.
2730 (PPC_LI): New macro.
2731 (PPC_BD): New macro.
2732 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2733 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2734 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2735 (ppc_get_thread_area): New function.
2736 (is_elfv2_inferior): New function.
2737 (gen_ds_form): New function.
2738 (GEN_STD): New macro.
2739 (GEN_STDU): New macro.
2740 (GEN_LD): New macro.
2741 (GEN_LDU): New macro.
2742 (gen_d_form): New function.
2743 (GEN_ADDI): New macro.
2744 (GEN_ADDIS): New macro.
2745 (GEN_LI): New macro.
2746 (GEN_LIS): New macro.
2747 (GEN_ORI): New macro.
2748 (GEN_ORIS): New macro.
2749 (GEN_LWZ): New macro.
2750 (GEN_STW): New macro.
2751 (GEN_STWU): New macro.
2752 (gen_xfx_form): New function.
2753 (GEN_MFSPR): New macro.
2754 (GEN_MTSPR): New macro.
2755 (GEN_MFCR): New macro.
2756 (GEN_MTCR): New macro.
2757 (GEN_SYNC): New macro.
2758 (GEN_LWSYNC): New macro.
2759 (gen_x_form): New function.
2760 (GEN_OR): New macro.
2761 (GEN_MR): New macro.
2762 (GEN_LWARX): New macro.
2763 (GEN_STWCX): New macro.
2764 (GEN_CMPW): New macro.
2765 (gen_md_form): New function.
2766 (GEN_RLDICL): New macro.
2767 (GEN_RLDICR): New macro.
2768 (gen_i_form): New function.
2770 (GEN_BL): New macro.
2771 (gen_b_form): New function.
2772 (GEN_BNE): New macro.
2773 (GEN_LOAD): New macro.
2774 (GEN_STORE): New macro.
2775 (gen_limm): New function.
2776 (gen_atomic_xchg): New function.
2777 (gen_call): New function.
2778 (ppc_relocate_instruction): New function.
2779 (ppc_install_fast_tracepoint_jump_pad): New function.
2780 (ppc_get_min_fast_tracepoint_insn_len): New function.
2781 (ppc_get_ipa_tdesc_idx): New function.
2782 (the_low_target): Wire in the new functions.
2783 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2785 * linux-ppc-tdesc.h: New file.
2787 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2789 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2790 (alloc_jump_pad_buffer): New function.
2791 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2792 (alloc_jump_pad_buffer): New function.
2793 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2794 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2795 (alloc_jump_pad_buffer): New function.
2796 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2797 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2798 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2799 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2801 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2803 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2804 * linux-amd64-ipa.c: Likewise.
2805 * linux-i386-ipa.c: Likewise.
2806 * linux-s390-ipa.c: Likewise.
2807 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2808 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2809 set_trace_state_variable_value_ptr.
2810 (struct ipa_sym_addresses): Likewise.
2811 (symbol_list): Likewise.
2812 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2813 accessing gdb_collect directly.
2814 (gdb_collect_ptr_type): New typedef.
2815 (get_raw_reg_ptr_type): New typedef.
2816 (get_trace_state_variable_value_ptr_type): New typedef.
2817 (set_trace_state_variable_value_ptr_type): New typedef.
2818 (gdb_collect_ptr): New global.
2819 (get_raw_reg_ptr): New global.
2820 (get_trace_state_variable_value_ptr): New global.
2821 (set_trace_state_variable_value_ptr): New global.
2822 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2823 accessing get_raw_reg directly.
2824 (get_get_tsv_func_addr): Likewise for
2825 get_trace_state_variable_value_ptr.
2826 (get_set_tsv_func_addr): Likewise for
2827 set_trace_state_variable_value_ptr.
2828 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2830 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2832 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2834 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2836 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2838 (relocate_instruction): Remove own_buf.
2839 * server.c (own_buf): Make global.
2840 (handle_v_requests): Make global.
2841 * server.h (own_buf): New declaration.
2842 (handle_v_requests): New prototype.
2844 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2847 * linux-s390-low.c (add_insns): New function.
2848 (s390_emit_prologue): New function.
2849 (s390_emit_epilogue): New function.
2850 (s390_emit_add): New function.
2851 (s390_emit_sub): New function.
2852 (s390_emit_mul): New function.
2853 (s390_emit_lsh): New function.
2854 (s390_emit_rsh_signed): New function.
2855 (s390_emit_rsh_unsigned): New function.
2856 (s390_emit_ext): New function.
2857 (s390_emit_log_not): New function.
2858 (s390_emit_bit_and): New function.
2859 (s390_emit_bit_or): New function.
2860 (s390_emit_bit_xor): New function.
2861 (s390_emit_bit_not): New function.
2862 (s390_emit_equal): New function.
2863 (s390_emit_less_signed): New function.
2864 (s390_emit_less_unsigned): New function.
2865 (s390_emit_ref): New function.
2866 (s390_emit_if_goto): New function.
2867 (s390_emit_goto): New function.
2868 (s390_write_goto_address): New function.
2869 (s390_emit_litpool): New function.
2870 (s390_emit_const): New function.
2871 (s390_emit_call): New function.
2872 (s390_emit_reg): New function.
2873 (s390_emit_pop): New function.
2874 (s390_emit_stack_flush): New function.
2875 (s390_emit_zero_ext): New function.
2876 (s390_emit_swap): New function.
2877 (s390_emit_stack_adjust): New function.
2878 (s390_emit_set_r2): New function.
2879 (s390_emit_int_call_1): New function.
2880 (s390_emit_void_call_2): New function.
2881 (s390_emit_eq_goto): New function.
2882 (s390_emit_ne_goto): New function.
2883 (s390_emit_lt_goto): New function.
2884 (s390_emit_le_goto): New function.
2885 (s390_emit_gt_goto): New function.
2886 (s390_emit_ge_goto): New function.
2887 (s390x_emit_prologue): New function.
2888 (s390x_emit_epilogue): New function.
2889 (s390x_emit_add): New function.
2890 (s390x_emit_sub): New function.
2891 (s390x_emit_mul): New function.
2892 (s390x_emit_lsh): New function.
2893 (s390x_emit_rsh_signed): New function.
2894 (s390x_emit_rsh_unsigned): New function.
2895 (s390x_emit_ext): New function.
2896 (s390x_emit_log_not): New function.
2897 (s390x_emit_bit_and): New function.
2898 (s390x_emit_bit_or): New function.
2899 (s390x_emit_bit_xor): New function.
2900 (s390x_emit_bit_not): New function.
2901 (s390x_emit_equal): New function.
2902 (s390x_emit_less_signed): New function.
2903 (s390x_emit_less_unsigned): New function.
2904 (s390x_emit_ref): New function.
2905 (s390x_emit_if_goto): New function.
2906 (s390x_emit_const): New function.
2907 (s390x_emit_call): New function.
2908 (s390x_emit_reg): New function.
2909 (s390x_emit_pop): New function.
2910 (s390x_emit_stack_flush): New function.
2911 (s390x_emit_zero_ext): New function.
2912 (s390x_emit_swap): New function.
2913 (s390x_emit_stack_adjust): New function.
2914 (s390x_emit_int_call_1): New function.
2915 (s390x_emit_void_call_2): New function.
2916 (s390x_emit_eq_goto): New function.
2917 (s390x_emit_ne_goto): New function.
2918 (s390x_emit_lt_goto): New function.
2919 (s390x_emit_le_goto): New function.
2920 (s390x_emit_gt_goto): New function.
2921 (s390x_emit_ge_goto): New function.
2922 (s390_emit_ops): New function.
2923 (struct linux_target_ops): Fill in emit_ops hook.
2925 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2928 * Makefile.in: Add s390 IPA files.
2929 * configure.srv: Build IPA for s390.
2930 * linux-s390-ipa.c: New file.
2931 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2932 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2933 (tdesc_s390_linux32): Likewise.
2934 (init_registers_s390_linux32v1): Likewise.
2935 (tdesc_s390_linux32v1): Likewise.
2936 (init_registers_s390_linux32v2): Likewise.
2937 (tdesc_s390_linux32v2): Likewise.
2938 (init_registers_s390_linux64): Likewise.
2939 (tdesc_s390_linux64): Likewise.
2940 (init_registers_s390_linux64v1): Likewise.
2941 (tdesc_s390_linux64v1): Likewise.
2942 (init_registers_s390_linux64v2): Likewise.
2943 (tdesc_s390_linux64v2): Likewise.
2944 (init_registers_s390_te_linux64): Likewise.
2945 (tdesc_s390_te_linux64): Likewise.
2946 (init_registers_s390_vx_linux64): Likewise.
2947 (tdesc_s390_vx_linux64): Likewise.
2948 (init_registers_s390_tevx_linux64): Likewise.
2949 (tdesc_s390_tevx_linux64): Likewise.
2950 (init_registers_s390x_linux64): Likewise.
2951 (tdesc_s390x_linux64): Likewise.
2952 (init_registers_s390x_linux64v1): Likewise.
2953 (tdesc_s390x_linux64v1): Likewise.
2954 (init_registers_s390x_linux64v2): Likewise.
2955 (tdesc_s390x_linux64v2): Likewise.
2956 (init_registers_s390x_te_linux64): Likewise.
2957 (tdesc_s390x_te_linux64): Likewise.
2958 (init_registers_s390x_vx_linux64): Likewise.
2959 (tdesc_s390x_vx_linux64): Likewise.
2960 (init_registers_s390x_tevx_linux64): Likewise.
2961 (tdesc_s390x_tevx_linux64): Likewise.
2962 (have_hwcap_s390_vx): New static variable.
2963 (s390_arch_setup): Fill have_hwcap_s390_vx.
2964 (s390_get_thread_area): New function.
2965 (s390_ft_entry_gpr_esa): New const.
2966 (s390_ft_entry_gpr_zarch): New const.
2967 (s390_ft_entry_misc): New const.
2968 (s390_ft_entry_fr): New const.
2969 (s390_ft_entry_vr): New const.
2970 (s390_ft_main_31): New const.
2971 (s390_ft_main_64): New const.
2972 (s390_ft_exit_fr): New const.
2973 (s390_ft_exit_vr): New const.
2974 (s390_ft_exit_misc): New const.
2975 (s390_ft_exit_gpr_esa): New const.
2976 (s390_ft_exit_gpr_zarch): New const.
2977 (append_insns): New function.
2978 (s390_relocate_instruction): New function.
2979 (s390_install_fast_tracepoint_jump_pad): New function.
2980 (s390_get_min_fast_tracepoint_insn_len): New function.
2981 (s390_get_ipa_tdesc_idx): New function.
2982 (struct linux_target_ops): Wire in the above functions.
2983 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2984 * linux-s390-tdesc.h: New file.
2986 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2988 * linux-s390-low.c (s390_supports_tracepoints): New function.
2989 (struct linux_target_ops): Fill supports_tracepoints hook.
2991 2016-03-18 Yao Qi <yao.qi@linaro.org>
2993 * linux-low.c (lwp_signal_can_be_delivered): New function.
2994 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2996 2016-03-18 Yao Qi <yao.qi@linaro.org>
2998 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2999 0 if signal is enqueued. Remove 'signal' from one debugging
3000 message. Move one debugging message to some lines below.
3001 Remove code setting 'signal' to 0.
3003 2016-03-18 Yao Qi <yao.qi@linaro.org>
3005 * linux-low.c (linux_low_filter_event): Remove redundant
3006 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3008 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3010 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3011 (struct linux_target_ops): Wire in the above.
3013 2016-03-03 Yao Qi <yao.qi@linaro.org>
3015 * linux-low.c: Update comments to start_step_over.
3017 2016-03-03 Yao Qi <yao.qi@linaro.org>
3020 * linux-low.c (handle_extended_wait): Set child suspended
3021 if event_lwp->bp_reinsert isn't zero.
3023 2016-03-02 Yao Qi <yao.qi@linaro.org>
3025 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3026 enqueue_pending_signal.
3028 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3030 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3033 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3035 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3036 (s390_regmap_3264) [!__s390x__]: New global.
3037 (s390_collect_ptrace_register): Skip map entries containing -1.
3038 (s390_supply_ptrace_register): Ditto.
3039 (s390_fill_gprs_high): New function.
3040 (s390_store_gprs_high): New function.
3041 (s390_regsets): Add NT_S390_HIGH_GPRS.
3042 (s390_get_hwcap): Enable on 31-bit.
3043 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3044 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3045 Detect NT_S390_HIGH_GPRS.
3046 (s390_usrregs_info_3264): Enable on 31-bit.
3047 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3048 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3050 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3053 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3054 * configure.srv: Ditto.
3055 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3056 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3057 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3058 (init_registers_amd64_linux): Remove prototype.
3059 (tdesc_amd64_linux): Remove declaration.
3060 (get_ipa_tdesc): New function.
3061 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3062 initialize remaining tdescs.
3063 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3064 (init_registers_i386_linux): Remove prototype.
3065 (tdesc_i386_linux): Remove declaration.
3066 (get_ipa_tdesc): New function.
3067 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3068 initialize remaining tdescs.
3069 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3070 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3071 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3072 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3073 (x86_get_ipa_tdesc_idx): New function.
3074 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3075 * linux-x86-tdesc.h: New file.
3076 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3077 (target_get_ipa_tdesc_idx): New macro.
3078 * tracepoint.c (ipa_tdesc_idx): New macro.
3079 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3080 (symbol_list): Add ipa_tdesc_idx.
3081 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3082 (ipa_tdesc): Remove.
3083 (ipa_tdesc_idx): New variable.
3084 (get_context_regcache): Use get_ipa_tdesc.
3085 (gdb_collect): Ditto.
3087 * tracepoint.h (get_ipa_tdesc): New prototype.
3088 (ipa_tdesc): Remove.
3090 2016-02-24 Pedro Alves <palves@redhat.com>
3092 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3093 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3094 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3095 Factor out common code between the USE_SIGTRAP_SIGINFO and
3096 !USE_SIGTRAP_SIGINFO blocks.
3097 (linux_low_filter_event): Call save_stop_reason instead of
3098 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3100 (linux_wait_1): Update comments.
3102 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3104 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3105 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3106 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3107 ppc_insert_point, ppc_remove_point.
3109 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3111 * linux-s390-low.c (s390_supports_z_point_type): New function.
3112 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3114 2016-02-16 Yao Qi <yao.qi@linaro.org>
3116 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3117 PC. Get pc from regcache_read_pc.
3119 2016-02-12 Yao Qi <yao.qi@linaro.org>
3121 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3122 or linux_get_pc_32bit.
3123 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3125 2016-02-12 Yao Qi <yao.qi@linaro.org>
3127 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3128 arm_linux_get_next_pcs_fixup.
3130 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3132 * tracepoint.c (x_tracepoint_action_download): Change
3133 write_inferior_data_ptr to write_inferior_data_pointer.
3134 (cmd_qtstart): Likewise.
3135 (write_inferior_data_ptr): Remove.
3136 (download_agent_expr): Change write_inferior_data_ptr to
3137 write_inferior_data_pointer.
3138 (download_tracepoint_1): Likewise.
3139 (download_tracepoint): Likewise.
3140 (download_trace_state_variables): Likewise.
3142 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3143 Marcin Kościelnicki <koriakin@0x04.net>
3145 * tracepoint.c (struct tracepoint_action_ops): Remove.
3146 (struct tracepoint_action): Remove ops.
3147 (m_tracepoint_action_download, r_tracepoint_action_download)
3148 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3149 size and offset accordingly.
3150 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3151 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3152 (tracepoint_action_send, tracepoint_action_download): New functions.
3153 Helpers for trace action handlers.
3154 (add_tracepoint_action): Remove setup actions ops.
3155 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3157 2016-02-10 Yao Qi <yao.qi@linaro.org>
3159 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3161 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3163 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3165 * configure: Regenerate.
3167 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3169 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3170 void * to gdb_byte *.
3171 * linux-low.c (siginfo_fixup): Likewise.
3172 (linux_xfer_siginfo): Likewise.
3173 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3175 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3177 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3179 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3181 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3183 * linux-x86-low.c [__x86_64__]: Include
3184 "nat/amd64-linux-siginfo.h".
3185 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3186 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3187 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3188 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3189 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3190 (cpt_si_fd, si_timerid, si_overrun): Move from
3191 nat/amd64-linux-siginfo.c.
3192 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3194 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3196 * server.c (skip_to_semicolon): Remove.
3197 (process_point_options): Use strchrnul instead of
3200 2016-01-26 Yao Qi <yao.qi@linaro.org>
3202 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3203 * linux-low.c (install_software_single_step_breakpoints): Don't
3204 call regcache_read_pc.
3205 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3208 2016-01-26 Yao Qi <yao.qi@linaro.org>
3210 * linux-low.c (install_software_single_step_breakpoints): Call
3211 regcache_read_pc instead of get_pc.
3213 2016-01-26 Yao Qi <yao.qi@linaro.org>
3215 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3216 (unblock_async_io): Rename to ...
3217 (block_unblock_async_io): ... it. New function.
3218 (enable_async_io): Don't install SIGIO handler. Unblock it
3220 (disable_async_io): Don't ignore SIGIO. Block it instead.
3221 (initialize_async_io): Install SIGIO handler. Don't call
3224 2016-01-26 Yao Qi <yao.qi@linaro.org>
3226 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3227 first character is '\003', call *the_target->request_interrupt.
3229 2016-01-25 Yao Qi <yao.qi@linaro.org>
3231 * remote-utils.c (new_thread_notify): Remove.
3232 (dead_thread_notify): Likewise.
3233 * remote-utils.h (new_thread_notify): Remove declaration.
3234 (dead_thread_notify): Likewise.
3236 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3238 * gdb.trace/pending.exp: Fix expected message on continue.
3240 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3242 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3243 it works properly on big-endian machines where sizeof (CORE_ADDR)
3246 2016-01-21 Pedro Alves <palves@redhat.com>
3248 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3249 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3250 * configure: Regenerate.
3252 2016-01-21 Yao Qi <yao.qi@linaro.org>
3254 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3255 is_thumb and set it according to CPSR saved on the stack.
3256 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3257 arm_sigreturn_next_pc.
3259 2016-01-18 Yao Qi <yao.qi@linaro.org>
3261 * linux-low.c (linux_set_pc_64bit): New function.
3262 (linux_get_pc_64bit): New function.
3263 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3265 * linux-sparc-low.c (debug_threads): Remove declaration.
3266 (sparc_get_pc): Remove.
3267 (the_low_target): Use linux_get_pc_64bit instead of
3269 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3270 (the_low_target): Use linux_get_pc_64bit and
3273 2016-01-18 Yao Qi <yao.qi@linaro.org>
3275 * linux-arm-low.c (debug_threads): Remove declaration.
3276 (arm_get_pc, arm_set_pc): Remove.
3277 (the_low_target): Use linux_get_pc_32bit and
3279 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3280 (the_low_target): Use linux_get_pc_32bit and
3282 * linux-cris-low.c (debug_threads): Remove declaration.
3283 (cris_get_pc, cris_set_pc,): Remove.
3284 (the_low_target): Use linux_get_pc_32bit and
3286 * linux-crisv32-low.c (debug_threads): Remove declaration.
3287 (cris_get_pc, cris_set_pc): Remove.
3288 (the_low_target): Use linux_get_pc_32bit and
3290 * linux-low.c: Include inttypes.h.
3291 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3292 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3293 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3294 (the_low_target): Use linux_get_pc_32bit and
3296 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3297 (the_low_target): Use linux_get_pc_32bit and
3299 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3300 (the_low_target): Use linux_get_pc_32bit and
3302 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3303 (the_low_target): Use linux_get_pc_32bit and
3305 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3306 (the_low_target): Use linux_get_pc_32bit and
3309 2016-01-18 Gary Benson <gbenson@redhat.com>
3311 * configure.ac (AC_FUNC_FORK): New check.
3312 * config.in: Regenerate.
3313 * configure: Likewise.
3315 2016-01-14 Yao Qi <yao.qi@linaro.org>
3317 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3318 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3319 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3320 arm_get_next_pcs_ctor.
3322 2016-01-12 Josh Stone <jistone@redhat.com>
3323 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3325 * inferiors.h: Include "gdb_vecs.h".
3326 (struct process_info): Add syscalls_to_catch.
3327 * inferiors.c (remove_process): Free syscalls_to_catch.
3328 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3329 syscall_return stops.
3330 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3331 * server.c (handle_general_set): Handle QCatchSyscalls.
3332 (handle_query): Report support for QCatchSyscalls.
3333 * target.h (struct target_ops): Add supports_catch_syscall.
3334 (target_supports_catch_syscall): New macro.
3335 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3336 (struct lwp_info): Add syscall_state.
3337 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3338 Maintain syscall_state and syscalls_to_catch across exec.
3339 (get_syscall_trapinfo): New function, proxy to the_low_target.
3340 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3341 (linux_low_filter_event): Toggle syscall_state entry/return for
3342 syscall traps, and set it ignored for all others.
3343 (gdb_catching_syscalls_p): New function.
3344 (gdb_catch_this_syscall_p): New function.
3345 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3346 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3347 (linux_supports_catch_syscall): New function.
3348 (linux_target_ops): Install it.
3349 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3350 (the_low_target): Install it.
3352 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3354 * acinclude.m4: Include new ../warning.m4 file.
3355 * configure: Regenerated.
3356 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3358 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3360 * ax.c (is_goto_target): Mark static.
3361 * linux-low.c (register_addr): Likewise.
3362 (linux_fetch_registers, linux_store_registers): Likewise.
3363 * mem-break.c (any_persistent_commands): Fix old prototype.
3364 (add_commands_to_breakpoint): Mark static.
3365 * regcache.c (find_register_by_name): Delete unused func.
3366 * remote-utils.c (hex_or_minus_one): Mark static.
3367 * server.c (monitor_show_help): Mark static.
3368 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3369 handle_v_requests): Likewise.
3371 2016-01-12 Pedro Alves <palves@redhat.com>
3373 Remove use of the registered trademark symbol throughout.
3375 2016-01-08 Yao Qi <yao.qi@linaro.org>
3377 * remote-utils.c (getpkt): If c is '\003', call target hook
3380 2016-01-06 Yao Qi <yao.qi@linaro.org>
3382 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3383 linux-aarch32-low.c.
3384 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3385 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3386 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3387 (thumb2_breakpoint): Declare.
3388 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3389 linux-aarch32-low.h.
3390 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3391 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3392 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3394 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3396 * gdbreplay.c (gdbreplay_version): Change copyright year in
3398 * server.c (gdbserver_version): Likewise.
3400 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3402 * server.c (crc32_table): Delete.
3403 (crc32): Use libiberty's xcrc32 function.
3405 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3407 * lynx-low.c (lynx_delete_thread_callback): New function.
3408 (lynx_mourn): Properly delete our process and all of its
3409 threads. Remove call to clear_inferiors.
3411 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3413 * target.c (thread_search_callback): Add check that
3414 the thread_stopped target callback is not NULL before
3417 2015-12-21 Yao Qi <yao.qi@linaro.org>
3419 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3422 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3424 * server.c (handle_query): Call target_supports_software_single_step.
3426 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3428 * linux-low.c (single_step): New function.
3429 (linux_resume_one_lwp_throw): Call single_step.
3430 (start_step_over): Likewise.
3432 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3434 * Makefile.in (SFILES): Append arch/arm-linux.c,
3435 arch/arm-get-next-pcs.c.
3436 (arm-linux.o): New rule.
3437 (arm-get-next-pcs.o): New rule.
3438 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3440 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3441 to linux-aarch32-low.c.
3442 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3443 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3444 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3445 (thumb2_breakpoint_len): Likewise.
3446 (arm_is_thumb_mode): Make non-static.
3447 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3448 from linux-aarch32-low.c.
3449 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3450 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3451 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3452 (thumb2_breakpoint_len): Likewise.
3453 (arm_is_thumb_mode): New declaration.
3454 * linux-arm-low.c: Include arch/arm-linux.h
3455 aarch/arm-get-next-pcs.h, sys/syscall.h.
3456 (get_next_pcs_ops): New struct.
3457 (get_next_pcs_addr_bits_remove): New function.
3458 (get_next_pcs_is_thumb): New function.
3459 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3460 (arm_sigreturn_next_pc): Likewise.
3461 (get_next_pcs_syscall_next_pc): Likewise.
3462 (arm_gdbserver_get_next_pcs): Likewise.
3463 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3465 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3466 * server.h: Include gdb_vecs.h.
3468 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3470 * Makefile.in (SFILES): Append common/common-regcache.c.
3471 (OBS): Append common-regcache.o.
3472 (common-regcache.o): New rule.
3473 * regcache.c (init_register_cache): Initialize cache to
3475 (regcache_raw_read_unsigned): New function.
3476 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3477 register_status enum.
3479 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3481 * linux-aarch64-low.c (the_low_targets): Rename
3482 breakpoint_reinsert_addr to get_next_pcs.
3483 * linux-arm-low.c (the_low_targets): Likewise.
3484 * linux-bfin-low.c (the_low_targets): Likewise.
3485 * linux-cris-low.c (the_low_targets): Likewise.
3486 * linux-crisv32-low.c (the_low_targets): Likewise.
3487 * linux-low.c (can_software_single_step): Likewise.
3488 (install_software_single_step_breakpoints): New function.
3489 (start_step_over): Use install_software_single_step_breakpoints.
3490 * linux-low.h: New CORE_ADDR vector.
3491 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3493 * linux-mips-low.c (the_low_targets): Likewise.
3494 * linux-nios2-low.c (the_low_targets): Likewise.
3495 * linux-sparc-low.c (the_low_targets): Likewise.
3497 2015-12-17 Pedro Alves <palves@redhat.com>
3499 * linux-low.c (linux_kill_one_lwp): Remove references to
3501 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3503 (linux_init_signals): Delete.
3504 (initialize_low): Adjust.
3505 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3507 2015-12-16 Pedro Alves <palves@redhat.com>
3509 * configure.ac (compiler warning flags): When testing a
3510 -Wno-foo option, check whether -Wfoo works instead.
3511 * configure: Regenerate.
3513 2015-12-11 Don Breazeal <donb@codesourcery.com>
3515 * server.c (process_serial_event): Don't exit from gdbserver
3516 in remote mode if there are still active inferiors.
3518 2015-12-11 Yao Qi <yao.qi@linaro.org>
3520 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3521 arm_breakpoint_at if the process is 32-bit.
3523 2015-12-11 Yao Qi <yao.qi@linaro.org>
3525 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3528 2015-12-07 Yao Qi <yao.qi@linaro.org>
3530 * configure.srv: Append arm.o to srv_tgtobj for
3531 aarch64*-*-linux* target.
3532 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3533 from linux-arm-low.c.
3534 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3535 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3536 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3537 (thumb2_breakpoint_len): Likewise.
3538 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3539 (arm_breakpoint_kinds): Likewise.
3540 (arm_breakpoint_kind_from_pc): Likewise.
3541 (arm_sw_breakpoint_from_kind): Likewise.
3542 (arm_breakpoint_kind_from_current_state): Likewise.
3543 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3544 (arm_sw_breakpoint_from_kind): Declare.
3545 (arm_breakpoint_kind_from_current_state): Declare.
3546 (arm_breakpoint_at): Declare.
3547 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3548 arm_sw_breakpoint_from_kind if process is 32-bit.
3549 (aarch64_breakpoint_kind_from_pc): New function.
3550 (aarch64_breakpoint_kind_from_current_state): New function.
3551 (the_low_target): Initialize fields breakpoint_kind_from_pc
3552 and breakpoint_kind_from_current_state.
3553 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3554 linux-aarch32-low.c.
3555 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3556 (arm_breakpoint, arm_breakpoint_len): Likewise.
3557 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3558 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3559 (arm_is_thumb_mode): Likewise.
3560 (arm_breakpoint_at): Likewise.
3561 (arm_breakpoint_kind_from_pc): Likewise.
3562 (arm_sw_breakpoint_from_kind): Likewise.
3563 (arm_breakpoint_kind_from_current_state): Likewise.
3566 2015-08-04 Yao Qi <yao.qi@linaro.org>
3568 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3569 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3570 * server.c (extended_protocol): Remove "static".
3571 * server.h (extended_protocol): Declare it.
3573 2015-12-04 Josh Stone <jistone@redhat.com>
3575 * target.h (struct target_ops) <arch_setup>: Rename to ...
3576 (struct target_ops) <post_create_inferior>: ... this.
3577 (target_arch_setup): Rename to ...
3578 (target_post_create_inferior): ... this, calling post_create_inferior.
3579 * server.c (start_inferior): Update target_arch_setup calls to
3580 target_post_create_inferior.
3581 * linux-low.c (linux_low_ptrace_options): Forward declare.
3582 (linux_arch_setup): Update its comment for general use.
3583 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3584 (struct linux_target_ops): Use linux_post_create_inferior.
3585 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3586 to post_create_inferior.
3587 * nto-low.c (struct nto_target_ops): Likewise.
3588 * spu-low.c (struct spu_target_ops): Likewise.
3589 * win32-low.c (struct win32_target_ops): Likewise.
3591 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3593 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3595 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3597 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3598 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3599 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3600 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3601 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3602 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3603 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3604 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3605 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3606 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3607 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3608 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3610 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3612 * linux-low.c (linux_look_up_symbols): Don't call
3613 linux_supports_traceclone.
3614 * linux-low.h (thread_db_init): Remove use_events argument.
3615 * thread-db.c (thread_db_use_event): Remove global variable.
3616 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3617 (struct thread_db) <td_create_bp>: Remove field.
3618 (thread_db_create_event): Remove function.
3619 (thread_db_enable_reporting): Likewise.
3620 (find_one_thread): Don't check for thread_db_use_events.
3621 (attach_thread): Likewise.
3622 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3623 (try_thread_db_load_1): Don't check for thread_db_use_events.
3624 (thread_db_init): Remove use_events argument and thread events
3626 (remove_thread_event_breakpoints): Remove function.
3627 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3629 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3631 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3633 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3634 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3635 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3636 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3637 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3639 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3641 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3642 * linux-low.c (can_hardware_single_step): Use
3643 supports_hardware_single_step.
3644 (can_software_single_step): New function.
3645 (start_step_over): Call can_software_single_step.
3646 (linux_supports_hardware_single_step): New function.
3647 (struct target_ops) <supports_software_single_step>: Initialize.
3648 * linux-low.h (struct linux_target_ops)
3649 <supports_hardware_single_step>: Initialize.
3650 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3651 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3652 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3653 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3654 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3655 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3656 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3657 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3658 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3659 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3661 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3662 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3664 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3665 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3666 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3668 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3669 * target.h (struct target_ops): <supports_software_single_step>:
3671 (target_supports_software_single_step): New macro.
3673 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3675 * linux-low.c (linux_wait_1): Fix pc advance condition.
3676 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3677 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3679 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3681 * linux-arm-low.c (arm_is_thumb_mode): New function.
3682 (arm_breakpoint_at): Use arm_is_thumb_mode.
3683 (arm_breakpoint_kind_from_current_state): New function.
3684 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3686 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3687 (linux_breakpoint_kind_from_current_state): New function.
3688 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3689 * linux-low.h (struct linux_target_ops)
3690 <breakpoint_kind_from_current_state>: New field.
3691 * target.h (struct target_ops): Likewise.
3692 (target_breakpoint_kind_from_current_state): New macro.
3694 2015-11-30 Pedro Alves <palves@redhat.com>
3696 * linux-low.c (linux_resume): Wake up the event loop before
3699 2015-11-30 Pedro Alves <palves@redhat.com>
3701 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3703 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3705 * target.c (struct thread_search): New structure.
3706 (thread_search_callback): New function.
3707 (prev_general_thread): New global.
3708 (prepare_to_access_memory, done_accessing_memory): New functions.
3709 * target.h (prepare_to_access_memory, done_accessing_memory):
3710 Replace macros with function declarations.
3712 2015-11-30 Pedro Alves <palves@redhat.com>
3715 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3716 report TARGET_WAITKIND_NO_RESUMED.
3717 * remote-utils.c (prepare_resume_reply): Handle
3718 TARGET_WAITKIND_NO_RESUMED.
3719 * server.c (report_no_resumed): New global.
3720 (handle_query) <qSupported>: Handle "no-resumed+". Report
3721 "no-resumed+" support.
3722 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3723 return error if the client doesn't support no-resumed events.
3724 (push_stop_notification): New function.
3725 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3726 events if the client supports them.
3728 2015-11-30 Pedro Alves <palves@redhat.com>
3730 * linux-low.c (thread_still_has_status_pending_p): Don't check
3732 (lwp_resumed): New function.
3733 (status_pending_p_callback): Return early if the LWP is not
3734 supposed to be resumed.
3736 2015-11-30 Pedro Alves <palves@redhat.com>
3738 * linux-low.c (handle_extended_wait): Assert that the LWP's
3739 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3740 thread create events, leave the new child's status pending.
3741 (linux_low_filter_event): If GDB wants to hear about thread exit
3742 events, leave the LWP marked dead and don't delete it.
3743 (linux_wait_for_event_filtered): Don't check for thread exit.
3744 (filter_exit_event): New function.
3745 (linux_wait_1): Use it, when returning an exit event.
3746 (linux_resume_one_lwp_throw): Assert that the LWP's
3747 waitstatus is TARGET_WAITKIND_IGNORE.
3748 * remote-utils.c (prepare_resume_reply): Handle
3749 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3750 * server.c (report_thread_events): New global.
3751 (handle_general_set): Handle QThreadEvents.
3752 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3753 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3754 TARGET_WAITKIND_THREAD_EXITED.
3755 * server.h (report_thread_events): Declare.
3757 2015-11-30 Pedro Alves <palves@redhat.com>
3759 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3760 the thread's last_resume_kind was resume_stop.
3762 2015-11-30 Pedro Alves <palves@redhat.com>
3764 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3767 2015-11-30 Pedro Alves <palves@redhat.com>
3769 * server.c (handle_v_requests): Handle vCtrlC.
3771 2015-11-30 Pedro Alves <palves@redhat.com>
3773 * gdbthread.h (find_any_thread_of_pid): Declare.
3774 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3776 * server.c (handle_query): If current_thread is NULL, look for
3777 another thread of the selected process.
3779 2015-11-26 Daniel Colascione <dancol@dancol.org>
3780 Simon Marchi <simon.marchi@ericsson.com>
3782 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3783 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3785 * target.h (struct target_ops) <thread_name>: New field.
3786 (target_thread_name): New macro.
3788 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3790 * regcache.h (regcache_invalidate_pid): Add declaration.
3791 * regcache.c (regcache_invalidate_pid): New function, extracted
3792 from regcache_invalidate.
3793 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3794 Add trivial documentation comment.
3795 * lynx-low.c: Use regcache_invalidate_pid instead of
3796 regcache_invalidate.
3798 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3800 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3801 and Elf64_auxv_t if the target is Android.
3803 2015-11-22 Doug Evans <xdje42@gmail.com>
3805 * target.h: #include <sys/types.h>.
3807 2015-11-19 Pedro Alves <palves@redhat.com>
3809 * linux-low.c (linux_process_qsupported): Change prototype.
3811 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3813 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3814 and adjust to loop over all features.
3815 * server.c (handle_query) <qSupported>: Adjust to call
3816 target_process_qsupported once, passing it a vector of unprocessed
3818 * target.h (struct target_ops) <process_qsupported>: Change
3820 (target_process_qsupported): Adjust.
3822 2015-11-19 Pedro Alves <palves@redhat.com>
3824 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3826 * configure: Regenerate.
3828 2015-11-19 Pedro Alves <palves@redhat.com>
3830 * configure: Regenerate.
3832 2015-11-19 Yao Qi <yao.qi@linaro.org>
3834 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3837 2015-11-19 Yao Qi <yao.qi@linaro.org>
3839 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3840 (struct aarch64_operand): Move enum out.
3842 2015-11-19 Yao Qi <yao.qi@linaro.org>
3844 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3845 struct user_fpsimd_state *.
3846 (aarch64_store_fpregset): Likewise.
3848 2015-11-19 Yao Qi <yao.qi@linaro.org>
3850 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3851 struct user_pt_regs *.
3852 (aarch64_store_gregset): Likewise.
3854 2015-11-18 Pedro Alves <palves@redhat.com>
3856 * Makefile.in (all_object_files): Add $IPA_OBJS.
3858 2015-11-17 Pedro Alves <palves@redhat.com>
3860 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3861 GDB_SIGNAL_0 and gdb_signal_to_string.
3863 2015-11-17 Pedro Alves <palves@redhat.com>
3865 * win32-low.c (handle_output_debug_string): Remove parameter.
3866 (win32_kill): Remove our_status local and adjust call to
3867 handle_output_debug_string.
3868 (get_child_debug_event): Adjust call to
3869 handle_output_debug_string.
3871 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3873 * linux-mips-low.c (mips_fill_gregset): Add cast.
3874 (mips_store_gregset): Likewise.
3875 (mips_fill_fpregset): Likewise.
3876 (mips_store_fpregset): Likewise.
3878 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3880 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3883 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3885 * linux-mips-low.c (mips_linux_new_thread): Change type of
3886 watch_type to enum target_hw_bp_type.
3888 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3890 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3891 Change return type to arm_hwbp_type.
3893 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3895 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3896 (arm_store_gregset): Likewise.
3897 * linux-arm-low.c (arm_get_hwcap): Likewise.
3898 (arm_read_description): Likewise.
3900 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3902 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3904 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3906 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3907 (ppc_fill_vsxregset): Likewise.
3908 (ppc_store_vsxregset): Likewise.
3909 (ppc_fill_vrregset): Likewise.
3910 (ppc_store_vrregset): Likewise.
3911 (ppc_fill_evrregset): Likewise.
3912 (ppc_store_evrregset): Likewise.
3914 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3916 * linux-ppc-low.c (ppc_usrregs_info): Remove
3917 forward-declaration.
3918 (ppc_arch_setup): Move lower in file.
3920 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3922 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3923 (ps_pdwrite): Likewise.
3925 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3927 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3928 to after assert checks.
3930 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3932 * proc-service.c (ps_pdread): Add/adjust casts.
3933 (ps_pdwrite): Add/adjust casts.
3935 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3937 * server.c (handle_search_memory_1): Cast return value of
3940 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3942 * server.c (write_qxfer_response): Change type of data to
3945 2015-10-29 Pedro Alves <palves@redhat.com>
3947 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3949 2015-10-29 Pedro Alves <palves@redhat.com>
3951 * tracepoint.c (clear_installed_tracepoints): Add casts.
3953 2015-10-29 Pedro Alves <palves@redhat.com>
3955 * server.c (handle_v_cont, process_serial_event): Add enum
3956 gdb_signal casts to signal parsing code.
3958 2015-10-29 Pedro Alves <palves@redhat.com>
3960 * linux-low.h (NULL_REGSET): Define.
3961 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3962 * linux-arm-low.c (arm_regsets): Likewise.
3963 * linux-crisv32-low.c (cris_regsets): Likewise.
3964 * linux-m68k-low.c (m68k_regsets): Likewise.
3965 * linux-mips-low.c (mips_regsets): Likewise.
3966 * linux-nios2-low.c (nios2_regsets): Likewise.
3967 * linux-ppc-low.c (ppc_regsets): Likewise.
3968 * linux-s390-low.c (s390_regsets): Likewise.
3969 * linux-sh-low.c (sh_regsets): Likewise.
3970 * linux-sparc-low.c (sparc_regsets): Likewise.
3971 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3972 * linux-tile-low.c (tile_regsets): Likewise.
3973 * linux-x86-low.c (x86_regsets): Likewise.
3974 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3976 2015-10-29 Pedro Alves <palves@redhat.com>
3978 * linux-low.h (NULL_REGSET): Define.
3979 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3980 * linux-arm-low.c (arm_regsets): Likewise.
3981 * linux-crisv32-low.c (cris_regsets): Likewise.
3982 * linux-m68k-low.c (m68k_regsets): Likewise.
3983 * linux-mips-low.c (mips_regsets): Likewise.
3984 * linux-nios2-low.c (nios2_regsets): Likewise.
3985 * linux-ppc-low.c (ppc_regsets): Likewise.
3986 * linux-s390-low.c (s390_regsets): Likewise.
3987 * linux-sh-low.c (sh_regsets): Likewise.
3988 * linux-sparc-low.c (sparc_regsets): Likewise.
3989 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3990 * linux-tile-low.c (tile_regsets): Likewise.
3991 * linux-x86-low.c (x86_regsets): Likewise.
3992 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3994 2015-10-26 Doug Evans <dje@google.com>
3996 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3998 2015-10-26 Doug Evans <dje@google.com>
4000 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4002 2015-10-26 Doug Evans <dje@google.com>
4004 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4006 (attach_thread, find_new_threads_callback): Ditto.
4008 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4010 * mem-break.h (set_breakpoint_data): Remove.
4012 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4014 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4015 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4016 (initialize_low): Remove set_breakpoint_data call.
4017 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4018 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4019 (initialize_low): Remove set_breakpoint_data call.
4020 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4021 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4022 (initialize_low): Remove set_breakpoint_data call.
4024 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4026 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4027 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4028 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4029 * target.h (target_breakpoint_kind_from_pc): New macro.
4031 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4033 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4034 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4035 the default breakpoint kind.
4037 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4039 * linux-arm-low.c (arm_supports_z_point_type): Add software
4042 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4044 * linux-arm-low.c: Refactor breakpoint definitions.
4045 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4046 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4048 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4050 * Makefile.in: Add arm.c/o.
4051 * configure.srv: Likewise.
4052 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4053 (arm_breakpoint_kind_from_pc): New function.
4054 (arm_sw_breakpoint_from_kind): Return proper kind.
4055 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4057 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4059 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4061 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4062 (struct raw_breakpoint) <size>: Remove.
4063 (struct raw_breakpoint) <kind>: Add.
4064 (bp_size): New function.
4065 (bp_opcode): Likewise.
4066 (find_raw_breakpoint_at): Adjust for kind.
4067 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4068 (remove_memory_breakpoint): Adjust for kind call bp_size.
4069 (set_raw_breakpoint_at): Adjust for kind.
4070 (set_breakpoint): Likewise.
4071 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4072 (delete_raw_breakpoint): Adjust for kind.
4073 (delete_breakpoint): Likewise.
4074 (find_gdb_breakpoint): Likewise.
4075 (set_gdb_breakpoint_1): Likewise.
4076 (set_gdb_breakpoint): Likewise.
4077 (delete_gdb_breakpoint_1): Likewise.
4078 (delete_gdb_breakpoint): Likewise.
4079 (uninsert_raw_breakpoint): Likewise.
4080 (reinsert_raw_breakpoint): Likewise.
4081 (set_breakpoint_data): Remove.
4082 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4083 (check_mem_read): Adjust for kind call bp_size.
4084 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4085 (clone_one_breakpoint): Adjust for kind.
4086 * mem-break.h (set_gdb_breakpoint): Likewise.
4087 (delete_gdb_breakpoint): Likewise.
4088 * server.c (process_serial_event): Likewise.
4090 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4092 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4093 (struct linux_target_ops) <breakpoint>: Remove.
4094 (struct linux_target_ops) <breakpoint_len>: Remove.
4095 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4096 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4097 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4098 (arm_sw_breakpoint_from_kind): New function.
4099 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4100 (struct linux_target_ops) <breakpoint>: Remove.
4101 (struct linux_target_ops) <breakpoint_len>: Remove.
4102 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4103 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4104 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4105 (struct linux_target_ops) <breakpoint>: Remove.
4106 (struct linux_target_ops) <breakpoint_len>: Remove.
4107 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4108 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4109 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4110 (struct linux_target_ops) <breakpoint>: Remove.
4111 (struct linux_target_ops) <breakpoint_len>: Remove.
4112 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4113 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4114 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4115 and sw_breakpoint_from_kind to increment the pc.
4116 (linux_breakpoint_kind_from_pc): New function.
4117 (linux_sw_breakpoint_from_kind): New function.
4118 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4119 (initialize_low): Call breakpoint_kind_from_pc and
4120 sw_breakpoint_from_kind to replace breakpoint_data/len.
4121 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4123 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4124 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4125 (struct linux_target_ops) <breakpoint>: Remove.
4126 (struct linux_target_ops) <breakpoint_len>: Remove.
4127 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4128 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4129 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4130 (struct linux_target_ops) <breakpoint>: Remove.
4131 (struct linux_target_ops) <breakpoint_len>: Remove.
4132 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4133 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4134 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4135 (struct linux_target_ops) <breakpoint>: Remove.
4136 (struct linux_target_ops) <breakpoint_len>: Remove.
4137 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4138 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4139 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4140 (struct linux_target_ops) <breakpoint>: Remove.
4141 (struct linux_target_ops) <breakpoint_len>: Remove.
4142 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4143 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4144 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4145 (struct linux_target_ops) <breakpoint>: Remove.
4146 (struct linux_target_ops) <breakpoint_len>: Remove.
4147 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4148 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4149 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4150 (struct linux_target_ops) <breakpoint>: Remove.
4151 (struct linux_target_ops) <breakpoint_len>: Remove.
4152 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4153 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4154 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4155 (struct linux_target_ops) <breakpoint>: Remove.
4156 (struct linux_target_ops) <breakpoint_len>: Remove.
4157 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4158 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4159 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4160 (struct linux_target_ops) <breakpoint>: Remove.
4161 (struct linux_target_ops) <breakpoint_len>: Remove.
4162 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4163 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4164 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4165 (struct linux_target_ops) <breakpoint>: Remove.
4166 (struct linux_target_ops) <breakpoint_len>: Remove.
4167 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4168 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4169 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4170 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4171 (struct linux_target_ops) <breakpoint>: Remove.
4172 (struct linux_target_ops) <breakpoint_len>: Remove.
4173 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4174 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4175 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4176 (struct linux_target_ops) <breakpoint>: Remove.
4177 (struct linux_target_ops) <breakpoint_len>: Remove.
4178 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4179 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4181 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4183 * linux-cris-low.c (cris_get_pc): Remove void arg.
4185 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4187 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4190 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4192 * inferiors.c (thread_pid_matches_callback): New function.
4193 (find_thread_process): New function.
4194 (remove_thread): Reset current_thread.
4195 (remove_process): Assert threads have been removed first.
4197 2015-10-15 Yao Qi <yao.qi@linaro.org>
4199 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4201 (aarch64_remove_point): Likewise.
4202 * regcache.c (regcache_register_size): New function.
4204 2015-10-12 Yao Qi <yao.qi@linaro.org>
4206 * linux-aarch64-low.c: Update all callers as emit_load_store
4207 is renamed to aarch64_emit_load_store.
4209 2015-10-12 Yao Qi <yao.qi@linaro.org>
4211 * linux-aarch64-low.c: Update all callers of function renaming
4212 from emit_insn to aarch64_emit_insn.
4214 2015-10-12 Yao Qi <yao.qi@linaro.org>
4216 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4217 arch/aarch64-insn.h.
4218 (struct aarch64_memory_operand): Likewise.
4220 (emit_insn): Move to arch/aarch64-insn.c.
4221 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4222 (emit_load_store): Move to arch/aarch64-insn.c.
4223 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4224 (can_encode_int32): Remove.
4226 2015-10-12 Yao Qi <yao.qi@linaro.org>
4228 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4229 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4230 (aarch64_relocate_instruction): Likewise.
4231 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4232 (struct aarch64_insn_visitor): Likewise.
4234 2015-10-12 Yao Qi <yao.qi@linaro.org>
4236 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4237 (struct aarch64_insn_visitor): New.
4238 (struct aarch64_insn_relocation_data): New.
4239 (aarch64_ftrace_insn_reloc_b): New function.
4240 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4241 (aarch64_ftrace_insn_reloc_cb): Likewise.
4242 (aarch64_ftrace_insn_reloc_tb): Likewise.
4243 (aarch64_ftrace_insn_reloc_adr): Likewise.
4244 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4245 (aarch64_ftrace_insn_reloc_others): Likewise.
4247 (aarch64_relocate_instruction): Use visitor.
4249 2015-10-12 Yao Qi <yao.qi@linaro.org>
4251 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4252 int. Add argument buf.
4253 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4254 aarch64_relocate_instruction.
4256 2015-10-12 Yao Qi <yao.qi@linaro.org>
4258 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4259 argument insn. Remove local variable insn. Don't call
4261 (aarch64_install_fast_tracepoint_jump_pad): Call
4264 2015-09-30 Yao Qi <yao.qi@linaro.org>
4266 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4267 (emit_load_store_pair): Likewise.
4269 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4271 * dll.c (match_dll): Add cast(s).
4272 (unloaded_dll): Likewise.
4273 * linux-low.c (second_thread_of_pid_p): Likewise.
4274 (delete_lwp_callback): Likewise.
4275 (count_events_callback): Likewise.
4276 (select_event_lwp_callback): Likewise.
4277 (linux_set_resume_request): Likewise.
4278 * server.c (accumulate_file_name_length): Likewise.
4279 (emit_dll_description): Likewise.
4280 (handle_qxfer_threads_worker): Likewise.
4281 (visit_actioned_threads): Likewise.
4282 * thread-db.c (any_thread_of): Likewise.
4283 * tracepoint.c (same_process_p): Likewise.
4284 (match_blocktype): Likewise.
4285 (build_traceframe_info_xml): Likewise.
4287 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4289 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4291 (gdb_unparse_agent_expr): Likewise.
4292 * hostio.c (require_data): Likewise.
4293 (handle_pread): Likewise.
4294 * linux-low.c (disable_regset): Likewise.
4295 (fetch_register): Likewise.
4296 (store_register): Likewise.
4297 (get_dynamic): Likewise.
4298 (linux_qxfer_libraries_svr4): Likewise.
4299 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4300 (set_fast_tracepoint_jump): Likewise.
4301 (uninsert_fast_tracepoint_jumps_at): Likewise.
4302 (reinsert_fast_tracepoint_jumps_at): Likewise.
4303 (validate_inserted_breakpoint): Likewise.
4304 (clone_agent_expr): Likewise.
4305 * regcache.c (init_register_cache): Likewise.
4306 * remote-utils.c (putpkt_binary_1): Likewise.
4307 (decode_M_packet): Likewise.
4308 (decode_X_packet): Likewise.
4309 (look_up_one_symbol): Likewise.
4310 (relocate_instruction): Likewise.
4311 (monitor_output): Likewise.
4312 * server.c (handle_search_memory): Likewise.
4313 (handle_qxfer_exec_file): Likewise.
4314 (handle_qxfer_libraries): Likewise.
4315 (handle_qxfer): Likewise.
4316 (handle_query): Likewise.
4317 (handle_v_cont): Likewise.
4318 (handle_v_run): Likewise.
4319 (captured_main): Likewise.
4320 * target.c (write_inferior_memory): Likewise.
4321 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4322 * tracepoint.c (init_trace_buffer): Likewise.
4323 (add_tracepoint_action): Likewise.
4324 (add_traceframe): Likewise.
4325 (add_traceframe_block): Likewise.
4326 (cmd_qtdpsrc): Likewise.
4327 (cmd_qtdv): Likewise.
4328 (cmd_qtstatus): Likewise.
4329 (response_source): Likewise.
4330 (response_tsv): Likewise.
4331 (cmd_qtnotes): Likewise.
4332 (gdb_collect): Likewise.
4333 (initialize_tracepoint): Likewise.
4335 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4337 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4338 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4339 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4341 (enum aarch64_condition_codes): New enum.
4342 (w0): New static global.
4345 (struct aarch64_memory_operand) <type>: New
4346 MEMORY_OPERAND_POSTINDEX type.
4347 (postindex_memory_operand): New helper function.
4348 (emit_ret): New function.
4349 (emit_load_store_pair): New function, factored out of emit_stp
4350 with support for MEMORY_OPERAND_POSTINDEX.
4351 (emit_stp): Rewrite using emit_load_store_pair.
4352 (emit_ldp): New function.
4353 (emit_load_store): Likewise.
4354 (emit_ldr): Mention post-index instruction in comment.
4355 (emit_ldrh): New function.
4356 (emit_ldrb): New function.
4357 (emit_ldrsw): Mention post-index instruction in comment.
4358 (emit_str): Likewise.
4359 (emit_subs): New function.
4360 (emit_cmp): Likewise.
4361 (emit_and): Likewise.
4362 (emit_orr): Likewise.
4363 (emit_orn): Likewise.
4364 (emit_eor): Likewise.
4365 (emit_mvn): Likewise.
4366 (emit_lslv): Likewise.
4367 (emit_lsrv): Likewise.
4368 (emit_asrv): Likewise.
4369 (emit_mul): Likewise.
4370 (emit_sbfm): Likewise.
4371 (emit_sbfx): Likewise.
4372 (emit_ubfm): Likewise.
4373 (emit_ubfx): Likewise.
4374 (emit_csinc): Likewise.
4375 (emit_cset): Likewise.
4376 (emit_nop): Likewise.
4377 (emit_ops_insns): New helper function.
4378 (emit_pop): Likewise.
4379 (emit_push): Likewise.
4380 (aarch64_emit_prologue): New function.
4381 (aarch64_emit_epilogue): Likewise.
4382 (aarch64_emit_add): Likewise.
4383 (aarch64_emit_sub): Likewise.
4384 (aarch64_emit_mul): Likewise.
4385 (aarch64_emit_lsh): Likewise.
4386 (aarch64_emit_rsh_signed): Likewise.
4387 (aarch64_emit_rsh_unsigned): Likewise.
4388 (aarch64_emit_ext): Likewise.
4389 (aarch64_emit_log_not): Likewise.
4390 (aarch64_emit_bit_and): Likewise.
4391 (aarch64_emit_bit_or): Likewise.
4392 (aarch64_emit_bit_xor): Likewise.
4393 (aarch64_emit_bit_not): Likewise.
4394 (aarch64_emit_equal): Likewise.
4395 (aarch64_emit_less_signed): Likewise.
4396 (aarch64_emit_less_unsigned): Likewise.
4397 (aarch64_emit_ref): Likewise.
4398 (aarch64_emit_if_goto): Likewise.
4399 (aarch64_emit_goto): Likewise.
4400 (aarch64_write_goto_address): Likewise.
4401 (aarch64_emit_const): Likewise.
4402 (aarch64_emit_call): Likewise.
4403 (aarch64_emit_reg): Likewise.
4404 (aarch64_emit_pop): Likewise.
4405 (aarch64_emit_stack_flush): Likewise.
4406 (aarch64_emit_zero_ext): Likewise.
4407 (aarch64_emit_swap): Likewise.
4408 (aarch64_emit_stack_adjust): Likewise.
4409 (aarch64_emit_int_call_1): Likewise.
4410 (aarch64_emit_void_call_2): Likewise.
4411 (aarch64_emit_eq_goto): Likewise.
4412 (aarch64_emit_ne_goto): Likewise.
4413 (aarch64_emit_lt_goto): Likewise.
4414 (aarch64_emit_le_goto): Likewise.
4415 (aarch64_emit_gt_goto): Likewise.
4416 (aarch64_emit_ge_got): Likewise.
4417 (aarch64_emit_ops_impl): New static global variable.
4418 (aarch64_emit_ops): New target function, return
4419 &aarch64_emit_ops_impl.
4420 (struct linux_target_ops): Install it.
4422 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4424 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4425 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4427 * linux-aarch64-ipa.c: New file.
4428 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4430 (aarch64_get_thread_area): New target method.
4431 (extract_signed_bitfield): New helper function.
4432 (aarch64_decode_ldr_literal): New function.
4433 (enum aarch64_opcodes): New enum.
4434 (struct aarch64_register): New struct.
4435 (struct aarch64_operand): New struct.
4436 (x0): New static global.
4445 (aarch64_register): New helper function.
4446 (register_operand): Likewise.
4447 (immediate_operand): Likewise.
4448 (struct aarch64_memory_operand): New struct.
4449 (offset_memory_operand): New helper function.
4450 (preindex_memory_operand): Likewise.
4451 (enum aarch64_system_control_registers): New enum.
4452 (ENCODE): New macro.
4453 (emit_insn): New helper function.
4454 (emit_b): New function.
4455 (emit_bcond): Likewise.
4456 (emit_cb): Likewise.
4457 (emit_tb): Likewise.
4458 (emit_blr): Likewise.
4459 (emit_stp): Likewise.
4460 (emit_ldp_q_offset): Likewise.
4461 (emit_stp_q_offset): Likewise.
4462 (emit_load_store): Likewise.
4463 (emit_ldr): Likewise.
4464 (emit_ldrsw): Likewise.
4465 (emit_str): Likewise.
4466 (emit_ldaxr): Likewise.
4467 (emit_stxr): Likewise.
4468 (emit_stlr): Likewise.
4469 (emit_data_processing_reg): Likewise.
4470 (emit_data_processing): Likewise.
4471 (emit_add): Likewise.
4472 (emit_sub): Likewise.
4473 (emit_mov): Likewise.
4474 (emit_movk): Likewise.
4475 (emit_mov_addr): Likewise.
4476 (emit_mrs): Likewise.
4477 (emit_msr): Likewise.
4478 (emit_sevl): Likewise.
4479 (emit_wfe): Likewise.
4480 (append_insns): Likewise.
4481 (can_encode_int32_in): New helper function.
4482 (aarch64_relocate_instruction): New function.
4483 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4484 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4485 (struct linux_target_ops): Install aarch64_get_thread_area,
4486 aarch64_install_fast_tracepoint_jump_pad and
4487 aarch64_get_min_fast_tracepoint_insn_len.
4489 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4491 * Makefile.in (aarch64-insn.o): New rule.
4492 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4494 2015-09-21 Yao Qi <yao.qi@linaro.org>
4496 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4498 2015-09-21 Yao Qi <yao.qi@linaro.org>
4500 * tracepoint.c (max_jump_pad_size): Remove.
4502 2015-09-18 Yao Qi <yao.qi@linaro.org>
4504 * linux-aarch64-low.c: Don't include sys/uio.h.
4505 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4507 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4509 * tracepoint.c (eval_result_type): Change prototype.
4510 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4512 2015-09-15 Pedro Alves <palves@redhat.com>
4514 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4515 Check whether to report exec events instead of checking whether
4516 multiprocess is enabled.
4518 2015-09-15 Pedro Alves <palves@redhat.com>
4521 * remote-utils.c (prepare_resume_reply): Merge
4522 TARGET_WAITKIND_VFORK_DONE switch case with the
4523 TARGET_WAITKIND_FORKED case.
4525 2015-09-15 Yao Qi <yao.qi@linaro.org>
4527 * server.c (handle_query): Check string comparison using
4528 "else if" instead of "if".
4530 2015-09-15 Yao Qi <yao.qi@linaro.org>
4532 * server.c (vCont_supported): New global variable.
4533 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4534 matches. Append ";vContSupported+" to own_buf.
4535 (handle_v_requests): Append ";s;S" to own_buf if target supports
4536 hardware single step or vCont_supported is false.
4537 (capture_main): Set vCont_supported to zero.
4539 2015-09-15 Yao Qi <yao.qi@linaro.org>
4541 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4543 (linux_supports_hardware_single_step): ... New function.
4544 (linux_target_ops): Update.
4545 * lynx-low.c (lynx_target_ops): Set field
4546 supports_hardware_single_step to target_can_do_hardware_single_step.
4547 * nto-low.c (nto_target_ops): Likewise.
4548 * spu-low.c (spu_target_ops): Likewise.
4549 * win32-low.c (win32_target_ops): Likewise.
4550 * target.c (target_can_do_hardware_single_step): New function.
4551 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4552 Remove. <supports_hardware_single_step>: New field.
4553 (target_supports_conditional_breakpoints): Remove.
4554 (target_supports_hardware_single_step): New macro.
4555 (target_can_do_hardware_single_step): Declare.
4556 * server.c (handle_query): Use target_supports_hardware_single_step
4557 instead of target_supports_conditional_breakpoints.
4559 2015-09-15 Yao Qi <yao.qi@linaro.org>
4561 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4563 (struct linux_target_ops the_low_target): Install
4564 aarch64_linux_siginfo_fixup.
4566 2015-09-11 Don Breazeal <donb@codesourcery.com>
4567 Luis Machado <lgustavo@codesourcery.com>
4569 * linux-low.c (linux_mourn): Static declaration.
4570 (linux_arch_setup): Move in front of
4571 handle_extended_wait.
4572 (linux_arch_setup_thread): New function.
4573 (handle_extended_wait): Handle exec events. Call
4574 linux_arch_setup_thread. Make event_lwp argument a
4575 pointer-to-a-pointer.
4576 (check_zombie_leaders): Do not check stopped threads.
4577 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4578 (linux_low_filter_event): Add lwp and thread for exec'ing
4579 non-leader thread if leader thread has been deleted.
4580 Refactor code into linux_arch_setup_thread and call it.
4581 Pass child lwp pointer by reference to handle_extended_wait.
4582 (linux_wait_for_event_filtered): Update comment.
4583 (linux_wait_1): Prevent clobbering exec event status.
4584 (linux_supports_exec_events): New function.
4585 (linux_target_ops) <supports_exec_events>: Initialize new member.
4586 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4588 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4589 * server.c (report_exec_events): New global variable.
4590 (handle_query): Handle qSupported query for exec-events feature.
4591 (captured_main): Initialize report_exec_events.
4592 * server.h (report_exec_events): Declare new global variable.
4593 * target.h (struct target_ops) <supports_exec_events>: New
4595 (target_supports_exec_events): New macro.
4596 * win32-low.c (win32_target_ops) <supports_exec_events>:
4597 Initialize new member.
4599 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4601 * linux-low.c (linux_low_enable_btrace): Remove.
4602 (linux_target_ops): Replace linux_low_enable_btrace with
4603 linux_enable_btrace.
4605 2015-09-03 Yao Qi <yao.qi@linaro.org>
4607 * linux-aarch64-low.c (aarch64_insert_point): Call
4608 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4611 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4613 * linux-low.c (check_stopped_by_breakpoint): Use
4614 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4616 2015-08-27 Pedro Alves <palves@redhat.com>
4618 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4620 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4622 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4623 the XNEW-family equivalent.
4624 (compile_bytecodes): Likewise.
4625 * dll.c (loaded_dll): Likewise.
4626 * event-loop.c (append_callback_event): Likewise.
4627 (create_file_handler): Likewise.
4628 (create_file_event): Likewise.
4629 * hostio.c (handle_open): Likewise.
4630 * inferiors.c (add_thread): Likewise.
4631 (add_process): Likewise.
4632 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4633 * linux-arm-low.c (arm_new_process): Likewise.
4634 (arm_new_thread): Likewise.
4635 * linux-low.c (add_to_pid_list): Likewise.
4636 (linux_add_process): Likewise.
4637 (handle_extended_wait): Likewise.
4638 (add_lwp): Likewise.
4639 (enqueue_one_deferred_signal): Likewise.
4640 (enqueue_pending_signal): Likewise.
4641 (linux_resume_one_lwp_throw): Likewise.
4642 (linux_resume_one_thread): Likewise.
4643 (linux_read_memory): Likewise.
4644 (linux_write_memory): Likewise.
4645 * linux-mips-low.c (mips_linux_new_process): Likewise.
4646 (mips_linux_new_thread): Likewise.
4647 (mips_add_watchpoint): Likewise.
4648 * linux-x86-low.c (initialize_low_arch): Likewise.
4649 * lynx-low.c (lynx_add_process): Likewise.
4650 * mem-break.c (set_raw_breakpoint_at): Likewise.
4651 (set_breakpoint): Likewise.
4652 (add_condition_to_breakpoint): Likewise.
4653 (add_commands_to_breakpoint): Likewise.
4654 (clone_agent_expr): Likewise.
4655 (clone_one_breakpoint): Likewise.
4656 * regcache.c (new_register_cache): Likewise.
4657 * remote-utils.c (look_up_one_symbol): Likewise.
4658 * server.c (queue_stop_reply): Likewise.
4659 (start_inferior): Likewise.
4660 (queue_stop_reply_callback): Likewise.
4661 (handle_target_event): Likewise.
4662 * spu-low.c (fetch_ppc_memory): Likewise.
4663 (store_ppc_memory): Likewise.
4664 * target.c (set_target_ops): Likewise.
4665 * thread-db.c (thread_db_load_search): Likewise.
4666 (try_thread_db_load_1): Likewise.
4667 * tracepoint.c (add_tracepoint): Likewise.
4668 (add_tracepoint_action): Likewise.
4669 (create_trace_state_variable): Likewise.
4670 (cmd_qtdpsrc): Likewise.
4671 (cmd_qtro): Likewise.
4672 (add_while_stepping_state): Likewise.
4673 * win32-low.c (child_add_thread): Likewise.
4674 (get_image_name): Likewise.
4676 2015-08-25 Yao Qi <yao.qi@linaro.org>
4678 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4680 2015-08-25 Yao Qi <yao.qi@linaro.org>
4682 * Makefile.in (aarch64-linux.o): New rule.
4683 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4685 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4686 (aarch64_init_debug_reg_state): Make it extern.
4687 (aarch64_linux_prepare_to_resume): Remove.
4689 2015-08-25 Yao Qi <yao.qi@linaro.org>
4691 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4692 lwp_arch_private_info and ptid_of_lwp.
4694 2015-08-25 Yao Qi <yao.qi@linaro.org>
4696 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4697 Find proc_info by find_process_pid. All callers updated.
4699 2015-08-25 Yao Qi <yao.qi@linaro.org>
4701 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4703 (debug_reg_change_callback): Remove.
4704 (aarch64_notify_debug_reg_change): Remove.
4706 2015-08-25 Yao Qi <yao.qi@linaro.org>
4708 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4709 Call current_lwp_ptid.
4711 2015-08-25 Yao Qi <yao.qi@linaro.org>
4713 * linux-aarch64-low.c (debug_reg_change_callback): Use
4716 2015-08-25 Yao Qi <yao.qi@linaro.org>
4718 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4720 2015-08-25 Yao Qi <yao.qi@linaro.org>
4722 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4724 2015-08-25 Yao Qi <yao.qi@linaro.org>
4726 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4729 2015-08-25 Yao Qi <yao.qi@linaro.org>
4731 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4733 (debug_reg_change_callback): Remove argument entry and add argument
4734 lwp. Remove local variable thread. Don't print thread id in the
4735 debugging output. Don't check whether pid of thread equals to pid.
4736 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4737 iterate_over_lwps instead find_inferior.
4739 2015-08-24 Pedro Alves <palves@redhat.com>
4741 * inferiors.c (get_first_process): New function.
4742 * inferiors.h (get_first_process): New declaration.
4743 * remote-utils.c (read_ptid): Default to the first process in the
4744 list, instead of to the current thread's process.
4746 2015-08-24 Pedro Alves <palves@redhat.com>
4748 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4749 * event-loop.c: Likewise.
4750 * remote-utils.c: Likewise.
4751 * tracepoint.c: Likewise.
4753 2015-08-24 Pedro Alves <palves@redhat.com>
4755 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4758 2015-08-21 Pedro Alves <palves@redhat.com>
4760 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4761 instead of literal 1.
4763 2015-08-21 Pedro Alves <palves@redhat.com>
4765 * tdesc.c (default_description): Explicitly zero-initialize.
4767 2015-08-21 Pedro Alves <palves@redhat.com>
4770 * inferiors.c (remove_thread): Discard any pending stop reply for
4772 * server.c (remove_all_on_match_pid): Rename to ...
4773 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4775 (discard_queued_stop_replies): Change parameter to a ptid. Now
4777 (handle_v_kill, kill_inferior_callback, captured_main)
4778 (process_serial_event): Adjust.
4779 * server.h (discard_queued_stop_replies): Declare.
4781 2015-08-21 Pedro Alves <palves@redhat.com>
4783 * linux-low.c (wait_for_sigstop): Always switch to no thread
4784 selected if the previously current thread dies.
4785 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4786 process instead of the current thread's.
4787 * remote-utils.c (input_interrupt): Don't check if there's no
4789 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4790 current thread to the general thread fails, error out.
4791 (handle_qxfer_auxv, handle_qxfer_libraries)
4792 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4793 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4794 (handle_query): Check if there's a thread selected instead of
4795 checking whether there's any thread in the thread list.
4796 (handle_qxfer_threads, handle_qxfer_btrace)
4797 (handle_qxfer_btrace_conf): Don't error out early if there's no
4798 thread in the thread list.
4799 (handle_v_cont, myresume): Don't set the current thread to the
4801 (process_serial_event) <Hg handling>: Also set thread_id if the
4802 previous general thread is still alive.
4803 (process_serial_event) <g/G handling>: If setting the current
4804 thread to the general thread fails, error out.
4805 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4806 thread's lwp instead of the current thread's.
4807 * target.c (set_desired_thread): If the desired thread was not
4808 found, leave the current thread pointing to NULL. Return an int
4809 (boolean) indicating success.
4810 * target.h (set_desired_thread): Change return type to int.
4812 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4814 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4815 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4817 (ps_get_thread_area): New function.
4819 2015-08-19 Gary Benson <gbenson@redhat.com>
4821 * hostio.c (handle_pread): Do not attempt to read more data
4822 than hostio_reply_with_data can fit in a packet.
4824 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4826 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4828 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4830 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4832 2015-08-06 Pedro Alves <palves@redhat.com>
4834 * tracepoint.c (expr_eval_result): Now an int.
4836 2015-08-06 Pedro Alves <palves@redhat.com>
4838 * gdbthread.h (struct regcache): Forward declare.
4839 (struct thread_info) <regcache_data>: Now a struct regcache
4841 * inferiors.c (inferior_regcache_data)
4842 (set_inferior_regcache_data): Now work with struct regcache
4844 * inferiors.h (struct regcache): Forward declare.
4845 (inferior_regcache_data, set_inferior_regcache_data): Now work
4846 with struct regcache pointers.
4847 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4848 (free_register_cache_thread): Remove struct regcache pointer
4851 2015-08-06 Pedro Alves <palves@redhat.com>
4853 * server.c (captured_main): On error, print the exception message
4854 to stderr, and if run_once is set, throw a quit.
4856 2015-08-06 Pedro Alves <palves@redhat.com>
4858 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4861 2015-08-06 Pedro Alves <palves@redhat.com>
4863 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4864 reading beyond the passed in buffer length.
4866 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4868 * tracepoint.c (symbol_list) <required>: Remove.
4870 2015-08-06 Pedro Alves <palves@redhat.com>
4872 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4873 count if stopping and suspending threads.
4874 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4875 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4876 (linux_detach): Complete an ongoing step-over.
4877 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4879 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4880 (linux_wait_1): If passing a signal to the inferior after
4881 finishing a step-over, unsuspend and re-resume all lwps. If we
4882 see a single-step event but the thread should be continuing, don't
4883 pass the trap to gdb.
4884 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4885 internal_error instead of gdb_assert.
4886 (enqueue_pending_signal): New function.
4887 (check_ptrace_stopped_lwp_gone): Add debug output.
4888 (start_step_over): Use internal_error instead of gdb_assert.
4889 (complete_ongoing_step_over): New function.
4890 (linux_resume_one_thread): Don't resume a suspended thread.
4891 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4894 2015-08-06 Pedro Alves <palves@redhat.com>
4896 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4897 (linux_thread_alive): Use lwp_is_marked_dead.
4898 (extended_event_reported): Delete.
4899 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4900 instead of extended_event_reported.
4901 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4903 (lwp_is_marked_dead): New function.
4904 (lwp_running): Use lwp_is_marked_dead.
4905 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4908 2015-08-06 Pedro Alves <palves@redhat.com>
4910 * linux-low.c (linux_wait_1): Move fork event output out of the
4911 !report_to_gdb check. Pass event_child->waitstatus to
4912 target_waitstatus_to_string instead of ourstatus.
4914 2015-08-04 Yao Qi <yao.qi@linaro.org>
4916 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4917 if current_thread is 32 bit.
4919 2015-08-04 Yao Qi <yao.qi@linaro.org>
4921 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4922 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4923 * server.c (extended_protocol): Remove "static".
4924 * server.h (extended_protocol): Declare it.
4926 2015-08-04 Yao Qi <yao.qi@linaro.org>
4928 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4929 both aarch64 and aarch32.
4930 (aarch64_set_pc): Likewise.
4932 2015-08-04 Yao Qi <yao.qi@linaro.org>
4934 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4935 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4936 arm-with-neon.xml to srv_xmlfiles.
4937 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4938 (is_64bit_tdesc): New function.
4939 (aarch64_linux_read_description): New function.
4940 (aarch64_arch_setup): Call aarch64_linux_read_description.
4941 (regs_info): Rename to regs_info_aarch64.
4942 (aarch64_regs_info): Return right regs_info.
4943 (initialize_low_arch): Call initialize_low_arch_aarch32.
4945 2015-08-04 Yao Qi <yao.qi@linaro.org>
4947 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4948 * linux-aarch32-low.c: New file.
4949 * linux-aarch32-low.h: New file.
4950 * linux-arm-low.c (arm_fill_gregset): Move it to
4951 linux-aarch32-low.c.
4952 (arm_store_gregset): Likewise.
4953 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4954 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4955 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4956 (regs_info): Rename to regs_info_arm.
4957 (arm_regs_info): Return regs_info_aarch32 if
4958 have_ptrace_getregset is 1 and target description is
4959 arm_with_neon or arm_with_vfpv3.
4960 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4961 Call initialize_low_arch_aarch32 instead.
4963 2015-08-04 Yao Qi <yao.qi@linaro.org>
4965 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4966 * linux-low.c: ... here.
4967 * linux-low.h (have_ptrace_getregset): Declare it.
4969 2015-08-04 Pedro Alves <palves@redhat.com>
4971 * thread-db.c (struct thread_db): Use new typedefs.
4972 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4974 (disable_thread_event_reporting): Cast result of dlsym to
4975 destination function pointer type.
4976 (thread_db_mourn): Use td_ta_delete_ftype.
4978 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4980 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4982 (CDX_BREAKPOINT): Define for R2.
4983 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4984 (the_low_target): Add comments.
4986 2015-07-30 Yao Qi <yao.qi@linaro.org>
4988 * linux-arm-low.c (arm_hwcap): Remove it.
4989 (arm_read_description): New local variable arm_hwcap. Don't
4990 set arm_hwcap to zero.
4992 2015-07-30 Yao Qi <yao.qi@linaro.org>
4994 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4995 Use regcache->tdesc instead.
4996 (arm_store_wmmxregset): Likewise.
4997 (arm_fill_vfpregset): Likewise.
4998 (arm_store_vfpregset): Likewise.
5000 2015-07-30 Yao Qi <yao.qi@linaro.org>
5002 * linux-arm-low.c: Include arch/arm.h.
5003 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5004 (arm_store_gregset): Likewise.
5006 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5008 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5009 ptrace's 4th parameter.
5011 2015-07-27 Yao Qi <yao.qi@linaro.org>
5013 * configure.srv (case aarch64*-*-linux*): Don't set
5016 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5018 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5020 * linux-arm-low.c: Likewise.
5021 * linux-cris-low.c: Likewise.
5022 * linux-crisv32-low.c: Likewise.
5023 * linux-low.c: Likewise.
5024 * linux-m68k-low.c: Likewise.
5025 * linux-mips-low.c: Likewise.
5026 * linux-nios2-low.c: Likewise.
5027 * linux-s390-low.c: Likewise.
5028 * linux-sparc-low.c: Likewise.
5029 * linux-tic6x-low.c: Likewise.
5030 * linux-tile-low.c: Likewise.
5031 * linux-x86-low.c: Likewise.
5033 2015-07-24 Pedro Alves <palves@redhat.com>
5035 * config.in: Regenerate.
5036 * configure: Regenerate.
5038 2015-07-24 Pedro Alves <palves@redhat.com>
5040 * acinclude.m4: Include ../ptrace.m4.
5041 * configure.ac: Call GDB_AC_PTRACE.
5042 * config.in, configure: Regenerate.
5044 2015-07-24 Yao Qi <yao.qi@linaro.org>
5046 * linux-low.c (linux_create_inferior): Remove setting to
5047 proc->priv->new_inferior.
5048 (linux_attach): Likewise.
5049 (linux_low_filter_event): Likewise.
5050 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5052 2015-07-24 Yao Qi <yao.qi@linaro.org>
5054 * linux-low.c (linux_arch_setup): New function.
5055 (linux_low_filter_event): If proc->tdesc is NULL and
5056 proc->attached is true, call the_low_target.arch_setup.
5057 Otherwise, keep status pending, and return.
5058 (linux_resume_one_lwp_throw): Don't call get_pc if
5059 thread->while_stepping isn't NULL. Don't call
5060 get_thread_regcache if proc->tdesc is NULL.
5061 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5062 (linux_target_ops): Install arch_setup.
5063 * server.c (start_inferior): Call the_target->arch_setup.
5064 * target.h (struct target_ops) <arch_setup>: New field.
5065 (target_arch_setup): New marco.
5066 * lynx-low.c (lynx_target_ops): Update.
5067 * nto-low.c (nto_target_ops): Update.
5068 * spu-low.c (spu_target_ops): Update.
5069 * win32-low.c (win32_target_ops): Update.
5071 2015-07-24 Yao Qi <yao.qi@linaro.org>
5073 * linux-low.c (linux_add_process): Don't set
5074 proc->priv->new_inferior.
5075 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5076 (linux_attach): Likewise.
5078 2015-07-24 Yao Qi <yao.qi@linaro.org>
5080 * server.c (start_inferior): Code refactor.
5082 2015-07-24 Yao Qi <yao.qi@linaro.org>
5084 * server.c (process_serial_event): Set general_thread.
5086 2015-07-21 Yao Qi <yao.qi@linaro.org>
5088 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5089 aarch64_linux_get_debug_reg_capacity.
5091 2015-07-17 Yao Qi <yao.qi@linaro.org>
5093 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5094 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5095 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5096 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5097 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5098 (AARCH64_HWP_ALIGNMENT): Likewise.
5099 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5100 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5101 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5102 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5103 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5104 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5105 (struct aarch64_debug_reg_state): Likewise.
5106 (struct arch_lwp_info): Likewise.
5107 (aarch64_align_watchpoint): Likewise.
5108 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5109 (aarch64_watchpoint_length): Likewise.
5110 (aarch64_point_encode_ctrl_reg): Likewise
5111 (aarch64_point_is_aligned): Likewise.
5112 (aarch64_align_watchpoint): Likewise.
5113 (aarch64_linux_set_debug_regs):
5114 (aarch64_dr_state_insert_one_point): Likewise.
5115 (aarch64_dr_state_remove_one_point): Likewise.
5116 (aarch64_handle_breakpoint): Likewise.
5117 (aarch64_handle_aligned_watchpoint): Likewise.
5118 (aarch64_handle_unaligned_watchpoint): Likewise.
5119 (aarch64_handle_watchpoint): Likewise.
5121 2015-07-17 Yao Qi <yao.qi@linaro.org>
5123 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5124 and don't aarch64_get_debug_reg_state. All callers update.
5125 (aarch64_handle_aligned_watchpoint): Likewise.
5126 (aarch64_handle_unaligned_watchpoint): Likewise.
5127 (aarch64_handle_watchpoint): Likewise.
5128 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5129 (aarch64_remove_point): Likewise.
5131 2015-07-17 Yao Qi <yao.qi@linaro.org>
5133 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5135 (aarch64_handle_unaligned_watchpoint): Likewise.
5137 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5139 Revert the previous 3 commits:
5140 Move gdb_regex* to common/
5141 Move linux_find_memory_regions_full & co.
5142 gdbserver build-id attribute generator
5144 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5145 Jan Kratochvil <jan.kratochvil@redhat.com>
5147 gdbserver build-id attribute generator.
5148 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5149 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5150 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5152 (get_dynamic): Use find_pdhr to traverse program headers.
5153 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5154 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5155 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5156 (get_hex_build_id): New.
5157 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5158 to reply XML document.
5160 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5161 Jan Kratochvil <jan.kratochvil@redhat.com>
5163 * target.c: Include target/target-utils.h and fcntl.h.
5164 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5165 (target_fileio_read_stralloc): New functions.
5167 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5169 * Makefile.in (OBS): Add gdb_regex.o.
5171 * config.in: Rebuilt.
5172 * configure: Rebuilt.
5174 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5175 Jan Kratochvil <jan.kratochvil@redhat.com>
5177 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5178 * Makefile.in (OBS): Add target-utils.o.
5179 (linux-maps.o, target-utils.o): New.
5180 * configure.srv (srv_linux_obj): Add linux-maps.o.
5182 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5184 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5186 (the_low_target): Install it.
5188 2015-07-14 Pedro Alves <palves@redhat.com>
5190 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5191 Instead, ignore ECHILD, and throw an error for other errnos.
5193 2015-07-10 Pedro Alves <palves@redhat.com>
5195 * event-loop.c (struct callback_event) <data>: Change type to
5196 gdb_client_data instance instead of gdb_client_data pointer.
5197 (append_callback_event): Adjust.
5199 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5201 * linux-aarch64-low.c: Add comments for each linux_target_ops
5202 method. Remove comments already covered in target_ops and
5203 linux_target_ops definitions.
5204 (the_low_target): Add comments for each unimplemented method.
5206 2015-07-09 Yao Qi <yao.qi@linaro.org>
5208 * linux-aarch64-low.c (aarch64_regmap): Remove.
5209 (aarch64_usrregs_info): Remove.
5210 (regs_info): Set field usrregs to NULL.
5212 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5214 * linux-low.c: Include "rsp-low.h"
5215 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5216 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5217 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5218 (handle_btrace_enable_pt): New.
5219 (handle_btrace_general_set): Support "pt".
5220 (handle_btrace_conf_general_set): Support "pt:size".
5222 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5224 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5227 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5229 * linux-aarch64-low.c: Remove comment about endianness.
5230 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5231 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5234 2015-06-24 Gary Benson <gbenson@redhat.com>
5236 * linux-i386-ipa.c (stdint.h): Do not include.
5237 * lynx-i386-low.c (stdint.h): Likewise.
5238 * lynx-ppc-low.c (stdint.h): Likewise.
5239 * mem-break.c (stdint.h): Likewise.
5240 * thread-db.c (stdint.h): Likewise.
5241 * tracepoint.c (stdint.h): Likewise.
5242 * win32-low.c (stdint.h): Likewise.
5244 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5246 * server.c (write_qxfer_response): Update call to
5247 remote_escape_output.
5249 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5250 Jan Kratochvil <jan.kratochvil@redhat.com>
5252 Merge multiple hex conversions.
5253 * gdbreplay.c (tohex): Rename to 'fromhex'.
5254 (logchar): Use fromhex.
5256 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5258 * server.c (handle_qxfer_libraries): Set `version' attribute for
5261 2015-06-10 Gary Benson <gbenson@redhat.com>
5263 * target.h (struct target_ops) <multifs_open>: New field.
5264 <multifs_unlink>: Likewise.
5265 <multifs_readlink>: Likewise.
5266 * linux-low.c (nat/linux-namespaces.h): New include.
5267 (linux_target_ops): Initialize the_target->multifs_open,
5268 the_target->multifs_unlink and the_target->multifs_readlink.
5269 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5270 * hostio.c (hostio_fs_pid): New static variable.
5271 (hostio_handle_new_gdb_connection): New function.
5272 (handle_setfs): Likewise.
5273 (handle_open): Use the_target->multifs_open as appropriate.
5274 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5275 (handle_readlink): Use the_target->multifs_readlink as
5277 (handle_vFile): Handle vFile:setfs packets.
5278 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5279 after target_handle_new_gdb_connection.
5281 2015-06-10 Gary Benson <gbenson@redhat.com>
5283 * configure.ac (AC_CHECK_FUNCS): Add setns.
5284 * config.in: Regenerate.
5285 * configure: Likewise.
5286 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5287 (linux-namespaces.o): New rule.
5288 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5290 2015-06-09 Gary Benson <gbenson@redhat.com>
5292 * hostio.c (handle_open): Process mode argument with
5293 fileio_to_host_mode.
5295 2015-06-01 Yao Qi <yao.qi@linaro.org>
5297 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5298 * linux-x86-low.c: Likewise.
5300 2015-05-28 Don Breazeal <donb@codesourcery.com>
5302 * linux-low.c (handle_extended_wait): Initialize
5303 thread_info.last_resume_kind for new fork children.
5305 2015-05-15 Pedro Alves <palves@redhat.com>
5307 * target.h (target_handle_new_gdb_connection): Rewrite using if
5308 wrapped in do/while.
5310 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5312 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5313 * configure, config.in: Regenerate.
5314 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5317 2015-05-12 Don Breazeal <donb@codesourcery.com>
5319 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5320 PTRACE_EVENT_VFORK_DONE.
5321 (linux_low_ptrace_options, extended_event_reported): Add vfork
5323 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5324 and "vforkdone" for RSP 'T' Stop Reply Packet.
5325 * server.h (report_vfork_events): Declare
5328 2015-05-12 Don Breazeal <donb@codesourcery.com>
5330 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5331 (the_low_target) <new_fork>: Initialize new member.
5332 * linux-arm-low.c (arm_new_fork): New function.
5333 (the_low_target) <new_fork>: Initialize new member.
5334 * linux-low.c (handle_extended_wait): Call new target function
5336 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5337 * linux-mips-low.c (mips_add_watchpoint): New function
5338 extracted from mips_insert_point.
5339 (the_low_target) <new_fork>: Initialize new member.
5340 (mips_linux_new_fork): New function.
5341 (mips_insert_point): Call mips_add_watchpoint.
5342 * linux-x86-low.c (x86_linux_new_fork): New function.
5343 (the_low_target) <new_fork>: Initialize new member.
5345 2015-05-12 Don Breazeal <donb@codesourcery.com>
5347 * linux-low.c (handle_extended_wait): Implement return value,
5348 rename argument 'event_child' to 'event_lwp', handle
5349 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5350 (linux_low_ptrace_options): New function.
5351 (linux_low_filter_event): Call linux_low_ptrace_options,
5352 use different argument fo linux_enable_event_reporting,
5353 use return value from handle_extended_wait.
5354 (extended_event_reported): New function.
5355 (linux_wait_1): Call extended_event_reported and set
5356 status to report fork events.
5357 (linux_write_memory): Add pid to debug message.
5358 (reset_lwp_ptrace_options_callback): New function.
5359 (linux_handle_new_gdb_connection): New function.
5360 (linux_target_ops): Initialize new structure member.
5361 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5362 * lynx-low.c: Initialize new structure member.
5363 * remote-utils.c (prepare_resume_reply): Implement stop reason
5364 "fork" for "T" stop message.
5365 * server.c (handle_query): Call handle_new_gdb_connection.
5366 * server.h (report_fork_events): Declare global flag.
5367 * target.h (struct target_ops) <handle_new_gdb_connection>:
5369 (target_handle_new_gdb_connection): New macro.
5370 * win32-low.c: Initialize new structure member.
5372 2015-05-12 Don Breazeal <donb@codesourcery.com>
5374 * mem-break.c (APPEND_TO_LIST): Define macro.
5375 (clone_agent_expr): New function.
5376 (clone_one_breakpoint): New function.
5377 (clone_all_breakpoints): New function.
5378 * mem-break.h: Declare new functions.
5380 2015-05-12 Don Breazeal <donb@codesourcery.com>
5382 * linux-low.c (linux_supports_fork_events): New function.
5383 (linux_supports_vfork_events): New function.
5384 (linux_target_ops): Initialize new structure members.
5385 (initialize_low): Call linux_check_ptrace_features.
5386 * lynx-low.c (lynx_target_ops): Initialize new structure
5388 * server.c (report_fork_events, report_vfork_events):
5390 (handle_query): Add new features to qSupported packet and
5392 (captured_main): Initialize new global variables.
5393 * target.h (struct target_ops) <supports_fork_events>:
5395 <supports_vfork_events>: New member.
5396 (target_supports_fork_events): New macro.
5397 (target_supports_vfork_events): New macro.
5398 * win32-low.c (win32_target_ops): Initialize new structure
5401 2015-05-12 Gary Benson <gbenson@redhat.com>
5403 * server.c (handle_qxfer_exec_file): Use current process
5406 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5408 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5409 Remove HAVE_PTRACE_GETREGS conditionals.
5410 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5411 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5413 2015-05-08 Yao Qi <yao.qi@linaro.org>
5415 * linux-low.c (linux_supports_conditional_breakpoints): New
5417 (linux_target_ops): Install new target method.
5418 * lynx-low.c (lynx_target_ops): Install NULL hook for
5419 supports_conditional_breakpoints.
5420 * nto-low.c (nto_target_ops): Likewise.
5421 * spu-low.c (spu_target_ops): Likewise.
5422 * win32-low.c (win32_target_ops): Likewise.
5423 * server.c (handle_query): Check
5424 target_supports_conditional_breakpoints.
5425 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5427 (target_supports_conditional_breakpoints): New macro.
5429 2015-05-06 Pedro Alves <palves@redhat.com>
5432 * server.c (start_inferior): If the process exits, mourn it.
5434 2015-04-21 Gary Benson <gbenson@redhat.com>
5436 * hostio.c (fileio_open_flags_to_host): Factored out to
5437 fileio_to_host_openflags in common/fileio.c. Single use
5440 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5442 * linux-xtensa-low.c (xtensa_fill_gregset)
5443 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5446 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5448 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5449 (regs_info): Replace usrregs pointer with NULL.
5451 2015-04-17 Gary Benson <gbenson@redhat.com>
5453 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5454 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5455 * server.c (handle_qxfer_exec_file): New function.
5456 (qxfer_packets): Add exec-file entry.
5457 (handle_query): Report qXfer:exec-file:read as supported packet.
5459 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5461 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5463 2015-04-09 Gary Benson <gbenson@redhat.com>
5465 * hostio-errno.c (errno_to_fileio_error): Remove function.
5466 Update caller to use remote_fileio_to_fio_error.
5468 2015-04-09 Yao Qi <yao.qi@linaro.org>
5470 * linux-low.c (linux_insert_point): Call
5471 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5472 (linux_remove_point): Call remove_memory_breakpoint if type is
5474 * linux-x86-low.c (x86_insert_point): Don't call
5475 insert_memory_breakpoint.
5476 (x86_remove_point): Don't call remove_memory_breakpoint.
5478 2015-04-01 Pedro Alves <palves@redhat.com>
5479 Cleber Rosa <crosa@redhat.com>
5481 * server.c (gdbserver_usage): Reorganize and extend the usage
5484 2015-03-24 Pedro Alves <palves@redhat.com>
5486 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5487 output. Also dump TRAP_TRACE.
5488 (linux_low_filter_event): In debug output, distinguish a
5489 resume_stop SIGSTOP from a delayed SIGSTOP.
5491 2015-03-24 Gary Benson <gbenson@redhat.com>
5493 * linux-x86-low.c (x86_linux_new_thread): Moved to
5495 (x86_linux_prepare_to_resume): Likewise.
5497 2015-03-24 Gary Benson <gbenson@redhat.com>
5499 * Makefile.in (x86-linux-dregs.o): New rule.
5500 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5501 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5502 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5503 (x86_linux_dr_get): Likewise.
5504 (x86_linux_dr_set): Likewise.
5505 (update_debug_registers_callback): Likewise.
5506 (x86_linux_dr_set_addr): Likewise.
5507 (x86_linux_dr_get_addr): Likewise.
5508 (x86_linux_dr_set_control): Likewise.
5509 (x86_linux_dr_get_control): Likewise.
5510 (x86_linux_dr_get_status): Likewise.
5511 (x86_linux_update_debug_registers): Likewise.
5513 2015-03-24 Gary Benson <gbenson@redhat.com>
5515 * linux-x86-low.c (x86_linux_update_debug_registers):
5516 New function, factored out from...
5517 (x86_linux_prepare_to_resume): ...this.
5519 2015-03-24 Gary Benson <gbenson@redhat.com>
5521 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5522 (x86_linux_dr_set): Likewise.
5523 (update_debug_registers_callback): Likewise.
5524 (x86_linux_dr_set_addr): Likewise.
5525 (x86_linux_dr_get_addr): Likewise.
5526 (x86_linux_dr_set_control): Likewise.
5527 (x86_linux_dr_get_control): Likewise.
5528 (x86_linux_dr_get_status): Likewise.
5529 (x86_linux_prepare_to_resume): Likewise.
5531 2015-03-24 Gary Benson <gbenson@redhat.com>
5533 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5534 Use perror_with_name. Pass string through gettext.
5535 (x86_linux_dr_set): Likewise.
5537 2015-03-24 Gary Benson <gbenson@redhat.com>
5539 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5540 (x86_linux_dr_set_addr): ...this.
5541 (x86_dr_low_get_addr): Rename to...
5542 (x86_linux_dr_get_addr): ...this.
5543 (x86_dr_low_set_control): Rename to...
5544 (x86_linux_dr_set_control): ...this.
5545 (x86_dr_low_get_control): Rename to...
5546 (x86_linux_dr_get_control): ...this.
5547 (x86_dr_low_get_status): Rename to...
5548 (x86_linux_dr_get_status): ...this.
5549 (x86_dr_low): Update with new function names.
5551 2015-03-24 Gary Benson <gbenson@redhat.com>
5553 * Makefile.in (x86-linux.o): New rule.
5554 * configure.srv: Add x86-linux.o to relevant targets.
5555 * linux-low.c (lwp_set_arch_private_info): New function.
5556 (lwp_arch_private_info): Likewise.
5557 * linux-x86-low.c: Include nat/x86-linux.h.
5558 (arch_lwp_info): Removed structure.
5559 (update_debug_registers_callback):
5560 Use lwp_set_debug_registers_changed.
5561 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5562 and lwp_set_debug_registers_changed.
5563 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5565 2015-03-24 Gary Benson <gbenson@redhat.com>
5567 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5568 * linux-arm-low.c (arm_new_thread): Likewise.
5569 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5570 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5571 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5572 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5574 2015-03-24 Gary Benson <gbenson@redhat.com>
5576 * linux-low.c (ptid_of_lwp): New function.
5577 (lwp_is_stopped): Likewise.
5578 (lwp_stop_reason): Likewise.
5579 * linux-x86-low.c (update_debug_registers_callback):
5581 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5584 2015-03-24 Gary Benson <gbenson@redhat.com>
5586 * linux-low.h (linux_stop_lwp): Remove declaration.
5588 2015-03-24 Gary Benson <gbenson@redhat.com>
5590 * linux-low.h: Include nat/linux-nat.h.
5591 * linux-low.c (iterate_over_lwps_args): New structure.
5592 (iterate_over_lwps_filter): New function.
5593 (iterate_over_lwps): Likewise.
5594 * linux-x86-low.c (update_debug_registers_callback):
5595 Update signature to what iterate_over_lwps expects.
5596 Remove PID check that iterate_over_lwps now performs.
5597 (x86_dr_low_set_addr): Use iterate_over_lwps.
5598 (x86_dr_low_set_control): Likewise.
5600 2015-03-24 Gary Benson <gbenson@redhat.com>
5602 * linux-x86-low.c (x86_debug_reg_state): New function.
5603 (x86_linux_prepare_to_resume): Use the above.
5605 2015-03-24 Gary Benson <gbenson@redhat.com>
5607 * linux-low.c (current_lwp_ptid): New function.
5608 * linux-x86-low.c: Include nat/linux-nat.h.
5609 (x86_dr_low_get_addr): Use current_lwp_ptid.
5610 (x86_dr_low_get_control): Likewise.
5611 (x86_dr_low_get_status): Likewise.
5613 2015-03-20 Pedro Alves <palves@redhat.com>
5615 * tracepoint.c (cmd_qtstatus): Make "str" const.
5617 2015-03-20 Pedro Alves <palves@redhat.com>
5619 * server.c (handle_general_set): Make "req_str" const.
5621 2015-03-19 Pedro Alves <palves@redhat.com>
5623 * linux-low.c (linux_resume_one_lwp): Rename to ...
5624 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5625 instead call perror_with_name.
5626 (check_ptrace_stopped_lwp_gone): New function.
5627 (linux_resume_one_lwp): Reimplement as wrapper around
5628 linux_resume_one_lwp_throw that swallows errors if the LWP is
5631 2015-03-19 Pedro Alves <palves@redhat.com>
5633 * linux-low.c (count_events_callback, select_event_lwp_callback):
5634 No longer check whether the thread has resume_stop as last resume
5637 2015-03-19 Pedro Alves <palves@redhat.com>
5639 * linux-low.c (count_events_callback, select_event_lwp_callback):
5640 Use the lwp's status_pending_p field, not the thread's.
5642 2015-03-19 Pedro Alves <palves@redhat.com>
5644 * linux-low.c (select_event_lwp_callback): Update comments to
5645 no longer mention SIGTRAP.
5647 2015-03-18 Gary Benson <gbenson@redhat.com>
5649 * server.c (handle_query): Do not report vFile:fstat as supported.
5651 2015-03-11 Gary Benson <gbenson@redhat.com>
5653 * hostio.c (sys/types.h): New include.
5654 (sys/stat.h): Likewise.
5655 (common-remote-fileio.h): Likewise.
5656 (handle_fstat): New function.
5657 (handle_vFile): Handle vFile:fstat packets.
5659 2015-03-11 Gary Benson <gbenson@redhat.com>
5661 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5662 struct stat.st_blocks and struct stat.st_blksize.
5663 * configure: Regenerate.
5664 * config.in: Likewise.
5665 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5666 (OBS): Add common-remote-fileio.o.
5667 (common-remote-fileio.o): New rule.
5669 2015-03-09 Pedro Alves <palves@redhat.com>
5671 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5672 'struct sockaddr' pointer in 'accept' call.
5674 2015-03-09 Pedro Alves <palves@redhat.com>
5677 2015-03-07 Pedro Alves <palves@redhat.com>
5678 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5679 or <winsock2.h> here. Instead include "gdb_socket.h".
5680 (remote_open): Use union gdb_sockaddr_u.
5681 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5682 or <winsock2.h> here. Instead include "gdb_socket.h".
5683 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5684 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5686 (init_named_socket, gdb_agent_helper_thread): Use union
5689 2015-03-07 Pedro Alves <palves@redhat.com>
5691 * configure.ac (build_warnings): Move
5692 -Wdeclaration-after-statement to the C-specific set.
5693 * configure: Regenerate.
5695 2015-03-07 Pedro Alves <palves@redhat.com>
5697 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5698 or <winsock2.h> here. Instead include "gdb_socket.h".
5699 (remote_open): Use union gdb_sockaddr_u.
5700 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5701 or <winsock2.h> here. Instead include "gdb_socket.h".
5702 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5703 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5705 (init_named_socket, gdb_agent_helper_thread): Use union
5708 2015-03-07 Pedro Alves <palves@redhat.com>
5710 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5713 2015-03-06 Yao Qi <yao.qi@linaro.org>
5715 * linux-aarch64-low.c (aarch64_insert_point): Use
5716 show_debug_regs as a boolean.
5717 (aarch64_remove_point): Likewise.
5719 2015-03-05 Pedro Alves <palves@redhat.com>
5721 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5722 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5723 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5724 * nto-low.c (nto_target_ops): Likewise.
5725 * spu-low.c (spu_target_ops): Likewise.
5726 * win32-low.c (win32_target_ops): Likewise.
5728 2015-03-04 Pedro Alves <palves@redhat.com>
5730 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5731 Decide whether a breakpoint triggered based on the SIGTRAP's
5733 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5734 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5735 (linux_low_filter_event): Check for breakpoints before checking
5737 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5739 (linux_stopped_by_sw_breakpoint)
5740 (linux_supports_stopped_by_sw_breakpoint)
5741 (linux_stopped_by_hw_breakpoint)
5742 (linux_supports_stopped_by_hw_breakpoint): New functions.
5743 (linux_target_ops): Install new target methods.
5745 2015-03-04 Pedro Alves <palves@redhat.com>
5747 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5748 * server.c (swbreak_feature, hwbreak_feature): New globals.
5749 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5750 (captured_main): Clear swbreak_feature and hwbreak_feature.
5751 * server.h (swbreak_feature, hwbreak_feature): Declare.
5752 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5753 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5754 supports_stopped_by_hw_breakpoint>: New fields.
5755 (target_supports_stopped_by_sw_breakpoint)
5756 (target_stopped_by_sw_breakpoint)
5757 (target_supports_stopped_by_hw_breakpoint)
5758 (target_stopped_by_hw_breakpoint): Declare.
5760 2015-03-04 Pedro Alves <palves@redhat.com>
5762 enum lwp_stop_reason -> enum target_stop_reason
5763 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5764 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5765 (linux_wait_1, stuck_in_jump_pad_callback)
5766 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5767 (linux_stopped_by_watchpoint):
5768 * linux-low.h (enum lwp_stop_reason): Delete.
5769 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5770 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5772 2015-03-04 Yao Qi <yao.qi@linaro.org>
5774 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5776 2015-03-03 Gary Benson <gbenson@redhat.com>
5778 * hostio.c (handle_vFile): Fix prefix lengths.
5780 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5782 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5785 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5787 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5788 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5789 (clean): Add "rm -f" for above C files.
5790 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5791 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5792 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5793 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5794 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5795 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5796 (init_registers_s390x_vx_linux64)
5797 (init_registers_s390x_tevx_linux64)
5798 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5799 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5801 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5802 (s390_store_vxrs_high): New functions.
5803 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5805 (s390_arch_setup): Add logic for selecting one of the new target
5806 descriptions. Activate the new vector regsets if applicable.
5807 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5808 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5809 and init_registers_s390x_tevx_linux64.
5811 2015-03-01 Pedro Alves <palves@redhat.com>
5813 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5816 2015-02-27 Pedro Alves <palves@redhat.com>
5818 * linux-x86-low.c (u_debugreg_offset): New function.
5819 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5821 2015-02-27 Pedro Alves <palves@redhat.com>
5823 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5824 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5825 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5826 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5827 (ps_lsetfpregs, ps_getpid)
5828 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5829 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5830 (ps_lsetxregs, ps_plog): Declare.
5832 2015-02-27 Pedro Alves <palves@redhat.com>
5834 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5835 IP_AGENT_EXPORT_FUNC.
5836 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5837 IP_AGENT_EXPORT_FUNC.
5838 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5839 (IP_AGENT_EXPORT): Delete.
5840 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5841 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5842 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5843 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5844 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5845 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5846 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5847 (traceframe_read_count, traceframe_write_count)
5848 (traceframes_created, trace_state_variables, get_raw_reg)
5849 (get_trace_state_variable_value, set_trace_state_variable_value)
5850 (ust_loaded, helper_thread_id, cmd_buf): Use
5851 IPA_SYM_EXPORTED_NAME.
5852 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5853 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5854 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5855 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5856 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5857 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5858 EXTERN_C_PUSH/EXTERN_C_POP.
5859 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5860 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5861 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5862 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5863 (traceframe_write_count, traceframe_read_count)
5864 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5865 (about_to_request_buffer_space, get_trace_state_variable_value)
5866 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5867 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5868 EXTERN_C_PUSH/EXTERN_C_POP.
5869 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5870 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5871 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5872 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5873 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5874 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5875 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5876 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5878 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5879 (IP_AGENT_EXPORT_VAR_DECL): Define.
5881 (gdb_agent_get_raw_reg): Declare.
5883 2015-02-27 Tom Tromey <tromey@redhat.com>
5884 Pedro Alves <palves@redhat.com>
5886 Rename symbols whose names are reserved C++ keywords throughout.
5888 2015-02-27 Pedro Alves <palves@redhat.com>
5890 * Makefile.in (COMPILER): New, get it from autoconf.
5891 (CXX): Get from autoconf instead.
5892 (COMPILE.pre): Use COMPILER.
5893 (CC-LD): Rename to ...
5894 (CC_LD): ... this. Use COMPILER.
5895 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5896 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5897 * acinclude.m4: Include build-with-cxx.m4.
5898 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5899 Disable -Werror by default if building in C++ mode.
5900 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5901 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5902 the C++ compiler. Save/restore CXXFLAGS too.
5903 * configure: Regenerate.
5905 2015-02-27 Pedro Alves <palves@redhat.com>
5907 * acinclude.m4: Include libiberty.m4.
5908 * configure.ac: Call libiberty_INIT.
5909 * config.in, configure: Regenerate.
5911 2015-02-26 Pedro Alves <palves@redhat.com>
5913 * linux-low.c (linux_wait_1): When incrementing the PC past a
5914 program breakpoint always use the_low_target.breakpoint_len as
5915 increment, rather than the maximum between that and
5916 the_low_target.decr_pc_after_break.
5918 2015-02-23 Pedro Alves <palves@redhat.com>
5920 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5921 thread was doing a step-over; always adjust the PC if
5922 we stepped over a permanent breakpoint.
5923 (linux_wait_1): If we stepped over breakpoint that was on top of a
5924 permanent breakpoint, manually advance the PC past it.
5926 2015-02-23 Pedro Alves <palves@redhat.com>
5928 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5930 (x86_fill_gregset, x86_store_gregset): Use it when handling
5933 2015-02-20 Pedro Alves <palves@redhat.com>
5935 * thread-db.c: Include "nat/linux-procfs.h".
5936 (thread_db_init): Skip listing new threads if the kernel supports
5937 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5939 2015-02-20 Pedro Alves <palves@redhat.com>
5941 * linux-low.c (status_pending_p_callback): Use ptid_match.
5943 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5945 PR breakpoints/16812
5946 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5947 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5948 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5950 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5952 PR breakpoints/15956
5953 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5955 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5957 * linux-low.c (linux_low_btrace_conf): Print size.
5958 * server.c (handle_btrace_conf_general_set): New.
5959 (hanle_general_set): Call handle_btrace_conf_general_set.
5960 (handle_query): Report Qbtrace-conf:bts:size as supported.
5962 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5964 * linux-low.c (linux_low_enable_btrace): Update parameters.
5965 (linux_low_btrace_conf): New.
5966 (linux_target_ops)<to_btrace_conf>: Initialize.
5967 * server.c (current_btrace_conf): New.
5968 (handle_btrace_enable): Rename to ...
5969 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
5970 to target_enable_btrace. Update comment. Update users.
5971 (handle_qxfer_btrace_conf): New.
5972 (qxfer_packets): Add btrace-conf entry.
5973 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5974 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5975 (target_ops)<read_btrace_conf>: New.
5976 (target_enable_btrace): Update parameters.
5977 (target_read_btrace_conf): New.
5979 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5981 * server.c (handle_btrace_general_set): Remove call to
5982 target_supports_btrace.
5983 (supported_btrace_packets): New.
5984 (handle_query): Call supported_btrace_packets.
5985 * target.h: include btrace-common.h.
5986 (btrace_target_info): Removed.
5987 (supports_btrace, target_supports_btrace): Update parameters.
5989 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5991 * Makefile.in (SFILES): Add common/btrace-common.c.
5992 (OBS): Add common/btrace-common.o.
5993 (btrace-common.o): Add build rules.
5994 * linux-low: Include btrace-common.h.
5995 (linux_low_read_btrace): Use struct btrace_data. Call
5996 btrace_data_init and btrace_data_fini.
5998 2015-02-06 Pedro Alves <palves@redhat.com>
6000 * thread-db.c (find_new_threads_callback): Add debug output.
6002 2015-02-04 Pedro Alves <palves@redhat.com>
6004 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6005 (resume_stopped_resumed_lwps): New function.
6006 (linux_wait_for_event_filtered): Use it.
6008 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6010 * Makefile.in (SFILES): Add linux-personality.c.
6011 (linux-personality.o): New rule.
6012 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6013 list of objects to be built.
6014 * linux-low.c: Include nat/linux-personality.h.
6015 (linux_create_inferior): Remove code to disable address space
6016 randomization (moved to ../nat/linux-personality.c). Create
6017 cleanup to disable address space randomization.
6019 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6021 * Makefile.in (posix-strerror.o): New rule.
6022 (mingw-strerror.o): Likewise.
6023 * configure: Regenerated.
6024 * configure.ac: Source file ../common/common.host. Initialize new
6025 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6027 2015-01-14 Yao Qi <yao@codesourcery.com>
6029 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6030 (ppc-linux.o): New rule.
6031 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6032 * configure.ac: AC_CHECK_FUNCS(getauxval).
6033 * config.in: Re-generated.
6034 * configure: Re-generated.
6035 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6036 ppc64_64bit_inferior_p
6038 2015-01-14 Yao Qi <yao@codesourcery.com>
6040 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6041 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6042 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6043 (PT_ORIG_R3, PT_TRAP): Likewise.
6044 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6045 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6046 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6048 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6050 * i387-fp.c (i387_cache_to_xsave): In look over
6051 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6052 zmmh_low_space field by use of zmmh_high_space.
6054 2015-01-09 Pedro Alves <palves@redhat.com>
6056 * linux-low.c (step_over_bkpt): Move higher up in the file.
6057 (handle_extended_wait): Don't store the stop_pc here.
6058 (get_stop_pc): Adjust comments and rename to ...
6059 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6060 stopped for a software breakpoint or hardware breakpoint.
6061 (thread_still_has_status_pending_p): New function.
6062 (status_pending_p_callback): Use
6063 thread_still_has_status_pending_p. If the event is no longer
6064 interesting, resume the LWP.
6065 (handle_tracepoints): Add assert.
6066 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6067 (wstatus_maybe_breakpoint): New function.
6068 (cancel_breakpoint): Delete function.
6069 (check_stopped_by_watchpoint): New function, factored out from
6070 linux_low_filter_event.
6071 (lp_status_maybe_breakpoint): Delete function.
6072 (linux_low_filter_event): Remove filter_ptid argument.
6073 Leave thread group exits pending here. Store the LWP's stop PC.
6074 Always leave events pending.
6075 (linux_wait_for_event_filtered): Pull all events out of the
6076 kernel, and leave them all pending.
6077 (count_events_callback, select_event_lwp_callback): Consider all
6079 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6080 (select_event_lwp): Only give preference to the stepping LWP in
6081 all-stop mode. Adjust comments.
6082 (ignore_event): New function.
6083 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6084 references to cancel_breakpoints. Adjust to renames. Also give
6085 equal priority to all LWPs that have had events in non-stop mode.
6086 If reporting a software breakpoint event, unadjust the LWP's PC.
6087 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6088 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6090 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6091 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6092 (linux_stopped_by_watchpoint): Adjust.
6093 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6094 * linux-low.h (enum lwp_stop_reason): New.
6095 (struct lwp_info) <stop_pc>: Adjust comment.
6096 <stopped_by_watchpoint>: Delete field.
6097 <stop_reason>: New field.
6098 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6099 * mem-break.c (software_breakpoint_inserted_here)
6100 (hardware_breakpoint_inserted_here): New function.
6101 * mem-break.h (software_breakpoint_inserted_here)
6102 (hardware_breakpoint_inserted_here): Declare.
6103 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6104 (cancel_breakpoints): Delete.
6105 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6106 (upload_fast_traceframes): Remove references to
6109 2015-01-09 Pedro Alves <palves@redhat.com>
6111 * thread-db.c (find_new_threads_callback): Ignore thread if the
6112 kernel thread ID is -1.
6114 2015-01-09 Pedro Alves <palves@redhat.com>
6116 * linux-low.c (linux_attach_fail_reason_string): Move to
6117 nat/linux-ptrace.c, and rename.
6118 (linux_attach_lwp): Update comment.
6119 (attach_proc_task_lwp_callback): New function.
6120 (linux_attach): Adjust to rename and use
6121 linux_proc_attach_tgid_threads.
6122 (linux_attach_fail_reason_string): Delete declaration.
6124 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6126 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6127 * server.c (gdbserver_version): Likewise.
6129 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6131 * remote-utils.c: Include ctype.h.
6132 (input_interrupt): Explicitly handle the case when the char
6133 received is the NUL byte. Improve the printing of non-ASCII
6136 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6138 * linux-low.c (linux_low_filter_event): Update call to
6139 linux_enable_event_reporting following the addition of
6140 a new parameter to that function.
6142 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6145 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6146 (AARCH64_FPCR_REGNO): Likewise.
6147 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6148 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6149 (aarch64_store_fpregset): Likewise.
6151 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6153 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6154 Remove FIXME comment about assumption about N.
6156 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6158 * configure.ac: If large-file support is disabled in GDBserver,
6159 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6160 * configure: Regenerate.
6162 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6164 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6165 warning upon ENODATA from ptrace.
6166 * linux-s390-low.c (s390_store_tdb): New.
6167 (s390_regsets): Add regset for NT_S390_TDB.
6169 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6171 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6172 without a fill_function.
6173 * linux-s390-low.c (s390_fill_last_break): Remove.
6174 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6175 (s390_arch_setup): Use regset's size instead of fill_function for
6178 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6180 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6181 the regset's store function when ptrace returned an error.
6182 * regcache.c (get_thread_regcache): Invalidate register cache
6183 before fetching inferior's registers.
6185 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6187 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6188 while-loop as for-loop.
6189 (regsets_store_inferior_registers): Likewise.
6191 2014-11-28 Yao Qi <yao@codesourcery.com>
6193 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6194 * config.in, configure: Re-generate.
6195 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6198 2014-11-21 Yao Qi <yao@codesourcery.com>
6200 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6201 (AC_CHECK_HEADERS): Remove malloc.h.
6202 * configure: Re-generated.
6203 * config.in: Re-generated.
6204 * server.h: Don't include alloca.h and malloc.h.
6205 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6206 Don't include malloc.h.
6208 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6210 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6211 corresponding ERRNO check in same block.
6213 2014-11-12 Pedro Alves <palves@redhat.com>
6215 * server.c (cont_thread): Update comment.
6216 (start_inferior, attach_inferior): No longer clear cont_thread.
6217 (handle_v_cont): No longer set cont_thread.
6218 (captured_main): Clear cont_thread each time a GDB connects.
6220 2014-11-12 Pedro Alves <palves@redhat.com>
6222 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6223 thread, and don't resume all threads if the Hc thread has exited.
6225 2014-11-12 Pedro Alves <palves@redhat.com>
6227 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6228 the process group instead of to a specific LWP.
6230 2014-10-15 Pedro Alves <palves@redhat.com>
6233 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6235 (arm_set_thread_context): Delete.
6236 (the_low_target): Adjust.
6237 * win32-i386-low.c (debug_registers_changed)
6238 (debug_registers_used): Delete.
6239 (update_debug_registers_callback): New function.
6240 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6241 needing to update their debug registers.
6242 (win32_get_current_dr): New function.
6243 (x86_dr_low_get_addr, x86_dr_low_get_control)
6244 (x86_dr_low_get_status): Fetch the debug register from the thread
6246 (i386_initial_stuff): Adjust.
6247 (i386_get_thread_context): Remove current_event parameter. Don't
6248 clear debug_registers_changed nor copy DR values to
6250 (i386_set_thread_context): Delete.
6251 (i386_prepare_to_resume): New function.
6252 (i386_thread_added): Mark the thread as needing to update irs
6254 (the_low_target): Remove i386_set_thread_context and install
6255 i386_prepare_to_resume.
6256 * win32-low.c (win32_get_thread_context): Adjust.
6257 (win32_set_thread_context): Use SetThreadContext
6259 (win32_prepare_to_resume): New function.
6260 (win32_require_context): New function, factored out from ...
6261 (thread_rec): ... this.
6262 (continue_one_thread): Call win32_prepare_to_resume on each thread
6263 we're about to continue.
6264 (win32_resume): Call win32_prepare_to_resume on the event thread.
6265 * win32-low.h (struct win32_thread_info)
6266 <debug_registers_changed>: New field.
6267 (struct win32_target_ops): Change prototype of set_thread_context,
6268 delete set_thread_context and add prepare_to_resume.
6269 (win32_require_context): New declaration.
6271 2014-10-08 Gary Benson <gbenson@redhat.com>
6273 * server.h: Do not include common-exceptions.h.
6275 2014-10-08 Gary Benson <gbenson@redhat.com>
6277 * server.h: Do not include cleanups.h.
6279 2014-09-30 James Hogan <james.hogan@imgtec.com>
6281 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6284 2014-09-23 Yao Qi <yao@codesourcery.com>
6286 * linux-low.c (lp_status_maybe_breakpoint): New function.
6287 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6288 (count_events_callback): Likewise.
6289 (select_event_lwp_callback): Likewise.
6290 (cancel_breakpoints_callback): Likewise.
6292 2014-09-19 Don Breazeal <donb@codesourcery.com>
6294 * linux-low.c (handle_extended_wait): Call
6295 linux_ptrace_get_extended_event.
6296 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6297 linux_is_extended_waitstatus.
6299 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6301 * Makefile.in (CPPFLAGS): Define.
6302 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6303 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6305 2014-09-16 Gary Benson <gbenson@redhat.com>
6307 * inferiors.h (current_inferior): Renamed as...
6308 (current_thread): New variable. All uses updated.
6309 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6310 (maybe_move_out_of_jump_pad): Likewise.
6311 (cancel_breakpoint): Likewise.
6312 (linux_low_filter_event): Likewise.
6313 (wait_for_sigstop): Likewise.
6314 (linux_resume_one_lwp): Likewise.
6315 (need_step_over_p): Likewise.
6316 (start_step_over): Likewise.
6317 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6318 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6319 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6320 and save_inferior as saved_thread.
6321 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6323 (regcache_invalidate_thread): Likewise.
6324 * remote-utils.c (prepare_resume_reply): Likewise.
6325 * thread-db.c (thread_db_get_tls_address): Likewise.
6326 (disable_thread_event_reporting): Likewise.
6327 (remove_thread_event_breakpoints): Likewise.
6328 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6330 * target.h (set_desired_inferior): Renamed as...
6331 (set_desired_thread): New declaration. All uses updated.
6332 * server.c (myresume): Updated comment to reference thread instead
6334 (handle_serial_event): Likewise.
6335 (handle_target_event): Likewise.
6337 2014-09-12 Tom Tromey <tromey@redhat.com>
6338 Gary Benson <gbenson@redhat.com>
6340 * regcache.h: Include common-regcache.h.
6341 (regcache_read_pc): Don't declare.
6342 * regcache.c (get_thread_regcache_for_ptid): New function.
6344 2014-09-11 Tom Tromey <tromey@redhat.com>
6345 Gary Benson <gbenson@redhat.com>
6347 * symbol.c: New file.
6348 * Makefile.in (SFILES): Add symbol.c.
6349 (OBS): Add symbol.o.
6351 2014-09-11 Gary Benson <gbenson@redhat.com>
6353 * target.c (target_stop_ptid, target_continue_ptid): New
6356 2014-09-11 Tom Tromey <tromey@redhat.com>
6357 Gary Benson <gbenson@redhat.com>
6359 * target.h: Include target/target.h.
6360 * target.c (target_read_memory, target_read_uint32)
6361 (target_write_memory): New functions.
6363 2014-09-11 Gary Benson <gbenson@redhat.com>
6365 * server.h (debug_hw_points): Don't declare.
6366 * server.c (debug_hw_points): Don't define. Replace all uses
6367 with show_debug_regs.
6368 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6369 all uses with show_debug_regs.
6371 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6373 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6374 endianness into account.
6375 (ppc_supply_ptrace_register): Likewise.
6377 2014-09-03 James Hogan <james.hogan@imgtec.com>
6379 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6380 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6382 2014-09-03 Gary Benson <gbenson@redhat.com>
6384 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6385 ALL_DEBUG_ADDRESS_REGISTERS.
6387 2014-09-02 Gary Benson <gbenson@redhat.com>
6389 * i386-low.h: Renamed as...
6390 * x86-low.h: New file. All type, function and variable name
6391 prefixes changed from "i386_" to "x86_". All references updated.
6392 * i386-low.c: Renamed as...
6393 * x86-low.c: New file. All type, function and variable name
6394 prefixes changed from "i386_" to "x86_". All references updated.
6396 2014-09-02 Gary Benson <gbenson@redhat.com>
6398 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6399 (x86_linux_new_thread): Likewise.
6401 2014-08-29 Gary Benson <gbenson@redhat.com>
6403 * server.h (setjmp.h): Do not include.
6404 (toplevel): Do not declare.
6405 (common-exceptions.h): Include.
6406 (cleanups.h): Likewise.
6407 * server.c (toplevel): Do not define.
6408 (exit_code): New static global.
6409 (detach_or_kill_for_exit_cleanup): New function.
6410 (main): New function. Original main renamed to...
6411 (captured_main): New function.
6412 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6414 2014-08-29 Gary Benson <gbenson@redhat.com>
6416 * Makefile.in (SFILES): Add common/common-exceptions.c.
6417 (OBS): Add common-exceptions.o.
6418 (common-exceptions.o): New rule.
6419 * utils.c (prepare_to_throw_exception): New function.
6421 2014-08-29 Gary Benson <gbenson@redhat.com>
6423 * config.in: Regenerate.
6424 * configure: Likewise.
6426 2014-08-29 Gary Benson <gbenson@redhat.com>
6428 * Makefile.in (SFILES): Add common/cleanups.c.
6430 (cleanups.o): New rule.
6432 2014-08-29 Gary Benson <gbenson@redhat.com>
6434 * utils.c (internal_vwarning): New function.
6436 2014-08-28 Gary Benson <gbenson@redhat.com>
6438 * utils.h (fatal): Remove declaration.
6439 * utils.c (fatal): Remove function.
6441 2014-08-28 Gary Benson <gbenson@redhat.com>
6443 * tracepoint.c (gdb_agent_init): Replace fatal with
6445 (initialize_tracepoint): Likewise.
6447 2014-08-28 Gary Benson <gbenson@redhat.com>
6449 * remote-utils.c (remote_prepare): Replace fatal with error.
6451 2014-08-28 Gary Benson <gbenson@redhat.com>
6453 * linux-low.c (linux_async): Replace fatal with warning.
6455 (linux_start_non_stop): Return -1 if linux_async failed.
6457 2014-08-28 Gary Benson <gbenson@redhat.com>
6459 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6461 (i386_dr_low_get_addr): Remove vague comment.
6462 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6465 2014-08-28 Gary Benson <gbenson@redhat.com>
6467 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6468 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6470 (linux_resume_one_lwp): Likewise.
6471 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6473 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6474 with internal_error.
6475 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6476 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6477 (find_register_by_name): Replace fatal with internal_error.
6478 (find_regno): Likewise.
6479 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6480 * thread-db.c (thread_db_create_event): Likewise.
6481 (thread_db_load_search): Likewise.
6482 (try_thread_db_load_1): Likewise.
6483 * tracepoint.c (get_jump_space_head): Replace fatal with
6485 (claim_trampoline_space): Likewise.
6486 (have_fast_tracepoint_trampoline_buffer): Likewise.
6487 (cmd_qtstart): Likewise.
6488 (stop_tracing): Likewise.
6489 (fast_tracepoint_collecting): Likewise.
6490 (target_malloc): Likewise.
6491 (download_tracepoint): Likewise.
6492 (download_trace_state_variables): Replace check with gdb_assert.
6493 (upload_fast_traceframes): Replace fatal with internal_error.
6495 2014-08-19 Tom Tromey <tromey@redhat.com>
6496 Gary Benson <gbenson@redhat.com>
6498 * Makefile.in (SFILES): Add common/common-debug.c.
6499 (OBS): Add common-debug.o.
6500 (common-debug.o): New rule.
6501 * debug.h (debug_printf): Don't declare.
6502 * debug.c (debug_printf): Renamed and rewritten as...
6503 (debug_vprintf): New function.
6505 2014-08-19 Gary Benson <gbenson@redhat.com>
6507 * utils.h: Do not include print-utils.h.
6509 2014-08-19 Tom Tromey <tromey@redhat.com>
6510 Gary Benson <gbenson@redhat.com>
6512 * server.h: Add static assertion.
6513 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6515 2014-08-19 Tom Tromey <tromey@redhat.com>
6516 Gary Benson <gbenson@redhat.com>
6518 * Makefile.in (SFILES): Add common/errors.c.
6519 (OBS): Add errors.o.
6520 (IPA_OBS): Add errors-ipa.o.
6521 (errors.o): New rule.
6522 (errors-ipa.o): Likewise.
6523 * utils.h (perror_with_name, error, warning): Don't declare.
6524 * utils.c (warning): Renamed and rewritten as...
6525 (vwarning): New function.
6526 (error): Renamed and rewritten as...
6527 (verror): New function.
6528 (internal_error): Renamed and rewritten as...
6529 (internal_verror): New function.
6531 2014-08-07 Gary Benson <gbenson@redhat.com>
6533 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6534 * configure: Regenerate.
6535 * config.in: Likewise.
6536 * server.h: Do not include errno.h.
6537 * event-loop.c: Likewise.
6538 * hostio-errno.c: Likewise.
6539 * linux-low.c: Likewise.
6540 * remote-utils.c: Likewise.
6541 * spu-low.c: Likewise.
6542 * utils.c: Likewise.
6543 * gdbreplay.c: Unconditionally include errno.h.
6545 2014-08-07 Gary Benson <gbenson@redhat.com>
6547 * server.h: Do not include string.h.
6548 * event-loop.c: Likewise.
6549 * linux-low.c: Likewise.
6550 * regcache.c: Likewise.
6551 * remote-utils.c: Likewise.
6552 * spu-low.c: Likewise.
6553 * utils.c: Likewise.
6555 2014-08-07 Gary Benson <gbenson@redhat.com>
6557 * server.h: Do not include gdb_assert.h.
6559 2014-08-07 Gary Benson <gbenson@redhat.com>
6561 * server.h: Do not include common-utils.h.
6563 2014-08-07 Gary Benson <gbenson@redhat.com>
6565 * server.h: Do not include ptid.h.
6566 * notif.h: Likewise.
6568 2014-08-07 Gary Benson <gbenson@redhat.com>
6570 * server.h: Do not include gdb_locale.h.
6572 2014-08-07 Gary Benson <gbenson@redhat.com>
6574 * server.h: Do not include gdb/signals.h.
6575 * win32-low.c: Likewise.
6577 2014-08-07 Gary Benson <gbenson@redhat.com>
6579 * server.h: Do not include pathmax.h.
6581 2014-08-07 Gary Benson <gbenson@redhat.com>
6583 * server.h: Do not include libiberty.h.
6584 * linux-bfin-low.c: Likewise.
6586 2014-08-07 Gary Benson <gbenson@redhat.com>
6588 * server.h: Do not include ansidecl.h.
6590 2014-08-07 Gary Benson <gbenson@redhat.com>
6592 * linux-x86-low.c: Do not include stddef.h.
6593 * lynx-ppc-low.c: Likewise.
6594 * tracepoint.c: Likewise.
6596 2014-08-07 Gary Benson <gbenson@redhat.com>
6598 * server.h: Do not include stdarg.h.
6599 * nto-low.c: Likewise.
6601 2014-08-07 Gary Benson <gbenson@redhat.com>
6603 * server.h: Do not include stdlib.h.
6604 * inferiors.c: Likewise.
6605 * linux-low.c: Likewise.
6606 * regcache.c: Likewise.
6607 * spu-low.c: Likewise.
6608 * tracepoint.c: Likewise.
6609 * utils.c: Likewise.
6611 2014-08-07 Gary Benson <gbenson@redhat.com>
6613 * server.h: Do not include stdio.h.
6614 * linux-low.c: Likewise.
6615 * remote-utils.c: Likewise.
6616 * spu-low.c: Likewise.
6617 * utils.c: Likewise.
6618 * wincecompat.c: Likewise.
6620 2014-08-06 Gary Benson <gbenson@redhat.com>
6622 * regcache.c (init_register_cache): Move conditionals inside if.
6624 2014-08-06 Gary Benson <gbenson@redhat.com>
6626 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6628 2014-07-31 Gary Benson <gbenson@redhat.com>
6630 * ax.h: Do not include server.h.
6631 * gdbthread.h: Likewise.
6632 * lynx-low.h: Likewise.
6633 * notif.h: Likewise.
6635 2014-07-30 Gary Benson <gbenson@redhat.com>
6637 * server.h: Include common-defs.h.
6638 Do not include config.h or build-gnulib-gdbserver/config.h.
6640 2014-07-30 Gary Benson <gbenson@redhat.com>
6642 * hostio-errno.c: Move server.h to top of includes list.
6643 * inferiors.c: Likewise.
6644 * linux-x86-low.c: Likewise.
6645 * notif.c: Include server.h.
6647 2014-07-24 Tom Tromey <tromey@redhat.com>
6648 Gary Benson <gbenson@redhat.com>
6650 * server.h (CORE_ADDR): Now unsigned.
6652 2014-07-16 Pedro Alves <palves@redhat.com>
6654 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6656 2014-07-15 Pedro Alves <palves@redhat.com>
6658 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6661 2014-07-11 Pedro Alves <palves@redhat.com>
6663 * linux-low.c (kill_wait_lwp): New function, based on
6664 kill_one_lwp_callback, but use my_waitpid directly.
6665 (kill_one_lwp_callback, linux_kill): Use it.
6667 2014-06-23 Pedro Alves <palves@redhat.com>
6669 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6670 before setting DR0..DR3.
6672 2014-06-20 Gary Benson <gbenson@redhat.com>
6674 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6675 * configure: Regenerated.
6676 * config.in: Likewise.
6678 2014-06-20 Gary Benson <gbenson@redhat.com>
6680 * Makefile.in (SFILES): Update locations for files moved
6682 (object file files): Reordered.
6684 2014-06-20 Gary Benson <gbenson@redhat.com>
6686 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6687 (i386_dr_low_set_addr): Likewise.
6688 (i386_dr_low_get_addr): Likewise.
6689 (i386_dr_low_can_set_control): Likewise.
6690 (i386_dr_low_set_control): Likewise.
6691 (i386_dr_low_get_control): Likewise.
6692 (i386_dr_low_get_status): Likewise.
6693 (i386_get_debug_register_length): Likewise.
6694 * linux-x86-low.c (i386_dr_low_set_addr):
6695 Changed signature. Made static.
6696 (i386_dr_low_get_addr): Likewise.
6697 (i386_dr_low_set_control): Likewise.
6698 (i386_dr_low_get_control): Likewise.
6699 (i386_dr_low_get_status): Likewise.
6700 (i386_dr_low): New global variable.
6701 * win32-i386-low.c (i386_dr_low_set_addr):
6702 Changed signature. Made static.
6703 (i386_dr_low_get_addr): Likewise.
6704 (i386_dr_low_set_control): Likewise.
6705 (i386_dr_low_get_control): Likewise.
6706 (i386_dr_low_get_status): Likewise.
6707 (i386_dr_low): New global variable.
6709 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6711 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6712 * Makefile.in (AR, AR_FLAGS): Define.
6713 * configure: Regenerate.
6715 2014-06-19 Gary Benson <gbenson@redhat.com>
6717 * Makefile.in (i386-dregs.o): New rule.
6718 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6719 * i386-low.c (target.h): Remove include.
6720 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6721 (DR_CONTROL_SHIFT): Likewise.
6722 (DR_CONTROL_SIZE): Likewise.
6723 (DR_RW_EXECUTE): Likewise.
6724 (DR_RW_WRITE): Likewise.
6725 (DR_RW_READ): Likewise.
6726 (DR_RW_IORW): Likewise.
6727 (DR_LEN_1): Likewise.
6728 (DR_LEN_2): Likewise.
6729 (DR_LEN_4): Likewise.
6730 (DR_LEN_8): Likewise.
6731 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6732 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6733 (DR_ENABLE_SIZE): Likewise.
6734 (DR_LOCAL_SLOWDOWN): Likewise.
6735 (DR_GLOBAL_SLOWDOWN): Likewise.
6736 (DR_CONTROL_RESERVED): Likewise.
6737 (I386_DR_CONTROL_MASK): Likewise.
6738 (I386_DR_VACANT): Likewise.
6739 (I386_DR_LOCAL_ENABLE): Likewise.
6740 (I386_DR_GLOBAL_ENABLE): Likewise.
6741 (I386_DR_DISABLE): Likewise.
6742 (I386_DR_SET_RW_LEN): Likewise.
6743 (I386_DR_GET_RW_LEN): Likewise.
6744 (I386_DR_WATCH_HIT): Likewise.
6745 (i386_wp_op_t): Likewise.
6746 (i386_show_dr): Likewise.
6747 (i386_length_and_rw_bits): Likewise.
6748 (i386_insert_aligned_watchpoint): Likewise.
6749 (i386_remove_aligned_watchpoint): Likewise.
6750 (i386_handle_nonaligned_watchpoint): Likewise.
6751 i386_update_inferior_debug_regs(): Likewise.
6752 (i386_dr_insert_watchpoint): Likewise.
6753 (i386_dr_remove_watchpoint): Likewise.
6754 (i386_dr_region_ok_for_watchpoint): Likewise.
6755 (i386_dr_stopped_data_address): Likewise.
6756 (i386_dr_stopped_by_watchpoint): Likewise.
6758 2014-06-19 Gary Benson <gbenson@redhat.com>
6760 * i386-low.c (i386_dr_show): Renamed to
6761 i386_show_dr and made static. All uses updated.
6762 (i386_dr_length_and_rw_bits): Renamed to
6763 i386_length_and_rw_bits and made static.
6765 (i386_dr_insert_aligned_watchpoint): Renamed to
6766 i386_insert_aligned_watchpoint and made static.
6768 (i386_dr_remove_aligned_watchpoint): Renamed to
6769 i386_remove_aligned_watchpoint and made static.
6771 (i386_dr_update_inferior_debug_regs): Renamed to
6772 i386_update_inferior_debug_regs and made static.
6775 2014-06-18 Gary Benson <gbenson@redhat.com>
6777 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6778 (i386_dr_low_can_set_control): Likewise.
6779 (i386_get_debug_register_length): Likewise.
6780 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6781 (i386_dr_low_can_set_control): Likewise.
6782 (i386_get_debug_register_length): Likewise.
6784 2014-06-17 Gary Benson <gbenson@redhat.com>
6786 * i386-low.h (i386-dregs.h): New include.
6787 (DR_FIRSTADDR): Now in i386-dregs.h.
6788 (DR_LASTADDR): Likewise.
6789 (DR_NADDR): Likewise.
6790 (DR_STATUS): Likewise.
6791 (DR_CONTROL): Likewise.
6792 (i386_debug_reg_state): Likewise.
6793 (i386_dr_insert_watchpoint): Likewise.
6794 (i386_dr_remove_watchpoint): Likewise.
6795 (i386_dr_region_ok_for_watchpoint): Likewise.
6796 (i386_dr_stopped_data_address): Likewise.
6797 (i386_dr_stopped_by_watchpoint): Likewise.
6798 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6800 2014-06-18 Gary Benson <gbenson@redhat.com>
6802 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6803 i386_dr_insert_watchpoint.
6804 (i386_low_remove_watchpoint): Renamed to
6805 i386_dr_remove_watchpoint.
6806 (i386_low_region_ok_for_watchpoint): Renamed to
6807 i386_dr_region_ok_for_watchpoint.
6808 (i386_low_stopped_data_address): Renamed to
6809 i386_dr_stopped_data_address.
6810 (i386_low_stopped_by_watchpoint): Renamed to
6811 i386_dr_stopped_by_watchpoint.
6812 * i386-low.c (i386_show_dr): Renamed to
6813 i386_dr_show and made nonstatic. All uses updated.
6814 (i386_length_and_rw_bits): Renamed to
6815 i386_dr_length_and_rw_bits and made nonstatic.
6817 (i386_insert_aligned_watchpoint): Renamed to
6818 i386_dr_insert_aligned_watchpoint and made nonstatic.
6820 (i386_remove_aligned_watchpoint): Renamed to
6821 i386_dr_remove_aligned_watchpoint and made nonstatic.
6823 (i386_update_inferior_debug_regs): Renamed to
6824 i386_dr_update_inferior_debug_regs and made nonstatic.
6826 (i386_low_insert_watchpoint): Renamed to
6827 i386_dr_insert_watchpoint. All uses updated.
6828 (i386_low_remove_watchpoint): Renamed to
6829 i386_dr_remove_watchpoint. All uses updated.
6830 (i386_low_region_ok_for_watchpoint): Renamed to
6831 i386_dr_region_ok_for_watchpoint. All uses updated.
6832 (i386_low_stopped_data_address): Renamed to
6833 i386_dr_stopped_data_address. All uses updated.
6834 (i386_low_stopped_by_watchpoint): Renamed to
6835 i386_dr_stopped_by_watchpoint. All uses updated.
6837 2014-06-18 Gary Benson <gbenson@redhat.com>
6839 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6840 (i386_dr_low_can_set_control): Likewise.
6841 (i386_insert_aligned_watchpoint): New check.
6843 2014-06-18 Gary Benson <gbenson@redhat.com>
6845 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6848 2014-06-18 Gary Benson <gbenson@redhat.com>
6850 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6851 instead of fatal and error.
6852 (i386_handle_nonaligned_watchpoint): Likewise.
6854 2014-06-18 Gary Benson <gbenson@redhat.com>
6856 * i386-low.c (i386_get_debug_register_length): New macro.
6857 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6858 (i386_show_dr): Use debug_printf instead of fprintf. Use
6859 phex to format values.
6861 2014-06-18 Gary Benson <gbenson@redhat.com>
6863 * i386-low.h: Comment changes.
6864 * i386-low.c: Likewise.
6866 2014-06-18 Gary Benson <gbenson@redhat.com>
6868 * i386-low.c: Whitespace changes.
6870 2014-06-12 Tom Tromey <tromey@redhat.com>
6872 * utils.c (freeargv): Remove.
6874 2014-06-12 Tom Tromey <tromey@redhat.com>
6876 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6877 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6878 (parse_debug_format_options): Likewise.
6879 (gdbserver_usage): Likewise.
6880 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6881 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6882 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6884 ($(LIBGNU)): Depend on libiberty.
6885 (all-lib): Recurse into all subdirs.
6886 (install-only): Invoke "install" target in subdirs.
6887 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6889 * configure: Rebuild.
6890 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6891 for vasprintf, vsnprintf, or gettimeofday.
6892 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6895 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6897 * development.sh: Delete.
6898 * Makefile.in (config.status): Adjust dependency on development.sh.
6899 * configure.ac: Adjust development.sh source call.
6900 * configure: Regenerate.
6902 2014-06-02 Pedro Alves <palves@redhat.com>
6904 * ax.c (gdb_free_agent_expr): New function.
6905 * ax.h (gdb_free_agent_expr): New declaration.
6906 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6908 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6910 (clear_breakpoint_conditions_and_commands): New function.
6911 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6912 (clear_breakpoint_conditions_and_commands): New declaration.
6914 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6916 * linux-aarch64-low.c (asm/ptrace.h): Include.
6918 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6920 Fix TLS access for -static -pthread.
6921 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6922 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6923 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6925 2014-05-20 Pedro Alves <palves@redhat.com>
6927 * linux-aarch64-low.c (aarch64_insert_point)
6928 (aarch64_remove_point): No longer check whether the type is
6929 supported here. Adjust to new interface.
6930 (the_low_target): Install aarch64_supports_z_point_type as
6931 supports_z_point_type method.
6932 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6933 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6934 instead of a Z packet char. Adjust.
6935 (arm_supports_z_point_type): New function.
6936 (arm_insert_point, arm_remove_point): Adjust to new interface.
6937 (the_low_target): Install arm_supports_z_point_type.
6938 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6939 (cris_insert_point, cris_remove_point): Adjust to new interface.
6940 Don't check whether the type is supported here.
6941 (the_low_target): Install cris_supports_z_point_type.
6942 * linux-low.c (linux_supports_z_point_type): New function.
6943 (linux_insert_point, linux_remove_point): Adjust to new interface.
6944 * linux-low.h (struct linux_target_ops) <insert_point,
6945 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6946 raw_breakpoint pointer parameter.
6947 <supports_z_point_type>: New method.
6948 * linux-mips-low.c (mips_supports_z_point_type): New function.
6949 (mips_insert_point, mips_remove_point): Adjust to new interface.
6950 Use mips_supports_z_point_type.
6951 (the_low_target): Install mips_supports_z_point_type.
6952 * linux-ppc-low.c (the_low_target): Install NULL as
6953 supports_z_point_type method.
6954 * linux-s390-low.c (the_low_target): Install NULL as
6955 supports_z_point_type method.
6956 * linux-sparc-low.c (the_low_target): Install NULL as
6957 supports_z_point_type method.
6958 * linux-x86-low.c (x86_supports_z_point_type): New function.
6959 (x86_insert_point): Adjust to new insert_point interface. Use
6960 insert_memory_breakpoint. Adjust to new
6961 i386_low_insert_watchpoint interface.
6962 (x86_remove_point): Adjust to remove_point interface. Use
6963 remove_memory_breakpoint. Adjust to new
6964 i386_low_remove_watchpoint interface.
6965 (the_low_target): Install x86_supports_z_point_type.
6966 * lynx-low.c (lynx_target_ops): Install NULL as
6967 supports_z_point_type callback.
6968 * nto-low.c (nto_supports_z_point_type): New.
6969 (nto_insert_point, nto_remove_point): Adjust to new interface.
6970 (nto_target_ops): Install nto_supports_z_point_type.
6971 * mem-break.c: Adjust intro comment.
6972 (struct raw_breakpoint) <raw_type, size>: New fields.
6973 <inserted>: Update comment.
6974 <shlib_disabled>: Delete field.
6975 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6976 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6977 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6978 (raw_bkpt_type_to_target_hw_bp_type): New function.
6979 (find_enabled_raw_code_breakpoint_at): New function.
6980 (find_raw_breakpoint_at): New type and size parameters. Use them.
6981 (insert_memory_breakpoint): New function, based off
6982 set_raw_breakpoint_at.
6983 (remove_memory_breakpoint): New function.
6984 (set_raw_breakpoint_at): Reimplement.
6985 (set_breakpoint): New, based on set_breakpoint_at.
6986 (set_breakpoint_at): Reimplement.
6987 (delete_raw_breakpoint): Go through the_target->remove_point
6988 instead of assuming memory breakpoints.
6989 (find_gdb_breakpoint_at): Delete.
6990 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6991 (find_gdb_breakpoint): New function.
6992 (set_gdb_breakpoint_at): Delete.
6993 (z_type_supported): New function.
6994 (set_gdb_breakpoint_1): New function, loosely based off
6995 set_gdb_breakpoint_at.
6996 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6997 (delete_gdb_breakpoint_at): Delete.
6998 (delete_gdb_breakpoint_1): New function, loosely based off
6999 delete_gdb_breakpoint_at.
7000 (delete_gdb_breakpoint): New function.
7001 (clear_gdb_breakpoint_conditions): Rename to ...
7002 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7004 (add_condition_to_breakpoint): Make static.
7005 (add_breakpoint_condition): Take a struct breakpoint pointer
7006 instead of an address. Adjust.
7007 (gdb_condition_true_at_breakpoint): Rename to ...
7008 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7010 (gdb_condition_true_at_breakpoint): Reimplement.
7011 (add_breakpoint_commands): Take a struct breakpoint pointer
7012 instead of an address. Adjust.
7013 (gdb_no_commands_at_breakpoint): Rename to ...
7014 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7015 parameter. Return true if no breakpoint was found. Change debug
7017 (gdb_no_commands_at_breakpoint): Reimplement.
7018 (run_breakpoint_commands): Rename to ...
7019 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7020 and change return type to boolean.
7021 (run_breakpoint_commands): New function.
7022 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7023 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7024 breakpoint. Go through the_target->remove_point instead of
7025 assuming memory breakpoint.
7026 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7027 software and hardware breakpoints.
7028 (reinsert_raw_breakpoint): Go through the_target->insert_point
7029 instead of assuming memory breakpoint.
7030 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7031 software and hardware breakpoints.
7032 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7033 Check both software and hardware breakpoints.
7034 (validate_inserted_breakpoint): Assert the breakpoint is a
7035 software breakpoint. Set the inserted flag to -1 instead of
7036 setting shlib_disabled.
7037 (delete_disabled_breakpoints): Adjust.
7038 (validate_breakpoints): Only validate software breakpoints.
7039 Adjust to inserted flag change.
7040 (check_mem_read, check_mem_write): Skip breakpoint types other
7041 than software breakpoints. Adjust to inserted flag change.
7042 * mem-break.h (enum raw_bkpt_type): New enum.
7043 (raw_breakpoint, struct process_info): Forward declare.
7044 (Z_packet_to_target_hw_bp_type): Delete declaration.
7045 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7046 (set_gdb_breakpoint, delete_gdb_breakpoint)
7047 (clear_breakpoint_conditions): New declarations.
7048 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7049 (breakpoint_inserted_here): Update comment.
7050 (add_breakpoint_condition, add_breakpoint_commands): Replace
7051 address parameter with a breakpoint pointer parameter.
7052 (gdb_breakpoint_here): Update comment.
7053 (delete_gdb_breakpoint_at): Delete.
7054 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7055 * server.c (process_point_options): Take a struct breakpoint
7056 pointer instead of an address. Adjust.
7057 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7058 delete_gdb_breakpoint.
7059 * spu-low.c (spu_target_ops): Install NULL as
7060 supports_z_point_type method.
7061 * target.h: Include mem-break.h.
7062 (struct target_ops) <prepare_to_access_memory>: Update comment.
7063 <supports_z_point_type>: New field.
7064 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7065 instead of a char. Also take a raw breakpoint pointer.
7066 * win32-arm-low.c (the_low_target): Install NULL as
7067 supports_z_point_type.
7068 * win32-i386-low.c (i386_supports_z_point_type): New function.
7069 (i386_insert_point, i386_remove_point): Adjust to new interface.
7070 (the_low_target): Install i386_supports_z_point_type.
7071 * win32-low.c (win32_supports_z_point_type): New function.
7072 (win32_insert_point, win32_remove_point): Adjust to new interface.
7073 (win32_target_ops): Install win32_supports_z_point_type.
7074 * win32-low.h (struct win32_target_ops):
7075 <supports_z_point_type>: New method.
7076 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7077 instead of a char. Also take a raw breakpoint pointer.
7079 2014-05-20 Pedro Alves <palves@redhat.com>
7081 * mem-break.h: Include break-common.h.
7082 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7083 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7084 (Z_packet_to_target_hw_bp_type): New declaration.
7085 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7086 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7087 (Z_PACKET_ACCESS_WP): Delete macros.
7088 (Z_packet_to_hw_type): Delete function.
7089 * i386-low.h: Don't include break-common.h here.
7090 (Z_packet_to_hw_type): Delete declaration.
7091 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7092 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7093 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7094 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7095 * linux-aarch64-low.c: Don't include break-common.h here.
7096 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7097 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7098 (Z_packet_to_target_hw_bp_type): Delete function.
7099 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7101 (mips_insert_point, mips_remove_point): Use
7102 Z_packet_to_target_hw_bp_type.
7104 2014-05-20 Pedro Alves <palves@redhat.com>
7106 * linux-aarch64-low.c: Include break-common.h.
7107 (enum target_point_type): Delete.
7108 (Z_packet_to_point_type): Rename to ...
7109 (Z_packet_to_target_hw_bp_type): ... this, and return a
7110 target_hw_bp_type instead.
7111 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7112 instead of an enum target_point_type.
7113 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7115 (aarch64_dr_state_insert_one_point)
7116 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7117 (aarch64_handle_aligned_watchpoint)
7118 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7119 Take an enum target_hw_bp_type instead of an enum
7121 (aarch64_supports_z_point_type): New function.
7122 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7123 use Z_packet_to_target_hw_bp_type.
7125 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7127 * configure.ac: Only use -Werror by default when DEVELOPMENT
7129 * configure: Regenerate.
7131 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7133 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7134 * linux-x86-low.c (X86_64_USER_REGS): New.
7135 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7137 2014-04-28 Yao Qi <yao@codesourcery.com>
7139 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7142 2014-04-25 Pedro Alves <palves@redhat.com>
7145 * linux-low.c (linux_attach_fail_reason_string): New function.
7146 (linux_attach_lwp): Delete.
7147 (linux_attach_lwp_1): Rename to ...
7148 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7149 argument. Remove "initial" parameter. Return int instead of
7150 void. Don't error or warn here.
7151 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7152 failure to attach to the tgid. Call warning when failing to
7154 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7155 argument. Remove "initial" parameter. Return int instead of
7156 void. Don't error or warn here.
7157 (linux_attach_fail_reason_string): New declaration.
7158 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7159 interface change. Use linux_attach_fail_reason_string.
7161 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7162 Walfred Tedeschi <walfred.tedeschi@intel.com>
7164 * Makefile.in: Added rules to handle new files
7165 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7166 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7167 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7168 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7169 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7170 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7172 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7173 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7174 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7175 i386/x32-avx512.xml.
7176 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7177 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7178 i386/x32-avx512-linux.xml.
7179 * i387-fp.c (num_avx512_k_registers): New constant for number
7181 (num_avx512_zmmh_low_registers): New constant for number of
7182 lower ZMM registers (0-15).
7183 (num_avx512_zmmh_high_registers): New constant for number of
7184 higher ZMM registers (16-31).
7185 (num_avx512_ymmh_registers): New contant for number of higher
7186 YMM registers (ymm16-31 added by avx521 on x86_64).
7187 (num_avx512_xmm_registers): New constant for number of higher
7188 XMM registers (xmm16-31 added by AVX512 on x86_64).
7189 (struct i387_xsave): Add space for AVX512 registers.
7190 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7191 Add code to handle AVX512 registers.
7192 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7193 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7194 prototypei from generated file.
7195 (tdesc_amd64_avx512_linux): Likewise.
7196 (init_registers_x32_avx512_linux): Likewise.
7197 (tdesc_x32_avx512_linux): Likewise.
7198 (init_registers_i386_avx512_linux): Likewise.
7199 (tdesc_i386_avx512_linux): Likewise.
7200 (x86_64_regmap): Add AVX512 registers.
7201 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7203 (initialize_low_arch): Add code to initialize AVX512 registers.
7205 2014-04-23 Pedro Alves <palves@redhat.com>
7207 * mem-break.c (find_gdb_breakpoint_at): Make static.
7208 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7210 2014-04-23 Pedro Alves <palves@redhat.com>
7212 * i386-low.c: Don't include break-common.h here.
7213 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7214 prototype to take target_hw_bp_type as argument instead of a Z
7216 * i386-low.h: Include break-common.h here.
7217 (Z_packet_to_hw_type): Declare.
7218 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7220 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7221 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7222 (x86_remove_point): Convert the packet number to a
7223 target_hw_bp_type before calling i386_low_remove_watchpoint.
7224 * win32-i386-low.c (i386_insert_point): Convert the packet number
7225 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7226 (i386_remove_point): Convert the packet number to a
7227 target_hw_bp_type before calling i386_low_remove_watchpoint.
7229 2014-04-23 Pedro Alves <palves@redhat.com>
7231 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7233 2014-04-10 Pedro Alves <palves@redhat.com>
7235 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7236 Check if the condition or command is NULL before checking if the
7237 breakpoint is known. On success, return true.
7238 * mem-break.h (add_breakpoint_condition): Document return.
7239 (add_breakpoint_commands): Add describing comment.
7240 * server.c (skip_to_semicolon): New function.
7241 (process_point_options): Use it.
7243 2014-04-09 Pedro Alves <palves@redhat.com>
7245 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7248 2014-02-27 Pedro Alves <palves@redhat.com>
7251 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7253 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7255 (last_thread_of_process_p): Take a PID argument instead of a
7257 (linux_wait_for_lwp): Delete.
7258 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7260 (linux_low_filter_event): New function, party factored out from
7261 linux_wait_for_event.
7262 (linux_wait_for_event): Rename to ...
7263 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7264 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7265 sigsuspend. Check for zombie leaders.
7266 (linux_wait_for_event): Reimplement as wrapper around
7267 linux_wait_for_event_filtered.
7268 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7269 a normal or signal exit is seen, it's the whole process exiting.
7270 (wait_for_sigstop): No longer a for_each_inferior callback.
7271 Rewrite on top of linux_wait_for_event_filtered.
7272 (stop_all_lwps): Call wait_for_sigstop directly.
7273 * server.c (resume, handle_target_event): Handle
7274 TARGET_WAITKIND_NO_RESUMED.
7276 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7278 * win32-low.c (psapi_get_dll_name,
7279 * win32_CreateToolhelp32Snapshot): Delete.
7280 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7281 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7283 (handle_load_dll): Add function description.
7284 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7286 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7288 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7290 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7291 base address when calling win32_add_one_solib.
7292 (handle_load_dll): Delete local variable load_addr.
7293 Remove 0x1000 offset applied to DLL base address when calling
7294 win32_add_one_solib.
7295 (handle_unload_dll): Add comment.
7297 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7299 * win32-low.c (win32_add_all_dlls): Renames
7300 win32_ensure_ntdll_loaded. Rewrite function documentation.
7301 Adjust implementation to always load all DLLs.
7302 Add 0x1000 offset to DLL base address when calling
7303 win32_add_one_solib.
7304 (child_initialization_done): New static global.
7305 (do_initial_child_stuff): Set child_initialization_done to
7306 zero during child initialization, and 1 after. Replace call
7307 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7309 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7310 (handle_unload_dll): Add function documentation.
7311 (get_child_debug_event): Ignore load and unload DLL events
7312 during child initialization.
7314 2014-02-20 Doug Evans <dje@google.com>
7316 Remove global all_lwps.
7317 * inferiors.h (ptid_of): Move here from linux-low.h.
7318 (pid_of, lwpid_of): Ditto.
7319 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7320 parameter is a struct thread_info * now.
7321 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7322 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7323 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7325 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7326 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7327 * linux-arm-low.c (update_registers_callback): Update, "entry"
7328 parameter is a struct thread_info * now.
7329 Fetch lwpid from current_inferior directly.
7330 (arm_insert_point): Pass &all_threads to find_inferior instead of
7332 (arm_remove_point): Ditto.
7333 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7334 (arm_prepare_to_resume): Fetch pid from thread.
7335 (arm_read_description): Fetch lwpid from current_inferior directly.
7336 * linux-low.c (all_lwps): Delete.
7337 (delete_lwp): Delete call to remove_inferior.
7338 (handle_extended_wait): Fetch lwpid from thread.
7339 (add_lwp): Don't set lwp->entry.id. Remove call to
7340 add_inferior_to_list.
7341 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7342 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7343 (kill_one_lwp_callback): Ditto.
7344 (linux_kill): Don't dereference NULL pointer.
7345 Fetch ptid,lwpid from thread.
7346 (get_detach_signal): Fetch ptid from thread.
7347 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7348 Simplify call to regcache_invalidate_thread.
7349 (delete_lwp_callback): Update, "entry" parameter is a
7350 struct thread_info * now. Fetch pid from thread.
7351 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7352 (status_pending_p_callback): Update, "entry" parameter is a
7353 struct thread_info * now. Fetch ptid from thread.
7354 (find_lwp_pid): Update, "entry" parameter is a
7355 struct thread_info * now.
7356 (linux_wait_for_lwp): Fetch pid from thread.
7357 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7358 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7359 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7360 (dequeue_one_deferred_signal): Ditto.
7361 (cancel_breakpoint): Fetch ptid from current_inferior.
7362 (linux_wait_for_event): Pass &all_threads to find_inferior,
7363 not &all_lwps. Fetch ptid, lwpid from thread.
7364 (count_events_callback): Update, "entry" parameter is a
7365 struct thread_info * now.
7366 (select_singlestep_lwp_callback): Ditto.
7367 (select_event_lwp_callback): Ditto.
7368 (cancel_breakpoints_callback): Ditto.
7369 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7371 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7372 (unsuspend_one_lwp): Update, "entry" parameter is a
7373 struct thread_info * now.
7374 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7376 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7377 Fetch lwpid from thread, not lwp.
7378 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7379 Pass &all_threads to find_inferior, not &all_lwps.
7380 (send_sigstop): Fetch lwpid from thread, not lwp.
7381 (send_sigstop_callback): Update, "entry" parameter is a
7382 struct thread_info * now.
7383 (suspend_and_send_sigstop_callback): Ditto.
7384 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7385 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7386 struct thread_info * now.
7387 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7389 (lwp_running): Update, "entry" parameter is a
7390 struct thread_info * now.
7391 (stop_all_lwps): Fetch ptid from thread.
7392 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7393 (linux_resume_one_lwp): Fetch lwpid from thread.
7394 (linux_set_resume_request): Update, "entry" parameter is a
7395 struct thread_info * now. Fetch pid, lwpid from thread.
7396 (resume_status_pending_p): Update, "entry" parameter is a
7397 struct thread_info * now.
7398 (need_step_over_p): Ditto. Fetch lwpid from thread.
7399 (start_step_over): Fetch lwpid from thread.
7400 (linux_resume_one_thread): Update, "entry" parameter is a
7401 struct thread_info * now. Fetch lwpid from thread.
7402 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7403 (proceed_one_lwp): Update, "entry" parameter is a
7404 struct thread_info * now. Fetch lwpid from thread.
7405 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7406 struct thread_info * now.
7407 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7408 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7409 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7411 (regsets_store_inferior_registers): Ditto.
7412 (fetch_register, store_register): Ditto.
7413 (linux_read_memory, linux_write_memory): Ditto.
7414 (linux_request_interrupt): Ditto.
7415 (linux_read_auxv): Ditto.
7416 (linux_xfer_siginfo): Ditto.
7417 (linux_qxfer_spu): Ditto.
7418 (linux_qxfer_libraries_svr4): Ditto.
7419 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7420 moved to inferiors.h.
7422 (get_thread_lwp): Update.
7423 (struct lwp_info): Delete member "entry". Simplify comment for
7426 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7427 current_inferior directly.
7428 (update_watch_registers_callback): Update, "entry" parameter is a
7429 struct thread_info * now. Fetch pid from thread.
7430 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7431 (mips_insert_point): Fetch lwpid from current_inferior.
7432 Pass &all_threads to find_inferior, not &all_lwps.
7433 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7434 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7436 (mips_stopped_data_address): Ditto.
7437 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7439 * linux-tile-low.c (tile_arch_setup): Ditto.
7440 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7441 (update_debug_registers_callback): Update, "entry" parameter is a
7442 struct thread_info * now. Fetch pid from thread.
7443 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7444 Pass &all_threads to find_inferior, not &all_lwps.
7445 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7446 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7447 Pass &all_threads to find_inferior, not &all_lwps.
7448 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7449 (i386_dr_low_get_status): Ditto.
7450 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7451 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7452 (x86_linux_read_description): Ditto.
7453 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7455 2014-02-20 Doug Evans <dje@google.com>
7457 * inferiors.c (get_first_inferior): Fix buglet.
7459 2014-02-19 Doug Evans <dje@google.com>
7461 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7462 * inferiors.c (add_thread): Change result type to struct thread_info *.
7463 All callers updated.
7464 (add_lwp): Call add_thread here instead of in callers.
7465 All callers updated.
7466 * linux-low.h (get_lwp_thread): Rewrite.
7467 (struct lwp_info): New member "thread".
7469 2014-02-19 Doug Evans <dje@google.com>
7471 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7472 All callers updated.
7474 2014-02-19 Doug Evans <dje@google.com>
7476 * inferiors.c (add_thread): Fix whitespace.
7478 2014-02-19 Doug Evans <dje@google.com>
7480 * dll.c (clear_dlls): Replace accessing list implemention details
7482 * gdbthread.h (get_first_thread): Declare.
7483 * inferiors.c (for_each_inferior_with_data): New function.
7484 (get_first_thread): New function.
7485 (find_thread_ptid): Simplify.
7486 (get_first_inferior): New function.
7487 (clear_list): Delete.
7488 (one_inferior_p): New function.
7489 (clear_inferior_list): New function.
7490 (clear_inferiors): Update.
7491 * inferiors.h (for_each_inferior_with_data): Declare.
7492 (clear_inferior_list): Declare.
7493 (one_inferior_p): Declare.
7494 (get_first_inferior): Declare.
7495 * linux-low.c (linux_wait_for_event): Replace accessing list
7496 implemention details with API function.
7497 * server.c (target_running): Ditto.
7498 (accumulate_file_name_length): New function.
7499 (emit_dll_description): New function.
7500 (handle_qxfer_libraries): Replace accessing list implemention
7501 details with API function.
7502 (handle_qxfer_threads_worker): New function.
7503 (handle_qxfer_threads_proper): Replace accessing list implemention
7504 details with API function.
7505 (handle_query): Ditto.
7506 (visit_actioned_threads_callback_ftype): New typedef.
7507 (visit_actioned_threads_data): New struct.
7508 (visit_actioned_threads): Rewrite to be find_inferior callback.
7509 (resume): Call find_inferior.
7510 (handle_status): Replace accessing list implemention
7511 details with API function.
7512 (process_serial_event): Replace accessing list implemention details
7514 * target.c (set_desired_inferior): Replace accessing list implemention
7515 details with API function.
7516 * tracepoint.c (same_process_p): New function.
7517 (gdb_agent_about_to_close): Replace accessing list implemention
7518 details with API function.
7519 * win32-low.c (child_delete_thread): Replace accessing list
7520 implemention details with API function.
7521 (match_dll_by_basename): New function.
7522 (dll_is_loaded_by_basename): New function.
7523 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7524 details call to dll_is_loaded_by_basename.
7526 2014-02-19 Doug Evans <dje@google.com>
7528 * dll.h (struct dll_info): Add comment.
7529 * gdbthread.h (struct thread_info): Add comment.
7530 (current_ptid): Simplify.
7531 * inferiors.c (add_process): Update.
7532 (remove_process): Update.
7533 * inferiors.h (struct process_info): Rename member "head" to "entry".
7534 * linux-low.c (delete_lwp): Update.
7536 (last_thread_of_process_p): Update.
7537 (kill_one_lwp_callback, linux_kill): Update.
7538 (status_pending_p_callback): Update.
7539 (wait_for_sigstop): Update. Simplify read of ptid.
7540 (start_step_over): Update.
7541 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7542 (get_lwp_thread): Update.
7543 (struct lwp_info): Rename member "head" to "entry".
7544 * regcache.h (inferior_list_entry): Delete.
7545 * server.c (kill_inferior_callback): Update.
7546 (detach_or_kill_inferior_callback): Update.
7547 (print_started_pid): Update.
7548 (print_attached_pid): Update.
7549 (process_serial_event): Simplify read of ptid.
7550 * thread-db.c (thread_db_create_event): Update.
7551 (thread_db_get_tls_address): Update.
7552 * win32-low.c (current_inferior_ptid): Simplify.
7554 2014-02-19 Tom Tromey <tromey@redhat.com>
7556 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7558 (target_supports_btrace): Update.
7560 2014-02-14 Yao Qi <yao@codesourcery.com>
7562 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7563 (rsp-low-ipa.o): New target.
7565 2014-02-12 Tom Tromey <tromey@redhat.com>
7567 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7568 convert_ascii_to_int.
7569 * regcache.c (registers_to_string): Likewise.
7570 * remote-utils.c (decode_M_packet): Likewise.
7571 * server.c (process_serial_event): Likewise.
7573 2014-02-12 Tom Tromey <tromey@redhat.com>
7575 * server.c (handle_query, handle_v_run): Use hex2bin, not
7577 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7579 2014-02-12 Tom Tromey <tromey@redhat.com>
7581 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7582 convert_int_to_ascii.
7583 * regcache.c (registers_to_string, collect_register_as_string):
7585 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7587 * server.c (process_serial_event): Likewise.
7588 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7589 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7591 2014-02-12 Tom Tromey <tromey@redhat.com>
7593 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7594 bin2hex, not hexify.
7595 * tracepoint.c (cmd_qtstatus): Likewise.
7597 2014-02-12 Tom Tromey <tromey@redhat.com>
7599 * remote-utils.c (monitor_output): Pass explicit length to
7602 2014-02-12 Tom Tromey <tromey@redhat.com>
7604 * tracepoint.c: Include rsp-low.h.
7605 * server.c: Include rsp-low.h.
7606 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7607 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7609 * remote-utils.c: Include rsp-low.h.
7610 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7611 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7612 (convert_int_to_ascii, convert_ascii_to_int): Move to
7614 * regcache.c: Include rsp-low.h.
7615 * ax.c: Include rsp-low.h.
7616 * Makefile.in (SFILES): Add common/rsp-low.c.
7617 (OBS): Add rsp-low.o.
7618 (rsp-low.o): New target.
7620 2014-02-12 Tom Tromey <tromey@redhat.com>
7622 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7623 Include print-utils.h.
7624 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7625 (plongest, thirty_two, phex_nz): Remove.
7626 * Makefile.in (SFILES): Add common/print-utils.c.
7627 (OBS): Add print-utils.o.
7628 (print-utils-ipa.o): New target.
7629 (print-utils.o): New target.
7630 (IPA_OBJS): Add print-utils-ipa.o.
7632 2014-02-06 Tom Tromey <tromey@redhat.com>
7634 * Makefile.in (SFILES): Fix indentation.
7636 2014-02-05 Doug Evans <dje@google.com>
7638 * linux-low.c (linux_wait_for_event): Improve comment.
7639 (linux_wait_1): Keep current_inferior in sync with event_child.
7641 2014-01-22 Doug Evans <dje@google.com>
7643 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7645 2014-01-22 Doug Evans <dje@google.com>
7647 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7648 * configure: Regenerate.
7649 * config.in: Regenerate.
7650 * Makefile.in (SFILES): Add debug.c.
7652 * debug.c: New file.
7653 * debug.h: New file.
7654 * linux-aarch64-low.c (*): Update all debugging printfs to use
7655 debug_printf instead of fprintf.
7656 * linux-arm-low.c (*): Ditto.
7657 * linux-cris-low.c (*): Ditto.
7658 * linux-crisv32-low.c (*): Ditto.
7659 * linux-m32r-low.c (*): Ditto.
7660 * linux-sparc-low.c (*): Ditto.
7661 * linux-x86.c (*): Ditto.
7662 * linux-low.c (*): Ditto.
7663 (linux_wait_1): Add calls to debug_enter, debug_exit.
7664 (linux_wait): Remove redundant debugging printf.
7665 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7666 (linux_resume, unstop_all_lwps): Ditto.
7667 * mem-break.c (*): Update all debugging printfs to use
7668 debug_printf instead of fprintf.
7669 * remote-utils.c (*): Ditto.
7670 * thread-db.c (*): Ditto.
7671 * server.c #include <ctype.h>, "gdb_vecs.h".
7672 (debug_threads): Moved to debug.c.
7673 (*): Update all debugging printfs to use debug_printf instead of
7675 (start_inferior): Replace call to fflush with call to debug_flush.
7676 (monitor_show_help): Mention set debug-format.
7677 (parse_debug_format_options): New function.
7678 (handle_monitor_command): Handle "monitor set debug-format".
7679 (gdbserver_usage): Mention --debug-format.
7680 (main): Parse --debug-format.
7681 * server.h (debug_threads): Declaration moved to debug.h.
7683 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7684 trace_debug_1 that uses debug_printf.
7685 (tracepoint_look_up_symbols): Update all debugging printfs to use
7686 debug_printf instead of fprintf.
7688 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7690 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7693 2014-01-17 Pedro Alves <palves@redhat.com>
7696 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7697 defined after including gdb_proc_service.h.
7699 2014-01-16 Doug Evans <dje@google.com>
7701 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7702 (match_dll): Use it.
7704 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7706 * target.h (target_ops) <read_btrace>: Change parameters and
7707 return type to allow error reporting.
7708 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7709 trace reading errors on.
7710 * linux-low.c (linux_low_read_btrace): Pass trace reading
7712 (linux_low_disable_btrace): New.
7714 2014-01-15 Doug Evans <dje@google.com>
7716 * inferiors.c (thread_id_to_gdb_id): Delete.
7717 * inferiors.h (thread_id_to_gdb_id): Delete.
7719 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7721 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7722 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7725 2014-01-08 Pedro Alves <palves@redhat.com>
7727 * server.c (handle_status): Don't discard previous queued stop
7728 replies or thread's pending status here.
7729 (main) <disconnection>: Do it here instead.
7731 2014-01-08 Pedro Alves <palves@redhat.com>
7733 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7734 * server.c (visit_actioned_threads, handle_pending_status): New
7736 (handle_v_cont): Factor out parts to ...
7737 (resume): ... this new function. If in all-stop, and a thread
7738 being resumed has a pending status, report it without actually
7740 (myresume): Adjust to use the new 'resume' function.
7741 (clear_pending_status_callback, set_pending_status_callback)
7742 (find_status_pending_thread_callback): New functions.
7743 (handle_status): Handle the case of multiple threads having
7744 interesting statuses to report. Report threads' real last signal
7745 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7746 with an interesting thread to report the status for, instead of
7747 always reporting the status of the first thread.
7749 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7751 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7752 * gdbreplay.c (gdbreplay_version): Likewise.
7754 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7756 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7757 iov.iov_len with the real length in use.
7759 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7761 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7762 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7763 for all targets that use win32-low.c.
7764 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7765 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7767 2013-12-13 Pedro Alves <palves@redhat.com>
7769 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7770 if equal to TARGET_WAITKIND_LOADED.
7771 * win32-low.c (cached_status): New static global.
7772 (win32_wait): Add declaration.
7773 (do_initial_child_stuff): Flush all initial pending debug events
7774 up to the initial breakpoint.
7775 (win32_wait): If CACHED_STATUS was set, return that instead
7776 of doing a real wait. Remove the code resuming the execution
7777 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7778 during the initial phase. Also remove the code changing
7779 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7780 TARGET_WAITKIND_STOPPED.
7782 2013-12-11 Yao Qi <yao@codesourcery.com>
7784 * notif.c (handle_notif_ack): Return 0 if no notification
7787 2013-11-20 Doug Evans <dje@google.com>
7789 * linux-low.c (linux_set_resume_request): Fix comment.
7791 2013-11-20 Doug Evans <dje@google.com>
7793 * linux-low.c (resume_status_pending_p): Tweak comment.
7795 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7797 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7798 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7799 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7800 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7801 (srv_amd64_regobj): Add amd64-mpx.o.
7802 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7803 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7804 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7805 * i387-fp.c (num_pl_bnd_register) Added constant.
7806 (num_pl_bnd_cfg_registers) Added constant.
7807 (struct i387_xsave) Added reserved area and MPX fields.
7808 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7809 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7811 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7812 (init_registers_amd64_mpx_linux): Declare new function.
7813 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7814 (x86_64_regmap): Add MPX registers.
7815 (x86_linux_read_description): Add MPX case.
7816 (initialize_low_arch): Initialize MPX targets.
7818 2013-11-18 Tom Tromey <tromey@redhat.com>
7820 * configure: Rebuild.
7821 * configure.ac: Don't check for stdlib.h.
7822 * gdbreplay.c: Unconditionally include stdlib.h.
7824 2013-11-18 Tom Tromey <tromey@redhat.com>
7826 * config.in: Rebuild.
7827 * configure: Rebuild.
7828 * configure.ac: Don't use AC_HEADER_DIRENT.
7830 2013-11-18 Tom Tromey <tromey@redhat.com>
7832 * server.h: Don't check HAVE_STRING_H.
7833 * gdbreplay.c: Don't check HAVE_STRING_H.
7834 * configure: Rebuild.
7836 2013-11-18 Tom Tromey <tromey@redhat.com>
7838 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7841 2013-11-08 Tom Tromey <tromey@redhat.com>
7843 * configure, config.in: Rebuild.
7844 * configure.ac: Remove unused configury.
7846 2013-11-08 Tom Tromey <tromey@redhat.com>
7848 * acinclude.m4: Include common.m4, codeset.m4.
7849 * configure, config.in: Rebuild.
7850 * configure.ac: Use GDB_AC_COMMON.
7852 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7854 * linux-s390-low.c (HWCAP_S390_TE): New define.
7855 (s390_arch_setup): Consider the TE field in the HWCAP for
7856 determining 'have_regset_tdb'.
7858 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7861 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7864 2013-10-02 Pedro Alves <palves@redhat.com>
7866 * server.c (process_serial_event): Don't output "GDBserver
7867 exiting" if GDB is connected through stdio.
7868 * target.c (mywait): Likewise, be silent if GDB is connected
7871 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7873 * lynx-low.c (lynx_add_threads_after_attach): New function.
7874 (lynx_attach): Remove call to add_thread. Add call to
7875 lynx_add_threads_after_attach instead.
7877 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7879 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7880 * config.in, configure: Regenerated.
7882 2013-09-18 Yao Qi <yao@codesourcery.com>
7885 * server.c (start_inferior): Clear 'resume_info'.
7887 2013-09-16 Jiong Wang <jiwang@tilera.com>
7889 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7892 2013-09-16 Jiong Wang <jiwang@tilera.com>
7894 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7895 linux-tile-low.o to srv_tgtobj.
7897 2013-09-16 Will Newton <will.newton@linaro.org>
7899 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7902 2013-09-06 Pedro Alves <palves@redhat.com>
7904 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7905 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7906 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7907 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7908 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7909 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7911 2013-09-06 Pedro Alves <palves@redhat.com>
7913 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7914 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7916 2013-09-06 Pedro Alves <palves@redhat.com>
7918 * linux-amd64-ipa.c: Include tracepoint.h.
7919 * linux-i386-ipa.c: Include tracepoint.h.
7921 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7923 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7924 (ps_get_thread_area): New function.
7926 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7928 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7929 (initialize_low_arch): Call init_registers_crisv32 rather than
7930 init_register_crisv32.
7932 2013-09-05 Pedro Alves <palves@redhat.com>
7934 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7936 * hostio.h: ... this new file.
7937 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7938 win32-low.c: Include hostio.h.
7940 2013-09-05 Pedro Alves <palves@redhat.com>
7942 * server.h (gdb_client_data, handler_func, callback_handler_func)
7943 (delete_file_handler, add_file_handler, append_callback_event)
7944 (delete_callback_event, start_event_loop, initialize_event_loop):
7945 Move to event-loop.h and include it.
7946 * event-loop.h: New file.
7948 2013-09-05 Pedro Alves <palves@redhat.com>
7950 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7951 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7952 (loaded_dll, unloaded_dll): Move to ...
7953 * dll.h: ... this new file.
7954 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7956 2013-09-05 Pedro Alves <palves@redhat.com>
7958 * server.h (current_process, get_thread_process, all_processes)
7959 (add_inferior_to_list, for_each_inferior, current_inferior)
7960 (remove_inferior, add_process, remove_process, find_process_pid)
7961 (have_started_inferiors_p, have_attached_inferiors_p)
7962 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7963 (clear_inferiors, find_inferior, find_inferior_id)
7964 (inferior_target_data, set_inferior_target_data)
7965 (inferior_regcache_data, set_inferior_regcache_data): Move to
7966 inferiors.h, and include it.
7967 * inferiors.h: New file.
7969 2013-09-05 Pedro Alves <palves@redhat.com>
7971 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7975 2013-09-05 Pedro Alves <palves@redhat.com>
7977 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7979 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7980 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7981 (handle_tracepoint_general_set, handle_tracepoint_query)
7982 (tracepoint_finished_step, tracepoint_was_hit)
7983 (release_while_stepping_state_list, current_traceframe)
7984 (in_readonly_region, traceframe_read_mem)
7985 (fetch_traceframe_registers, traceframe_read_sdata)
7986 (traceframe_read_info, struct fast_tpoint_collect_status)
7987 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7988 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7989 (supply_fast_tracepoint_registers)
7990 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7991 (ipa_tdesc, claim_trampoline_space)
7992 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7993 (agent_mem_read, agent_get_trace_state_variable_value)
7994 (agent_set_trace_state_variable_value, agent_tsv_read)
7995 (agent_mem_read_string, get_raw_reg_func_addr)
7996 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7997 * tracepoint.h: ... this new file.
7999 2013-09-05 Pedro Alves <palves@redhat.com>
8001 * server.h (perror_with_name, error, fatal, warning, paddress)
8002 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8004 * utils.h: New file.
8006 2013-09-05 Pedro Alves <palves@redhat.com>
8008 * server.h (remote_debug, noack_mode, transport_is_reliable)
8009 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8010 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8011 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8012 (write_enn, initialize_async_io, enable_async_io)
8013 (disable_async_io, check_remote_input_interrupt_request)
8014 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8015 (dead_thread_notify, prepare_resume_reply)
8016 (decode_address_to_semicolon, decode_address, decode_m_packet)
8017 (decode_M_packet, decode_X_packet, decode_xfer_write)
8018 (decode_search_memory_packet, unhexify, hexify)
8019 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8020 (look_up_one_symbol, relocate_instruction)
8021 (monitor_output): Move to remote-utils.h, and include it.
8022 * remote-utils.h: New file.
8024 2013-09-05 Pedro Alves <palves@redhat.com>
8026 * server.h (_): Delete.
8028 2013-09-02 Pedro Alves <palves@redhat.com>
8030 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8031 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8033 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8035 2013-09-02 Pierre Muller <muller@sourceware.org>
8037 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8038 or WriteProcessMemory complete successfully and handle
8039 ERROR_PARTIAL_COPY error.
8041 2013-09-02 Pedro Alves <palves@redhat.com>
8043 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8044 error instead of EIO.
8046 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8049 * linux-low.c: Include filestuff.h.
8050 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8051 * lynx-low.c: Include filestuff.h.
8052 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8053 * server.c: Include filestuff.h.
8054 (main): Call notice_open_fds.
8055 * spu-low.c: Include filestuff.h.
8056 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8058 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8060 * Makefile.in: Explain why ../target and ../nat are not
8061 listed as include file search paths.
8062 (linux-waitpid.o): New object file rule.
8063 * configure.srv (srv_native_linux_obj): New variable.
8064 Replace all occurrences of linux native object files with
8065 $srv_native_linux_obj.
8066 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8067 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8068 (linux_enable_event_reporting): Remove declaration.
8069 (my_waitpid): Moved to common/linux-waitpid.c.
8070 (linux_wait_for_event): Pass ptid when calling
8071 linux_enable_event_reporting.
8072 (linux_supports_tracefork_flag): Remove.
8073 (linux_enable_event_reporting): Likewise.
8074 (linux_tracefork_grandchild): Remove.
8075 (STACK_SIZE): Moved to common/linux-ptrace.c.
8076 (linux_tracefork_child): Remove.
8077 (linux_test_for_tracefork): Remove.
8078 (linux_look_up_symbols): Call linux_supports_traceclone.
8079 (initialize_low): Remove call to linux_test_for_tracefork.
8080 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8081 common/linux-ptrace.h.
8082 (PTRACE_TYPE_ARG4): Likewise.
8083 Include linux-ptrace.h.
8085 2013-08-21 Pedro Alves <palves@redhat.com>
8087 * config.in: Renegerate.
8089 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8091 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8092 (SFILES): Remove $(srcdir)/common/target-common.c and
8093 add $(srcdir)/target/waitstatus.c.
8094 (OBS): Remove target-common.o and add waitstatus.o.
8095 (server_h): Remove $(srcdir)/../common/target-common.h and
8096 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8097 and $(srcdir)/../target/waitstatus.h.
8098 (target-common.o): Remove.
8099 (waitstatus.o): New target object file.
8100 * target.h: Do not include target-common.h and
8101 include target/resume.h, target/wait.h and
8102 target/waitstatus.h.
8104 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8106 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8107 to PTRACE_TYPE_ARG3.
8108 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8109 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8111 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8112 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8114 2013-07-27 Jie Zhang <jie@codesourcery.com>
8115 Daniel Jacobowitz <dan@codesourcery.com>
8116 Yao Qi <yao@codesourcery.com>
8118 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8119 (mips-linux-watch.o): New rule.
8120 (mips_linux_watch_h): New variable.
8121 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8123 * linux-mips-low.c: Include mips-linux-watch.h.
8124 (struct arch_process_info, struct arch_lwp_info): New.
8125 (update_watch_registers_callback): New function.
8126 (mips_linux_new_process, mips_linux_new_thread) New functions.
8127 (mips_linux_prepare_to_resume, mips_insert_point): New
8129 (mips_remove_point, mips_stopped_by_watchpoint): New
8131 (rsp_bp_type_to_target_hw_bp_type): New function.
8132 (mips_stopped_data_address): New function.
8133 (the_low_target): Add watchpoint support functions.
8135 2013-07-27 Yao Qi <yao@codesourcery.com>
8137 * i386-low.c: Include break-common.h.
8138 (enum target_hw_bp_type): Remove.
8140 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8142 * Makefile.in (SFILES): /common/target-common.c.
8143 (OBS): Add target-common.o.
8144 (server_h): Add $(srcdir)/../common/target-common.h.
8145 (target-common.o): New target.
8146 * server.c (queue_stop_reply_callback): Free
8147 status string after use.
8148 * target.c (target_waitstatus_to_string): Remove.
8149 * target.h: Include target-common.h.
8150 (resume_kind): Likewise.
8151 (target_waitkind): Likewise.
8152 (target_waitstatus): Likewise.
8153 (TARGET_WNOHANG): Likewise.
8155 2013-07-04 Yao Qi <yao@codesourcery.com>
8157 * Makefile.in (host_alias): Use @host_noncanonical@.
8158 (target_alias): Use @target_noncanonical@.
8159 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8160 ACX_NONCANONICAL_HOST.
8161 * configure: Regenerated.
8164 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8166 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8167 * configure: Rebuild.
8168 * Makefile.in (version_host, version_target): Get from configure.
8169 (version.c): Use $(version_host) and $(version_target).
8171 2013-07-03 Pedro Alves <palves@redhat.com>
8173 * Makefile.in (config.status): Depend on development.sh.
8174 * acinclude.m4: Include libmcheck.m4.
8175 * configure: Regenerate.
8177 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8179 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8180 attribute inside the parentheses.
8181 (winapi_DebugSetProcessKillOnExit): Ditto.
8182 (winapi_DebugBreakProcess): Ditto.
8183 (winapi_GenerateConsoleCtrlEvent): Ditto.
8185 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8187 * notif.h (notif_event): Add a dummy member to avoid compiler
8190 2013-07-01 Pedro Alves <palves@redhat.com>
8192 * hostio.c (HOSTIO_PATH_MAX): Define.
8193 (require_filename, handle_open, handle_unlink, handle_readlink):
8196 2013-07-01 Pedro Alves <palves@redhat.com>
8198 * server.h: Include "pathmax.h".
8199 * linux-low.c: Don't include sys/param.h.
8200 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8202 * win32-low.c: Don't include sys/param.h.
8203 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8205 2013-07-01 Pedro Alves <palves@redhat.com>
8207 * event-loop.c: Don't check HAVE_UNISTD_H before including
8209 * gdbreplay.c: Likewise.
8210 * remote-utils.c: Likewise.
8211 * server.c: Likewise.
8212 * configure.ac: Don't check for unistd.h.
8213 * configure: Regenerate.
8215 2013-06-28 Tom Tromey <tromey@redhat.com>
8217 * Makefile.in (version.c): Use version.in, not
8220 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8222 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8223 * configure: Rebuild.
8224 * Makefile.in (version_host, version_target): Get from configure.
8225 (version.c): Use $(version_host) and $(version_target).
8227 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8229 Fix trace-status to output user name without trailing colon.
8230 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8232 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8234 Fix trace-status to output proper start-time and stop-time.
8235 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8236 output start time and stop time in hex as gdb expects.
8238 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8240 * tracepoint.c (build_traceframe_info_xml): Output trace state
8241 variables present in the trace buffer.
8243 2013-06-24 Tom Tromey <tromey@redhat.com>
8245 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8247 (version.o): Remove.
8248 * gdbreplay.c: Include version.h.
8249 (version, host_name): Don't declare.
8250 * server.h: Include version.h.
8251 (version, host_name): Don't declare.
8253 2013-06-12 Pedro Alves <palves@redhat.com>
8255 * linux-x86-low.c (linux_is_elf64): Delete global.
8256 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8257 with local linux_pid_exe_is_elf_64_file use.
8259 2013-06-11 Pedro Alves <palves@redhat.com>
8261 * linux-low.c (regset_disabled, disable_regset): New functions.
8262 (regsets_fetch_inferior_registers)
8263 (regsets_store_inferior_registers): Use them.
8264 (initialize_regsets_info); Don't allocate the disabled_regsets
8266 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8269 2013-06-11 Pedro Alves <palves@redhat.com>
8271 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8274 2013-06-11 Pedro Alves <palves@redhat.com>
8276 * linux-x86-low.c (initialize_low_arch): Call
8277 init_registers_x32_avx_linux.
8279 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8281 Fix compatibility with Android Bionic.
8282 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8285 2013-06-07 Pedro Alves <palves@redhat.com>
8288 * Makefile.in (OBS): Add tdesc.o.
8289 (IPA_OBJS): Add tdesc-ipa.o.
8290 (tdesc-ipa.o): New rule.
8291 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8293 * linux-low.c (new_inferior): Delete.
8294 (disabled_regsets, num_regsets): Delete.
8295 (linux_add_process): Adjust to set the new per-process
8297 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8298 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8299 was a stop. When calling arch_setup, switch the current inferior
8300 to the thread that got an event.
8301 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8302 (regsets_fetch_inferior_registers)
8303 (regsets_store_inferior_registers): New regsets_info parameter.
8305 (linux_register_in_regsets): New regs_info parameter. Adjust to
8307 (register_addr, fetch_register, store_register): New usrregs_info
8308 parameter. Adjust to use it.
8309 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8310 parameter regs_info. Adjust to use it.
8311 (linux_fetch_registers): Get the current inferior's regs_info, and
8313 (linux_store_registers): Ditto.
8314 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8315 (initialize_low): Don't initialize the target_regsets here. Call
8316 initialize_low_arch.
8317 * linux-low.h (target_regsets): Delete declaration.
8318 (struct regsets_info): New.
8319 (struct usrregs_info): New.
8320 (struct regs_info): New.
8321 (struct process_info_private) <new_inferior>: New field.
8322 (struct linux_target_ops): Delete the num_regs, regmap, and
8323 regset_bitmap fields. New field regs_info.
8324 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8325 * i387-fp.c (num_xmm_registers): Delete.
8326 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8327 calls to new interface.
8328 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8329 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8330 Infer the number of xmm registers from the regcache's target
8332 * i387-fp.h (num_xmm_registers): Delete.
8333 * inferiors.c (add_thread): Don't install the thread's regcache
8335 * proc-service.c (gregset_info): Fetch the current inferior's
8336 regs_info. Adjust to use it.
8337 * regcache.c: Include tdesc.h.
8338 (register_bytes, reg_defs, num_registers)
8339 (gdbserver_expedite_regs): Delete.
8340 (get_thread_regcache): If the thread doesn't have a regcache yet,
8341 create one, instead of aborting gdbserver.
8342 (regcache_invalidate_one): Rename to ...
8343 (regcache_invalidate_thread): ... this.
8344 (regcache_invalidate_one): New.
8345 (regcache_invalidate): Only invalidate registers of the current
8347 (init_register_cache): Add target_desc parameter, and use it.
8348 (new_register_cache): Ditto. Assert the target description has a
8349 non zero registers_size.
8350 (regcache_cpy): Add assertions. Adjust.
8351 (realloc_register_cache, set_register_cache): Delete.
8352 (registers_to_string, registers_from_string): Adjust.
8353 (find_register_by_name, find_regno, find_register_by_number)
8354 (register_cache_size): Add target_desc parameter, and use it.
8355 (free_register_cache_thread, free_register_cache_thread_one)
8356 (regcache_release, register_cache_size): New.
8357 (register_size): Add target_desc parameter, and use it.
8358 (register_data, supply_register, supply_register_zeroed)
8359 (supply_regblock, supply_register_by_name, collect_register)
8360 (collect_register_as_string, collect_register_by_name): Adjust.
8361 * regcache.h (struct target_desc): Forward declare.
8362 (struct regcache) <tdesc>: New field.
8363 (init_register_cache, new_register_cache): Add target_desc
8365 (regcache_invalidate_thread): Declare.
8366 (regcache_invalidate_one): Delete declaration.
8367 (regcache_release): Declare.
8368 (find_register_by_number, register_cache_size, register_size)
8369 (find_regno): Add target_desc parameter.
8370 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8372 * remote-utils.c: Include tdesc.h.
8373 (outreg, prepare_resume_reply): Adjust.
8374 * server.c: Include tdesc.h.
8375 (gdbserver_xmltarget): Delete declaration.
8376 (get_features_xml, process_serial_event): Adjust.
8377 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8379 (struct process_info) <tdesc>: New field.
8380 (ipa_tdesc): Declare.
8381 * tdesc.c: New file.
8382 * tdesc.h: New file.
8383 * tracepoint.c: Include tdesc.h.
8384 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8385 (get_context_regcache): Adjust to pass ipa_tdesc down.
8386 (do_action_at_tracepoint): Adjust to get the register cache size
8387 from the context regcache's description.
8388 (traceframe_walk_blocks): Adjust to get the register cache size
8389 from the current trace frame's description.
8390 (traceframe_get_pc): Adjust to get current trace frame's
8391 description and pass it down.
8392 (gdb_collect): Adjust to get the register cache size from the
8394 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8395 (gdbserver_xmltarget): Delete.
8396 (initialize_low_tracepoint): Set the ipa's target description.
8397 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8398 (initialize_low_tracepoint): Set the ipa's target description.
8399 * linux-x86-low.c: Include tdesc.h.
8400 [__x86_64__] (is_64bit_tdesc): New.
8401 (ps_get_thread_area, x86_get_thread_area): Use it.
8402 (i386_cannot_store_register): Rename to ...
8403 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8404 (i386_cannot_fetch_register): Rename to ...
8405 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8406 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8408 (target_regsets): Rename to ...
8409 (x86_regsets): ... this.
8410 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8412 (x86_siginfo_fixup): Use is_64bit_tdesc.
8413 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8414 (tdesc_x32_avx_linux, tdesc_x32_linux)
8415 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8417 (x86_linux_update_xmltarget): Delete.
8418 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8419 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8420 (AMD64_LINUX_USER64_CS): New.
8421 (x86_linux_read_description): New, based on
8422 x86_linux_update_xmltarget.
8423 (same_process_callback): New.
8424 (x86_arch_setup_process_callback): New.
8425 (x86_linux_update_xmltarget): New.
8426 (x86_regsets_info): New.
8427 (amd64_linux_regs_info): New.
8428 (i386_linux_usrregs_info): New.
8429 (i386_linux_regs_info): New.
8430 (x86_linux_regs_info): New.
8431 (x86_arch_setup): Reimplement.
8432 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8433 (x86_emit_ops): Ditto.
8434 (the_low_target): Adjust. Install x86_linux_regs_info,
8435 x86_cannot_fetch_register, and x86_cannot_store_register.
8436 (initialize_low_arch): New.
8437 * linux-ia64-low.c (tdesc_ia64): Declare.
8438 (ia64_fetch_register): Adjust.
8439 (ia64_usrregs_info, regs_info): New globals.
8440 (ia64_regs_info): New function.
8441 (the_low_target): Adjust.
8442 (initialize_low_arch): New function.
8443 * linux-sparc-low.c (tdesc_sparc64): Declare.
8444 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8446 (sparc_arch_setup): New function.
8447 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8448 (the_low_target): Adjust.
8449 (initialize_low_arch): New function.
8450 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8451 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8452 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8453 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8454 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8455 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8456 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8457 (tdesc_powerpc_isa205_vsx64l): Declare.
8458 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8459 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8460 (ppc_set_pc, ppc_get_hwcap): Adjust.
8461 (ppc_usrregs_info): Forward declare.
8462 (!__powerpc64__) ppc_regmap_adjusted: New global.
8463 (ppc_arch_setup): Adjust to the current process'es target
8465 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8466 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8467 (ppc_store_evrregset): Adjust.
8468 (target_regsets): Rename to ...
8469 (ppc_regsets): ... this, and make static.
8470 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8471 (ppc_regs_info): New function.
8472 (the_low_target): Adjust.
8473 (initialize_low_arch): New function.
8474 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8475 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8476 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8477 (tdesc_s390x_linux64v2): Declare.
8478 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8479 (s390_fill_gregset, s390_store_last_break): Adjust.
8480 (target_regsets): Rename to ...
8481 (s390_regsets): ... this, and make static.
8482 (s390_get_pc, s390_set_pc): Adjust.
8483 (s390_get_hwcap): New target_desc parameter, and use it.
8484 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8485 (s390_arch_setup): Adjust to set the current process'es target
8486 description. Don't adjust the regmap.
8487 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8488 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8489 (regs_info_3264): New globals.
8490 (s390_regs_info): New function.
8491 (the_low_target): Adjust.
8492 (initialize_low_arch): New function.
8493 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8494 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8495 [__mips64] (init_registers_mips_linux)
8496 (init_registers_mips_dsp_linux): Delete defines.
8497 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8498 (have_dsp): New global.
8499 (mips_read_description): New, based on mips_arch_setup.
8500 (mips_arch_setup): Reimplement.
8501 (get_usrregs_info): New function.
8502 (mips_cannot_fetch_register, mips_cannot_store_register)
8503 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8504 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8505 (target_regsets): Rename to ...
8506 (mips_regsets): ... this, and make static.
8507 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8508 (dsp_regs_info, regs_info): New globals.
8509 (mips_regs_info): New function.
8510 (the_low_target): Adjust.
8511 (initialize_low_arch): New function.
8512 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8513 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8515 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8516 (arm_read_description): New, with bits factored from
8518 (arm_arch_setup): Reimplement.
8519 (target_regsets): Rename to ...
8520 (arm_regsets): ... this, and make static.
8521 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8522 (arm_regs_info): New function.
8523 (the_low_target): Adjust.
8524 (initialize_low_arch): New function.
8525 * linux-m68k-low.c (tdesc_m68k): Declare.
8526 (target_regsets): Rename to ...
8527 (m68k_regsets): ... this, and make static.
8528 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8529 (m68k_regs_info): New function.
8530 (m68k_arch_setup): New function.
8531 (the_low_target): Adjust.
8532 (initialize_low_arch): New function.
8533 * linux-sh-low.c (tdesc_sharch): Declare.
8534 (target_regsets): Rename to ...
8535 (sh_regsets): ... this, and make static.
8536 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8537 (sh_regs_info, sh_arch_setup): New functions.
8538 (the_low_target): Adjust.
8539 (initialize_low_arch): New function.
8540 * linux-bfin-low.c (tdesc_bfin): Declare.
8541 (bfin_arch_setup): New function.
8542 (bfin_usrregs_info, regs_info): New globals.
8543 (bfin_regs_info): New function.
8544 (the_low_target): Adjust.
8545 (initialize_low_arch): New function.
8546 * linux-cris-low.c (tdesc_cris): Declare.
8547 (cris_arch_setup): New function.
8548 (cris_usrregs_info, regs_info): New globals.
8549 (cris_regs_info): New function.
8550 (the_low_target): Adjust.
8551 (initialize_low_arch): New function.
8552 * linux-cris-low.c (tdesc_crisv32): Declare.
8553 (cris_arch_setup): New function.
8554 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8555 (cris_regs_info): New function.
8556 (the_low_target): Adjust.
8557 (initialize_low_arch): New function.
8558 * linux-m32r-low.c (tdesc_m32r): Declare.
8559 (m32r_arch_setup): New function.
8560 (m32r_usrregs_info, regs_info): New globals.
8561 (m32r_regs_info): Adjust.
8562 (initialize_low_arch): New function.
8563 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8564 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8565 (tic6x_usrregs_info): Forward declare.
8566 (tic6x_read_description): New function, based on ...
8567 (tic6x_arch_setup): ... this. Reimplement.
8568 (target_regsets): Rename to ...
8569 (tic6x_regsets): ... this, and make static.
8570 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8571 (tic6x_regs_info): New function.
8572 (the_low_target): Adjust.
8573 (initialize_low_arch): New function.
8574 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8575 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8576 (target_regsets): Rename to ...
8577 (xtensa_regsets): ... this, and make static.
8578 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8580 (xtensa_arch_setup, xtensa_regs_info): New functions.
8581 (the_low_target): Adjust.
8582 (initialize_low_arch): New function.
8583 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8584 (nios2_arch_setup): Set the current process'es tdesc.
8585 (target_regsets): Rename to ...
8586 (nios2_regsets): ... this.
8587 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8588 (nios2_regs_info): New function.
8589 (the_low_target): Adjust.
8590 (initialize_low_arch): New function.
8591 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8592 (aarch64_arch_setup): Set the current process'es tdesc.
8593 (target_regsets): Rename to ...
8594 (aarch64_regsets): ... this.
8595 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8596 (aarch64_regs_info): New function.
8597 (the_low_target): Adjust.
8598 (initialize_low_arch): New function.
8599 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8601 (target_regsets): Rename to ...
8602 (tile_regsets): ... this.
8603 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8604 (tile_regs_info): New function.
8605 (tile_arch_setup): Set the current process'es tdesc.
8606 (the_low_target): Adjust.
8607 (initialize_low_arch): New function.
8608 * spu-low.c (tdesc_spu): Declare.
8609 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8610 * win32-arm-low.c (tdesc_arm): Declare.
8611 (arm_arch_setup): New function.
8612 (the_low_target): Install arm_arch_setup instead of
8614 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8615 (init_windows_x86): Rename to ...
8616 (i386_arch_setup): ... this. Set `win32_tdesc'.
8617 (the_low_target): Adjust.
8618 * win32-low.c (win32_tdesc): New global.
8619 (child_add_thread): Don't create the thread cache here.
8620 (do_initial_child_stuff): Set the new process'es tdesc.
8621 * win32-low.h (struct target_desc): Forward declare.
8622 (win32_tdesc): Declare.
8623 * lynx-i386-low.c (tdesc_i386): Declare global.
8624 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8625 * lynx-low.c (lynx_tdesc): New global.
8626 (lynx_add_process): Set the new process'es tdesc.
8627 * lynx-low.h (struct target_desc): Forward declare.
8628 (lynx_tdesc): Declare global.
8629 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8630 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8631 * nto-low.c (nto_tdesc): New global.
8632 (do_attach): Set the new process'es tdesc.
8633 * nto-low.h (struct target_desc): Forward declare.
8634 (nto_tdesc): Declare.
8635 * nto-x86-low.c (tdesc_i386): Declare.
8636 (nto_x86_arch_setup): Set `nto_tdesc'.
8638 2013-06-04 Gary Benson <gbenson@redhat.com>
8640 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8641 to qSupported response when appropriate.
8642 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8643 with nonzero-length annex.
8644 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8645 arguments supplied in annex.
8647 2013-05-31 Doug Evans <dje@google.com>
8650 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8651 64 bits in 64-cross-32 environment.
8653 2013-05-28 Pedro Alves <palves@redhat.com>
8655 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8656 (aarch64-without-fpu.c): Delete rule.
8657 * configure.srv (aarch64*-*-linux*): Remove references to
8658 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8659 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8662 2013-05-24 Pedro Alves <palves@redhat.com>
8664 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8665 instead of strchr/decode_address. Error if the range isn't split
8666 with a ','. Don't assume there's be a ':' in the action.
8668 2013-05-23 Yao Qi <yao@codesourcery.com>
8669 Pedro Alves <palves@redhat.com>
8671 * linux-low.c (lwp_in_step_range): New function.
8672 (linux_wait_1): If the thread was range stepping and stopped
8673 outside the stepping range, report the stop to GDB. Otherwise,
8674 continue stepping. Add range stepping debug output.
8675 (linux_set_resume_request): Copy the step range from the resume
8677 (linux_supports_range_stepping): New.
8678 (linux_target_ops) <supports_range_stepping>: Set to
8679 linux_supports_range_stepping.
8680 * linux-low.h (struct linux_target_ops)
8681 <supports_range_stepping>: New field.
8682 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8683 * linux-x86-low.c (x86_supports_range_stepping): New.
8684 (the_low_target) <supports_range_stepping>: Set to
8685 x86_supports_range_stepping.
8686 * server.c (handle_v_cont): Handle 'r' action.
8687 (handle_v_requests): Append ";r" if the target supports range
8689 * target.h (struct thread_resume) <step_range_start,
8690 step_range_end>: New fields.
8691 (struct target_ops) <supports_range_stepping>:
8693 (target_supports_range_stepping): New macro.
8695 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8697 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8698 confusion in comment.
8700 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8702 * lynx-low.c (struct process_info_private): New type.
8703 (lynx_add_process): New function.
8704 (lynx_create_inferior, lynx_attach): Replace calls to
8705 add_process by calls to lynx_add_process.
8706 (lynx_resume): If PTID is null, then try using
8707 current_process()->private->last_wait_event_ptid.
8709 (lynx_clear_inferiors): Delete. The contents of that function
8710 has been inlined in lynx_mourn;
8711 (lynx_wait_1): Save the ptid in the process's private data.
8712 (lynx_mourn): Free the process' private data. Replace call
8713 to lynx_clear_inferiors by call to clear_inferiors.
8715 2013-05-17 Yao Qi <yao@codesourcery.com>
8717 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8720 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8722 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8723 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8724 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8725 PT_TEXT_END_ADDR guards. Update comments.
8726 (linux_target_op) <read_offsets>: Conditionally define to
8727 linux_read_offsets if the target is UCLIBC and if it defines
8728 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8730 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8731 Andrew Jenner <andrew@codesourcery.com>
8733 * Makefile.in (SFILES): Add linux-nios2-low.c.
8734 (clean): Add action to delete nios2-linux.c.
8735 (nios2-linux.c): New rule.
8736 * configure.srv: Add nios2*-*-linux*.
8737 * linux-nios2-low.c: New.
8739 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8741 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8743 2013-04-25 Hui Zhu <hui@codesourcery.com>
8746 * ax.c (ax_printf): Add fflush.
8748 2013-04-22 Tom Tromey <tromey@redhat.com>
8750 * Makefile.in (SFILES): Add filestuff.c.
8751 (OBS): Add filestuff.o.
8752 (filestuff.o): New target.
8753 * config.in, configure: Rebuild.
8754 * configure.ac: Check for fdwalk, pipe2.
8756 2013-04-17 Pedro Alves <palves@redhat.com>
8758 * configure.ac (USE_THREAD_DB): Delete variable.
8759 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8760 Don't AC_SUBST USE_THREAD_DB.
8761 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8762 * config.in, configure: Regenerate.
8764 2013-04-16 Pedro Alves <palves@redhat.com>
8766 * linux-low.h (struct lwp_info) <thread_known>: Move under
8767 the USE_THREAD_DB #ifdef.
8769 2013-04-16 Pedro Alves <palves@redhat.com>
8771 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8772 (linux-low.o): Delete rule.
8773 * linux-low.h: Always include "gdb_thread_db.h" instead of
8774 conditionally including thread_db.h.
8775 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8778 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8780 * Makefile.in (install-only): Fix make install regression.
8782 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8784 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8785 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8787 * gdbserver.1: Remove.
8789 2013-03-22 Pedro Alves <palves@redhat.com>
8791 * linux-low.c (handle_extended_wait): Don't call
8792 linux_enable_event_reporting.
8794 2013-03-15 Tony Theodore <tonyt@logyst.com>
8797 * Makefile.in (SHELL): Use @SHELL@.
8799 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8801 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8804 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8806 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8807 Remove extraneous NULL element.
8809 2013-03-13 Yao Qi <yao@codesourcery.com>
8811 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8812 'V' block in trace frame.
8814 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8816 * target.h (struct target_ops): Add btrace ops.
8817 (target_supports_btrace): New macro.
8818 (target_enable_btrace): New macro.
8819 (target_disable_btrace): New macro.
8820 (target_read_btrace): New macro.
8821 * gdbthread.h (struct thread_info): Add btrace field.
8822 * server.c: Include btrace-common.h.
8823 (handle_btrace_general_set): New function.
8824 (handle_btrace_enable): New function.
8825 (handle_btrace_disable): New function.
8826 (handle_general_set): Call handle_btrace_general_set.
8827 (handle_qxfer_btrace): New function.
8828 (struct qxfer qxfer_packets[]): Add btrace entry.
8829 * inferiors.c (remove_thread): Disable btrace.
8830 * linux-low: Include linux-btrace.h.
8831 (linux_low_enable_btrace): New function.
8832 (linux_low_read_btrace): New function.
8833 (linux_target_ops): Add btrace ops.
8834 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8835 Add srv_linux_btrace=yes.
8836 (x86_64-*-linux*): Add linux-btrace.o.
8837 Add srv_linux_btrace=yes.
8838 * configure.ac: Define HAVE_LINUX_BTRACE.
8839 * config.in: Regenerated.
8840 * configure: Regenerated.
8842 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8844 * server.c (handle_qxfer): Preserve error message if -3 is
8846 (qxfer): Document the -3 return value.
8848 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8850 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8851 (linux_btrace_h): New variable.
8852 (linux-btrace.o): New rule.
8854 2013-03-08 Stan Shebs <stan@codesourcery.com>
8855 Hafiz Abid Qadeer <abidh@codesourcery.com>
8857 * tracepoint.c (trace_buffer_size): New global.
8858 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8859 (init_trace_buffer): Change to one-argument function. Allocate
8860 trace buffer memory.
8861 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8862 handle QTBuffer:size packet.
8863 (cmd_bigqtbuffer_size): New function.
8864 (initialize_tracepoint): Call init_trace_buffer with
8865 DEFAULT_TRACE_BUFFER_SIZE.
8866 * server.c (handle_query): Add QTBuffer:size in the
8869 2013-03-07 Yao Qi <yao@codesourcery.com>
8871 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8872 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8874 (cmd_qtsp): Adjust condition. Do post increment.
8875 Set cur_action and cur_step_action back to 0.
8877 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8880 * linux-low.c (linux_write_memory): Return early success if LEN is
8883 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8885 * configure.srv: Add x86_64-*-cygwin* as target.
8887 2013-02-28 Tom Tromey <tromey@redhat.com>
8889 * configure.ac: Invoke AC_SYS_LARGEFILE.
8890 * configure, config.in: Rebuild.
8892 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8894 * win32-low.c: Throughout, fix format strings and casts of
8895 printf-like functions to avoid type related warnings on all
8897 (get_child_debug_event): Print dwDebugEventCode as hex since
8898 that's how it's usually documented.
8900 2013-02-28 Yao Qi <yao@codesourcery.com>
8902 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8905 2013-02-27 Jiong Wang <jiwang@tilera.com>
8907 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8908 (reg-tilegx32.c): New rule.
8909 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8910 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8911 different register info initializer according to elf class.
8912 (init_registers_tilgx32): New function. The tilegx32 register info
8914 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8915 (tile_store_gregset): Likewise.
8917 2013-02-27 Yao Qi <yao@codesourcery.com>
8919 * server.c (process_point_options): Print debug message when
8920 debug_threads is true.
8922 2013-02-26 Yao Qi <yao@codesourcery.com>
8924 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8926 2013-02-19 Pedro Alves <palves@redhat.com>
8927 Kai Tietz <ktietz@redhat.com>
8931 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8932 instead of strtoul to extract address from packet.
8933 (process_serial_event) <'z'>: Likewise.
8935 2013-02-18 Yao Qi <yao@codesourcery.com>
8937 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8939 2013-02-14 Pedro Alves <palves@redhat.com>
8943 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8944 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8946 2013-02-14 Pedro Alves <palves@redhat.com>
8948 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8950 2013-02-14 Pedro Alves <palves@redhat.com>
8952 * tracepoint.c (save_string): Delete.
8953 (add_tracepoint_action): Use savestring instead of save_string.
8955 2013-02-12 Pedro Alves <palves@redhat.com>
8957 * linux-xtensa-low.c: Ditto.
8958 * xtensa-xtregs.c: Ditto.
8960 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8962 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8965 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8967 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8968 aarch64_num_wp_regs and aarch64_num_bp_regs to
8969 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8971 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8973 * linux-aarch64-low.c (ps_get_thread_area): Replace
8974 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8976 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8977 Marcus Shawcroft <marcus.shawcroft@arm.com>
8978 Nigel Stephens <nigel.stephens@arm.com>
8979 Yufeng Zhang <yufeng.zhang@arm.com>
8981 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8982 (aarch64.c, aarch64-without-fpu.c): New targets.
8983 * configure.srv (aarch64*-*-linux*): New.
8984 * linux-aarch64-low.c: New file.
8986 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8988 * linux-low.c (handle_extended_wait, linux_create_inferior)
8989 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8990 (dequeue_one_deferred_signal, linux_resume_one_thread)
8991 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8992 (linux_tracefork_grandchild, linux_test_for_tracefork)
8993 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8994 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8995 where the argument is 0.
8997 2013-01-25 Yao Qi <yao@codesourcery.com>
8999 * event-loop.c: Include "queue.h".
9000 (gdb_event_p): New typedef.
9001 (struct gdb_event) <next_event>: Remove.
9002 (event_queue): Change to QUEUE(gdb_event_p).
9003 (async_queue_event): Remove.
9004 (gdb_event_xfree): New.
9005 (initialize_event_loop): New.
9006 (process_event): Use API from QUEUE.
9007 (wait_for_event): Likewise.
9008 * server.c (main): Call initialize_event_loop.
9009 * server.h (initialize_event_loop): Declare.
9011 2013-01-18 Yao Qi <yao@codesourcery.com>
9013 * ax.h (struct eval_agent_expr_context): New.
9014 (gdb_eval_agent_expr): Update declaration.
9015 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9016 TFRAME. Add new argument CTX.
9017 * server.h (struct eval_agent_expr_context): Declare.
9018 (agent_mem_read, agent_tsv_read): Update declaration.
9019 (agent_mem_read_string): Likewise.
9020 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9021 (add_traceframe_block): Add new argument TPOINT.
9022 Increase TPOINT->traceframe_usage.
9023 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9024 eval_tracepoint_agent_expr.
9025 (condition_true_at_tracepoint): Likewise.
9026 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9027 (agent_mem_read_string, agent_tsv_read): Likewise.
9029 2013-01-16 Yao Qi <yao@codesourcery.com>
9031 * linux-low.c (linux_resume_one_lwp): Don't check
9032 'lwp->bp_reinsert != 0'.
9034 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9035 Pedro Alves <palves@redhat.com>
9037 * lynx-low.c (ptrace_request_to_str): Define a temporary
9038 macro and use it to simplify this function's implementation.
9040 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9042 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9045 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9047 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9049 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9051 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9053 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9055 * lynx-low.c (lynx_resume): Use the resume_info parameter
9056 to determine the ptid for the lynx_ptrace call, unless
9057 it is equal to minus_one_ptid, in which case we use the
9058 ptid of the current_inferior.
9059 (lynx_wait_1): After having received a thread create/exit
9060 event, resume the inferior's execution using the signaling
9061 thread's ptid, rather than the old ptid.
9063 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9065 * lynx-low.c (lynx_resume): Delete variable ret.
9067 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9069 * gdbreplay.c (gdbreplay_version): Update copyright year.
9070 * server.c (gdbserver_version): Likewise.
9072 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9074 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9077 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9079 * lynx-low.c (ptrace_request_to_str): Add handling for
9082 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9084 * lynx-low.c (lynx_attach): Delete variable new_process.
9086 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9088 * lynx-low.c (lynx_create_inferior): Delete variable
9091 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9093 * lynx-low.c (ptrace_request_to_str): Do not handle
9094 PTRACE_GETTHREADLIST if this macro does not exist.
9096 2012-12-15 Yao Qi <yao@codesourcery.com>
9098 * Makefile.in (OBS): Add notif.o.
9099 * notif.c, notif.h: New.
9100 * server.c: Include "notif.h".
9101 (struct vstop_notif) <next>: Remove.
9103 (queue_stop_reply): Update.
9104 (push_event, send_next_stop_reply): Remove.
9105 (discard_queued_stop_replies): Update.
9106 (notif_stop): New variable.
9107 (handle_v_stopped): Remove.
9108 (handle_v_requests): Don't call handle_v_stopped. Call
9109 handle_ack_notif instead.
9110 (queue_stop_reply_callback): Call notif_event_enque instead
9111 of queue_stop_reply.
9112 (handle_status): Don't call send_next_stop_reply, call
9113 notif_write_event instead.
9114 (kill_inferior_callback): Likewise.
9115 (detach_or_kill_inferior_callback): Likewise.
9116 (main): Call initialize_notif.
9117 (process_serial_event): Call QUEUE_is_empty.
9118 (handle_target_event): Call notif_push instead of push event.
9119 * server.h (push_event): Remove declaration.
9121 2012-12-10 Tom Tromey <tromey@redhat.com>
9123 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9124 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9127 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9128 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9129 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9130 (amd64-linux-ipa.o, ax.o): Rewrite.
9131 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9132 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9133 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9134 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9135 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9136 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9137 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9138 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9139 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9140 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9141 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9142 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9143 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9144 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9145 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9146 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9147 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9148 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9149 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9150 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9151 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9152 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9153 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9154 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9155 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9156 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9157 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9158 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9159 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9160 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9161 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9162 (reg-tilegx.o): Remove.
9163 (all_object_files): New macro.
9164 Include .deps files.
9165 * aclocal.m4, configure: Rebuild.
9166 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9167 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9168 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9170 2012-12-05 Tom Tromey <tromey@redhat.com>
9173 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9175 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9177 * configure.ac: Check for linux/perf_event.h.
9178 * config.in: Regenerated.
9179 * configure: Regenerated.
9181 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9183 * hostio.c (handle_readlink): Decrease buffer size
9184 parameter passed to readlink by one byte.
9186 2012-11-26 Yao Qi <yao@codesourcery.com>
9188 * configure.ac (build_warnings): Append '-Wempty-body'.
9189 * configure: Regenerated.
9190 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9193 2012-11-15 Pierre Muller <muller@sourceware.org>
9195 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9196 * config.in: Regenerate.
9197 * configure: Regenerate.
9198 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9199 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9200 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9201 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9203 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9204 instead of <sys/wait.h> header.
9205 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9207 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9209 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9210 (various make rules): Remove -DGDBSERVER
9212 2012-11-09 Yao Qi <yao@codesourcery.com>
9214 * spu-low.c (current_ptid): Move it to ..
9215 * gdbthread.h: ... here. New.
9216 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9217 * server.c (myresume, process_serial_event): Likewise.
9218 * thread-db.c (thread_db_find_new_threads): Likewise.
9219 * tracepoint.c (run_inferior_command): Likewise.
9221 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9223 * server.c (handle_search_memory_1): Include access length in
9226 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9228 * linux-crisv32-low.c: Fix compile errors.
9230 2012-09-04 Yao Qi <yao@codesourcery.com>
9232 * tracepoint.c (cmd_qtsv): Adjust debug message.
9233 Don't check CUR_TPOINT.
9235 2012-08-28 Yao Qi <yao@codesourcery.com>
9237 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9238 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9239 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9240 Remove declarations of xmalloc, xreallloc, xstrdup and
9242 * Makefile.in (libiberty_h): New.
9243 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9244 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9246 2012-08-23 Yao Qi <yao@codesourcery.com>
9248 * server.h: Remove declaration of 'xsnprintf'.
9250 2012-08-22 Keith Seitz <keiths@redhat.com>
9252 * server.h: Include build-gnulib-gbserver/config.h.
9253 * gdbreplay.c: Likewise.
9255 2012-08-08 Doug Evans <dje@google.com>
9257 * Makefile.in (SFILES): Add gdb_vecs.c.
9258 (OBS): Add gdb_vecs.o.
9259 (gdb_vecs_h, host_defs_h): New variables.
9260 (thread-db.o): Add $(gdb_vecs_h) dependency.
9261 (gdb_vecs.o): New rule.
9262 * thread-db.c: #include "gdb_vecs.h".
9263 (thread_db_load_search): Use a vector to iterate over path elements.
9264 Handle text appearing after "$pdir".
9266 * configure.ac: Add check for strstr.
9267 * config.in: Regenerate.
9268 * configure: Regenerate.
9270 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9272 * hostio.c (handle_pread): If pread fails, fall back to attempting
9274 (handle_pwrite): Likewise for pwrite.
9276 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9278 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9279 between unsupported TYPE and unimplementable ADDR/LEN combination.
9280 (arm_insert_point): Act on new return value.
9282 2012-07-31 Pedro Alves <palves@redhat.com>
9284 * server.c (process_point_options): Only skip tokens if we find
9285 one that is unrecognized. Don't treat 'X' specially while
9286 skipping unrecognized tokens.
9288 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9290 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9291 to 4-byte-align HW breakpoint addresses for Thumb.
9293 2012-07-27 Yao Qi <yao@codesourcery.com>
9297 * server.h: Declare gdb_agent_about_to_close.
9298 * target.c (kill_inferior): Include "agent.h".
9299 New. Send command 'kill'.
9300 * target.h (kill_inferior): Removed macro.
9301 * tracepoint.c (gdb_agent_about_to_close): New.
9302 (gdb_agent_helper_thread): Handle command 'close'.
9303 Wait endlessly until the inferior stops.
9304 Install gdb_agent_remove_socket to atexit hook.
9305 (agent_socket_name): New static variable.
9306 (gdb_agent_socket_init): Replace local variable 'name' with
9307 'agent_socket_name'.
9308 (gdb_agent_remove_socket): New.
9310 2012-07-27 Yao Qi <yao@codesourcery.com>
9312 * server.c (process_point_options): Stop at 'X' when parsing.
9314 2012-07-19 Michael Eager <eager@eagercon.com>
9316 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9318 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9319 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9320 hardware breakpoint.
9322 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9324 * gdbserver/linux-low.c (initialize_low): Call
9325 linux_ptrace_init_warnings.
9327 2012-07-02 Doug Evans <dje@google.com>
9329 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9332 2012-07-02 Stan Shebs <stan@codesourcery.com>
9334 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9335 (ax.o): Add it to build rule.
9337 (OBS): Add format.o.
9338 (IPA_OBS): Add format.o.
9339 * server.c (handle_query): Claim support for breakpoint commands.
9340 (process_point_options): Add command case.
9341 (process_serial_event): Leave running if there are printfs in
9343 * mem-break.h (any_persistent_commands): Declare.
9344 (add_breakpoint_commands): Declare.
9345 (gdb_no_commands_at_breakpoint): Declare.
9346 (run_breakpoint_commands): Declare.
9347 * mem-break.c (struct point_command_list): New struct.
9348 (struct breakpoint): New field command_list.
9349 (any_persistent_commands): New function.
9350 (add_commands_to_breakpoint): New function.
9351 (add_breakpoint_commands): New function.
9352 (gdb_no_commands_at_breakpoint): New function.
9353 (run_breakpoint_commands): New function.
9354 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9356 * ax.c: Include format.h.
9357 (ax_printf): New function.
9358 (gdb_eval_agent_expr): Add printf opcode.
9360 2012-06-13 Yao Qi <yao@codesourcery.com>
9362 * server.c (start_inferior): Remove duplicated writes to fields
9363 'last_resume_kind' and 'last_status' of 'current_inferior'.
9365 2012-06-12 Yao Qi <yao@codesourcery.com>
9366 Pedro Alves <palves@redhat.com>
9368 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9370 * server.c (handle_v_cont): Extend comment.
9372 2012-06-11 Yao Qi <yao@codesourcery.com>
9374 * linux-low.c (linux_attach): Add 'static'.
9376 2012-06-06 Yao Qi <yao@codesourcery.com>
9378 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9380 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9382 Fix gcc -flto compilation warning.
9383 * server.c (main): Make variable multi_mode and attach volatile.
9385 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9387 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9388 if the platform doesn't know about it.
9390 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9392 * Makefile.in (SFILES): Add linux-tile-low.c.
9393 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9394 * configure.srv: Handle tilegx-*-linux*.
9395 * linux-tile-low.c: New file.
9397 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9399 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9401 2012-05-24 Pedro Alves <palves@redhat.com>
9405 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9407 2012-05-24 Pedro Alves <palves@redhat.com>
9411 Replace target_signal with gdb_signal throughout.
9413 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9415 * linux-low.c (linux_store_registers): Avoid the copying sequence
9416 when no data has been retrieved by ptrace.
9418 2012-05-22 Will Deacon <will.deacon@arm.com>
9420 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9421 Include asm/ptrace.h.
9422 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9425 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9427 * linux-low.c (linux_store_registers): Don't re-retrieve data
9428 with ptrace that has already been obtained from /proc. Always
9429 copy any data retrieved with ptrace to the buffer supplied.
9431 2012-05-11 Yao Qi <yao@codesourcery.com>
9432 Pedro Alves <palves@redhat.com>
9434 * linux-low.c (enum stopping_threads_kind): New.
9435 (stopping_threads): Change type to `enum stopping_threads_kind'.
9436 (handle_extended_wait): If stopping and suspending threads, leave
9437 the new_lwp suspended too.
9438 (linux_wait_for_event): Adjust.
9439 (stop_all_lwps): Set `stopping_threads' to
9440 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9441 whether we're suspending threads or just stopping them. Assert no
9444 2012-04-29 Yao Qi <yao@codesourcery.com>
9446 * server.h: Move some code to ...
9447 * gdbthread.h: ... here. New.
9448 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9449 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9450 (nto-low.o, win32-low.o): Likewise.
9451 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9452 * regcache.c, remote-utils.c, server.c: Likewise.
9453 * target.c, tracepoint.c, win32-low.c: Likewise.
9455 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9457 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9458 (PTRACE_ARG4_TYPE): Likewise.
9459 (PTRACE_XFER_TYPE): Likewise.
9460 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9461 ptrace to PTRACE_ARG3_TYPE.
9462 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9463 (PTRACE_ARG4_TYPE): Likewise.
9464 (PTRACE_XFER_TYPE): Likewise.
9465 (linux_detach_one_lwp): Cast fourth argument of
9466 ptrace to long then PTRACE_ARG4_TYPE.
9467 (regsets_fetch_inferior_registers): Cast third argument of
9468 ptrace to long then PTRACE_ARG3_TYPE.
9469 (regsets_store_inferior_registers): Likewise.
9471 2012-04-20 Pedro Alves <palves@redhat.com>
9473 * configure: Regenerate.
9475 2012-04-19 Pedro Alves <palves@redhat.com>
9477 * Makefile.in (GNULIB_BUILDDIR): New.
9478 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9479 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9480 (all, install-only, uninstall, clean-info, all-lib, clean): No
9481 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9482 (maintainer-clean realclean distclean): Use subdir_do.
9484 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9485 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9486 * acinclude.m4: Include acx_configure_dir.m4.
9487 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9488 calls. Call AC_PROG_RANLIB. Configure gnulib using
9491 (GNULIB_STDINT_H): Adjust.
9492 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9493 * gdbreplay.c: Include build-gnulib/config.h.
9494 * server.h: Likewise.
9495 * aclocal.m4: Regenerate.
9496 * config.in: Regenerate.
9497 * configure: Regenerate.
9499 2012-04-19 Pedro Alves <palves@redhat.com>
9501 * Makefile.in (LIBGNU, INCGNU): Adjust.
9502 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9503 (all, install-only, uninstall, clean-info, all-lib, clean)
9504 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9505 * configure.ac: Adjust AC_OUTPUT output.
9506 * aclocal.m4: Regenerate.
9507 * configure: Regenerate.
9509 2012-04-19 Pedro Alves <palves@redhat.com>
9511 * Makefile.in (generated_files): New.
9512 (server_h): Remove the explicit dependency on config.h, and depend
9513 on $generated_files.
9515 2012-04-19 Pedro Alves <palves@redhat.com>
9517 * Makefile.in (INCGNU): Add -Ignulib.
9519 2012-04-19 Pedro Alves <palves@redhat.com>
9521 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9522 (INCGNU): ... this, and spell out -I here.
9523 (GNULIB_LIB): Rename to ...
9525 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9527 2012-04-19 Pedro Alves <palves@redhat.com>
9529 * config.in: Regenerate.
9531 2012-04-19 Pedro Alves <palves@redhat.com>
9533 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9534 * server.h (memmem): Remove declaration.
9535 * config.in: Regenerate.
9536 * configure: Regenerate.
9538 2012-04-19 Yao Qi <yao@codesourcery.com>
9540 * Makefile.in (SFILES): Add common/vec.c.
9544 2012-04-19 Yao Qi <yao@codesourcery.com>
9546 * remote-utils.c (prepare_resume_reply): Replace with macro
9547 target_core_of_thread.
9548 * server.c (handle_qxfer_threads_proper): Likewise.
9549 * target.h (traget_core_of_thread): New macro.
9551 2012-04-18 Pedro Alves <palves@redhat.com>
9553 * aclocal.m4: Regenerate.
9554 * configure: Regenerate.
9556 2012-04-16 Yao Qi <yao@codesourcery.com>
9558 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9559 duplicated on address.
9561 2012-04-16 Yao Qi <yao@codesourcery.com>
9563 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9564 (struct tracepoint_action_ops) <send>: New field.
9565 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9566 (agent_expr_send, x_tracepoint_action_send): New.
9567 (l_tracepoint_action_send): New.
9568 (cmd_qtdp): Download and install tracepoint
9569 according to `use_agent'.
9570 (run_inferior_command): Add one more parameter `len'.
9572 (tracepoint_send_agent): New.
9573 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9575 2012-04-16 Yao Qi <yao@codesourcery.com>
9577 * tracepoint.c (download_tracepoints): Moved to ...
9578 (cmd_qtstart): ... here.
9580 2012-04-14 Yao Qi <yao@codesourcery.com>
9582 * tracepoint.c: Include inttypes.h.
9583 (struct collect_memory_action): Use sized types.
9584 (struct tracepoint): Likewise.
9585 (cmd_qtdp, stop_tracing): Update print specifiers.
9586 (cmd_qtp, response_tracepoint): Likewise.
9587 (collect_data_at_tracepoint): Likewise.
9588 (collect_data_at_step): Likewise.
9590 2012-04-14 Yao Qi <yao@codesourcery.com>
9592 Import gnulib module inttypes.
9593 * aclocal.m4, config.in, configure: Regenerated.
9595 2012-04-14 Yao Qi <yao@codesourcery.com>
9597 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9598 Makefile and config.status at last.
9600 2012-04-13 Yao Qi <yao@codesourcery.com>
9602 * tracepoint.c: Include stdint.h unconditionally.
9604 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9606 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9607 on BFD_HAVE_SYS_PROCFS_TYPE.
9608 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9609 * configure: Regenerate.
9610 * config.in: Likewise.
9612 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9614 * Makefile.in (clean): Also remove x32.c x32-linux.c
9615 x32-avx.c x32-avx-linux.c.
9616 (x32.o): New target.
9618 (x32-linux.o): Likewise.
9619 (x32-linux.c): Likewise.
9620 (x32-avx.o): Likewise.
9621 (x32-avx.c): Likewise.
9622 (x32-avx-linux.o): Likewise.
9623 (x32-avx-linux.c): Likewise.
9625 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9626 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9627 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9628 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9629 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9630 i386/x32-avx-linux.xml.
9632 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9633 (init_registers_x32_avx_linux): Likwise.
9634 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9635 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9637 2012-04-13 Pedro Alves <palves@redhat.com>
9639 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9640 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9641 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9642 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9645 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9647 * linux-x86-low.c (compat_x32_clock_t): New.
9648 (compat_x32_siginfo_t): Likewise.
9649 (compat_x32_siginfo_from_siginfo): Likewise.
9650 (siginfo_from_compat_x32_siginfo): Likewise.
9651 (linux_is_elf64): Likewise.
9652 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9653 and siginfo_from_compat_x32_siginfo for x32.
9654 (x86_arch_setup): Set linux_is_elf64.
9656 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9659 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9661 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9662 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9663 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9664 compatible with process.
9666 2012-04-12 Yao Qi <yao@codesourcery.com>
9668 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9669 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9670 (install-only, install-info, clean): Handle sub dir gnulib.
9671 (all-lib, am--refresh): New targets.
9672 (memmem.o): Remove target.
9673 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9674 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9675 (AC_REPLACE_FUNCS): Remove memmem.
9676 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9677 (AC_OUTPUT): Generate Makefile in gnulib/.
9678 * aclocal.m4, config.in, configure: Regenerated.
9680 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9682 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9684 2012-04-05 Pedro Alves <palves@redhat.com>
9686 -Werror=strict-aliasing
9688 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9691 2012-04-04 Pedro Alves <palves@redhat.com>
9693 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9694 (sparc_store_gregset_from_stack, sparc_store_gregset)
9695 (sparc_breakpoint_at): Fix formatting.
9697 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9699 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9701 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9702 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9703 * config.in: Regenerate.
9704 * configure: Likewise.
9706 2012-03-29 Pedro Alves <palves@redhat.com>
9708 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9709 Correct ptrace arguments.
9711 2012-03-28 Pedro Alves <palves@redhat.com>
9713 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9714 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9715 (IA64_FR1_REGNUM): New defines.
9716 (ia64_fetch_register): New.
9717 (the_low_target): Install it.
9718 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9720 * linux-low.c (linux_fetch_registers): Try the
9721 the_low_target.fetch_register hook first.
9723 * linux-arm-low.c (the_low_target): Adjust.
9724 * linux-bfin-low.c (the_low_target): Adjust.
9725 * linux-cris-low.c (the_low_target): Adjust.
9726 * linux-crisv32-low.c (the_low_target): Adjust.
9727 * linux-m32r-low.c (the_low_target): Adjust.
9728 * linux-m68k-low.c (the_low_target): Adjust.
9729 * linux-mips-low.c (the_low_target): Adjust.
9730 * linux-ppc-low.c (the_low_target): Adjust.
9731 * linux-s390-low.c (the_low_target): Adjust.
9732 * linux-sh-low.c (the_low_target): Adjust.
9733 * linux-sparc-low.c (the_low_target): Adjust.
9734 * linux-tic6x-low.c (the_low_target): Adjust.
9735 * linux-x86-low.c (the_low_target): Adjust.
9736 * linux-xtensa-low.c (the_low_target): Adjust.
9738 2012-03-26 Pedro Alves <palves@redhat.com>
9740 * server.c (handle_qxfer_libraries): Don't bail early if
9741 the_target->qxfer_libraries_svr4 is not NULL.
9743 2012-03-26 Pedro Alves <palves@redhat.com>
9745 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9747 2012-03-23 Pedro Alves <palves@redhat.com>
9749 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9750 "library-list-svr4" element's start tag when the the DSO list is
9753 2012-03-23 Pedro Alves <palves@redhat.com>
9755 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9756 a variable whose type size is the same as the inferior's pointer
9759 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9761 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9763 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9764 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9765 * linux-low.h: Include <signal.h>.
9766 (struct siginfo): Remove forward declaration.
9767 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9770 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9772 * .gitignore: Ignore more files.
9774 2012-03-19 Pedro Alves <palves@redhat.com>
9775 Jan Kratochvil <jan.kratochvil@redhat.com>
9777 * server.c (cont_thread, general_thread): Add describing comments.
9778 (start_inferior): Clear `cont_thread'.
9779 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9782 2012-03-15 Yao Qi <yao@codesourcery.com>
9784 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9786 (cmd_qtdp): ... here.
9788 2012-03-15 Yao Qi <yao@codesourcery.com>
9790 * tracepoint.c (struct tracepoint_action_ops): New.
9791 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9792 (m_tracepoint_action_download): New.
9793 (r_tracepoint_action_download): New.
9794 (x_tracepoint_action_download): New.
9795 (l_tracepoint_action_download): New.
9796 (add_tracepoint_action): Install `action->ops' according type.
9797 (download_tracepoint_1): Move code `download' function pointer
9798 of various tracepoint_action_ops.
9800 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9802 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9803 linux_ptrace_attach_warnings.
9805 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9807 * Makefile.in (linux-ptrace.o): New.
9808 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9809 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9810 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9811 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9812 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9814 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9816 2012-03-08 Yao Qi <yao@codesourcery.com>
9817 Pedro Alves <palves@redhat.com>
9819 Fix PR server/13392.
9820 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9822 * tracepoint.c (remove_tracepoint): New.
9823 (cmd_qtdp): Call remove_tracepoint when failed to install.
9825 2012-03-07 Pedro Alves <palves@redhat.com>
9827 * linux-low.c (get_detach_signal): New.
9828 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9829 Pass on pending signals to PTRACE_DETACH. Check the result of the
9831 * server.c (program_signals, program_signals_p): New.
9832 (handle_general_set): Handle QProgramSignals.
9833 * server.h (program_signals, program_signals_p): Declare.
9835 2012-03-05 Pedro Alves <palves@redhat.com>
9836 Jan Kratochvil <jan.kratochvil@redhat.com>
9838 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9841 2012-03-03 Yao Qi <yao@codesourcery.com>
9843 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9844 agent_look_up_symbols.
9846 2012-03-03 Yao Qi <yao@codesourcery.com>
9848 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9849 (linux-x86-low.o): Likewise.
9850 * server.h: Remove in_process_agent_loaded.
9851 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9855 2012-03-03 Yao Qi <yao@codesourcery.com>
9857 * tracepoint.c (gdb_agent_capability): New global.
9858 (in_process_agent_loaded_ust): Renamed to
9859 `in_process_agent_supports_ust'.
9861 (in_process_agent_supports_ust): Call agent_capability_check.
9862 (clear_installed_tracepoints): Assert that agent supports
9865 2012-03-03 Yao Qi <yao@codesourcery.com>
9867 * linux-low.c (linux_supports_agent): New.
9868 (linux_target_ops): Initialize field `supports_agent' with
9869 linux_supports_agent.
9870 * target.h (struct target_ops) <supports_agent>: New.
9871 (target_supports_agent): New macro.
9872 * server.c (handle_general_set): Handle packet 'QAgent'.
9873 (handle_query): Send `QAgent+'.
9874 * Makefile.in (server.o): Depends on agent.h.
9876 2012-03-03 Yao Qi <yao@codesourcery.com>
9878 * Makefile.in (OBS): Add agent.o.
9879 Add new rule for agent.o.
9880 Track dependence of tracepoint.c on agent.h.
9881 * tracepoint.c (run_inferior_command_1):
9882 (run_inferior_command): Call agent_run_command.
9883 (gdb_ust_connect_sync_socket): Deleted. Move it to
9885 (resume_thread, stop_thread): Likewise.
9886 (gdb_ust_socket_init): Renamed to ...
9887 (gdb_agent_socket_init): ... New.
9888 (gdb_ust_thread): Renamed to ...
9889 (gdb_agent_helper_thread): ... New.
9890 (gdb_ust_init): Move some code to ...
9891 (gdb_agent_init): ... here. New.
9892 [HAVE_UST]: Call gdb_ust_init.
9893 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9894 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9895 * config.in, configure: Regenerated.
9897 2012-03-02 Pedro Alves <palves@redhat.com>
9899 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9900 * linux-low.c (struct simple_pid_list): New.
9901 (stopped_pids): New a struct simple_pid_list pointer.
9902 (add_to_pid_list, pull_pid_from_list): New.
9903 (handle_extended_wait): Don't assume the first signal new children
9904 report is SIGSTOP. Adjust call to pull_pid_from_list.
9905 (linux_wait_for_lwp): Adjust.
9907 2012-03-02 Yao Qi <yao@codesourcery.com>
9909 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9912 2012-03-02 Yao Qi <yao@codesourcery.com>
9914 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9915 `stop_pc' and `tpoint'. Update caller.
9917 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9919 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9920 * linux-low.c (use_linux_regsets): New macro.
9921 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9922 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9923 (linux_register_in_regsets): New function.
9924 (usr_fetch_inferior_registers): Skip registers covered by
9926 (usr_store_inferior_registers): Likewise.
9927 (usr_fetch_inferior_registers): New macro.
9928 (usr_store_inferior_registers): Likewise.
9929 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9930 (linux_store_registers): Likewise.
9931 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9933 (init_registers_mips64_dsp_linux): Likewise.
9934 (init_registers_mips_linux): New macro.
9935 (init_registers_mips_dsp_linux): Likewise.
9936 (mips_dsp_num_regs): Likewise.
9937 (DSP_BASE, DSP_CONTROL): New fallback macros.
9938 (mips_base_regs): New macro.
9939 (mips_regmap): Use it. Fix the size.
9940 (mips_dsp_regmap): New variable.
9941 (mips_dsp_regset_bitmap): Likewise.
9942 (mips_arch_setup): New function.
9943 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9945 (mips_cannot_store_register): Likewise.
9946 (the_low_target): Update .arch_setup, .num_regs and .regmap
9947 initializers. Add .regset_bitmap initializer.
9948 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9950 * linux-bfin-low.c (the_low_target): Likewise.
9951 * linux-cris-low.c (the_low_target): Likewise.
9952 * linux-crisv32-low.c (the_low_target): Likewise.
9953 * linux-ia64-low.c (the_low_target): Likewise.
9954 * linux-m32r-low.c (the_low_target): Likewise.
9955 * linux-m68k-low.c (the_low_target): Likewise.
9956 * linux-ppc-low.c (the_low_target): Likewise.
9957 * linux-s390-low.c (the_low_target): Likewise.
9958 * linux-sh-low.c (the_low_target): Likewise.
9959 * linux-sparc-low.c (the_low_target): Likewise.
9960 * linux-tic6x-low.c (the_low_target): Likewise.
9961 * linux-x86-low.c (the_low_target): Likewise.
9962 * linux-xtensa-low.c (the_low_target): Likewise.
9963 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9964 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9965 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9967 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9968 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9970 2012-02-29 Yao Qi <yao@codesourcery.com>
9971 Pedro Alves <palves@redhat.com>
9973 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9974 `step_over_finished' is true.
9976 2012-02-27 Pedro Alves <palves@redhat.com>
9978 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9979 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9981 2012-02-27 Pedro Alves <palves@redhat.com>
9984 * linux-low.c (pid_is_stopped): New.
9985 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9987 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9989 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9992 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9994 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9996 2012-02-24 Luis Machado <lgustavo@codesourcery>
9998 * server.c (handle_query): Advertise support for target-side
9999 breakpoint condition evaluation.
10000 (process_point_options): New function.
10001 (process_serial_event): When inserting a breakpoint, check for
10002 a target-side condition that should be evaluated.
10004 * mem-break.c: Include regcache.h and ax.h.
10005 (point_cond_list_t): New data structure.
10006 (breakpoint) <cond_list>: New field.
10007 (find_gdb_breakpoint_at): Make non-static.
10008 (delete_gdb_breakpoint_at): Clear any target-side
10010 (clear_gdb_breakpoint_conditions): New function.
10011 (add_condition_to_breakpoint): Likewise.
10012 (add_breakpoint_condition): Likewise.
10013 (gdb_condition_true_at_breakpoint): Likewise.
10014 (gdb_breakpoint_here): Return result directly instead
10015 of going through a local variable.
10017 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10018 (clear_gdb_breakpoint_conditions): Likewise.
10019 (add_breakpoint_condition): Likewise.
10020 (gdb_condition_true_at_breakpoint): Likewise.
10022 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10023 (need_step_over_p): Take target-side breakpoint condition into
10026 2012-02-24 Luis Machado <lgustavo@codesourcery>
10028 * server.h: Include tracepoint.h.
10029 (agent_mem_read, agent_get_trace_state_variable_value,
10030 agent_set_trace_state_variable_value,
10031 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10032 get_set_tsv_func_addr): New prototypes.
10034 * ax.h: New include file.
10035 * ax.c: New source file.
10037 * tracepoint.c: Include ax.h.
10038 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10039 agent_expr, eval_result_type): Move to ax.h.
10040 (parse_agent_expr): Rename to ...
10041 (gdb_parse_agent_expr): ... this, make it non-static and move
10043 (unparse_agent_expr) Rename to ...
10044 (gdb_unparse_agent_expr): ... this, make it non-static and move
10046 (eval_agent_expr): Rename to ...
10047 (eval_tracepoint_agent_expr): ... this.
10048 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10049 forward declarations.
10050 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10051 (agent_get_trace_state_variable_value): New function.
10052 (agent_set_trace_state_variable_value): New function.
10053 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10054 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10055 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10056 (condition_true_at_tracepoint): Likewise.
10057 (parse_agent_expr): Rename to ...
10058 (gdb_parse_agent_expr): ... this and move to ax.c.
10059 (unparse_agent_expr): Rename to ...
10060 (gdb_unparse_agent_expr): ... this and move to ax.c.
10061 (gdb_agent_op_name): Move to ax.c.
10062 (eval_agent_expr): Rename to ...
10063 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10065 (eval_tracepoint_agent_expr): New function.
10066 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10068 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10070 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10071 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10072 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10073 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10074 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10075 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10076 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10077 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10078 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10079 (compile_bytecodes): Remove forward declaration.
10080 (is_goto_target): Move to ax.c.
10081 (compile_bytecodes): Move to ax.c and call
10082 agent_get_trace_state_variable_value (...) and
10083 agent_set_trace_state_variable_value (...).
10085 * Makefile.in: Update ax.c and IPA dependencies.
10087 2012-02-24 Pedro Alves <palves@redhat.com>
10089 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10090 (cmd_bigqtbuffer_circular): ... this. Only handle
10091 'QTBuffer:circular:'.
10092 (handle_tracepoint_general_set): Adjust.
10094 2012-02-16 Yao Qi <yao@codesourcery.com>
10096 * inferiors.c: Move code to ...
10097 * dll.c: .... here. New.
10098 * server.h: Declare clear_dlls.
10099 * Makefile.in (SFILES): Add dll.c.
10103 2012-02-11 Yao Qi <yao@codesourcery.com>
10105 * server.c: (handle_monitor_command): Add a new parameter
10107 (handle_query): Update caller.
10109 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10111 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10112 * configure, config.in: Regenerate.
10113 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10116 2012-02-02 Pedro Alves <palves@redhat.com>
10118 Try SIGKILL first, then PTRACE_KILL.
10119 * linux-low.c (linux_kill_one_lwp): New.
10120 (linux_kill_one_lwp): Rename to ...
10121 (kill_one_lwp_callback): ... this. Use the new
10122 linux_kill_one_lwp.
10124 2012-02-02 Pedro Alves <palves@redhat.com>
10126 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10129 2012-01-27 Pedro Alves <palves@redhat.com>
10131 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10132 (elf_64_file_p): Make static.
10133 (linux_pid_exe_is_elf_64_file): New.
10134 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10135 Delete declarations.
10136 (linux_pid_exe_is_elf_64_file): Declare.
10137 * linux-x86-low.c (x86_arch_setup): Use
10138 linux_pid_exe_is_elf_64_file.
10140 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10142 * linux-low.c (linux_wait_for_event_1): Rename to ...
10143 (linux_wait_for_event): ... here and merge it with former
10144 linux_wait_for_event - new variable wait_ptid, use it.
10145 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10147 2012-01-23 Pedro Alves <palves@redhat.com>
10149 * server.c (main): Avoid yet another case of infinite loop while
10150 detaching/killing after a longjmp.
10152 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10155 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10157 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10159 * hostio.c (handle_readlink): New function.
10160 (handle_vFile): Call it to handle "vFile:readlink" packets.
10162 2012-01-20 Pedro Alves <palves@redhat.com>
10163 Ulrich Weigand <ulrich.weigand@linaro.org>
10165 * server.c (handle_v_requests): Only support vAttach and vRun to
10166 start multiple processes when in extended protocol mode.
10168 2012-01-17 Pedro Alves <palves@redhat.com>
10170 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10171 memalign plus mprotect to allocate the scratch buffer.
10173 2012-01-13 Pedro Alves <palves@redhat.com>
10175 * server.c (attach_inferior): Clear `cont_thread'.
10177 2012-01-13 Pedro Alves <palves@redhat.com>
10179 * server.c (main): Avoid infinite loop while detaching/killing
10182 2012-01-09 Doug Evans <dje@google.com>
10184 * server.c (start_inferior): Set last_ptid in --wrapper case.
10186 2012-01-06 Yao Qi <yao@codesourcery.com>
10188 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10190 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10192 2012-01-04 Yao Qi <yao@codesourcery.com>
10194 * tracepoint.c (cmd_qtdp): Print debug message
10195 for static tracepoint.
10197 2012-01-04 Yao Qi <yao@codesourcery.com>
10199 * tracepoint.c (trace_vdebug): Differentiate debug message
10200 between gdbserver and IPA.
10202 2012-01-03 Yao Qi <yao@codesourcery.com>
10204 * tracepoint.c (tracepoint_was_hit): Don't collect for
10207 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10209 * terminal.h: Reformat copyright header.
10211 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10213 * server.c (gdbserver_version): Update copyright year.
10214 * gdbreplay.c (gdbreplay_version): Likewise.
10216 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10218 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10221 2011-12-18 Hui Zhu <teawater@gmail.com>
10222 * linux-low.c (linux_create_inferior): Save return value to ret.
10224 2011-12-18 Hui Zhu <teawater@gmail.com>
10226 * linux-low.c (linux_create_inferior): Save return value to ret.
10228 2011-12-16 Doug Evans <dje@google.com>
10230 * linux-low.c (linux_create_inferior): If stdio connection,
10231 redirect stdin from /dev/null, stdout to stderr.
10232 * remote-utils.c (remote_is_stdio): New static global.
10233 (remote_connection_is_stdio): New function.
10234 (remote_prepare): Handle stdio connection.
10235 (remote_open): Ditto.
10236 (remote_close): Don't close stdin for stdio connections.
10237 (read_prim,write_prim): New functions. Replace all calls to
10238 read/write to these.
10239 * server.c (main): Watch for "-" argument. Move call to
10240 remote_prepare before start_inferior.
10241 * server.h (STDIO_CONNECTION_NAME): New macro.
10242 (remote_connection_is_stdio): Declare.
10244 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10245 in debugging output.
10247 2011-12-15 Yao Qi <yao@codesourcery.com>
10249 * tracepoint.c: Include sys/syscall.h.
10250 (gdb_ust_thread): Remove preprocessor conditional.
10252 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10254 * linux-low.c (linux_detach_one_lwp): Call
10255 the_low_target.prepare_to_resume before detaching.
10257 2011-12-14 Yao Qi <yao@codesourcery.com>
10259 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10262 2011-12-14 Yao Qi <yao@codesourcery.com>
10264 * i386-low.c (i386_low_stopped_data_address): Initialize local
10265 variable `control'.
10267 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10271 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10272 DR_CONTROL unless necessary. Extend comments.
10273 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10274 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10276 2011-12-13 Yao Qi <yao@codesourcery.com>
10278 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10280 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10282 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10284 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10285 Print new debug message for such case.
10287 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10289 Fix overlapping memcpy.
10290 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10291 the read_inferior_memory transfer.
10292 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10293 write_inferior_memory transfer.
10294 (set_fast_tracepoint_jump): New variable buf. Use it for the
10295 read_inferior_memory and write_inferior_memory transfers.
10296 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10297 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10298 Use it for the write_inferior_memory transfer.
10299 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10302 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10304 * linux-low.c (fetch_register, store_register): Make code
10305 consistent, fix formatting.
10307 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10309 * linux-low.c (usr_store_inferior_registers): Factor out code
10310 to handle individual registers into...
10311 (store_register): ... this new function.
10313 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10315 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10316 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10317 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10318 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10319 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10320 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10321 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10322 (srv_xmlfiles): Add new XML files.
10324 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10326 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10327 (init_registers_s390_linux32v1): Add prototype.
10328 (init_registers_s390_linux32v2): Likewise.
10329 (init_registers_s390_linux64v1): Likewise.
10330 (init_registers_s390_linux64v2): Likewise.
10331 (init_registers_s390x_linux64v1): Likewise.
10332 (init_registers_s390x_linux64v2): Likewise.
10333 (s390_num_regs): Increment to 52.
10334 (s390_regmap): Add orig_r2 register.
10335 (s390_num_regs_3264): Increment to 68.
10336 (s390_regmap_3264): Add orig_r2 register.
10337 (s390_collect_ptrace_register): Handle orig_r2 register.
10338 (s390_supply_ptrace_register): Likewise.
10339 (s390_fill_last_break): New function.
10340 (s390_store_last_break): Likewise.
10341 (s390_fill_system_call): New function.
10342 (s390_store_system_call): Likewise.
10343 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10345 (s390_check_regset): New function.
10346 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10347 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10348 Update target_regsets for available register sets.
10350 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10351 Jan Kratochvil <jan.kratochvil@redhat.com>
10353 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10354 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10356 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10357 * linux-low.h (struct process_info_private): New member r_debug.
10358 * server.c (handle_qxfer_libraries): Call
10359 the_target->qxfer_libraries_svr4.
10360 (handle_qxfer_libraries_svr4): New function.
10361 (qxfer_packets): New entry "libraries-svr4".
10362 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10363 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10364 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10365 PACKET_qXfer_libraries_svr4.
10367 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10369 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10370 PSW address/mask between 8-byte and 16-byte formats.
10371 (s390_supply_ptrace_register): Likewise.
10372 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10373 basic addressing mode bit.
10375 2011-11-24 Stan Shebs <stan@codesourcery.com>
10377 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10379 2011-11-17 Stan Shebs <stan@codesourcery.com>
10381 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10382 (tracing_start_time): New global.
10383 (tracing_stop_time): New global.
10384 (tracing_user_name): New global.
10385 (tracing_notes): New global.
10386 (tracing_stop_note): New global.
10387 (cmd_qtstart): Set traceframe_usage, start_time.
10388 (stop_tracing): Set stop_time.
10389 (cmd_qtstatus): Report additional status.
10390 (cmd_qtp): New function.
10391 (handle_tracepoint_query): Call it.
10392 (cmd_qtnotes): New function.
10393 (handle_tracepoint_general_set): Call it.
10394 (get_timestamp): Rename from tsv_get_timestamp.
10396 2011-11-14 Stan Shebs <stan@codesourcery.com>
10397 Kwok Cheung Yeung <kcy@codesourcery.com>
10399 * linux-x86-low.c (small_jump_insn): New.
10400 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10401 trampoline and error message, build a trampoline and issue a small
10402 jump instruction to it.
10403 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10404 trampoline and error message.
10405 (x86_get_min_fast_tracepoint_insn_len): New.
10406 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10407 * linux-low.h (struct linux_target_ops): Add arguments to
10408 install_fast_tracepoint_jump_pad operation, add new operation.
10409 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10411 (linux_get_min_fast_tracepoint_insn_len): New function.
10412 (linux_target_op): Add new operation.
10413 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10414 (gdb_trampoline_buffer_end): Ditto.
10415 (gdb_trampoline_buffer_error): Ditto.
10416 (struct ipa_sym_addresses): Add fields for new IPA variables.
10417 (symbol_list): Add entries for new IPA variables.
10418 (struct tracepoint): Add fields to hold the address range of the
10419 trampoline used by the tracepoint.
10420 (trampoline_buffer_head): New static variable.
10421 (trampoline_buffer_tail): Ditto.
10422 (claim_trampoline_space): New function.
10423 (have_fast_tracepoint_trampoline_buffer): New function.
10424 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10426 (install_fast_tracepoint): Ditto, also add error buffer argument.
10427 (cmd_qtminftpilen): New function.
10428 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10429 (fast_tracepoint_from_trampoline_address): New function.
10430 (fast_tracepoint_collecting): Handle trampoline as part of jump
10432 (set_trampoline_buffer_space): New function.
10433 (initialize_tracepoint): Initialize new IPA variables.
10434 * target.h (struct target_ops): Add arguments to
10435 install_fast_tracepoint_jump_pad operation, add new
10436 get_min_fast_tracepoint_insn_len operation.
10437 (target_get_min_fast_tracepoint_insn_len): New.
10438 (install_fast_tracepoint_jump_pad): Add arguments.
10439 * server.h (IPA_BUFSIZ): Define.
10440 * linux-i386-ipa.c: Include extra header files.
10441 (initialize_fast_tracepoint_trampoline_buffer): New function.
10442 (initialize_low_tracepoint): Call it.
10443 * server.h (set_trampoline_buffer_space): Declare.
10444 (claim_trampoline_space): Ditto.
10445 (have_fast_tracepoint_trampoline_buffer): Ditto.
10447 2011-11-14 Yao Qi <yao@codesourcery.com>
10449 * server.c (handle_query): Handle InstallInTrace for qSupported.
10450 * tracepoint.c (add_tracepoint): Sort list.
10451 (install_tracepoint, download_tracepoint): New.
10452 (cmd_qtdp): Call them to install and download tracepoints.
10453 (sort_tracepoints): Removed.
10454 (cmd_qtstart): Update.
10456 2011-11-14 Yao Qi <yao@codesourcery.com>
10458 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10459 * mem-break.h: Declare.
10460 * tracepoint.c (cmd_qtstart): Move some code to ...
10461 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10463 (download_tracepoints): Move some code to ...
10464 (download_tracepoint_1): ... here. New.
10466 2011-11-08 Yao Qi <yao@codesourcery.com>
10468 * remote-utils.c (relocate_instruction): A comment fix.
10470 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10472 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10473 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10474 dr_status_mirror and dr_control_mirror from debug_reg_state.
10475 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10476 (i386_initial_stuff): Remove use of deleted globals.
10477 (i386_get_thread_context, i386_set_thread_context,
10478 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10479 from debug_reg_state.
10481 2011-11-05 Yao Qi <yao@codesourcery.com>
10483 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10484 address as TPOINT's.
10486 2011-11-02 Stan Shebs <stan@codesourcery.com>
10488 * tracepoint.c (agent_mem_read_string): New function.
10489 (eval_agent_expr): Call it for tracenz.
10490 * server.c (handle_query): Report support for tracenz.
10492 2011-11-02 Yao Qi <yao@codesourcery.com>
10494 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10496 2011-11-02 Yao Qi <yao@codesourcery.com>
10498 * target.h: Fix a typo in comment.
10500 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10502 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10503 clobber the breakpoints' shadows with fast tracepoint jumps.
10504 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10505 * target.c (write_inferior_memory): Also pass MYADDR down to
10508 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10510 * configure.ac: Check support for personality routine.
10511 * configure: Regenerate.
10512 * config.in: Likewise.
10513 * linux-low.c: Include <sys/personality.h>.
10514 Define ADDR_NO_RANDOMIZE if necessary.
10515 (linux_create_inferior): Disable address space randomization when
10516 forking inferior, if requested.
10517 (linux_supports_disable_randomization): New function.
10518 (linux_target_ops): Install it.
10519 * server.h (disable_randomization): Declare.
10520 * server.c (disable_randomization): New global variable.
10521 (handle_general_set): Handle QDisableRandomization.
10522 (handle_query): Likewise for qSupported.
10523 (main): Support --disable-randomization and --no-disable-randomization
10524 command line arguments.
10525 * target.h (struct target_ops): Add supports_disable_randomization.
10526 (target_supports_disable_randomization): New macro.
10528 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10530 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10532 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10533 [!PT_GETDSBT] (target_loadmap): New definition.
10534 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10535 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10536 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10537 and PT_GETDSBT to LINUX_LOADMAP.
10538 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10539 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10541 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10543 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10544 (arm_linux_hwbp_cap): New static variable.
10545 (arm_linux_get_hwbp_cap): Replace by ...
10546 (arm_linux_init_hwbp_cap): ... this new function.
10547 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10548 (arm_linux_get_hw_watchpoint_count): Likewise.
10549 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10550 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10551 (arm_prepare_to_resume): Use perror_with_name instead of error.
10553 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10555 * linux-arm-low.c: Include <signal.h>.
10556 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10557 (struct arm_linux_hwbp_cap): New data type.
10558 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10559 (struct arm_linux_hw_breakpoint): New data type.
10560 (MAX_BPTS, MAX_WPTS): Define.
10561 (struct arch_process_info, struct arch_lwp_info): New data types.
10562 (arm_linux_get_hwbp_cap): New function.
10563 (arm_linux_get_hw_breakpoint_count): Likewise.
10564 (arm_linux_get_hw_watchpoint_count): Likewise.
10565 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10566 (arm_hwbp_control_initialize): Likewise.
10567 (arm_hwbp_control_is_enabled): Likewise.
10568 (arm_hwbp_control_is_initialized): Likewise.
10569 (arm_hwbp_control_disable): Likewise.
10570 (arm_linux_hw_breakpoint_equal): Likewise.
10571 (arm_linux_hw_point_initialize): Likewise.
10572 (struct update_registers_data): New data structure.
10573 (update_registers_callback: New function.
10574 (arm_insert_point): Likewise.
10575 (arm_remove_point): Likewise.
10576 (arm_stopped_by_watchpoint): Likewise.
10577 (arm_stopped_data_address): Likewise.
10578 (arm_new_process): Likewise.
10579 (arm_new_thread): Likewise.
10580 (arm_prepare_to_resume): Likewise.
10581 (the_low_target): Register arm_insert_point, arm_remove_point,
10582 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10583 arm_new_thread, and arm_prepare_to_resume.
10585 2011-09-15 Stan Shebs <stan@codesourcery.com>
10587 * server.h (struct emit_ops): Add compare-goto fields.
10588 * tracepoint.c (gdb_agent_op_sizes): New table.
10589 (emit_eq_goto): New function.
10590 (emit_ne_goto): New function.
10591 (emit_lt_goto): New function.
10592 (emit_le_goto): New function.
10593 (emit_gt_goto): New function.
10594 (emit_ge_goto): New function.
10595 (is_goto_target): New function.
10596 (compile_bytecodes): Recognize special cases of compare-goto
10597 combinations and call specialized emitters for them.
10598 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10599 (amd64_emit_ne_goto): New function.
10600 (amd64_emit_lt_goto): New function.
10601 (amd64_emit_le_goto): New function.
10602 (amd64_emit_gt_goto): New function.
10603 (amd64_emit_ge_goto): New function.
10604 (amd64_emit_ops): Add the new functions.
10605 (i386_emit_eq_goto): New function.
10606 (i386_emit_ne_goto): New function.
10607 (i386_emit_lt_goto): New function.
10608 (i386_emit_le_goto): New function.
10609 (i386_emit_gt_goto): New function.
10610 (i386_emit_ge_goto): New function.
10611 (i386_emit_ops): Add the new functions.
10613 2011-09-08 Stan Shebs <stan@codesourcery.com>
10615 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10616 (i386_emit_epilogue): Restore %ebx.
10618 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10620 * server.c (step_thread): Remove definition.
10621 (process_serial_event): Don't handle Hs.
10622 * server.h (step_thread): Remove declaration.
10623 * target.c (set_desired_inferior): Remove use of step_thread.
10625 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10627 * linux-low.c: Include linux-procfs.h.
10628 (linux_attach_lwp_1): Update comments.
10629 (linux_attach): Scan for existing threads when attaching to a
10630 process that is the tgid.
10631 * Makefile.in: Update dependencies.
10633 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10635 * configure.srv: Add linux-procfs.o dependencies.
10637 2011-08-14 Yao Qi <yao@codesourcery.com>
10639 * target.h (struct target_ops): Fix indent.
10640 * win32-low.c (win32_target_ops): Fix comment.
10642 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10643 Yao Qi <yao@codesourcery.com>
10645 * Makefile.in (clean): Remove tic6x-*.c files.
10646 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10647 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10648 (tic6x-c64xp-linux.c): Likewise.
10649 * configure.srv: Add support for tic6x-*-uclinux.
10650 * linux-tic6x-low.c: New.
10651 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10653 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10654 Yao Qi <yao@codesourcery.com>
10656 * target.h (struct target_ops): Add read_loadmap.
10657 * linux-low.c (struct target_loadseg): New type.
10658 (struct target_loadmap): New type.
10659 (linux_read_loadmap): New function.
10660 (linux_target_ops): Add linux_read_loadmap.
10661 * server.c (handle_query): Support qXfer:fdpic:read packet.
10662 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10665 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10667 * win32-low.c: Include <stdint.h>.
10669 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10671 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10672 to the inferior here.
10673 (i386_remove_aligned_watchpoint): Ditto.
10674 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10675 fit part of the watchpoint in the debug registers.
10676 (i386_update_inferior_debug_regs): New.
10677 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10678 registers, and only update the inferior on success.
10679 (i386_low_remove_watchpoint): Ditto.
10681 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10683 * linux-low.c (compare_ints, unique, list_threads, show_process,
10684 linux_core_of_thread): Delete.
10685 (linux_target_ops): Change linux_core_of_thread to
10686 linux_common_core_of_thread.
10687 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10688 * utils.c (malloc_failure): Change type of argument.
10689 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10690 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10691 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10692 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10693 (IPA_OBJS): Add common-utils-ipa.o.
10694 (ptid_h, linux_osdata_h): New macros.
10695 (server_h): Add common/common-utils.h, common/xml-utils.h,
10696 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10698 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10699 ptid.o, buffer.o): New rules.
10700 (linux-low.o): Add common/linux-osdata.h as a dependency.
10701 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10702 * configure.ac: Add AC_HEADER_DIRENT check.
10703 * config.in: Regenerate.
10704 * configure: Regenerate.
10705 * remote-utils.c (xml_escape_text): Delete.
10706 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10707 buffer_xml_printf): Move to common/buffer.c.
10708 * server.c (main): Remove call to initialize_inferiors.
10709 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10710 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10711 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10712 internal_error, gdb_assert, gdb_assert_fail): Delete.
10713 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10714 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10716 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10717 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10718 initialize_inferiors): Delete.
10720 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10722 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10725 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10727 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10729 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10731 2011-05-26 Yao Qi <yao@codesourcery.com>
10733 * Makefile.in (thread-db.o): Track dependence to
10734 common/gdb_thread_db.h.
10735 * thread-db.c: include gdb_thread_db.h from right place.
10737 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10739 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10740 __FILE__ and __LINE__ to internal_error.
10742 2011-05-13 Doug Evans <dje@google.com>
10744 * thread-db.c (try_thread_db_load_from_sdir): New function.
10745 (try_thread_db_load_from_dir): New function.
10746 (thread_db_load_search): Handle $sdir, ignore $pdir.
10747 Remove trying of system directories if search of
10748 libthread-db-search-path fails, that is now done via $sdir.
10750 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10752 * server.c (handle_query): Add EnableDisableTracepoints to the list
10753 of supported features.
10754 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10756 (cmd_qtenable_disable): New.
10757 (cmd_qtstart): Install tracepoints even if disabled.
10758 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10759 receiving a QTEnable or QTDisable packet.
10760 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10761 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10763 (gdb_probe): Skip data collection if static tracepoint is disabled.
10765 2011-05-10 Doug Evans <dje@google.com>
10767 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10769 2011-05-04 Doug Evans <dje@google.com>
10771 * linux-low.c (linux_join): Skip process lookup.
10772 * spu-low.c (spu_join): Ditto.
10773 * server.c (join_inferiors_callback): Delete.
10774 (process_serial_event): For 'D' packet (detach) call join_inferior
10777 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10779 * README: Don't mention xscale*-*-linux*.
10780 * configure.srv (xscale*-*-linux*): Don't handle target.
10782 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10784 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10786 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10787 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10788 (i386_emit_void_call_2): Likewise.
10790 2011-04-26 Yao Qi <yao@codesourcery.com>
10792 * linux-low.c: Move common macros to linux-ptrace.h.
10793 Include linux-ptrace.h.
10794 * Makefile.in (linux_ptrace_h): New.
10795 (linux-low.o): Depends on linux-ptrace.h.
10797 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10799 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10800 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10801 (remote_prepare): New function with most of the TCP code from ...
10802 (remote_open): ... here. Detect PORT here unconditionally. Move also
10803 setting transport_is_reliable.
10804 * server.c (run_once): New variable.
10805 (gdbserver_usage): Document it.
10806 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10807 the first run if RUN_ONCE.
10808 * server.h (run_once, remote_prepare): New declarations.
10810 2011-04-19 Tom Tromey <tromey@redhat.com>
10812 * win32-low.c (handle_load_dll): Remove duplicate "the".
10814 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10816 Remove support for old Cygwin 1.5 versions.
10817 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10818 function to avoid warning.
10819 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10822 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10824 * gdbserver/server.h (Macro _): Define it if not available.
10826 2011-03-14 Michael Snyder <msnyder@vmware.com>
10828 * hostio.c (handle_close): Remove unnecessary null test.
10830 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10832 * Makefile.in (maintainer-clean realclean distclean): Remove
10833 "make ... subdir_do" command.
10835 2011-03-10 Michael Snyder <msnyder@vmware.com>
10837 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10839 * server.c (handle_v_run): Free alloced buffer on early return.
10841 2011-03-09 Yao Qi <yao@codesourcery.com>
10844 2011-03-04 Yao Qi <yao@codesourcery.com>
10846 * Makefile.in: Remove GNU make feature --directory.
10848 2011-03-05 Yao Qi <yao@codesourcery.com>
10850 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10851 (subdir_do): New make target. Copied from gdb/Makefile.
10852 (maintainer-clean, realclean, distclean, clean): Call corresponding
10853 make targets in common/Makefile.
10855 2011-02-11 Yao Qi <yao@codesourcery.com>
10857 * configure.ac: Call AC_PROG_RANLIB.
10858 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10859 * configure: Regenerate.
10861 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10863 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10865 2011-03-06 Yao Qi <yao@codesourcery.com>
10867 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10869 2011-03-05 Yao Qi <yao@codesourcery.com>
10871 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10872 (subdir_do): New make target. Copied from gdb/Makefile.
10873 (maintainer-clean, realclean, distclean, clean): Call corresponding
10874 make targets in common/Makefile.
10876 2011-03-04 Yao Qi <yao@codesourcery.com>
10878 * Makefile.in: Remove GNU make feature --directory.
10880 2011-03-04 Michael Snyder <msnyder@vmware.com>
10882 * server.c (queue_stop_reply): Call xmalloc not malloc.
10884 2011-03-02 Michael Snyder <msnyder@vmware.com>
10886 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10888 2011-02-28 Michael Snyder <msnyder@vmware.com>
10890 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10891 (cmd_qtframe): Ditto.
10892 (cmd_qtbuffer): Ditto.
10893 (cmd_bigqtbuffer): Ditto.
10895 * utils.c (decimal2str): Initialize 'width' to nine, then
10896 don't mess with it.
10898 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10900 * hostio.c (require_data): Free *data, not data.
10902 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10904 * hostio.c (require_data): Use free, not xfree.
10906 2011-02-27 Michael Snyder <msnyder@vmware.com>
10908 * server.c (handle_query): Discard unused value.
10910 * hostio.c (require_data): Free malloc memory before returning
10913 2011-02-26 Michael Snyder <msnyder@vmware.com>
10915 * linux-low.c (list_threads): Call closedir for dirent.
10917 2011-02-27 Michael Snyder <msnyder@vmware.com>
10919 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10920 a case statement falls through.
10922 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10924 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10927 2011-02-26 Michael Snyder <msnyder@vmware.com>
10929 * utils.c (decimal2str): Eliminate dead code and dead param.
10930 (pulongest): Drop dead param from call to decimal2str.
10933 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10935 Revert the following patch (not approved yet):
10936 2011-02-21 Hui Zhu <teawater@gmail.com>
10937 * tracepoint.c (tp_printf): New function.
10938 (eval_agent_expr): Handle gdb_agent_op_printf.
10940 2011-02-21 Hui Zhu <teawater@gmail.com>
10942 * tracepoint.c (tp_printf): New function.
10943 (eval_agent_expr): Handle gdb_agent_op_printf.
10945 2011-02-18 Tom Tromey <tromey@redhat.com>
10947 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10948 (tracepoint.o): Likewise.
10949 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10950 (gdb_agent_op_names): Likewise.
10952 2011-02-18 Tom Tromey <tromey@redhat.com>
10954 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10955 gdb_agent_op_rot>: New constants.
10956 (gdb_agent_op_names): Add pick and roll.
10957 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10960 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10962 * aclocal.m4: Regenerated with aclocal-1.11.1.
10964 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10966 * server.c (handle_qxfer_traceframe_info): New.
10967 (qxfer_packets): Register "traceframe-info".
10968 (handle_query): Report support for qXfer:traceframe-info:read+.
10969 * tracepoint.c (match_blocktype): New.
10970 (traceframe_find_block_type): Rename to ...
10971 (traceframe_walk_blocks): ... this. Add callback filter argument,
10973 (traceframe_find_block_type): New, reimplemented on top of
10974 traceframe_walk_blocks.
10975 (build_traceframe_info_xml): New.
10976 (traceframe_read_info): New.
10977 * server.h (traceframe_read_info): Declare.
10979 2011-02-11 Yao Qi <yao@codesourcery.com>
10981 * configure.ac: Call AC_PROG_RANLIB.
10982 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10983 * configure: Regenerate.
10985 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10987 * server.c (gdb_read_memory): Change return semantics to allow
10989 (handle_search_memory_1): Adjust.
10990 (process_serial_event) <'m' packet>: Handle partial transfers.
10991 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10993 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10995 * regcache.c (init_register_cache): Initialize
10996 regcache->register_status.
10997 (free_register_cache): Release regcache->register_status.
10998 (regcache_cpy): Copy register_status.
10999 (registers_to_string): Print 'x's for unavailable registers.
11000 (supply_register): Mark the register's status valid or
11001 unavailable, depending on whether a buffer was passed in or not.
11002 (supply_register_zeroed): New.
11003 (supply_regblock): Mark the registers' status valid or
11004 unavailable, depending on whether a buffer was passed in or not.
11005 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11006 (struct regcache): New `register_status' field.
11007 (supply_register_zeroed): Declare.
11008 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11009 supply_register_zeroed, rather than passing a NULL buffer to
11011 * tracepoint.c (fetch_traceframe_registers): Update comment.
11013 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11015 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11018 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11020 * server.h (decode_xfer_write): Change prototype.
11021 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11022 and don't extract the annex here.
11023 * server.c (decode_xfer_read): Remove `annex' parameter,
11024 and don't extract the annex here.
11025 (decode_xfer): New.
11026 (struct qxfer): New.
11027 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11028 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11029 (handle_qxfer_statictrace): New functions, abstracted out from
11030 handle_query, and made to use the struct qxfer interface.
11031 (handle_threads_qxfer_proper): Rename to ...
11032 (handle_qxfer_threads_proper): ... this.
11033 (handle_threads_qxfer): Rename to ...
11034 (handle_qxfer_threads): ... this. Adjust.
11035 (qxfer_packets): New array.
11036 (handle_qxfer): New function.
11037 (handle_query): Use handle_qxfer.
11039 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11041 * gdbreplay.c: Shorten lines of >= 80 columns.
11042 * linux-low.c: Ditto.
11043 * linux-ppc-low.c: Ditto.
11044 * linux-s390-low.c: Ditto.
11045 * linux-sparc-low.c: Ditto.
11046 * linux-x86-low.c: Ditto.
11047 * linux-xtensa-low.c: Ditto.
11048 * mem-break.c: Ditto.
11049 * nto-low.c: Ditto.
11050 * regcache.h: Ditto.
11051 * remote-utils.c: Ditto.
11054 * thread-db.c: Ditto.
11055 * tracepoint.c: Ditto.
11057 * win32-low.h: Ditto.
11059 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11061 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11064 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11066 * server.c (gdbserver_version): Update copyright year in version
11068 * gdbreplay.c (gdbreplay_version): Ditto.
11070 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11072 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11073 * linux-bfin-low.c: New file.
11074 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11075 PT_DATA_ADDR for BFIN targets.
11076 * Makefile.in (SFILES): Add linux-bfin-low.c.
11077 (clean): Remove reg-bfin.c.
11078 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11079 * README: Mention supported Blackfin targets.
11081 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11083 * .gitignore: New file.
11085 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11087 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11089 2010-10-22 Jie Zhang <jie@codesourcery.com>
11091 * Makefile.in: Add FLAGS_TO_PASS variable.
11092 (install): Remove dependency of install-only and recursively
11093 invoke make for install-only.
11095 2010-10-04 Doug Evans <dje@google.com>
11097 * Makefile.in (uninstall): Use $(DESTDIR).
11099 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11103 * linux-x86-low.c (compat_siginfo_from_siginfo)
11104 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11105 si_code is < 0. Check for si_code == SI_TIMER before checking for
11108 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11110 * lynx-i386-low.c: New file.
11111 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11113 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11115 * lynx-low.c (ptrace_request_to_str): Remove handling for
11116 request values that have been removed in LynxOS 5.x.
11118 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11120 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11123 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11125 * configure.ac: Add --enable-inprocess-agent option.
11126 * configure: Rebuilt.
11128 2010-09-06 Yao Qi <yao@codesourcery.com>
11130 * linux-low.c (linux_kill): Remove unused variable.
11131 (linux_stabilize_threads): Likewise.
11132 * server.c (start_inferior): Likewise.
11133 (queue_stop_reply_callback): Likewise.
11134 * tracepoint.c (do_action_at_tracepoint): Likewise.
11136 2010-09-06 Yao Qi <yao@codesourcery.com>
11138 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11141 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11143 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11145 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11147 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11150 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11152 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11153 gdbserver/lynx-ppc-low.c: New files.
11154 * Makefile.in (lynx_low_h): New variable.
11155 (lynx-low.o, lynx-ppc-low.o): New rules.
11156 * configure.ac: On LynxOS, link with -lnetinet.
11157 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11158 * configure: regenerate.
11160 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11162 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11163 * configure.ac: Add check for vasprintf and vsnprintf.
11164 * configure, config.in: Regenerate.
11165 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11167 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11169 * gdbreplay.c: Move include of alloca.h up, next to include of
11171 * server.h: Add include of malloc.h.
11172 * mem-break.c: Remove include of malloc.h.
11173 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11175 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11177 * Makefile.in (memmem.o): Build with -Wno-error.
11179 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11181 * utils.c (xsnprintf): Make non-static.
11182 * server.h: Add xsnprintf declaration.
11183 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11184 replace calls to snprintf by calls to xsnprintf throughout.
11186 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11188 * configure.ac: Add configure check for alloca.
11189 * configure, config.in: Regenerate.
11190 * server.h: Include alloca.h if it exists.
11191 * gdbreplay.c: Include alloca.h if it exists.
11193 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11195 * linux-low.c (__SIGRTMIN): Define if not already defined.
11196 (linux_create_inferior): Check for __ANDROID__ rather than
11198 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11199 are already deferred.
11200 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11201 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11202 stopped and already has a pending signal to report.
11203 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11204 a pending signal to report or is moving out of a jump pad.
11205 (linux_init_signals): Check for __ANDROID__ rather than
11208 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11210 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11211 debug_threads check. Avoid a linear search when not doing debug
11214 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11216 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11217 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11218 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11219 (process_event): Change local fd's type to gdb_fildes_t.
11220 (create_file_handler): Adjust prototype.
11221 (delete_file_handler): Adjust prototype.
11222 (handle_file_event): Adjust prototype. Use pfildes.
11223 (create_file_event): Adjsut prototype.
11224 * remote-utils.c (remote_desc, listen_desc): Change type to
11226 * server.h: New gdb_fildes_t typedef.
11227 [USE_WIN32API]: Include winsock2.h.
11228 (delete_file_handler, add_file_handler): Adjust prototypes.
11229 (pfildes): Declare.
11230 * utils.c (pfildes): New.
11232 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11234 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11235 * configure: Regenerate.
11237 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11239 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11240 (linux_done_accessing_memory): ... this.
11241 (linux_target_ops): Adjust.
11242 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11243 * nto-low.c (nto_target_ops): Adjust comment.
11244 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11245 * spu-low.c (spu_target_ops): Adjust comment.
11246 * target.h (target_ops): Rename unprepare_to_access_memory field
11247 to done_accessing_memory.
11248 (unprepare_to_access_memory): Rename to ...
11249 (done_accessing_memory): ... this.
11251 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11253 * linux-low.c (linux_prepare_to_access_memory): New.
11254 (linux_unprepare_to_access_memory): New.
11255 (linux_target_ops): Install them.
11256 * server.c (read_memory): Rename to ...
11257 (gdb_read_memory): ... this. Use
11258 prepare_to_access_memory/prepare_to_access_memory.
11259 (write_memory): Rename to ...
11260 (gdb_write_memory): ... this. Use
11261 prepare_to_access_memory/prepare_to_access_memory.
11262 (handle_search_memory_1): Adjust.
11263 (process_serial_event): Adjust.
11264 * target.h (struct target_ops): New fields
11265 prepare_to_access_memory and unprepare_to_access_memory.
11266 (prepare_to_access_memory, unprepare_to_access_memory): New.
11267 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11268 prepare_to_access_memory/prepare_to_access_memory.
11269 * nto-low.c (nto_target_ops): Adjust.
11270 * spu-low.c (spu_target_ops): Adjust.
11271 * win32-low.c (win32_target_ops): Adjust.
11273 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11275 * Makefile.in (WARN_CFLAGS): Get it from configure.
11276 (WERROR_CFLAGS): New.
11277 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11278 * configure.ac: Introduce --enable-werror, which adds -Werror to
11279 the compiler command line. Enabled by default. Disable with
11280 --disable-werror. Add -Wdeclaration-after-statement
11281 Wpointer-arith and -Wformat-nonliteral to warning flags.
11282 * configure: Regenerate.
11284 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11286 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11288 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11290 * gdbreplay.c (remote_error): New.
11292 (expect): Use gdbchar. Check for error reading from GDB.
11293 Clarify sync error output.
11294 (play): Check for errors writing to GDB.
11295 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11296 * remote-utils.c (getpkt): Check for errors writing to the remote
11299 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11301 * linux-low.c (linux_wait_1): Move non-debugging code out of
11302 `debug_threads' control.
11304 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11306 * linux-low.c (linux_wait_1): Don't set last_status here.
11307 * server.c (push_event, queue_stop_reply_callback): Assert we're
11308 not pushing a TARGET_WAITKIND_IGNORE event.
11309 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11310 (myresume, handle_target_event): Set the thread's last_resume_kind
11311 and last_status from the target returned status.
11313 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11317 * linux-x86-low.c (update_debug_registers_callback): New.
11318 (i386_dr_low_set_addr): Use it.
11319 (i386_dr_low_get_addr): New.
11320 (i386_dr_low_set_control): Use update_debug_registers_callback.
11321 (i386_dr_low_get_control): New.
11322 (i386_dr_low_get_status): Adjust.
11323 * linux-low.c (linux_stop_lwp): New.
11324 * linux-low.h (linux_stop_lwp): Declare.
11326 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11327 argument instead of a i386_debug_reg_state.
11328 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11329 a i386_debug_reg_state.
11330 (i386_insert_aligned_watchpoint): Adjust.
11331 (i386_remove_aligned_watchpoint): Adjust.
11332 (i386_low_stopped_data_address): Read the debug registers from the
11333 inferior instead of from the mirrors.
11334 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11335 (i386_dr_low_get_addr): Declare.
11336 (i386_dr_low_get_control): Declare.
11337 (i386_dr_low_get_status): Change prototype.
11339 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11340 (i386_dr_low_get_addr): New.
11341 (i386_dr_low_get_control): New.
11342 (i386_dr_low_get_status): Adjust prototype. Return
11344 (i386_initial_stuff): Clear dr_status_mirror and
11346 (i386_get_thread_context): Adjust.
11347 (i386_set_thread_context): Adjust.
11348 (i386_thread_added): Adjust.
11350 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11352 * linux-low.h (linux_thread_area): Delete declaration.
11354 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11356 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11357 after its termination.
11359 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11361 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11362 (gdb_wants_all_stopped): Delete.
11363 (linux_wait_1): Don't call them.
11364 * server.c (handle_v_cont): Tag all threads as want-stopped.
11365 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11366 stopped as "client-wants-stopped".
11368 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11370 * Makefile.in (signals_h): New.
11371 (server_h): Depend on it.
11372 (server.o): Don't depend on $(signals_def).
11373 (signals.o): Depend on $(signals_def).
11375 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11377 * Makefile.in (signals_def): New.
11378 (server_h): Append include/gdb/signals.h and signals_def.
11379 (server.o): Append signals_def.
11381 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11383 * server.c (handle_target_event): Use target_signal_to_host for
11384 resume_info.sig initialization.
11385 * target.h (struct thread_resume) <sig>: New comment.
11387 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11389 * server.c (handle_query): strcpy() the returned string from paddress()
11390 instead of sprintf().
11391 * utils.c (paddress): Return phex_nz().
11393 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11395 * server.c (handle_v_cont): Call mourn_inferior if process
11397 (myresume): Likewise.
11399 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11401 Static tracepoints, and integration with UST.
11403 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11404 * mem-break.c (uninsert_all_breakpoints)
11405 (reinsert_all_breakpoints): New.
11406 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11407 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11408 (gdb_agent_ust_loaded, helper_thread_id)
11409 (gdb_agent_helper_thread_id): New macros.
11410 (struct ipa_sym_addresses): Add addr_ust_loaded,
11411 addr_helper_thread_id, addr_cmd_buf.
11412 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11413 (in_process_agent_loaded_ust): New.
11414 (write_e_ust_not_loaded): New.
11415 (maybe_write_ipa_ust_not_loaded): New.
11416 (struct collect_static_trace_data_action): New.
11417 (enum tracepoint_type) <static_tracepoint>: New.
11418 (struct tracepoint) <handle>: Mention static tracepoints.
11419 (struct static_tracepoint_ctx): New.
11420 (CMD_BUF_SIZE): New.
11421 (add_tracepoint_action): Handle static tracepoint actions.
11422 (unprobe_marker_at): New.
11423 (clear_installed_tracepoints): Handle static tracepoints.
11424 (cmd_qtdp): Handle static tracepoints.
11425 (probe_marker_at): New.
11426 (cmd_qtstart): Handle static tracepoints.
11427 (response_tracepoint): Handle static tracepoints.
11428 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11429 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11430 (get_context_regcache): Handle static tracepoints.
11431 (do_action_at_tracepoint): Handle static tracepoint actions.
11432 (traceframe_find_block_type): Handle static trace data blocks.
11433 (traceframe_read_sdata): New.
11434 (download_tracepoints): Download static tracepoint actions.
11435 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11436 (GDB_PROBE_NAME): New.
11438 (GET_UST_SYM): New.
11441 (ust_marker_to_static_tracepoint): New.
11443 (collect_ust_data_at_tracepoint): New.
11444 (gdb_ust_probe): New.
11445 (UNIX_PATH_MAX, SOCK_DIR): New.
11446 (gdb_ust_connect_sync_socket): New.
11447 (resume_thread, stop_thread): New.
11448 (run_inferior_command): New.
11449 (init_named_socket): New.
11450 (gdb_ust_socket_init): New.
11451 (cstr_to_hexstr): New.
11453 (first_marker, next_marker): New.
11454 (response_ust_marker): New.
11455 (cmd_qtfstm, cmd_qtsstm): New.
11456 (unprobe_marker_at, probe_marker_at): New.
11457 (cmd_qtstmat, gdb_ust_thread): New.
11458 (gdb_ust_init): New.
11459 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11460 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11461 (ST_REGENTRY): New.
11462 (x86_64_st_collect_regmap): New.
11463 (X86_64_NUM_ST_COLLECT_GREGS): New.
11464 (AMD64_RIP_REGNUM): New.
11465 (supply_static_tracepoint_registers): New.
11466 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11467 (ST_REGENTRY): New.
11468 (i386_st_collect_regmap): New.
11469 (i386_NUM_ST_COLLECT_GREGS): New.
11470 (supply_static_tracepoint_registers): New.
11471 * server.c (handle_query): Handle qXfer:statictrace:read.
11472 <qSupported>: Report support for StaticTracepoints, and
11473 qXfer:statictrace:read features.
11474 * server.h (traceframe_read_sdata)
11475 (supply_static_tracepoint_registers): Declare.
11476 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11477 (unpack_varlen_hex): Include in IPA build.
11478 * Makefile.in (ustlibs, ustinc): New.
11479 (IPA_OBJS): Add remote-utils-ipa.o.
11480 ($(IPA_LIB)): Link -ldl and -lpthread.
11482 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11483 * config.in, configure: Regenerate.
11485 2010-06-20 Ian Lance Taylor <iant@google.com>
11486 Pedro Alves <pedro@codesourcery.com>
11488 * linux-x86-low.c (always_true): Delete.
11489 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11490 trying to fool the compiler with always_true.
11492 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11494 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11495 conditions in gdbserver.
11497 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11499 * spu-low.c (spu_read_memory): Wrap around local store limit.
11500 (spu_write_memory): Likewise.
11502 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11504 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11505 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11507 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11509 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11510 uses with LONGEST uses.
11512 2010-06-14 Stan Shebs <stan@codesourcery.com>
11513 Pedro Alves <pedro@codesourcery.com>
11517 * linux-x86-low.c: Include limits.h.
11519 (always_true): New.
11522 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11523 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11524 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11525 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11526 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11527 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11528 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11529 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11530 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11531 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11532 (amd64_emit_void_call_2): New.
11533 (amd64_emit_ops): New.
11534 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11535 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11536 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11537 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11538 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11539 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11540 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11541 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11542 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11543 (i386_emit_stack_adjust, i386_emit_int_call_1)
11544 (i386_emit_void_call_2): New.
11545 (i386_emit_ops): New.
11546 (x86_emit_ops): New.
11547 (the_low_target): Install x86_emit_ops.
11548 * server.h (struct emit_ops): New.
11549 (get_raw_reg_func_addr): Declare.
11550 (current_insn_ptr, emit_error): Declare.
11551 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11552 (set_trace_state_variable_value): New defines.
11553 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11554 addr_get_trace_state_variable_value and
11555 addr_set_trace_state_variable_value.
11556 (symbol_list): New fields for get_raw_reg,
11557 get_trace_state_variable_value and set_trace_state_variable_value.
11558 (condfn): New typedef.
11559 (struct tracepoint): New field `compiled_cond'.
11560 (do_action_at_tracepoint): Clear compiled_cond.
11561 (get_trace_state_variable_value, set_trace_state_variable_value):
11563 (condition_true_at_tracepoint): If there's a compiled condition,
11565 (current_insn_ptr, emit_error): New globals.
11566 (struct bytecode_address): New.
11567 (get_raw_reg_func_addr): New.
11568 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11569 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11570 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11571 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11572 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11573 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11574 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11575 (compile_tracepoint_condition, compile_bytecodes): New.
11576 * target.h (emit_ops): Forward declare.
11577 (struct target_ops): New field emit_ops.
11578 (target_emit_ops): New.
11579 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11580 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11581 * linux-low.c (linux_emit_ops): New.
11582 (linux_target_ops): Install it.
11583 * linux-low.h (struct linux_target_ops): New field emit_ops.
11585 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11587 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11588 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11590 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11591 Stan Shebs <stan@codesourcery.com>
11593 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11594 (all): Depend on $(extra_libraries).
11595 (install-only): Install the IPA.
11596 (IPA_OBJS, IPA_LIB): New.
11597 (clean): Remove the IPA lib.
11598 (IPAGENT_CFLAGS): New.
11599 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11600 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11601 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11602 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11603 * configure.ac: Check for atomic builtins support in the compiler.
11604 (IPA_DEPFILES, extra_libraries): Define.
11605 * configure.srv (ipa_obj): Add description.
11606 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11607 (i[34567]86-*-linux*): Set ipa_obj.
11608 (x86_64-*-linux*): Set ipa_obj.
11609 * linux-low.c (stabilizing_threads): New.
11610 (supports_fast_tracepoints): New.
11611 (linux_detach): Stabilize threads before detaching.
11612 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11613 the lwp is either not stabilizing, or is moving out of a jump pad.
11614 (linux_fast_tracepoint_collecting): New.
11615 (maybe_move_out_of_jump_pad): New.
11616 (enqueue_one_deferred_signal): New.
11617 (dequeue_one_deferred_signal): New.
11618 (linux_wait_for_event_1): If moving out of a jump pad, defer
11619 pending signals to later.
11620 (linux_stabilize_threads): New.
11621 (linux_wait_1): Check if threads need moving out of jump pads, and
11623 (stuck_in_jump_pad_callback): New.
11624 (move_out_of_jump_pad_callback): New.
11625 (lwp_running): New.
11626 (linux_resume_one_lwp): Handle moving out of jump pads.
11627 (linux_set_resume_request): Dequeue deferred signals.
11628 (need_step_over_p): Also step over fast tracepoint jumps.
11629 (start_step_over): Also uninsert fast tracepoint jumps.
11630 (finish_step_over): Also reinsert fast tracepoint jumps.
11631 (linux_install_fast_tracepoint_jump): New.
11632 (linux_target_ops): Install linux_stabilize_threads and
11633 linux_install_fast_tracepoint_jump_pad.
11634 * linux-low.h (linux_target_ops) <get_thread_area,
11635 install_fast_tracepoint_jump_pad>: New fields.
11636 (struct lwp_info) <collecting_fast_tracepoint,
11637 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11638 (linux_get_thread_area): Declare.
11639 * linux-x86-low.c (jump_insn): New.
11640 (x86_get_thread_area): New.
11641 (append_insns): New.
11642 (push_opcode): New.
11643 (amd64_install_fast_tracepoint_jump_pad): New.
11644 (i386_install_fast_tracepoint_jump_pad): New.
11645 (x86_install_fast_tracepoint_jump_pad): New.
11646 (the_low_target): Install x86_get_thread_area and
11647 x86_install_fast_tracepoint_jump_pad.
11648 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11649 (struct fast_tracepoint_jump): New.
11650 (fast_tracepoint_jump_insn): New.
11651 (fast_tracepoint_jump_shadow): New.
11652 (find_fast_tracepoint_jump_at): New.
11653 (fast_tracepoint_jump_here): New.
11654 (delete_fast_tracepoint_jump): New.
11655 (set_fast_tracepoint_jump): New.
11656 (uninsert_fast_tracepoint_jumps_at): New.
11657 (reinsert_fast_tracepoint_jumps_at): New.
11658 (set_breakpoint_at): Use write_inferior_memory.
11659 (uninsert_raw_breakpoint): Use write_inferior_memory.
11660 (check_mem_read): Mask out fast tracepoint jumps.
11661 (check_mem_write): Mask out fast tracepoint jumps.
11662 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11663 (set_fast_tracepoint_jump): Declare.
11664 (delete_fast_tracepoint_jump)
11665 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11666 (reinsert_fast_tracepoint_jumps_at): Declare.
11667 * regcache.c: Don't compile many functions when building the
11668 in-process agent library.
11669 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11670 the register buffer in the heap.
11671 (free_register_cache): If the register buffer isn't owned by the
11672 regcache, don't free it.
11673 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11674 pre-existing register caches.
11675 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11677 (convert_ascii_to_int): : Constify `from' parameter type.
11678 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11679 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11680 the needed buffer in-place.
11681 (relocate_instruction): New.
11682 * server.c (handle_query) <qSymbols>: If the target supports
11683 tracepoints, give it a chance of looking up symbols. Report
11684 support for fast tracepoints.
11685 (handle_status): Stabilize threads.
11686 (process_serial_event): Adjust.
11687 * server.h (struct fast_tracepoint_jump): Forward declare.
11688 (struct process_info) <fast_tracepoint_jumps>: New field.
11689 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11690 (decode_X_packet, decode_M_packet): Adjust.
11691 (relocate_instruction): Declare.
11692 (in_process_agent_loaded): Declare.
11693 (tracepoint_look_up_symbols): Declare.
11694 (struct fast_tpoint_collect_status): Declare.
11695 (fast_tracepoint_collecting): Declare.
11696 (force_unlock_trace_buffer): Declare.
11697 (handle_tracepoint_bkpts): Declare.
11698 (initialize_low_tracepoint)
11699 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11700 * target.h (struct target_ops) <stabilize_threads,
11701 install_fast_tracepoint_jump_pad>: New fields.
11702 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11703 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11704 [HAVE_STDINT_H]: Include stdint.h.
11705 (trace_debug_1): Rename to ...
11706 (trace_vdebug): ... this.
11707 (trace_debug): Rename to ...
11708 (trace_debug_1): ... this. Add `level' parameter.
11709 (trace_debug): New.
11710 (ATTR_USED, ATTR_NOINLINE): New.
11711 (IP_AGENT_EXPORT): New.
11712 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11713 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11714 (about_to_request_buffer_space, trace_buffer_is_full)
11715 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11716 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11717 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11718 (traceframe_write_count, traceframes_created)
11719 (trace_state_variables)
11720 New renaming defines.
11721 (struct ipa_sym_addresses): New.
11722 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11723 (symbol_list): New.
11724 (ipa_sym_addrs): New.
11725 (all_tracepoint_symbols_looked_up): New.
11726 (in_process_agent_loaded): New.
11727 (write_e_ipa_not_loaded): New.
11728 (maybe_write_ipa_not_loaded): New.
11729 (tracepoint_look_up_symbols): New.
11730 (debug_threads) [IN_PROCESS_AGENT]: New.
11731 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11732 (UNKNOWN_SIDE_EFFECTS): New.
11733 (stop_tracing): New.
11734 (flush_trace_buffer): New.
11735 (stop_tracing_bkpt): New.
11736 (flush_trace_buffer_bkpt): New.
11737 (read_inferior_integer): New.
11738 (read_inferior_uinteger): New.
11739 (read_inferior_data_pointer): New.
11740 (write_inferior_data_pointer): New.
11741 (write_inferior_integer): New.
11742 (write_inferior_uinteger): New.
11743 (struct collect_static_trace_data_action): Delete.
11744 (enum tracepoint_type): New.
11745 (struct tracepoint) <type>: New field `type'.
11746 <actions_str, step_actions, step_actions_str>: Only include in
11748 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11749 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11750 (tracepoints): Use IP_AGENT_EXPORT.
11751 (last_tracepoint): Don't include in the IPA.
11752 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11753 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11754 (alloced_trace_state_variables): New.
11755 (trace_state_variables): Use IP_AGENT_EXPORT.
11756 (traceframe_t): Delete unused variable.
11757 (circular_trace_buffer): Don't include in the IPA.
11758 (trace_buffer_start): Delete.
11759 (struct trace_buffer_control): New.
11760 (trace_buffer_free): Delete.
11761 (struct ipa_trace_buffer_control): New.
11762 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11763 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11765 (trace_buffer_ctrl): New.
11766 (TRACE_BUFFER_CTRL_CURR): New.
11767 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11768 Reimplement as macros.
11769 (trace_buffer_wrap): Delete.
11770 (traceframe_write_count, traceframe_read_count)
11771 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11772 (struct tracepoint_hit_ctx) <type>: New field.
11773 (struct fast_tracepoint_ctx): New.
11774 (memory_barrier): New.
11776 (record_tracepoint_error): Update atomically in the IPA.
11777 (clear_inferior_trace_buffer): New.
11778 (about_to_request_buffer_space): New.
11779 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11780 updating the same buffer.
11781 (add_tracepoint): Default the tracepoint's type to trap
11782 tracepoint, and orig_size to -1.
11783 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11784 internal variables.
11785 (create_trace_state_variable): New parameter `gdb'. Handle it.
11786 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11787 (cmd_qtdp): Handle fast tracepoints.
11788 (cmd_qtdv): Adjust.
11789 (max_jump_pad_size): New.
11790 (gdb_jump_pad_head): New.
11791 (get_jump_space_head): New.
11792 (claim_jump_space): New.
11793 (sort_tracepoints): New.
11794 (MAX_JUMP_SIZE): New.
11795 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11797 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11798 support. Upload fast traceframes, and delete internal IPA
11800 (stop_tracing_handler): New.
11801 (flush_trace_buffer_handler): New.
11802 (cmd_qtstop): Upload fast tracepoints.
11803 (response_tracepoint): Handle fast tracepoints.
11804 (tracepoint_finished_step): Upload fast traceframes. Set the
11805 tracepoint hit context's tracepoint type.
11806 (handle_tracepoint_bkpts): New.
11807 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11808 type. Add comment about fast tracepoints.
11809 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11810 non-existing action_str field.
11811 (get_context_regcache): Handle fast tracepoints.
11812 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11814 (fast_tracepoint_from_jump_pad_address): New.
11815 (fast_tracepoint_from_ipa_tpoint_address): New.
11816 (collecting_t): New.
11817 (force_unlock_trace_buffer): New.
11818 (fast_tracepoint_collecting): New.
11820 (gdb_collect): New.
11821 (write_inferior_data_ptr): New.
11822 (target_tp_heap): New.
11823 (target_malloc): New.
11824 (download_agent_expr): New.
11826 (download_tracepoints): New.
11827 (download_trace_state_variables): New.
11828 (upload_fast_traceframes): New.
11829 (IPA_FIRST_TRACEFRAME): New.
11830 (IPA_NEXT_TRACEFRAME_1): New.
11831 (IPA_NEXT_TRACEFRAME): New.
11832 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11833 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11834 (gdb_jump_pad_buffer_end): New.
11835 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11836 (initialize_tracepoint): Adjust.
11837 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11838 buffer. Initialize the low module.
11839 * utils.c (PREFIX, TOOLNAME): New.
11840 (malloc_failure): Use PREFIX.
11841 (error): In the IPA, an error causes an exit.
11842 (fatal, warning): Use PREFIX.
11843 (internal_error): Use TOOLNAME.
11844 (NUMCELLS): Increase to 10.
11845 * configure, config.in: Regenerate.
11847 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11849 * server.c (handle_query) <qSupported>: Do two passes over the
11850 qSupported string to avoid nesting strtok.
11852 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11854 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11856 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11857 -Wl,--dynamic-list.
11858 * configure: Regenerate.
11859 * proc-service.list: New.
11861 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11863 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11866 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11868 * gdbreplay.c (remote_open): Check error return from socket() call by
11869 its equality to -1 not by it being negative.
11870 * remote-utils.c (remote_open): Likewise.
11872 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11874 * config.h: Regenerate.
11876 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11878 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11879 doesn't provide PTRACE_GET_THREAD_AREA.
11881 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11883 * linux-m68k-low.c: Include <asm/ptrace.h>
11884 (ps_get_thread_area): Implement.
11886 2010-05-03 Doug Evans <dje@google.com>
11888 * event-loop.c (struct callback_event): New struct.
11889 (callback_list): New global.
11890 (append_callback_event, delete_callback_event): New functions.
11891 (process_callback): New function.
11892 (start_event_loop): Call it.
11893 * remote-utils.c (NOT_SCHEDULED): Define.
11894 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11895 moved out of readchar.
11896 (readchar): Rewrite. Call reschedule before returning.
11897 (reset_readchar): New function.
11898 (remote_close): Call it.
11899 (process_remaining, reschedule): New functions.
11900 * server.h (callback_handler_func): New typedef.
11901 (append_callback_event, delete_callback_event): Declare.
11903 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11905 * proc-service.c (ps_pglobal_lookup): Use
11906 thread_db_look_up_one_symbol.
11907 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11908 parameter. Use it instead of all_symbols_looked_up.
11909 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11911 (all_symbols_looked_up): Don't declare.
11912 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11913 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11915 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11916 Set all_symbols_looked_up here.
11917 (thread_db_look_up_one_symbol): New.
11918 (thread_db_get_tls_address): Adjust.
11919 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11920 thread_db object on the heap, and tentatively set it in the
11922 (thread_db_init): Don't set all_symbols_looked_up here.
11923 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11925 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11927 * linux-low.c (linux_kill, linux_detach): Adjust.
11928 (status_pending_p_callback): Remove redundant statement. Check
11929 for !TARGET_WAITIKIND_IGNORE, instead of
11930 TARGET_WAITKIND_STOPPED.
11931 (handle_tracepoints): Make sure LWP is locked. Adjust.
11932 (linux_wait_for_event_1): Adjust.
11933 (linux_cancel_breakpoints): New.
11934 (unsuspend_one_lwp): New.
11935 (unsuspend_all_lwps): New.
11936 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11937 (send_sigstop_callback): Change return type to int, add new
11938 `except' parameter and handle it.
11939 (suspend_and_send_sigstop_callback): New.
11940 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11941 pass them down. If SUSPEND, also increment the lwp's suspend
11943 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11944 (need_step_over_p): Don't consider suspended LWPs.
11945 (start_step_over): Adjust.
11946 (proceed_one_lwp): Change return type to int, add new `except'
11947 parameter and handle it.
11948 (unsuspend_and_proceed_one_lwp): New.
11949 (proceed_all_lwps): Use find_inferior instead of
11951 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11952 also decrement the suspend count of LWPs. Pass `except' down,
11953 instead of hacking its suspend count.
11954 (linux_pause_all): Add `freeze' parameter. Adjust.
11955 (linux_unpause_all): New.
11956 (linux_target_ops): Install linux_unpause_all.
11957 * server.c (handle_status): Adjust.
11958 * target.h (struct target_ops): New fields `unpause_all' and
11959 `cancel_breakpoints'. Add new parameter to `pause_all'.
11960 (pause_all): Add new `freeze' parameter.
11961 (unpause_all): New.
11962 (cancel_breakpoints): New.
11963 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11964 cancel breakpoints.
11965 (cmd_qtstart): Pause threads.
11966 (stop_tracing): Pause threads, and cancel breakpoints.
11967 * win32-low.c (win32_target_ops): Adjust.
11969 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11971 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11972 the inferior right away from here...
11973 (linux_wait_1): ... to here, and adjust to check the thread's
11974 last_resume_kind instead of the lwp's step or stop_expected flags.
11976 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11978 * README: Use consistent `GDB' and `GDBserver' spellings.
11980 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11982 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11983 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11984 (linux_detach_one_lwp): Assume the lwp is stopped.
11985 (any_thread_of): Delete.
11986 (linux_detach): Stop all lwps here. Don't blindly delete all
11988 (delete_lwp_callback): New.
11989 (linux_mourn): Delete all lwps of the process that is gone.
11990 (linux_wait_1): Don't delete the last lwp of the process here.
11991 * mem-break.h (mark_breakpoints_out): Declare.
11992 * mem-break.c (mark_breakpoints_out): New.
11993 (free_all_breakpoints): Use it.
11994 * server.c (handle_target_event): If the process is gone, mark
11996 * thread-db.c (struct thread_db) <create_bp>: New field.
11997 (thread_db_enable_reporting): Fix prototype. Store a thread event
11998 breakpoint reference in the thread_db struct.
11999 (thread_db_load_search): Clear the thread_db object.
12000 (try_thread_db_load_1): Ditto.
12001 (switch_to_process): New.
12002 (disable_thread_event_reporting): Use it.
12003 (remove_thread_event_breakpoints): New.
12004 (thread_db_detach, thread_db_mourn): Use it.
12006 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12008 * linux-low.c (linux_enable_event_reporting): New.
12009 (linux_wait_for_event_1, handle_extended_wait): Use it.
12011 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12013 * linux-low.c (linux_kill_one_lwp, linux_kill)
12014 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12015 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12016 SIGSTOP even if the LWP is stopped.
12017 (send_sigstop_callback): New.
12018 (stop_all_lwps): Use send_sigstop_callback instead.
12019 (linux_resume_one_thread): Adjust.
12020 (proceed_one_lwp): Still proceed an LWP that the client has
12021 requested to stop, if we haven't reported it as stopped yet. Make
12022 sure that LWPs the client want stopped, have a pending SIGSTOP.
12024 2010-04-26 Doug Evans <dje@google.com>
12026 * server.c (handle_general_set): Make static.
12028 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12029 Print received char after testing for error/eof instead of before.
12030 (input_interrupt): Tweak comment.
12032 2010-04-23 Doug Evans <dje@google.com>
12034 * server.c (start_inferior): Print inferior argv if --debug.
12036 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12038 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12039 * nto-x86-low.c: Include server.h
12041 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12043 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12044 be consistent with other sources of this directory.
12045 (init_registers_amd64): Correct name of source file of this function
12048 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12050 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12051 64-bit executables.
12053 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12055 * win32-i386-low.c: Add 64-bit support.
12056 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12057 (init_registers_amd64): Declare.
12058 (mappings): Add 64-bit version of array.
12059 (init_windows_x86): New function.
12060 (the_low_target): Change init_arch field to init_windows_x86.
12062 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12064 * win32-low.c: Adapt to support also 64-bit architecture.
12065 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12066 (get_image_name): Use SIZE_T type for local variable `done'.
12067 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12068 (toolhelp_get_dll_name): Idem.
12069 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12070 Use uintptr_t typecast to avoid warning.
12071 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12072 (handle_exception): Use phex_nz to avoid warning.
12073 (win32_wait): Remove unused local variable `process'.
12075 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12077 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12080 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12082 * configure.ac: Use `ws2_32' library for srv_mingw.
12083 * configure: Regenerate.
12084 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12085 * remote-utils.c: Likewise.
12087 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12089 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12090 if __x86_64__ is defined.
12092 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12094 * configure: Regenerate.
12096 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12098 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12099 * target.h (target_ops): New get_tib_address field.
12100 * win32-low.h (win32_thread_info): Add thread_local_base field.
12101 * win32-low.c (child_add_thread): Add tlb argument.
12102 Set thread_local_base field to TLB.
12103 (get_child_debug_event): Adapt to child_add_thread change.
12104 (win32_get_tib_address): New function.
12105 (win32_target_ops): Set get_tib_address field to
12106 win32_get_tib_address.
12107 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12109 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12111 * linux-low.c (linux_mourn): Also remove the process.
12112 * server.c (handle_target_event): Don't remove the process here.
12113 * nto-low.c (nto_mourn): New.
12114 (nto_target_ops): Install it.
12115 * spu-low.c (spu_mourn): New.
12116 (spu_target_ops): Install it.
12117 * win32-low.c (win32_mourn): New.
12118 (win32_target_ops): Install it.
12120 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12122 * server.h (buffer_xml_printf): Remove redundant `;'.
12124 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12126 * regcache.c (set_register_cache): Invalidate regcaches before
12127 changing the register cache layout.
12128 (regcache_invalidate_one): Allow a NULL regcache.
12129 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12130 regcaches before changing the register cache layout or the target
12133 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12135 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12136 variable warning on Linux/x86-64.
12138 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12140 GDBserver disconnected tracing support.
12142 * linux-low.c (linux_remove_process): Delete.
12143 (add_lwp): Don't set last_resume_kind here.
12144 (linux_kill): Use `mourn'.
12145 (linux_detach): Use `thread_db_detach', and `mourn'.
12146 (linux_mourn): New.
12147 (linux_attach_lwp_1): Adjust comment.
12148 (linux_attach): last_resume_kind moved the thread_info; adjust.
12149 (status_pending_p_callback): Adjust.
12150 (linux_wait_for_event_1): Adjust.
12151 (count_events_callback, select_singlestep_lwp_callback)
12152 (select_event_lwp_callback, cancel_breakpoints_callback)
12153 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12154 (proceed_one_lwp): Adjust.
12155 (linux_async): Add debug output.
12156 (linux_thread_stopped): New.
12157 (linux_pause_all): New.
12158 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12160 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12161 (thread_db_free): Delete declaration.
12162 (thread_db_detach, thread_db_mourn): Declare.
12163 * thread-db.c (thread_db_init): Use thread_db_mourn.
12164 (thread_db_free): Delete, split in two.
12165 (disable_thread_event_reporting): New.
12166 (thread_db_detach): New.
12167 (thread_db_mourn): New.
12169 * server.h (struct thread_info) <last_resume_kind>: New field.
12170 <attached>: Add comment.
12171 <gdb_detached>: New field.
12172 (handler_func): Change return type to int.
12173 (handle_serial_event, handle_target_event): Ditto.
12174 (gdb_connected): Declare.
12176 (disconnected_tracing): Declare.
12177 (stop_tracing): Declare.
12179 * server.c (handle_query) <qSupported>: Report support for
12180 disconnected tracing.
12181 (queue_stop_reply_callback): Account for running threads.
12182 (gdb_wants_thread_stopped): New.
12183 (gdb_wants_all_threads_stopped): New.
12184 (gdb_reattached_process): New.
12185 (handle_status): Clear the `gdb_detached' flag of all processes.
12186 In all-stop, stop all threads.
12187 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12188 (process_serial_event): If the remote connection breaks, or if an
12189 exit was forced with "monitor exit", force an event loop exit.
12190 Handle disconnected tracing on detach.
12191 (handle_serial_event): Adjust.
12192 (handle_target_event): If GDB isn't connected, forward events back
12193 to the inferior, unless the last process exited, in which case,
12194 exit gdbserver. Adjust interface.
12196 * remote-utils.c (remote_open): Don't block in accept. Instead
12197 register an event loop source on the listen socket file
12198 descriptor. Refactor bits into ...
12199 (listen_desc): ... this new global.
12200 (gdb_connected): ... this new function.
12201 (enable_async_notification): ... this new function.
12202 (handle_accept_event): ... this new function.
12203 (remote_close): Clear remote_desc.
12205 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12207 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12209 (mourn_inferior): Define.
12210 (target_process_qsupported): Avoid the dangling else problem.
12211 (thread_stopped): Define.
12212 (pause_all): Define.
12213 (target_waitstatus_to_string): Declare.
12214 * target.c (target_waitstatus_to_string): New.
12216 * tracepoint.c (tracing): Make extern.
12217 (disconnected_tracing): New.
12218 (stop_tracing): Make extern. Handle tracing stops due to GDB
12220 (cmd_qtdisconnected): New.
12221 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12222 (handle_tracepoint_general_set): Handle QTDisconnected.
12224 * event-loop.c (event_handler_func): Change return type to int.
12225 (process_event): Bail out if the event handler wants the event
12227 (handle_file_event): Ditto.
12228 (start_event_loop): Bail out if the event handler wants the event
12231 * nto-low.c (nto_target_ops): Adjust.
12232 * spu-low.c (spu_wait): Don't remove the process here.
12233 (spu_target_ops): Adjust.
12234 * win32-low.c (win32_wait): Don't remove the process here.
12235 (win32_target_ops): Adjust.
12237 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12239 * regcache.c (realloc_register_cache): Invalidate inferior's
12240 regcache before recreating it.
12242 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12244 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12246 2010-04-09 Stan Shebs <stan@codesourcery.com>
12247 Pedro Alves <pedro@codesourcery.com>
12249 * server.h (LONGEST): New.
12250 (struct thread_info) <while_stepping>: New field.
12251 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12253 (initialize_tracepoint, handle_tracepoint_general_set)
12254 (handle_tracepoint_query, tracepoint_finished_step)
12255 (tracepoint_was_hit, release_while_stepping_state_list):
12256 (current_traceframe): Declare.
12257 * server.c (handle_general_set): Handle tracepoint packets.
12258 (read_memory): New.
12259 (write_memory): New.
12260 (handle_search_memory_1): Use read_memory.
12261 (handle_query): Report support for conditional tracepoints, trace
12262 state variables, and tracepoint sources. Handle tracepoint
12264 (main): Initialize the tracepoints module.
12265 (process_serial_event): Handle traceframe reads/writes.
12267 * linux-low.c (handle_tracepoints): New.
12268 (linux_wait_1): Call it.
12269 (linux_resume_one_lwp): Handle while-stepping.
12270 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12271 (linux_target_ops): Install them.
12272 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12274 * linux-x86-low.c (x86_supports_tracepoints): New.
12275 (the_low_target). Install it.
12277 * mem-break.h (delete_breakpoint): Declare.
12278 * mem-break.c (delete_breakpoint): Make external.
12280 * target.h (struct target_ops): Add `supports_tracepoints',
12281 `read_pc', and `write_pc' fields.
12282 (target_supports_tracepoints): Define.
12283 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12286 * regcache.h (struct regcache) <registers_owned>: New field.
12287 (init_register_cache, regcache_cpy): Declare.
12288 (regcache_read_pc, regcache_write_pc): Declare.
12289 (register_cache_size): Declare.
12290 (supply_regblock): Declare.
12291 * regcache.c (init_register_cache): New.
12292 (new_register_cache): Use it.
12293 (regcache_cpy): New.
12294 (register_cache_size): New.
12295 (supply_regblock): New.
12296 (regcache_read_pc, regcache_write_pc): New.
12298 * tracepoint.c: New.
12300 * Makefile.in (OBS): Add tracepoint.o.
12301 (tracepoint.o): New rule.
12303 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12305 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12307 (i386-mmx.c): Likewise.
12308 (i386-mmx-linux.o): Likewise.
12309 (i386-mmx-linux.c): Likewise.
12311 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12312 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12313 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12314 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12316 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12317 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12318 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12320 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12322 * Makefile.in (clean): Updated.
12324 (i386-avx.c): Likewise.
12325 (i386-avx-linux.o): Likewise.
12326 (i386-avx-linux.c): Likewise.
12327 (amd64-avx.o): Likewise.
12328 (amd64-avx.c): Likewise.
12329 (amd64-avx-linux.o): Likewise.
12330 (amd64-avx-linux.c): Likewise.
12332 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12333 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12334 (srv_amd64_regobj): Add amd64-avx.o.
12335 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12336 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12337 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12338 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12339 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12340 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12341 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12343 * i387-fp.c: Include "i386-xstate.h".
12345 (i387_cache_to_xsave): Likewise.
12346 (i387_xsave_to_cache): Likewise.
12347 (x86_xcr0): Likewise.
12349 * i387-fp.h (i387_cache_to_xsave): Likewise.
12350 (i387_xsave_to_cache): Likewise.
12351 (x86_xcr0): Likewise.
12353 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12354 * linux-crisv32-low.c (target_regsets): Likewise.
12355 * linux-m68k-low.c (target_regsets): Likewise.
12356 * linux-mips-low.c (target_regsets): Likewise.
12357 * linux-ppc-low.c (target_regsets): Likewise.
12358 * linux-s390-low.c (target_regsets): Likewise.
12359 * linux-sh-low.c (target_regsets): Likewise.
12360 * linux-sparc-low.c (target_regsets): Likewise.
12361 * linux-xtensa-low.c (target_regsets): Likewise.
12363 * linux-low.c: Include <sys/uio.h>.
12364 (regsets_fetch_inferior_registers): Support nt_type.
12365 (regsets_store_inferior_registers): Likewise.
12366 (linux_process_qsupported): New.
12367 (linux_target_ops): Add linux_process_qsupported.
12369 * linux-low.h (regset_info): Add nt_type.
12370 (linux_target_ops): Add process_qsupported.
12372 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12374 (init_registers_i386_avx_linux): New.
12375 (init_registers_amd64_avx_linux): Likewise.
12376 (xmltarget_i386_linux_no_xml): Likewise.
12377 (xmltarget_amd64_linux_no_xml): Likewise.
12378 (PTRACE_GETREGSET): Likewise.
12379 (PTRACE_SETREGSET): Likewise.
12380 (x86_fill_xstateregset): Likewise.
12381 (x86_store_xstateregset): Likewise.
12382 (use_xml): Likewise.
12383 (x86_linux_update_xmltarget): Likewise.
12384 (x86_linux_process_qsupported): Likewise.
12385 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12386 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12387 init_registers_i386_linux here. Call
12388 x86_linux_update_xmltarget.
12389 (the_low_target): Add x86_linux_process_qsupported.
12391 * server.c (handle_query): Call target_process_qsupported.
12393 * target.h (target_ops): Add process_qsupported.
12394 (target_process_qsupported): New.
12396 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12398 * inferiors.c (add_thread): Set last_status kind to
12399 TARGET_WAITKIND_IGNORE.
12400 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12401 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12402 (linux_wait_1): Move `thread' local definition to block that uses
12403 it. Don't NULL initialize `event_child'.
12404 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12405 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12406 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12408 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12410 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12411 an extended waitstatus, or by a watchpoint.
12412 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12413 thread was stepping or has been stopped by a watchpoint.
12415 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12417 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12418 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12419 of another, then delete the previous, and validate all
12421 (validate_inserted_breakpoint): New.
12422 (delete_disabled_breakpoints): New.
12423 (validate_breakpoints): New.
12424 (check_mem_read): Validate breakpoints before trusting their
12425 shadow. Delete disabled breakpoints.
12426 (check_mem_write): Validate breakpoints before trusting they
12427 should be inserted. Delete disabled breakpoints.
12428 * mem-break.h (validate_breakpoints):
12429 * server.c (handle_query): Validate breakpoints when we see a
12432 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12434 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12435 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12436 if we could tell there's a GDB breakpoint at stop_pc.
12437 (need_step_over_p): Don't do a step over if we find a GDB
12438 breakpoint at the resume PC.
12440 * mem-break.c (struct raw_breakpoint): New.
12441 (enum bkpt_type): New type `gdb_breakpoint'.
12442 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12443 fields. New field `raw'.
12444 (find_raw_breakpoint_at): New.
12445 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12446 breakpoint instead.
12447 (set_breakpoint_at): Adjust.
12448 (delete_raw_breakpoint): New.
12449 (release_breakpoint): New.
12450 (delete_breakpoint): Rename to...
12451 (delete_breakpoint_1): ... this. Add proc parameter. Use
12452 release_breakpoint. Return ENOENT.
12453 (delete_breakpoint): Reimplement.
12454 (find_breakpoint_at): Delete.
12455 (find_gdb_breakpoint_at): New.
12456 (delete_breakpoint_at): Delete.
12457 (set_gdb_breakpoint_at): New.
12458 (delete_gdb_breakpoint_at): New.
12459 (gdb_breakpoint_here): New.
12460 (set_reinsert_breakpoint): Use release_breakpoint.
12461 (uninsert_breakpoint): Rename to ...
12462 (uninsert_raw_breakpoint): ... this.
12463 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12464 (reinsert_raw_breakpoint): Change parameter type to
12466 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12468 (check_breakpoints): Adjust. Use release_breakpoint.
12469 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12470 (breakpoint_inserted_here): Ditto.
12471 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12472 Don't trust the breakpoint's shadow if it is not inserted.
12473 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12474 (delete_all_breakpoints): Adjust.
12475 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12476 use delete_breakpoint_1.
12478 * mem-break.h (breakpoints_supported): Delete declaration.
12479 (set_gdb_breakpoint_at): Declare.
12480 (gdb_breakpoint_here): Declare.
12481 (delete_breakpoint_at): Delete.
12482 (delete_gdb_breakpoint_at): Declare.
12484 * server.h (struct raw_breakpoint): Forward declare.
12485 (struct process_info): New field `raw_breakpoints'.
12487 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12490 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12492 * linux-low.c (status_pending_p_callback): Fix comment.
12493 (linux_wait_for_event_1): Move most of the internal breakpoint
12494 handling from here...
12495 (linux_wait_1): ... to here.
12496 (count_events_callback): New.
12497 (select_singlestep_lwp_callback): New.
12498 (select_event_lwp_callback): New.
12499 (cancel_breakpoints_callback): New.
12500 (select_event_lwp): New.
12501 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12502 priority to all LWPs that have had events that should be reported
12503 to the client. Cancel breakpoints when about to reporting the
12504 event to the client, not while stopping lwps. No longer cancel
12505 finished single-steps here.
12506 (cancel_finished_single_step): Delete.
12507 (cancel_finished_single_steps): Delete.
12509 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12511 * mem-break.c (enum bkpt_type): New.
12512 (struct breakpoint): New field `type'.
12513 (set_breakpoint_at): Change return type to struct breakpoint
12514 pointer. Set type to `other_breakpoint' by default.
12515 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12516 in the breakpoint list.
12517 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12518 (reinsert_breakpoint): Rename to ...
12519 (reinsert_raw_breakpoint): ... this.
12520 (reinsert_breakpoints_at): Adjust.
12521 * mem-break.h (struct breakpoint): Declare.
12522 (set_breakpoint_at): Change return type to struct breakpoint
12525 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12527 * server.c (handle_query): Assign, not compare.
12529 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12531 Teach linux gdbserver to step-over-breakpoints.
12533 * linux-low.c (can_hardware_single_step): New.
12534 (supports_breakpoints): New.
12535 (handle_extended_wait): If stopping threads, read the stop pc of
12536 the new cloned LWP.
12538 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12539 low target doesn't support retrieving the PC.
12540 (add_lwp): Set last_resume_kind to resume_continue.
12541 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12542 (linux_attach): Don't clear stop_expected. Set the lwp's
12543 last_resume_kind to resume_stop.
12544 (linux_detach_one_lwp): Don't check for removed breakpoints.
12545 (check_removed_breakpoint): Delete.
12546 (status_pending_p): Rename to ...
12547 (status_pending_p_callback): ... this. Don't check for removed
12548 breakpoints. Don't consider threads that are stopped from GDB's
12550 (linux_wait_for_lwp): Always read the stop_pc here.
12551 (cancel_breakpoint): New.
12552 (step_over_bkpt): New global.
12553 (linux_wait_for_event_1): Implement stepping over breakpoints.
12554 (gdb_wants_lwp_stopped): New.
12555 (gdb_wants_all_stopped): New.
12556 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12557 single-step traps here. Store the thread's last reported target
12559 (send_sigstop): Don't clear stop_expected. Always set it,
12561 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12562 (cancel_finished_single_step): New.
12563 (cancel_finished_single_steps): New.
12564 (wait_for_sigstop): Don't cancel finished single-step traps here.
12565 (linux_resume_one_lwp): Don't check for removed breakpoints.
12566 Don't set `step' on non-hardware step archs.
12567 (linux_set_resume_request): Ignore resume_stop requests if already
12568 stopping or stopped. Set the lwp's last_resume_kind.
12569 (resume_status_pending_p): Don't check for removed breakpoints.
12570 (need_step_over_p): New.
12571 (start_step_over): New.
12572 (finish_step_over): New.
12573 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12574 requests. Clear the thread's last reported target waitstatus.
12575 Don't use the `suspended' flag. Don't consider pending breakpoints.
12576 (linux_resume): Start a step-over if necessary.
12577 (proceed_one_lwp): New.
12578 (proceed_all_lwps): New.
12579 (unstop_all_lwps): New.
12580 * linux-low.h (struct lwp_info): Rewrite comment for the
12581 `suspended' flag. Add the `stop_pc' field. Delete the
12582 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12583 Add `'last_resume_kind' and `need_step_over' fields.
12584 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12585 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12586 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12587 (set_raw_breakpoint_at): New.
12588 (set_breakpoint_at): Rewrite to use it.
12589 (reinsert_breakpoint_handler): Delete.
12590 (set_reinsert_breakpoint): New.
12591 (reinsert_breakpoint_by_bp): Delete.
12592 (delete_reinsert_breakpoints): New.
12593 (uninsert_breakpoint): Rewrite.
12594 (uninsert_breakpoints_at): New.
12595 (reinsert_breakpoint): Rewrite.
12596 (reinsert_breakpoints_at): New.
12597 (check_breakpoints): Rewrite.
12598 (breakpoint_here): New.
12599 (breakpoint_inserted_here): New.
12600 (check_mem_read): Adjust.
12601 * mem-break.h (breakpoints_supported, breakpoint_here)
12602 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12603 (reinsert_breakpoint_by_bp): Delete declaration.
12604 (delete_reinsert_breakpoints): Declare.
12605 (reinsert_breakpoint): Delete declaration.
12606 (reinsert_breakpoints_at): Declare.
12607 (uninsert_breakpoint): Delete declaration.
12608 (uninsert_breakpoints_at): Declare.
12609 (check_breakpoints): Adjust prototype.
12610 * server.h: Adjust include order.
12611 (struct thread_info): Declare here. Add a `last_status' field.
12613 2010-03-23 Michael Snyder <msnyder@vmware.com>
12615 * server.c (crc32): New function.
12616 (handle_query): Add handling for 'qCRC:' request.
12618 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12620 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12621 lwp had been stopped by a watchpoint.
12623 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12625 * server.h (internal_error): Declare.
12626 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12627 * utils.c (internal_error): New function.
12629 2010-03-15 Andreas Schwab <schwab@redhat.com>
12631 * configure.srv: Fix typo setting srv_regobj.
12633 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12635 * linux-low.c (fetch_register): Avoid passing a non string literal
12637 (usr_store_inferior_registers): Ditto.
12639 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12641 * linux-low.c (linux_write_memory): Bail out early if peeking
12644 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12646 * linux-low.h (struct lwp_info): New fields
12647 `stopped_by_watchpoint' and `stopped_data_address'.
12648 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12649 here, and cache them in the lwp object.
12650 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12652 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12654 (linux_stopped_by_watchpoint): Rewrite.
12655 (linux_stopped_data_address): Rewrite.
12657 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12659 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12660 switching the current inferior, not before.
12662 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12664 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12665 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12666 i386-linux.c and amd64-linux.c.
12667 (reg-i386.o): Removed.
12668 (reg-i386.c): Likewise.
12669 (reg-i386-linux.o): Likewise.
12670 (reg-i386-linux.c): Likewise.
12671 (reg-x86-64.o): Likewise.
12672 (reg-x86-64.c): Likewise.
12673 (reg-x86-64-linux.o): Likewise.
12674 (reg-x86-64-linux.c): Likewise.
12676 (i386.c): Likewise.
12677 (i386-linux.o): Likewise.
12678 (i386-linux.c): Likewise.
12679 (amd64.o): Likewise.
12680 (amd64.c): Likewise.
12681 (amd64-linux.o): Likewise.
12682 (amd64-linux.c): Likewise.
12684 * configure.srv (srv_i386_regobj): New.
12685 (srv_i386_linux_regobj): Likewise.
12686 (srv_amd64_regobj): Likewise.
12687 (srv_amd64_linux_regobj): Likewise.
12688 (srv_i386_32bit_xmlfiles): Likewise.
12689 (srv_i386_64bit_xmlfiles): Likewise.
12690 (srv_i386_xmlfiles): Likewise.
12691 (srv_amd64_xmlfiles): Likewise.
12692 (srv_i386_linux_xmlfiles): Likewise.
12693 (srv_amd64_linux_xmlfiles): Likewise.
12694 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12695 srv_xmlfiles to $srv_i386_xmlfiles.
12696 (i[34567]86-*-mingw32ce*): Likewise.
12697 (i[34567]86-*-mingw*): Likewise.
12698 (i[34567]86-*-nto*): Likewise.
12699 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12700 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12701 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12702 (x86_64-*-linux*): Likewise.
12704 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12705 (init_registers_amd64_linux): New.
12706 (x86_arch_setup): Replace init_registers_x86_64_linux with
12707 init_registers_amd64_linux.
12709 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12711 * configure.ac: Check for libdl. If it is not available link against
12712 static libthread_db.
12713 * configure: Regenerate.
12715 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12719 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12720 handing a read watchpoint.
12721 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12723 2010-02-12 Doug Evans <dje@google.com>
12725 * linux-low.c (linux_supports_tracefork_flag): Document.
12726 (linux_look_up_symbols): Add comment.
12728 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12730 * regcache.c (supply_register): Clear regcache if buf is NULL.
12732 2010-02-02 Nicolas Roche <roche@sourceware.org>
12733 Joel Brobecker <brobecker@adacore.com>
12735 * inferiors.c (find_inferior): Add function documentation.
12736 (unloaded_dll): Handle the case where the unloaded dll has not
12737 been previously registered in the dll list.
12739 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12741 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12742 (thumb2_breakpoint): New.
12743 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12745 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12747 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12748 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12751 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12753 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12755 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12757 * linux-s390-low.c (s390_collect_ptrace_register)
12758 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12760 2010-01-21 Doug Evans <dje@google.com>
12762 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12763 (PTRACE_ARG4_TYPE): New macro.
12764 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12765 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12766 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12767 (usr_store_inferior_registers): Ditto.
12768 (linux_read_memory, linux_write_memory): Ditto.
12769 (linux_test_for_tracefork): Ditto.
12771 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12772 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12774 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12776 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12779 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12781 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12782 prototype to take a regcache. Adjust.
12784 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12786 * regcache.h (struct thread_info): Forward declare.
12787 (struct regcache): New.
12788 (new_register_cache): Adjust prototype.
12789 (get_thread_regcache): Declare.
12790 (free_register_cache): Adjust prototype.
12791 (registers_to_string, registers_from_string): Ditto.
12792 (supply_register, supply_register_by_name, collect_register)
12793 (collect_register_as_string, collect_register_by_name): Ditto.
12794 * regcache.c (struct inferior_regcache_data): Delete.
12795 (get_regcache): Rename to ...
12796 (get_thread_regcache): ... this. Adjust. Switch inferior before
12797 fetching registers.
12798 (regcache_invalidate_one): Adjust.
12799 (regcache_invalidate): Fix prototype.
12800 (new_register_cache): Return the new register cache.
12801 (free_register_cache): Change prototype.
12802 (realloc_register_cache): Adjust.
12803 (registers_to_string): Change prototype to take a regcache. Adjust.
12804 (registers_from_string): Ditto.
12805 (register_data): Ditto.
12806 (supply_register): Ditto.
12807 (supply_register_by_name): Ditto.
12808 (collect_register): Ditto.
12809 (collect_register_as_string): Ditto.
12810 (collect_register_by_name): Ditto.
12811 * server.c (process_serial_event): Adjust.
12812 * linux-low.h (regset_fill_func, regset_store_func): Change
12814 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12816 * linux-low.c (get_stop_pc): Adjust.
12817 (check_removed_breakpoint): Adjust.
12818 (linux_wait_for_event): Adjust.
12819 (linux_resume_one_lwp): Adjust.
12820 (fetch_register): Add regcache parameter. Adjust.
12821 (usr_store_inferior_registers): Ditto.
12822 (regsets_fetch_inferior_registers): Ditto.
12823 (regsets_store_inferior_registers): Ditto.
12824 (linux_fetch_registers, linux_store_registers): Ditto.
12825 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12827 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12829 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12830 prototype to take a regcache.
12831 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12832 * remote-utils.c (convert_ascii_to_int, outreg)
12833 (prepare_resume_reply): Change prototype to take a regcache.
12835 * target.h (struct target_ops) <fetch_registers, store_registers>:
12836 Change prototype to take a regcache.
12837 (fetch_inferior_registers, store_inferior_registers): Change
12838 prototype to take a regcache. Adjust.
12839 * proc-service.c (ps_lgetregs): Adjust.
12840 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12841 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12842 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12843 take a regcache. Adjust.
12844 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12845 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12846 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12847 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12848 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12849 (cris_cannot_fetch_register):
12850 (cris_breakpoint_at): Change prototype to take a regcache.
12852 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12853 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12854 to take a regcache. Adjust.
12855 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12857 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12858 take a regcache. Adjust.
12859 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12860 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12861 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12862 * linux-mips-low.c (mips_get_pc):
12863 (mips_set_pc): Change prototype to take a regcache. Adjust.
12864 (mips_reinsert_addr): Adjust.
12865 (mips_collect_register): Change prototype to take a regcache.
12867 (mips_supply_register):
12868 (mips_collect_register_32bit, mips_supply_register_32bit)
12869 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12870 (mips_store_fpregset): Ditto.
12871 * linux-ppc-low.c (ppc_supply_ptrace_register)
12872 (ppc_supply_ptrace_register): Ditto.
12873 (parse_spufs_run): Adjust.
12874 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12875 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12876 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12877 take a regcache. Adjust.
12878 * linux-s390-low.c (s390_collect_ptrace_register)
12879 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12880 (s390_set_pc): Change prototype to take a regcache. Adjust.
12881 (s390_arch_setup): Adjust.
12882 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12883 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12884 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12885 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12886 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12888 (sparc_breakpoint_at): Adjust.
12889 * linux-xtensa-low.c (xtensa_fill_gregset):
12890 (xtensa_store_gregset):
12891 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12892 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12893 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12894 prototype to take a regcache. Adjust.
12895 * win32-arm-low.c (arm_fetch_inferior_register)
12896 (arm_store_inferior_register): Change prototype to take a
12898 * win32-i386-low.c (i386_fetch_inferior_register)
12899 (i386_store_inferior_register): Change prototype to take a
12901 * win32-low.c (child_fetch_inferior_registers)
12902 (child_store_inferior_registers): Change prototype to take a
12904 (win32_wait): Adjust.
12905 (win32_fetch_inferior_registers): Change prototype to take a
12907 (win32_store_inferior_registers): Adjust.
12908 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12909 store_inferior_register>: Change prototype to take a regcache.
12911 2010-01-20 Doug Evans <dje@google.com>
12913 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12915 (linux_wait_for_event1, linux_init_signals): Ditto.
12916 (W_STOPCODE): Provide definition if missing.
12918 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12920 * linux-low.c (linux_core_of_thread): New.
12921 (compare_ints, show_process, list_threads): New.
12922 (linux_qxfer_osdata): Report threads and cores.
12923 (linux_target_op): Register linux_core_of_thread.
12924 * remote-utils.c (prepare_resume_reply): Report the core.
12925 (buffer_xml_printf): Support %d specifier.
12926 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12928 (handle_query): Handle qXfer:threads. Announce availability
12930 * target.h (struct target_ops): New field core_of_thread.
12932 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12934 * Makefile.in (clean): Remove new generated files.
12935 (reg-s390.o, reg-s390.c): Remove rules.
12936 (reg-s390x.o, reg-s390x.c): Likewise.
12937 (s390-linux32.o, s390-linux32.c): Add rules.
12938 (s390-linux64.o, s390-linux64.c): Likewise.
12939 (s390x-linux64.o, s390x-linux64.c): Likewise.
12940 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12941 * linux-s390-low.c: Include <elf.h>.
12942 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12943 (init_registers_s390): Remove prototype.
12944 (init_registers_s390x): Likewise.
12945 (init_registers_s390_linux32): Add prototype.
12946 (init_registers_s390_linux64): Likewise.
12947 (init_registers_s390x_linux64): Likewise.
12948 (s390_num_regs_3264): New define.
12949 (s390_regmap_3264): New global variable.
12950 (s390_cannot_fetch_register): Remove obsolete check.
12951 (s390_cannot_store_register): Likewise.
12952 (s390_collect_ptrace_register): Handle upper/lower register halves.
12953 (s390_supply_ptrace_register): Likewise.
12954 (s390_fill_gregset): Update to register number changes.
12955 (s390_get_hwcap): New routine.
12956 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12957 Install appropriate regmap and register set.
12959 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12961 * server.c (gdbserver_version): Update copyright year to 2010.
12962 * gdbreplay.c (gdbreplay_version): Likewise.
12964 2009-12-28 Doug Evans <dje@google.com>
12966 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12967 elf/external.h. Include <elf.h> instead but only if necessary.
12969 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12971 * linux-low.c (linux_remove_process): Remove `detaching'
12972 parameter. Don't release/detach from thread_db here.
12973 (linux_kill): Release/detach from thread_db here, ...
12974 (linux_detach): ... and here, before actually detaching.
12975 (linux_wait_1): ... and here, when a process exits.
12976 * thread-db.c (any_thread_of): New.
12977 (thread_db_free): Switch the current inferior to a thread of the
12980 2009-12-21 Doug Evans <dje@google.com>
12982 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12984 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12985 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12986 warning ifndef __NR_tkill. Move setting of errno there too.
12987 Delete unnecessary resetting of errno after syscall.
12988 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12990 * configure.ac: Check for dladdr.
12991 * config.in: Regenerate.
12992 * configure: Regenerate.
12993 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12994 (try_thread_db_load): Update.
12996 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12998 2009-12-18 Doug Evans <dje@google.com>
13000 * event-loop.c: Include unistd.h if it exists.
13002 * linux-low.c (my_waitpid): Move definition away from being in
13003 between linux_tracefork_child/linux_test_for_tracefork.
13005 * gdb_proc_service.h (psaddr_t): Fix type.
13006 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13007 signature to match glibc.
13009 2009-12-16 Doug Evans <dje@google.com>
13011 * linux-low.c (linux_read_memory): Fix argument to read.
13013 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13015 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13016 events, don't leave current_inferior pointing at null.
13018 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13020 * win32-low.c (LOG): Delete.
13021 (OUTMSG): Output to stderr.
13022 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13023 on compile time LOG macro.
13024 (win32_wait): Fix debug output.
13026 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13028 * win32-low.c (win32_add_one_solib): If the dll name is
13029 "ntdll.dll", prepend the system directory to the dll path.
13031 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13033 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13035 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13036 Vladimir Prus <vladimir@codesourcery.com>
13038 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13039 * configure.ac: Check for __mcoldfire__ and set
13040 gdb_cv_m68k_is_coldfire.
13041 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13042 reg-cf.o and reg-m68k.o.
13043 * configure: Regenerated.
13045 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13047 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13048 Pass it to thread_db_free.
13049 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13050 proper `detaching' argument to linux_remove_process.
13051 * linux-low.h (thread_db_free): Add `detaching' parameter.
13052 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13054 (thread_db_free): Add `detaching' parameter. Only
13055 call td_ta_clear_event if detaching from process.
13057 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13059 * thread-db.c (thread_db_free): Fix typo.
13061 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13064 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13066 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13068 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13069 with an i686 compiler.
13070 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13072 * configure: Rebuilt.
13074 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13078 * server.c (handle_search_memory_1): Correct read_addr initialization
13079 in loop for searching subsequent chunks.
13081 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13083 * configure.ac: New --with-libthread-db option.
13084 * thread-db.c: Allow direct dependence on libthread_db.
13085 (thread_db_free): Adjust.
13086 * config.in: Regenerate.
13087 * configure: Likewise.
13089 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13092 * thread-db.c (attach_thread): New function.
13093 (maybe_attach_thread): Return success/failure.
13094 (find_new_threads_callback): Adjust.
13095 (thread_db_find_new_threads): Loop until no new threads.
13097 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13099 * proc-service.c (ps_lgetregs): Formatting.
13101 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13103 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13104 * configure.ac: Adjust.
13105 * linux-low.h (struct process_info_private): Move members to struct
13107 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13108 * linux-low.c (linux_remove_process): Adjust.
13109 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13110 * server.c (handle_query): Move code ...
13111 (handle_monitor_command): ... here. New function.
13112 * target.h (struct target_ops): New member.
13113 * thread-db.c (struct thread_db): New.
13114 (libthread_db_search_path): New variable.
13115 (thread_db_create_event, thread_db_enable_reporting)
13116 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13117 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13118 (try_thread_db_load_1, dladdr_to_soname): New functions.
13119 (try_thread_db_load, thread_db_load_search): New functions.
13120 (thread_db_init): Search for libthread_db.
13121 (thread_db_free): New function.
13122 (thread_db_handle_monitor_command): Likewise.
13123 * config.in: Regenerate.
13124 * configure: Regenerate.
13126 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13128 * spu-low.c (spu_kill): Wait for inferior to terminate.
13129 Call clear_inferiors.
13130 (spu_detach): Call clear_inferiors.
13132 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13134 * aclocal.m4: Regenerate.
13135 * config.in: Likewise.
13136 * configure: Likewise.
13138 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13140 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13141 (parse_spufs_run): New function.
13142 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13143 (ppc_breakpoint_at): Handle SPU breakpoints.
13145 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13147 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13148 (SPUFS_MAGIC): Define.
13149 (spu_enumerate_spu_ids): New function.
13150 (linux_qxfer_spu): New function.
13151 (linux_target_ops): Install linux_qxfer_spu.
13153 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13155 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13156 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13157 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13158 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13159 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13160 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13161 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13162 (init_registers_powerpc_cell32l): Add prototype.
13163 (init_registers_powerpc_cell64l): Likewise.
13164 (ppc_arch_setup): Detect Cell/B.E. architecture.
13166 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13168 * Makefile.in (datarootdir): New variable.
13170 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13172 * linux-low.c (linux_write_memory): Update debugging output.
13173 * Makefile.in (clean): Add new descriptions.
13174 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13175 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13176 * configure.srv: Add new files for arm*-*-linux*.
13177 * linux-arm-low.c: Add new declarations.
13178 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13179 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13180 (HWCAP_VFPv3D16): New.
13181 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13182 instead of __IWMMXT__.
13183 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13184 (arm_arch_setup): New.
13185 (target_regsets): Remove #ifdef. Add VFP regset.
13186 (the_low_target): Use arm_arch_setup.
13188 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13190 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13191 the main thread again.
13193 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13195 Adding Neutrino gdbserver.
13196 * configure: Regenerated.
13197 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13198 * configure.srv (i[34567]86-*-nto*): New target.
13199 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13200 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13201 (nto_comctrl) [__QNX__]: New function.
13202 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13204 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13206 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13209 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13210 Pedro Alves <pedro@codesourcery.com>
13212 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13213 don't support CONTEXT_EXTENDED_REGISTERS.
13214 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13215 (the_low_target): Install them.
13216 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13217 failing with ERROR_PIPE_NOT_CONNECTED.
13219 2009-06-30 Doug Evans <dje@google.com>
13220 Pierre Muller <muller@ics.u-strasbg.fr>
13222 Add h/w watchpoint support to x86-linux, win32-i386.
13223 * Makefile.in (SFILES): Add i386-low.c
13224 (i386_low_h): Define.
13225 (i386-low.o): Add dependencies.
13226 (linux-x86-low.o): Add i386-low.h dependency.
13227 (win32-i386-low.o): Ditto.
13228 * i386-low.c: New file.
13229 * i386-low.h: New file.
13230 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13231 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13232 * linux-low.c (linux_add_process): Initialize arch_private.
13233 (linux_remove_process): Free arch_private.
13234 (add_lwp): Initialize arch_private.
13235 (delete_lwp): Free arch_private.
13236 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13238 * linux-low.h (process_info_private): New member arch_private.
13239 (lwp_info): New member arch_private.
13240 (linux_target_ops): New members new_process, new_thread,
13242 (ptid_of): New macro.
13243 * linux-x86-low.c: Include stddef.h, i386-low.h.
13244 (arch_process_info): New struct.
13245 (arch_lwp_info): New struct.
13246 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13247 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13248 (i386_dr_low_get_status): New function.
13249 (x86_insert_point, x86_remove_point): New functions.
13250 (x86_stopped_by_watchpoint): New function.
13251 (x86_stopped_data_address): New function.
13252 (x86_linux_new_process, x86_linux_new_thread): New functions.
13253 (x86_linux_prepare_to_resume): New function.
13254 (the_low_target): Add entries for insert_point, remove_point,
13255 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13257 * server.c (debug_hw_points): New global.
13258 (monitor_show_help): Document set debug-hw-points.
13259 (handle_query): Process "set debug-hw-points".
13260 * server.h (debug_hw_points): Declare.
13261 (paddress): Declare.
13262 * utils.c (NUMCELLS, CELLSIZE): New macros.
13263 (get_sell, xsnprintf, paddress): New functions.
13264 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13265 remove_point, stopped_by_watchpoint, stopped_data_address.
13266 * win32-i386-low.c: Include i386-low.h.
13267 (debug_reg_state): Replaces dr.
13268 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13269 (i386_dr_low_get_status): New function.
13270 (i386_insert_point, i386_remove_point): New functions.
13271 (i386_stopped_by_watchpoint): New function.
13272 (i386_stopped_data_address): New function.
13273 (i386_initial_stuff): Update.
13274 (get_thread_context,set_thread_context,i386_thread_added): Update.
13275 (the_low_target): Add entries for insert_point,
13276 remove_point, stopped_by_watchpoint, stopped_data_address.
13277 * win32-low.c (win32_insert_watchpoint): New function.
13278 (win32_remove_watchpoint): New function.
13279 (win32_stopped_by_watchpoint): New function.
13280 (win32_stopped_data_address): New function.
13281 (win32_target_ops): Add entries for insert_watchpoint,
13282 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13283 * win32-low.h (win32_target_ops): New members insert_point,
13284 remove_point, stopped_by_watchpoint, stopped_data_address.
13286 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13288 * server.c (process_serial_event): Re-return unsupported, not
13289 error, if the type isn't recognized. Re-allow supporting only
13290 insert or remove packets. Also call require_running for
13291 breakpoints. Add missing break statement to default case. Tidy.
13292 * target.h (struct target_ops): Rename insert_watchpoint to
13293 insert_point, and remove_watchpoint to remove_point.
13295 * linux-low.h (struct linux_target_ops): Likewise.
13296 * linux-low.c (linux_insert_watchpoint): Rename to ...
13297 (linux_insert_point): ... this. Adjust.
13298 (linux_remove_watchpoint): Rename to ...
13299 (linux_remove_point): ... this. Adjust.
13300 (linux_target_ops): Adjust.
13301 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13302 (cris_insert_point): ... this.
13303 (cris_remove_watchpoint): Rename to ...
13304 (cris_remove_point): ... this.
13305 (the_low_target): Adjust.
13307 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13309 * server.c (handle_v_kill): Pass signal_pid to
13310 kill_inferior if multi_process is zero.
13312 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13314 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13315 * target.h (target_ops): Comment for *_watchpoint to make it clear
13316 the functions can get types '0' and '1'.
13318 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13320 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13321 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13322 * regcache.c (get_regcache): Likewise.
13323 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13324 * win32-low.c (child_fetch_inferior_registers): Remove check for
13327 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13328 Pedro Alves <pedro@codesourcery.com>
13330 * target.h (struct target_ops) <supports_multi_process>: New
13332 (target_supports_multi_process): New.
13333 * server.c (handle_query): Even if GDB reports support, only
13334 enable multi-process if the target also supports it. Report
13335 multi-process support only if the target backend supports it.
13336 * linux-low.c (linux_supports_multi_process): New function.
13337 (linux_target_ops): Install it as target_supports_multi_process
13340 2009-05-24 Doug Evans <dje@google.com>
13342 Global renaming of find_thread_pid to find_thread_ptid.
13343 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13344 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13345 All callers updated.
13347 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13348 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13351 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13352 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13353 (linux_resume_one_lwp): Ditto.
13355 2009-05-23 Doug Evans <dje@google.com>
13357 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13358 from struct inferior_list_entry * to struct lwp_info *.
13359 All callers updated.
13361 2009-05-13 Doug Evans <dje@google.com>
13363 * linux-x86-low.c: Don't include assert.h.
13364 (x86_siginfo_fixup): Use fatal, not assert.
13365 (x86_arch_setup): Fix comment.
13367 2009-05-12 Doug Evans <dje@google.com>
13369 Biarch support for i386/amd64 gdbserver.
13370 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13371 Add linux-x86-low.c.
13372 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13373 (linux-x86-low.o): Add.
13374 * linux-x86-64-low.c: Delete.
13375 * linux-i386-low.c: Delete.
13376 * linux-x86-low.c: New file.
13377 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13379 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13381 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13382 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13383 (linux_child_pid_to_exec_file): New function.
13384 (elf_64_header_p, elf_64_file_p): New functions.
13385 (siginfo_fixup): New function.
13386 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13387 give target a chance to convert layout.
13388 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13389 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13391 2009-05-07 Doug Evans <dje@google.com>
13393 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13394 (regsets_store_inferior_registers): Ditto.
13396 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13400 * linux-low.c (must_set_ptrace_flags): Delete.
13401 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13403 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13404 `lwp->must_set_ptrace_flags' instead.
13405 (linux_wait_for_event_1): Set ptrace options here.
13406 (linux_wait_1): ... not here.
13408 2009-04-30 Doug Evans <dje@google.com>
13410 * inferiors.c (started_inferior_callback): New function.
13411 (attached_inferior_callback): New function.
13412 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13413 * server.c (print_started_pid, print_attached_pid): New functions.
13414 (detach_or_kill_for_exit): New function.
13415 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13416 * server.h (have_started_inferiors_p): Declare.
13417 (have_attached_inferiors_p): Declare.
13419 * inferiors.c (remove_process): Fix memory leak, free process.
13420 * linux-low.c (linux_remove_process): New function.
13421 (linux_kill): Call it instead of remove_process.
13422 (linux_detach, linux_wait_1): Ditto.
13424 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13426 * configure.srv: Add x86 Windows CE target.
13428 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13430 * inferiors.c (get_thread_process): Make global.
13431 * server.h (get_thread_process): Add prototype.
13432 * thread-db.c (find_one_thread): Use get_thread_process
13433 instead of current_process.
13434 (thread_db_get_tls_address): Do not crash if called when
13435 thread layer is not yet initialized.
13437 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13439 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13440 * spu-low.c (current_tid): Rename to ...
13441 (current_ptid): ... this.
13442 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13443 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13444 ptid_get_lwp (current_ptid) instead of current_tid.
13445 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13446 instead of current_tid. Use find_process_pid to verify pid
13447 argument is valid. Pass proper argument to remove_process.
13448 (spu_thread_alive): Compare current_ptid instead of current_tid.
13449 (spu_resume): Likewise.
13451 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13453 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13456 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13458 Implement the multiprocess extensions, and add linux multiprocess
13461 * server.h (ULONGEST): Declare.
13462 (struct ptid, ptid_t): New.
13463 (minus_one_ptid, null_ptid): Declare.
13464 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13465 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13466 (struct inferior_list_entry): Change `id' type from unsigned from
13468 (struct sym_cache, struct breakpoint, struct
13469 process_info_private): Forward declare.
13470 (struct process_info): Declare.
13471 (current_process): Declare.
13472 (all_processes): Declare.
13473 (initialize_inferiors): Declare.
13474 (add_thread): Adjust to use ptid_t.
13475 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13476 (add_process, remove_process, find_thread_pid): Declare.
13477 (find_inferior_id): Adjust to use ptid_t.
13478 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13479 (multi_process): Declare.
13480 (push_event): Adjust to use ptid_t.
13481 (read_ptid, write_ptid): Declare.
13482 (prepare_resume_reply): Adjust to use ptid_t.
13483 (clear_symbol_cache): Declare.
13484 * inferiors.c (all_processes): New.
13485 (null_ptid, minus_one_ptid): New.
13486 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13487 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13488 (add_thread): Change unsigned long to ptid. Remove gdb_id
13490 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13491 (gdb_id_to_thread): Rename to ...
13492 (find_thread_pid): ... this. Change unsigned long to ptid.
13493 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13494 (loaded_dll, pull_pid_from_list): Adjust.
13495 (add_process, remove_process, find_process_pid)
13496 (get_thread_process, current_process, initialize_inferiors): New.
13497 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13498 (struct target_waitstatus) <related_pid>: Ditto.
13499 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13500 return type to int.
13501 (struct target_ops) <join>: Add `pid' argument.
13502 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13503 (struct target_ops) <wait>: Add `ptid' field. Change return type
13505 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13506 (mywait): Add `ptid' argument. Change return type to ptid_t.
13507 (target_pid_to_str): Declare.
13508 * target.c (set_desired_inferior): Adjust to use ptids.
13509 (mywait): Add new `ptid' argument. Adjust.
13510 (target_pid_to_str): New.
13511 * mem-break.h (free_all_breakpoints): Declare.
13512 * mem-break.c (breakpoints): Delelete.
13513 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13514 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13515 to use per-process breakpoint list.
13516 (free_all_breakpoints): New.
13517 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13518 (symbol_cache, all_symbols_looked_up): Delete.
13520 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13522 (prepare_resume_reply): Change ptid argument's type from unsigned
13523 long to ptid_t. Adjust. Implement W;process and X;process.
13524 (free_sym_cache, clear_symbol_cache): New.
13525 (look_up_one_symbol): Adjust to per-process symbol cache. *
13526 * server.c (cont_thread, general_thread, step_thread): Change type
13528 (attached): Delete.
13529 (multi_process): New.
13530 (last_ptid): Change type to ptid_t.
13531 (struct vstop_notif) <ptid>: Change type to ptid_t.
13532 (queue_stop_reply, push_event): Change `ptid' argument's type to
13534 (discard_queued_stop_replies): Add `pid' argument.
13535 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13536 changes. Don't reference the `attached' global.
13537 (attach_inferior): Adjust to mywait interface changes.
13538 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13539 features. Handle and report "multiprocess+". Handle
13541 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13543 (handle_v_kill): New.
13544 (handle_v_stopped): Adjust to use target_pid_to_str.
13545 (handle_v_requests): Allow multiple attaches and runs when
13546 multiprocess extensions are in effect. Handle "vKill".
13547 (myresume): Adjust to use ptids.
13548 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13549 (handle_status): Adjust to discard_queued_stop_replies interface
13551 (first_thread_of, kill_inferior_callback)
13552 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13553 (main): Call initialize_inferiors. Adjust to use ptids, killing
13554 and detaching from all inferiors. Handle multiprocess packet
13556 * linux-low.h: Include gdb_proc_service.h.
13557 (struct process_info_private): New.
13558 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13559 <lwpid_of>: Use ptid_get_lwp.
13560 (get_lwp_thread): Adjust.
13561 (struct lwp_info): Add `dead' member.
13562 (find_lwp_pid): Declare.
13563 * linux-low.c (thread_db_active): Delete.
13564 (new_inferior): Adjust comment.
13565 (inferior_pid): Delete.
13566 (linux_add_process): New.
13567 (handle_extended_wait): Adjust.
13568 (add_lwp): Change unsigned long to ptid.
13569 (linux_create_inferior): Add process to processes table. Adjust
13570 to use ptids. Don't set new_inferior here.
13571 (linux_attach_lwp): Rename to ...
13572 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13573 it. Adjust to use ptids.
13574 (linux_attach_lwp): New.
13575 (linux_attach): Add process to processes table. Don't set
13577 (struct counter): New.
13578 (second_thread_of_pid_p, last_thread_of_process_p): New.
13579 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13580 multiple processes.
13581 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13582 processes. Remove process from process table.
13583 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13584 to multiple processes.
13585 (any_thread_of): New.
13586 (linux_detach): Add `pid' argument, and handle it. Remove process
13587 from processes table.
13588 (linux_join): Add `pid' argument. Handle it.
13589 (linux_thread_alive): Change unsighed long argument to ptid_t.
13590 Consider dead lwps as not being alive.
13591 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13592 threads we're not interested in.
13593 (same_lwp, find_lwp_pid): New.
13594 (linux_wait_for_lwp): Change `pid' argument's type from int to
13596 (linux_wait_for_event): Rename to ...
13597 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13598 from int to ptid_t. Adjust.
13599 (linux_wait_for_event): New.
13600 (linux_wait_1): Add `ptid' argument. Change return type to
13601 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13602 that exit from the process table.
13603 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13605 (mark_lwp_dead): New.
13606 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13607 stopping all threads, mark its main lwp as dead.
13608 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13610 (fetch_register, usr_store_inferior_registers)
13611 (regsets_fetch_inferior_registers)
13612 (regsets_store_inferior_registers, linux_read_memory)
13613 (linux_write_memory): Inline `inferior_pid'.
13614 (linux_look_up_symbols): Adjust to use per-process
13615 `thread_db_active'.
13616 (linux_request_interrupt): Adjust to use ptids.
13617 (linux_read_auxv): Inline `inferior_pid'.
13618 (initialize_low): Don't reference thread_db_active.
13619 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13620 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13621 (ps_getpid): Return the pid of the current inferior.
13622 * thread-db.c (proc_handle, thread_agent): Delete.
13623 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13625 (find_one_thread): Change argument type to ptid_t. Adjust to
13627 (maybe_attach_thread): Adjust to per-process data and ptids.
13628 (thread_db_find_new_threads): Ditto.
13629 (thread_db_init): Ditto.
13630 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13631 processes table. Adjust to use ptids.
13632 (spu_kill, spu_detach): Adjust interface. Remove process from
13634 (spu_join, spu_thread_alive): Adjust interface.
13635 (spu_wait): Adjust interface. Remove process from processes
13636 table. Adjust to use ptids.
13637 * win32-low.c (current_inferior_tid): Delete.
13638 (current_inferior_ptid): New.
13639 (debug_event_ptid): New.
13640 (thread_rec): Take a ptid. Adjust.
13641 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13642 (child_delete_thread): Ditto.
13643 (do_initial_child_stuff): Add `attached' argument. Add process to
13645 (child_fetch_inferior_registers, child_store_inferior_registers):
13647 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13648 (win32_attach): Pass 1 to do_initial_child_stuff.
13649 (win32_kill): Adjust interface. Remove process from processes
13651 (win32_detach): Ditto.
13652 (win32_join): Adjust interface.
13653 (win32_thread_alive): Take a ptid.
13654 (win32_resume): Adjust to use ptids.
13655 (get_child_debug_event): Ditto.
13656 (win32_wait): Adjust interface. Remove exiting process from
13659 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13661 Non-stop mode support.
13663 * server.h (non_stop): Declare.
13664 (gdb_client_data, handler_func): Declare.
13665 (delete_file_handler, add_file_handler, start_event_loop):
13667 (handle_serial_event, handle_target_event, push_event)
13668 (putpkt_notif): Declare.
13669 * target.h (enum resume_kind): New.
13670 (struct thread_resume): Replace `step' field by `kind' field.
13671 (TARGET_WNOHANG): Define.
13672 (struct target_ops) <wait>: Add `options' argument.
13673 <supports_non_stop, async, start_non_stop>: New fields.
13674 (target_supports_non_stop, target_async): New.
13675 (start_non_stop): Declare.
13676 (mywait): Add `options' argument.
13677 * target.c (mywait): Add `options' argument. Print child exit
13678 notifications here.
13679 (start_non_stop): New.
13680 * server.c (non_stop, own_buf, mem_buf): New globals.
13681 (struct vstop_notif): New.
13682 (notif_queue): New global.
13683 (queue_stop_reply, push_event, discard_queued_stop_replies)
13684 (send_next_stop_reply): New.
13685 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13687 (attach_inferior): In non-stop mode, don't wait for the target
13689 (handle_general_set): Handle QNonStop.
13690 (handle_query): When handling qC, return the current general
13691 thread, instead of the first thread of the list.
13692 (handle_query): If the backend supports non-stop mode, include
13693 QNonStop+ in the qSupported query response.
13694 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13696 (handle_v_attach, handle_v_run): Handle non-stop mode.
13697 (handle_v_stopped): New.
13698 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13699 (myresume): Adjust to use resume_kind. Handle non-stop.
13700 (queue_stop_reply_callback): New.
13701 (handle_status): Handle non-stop mode.
13702 (main): Clear non_stop flag on reconnection. Use the event-loop.
13703 Refactor serial protocol handling from here ...
13704 (process_serial_event): ... to this new function. When GDB
13705 selects any thread, select one here. In non-stop mode, wait until
13706 GDB acks all pending events before exiting.
13707 (handle_serial_event, handle_target_event): New.
13708 * remote-utils.c (remote_open): Install remote_desc in the event
13710 (remote_close): Remove remote_desc from the event loop.
13711 (putpkt_binary): Rename to...
13712 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13713 (putpkt_binary): New as wrapper around putpkt_binary_1.
13714 (putpkt_notif): New.
13715 (prepare_resume_reply): In non-stop mode, don't change the
13717 * event-loop.c: New.
13718 * Makefile.in (OBJ): Add event-loop.o.
13719 (event-loop.o): New rule.
13721 * linux-low.h (pid_of): Moved here.
13723 (get_lwp_thread): Use lwpid_of.
13724 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13725 * linux-low.c (pid_of): Delete.
13726 (inferior_pid): Use lwpid_of.
13727 (linux_event_pipe): New.
13728 (target_is_async_p): New.
13730 (handle_extended_wait): Use lwpid_of.
13731 (add_lwp): Don't set lwpid field.
13732 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13733 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13734 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13735 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13736 first. Adjust to linux_wait_for_event interface changes. Use
13738 (linux_detach): Don't delete the main lwp here.
13739 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13740 (status_pending_p): Don't consider explicitly suspended lwps.
13741 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13742 pointer. Add OPTIONS argument. Change return type to int. Use
13743 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13744 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13745 pointer. Add status pointer argument. Return a pid instead of a
13746 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13747 changes. In non-stop mode, don't switch to a random thread.
13748 (linux_wait): Rename to...
13749 (linux_wait_1): ... this. Add target_options argument, and handle
13750 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13751 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13752 clean exit and signal exit code. Don't stop all threads in
13753 non-stop mode. In all-stop mode, only stop all threads when
13754 reporting a stop to GDB. Handle explicit thread stop requests.
13755 (async_file_flush, async_file_mark): New.
13757 (send_sigstop): Use lwpid_of.
13758 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13759 interface changes. In non-stop mode, don't switch to a random
13761 (linux_resume_one_lwp): Use lwpid_of.
13762 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13763 (linux_resume_one_thread): ... this. Handle resume_stop. In
13764 non-stop mode, don't look for pending flag in all threads.
13765 (resume_status_pending_p): Don't consider explicitly suspended
13767 (my_waitpid): Reimplement. Emulate __WALL.
13768 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13770 (sigchld_handler, linux_supports_non_stop, linux_async)
13771 (linux_start_non_stop): New.
13772 (linux_target_ops): Register linux_supports_non_stop, linux_async
13773 and linux_start_non_stop.
13774 (initialize_low): Install SIGCHLD handler.
13775 * thread-db.c (thread_db_create_event, find_one_thread)
13776 (thread_db_get_tls_address): Use lwpid_of.
13777 * win32-low.c (win32_detach): Adjust to use resume_kind.
13778 (win32_wait): Add `options' argument.
13779 * spu-low.c (spu_resume): Adjust to use resume_kind.
13780 (spu_wait): Add `options' argument.
13782 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13784 Decouple target code from remote protocol.
13786 * target.h (enum target_waitkind): New.
13787 (struct target_waitstatus): New.
13788 (struct target_ops) <wait>: Return an unsigned long. Take a
13789 target_waitstatus pointer instead of a char pointer.
13790 (mywait): Likewise.
13791 * target.c (mywait): Change prototype to return an unsigned long.
13792 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13793 * server.h (thread_from_wait, old_thread_from_wait): Delete
13795 (prepare_resume_reply): Change prototype to take a
13797 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13798 (last_status, last_ptid): New.
13799 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13800 pid instead of a signal.
13801 (attach_inferior): Remove "status" and "signal" parameters.
13803 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13805 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13806 (handle_v_requests, myresume): Remove "status" and "signal"
13807 parameters. Adjust.
13808 (handle_status): New.
13809 (main): Delete local `status'. Adjust.
13810 * remote-utils.c: Include target.h.
13811 (prepare_resume_reply): Change prototype to take a
13812 target_waitstatus. Adjust.
13814 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13816 * spu-low.c (spu_wait): Adjust.
13817 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13819 (win32_wait): Adjust.
13821 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13823 * target.h (struct thread_resume): Delete leave_stopped member.
13824 (struct target_ops): Add a `n' argument to the `resume' callback.
13825 * server.c (start_inferior): Adjust.
13826 (handle_v_cont, myresume): Adjust.
13827 * linux-low.c (check_removed_breakpoint): Adjust to resume
13828 interface change, and to removed leave_stopped field.
13829 (resume_ptr): Delete.
13830 (struct thread_resume_array): New.
13831 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13832 resume interface change.
13833 (linux_continue_one_thread, linux_queue_one_thread)
13834 (resume_status_pending_p): Check if the resume field is NULL
13835 instead of checking the leave_stopped member.
13836 (linux_resume): Adjust to the target resume interface change.
13837 * spu-low.c (spu_resume): Adjust to the target resume interface
13839 * win32-low.c (win32_detach, win32_resume): Ditto.
13841 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13843 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13845 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13847 (linux_continue_one_thread): Only preserve the stepping flag if
13848 there's a pending breakpoint.
13850 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13852 * server.c (main): After the inferior having exited, call
13853 remote_close before exiting gdbserver.
13855 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13857 Fix size of FPSCR in Power 7 processors.
13858 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13859 (PPC_FEATURE_HAS_DFP): New #define.
13860 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13863 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13865 * server.c (handle_query) Whitespace and formatting.
13867 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13869 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13870 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13871 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13872 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13873 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13874 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13875 Makefile.in, configure.ac: Fix whitespace throughout.
13876 * configure: Regenerate.
13878 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13880 * inferiors.c (find_inferior): Make it safe for the callback
13881 function to delete the currently iterated inferior.
13883 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13885 * Makefile.in (linuw_low_h): Move higher.
13886 (thread-db.o): Depend on $(linux_low_h).
13888 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13890 Rename "process" to "lwp" throughout.
13892 * linux-low.c (all_processes): Rename to...
13893 (all_lwps): ... this.
13894 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13895 (add_process): Rename to ...
13896 (add_lwp): ... this. Adjust.
13897 (linux_create_inferior): Adjust.
13898 (linux_attach_lwp): Adjust.
13899 (linux_attach): Adjust.
13900 (linux_kill_one_process): Rename to ...
13901 (linux_kill_one_lwp): ... this. Adjust.
13902 (linux_kill): Adjust.
13903 (linux_detach_one_process): Rename to ...
13904 (linux_detach_one_lwp): ... this. Adjust.
13905 (linux_detach): Adjust.
13906 (check_removed_breakpoint): Adjust.
13907 (status_pending_p): Adjust.
13908 (linux_wait_for_process): Rename to ...
13909 (linux_wait_for_lwp): ... this. Adjust.
13910 (linux_wait_for_event): Adjust.
13911 (send_sigstop): Adjust.
13912 (wait_for_sigstop): Adjust.
13913 (stop_all_processes): Rename to ...
13914 (stop_all_lwps): ... this.
13915 (linux_resume_one_process): Rename to ...
13916 (linux_resume_one_lwp): ... this. Adjust.
13917 (linux_set_resume_request, linux_continue_one_thread)
13918 (linux_queue_one_thread, resume_status_pending_p)
13919 (usr_store_inferior_registers, regsets_store_inferior_registers)
13920 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13922 * linux-low.h (get_process): Rename to ...
13923 (get_lwp): ... this. Adjust.
13924 (get_thread_process): Rename to ...
13925 (get_thread_lwp): ... this. Adjust.
13926 (get_process_thread): Rename to ...
13927 (get_lwp_thread): ... this. Adjust.
13928 (struct process_info): Rename to ...
13929 (struct lwp_info): ... this.
13930 (all_processes): Rename to ...
13931 (all_lwps): ... this.
13932 * proc-service.c (ps_lgetregs): Adjust.
13933 * thread-db.c (thread_db_create_event, find_one_thread)
13934 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13936 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13938 * server.c (handle_query): Handle "qAttached".
13940 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13942 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13943 GPLv3, update license URL.
13945 2009-03-01 Doug Evans <dje@google.com>
13947 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13948 (server_h): Add gdb_signals.h.
13949 (signals.o): Update.
13950 * server.h (target_signal_from_host,target_signal_to_host_p)
13951 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13953 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13955 * remote-utils.c (getpkt): Also generate remote-debug
13956 information if noack_mode is set.
13958 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13960 * server.c (handle_query): Report qXfer:siginfo:read and
13961 qXfer:siginfo:write as supported and handle them.
13962 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13963 * linux-low.c (linux_xfer_siginfo): New.
13964 (linux_target_ops): Set it.
13966 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13968 * server.c (gdbserver_usage): Mention --remote-debug.
13969 (main): Accept '--remote-debug' switch.
13971 2009-01-18 Doug Evans <dje@google.com>
13973 * regcache.c (new_register_cache): No need to check result of xcalloc.
13974 * server.c (handle_search_memory): Back out calls to xmalloc,
13975 result is checked and error is returned to user upon failure.
13976 (handle_query): Ditto. Add more checks for result of malloc.
13977 (handle_v_cont): Check result of malloc, report error back to
13979 (handle_v_run): Ditto. Call freeargv.
13980 * server.h (freeargv): Declare.
13981 * utils.c (freeargv): New fn.
13983 2009-01-15 Doug Evans <dje@google.com>
13985 * gdbreplay.c (perror_with_name): Make arg const char *.
13986 * server.h (target_signal_to_name): Make return type const char *.
13987 * thread-db.c (thread_db_err_str): Make return type const char *.
13988 * utils.c (perror_with_name): Make arg const char *.
13990 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13992 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13993 when handling a EXIT_PROCESS_DEBUG_EVENT.
13995 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13997 * gdbreplay.c (gdbreplay_version): Update copyright year.
13998 * server.c (gdbserver_version): Likewise.
14000 2009-01-05 Doug Evans <dje@google.com>
14002 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14003 (handle_extended_wait): Improve comment.
14005 2008-12-13 Doug Evans <dje@google.com>
14007 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14008 * server.h (ATTR_MALLOC): New macro.
14009 (xmalloc,xcalloc,xstrdup): Declare.
14010 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14011 * inferiors.c: Ditto.
14012 * linux-low.c: Ditto.
14013 * mem-break.c: Ditto.
14014 * regcache.c: Ditto.
14015 * remote-utils.c: Ditto.
14018 * win32-low.c: Ditto.
14020 2008-12-12 Doug Evans <dje@google.com>
14022 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14023 in debugging printf.
14025 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14027 2008-12-09 Doug Evans <dje@google.com>
14029 * linux-low.h (struct process_info): Delete member tid, unused.
14030 * thread-db.c (find_one_thread): Update.
14031 (maybe_attach_thread): Update.
14033 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14035 * target.h (struct target_ops): Add qxfer_osdata member.
14036 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14038 (linux_qxfer_osdata): New functions.
14039 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14041 * server.c (handle_query): Handle "qXfer:osdata:read:".
14042 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14043 (buffer_xml_printf): New functions.
14044 * server.h (struct buffer): New.
14045 (buffer_grow_str, buffer_grow_str0): New macros.
14046 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14047 (buffer_xml_printf): Declare.
14049 2008-11-24 Doug Evans <dje@google.com>
14051 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14053 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14055 * server.c (handle_v_run): Always use the supplied argument list.
14057 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14059 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14060 (xtensa_regmap_table): Add entry for scompare1.
14062 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14064 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14065 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14066 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14067 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14068 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14069 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14070 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14071 XML target descriptions.
14072 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14073 when inferior is running on an ISA 2.05 or later processor. Add
14074 special case to return offset for full 64-bit slot of FPSCR when
14077 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14079 * Makefile.in (SFILES, clean): Added sparc64 files.
14080 (reg-sparc64.o, reg-sparc64.c): New.
14081 * configure.srv (sparc*-*-linux*): New configuration.
14082 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14083 syscall arguments for SPARC.
14084 (regsets_store_inferior_registers): Likewise.
14085 * linux-sparc-low.c: New file.
14087 2008-10-21 Doug Evans <dje@google.com>
14089 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14090 (READLINE_DIR,READLINE_DEP): Delete.
14091 (INTERNAL_CFLAGS): Update.
14092 (LINTFLAGS): Update.
14094 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14096 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14097 whole argv from the last run, not just argv[0].
14099 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14101 * regcache.c (new_register_cache): Return NULL if the register
14102 cache size isn't known yet.
14103 (free_register_cache): Avoid dereferencing a NULL regcache.
14105 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14107 * configure.srv: Merge MIPS and MIPS64.
14109 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14111 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14113 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14115 * Makefile.in: Add required vsx dependencies.
14117 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14118 Declare init_registers_powerpc_vsx32l.
14119 Declare init_registers_powerpc_vsx64l.
14120 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14121 (ppc_arch_setup): Check for VSX in hwcap.
14122 (ppc_fill_vsxregset): New function.
14123 (ppc_store_vsxregset): New function.
14124 Add new VSX entry in regset_info target_regsets.
14126 * configure.srv: Add new VSX dependencies.
14128 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14130 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14131 (remote_open): Set or clear transport_is_reliable.
14132 (putpkt_binary): Don't expect acks in noack mode.
14133 (getpkt): Don't send ack/nac in noack mode.
14134 * server.c (handle_general_set): Handle QStartNoAckMode.
14135 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14137 (main): Reset noack_mode on every connection.
14138 * server.h (noack_mode): Declare.
14140 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14142 * Makefile.in (GDBREPLAY_OBS): New variable.
14143 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14145 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14146 Daniel Jacobowitz <dan@codesourcery.com>
14148 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14149 (usr_store_inferior_registers): Likewise.
14150 (regsets_store_inferior_registers): Likewise.
14152 2008-07-31 Rolf Jansen <rj@surtec.com>
14153 Pedro Alves <pedro@codesourcery.com>
14155 * configure.ac: Check for memmem declaration.
14156 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14157 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14158 (disable_packet_qfThreadInfo): Unconditionally compile.
14159 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14160 * configure, config.in: Regenerate.
14162 2008-07-28 Doug Kwan <dougkwan@google.com>
14164 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14165 (linux_write_memory): Remove declaration of errno.
14167 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14169 * linux-low.c (handle_extended_wait): Do not use "status"
14170 variable uninitialized.
14172 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14174 * server.c (handle_v_attach): Inhibit reporting dll changes.
14176 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14178 * remote-utils.c (prepare_resume_reply): If requested, don't
14179 output "thread:TID" in the T stop reply.
14181 * server.c (disable_packet_vCont, disable_packet_Tthread)
14182 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14183 (handle_query): If requested, disable support for qC, qfThreadInfo
14185 (handle_v_requests): If requested, disable support for vCont.
14186 (gdbserver_show_disableable): New.
14187 (main): Handle --disable-packet and --disable-packet=LIST.
14189 * server.h (disable_packet_vCont, disable_packet_Tthread)
14190 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14192 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14194 * server.c (gdbserver_usage): Mention --version.
14196 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14198 * Makefile.in (gdbreplay.o): New rule.
14200 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14202 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14203 message, not gdbserver.
14205 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14206 Nathan Sidwell <nathan@codesourcery.com>
14207 Joseph Myers <joseph@codesourcery.com>
14209 * acinclude.m4: Include ../../config/acx.m4.
14210 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14211 * configure, config.in: Regenerate.
14212 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14213 * server.c (gdbserver_version): Print PKGVERSION.
14214 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14215 (main): Adjust gdbserver_usage calls.
14216 * gdbreplay.c (version, host_name): Add declarations.
14217 (gdbreplay_version, gdbreplay_usage): New.
14218 (main): Accept --version and --help options.
14220 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14222 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14223 (arm_breakpoint_at): Handle Thumb.
14224 (the_low_target): Add comment.
14226 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14228 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14230 2008-05-09 Doug Evans <dje@google.com>
14232 * server.h (decode_search_memory_packet): Declare.
14233 * remote-utils.c (decode_search_memory_packet): New fn.
14234 * server.c (handle_search_memory_1): New fn.
14235 (handle_search_memory): New fn.
14236 (handle_query): Process qSearch:memory packets.
14238 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14240 * regcache.c (registers_length): Remove.
14241 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14242 full register packet.
14243 * regcache.h (registers_length): Remove prototype.
14244 * server.h (PBUFSIZ): Define to 16384.
14246 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14248 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14249 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14250 powerpc-64l.o, and powerpc-altivec64l.o.
14251 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14252 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14253 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14254 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14255 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14258 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14259 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14260 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14261 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14262 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14263 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14264 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14265 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14266 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14267 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14270 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14271 (init_registers_powerpc_32l): ... this new prototype.
14272 (init_registers_powerpc_32): Remove, replace by ...
14273 (init_registers_powerpc_altivec32l): ... this new prototype.
14274 (init_registers_powerpc_e500): Remove, replace by ...
14275 (init_registers_powerpc_e500l): ... this new prototype.
14276 (init_registers_ppc64): Remove, replace by ...
14277 (init_registers_powerpc_64l): ... this new prototype.
14278 (init_registers_powerpc_64): Remove, replace by ...
14279 (init_registers_powerpc_altivec64l): ... this new prototype.
14280 (ppc_num_regs): Set to 73.
14281 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14282 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14283 (ppc_cannot_store_register): Handle orig_r3 and trap.
14284 (ppc_arch_setup): Update init_registers_... calls.
14285 (ppc_fill_gregset): Handle orig_r3 and trap.
14287 * inferiors.c (clear_inferiors): Reset current_inferior.
14289 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14291 * acinclude.m4: Add override.m4.
14292 * configure: Regenerate.
14294 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14296 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14297 initial call to init_register_ppc64.
14299 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14301 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14302 single powerpc*-*-linux* case.
14303 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14305 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14307 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14308 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14310 * linux-ppc-low.c: Include <elf.h>.
14311 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14312 (ppc_hwcap): New global variable.
14313 (ppc_regmap): Remove __SPE__ #ifdef sections.
14314 (ppc_regmap_e500): New global variable.
14315 (ppc_cannot_store_register): Update __SPE__ special case.
14316 (ppc_get_hwcap): New function.
14317 (ppc_arch_setup): Use it to determine whether inferior supports
14318 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14319 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14320 Do not access registers if target does not support AltiVec.
14321 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14322 Do not access registers if target does not support SPE.
14323 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14325 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14327 * linux-low.c (disabled_regsets, num_regsets): New.
14328 (use_regsets_p): Delete.
14329 (linux_wait_for_process): Clear disabled_regsets.
14330 (regsets_fetch_inferior_registers): Check and set it.
14331 (regsets_store_inferior_registers): Likewise.
14332 (linux_fetch_registers, linux_store_registers): Do not use
14334 (initialize_low): Allocate disabled_regsets.
14336 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14338 * Makefile.in (LIBOBJS): New.
14339 (OBS): Use LIBOBJS.
14340 (memmem.o): New rule.
14341 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14342 * configure: Regenerated.
14344 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14346 * server.c (handle_query): Never return "unsupported" for
14347 qXfer:features:read queries.
14349 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14351 * server.c (get_features_xml): Fix inverted condition.
14352 (handle_query): Always support qXfer:feature:read.
14354 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14356 * server.c (wrapper_argv): New.
14357 (start_inferior): Handle wrapper_argv. If set, expect an extra
14359 (gdbserver_usage): Document --wrapper.
14360 (main): Parse --wrapper.
14362 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14364 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14365 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14366 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14367 (ppc_set_pc): Likewise.
14368 (ppc_arch_setup): New function.
14369 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14370 of collect_register.
14371 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14373 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14375 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14376 instead of linux-ppc64-low.o.
14377 * linux-ppc64-low.c: Remove file.
14378 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14379 (linux-ppc64-low.o): Remove rule.
14381 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14382 (init_registers_powerpc_64): Likewise.
14383 (ppc_regmap): Conditionally define depending on __powerpc64__.
14384 (ppc_cannot_store_register): Do not special-case "fpscr" when
14385 compiled on __powerpc64__.
14386 (ppc_collect_ptrace_register): New function.
14387 (ppc_supply_ptrace_register): New function.
14388 (ppc_breakpoint): Change type to "unsigned int".
14389 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14390 (the_low_target): Conditionally provide initializers for the
14391 arch_setup member depending on __powerpc64__. Install
14392 collect_ptrace_register and supply_ptrace_register members.
14394 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14396 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14397 * server.c (gdbserver_xmltarget): Define.
14398 (get_features_xml): Use it to replace "target.xml" and arch_string.
14400 * configure.srv: Remove srv_xmltarget. Add XML files that were
14401 mentioned there to srv_xmlfiles instead. Remove conditional tests
14402 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14403 srv_xmlfiles and srv_regobj to include all possible choices.
14404 * configure.ac (srv_xmltarget): Remove.
14405 (srv_xmlfiles): Do not add "target.xml".
14406 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14407 checks for supplementary target information.
14408 * configure: Regenerate.
14409 * Makefile.in (XML_TARGET): Remove.
14410 (target.xml): Remove rule.
14411 (clean): Do not clean up target.xml.
14412 (.PRECIOUS): Do not mention target.xml.
14414 * target.h (struct target_ops): Remove arch_string member.
14415 * linux-low.c (linux_arch_string): Remove.
14416 (linux_target_ops): Remove arch_string initializer.
14417 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14418 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14419 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14420 * spu-low.c (spu_arch_string): Remove.
14421 (spu_target_ops): Remove arch_string initializer.
14422 * win32-low.c (win32_arch_string): Remove.
14423 (win32_target_ops): Remove arch_string initializer.
14424 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14425 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14426 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14428 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14430 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14431 by collect_ptrace_register and supply_ptrace_register hooks.
14432 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14433 instead of checking for the_low_target.left_pad_xfer.
14434 (usr_store_inferior_registers): Use collect_ptrace_register callback
14435 instead of checking for the_low_target.left_pad_xfer.
14437 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14438 (s390_supply_ptrace_register): Likewise.
14439 (s390_fill_gregset): Call s390_collect_ptrace_register.
14440 (the_low_target): Update.
14442 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14443 (ppc_supply_ptrace_register): Likewise.
14444 (the_low_target): Update.
14446 * linux-i386-low.c (the_low_target): Update.
14447 * linux-x86-64-low.c (the_low_target): Update.
14449 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14451 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14452 reg-s390.o and reg-s390x.o.
14454 * linux-low.c (new_inferior): New global variable.
14455 (linux_create_inferior, linux_attach): Set it.
14456 (linux_wait_for_process): Call the_low_target.arch_setup after the
14457 target has stopped for the first time.
14458 (initialize_low): Do not call the_low_target.arch_setup.
14460 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14461 (s390_set_pc): Likewise.
14462 (s390_arch_setup): New function.
14463 (the_low_target): Use s390_arch_setup as arch_setup routine.
14465 * regcache.c (realloc_register_cache): New function.
14466 (set_register_cache): Call it for each existing regcache.
14468 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14470 * server.h (init_registers): Remove prototype.
14472 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14473 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14474 instead of init_registers ().
14475 * linux-arm-low.c (init_registers_arm): Add prototype.
14476 (init_registers_arm_with_iwmmxt): Likewise.
14477 (the_low_target): Add initializer for arch_setup field.
14478 * linux-cris-low.c (init_registers_cris): Add prototype.
14479 (the_low_target): Add initializer for arch_setup field.
14480 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14481 (the_low_target): Add initializer for arch_setup field.
14482 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14483 (the_low_target): Add initializer for arch_setup field.
14484 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14485 (the_low_target): Add initializer for arch_setup field.
14486 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14487 (the_low_target): Add initializer for arch_setup field.
14488 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14489 (the_low_target): Add initializer for arch_setup field.
14490 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14491 (init_registers_mips64_linux): Likewise.
14492 (the_low_target): Add initializer for arch_setup field.
14493 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14494 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14495 (the_low_target): Add initializer for arch_setup field.
14496 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14497 (init_registers_powerpc_64): Likewise.
14498 (the_low_target): Add initializer for arch_setup field.
14499 * linux-s390-low.c (init_registers_s390): Add prototype.
14500 (init_registers_s390x): Likewise.
14501 (the_low_target): Add initializer for arch_setup field.
14502 * linux-sh-low.c (init_registers_sh): Add prototype.
14503 (the_low_target): Add initializer for arch_setup field.
14504 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14505 (the_low_target): Add initializer for arch_setup field.
14506 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14507 (the_low_target): Add initializer for arch_setup field.
14509 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14510 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14511 instead of init_registers ().
14512 * win32-arm-low.c (init_registers_arm): Add prototype.
14513 (the_low_target): Add initializer for arch_setup field.
14514 * win32-i386-low.c (init_registers_i386): Add prototype.
14515 (the_low_target): Add initializer for arch_setup field.
14517 * spu-low.c (init_registers_spu): Add prototype.
14518 (initialize_low): Call initialie_registers_spu () instead of
14519 initialize_registers ().
14521 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14523 * server.c (handle_v_requests): When handling the vRun and vAttach
14524 packets, if already debugging a process, don't kill it. Return an
14527 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14529 * server.c (handle_query): Correct length check.
14531 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14533 * win32-low.c (do_initial_child_stuff): Add process handle
14534 parameter. Set current_process_handle and current_process_id from the
14535 parameters. Clear globals.
14536 (win32_create_inferior): Don't set current_process_handle and
14537 current_process_id here. Instead pass them on the call to
14538 do_initial_child_stuff.
14539 (win32_attach): Likewise.
14540 (win32_clear_inferiors): New.
14541 (win32_kill): Don't close the current process handle or the
14542 current thread handle here. Instead call win32_clear_inferiors.
14543 (win32_detach): Don't open a new handle to the process. Call
14544 win32_clear_inferiors.
14545 (win32_join): Don't rely on current_process_handle; open a new
14546 handle using the process id.
14547 (win32_wait): Call win32_clear_inferiors when the inferior process
14550 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14552 * server.c (monitor_show_help): Add "exit".
14554 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14556 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14557 (clean): Add reg-xtensa.c.
14558 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14559 * configure.srv (xtensa*-*-linux*) New target.
14560 * linux-xtensa-low.c: New.
14561 * xtensa-xtregs.c: New.
14563 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14565 * hostio.c: Don't include errno.h.
14566 (errno_to_fileio_errno): Move to hostio-errno.
14567 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14568 error number outputting to the target->hostio_last_error callback.
14569 (hostio_packet_error): Use FILEIO_EINVAL directly.
14570 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14571 calls to hostio_error.
14572 * hostio-errno.c: New.
14573 * server.h (hostio_last_error_from_errno): Declare.
14574 * target.h (target_ops): Add hostio_last_error member.
14575 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14576 as hostio_last_error handler.
14577 * spu-low.c (spu_target_ops): Likewise.
14578 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14579 (wince_hostio_last_error): New functions.
14580 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14581 as hostio_last_error handler.
14582 (win32_target_ops) [!_WIN32_WCE]: Register
14583 hostio_last_error_from_errno as hostio_last_error handler.
14584 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14585 (hostio-errno.o): New rule.
14586 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14587 * configure.srv (srv_hostio_err_objs): New variable. Default to
14589 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14590 * configure: Regenerate.
14592 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14594 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14595 (linux_kill, linux_detach): Clean up the process list.
14596 * remote-utils.c (remote_open): Improve port number parsing.
14597 (putpkt_binary, input_interrupt): Only send interrupts if the target
14599 * server.c (extended_protocol): Make static.
14600 (attached): Define earlier.
14601 (exit_requested, response_needed, program_argv): New variables.
14602 (target_running): New.
14603 (start_inferior): Clear attached here.
14604 (attach_inferior): Set attached here.
14605 (require_running): Define.
14606 (handle_query): Use require_running and target_running. Implement
14608 (handle_v_attach, handle_v_run): New.
14609 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14610 (gdbserver_usage): Update.
14611 (main): Redo argument parsing. Handle --debug and --multi. Handle
14612 --attach along with other options or after the port. Save
14613 program_argv. Support no initial program. Resynchronize
14614 communication with GDB after an error. Handle "monitor exit".
14615 Use require_running and target_running. Always allow the extended
14616 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14617 restart in extended mode.
14618 * README: Refer to the GDB manual. Update --attach usage.
14620 2007-12-20 Andreas Schwab <schwab@suse.de>
14622 * linux-low.c (STACK_SIZE): Define.
14623 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14624 (linux_test_for_tracefork): Likewise.
14626 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14628 * linux-low.c (linux_wait_for_event): Update messages. Do not
14629 reinsert auto-delete breakpoints.
14630 * mem-break.c (struct breakpoint): Change return type of handler to
14632 (set_breakpoint_at): Update handler type.
14633 (reinsert_breakpoint_handler): Return 1 instead of calling
14635 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14637 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14638 * mem-break.h (set_breakpoint_at): Update handler type.
14639 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14640 * win32-low.c (auto_delete_breakpoint): New.
14641 (get_child_debug_event): Use it.
14643 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14645 * configure.ac: Check for pread and pwrite.
14646 * hostio.c (handle_pread): Fall back to lseek and read.
14647 (handle_pwrite): Fall back to lseek and write.
14648 * config.in, configure: Regenerated.
14650 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14652 * server.c (myresume): Add own_buf argument.
14653 (main): Update calls.
14655 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14657 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14658 * remote-utils.c (remote_open): Do not call disable_async_io.
14659 (block_async_io): Delete.
14660 (unblock_async_io): Make static.
14661 (initialize_async_io): New.
14662 * server.c (handle_v_cont): Handle async I/O here.
14663 (myresume): Likewise. Move other common resume tasks here...
14664 (main): ... from here. Call initialize_async_io. Disable async
14665 I/O before the main loop.
14666 * server.h (initialize_async_io): Declare.
14667 (block_async_io, unblock_async_io): Delete prototypes.
14668 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14670 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14672 * remote-utils.c (readchar): Allow binary data in received messages.
14674 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14676 * win32-low.c (attaching): New global.
14677 (win32_create_inferior): Clear the `attaching' global.
14678 (win32_attach): Set the `attaching' global.
14679 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14680 attaching. Only set a breakpoint at the entry point if not
14683 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14685 * server.c (main): Don't report dll events on the initial
14686 connection on attaches.
14688 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14690 * server.c (main): Relax numerical bases supported for the pid of
14691 the --attach command line argument.
14693 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14695 * win32-low.c (win32_attach): Call OpenProcess before
14696 DebugActiveProcess, not after. Add last error output to error
14699 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14701 * win32-low.c (win32_get_thread_context)
14702 (win32_set_thread_context): New functions.
14703 (thread_rec): Use win32_get_thread_context.
14704 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14705 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14708 2007-12-03 Leo Zayas
14709 Pedro Alves <pedro_alves@portugalmail.pt>
14711 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14713 (child_add_thread): Minor cleanup.
14714 (child_continue): Resume artificially suspended threads before
14715 calling ContinueDebugEvent.
14716 (suspend_one_thread): New.
14717 (fake_breakpoint_event): New.
14718 (get_child_debug_event): Change return type to int. Check here if
14719 gdb sent an interrupt request. If a soft interrupt was requested,
14720 fake a breakpoint event. Return 0 if there is no event to handle,
14722 (win32_wait): Don't check here if gdb sent an interrupt request.
14723 Ensure there is a valid event to handle.
14724 (win32_request_interrupt): Add soft interruption method as last
14727 2007-12-03 Leo Zayas
14728 Pedro Alves <pedro_alves@portugalmail.pt>
14730 * win32-low.h (win32_thread_info): Add descriptions to the
14731 structure members. Replace `suspend_count' counter by a
14733 * win32-low.c (thread_rec): Update condition of when to get the
14734 context from the inferior. Rely on ContextFlags being set if it
14735 has already been retrieved. Only suspend the inferior thread if
14736 we haven't already. Warn if that fails.
14737 (continue_one_thread): s/suspend_count/suspended/. Only call
14738 ResumeThread once. Warn if that fails.
14740 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14742 * win32-low.c (win32_wait): Don't read from the inferior when it
14743 has already exited.
14745 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14747 * Makefile.in (win32_low_h): New variable.
14748 (win32-low.o): Add dependency on $(win32_low_h).
14749 (win32-arm-low.o, win32-i386-low.o): New rules.
14751 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14753 * hostio.c: Correct copyright year.
14755 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14757 * Makefile.in (OBS): Add hostio.o.
14758 (hostio.o): New rule.
14759 * server.h (handle_vFile): Declare.
14760 * hostio.c: New file.
14761 * server.c (handle_v_requests): Take packet_len and new_packet_len
14762 for binary packets. Call handle_vFile.
14763 (main): Update call to handle_v_requests.
14765 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14767 * linux-low.c: Include <sched.h>.
14769 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14771 * linux-low.c (linux_tracefork_grandchild): New.
14772 (linux_tracefork_child): Use clone.
14773 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14775 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14777 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14779 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14781 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14783 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14785 * inferiors.c (change_inferior_id): Delete.
14786 (add_pid_to_list, pull_pid_from_list): New.
14787 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14788 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14789 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14790 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14791 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14792 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14793 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14794 (using_threads): Always set to 1.
14795 (handle_extended_wait): New.
14796 (add_process): Do not set TID.
14797 (linux_create_inferior): Set must_set_ptrace_flags.
14798 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14799 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14800 (linux_thread_alive): Rename TID argument to LWPID.
14801 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14802 (linux_wait_for_event): Do not use TID or check using_threads. Update
14803 call to dead_thread_notify. Call handle_extended_wait.
14804 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14805 (send_sigstop): Delete sigstop_sent.
14806 (wait_for_sigstop): Avoid TID.
14807 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14808 (linux_test_for_tracefork): New.
14809 (linux_lookup_signals): Use thread_db_active and
14810 linux_supports_tracefork_flag.
14811 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14812 * linux-low.h (get_process_thread): Avoid TID.
14813 (struct process_ifo): Move thread_known and tid to the end. Remove
14815 (linux_attach_lwp, thread_db_init): Update prototypes.
14816 * server.h (change_inferior_id): Delete prototype.
14817 (add_pid_to_list, pull_pid_from_list): New prototypes.
14818 * thread-db.c (thread_db_use_events): New.
14819 (find_first_thread): Rename to...
14820 (find_one_thread): ...this. Update callers and messages. Do not
14821 call fatal. Check thread_db_use_events. Do not call
14822 change_inferior_id or new_thread_notify.
14823 (maybe_attach_thread): Update. Do not call new_thread_notify.
14824 (thread_db_init): Set thread_db_use_events. Check use_events.
14825 * utils.c (fatal, warning): Correct message prefix.
14827 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14829 * Makefile.in (clean): Remove new files.
14830 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14831 (powerpc-64.o, powerpc-64.c): New rules.
14832 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14833 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14835 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14837 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14838 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14839 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14840 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14841 (target_regsets): Add AltiVec and SPE register sets.
14842 * configure.ac: Check for AltiVec and SPE.
14843 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14844 (ppc_fill_vrregset, ppc_store_vrregset): New.
14845 (target_regsets): Add AltiVec register set.
14846 * configure: Regenerated.
14848 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14850 * linux-low.c (O_LARGEFILE): Define.
14851 (linux_read_memory): Use /proc/PID/mem.
14852 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14853 * configure, config.in: Regenerated.
14855 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14857 * linux-low.c (linux_wait_for_event): Do not pass signals while
14860 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14862 * win32-low.c (create_process): New.
14863 (win32_create_inferior): Use create_process instead of
14864 CreateProcess. If create_process failed retry appending an ".exe"
14865 suffix. Store the GetLastError result immediatelly after
14866 create_process calls and use it on the call to error.
14868 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14870 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14872 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14874 * configure.ac: Switch license to GPLv3.
14876 2007-08-01 Michael Snyder <msnyder@access-company.com>
14878 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14880 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14882 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14884 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14885 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14886 CloseToolhelp32Snapshot.
14887 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14888 CloseToolhelp32Snapshot.
14890 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14892 * server.c (main): Check for inferior exit before main loop.
14894 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14896 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14897 instead of on tmp_desc.
14899 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14900 Daniel Jacobowitz <dan@codesourcery.com>
14902 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14903 (add_thread): Minor cleanups.
14904 (clear_inferiors): Move lower in the file. Clear the DLL
14906 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14907 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14908 (xml_escape_text): New.
14909 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14911 (handle_v_cont): Report errors.
14912 (gdbserver_version): Update.
14913 (main): Correct size of own_buf. Do not report initial DLL events.
14914 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14915 (unloaded_dll, xml_escape_text): New.
14916 * win32-low.c (enum target_waitkind): Update comments.
14917 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14918 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14919 (win32_EnumProcessModules, win32_GetModuleInformation)
14920 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14921 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14922 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14923 (win32_Module32First, win32_Module32Next, load_toolhelp)
14924 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14925 (get_child_debug_event): Handle DLL events.
14926 (win32_wait): Likewise.
14928 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14930 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14931 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14933 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14935 * win32-low.c (handle_output_debug_string): Ignore event if not
14938 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14940 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14942 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14944 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14946 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14948 * inferiors.c (change_inferior_id): Add comment.
14949 * linux-low.c (check_removed_breakpoint): Add an early
14950 prototype. Improve debug output.
14951 (linux_attach): Doc update.
14952 (linux_detach_one_process, linux_detach): Clean up before releasing
14954 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14955 * linux-low.h (struct process_info): Doc improvement.
14956 * mem-break.c (delete_all_breakpoints): New.
14957 * mem-break.h (delete_all_breakpoints): New prototype.
14958 * thread-db.c (find_first_thread): New.
14959 (thread_db_create_event): Call it instead of
14960 thread_db_find_new_threads. Clean up unused variables.
14961 (maybe_attach_thread): Remove first thread handling.
14962 (thread_db_find_new_threads): Use find_first_thread.
14963 (thread_db_get_tls_address): Likewise.
14965 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14967 * thread-db.c (thread_db_find_new_threads): Add prototype.
14968 (thread_db_create_event): Check for the main thread before adding
14970 (maybe_attach_thread): Only enable event reporting if TID == 0.
14971 (thread_db_get_tls_address): Check for new threads.
14973 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14975 * linux-low.c (linux_create_inferior): Try execv before execvp.
14976 * spu-low.c (spu_create_inferior): Likewise.
14978 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14980 * linux-low.c (linux_create_inferior): Change execv to execvp.
14981 * spu-low.c (spu_create_inferior): Likewies.
14983 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14985 * Makefile.in (clean): Clean new files instead of deleted ones.
14986 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14987 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14989 * configure.srv: Specify XML files and new regformats for MIPS and
14991 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14992 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14993 an entry for the restart register.
14994 (mips_cannot_fetch_register, mips_cannot_store_register)
14995 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14996 register names to match the XML descriptions.
14997 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14998 restart register instead of $0.
15000 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15001 Markus Deuling <deuling@de.ibm.com>
15003 * remote-utils.c (decode_xfer_write): New function.
15004 * server.h (decode_xfer_write): Add prototype.
15005 * server.c (handle_query): Add PACKET_LEN argument. Support
15006 qXfer:spu:read and qXfer:spu:write packets.
15007 (main): Pass packet_len to handle_query.
15008 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15009 * target.h (target_ops): Add qxfer_spu.
15011 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15013 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15014 accessing non-seekable spufs files.
15016 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15018 * server.c (handle_query): Add reply for qC packet.
15020 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15021 Leo Zayas <lerele@champenstudios@com>
15023 * server.h (check_remote_input_interrupt_request): New function.
15024 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15025 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15026 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15027 (check_remote_input_interrupt_request): New function.
15028 * server.h (check_remote_input_interrupt_request): Declare.
15029 * win32-low.c (winapi_DebugBreakProcess,
15030 winapi_GenerateConsoleCtrlEvent): New typedefs.
15031 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15033 (win32_wait): Check for remote interrupt request
15034 with check_remote_input_interrupt_request.
15035 (win32_request_interrupt): New function.
15036 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15038 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15040 * win32-low.c (debug_registers_changed,
15041 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15042 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15043 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15044 (thread_rec): Get context using the low target.
15045 (child_add_thread): Call thread_added on the low target,
15046 which does the same thing.
15048 (do_initial_child_stuff): Remove debug registers references.
15049 Set context using the low target. Resume threads after
15050 setting the contexts.
15051 (child_continue): Remove dead variable. Remove debug
15052 registers references.
15053 (child_fetch_inferior_registers): Go through the low target.
15054 (do_child_store_inferior_registers): Remove.
15055 (child_store_inferior_registers): Go through the low target.
15056 (win32_resume): Remove debug registers references.
15057 Set context using the low target.
15058 (handle_exception): Change return type to void. Don't record
15059 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15060 first chance exception.
15061 (get_child_debug_event): Change return type to void. Remove
15062 goto loop. Always return after waiting for debug event.
15063 (win32_wait): Convert to switch statement. Handle spurious
15066 * win32-i386-low.c (debug_registers_changed,
15067 debug_registers_used): New.
15068 (initial_stuff): Rename to ...
15069 (i386_initial_stuff): ... this. Clear debug registers
15071 (store_debug_registers): Delete.
15072 (i386_get_thread_context): New.
15073 (load_debug_registers): Delete.
15074 (i386_set_thread_context): New.
15075 (i386_thread_added): New.
15076 (single_step): Rename to ...
15077 (i386_single_step): ... this.
15078 (do_fetch_inferior_registers): Rename to ...
15079 (i386_fetch_inferior_register): ... this.
15080 (i386_store_inferior_register): New.
15081 (the_low_target): Adapt to new interface.
15083 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15084 (arm_get_thread_context): New.
15085 (arm_set_thread_context): New.
15087 (do_fetch_inferior_registers): Rename to ...
15088 (arm_fetch_inferior_register): ... this.
15089 (arm_store_inferior_register): New.
15090 (arm_wince_breakpoint): Reimplement as unsigned long.
15091 (arm_wince_breakpoint_len): Define.
15092 (the_low_target): Adapt to new interface.
15094 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15095 load_debug_registers. Add get_thread_context, set_thread_context,
15096 thread_added and store_inferior_register. Rename
15097 fetch_inferior_registers to fetch_inferior_register.
15098 (regptr): Remove declaration.
15100 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15102 * linux-low.c (linux_detach): Change return type to int. Return 0.
15103 * spu-low.c (spu_detach): Likewise.
15105 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15107 * target.h (target_ops): Change return type of detach to int.
15109 (join_inferior): New.
15110 * server.c (main): Don't skip detach support on mingw32.
15111 If the inferior doesn't support detaching return error.
15112 Call join_inferior instead of using waitpid.
15113 * linux-low.c (linux_join): New.
15114 (linux_target_op): Add linux_join.
15115 * spu-low.c (spu_join): New.
15116 (spu_target_ops): Add spu_join.
15117 * win32-low.c (win32_detach): Adapt to new interface.
15118 Reopen current_process_handle before detaching. Issue a child
15119 resume before detaching.
15121 (win32_target_op): Add win32_join.
15123 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15125 * win32-low.c (win32-attach): Fix return value.
15126 * target.h (target_ops): Describe ATTACH return values.
15128 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15130 * win32-low.c (GETPROCADDRESS): Define.
15131 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15132 (winapi_DebugSetProcessKillOnExit): Likewise.
15133 (win32_create_inferior): Force usage of ansi CreateProcessA.
15134 (win32_attach): Use GETPROCADDRESS.
15135 (win32_detach): Likewise.
15137 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15139 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15141 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15143 * win32-low.c: Commit leftover changes from 2007-03-29.
15145 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15147 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15148 fields short instead of int. Add explicit padding.
15149 (i387_cache_to_fsave): Remove unnecessary casts.
15150 (i387_fsave_to_cache): Doc fix.
15151 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15153 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15155 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15156 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15158 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15160 * configure.srv (arm*-*-mingw32ce*): Move near the other
15163 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15165 * configure.ac: Add errno checking.
15166 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15167 sys/file.h and malloc.h.
15168 (AC_CHECK_DECLS): Add perror.
15169 (srv_mingwce): Handle.
15170 * configure.srv (i[34567]86-*-cygwin*): Add
15171 win32-i386-low.o to srv_tgtobj.
15172 (i[34567]86-*-mingw*): Likewise.
15173 (arm*-*-mingw32ce*): Add case.
15174 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15175 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15176 [__MINGW32CE__] (strerror): New function.
15177 [__MINGW32CE__] (errno): Define to GetLastError.
15178 [__MINGW32CE__] (COUNTOF): New macro.
15179 (remote_open): Remove extra close call.
15180 * mem-break.c (delete_breakpoint_at): New function.
15181 * mem-break.h (delete_breakpoint_at): Declare.
15182 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15183 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15184 [USE_WIN32API] (read, write): Add char* casts.
15185 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15186 * server.h: Include wincecompat.h on Windows CE.
15187 [HAVE_ERRNO_H]: Check.
15188 (perror): Declare if not declared.
15189 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15190 (perror_with_name): Remove errno declaration.
15191 * wincecompat.h: New.
15192 * wincecompat.c: New.
15193 * win32-low.h: New.
15194 * win32-arm-low.c: New.
15195 * win32-i386-low.c: New.
15196 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15197 (OUTMSG2): Make it safe.
15199 (COUNTOF): New macro.
15200 (NUM_REGS): Get it from the low target.
15201 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15202 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15203 (thread_rec): Let low target handle debug registers.
15204 (child_add_thread): Likewise.
15205 (child_init_thread_list): Likewise.
15206 (continue_one_thread): Likewise.
15208 (do_child_fetch_inferior_registers): Move to ...
15209 * win32-i386-low.c: ... here, and rename to ...
15210 (do_fetch_inferior_registers): ... this.
15211 * win32-low.c (child_fetch_inferior_registers):
15212 Go through the low target.
15213 (do_child_store_inferior_registers): Use regptr.
15214 (strwinerror): New function.
15215 (win32_create_inferior): Handle Windows CE.
15216 Use strwinerror instead of strerror on Windows error
15217 codes. Add program to the error output.
15218 Don't close the main thread handle on Windows CE.
15219 (win32_attach): Use coredll.dll on Windows CE.
15220 (win32_kill): Close current process and current
15222 (win32_detach): Use coredll.dll on Windows CE.
15223 (win32_resume): Let low target handle debug registers, and
15225 (handle_exception): Add/Remove initial breakpoint. Avoid
15226 non-existant WSTOPSIG on Windows CE.
15227 (win32_read_inferior_memory): Cast to remove warning.
15228 (win32_arch_string): Go through the low target.
15229 (initialize_low): Call set_breakpoint_data with the low
15230 target's breakpoint.
15231 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15232 FOP_REGNUM, mappings): Move to ...
15233 * win32-i386-low.c: ... here.
15234 * win32-low.c (win32_thread_info): Move to ...
15235 * win32-low.h: ... here.
15236 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15237 win32-arm-low.c and wincecompat.c.
15238 (all:): Add $EXEEXT.
15239 (install-only:): Likewise.
15240 (gdbserver:): Likewise.
15241 (gdbreplay:): Likewise.
15242 * config.in: Regenerate.
15243 * configure: Regenerate.
15245 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15247 * win32-low.c: Rename typedef thread_info to
15248 win32_thread_info throughout.
15250 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15252 * win32-i386-low.c: Rename to ...
15253 * win32-low.c: ... this.
15254 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15255 * Makefile.in: Likewise.
15257 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15259 * remote-utils.c (monitor_output): Constify msg parameter.
15260 * server.h (monitor_output): Likewise.
15261 * win32-i386-low.c (handle_output_debug_string): New.
15262 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15263 handle_output_debug_string.
15264 (get_child_debug_event): Likewise.
15266 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15268 * server.c (main): Correct strtoul check.
15270 2007-03-27 Jon Ringle <jon@ringle.org>
15272 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15274 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15276 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15278 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15280 * terminal.h: Check HAVE_SGTTY_H.
15282 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15284 * remote-utils.c (remote_open): Print out the assigned port number.
15286 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15288 * remote-utils.c (monitor_output): New function.
15289 * server.c (debug_threads): Define here.
15290 (monitor_show_help): New function.
15291 (handle_query): Handle qRcmd.
15292 (main): Do not handle 'd' packet.
15293 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15294 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15297 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15299 * Makefile.in (EXEEXT): New.
15300 (clean): Use $(EXEEXT).
15302 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15304 * target.h (target_ops): Rename send_signal to request_interrupt,
15305 and remove enum target_signal parameter.
15306 * linux-low.c (linux_request_interrupt): Rename from
15307 linux_send_signal, and always send SIGINT.
15308 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15309 and always send SIGINT.
15310 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15312 (input_interrupt): Likewise.
15314 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15316 * server.c (get_features_xml): Check if target implemented
15318 * win32-i386-low.c (win32_arch_string): New.
15319 (win32_target_ops): Add win32_arch_string as arch_string member.
15321 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15323 * spu-low.c (spu_arch_string): New.
15324 (spu_target_ops): Add spu_arch_string.
15326 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15328 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15329 * configure.ac: Do not check for terminal.h.
15330 * configure, config.in: Regenerated.
15332 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15334 * Makefile.in (OBS): Add $(XML_BUILTIN).
15335 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15337 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15338 (arm-with-iwmmxt.c): New.
15339 * config.in, configure: Regenerate.
15340 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15341 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15342 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15343 (arm*-*-linux*): Add iWMMXt and regset support.
15344 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15345 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15346 (arm_store_wmmxregset, target_regsets): New.
15347 * server.c (get_features_xml): Take annex argument. Check builtin
15349 (handle_query): Handle multiple annexes.
15351 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15353 * remote-utils.c [USE_WIN32API] (read, write): Define.
15354 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15357 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15359 * linux-i386-low.c (the_low_target): Set arch_string.
15360 * linux-x86-64-low.c (the_low_target): Likewise.
15361 * linux-low.c (linux_arch_string): New.
15362 (linux_target_ops): Add it.
15363 * linux-low.h (struct linux_target_ops): Add arch_string.
15364 * server.c (write_qxfer_response): Use const void * for DATA.
15365 (get_features_xml): New.
15366 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15367 * target.h (struct target_ops): Add arch_string method.
15369 2007-01-03 Denis Pilat <denis.pilat@st.com>
15370 Daniel Jacobowitz <dan@codesourcery.com>
15372 * linux-low.c (linux_kill): Handle being called with no threads.
15373 * win32-i386-low.c (win32_kill): Likewise.
15374 (get_child_debug_event): Clear current_process_handle.
15376 2006-12-30 Denis PILAT <denis.pilat@st.com>
15377 Daniel Jacobowitz <dan@codesourcery.com>
15379 * remote-utils.c (remote_open): Check the type of specified
15380 serial port devices before opening them.
15381 * server.c (main): Kill the inferior if an error occurs during
15382 the first remote_open.
15384 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15386 * README: Update supported targets.
15388 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15390 * Makefile.in (clean): Remove reg-mips64.c.
15391 (reg-mips64.c, reg-mips64.o): New rules.
15392 * configure.srv: Handle mips64. Include regset support for mips.
15393 * linux-mips-low.c (union mips_register): New.
15394 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15395 (mips_breakpoint, mips_breakpoint_at): Use int.
15396 (mips_collect_register, mips_supply_register)
15397 (mips_collect_register_32bit, mips_supply_register_32bit)
15398 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15399 (mips_store_fpregset, target_regsets): New.
15400 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15402 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15404 * configure.srv: Add target "spu*-*-*".
15405 * Makefile.in (clean): Remove reg-spu.c.
15406 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15407 * spu-low.c: New file.
15409 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15411 * configure.ac: Correct td_thr_tls_get_addr test.
15412 * configure: Regenerated.
15414 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15416 * linux-low.c (linux_wait_for_event): Reformat. Use the
15417 pass_signals array.
15418 * remote-utils.c (decode_address_to_semicolon): New.
15419 * server.c (pass_signals, handle_general_set): New.
15420 (handle_query): Mention QPassSignals for qSupported.
15421 (main): Call handle_general_set.
15422 * server.h (pass_signals, decode_address_to_semicolon): New.
15424 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15426 * server.c (handle_query): Correct error handling for read_auxv.
15428 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15430 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15431 and srv_linux_thread_db to yes.
15432 * linux-s390-low.c (s390_fill_gregset): New function.
15433 (target_regsets): Define data structure.
15435 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15437 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15438 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15439 * config.in, configure: Regenerated.
15440 * inferiors.c (gdb_id_to_thread): New function.
15441 (gdb_id_to_thread_id): Use it.
15442 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15443 * linux-low.h (struct process_info): Add th member.
15444 (thread_db_get_tls_address): New prototype.
15445 * remote-utils.c (decode_address): Make non-static.
15446 * server.c (handle_query): Handle qGetTLSAddr.
15447 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15448 * target.h (struct target_ops): Add get_tls_address.
15449 * thread-db.c (maybe_attach_thread): Save the thread handle.
15450 (thread_db_get_tls_address): New.
15452 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15454 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15455 (linux_resume_one_process): Take a siginfo_t *. Update all
15456 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15457 (struct pending_signals): Add a siginfo_t.
15458 (linux_wait_for_process): Always set last_status.
15459 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15460 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15461 * linux-low.h (struct process_info): Add last_status.
15463 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15465 * remote-utils.c (try_rle): New function.
15466 (putpkt_binary): Use it.
15468 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15470 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15471 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15472 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15473 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15474 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15477 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15479 * server.c (terminal_fd): New variable.
15480 (old_foreground_pgrp): Likewise.
15481 (restore_old_foreground_pgrp): New function.
15482 (start_inferior): Record the terminal file descriptor in terminal_fd
15483 and its original foreground group in old_foreground_pgrp. Register
15484 restore_old_foreground_pgrp with atexit().
15486 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15488 * server.c (handle_query): Correct qPart to qXfer.
15490 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15492 * configure.ac: Check for more headers which are missing on
15493 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15494 * configure.srv: Add Cygwin and mingw32.
15495 * remote-utils.c: Don't include headers unconditionally which
15496 are missing on mingw32. Include <winsock.h> for mingw32.
15497 (remote_open): Adjust for mingw32 support. Flush
15498 standard error after writing to it.
15499 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15500 (unblock_async_io, enable_async_io, disable_async_io)
15501 (readchar, getpkt): Update for Winsock support.
15502 (prepare_resume_reply): Expect a protocol signal number.
15503 * server.c: Disable <sys/wait.h> on mingw32.
15504 (start_inferior): Adjust for mingw32 support. Flush
15505 standard error after writing to it.
15506 (attach_inferior): Likewise. Use protocol signal
15508 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15510 * win32-i386-low.c: New file.
15511 * Makefile.in (XM_CLIBS): Set.
15512 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15513 (win32-i386-low.o): New dependency rule.
15514 * linux-low.c (linux_wait): Use target signal numbers.
15515 * target.h (struct target_ops): Doc fix.
15516 * server.h (target_signal_to_name): New prototype.
15517 * gdbreplay.c: Don't include headers unconditionally which
15518 are missing on mingw32. Include <winsock.h> for mingw32.
15519 (remote_close, remote_open): Adjust for Winsock support.
15520 * configure, config.in: Regenerated.
15522 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15524 * server.c (decode_xfer_read, write_qxfer_response): New.
15525 (handle_query): Take a packet length argument. Handle
15526 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15527 the qSupported response.
15528 (main): Update call to handle_query.
15530 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15532 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15533 (putpkt_binary): Renamed from putpkt and adjusted for binary
15535 (putpkt): New wrapper for putpkt_binary.
15536 (readchar): Don't mask off the high bit.
15537 (decode_X_packet): New function.
15538 * server.c (main): Call putpkt_binary if a handler sets the packet
15539 length. Save the length of the incoming packet. Handle 'X'.
15540 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15542 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15544 * server.c (handle_query): Handle qSupported.
15546 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15548 * remote-utils.c (all_symbols_looked_up): New variable.
15549 (look_up_one_symbol): Check it.
15550 * server.h (look_up_one_symbol): New declaration.
15551 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15553 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15555 * Makefile.in (linux-arm-low.o): Update dependencies.
15556 * linux-arm-low.c: Include "gdb_proc_service.h".
15557 (PTRACE_GET_THREAD_AREA): Define.
15558 (ps_get_thread_area): New function.
15560 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15562 * configure.srv (m68k*-*-uclinux*): New target.
15563 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15564 (linux_resume_one_process): Remove extraneous cast.
15565 (linux_read_offsets): New.
15566 (linux_target_op): Add linux_read_offsets on mmuless systems.
15567 * server.c (handle_query): Add qOffsets logic.
15568 * target.h (struct target_ops): Add read_offsets.
15570 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15572 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15573 (PTRACE_GET_THREAD_AREA): Define.
15574 (ps_get_thread_area): New function.
15575 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15576 (linux-x86-64-low.o): Update.
15578 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15580 * configure.ac: Remove checks for prfpregset_t.
15581 * gdb_proc_service.h: New file.
15582 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15583 new "gdb_proc_service.h".
15584 * proc-service.c: Likewise.
15585 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15586 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15587 * Makefile.in (gdb_proc_service_h): Updated.
15588 * configure, config.in: Regenerated.
15590 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15592 * remote-utils.c (prepare_resume_reply): Move declaration
15593 of gdb_id_from_wait to the top of the block.
15595 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15597 * linux-low.c (regsets_store_inferior_registers): Read the regset
15598 from the target before filling it.
15600 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15602 * server.c (attach_inferior): Return SIGTRAP for a successful
15605 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15607 * Makefile.in (OBS): Add version.o.
15608 (STAGESTUFF): Delete.
15609 (version.o): Add dependencies.
15610 (version.c): Replace rule.
15611 (clean): Remove version.c.
15612 * server.c (gdbserver_version): New.
15613 (gdbserver_usage): Use printf.
15614 (main): Handle --version and --help.
15615 * server.h (version, host_name): Add declarations.
15617 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15629 * linux-x86-64-low.c:
15631 * linux-s390-low.c:
15632 * linux-ppc64-low.c:
15634 * linux-mips-low.c:
15635 * linux-m68k-low.c:
15636 * linux-m32r-low.c:
15639 * linux-ia64-low.c:
15640 * linux-i386-low.c:
15641 * linux-crisv32-low.c:
15653 * gdbserver.1: Add (C) after Copyright. Update the FSF
15656 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15658 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15659 (arm_breakpoint_at): Recognize both breakpoints.
15660 (the_low_target): Use the correct breakpoint instruction.
15662 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15664 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15665 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15666 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15667 (the_low_target): Update.
15669 2005-10-25 Andreas Schwab <schwab@suse.de>
15671 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15673 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15674 (ia64_num_regs): Reduce to 462.
15676 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15678 * acinclude.m4: Correct quoting.
15679 * aclocal.m4: Regenerated.
15681 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15682 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15683 (thread_db_init): Call thread_db_err_str.
15684 * configure.ac: Check for TD_VERSION.
15685 * config.in, configure: Regenerated.
15687 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15689 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15691 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15693 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15694 is not available. Define HAVE_PTRACE_GETREGS if it is.
15695 * config.in, configure: Regenerated.
15696 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15697 * linux-i386-low.c, linux-m68k-low.c: Update to use
15698 HAVE_PTRACE_GETREGS.
15699 * linux-low.c (regsets_fetch_inferior_registers)
15700 (regsets_store_inferior_registers): Only return 0 if we processed
15702 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15703 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15705 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15707 * inferiors.c (struct thread_info): Add gdb_id.
15708 (add_thread): Add gdb_id argument.
15709 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15710 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15711 calls to add_thread.
15712 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15713 * server.c (handle_query): Use thread_to_gdb_id.
15714 (handle_v_cont, main): Use gdb_id_to_thread_id.
15715 * server.h (add_thread): Update prototype.
15716 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15719 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15721 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15722 left-padded registers.
15723 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15724 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15726 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15728 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15729 * configure: Regenerate.
15730 * config.in: Regenerate.
15731 * server.h (NEED_DECLARATION_STRERROR):
15732 Replace with !HAVE_DECL_STRERROR.
15734 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15736 * linux-low.c (linux_wait, linux_send_signal): Don't test
15737 an unsigned long variable for > 0 if it could be MAX_ULONG.
15738 * server.c (myresume): Likewise.
15739 * target.c (set_desired_inferior): Likewise.
15741 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15743 * configure.ac: Simplify and improve check for socklen_t.
15744 * configure, config.in: Regenerate.
15746 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15748 * acconfig.h: Remove.
15749 * configure.ac: Add a test for socklen_t. Use three-argument
15750 AC_DEFINE throughout.
15751 * config.in: Regenerated using autoheader 2.59.
15752 * configure: Regenerated.
15754 * gdbreplay.c (socklen_t): Provide a default.
15755 (remote_open): Use socklen_t.
15756 * remote-utils.c (socklen_t): Provide a default.
15757 (remote_open): Use socklen_t.
15758 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15761 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15763 * linux-low.c (linux_read_memory, linux_write_memory)
15764 (linux_read_auxv): Likewise.
15765 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15766 (check_mem_write): Likewise.
15767 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15769 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15770 (registers_from_string, register_data): Likewise.
15771 * server.c (handle_query, main): Likewise.
15772 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15773 (decode_M_packet): Likewise.
15774 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15775 * target.h (struct target_ops): Update read_memory, write_memory,
15777 (read_inferior_memory, write_inferior_memory): Update.
15778 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15779 to unsigned char *.
15780 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15781 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15782 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15783 linux-s390-low.c, linux-sh-low.c: Update for changes in
15784 read_inferior_memory and the_low_target->breakpoint.
15786 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15788 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15789 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15790 * configure.srv: Add powerpc64-*-linux*.
15791 * linux-ppc64-low.c: New file.
15793 2005-05-23 Orjan Friberg <orjanf@axis.com>
15795 * linux-cris-low.c: New file with support for CRIS.
15796 * linux-crisv32-low.c: Ditto for CRISv32.
15797 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15798 (clean): Add reg-cris.c and reg-crisv32.c.
15799 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15800 reg-crisv32.o, and reg-crisv32.c to make rules.
15801 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15802 recognized targets.
15804 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15806 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15807 of sizeof (PTRACE_XFER_TYPE).
15808 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15810 2005-05-12 Orjan Friberg <orjanf@axis.com>
15812 * target.h (struct target_ops): Add insert_watchpoint,
15813 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15814 pointers for hardware watchpoint support.
15815 * linux-low.h (struct linux_target_ops): Ditto.
15816 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15817 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15818 to linux_target_ops.
15819 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15821 * server.c (main): Recognize 'Z' and 'z' packets.
15823 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15825 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15826 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15827 (the_low_target): Add new members.
15829 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15831 * proc-service.c (ps_lgetregs): Search all_processes instead of
15834 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15836 * server.c (start_inferior): Change return type to int.
15837 (attach_inferior): Change sigptr to int *.
15838 (handle_v_cont, handle_v_requests): Change signal to int *.
15839 (main): Change signal to int.
15841 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15843 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15844 * configure.srv: Add m32r*-*-linux*.
15845 * linux-m32r-low.c: New file.
15847 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15849 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15851 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15853 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15854 Take unsigned long arguments for PIDs.
15855 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15856 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15857 (wait_for_sigstop, linux_resume_one_process)
15858 (regsets_fetch_inferior_registers, linux_send_signal)
15859 (linux_read_auxv): Likewise. Update the types of variables holding
15860 PIDs. Update format string specifiers.
15861 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15862 * remote-utils.c (prepare_resume_reply): Likewise.
15863 * server.c (cont_thread, general_thread, step_thread)
15864 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15866 (handle_query): Update format specifiers.
15867 (handle_v_cont, main): Use strtoul for thread IDs.
15868 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15869 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15870 (general_thread, step_thread, thread_from_wait)
15871 (old_thread_from_wait): Update.
15872 * target.h (struct thread_resume): Use unsigned long for THREAD.
15873 (struct target_ops): Use unsigned long for arguments to attach and
15876 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15878 * acinclude.m4: Include bfd/bfd.m4 directly.
15879 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15880 <agriffis@toolchain.org>.
15881 * aclocal.m4, configure: Regenerated.
15883 2005-01-07 Andrew Cagney <cagney@gnu.org>
15885 * configure.ac: Rename configure.in, require autoconf 2.59.
15886 * configure: Re-generate.
15888 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15890 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15891 LIBS when finished.
15892 * aclocal.m4: Regenerated.
15893 * configure: Regenerated.
15895 2004-11-21 Andreas Schwab <schwab@suse.de>
15897 * linux-m68k-low.c (m68k_num_gregs): Define.
15898 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15899 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15900 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15901 (m68k_breakpoint_at): New. Add to the_low_target.
15903 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15904 srv_linux_thread_db to yes.
15906 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15908 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15909 (ARCH_SET_FS): Likewise.
15910 (ARCH_GET_FS): Likewise.
15911 (ARCH_GET_GS): Likewise.
15913 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15915 * linux-i386-low.c (ps_get_thread_area): New.
15916 * linux-x86-64-low.c (ps_get_thread_area): New.
15917 * linux-low.c: Include <sys/syscall.h>.
15918 (linux_kill_one_process): Don't kill the first thread here.
15919 (linux_kill): Kill the first thread here.
15920 (kill_lwp): New function.
15921 (send_sigstop, linux_send_signal): Use it.
15922 * proc-service.c: Clean up #ifdefs.
15923 (fpregset_info): Delete.
15924 (ps_lgetregs): Update and enable implementation.
15925 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15927 * remote-utils.c (struct sym_cache, symbol_cache): New.
15928 (input_interrupt): Print a clearer message.
15929 (async_io_enabled): New variable.
15930 (enable_async_io, disable_async_io): Use it. Update comments.
15931 (look_up_one_symbol): Use the symbol cache.
15932 * thread-db.c (thread_db_look_up_symbols): New function.
15933 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15935 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15937 * configure.in: Test for -rdynamic.
15938 * configure: Regenerated.
15939 * Makefile (INTERNAL_LDFLAGS): New.
15940 (gdbserver, gdbreplay): Use it.
15942 2004-09-02 Andrew Cagney <cagney@gnu.org>
15944 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15946 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15948 * linux-low.c (linux_wait): Clear all_processes list also.
15950 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15952 * linux-low.c: Include <errno.h>. Remove extern declaration of
15955 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15957 * gdbreplay.c, server.h, utils.c: Update copyright years.
15959 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15961 * server.c (main): Print child status or termination signal from
15962 variable 'signal', not 'sig'.
15964 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15966 * linux-low.c (linux_read_memory): Change return type to
15967 int. Check for and return error from ptrace().
15968 * target.c (read_inferior_memory): Change return type to int. Pass
15969 back return status from the_target->read_memory().
15970 * target.h (struct target_ops): Adapt *read_memory() prototype.
15972 (read_inferior_memory): Adapt prototype.
15973 * server.c (main): Return an error packet if
15974 read_inferior_memory() returns an error.
15976 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15978 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15979 Unify with other clean targets.
15981 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15983 * server.c (handle_v_cont): Call set_desired_inferior.
15985 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15987 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15989 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15991 * linux-low.c (linux_wait): Unblock async I/O.
15992 (linux_resume): Block and enable async I/O.
15993 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15994 * server.h (block_async_io, unblock_async_io): Add prototypes.
15996 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15998 * remote-utils.c (remote_open): Print a status notice after
15999 opening a TCP port.
16000 * server.c (attach_inferior): Print a status notice after
16003 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16005 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16007 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16009 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16011 * server.c, target.h: Update copyright years.
16013 2004-02-25 Roland McGrath <roland@redhat.com>
16015 * target.h (struct target_ops): New member `read_auxv'.
16016 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16017 * linux-low.c (linux_read_auxv): New function.
16018 (linux_target_ops): Initialize `read_auxv' member to that.
16020 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16022 Committed by Jim Blandy <jimb@redhat.com>.
16024 * linux-s390-low.c (s390_num_regs): Update.
16025 (s390_regmap): Remove control registers. Use __s390x__ predefine
16026 instead of GPR_SIZE to distiguish s390 and s390x targets.
16028 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16030 * linux-low.c: Update copyright year.
16031 (check_removed_breakpoint): Clear pending_is_breakpoint.
16032 (linux_set_resume_request, linux_queue_one_thread)
16033 (resume_status_pending_p): New functions.
16034 (linux_continue_one_thread): Use process->resume.
16035 (linux_resume): Only resume threads if there are no pending events.
16036 * linux-low.h (struct process_info): Add resume request
16039 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16041 * regcache.c (new_register_cache): Clear the allocated register
16042 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16044 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16046 * linux-low.c (linux_resume): Take a struct thread_resume *
16048 (linux_wait): Update call.
16049 (resume_ptr): New static variable.
16050 (linux_continue_one_thread): Renamed from
16051 linux_continue_one_process. Use resume_ptr.
16052 (linux_resume): Use linux_continue_one_thread.
16053 * server.c (handle_v_cont, handle_v_requests): New functions.
16054 (myresume): New function.
16055 (main): Handle 'v' case.
16056 * target.h (struct thread_resume): New type.
16057 (struct target_ops): Change argument of "resume" to struct
16059 (myresume): Delete macro.
16061 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16063 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16064 (uninstall): Support DESTDIR.
16066 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16068 * configure.srv: Add xscale*linux copy of arm*linux entry.
16070 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16072 * linux-arm-low.c (arm_reinsert_addr): New function.
16073 (the_low_target): Add arm_reinsert_addr.
16075 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16077 * mem-break.c: Remove whitespace at end of file.
16079 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16081 * configure.in: Check whether we need to prototype strerror.
16082 * server.h: Optionally prototype strerror.
16083 * gdbreplay.c (perror_with_name): Use strerror.
16084 * linux-low.c (linux_attach_lwp): Use strerror.
16085 * utils.c (perror_with_name): Use strerror.
16086 * config.in, configure: Regenerated.
16088 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16090 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16091 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16093 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16095 * Makefile.in (SFILES): Update.
16096 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16097 low-sun3.c: Remove files.
16099 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16101 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16102 (linux_detach_one_process, linux_detach): New functions.
16103 (linux_target_ops): Add linux_detach.
16104 * server.c (main): Handle 'D' packet.
16105 * target.h (struct target_ops): Add "detach" member.
16106 (detach_inferior): Define.
16108 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16110 From Kelley Cook <kelleycook@wideopenwest.com>:
16111 * configure.srv: Accept i[34567]86 variants.
16113 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16115 * linux-low.c (linux_wait_for_event): Correct comment typos.
16116 (linux_resume_one_process): Call check_removed_breakpoint.
16117 (linux_send_signal): New function.
16118 (linux_target_ops): Add linux_send_signal.
16119 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16121 * target.h (struct target_ops): Add send_signal.
16123 2003-05-29 Jim Blandy <jimb@redhat.com>
16125 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16126 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16127 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16128 away part of the register's value.
16130 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16132 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16133 (linux_wait_for_event, linux_init_signals): Likewise.
16135 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16137 * configure.in: Check for stdlib.h.
16138 * configure: Regenerated.
16139 * config.in: Regenerated.
16141 2003-01-04 Andreas Schwab <schwab@suse.de>
16143 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16145 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16147 * Makefile.in: Remove obsolete code.
16149 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16151 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16152 defined(PT_FPR0_HI).
16154 2002-11-17 Stuart Hughes <seh@zee2.com>
16156 * linux-arm-low.c (arm_num_regs): Increase.
16157 (arm_regmap): Include status register.
16159 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16161 * linux-low.c (register_addr): Remove incorrect -1 check.
16163 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16165 * linux-low.c (linux_create_inferior): Call setpgid. Return
16167 (unstopped_p, linux_signal_pid): Remove.
16168 (linux_target_ops): Remove linux_signal_pid.
16169 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16170 global instead of target method.
16171 * target.h (struct target_ops): Remove signal_pid. Update comment
16172 for create_inferior.
16173 * server.c (signal_pid): New variable.
16174 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16175 gdbserver. Set the child to be the foreground process group.
16176 (attach_inferior): Set signal_pid.
16178 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16180 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16182 2002-08-20 Jim Blandy <jimb@redhat.com>
16184 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16187 2002-08-01 Andrew Cagney <cagney@redhat.com>
16189 * Makefile.in: Make chill references obsolete.
16191 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16193 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16194 * configure: Regenerate.
16195 * config.in: Regenerate.
16197 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16199 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16200 (perror_with_name, remote_close, remote_open, expect, play): Static.
16202 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16204 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16205 byte offsets instead of an array of indexes.
16206 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16208 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16210 * regcache.c: Add comment.
16212 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16214 * thread-db.c: New file.
16215 * proc-service.c: New file.
16216 * acinclude.m4: New file.
16217 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16218 proc-service.o, and thread-db.o.
16219 (linux-low.o): Add USE_THREAD_DB.
16220 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16221 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16222 * aclocal.m4: Regenerated.
16223 * config.in: Regenerated.
16224 * configure: Regenerated.
16225 * configure.in: Check for proc_service.h, sys/procfs.h,
16226 thread_db.h, and linux/elf.h headrs.
16227 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16228 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16229 Check for -lthread_db and thread support.
16230 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16231 PowerPC, and SuperH.
16232 * i387-fp.c: Constify arguments.
16233 * i387-fp.h: Likewise.
16234 * inferiors.c: (struct thread_info): Renamed from
16235 `struct inferior_info'. Remove PID member. Use generic inferior
16236 list header. All uses updated.
16237 (inferiors, signal_pid): Removed.
16238 (all_threads): New variable.
16239 (get_thread): Define.
16240 (add_inferior_to_list): New function.
16241 (for_each_inferior): New function.
16242 (change_inferior_id): New function.
16243 (add_inferior): Removed.
16244 (remove_inferior): New function.
16245 (add_thread): New function.
16246 (free_one_thread): New function.
16247 (remove_thread): New function.
16248 (clear_inferiors): Use for_each_inferior and free_one_thread.
16249 (find_inferior): New function.
16250 (find_inferior_id): New function.
16251 (inferior_target_data): Update argument type.
16252 (set_inferior_target_data): Likewise.
16253 (inferior_regcache_data): Likewise.
16254 (set_inferior_regcache_data): Likewise.
16255 * linux-low.c (linux_bp_reinsert): Remove.
16256 (all_processes, stopping_threads, using_thrads)
16257 (struct pending_signals, debug_threads, pid_of): New.
16258 (inferior_pid): Replace with macro.
16259 (struct inferior_linux_data): Remove.
16260 (get_stop_pc, add_process): New functions.
16261 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16262 Use add_process and add_thread.
16263 (linux_attach_lwp): New function, based on old linux_attach. Use
16264 add_process and add_thread. Set stop_expected for new threads.
16265 (linux_attach): New function.
16266 (linux_kill_one_process): New function.
16267 (linux_kill): Kill all LWPs.
16268 (linux_thread_alive): Use find_inferior_id.
16269 (check_removed_breakpoints, status_pending_p): New functions.
16270 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16271 Update. Use WNOHANG. Wait for cloned processes also. Update process
16272 struct for the found process.
16273 (linux_wait_for_event): New function.
16274 (linux_wait): Use it. Support LWPs.
16275 (send_sigstop, wait_for_sigstop, stop_all_processes)
16276 (linux_resume_one_process, linux_continue_one_process): New functions.
16277 (linux_resume): Support LWPs.
16278 (REGISTER_RAW_SIZE): Remove.
16279 (fetch_register): Use register_size instead. Call supply_register.
16280 (usr_store_inferior_registers): Likewise. Call collect_register.
16281 Fix recursive case.
16282 (regsets_fetch_inferior_registers): Improve error message.
16283 (regsets_store_inferior_registers): Add debugging.
16284 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16285 (unstopped_p, linux_signal_pid): New functions.
16286 (linux_target_ops): Add linux_signal_pid.
16287 (linux_init_signals): New function.
16288 (initialize_low): Call it. Initialize using_threads.
16289 * regcache.c (inferior_regcache_data): Add valid
16291 (get_regcache): Fetch registers lazily. Add fetch argument
16292 and update all callers.
16293 (regcache_invalidate_one, regcache_invalidate): New
16295 (new_register_cache): Renamed from create_register_cache.
16296 Return the new regcache.
16297 (free_register_cache): Change argument to a void *.
16298 (registers_to_string, registers_from_string): Call get_regcache
16299 with fetch flag set.
16300 (register_data): Make static. Pass fetch flag to get_regcache.
16301 (supply_register): Call get_regcache with fetch flag clear.
16302 (collect_register): Call get_regcache with fetch flag set.
16303 (collect_register_as_string): New function.
16304 * regcache.h: Update.
16305 * remote-utils.c (putpkt): Flush after debug output and use
16307 Handle input interrupts while waiting for an ACK.
16308 (input_interrupt): Use signal_pid method.
16309 (getpkt): Flush after debug output and use stderr.
16310 (outreg): Use collect_register_as_string.
16311 (new_thread_notify, dead_thread_notify): New functions.
16312 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16313 and general_thread.
16314 (look_up_one_symbol): Flush after debug output.
16315 * server.c (step_thread, server_waiting): New variables.
16316 (start_inferior): Don't use signal_pid. Update call to mywait.
16317 (attach_inferior): Update call to mywait.
16318 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16319 (main): Don't fetch/store registers explicitly. Use
16320 set_desired_inferior. Support proposed ``Hs'' packet. Update
16322 * server.h: Update.
16323 (struct inferior_list, struct_inferior_list_entry): New.
16324 * target.c (set_desired_inferior): New.
16325 (write_inferior_memory): Constify.
16326 (mywait): New function.
16327 * target.h: Update.
16328 (struct target_ops): New signal_pid method.
16329 (mywait): Removed macro, added prototype.
16331 * linux-low.h (regset_func): Removed.
16332 (regset_fill_func, regset_store_func): New.
16333 (enum regset_type): New.
16334 (struct regset_info): Add type field. Use new operation types.
16335 (struct linux_target_ops): stop_pc renamed to get_pc.
16336 Add decr_pc_after_break and breakpoint_at.
16337 (get_process, get_thread_proess, get_process_thread)
16338 (strut process_info, all_processes, linux_attach_lwp)
16339 (thread_db_init): New.
16341 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16342 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16343 (the_low_target): Add new members.
16344 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16345 (i386_store_fpxregset): Constify.
16346 (target_regsets): Add new kind identifier.
16347 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16348 (i386_set_pc): Add debugging.
16349 (i386_breakpoint_at): New function.
16350 (the_low_target): Add new members.
16351 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16352 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16353 (mips_breakpoint_at): New.
16354 (the_low_target): Add new members.
16355 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16356 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16357 (the_low_target): Add new members.
16358 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16359 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16360 (the_low_target): Add new members.
16361 * linux-x86-64-low.c (target_regsets): Add new kind
16364 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16366 From Martin Pool <mbp@samba.org>:
16367 * server.c (gdbserver_usage): New function.
16370 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16372 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16373 stop_at -> stop_pc.
16375 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16377 * Makefile.in: Remove obsolete code.
16379 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16381 * linux-low.c (regsets_fetch_inferior_registers),
16382 (regsets_store_inferior_registers): Removed cast to int from
16384 * regcache.h: Added declaration of struct inferior_info.
16386 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16388 * inferiors.c (struct inferior_info): Add regcache_data.
16389 (add_inferior): Call create_register_cache.
16390 (clear_inferiors): Call free_register_cache.
16391 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16392 * regcache.c (struct inferior_regcache_data): New.
16393 (registers): Remove.
16394 (get_regcache): New function.
16395 (create_register_cache, free_register_cache): New functions.
16396 (set_register_cache): Don't initialize the register cache here.
16397 (registers_to_string, registers_from_string, register_data): Call
16399 * regcache.h: Add prototypes.
16400 * server.h: Likewise.
16402 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16404 * mem-break.c: New file.
16405 * mem-break.h: New file.
16406 * Makefile.in: Add mem-break.o rule; update server.h
16408 * inferiors.c (struct inferior_info): Add target_data
16410 (clear_inferiors): Free target_data member if set.
16411 (inferior_target_data, set_inferior_target_data): New functions.
16412 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16413 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16414 * linux-low.c (linux_bp_reinsert): New variable.
16415 (struct inferior_linux_data): New.
16416 (linux_create_inferior): Use set_inferior_target_data.
16417 (linux_attach): Likewise. Call add_inferior.
16418 (linux_wait_for_one_inferior): New function.
16419 (linux_wait): Call it.
16420 (linux_write_memory): Add const.
16421 (initialize_low): Call set_breakpoint_data.
16422 * linux-low.h (struct linux_target_ops): Add breakpoint
16424 * server.c (attach_inferior): Remove extra add_inferior
16426 * server.h: Include mem-break.h. Update inferior.c
16428 * target.c (read_inferior_memory)
16429 (write_inferior_memory): New functions.
16430 * target.h (read_inferior_memory)
16431 (write_inferior_memory): Change macros to prototypes.
16432 (struct target_ops): Update comments. Add const to write_memory
16435 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16437 * linux-low.c (usr_store_inferior_registers): Support
16438 registers which are allowed to fail to store.
16439 * linux-low.h (linux_target_ops): Likewise.
16440 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16441 (ppc_cannot_store_register): FPSCR may not be storable.
16443 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16445 * server.h: Include <string.h> if HAVE_STRING_H.
16446 * ChangeLog: Correct paths in last ChangeLog entry.
16448 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16450 * linux-low.h: Remove obsolete prototypes.
16451 (struct linux_target_ops): New.
16452 (extern the_low_target): New.
16453 * linux-low.c (num_regs, regmap): Remove declarations.
16454 (register_addr): Use the_low_target explicitly.
16455 (fetch_register): Likewise.
16456 (usr_fetch_inferior_registers): Likewise.
16457 (usr_store_inferior_registers): Likewise.
16458 * linux-arm-low.c (num_regs): Remove.
16459 (arm_num_regs): Define.
16460 (arm_regmap): Renamed from regmap, made static.
16461 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16463 (arm_cannot_store_register): Renamed from cannot_store_register,
16465 (the_low_target): New.
16466 * linux-i386-low.c (num_regs): Remove.
16467 (i386_num_regs): Define.
16468 (i386_regmap): Renamed from regmap, made static.
16469 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16471 (i386_cannot_store_register): Renamed from cannot_store_register,
16473 (the_low_target): New.
16474 * linux-ia64-low.c (num_regs): Remove.
16475 (ia64_num_regs): Define.
16476 (ia64_regmap): Renamed from regmap, made static.
16477 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16479 (ia64_cannot_store_register): Renamed from cannot_store_register,
16481 (the_low_target): New.
16482 * linux-m68k-low.c (num_regs): Remove.
16483 (m68k_num_regs): Define.
16484 (m68k_regmap): Renamed from regmap, made static.
16485 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16487 (m68k_cannot_store_register): Renamed from cannot_store_register,
16489 (the_low_target): New.
16490 * linux-mips-low.c (num_regs): Remove.
16491 (mips_num_regs): Define.
16492 (mips_regmap): Renamed from regmap, made static.
16493 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16495 (mips_cannot_store_register): Renamed from cannot_store_register,
16497 (the_low_target): New.
16498 * linux-ppc-low.c (num_regs): Remove.
16499 (ppc_num_regs): Define.
16500 (ppc_regmap): Renamed from regmap, made static.
16501 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16503 (ppc_cannot_store_register): Renamed from cannot_store_register,
16505 (the_low_target): New.
16506 * linux-s390-low.c (num_regs): Remove.
16507 (s390_num_regs): Define.
16508 (s390_regmap): Renamed from regmap, made static.
16509 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16511 (s390_cannot_store_register): Renamed from cannot_store_register,
16513 (the_low_target): New.
16514 * linux-sh-low.c (num_regs): Remove.
16515 (sh_num_regs): Define.
16516 (sh_regmap): Renamed from regmap, made static.
16517 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16519 (sh_cannot_store_register): Renamed from cannot_store_register,
16521 (the_low_target): New.
16522 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16523 (the_low_target): New.
16525 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16527 * Makefile.in: Add stamp-h target.
16528 * configure.in: Create stamp-h.
16529 * configure: Regenerated.
16531 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16533 * inferiors.c: New file.
16534 * target.c: New file.
16535 * target.h: New file.
16536 * Makefile.in: Add target.o and inferiors.o. Update
16538 * linux-low.c (inferior_pid): New static variable,
16539 moved from server.c.
16540 (linux_create_inferior): Renamed from create_inferior.
16541 Call add_inferior. Return 0 on success instead of a PID.
16542 (linux_attach): Renamed from myattach.
16543 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16544 (linux_thread_alive): Renamed from mythread_alive.
16545 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16547 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16548 (regsets_store_inferior_registers): Correct error message.
16549 Add missing ``return 0''.
16550 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16551 (linux_store_registers): Renamed from store_inferior_registers.
16552 (linux_read_memory): Renamed from read_inferior_memory.
16553 (linux_write_memory): Renamed from write_inferior_memory.
16554 (linux_target_ops): New structure.
16555 (initialize_low): Call set_target_ops ().
16556 * remote-utils.c (unhexify): New function.
16557 (hexify): New function.
16558 (input_interrupt): Send signals to ``signal_pid''.
16559 * server.c (inferior_pid): Remove.
16560 (start_inferior): Update create_inferior call.
16561 (attach_inferior): Call add_inferior.
16562 (handle_query): New function.
16563 (main): Call handle_query for `q' packets.
16564 * server.h: Include "target.h". Remove obsolete prototypes.
16565 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16567 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16569 * Makefile.in: Add WARN_CFLAGS. Update configury
16571 * configure.in: Check for <string.h>
16572 * configure: Regenerate.
16573 * config.in: Regenerate.
16574 * gdbreplay.c: Include needed system headers.
16575 (remote_open): Remove strchr prototype.
16576 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16577 * regcache.c (supply_register): Change buf argument to const void *.
16578 (supply_register_by_name): Likewise.
16579 (collect_register): Change buf argument to void *.
16580 (collect_register_by_name): Likewise.
16581 * regcache.h: Add missing prototypes.
16582 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16583 * server.c (handle_query): New function.
16584 (attached): New static variable, moved out of main.
16585 (main): Quiet longjmp clobber warnings.
16586 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16587 * utils.c (error): Remove NORETURN.