1 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
6 2018-05-25 Maciej W. Rozycki <macro@mips.com>
8 * gdb.arch/mips-fpregset-core.exp: New test.
9 * gdb.arch/mips-fpregset-core.c: New test source.
11 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
14 * hostio.c (require_int): Do not report overflow for integers
15 between 0xfffffff and 0x7fffffff.
17 2018-05-22 Maciej W. Rozycki <macro@mips.com>
19 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
20 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
21 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
23 (the_low_target): Wire them.
25 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
27 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
28 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
29 mode. Call collect_register_by_name with vscr using
30 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
31 (ppc_store_vrregset): Add and set vscr_offset variable as in
32 ppc_fill_vrregset. Call supply_register_by_name with vscr using
35 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
37 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
38 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
39 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
41 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
43 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
44 (ppc_store_vsxregset): Likewise.
45 (ppc_fill_vrregset): Likewise.
46 (ppc_store_vrregset): Likewise.
47 (ppc_fill_evrregset): Likewise.
48 (ppc_store_evrregset): Likewise.
49 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
50 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
53 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
55 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
56 wordsize of the inferior. Call ppc_linux_target_wordsize.
58 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
60 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
61 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
62 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
63 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
64 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
65 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
66 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
67 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
68 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
69 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
70 (tdesc_powerpc_e500l): Remove.
71 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
72 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
73 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
74 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
76 (ppc_arch_setup): Remove target description matching code. Fill a
77 ppc_linux_features struct and call ppc_linux_match_description
80 2018-05-22 Maciej W. Rozycki <macro@mips.com>
82 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
83 width of the requested register exceeds the width of the
85 (mips_cannot_store_register): Likewise.
87 2018-05-21 Maciej W. Rozycki <macro@mips.com>
89 * linux-mips-low.c (mips_fetch_register): New function. Update
91 (mips_store_gregset): Supply 0 rather than $restart for $zero.
92 (the_low_target): Wire `mips_fetch_register'.
94 2018-05-10 Joel Brobecker <brobecker@adacore.com>
96 * lynx-i386-low.c (LYNXOS_178): New macro.
97 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
98 the layout on LynxOS-178.
99 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
100 handle floating point registers that are not supported by
103 2018-05-10 Tom Tromey <tom@tromey.com>
105 * configure: Rebuild.
107 2018-05-10 Joel Brobecker <brobecker@adacore.com>
110 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
111 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
112 Use it to set the expedite_regs field in the given tdesc.
113 * x86-tdesc.h: New file.
114 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
115 Adjust following the addition of the new expedite_regs parameter
117 * linux-tic6x-low.c (tic6x_read_description): Likewise.
118 * linux-x86-tdesc.c: #include "x86-tdesc.h".
119 (i386_linux_read_description, amd64_linux_read_description):
120 Adjust following the addition of the new expedite_regs parameter
122 * lynx-i386-low.c: #include "x86-tdesc.h".
123 (lynx_i386_arch_setup): Adjust following the addition of the new
124 expedite_regs parameter to init_target_desc.
125 * nto-x86-low.c: #include "x86-tdesc.h".
126 (nto_x86_arch_setup): Adjust following the addition of the new
127 expedite_regs parameter to init_target_desc.
128 * win32-i386-low.c: #include "x86-tdesc.h".
129 (i386_arch_setup): Adjust following the addition of the new
130 expedite_regs parameter to init_target_desc.
132 2018-05-10 Joel Brobecker <brobecker@adacore.com>
135 * win32-low.c (win32_create_inferior): Add call to my_wait
136 setting last_status global.
138 2018-05-10 Joel Brobecker <brobecker@adacore.com>
141 * win32-low.c (create_process): Only call gdb_tilde_expand if
142 inferior_cwd is not NULL.
144 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
146 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
147 registers to the cache if their values have changed.
148 (i387_xsave_to_cache): Provide default values for x87 control
149 registers when these features are available, but disabled.
150 * regcache.c (supply_register_by_name_zeroed): New function.
151 * regcache.h (supply_register_by_name_zeroed): Declare new
154 2018-05-07 Tom Tromey <tom@tromey.com>
156 * configure: Rebuild.
158 2018-05-04 Tom Tromey <tom@tromey.com>
160 * configure: Rebuild.
162 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
163 Pedro Alves <palves@redhat.com>
165 * linux-aarch64-low.c (aarch64_stopped_data_address):
168 2018-04-27 Tom Tromey <tom@tromey.com>
170 * configure: Rebuild.
172 2018-04-23 Tom Tromey <tom@tromey.com>
174 * configure: Rebuild.
176 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
178 * Makefile.in (depcomp): Add "..".
179 (all_deps_files): New and use it.
181 2018-04-18 Alan Hayward <alan.hayward@arm.com>
183 * configure.srv (aarch64*-*-linux*): Don't include xml.
184 (i[34567]86-*-cygwin*): Likewise.
185 (i[34567]86-*-linux*): Likewise.
186 (i[34567]86-*-lynxos*): Likewise.
187 (i[34567]86-*-mingw32ce*): Likewise.
188 (i[34567]86-*-mingw*): Likewise.
189 (i[34567]86-*-nto*): Likewise.
190 (tic6x-*-uclinux): Likewise.
191 (x86_64-*-linux*): Likewise.
192 (x86_64-*-mingw*): Likewise.
193 (x86_64-*-cygwin*): Likewise.
195 2018-04-18 Alan Hayward <alan.hayward@arm.com>
197 * tdesc.c: Remove xml parameter.
199 2018-04-18 Alan Hayward <alan.hayward@arm.com>
201 * server.c (get_features_xml): Remove cast.
202 * tdesc.c (void target_desc::accept): Fill in function.
203 (tdesc_get_features_xml): Remove old xml creation.
204 (print_xml_feature::visit_pre): Add xml vistor.
205 * tdesc.h (struct target_desc): Make xmltarget mutable.
206 (tdesc_get_features_xml): Remove declaration.
208 2018-04-18 Alan Hayward <alan.hayward@arm.com>
210 * tdesc.c (tdesc_architecture_name): Add new function.
211 (tdesc_osabi_name): Likewise.
212 (tdesc_get_features_xml): Use new functions.
214 2018-04-18 Alan Hayward <alan.hayward@arm.com>
216 * tdesc.c (tdesc_create_flags): Remove.
217 (tdesc_add_flag): Likewise.
218 (tdesc_named_type): Likewise.
219 (tdesc_create_union): Likewise.
220 (tdesc_create_struct): Likewise.
221 (tdesc_create_vector): Likewise.
222 (tdesc_add_bitfield): Likewise.
223 (tdesc_add_field): Likewise.
224 (tdesc_set_struct_size): Likewise.
226 2018-04-18 Alan Hayward <alan.hayward@arm.com>
228 * tdesc.c (~target_desc): Remove implictly deleted items.
229 (init_target_desc): Iterate all features.
230 (tdesc_get_features_xml): Use vector.
231 (tdesc_create_feature): Create feature.
232 * tdesc.h (tdesc_feature) Remove
233 (target_desc): Add features.
235 2018-04-18 Alan Hayward <alan.hayward@arm.com>
237 * Makefile.in: Add common/tdesc.c
238 * tdesc.c (init_target_desc): init all reg_defs from register
240 (tdesc_create_reg): Create tdesc_reg.
241 * tdesc.h (tdesc_feature): Add register vector.
243 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
245 * tdesc.h (struct target_desc) <features>: Change type to
246 std::vector<std::string>.
247 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
249 (tdesc_get_features_xml): Likewise.
250 (tdesc_create_feature): Likewise.
252 2018-03-26 Alan Hayward <alan.hayward@arm.com>
254 * regcache.c (find_register_by_number): Return a ref.
255 (find_regno): Use references.
256 (register_size): Likewise.
257 (register_data): Likewise.
258 * tdesc.c (target_desc::~target_desc): Remove free calls.
259 (target_desc::operator==): Use std::vector compare.
260 (init_target_desc): Use reference.
261 (tdesc_create_reg): Use reg constructors.
262 * tdesc.h (struct target_desc): Replace pointer with object.
264 2018-03-23 Alan Hayward <alan.hayward@arm.com>
266 * regcache.c (find_register_by_number): Make static.
267 (find_regno): Use find_register_by_number
268 * regcache.h (struct reg): Remove declaration.
270 2018-03-23 Alan Hayward <alan.hayward@arm.com>
272 * tdesc.c (target_desc::~target_desc): Move to here.
273 (target_desc::operator==): Likewise.
274 * tdesc.h (target_desc::~target_desc): Move from here.
275 (target_desc::operator==): Likewise.
277 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
279 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
281 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
283 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
285 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
286 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
287 and init_registers_s390_gs_linux64.
289 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
291 * linux-s390-low.c (s390_fill_gs): Remove function.
292 (s390_fill_gsbc): Remove function.
293 (s390_regsets): Set fill functions for the guarded storage regsets
296 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
298 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
299 the word size. Add comment.
300 (s390_get_wordsize): New function.
301 (s390_arch_setup): No longer select a temporary tdesc to fetch the
302 pswm with it. Instead, use s390_get_wordsize to determine the
303 word size first and derive the correct tdesc from that directly.
305 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
307 * Makefile.in: Include silent-rules.mk.
308 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
309 (COMPILE): Add ECHO_CXX.
310 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
311 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
312 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
313 (version-generated.c): Add ECHO_GEN.
314 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
315 (IPAGENT_COMPILE): Add ECHO_CXX.
316 (%-generated.c): Add ECHO_REGDAT.
318 2018-03-14 Tom Tromey <tom@tromey.com>
321 * ax.c (ax_printf): Special case for NULL.
323 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
325 * linux-low.c (linux_qxfer_libraries_svr4): Use
326 xml_escape_text_append.
328 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
330 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
332 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
334 * server.c (handle_general_set): Remove unnecessary xstrdup.
336 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
338 * server.c (parse_debug_format_options): Adjust to
339 delim_string_to_char_ptr_vec changes.
340 * thread-db.c (thread_db_load_search): Adjust to
341 dirnames_to_char_ptr_vec changes.
343 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
345 * target.h (target_enable_btrace, target_disable_btrace)
346 (target_read_btrace, target_read_btrace_conf): Turn macro into
347 inline function. Throw error if target method is not defined.
348 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
349 check for btrace target method. Be prepared to handle exceptions
350 from btrace target methods.
352 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
354 * server.c (captured_main): Change order of error message printed
355 when the current working directory cannot be found.
357 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
359 * server.c: Include "filenames.h" and "pathstuff.h".
360 (program_name): Delete variable.
361 (program_path): New anonymous class.
362 (get_exec_wrapper): Use "program_path" instead of
364 (handle_v_run): Likewise.
365 (captured_main): Likewise.
366 (process_serial_event): Likewise.
368 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
370 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
371 (OBJS): Add "pathstuff.o".
372 * server.c (current_directory): New global variable.
373 (captured_main): Initialize "current_directory".
375 2018-02-26 Alan Hayward <alan.hayward@arm.com>
377 * tdesc.c: Use common/tdesc.h.
380 2018-02-20 Alan Hayward <alan.hayward@arm.com>
381 Simon Marchi <simon.marchi@ericsson.com>
383 * Makefile.in: Switch order of make rules.
385 2018-02-19 Alan Hayward <alan.hayward@arm.com>
387 * Makefile.in: Add common directory in build.
388 * configure.ac: Add common reference.
389 * configure: Regenerate.
391 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
393 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
394 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
395 * spu-low.c (spu_target_ops): Likewise.
396 * win32-low.c (win32_target_ops): Likewise.
397 * server.c (supported_btrace_packets): Report packets unconditionally.
398 * target.h (target_ops) <supports_btrace>: Remove.
399 (target_supports_btrace): Remove.
401 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
403 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
404 (handle_btrace_disable): Change return type to void. Use exceptions
406 (handle_btrace_general_set): Catch exception and copy message to
409 2018-02-08 Tom Tromey <tom@tromey.com>
411 * linux-low.c (install_software_single_step_breakpoints): Use
413 * inferiors.c (make_cleanup_restore_current_thread): Remove.
414 (do_restore_current_thread_cleanup): Remove.
415 * gdbthread.h (make_cleanup_restore_current_thread): Don't
418 2018-02-08 Tom Tromey <tom@tromey.com>
420 * mem-break.c (set_raw_breakpoint_at): Use
421 gdb::unique_xmalloc_ptr.
423 2018-01-30 Pedro Alves <palves@redhat.com>
426 * target.c (target_terminal::terminal_state): Rename to ...
427 (target_terminal::m_terminal_state): ... this.
429 2018-01-19 James Clarke <jrtc27@jrtc27.com>
431 * linux-low.c (handle_extended_wait): Surround call to
432 thread_db_notice_clone with #ifdef USE_THREAD_DB.
434 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
436 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
437 linux_ptrace_attach_fail_reason_string now returning an
439 (linux_attach): Likewise.
440 * thread-db.c (attach_thread): Likewise.
442 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
445 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
446 checking for fs_base/gs_base fields in struct user_regs_struct.
447 * configure: Regenerate.
449 2018-01-16 Yao Qi <yao.qi@linaro.org>
452 * linux-low.c (fetch_register): Call supply_register instead of
455 2018-01-08 Yao Qi <yao.qi@linaro.org>
456 Simon Marchi <simon.marchi@ericsson.com>
458 * Makefile.in (OBS): Remove selftest.o.
459 * configure.ac: Set srv_selftest_objs if $development is true.
460 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
461 * configure: Re-generated.
462 * server.c (captured_main): Wrap variable selftest_filter with
465 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
467 * server.c (parse_debug_format_options): Return std::string.
468 (handle_monitor_command, captured_main): Adjust.
470 2018-01-05 Pedro Alves <palves@redhat.com>
473 * server.c (captured_main): Pass quiet=false to
474 save_original_signals_state.
476 2018-01-01 Joel Brobecker <brobecker@adacore.com>
478 * gdbreplay.c (gdbreplay_version): Update copyright year in
480 * server.c (gdbserver_version): Likewise.
482 2017-12-08 Tom Tromey <tom@tromey.com>
484 * ax.c (ax_printf): Update.
486 2017-12-07 Yao Qi <yao.qi@linaro.org>
488 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
489 aarch64_linux_read_description.
490 * linux-amd64-ipa.c (idx2mask): New array.
491 (get_ipa_tdesc): Move idx2mask out.
492 (initialize_low_tracepoint): Initialize target descriptions.
493 * linux-i386-ipa.c (idx2mask): New array.
494 (get_ipa_tdesc): Move idx2mask out.
495 (initialize_low_tracepoint): Initialize target descriptions.
497 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
499 * tdesc.c (struct tdesc_type): Change return type.
500 (tdesc_add_flag): Change parameter type.
501 (tdesc_add_bitfield): Likewise.
502 (tdesc_add_field): Likewise.
503 (tdesc_set_struct_size): Likewise.
505 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
507 * regcache.c (registers_to_string): Remove unused variable.
509 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
511 * inferiors.c (for_each_inferior_with_data): Remove.
512 * inferiors.h (for_each_inferior_with_data): Remove.
513 * server.c (handle_qxfer_threads_worker): Change parameter type.
514 (handle_qxfer_threads_proper): Use for_each_thread.
516 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
518 * inferiors.c (for_each_inferior): Remove.
519 (clear_inferiors): Use for_each_thread.
520 * inferiors.h (for_each_inferior): Remove.
521 * linux-low.c (linux_wait_for_event_filtered): Use
523 (linux_stabilize_threads): Likewise.
524 * regcache.c (regcache_release): Likewise.
525 * server.c (gdb_wants_all_threads_stopped): Likewise.
526 (clear_pending_status_callback): Remove.
527 (handle_status): Use for_each_thread.
528 (captured_main): Likewise.
529 * win32-low.c (child_init_thread_list): Likewise.
530 (win32_clear_inferiors): Likewise.
531 (fake_breakpoint_event): Likewise.
533 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
535 * inferiors.h (find_inferior): Remove.
536 * inferiors.c (find_inferior): Remove.
538 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
540 * linux-low.c (resume_status_pending_p): Update comment.
541 (need_step_over_p): Update comment.
543 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
545 * linux-low.c (proceed_one_lwp): Return void, change parameter
547 (unsuspend_and_proceed_one_lwp): Likewise.
548 (proceed_all_lwps): Use for_each_thread.
549 (unstop_all_lwps): Likewise.
551 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
553 * linux-low.c (linux_resume_one_thread): Return void, take
555 (linux_resume): Use for_each_thread.
557 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
559 * linux-low.c (send_sigstop_callback): Return void, change
560 parameter type. Rename to...
561 (send_sigstop): ... this.
562 (suspend_and_send_sigstop_callback): Return void, change parameter
564 (suspend_and_send_sigstop): ... this.
565 (stop_all_lwps): Use for_each_thread.
567 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
569 * linux-low.c (lwp_running): Return bool, remove unused
571 (linux_stabilize_threads): Use find_thread.
573 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
575 * linux-low.c (select_singlestep_lwp_callback): Remove.
576 (count_events_callback): Remove.
577 (select_event_lwp_callback): Remove.
578 (select_event_lwp): Use find_thread/for_each_thread.
580 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
582 * linux-low.c (not_stopped_callback): Return bool, take filter
584 (linux_wait_for_event_filtered): Use find_thread.
585 (linux_wait_1): Likewise.
587 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
589 * linux-low.c (same_lwp): Remove.
590 (find_lwp_pid): Use find_thread.
592 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
594 * linux-low.c (delete_lwp_callback): Remove.
595 (linux_mourn): Use for_each_thread.
597 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
599 * linux-low.c (linux_detach_lwp_callback): Return void, remove
600 args parameter, don't check for pid.
601 (linux_detach): Use for_each_thread.
603 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
605 * linux-low.c (struct counter): Remove.
606 (second_thread_of_pid_p): Remove.
607 (last_thread_of_process_p): Use find_thread.
609 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
611 * inferiors.c (find_inferior_in_random): Remove.
612 * inferiors.h (find_inferior_in_random): Remove.
613 * linux-low.c (status_pending_p_callback): Return bool, accept
614 parameter ptid directly.
615 (linux_wait_for_event_filtered): Use find_thread_in_random.
616 (linux_wait_1): Likewise.
618 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
620 * inferiors.c (find_inferior_id): Remove.
621 (find_thread_ptid): Move implemention from find_inferior_id to
623 * inferiors.h (find_inferior_id): Remove.
624 * server.c (handle_status): Use find_thread_ptid.
625 (process_serial_event): Likewise.
626 * thread-db.c (find_one_thread): Likewise.
627 (thread_db_thread_handle): Likewise.
628 * win32-low.c (thread_rec): Likewise.
629 (child_delete_thread): Likewise.
630 (win32_thread_alive): Likewise.
631 (get_child_debug_event): Likewise.
633 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
635 * linux-mips-low.c (update_watch_registers_callback): Return
636 void, remove pid_p parameter, don't check for pid.
637 (mips_insert_point, mips_remove_point): Use for_each_thread.
639 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
641 * lynx.low (lynx_delete_thread_callback): Remove.
642 (lynx_mourn): Use for_each_thread.
644 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
646 * regcache.c (regcache_invalidate_one): Remove.
647 (regcache_invalidate_pid): use for_each_thread.
649 2017-11-26 Tom Tromey <tom@tromey.com>
651 * linux-low.c (linux_create_inferior): Update.
653 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
655 * spu-low.c (spu_create_inferior): Fix typo in argument name.
657 2017-11-24 Alan Hayward <alan.hayward@arm.com>
659 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
660 * linux-aarch64-low.c (initialize_low_arch): Call init func.
661 * linux-aarch64-tdesc-selftest.c: New file.
662 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
664 2017-11-24 Alan Hayward <alan.hayward@arm.com>
666 * configure.srv: Add new file.
667 * linux-aarch64-low.c (initialize_low_arch): Call init func.
668 * linux-aarch64-tdesc-selftest.c: New file.
669 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
671 2017-11-24 Alan Hayward <alan.hayward@arm.com>
673 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
674 * linux-aarch64-low.c (initialize_low_arch): Remove init.
675 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
677 2017-11-24 Alan Hayward <alan.hayward@arm.com>
679 * configure.srv: Add new files.
680 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
681 aarch64_linux_read_description.
682 * linux-aarch64-low.c (aarch64_linux_read_description):
683 Merge with aarch64_arch_setup.
684 (aarch64_arch_setup): Call aarch64_linux_read_description.
685 * linux-aarch64-tdesc.c: New file.
686 * linux-aarch64-tdesc.h: New file.
688 2017-11-24 Yao Qi <yao.qi@linaro.org>
690 * configure.srv: Set $srv_regobj for tic6x-linux.
691 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
692 (tic6x_read_description): Move some code to tic6x_arch_setup.
693 (tic6x_tdesc_test): New function.
694 (initialize_low_arch): Call selftests::register_test.
696 2017-11-22 Yao Qi <yao.qi@linaro.org>
698 * remote-utils.c (prepare_resume_reply): Use memcpy.
700 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
702 * linux-low.c (kill_one_lwp_callback): Return void, take
703 argument directly, don't filter on pid.
704 (linux_kill): Use for_each_thread.
706 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
708 * linux-low.c (need_step_over_p): Return bool, remove dummy
710 (linux_resume, proceed_all_lwps): Use find_thread.
712 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
714 * linux-low.c (resume_status_pending_p): Return bool, remove
716 (linux_resume): Use find_thread.
718 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
720 * linux-low.c (struct thread_resume_array): Remove.
721 (linux_set_resume_request): Return void, take arguments
723 (linux_resume): Use for_each_thread.
725 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
727 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
728 return bool, remove data argument.
729 (linux_stabilize_threads): Use find_thread.
731 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
733 * linux-low.c (unsuspend_one_lwp): Remove.
734 (unsuspend_all_lwps): Use for_each_thread, inline code from
737 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
739 * gdbthread.h (find_thread): Add overload with ptid_t filter.
740 * linux-low.c (struct iterate_over_lwps_args): Remove.
741 (iterate_over_lwps_filter): Remove.
742 (iterate_over_lwps): Use find_thread.
744 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
746 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
747 (linux_handle_new_gdb_connection): Use for_each_thread, inline
748 code from reset_lwp_ptrace_options_callback.
750 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
752 * linux-arm-low.c (struct update_registers_data): Remove.
753 (update_registers_callback): Return void, take arguments
754 directly, don't check thread's pid.
755 (arm_insert_point, arm_remove_point): Use for_each_thread.
757 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
759 * win32-low.c (continue_one_thread): Return void, take argument
761 (child_continue): Use for_each_thread.
763 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
765 * win32-i386-low.c (update_debug_registers_callback): Rename
767 (update_debug_registers): ... this, return void, remove pid_p arg.
768 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
770 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
772 * inferiors.h (struct process_info): Add constructor, initialize
774 <syscalls_to_catch>: Change type to std::vector<int>.
775 * inferiors.c (add_process): Allocate process_info with new.
776 (remove_process): Free process_info with delete.
777 * linux-low.c (handle_extended_wait): Adjust.
778 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
779 * server.c (handle_general_set): Adjust.
781 2017-11-16 Pedro Alves <palves@redhat.com>
783 * remote-utils.c (remote_close): Block SIGIO signals instead of
784 uninstalling the SIGIO handler.
786 2017-11-16 Alan Hayward <alan.hayward@arm.com>
788 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
790 2017-11-16 Yao Qi <yao.qi@linaro.org>
792 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
793 (tic6x_store_gregset): Likewise.
794 (tic6x_usrregs_info): Move it up.
796 2017-11-15 Alan Hayward <alan.hayward@arm.com>
798 * Makefile.in: Update arch rules.
799 * configure.srv: Explicitly mark arch/ files.
801 2017-11-13 Andreas Schwab <schwab@suse.de>
803 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
805 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
807 2017-11-06 Pedro Alves <palves@redhat.com>
809 * config.in, configure: Regenerate.
811 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
813 * target.c (struct thread_search): Remove.
814 (thread_search_callback): Remove.
815 (prepare_to_access_memory): Use for_each_thread instead of
816 find_inferior. Inline code from thread_search_callback.
818 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
820 * server.c (struct visit_actioned_threads_data): Remove.
821 (visit_actioned_threads): Change prototype to take arguments
823 (resume): Use find_thread instead of find_inferior.
825 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
827 * server.c (queue_stop_reply_callback): Change prototype, return
829 (find_status_pending_thread_callback): Remove.
830 (handle_status): Replace find_inferior with find_thread and
833 2017-10-25 Alan Hayward <alan.hayward@arm.com>
835 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
837 (aarch64_store_gregset): Likewise.
838 (aarch64_fill_fpregset): Likewise.
839 (aarch64_store_fpregset): Likewise.
841 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
843 * gdbthread.h (find_thread, for_each_thread): New functions.
844 * inferiors.c (thread_of_pid): Remove.
845 (find_any_thread_of_pid): Use find_thread.
846 * linux-low.c (num_lwps): Use for_each_thread.
848 2017-10-17 Yao Qi <yao.qi@linaro.org>
850 * Makefile.in: Remove one rule.
851 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
853 2017-10-17 Yao Qi <yao.qi@linaro.org>
855 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
856 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
858 2017-10-17 Yao Qi <yao.qi@linaro.org>
860 * configure.srv: Rename arm.o with arch/arm.o.
862 2017-10-17 Yao Qi <yao.qi@linaro.org>
864 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
865 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
866 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
867 (arch-i386.o, arch-amd64.o): Remove rules.
868 (arch/%.o): New rule.
869 Update POSTCOMPILE and COMPILE.pre.
870 * configure.ac: Invoke AC_CONFIG_COMMANDS.
871 * configure: Re-generated.
872 * configure.srv: Replace arch-i386.o with arch/i386.o.
873 Replace arch-amd64.o with arch/amd64.o.
875 2017-10-16 Yao Qi <yao.qi@linaro.org>
877 * configure: Regenerated.
879 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
881 * inferiors.h: (struct inferior_list): Remove.
882 (struct inferior_list_entry); Remove.
883 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
884 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
885 get_first_inferior): Remove.
886 (for_each_inferior, for_each_inferior_with_data, find_inferior,
887 find_inferior_id, find_inferior_in_random): Change signature.
888 * inferiors.c (all_threads): Change type to
889 std::list<thread_info *>.
890 (get_thread): Remove macro.
891 (find_inferior, find_inferior_id): Change signature, implement
893 (find_inferior_in_random): Change signature, implement using
894 find_thread_in_random.
895 (for_each_inferior, for_each_inferior_with_data): Change
896 signature, implement using for_each_thread.
897 (add_inferior_to_list, remove_inferior): Remove.
898 (add_thread, get_first_thread, thread_of_pid,
899 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
900 (get_first_inferior, one_inferior_p, clear_inferior_list):
902 (clear_inferiors, get_thread_process): Update.
903 * gdbthread.h: Include <list>.
904 (struct thread_info) <entry>: Remove field.
906 (all_threads): Change type to std::list<thread_info *>.
907 (get_first_inferior): Add doc.
908 (find_thread, for_each_thread, find_thread_in_random): New
910 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
911 * linux-arm-low.c (update_registers_callback): Update.
912 * linux-low.c (second_thread_of_pid_p): Update.
913 (kill_one_lwp_callback, linux_detach_lwp_callback,
914 delete_lwp_callback, status_pending_p_callback, same_lwp,
915 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
916 iterate_over_lwps, not_stopped_callback,
917 resume_stopped_resumed_lwps, count_events_callback,
918 select_singlestep_lwp_callback, select_event_lwp_callback,
919 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
920 suspend_and_send_sigstop_callback, wait_for_sigstop,
921 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
922 lwp_running, linux_set_resume_request, resume_status_pending_p,
923 need_step_over_p, start_step_over, linux_resume_one_thread,
924 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
925 reset_lwp_ptrace_options_callback): Update.
926 * linux-mips-low.c (update_watch_registers_callback): Update.
927 * regcache.c (regcache_invalidate_one, regcache_invalidate):
929 (free_register_cache_thread_one): Remove.
930 (regcache_release): Update.
931 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
932 handle_qxfer_threads_worker): Update.
933 (handle_query): Update, use list iterator.
934 (visit_actioned_threads, handle_pending_status,
935 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
936 clear_pending_status_callback, set_pending_status_callback,
937 find_status_pending_thread_callback, handle_status,
938 process_serial_event): Update.
939 * target.c (thread_search_callback): Update.
940 * thread-db.c (thread_db_get_tls_address): Update.
941 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
943 * win32-i386-low.c (update_debug_registers_callback): Update.
944 * win32-low.c (delete_thread_info, child_delete_thread,
945 continue_one_thread, suspend_one_thread,
946 get_child_debug_event): Adjust.
948 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
950 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
951 * inferiors.h: Include <list>.
952 (struct process_info) <entry>: Remove field.
954 (pid_of): Change macro to function.
955 (ptid_of, lwpid_of): Remove macro.
956 (all_processes): Change type to std::list<process_info *>.
957 (ALL_PROCESSES): Remove macro.
958 (for_each_process, find_process): New function.
959 * inferiors.c (all_processes): Change type to
960 std::list<process_info *>.
961 (find_thread_process): Adjust.
962 (add_process): Likewise.
963 (remove_process): Likewise.
964 (find_process_pid): Likewise.
965 (get_first_process): Likewise.
966 (started_inferior_callback): Remove.
967 (have_started_inferiors_p): Adjust.
968 (attached_inferior_callback): Remove.
969 (have_attached_inferiors_p): Adjust.
970 * linux-low.c (check_zombie_leaders): Likewise.
971 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
972 (x86_linux_update_xmltarget): Adjust.
973 * server.c (handle_query): Likewise.
974 (gdb_reattached_process): Remove.
975 (handle_status): Adjust.
976 (kill_inferior_callback): Likewise.
977 (detach_or_kill_inferior): Remove.
978 (print_started_pid): Likewise.
979 (print_attached_pid): Likewise.
980 (detach_or_kill_for_exit): Update.
981 (process_serial_event): Likewise.
982 * linux-arm-low.c (arm_new_fork): Likewise.
984 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
986 * dll.h: Include <list>.
987 (struct dll_info): Add constructor.
988 <entry>: Remove field.
989 (all_dlls): Change type to std::list<dll_info>.
990 * dll.c: Include <algorithm>.
991 (get_dll): Remove macro.
992 (all_dlls): Change type to std::list<dll_info *>.
993 (free_one_dll): Remove.
994 (match_dll): Likewise.
995 (loaded_dll): Adjust.
996 (unloaded_dll): Adjust to all_dlls type change, use
997 std::find_if. Inline code from match_dll.
998 (clear_dlls): Adjust to all_dlls type change.
999 * server.c (emit_dll_description): Remove.
1000 (handle_qxfer_libraries): Adjust to all_dlls type change,
1001 integrate emit_dll_description's functionality.
1003 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1005 * linux-low.h (struct linux_target_ops) <delete_process>: New
1007 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1008 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1009 (struct linux_target_ops): Add delete_process callback.
1010 * linux-arm-low.c (arm_delete_process): New.
1011 (struct linux_target_ops): Add delete_process callback.
1012 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1013 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1014 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1015 * linux-mips-low.c (mips_linux_delete_process): New.
1016 (struct linux_target_ops): Add delete_process callback.
1017 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1018 * linux-s390-low.c (struct linux_target_ops): Likewise.
1019 * linux-sh-low.c (struct linux_target_ops): Likewise.
1020 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1021 * linux-tile-low.c (struct linux_target_ops): Likewise.
1022 * linux-x86-low.c (x86_linux_delete_process): New.
1023 (struct linux_target_ops): Add delete_process callback.
1024 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1026 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1028 * linux-aarch64-low.c (the_low_target): Add thread delete
1030 * linux-arm-low.c (arm_delete_thread): New function.
1031 (the_low_target): Add thread delete callback.
1032 * linux-bfin-low.c (the_low_target): Likewise.
1033 * linux-crisv32-low.c (the_low_target): Likewise.
1034 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1036 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1038 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1039 * linux-mips-low.c (mips_linux_delete_thread): New function.
1040 (the_low_target): Add thread delete callback.
1041 * linux-ppc-low.c (the_low_target): Likewise.
1042 * linux-s390-low.c (the_low_target): Likewise.
1043 * linux-sh-low.c (the_low_target): Likewise.
1044 * linux-tic6x-low.c (the_low_target): Likewise.
1045 * linux-tile-low.c (the_low_target): Likewise.
1046 * linux-x86-low.c (the_low_target): Likewise.
1047 * linux-xtensa-low.c (the_low_target): Likewise.
1049 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1051 * win32-low.c: Include "common-inferior.h".
1053 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1055 * inferiors.c (set_inferior_cwd): New function.
1056 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1057 (handle_query): Inform that QSetWorkingDir is supported.
1058 * win32-low.c (create_process): Pass the inferior's cwd to
1061 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1063 * inferiors.c (current_inferior_cwd): New global variable.
1064 (get_inferior_cwd): New function.
1065 * inferiors.h (struct process_info) <cwd>: New field.
1067 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1069 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1070 (OBS): Add gdb_tilde_expand.o.
1072 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1074 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1075 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1077 2017-09-29 Pedro Alves <palves@redhat.com>
1079 * ax.c (gdb_parse_agent_expr): Constify.
1080 * ax.h (gdb_parse_agent_expr): Constify.
1081 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1083 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1084 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1085 * remote-utils.h (read_ptid): Constify.
1086 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1087 (process_point_options, process_serial_event): Constify.
1088 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1089 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1090 (cmd_qtbuffer): Constify.
1092 2017-09-29 Pedro Alves <palves@redhat.com>
1094 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1097 2017-09-29 Pedro Alves <palves@redhat.com>
1099 * linux-low.c (handle_extended_wait): Pass parent thread instead
1100 of process to thread_db_notice_clone.
1101 * linux-low.h (thread_db_notice_clone): Replace parent process
1102 parameter with parent thread parameter.
1103 * thread-db.c (find_one_thread): Add comment.
1104 (thread_db_notice_clone): Replace parent process parameter with
1105 parent thread parameter. Temporarily switch to the parent thread.
1107 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1109 * gdbthread.h: Include "common-gdbthread.h".
1110 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1111 "if" when validating the ptid.
1112 * remote-utils.c: Include "gdbthread.h".
1113 (prepare_resume_reply): Use "switch_to_thread".
1114 * target.c (done_accessing_memory): Likewise.
1116 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1118 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1119 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1120 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1121 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1122 s390x-gs-linux64-ipa.o to ipa_obj.
1123 * linux-s390-low.c (HWCAP_S390_GS): New define.
1124 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1126 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1127 (s390_arch_setup): Check for guarded-storage support and choose
1129 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1130 init_registers_s390x_gs_linux64.
1131 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1133 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1134 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1136 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1138 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1140 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1142 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1143 (thread_db_thread_handle): Declare.
1144 * linux-low.c (linux_target_ops): Initialize thread_handle.
1145 * server.c (handle_qxfer_threads_worker): Add support for
1147 * target.h (struct target_ops): Add new function pointer,
1149 (target_thread_handle): Define.
1150 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1152 (thread_db_thread_handle): New function.
1154 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1156 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1157 * linux-low.h (thread_db_notice_clone): Declare.
1158 * thread-db.c (thread_db_notice_clone): New function.
1160 2017-09-21 Pedro Alves <palves@redhat.com>
1162 * server.c (gdb_read_memory, handle_status, process_serial_event)
1163 (handle_serial_event, handle_target_event): Adjust to
1164 set_desired_thread prototype change.
1165 * target.c (set_desired_thread): Remove 'use_general' parameter
1167 * target.h (set_desired_thread): Remove 'use_general' parameter.
1169 2017-09-20 Tom Tromey <tom@tromey.com>
1171 * target.c (target_terminal::terminal_state): Define.
1172 (target_terminal::init): Rename from target_terminal_init.
1173 (target_terminal::inferior): Rename from
1174 target_terminal_inferior.
1175 (target_terminal::ours): Rename from target_terminal_ours.
1176 (target_terminal::ours_for_output, target_terminal::info): New.
1178 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1180 * server.c (accumulate_file_name_length): Remove.
1181 (emit_dll_description): Adjust to std::string change.
1182 (handle_qxfer_libraries): Use std::string to hold document.
1184 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1186 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1187 return type of xml_escape_text.
1188 * server.c (emit_dll_description): Likewise.
1190 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1192 * server.c (captured_main): Accept argument for --selftest.
1193 Update run_tests call.
1194 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1195 when registering selftests.
1197 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1199 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1200 instead of "VEC" for "target_desc.reg_defs".
1201 (regcache_cpy): Likewise.
1202 (registers_to_string): Likewise.
1203 (registers_from_string): Likewise.
1204 (find_regno): Likewise.
1205 (supply_regblock): Likewise.
1206 (regcache_raw_read_unsigned): Likewise.
1207 * tdesc.c (init_target_desc): Likewise.
1208 (tdesc_create_reg): Likewise.
1209 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1210 (struct target_desc) <reg_defs>: Convert to "std::vector".
1211 (target_desc): Do not initialize "reg_defs".
1212 (~target_desc): Update code to use "std::vector" instead of "VEC"
1213 for "target_desc.reg_defs".
1214 (operator==): Likewise.
1216 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1218 * inferiors.h (thread_to_gdb_id): Remove.
1219 * inferiors.c (thread_to_gdb_id): Remove.
1220 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1221 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1222 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1224 * nto-low.c (nto_fetch_registers, nto_store_registers,
1225 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1227 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1229 * inferiors.h (gdb_id_to_thread_id): Remove.
1230 * inferiors.c (gdb_id_to_thread_id): Remove.
1231 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1232 removal. Move pid declaration closer to where it's used.
1234 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1236 * server.c (handle_detach): New function.
1237 (process_serial_event): Move code out, call handle_detach.
1239 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1241 * server.c (require_running): Rename to ...
1242 (require_running_or_return): ... this ...
1243 (require_running_or_break): ... and this.
1244 (handle_query, process_serial_event): Adjust.
1246 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1248 * linux-low.c (linux_set_resume_request): Remove unused
1251 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1253 * server.c (first_thread_of): Remove.
1254 (process_serial_event): Replace usage of first_thread_of with
1255 find_any_thread_of_pid.
1256 * tracepoint.c (same_process_p): Remove.
1257 (gdb_agent_about_to_close): Replace usage of same_process_p with
1258 find_any_thread_of_pid.
1259 * linux-x86-low.c (same_process_callback): Remove.
1260 (x86_arch_setup_process_callback): Replace usage of
1261 same_process_callback with find_any_thread_of_pid.
1262 * thread-db.c (any_thread_of): Remove.
1263 (switch_to_process): Replace usage of any_thread_of with
1264 find_any_thread_of_pid.
1265 * inferiors.c (thread_pid_matches_callback): Remove.
1266 (find_thread_process): Adjust to use find_any_thread_of_pid.
1268 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1270 * regcache.c (get_thread_regcache): Guard calls to "memset"
1273 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1275 * linux-low.c (handle_extended_wait): Use
1276 "allocate_target_description" instead of "XNEW".
1277 * linux-x86-low.c (initialize_low_arch): Likewise.
1279 2017-09-05 Yao Qi <yao.qi@linaro.org>
1281 * configure.srv (srv_i386_regobj): Remove.
1282 (srv_amd64_regobj): Remove.
1283 (srv_regobj): Set it to "" for x86 non-linux targets.
1284 * linux-x86-tdesc.c (i386_linux_read_description):
1285 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1286 (init_registers_i386): Remove the declaration.
1287 (tdesc_i386): Remove the declaration.
1288 (lynx_i386_arch_setup): Call i386_create_target_description.
1289 * nto-x86-low.c: Likewise.
1290 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1291 [!__x86_64__]: include arch/i386.h.
1292 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1294 2017-09-05 Yao Qi <yao.qi@linaro.org>
1296 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1297 i386/amd64-XXX-linux from it.
1299 2017-09-05 Yao Qi <yao.qi@linaro.org>
1301 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1303 (ipa_amd64_linux_regobj): Remove.
1304 (ipa_x32_linux_regobj): Remove.
1306 2017-09-05 Yao Qi <yao.qi@linaro.org>
1308 * Makefile.in (arch-amd64.o): New rule.
1309 * configure.srv: Append arch-amd64.o.
1310 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1311 (get_ipa_tdesc): Call amd64_linux_read_description.
1312 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1313 and init_registers_amd64_XXX.
1314 * linux-x86-low.c (x86_linux_read_description): Call
1315 amd64_linux_read_description.
1316 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1317 (initialize_low_arch): Don't call init_registers_x32_XXX and
1318 init_registers_amd64_XXX.
1319 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1320 and tdesc_amd64_XXX.
1321 [__x86_64__] (amd64_tdesc_test): New function.
1322 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1323 and init_registers_amd64_XXX.
1324 * linux-x86-tdesc.c: Include arch/amd64.h.
1325 (xcr0_to_tdesc_idx): New function.
1326 (i386_linux_read_description): New function.
1327 (amd64_get_ipa_tdesc_idx): New function.
1328 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1329 (amd64_get_ipa_tdesc): Declare.
1331 2017-09-05 Yao Qi <yao.qi@linaro.org>
1333 * configure.srv (srv_i386_linux_xmlfiles): Remove
1334 i386/i386-XXX-linux.xml from it.
1336 2017-09-05 Yao Qi <yao.qi@linaro.org>
1338 * configure.srv: Set srv_i386_linux_regobj empty if $development
1340 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1341 initialize_low_tdesc.
1342 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1343 with #if initialize_low_tdesc.
1344 * linux-x86-tdesc-selftest.c: New file.
1345 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1347 2017-09-05 Yao Qi <yao.qi@linaro.org>
1349 * Makefile.in (arch-i386.o): New rule.
1350 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1351 (x86_64-*-linux*): Likewise.
1352 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1353 include arch/i386.h.
1354 (i386_linux_read_description): Remove code and call
1355 i386_create_target_description.
1356 * tdesc.c (allocate_target_description): New function.
1357 * tdesc.h (set_tdesc_architecture): Remove declaration.
1358 (set_tdesc_osabi): Likewise.
1360 2017-09-05 Yao Qi <yao.qi@linaro.org>
1362 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1363 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1364 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1366 * server.c (get_features_xml): Call tdesc_get_features_xml.
1367 * tdesc.c (set_tdesc_architecture): New function.
1368 (set_tdesc_osabi): New function.
1369 (tdesc_get_features_xml): New function.
1370 (tdesc_create_feature): Add an argument.
1371 * tdesc.h (struct target_desc) <features>: New field.
1372 <arch, osabi>: New field.
1373 (~target_desc): xfree features, arch, and osabi.
1374 (target_desc::oerator==): Don't compare .xmltarget.
1375 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1376 (set_tdesc_osabi): Likewise.
1377 (tdesc_get_features_xml): Likewise.
1379 2017-09-05 Yao Qi <yao.qi@linaro.org>
1381 * linux-x86-tdesc.c: Include selftest.h.
1382 (i386_tdesc_test): New function.
1383 (initialize_low_tdesc): Call selftests::register_test.
1384 * tdesc.h: Include regdef.h.
1385 (target_desc): Override operator == and !=.
1387 2017-09-05 Yao Qi <yao.qi@linaro.org>
1389 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1390 (ipa_obj): Likewise.
1391 * linux-i386-ipa.c: Include common/x86-xstate.h
1392 (get_ipa_tdesc): Call i386_linux_read_description.
1393 (initialize_low_tracepoint): Don't call init_registers_XXX
1394 functions, call initialize_low_tdesc instead.
1395 * linux-x86-low.c (x86_linux_read_description): Call
1396 i386_linux_read_description.
1397 (initialize_low_arch): Don't call init_registers_i386_XXX
1398 functions, call initialize_low_tdesc.
1399 * linux-x86-tdesc.c: New file.
1400 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1401 (i386_get_ipa_tdesc_idx): Declare.
1402 (i386_get_ipa_tdesc): Declare.
1403 (initialize_low_tdesc): Declare.
1405 2017-09-05 Yao Qi <yao.qi@linaro.org>
1407 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1410 2017-09-05 Yao Qi <yao.qi@linaro.org>
1412 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1413 * regcache.c (get_thread_regcache): Use VEC_length.
1414 (init_register_cache): Likewise.
1415 (regcache_cpy): Likewise.
1416 (registers_to_string): Iterate reg_defs via VEC_iterate.
1417 (find_regno): Likewise.
1418 (find_register_by_number): Use VEC_index.
1419 (register_size): Call find_register_by_number.
1420 (register_data): Call find_register_by_number.
1421 (supply_regblock): Use VEC_length.
1422 (regcache_raw_read_unsigned): Likewise.
1423 * tdesc.c (init_target_desc): Iterate reg_defs via
1425 (default_description): Update initializer.
1426 (copy_target_description): Don't update field num_registers.
1427 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1428 <num_registers>: Remove.
1430 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1432 * Makefile.in (.SECONDARY): Define target.
1434 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1436 * linux-low.c (linux_wait_1): Adjust.
1437 * server.c (queue_stop_reply_callback): Adjust.
1439 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1441 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1442 QEnvironmentUnset and QEnvironmentReset packets.
1443 (handle_query): Inform remote that QEnvironmentHexEncoded,
1444 QEnvironmentUnset and QEnvironmentReset are supported.
1446 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1448 * inferiors.h (inferior_target_data): Rename to ...
1449 (thread_target_data): ... this.
1450 (inferior_regcache_data): Rename to ...
1451 (thread_regcache_data): ... this.
1452 (set_inferior_regcache_data): Rename to ...
1453 (set_thread_regcache_data): ... this.
1454 * inferiors.c (inferior_target_data): Rename to ...
1455 (thread_target_data): ... this.
1456 (inferior_regcache_data): Rename to ...
1457 (thread_regcache_data): ... this.
1458 (set_inferior_regcache_data): Rename to ...
1459 (set_thread_regcache_data): ... this.
1460 (free_one_thread): Update.
1461 * linux-low.h (get_thread_lwp): Update.
1462 * regcache.c (get_thread_regcache): Update.
1463 (regcache_invalidate_thread): Update.
1464 (free_register_cache_thread): Update.
1465 * win32-i386-low.c (update_debug_registers_callback): Update.
1466 (win32_get_current_dr): Update.
1467 * win32-low.c (thread_rec): Update.
1468 (delete_thread_info): Update.
1469 (continue_one_thread): Update.
1470 (suspend_one_thread): Update.
1472 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1474 * inferiors.c (set_inferior_target_data): Remove.
1475 * inferiors.h (set_inferior_target_data): Remove.
1477 2017-08-18 Yao Qi <yao.qi@linaro.org>
1479 * Makefile.in (OBS): Add selftest.o.
1480 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1481 * configure, config.in: Re-generated.
1482 * server.c: Include common/sefltest.h.
1483 (captured_main): Handle option --selftest.
1485 2017-08-09 Yao Qi <yao.qi@linaro.org>
1487 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1488 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1489 i386-avx-mpx.o and i386-mmx.o.
1490 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1491 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1492 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1493 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1494 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1495 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1496 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1497 i386/amd64-avx-mpx.xml.
1499 2017-08-09 Yao Qi <yao.qi@linaro.org>
1501 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1502 and x32-avx-avx512.o.
1503 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1504 i386/x32-avx-avx512.xml.
1506 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1508 * tracepoint.h (enum class fast_tpoint_collect_result): New
1510 (fast_tracepoint_collecting): Change return type to
1511 fast_tpoint_collect_result.
1512 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1513 * linux-low.h: Include tracepoint.h.
1514 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1515 fast_tpoint_collect_result.
1516 * linux-low.c (handle_tracepoints): Adjust.
1517 (linux_fast_tracepoint_collecting): Change return type to
1518 fast_tpoint_collect_result.
1519 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1520 linux_wait_1, stuck_in_jump_pad_callback,
1521 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1522 proceed_one_lwp): Adjust to type change.
1524 2017-07-10 Yao Qi <yao.qi@linaro.org>
1526 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1528 2017-06-29 Yao Qi <yao.qi@linaro.org>
1530 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1532 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1534 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1536 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1538 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1540 * linux-low.c (linux_create_inferior): Adjust code to access the
1541 environment information via 'gdb_environ' class.
1542 * lynx-low.c (lynx_create_inferior): Likewise.
1543 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1544 (get_environ): Return a pointer to 'our_environ'.
1545 (captured_main): Initialize 'our_environ'.
1546 * server.h (get_environ): Adjust prototype.
1547 * spu-low.c (spu_create_inferior): Adjust code to access the
1548 environment information via 'gdb_environ' class.
1550 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1552 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1553 usage of "register" keyword.
1555 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1557 * configure: Re-generate.
1559 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1561 * configure: Re-generate.
1563 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1565 * Makefile.in (COMPILE.pre): Add "-x c++".
1567 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1569 * fork-child.c: Conditionally include <signal.h>.
1571 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1573 * server.c (handle_general_set): Handle new packet
1574 "QStartupWithShell".
1575 (handle_query): Add "QStartupWithShell" to the list of supported
1577 (gdbserver_usage): Add help text explaining the
1578 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1580 (captured_main): Recognize and act upon the presence of the new
1583 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1584 Pedro Alves <palves@redhat.com>
1586 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1587 * configure: Regenerate.
1588 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1590 (i[34567]86-*-lynxos*): Likewise.
1591 (spu*-*-*): Likewise.
1592 * fork-child.c: New file.
1593 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1595 (linux_ptrace_fun): New function.
1596 (linux_create_inferior): Adjust function prototype to reflect
1597 change on "target.h". Adjust function code to use
1599 (linux_request_interrupt): Delete "signal_pid".
1600 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1601 (lynx_ptrace_fun): New function.
1602 (lynx_create_inferior): Adjust function prototype to reflect
1603 change on "target.h". Adjust function code to use
1605 * nto-low.c (nto_create_inferior): Adjust function prototype and
1606 code to reflect change on "target.h". Update comments.
1607 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1608 "common-terminal.h" and "environ.h".
1609 (terminal_fd): Moved to fork-child.c.
1610 (old_foreground_pgrp): Likewise.
1611 (restore_old_foreground_pgrp): Likewise.
1612 (last_status): Make it global.
1613 (last_ptid): Likewise.
1614 (our_environ): New variable.
1615 (startup_with_shell): Likewise.
1616 (program_name): Likewise.
1617 (program_argv): Rename to...
1618 (program_args): ...this.
1619 (wrapper_argv): New variable.
1620 (start_inferior): Delete function.
1621 (get_exec_wrapper): New function.
1622 (get_exec_file): Likewise.
1623 (get_environ): Likewise.
1624 (prefork_hook): Likewise.
1625 (post_fork_inferior): Likewise.
1626 (postfork_hook): Likewise.
1627 (postfork_child_hook): Likewise.
1628 (handle_v_run): Update code to deal with arguments coming from the
1629 remote host. Update calls from "start_inferior" to
1631 (captured_main): Likewise. Initialize environment variable. Call
1633 * server.h (post_fork_inferior): New prototype.
1634 (get_environ): Likewise.
1635 (last_status): Declare.
1636 (last_ptid): Likewise.
1637 (signal_pid): Likewise.
1638 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1639 (spu_ptrace_fun): New function.
1640 (spu_create_inferior): Adjust function prototype to reflect change
1641 on "target.h". Adjust function code to use "fork_inferior".
1642 * target.c (target_terminal_init): New function.
1643 (target_terminal_inferior): Likewise.
1644 (target_terminal_ours): Likewise.
1645 * target.h: Include <vector>.
1646 (struct target_ops) <create_inferior>: Update prototype.
1647 (create_inferior): Update macro.
1648 * utils.c (gdb_flush_out_err): New function.
1649 * win32-low.c (win32_create_inferior): Adjust function prototype
1650 and code to reflect change on "target.h".
1652 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1654 * inferiors.c (switch_to_thread): New function.
1656 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1658 * Makefile.in (SFILE): Add "common/job-control.c".
1659 (OBS): Add "job-control.o".
1661 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1663 * Makefile: Remove "@host_makefile_frag@".
1665 2017-05-05 Pedro Alves <palves@redhat.com>
1667 * configure: Regenerate.
1669 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1671 * configure: Regenerate.
1673 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1675 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1676 software_single_step change of return type to
1677 std::vector<CORE_ADDR>.
1678 * linux-low.c (install_software_single_step_breakpoints):
1680 * linux-low.h (install_software_single_step_breakpoints):
1683 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1685 * remote-utils.c: Include "gdb_termios.h" instead of
1687 * terminal.h: Delete file.
1689 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1691 * server.c: Include <vector>.
1692 <program_argv, wrapper_argv>: Convert to std::vector.
1693 (start_inferior): Rewrite function to use C++.
1694 (handle_v_run): Likewise. Update code that calculates the argv
1695 based on the vRun packet; use C++.
1696 (captured_main): Likewise.
1698 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1700 * server.c (handle_v_cont): Initialize thread_resume::thread
1703 2017-04-05 Pedro Alves <palves@redhat.com>
1705 * configure: Regenerate.
1707 2017-04-05 Pedro Alves <palves@redhat.com>
1709 * gdbreplay.c (sync_error): Constify.
1710 * linux-x86-low.c (push_opcode): Constify.
1712 2017-04-05 Pedro Alves <palves@redhat.com>
1714 * win32-low.c (get_child_debug_event)
1715 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1716 Report TARGET_WAITKIND_SPURIOUS instead.
1718 2017-04-05 Pedro Alves <palves@redhat.com>
1720 * remote-utils.c (remote_prepare, remote_open): Constify.
1721 * remote-utils.h (remote_prepare, remote_open): Constify.
1722 * server.c (captured_main): Constify 'port' handling.
1724 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1726 * Makefile.in (clean): Clear .deps.
1728 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1730 * .gitignore: Remove generated files, replace with wildcard.
1731 * (clean): Replace removal of generated files with wildcard.
1732 (version.c): Replace with...
1733 (version-generated.c): ...this.
1734 (xml-builtin.c): Replace with...
1735 (xml-builtin-generated.c): ...this.
1736 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1737 (%.c: *regformats*): Replace with...
1738 (%-generated.c: *regformats*): ...this.
1740 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1742 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1743 (xtensa_fill_gregset): Call collect_register_by_name for
1745 (xtensa_store_gregset): Call supply_register_by_name for
1748 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1750 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1751 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1752 (xtensa_store_gregset): Call supply_register for all registers in
1753 a0_regnum..a0_regnum + C0_NREGS range.
1755 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1757 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1758 (ax-ipa.o: ax.c): Remove.
1759 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1760 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1761 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1762 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1763 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1765 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1767 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1768 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1769 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1770 (errors-ipa.o: ../common/errors.c): Remove.
1771 (format-ipa.o: ../common/format.c): Remove.
1772 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1774 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1776 * Makefile.in (%-ipa.o: %.c): New rule.
1777 (tracepoint-ipa.o: tracepoint.c): Remove.
1778 (utils-ipa.o: utils.c): Remove.
1779 (remote-utils-ipa.o: remote-utils.c): Remove.
1780 (regcache-ipa.o: regcache.c): Remove.
1781 (i386-linux-ipa.o: i386-linux.c): Remove.
1782 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1783 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1784 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1785 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1786 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1787 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1788 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1789 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1790 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1791 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1792 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1793 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1794 (aarch64-ipa.o: aarch64.c): Remove.
1795 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1796 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1797 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1798 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1799 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1800 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1801 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1802 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1803 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1804 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1805 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1806 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1807 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1808 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1809 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1810 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1811 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1812 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1813 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1814 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1815 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1816 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1817 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1818 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1819 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1820 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1821 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1822 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1823 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1824 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1825 (tdesc-ipa.o: tdesc.c): Remove.
1826 (x32-linux-ipa.o: x32-linux.c): Remove.
1827 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1828 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1830 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1832 * Makefile.in (%.o: ../arch/%.c): New rule.
1833 (arm.o: ../arch/arm.c): Remove.
1834 (arm-linux.o: ../arch/arm-linux.c): Remove.
1835 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1836 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1838 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1840 * Makefile.in (%.o: ../nat/%.c): New rule.
1841 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1842 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1843 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1844 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1845 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1846 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1847 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1848 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1849 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1850 (linux-personality.o: ../nat/linux-personality.c): Remove.
1851 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1852 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1853 (x86-linux.o: ../nat/x86-linux.c): Remove.
1854 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1855 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1857 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1859 * Makefile.in (%.o: ../common/%.c): New rule.
1860 (signals.o: ../common/signals.c): Remove.
1861 (print-utils.o: ../common/print-utils.c): Remove.
1862 (rsp-low.o: ../common/rsp-low.c): Remove.
1863 (common-utils.o: ../common/common-utils.c): Remove.
1864 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1865 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1866 (vec.o: ../common/vec.c): Remove.
1867 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1868 (xml-utils.o: ../common/xml-utils.c): Remove.
1869 (ptid.o: ../common/ptid.c): Remove.
1870 (buffer.o: ../common/buffer.c): Remove.
1871 (format.o: ../common/format.c): Remove.
1872 (filestuff.o: ../common/filestuff.c): Remove.
1873 (agent.o: ../common/agent.c): Remove.
1874 (errors.o: ../common/errors.c): Remove.
1875 (environ.o: ../common/environ.c): Remove.
1876 (common-debug.o: ../common/common-debug.c): Remove.
1877 (cleanups.o: ../common/cleanups.c): Remove.
1878 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1879 (fileio.o: ../common/fileio.c): Remove.
1880 (common-regcache.o: ../common/common-regcache.c): Remove.
1881 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1882 (new-op.o: ../common/new-op.c): Remove.
1883 (btrace-common.o: ../common/btrace-common.c): Remove.
1885 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1887 * Makefile.in (%.o: ../target/%.c): New rule.
1888 (waitstatus.o: ../target/waitstatus.c): Remove.
1890 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1893 (%.c: ../regformats/%.dat,
1894 (%.c: ../regformats/arm/%.dat,
1895 (%.c: ../regformats/i386/%.dat,
1896 (%.c: ../regformats/rs6000/%.dat): New rules.
1897 (aarch64.c): Remove.
1898 (reg-arm.c): Remove.
1899 (arm-with-iwmmxt.c): Remove.
1900 (arm-with-vfpv2.c): Remove.
1901 (arm-with-vfpv3.c): Remove.
1902 (arm-with-neon.c): Remove.
1903 (reg-bfin.c): Remove.
1904 (reg-cris.c): Remove.
1905 (reg-crisv32.c): Remove.
1907 (i386-linux.c): Remove.
1908 (i386-avx.c): Remove.
1909 (i386-avx-linux.c): Remove.
1910 (i386-avx-avx512.c): Remove.
1911 (i386-avx-avx512-linux.c): Remove.
1912 (i386-mpx.c): Remove.
1913 (i386-mpx-linux.c): Remove.
1914 (i386-avx-mpx-avx512-pku.c): Remove.
1915 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1916 (i386-avx-mpx.c): Remove.
1917 (i386-avx-mpx-linux.c): Remove.
1918 (i386-mmx.c): Remove.
1919 (i386-mmx-linux.c): Remove.
1920 (reg-ia64.c): Remove.
1921 (reg-m32r.c): Remove.
1922 (reg-m68k.c): Remove.
1924 (mips-linux.c): Remove.
1925 (mips-dsp-linux.c): Remove.
1926 (mips64-linux.c): Remove.
1927 (mips64-dsp-linux.c): Remove.
1928 (nios2-linux.c): Remove.
1929 (powerpc-32.c): Remove.
1930 (powerpc-32l.c): Remove.
1931 (powerpc-altivec32l.c): Remove.
1932 (powerpc-cell32l.c): Remove.
1933 (powerpc-vsx32l.c): Remove.
1934 (powerpc-isa205-32l.c): Remove.
1935 (powerpc-isa205-altivec32l.c): Remove.
1936 (powerpc-isa205-vsx32l.c): Remove.
1937 (powerpc-e500l.c): Remove.
1938 (powerpc-64l.c): Remove.
1939 (powerpc-altivec64l.c): Remove.
1940 (powerpc-cell64l.c): Remove.
1941 (powerpc-vsx64l.c): Remove.
1942 (powerpc-isa205-64l.c): Remove.
1943 (powerpc-isa205-altivec64l.c): Remove.
1944 (powerpc-isa205-vsx64l.c): Remove.
1945 (s390-linux32.c): Remove.
1946 (s390-linux32v1.c): Remove.
1947 (s390-linux32v2.c): Remove.
1948 (s390-linux64.c): Remove.
1949 (s390-linux64v1.c): Remove.
1950 (s390-linux64v2.c): Remove.
1951 (s390-te-linux64.c): Remove.
1952 (s390-vx-linux64.c): Remove.
1953 (s390-tevx-linux64.c): Remove.
1954 (s390x-linux64.c): Remove.
1955 (s390x-linux64v1.c): Remove.
1956 (s390x-linux64v2.c): Remove.
1957 (s390x-te-linux64.c): Remove.
1958 (s390x-vx-linux64.c): Remove.
1959 (s390x-tevx-linux64.c): Remove.
1960 (tic6x-c64xp-linux.c): Remove.
1961 (tic6x-c64x-linux.c): Remove.
1962 (tic6x-c62x-linux.c): Remove.
1964 (reg-sparc64.c): Remove.
1965 (reg-spu.c): Remove.
1967 (amd64-linux.c): Remove.
1968 (amd64-avx.c): Remove.
1969 (amd64-avx-linux.c): Remove.
1970 (amd64-avx-avx512.c): Remove.
1971 (amd64-avx-avx512-linux.c): Remove.
1972 (amd64-mpx.c): Remove.
1973 (amd64-mpx-linux.c): Remove.
1974 (amd64-avx-mpx-avx512-pku.c): Remove.
1975 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1976 (amd64-avx-mpx.c): Remove.
1977 (amd64-avx-mpx-linux.c): Remove.
1979 (x32-linux.c): Remove.
1980 (x32-avx.c): Remove.
1981 (x32-avx-linux.c): Remove.
1982 (x32-avx-avx512.c): Remove.
1983 (x32-avx-avx512-linux.c): Remove.
1984 (reg-xtensa.c): Remove.
1985 (reg-tilegx.c): Remove.
1986 (reg-tilegx32.c): Remove.
1988 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1990 * Makefile.in (SFILES): Add "common/environ.c".
1991 (OBJS): Add "common/environ.h".
1993 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1995 * configure.ac: Check if the fs_base and gs_base members of
1996 `struct user_regs_struct' exist.
1997 * config.in: Regenerated.
1998 * configure: Likewise.
2000 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2002 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2004 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2005 (get_next_pcs_syscall_next_pc): Likewise.
2007 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2009 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2010 * nto-x86-low.c: Likewise.
2012 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2014 * Makefile.in: Include disable-implicit-rules.mk.
2016 2016-11-23 Pedro Alves <palves@redhat.com>
2018 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2019 (debug_vprintf): Use std::chrono::steady_clock instead of
2020 gettimeofday. Use '.' instead of ':'.
2021 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2022 (get_timestamp): Use std::chrono::steady_clock instead of
2025 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2027 * Makefile.in: Fix whitespace formatting.
2029 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2031 * Makefile.in (SFILES, OBS): Flatten list and order
2034 2016-11-23 Pedro Alves <palves@redhat.com>
2036 * event-loop.c (handle_file_event): Use warning.
2037 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2038 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2041 2016-11-23 Pedro Alves <palves@redhat.com>
2043 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2045 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2046 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2047 debug_printf and debug_flush for debug output.
2048 * server.c (handle_general_set): Likewise.
2049 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2052 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2054 * Makefile.in (.c.o): Replace rule with ...
2055 (%.o: %.c): ... this one.
2057 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2059 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2060 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2062 * configure.ac: Remove checks for the make program.
2063 * configure: Re-generate.
2065 2016-10-28 Pedro Alves <palves@redhat.com>
2067 * Makefile.in (CXX_DIALECT): Get from configure.
2068 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2069 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2070 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2071 * config.in: Regenerate.
2072 * configure: Regenerate.
2074 2016-10-27 Yao Qi <yao.qi@linaro.org>
2076 * linux-low.c (linux_supports_range_stepping): Return true if
2077 can_software_single_step return true.
2079 2016-10-27 Yao Qi <yao.qi@linaro.org>
2081 * inferiors.c (find_inferior_in_random): New function.
2082 * inferiors.h (find_inferior_in_random): Declare.
2083 * linux-low.c (linux_wait_for_event_filtered): Call
2084 find_inferior_in_random instead of find_inferior.
2086 2016-10-27 Yao Qi <yao.qi@linaro.org>
2088 * linux-low.c (linux_wait_1): If single-step breakpoints are
2089 inserted, remove them.
2091 2016-10-26 Pedro Alves <palves@redhat.com>
2093 * linux-low.c (handle_extended_wait): Link parent/child fork
2095 (linux_wait_1): Unlink them.
2096 (linux_set_resume_request): Ignore resume requests for
2097 already-resumed and unhandled fork child threads.
2098 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2099 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2101 (handle_v_requests) <vCont>: Don't call require_running.
2102 * server.h (in_queued_stop_replies): New declaration.
2104 2016-10-24 Yao Qi <yao.qi@linaro.org>
2107 * linux-aarch64-low.c (append_insns): Cast the return value to
2110 2016-10-10 Yao Qi <yao.qi@linaro.org>
2112 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2114 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2116 * target.c (target_supports_multi_process): New function, moved
2118 * target.h (target_supports_multi_process): ... here. Remove
2121 2016-10-05 Tom Tromey <tom@tromey.com>
2124 * tracepoint.c (handle_tracepoint_bkpts): Check
2125 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2127 2016-10-05 Yao Qi <yao.qi@linaro.org>
2129 * configure.srv: Update the path of arm-*.xml files.
2131 2016-10-05 Terry Guo <terry.guo@arm.com>
2132 Yao Qi <yao.qi@linaro.org>
2134 * Makefile.in: Adjust the path of rules.
2135 * configure.srv: Update the path of xml files.
2136 * regformats/arm-with-iwmmxt.dat: Regenerated.
2137 * regformats/arm-with-neon.dat: Likewise.
2138 * regformats/arm-with-vfpv2.dat: Likewise.
2139 * regformats/arm-with-vfpv3.dat Likewise.
2141 2016-09-30 Yao Qi <yao.qi@linaro.org>
2144 * target.c (target_stop_and_wait): Don't call
2145 target_continue_no_signal, use resume_stop instead.
2147 2016-09-26 Yao Qi <yao.qi@linaro.org>
2149 * linux-low.c (linux_wait_1): Call debug_exit.
2151 2016-09-23 Pedro Alves <palves@redhat.com>
2153 * Makefile.in (SFILES): Add common/new-op.c.
2154 (OBS): Add common/new-op.o.
2155 (new-op.o): New rule.
2157 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2159 * .gitinore: Ignore more files.
2161 2016-09-21 Yao Qi <yao.qi@linaro.org>
2163 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2166 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2168 * server.c (start_inferior): Call target_mourn_inferior instead of
2169 mourn_inferior; pass ptid_t argument to it.
2171 (handle_target_event): Likewise.
2172 * target.c (target_mourn_inferior): New function.
2173 * target.h (mourn_inferior): Delete macro.
2175 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2177 * linux-low.c (lwp_is_stepping): New function.
2179 2016-09-06 Carl Love <cel@us.ibm.com>
2181 * server.c (start_inferior): Fixed comment, requested comment change
2182 didn't get updated correctly. Removed reference to ptrace () call as
2183 it is only true on Linux systems.
2185 2016-09-06 Carl Love <cel@us.ibm.com>
2187 * server.c (start_inferior): Do not call
2188 function target_post_create_inferior () if the
2189 inferior process has already exited.
2191 2016-09-05 Pedro Alves <palves@redhat.com>
2193 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2194 (COMPILE.pre, CC_LD): Use CXX directly.
2195 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2196 * acinclude.m4: Don't include build-with-cxx.m4.
2197 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2198 * configure: Regenerate.
2200 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2203 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2204 call writing data to own_buf.
2206 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2208 * target.c (mywait): Call target_wait instead of
2210 (target_wait): New function.
2212 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2214 * server.c (start_inferior): New variable 'ptid'. Replace calls
2215 to the_target->resume by target_continue{,_no_signal}, depending
2217 * target.c (target_stop_and_wait): Call target_continue_no_signal
2218 instead of the_target->resume.
2219 (target_continue): New function.
2221 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2223 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2225 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2228 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2230 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2231 * linux-arm-low.c (ps_get_thread_area): Likewise.
2232 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2233 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2234 * linux-mips-low.c (ps_get_thread_area): Likewise.
2235 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2236 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2237 * linux-x86-low.c (ps_get_thread_area): Likewise.
2238 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2240 2016-08-19 Pedro Alves <palves@redhat.com>
2242 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2244 2016-08-19 Pedro Alves <palves@redhat.com>
2246 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2247 comment. Use memcpy instead of casting through unsigned long.
2249 2016-08-19 Pedro Alves <palves@redhat.com>
2251 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2252 allocating around 0x80000000.
2254 2016-08-19 Pedro Alves <palves@redhat.com>
2257 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2258 (x32-avx512-linux-ipa.o): New rules.
2259 * configure.ac (x86_64-*-linux*): New x32 check.
2260 * configure.srv (ipa_x32_linux_regobj): New.
2261 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2262 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2264 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2266 * configure: Regenerate.
2268 2016-08-09 Pedro Alves <palves@redhat.com>
2271 * Makefile.in (OBS): Add signals-state-save-restore.o.
2272 (signals-state-save-restore.o): New rule.
2273 * config.in: Regenerate.
2274 * configure: Regenerate.
2275 * linux-low.c: Include "signals-state-save-restore.h".
2276 (linux_create_inferior): Call
2277 restore_original_signals_state.
2278 * server.c: Include "dispositions-save-restore.h".
2279 (captured_main): Call save_original_signals_state.
2281 2016-08-05 Pedro Alves <palves@redhat.com>
2283 * configure: Regenerate.
2285 2016-08-04 Yao Qi <yao.qi@linaro.org>
2287 * linux-low.c (regsets_fetch_inferior_registers): Check
2288 errno is ESRCH or not.
2290 2016-08-02 Yao Qi <yao.qi@linaro.org>
2292 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2293 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2294 (thread_db_load_search): Update.
2295 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2296 td_ta_set_event and td_ta_event_getmsg.
2298 2016-07-26 Pedro Alves <palves@redhat.com>
2301 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2302 of unsigned long for 64-bit registers and use uint32_t instead of
2303 unsigned int for 32-bit registers.
2305 2016-07-26 Pedro Alves <palves@redhat.com>
2307 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2310 2016-07-21 Tom Tromey <tom@tromey.com>
2312 * configure: Rebuild.
2314 2016-07-21 Yao Qi <yao.qi@linaro.org>
2316 * mem-break.c (find_gdb_breakpoint): Cast bp to
2317 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2319 2016-07-21 Yao Qi <yao.qi@linaro.org>
2321 * server.c (handle_v_requests): Support s and S actions
2322 if target_supports_software_single_step return true.
2324 2016-07-21 Yao Qi <yao.qi@linaro.org>
2326 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2327 is resume_step, call maybe_hw_step.
2328 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2330 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2332 (proceed_one_lwp): If resume request is resume_step, install
2333 reinsert breakpoints and call maybe_hw_step.
2335 2016-07-21 Yao Qi <yao.qi@linaro.org>
2337 * linux-low.c (proceed_one_lwp): Declare.
2338 (linux_resume_one_thread): Remove local variable 'step'.
2339 Lift code enqueue signal. Call proceed_one_lwp instead of
2340 linux_resume_one_lwp.
2342 2016-07-21 Yao Qi <yao.qi@linaro.org>
2344 * linux-low.c (linux_resume_one_thread): Call
2345 enqueue_pending_signal.
2347 2016-07-21 Yao Qi <yao.qi@linaro.org>
2349 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2350 * inferiors.c (do_restore_current_thread_cleanup): New function.
2351 (make_cleanup_restore_current_thread): Likewise.
2352 * linux-low.c (install_software_single_step_breakpoints): Call
2353 make_cleanup_restore_current_thread. Switch current_thread to
2356 2016-07-21 Yao Qi <yao.qi@linaro.org>
2358 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2359 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2360 (clone_one_breakpoint): Likewise.
2361 (delete_reinsert_breakpoints): Change parameter to thread.
2363 (has_reinsert_breakpoints): Likewise.
2364 (uninsert_reinsert_breakpoints): Likewise.
2365 (reinsert_reinsert_breakpoints): Likewise.
2366 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2367 (delete_reinsert_breakpoints): Likewise.
2368 (reinsert_reinsert_breakpoints): Likewise.
2369 (uninsert_reinsert_breakpoints): Likewise.
2370 (has_reinsert_breakpoints): Likewise.
2372 2016-07-21 Yao Qi <yao.qi@linaro.org>
2374 * inferiors.c (get_thread_process): Make parameter const.
2375 * inferiors.h (get_thread_process): Update declaration.
2376 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2377 Add new parameters child_thread and parent_thread. Callers
2379 * mem-break.h (clone_all_breakpoints): Update declaration.
2381 2016-07-21 Yao Qi <yao.qi@linaro.org>
2383 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2384 <command_list, handler>: Remove.
2385 (struct gdb_breakpoint): New.
2386 (struct other_breakpoint): New.
2387 (struct reinsert_breakpoint): New.
2388 (is_gdb_breakpoint): New function.
2389 (any_persistent_commands): Update command_list if
2390 is_gdb_breakpoint returns true.
2391 (set_breakpoint): Create breakpoints according to their types.
2392 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2393 (set_gdb_breakpoint_1): Likewise.
2394 (set_gdb_breakpoint): Likewise.
2395 (clear_breakpoint_conditions): Change parameter type to
2396 'struct gdb_breakpoint *'.
2397 (clear_breakpoint_commands): Likewise.
2398 (clear_breakpoint_conditions_and_commands): Likewise.
2399 (add_condition_to_breakpoint): Likewise.
2400 (add_breakpoint_condition): Likewise.
2401 (add_commands_to_breakpoint): Likewise.
2402 (check_breakpoints): Check other_breakpoint.
2403 (clone_one_breakpoint): Clone breakpopint according to its type.
2404 * mem-break.h (struct gdb_breakpoint): Declare.
2405 (set_gdb_breakpoint): Update declaration.
2406 (clear_breakpoint_conditions_and_commands): Likewise.
2407 (add_breakpoint_condition): Likewise.
2408 (add_breakpoint_commands): Likewise.
2409 * server.c (process_point_options): Change parameter type to
2410 'struct gdb_breakpoint *'.
2412 2016-07-21 Yao Qi <yao.qi@linaro.org>
2414 * mem-break.c (set_breakpoint_at): Rename it to ...
2415 (set_breakpoint_type_at): ... it.
2416 (set_breakpoint_at): Call set_breakpoint_type_at.
2417 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2418 * mem-break.h (set_breakpoint_at): Update comments.
2420 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2422 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2424 (nios2_store_gregset): Likewise.
2426 2016-07-01 Pedro Alves <palves@redhat.com>
2427 Antoine Tremblay <antoine.tremblay@ericsson.com>
2429 * linux-low.c: Change interface to take the target lwp_info
2430 pointer directly and return void. Handle detaching from a zombie
2432 (linux_detach_lwp_callback): New function.
2433 (linux_detach): Detach from the leader thread after detaching from
2436 2016-06-28 Yao Qi <yao.qi@linaro.org>
2438 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2439 for variable new_offset.
2440 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2441 (aarch64_ftrace_insn_reloc_cb): Likewise.
2442 (aarch64_ftrace_insn_reloc_tb): Likewise.
2443 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2444 PRIx64 instead of PRIx32.
2446 2016-06-28 Yao Qi <yao.qi@linaro.org>
2448 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2449 (the_low_target): Install arm_get_syscall_trapinfo.
2451 2016-06-28 Yao Qi <yao.qi@linaro.org>
2453 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2455 (the_low_target): Install aarch64_get_syscall_trapinfo.
2457 2016-06-28 Yao Qi <yao.qi@linaro.org>
2459 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2461 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2462 Remove parameter sysno.
2463 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2466 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2468 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2469 (s390_emit_ne_goto): Likewise.
2470 (s390_emit_lt_goto): Likewise.
2471 (s390_emit_le_goto): Likewise.
2472 (s390_emit_gt_goto): Likewise.
2473 (s390_emit_ge_goto): Likewise.
2474 (s390x_emit_eq_goto): Likewise.
2475 (s390x_emit_ne_goto): Likewise.
2476 (s390x_emit_lt_goto): Likewise.
2477 (s390x_emit_le_goto): Likewise.
2478 (s390x_emit_gt_goto): Likewise.
2479 (s390x_emit_ge_goto): Likewise.
2480 (s390_emit_ops_impl): Mark variable static.
2481 (s390x_emit_ops): Likewise.
2483 2016-06-17 Yao Qi <yao.qi@linaro.org>
2485 * linux-low.c (handle_extended_wait): Call
2486 uninsert_reinsert_breakpoints for the parent process. Remove
2487 reinsert breakpoints from the child process. Reinsert them to
2488 the parent process when vfork is done.
2489 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2490 (reinsert_reinsert_breakpoints): New function.
2491 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2492 (reinsert_reinsert_breakpoints): Declare.
2494 2016-06-17 Yao Qi <yao.qi@linaro.org>
2496 * linux-low.c (handle_extended_wait): If the parent is doing
2497 step-over, remove the reinsert breakpoints from the forked child.
2499 2016-06-17 Yao Qi <yao.qi@linaro.org>
2501 * linux-low.c (unsuspend_all_lwps): Declare.
2502 (linux_low_filter_event): If thread exited, call finish_step_over.
2503 If step-over is finished, unsuspend other threads.
2505 2016-06-17 Yao Qi <yao.qi@linaro.org>
2507 * linux-low.c (linux_resume_one_lwp_throw): Assert
2508 has_reinsert_breakpoints returns false.
2509 * mem-break.c (delete_disabled_breakpoints): Assert
2510 bp type isn't reinsert_breakpoint.
2512 2016-06-17 Yao Qi <yao.qi@linaro.org>
2514 * linux-low.c (maybe_hw_step): New function.
2515 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2516 (finish_step_over): Switch current_thread to lwp temporarily,
2517 and assert has_reinsert_breakpoints returns true.
2518 (proceed_one_lwp): Call maybe_hw_step.
2519 * mem-break.c (has_reinsert_breakpoints): New function.
2520 * mem-break.h (has_reinsert_breakpoints): Declare.
2522 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2524 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2526 2016-05-17 Yao Qi <yao.qi@linaro.org>
2528 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2529 instead of find_inferior.
2531 2016-05-05 Yao Qi <yao.qi@linaro.org>
2533 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2534 Initialize res to zero.
2536 2016-05-05 Yao Qi <yao.qi@linaro.org>
2538 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2541 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2543 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2544 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2545 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2547 2016-04-28 Par Olsson <par.olsson@windriver.com>
2548 Simon Marchi <simon.marchi@ericsson.com>
2550 * tracepoint.c (write_inferior_int8): New function.
2551 (cmd_qtenable_disable): Write enable flag using
2552 write_inferior_int8.
2554 2016-04-25 Yao Qi <yao.qi@linaro.org>
2556 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2557 (need_step_over_p): Return zero if the LWP has pending signals
2558 can be delivered on software single step target.
2560 2016-04-25 Yao Qi <yao.qi@linaro.org>
2562 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2563 return instead of error.
2565 2016-04-22 Yao Qi <yao.qi@linaro.org>
2567 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2570 2016-04-22 Yao Qi <yao.qi@linaro.org>
2572 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2573 signal when stepping over breakpoint with software single
2576 2016-04-21 Pedro Alves <palves@redhat.com>
2578 * linux-s390-low.c (s390_collect_ptrace_register)
2579 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2581 (s390_check_regset): Use void * instead of gdb_byte *.
2583 2016-04-20 Pedro Alves <palves@redhat.com>
2585 * configure: Renegerate.
2587 2016-04-20 Yao Qi <yao.qi@linaro.org>
2589 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2590 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2592 (arm_store_gregset): Likewise.
2594 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2596 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2597 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2598 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2599 (amd64-avx-mpx-linux.c): New rules.
2600 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2601 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2602 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2603 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2604 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2605 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2606 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2607 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2608 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2609 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2610 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2611 * linux-x86-low.c (x86_linux_read_description): Add case for
2612 X86_XSTATE_AVX_MPX_MASK.
2613 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2614 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2615 init_registers_i386_avx_mpx_linux.
2616 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2617 (initialize_low_tracepoint): Call
2618 init_registers_i386_avx_mpx_linux.
2619 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2620 (initialize_low_tracepoint): Call
2621 init_registers_amd64_avx_mpx_linux.
2622 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2623 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2624 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2627 2016-04-18 Pedro Alves <palves@redhat.com>
2629 * configure: Regenerate.
2631 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2633 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2634 (aarch64_emit_sub): Likewise.
2636 2016-04-12 Pedro Alves <palves@redhat.com>
2638 * utils.c (prepare_to_throw_exception): Delete.
2640 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2642 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2644 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2646 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2648 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2650 * linux-aarch64-ipa.c: Add <elf.h> include.
2651 * linux-ppc-ipa.c: Add <elf.h> include.
2652 * linux-s390-ipa.c: Add <elf.h> include.
2654 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2656 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2657 (get_raw_reg_ptr): Likewise.
2658 (get_trace_state_variable_value_ptr): Likewise.
2659 (set_trace_state_variable_value_ptr): Likewise.
2660 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2663 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2664 Marcin Kościelnicki <koriakin@0x04.net>
2667 * linux-ppc-low.c (emit_insns): New function.
2668 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2669 (ppc_emit_prologue): New function.
2670 (ppc_emit_epilogue): New function.
2671 (ppc_emit_add): New function.
2672 (ppc_emit_sub): New function.
2673 (ppc_emit_mul): New function.
2674 (ppc_emit_lsh): New function.
2675 (ppc_emit_rsh_signed): New function.
2676 (ppc_emit_rsh_unsigned): New function.
2677 (ppc_emit_ext): New function.
2678 (ppc_emit_zero_ext): New function.
2679 (ppc_emit_log_not): New function.
2680 (ppc_emit_bit_and): New function.
2681 (ppc_emit_bit_or): New function.
2682 (ppc_emit_bit_xor): New function.
2683 (ppc_emit_bit_not): New function.
2684 (ppc_emit_equal): New function.
2685 (ppc_emit_less_signed): New function.
2686 (ppc_emit_less_unsigned): New function.
2687 (ppc_emit_ref): New function.
2688 (ppc_emit_const): New function.
2689 (ppc_emit_reg): New function.
2690 (ppc_emit_pop): New function.
2691 (ppc_emit_stack_flush): New function.
2692 (ppc_emit_swap): New function.
2693 (ppc_emit_stack_adjust): New function.
2694 (ppc_emit_call): New function.
2695 (ppc_emit_int_call_1): New function.
2696 (ppc_emit_void_call_2): New function.
2697 (ppc_emit_if_goto): New function.
2698 (ppc_emit_goto): New function.
2699 (ppc_emit_eq_goto): New function.
2700 (ppc_emit_ne_goto): New function.
2701 (ppc_emit_lt_goto): New function.
2702 (ppc_emit_le_goto): New function.
2703 (ppc_emit_gt_goto): New function.
2704 (ppc_emit_ge_goto): New function.
2705 (ppc_write_goto_address): New function.
2706 (ppc_emit_ops_impl): New static variable.
2707 (ppc64v1_emit_prologue): New function.
2708 (ppc64v2_emit_prologue): New function.
2709 (ppc64_emit_epilogue): New function.
2710 (ppc64_emit_add): New function.
2711 (ppc64_emit_sub): New function.
2712 (ppc64_emit_mul): New function.
2713 (ppc64_emit_lsh): New function.
2714 (ppc64_emit_rsh_signed): New function.
2715 (ppc64_emit_rsh_unsigned): New function.
2716 (ppc64_emit_ext): New function.
2717 (ppc64_emit_zero_ext): New function.
2718 (ppc64_emit_log_not): New function.
2719 (ppc64_emit_bit_and): New function.
2720 (ppc64_emit_bit_or): New function.
2721 (ppc64_emit_bit_xor): New function.
2722 (ppc64_emit_bit_not): New function.
2723 (ppc64_emit_equal): New function.
2724 (ppc64_emit_less_signed): New function.
2725 (ppc64_emit_less_unsigned): New function.
2726 (ppc64_emit_ref): New function.
2727 (ppc64_emit_const): New function.
2728 (ppc64v1_emit_reg): New function.
2729 (ppc64v2_emit_reg): New function.
2730 (ppc64_emit_pop): New function.
2731 (ppc64_emit_stack_flush): New function.
2732 (ppc64_emit_swap): New function.
2733 (ppc64v1_emit_call): New function.
2734 (ppc64v2_emit_call): New function.
2735 (ppc64v1_emit_int_call_1): New function.
2736 (ppc64v2_emit_int_call_1): New function.
2737 (ppc64v1_emit_void_call_2): New function.
2738 (ppc64v2_emit_void_call_2): New function.
2739 (ppc64_emit_if_goto): New function.
2740 (ppc64_emit_eq_goto): New function.
2741 (ppc64_emit_ne_goto): New function.
2742 (ppc64_emit_lt_goto): New function.
2743 (ppc64_emit_le_goto): New function.
2744 (ppc64_emit_gt_goto): New function.
2745 (ppc64_emit_ge_goto): New function.
2746 (ppc64v1_emit_ops_impl): New static variable.
2747 (ppc64v2_emit_ops_impl): New static variable.
2748 (ppc_emit_ops): New function.
2749 (linux_low_target): Wire in ppc_emit_ops.
2751 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2752 Marcin Kościelnicki <koriakin@0x04.net>
2755 * Makefile.in: Add powerpc-*-ipa.o
2756 * configure.srv: Add ipa_obj for powerpc*-linux.
2757 * linux-ppc-ipa.c: New file.
2758 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2760 (PPC_FIELD): New macro.
2761 (PPC_SEXT): New macro.
2762 (PPC_OP6): New macro.
2763 (PPC_BO): New macro.
2764 (PPC_LI): New macro.
2765 (PPC_BD): New macro.
2766 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2767 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2768 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2769 (ppc_get_thread_area): New function.
2770 (is_elfv2_inferior): New function.
2771 (gen_ds_form): New function.
2772 (GEN_STD): New macro.
2773 (GEN_STDU): New macro.
2774 (GEN_LD): New macro.
2775 (GEN_LDU): New macro.
2776 (gen_d_form): New function.
2777 (GEN_ADDI): New macro.
2778 (GEN_ADDIS): New macro.
2779 (GEN_LI): New macro.
2780 (GEN_LIS): New macro.
2781 (GEN_ORI): New macro.
2782 (GEN_ORIS): New macro.
2783 (GEN_LWZ): New macro.
2784 (GEN_STW): New macro.
2785 (GEN_STWU): New macro.
2786 (gen_xfx_form): New function.
2787 (GEN_MFSPR): New macro.
2788 (GEN_MTSPR): New macro.
2789 (GEN_MFCR): New macro.
2790 (GEN_MTCR): New macro.
2791 (GEN_SYNC): New macro.
2792 (GEN_LWSYNC): New macro.
2793 (gen_x_form): New function.
2794 (GEN_OR): New macro.
2795 (GEN_MR): New macro.
2796 (GEN_LWARX): New macro.
2797 (GEN_STWCX): New macro.
2798 (GEN_CMPW): New macro.
2799 (gen_md_form): New function.
2800 (GEN_RLDICL): New macro.
2801 (GEN_RLDICR): New macro.
2802 (gen_i_form): New function.
2804 (GEN_BL): New macro.
2805 (gen_b_form): New function.
2806 (GEN_BNE): New macro.
2807 (GEN_LOAD): New macro.
2808 (GEN_STORE): New macro.
2809 (gen_limm): New function.
2810 (gen_atomic_xchg): New function.
2811 (gen_call): New function.
2812 (ppc_relocate_instruction): New function.
2813 (ppc_install_fast_tracepoint_jump_pad): New function.
2814 (ppc_get_min_fast_tracepoint_insn_len): New function.
2815 (ppc_get_ipa_tdesc_idx): New function.
2816 (the_low_target): Wire in the new functions.
2817 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2819 * linux-ppc-tdesc.h: New file.
2821 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2823 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2824 (alloc_jump_pad_buffer): New function.
2825 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2826 (alloc_jump_pad_buffer): New function.
2827 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2828 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2829 (alloc_jump_pad_buffer): New function.
2830 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2831 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2832 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2833 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2835 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2837 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2838 * linux-amd64-ipa.c: Likewise.
2839 * linux-i386-ipa.c: Likewise.
2840 * linux-s390-ipa.c: Likewise.
2841 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2842 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2843 set_trace_state_variable_value_ptr.
2844 (struct ipa_sym_addresses): Likewise.
2845 (symbol_list): Likewise.
2846 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2847 accessing gdb_collect directly.
2848 (gdb_collect_ptr_type): New typedef.
2849 (get_raw_reg_ptr_type): New typedef.
2850 (get_trace_state_variable_value_ptr_type): New typedef.
2851 (set_trace_state_variable_value_ptr_type): New typedef.
2852 (gdb_collect_ptr): New global.
2853 (get_raw_reg_ptr): New global.
2854 (get_trace_state_variable_value_ptr): New global.
2855 (set_trace_state_variable_value_ptr): New global.
2856 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2857 accessing get_raw_reg directly.
2858 (get_get_tsv_func_addr): Likewise for
2859 get_trace_state_variable_value_ptr.
2860 (get_set_tsv_func_addr): Likewise for
2861 set_trace_state_variable_value_ptr.
2862 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2864 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2866 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2868 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2870 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2872 (relocate_instruction): Remove own_buf.
2873 * server.c (own_buf): Make global.
2874 (handle_v_requests): Make global.
2875 * server.h (own_buf): New declaration.
2876 (handle_v_requests): New prototype.
2878 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2881 * linux-s390-low.c (add_insns): New function.
2882 (s390_emit_prologue): New function.
2883 (s390_emit_epilogue): New function.
2884 (s390_emit_add): New function.
2885 (s390_emit_sub): New function.
2886 (s390_emit_mul): New function.
2887 (s390_emit_lsh): New function.
2888 (s390_emit_rsh_signed): New function.
2889 (s390_emit_rsh_unsigned): New function.
2890 (s390_emit_ext): New function.
2891 (s390_emit_log_not): New function.
2892 (s390_emit_bit_and): New function.
2893 (s390_emit_bit_or): New function.
2894 (s390_emit_bit_xor): New function.
2895 (s390_emit_bit_not): New function.
2896 (s390_emit_equal): New function.
2897 (s390_emit_less_signed): New function.
2898 (s390_emit_less_unsigned): New function.
2899 (s390_emit_ref): New function.
2900 (s390_emit_if_goto): New function.
2901 (s390_emit_goto): New function.
2902 (s390_write_goto_address): New function.
2903 (s390_emit_litpool): New function.
2904 (s390_emit_const): New function.
2905 (s390_emit_call): New function.
2906 (s390_emit_reg): New function.
2907 (s390_emit_pop): New function.
2908 (s390_emit_stack_flush): New function.
2909 (s390_emit_zero_ext): New function.
2910 (s390_emit_swap): New function.
2911 (s390_emit_stack_adjust): New function.
2912 (s390_emit_set_r2): New function.
2913 (s390_emit_int_call_1): New function.
2914 (s390_emit_void_call_2): New function.
2915 (s390_emit_eq_goto): New function.
2916 (s390_emit_ne_goto): New function.
2917 (s390_emit_lt_goto): New function.
2918 (s390_emit_le_goto): New function.
2919 (s390_emit_gt_goto): New function.
2920 (s390_emit_ge_goto): New function.
2921 (s390x_emit_prologue): New function.
2922 (s390x_emit_epilogue): New function.
2923 (s390x_emit_add): New function.
2924 (s390x_emit_sub): New function.
2925 (s390x_emit_mul): New function.
2926 (s390x_emit_lsh): New function.
2927 (s390x_emit_rsh_signed): New function.
2928 (s390x_emit_rsh_unsigned): New function.
2929 (s390x_emit_ext): New function.
2930 (s390x_emit_log_not): New function.
2931 (s390x_emit_bit_and): New function.
2932 (s390x_emit_bit_or): New function.
2933 (s390x_emit_bit_xor): New function.
2934 (s390x_emit_bit_not): New function.
2935 (s390x_emit_equal): New function.
2936 (s390x_emit_less_signed): New function.
2937 (s390x_emit_less_unsigned): New function.
2938 (s390x_emit_ref): New function.
2939 (s390x_emit_if_goto): New function.
2940 (s390x_emit_const): New function.
2941 (s390x_emit_call): New function.
2942 (s390x_emit_reg): New function.
2943 (s390x_emit_pop): New function.
2944 (s390x_emit_stack_flush): New function.
2945 (s390x_emit_zero_ext): New function.
2946 (s390x_emit_swap): New function.
2947 (s390x_emit_stack_adjust): New function.
2948 (s390x_emit_int_call_1): New function.
2949 (s390x_emit_void_call_2): New function.
2950 (s390x_emit_eq_goto): New function.
2951 (s390x_emit_ne_goto): New function.
2952 (s390x_emit_lt_goto): New function.
2953 (s390x_emit_le_goto): New function.
2954 (s390x_emit_gt_goto): New function.
2955 (s390x_emit_ge_goto): New function.
2956 (s390_emit_ops): New function.
2957 (struct linux_target_ops): Fill in emit_ops hook.
2959 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2962 * Makefile.in: Add s390 IPA files.
2963 * configure.srv: Build IPA for s390.
2964 * linux-s390-ipa.c: New file.
2965 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2966 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2967 (tdesc_s390_linux32): Likewise.
2968 (init_registers_s390_linux32v1): Likewise.
2969 (tdesc_s390_linux32v1): Likewise.
2970 (init_registers_s390_linux32v2): Likewise.
2971 (tdesc_s390_linux32v2): Likewise.
2972 (init_registers_s390_linux64): Likewise.
2973 (tdesc_s390_linux64): Likewise.
2974 (init_registers_s390_linux64v1): Likewise.
2975 (tdesc_s390_linux64v1): Likewise.
2976 (init_registers_s390_linux64v2): Likewise.
2977 (tdesc_s390_linux64v2): Likewise.
2978 (init_registers_s390_te_linux64): Likewise.
2979 (tdesc_s390_te_linux64): Likewise.
2980 (init_registers_s390_vx_linux64): Likewise.
2981 (tdesc_s390_vx_linux64): Likewise.
2982 (init_registers_s390_tevx_linux64): Likewise.
2983 (tdesc_s390_tevx_linux64): Likewise.
2984 (init_registers_s390x_linux64): Likewise.
2985 (tdesc_s390x_linux64): Likewise.
2986 (init_registers_s390x_linux64v1): Likewise.
2987 (tdesc_s390x_linux64v1): Likewise.
2988 (init_registers_s390x_linux64v2): Likewise.
2989 (tdesc_s390x_linux64v2): Likewise.
2990 (init_registers_s390x_te_linux64): Likewise.
2991 (tdesc_s390x_te_linux64): Likewise.
2992 (init_registers_s390x_vx_linux64): Likewise.
2993 (tdesc_s390x_vx_linux64): Likewise.
2994 (init_registers_s390x_tevx_linux64): Likewise.
2995 (tdesc_s390x_tevx_linux64): Likewise.
2996 (have_hwcap_s390_vx): New static variable.
2997 (s390_arch_setup): Fill have_hwcap_s390_vx.
2998 (s390_get_thread_area): New function.
2999 (s390_ft_entry_gpr_esa): New const.
3000 (s390_ft_entry_gpr_zarch): New const.
3001 (s390_ft_entry_misc): New const.
3002 (s390_ft_entry_fr): New const.
3003 (s390_ft_entry_vr): New const.
3004 (s390_ft_main_31): New const.
3005 (s390_ft_main_64): New const.
3006 (s390_ft_exit_fr): New const.
3007 (s390_ft_exit_vr): New const.
3008 (s390_ft_exit_misc): New const.
3009 (s390_ft_exit_gpr_esa): New const.
3010 (s390_ft_exit_gpr_zarch): New const.
3011 (append_insns): New function.
3012 (s390_relocate_instruction): New function.
3013 (s390_install_fast_tracepoint_jump_pad): New function.
3014 (s390_get_min_fast_tracepoint_insn_len): New function.
3015 (s390_get_ipa_tdesc_idx): New function.
3016 (struct linux_target_ops): Wire in the above functions.
3017 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3018 * linux-s390-tdesc.h: New file.
3020 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3022 * linux-s390-low.c (s390_supports_tracepoints): New function.
3023 (struct linux_target_ops): Fill supports_tracepoints hook.
3025 2016-03-18 Yao Qi <yao.qi@linaro.org>
3027 * linux-low.c (lwp_signal_can_be_delivered): New function.
3028 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3030 2016-03-18 Yao Qi <yao.qi@linaro.org>
3032 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3033 0 if signal is enqueued. Remove 'signal' from one debugging
3034 message. Move one debugging message to some lines below.
3035 Remove code setting 'signal' to 0.
3037 2016-03-18 Yao Qi <yao.qi@linaro.org>
3039 * linux-low.c (linux_low_filter_event): Remove redundant
3040 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3042 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3044 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3045 (struct linux_target_ops): Wire in the above.
3047 2016-03-03 Yao Qi <yao.qi@linaro.org>
3049 * linux-low.c: Update comments to start_step_over.
3051 2016-03-03 Yao Qi <yao.qi@linaro.org>
3054 * linux-low.c (handle_extended_wait): Set child suspended
3055 if event_lwp->bp_reinsert isn't zero.
3057 2016-03-02 Yao Qi <yao.qi@linaro.org>
3059 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3060 enqueue_pending_signal.
3062 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3064 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3067 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3069 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3070 (s390_regmap_3264) [!__s390x__]: New global.
3071 (s390_collect_ptrace_register): Skip map entries containing -1.
3072 (s390_supply_ptrace_register): Ditto.
3073 (s390_fill_gprs_high): New function.
3074 (s390_store_gprs_high): New function.
3075 (s390_regsets): Add NT_S390_HIGH_GPRS.
3076 (s390_get_hwcap): Enable on 31-bit.
3077 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3078 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3079 Detect NT_S390_HIGH_GPRS.
3080 (s390_usrregs_info_3264): Enable on 31-bit.
3081 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3082 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3084 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3087 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3088 * configure.srv: Ditto.
3089 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3090 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3091 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3092 (init_registers_amd64_linux): Remove prototype.
3093 (tdesc_amd64_linux): Remove declaration.
3094 (get_ipa_tdesc): New function.
3095 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3096 initialize remaining tdescs.
3097 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3098 (init_registers_i386_linux): Remove prototype.
3099 (tdesc_i386_linux): Remove declaration.
3100 (get_ipa_tdesc): New function.
3101 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3102 initialize remaining tdescs.
3103 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3104 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3105 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3106 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3107 (x86_get_ipa_tdesc_idx): New function.
3108 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3109 * linux-x86-tdesc.h: New file.
3110 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3111 (target_get_ipa_tdesc_idx): New macro.
3112 * tracepoint.c (ipa_tdesc_idx): New macro.
3113 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3114 (symbol_list): Add ipa_tdesc_idx.
3115 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3116 (ipa_tdesc): Remove.
3117 (ipa_tdesc_idx): New variable.
3118 (get_context_regcache): Use get_ipa_tdesc.
3119 (gdb_collect): Ditto.
3121 * tracepoint.h (get_ipa_tdesc): New prototype.
3122 (ipa_tdesc): Remove.
3124 2016-02-24 Pedro Alves <palves@redhat.com>
3126 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3127 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3128 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3129 Factor out common code between the USE_SIGTRAP_SIGINFO and
3130 !USE_SIGTRAP_SIGINFO blocks.
3131 (linux_low_filter_event): Call save_stop_reason instead of
3132 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3134 (linux_wait_1): Update comments.
3136 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3138 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3139 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3140 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3141 ppc_insert_point, ppc_remove_point.
3143 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3145 * linux-s390-low.c (s390_supports_z_point_type): New function.
3146 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3148 2016-02-16 Yao Qi <yao.qi@linaro.org>
3150 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3151 PC. Get pc from regcache_read_pc.
3153 2016-02-12 Yao Qi <yao.qi@linaro.org>
3155 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3156 or linux_get_pc_32bit.
3157 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3159 2016-02-12 Yao Qi <yao.qi@linaro.org>
3161 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3162 arm_linux_get_next_pcs_fixup.
3164 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3166 * tracepoint.c (x_tracepoint_action_download): Change
3167 write_inferior_data_ptr to write_inferior_data_pointer.
3168 (cmd_qtstart): Likewise.
3169 (write_inferior_data_ptr): Remove.
3170 (download_agent_expr): Change write_inferior_data_ptr to
3171 write_inferior_data_pointer.
3172 (download_tracepoint_1): Likewise.
3173 (download_tracepoint): Likewise.
3174 (download_trace_state_variables): Likewise.
3176 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3177 Marcin Kościelnicki <koriakin@0x04.net>
3179 * tracepoint.c (struct tracepoint_action_ops): Remove.
3180 (struct tracepoint_action): Remove ops.
3181 (m_tracepoint_action_download, r_tracepoint_action_download)
3182 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3183 size and offset accordingly.
3184 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3185 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3186 (tracepoint_action_send, tracepoint_action_download): New functions.
3187 Helpers for trace action handlers.
3188 (add_tracepoint_action): Remove setup actions ops.
3189 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3191 2016-02-10 Yao Qi <yao.qi@linaro.org>
3193 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3195 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3197 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3199 * configure: Regenerate.
3201 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3203 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3204 void * to gdb_byte *.
3205 * linux-low.c (siginfo_fixup): Likewise.
3206 (linux_xfer_siginfo): Likewise.
3207 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3209 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3211 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3213 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3215 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3217 * linux-x86-low.c [__x86_64__]: Include
3218 "nat/amd64-linux-siginfo.h".
3219 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3220 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3221 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3222 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3223 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3224 (cpt_si_fd, si_timerid, si_overrun): Move from
3225 nat/amd64-linux-siginfo.c.
3226 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3228 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3230 * server.c (skip_to_semicolon): Remove.
3231 (process_point_options): Use strchrnul instead of
3234 2016-01-26 Yao Qi <yao.qi@linaro.org>
3236 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3237 * linux-low.c (install_software_single_step_breakpoints): Don't
3238 call regcache_read_pc.
3239 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3242 2016-01-26 Yao Qi <yao.qi@linaro.org>
3244 * linux-low.c (install_software_single_step_breakpoints): Call
3245 regcache_read_pc instead of get_pc.
3247 2016-01-26 Yao Qi <yao.qi@linaro.org>
3249 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3250 (unblock_async_io): Rename to ...
3251 (block_unblock_async_io): ... it. New function.
3252 (enable_async_io): Don't install SIGIO handler. Unblock it
3254 (disable_async_io): Don't ignore SIGIO. Block it instead.
3255 (initialize_async_io): Install SIGIO handler. Don't call
3258 2016-01-26 Yao Qi <yao.qi@linaro.org>
3260 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3261 first character is '\003', call *the_target->request_interrupt.
3263 2016-01-25 Yao Qi <yao.qi@linaro.org>
3265 * remote-utils.c (new_thread_notify): Remove.
3266 (dead_thread_notify): Likewise.
3267 * remote-utils.h (new_thread_notify): Remove declaration.
3268 (dead_thread_notify): Likewise.
3270 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3272 * gdb.trace/pending.exp: Fix expected message on continue.
3274 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3276 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3277 it works properly on big-endian machines where sizeof (CORE_ADDR)
3280 2016-01-21 Pedro Alves <palves@redhat.com>
3282 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3283 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3284 * configure: Regenerate.
3286 2016-01-21 Yao Qi <yao.qi@linaro.org>
3288 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3289 is_thumb and set it according to CPSR saved on the stack.
3290 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3291 arm_sigreturn_next_pc.
3293 2016-01-18 Yao Qi <yao.qi@linaro.org>
3295 * linux-low.c (linux_set_pc_64bit): New function.
3296 (linux_get_pc_64bit): New function.
3297 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3299 * linux-sparc-low.c (debug_threads): Remove declaration.
3300 (sparc_get_pc): Remove.
3301 (the_low_target): Use linux_get_pc_64bit instead of
3303 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3304 (the_low_target): Use linux_get_pc_64bit and
3307 2016-01-18 Yao Qi <yao.qi@linaro.org>
3309 * linux-arm-low.c (debug_threads): Remove declaration.
3310 (arm_get_pc, arm_set_pc): Remove.
3311 (the_low_target): Use linux_get_pc_32bit and
3313 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3314 (the_low_target): Use linux_get_pc_32bit and
3316 * linux-cris-low.c (debug_threads): Remove declaration.
3317 (cris_get_pc, cris_set_pc,): Remove.
3318 (the_low_target): Use linux_get_pc_32bit and
3320 * linux-crisv32-low.c (debug_threads): Remove declaration.
3321 (cris_get_pc, cris_set_pc): Remove.
3322 (the_low_target): Use linux_get_pc_32bit and
3324 * linux-low.c: Include inttypes.h.
3325 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3326 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3327 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3328 (the_low_target): Use linux_get_pc_32bit and
3330 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3331 (the_low_target): Use linux_get_pc_32bit and
3333 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3334 (the_low_target): Use linux_get_pc_32bit and
3336 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3337 (the_low_target): Use linux_get_pc_32bit and
3339 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3340 (the_low_target): Use linux_get_pc_32bit and
3343 2016-01-18 Gary Benson <gbenson@redhat.com>
3345 * configure.ac (AC_FUNC_FORK): New check.
3346 * config.in: Regenerate.
3347 * configure: Likewise.
3349 2016-01-14 Yao Qi <yao.qi@linaro.org>
3351 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3352 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3353 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3354 arm_get_next_pcs_ctor.
3356 2016-01-12 Josh Stone <jistone@redhat.com>
3357 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3359 * inferiors.h: Include "gdb_vecs.h".
3360 (struct process_info): Add syscalls_to_catch.
3361 * inferiors.c (remove_process): Free syscalls_to_catch.
3362 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3363 syscall_return stops.
3364 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3365 * server.c (handle_general_set): Handle QCatchSyscalls.
3366 (handle_query): Report support for QCatchSyscalls.
3367 * target.h (struct target_ops): Add supports_catch_syscall.
3368 (target_supports_catch_syscall): New macro.
3369 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3370 (struct lwp_info): Add syscall_state.
3371 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3372 Maintain syscall_state and syscalls_to_catch across exec.
3373 (get_syscall_trapinfo): New function, proxy to the_low_target.
3374 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3375 (linux_low_filter_event): Toggle syscall_state entry/return for
3376 syscall traps, and set it ignored for all others.
3377 (gdb_catching_syscalls_p): New function.
3378 (gdb_catch_this_syscall_p): New function.
3379 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3380 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3381 (linux_supports_catch_syscall): New function.
3382 (linux_target_ops): Install it.
3383 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3384 (the_low_target): Install it.
3386 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3388 * acinclude.m4: Include new ../warning.m4 file.
3389 * configure: Regenerated.
3390 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3392 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3394 * ax.c (is_goto_target): Mark static.
3395 * linux-low.c (register_addr): Likewise.
3396 (linux_fetch_registers, linux_store_registers): Likewise.
3397 * mem-break.c (any_persistent_commands): Fix old prototype.
3398 (add_commands_to_breakpoint): Mark static.
3399 * regcache.c (find_register_by_name): Delete unused func.
3400 * remote-utils.c (hex_or_minus_one): Mark static.
3401 * server.c (monitor_show_help): Mark static.
3402 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3403 handle_v_requests): Likewise.
3405 2016-01-12 Pedro Alves <palves@redhat.com>
3407 Remove use of the registered trademark symbol throughout.
3409 2016-01-08 Yao Qi <yao.qi@linaro.org>
3411 * remote-utils.c (getpkt): If c is '\003', call target hook
3414 2016-01-06 Yao Qi <yao.qi@linaro.org>
3416 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3417 linux-aarch32-low.c.
3418 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3419 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3420 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3421 (thumb2_breakpoint): Declare.
3422 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3423 linux-aarch32-low.h.
3424 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3425 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3426 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3428 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3430 * gdbreplay.c (gdbreplay_version): Change copyright year in
3432 * server.c (gdbserver_version): Likewise.
3434 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3436 * server.c (crc32_table): Delete.
3437 (crc32): Use libiberty's xcrc32 function.
3439 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3441 * lynx-low.c (lynx_delete_thread_callback): New function.
3442 (lynx_mourn): Properly delete our process and all of its
3443 threads. Remove call to clear_inferiors.
3445 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3447 * target.c (thread_search_callback): Add check that
3448 the thread_stopped target callback is not NULL before
3451 2015-12-21 Yao Qi <yao.qi@linaro.org>
3453 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3456 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3458 * server.c (handle_query): Call target_supports_software_single_step.
3460 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3462 * linux-low.c (single_step): New function.
3463 (linux_resume_one_lwp_throw): Call single_step.
3464 (start_step_over): Likewise.
3466 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3468 * Makefile.in (SFILES): Append arch/arm-linux.c,
3469 arch/arm-get-next-pcs.c.
3470 (arm-linux.o): New rule.
3471 (arm-get-next-pcs.o): New rule.
3472 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3474 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3475 to linux-aarch32-low.c.
3476 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3477 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3478 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3479 (thumb2_breakpoint_len): Likewise.
3480 (arm_is_thumb_mode): Make non-static.
3481 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3482 from linux-aarch32-low.c.
3483 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3484 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3485 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3486 (thumb2_breakpoint_len): Likewise.
3487 (arm_is_thumb_mode): New declaration.
3488 * linux-arm-low.c: Include arch/arm-linux.h
3489 aarch/arm-get-next-pcs.h, sys/syscall.h.
3490 (get_next_pcs_ops): New struct.
3491 (get_next_pcs_addr_bits_remove): New function.
3492 (get_next_pcs_is_thumb): New function.
3493 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3494 (arm_sigreturn_next_pc): Likewise.
3495 (get_next_pcs_syscall_next_pc): Likewise.
3496 (arm_gdbserver_get_next_pcs): Likewise.
3497 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3499 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3500 * server.h: Include gdb_vecs.h.
3502 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3504 * Makefile.in (SFILES): Append common/common-regcache.c.
3505 (OBS): Append common-regcache.o.
3506 (common-regcache.o): New rule.
3507 * regcache.c (init_register_cache): Initialize cache to
3509 (regcache_raw_read_unsigned): New function.
3510 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3511 register_status enum.
3513 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3515 * linux-aarch64-low.c (the_low_targets): Rename
3516 breakpoint_reinsert_addr to get_next_pcs.
3517 * linux-arm-low.c (the_low_targets): Likewise.
3518 * linux-bfin-low.c (the_low_targets): Likewise.
3519 * linux-cris-low.c (the_low_targets): Likewise.
3520 * linux-crisv32-low.c (the_low_targets): Likewise.
3521 * linux-low.c (can_software_single_step): Likewise.
3522 (install_software_single_step_breakpoints): New function.
3523 (start_step_over): Use install_software_single_step_breakpoints.
3524 * linux-low.h: New CORE_ADDR vector.
3525 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3527 * linux-mips-low.c (the_low_targets): Likewise.
3528 * linux-nios2-low.c (the_low_targets): Likewise.
3529 * linux-sparc-low.c (the_low_targets): Likewise.
3531 2015-12-17 Pedro Alves <palves@redhat.com>
3533 * linux-low.c (linux_kill_one_lwp): Remove references to
3535 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3537 (linux_init_signals): Delete.
3538 (initialize_low): Adjust.
3539 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3541 2015-12-16 Pedro Alves <palves@redhat.com>
3543 * configure.ac (compiler warning flags): When testing a
3544 -Wno-foo option, check whether -Wfoo works instead.
3545 * configure: Regenerate.
3547 2015-12-11 Don Breazeal <donb@codesourcery.com>
3549 * server.c (process_serial_event): Don't exit from gdbserver
3550 in remote mode if there are still active inferiors.
3552 2015-12-11 Yao Qi <yao.qi@linaro.org>
3554 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3555 arm_breakpoint_at if the process is 32-bit.
3557 2015-12-11 Yao Qi <yao.qi@linaro.org>
3559 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3562 2015-12-07 Yao Qi <yao.qi@linaro.org>
3564 * configure.srv: Append arm.o to srv_tgtobj for
3565 aarch64*-*-linux* target.
3566 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3567 from linux-arm-low.c.
3568 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3569 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3570 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3571 (thumb2_breakpoint_len): Likewise.
3572 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3573 (arm_breakpoint_kinds): Likewise.
3574 (arm_breakpoint_kind_from_pc): Likewise.
3575 (arm_sw_breakpoint_from_kind): Likewise.
3576 (arm_breakpoint_kind_from_current_state): Likewise.
3577 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3578 (arm_sw_breakpoint_from_kind): Declare.
3579 (arm_breakpoint_kind_from_current_state): Declare.
3580 (arm_breakpoint_at): Declare.
3581 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3582 arm_sw_breakpoint_from_kind if process is 32-bit.
3583 (aarch64_breakpoint_kind_from_pc): New function.
3584 (aarch64_breakpoint_kind_from_current_state): New function.
3585 (the_low_target): Initialize fields breakpoint_kind_from_pc
3586 and breakpoint_kind_from_current_state.
3587 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3588 linux-aarch32-low.c.
3589 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3590 (arm_breakpoint, arm_breakpoint_len): Likewise.
3591 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3592 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3593 (arm_is_thumb_mode): Likewise.
3594 (arm_breakpoint_at): Likewise.
3595 (arm_breakpoint_kind_from_pc): Likewise.
3596 (arm_sw_breakpoint_from_kind): Likewise.
3597 (arm_breakpoint_kind_from_current_state): Likewise.
3600 2015-08-04 Yao Qi <yao.qi@linaro.org>
3602 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3603 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3604 * server.c (extended_protocol): Remove "static".
3605 * server.h (extended_protocol): Declare it.
3607 2015-12-04 Josh Stone <jistone@redhat.com>
3609 * target.h (struct target_ops) <arch_setup>: Rename to ...
3610 (struct target_ops) <post_create_inferior>: ... this.
3611 (target_arch_setup): Rename to ...
3612 (target_post_create_inferior): ... this, calling post_create_inferior.
3613 * server.c (start_inferior): Update target_arch_setup calls to
3614 target_post_create_inferior.
3615 * linux-low.c (linux_low_ptrace_options): Forward declare.
3616 (linux_arch_setup): Update its comment for general use.
3617 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3618 (struct linux_target_ops): Use linux_post_create_inferior.
3619 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3620 to post_create_inferior.
3621 * nto-low.c (struct nto_target_ops): Likewise.
3622 * spu-low.c (struct spu_target_ops): Likewise.
3623 * win32-low.c (struct win32_target_ops): Likewise.
3625 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3627 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3629 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3631 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3632 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3633 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3634 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3635 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3636 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3637 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3638 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3639 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3640 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3641 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3642 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3644 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3646 * linux-low.c (linux_look_up_symbols): Don't call
3647 linux_supports_traceclone.
3648 * linux-low.h (thread_db_init): Remove use_events argument.
3649 * thread-db.c (thread_db_use_event): Remove global variable.
3650 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3651 (struct thread_db) <td_create_bp>: Remove field.
3652 (thread_db_create_event): Remove function.
3653 (thread_db_enable_reporting): Likewise.
3654 (find_one_thread): Don't check for thread_db_use_events.
3655 (attach_thread): Likewise.
3656 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3657 (try_thread_db_load_1): Don't check for thread_db_use_events.
3658 (thread_db_init): Remove use_events argument and thread events
3660 (remove_thread_event_breakpoints): Remove function.
3661 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3663 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3665 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3667 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3668 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3669 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3670 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3671 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3673 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3675 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3676 * linux-low.c (can_hardware_single_step): Use
3677 supports_hardware_single_step.
3678 (can_software_single_step): New function.
3679 (start_step_over): Call can_software_single_step.
3680 (linux_supports_hardware_single_step): New function.
3681 (struct target_ops) <supports_software_single_step>: Initialize.
3682 * linux-low.h (struct linux_target_ops)
3683 <supports_hardware_single_step>: Initialize.
3684 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3685 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3686 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3687 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3688 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3689 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3690 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3691 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3692 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3693 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3695 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3696 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3698 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3699 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3700 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3702 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3703 * target.h (struct target_ops): <supports_software_single_step>:
3705 (target_supports_software_single_step): New macro.
3707 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3709 * linux-low.c (linux_wait_1): Fix pc advance condition.
3710 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3711 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3713 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3715 * linux-arm-low.c (arm_is_thumb_mode): New function.
3716 (arm_breakpoint_at): Use arm_is_thumb_mode.
3717 (arm_breakpoint_kind_from_current_state): New function.
3718 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3720 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3721 (linux_breakpoint_kind_from_current_state): New function.
3722 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3723 * linux-low.h (struct linux_target_ops)
3724 <breakpoint_kind_from_current_state>: New field.
3725 * target.h (struct target_ops): Likewise.
3726 (target_breakpoint_kind_from_current_state): New macro.
3728 2015-11-30 Pedro Alves <palves@redhat.com>
3730 * linux-low.c (linux_resume): Wake up the event loop before
3733 2015-11-30 Pedro Alves <palves@redhat.com>
3735 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3737 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3739 * target.c (struct thread_search): New structure.
3740 (thread_search_callback): New function.
3741 (prev_general_thread): New global.
3742 (prepare_to_access_memory, done_accessing_memory): New functions.
3743 * target.h (prepare_to_access_memory, done_accessing_memory):
3744 Replace macros with function declarations.
3746 2015-11-30 Pedro Alves <palves@redhat.com>
3749 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3750 report TARGET_WAITKIND_NO_RESUMED.
3751 * remote-utils.c (prepare_resume_reply): Handle
3752 TARGET_WAITKIND_NO_RESUMED.
3753 * server.c (report_no_resumed): New global.
3754 (handle_query) <qSupported>: Handle "no-resumed+". Report
3755 "no-resumed+" support.
3756 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3757 return error if the client doesn't support no-resumed events.
3758 (push_stop_notification): New function.
3759 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3760 events if the client supports them.
3762 2015-11-30 Pedro Alves <palves@redhat.com>
3764 * linux-low.c (thread_still_has_status_pending_p): Don't check
3766 (lwp_resumed): New function.
3767 (status_pending_p_callback): Return early if the LWP is not
3768 supposed to be resumed.
3770 2015-11-30 Pedro Alves <palves@redhat.com>
3772 * linux-low.c (handle_extended_wait): Assert that the LWP's
3773 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3774 thread create events, leave the new child's status pending.
3775 (linux_low_filter_event): If GDB wants to hear about thread exit
3776 events, leave the LWP marked dead and don't delete it.
3777 (linux_wait_for_event_filtered): Don't check for thread exit.
3778 (filter_exit_event): New function.
3779 (linux_wait_1): Use it, when returning an exit event.
3780 (linux_resume_one_lwp_throw): Assert that the LWP's
3781 waitstatus is TARGET_WAITKIND_IGNORE.
3782 * remote-utils.c (prepare_resume_reply): Handle
3783 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3784 * server.c (report_thread_events): New global.
3785 (handle_general_set): Handle QThreadEvents.
3786 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3787 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3788 TARGET_WAITKIND_THREAD_EXITED.
3789 * server.h (report_thread_events): Declare.
3791 2015-11-30 Pedro Alves <palves@redhat.com>
3793 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3794 the thread's last_resume_kind was resume_stop.
3796 2015-11-30 Pedro Alves <palves@redhat.com>
3798 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3801 2015-11-30 Pedro Alves <palves@redhat.com>
3803 * server.c (handle_v_requests): Handle vCtrlC.
3805 2015-11-30 Pedro Alves <palves@redhat.com>
3807 * gdbthread.h (find_any_thread_of_pid): Declare.
3808 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3810 * server.c (handle_query): If current_thread is NULL, look for
3811 another thread of the selected process.
3813 2015-11-26 Daniel Colascione <dancol@dancol.org>
3814 Simon Marchi <simon.marchi@ericsson.com>
3816 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3817 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3819 * target.h (struct target_ops) <thread_name>: New field.
3820 (target_thread_name): New macro.
3822 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3824 * regcache.h (regcache_invalidate_pid): Add declaration.
3825 * regcache.c (regcache_invalidate_pid): New function, extracted
3826 from regcache_invalidate.
3827 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3828 Add trivial documentation comment.
3829 * lynx-low.c: Use regcache_invalidate_pid instead of
3830 regcache_invalidate.
3832 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3834 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3835 and Elf64_auxv_t if the target is Android.
3837 2015-11-22 Doug Evans <xdje42@gmail.com>
3839 * target.h: #include <sys/types.h>.
3841 2015-11-19 Pedro Alves <palves@redhat.com>
3843 * linux-low.c (linux_process_qsupported): Change prototype.
3845 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3847 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3848 and adjust to loop over all features.
3849 * server.c (handle_query) <qSupported>: Adjust to call
3850 target_process_qsupported once, passing it a vector of unprocessed
3852 * target.h (struct target_ops) <process_qsupported>: Change
3854 (target_process_qsupported): Adjust.
3856 2015-11-19 Pedro Alves <palves@redhat.com>
3858 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3860 * configure: Regenerate.
3862 2015-11-19 Pedro Alves <palves@redhat.com>
3864 * configure: Regenerate.
3866 2015-11-19 Yao Qi <yao.qi@linaro.org>
3868 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3871 2015-11-19 Yao Qi <yao.qi@linaro.org>
3873 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3874 (struct aarch64_operand): Move enum out.
3876 2015-11-19 Yao Qi <yao.qi@linaro.org>
3878 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3879 struct user_fpsimd_state *.
3880 (aarch64_store_fpregset): Likewise.
3882 2015-11-19 Yao Qi <yao.qi@linaro.org>
3884 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3885 struct user_pt_regs *.
3886 (aarch64_store_gregset): Likewise.
3888 2015-11-18 Pedro Alves <palves@redhat.com>
3890 * Makefile.in (all_object_files): Add $IPA_OBJS.
3892 2015-11-17 Pedro Alves <palves@redhat.com>
3894 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3895 GDB_SIGNAL_0 and gdb_signal_to_string.
3897 2015-11-17 Pedro Alves <palves@redhat.com>
3899 * win32-low.c (handle_output_debug_string): Remove parameter.
3900 (win32_kill): Remove our_status local and adjust call to
3901 handle_output_debug_string.
3902 (get_child_debug_event): Adjust call to
3903 handle_output_debug_string.
3905 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3907 * linux-mips-low.c (mips_fill_gregset): Add cast.
3908 (mips_store_gregset): Likewise.
3909 (mips_fill_fpregset): Likewise.
3910 (mips_store_fpregset): Likewise.
3912 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3914 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3917 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3919 * linux-mips-low.c (mips_linux_new_thread): Change type of
3920 watch_type to enum target_hw_bp_type.
3922 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3924 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3925 Change return type to arm_hwbp_type.
3927 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3929 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3930 (arm_store_gregset): Likewise.
3931 * linux-arm-low.c (arm_get_hwcap): Likewise.
3932 (arm_read_description): Likewise.
3934 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3936 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3938 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3940 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3941 (ppc_fill_vsxregset): Likewise.
3942 (ppc_store_vsxregset): Likewise.
3943 (ppc_fill_vrregset): Likewise.
3944 (ppc_store_vrregset): Likewise.
3945 (ppc_fill_evrregset): Likewise.
3946 (ppc_store_evrregset): Likewise.
3948 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3950 * linux-ppc-low.c (ppc_usrregs_info): Remove
3951 forward-declaration.
3952 (ppc_arch_setup): Move lower in file.
3954 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3956 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3957 (ps_pdwrite): Likewise.
3959 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3961 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3962 to after assert checks.
3964 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3966 * proc-service.c (ps_pdread): Add/adjust casts.
3967 (ps_pdwrite): Add/adjust casts.
3969 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3971 * server.c (handle_search_memory_1): Cast return value of
3974 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3976 * server.c (write_qxfer_response): Change type of data to
3979 2015-10-29 Pedro Alves <palves@redhat.com>
3981 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3983 2015-10-29 Pedro Alves <palves@redhat.com>
3985 * tracepoint.c (clear_installed_tracepoints): Add casts.
3987 2015-10-29 Pedro Alves <palves@redhat.com>
3989 * server.c (handle_v_cont, process_serial_event): Add enum
3990 gdb_signal casts to signal parsing code.
3992 2015-10-29 Pedro Alves <palves@redhat.com>
3994 * linux-low.h (NULL_REGSET): Define.
3995 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3996 * linux-arm-low.c (arm_regsets): Likewise.
3997 * linux-crisv32-low.c (cris_regsets): Likewise.
3998 * linux-m68k-low.c (m68k_regsets): Likewise.
3999 * linux-mips-low.c (mips_regsets): Likewise.
4000 * linux-nios2-low.c (nios2_regsets): Likewise.
4001 * linux-ppc-low.c (ppc_regsets): Likewise.
4002 * linux-s390-low.c (s390_regsets): Likewise.
4003 * linux-sh-low.c (sh_regsets): Likewise.
4004 * linux-sparc-low.c (sparc_regsets): Likewise.
4005 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4006 * linux-tile-low.c (tile_regsets): Likewise.
4007 * linux-x86-low.c (x86_regsets): Likewise.
4008 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4010 2015-10-29 Pedro Alves <palves@redhat.com>
4012 * linux-low.h (NULL_REGSET): Define.
4013 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4014 * linux-arm-low.c (arm_regsets): Likewise.
4015 * linux-crisv32-low.c (cris_regsets): Likewise.
4016 * linux-m68k-low.c (m68k_regsets): Likewise.
4017 * linux-mips-low.c (mips_regsets): Likewise.
4018 * linux-nios2-low.c (nios2_regsets): Likewise.
4019 * linux-ppc-low.c (ppc_regsets): Likewise.
4020 * linux-s390-low.c (s390_regsets): Likewise.
4021 * linux-sh-low.c (sh_regsets): Likewise.
4022 * linux-sparc-low.c (sparc_regsets): Likewise.
4023 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4024 * linux-tile-low.c (tile_regsets): Likewise.
4025 * linux-x86-low.c (x86_regsets): Likewise.
4026 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4028 2015-10-26 Doug Evans <dje@google.com>
4030 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4032 2015-10-26 Doug Evans <dje@google.com>
4034 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4036 2015-10-26 Doug Evans <dje@google.com>
4038 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4040 (attach_thread, find_new_threads_callback): Ditto.
4042 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4044 * mem-break.h (set_breakpoint_data): Remove.
4046 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4048 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4049 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4050 (initialize_low): Remove set_breakpoint_data call.
4051 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4052 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4053 (initialize_low): Remove set_breakpoint_data call.
4054 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4055 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4056 (initialize_low): Remove set_breakpoint_data call.
4058 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4060 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4061 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4062 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4063 * target.h (target_breakpoint_kind_from_pc): New macro.
4065 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4067 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4068 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4069 the default breakpoint kind.
4071 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4073 * linux-arm-low.c (arm_supports_z_point_type): Add software
4076 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4078 * linux-arm-low.c: Refactor breakpoint definitions.
4079 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4080 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4082 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4084 * Makefile.in: Add arm.c/o.
4085 * configure.srv: Likewise.
4086 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4087 (arm_breakpoint_kind_from_pc): New function.
4088 (arm_sw_breakpoint_from_kind): Return proper kind.
4089 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4091 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4093 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4095 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4096 (struct raw_breakpoint) <size>: Remove.
4097 (struct raw_breakpoint) <kind>: Add.
4098 (bp_size): New function.
4099 (bp_opcode): Likewise.
4100 (find_raw_breakpoint_at): Adjust for kind.
4101 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4102 (remove_memory_breakpoint): Adjust for kind call bp_size.
4103 (set_raw_breakpoint_at): Adjust for kind.
4104 (set_breakpoint): Likewise.
4105 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4106 (delete_raw_breakpoint): Adjust for kind.
4107 (delete_breakpoint): Likewise.
4108 (find_gdb_breakpoint): Likewise.
4109 (set_gdb_breakpoint_1): Likewise.
4110 (set_gdb_breakpoint): Likewise.
4111 (delete_gdb_breakpoint_1): Likewise.
4112 (delete_gdb_breakpoint): Likewise.
4113 (uninsert_raw_breakpoint): Likewise.
4114 (reinsert_raw_breakpoint): Likewise.
4115 (set_breakpoint_data): Remove.
4116 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4117 (check_mem_read): Adjust for kind call bp_size.
4118 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4119 (clone_one_breakpoint): Adjust for kind.
4120 * mem-break.h (set_gdb_breakpoint): Likewise.
4121 (delete_gdb_breakpoint): Likewise.
4122 * server.c (process_serial_event): Likewise.
4124 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4126 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4127 (struct linux_target_ops) <breakpoint>: Remove.
4128 (struct linux_target_ops) <breakpoint_len>: Remove.
4129 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4130 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4131 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4132 (arm_sw_breakpoint_from_kind): New function.
4133 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4134 (struct linux_target_ops) <breakpoint>: Remove.
4135 (struct linux_target_ops) <breakpoint_len>: Remove.
4136 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4137 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4138 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4139 (struct linux_target_ops) <breakpoint>: Remove.
4140 (struct linux_target_ops) <breakpoint_len>: Remove.
4141 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4142 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4143 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4144 (struct linux_target_ops) <breakpoint>: Remove.
4145 (struct linux_target_ops) <breakpoint_len>: Remove.
4146 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4147 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4148 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4149 and sw_breakpoint_from_kind to increment the pc.
4150 (linux_breakpoint_kind_from_pc): New function.
4151 (linux_sw_breakpoint_from_kind): New function.
4152 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4153 (initialize_low): Call breakpoint_kind_from_pc and
4154 sw_breakpoint_from_kind to replace breakpoint_data/len.
4155 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4157 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4158 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4159 (struct linux_target_ops) <breakpoint>: Remove.
4160 (struct linux_target_ops) <breakpoint_len>: Remove.
4161 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4162 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4163 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4164 (struct linux_target_ops) <breakpoint>: Remove.
4165 (struct linux_target_ops) <breakpoint_len>: Remove.
4166 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4167 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4168 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4169 (struct linux_target_ops) <breakpoint>: Remove.
4170 (struct linux_target_ops) <breakpoint_len>: Remove.
4171 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4172 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4173 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4174 (struct linux_target_ops) <breakpoint>: Remove.
4175 (struct linux_target_ops) <breakpoint_len>: Remove.
4176 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4177 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4178 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4179 (struct linux_target_ops) <breakpoint>: Remove.
4180 (struct linux_target_ops) <breakpoint_len>: Remove.
4181 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4182 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4183 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4184 (struct linux_target_ops) <breakpoint>: Remove.
4185 (struct linux_target_ops) <breakpoint_len>: Remove.
4186 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4187 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4188 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4189 (struct linux_target_ops) <breakpoint>: Remove.
4190 (struct linux_target_ops) <breakpoint_len>: Remove.
4191 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4192 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4193 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4194 (struct linux_target_ops) <breakpoint>: Remove.
4195 (struct linux_target_ops) <breakpoint_len>: Remove.
4196 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4197 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4198 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4199 (struct linux_target_ops) <breakpoint>: Remove.
4200 (struct linux_target_ops) <breakpoint_len>: Remove.
4201 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4202 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4203 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4204 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4205 (struct linux_target_ops) <breakpoint>: Remove.
4206 (struct linux_target_ops) <breakpoint_len>: Remove.
4207 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4208 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4209 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4210 (struct linux_target_ops) <breakpoint>: Remove.
4211 (struct linux_target_ops) <breakpoint_len>: Remove.
4212 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4213 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4215 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4217 * linux-cris-low.c (cris_get_pc): Remove void arg.
4219 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4221 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4224 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4226 * inferiors.c (thread_pid_matches_callback): New function.
4227 (find_thread_process): New function.
4228 (remove_thread): Reset current_thread.
4229 (remove_process): Assert threads have been removed first.
4231 2015-10-15 Yao Qi <yao.qi@linaro.org>
4233 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4235 (aarch64_remove_point): Likewise.
4236 * regcache.c (regcache_register_size): New function.
4238 2015-10-12 Yao Qi <yao.qi@linaro.org>
4240 * linux-aarch64-low.c: Update all callers as emit_load_store
4241 is renamed to aarch64_emit_load_store.
4243 2015-10-12 Yao Qi <yao.qi@linaro.org>
4245 * linux-aarch64-low.c: Update all callers of function renaming
4246 from emit_insn to aarch64_emit_insn.
4248 2015-10-12 Yao Qi <yao.qi@linaro.org>
4250 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4251 arch/aarch64-insn.h.
4252 (struct aarch64_memory_operand): Likewise.
4254 (emit_insn): Move to arch/aarch64-insn.c.
4255 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4256 (emit_load_store): Move to arch/aarch64-insn.c.
4257 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4258 (can_encode_int32): Remove.
4260 2015-10-12 Yao Qi <yao.qi@linaro.org>
4262 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4263 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4264 (aarch64_relocate_instruction): Likewise.
4265 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4266 (struct aarch64_insn_visitor): Likewise.
4268 2015-10-12 Yao Qi <yao.qi@linaro.org>
4270 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4271 (struct aarch64_insn_visitor): New.
4272 (struct aarch64_insn_relocation_data): New.
4273 (aarch64_ftrace_insn_reloc_b): New function.
4274 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4275 (aarch64_ftrace_insn_reloc_cb): Likewise.
4276 (aarch64_ftrace_insn_reloc_tb): Likewise.
4277 (aarch64_ftrace_insn_reloc_adr): Likewise.
4278 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4279 (aarch64_ftrace_insn_reloc_others): Likewise.
4281 (aarch64_relocate_instruction): Use visitor.
4283 2015-10-12 Yao Qi <yao.qi@linaro.org>
4285 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4286 int. Add argument buf.
4287 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4288 aarch64_relocate_instruction.
4290 2015-10-12 Yao Qi <yao.qi@linaro.org>
4292 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4293 argument insn. Remove local variable insn. Don't call
4295 (aarch64_install_fast_tracepoint_jump_pad): Call
4298 2015-09-30 Yao Qi <yao.qi@linaro.org>
4300 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4301 (emit_load_store_pair): Likewise.
4303 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4305 * dll.c (match_dll): Add cast(s).
4306 (unloaded_dll): Likewise.
4307 * linux-low.c (second_thread_of_pid_p): Likewise.
4308 (delete_lwp_callback): Likewise.
4309 (count_events_callback): Likewise.
4310 (select_event_lwp_callback): Likewise.
4311 (linux_set_resume_request): Likewise.
4312 * server.c (accumulate_file_name_length): Likewise.
4313 (emit_dll_description): Likewise.
4314 (handle_qxfer_threads_worker): Likewise.
4315 (visit_actioned_threads): Likewise.
4316 * thread-db.c (any_thread_of): Likewise.
4317 * tracepoint.c (same_process_p): Likewise.
4318 (match_blocktype): Likewise.
4319 (build_traceframe_info_xml): Likewise.
4321 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4323 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4325 (gdb_unparse_agent_expr): Likewise.
4326 * hostio.c (require_data): Likewise.
4327 (handle_pread): Likewise.
4328 * linux-low.c (disable_regset): Likewise.
4329 (fetch_register): Likewise.
4330 (store_register): Likewise.
4331 (get_dynamic): Likewise.
4332 (linux_qxfer_libraries_svr4): Likewise.
4333 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4334 (set_fast_tracepoint_jump): Likewise.
4335 (uninsert_fast_tracepoint_jumps_at): Likewise.
4336 (reinsert_fast_tracepoint_jumps_at): Likewise.
4337 (validate_inserted_breakpoint): Likewise.
4338 (clone_agent_expr): Likewise.
4339 * regcache.c (init_register_cache): Likewise.
4340 * remote-utils.c (putpkt_binary_1): Likewise.
4341 (decode_M_packet): Likewise.
4342 (decode_X_packet): Likewise.
4343 (look_up_one_symbol): Likewise.
4344 (relocate_instruction): Likewise.
4345 (monitor_output): Likewise.
4346 * server.c (handle_search_memory): Likewise.
4347 (handle_qxfer_exec_file): Likewise.
4348 (handle_qxfer_libraries): Likewise.
4349 (handle_qxfer): Likewise.
4350 (handle_query): Likewise.
4351 (handle_v_cont): Likewise.
4352 (handle_v_run): Likewise.
4353 (captured_main): Likewise.
4354 * target.c (write_inferior_memory): Likewise.
4355 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4356 * tracepoint.c (init_trace_buffer): Likewise.
4357 (add_tracepoint_action): Likewise.
4358 (add_traceframe): Likewise.
4359 (add_traceframe_block): Likewise.
4360 (cmd_qtdpsrc): Likewise.
4361 (cmd_qtdv): Likewise.
4362 (cmd_qtstatus): Likewise.
4363 (response_source): Likewise.
4364 (response_tsv): Likewise.
4365 (cmd_qtnotes): Likewise.
4366 (gdb_collect): Likewise.
4367 (initialize_tracepoint): Likewise.
4369 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4371 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4372 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4373 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4375 (enum aarch64_condition_codes): New enum.
4376 (w0): New static global.
4379 (struct aarch64_memory_operand) <type>: New
4380 MEMORY_OPERAND_POSTINDEX type.
4381 (postindex_memory_operand): New helper function.
4382 (emit_ret): New function.
4383 (emit_load_store_pair): New function, factored out of emit_stp
4384 with support for MEMORY_OPERAND_POSTINDEX.
4385 (emit_stp): Rewrite using emit_load_store_pair.
4386 (emit_ldp): New function.
4387 (emit_load_store): Likewise.
4388 (emit_ldr): Mention post-index instruction in comment.
4389 (emit_ldrh): New function.
4390 (emit_ldrb): New function.
4391 (emit_ldrsw): Mention post-index instruction in comment.
4392 (emit_str): Likewise.
4393 (emit_subs): New function.
4394 (emit_cmp): Likewise.
4395 (emit_and): Likewise.
4396 (emit_orr): Likewise.
4397 (emit_orn): Likewise.
4398 (emit_eor): Likewise.
4399 (emit_mvn): Likewise.
4400 (emit_lslv): Likewise.
4401 (emit_lsrv): Likewise.
4402 (emit_asrv): Likewise.
4403 (emit_mul): Likewise.
4404 (emit_sbfm): Likewise.
4405 (emit_sbfx): Likewise.
4406 (emit_ubfm): Likewise.
4407 (emit_ubfx): Likewise.
4408 (emit_csinc): Likewise.
4409 (emit_cset): Likewise.
4410 (emit_nop): Likewise.
4411 (emit_ops_insns): New helper function.
4412 (emit_pop): Likewise.
4413 (emit_push): Likewise.
4414 (aarch64_emit_prologue): New function.
4415 (aarch64_emit_epilogue): Likewise.
4416 (aarch64_emit_add): Likewise.
4417 (aarch64_emit_sub): Likewise.
4418 (aarch64_emit_mul): Likewise.
4419 (aarch64_emit_lsh): Likewise.
4420 (aarch64_emit_rsh_signed): Likewise.
4421 (aarch64_emit_rsh_unsigned): Likewise.
4422 (aarch64_emit_ext): Likewise.
4423 (aarch64_emit_log_not): Likewise.
4424 (aarch64_emit_bit_and): Likewise.
4425 (aarch64_emit_bit_or): Likewise.
4426 (aarch64_emit_bit_xor): Likewise.
4427 (aarch64_emit_bit_not): Likewise.
4428 (aarch64_emit_equal): Likewise.
4429 (aarch64_emit_less_signed): Likewise.
4430 (aarch64_emit_less_unsigned): Likewise.
4431 (aarch64_emit_ref): Likewise.
4432 (aarch64_emit_if_goto): Likewise.
4433 (aarch64_emit_goto): Likewise.
4434 (aarch64_write_goto_address): Likewise.
4435 (aarch64_emit_const): Likewise.
4436 (aarch64_emit_call): Likewise.
4437 (aarch64_emit_reg): Likewise.
4438 (aarch64_emit_pop): Likewise.
4439 (aarch64_emit_stack_flush): Likewise.
4440 (aarch64_emit_zero_ext): Likewise.
4441 (aarch64_emit_swap): Likewise.
4442 (aarch64_emit_stack_adjust): Likewise.
4443 (aarch64_emit_int_call_1): Likewise.
4444 (aarch64_emit_void_call_2): Likewise.
4445 (aarch64_emit_eq_goto): Likewise.
4446 (aarch64_emit_ne_goto): Likewise.
4447 (aarch64_emit_lt_goto): Likewise.
4448 (aarch64_emit_le_goto): Likewise.
4449 (aarch64_emit_gt_goto): Likewise.
4450 (aarch64_emit_ge_got): Likewise.
4451 (aarch64_emit_ops_impl): New static global variable.
4452 (aarch64_emit_ops): New target function, return
4453 &aarch64_emit_ops_impl.
4454 (struct linux_target_ops): Install it.
4456 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4458 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4459 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4461 * linux-aarch64-ipa.c: New file.
4462 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4464 (aarch64_get_thread_area): New target method.
4465 (extract_signed_bitfield): New helper function.
4466 (aarch64_decode_ldr_literal): New function.
4467 (enum aarch64_opcodes): New enum.
4468 (struct aarch64_register): New struct.
4469 (struct aarch64_operand): New struct.
4470 (x0): New static global.
4479 (aarch64_register): New helper function.
4480 (register_operand): Likewise.
4481 (immediate_operand): Likewise.
4482 (struct aarch64_memory_operand): New struct.
4483 (offset_memory_operand): New helper function.
4484 (preindex_memory_operand): Likewise.
4485 (enum aarch64_system_control_registers): New enum.
4486 (ENCODE): New macro.
4487 (emit_insn): New helper function.
4488 (emit_b): New function.
4489 (emit_bcond): Likewise.
4490 (emit_cb): Likewise.
4491 (emit_tb): Likewise.
4492 (emit_blr): Likewise.
4493 (emit_stp): Likewise.
4494 (emit_ldp_q_offset): Likewise.
4495 (emit_stp_q_offset): Likewise.
4496 (emit_load_store): Likewise.
4497 (emit_ldr): Likewise.
4498 (emit_ldrsw): Likewise.
4499 (emit_str): Likewise.
4500 (emit_ldaxr): Likewise.
4501 (emit_stxr): Likewise.
4502 (emit_stlr): Likewise.
4503 (emit_data_processing_reg): Likewise.
4504 (emit_data_processing): Likewise.
4505 (emit_add): Likewise.
4506 (emit_sub): Likewise.
4507 (emit_mov): Likewise.
4508 (emit_movk): Likewise.
4509 (emit_mov_addr): Likewise.
4510 (emit_mrs): Likewise.
4511 (emit_msr): Likewise.
4512 (emit_sevl): Likewise.
4513 (emit_wfe): Likewise.
4514 (append_insns): Likewise.
4515 (can_encode_int32_in): New helper function.
4516 (aarch64_relocate_instruction): New function.
4517 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4518 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4519 (struct linux_target_ops): Install aarch64_get_thread_area,
4520 aarch64_install_fast_tracepoint_jump_pad and
4521 aarch64_get_min_fast_tracepoint_insn_len.
4523 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4525 * Makefile.in (aarch64-insn.o): New rule.
4526 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4528 2015-09-21 Yao Qi <yao.qi@linaro.org>
4530 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4532 2015-09-21 Yao Qi <yao.qi@linaro.org>
4534 * tracepoint.c (max_jump_pad_size): Remove.
4536 2015-09-18 Yao Qi <yao.qi@linaro.org>
4538 * linux-aarch64-low.c: Don't include sys/uio.h.
4539 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4541 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4543 * tracepoint.c (eval_result_type): Change prototype.
4544 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4546 2015-09-15 Pedro Alves <palves@redhat.com>
4548 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4549 Check whether to report exec events instead of checking whether
4550 multiprocess is enabled.
4552 2015-09-15 Pedro Alves <palves@redhat.com>
4555 * remote-utils.c (prepare_resume_reply): Merge
4556 TARGET_WAITKIND_VFORK_DONE switch case with the
4557 TARGET_WAITKIND_FORKED case.
4559 2015-09-15 Yao Qi <yao.qi@linaro.org>
4561 * server.c (handle_query): Check string comparison using
4562 "else if" instead of "if".
4564 2015-09-15 Yao Qi <yao.qi@linaro.org>
4566 * server.c (vCont_supported): New global variable.
4567 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4568 matches. Append ";vContSupported+" to own_buf.
4569 (handle_v_requests): Append ";s;S" to own_buf if target supports
4570 hardware single step or vCont_supported is false.
4571 (capture_main): Set vCont_supported to zero.
4573 2015-09-15 Yao Qi <yao.qi@linaro.org>
4575 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4577 (linux_supports_hardware_single_step): ... New function.
4578 (linux_target_ops): Update.
4579 * lynx-low.c (lynx_target_ops): Set field
4580 supports_hardware_single_step to target_can_do_hardware_single_step.
4581 * nto-low.c (nto_target_ops): Likewise.
4582 * spu-low.c (spu_target_ops): Likewise.
4583 * win32-low.c (win32_target_ops): Likewise.
4584 * target.c (target_can_do_hardware_single_step): New function.
4585 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4586 Remove. <supports_hardware_single_step>: New field.
4587 (target_supports_conditional_breakpoints): Remove.
4588 (target_supports_hardware_single_step): New macro.
4589 (target_can_do_hardware_single_step): Declare.
4590 * server.c (handle_query): Use target_supports_hardware_single_step
4591 instead of target_supports_conditional_breakpoints.
4593 2015-09-15 Yao Qi <yao.qi@linaro.org>
4595 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4597 (struct linux_target_ops the_low_target): Install
4598 aarch64_linux_siginfo_fixup.
4600 2015-09-11 Don Breazeal <donb@codesourcery.com>
4601 Luis Machado <lgustavo@codesourcery.com>
4603 * linux-low.c (linux_mourn): Static declaration.
4604 (linux_arch_setup): Move in front of
4605 handle_extended_wait.
4606 (linux_arch_setup_thread): New function.
4607 (handle_extended_wait): Handle exec events. Call
4608 linux_arch_setup_thread. Make event_lwp argument a
4609 pointer-to-a-pointer.
4610 (check_zombie_leaders): Do not check stopped threads.
4611 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4612 (linux_low_filter_event): Add lwp and thread for exec'ing
4613 non-leader thread if leader thread has been deleted.
4614 Refactor code into linux_arch_setup_thread and call it.
4615 Pass child lwp pointer by reference to handle_extended_wait.
4616 (linux_wait_for_event_filtered): Update comment.
4617 (linux_wait_1): Prevent clobbering exec event status.
4618 (linux_supports_exec_events): New function.
4619 (linux_target_ops) <supports_exec_events>: Initialize new member.
4620 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4622 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4623 * server.c (report_exec_events): New global variable.
4624 (handle_query): Handle qSupported query for exec-events feature.
4625 (captured_main): Initialize report_exec_events.
4626 * server.h (report_exec_events): Declare new global variable.
4627 * target.h (struct target_ops) <supports_exec_events>: New
4629 (target_supports_exec_events): New macro.
4630 * win32-low.c (win32_target_ops) <supports_exec_events>:
4631 Initialize new member.
4633 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4635 * linux-low.c (linux_low_enable_btrace): Remove.
4636 (linux_target_ops): Replace linux_low_enable_btrace with
4637 linux_enable_btrace.
4639 2015-09-03 Yao Qi <yao.qi@linaro.org>
4641 * linux-aarch64-low.c (aarch64_insert_point): Call
4642 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4645 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4647 * linux-low.c (check_stopped_by_breakpoint): Use
4648 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4650 2015-08-27 Pedro Alves <palves@redhat.com>
4652 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4654 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4656 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4657 the XNEW-family equivalent.
4658 (compile_bytecodes): Likewise.
4659 * dll.c (loaded_dll): Likewise.
4660 * event-loop.c (append_callback_event): Likewise.
4661 (create_file_handler): Likewise.
4662 (create_file_event): Likewise.
4663 * hostio.c (handle_open): Likewise.
4664 * inferiors.c (add_thread): Likewise.
4665 (add_process): Likewise.
4666 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4667 * linux-arm-low.c (arm_new_process): Likewise.
4668 (arm_new_thread): Likewise.
4669 * linux-low.c (add_to_pid_list): Likewise.
4670 (linux_add_process): Likewise.
4671 (handle_extended_wait): Likewise.
4672 (add_lwp): Likewise.
4673 (enqueue_one_deferred_signal): Likewise.
4674 (enqueue_pending_signal): Likewise.
4675 (linux_resume_one_lwp_throw): Likewise.
4676 (linux_resume_one_thread): Likewise.
4677 (linux_read_memory): Likewise.
4678 (linux_write_memory): Likewise.
4679 * linux-mips-low.c (mips_linux_new_process): Likewise.
4680 (mips_linux_new_thread): Likewise.
4681 (mips_add_watchpoint): Likewise.
4682 * linux-x86-low.c (initialize_low_arch): Likewise.
4683 * lynx-low.c (lynx_add_process): Likewise.
4684 * mem-break.c (set_raw_breakpoint_at): Likewise.
4685 (set_breakpoint): Likewise.
4686 (add_condition_to_breakpoint): Likewise.
4687 (add_commands_to_breakpoint): Likewise.
4688 (clone_agent_expr): Likewise.
4689 (clone_one_breakpoint): Likewise.
4690 * regcache.c (new_register_cache): Likewise.
4691 * remote-utils.c (look_up_one_symbol): Likewise.
4692 * server.c (queue_stop_reply): Likewise.
4693 (start_inferior): Likewise.
4694 (queue_stop_reply_callback): Likewise.
4695 (handle_target_event): Likewise.
4696 * spu-low.c (fetch_ppc_memory): Likewise.
4697 (store_ppc_memory): Likewise.
4698 * target.c (set_target_ops): Likewise.
4699 * thread-db.c (thread_db_load_search): Likewise.
4700 (try_thread_db_load_1): Likewise.
4701 * tracepoint.c (add_tracepoint): Likewise.
4702 (add_tracepoint_action): Likewise.
4703 (create_trace_state_variable): Likewise.
4704 (cmd_qtdpsrc): Likewise.
4705 (cmd_qtro): Likewise.
4706 (add_while_stepping_state): Likewise.
4707 * win32-low.c (child_add_thread): Likewise.
4708 (get_image_name): Likewise.
4710 2015-08-25 Yao Qi <yao.qi@linaro.org>
4712 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4714 2015-08-25 Yao Qi <yao.qi@linaro.org>
4716 * Makefile.in (aarch64-linux.o): New rule.
4717 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4719 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4720 (aarch64_init_debug_reg_state): Make it extern.
4721 (aarch64_linux_prepare_to_resume): Remove.
4723 2015-08-25 Yao Qi <yao.qi@linaro.org>
4725 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4726 lwp_arch_private_info and ptid_of_lwp.
4728 2015-08-25 Yao Qi <yao.qi@linaro.org>
4730 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4731 Find proc_info by find_process_pid. All callers updated.
4733 2015-08-25 Yao Qi <yao.qi@linaro.org>
4735 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4737 (debug_reg_change_callback): Remove.
4738 (aarch64_notify_debug_reg_change): Remove.
4740 2015-08-25 Yao Qi <yao.qi@linaro.org>
4742 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4743 Call current_lwp_ptid.
4745 2015-08-25 Yao Qi <yao.qi@linaro.org>
4747 * linux-aarch64-low.c (debug_reg_change_callback): Use
4750 2015-08-25 Yao Qi <yao.qi@linaro.org>
4752 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4754 2015-08-25 Yao Qi <yao.qi@linaro.org>
4756 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4758 2015-08-25 Yao Qi <yao.qi@linaro.org>
4760 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4763 2015-08-25 Yao Qi <yao.qi@linaro.org>
4765 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4767 (debug_reg_change_callback): Remove argument entry and add argument
4768 lwp. Remove local variable thread. Don't print thread id in the
4769 debugging output. Don't check whether pid of thread equals to pid.
4770 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4771 iterate_over_lwps instead find_inferior.
4773 2015-08-24 Pedro Alves <palves@redhat.com>
4775 * inferiors.c (get_first_process): New function.
4776 * inferiors.h (get_first_process): New declaration.
4777 * remote-utils.c (read_ptid): Default to the first process in the
4778 list, instead of to the current thread's process.
4780 2015-08-24 Pedro Alves <palves@redhat.com>
4782 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4783 * event-loop.c: Likewise.
4784 * remote-utils.c: Likewise.
4785 * tracepoint.c: Likewise.
4787 2015-08-24 Pedro Alves <palves@redhat.com>
4789 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4792 2015-08-21 Pedro Alves <palves@redhat.com>
4794 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4795 instead of literal 1.
4797 2015-08-21 Pedro Alves <palves@redhat.com>
4799 * tdesc.c (default_description): Explicitly zero-initialize.
4801 2015-08-21 Pedro Alves <palves@redhat.com>
4804 * inferiors.c (remove_thread): Discard any pending stop reply for
4806 * server.c (remove_all_on_match_pid): Rename to ...
4807 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4809 (discard_queued_stop_replies): Change parameter to a ptid. Now
4811 (handle_v_kill, kill_inferior_callback, captured_main)
4812 (process_serial_event): Adjust.
4813 * server.h (discard_queued_stop_replies): Declare.
4815 2015-08-21 Pedro Alves <palves@redhat.com>
4817 * linux-low.c (wait_for_sigstop): Always switch to no thread
4818 selected if the previously current thread dies.
4819 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4820 process instead of the current thread's.
4821 * remote-utils.c (input_interrupt): Don't check if there's no
4823 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4824 current thread to the general thread fails, error out.
4825 (handle_qxfer_auxv, handle_qxfer_libraries)
4826 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4827 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4828 (handle_query): Check if there's a thread selected instead of
4829 checking whether there's any thread in the thread list.
4830 (handle_qxfer_threads, handle_qxfer_btrace)
4831 (handle_qxfer_btrace_conf): Don't error out early if there's no
4832 thread in the thread list.
4833 (handle_v_cont, myresume): Don't set the current thread to the
4835 (process_serial_event) <Hg handling>: Also set thread_id if the
4836 previous general thread is still alive.
4837 (process_serial_event) <g/G handling>: If setting the current
4838 thread to the general thread fails, error out.
4839 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4840 thread's lwp instead of the current thread's.
4841 * target.c (set_desired_thread): If the desired thread was not
4842 found, leave the current thread pointing to NULL. Return an int
4843 (boolean) indicating success.
4844 * target.h (set_desired_thread): Change return type to int.
4846 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4848 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4849 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4851 (ps_get_thread_area): New function.
4853 2015-08-19 Gary Benson <gbenson@redhat.com>
4855 * hostio.c (handle_pread): Do not attempt to read more data
4856 than hostio_reply_with_data can fit in a packet.
4858 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4860 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4862 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4864 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4866 2015-08-06 Pedro Alves <palves@redhat.com>
4868 * tracepoint.c (expr_eval_result): Now an int.
4870 2015-08-06 Pedro Alves <palves@redhat.com>
4872 * gdbthread.h (struct regcache): Forward declare.
4873 (struct thread_info) <regcache_data>: Now a struct regcache
4875 * inferiors.c (inferior_regcache_data)
4876 (set_inferior_regcache_data): Now work with struct regcache
4878 * inferiors.h (struct regcache): Forward declare.
4879 (inferior_regcache_data, set_inferior_regcache_data): Now work
4880 with struct regcache pointers.
4881 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4882 (free_register_cache_thread): Remove struct regcache pointer
4885 2015-08-06 Pedro Alves <palves@redhat.com>
4887 * server.c (captured_main): On error, print the exception message
4888 to stderr, and if run_once is set, throw a quit.
4890 2015-08-06 Pedro Alves <palves@redhat.com>
4892 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4895 2015-08-06 Pedro Alves <palves@redhat.com>
4897 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4898 reading beyond the passed in buffer length.
4900 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4902 * tracepoint.c (symbol_list) <required>: Remove.
4904 2015-08-06 Pedro Alves <palves@redhat.com>
4906 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4907 count if stopping and suspending threads.
4908 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4909 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4910 (linux_detach): Complete an ongoing step-over.
4911 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4913 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4914 (linux_wait_1): If passing a signal to the inferior after
4915 finishing a step-over, unsuspend and re-resume all lwps. If we
4916 see a single-step event but the thread should be continuing, don't
4917 pass the trap to gdb.
4918 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4919 internal_error instead of gdb_assert.
4920 (enqueue_pending_signal): New function.
4921 (check_ptrace_stopped_lwp_gone): Add debug output.
4922 (start_step_over): Use internal_error instead of gdb_assert.
4923 (complete_ongoing_step_over): New function.
4924 (linux_resume_one_thread): Don't resume a suspended thread.
4925 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4928 2015-08-06 Pedro Alves <palves@redhat.com>
4930 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4931 (linux_thread_alive): Use lwp_is_marked_dead.
4932 (extended_event_reported): Delete.
4933 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4934 instead of extended_event_reported.
4935 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4937 (lwp_is_marked_dead): New function.
4938 (lwp_running): Use lwp_is_marked_dead.
4939 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4942 2015-08-06 Pedro Alves <palves@redhat.com>
4944 * linux-low.c (linux_wait_1): Move fork event output out of the
4945 !report_to_gdb check. Pass event_child->waitstatus to
4946 target_waitstatus_to_string instead of ourstatus.
4948 2015-08-04 Yao Qi <yao.qi@linaro.org>
4950 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4951 if current_thread is 32 bit.
4953 2015-08-04 Yao Qi <yao.qi@linaro.org>
4955 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4956 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4957 * server.c (extended_protocol): Remove "static".
4958 * server.h (extended_protocol): Declare it.
4960 2015-08-04 Yao Qi <yao.qi@linaro.org>
4962 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4963 both aarch64 and aarch32.
4964 (aarch64_set_pc): Likewise.
4966 2015-08-04 Yao Qi <yao.qi@linaro.org>
4968 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4969 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4970 arm-with-neon.xml to srv_xmlfiles.
4971 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4972 (is_64bit_tdesc): New function.
4973 (aarch64_linux_read_description): New function.
4974 (aarch64_arch_setup): Call aarch64_linux_read_description.
4975 (regs_info): Rename to regs_info_aarch64.
4976 (aarch64_regs_info): Return right regs_info.
4977 (initialize_low_arch): Call initialize_low_arch_aarch32.
4979 2015-08-04 Yao Qi <yao.qi@linaro.org>
4981 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4982 * linux-aarch32-low.c: New file.
4983 * linux-aarch32-low.h: New file.
4984 * linux-arm-low.c (arm_fill_gregset): Move it to
4985 linux-aarch32-low.c.
4986 (arm_store_gregset): Likewise.
4987 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4988 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4989 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4990 (regs_info): Rename to regs_info_arm.
4991 (arm_regs_info): Return regs_info_aarch32 if
4992 have_ptrace_getregset is 1 and target description is
4993 arm_with_neon or arm_with_vfpv3.
4994 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4995 Call initialize_low_arch_aarch32 instead.
4997 2015-08-04 Yao Qi <yao.qi@linaro.org>
4999 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5000 * linux-low.c: ... here.
5001 * linux-low.h (have_ptrace_getregset): Declare it.
5003 2015-08-04 Pedro Alves <palves@redhat.com>
5005 * thread-db.c (struct thread_db): Use new typedefs.
5006 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5008 (disable_thread_event_reporting): Cast result of dlsym to
5009 destination function pointer type.
5010 (thread_db_mourn): Use td_ta_delete_ftype.
5012 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5014 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5016 (CDX_BREAKPOINT): Define for R2.
5017 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5018 (the_low_target): Add comments.
5020 2015-07-30 Yao Qi <yao.qi@linaro.org>
5022 * linux-arm-low.c (arm_hwcap): Remove it.
5023 (arm_read_description): New local variable arm_hwcap. Don't
5024 set arm_hwcap to zero.
5026 2015-07-30 Yao Qi <yao.qi@linaro.org>
5028 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5029 Use regcache->tdesc instead.
5030 (arm_store_wmmxregset): Likewise.
5031 (arm_fill_vfpregset): Likewise.
5032 (arm_store_vfpregset): Likewise.
5034 2015-07-30 Yao Qi <yao.qi@linaro.org>
5036 * linux-arm-low.c: Include arch/arm.h.
5037 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5038 (arm_store_gregset): Likewise.
5040 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5042 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5043 ptrace's 4th parameter.
5045 2015-07-27 Yao Qi <yao.qi@linaro.org>
5047 * configure.srv (case aarch64*-*-linux*): Don't set
5050 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5052 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5054 * linux-arm-low.c: Likewise.
5055 * linux-cris-low.c: Likewise.
5056 * linux-crisv32-low.c: Likewise.
5057 * linux-low.c: Likewise.
5058 * linux-m68k-low.c: Likewise.
5059 * linux-mips-low.c: Likewise.
5060 * linux-nios2-low.c: Likewise.
5061 * linux-s390-low.c: Likewise.
5062 * linux-sparc-low.c: Likewise.
5063 * linux-tic6x-low.c: Likewise.
5064 * linux-tile-low.c: Likewise.
5065 * linux-x86-low.c: Likewise.
5067 2015-07-24 Pedro Alves <palves@redhat.com>
5069 * config.in: Regenerate.
5070 * configure: Regenerate.
5072 2015-07-24 Pedro Alves <palves@redhat.com>
5074 * acinclude.m4: Include ../ptrace.m4.
5075 * configure.ac: Call GDB_AC_PTRACE.
5076 * config.in, configure: Regenerate.
5078 2015-07-24 Yao Qi <yao.qi@linaro.org>
5080 * linux-low.c (linux_create_inferior): Remove setting to
5081 proc->priv->new_inferior.
5082 (linux_attach): Likewise.
5083 (linux_low_filter_event): Likewise.
5084 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5086 2015-07-24 Yao Qi <yao.qi@linaro.org>
5088 * linux-low.c (linux_arch_setup): New function.
5089 (linux_low_filter_event): If proc->tdesc is NULL and
5090 proc->attached is true, call the_low_target.arch_setup.
5091 Otherwise, keep status pending, and return.
5092 (linux_resume_one_lwp_throw): Don't call get_pc if
5093 thread->while_stepping isn't NULL. Don't call
5094 get_thread_regcache if proc->tdesc is NULL.
5095 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5096 (linux_target_ops): Install arch_setup.
5097 * server.c (start_inferior): Call the_target->arch_setup.
5098 * target.h (struct target_ops) <arch_setup>: New field.
5099 (target_arch_setup): New marco.
5100 * lynx-low.c (lynx_target_ops): Update.
5101 * nto-low.c (nto_target_ops): Update.
5102 * spu-low.c (spu_target_ops): Update.
5103 * win32-low.c (win32_target_ops): Update.
5105 2015-07-24 Yao Qi <yao.qi@linaro.org>
5107 * linux-low.c (linux_add_process): Don't set
5108 proc->priv->new_inferior.
5109 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5110 (linux_attach): Likewise.
5112 2015-07-24 Yao Qi <yao.qi@linaro.org>
5114 * server.c (start_inferior): Code refactor.
5116 2015-07-24 Yao Qi <yao.qi@linaro.org>
5118 * server.c (process_serial_event): Set general_thread.
5120 2015-07-21 Yao Qi <yao.qi@linaro.org>
5122 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5123 aarch64_linux_get_debug_reg_capacity.
5125 2015-07-17 Yao Qi <yao.qi@linaro.org>
5127 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5128 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5129 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5130 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5131 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5132 (AARCH64_HWP_ALIGNMENT): Likewise.
5133 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5134 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5135 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5136 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5137 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5138 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5139 (struct aarch64_debug_reg_state): Likewise.
5140 (struct arch_lwp_info): Likewise.
5141 (aarch64_align_watchpoint): Likewise.
5142 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5143 (aarch64_watchpoint_length): Likewise.
5144 (aarch64_point_encode_ctrl_reg): Likewise
5145 (aarch64_point_is_aligned): Likewise.
5146 (aarch64_align_watchpoint): Likewise.
5147 (aarch64_linux_set_debug_regs):
5148 (aarch64_dr_state_insert_one_point): Likewise.
5149 (aarch64_dr_state_remove_one_point): Likewise.
5150 (aarch64_handle_breakpoint): Likewise.
5151 (aarch64_handle_aligned_watchpoint): Likewise.
5152 (aarch64_handle_unaligned_watchpoint): Likewise.
5153 (aarch64_handle_watchpoint): Likewise.
5155 2015-07-17 Yao Qi <yao.qi@linaro.org>
5157 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5158 and don't aarch64_get_debug_reg_state. All callers update.
5159 (aarch64_handle_aligned_watchpoint): Likewise.
5160 (aarch64_handle_unaligned_watchpoint): Likewise.
5161 (aarch64_handle_watchpoint): Likewise.
5162 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5163 (aarch64_remove_point): Likewise.
5165 2015-07-17 Yao Qi <yao.qi@linaro.org>
5167 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5169 (aarch64_handle_unaligned_watchpoint): Likewise.
5171 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5173 Revert the previous 3 commits:
5174 Move gdb_regex* to common/
5175 Move linux_find_memory_regions_full & co.
5176 gdbserver build-id attribute generator
5178 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5179 Jan Kratochvil <jan.kratochvil@redhat.com>
5181 gdbserver build-id attribute generator.
5182 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5183 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5184 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5186 (get_dynamic): Use find_pdhr to traverse program headers.
5187 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5188 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5189 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5190 (get_hex_build_id): New.
5191 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5192 to reply XML document.
5194 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5195 Jan Kratochvil <jan.kratochvil@redhat.com>
5197 * target.c: Include target/target-utils.h and fcntl.h.
5198 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5199 (target_fileio_read_stralloc): New functions.
5201 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5203 * Makefile.in (OBS): Add gdb_regex.o.
5205 * config.in: Rebuilt.
5206 * configure: Rebuilt.
5208 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5209 Jan Kratochvil <jan.kratochvil@redhat.com>
5211 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5212 * Makefile.in (OBS): Add target-utils.o.
5213 (linux-maps.o, target-utils.o): New.
5214 * configure.srv (srv_linux_obj): Add linux-maps.o.
5216 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5218 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5220 (the_low_target): Install it.
5222 2015-07-14 Pedro Alves <palves@redhat.com>
5224 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5225 Instead, ignore ECHILD, and throw an error for other errnos.
5227 2015-07-10 Pedro Alves <palves@redhat.com>
5229 * event-loop.c (struct callback_event) <data>: Change type to
5230 gdb_client_data instance instead of gdb_client_data pointer.
5231 (append_callback_event): Adjust.
5233 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5235 * linux-aarch64-low.c: Add comments for each linux_target_ops
5236 method. Remove comments already covered in target_ops and
5237 linux_target_ops definitions.
5238 (the_low_target): Add comments for each unimplemented method.
5240 2015-07-09 Yao Qi <yao.qi@linaro.org>
5242 * linux-aarch64-low.c (aarch64_regmap): Remove.
5243 (aarch64_usrregs_info): Remove.
5244 (regs_info): Set field usrregs to NULL.
5246 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5248 * linux-low.c: Include "rsp-low.h"
5249 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5250 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5251 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5252 (handle_btrace_enable_pt): New.
5253 (handle_btrace_general_set): Support "pt".
5254 (handle_btrace_conf_general_set): Support "pt:size".
5256 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5258 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5261 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5263 * linux-aarch64-low.c: Remove comment about endianness.
5264 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5265 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5268 2015-06-24 Gary Benson <gbenson@redhat.com>
5270 * linux-i386-ipa.c (stdint.h): Do not include.
5271 * lynx-i386-low.c (stdint.h): Likewise.
5272 * lynx-ppc-low.c (stdint.h): Likewise.
5273 * mem-break.c (stdint.h): Likewise.
5274 * thread-db.c (stdint.h): Likewise.
5275 * tracepoint.c (stdint.h): Likewise.
5276 * win32-low.c (stdint.h): Likewise.
5278 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5280 * server.c (write_qxfer_response): Update call to
5281 remote_escape_output.
5283 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5284 Jan Kratochvil <jan.kratochvil@redhat.com>
5286 Merge multiple hex conversions.
5287 * gdbreplay.c (tohex): Rename to 'fromhex'.
5288 (logchar): Use fromhex.
5290 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5292 * server.c (handle_qxfer_libraries): Set `version' attribute for
5295 2015-06-10 Gary Benson <gbenson@redhat.com>
5297 * target.h (struct target_ops) <multifs_open>: New field.
5298 <multifs_unlink>: Likewise.
5299 <multifs_readlink>: Likewise.
5300 * linux-low.c (nat/linux-namespaces.h): New include.
5301 (linux_target_ops): Initialize the_target->multifs_open,
5302 the_target->multifs_unlink and the_target->multifs_readlink.
5303 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5304 * hostio.c (hostio_fs_pid): New static variable.
5305 (hostio_handle_new_gdb_connection): New function.
5306 (handle_setfs): Likewise.
5307 (handle_open): Use the_target->multifs_open as appropriate.
5308 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5309 (handle_readlink): Use the_target->multifs_readlink as
5311 (handle_vFile): Handle vFile:setfs packets.
5312 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5313 after target_handle_new_gdb_connection.
5315 2015-06-10 Gary Benson <gbenson@redhat.com>
5317 * configure.ac (AC_CHECK_FUNCS): Add setns.
5318 * config.in: Regenerate.
5319 * configure: Likewise.
5320 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5321 (linux-namespaces.o): New rule.
5322 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5324 2015-06-09 Gary Benson <gbenson@redhat.com>
5326 * hostio.c (handle_open): Process mode argument with
5327 fileio_to_host_mode.
5329 2015-06-01 Yao Qi <yao.qi@linaro.org>
5331 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5332 * linux-x86-low.c: Likewise.
5334 2015-05-28 Don Breazeal <donb@codesourcery.com>
5336 * linux-low.c (handle_extended_wait): Initialize
5337 thread_info.last_resume_kind for new fork children.
5339 2015-05-15 Pedro Alves <palves@redhat.com>
5341 * target.h (target_handle_new_gdb_connection): Rewrite using if
5342 wrapped in do/while.
5344 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5346 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5347 * configure, config.in: Regenerate.
5348 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5351 2015-05-12 Don Breazeal <donb@codesourcery.com>
5353 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5354 PTRACE_EVENT_VFORK_DONE.
5355 (linux_low_ptrace_options, extended_event_reported): Add vfork
5357 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5358 and "vforkdone" for RSP 'T' Stop Reply Packet.
5359 * server.h (report_vfork_events): Declare
5362 2015-05-12 Don Breazeal <donb@codesourcery.com>
5364 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5365 (the_low_target) <new_fork>: Initialize new member.
5366 * linux-arm-low.c (arm_new_fork): New function.
5367 (the_low_target) <new_fork>: Initialize new member.
5368 * linux-low.c (handle_extended_wait): Call new target function
5370 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5371 * linux-mips-low.c (mips_add_watchpoint): New function
5372 extracted from mips_insert_point.
5373 (the_low_target) <new_fork>: Initialize new member.
5374 (mips_linux_new_fork): New function.
5375 (mips_insert_point): Call mips_add_watchpoint.
5376 * linux-x86-low.c (x86_linux_new_fork): New function.
5377 (the_low_target) <new_fork>: Initialize new member.
5379 2015-05-12 Don Breazeal <donb@codesourcery.com>
5381 * linux-low.c (handle_extended_wait): Implement return value,
5382 rename argument 'event_child' to 'event_lwp', handle
5383 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5384 (linux_low_ptrace_options): New function.
5385 (linux_low_filter_event): Call linux_low_ptrace_options,
5386 use different argument fo linux_enable_event_reporting,
5387 use return value from handle_extended_wait.
5388 (extended_event_reported): New function.
5389 (linux_wait_1): Call extended_event_reported and set
5390 status to report fork events.
5391 (linux_write_memory): Add pid to debug message.
5392 (reset_lwp_ptrace_options_callback): New function.
5393 (linux_handle_new_gdb_connection): New function.
5394 (linux_target_ops): Initialize new structure member.
5395 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5396 * lynx-low.c: Initialize new structure member.
5397 * remote-utils.c (prepare_resume_reply): Implement stop reason
5398 "fork" for "T" stop message.
5399 * server.c (handle_query): Call handle_new_gdb_connection.
5400 * server.h (report_fork_events): Declare global flag.
5401 * target.h (struct target_ops) <handle_new_gdb_connection>:
5403 (target_handle_new_gdb_connection): New macro.
5404 * win32-low.c: Initialize new structure member.
5406 2015-05-12 Don Breazeal <donb@codesourcery.com>
5408 * mem-break.c (APPEND_TO_LIST): Define macro.
5409 (clone_agent_expr): New function.
5410 (clone_one_breakpoint): New function.
5411 (clone_all_breakpoints): New function.
5412 * mem-break.h: Declare new functions.
5414 2015-05-12 Don Breazeal <donb@codesourcery.com>
5416 * linux-low.c (linux_supports_fork_events): New function.
5417 (linux_supports_vfork_events): New function.
5418 (linux_target_ops): Initialize new structure members.
5419 (initialize_low): Call linux_check_ptrace_features.
5420 * lynx-low.c (lynx_target_ops): Initialize new structure
5422 * server.c (report_fork_events, report_vfork_events):
5424 (handle_query): Add new features to qSupported packet and
5426 (captured_main): Initialize new global variables.
5427 * target.h (struct target_ops) <supports_fork_events>:
5429 <supports_vfork_events>: New member.
5430 (target_supports_fork_events): New macro.
5431 (target_supports_vfork_events): New macro.
5432 * win32-low.c (win32_target_ops): Initialize new structure
5435 2015-05-12 Gary Benson <gbenson@redhat.com>
5437 * server.c (handle_qxfer_exec_file): Use current process
5440 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5442 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5443 Remove HAVE_PTRACE_GETREGS conditionals.
5444 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5445 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5447 2015-05-08 Yao Qi <yao.qi@linaro.org>
5449 * linux-low.c (linux_supports_conditional_breakpoints): New
5451 (linux_target_ops): Install new target method.
5452 * lynx-low.c (lynx_target_ops): Install NULL hook for
5453 supports_conditional_breakpoints.
5454 * nto-low.c (nto_target_ops): Likewise.
5455 * spu-low.c (spu_target_ops): Likewise.
5456 * win32-low.c (win32_target_ops): Likewise.
5457 * server.c (handle_query): Check
5458 target_supports_conditional_breakpoints.
5459 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5461 (target_supports_conditional_breakpoints): New macro.
5463 2015-05-06 Pedro Alves <palves@redhat.com>
5466 * server.c (start_inferior): If the process exits, mourn it.
5468 2015-04-21 Gary Benson <gbenson@redhat.com>
5470 * hostio.c (fileio_open_flags_to_host): Factored out to
5471 fileio_to_host_openflags in common/fileio.c. Single use
5474 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5476 * linux-xtensa-low.c (xtensa_fill_gregset)
5477 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5480 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5482 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5483 (regs_info): Replace usrregs pointer with NULL.
5485 2015-04-17 Gary Benson <gbenson@redhat.com>
5487 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5488 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5489 * server.c (handle_qxfer_exec_file): New function.
5490 (qxfer_packets): Add exec-file entry.
5491 (handle_query): Report qXfer:exec-file:read as supported packet.
5493 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5495 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5497 2015-04-09 Gary Benson <gbenson@redhat.com>
5499 * hostio-errno.c (errno_to_fileio_error): Remove function.
5500 Update caller to use remote_fileio_to_fio_error.
5502 2015-04-09 Yao Qi <yao.qi@linaro.org>
5504 * linux-low.c (linux_insert_point): Call
5505 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5506 (linux_remove_point): Call remove_memory_breakpoint if type is
5508 * linux-x86-low.c (x86_insert_point): Don't call
5509 insert_memory_breakpoint.
5510 (x86_remove_point): Don't call remove_memory_breakpoint.
5512 2015-04-01 Pedro Alves <palves@redhat.com>
5513 Cleber Rosa <crosa@redhat.com>
5515 * server.c (gdbserver_usage): Reorganize and extend the usage
5518 2015-03-24 Pedro Alves <palves@redhat.com>
5520 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5521 output. Also dump TRAP_TRACE.
5522 (linux_low_filter_event): In debug output, distinguish a
5523 resume_stop SIGSTOP from a delayed SIGSTOP.
5525 2015-03-24 Gary Benson <gbenson@redhat.com>
5527 * linux-x86-low.c (x86_linux_new_thread): Moved to
5529 (x86_linux_prepare_to_resume): Likewise.
5531 2015-03-24 Gary Benson <gbenson@redhat.com>
5533 * Makefile.in (x86-linux-dregs.o): New rule.
5534 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5535 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5536 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5537 (x86_linux_dr_get): Likewise.
5538 (x86_linux_dr_set): Likewise.
5539 (update_debug_registers_callback): Likewise.
5540 (x86_linux_dr_set_addr): Likewise.
5541 (x86_linux_dr_get_addr): Likewise.
5542 (x86_linux_dr_set_control): Likewise.
5543 (x86_linux_dr_get_control): Likewise.
5544 (x86_linux_dr_get_status): Likewise.
5545 (x86_linux_update_debug_registers): Likewise.
5547 2015-03-24 Gary Benson <gbenson@redhat.com>
5549 * linux-x86-low.c (x86_linux_update_debug_registers):
5550 New function, factored out from...
5551 (x86_linux_prepare_to_resume): ...this.
5553 2015-03-24 Gary Benson <gbenson@redhat.com>
5555 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5556 (x86_linux_dr_set): Likewise.
5557 (update_debug_registers_callback): Likewise.
5558 (x86_linux_dr_set_addr): Likewise.
5559 (x86_linux_dr_get_addr): Likewise.
5560 (x86_linux_dr_set_control): Likewise.
5561 (x86_linux_dr_get_control): Likewise.
5562 (x86_linux_dr_get_status): Likewise.
5563 (x86_linux_prepare_to_resume): Likewise.
5565 2015-03-24 Gary Benson <gbenson@redhat.com>
5567 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5568 Use perror_with_name. Pass string through gettext.
5569 (x86_linux_dr_set): Likewise.
5571 2015-03-24 Gary Benson <gbenson@redhat.com>
5573 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5574 (x86_linux_dr_set_addr): ...this.
5575 (x86_dr_low_get_addr): Rename to...
5576 (x86_linux_dr_get_addr): ...this.
5577 (x86_dr_low_set_control): Rename to...
5578 (x86_linux_dr_set_control): ...this.
5579 (x86_dr_low_get_control): Rename to...
5580 (x86_linux_dr_get_control): ...this.
5581 (x86_dr_low_get_status): Rename to...
5582 (x86_linux_dr_get_status): ...this.
5583 (x86_dr_low): Update with new function names.
5585 2015-03-24 Gary Benson <gbenson@redhat.com>
5587 * Makefile.in (x86-linux.o): New rule.
5588 * configure.srv: Add x86-linux.o to relevant targets.
5589 * linux-low.c (lwp_set_arch_private_info): New function.
5590 (lwp_arch_private_info): Likewise.
5591 * linux-x86-low.c: Include nat/x86-linux.h.
5592 (arch_lwp_info): Removed structure.
5593 (update_debug_registers_callback):
5594 Use lwp_set_debug_registers_changed.
5595 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5596 and lwp_set_debug_registers_changed.
5597 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5599 2015-03-24 Gary Benson <gbenson@redhat.com>
5601 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5602 * linux-arm-low.c (arm_new_thread): Likewise.
5603 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5604 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5605 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5606 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5608 2015-03-24 Gary Benson <gbenson@redhat.com>
5610 * linux-low.c (ptid_of_lwp): New function.
5611 (lwp_is_stopped): Likewise.
5612 (lwp_stop_reason): Likewise.
5613 * linux-x86-low.c (update_debug_registers_callback):
5615 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5618 2015-03-24 Gary Benson <gbenson@redhat.com>
5620 * linux-low.h (linux_stop_lwp): Remove declaration.
5622 2015-03-24 Gary Benson <gbenson@redhat.com>
5624 * linux-low.h: Include nat/linux-nat.h.
5625 * linux-low.c (iterate_over_lwps_args): New structure.
5626 (iterate_over_lwps_filter): New function.
5627 (iterate_over_lwps): Likewise.
5628 * linux-x86-low.c (update_debug_registers_callback):
5629 Update signature to what iterate_over_lwps expects.
5630 Remove PID check that iterate_over_lwps now performs.
5631 (x86_dr_low_set_addr): Use iterate_over_lwps.
5632 (x86_dr_low_set_control): Likewise.
5634 2015-03-24 Gary Benson <gbenson@redhat.com>
5636 * linux-x86-low.c (x86_debug_reg_state): New function.
5637 (x86_linux_prepare_to_resume): Use the above.
5639 2015-03-24 Gary Benson <gbenson@redhat.com>
5641 * linux-low.c (current_lwp_ptid): New function.
5642 * linux-x86-low.c: Include nat/linux-nat.h.
5643 (x86_dr_low_get_addr): Use current_lwp_ptid.
5644 (x86_dr_low_get_control): Likewise.
5645 (x86_dr_low_get_status): Likewise.
5647 2015-03-20 Pedro Alves <palves@redhat.com>
5649 * tracepoint.c (cmd_qtstatus): Make "str" const.
5651 2015-03-20 Pedro Alves <palves@redhat.com>
5653 * server.c (handle_general_set): Make "req_str" const.
5655 2015-03-19 Pedro Alves <palves@redhat.com>
5657 * linux-low.c (linux_resume_one_lwp): Rename to ...
5658 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5659 instead call perror_with_name.
5660 (check_ptrace_stopped_lwp_gone): New function.
5661 (linux_resume_one_lwp): Reimplement as wrapper around
5662 linux_resume_one_lwp_throw that swallows errors if the LWP is
5665 2015-03-19 Pedro Alves <palves@redhat.com>
5667 * linux-low.c (count_events_callback, select_event_lwp_callback):
5668 No longer check whether the thread has resume_stop as last resume
5671 2015-03-19 Pedro Alves <palves@redhat.com>
5673 * linux-low.c (count_events_callback, select_event_lwp_callback):
5674 Use the lwp's status_pending_p field, not the thread's.
5676 2015-03-19 Pedro Alves <palves@redhat.com>
5678 * linux-low.c (select_event_lwp_callback): Update comments to
5679 no longer mention SIGTRAP.
5681 2015-03-18 Gary Benson <gbenson@redhat.com>
5683 * server.c (handle_query): Do not report vFile:fstat as supported.
5685 2015-03-11 Gary Benson <gbenson@redhat.com>
5687 * hostio.c (sys/types.h): New include.
5688 (sys/stat.h): Likewise.
5689 (common-remote-fileio.h): Likewise.
5690 (handle_fstat): New function.
5691 (handle_vFile): Handle vFile:fstat packets.
5693 2015-03-11 Gary Benson <gbenson@redhat.com>
5695 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5696 struct stat.st_blocks and struct stat.st_blksize.
5697 * configure: Regenerate.
5698 * config.in: Likewise.
5699 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5700 (OBS): Add common-remote-fileio.o.
5701 (common-remote-fileio.o): New rule.
5703 2015-03-09 Pedro Alves <palves@redhat.com>
5705 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5706 'struct sockaddr' pointer in 'accept' call.
5708 2015-03-09 Pedro Alves <palves@redhat.com>
5711 2015-03-07 Pedro Alves <palves@redhat.com>
5712 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5713 or <winsock2.h> here. Instead include "gdb_socket.h".
5714 (remote_open): Use union gdb_sockaddr_u.
5715 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5716 or <winsock2.h> here. Instead include "gdb_socket.h".
5717 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5718 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5720 (init_named_socket, gdb_agent_helper_thread): Use union
5723 2015-03-07 Pedro Alves <palves@redhat.com>
5725 * configure.ac (build_warnings): Move
5726 -Wdeclaration-after-statement to the C-specific set.
5727 * configure: Regenerate.
5729 2015-03-07 Pedro Alves <palves@redhat.com>
5731 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5732 or <winsock2.h> here. Instead include "gdb_socket.h".
5733 (remote_open): Use union gdb_sockaddr_u.
5734 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5735 or <winsock2.h> here. Instead include "gdb_socket.h".
5736 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5737 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5739 (init_named_socket, gdb_agent_helper_thread): Use union
5742 2015-03-07 Pedro Alves <palves@redhat.com>
5744 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5747 2015-03-06 Yao Qi <yao.qi@linaro.org>
5749 * linux-aarch64-low.c (aarch64_insert_point): Use
5750 show_debug_regs as a boolean.
5751 (aarch64_remove_point): Likewise.
5753 2015-03-05 Pedro Alves <palves@redhat.com>
5755 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5756 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5757 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5758 * nto-low.c (nto_target_ops): Likewise.
5759 * spu-low.c (spu_target_ops): Likewise.
5760 * win32-low.c (win32_target_ops): Likewise.
5762 2015-03-04 Pedro Alves <palves@redhat.com>
5764 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5765 Decide whether a breakpoint triggered based on the SIGTRAP's
5767 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5768 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5769 (linux_low_filter_event): Check for breakpoints before checking
5771 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5773 (linux_stopped_by_sw_breakpoint)
5774 (linux_supports_stopped_by_sw_breakpoint)
5775 (linux_stopped_by_hw_breakpoint)
5776 (linux_supports_stopped_by_hw_breakpoint): New functions.
5777 (linux_target_ops): Install new target methods.
5779 2015-03-04 Pedro Alves <palves@redhat.com>
5781 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5782 * server.c (swbreak_feature, hwbreak_feature): New globals.
5783 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5784 (captured_main): Clear swbreak_feature and hwbreak_feature.
5785 * server.h (swbreak_feature, hwbreak_feature): Declare.
5786 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5787 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5788 supports_stopped_by_hw_breakpoint>: New fields.
5789 (target_supports_stopped_by_sw_breakpoint)
5790 (target_stopped_by_sw_breakpoint)
5791 (target_supports_stopped_by_hw_breakpoint)
5792 (target_stopped_by_hw_breakpoint): Declare.
5794 2015-03-04 Pedro Alves <palves@redhat.com>
5796 enum lwp_stop_reason -> enum target_stop_reason
5797 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5798 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5799 (linux_wait_1, stuck_in_jump_pad_callback)
5800 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5801 (linux_stopped_by_watchpoint):
5802 * linux-low.h (enum lwp_stop_reason): Delete.
5803 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5804 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5806 2015-03-04 Yao Qi <yao.qi@linaro.org>
5808 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5810 2015-03-03 Gary Benson <gbenson@redhat.com>
5812 * hostio.c (handle_vFile): Fix prefix lengths.
5814 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5816 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5819 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5821 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5822 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5823 (clean): Add "rm -f" for above C files.
5824 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5825 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5826 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5827 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5828 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5829 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5830 (init_registers_s390x_vx_linux64)
5831 (init_registers_s390x_tevx_linux64)
5832 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5833 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5835 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5836 (s390_store_vxrs_high): New functions.
5837 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5839 (s390_arch_setup): Add logic for selecting one of the new target
5840 descriptions. Activate the new vector regsets if applicable.
5841 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5842 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5843 and init_registers_s390x_tevx_linux64.
5845 2015-03-01 Pedro Alves <palves@redhat.com>
5847 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5850 2015-02-27 Pedro Alves <palves@redhat.com>
5852 * linux-x86-low.c (u_debugreg_offset): New function.
5853 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5855 2015-02-27 Pedro Alves <palves@redhat.com>
5857 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5858 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5859 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5860 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5861 (ps_lsetfpregs, ps_getpid)
5862 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5863 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5864 (ps_lsetxregs, ps_plog): Declare.
5866 2015-02-27 Pedro Alves <palves@redhat.com>
5868 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5869 IP_AGENT_EXPORT_FUNC.
5870 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5871 IP_AGENT_EXPORT_FUNC.
5872 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5873 (IP_AGENT_EXPORT): Delete.
5874 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5875 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5876 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5877 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5878 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5879 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5880 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5881 (traceframe_read_count, traceframe_write_count)
5882 (traceframes_created, trace_state_variables, get_raw_reg)
5883 (get_trace_state_variable_value, set_trace_state_variable_value)
5884 (ust_loaded, helper_thread_id, cmd_buf): Use
5885 IPA_SYM_EXPORTED_NAME.
5886 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5887 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5888 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5889 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5890 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5891 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5892 EXTERN_C_PUSH/EXTERN_C_POP.
5893 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5894 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5895 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5896 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5897 (traceframe_write_count, traceframe_read_count)
5898 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5899 (about_to_request_buffer_space, get_trace_state_variable_value)
5900 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5901 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5902 EXTERN_C_PUSH/EXTERN_C_POP.
5903 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5904 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5905 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5906 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5907 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5908 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5909 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5910 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5912 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5913 (IP_AGENT_EXPORT_VAR_DECL): Define.
5915 (gdb_agent_get_raw_reg): Declare.
5917 2015-02-27 Tom Tromey <tromey@redhat.com>
5918 Pedro Alves <palves@redhat.com>
5920 Rename symbols whose names are reserved C++ keywords throughout.
5922 2015-02-27 Pedro Alves <palves@redhat.com>
5924 * Makefile.in (COMPILER): New, get it from autoconf.
5925 (CXX): Get from autoconf instead.
5926 (COMPILE.pre): Use COMPILER.
5927 (CC-LD): Rename to ...
5928 (CC_LD): ... this. Use COMPILER.
5929 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5930 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5931 * acinclude.m4: Include build-with-cxx.m4.
5932 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5933 Disable -Werror by default if building in C++ mode.
5934 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5935 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5936 the C++ compiler. Save/restore CXXFLAGS too.
5937 * configure: Regenerate.
5939 2015-02-27 Pedro Alves <palves@redhat.com>
5941 * acinclude.m4: Include libiberty.m4.
5942 * configure.ac: Call libiberty_INIT.
5943 * config.in, configure: Regenerate.
5945 2015-02-26 Pedro Alves <palves@redhat.com>
5947 * linux-low.c (linux_wait_1): When incrementing the PC past a
5948 program breakpoint always use the_low_target.breakpoint_len as
5949 increment, rather than the maximum between that and
5950 the_low_target.decr_pc_after_break.
5952 2015-02-23 Pedro Alves <palves@redhat.com>
5954 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5955 thread was doing a step-over; always adjust the PC if
5956 we stepped over a permanent breakpoint.
5957 (linux_wait_1): If we stepped over breakpoint that was on top of a
5958 permanent breakpoint, manually advance the PC past it.
5960 2015-02-23 Pedro Alves <palves@redhat.com>
5962 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5964 (x86_fill_gregset, x86_store_gregset): Use it when handling
5967 2015-02-20 Pedro Alves <palves@redhat.com>
5969 * thread-db.c: Include "nat/linux-procfs.h".
5970 (thread_db_init): Skip listing new threads if the kernel supports
5971 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5973 2015-02-20 Pedro Alves <palves@redhat.com>
5975 * linux-low.c (status_pending_p_callback): Use ptid_match.
5977 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5979 PR breakpoints/16812
5980 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5981 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5982 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5984 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5986 PR breakpoints/15956
5987 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5989 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5991 * linux-low.c (linux_low_btrace_conf): Print size.
5992 * server.c (handle_btrace_conf_general_set): New.
5993 (hanle_general_set): Call handle_btrace_conf_general_set.
5994 (handle_query): Report Qbtrace-conf:bts:size as supported.
5996 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5998 * linux-low.c (linux_low_enable_btrace): Update parameters.
5999 (linux_low_btrace_conf): New.
6000 (linux_target_ops)<to_btrace_conf>: Initialize.
6001 * server.c (current_btrace_conf): New.
6002 (handle_btrace_enable): Rename to ...
6003 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
6004 to target_enable_btrace. Update comment. Update users.
6005 (handle_qxfer_btrace_conf): New.
6006 (qxfer_packets): Add btrace-conf entry.
6007 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6008 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6009 (target_ops)<read_btrace_conf>: New.
6010 (target_enable_btrace): Update parameters.
6011 (target_read_btrace_conf): New.
6013 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6015 * server.c (handle_btrace_general_set): Remove call to
6016 target_supports_btrace.
6017 (supported_btrace_packets): New.
6018 (handle_query): Call supported_btrace_packets.
6019 * target.h: include btrace-common.h.
6020 (btrace_target_info): Removed.
6021 (supports_btrace, target_supports_btrace): Update parameters.
6023 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6025 * Makefile.in (SFILES): Add common/btrace-common.c.
6026 (OBS): Add common/btrace-common.o.
6027 (btrace-common.o): Add build rules.
6028 * linux-low: Include btrace-common.h.
6029 (linux_low_read_btrace): Use struct btrace_data. Call
6030 btrace_data_init and btrace_data_fini.
6032 2015-02-06 Pedro Alves <palves@redhat.com>
6034 * thread-db.c (find_new_threads_callback): Add debug output.
6036 2015-02-04 Pedro Alves <palves@redhat.com>
6038 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6039 (resume_stopped_resumed_lwps): New function.
6040 (linux_wait_for_event_filtered): Use it.
6042 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6044 * Makefile.in (SFILES): Add linux-personality.c.
6045 (linux-personality.o): New rule.
6046 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6047 list of objects to be built.
6048 * linux-low.c: Include nat/linux-personality.h.
6049 (linux_create_inferior): Remove code to disable address space
6050 randomization (moved to ../nat/linux-personality.c). Create
6051 cleanup to disable address space randomization.
6053 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6055 * Makefile.in (posix-strerror.o): New rule.
6056 (mingw-strerror.o): Likewise.
6057 * configure: Regenerated.
6058 * configure.ac: Source file ../common/common.host. Initialize new
6059 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6061 2015-01-14 Yao Qi <yao@codesourcery.com>
6063 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6064 (ppc-linux.o): New rule.
6065 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6066 * configure.ac: AC_CHECK_FUNCS(getauxval).
6067 * config.in: Re-generated.
6068 * configure: Re-generated.
6069 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6070 ppc64_64bit_inferior_p
6072 2015-01-14 Yao Qi <yao@codesourcery.com>
6074 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6075 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6076 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6077 (PT_ORIG_R3, PT_TRAP): Likewise.
6078 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6079 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6080 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6082 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6084 * i387-fp.c (i387_cache_to_xsave): In look over
6085 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6086 zmmh_low_space field by use of zmmh_high_space.
6088 2015-01-09 Pedro Alves <palves@redhat.com>
6090 * linux-low.c (step_over_bkpt): Move higher up in the file.
6091 (handle_extended_wait): Don't store the stop_pc here.
6092 (get_stop_pc): Adjust comments and rename to ...
6093 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6094 stopped for a software breakpoint or hardware breakpoint.
6095 (thread_still_has_status_pending_p): New function.
6096 (status_pending_p_callback): Use
6097 thread_still_has_status_pending_p. If the event is no longer
6098 interesting, resume the LWP.
6099 (handle_tracepoints): Add assert.
6100 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6101 (wstatus_maybe_breakpoint): New function.
6102 (cancel_breakpoint): Delete function.
6103 (check_stopped_by_watchpoint): New function, factored out from
6104 linux_low_filter_event.
6105 (lp_status_maybe_breakpoint): Delete function.
6106 (linux_low_filter_event): Remove filter_ptid argument.
6107 Leave thread group exits pending here. Store the LWP's stop PC.
6108 Always leave events pending.
6109 (linux_wait_for_event_filtered): Pull all events out of the
6110 kernel, and leave them all pending.
6111 (count_events_callback, select_event_lwp_callback): Consider all
6113 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6114 (select_event_lwp): Only give preference to the stepping LWP in
6115 all-stop mode. Adjust comments.
6116 (ignore_event): New function.
6117 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6118 references to cancel_breakpoints. Adjust to renames. Also give
6119 equal priority to all LWPs that have had events in non-stop mode.
6120 If reporting a software breakpoint event, unadjust the LWP's PC.
6121 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6122 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6124 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6125 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6126 (linux_stopped_by_watchpoint): Adjust.
6127 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6128 * linux-low.h (enum lwp_stop_reason): New.
6129 (struct lwp_info) <stop_pc>: Adjust comment.
6130 <stopped_by_watchpoint>: Delete field.
6131 <stop_reason>: New field.
6132 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6133 * mem-break.c (software_breakpoint_inserted_here)
6134 (hardware_breakpoint_inserted_here): New function.
6135 * mem-break.h (software_breakpoint_inserted_here)
6136 (hardware_breakpoint_inserted_here): Declare.
6137 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6138 (cancel_breakpoints): Delete.
6139 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6140 (upload_fast_traceframes): Remove references to
6143 2015-01-09 Pedro Alves <palves@redhat.com>
6145 * thread-db.c (find_new_threads_callback): Ignore thread if the
6146 kernel thread ID is -1.
6148 2015-01-09 Pedro Alves <palves@redhat.com>
6150 * linux-low.c (linux_attach_fail_reason_string): Move to
6151 nat/linux-ptrace.c, and rename.
6152 (linux_attach_lwp): Update comment.
6153 (attach_proc_task_lwp_callback): New function.
6154 (linux_attach): Adjust to rename and use
6155 linux_proc_attach_tgid_threads.
6156 (linux_attach_fail_reason_string): Delete declaration.
6158 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6160 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6161 * server.c (gdbserver_version): Likewise.
6163 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6165 * remote-utils.c: Include ctype.h.
6166 (input_interrupt): Explicitly handle the case when the char
6167 received is the NUL byte. Improve the printing of non-ASCII
6170 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6172 * linux-low.c (linux_low_filter_event): Update call to
6173 linux_enable_event_reporting following the addition of
6174 a new parameter to that function.
6176 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6179 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6180 (AARCH64_FPCR_REGNO): Likewise.
6181 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6182 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6183 (aarch64_store_fpregset): Likewise.
6185 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6187 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6188 Remove FIXME comment about assumption about N.
6190 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6192 * configure.ac: If large-file support is disabled in GDBserver,
6193 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6194 * configure: Regenerate.
6196 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6198 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6199 warning upon ENODATA from ptrace.
6200 * linux-s390-low.c (s390_store_tdb): New.
6201 (s390_regsets): Add regset for NT_S390_TDB.
6203 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6205 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6206 without a fill_function.
6207 * linux-s390-low.c (s390_fill_last_break): Remove.
6208 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6209 (s390_arch_setup): Use regset's size instead of fill_function for
6212 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6214 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6215 the regset's store function when ptrace returned an error.
6216 * regcache.c (get_thread_regcache): Invalidate register cache
6217 before fetching inferior's registers.
6219 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6221 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6222 while-loop as for-loop.
6223 (regsets_store_inferior_registers): Likewise.
6225 2014-11-28 Yao Qi <yao@codesourcery.com>
6227 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6228 * config.in, configure: Re-generate.
6229 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6232 2014-11-21 Yao Qi <yao@codesourcery.com>
6234 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6235 (AC_CHECK_HEADERS): Remove malloc.h.
6236 * configure: Re-generated.
6237 * config.in: Re-generated.
6238 * server.h: Don't include alloca.h and malloc.h.
6239 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6240 Don't include malloc.h.
6242 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6244 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6245 corresponding ERRNO check in same block.
6247 2014-11-12 Pedro Alves <palves@redhat.com>
6249 * server.c (cont_thread): Update comment.
6250 (start_inferior, attach_inferior): No longer clear cont_thread.
6251 (handle_v_cont): No longer set cont_thread.
6252 (captured_main): Clear cont_thread each time a GDB connects.
6254 2014-11-12 Pedro Alves <palves@redhat.com>
6256 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6257 thread, and don't resume all threads if the Hc thread has exited.
6259 2014-11-12 Pedro Alves <palves@redhat.com>
6261 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6262 the process group instead of to a specific LWP.
6264 2014-10-15 Pedro Alves <palves@redhat.com>
6267 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6269 (arm_set_thread_context): Delete.
6270 (the_low_target): Adjust.
6271 * win32-i386-low.c (debug_registers_changed)
6272 (debug_registers_used): Delete.
6273 (update_debug_registers_callback): New function.
6274 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6275 needing to update their debug registers.
6276 (win32_get_current_dr): New function.
6277 (x86_dr_low_get_addr, x86_dr_low_get_control)
6278 (x86_dr_low_get_status): Fetch the debug register from the thread
6280 (i386_initial_stuff): Adjust.
6281 (i386_get_thread_context): Remove current_event parameter. Don't
6282 clear debug_registers_changed nor copy DR values to
6284 (i386_set_thread_context): Delete.
6285 (i386_prepare_to_resume): New function.
6286 (i386_thread_added): Mark the thread as needing to update irs
6288 (the_low_target): Remove i386_set_thread_context and install
6289 i386_prepare_to_resume.
6290 * win32-low.c (win32_get_thread_context): Adjust.
6291 (win32_set_thread_context): Use SetThreadContext
6293 (win32_prepare_to_resume): New function.
6294 (win32_require_context): New function, factored out from ...
6295 (thread_rec): ... this.
6296 (continue_one_thread): Call win32_prepare_to_resume on each thread
6297 we're about to continue.
6298 (win32_resume): Call win32_prepare_to_resume on the event thread.
6299 * win32-low.h (struct win32_thread_info)
6300 <debug_registers_changed>: New field.
6301 (struct win32_target_ops): Change prototype of set_thread_context,
6302 delete set_thread_context and add prepare_to_resume.
6303 (win32_require_context): New declaration.
6305 2014-10-08 Gary Benson <gbenson@redhat.com>
6307 * server.h: Do not include common-exceptions.h.
6309 2014-10-08 Gary Benson <gbenson@redhat.com>
6311 * server.h: Do not include cleanups.h.
6313 2014-09-30 James Hogan <james.hogan@imgtec.com>
6315 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6318 2014-09-23 Yao Qi <yao@codesourcery.com>
6320 * linux-low.c (lp_status_maybe_breakpoint): New function.
6321 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6322 (count_events_callback): Likewise.
6323 (select_event_lwp_callback): Likewise.
6324 (cancel_breakpoints_callback): Likewise.
6326 2014-09-19 Don Breazeal <donb@codesourcery.com>
6328 * linux-low.c (handle_extended_wait): Call
6329 linux_ptrace_get_extended_event.
6330 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6331 linux_is_extended_waitstatus.
6333 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6335 * Makefile.in (CPPFLAGS): Define.
6336 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6337 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6339 2014-09-16 Gary Benson <gbenson@redhat.com>
6341 * inferiors.h (current_inferior): Renamed as...
6342 (current_thread): New variable. All uses updated.
6343 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6344 (maybe_move_out_of_jump_pad): Likewise.
6345 (cancel_breakpoint): Likewise.
6346 (linux_low_filter_event): Likewise.
6347 (wait_for_sigstop): Likewise.
6348 (linux_resume_one_lwp): Likewise.
6349 (need_step_over_p): Likewise.
6350 (start_step_over): Likewise.
6351 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6352 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6353 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6354 and save_inferior as saved_thread.
6355 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6357 (regcache_invalidate_thread): Likewise.
6358 * remote-utils.c (prepare_resume_reply): Likewise.
6359 * thread-db.c (thread_db_get_tls_address): Likewise.
6360 (disable_thread_event_reporting): Likewise.
6361 (remove_thread_event_breakpoints): Likewise.
6362 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6364 * target.h (set_desired_inferior): Renamed as...
6365 (set_desired_thread): New declaration. All uses updated.
6366 * server.c (myresume): Updated comment to reference thread instead
6368 (handle_serial_event): Likewise.
6369 (handle_target_event): Likewise.
6371 2014-09-12 Tom Tromey <tromey@redhat.com>
6372 Gary Benson <gbenson@redhat.com>
6374 * regcache.h: Include common-regcache.h.
6375 (regcache_read_pc): Don't declare.
6376 * regcache.c (get_thread_regcache_for_ptid): New function.
6378 2014-09-11 Tom Tromey <tromey@redhat.com>
6379 Gary Benson <gbenson@redhat.com>
6381 * symbol.c: New file.
6382 * Makefile.in (SFILES): Add symbol.c.
6383 (OBS): Add symbol.o.
6385 2014-09-11 Gary Benson <gbenson@redhat.com>
6387 * target.c (target_stop_ptid, target_continue_ptid): New
6390 2014-09-11 Tom Tromey <tromey@redhat.com>
6391 Gary Benson <gbenson@redhat.com>
6393 * target.h: Include target/target.h.
6394 * target.c (target_read_memory, target_read_uint32)
6395 (target_write_memory): New functions.
6397 2014-09-11 Gary Benson <gbenson@redhat.com>
6399 * server.h (debug_hw_points): Don't declare.
6400 * server.c (debug_hw_points): Don't define. Replace all uses
6401 with show_debug_regs.
6402 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6403 all uses with show_debug_regs.
6405 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6407 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6408 endianness into account.
6409 (ppc_supply_ptrace_register): Likewise.
6411 2014-09-03 James Hogan <james.hogan@imgtec.com>
6413 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6414 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6416 2014-09-03 Gary Benson <gbenson@redhat.com>
6418 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6419 ALL_DEBUG_ADDRESS_REGISTERS.
6421 2014-09-02 Gary Benson <gbenson@redhat.com>
6423 * i386-low.h: Renamed as...
6424 * x86-low.h: New file. All type, function and variable name
6425 prefixes changed from "i386_" to "x86_". All references updated.
6426 * i386-low.c: Renamed as...
6427 * x86-low.c: New file. All type, function and variable name
6428 prefixes changed from "i386_" to "x86_". All references updated.
6430 2014-09-02 Gary Benson <gbenson@redhat.com>
6432 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6433 (x86_linux_new_thread): Likewise.
6435 2014-08-29 Gary Benson <gbenson@redhat.com>
6437 * server.h (setjmp.h): Do not include.
6438 (toplevel): Do not declare.
6439 (common-exceptions.h): Include.
6440 (cleanups.h): Likewise.
6441 * server.c (toplevel): Do not define.
6442 (exit_code): New static global.
6443 (detach_or_kill_for_exit_cleanup): New function.
6444 (main): New function. Original main renamed to...
6445 (captured_main): New function.
6446 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6448 2014-08-29 Gary Benson <gbenson@redhat.com>
6450 * Makefile.in (SFILES): Add common/common-exceptions.c.
6451 (OBS): Add common-exceptions.o.
6452 (common-exceptions.o): New rule.
6453 * utils.c (prepare_to_throw_exception): New function.
6455 2014-08-29 Gary Benson <gbenson@redhat.com>
6457 * config.in: Regenerate.
6458 * configure: Likewise.
6460 2014-08-29 Gary Benson <gbenson@redhat.com>
6462 * Makefile.in (SFILES): Add common/cleanups.c.
6464 (cleanups.o): New rule.
6466 2014-08-29 Gary Benson <gbenson@redhat.com>
6468 * utils.c (internal_vwarning): New function.
6470 2014-08-28 Gary Benson <gbenson@redhat.com>
6472 * utils.h (fatal): Remove declaration.
6473 * utils.c (fatal): Remove function.
6475 2014-08-28 Gary Benson <gbenson@redhat.com>
6477 * tracepoint.c (gdb_agent_init): Replace fatal with
6479 (initialize_tracepoint): Likewise.
6481 2014-08-28 Gary Benson <gbenson@redhat.com>
6483 * remote-utils.c (remote_prepare): Replace fatal with error.
6485 2014-08-28 Gary Benson <gbenson@redhat.com>
6487 * linux-low.c (linux_async): Replace fatal with warning.
6489 (linux_start_non_stop): Return -1 if linux_async failed.
6491 2014-08-28 Gary Benson <gbenson@redhat.com>
6493 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6495 (i386_dr_low_get_addr): Remove vague comment.
6496 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6499 2014-08-28 Gary Benson <gbenson@redhat.com>
6501 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6502 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6504 (linux_resume_one_lwp): Likewise.
6505 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6507 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6508 with internal_error.
6509 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6510 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6511 (find_register_by_name): Replace fatal with internal_error.
6512 (find_regno): Likewise.
6513 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6514 * thread-db.c (thread_db_create_event): Likewise.
6515 (thread_db_load_search): Likewise.
6516 (try_thread_db_load_1): Likewise.
6517 * tracepoint.c (get_jump_space_head): Replace fatal with
6519 (claim_trampoline_space): Likewise.
6520 (have_fast_tracepoint_trampoline_buffer): Likewise.
6521 (cmd_qtstart): Likewise.
6522 (stop_tracing): Likewise.
6523 (fast_tracepoint_collecting): Likewise.
6524 (target_malloc): Likewise.
6525 (download_tracepoint): Likewise.
6526 (download_trace_state_variables): Replace check with gdb_assert.
6527 (upload_fast_traceframes): Replace fatal with internal_error.
6529 2014-08-19 Tom Tromey <tromey@redhat.com>
6530 Gary Benson <gbenson@redhat.com>
6532 * Makefile.in (SFILES): Add common/common-debug.c.
6533 (OBS): Add common-debug.o.
6534 (common-debug.o): New rule.
6535 * debug.h (debug_printf): Don't declare.
6536 * debug.c (debug_printf): Renamed and rewritten as...
6537 (debug_vprintf): New function.
6539 2014-08-19 Gary Benson <gbenson@redhat.com>
6541 * utils.h: Do not include print-utils.h.
6543 2014-08-19 Tom Tromey <tromey@redhat.com>
6544 Gary Benson <gbenson@redhat.com>
6546 * server.h: Add static assertion.
6547 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6549 2014-08-19 Tom Tromey <tromey@redhat.com>
6550 Gary Benson <gbenson@redhat.com>
6552 * Makefile.in (SFILES): Add common/errors.c.
6553 (OBS): Add errors.o.
6554 (IPA_OBS): Add errors-ipa.o.
6555 (errors.o): New rule.
6556 (errors-ipa.o): Likewise.
6557 * utils.h (perror_with_name, error, warning): Don't declare.
6558 * utils.c (warning): Renamed and rewritten as...
6559 (vwarning): New function.
6560 (error): Renamed and rewritten as...
6561 (verror): New function.
6562 (internal_error): Renamed and rewritten as...
6563 (internal_verror): New function.
6565 2014-08-07 Gary Benson <gbenson@redhat.com>
6567 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6568 * configure: Regenerate.
6569 * config.in: Likewise.
6570 * server.h: Do not include errno.h.
6571 * event-loop.c: Likewise.
6572 * hostio-errno.c: Likewise.
6573 * linux-low.c: Likewise.
6574 * remote-utils.c: Likewise.
6575 * spu-low.c: Likewise.
6576 * utils.c: Likewise.
6577 * gdbreplay.c: Unconditionally include errno.h.
6579 2014-08-07 Gary Benson <gbenson@redhat.com>
6581 * server.h: Do not include string.h.
6582 * event-loop.c: Likewise.
6583 * linux-low.c: Likewise.
6584 * regcache.c: Likewise.
6585 * remote-utils.c: Likewise.
6586 * spu-low.c: Likewise.
6587 * utils.c: Likewise.
6589 2014-08-07 Gary Benson <gbenson@redhat.com>
6591 * server.h: Do not include gdb_assert.h.
6593 2014-08-07 Gary Benson <gbenson@redhat.com>
6595 * server.h: Do not include common-utils.h.
6597 2014-08-07 Gary Benson <gbenson@redhat.com>
6599 * server.h: Do not include ptid.h.
6600 * notif.h: Likewise.
6602 2014-08-07 Gary Benson <gbenson@redhat.com>
6604 * server.h: Do not include gdb_locale.h.
6606 2014-08-07 Gary Benson <gbenson@redhat.com>
6608 * server.h: Do not include gdb/signals.h.
6609 * win32-low.c: Likewise.
6611 2014-08-07 Gary Benson <gbenson@redhat.com>
6613 * server.h: Do not include pathmax.h.
6615 2014-08-07 Gary Benson <gbenson@redhat.com>
6617 * server.h: Do not include libiberty.h.
6618 * linux-bfin-low.c: Likewise.
6620 2014-08-07 Gary Benson <gbenson@redhat.com>
6622 * server.h: Do not include ansidecl.h.
6624 2014-08-07 Gary Benson <gbenson@redhat.com>
6626 * linux-x86-low.c: Do not include stddef.h.
6627 * lynx-ppc-low.c: Likewise.
6628 * tracepoint.c: Likewise.
6630 2014-08-07 Gary Benson <gbenson@redhat.com>
6632 * server.h: Do not include stdarg.h.
6633 * nto-low.c: Likewise.
6635 2014-08-07 Gary Benson <gbenson@redhat.com>
6637 * server.h: Do not include stdlib.h.
6638 * inferiors.c: Likewise.
6639 * linux-low.c: Likewise.
6640 * regcache.c: Likewise.
6641 * spu-low.c: Likewise.
6642 * tracepoint.c: Likewise.
6643 * utils.c: Likewise.
6645 2014-08-07 Gary Benson <gbenson@redhat.com>
6647 * server.h: Do not include stdio.h.
6648 * linux-low.c: Likewise.
6649 * remote-utils.c: Likewise.
6650 * spu-low.c: Likewise.
6651 * utils.c: Likewise.
6652 * wincecompat.c: Likewise.
6654 2014-08-06 Gary Benson <gbenson@redhat.com>
6656 * regcache.c (init_register_cache): Move conditionals inside if.
6658 2014-08-06 Gary Benson <gbenson@redhat.com>
6660 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6662 2014-07-31 Gary Benson <gbenson@redhat.com>
6664 * ax.h: Do not include server.h.
6665 * gdbthread.h: Likewise.
6666 * lynx-low.h: Likewise.
6667 * notif.h: Likewise.
6669 2014-07-30 Gary Benson <gbenson@redhat.com>
6671 * server.h: Include common-defs.h.
6672 Do not include config.h or build-gnulib-gdbserver/config.h.
6674 2014-07-30 Gary Benson <gbenson@redhat.com>
6676 * hostio-errno.c: Move server.h to top of includes list.
6677 * inferiors.c: Likewise.
6678 * linux-x86-low.c: Likewise.
6679 * notif.c: Include server.h.
6681 2014-07-24 Tom Tromey <tromey@redhat.com>
6682 Gary Benson <gbenson@redhat.com>
6684 * server.h (CORE_ADDR): Now unsigned.
6686 2014-07-16 Pedro Alves <palves@redhat.com>
6688 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6690 2014-07-15 Pedro Alves <palves@redhat.com>
6692 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6695 2014-07-11 Pedro Alves <palves@redhat.com>
6697 * linux-low.c (kill_wait_lwp): New function, based on
6698 kill_one_lwp_callback, but use my_waitpid directly.
6699 (kill_one_lwp_callback, linux_kill): Use it.
6701 2014-06-23 Pedro Alves <palves@redhat.com>
6703 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6704 before setting DR0..DR3.
6706 2014-06-20 Gary Benson <gbenson@redhat.com>
6708 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6709 * configure: Regenerated.
6710 * config.in: Likewise.
6712 2014-06-20 Gary Benson <gbenson@redhat.com>
6714 * Makefile.in (SFILES): Update locations for files moved
6716 (object file files): Reordered.
6718 2014-06-20 Gary Benson <gbenson@redhat.com>
6720 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6721 (i386_dr_low_set_addr): Likewise.
6722 (i386_dr_low_get_addr): Likewise.
6723 (i386_dr_low_can_set_control): Likewise.
6724 (i386_dr_low_set_control): Likewise.
6725 (i386_dr_low_get_control): Likewise.
6726 (i386_dr_low_get_status): Likewise.
6727 (i386_get_debug_register_length): Likewise.
6728 * linux-x86-low.c (i386_dr_low_set_addr):
6729 Changed signature. Made static.
6730 (i386_dr_low_get_addr): Likewise.
6731 (i386_dr_low_set_control): Likewise.
6732 (i386_dr_low_get_control): Likewise.
6733 (i386_dr_low_get_status): Likewise.
6734 (i386_dr_low): New global variable.
6735 * win32-i386-low.c (i386_dr_low_set_addr):
6736 Changed signature. Made static.
6737 (i386_dr_low_get_addr): Likewise.
6738 (i386_dr_low_set_control): Likewise.
6739 (i386_dr_low_get_control): Likewise.
6740 (i386_dr_low_get_status): Likewise.
6741 (i386_dr_low): New global variable.
6743 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6745 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6746 * Makefile.in (AR, AR_FLAGS): Define.
6747 * configure: Regenerate.
6749 2014-06-19 Gary Benson <gbenson@redhat.com>
6751 * Makefile.in (i386-dregs.o): New rule.
6752 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6753 * i386-low.c (target.h): Remove include.
6754 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6755 (DR_CONTROL_SHIFT): Likewise.
6756 (DR_CONTROL_SIZE): Likewise.
6757 (DR_RW_EXECUTE): Likewise.
6758 (DR_RW_WRITE): Likewise.
6759 (DR_RW_READ): Likewise.
6760 (DR_RW_IORW): Likewise.
6761 (DR_LEN_1): Likewise.
6762 (DR_LEN_2): Likewise.
6763 (DR_LEN_4): Likewise.
6764 (DR_LEN_8): Likewise.
6765 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6766 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6767 (DR_ENABLE_SIZE): Likewise.
6768 (DR_LOCAL_SLOWDOWN): Likewise.
6769 (DR_GLOBAL_SLOWDOWN): Likewise.
6770 (DR_CONTROL_RESERVED): Likewise.
6771 (I386_DR_CONTROL_MASK): Likewise.
6772 (I386_DR_VACANT): Likewise.
6773 (I386_DR_LOCAL_ENABLE): Likewise.
6774 (I386_DR_GLOBAL_ENABLE): Likewise.
6775 (I386_DR_DISABLE): Likewise.
6776 (I386_DR_SET_RW_LEN): Likewise.
6777 (I386_DR_GET_RW_LEN): Likewise.
6778 (I386_DR_WATCH_HIT): Likewise.
6779 (i386_wp_op_t): Likewise.
6780 (i386_show_dr): Likewise.
6781 (i386_length_and_rw_bits): Likewise.
6782 (i386_insert_aligned_watchpoint): Likewise.
6783 (i386_remove_aligned_watchpoint): Likewise.
6784 (i386_handle_nonaligned_watchpoint): Likewise.
6785 i386_update_inferior_debug_regs(): Likewise.
6786 (i386_dr_insert_watchpoint): Likewise.
6787 (i386_dr_remove_watchpoint): Likewise.
6788 (i386_dr_region_ok_for_watchpoint): Likewise.
6789 (i386_dr_stopped_data_address): Likewise.
6790 (i386_dr_stopped_by_watchpoint): Likewise.
6792 2014-06-19 Gary Benson <gbenson@redhat.com>
6794 * i386-low.c (i386_dr_show): Renamed to
6795 i386_show_dr and made static. All uses updated.
6796 (i386_dr_length_and_rw_bits): Renamed to
6797 i386_length_and_rw_bits and made static.
6799 (i386_dr_insert_aligned_watchpoint): Renamed to
6800 i386_insert_aligned_watchpoint and made static.
6802 (i386_dr_remove_aligned_watchpoint): Renamed to
6803 i386_remove_aligned_watchpoint and made static.
6805 (i386_dr_update_inferior_debug_regs): Renamed to
6806 i386_update_inferior_debug_regs and made static.
6809 2014-06-18 Gary Benson <gbenson@redhat.com>
6811 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6812 (i386_dr_low_can_set_control): Likewise.
6813 (i386_get_debug_register_length): Likewise.
6814 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6815 (i386_dr_low_can_set_control): Likewise.
6816 (i386_get_debug_register_length): Likewise.
6818 2014-06-17 Gary Benson <gbenson@redhat.com>
6820 * i386-low.h (i386-dregs.h): New include.
6821 (DR_FIRSTADDR): Now in i386-dregs.h.
6822 (DR_LASTADDR): Likewise.
6823 (DR_NADDR): Likewise.
6824 (DR_STATUS): Likewise.
6825 (DR_CONTROL): Likewise.
6826 (i386_debug_reg_state): Likewise.
6827 (i386_dr_insert_watchpoint): Likewise.
6828 (i386_dr_remove_watchpoint): Likewise.
6829 (i386_dr_region_ok_for_watchpoint): Likewise.
6830 (i386_dr_stopped_data_address): Likewise.
6831 (i386_dr_stopped_by_watchpoint): Likewise.
6832 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6834 2014-06-18 Gary Benson <gbenson@redhat.com>
6836 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6837 i386_dr_insert_watchpoint.
6838 (i386_low_remove_watchpoint): Renamed to
6839 i386_dr_remove_watchpoint.
6840 (i386_low_region_ok_for_watchpoint): Renamed to
6841 i386_dr_region_ok_for_watchpoint.
6842 (i386_low_stopped_data_address): Renamed to
6843 i386_dr_stopped_data_address.
6844 (i386_low_stopped_by_watchpoint): Renamed to
6845 i386_dr_stopped_by_watchpoint.
6846 * i386-low.c (i386_show_dr): Renamed to
6847 i386_dr_show and made nonstatic. All uses updated.
6848 (i386_length_and_rw_bits): Renamed to
6849 i386_dr_length_and_rw_bits and made nonstatic.
6851 (i386_insert_aligned_watchpoint): Renamed to
6852 i386_dr_insert_aligned_watchpoint and made nonstatic.
6854 (i386_remove_aligned_watchpoint): Renamed to
6855 i386_dr_remove_aligned_watchpoint and made nonstatic.
6857 (i386_update_inferior_debug_regs): Renamed to
6858 i386_dr_update_inferior_debug_regs and made nonstatic.
6860 (i386_low_insert_watchpoint): Renamed to
6861 i386_dr_insert_watchpoint. All uses updated.
6862 (i386_low_remove_watchpoint): Renamed to
6863 i386_dr_remove_watchpoint. All uses updated.
6864 (i386_low_region_ok_for_watchpoint): Renamed to
6865 i386_dr_region_ok_for_watchpoint. All uses updated.
6866 (i386_low_stopped_data_address): Renamed to
6867 i386_dr_stopped_data_address. All uses updated.
6868 (i386_low_stopped_by_watchpoint): Renamed to
6869 i386_dr_stopped_by_watchpoint. All uses updated.
6871 2014-06-18 Gary Benson <gbenson@redhat.com>
6873 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6874 (i386_dr_low_can_set_control): Likewise.
6875 (i386_insert_aligned_watchpoint): New check.
6877 2014-06-18 Gary Benson <gbenson@redhat.com>
6879 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6882 2014-06-18 Gary Benson <gbenson@redhat.com>
6884 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6885 instead of fatal and error.
6886 (i386_handle_nonaligned_watchpoint): Likewise.
6888 2014-06-18 Gary Benson <gbenson@redhat.com>
6890 * i386-low.c (i386_get_debug_register_length): New macro.
6891 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6892 (i386_show_dr): Use debug_printf instead of fprintf. Use
6893 phex to format values.
6895 2014-06-18 Gary Benson <gbenson@redhat.com>
6897 * i386-low.h: Comment changes.
6898 * i386-low.c: Likewise.
6900 2014-06-18 Gary Benson <gbenson@redhat.com>
6902 * i386-low.c: Whitespace changes.
6904 2014-06-12 Tom Tromey <tromey@redhat.com>
6906 * utils.c (freeargv): Remove.
6908 2014-06-12 Tom Tromey <tromey@redhat.com>
6910 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6911 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6912 (parse_debug_format_options): Likewise.
6913 (gdbserver_usage): Likewise.
6914 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6915 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6916 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6918 ($(LIBGNU)): Depend on libiberty.
6919 (all-lib): Recurse into all subdirs.
6920 (install-only): Invoke "install" target in subdirs.
6921 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6923 * configure: Rebuild.
6924 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6925 for vasprintf, vsnprintf, or gettimeofday.
6926 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6929 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6931 * development.sh: Delete.
6932 * Makefile.in (config.status): Adjust dependency on development.sh.
6933 * configure.ac: Adjust development.sh source call.
6934 * configure: Regenerate.
6936 2014-06-02 Pedro Alves <palves@redhat.com>
6938 * ax.c (gdb_free_agent_expr): New function.
6939 * ax.h (gdb_free_agent_expr): New declaration.
6940 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6942 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6944 (clear_breakpoint_conditions_and_commands): New function.
6945 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6946 (clear_breakpoint_conditions_and_commands): New declaration.
6948 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6950 * linux-aarch64-low.c (asm/ptrace.h): Include.
6952 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6954 Fix TLS access for -static -pthread.
6955 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6956 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6957 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6959 2014-05-20 Pedro Alves <palves@redhat.com>
6961 * linux-aarch64-low.c (aarch64_insert_point)
6962 (aarch64_remove_point): No longer check whether the type is
6963 supported here. Adjust to new interface.
6964 (the_low_target): Install aarch64_supports_z_point_type as
6965 supports_z_point_type method.
6966 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6967 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6968 instead of a Z packet char. Adjust.
6969 (arm_supports_z_point_type): New function.
6970 (arm_insert_point, arm_remove_point): Adjust to new interface.
6971 (the_low_target): Install arm_supports_z_point_type.
6972 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6973 (cris_insert_point, cris_remove_point): Adjust to new interface.
6974 Don't check whether the type is supported here.
6975 (the_low_target): Install cris_supports_z_point_type.
6976 * linux-low.c (linux_supports_z_point_type): New function.
6977 (linux_insert_point, linux_remove_point): Adjust to new interface.
6978 * linux-low.h (struct linux_target_ops) <insert_point,
6979 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6980 raw_breakpoint pointer parameter.
6981 <supports_z_point_type>: New method.
6982 * linux-mips-low.c (mips_supports_z_point_type): New function.
6983 (mips_insert_point, mips_remove_point): Adjust to new interface.
6984 Use mips_supports_z_point_type.
6985 (the_low_target): Install mips_supports_z_point_type.
6986 * linux-ppc-low.c (the_low_target): Install NULL as
6987 supports_z_point_type method.
6988 * linux-s390-low.c (the_low_target): Install NULL as
6989 supports_z_point_type method.
6990 * linux-sparc-low.c (the_low_target): Install NULL as
6991 supports_z_point_type method.
6992 * linux-x86-low.c (x86_supports_z_point_type): New function.
6993 (x86_insert_point): Adjust to new insert_point interface. Use
6994 insert_memory_breakpoint. Adjust to new
6995 i386_low_insert_watchpoint interface.
6996 (x86_remove_point): Adjust to remove_point interface. Use
6997 remove_memory_breakpoint. Adjust to new
6998 i386_low_remove_watchpoint interface.
6999 (the_low_target): Install x86_supports_z_point_type.
7000 * lynx-low.c (lynx_target_ops): Install NULL as
7001 supports_z_point_type callback.
7002 * nto-low.c (nto_supports_z_point_type): New.
7003 (nto_insert_point, nto_remove_point): Adjust to new interface.
7004 (nto_target_ops): Install nto_supports_z_point_type.
7005 * mem-break.c: Adjust intro comment.
7006 (struct raw_breakpoint) <raw_type, size>: New fields.
7007 <inserted>: Update comment.
7008 <shlib_disabled>: Delete field.
7009 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7010 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7011 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7012 (raw_bkpt_type_to_target_hw_bp_type): New function.
7013 (find_enabled_raw_code_breakpoint_at): New function.
7014 (find_raw_breakpoint_at): New type and size parameters. Use them.
7015 (insert_memory_breakpoint): New function, based off
7016 set_raw_breakpoint_at.
7017 (remove_memory_breakpoint): New function.
7018 (set_raw_breakpoint_at): Reimplement.
7019 (set_breakpoint): New, based on set_breakpoint_at.
7020 (set_breakpoint_at): Reimplement.
7021 (delete_raw_breakpoint): Go through the_target->remove_point
7022 instead of assuming memory breakpoints.
7023 (find_gdb_breakpoint_at): Delete.
7024 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7025 (find_gdb_breakpoint): New function.
7026 (set_gdb_breakpoint_at): Delete.
7027 (z_type_supported): New function.
7028 (set_gdb_breakpoint_1): New function, loosely based off
7029 set_gdb_breakpoint_at.
7030 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7031 (delete_gdb_breakpoint_at): Delete.
7032 (delete_gdb_breakpoint_1): New function, loosely based off
7033 delete_gdb_breakpoint_at.
7034 (delete_gdb_breakpoint): New function.
7035 (clear_gdb_breakpoint_conditions): Rename to ...
7036 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7038 (add_condition_to_breakpoint): Make static.
7039 (add_breakpoint_condition): Take a struct breakpoint pointer
7040 instead of an address. Adjust.
7041 (gdb_condition_true_at_breakpoint): Rename to ...
7042 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7044 (gdb_condition_true_at_breakpoint): Reimplement.
7045 (add_breakpoint_commands): Take a struct breakpoint pointer
7046 instead of an address. Adjust.
7047 (gdb_no_commands_at_breakpoint): Rename to ...
7048 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7049 parameter. Return true if no breakpoint was found. Change debug
7051 (gdb_no_commands_at_breakpoint): Reimplement.
7052 (run_breakpoint_commands): Rename to ...
7053 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7054 and change return type to boolean.
7055 (run_breakpoint_commands): New function.
7056 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7057 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7058 breakpoint. Go through the_target->remove_point instead of
7059 assuming memory breakpoint.
7060 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7061 software and hardware breakpoints.
7062 (reinsert_raw_breakpoint): Go through the_target->insert_point
7063 instead of assuming memory breakpoint.
7064 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7065 software and hardware breakpoints.
7066 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7067 Check both software and hardware breakpoints.
7068 (validate_inserted_breakpoint): Assert the breakpoint is a
7069 software breakpoint. Set the inserted flag to -1 instead of
7070 setting shlib_disabled.
7071 (delete_disabled_breakpoints): Adjust.
7072 (validate_breakpoints): Only validate software breakpoints.
7073 Adjust to inserted flag change.
7074 (check_mem_read, check_mem_write): Skip breakpoint types other
7075 than software breakpoints. Adjust to inserted flag change.
7076 * mem-break.h (enum raw_bkpt_type): New enum.
7077 (raw_breakpoint, struct process_info): Forward declare.
7078 (Z_packet_to_target_hw_bp_type): Delete declaration.
7079 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7080 (set_gdb_breakpoint, delete_gdb_breakpoint)
7081 (clear_breakpoint_conditions): New declarations.
7082 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7083 (breakpoint_inserted_here): Update comment.
7084 (add_breakpoint_condition, add_breakpoint_commands): Replace
7085 address parameter with a breakpoint pointer parameter.
7086 (gdb_breakpoint_here): Update comment.
7087 (delete_gdb_breakpoint_at): Delete.
7088 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7089 * server.c (process_point_options): Take a struct breakpoint
7090 pointer instead of an address. Adjust.
7091 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7092 delete_gdb_breakpoint.
7093 * spu-low.c (spu_target_ops): Install NULL as
7094 supports_z_point_type method.
7095 * target.h: Include mem-break.h.
7096 (struct target_ops) <prepare_to_access_memory>: Update comment.
7097 <supports_z_point_type>: New field.
7098 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7099 instead of a char. Also take a raw breakpoint pointer.
7100 * win32-arm-low.c (the_low_target): Install NULL as
7101 supports_z_point_type.
7102 * win32-i386-low.c (i386_supports_z_point_type): New function.
7103 (i386_insert_point, i386_remove_point): Adjust to new interface.
7104 (the_low_target): Install i386_supports_z_point_type.
7105 * win32-low.c (win32_supports_z_point_type): New function.
7106 (win32_insert_point, win32_remove_point): Adjust to new interface.
7107 (win32_target_ops): Install win32_supports_z_point_type.
7108 * win32-low.h (struct win32_target_ops):
7109 <supports_z_point_type>: New method.
7110 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7111 instead of a char. Also take a raw breakpoint pointer.
7113 2014-05-20 Pedro Alves <palves@redhat.com>
7115 * mem-break.h: Include break-common.h.
7116 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7117 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7118 (Z_packet_to_target_hw_bp_type): New declaration.
7119 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7120 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7121 (Z_PACKET_ACCESS_WP): Delete macros.
7122 (Z_packet_to_hw_type): Delete function.
7123 * i386-low.h: Don't include break-common.h here.
7124 (Z_packet_to_hw_type): Delete declaration.
7125 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7126 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7127 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7128 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7129 * linux-aarch64-low.c: Don't include break-common.h here.
7130 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7131 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7132 (Z_packet_to_target_hw_bp_type): Delete function.
7133 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7135 (mips_insert_point, mips_remove_point): Use
7136 Z_packet_to_target_hw_bp_type.
7138 2014-05-20 Pedro Alves <palves@redhat.com>
7140 * linux-aarch64-low.c: Include break-common.h.
7141 (enum target_point_type): Delete.
7142 (Z_packet_to_point_type): Rename to ...
7143 (Z_packet_to_target_hw_bp_type): ... this, and return a
7144 target_hw_bp_type instead.
7145 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7146 instead of an enum target_point_type.
7147 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7149 (aarch64_dr_state_insert_one_point)
7150 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7151 (aarch64_handle_aligned_watchpoint)
7152 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7153 Take an enum target_hw_bp_type instead of an enum
7155 (aarch64_supports_z_point_type): New function.
7156 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7157 use Z_packet_to_target_hw_bp_type.
7159 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7161 * configure.ac: Only use -Werror by default when DEVELOPMENT
7163 * configure: Regenerate.
7165 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7167 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7168 * linux-x86-low.c (X86_64_USER_REGS): New.
7169 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7171 2014-04-28 Yao Qi <yao@codesourcery.com>
7173 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7176 2014-04-25 Pedro Alves <palves@redhat.com>
7179 * linux-low.c (linux_attach_fail_reason_string): New function.
7180 (linux_attach_lwp): Delete.
7181 (linux_attach_lwp_1): Rename to ...
7182 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7183 argument. Remove "initial" parameter. Return int instead of
7184 void. Don't error or warn here.
7185 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7186 failure to attach to the tgid. Call warning when failing to
7188 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7189 argument. Remove "initial" parameter. Return int instead of
7190 void. Don't error or warn here.
7191 (linux_attach_fail_reason_string): New declaration.
7192 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7193 interface change. Use linux_attach_fail_reason_string.
7195 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7196 Walfred Tedeschi <walfred.tedeschi@intel.com>
7198 * Makefile.in: Added rules to handle new files
7199 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7200 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7201 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7202 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7203 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7204 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7206 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7207 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7208 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7209 i386/x32-avx512.xml.
7210 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7211 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7212 i386/x32-avx512-linux.xml.
7213 * i387-fp.c (num_avx512_k_registers): New constant for number
7215 (num_avx512_zmmh_low_registers): New constant for number of
7216 lower ZMM registers (0-15).
7217 (num_avx512_zmmh_high_registers): New constant for number of
7218 higher ZMM registers (16-31).
7219 (num_avx512_ymmh_registers): New contant for number of higher
7220 YMM registers (ymm16-31 added by avx521 on x86_64).
7221 (num_avx512_xmm_registers): New constant for number of higher
7222 XMM registers (xmm16-31 added by AVX512 on x86_64).
7223 (struct i387_xsave): Add space for AVX512 registers.
7224 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7225 Add code to handle AVX512 registers.
7226 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7227 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7228 prototypei from generated file.
7229 (tdesc_amd64_avx512_linux): Likewise.
7230 (init_registers_x32_avx512_linux): Likewise.
7231 (tdesc_x32_avx512_linux): Likewise.
7232 (init_registers_i386_avx512_linux): Likewise.
7233 (tdesc_i386_avx512_linux): Likewise.
7234 (x86_64_regmap): Add AVX512 registers.
7235 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7237 (initialize_low_arch): Add code to initialize AVX512 registers.
7239 2014-04-23 Pedro Alves <palves@redhat.com>
7241 * mem-break.c (find_gdb_breakpoint_at): Make static.
7242 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7244 2014-04-23 Pedro Alves <palves@redhat.com>
7246 * i386-low.c: Don't include break-common.h here.
7247 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7248 prototype to take target_hw_bp_type as argument instead of a Z
7250 * i386-low.h: Include break-common.h here.
7251 (Z_packet_to_hw_type): Declare.
7252 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7254 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7255 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7256 (x86_remove_point): Convert the packet number to a
7257 target_hw_bp_type before calling i386_low_remove_watchpoint.
7258 * win32-i386-low.c (i386_insert_point): Convert the packet number
7259 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7260 (i386_remove_point): Convert the packet number to a
7261 target_hw_bp_type before calling i386_low_remove_watchpoint.
7263 2014-04-23 Pedro Alves <palves@redhat.com>
7265 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7267 2014-04-10 Pedro Alves <palves@redhat.com>
7269 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7270 Check if the condition or command is NULL before checking if the
7271 breakpoint is known. On success, return true.
7272 * mem-break.h (add_breakpoint_condition): Document return.
7273 (add_breakpoint_commands): Add describing comment.
7274 * server.c (skip_to_semicolon): New function.
7275 (process_point_options): Use it.
7277 2014-04-09 Pedro Alves <palves@redhat.com>
7279 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7282 2014-02-27 Pedro Alves <palves@redhat.com>
7285 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7287 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7289 (last_thread_of_process_p): Take a PID argument instead of a
7291 (linux_wait_for_lwp): Delete.
7292 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7294 (linux_low_filter_event): New function, party factored out from
7295 linux_wait_for_event.
7296 (linux_wait_for_event): Rename to ...
7297 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7298 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7299 sigsuspend. Check for zombie leaders.
7300 (linux_wait_for_event): Reimplement as wrapper around
7301 linux_wait_for_event_filtered.
7302 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7303 a normal or signal exit is seen, it's the whole process exiting.
7304 (wait_for_sigstop): No longer a for_each_inferior callback.
7305 Rewrite on top of linux_wait_for_event_filtered.
7306 (stop_all_lwps): Call wait_for_sigstop directly.
7307 * server.c (resume, handle_target_event): Handle
7308 TARGET_WAITKIND_NO_RESUMED.
7310 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7312 * win32-low.c (psapi_get_dll_name,
7313 * win32_CreateToolhelp32Snapshot): Delete.
7314 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7315 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7317 (handle_load_dll): Add function description.
7318 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7320 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7322 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7324 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7325 base address when calling win32_add_one_solib.
7326 (handle_load_dll): Delete local variable load_addr.
7327 Remove 0x1000 offset applied to DLL base address when calling
7328 win32_add_one_solib.
7329 (handle_unload_dll): Add comment.
7331 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7333 * win32-low.c (win32_add_all_dlls): Renames
7334 win32_ensure_ntdll_loaded. Rewrite function documentation.
7335 Adjust implementation to always load all DLLs.
7336 Add 0x1000 offset to DLL base address when calling
7337 win32_add_one_solib.
7338 (child_initialization_done): New static global.
7339 (do_initial_child_stuff): Set child_initialization_done to
7340 zero during child initialization, and 1 after. Replace call
7341 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7343 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7344 (handle_unload_dll): Add function documentation.
7345 (get_child_debug_event): Ignore load and unload DLL events
7346 during child initialization.
7348 2014-02-20 Doug Evans <dje@google.com>
7350 Remove global all_lwps.
7351 * inferiors.h (ptid_of): Move here from linux-low.h.
7352 (pid_of, lwpid_of): Ditto.
7353 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7354 parameter is a struct thread_info * now.
7355 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7356 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7357 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7359 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7360 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7361 * linux-arm-low.c (update_registers_callback): Update, "entry"
7362 parameter is a struct thread_info * now.
7363 Fetch lwpid from current_inferior directly.
7364 (arm_insert_point): Pass &all_threads to find_inferior instead of
7366 (arm_remove_point): Ditto.
7367 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7368 (arm_prepare_to_resume): Fetch pid from thread.
7369 (arm_read_description): Fetch lwpid from current_inferior directly.
7370 * linux-low.c (all_lwps): Delete.
7371 (delete_lwp): Delete call to remove_inferior.
7372 (handle_extended_wait): Fetch lwpid from thread.
7373 (add_lwp): Don't set lwp->entry.id. Remove call to
7374 add_inferior_to_list.
7375 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7376 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7377 (kill_one_lwp_callback): Ditto.
7378 (linux_kill): Don't dereference NULL pointer.
7379 Fetch ptid,lwpid from thread.
7380 (get_detach_signal): Fetch ptid from thread.
7381 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7382 Simplify call to regcache_invalidate_thread.
7383 (delete_lwp_callback): Update, "entry" parameter is a
7384 struct thread_info * now. Fetch pid from thread.
7385 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7386 (status_pending_p_callback): Update, "entry" parameter is a
7387 struct thread_info * now. Fetch ptid from thread.
7388 (find_lwp_pid): Update, "entry" parameter is a
7389 struct thread_info * now.
7390 (linux_wait_for_lwp): Fetch pid from thread.
7391 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7392 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7393 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7394 (dequeue_one_deferred_signal): Ditto.
7395 (cancel_breakpoint): Fetch ptid from current_inferior.
7396 (linux_wait_for_event): Pass &all_threads to find_inferior,
7397 not &all_lwps. Fetch ptid, lwpid from thread.
7398 (count_events_callback): Update, "entry" parameter is a
7399 struct thread_info * now.
7400 (select_singlestep_lwp_callback): Ditto.
7401 (select_event_lwp_callback): Ditto.
7402 (cancel_breakpoints_callback): Ditto.
7403 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7405 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7406 (unsuspend_one_lwp): Update, "entry" parameter is a
7407 struct thread_info * now.
7408 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7410 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7411 Fetch lwpid from thread, not lwp.
7412 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7413 Pass &all_threads to find_inferior, not &all_lwps.
7414 (send_sigstop): Fetch lwpid from thread, not lwp.
7415 (send_sigstop_callback): Update, "entry" parameter is a
7416 struct thread_info * now.
7417 (suspend_and_send_sigstop_callback): Ditto.
7418 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7419 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7420 struct thread_info * now.
7421 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7423 (lwp_running): Update, "entry" parameter is a
7424 struct thread_info * now.
7425 (stop_all_lwps): Fetch ptid from thread.
7426 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7427 (linux_resume_one_lwp): Fetch lwpid from thread.
7428 (linux_set_resume_request): Update, "entry" parameter is a
7429 struct thread_info * now. Fetch pid, lwpid from thread.
7430 (resume_status_pending_p): Update, "entry" parameter is a
7431 struct thread_info * now.
7432 (need_step_over_p): Ditto. Fetch lwpid from thread.
7433 (start_step_over): Fetch lwpid from thread.
7434 (linux_resume_one_thread): Update, "entry" parameter is a
7435 struct thread_info * now. Fetch lwpid from thread.
7436 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7437 (proceed_one_lwp): Update, "entry" parameter is a
7438 struct thread_info * now. Fetch lwpid from thread.
7439 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7440 struct thread_info * now.
7441 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7442 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7443 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7445 (regsets_store_inferior_registers): Ditto.
7446 (fetch_register, store_register): Ditto.
7447 (linux_read_memory, linux_write_memory): Ditto.
7448 (linux_request_interrupt): Ditto.
7449 (linux_read_auxv): Ditto.
7450 (linux_xfer_siginfo): Ditto.
7451 (linux_qxfer_spu): Ditto.
7452 (linux_qxfer_libraries_svr4): Ditto.
7453 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7454 moved to inferiors.h.
7456 (get_thread_lwp): Update.
7457 (struct lwp_info): Delete member "entry". Simplify comment for
7460 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7461 current_inferior directly.
7462 (update_watch_registers_callback): Update, "entry" parameter is a
7463 struct thread_info * now. Fetch pid from thread.
7464 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7465 (mips_insert_point): Fetch lwpid from current_inferior.
7466 Pass &all_threads to find_inferior, not &all_lwps.
7467 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7468 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7470 (mips_stopped_data_address): Ditto.
7471 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7473 * linux-tile-low.c (tile_arch_setup): Ditto.
7474 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7475 (update_debug_registers_callback): Update, "entry" parameter is a
7476 struct thread_info * now. Fetch pid from thread.
7477 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7478 Pass &all_threads to find_inferior, not &all_lwps.
7479 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7480 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7481 Pass &all_threads to find_inferior, not &all_lwps.
7482 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7483 (i386_dr_low_get_status): Ditto.
7484 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7485 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7486 (x86_linux_read_description): Ditto.
7487 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7489 2014-02-20 Doug Evans <dje@google.com>
7491 * inferiors.c (get_first_inferior): Fix buglet.
7493 2014-02-19 Doug Evans <dje@google.com>
7495 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7496 * inferiors.c (add_thread): Change result type to struct thread_info *.
7497 All callers updated.
7498 (add_lwp): Call add_thread here instead of in callers.
7499 All callers updated.
7500 * linux-low.h (get_lwp_thread): Rewrite.
7501 (struct lwp_info): New member "thread".
7503 2014-02-19 Doug Evans <dje@google.com>
7505 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7506 All callers updated.
7508 2014-02-19 Doug Evans <dje@google.com>
7510 * inferiors.c (add_thread): Fix whitespace.
7512 2014-02-19 Doug Evans <dje@google.com>
7514 * dll.c (clear_dlls): Replace accessing list implemention details
7516 * gdbthread.h (get_first_thread): Declare.
7517 * inferiors.c (for_each_inferior_with_data): New function.
7518 (get_first_thread): New function.
7519 (find_thread_ptid): Simplify.
7520 (get_first_inferior): New function.
7521 (clear_list): Delete.
7522 (one_inferior_p): New function.
7523 (clear_inferior_list): New function.
7524 (clear_inferiors): Update.
7525 * inferiors.h (for_each_inferior_with_data): Declare.
7526 (clear_inferior_list): Declare.
7527 (one_inferior_p): Declare.
7528 (get_first_inferior): Declare.
7529 * linux-low.c (linux_wait_for_event): Replace accessing list
7530 implemention details with API function.
7531 * server.c (target_running): Ditto.
7532 (accumulate_file_name_length): New function.
7533 (emit_dll_description): New function.
7534 (handle_qxfer_libraries): Replace accessing list implemention
7535 details with API function.
7536 (handle_qxfer_threads_worker): New function.
7537 (handle_qxfer_threads_proper): Replace accessing list implemention
7538 details with API function.
7539 (handle_query): Ditto.
7540 (visit_actioned_threads_callback_ftype): New typedef.
7541 (visit_actioned_threads_data): New struct.
7542 (visit_actioned_threads): Rewrite to be find_inferior callback.
7543 (resume): Call find_inferior.
7544 (handle_status): Replace accessing list implemention
7545 details with API function.
7546 (process_serial_event): Replace accessing list implemention details
7548 * target.c (set_desired_inferior): Replace accessing list implemention
7549 details with API function.
7550 * tracepoint.c (same_process_p): New function.
7551 (gdb_agent_about_to_close): Replace accessing list implemention
7552 details with API function.
7553 * win32-low.c (child_delete_thread): Replace accessing list
7554 implemention details with API function.
7555 (match_dll_by_basename): New function.
7556 (dll_is_loaded_by_basename): New function.
7557 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7558 details call to dll_is_loaded_by_basename.
7560 2014-02-19 Doug Evans <dje@google.com>
7562 * dll.h (struct dll_info): Add comment.
7563 * gdbthread.h (struct thread_info): Add comment.
7564 (current_ptid): Simplify.
7565 * inferiors.c (add_process): Update.
7566 (remove_process): Update.
7567 * inferiors.h (struct process_info): Rename member "head" to "entry".
7568 * linux-low.c (delete_lwp): Update.
7570 (last_thread_of_process_p): Update.
7571 (kill_one_lwp_callback, linux_kill): Update.
7572 (status_pending_p_callback): Update.
7573 (wait_for_sigstop): Update. Simplify read of ptid.
7574 (start_step_over): Update.
7575 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7576 (get_lwp_thread): Update.
7577 (struct lwp_info): Rename member "head" to "entry".
7578 * regcache.h (inferior_list_entry): Delete.
7579 * server.c (kill_inferior_callback): Update.
7580 (detach_or_kill_inferior_callback): Update.
7581 (print_started_pid): Update.
7582 (print_attached_pid): Update.
7583 (process_serial_event): Simplify read of ptid.
7584 * thread-db.c (thread_db_create_event): Update.
7585 (thread_db_get_tls_address): Update.
7586 * win32-low.c (current_inferior_ptid): Simplify.
7588 2014-02-19 Tom Tromey <tromey@redhat.com>
7590 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7592 (target_supports_btrace): Update.
7594 2014-02-14 Yao Qi <yao@codesourcery.com>
7596 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7597 (rsp-low-ipa.o): New target.
7599 2014-02-12 Tom Tromey <tromey@redhat.com>
7601 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7602 convert_ascii_to_int.
7603 * regcache.c (registers_to_string): Likewise.
7604 * remote-utils.c (decode_M_packet): Likewise.
7605 * server.c (process_serial_event): Likewise.
7607 2014-02-12 Tom Tromey <tromey@redhat.com>
7609 * server.c (handle_query, handle_v_run): Use hex2bin, not
7611 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7613 2014-02-12 Tom Tromey <tromey@redhat.com>
7615 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7616 convert_int_to_ascii.
7617 * regcache.c (registers_to_string, collect_register_as_string):
7619 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7621 * server.c (process_serial_event): Likewise.
7622 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7623 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7625 2014-02-12 Tom Tromey <tromey@redhat.com>
7627 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7628 bin2hex, not hexify.
7629 * tracepoint.c (cmd_qtstatus): Likewise.
7631 2014-02-12 Tom Tromey <tromey@redhat.com>
7633 * remote-utils.c (monitor_output): Pass explicit length to
7636 2014-02-12 Tom Tromey <tromey@redhat.com>
7638 * tracepoint.c: Include rsp-low.h.
7639 * server.c: Include rsp-low.h.
7640 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7641 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7643 * remote-utils.c: Include rsp-low.h.
7644 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7645 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7646 (convert_int_to_ascii, convert_ascii_to_int): Move to
7648 * regcache.c: Include rsp-low.h.
7649 * ax.c: Include rsp-low.h.
7650 * Makefile.in (SFILES): Add common/rsp-low.c.
7651 (OBS): Add rsp-low.o.
7652 (rsp-low.o): New target.
7654 2014-02-12 Tom Tromey <tromey@redhat.com>
7656 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7657 Include print-utils.h.
7658 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7659 (plongest, thirty_two, phex_nz): Remove.
7660 * Makefile.in (SFILES): Add common/print-utils.c.
7661 (OBS): Add print-utils.o.
7662 (print-utils-ipa.o): New target.
7663 (print-utils.o): New target.
7664 (IPA_OBJS): Add print-utils-ipa.o.
7666 2014-02-06 Tom Tromey <tromey@redhat.com>
7668 * Makefile.in (SFILES): Fix indentation.
7670 2014-02-05 Doug Evans <dje@google.com>
7672 * linux-low.c (linux_wait_for_event): Improve comment.
7673 (linux_wait_1): Keep current_inferior in sync with event_child.
7675 2014-01-22 Doug Evans <dje@google.com>
7677 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7679 2014-01-22 Doug Evans <dje@google.com>
7681 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7682 * configure: Regenerate.
7683 * config.in: Regenerate.
7684 * Makefile.in (SFILES): Add debug.c.
7686 * debug.c: New file.
7687 * debug.h: New file.
7688 * linux-aarch64-low.c (*): Update all debugging printfs to use
7689 debug_printf instead of fprintf.
7690 * linux-arm-low.c (*): Ditto.
7691 * linux-cris-low.c (*): Ditto.
7692 * linux-crisv32-low.c (*): Ditto.
7693 * linux-m32r-low.c (*): Ditto.
7694 * linux-sparc-low.c (*): Ditto.
7695 * linux-x86.c (*): Ditto.
7696 * linux-low.c (*): Ditto.
7697 (linux_wait_1): Add calls to debug_enter, debug_exit.
7698 (linux_wait): Remove redundant debugging printf.
7699 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7700 (linux_resume, unstop_all_lwps): Ditto.
7701 * mem-break.c (*): Update all debugging printfs to use
7702 debug_printf instead of fprintf.
7703 * remote-utils.c (*): Ditto.
7704 * thread-db.c (*): Ditto.
7705 * server.c #include <ctype.h>, "gdb_vecs.h".
7706 (debug_threads): Moved to debug.c.
7707 (*): Update all debugging printfs to use debug_printf instead of
7709 (start_inferior): Replace call to fflush with call to debug_flush.
7710 (monitor_show_help): Mention set debug-format.
7711 (parse_debug_format_options): New function.
7712 (handle_monitor_command): Handle "monitor set debug-format".
7713 (gdbserver_usage): Mention --debug-format.
7714 (main): Parse --debug-format.
7715 * server.h (debug_threads): Declaration moved to debug.h.
7717 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7718 trace_debug_1 that uses debug_printf.
7719 (tracepoint_look_up_symbols): Update all debugging printfs to use
7720 debug_printf instead of fprintf.
7722 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7724 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7727 2014-01-17 Pedro Alves <palves@redhat.com>
7730 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7731 defined after including gdb_proc_service.h.
7733 2014-01-16 Doug Evans <dje@google.com>
7735 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7736 (match_dll): Use it.
7738 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7740 * target.h (target_ops) <read_btrace>: Change parameters and
7741 return type to allow error reporting.
7742 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7743 trace reading errors on.
7744 * linux-low.c (linux_low_read_btrace): Pass trace reading
7746 (linux_low_disable_btrace): New.
7748 2014-01-15 Doug Evans <dje@google.com>
7750 * inferiors.c (thread_id_to_gdb_id): Delete.
7751 * inferiors.h (thread_id_to_gdb_id): Delete.
7753 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7755 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7756 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7759 2014-01-08 Pedro Alves <palves@redhat.com>
7761 * server.c (handle_status): Don't discard previous queued stop
7762 replies or thread's pending status here.
7763 (main) <disconnection>: Do it here instead.
7765 2014-01-08 Pedro Alves <palves@redhat.com>
7767 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7768 * server.c (visit_actioned_threads, handle_pending_status): New
7770 (handle_v_cont): Factor out parts to ...
7771 (resume): ... this new function. If in all-stop, and a thread
7772 being resumed has a pending status, report it without actually
7774 (myresume): Adjust to use the new 'resume' function.
7775 (clear_pending_status_callback, set_pending_status_callback)
7776 (find_status_pending_thread_callback): New functions.
7777 (handle_status): Handle the case of multiple threads having
7778 interesting statuses to report. Report threads' real last signal
7779 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7780 with an interesting thread to report the status for, instead of
7781 always reporting the status of the first thread.
7783 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7785 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7786 * gdbreplay.c (gdbreplay_version): Likewise.
7788 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7790 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7791 iov.iov_len with the real length in use.
7793 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7795 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7796 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7797 for all targets that use win32-low.c.
7798 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7799 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7801 2013-12-13 Pedro Alves <palves@redhat.com>
7803 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7804 if equal to TARGET_WAITKIND_LOADED.
7805 * win32-low.c (cached_status): New static global.
7806 (win32_wait): Add declaration.
7807 (do_initial_child_stuff): Flush all initial pending debug events
7808 up to the initial breakpoint.
7809 (win32_wait): If CACHED_STATUS was set, return that instead
7810 of doing a real wait. Remove the code resuming the execution
7811 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7812 during the initial phase. Also remove the code changing
7813 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7814 TARGET_WAITKIND_STOPPED.
7816 2013-12-11 Yao Qi <yao@codesourcery.com>
7818 * notif.c (handle_notif_ack): Return 0 if no notification
7821 2013-11-20 Doug Evans <dje@google.com>
7823 * linux-low.c (linux_set_resume_request): Fix comment.
7825 2013-11-20 Doug Evans <dje@google.com>
7827 * linux-low.c (resume_status_pending_p): Tweak comment.
7829 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7831 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7832 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7833 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7834 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7835 (srv_amd64_regobj): Add amd64-mpx.o.
7836 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7837 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7838 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7839 * i387-fp.c (num_pl_bnd_register) Added constant.
7840 (num_pl_bnd_cfg_registers) Added constant.
7841 (struct i387_xsave) Added reserved area and MPX fields.
7842 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7843 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7845 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7846 (init_registers_amd64_mpx_linux): Declare new function.
7847 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7848 (x86_64_regmap): Add MPX registers.
7849 (x86_linux_read_description): Add MPX case.
7850 (initialize_low_arch): Initialize MPX targets.
7852 2013-11-18 Tom Tromey <tromey@redhat.com>
7854 * configure: Rebuild.
7855 * configure.ac: Don't check for stdlib.h.
7856 * gdbreplay.c: Unconditionally include stdlib.h.
7858 2013-11-18 Tom Tromey <tromey@redhat.com>
7860 * config.in: Rebuild.
7861 * configure: Rebuild.
7862 * configure.ac: Don't use AC_HEADER_DIRENT.
7864 2013-11-18 Tom Tromey <tromey@redhat.com>
7866 * server.h: Don't check HAVE_STRING_H.
7867 * gdbreplay.c: Don't check HAVE_STRING_H.
7868 * configure: Rebuild.
7870 2013-11-18 Tom Tromey <tromey@redhat.com>
7872 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7875 2013-11-08 Tom Tromey <tromey@redhat.com>
7877 * configure, config.in: Rebuild.
7878 * configure.ac: Remove unused configury.
7880 2013-11-08 Tom Tromey <tromey@redhat.com>
7882 * acinclude.m4: Include common.m4, codeset.m4.
7883 * configure, config.in: Rebuild.
7884 * configure.ac: Use GDB_AC_COMMON.
7886 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7888 * linux-s390-low.c (HWCAP_S390_TE): New define.
7889 (s390_arch_setup): Consider the TE field in the HWCAP for
7890 determining 'have_regset_tdb'.
7892 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7895 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7898 2013-10-02 Pedro Alves <palves@redhat.com>
7900 * server.c (process_serial_event): Don't output "GDBserver
7901 exiting" if GDB is connected through stdio.
7902 * target.c (mywait): Likewise, be silent if GDB is connected
7905 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7907 * lynx-low.c (lynx_add_threads_after_attach): New function.
7908 (lynx_attach): Remove call to add_thread. Add call to
7909 lynx_add_threads_after_attach instead.
7911 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7913 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7914 * config.in, configure: Regenerated.
7916 2013-09-18 Yao Qi <yao@codesourcery.com>
7919 * server.c (start_inferior): Clear 'resume_info'.
7921 2013-09-16 Jiong Wang <jiwang@tilera.com>
7923 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7926 2013-09-16 Jiong Wang <jiwang@tilera.com>
7928 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7929 linux-tile-low.o to srv_tgtobj.
7931 2013-09-16 Will Newton <will.newton@linaro.org>
7933 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7936 2013-09-06 Pedro Alves <palves@redhat.com>
7938 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7939 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7940 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7941 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7942 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7943 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7945 2013-09-06 Pedro Alves <palves@redhat.com>
7947 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7948 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7950 2013-09-06 Pedro Alves <palves@redhat.com>
7952 * linux-amd64-ipa.c: Include tracepoint.h.
7953 * linux-i386-ipa.c: Include tracepoint.h.
7955 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7957 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7958 (ps_get_thread_area): New function.
7960 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7962 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7963 (initialize_low_arch): Call init_registers_crisv32 rather than
7964 init_register_crisv32.
7966 2013-09-05 Pedro Alves <palves@redhat.com>
7968 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7970 * hostio.h: ... this new file.
7971 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7972 win32-low.c: Include hostio.h.
7974 2013-09-05 Pedro Alves <palves@redhat.com>
7976 * server.h (gdb_client_data, handler_func, callback_handler_func)
7977 (delete_file_handler, add_file_handler, append_callback_event)
7978 (delete_callback_event, start_event_loop, initialize_event_loop):
7979 Move to event-loop.h and include it.
7980 * event-loop.h: New file.
7982 2013-09-05 Pedro Alves <palves@redhat.com>
7984 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7985 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7986 (loaded_dll, unloaded_dll): Move to ...
7987 * dll.h: ... this new file.
7988 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7990 2013-09-05 Pedro Alves <palves@redhat.com>
7992 * server.h (current_process, get_thread_process, all_processes)
7993 (add_inferior_to_list, for_each_inferior, current_inferior)
7994 (remove_inferior, add_process, remove_process, find_process_pid)
7995 (have_started_inferiors_p, have_attached_inferiors_p)
7996 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7997 (clear_inferiors, find_inferior, find_inferior_id)
7998 (inferior_target_data, set_inferior_target_data)
7999 (inferior_regcache_data, set_inferior_regcache_data): Move to
8000 inferiors.h, and include it.
8001 * inferiors.h: New file.
8003 2013-09-05 Pedro Alves <palves@redhat.com>
8005 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8009 2013-09-05 Pedro Alves <palves@redhat.com>
8011 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8013 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8014 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8015 (handle_tracepoint_general_set, handle_tracepoint_query)
8016 (tracepoint_finished_step, tracepoint_was_hit)
8017 (release_while_stepping_state_list, current_traceframe)
8018 (in_readonly_region, traceframe_read_mem)
8019 (fetch_traceframe_registers, traceframe_read_sdata)
8020 (traceframe_read_info, struct fast_tpoint_collect_status)
8021 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8022 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8023 (supply_fast_tracepoint_registers)
8024 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8025 (ipa_tdesc, claim_trampoline_space)
8026 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8027 (agent_mem_read, agent_get_trace_state_variable_value)
8028 (agent_set_trace_state_variable_value, agent_tsv_read)
8029 (agent_mem_read_string, get_raw_reg_func_addr)
8030 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8031 * tracepoint.h: ... this new file.
8033 2013-09-05 Pedro Alves <palves@redhat.com>
8035 * server.h (perror_with_name, error, fatal, warning, paddress)
8036 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8038 * utils.h: New file.
8040 2013-09-05 Pedro Alves <palves@redhat.com>
8042 * server.h (remote_debug, noack_mode, transport_is_reliable)
8043 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8044 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8045 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8046 (write_enn, initialize_async_io, enable_async_io)
8047 (disable_async_io, check_remote_input_interrupt_request)
8048 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8049 (dead_thread_notify, prepare_resume_reply)
8050 (decode_address_to_semicolon, decode_address, decode_m_packet)
8051 (decode_M_packet, decode_X_packet, decode_xfer_write)
8052 (decode_search_memory_packet, unhexify, hexify)
8053 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8054 (look_up_one_symbol, relocate_instruction)
8055 (monitor_output): Move to remote-utils.h, and include it.
8056 * remote-utils.h: New file.
8058 2013-09-05 Pedro Alves <palves@redhat.com>
8060 * server.h (_): Delete.
8062 2013-09-02 Pedro Alves <palves@redhat.com>
8064 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8065 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8067 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8069 2013-09-02 Pierre Muller <muller@sourceware.org>
8071 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8072 or WriteProcessMemory complete successfully and handle
8073 ERROR_PARTIAL_COPY error.
8075 2013-09-02 Pedro Alves <palves@redhat.com>
8077 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8078 error instead of EIO.
8080 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8083 * linux-low.c: Include filestuff.h.
8084 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8085 * lynx-low.c: Include filestuff.h.
8086 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8087 * server.c: Include filestuff.h.
8088 (main): Call notice_open_fds.
8089 * spu-low.c: Include filestuff.h.
8090 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8092 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8094 * Makefile.in: Explain why ../target and ../nat are not
8095 listed as include file search paths.
8096 (linux-waitpid.o): New object file rule.
8097 * configure.srv (srv_native_linux_obj): New variable.
8098 Replace all occurrences of linux native object files with
8099 $srv_native_linux_obj.
8100 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8101 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8102 (linux_enable_event_reporting): Remove declaration.
8103 (my_waitpid): Moved to common/linux-waitpid.c.
8104 (linux_wait_for_event): Pass ptid when calling
8105 linux_enable_event_reporting.
8106 (linux_supports_tracefork_flag): Remove.
8107 (linux_enable_event_reporting): Likewise.
8108 (linux_tracefork_grandchild): Remove.
8109 (STACK_SIZE): Moved to common/linux-ptrace.c.
8110 (linux_tracefork_child): Remove.
8111 (linux_test_for_tracefork): Remove.
8112 (linux_look_up_symbols): Call linux_supports_traceclone.
8113 (initialize_low): Remove call to linux_test_for_tracefork.
8114 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8115 common/linux-ptrace.h.
8116 (PTRACE_TYPE_ARG4): Likewise.
8117 Include linux-ptrace.h.
8119 2013-08-21 Pedro Alves <palves@redhat.com>
8121 * config.in: Renegerate.
8123 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8125 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8126 (SFILES): Remove $(srcdir)/common/target-common.c and
8127 add $(srcdir)/target/waitstatus.c.
8128 (OBS): Remove target-common.o and add waitstatus.o.
8129 (server_h): Remove $(srcdir)/../common/target-common.h and
8130 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8131 and $(srcdir)/../target/waitstatus.h.
8132 (target-common.o): Remove.
8133 (waitstatus.o): New target object file.
8134 * target.h: Do not include target-common.h and
8135 include target/resume.h, target/wait.h and
8136 target/waitstatus.h.
8138 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8140 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8141 to PTRACE_TYPE_ARG3.
8142 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8143 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8145 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8146 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8148 2013-07-27 Jie Zhang <jie@codesourcery.com>
8149 Daniel Jacobowitz <dan@codesourcery.com>
8150 Yao Qi <yao@codesourcery.com>
8152 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8153 (mips-linux-watch.o): New rule.
8154 (mips_linux_watch_h): New variable.
8155 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8157 * linux-mips-low.c: Include mips-linux-watch.h.
8158 (struct arch_process_info, struct arch_lwp_info): New.
8159 (update_watch_registers_callback): New function.
8160 (mips_linux_new_process, mips_linux_new_thread) New functions.
8161 (mips_linux_prepare_to_resume, mips_insert_point): New
8163 (mips_remove_point, mips_stopped_by_watchpoint): New
8165 (rsp_bp_type_to_target_hw_bp_type): New function.
8166 (mips_stopped_data_address): New function.
8167 (the_low_target): Add watchpoint support functions.
8169 2013-07-27 Yao Qi <yao@codesourcery.com>
8171 * i386-low.c: Include break-common.h.
8172 (enum target_hw_bp_type): Remove.
8174 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8176 * Makefile.in (SFILES): /common/target-common.c.
8177 (OBS): Add target-common.o.
8178 (server_h): Add $(srcdir)/../common/target-common.h.
8179 (target-common.o): New target.
8180 * server.c (queue_stop_reply_callback): Free
8181 status string after use.
8182 * target.c (target_waitstatus_to_string): Remove.
8183 * target.h: Include target-common.h.
8184 (resume_kind): Likewise.
8185 (target_waitkind): Likewise.
8186 (target_waitstatus): Likewise.
8187 (TARGET_WNOHANG): Likewise.
8189 2013-07-04 Yao Qi <yao@codesourcery.com>
8191 * Makefile.in (host_alias): Use @host_noncanonical@.
8192 (target_alias): Use @target_noncanonical@.
8193 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8194 ACX_NONCANONICAL_HOST.
8195 * configure: Regenerated.
8198 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8200 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8201 * configure: Rebuild.
8202 * Makefile.in (version_host, version_target): Get from configure.
8203 (version.c): Use $(version_host) and $(version_target).
8205 2013-07-03 Pedro Alves <palves@redhat.com>
8207 * Makefile.in (config.status): Depend on development.sh.
8208 * acinclude.m4: Include libmcheck.m4.
8209 * configure: Regenerate.
8211 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8213 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8214 attribute inside the parentheses.
8215 (winapi_DebugSetProcessKillOnExit): Ditto.
8216 (winapi_DebugBreakProcess): Ditto.
8217 (winapi_GenerateConsoleCtrlEvent): Ditto.
8219 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8221 * notif.h (notif_event): Add a dummy member to avoid compiler
8224 2013-07-01 Pedro Alves <palves@redhat.com>
8226 * hostio.c (HOSTIO_PATH_MAX): Define.
8227 (require_filename, handle_open, handle_unlink, handle_readlink):
8230 2013-07-01 Pedro Alves <palves@redhat.com>
8232 * server.h: Include "pathmax.h".
8233 * linux-low.c: Don't include sys/param.h.
8234 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8236 * win32-low.c: Don't include sys/param.h.
8237 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8239 2013-07-01 Pedro Alves <palves@redhat.com>
8241 * event-loop.c: Don't check HAVE_UNISTD_H before including
8243 * gdbreplay.c: Likewise.
8244 * remote-utils.c: Likewise.
8245 * server.c: Likewise.
8246 * configure.ac: Don't check for unistd.h.
8247 * configure: Regenerate.
8249 2013-06-28 Tom Tromey <tromey@redhat.com>
8251 * Makefile.in (version.c): Use version.in, not
8254 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8256 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8257 * configure: Rebuild.
8258 * Makefile.in (version_host, version_target): Get from configure.
8259 (version.c): Use $(version_host) and $(version_target).
8261 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8263 Fix trace-status to output user name without trailing colon.
8264 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8266 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8268 Fix trace-status to output proper start-time and stop-time.
8269 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8270 output start time and stop time in hex as gdb expects.
8272 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8274 * tracepoint.c (build_traceframe_info_xml): Output trace state
8275 variables present in the trace buffer.
8277 2013-06-24 Tom Tromey <tromey@redhat.com>
8279 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8281 (version.o): Remove.
8282 * gdbreplay.c: Include version.h.
8283 (version, host_name): Don't declare.
8284 * server.h: Include version.h.
8285 (version, host_name): Don't declare.
8287 2013-06-12 Pedro Alves <palves@redhat.com>
8289 * linux-x86-low.c (linux_is_elf64): Delete global.
8290 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8291 with local linux_pid_exe_is_elf_64_file use.
8293 2013-06-11 Pedro Alves <palves@redhat.com>
8295 * linux-low.c (regset_disabled, disable_regset): New functions.
8296 (regsets_fetch_inferior_registers)
8297 (regsets_store_inferior_registers): Use them.
8298 (initialize_regsets_info); Don't allocate the disabled_regsets
8300 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8303 2013-06-11 Pedro Alves <palves@redhat.com>
8305 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8308 2013-06-11 Pedro Alves <palves@redhat.com>
8310 * linux-x86-low.c (initialize_low_arch): Call
8311 init_registers_x32_avx_linux.
8313 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8315 Fix compatibility with Android Bionic.
8316 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8319 2013-06-07 Pedro Alves <palves@redhat.com>
8322 * Makefile.in (OBS): Add tdesc.o.
8323 (IPA_OBJS): Add tdesc-ipa.o.
8324 (tdesc-ipa.o): New rule.
8325 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8327 * linux-low.c (new_inferior): Delete.
8328 (disabled_regsets, num_regsets): Delete.
8329 (linux_add_process): Adjust to set the new per-process
8331 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8332 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8333 was a stop. When calling arch_setup, switch the current inferior
8334 to the thread that got an event.
8335 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8336 (regsets_fetch_inferior_registers)
8337 (regsets_store_inferior_registers): New regsets_info parameter.
8339 (linux_register_in_regsets): New regs_info parameter. Adjust to
8341 (register_addr, fetch_register, store_register): New usrregs_info
8342 parameter. Adjust to use it.
8343 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8344 parameter regs_info. Adjust to use it.
8345 (linux_fetch_registers): Get the current inferior's regs_info, and
8347 (linux_store_registers): Ditto.
8348 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8349 (initialize_low): Don't initialize the target_regsets here. Call
8350 initialize_low_arch.
8351 * linux-low.h (target_regsets): Delete declaration.
8352 (struct regsets_info): New.
8353 (struct usrregs_info): New.
8354 (struct regs_info): New.
8355 (struct process_info_private) <new_inferior>: New field.
8356 (struct linux_target_ops): Delete the num_regs, regmap, and
8357 regset_bitmap fields. New field regs_info.
8358 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8359 * i387-fp.c (num_xmm_registers): Delete.
8360 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8361 calls to new interface.
8362 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8363 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8364 Infer the number of xmm registers from the regcache's target
8366 * i387-fp.h (num_xmm_registers): Delete.
8367 * inferiors.c (add_thread): Don't install the thread's regcache
8369 * proc-service.c (gregset_info): Fetch the current inferior's
8370 regs_info. Adjust to use it.
8371 * regcache.c: Include tdesc.h.
8372 (register_bytes, reg_defs, num_registers)
8373 (gdbserver_expedite_regs): Delete.
8374 (get_thread_regcache): If the thread doesn't have a regcache yet,
8375 create one, instead of aborting gdbserver.
8376 (regcache_invalidate_one): Rename to ...
8377 (regcache_invalidate_thread): ... this.
8378 (regcache_invalidate_one): New.
8379 (regcache_invalidate): Only invalidate registers of the current
8381 (init_register_cache): Add target_desc parameter, and use it.
8382 (new_register_cache): Ditto. Assert the target description has a
8383 non zero registers_size.
8384 (regcache_cpy): Add assertions. Adjust.
8385 (realloc_register_cache, set_register_cache): Delete.
8386 (registers_to_string, registers_from_string): Adjust.
8387 (find_register_by_name, find_regno, find_register_by_number)
8388 (register_cache_size): Add target_desc parameter, and use it.
8389 (free_register_cache_thread, free_register_cache_thread_one)
8390 (regcache_release, register_cache_size): New.
8391 (register_size): Add target_desc parameter, and use it.
8392 (register_data, supply_register, supply_register_zeroed)
8393 (supply_regblock, supply_register_by_name, collect_register)
8394 (collect_register_as_string, collect_register_by_name): Adjust.
8395 * regcache.h (struct target_desc): Forward declare.
8396 (struct regcache) <tdesc>: New field.
8397 (init_register_cache, new_register_cache): Add target_desc
8399 (regcache_invalidate_thread): Declare.
8400 (regcache_invalidate_one): Delete declaration.
8401 (regcache_release): Declare.
8402 (find_register_by_number, register_cache_size, register_size)
8403 (find_regno): Add target_desc parameter.
8404 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8406 * remote-utils.c: Include tdesc.h.
8407 (outreg, prepare_resume_reply): Adjust.
8408 * server.c: Include tdesc.h.
8409 (gdbserver_xmltarget): Delete declaration.
8410 (get_features_xml, process_serial_event): Adjust.
8411 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8413 (struct process_info) <tdesc>: New field.
8414 (ipa_tdesc): Declare.
8415 * tdesc.c: New file.
8416 * tdesc.h: New file.
8417 * tracepoint.c: Include tdesc.h.
8418 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8419 (get_context_regcache): Adjust to pass ipa_tdesc down.
8420 (do_action_at_tracepoint): Adjust to get the register cache size
8421 from the context regcache's description.
8422 (traceframe_walk_blocks): Adjust to get the register cache size
8423 from the current trace frame's description.
8424 (traceframe_get_pc): Adjust to get current trace frame's
8425 description and pass it down.
8426 (gdb_collect): Adjust to get the register cache size from the
8428 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8429 (gdbserver_xmltarget): Delete.
8430 (initialize_low_tracepoint): Set the ipa's target description.
8431 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8432 (initialize_low_tracepoint): Set the ipa's target description.
8433 * linux-x86-low.c: Include tdesc.h.
8434 [__x86_64__] (is_64bit_tdesc): New.
8435 (ps_get_thread_area, x86_get_thread_area): Use it.
8436 (i386_cannot_store_register): Rename to ...
8437 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8438 (i386_cannot_fetch_register): Rename to ...
8439 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8440 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8442 (target_regsets): Rename to ...
8443 (x86_regsets): ... this.
8444 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8446 (x86_siginfo_fixup): Use is_64bit_tdesc.
8447 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8448 (tdesc_x32_avx_linux, tdesc_x32_linux)
8449 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8451 (x86_linux_update_xmltarget): Delete.
8452 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8453 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8454 (AMD64_LINUX_USER64_CS): New.
8455 (x86_linux_read_description): New, based on
8456 x86_linux_update_xmltarget.
8457 (same_process_callback): New.
8458 (x86_arch_setup_process_callback): New.
8459 (x86_linux_update_xmltarget): New.
8460 (x86_regsets_info): New.
8461 (amd64_linux_regs_info): New.
8462 (i386_linux_usrregs_info): New.
8463 (i386_linux_regs_info): New.
8464 (x86_linux_regs_info): New.
8465 (x86_arch_setup): Reimplement.
8466 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8467 (x86_emit_ops): Ditto.
8468 (the_low_target): Adjust. Install x86_linux_regs_info,
8469 x86_cannot_fetch_register, and x86_cannot_store_register.
8470 (initialize_low_arch): New.
8471 * linux-ia64-low.c (tdesc_ia64): Declare.
8472 (ia64_fetch_register): Adjust.
8473 (ia64_usrregs_info, regs_info): New globals.
8474 (ia64_regs_info): New function.
8475 (the_low_target): Adjust.
8476 (initialize_low_arch): New function.
8477 * linux-sparc-low.c (tdesc_sparc64): Declare.
8478 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8480 (sparc_arch_setup): New function.
8481 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8482 (the_low_target): Adjust.
8483 (initialize_low_arch): New function.
8484 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8485 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8486 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8487 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8488 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8489 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8490 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8491 (tdesc_powerpc_isa205_vsx64l): Declare.
8492 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8493 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8494 (ppc_set_pc, ppc_get_hwcap): Adjust.
8495 (ppc_usrregs_info): Forward declare.
8496 (!__powerpc64__) ppc_regmap_adjusted: New global.
8497 (ppc_arch_setup): Adjust to the current process'es target
8499 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8500 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8501 (ppc_store_evrregset): Adjust.
8502 (target_regsets): Rename to ...
8503 (ppc_regsets): ... this, and make static.
8504 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8505 (ppc_regs_info): New function.
8506 (the_low_target): Adjust.
8507 (initialize_low_arch): New function.
8508 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8509 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8510 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8511 (tdesc_s390x_linux64v2): Declare.
8512 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8513 (s390_fill_gregset, s390_store_last_break): Adjust.
8514 (target_regsets): Rename to ...
8515 (s390_regsets): ... this, and make static.
8516 (s390_get_pc, s390_set_pc): Adjust.
8517 (s390_get_hwcap): New target_desc parameter, and use it.
8518 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8519 (s390_arch_setup): Adjust to set the current process'es target
8520 description. Don't adjust the regmap.
8521 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8522 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8523 (regs_info_3264): New globals.
8524 (s390_regs_info): New function.
8525 (the_low_target): Adjust.
8526 (initialize_low_arch): New function.
8527 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8528 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8529 [__mips64] (init_registers_mips_linux)
8530 (init_registers_mips_dsp_linux): Delete defines.
8531 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8532 (have_dsp): New global.
8533 (mips_read_description): New, based on mips_arch_setup.
8534 (mips_arch_setup): Reimplement.
8535 (get_usrregs_info): New function.
8536 (mips_cannot_fetch_register, mips_cannot_store_register)
8537 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8538 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8539 (target_regsets): Rename to ...
8540 (mips_regsets): ... this, and make static.
8541 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8542 (dsp_regs_info, regs_info): New globals.
8543 (mips_regs_info): New function.
8544 (the_low_target): Adjust.
8545 (initialize_low_arch): New function.
8546 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8547 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8549 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8550 (arm_read_description): New, with bits factored from
8552 (arm_arch_setup): Reimplement.
8553 (target_regsets): Rename to ...
8554 (arm_regsets): ... this, and make static.
8555 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8556 (arm_regs_info): New function.
8557 (the_low_target): Adjust.
8558 (initialize_low_arch): New function.
8559 * linux-m68k-low.c (tdesc_m68k): Declare.
8560 (target_regsets): Rename to ...
8561 (m68k_regsets): ... this, and make static.
8562 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8563 (m68k_regs_info): New function.
8564 (m68k_arch_setup): New function.
8565 (the_low_target): Adjust.
8566 (initialize_low_arch): New function.
8567 * linux-sh-low.c (tdesc_sharch): Declare.
8568 (target_regsets): Rename to ...
8569 (sh_regsets): ... this, and make static.
8570 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8571 (sh_regs_info, sh_arch_setup): New functions.
8572 (the_low_target): Adjust.
8573 (initialize_low_arch): New function.
8574 * linux-bfin-low.c (tdesc_bfin): Declare.
8575 (bfin_arch_setup): New function.
8576 (bfin_usrregs_info, regs_info): New globals.
8577 (bfin_regs_info): New function.
8578 (the_low_target): Adjust.
8579 (initialize_low_arch): New function.
8580 * linux-cris-low.c (tdesc_cris): Declare.
8581 (cris_arch_setup): New function.
8582 (cris_usrregs_info, regs_info): New globals.
8583 (cris_regs_info): New function.
8584 (the_low_target): Adjust.
8585 (initialize_low_arch): New function.
8586 * linux-cris-low.c (tdesc_crisv32): Declare.
8587 (cris_arch_setup): New function.
8588 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8589 (cris_regs_info): New function.
8590 (the_low_target): Adjust.
8591 (initialize_low_arch): New function.
8592 * linux-m32r-low.c (tdesc_m32r): Declare.
8593 (m32r_arch_setup): New function.
8594 (m32r_usrregs_info, regs_info): New globals.
8595 (m32r_regs_info): Adjust.
8596 (initialize_low_arch): New function.
8597 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8598 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8599 (tic6x_usrregs_info): Forward declare.
8600 (tic6x_read_description): New function, based on ...
8601 (tic6x_arch_setup): ... this. Reimplement.
8602 (target_regsets): Rename to ...
8603 (tic6x_regsets): ... this, and make static.
8604 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8605 (tic6x_regs_info): New function.
8606 (the_low_target): Adjust.
8607 (initialize_low_arch): New function.
8608 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8609 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8610 (target_regsets): Rename to ...
8611 (xtensa_regsets): ... this, and make static.
8612 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8614 (xtensa_arch_setup, xtensa_regs_info): New functions.
8615 (the_low_target): Adjust.
8616 (initialize_low_arch): New function.
8617 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8618 (nios2_arch_setup): Set the current process'es tdesc.
8619 (target_regsets): Rename to ...
8620 (nios2_regsets): ... this.
8621 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8622 (nios2_regs_info): New function.
8623 (the_low_target): Adjust.
8624 (initialize_low_arch): New function.
8625 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8626 (aarch64_arch_setup): Set the current process'es tdesc.
8627 (target_regsets): Rename to ...
8628 (aarch64_regsets): ... this.
8629 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8630 (aarch64_regs_info): New function.
8631 (the_low_target): Adjust.
8632 (initialize_low_arch): New function.
8633 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8635 (target_regsets): Rename to ...
8636 (tile_regsets): ... this.
8637 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8638 (tile_regs_info): New function.
8639 (tile_arch_setup): Set the current process'es tdesc.
8640 (the_low_target): Adjust.
8641 (initialize_low_arch): New function.
8642 * spu-low.c (tdesc_spu): Declare.
8643 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8644 * win32-arm-low.c (tdesc_arm): Declare.
8645 (arm_arch_setup): New function.
8646 (the_low_target): Install arm_arch_setup instead of
8648 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8649 (init_windows_x86): Rename to ...
8650 (i386_arch_setup): ... this. Set `win32_tdesc'.
8651 (the_low_target): Adjust.
8652 * win32-low.c (win32_tdesc): New global.
8653 (child_add_thread): Don't create the thread cache here.
8654 (do_initial_child_stuff): Set the new process'es tdesc.
8655 * win32-low.h (struct target_desc): Forward declare.
8656 (win32_tdesc): Declare.
8657 * lynx-i386-low.c (tdesc_i386): Declare global.
8658 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8659 * lynx-low.c (lynx_tdesc): New global.
8660 (lynx_add_process): Set the new process'es tdesc.
8661 * lynx-low.h (struct target_desc): Forward declare.
8662 (lynx_tdesc): Declare global.
8663 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8664 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8665 * nto-low.c (nto_tdesc): New global.
8666 (do_attach): Set the new process'es tdesc.
8667 * nto-low.h (struct target_desc): Forward declare.
8668 (nto_tdesc): Declare.
8669 * nto-x86-low.c (tdesc_i386): Declare.
8670 (nto_x86_arch_setup): Set `nto_tdesc'.
8672 2013-06-04 Gary Benson <gbenson@redhat.com>
8674 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8675 to qSupported response when appropriate.
8676 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8677 with nonzero-length annex.
8678 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8679 arguments supplied in annex.
8681 2013-05-31 Doug Evans <dje@google.com>
8684 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8685 64 bits in 64-cross-32 environment.
8687 2013-05-28 Pedro Alves <palves@redhat.com>
8689 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8690 (aarch64-without-fpu.c): Delete rule.
8691 * configure.srv (aarch64*-*-linux*): Remove references to
8692 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8693 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8696 2013-05-24 Pedro Alves <palves@redhat.com>
8698 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8699 instead of strchr/decode_address. Error if the range isn't split
8700 with a ','. Don't assume there's be a ':' in the action.
8702 2013-05-23 Yao Qi <yao@codesourcery.com>
8703 Pedro Alves <palves@redhat.com>
8705 * linux-low.c (lwp_in_step_range): New function.
8706 (linux_wait_1): If the thread was range stepping and stopped
8707 outside the stepping range, report the stop to GDB. Otherwise,
8708 continue stepping. Add range stepping debug output.
8709 (linux_set_resume_request): Copy the step range from the resume
8711 (linux_supports_range_stepping): New.
8712 (linux_target_ops) <supports_range_stepping>: Set to
8713 linux_supports_range_stepping.
8714 * linux-low.h (struct linux_target_ops)
8715 <supports_range_stepping>: New field.
8716 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8717 * linux-x86-low.c (x86_supports_range_stepping): New.
8718 (the_low_target) <supports_range_stepping>: Set to
8719 x86_supports_range_stepping.
8720 * server.c (handle_v_cont): Handle 'r' action.
8721 (handle_v_requests): Append ";r" if the target supports range
8723 * target.h (struct thread_resume) <step_range_start,
8724 step_range_end>: New fields.
8725 (struct target_ops) <supports_range_stepping>:
8727 (target_supports_range_stepping): New macro.
8729 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8731 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8732 confusion in comment.
8734 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8736 * lynx-low.c (struct process_info_private): New type.
8737 (lynx_add_process): New function.
8738 (lynx_create_inferior, lynx_attach): Replace calls to
8739 add_process by calls to lynx_add_process.
8740 (lynx_resume): If PTID is null, then try using
8741 current_process()->private->last_wait_event_ptid.
8743 (lynx_clear_inferiors): Delete. The contents of that function
8744 has been inlined in lynx_mourn;
8745 (lynx_wait_1): Save the ptid in the process's private data.
8746 (lynx_mourn): Free the process' private data. Replace call
8747 to lynx_clear_inferiors by call to clear_inferiors.
8749 2013-05-17 Yao Qi <yao@codesourcery.com>
8751 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8754 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8756 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8757 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8758 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8759 PT_TEXT_END_ADDR guards. Update comments.
8760 (linux_target_op) <read_offsets>: Conditionally define to
8761 linux_read_offsets if the target is UCLIBC and if it defines
8762 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8764 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8765 Andrew Jenner <andrew@codesourcery.com>
8767 * Makefile.in (SFILES): Add linux-nios2-low.c.
8768 (clean): Add action to delete nios2-linux.c.
8769 (nios2-linux.c): New rule.
8770 * configure.srv: Add nios2*-*-linux*.
8771 * linux-nios2-low.c: New.
8773 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8775 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8777 2013-04-25 Hui Zhu <hui@codesourcery.com>
8780 * ax.c (ax_printf): Add fflush.
8782 2013-04-22 Tom Tromey <tromey@redhat.com>
8784 * Makefile.in (SFILES): Add filestuff.c.
8785 (OBS): Add filestuff.o.
8786 (filestuff.o): New target.
8787 * config.in, configure: Rebuild.
8788 * configure.ac: Check for fdwalk, pipe2.
8790 2013-04-17 Pedro Alves <palves@redhat.com>
8792 * configure.ac (USE_THREAD_DB): Delete variable.
8793 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8794 Don't AC_SUBST USE_THREAD_DB.
8795 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8796 * config.in, configure: Regenerate.
8798 2013-04-16 Pedro Alves <palves@redhat.com>
8800 * linux-low.h (struct lwp_info) <thread_known>: Move under
8801 the USE_THREAD_DB #ifdef.
8803 2013-04-16 Pedro Alves <palves@redhat.com>
8805 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8806 (linux-low.o): Delete rule.
8807 * linux-low.h: Always include "gdb_thread_db.h" instead of
8808 conditionally including thread_db.h.
8809 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8812 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8814 * Makefile.in (install-only): Fix make install regression.
8816 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8818 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8819 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8821 * gdbserver.1: Remove.
8823 2013-03-22 Pedro Alves <palves@redhat.com>
8825 * linux-low.c (handle_extended_wait): Don't call
8826 linux_enable_event_reporting.
8828 2013-03-15 Tony Theodore <tonyt@logyst.com>
8831 * Makefile.in (SHELL): Use @SHELL@.
8833 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8835 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8838 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8840 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8841 Remove extraneous NULL element.
8843 2013-03-13 Yao Qi <yao@codesourcery.com>
8845 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8846 'V' block in trace frame.
8848 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8850 * target.h (struct target_ops): Add btrace ops.
8851 (target_supports_btrace): New macro.
8852 (target_enable_btrace): New macro.
8853 (target_disable_btrace): New macro.
8854 (target_read_btrace): New macro.
8855 * gdbthread.h (struct thread_info): Add btrace field.
8856 * server.c: Include btrace-common.h.
8857 (handle_btrace_general_set): New function.
8858 (handle_btrace_enable): New function.
8859 (handle_btrace_disable): New function.
8860 (handle_general_set): Call handle_btrace_general_set.
8861 (handle_qxfer_btrace): New function.
8862 (struct qxfer qxfer_packets[]): Add btrace entry.
8863 * inferiors.c (remove_thread): Disable btrace.
8864 * linux-low: Include linux-btrace.h.
8865 (linux_low_enable_btrace): New function.
8866 (linux_low_read_btrace): New function.
8867 (linux_target_ops): Add btrace ops.
8868 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8869 Add srv_linux_btrace=yes.
8870 (x86_64-*-linux*): Add linux-btrace.o.
8871 Add srv_linux_btrace=yes.
8872 * configure.ac: Define HAVE_LINUX_BTRACE.
8873 * config.in: Regenerated.
8874 * configure: Regenerated.
8876 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8878 * server.c (handle_qxfer): Preserve error message if -3 is
8880 (qxfer): Document the -3 return value.
8882 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8884 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8885 (linux_btrace_h): New variable.
8886 (linux-btrace.o): New rule.
8888 2013-03-08 Stan Shebs <stan@codesourcery.com>
8889 Hafiz Abid Qadeer <abidh@codesourcery.com>
8891 * tracepoint.c (trace_buffer_size): New global.
8892 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8893 (init_trace_buffer): Change to one-argument function. Allocate
8894 trace buffer memory.
8895 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8896 handle QTBuffer:size packet.
8897 (cmd_bigqtbuffer_size): New function.
8898 (initialize_tracepoint): Call init_trace_buffer with
8899 DEFAULT_TRACE_BUFFER_SIZE.
8900 * server.c (handle_query): Add QTBuffer:size in the
8903 2013-03-07 Yao Qi <yao@codesourcery.com>
8905 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8906 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8908 (cmd_qtsp): Adjust condition. Do post increment.
8909 Set cur_action and cur_step_action back to 0.
8911 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8914 * linux-low.c (linux_write_memory): Return early success if LEN is
8917 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8919 * configure.srv: Add x86_64-*-cygwin* as target.
8921 2013-02-28 Tom Tromey <tromey@redhat.com>
8923 * configure.ac: Invoke AC_SYS_LARGEFILE.
8924 * configure, config.in: Rebuild.
8926 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8928 * win32-low.c: Throughout, fix format strings and casts of
8929 printf-like functions to avoid type related warnings on all
8931 (get_child_debug_event): Print dwDebugEventCode as hex since
8932 that's how it's usually documented.
8934 2013-02-28 Yao Qi <yao@codesourcery.com>
8936 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8939 2013-02-27 Jiong Wang <jiwang@tilera.com>
8941 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8942 (reg-tilegx32.c): New rule.
8943 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8944 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8945 different register info initializer according to elf class.
8946 (init_registers_tilgx32): New function. The tilegx32 register info
8948 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8949 (tile_store_gregset): Likewise.
8951 2013-02-27 Yao Qi <yao@codesourcery.com>
8953 * server.c (process_point_options): Print debug message when
8954 debug_threads is true.
8956 2013-02-26 Yao Qi <yao@codesourcery.com>
8958 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8960 2013-02-19 Pedro Alves <palves@redhat.com>
8961 Kai Tietz <ktietz@redhat.com>
8965 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8966 instead of strtoul to extract address from packet.
8967 (process_serial_event) <'z'>: Likewise.
8969 2013-02-18 Yao Qi <yao@codesourcery.com>
8971 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8973 2013-02-14 Pedro Alves <palves@redhat.com>
8977 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8978 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8980 2013-02-14 Pedro Alves <palves@redhat.com>
8982 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8984 2013-02-14 Pedro Alves <palves@redhat.com>
8986 * tracepoint.c (save_string): Delete.
8987 (add_tracepoint_action): Use savestring instead of save_string.
8989 2013-02-12 Pedro Alves <palves@redhat.com>
8991 * linux-xtensa-low.c: Ditto.
8992 * xtensa-xtregs.c: Ditto.
8994 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8996 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8999 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9001 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9002 aarch64_num_wp_regs and aarch64_num_bp_regs to
9003 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9005 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9007 * linux-aarch64-low.c (ps_get_thread_area): Replace
9008 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9010 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9011 Marcus Shawcroft <marcus.shawcroft@arm.com>
9012 Nigel Stephens <nigel.stephens@arm.com>
9013 Yufeng Zhang <yufeng.zhang@arm.com>
9015 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9016 (aarch64.c, aarch64-without-fpu.c): New targets.
9017 * configure.srv (aarch64*-*-linux*): New.
9018 * linux-aarch64-low.c: New file.
9020 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9022 * linux-low.c (handle_extended_wait, linux_create_inferior)
9023 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9024 (dequeue_one_deferred_signal, linux_resume_one_thread)
9025 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9026 (linux_tracefork_grandchild, linux_test_for_tracefork)
9027 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9028 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9029 where the argument is 0.
9031 2013-01-25 Yao Qi <yao@codesourcery.com>
9033 * event-loop.c: Include "queue.h".
9034 (gdb_event_p): New typedef.
9035 (struct gdb_event) <next_event>: Remove.
9036 (event_queue): Change to QUEUE(gdb_event_p).
9037 (async_queue_event): Remove.
9038 (gdb_event_xfree): New.
9039 (initialize_event_loop): New.
9040 (process_event): Use API from QUEUE.
9041 (wait_for_event): Likewise.
9042 * server.c (main): Call initialize_event_loop.
9043 * server.h (initialize_event_loop): Declare.
9045 2013-01-18 Yao Qi <yao@codesourcery.com>
9047 * ax.h (struct eval_agent_expr_context): New.
9048 (gdb_eval_agent_expr): Update declaration.
9049 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9050 TFRAME. Add new argument CTX.
9051 * server.h (struct eval_agent_expr_context): Declare.
9052 (agent_mem_read, agent_tsv_read): Update declaration.
9053 (agent_mem_read_string): Likewise.
9054 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9055 (add_traceframe_block): Add new argument TPOINT.
9056 Increase TPOINT->traceframe_usage.
9057 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9058 eval_tracepoint_agent_expr.
9059 (condition_true_at_tracepoint): Likewise.
9060 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9061 (agent_mem_read_string, agent_tsv_read): Likewise.
9063 2013-01-16 Yao Qi <yao@codesourcery.com>
9065 * linux-low.c (linux_resume_one_lwp): Don't check
9066 'lwp->bp_reinsert != 0'.
9068 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9069 Pedro Alves <palves@redhat.com>
9071 * lynx-low.c (ptrace_request_to_str): Define a temporary
9072 macro and use it to simplify this function's implementation.
9074 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9076 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9079 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9081 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9083 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9085 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9087 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9089 * lynx-low.c (lynx_resume): Use the resume_info parameter
9090 to determine the ptid for the lynx_ptrace call, unless
9091 it is equal to minus_one_ptid, in which case we use the
9092 ptid of the current_inferior.
9093 (lynx_wait_1): After having received a thread create/exit
9094 event, resume the inferior's execution using the signaling
9095 thread's ptid, rather than the old ptid.
9097 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9099 * lynx-low.c (lynx_resume): Delete variable ret.
9101 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9103 * gdbreplay.c (gdbreplay_version): Update copyright year.
9104 * server.c (gdbserver_version): Likewise.
9106 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9108 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9111 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9113 * lynx-low.c (ptrace_request_to_str): Add handling for
9116 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9118 * lynx-low.c (lynx_attach): Delete variable new_process.
9120 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9122 * lynx-low.c (lynx_create_inferior): Delete variable
9125 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9127 * lynx-low.c (ptrace_request_to_str): Do not handle
9128 PTRACE_GETTHREADLIST if this macro does not exist.
9130 2012-12-15 Yao Qi <yao@codesourcery.com>
9132 * Makefile.in (OBS): Add notif.o.
9133 * notif.c, notif.h: New.
9134 * server.c: Include "notif.h".
9135 (struct vstop_notif) <next>: Remove.
9137 (queue_stop_reply): Update.
9138 (push_event, send_next_stop_reply): Remove.
9139 (discard_queued_stop_replies): Update.
9140 (notif_stop): New variable.
9141 (handle_v_stopped): Remove.
9142 (handle_v_requests): Don't call handle_v_stopped. Call
9143 handle_ack_notif instead.
9144 (queue_stop_reply_callback): Call notif_event_enque instead
9145 of queue_stop_reply.
9146 (handle_status): Don't call send_next_stop_reply, call
9147 notif_write_event instead.
9148 (kill_inferior_callback): Likewise.
9149 (detach_or_kill_inferior_callback): Likewise.
9150 (main): Call initialize_notif.
9151 (process_serial_event): Call QUEUE_is_empty.
9152 (handle_target_event): Call notif_push instead of push event.
9153 * server.h (push_event): Remove declaration.
9155 2012-12-10 Tom Tromey <tromey@redhat.com>
9157 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9158 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9161 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9162 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9163 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9164 (amd64-linux-ipa.o, ax.o): Rewrite.
9165 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9166 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9167 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9168 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9169 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9170 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9171 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9172 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9173 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9174 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9175 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9176 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9177 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9178 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9179 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9180 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9181 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9182 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9183 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9184 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9185 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9186 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9187 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9188 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9189 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9190 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9191 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9192 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9193 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9194 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9195 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9196 (reg-tilegx.o): Remove.
9197 (all_object_files): New macro.
9198 Include .deps files.
9199 * aclocal.m4, configure: Rebuild.
9200 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9201 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9202 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9204 2012-12-05 Tom Tromey <tromey@redhat.com>
9207 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9209 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9211 * configure.ac: Check for linux/perf_event.h.
9212 * config.in: Regenerated.
9213 * configure: Regenerated.
9215 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9217 * hostio.c (handle_readlink): Decrease buffer size
9218 parameter passed to readlink by one byte.
9220 2012-11-26 Yao Qi <yao@codesourcery.com>
9222 * configure.ac (build_warnings): Append '-Wempty-body'.
9223 * configure: Regenerated.
9224 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9227 2012-11-15 Pierre Muller <muller@sourceware.org>
9229 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9230 * config.in: Regenerate.
9231 * configure: Regenerate.
9232 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9233 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9234 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9235 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9237 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9238 instead of <sys/wait.h> header.
9239 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9241 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9243 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9244 (various make rules): Remove -DGDBSERVER
9246 2012-11-09 Yao Qi <yao@codesourcery.com>
9248 * spu-low.c (current_ptid): Move it to ..
9249 * gdbthread.h: ... here. New.
9250 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9251 * server.c (myresume, process_serial_event): Likewise.
9252 * thread-db.c (thread_db_find_new_threads): Likewise.
9253 * tracepoint.c (run_inferior_command): Likewise.
9255 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9257 * server.c (handle_search_memory_1): Include access length in
9260 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9262 * linux-crisv32-low.c: Fix compile errors.
9264 2012-09-04 Yao Qi <yao@codesourcery.com>
9266 * tracepoint.c (cmd_qtsv): Adjust debug message.
9267 Don't check CUR_TPOINT.
9269 2012-08-28 Yao Qi <yao@codesourcery.com>
9271 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9272 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9273 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9274 Remove declarations of xmalloc, xreallloc, xstrdup and
9276 * Makefile.in (libiberty_h): New.
9277 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9278 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9280 2012-08-23 Yao Qi <yao@codesourcery.com>
9282 * server.h: Remove declaration of 'xsnprintf'.
9284 2012-08-22 Keith Seitz <keiths@redhat.com>
9286 * server.h: Include build-gnulib-gbserver/config.h.
9287 * gdbreplay.c: Likewise.
9289 2012-08-08 Doug Evans <dje@google.com>
9291 * Makefile.in (SFILES): Add gdb_vecs.c.
9292 (OBS): Add gdb_vecs.o.
9293 (gdb_vecs_h, host_defs_h): New variables.
9294 (thread-db.o): Add $(gdb_vecs_h) dependency.
9295 (gdb_vecs.o): New rule.
9296 * thread-db.c: #include "gdb_vecs.h".
9297 (thread_db_load_search): Use a vector to iterate over path elements.
9298 Handle text appearing after "$pdir".
9300 * configure.ac: Add check for strstr.
9301 * config.in: Regenerate.
9302 * configure: Regenerate.
9304 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9306 * hostio.c (handle_pread): If pread fails, fall back to attempting
9308 (handle_pwrite): Likewise for pwrite.
9310 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9312 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9313 between unsupported TYPE and unimplementable ADDR/LEN combination.
9314 (arm_insert_point): Act on new return value.
9316 2012-07-31 Pedro Alves <palves@redhat.com>
9318 * server.c (process_point_options): Only skip tokens if we find
9319 one that is unrecognized. Don't treat 'X' specially while
9320 skipping unrecognized tokens.
9322 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9324 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9325 to 4-byte-align HW breakpoint addresses for Thumb.
9327 2012-07-27 Yao Qi <yao@codesourcery.com>
9331 * server.h: Declare gdb_agent_about_to_close.
9332 * target.c (kill_inferior): Include "agent.h".
9333 New. Send command 'kill'.
9334 * target.h (kill_inferior): Removed macro.
9335 * tracepoint.c (gdb_agent_about_to_close): New.
9336 (gdb_agent_helper_thread): Handle command 'close'.
9337 Wait endlessly until the inferior stops.
9338 Install gdb_agent_remove_socket to atexit hook.
9339 (agent_socket_name): New static variable.
9340 (gdb_agent_socket_init): Replace local variable 'name' with
9341 'agent_socket_name'.
9342 (gdb_agent_remove_socket): New.
9344 2012-07-27 Yao Qi <yao@codesourcery.com>
9346 * server.c (process_point_options): Stop at 'X' when parsing.
9348 2012-07-19 Michael Eager <eager@eagercon.com>
9350 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9352 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9353 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9354 hardware breakpoint.
9356 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9358 * gdbserver/linux-low.c (initialize_low): Call
9359 linux_ptrace_init_warnings.
9361 2012-07-02 Doug Evans <dje@google.com>
9363 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9366 2012-07-02 Stan Shebs <stan@codesourcery.com>
9368 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9369 (ax.o): Add it to build rule.
9371 (OBS): Add format.o.
9372 (IPA_OBS): Add format.o.
9373 * server.c (handle_query): Claim support for breakpoint commands.
9374 (process_point_options): Add command case.
9375 (process_serial_event): Leave running if there are printfs in
9377 * mem-break.h (any_persistent_commands): Declare.
9378 (add_breakpoint_commands): Declare.
9379 (gdb_no_commands_at_breakpoint): Declare.
9380 (run_breakpoint_commands): Declare.
9381 * mem-break.c (struct point_command_list): New struct.
9382 (struct breakpoint): New field command_list.
9383 (any_persistent_commands): New function.
9384 (add_commands_to_breakpoint): New function.
9385 (add_breakpoint_commands): New function.
9386 (gdb_no_commands_at_breakpoint): New function.
9387 (run_breakpoint_commands): New function.
9388 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9390 * ax.c: Include format.h.
9391 (ax_printf): New function.
9392 (gdb_eval_agent_expr): Add printf opcode.
9394 2012-06-13 Yao Qi <yao@codesourcery.com>
9396 * server.c (start_inferior): Remove duplicated writes to fields
9397 'last_resume_kind' and 'last_status' of 'current_inferior'.
9399 2012-06-12 Yao Qi <yao@codesourcery.com>
9400 Pedro Alves <palves@redhat.com>
9402 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9404 * server.c (handle_v_cont): Extend comment.
9406 2012-06-11 Yao Qi <yao@codesourcery.com>
9408 * linux-low.c (linux_attach): Add 'static'.
9410 2012-06-06 Yao Qi <yao@codesourcery.com>
9412 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9414 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9416 Fix gcc -flto compilation warning.
9417 * server.c (main): Make variable multi_mode and attach volatile.
9419 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9421 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9422 if the platform doesn't know about it.
9424 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9426 * Makefile.in (SFILES): Add linux-tile-low.c.
9427 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9428 * configure.srv: Handle tilegx-*-linux*.
9429 * linux-tile-low.c: New file.
9431 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9433 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9435 2012-05-24 Pedro Alves <palves@redhat.com>
9439 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9441 2012-05-24 Pedro Alves <palves@redhat.com>
9445 Replace target_signal with gdb_signal throughout.
9447 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9449 * linux-low.c (linux_store_registers): Avoid the copying sequence
9450 when no data has been retrieved by ptrace.
9452 2012-05-22 Will Deacon <will.deacon@arm.com>
9454 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9455 Include asm/ptrace.h.
9456 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9459 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9461 * linux-low.c (linux_store_registers): Don't re-retrieve data
9462 with ptrace that has already been obtained from /proc. Always
9463 copy any data retrieved with ptrace to the buffer supplied.
9465 2012-05-11 Yao Qi <yao@codesourcery.com>
9466 Pedro Alves <palves@redhat.com>
9468 * linux-low.c (enum stopping_threads_kind): New.
9469 (stopping_threads): Change type to `enum stopping_threads_kind'.
9470 (handle_extended_wait): If stopping and suspending threads, leave
9471 the new_lwp suspended too.
9472 (linux_wait_for_event): Adjust.
9473 (stop_all_lwps): Set `stopping_threads' to
9474 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9475 whether we're suspending threads or just stopping them. Assert no
9478 2012-04-29 Yao Qi <yao@codesourcery.com>
9480 * server.h: Move some code to ...
9481 * gdbthread.h: ... here. New.
9482 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9483 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9484 (nto-low.o, win32-low.o): Likewise.
9485 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9486 * regcache.c, remote-utils.c, server.c: Likewise.
9487 * target.c, tracepoint.c, win32-low.c: Likewise.
9489 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9491 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9492 (PTRACE_ARG4_TYPE): Likewise.
9493 (PTRACE_XFER_TYPE): Likewise.
9494 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9495 ptrace to PTRACE_ARG3_TYPE.
9496 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9497 (PTRACE_ARG4_TYPE): Likewise.
9498 (PTRACE_XFER_TYPE): Likewise.
9499 (linux_detach_one_lwp): Cast fourth argument of
9500 ptrace to long then PTRACE_ARG4_TYPE.
9501 (regsets_fetch_inferior_registers): Cast third argument of
9502 ptrace to long then PTRACE_ARG3_TYPE.
9503 (regsets_store_inferior_registers): Likewise.
9505 2012-04-20 Pedro Alves <palves@redhat.com>
9507 * configure: Regenerate.
9509 2012-04-19 Pedro Alves <palves@redhat.com>
9511 * Makefile.in (GNULIB_BUILDDIR): New.
9512 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9513 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9514 (all, install-only, uninstall, clean-info, all-lib, clean): No
9515 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9516 (maintainer-clean realclean distclean): Use subdir_do.
9518 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9519 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9520 * acinclude.m4: Include acx_configure_dir.m4.
9521 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9522 calls. Call AC_PROG_RANLIB. Configure gnulib using
9525 (GNULIB_STDINT_H): Adjust.
9526 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9527 * gdbreplay.c: Include build-gnulib/config.h.
9528 * server.h: Likewise.
9529 * aclocal.m4: Regenerate.
9530 * config.in: Regenerate.
9531 * configure: Regenerate.
9533 2012-04-19 Pedro Alves <palves@redhat.com>
9535 * Makefile.in (LIBGNU, INCGNU): Adjust.
9536 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9537 (all, install-only, uninstall, clean-info, all-lib, clean)
9538 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9539 * configure.ac: Adjust AC_OUTPUT output.
9540 * aclocal.m4: Regenerate.
9541 * configure: Regenerate.
9543 2012-04-19 Pedro Alves <palves@redhat.com>
9545 * Makefile.in (generated_files): New.
9546 (server_h): Remove the explicit dependency on config.h, and depend
9547 on $generated_files.
9549 2012-04-19 Pedro Alves <palves@redhat.com>
9551 * Makefile.in (INCGNU): Add -Ignulib.
9553 2012-04-19 Pedro Alves <palves@redhat.com>
9555 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9556 (INCGNU): ... this, and spell out -I here.
9557 (GNULIB_LIB): Rename to ...
9559 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9561 2012-04-19 Pedro Alves <palves@redhat.com>
9563 * config.in: Regenerate.
9565 2012-04-19 Pedro Alves <palves@redhat.com>
9567 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9568 * server.h (memmem): Remove declaration.
9569 * config.in: Regenerate.
9570 * configure: Regenerate.
9572 2012-04-19 Yao Qi <yao@codesourcery.com>
9574 * Makefile.in (SFILES): Add common/vec.c.
9578 2012-04-19 Yao Qi <yao@codesourcery.com>
9580 * remote-utils.c (prepare_resume_reply): Replace with macro
9581 target_core_of_thread.
9582 * server.c (handle_qxfer_threads_proper): Likewise.
9583 * target.h (traget_core_of_thread): New macro.
9585 2012-04-18 Pedro Alves <palves@redhat.com>
9587 * aclocal.m4: Regenerate.
9588 * configure: Regenerate.
9590 2012-04-16 Yao Qi <yao@codesourcery.com>
9592 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9593 duplicated on address.
9595 2012-04-16 Yao Qi <yao@codesourcery.com>
9597 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9598 (struct tracepoint_action_ops) <send>: New field.
9599 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9600 (agent_expr_send, x_tracepoint_action_send): New.
9601 (l_tracepoint_action_send): New.
9602 (cmd_qtdp): Download and install tracepoint
9603 according to `use_agent'.
9604 (run_inferior_command): Add one more parameter `len'.
9606 (tracepoint_send_agent): New.
9607 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9609 2012-04-16 Yao Qi <yao@codesourcery.com>
9611 * tracepoint.c (download_tracepoints): Moved to ...
9612 (cmd_qtstart): ... here.
9614 2012-04-14 Yao Qi <yao@codesourcery.com>
9616 * tracepoint.c: Include inttypes.h.
9617 (struct collect_memory_action): Use sized types.
9618 (struct tracepoint): Likewise.
9619 (cmd_qtdp, stop_tracing): Update print specifiers.
9620 (cmd_qtp, response_tracepoint): Likewise.
9621 (collect_data_at_tracepoint): Likewise.
9622 (collect_data_at_step): Likewise.
9624 2012-04-14 Yao Qi <yao@codesourcery.com>
9626 Import gnulib module inttypes.
9627 * aclocal.m4, config.in, configure: Regenerated.
9629 2012-04-14 Yao Qi <yao@codesourcery.com>
9631 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9632 Makefile and config.status at last.
9634 2012-04-13 Yao Qi <yao@codesourcery.com>
9636 * tracepoint.c: Include stdint.h unconditionally.
9638 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9640 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9641 on BFD_HAVE_SYS_PROCFS_TYPE.
9642 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9643 * configure: Regenerate.
9644 * config.in: Likewise.
9646 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9648 * Makefile.in (clean): Also remove x32.c x32-linux.c
9649 x32-avx.c x32-avx-linux.c.
9650 (x32.o): New target.
9652 (x32-linux.o): Likewise.
9653 (x32-linux.c): Likewise.
9654 (x32-avx.o): Likewise.
9655 (x32-avx.c): Likewise.
9656 (x32-avx-linux.o): Likewise.
9657 (x32-avx-linux.c): Likewise.
9659 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9660 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9661 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9662 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9663 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9664 i386/x32-avx-linux.xml.
9666 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9667 (init_registers_x32_avx_linux): Likwise.
9668 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9669 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9671 2012-04-13 Pedro Alves <palves@redhat.com>
9673 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9674 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9675 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9676 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9679 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9681 * linux-x86-low.c (compat_x32_clock_t): New.
9682 (compat_x32_siginfo_t): Likewise.
9683 (compat_x32_siginfo_from_siginfo): Likewise.
9684 (siginfo_from_compat_x32_siginfo): Likewise.
9685 (linux_is_elf64): Likewise.
9686 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9687 and siginfo_from_compat_x32_siginfo for x32.
9688 (x86_arch_setup): Set linux_is_elf64.
9690 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9693 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9695 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9696 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9697 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9698 compatible with process.
9700 2012-04-12 Yao Qi <yao@codesourcery.com>
9702 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9703 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9704 (install-only, install-info, clean): Handle sub dir gnulib.
9705 (all-lib, am--refresh): New targets.
9706 (memmem.o): Remove target.
9707 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9708 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9709 (AC_REPLACE_FUNCS): Remove memmem.
9710 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9711 (AC_OUTPUT): Generate Makefile in gnulib/.
9712 * aclocal.m4, config.in, configure: Regenerated.
9714 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9716 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9718 2012-04-05 Pedro Alves <palves@redhat.com>
9720 -Werror=strict-aliasing
9722 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9725 2012-04-04 Pedro Alves <palves@redhat.com>
9727 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9728 (sparc_store_gregset_from_stack, sparc_store_gregset)
9729 (sparc_breakpoint_at): Fix formatting.
9731 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9733 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9735 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9736 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9737 * config.in: Regenerate.
9738 * configure: Likewise.
9740 2012-03-29 Pedro Alves <palves@redhat.com>
9742 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9743 Correct ptrace arguments.
9745 2012-03-28 Pedro Alves <palves@redhat.com>
9747 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9748 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9749 (IA64_FR1_REGNUM): New defines.
9750 (ia64_fetch_register): New.
9751 (the_low_target): Install it.
9752 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9754 * linux-low.c (linux_fetch_registers): Try the
9755 the_low_target.fetch_register hook first.
9757 * linux-arm-low.c (the_low_target): Adjust.
9758 * linux-bfin-low.c (the_low_target): Adjust.
9759 * linux-cris-low.c (the_low_target): Adjust.
9760 * linux-crisv32-low.c (the_low_target): Adjust.
9761 * linux-m32r-low.c (the_low_target): Adjust.
9762 * linux-m68k-low.c (the_low_target): Adjust.
9763 * linux-mips-low.c (the_low_target): Adjust.
9764 * linux-ppc-low.c (the_low_target): Adjust.
9765 * linux-s390-low.c (the_low_target): Adjust.
9766 * linux-sh-low.c (the_low_target): Adjust.
9767 * linux-sparc-low.c (the_low_target): Adjust.
9768 * linux-tic6x-low.c (the_low_target): Adjust.
9769 * linux-x86-low.c (the_low_target): Adjust.
9770 * linux-xtensa-low.c (the_low_target): Adjust.
9772 2012-03-26 Pedro Alves <palves@redhat.com>
9774 * server.c (handle_qxfer_libraries): Don't bail early if
9775 the_target->qxfer_libraries_svr4 is not NULL.
9777 2012-03-26 Pedro Alves <palves@redhat.com>
9779 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9781 2012-03-23 Pedro Alves <palves@redhat.com>
9783 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9784 "library-list-svr4" element's start tag when the the DSO list is
9787 2012-03-23 Pedro Alves <palves@redhat.com>
9789 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9790 a variable whose type size is the same as the inferior's pointer
9793 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9795 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9797 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9798 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9799 * linux-low.h: Include <signal.h>.
9800 (struct siginfo): Remove forward declaration.
9801 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9804 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9806 * .gitignore: Ignore more files.
9808 2012-03-19 Pedro Alves <palves@redhat.com>
9809 Jan Kratochvil <jan.kratochvil@redhat.com>
9811 * server.c (cont_thread, general_thread): Add describing comments.
9812 (start_inferior): Clear `cont_thread'.
9813 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9816 2012-03-15 Yao Qi <yao@codesourcery.com>
9818 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9820 (cmd_qtdp): ... here.
9822 2012-03-15 Yao Qi <yao@codesourcery.com>
9824 * tracepoint.c (struct tracepoint_action_ops): New.
9825 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9826 (m_tracepoint_action_download): New.
9827 (r_tracepoint_action_download): New.
9828 (x_tracepoint_action_download): New.
9829 (l_tracepoint_action_download): New.
9830 (add_tracepoint_action): Install `action->ops' according type.
9831 (download_tracepoint_1): Move code `download' function pointer
9832 of various tracepoint_action_ops.
9834 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9836 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9837 linux_ptrace_attach_warnings.
9839 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9841 * Makefile.in (linux-ptrace.o): New.
9842 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9843 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9844 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9845 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9846 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9848 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9850 2012-03-08 Yao Qi <yao@codesourcery.com>
9851 Pedro Alves <palves@redhat.com>
9853 Fix PR server/13392.
9854 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9856 * tracepoint.c (remove_tracepoint): New.
9857 (cmd_qtdp): Call remove_tracepoint when failed to install.
9859 2012-03-07 Pedro Alves <palves@redhat.com>
9861 * linux-low.c (get_detach_signal): New.
9862 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9863 Pass on pending signals to PTRACE_DETACH. Check the result of the
9865 * server.c (program_signals, program_signals_p): New.
9866 (handle_general_set): Handle QProgramSignals.
9867 * server.h (program_signals, program_signals_p): Declare.
9869 2012-03-05 Pedro Alves <palves@redhat.com>
9870 Jan Kratochvil <jan.kratochvil@redhat.com>
9872 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9875 2012-03-03 Yao Qi <yao@codesourcery.com>
9877 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9878 agent_look_up_symbols.
9880 2012-03-03 Yao Qi <yao@codesourcery.com>
9882 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9883 (linux-x86-low.o): Likewise.
9884 * server.h: Remove in_process_agent_loaded.
9885 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9889 2012-03-03 Yao Qi <yao@codesourcery.com>
9891 * tracepoint.c (gdb_agent_capability): New global.
9892 (in_process_agent_loaded_ust): Renamed to
9893 `in_process_agent_supports_ust'.
9895 (in_process_agent_supports_ust): Call agent_capability_check.
9896 (clear_installed_tracepoints): Assert that agent supports
9899 2012-03-03 Yao Qi <yao@codesourcery.com>
9901 * linux-low.c (linux_supports_agent): New.
9902 (linux_target_ops): Initialize field `supports_agent' with
9903 linux_supports_agent.
9904 * target.h (struct target_ops) <supports_agent>: New.
9905 (target_supports_agent): New macro.
9906 * server.c (handle_general_set): Handle packet 'QAgent'.
9907 (handle_query): Send `QAgent+'.
9908 * Makefile.in (server.o): Depends on agent.h.
9910 2012-03-03 Yao Qi <yao@codesourcery.com>
9912 * Makefile.in (OBS): Add agent.o.
9913 Add new rule for agent.o.
9914 Track dependence of tracepoint.c on agent.h.
9915 * tracepoint.c (run_inferior_command_1):
9916 (run_inferior_command): Call agent_run_command.
9917 (gdb_ust_connect_sync_socket): Deleted. Move it to
9919 (resume_thread, stop_thread): Likewise.
9920 (gdb_ust_socket_init): Renamed to ...
9921 (gdb_agent_socket_init): ... New.
9922 (gdb_ust_thread): Renamed to ...
9923 (gdb_agent_helper_thread): ... New.
9924 (gdb_ust_init): Move some code to ...
9925 (gdb_agent_init): ... here. New.
9926 [HAVE_UST]: Call gdb_ust_init.
9927 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9928 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9929 * config.in, configure: Regenerated.
9931 2012-03-02 Pedro Alves <palves@redhat.com>
9933 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9934 * linux-low.c (struct simple_pid_list): New.
9935 (stopped_pids): New a struct simple_pid_list pointer.
9936 (add_to_pid_list, pull_pid_from_list): New.
9937 (handle_extended_wait): Don't assume the first signal new children
9938 report is SIGSTOP. Adjust call to pull_pid_from_list.
9939 (linux_wait_for_lwp): Adjust.
9941 2012-03-02 Yao Qi <yao@codesourcery.com>
9943 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9946 2012-03-02 Yao Qi <yao@codesourcery.com>
9948 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9949 `stop_pc' and `tpoint'. Update caller.
9951 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9953 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9954 * linux-low.c (use_linux_regsets): New macro.
9955 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9956 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9957 (linux_register_in_regsets): New function.
9958 (usr_fetch_inferior_registers): Skip registers covered by
9960 (usr_store_inferior_registers): Likewise.
9961 (usr_fetch_inferior_registers): New macro.
9962 (usr_store_inferior_registers): Likewise.
9963 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9964 (linux_store_registers): Likewise.
9965 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9967 (init_registers_mips64_dsp_linux): Likewise.
9968 (init_registers_mips_linux): New macro.
9969 (init_registers_mips_dsp_linux): Likewise.
9970 (mips_dsp_num_regs): Likewise.
9971 (DSP_BASE, DSP_CONTROL): New fallback macros.
9972 (mips_base_regs): New macro.
9973 (mips_regmap): Use it. Fix the size.
9974 (mips_dsp_regmap): New variable.
9975 (mips_dsp_regset_bitmap): Likewise.
9976 (mips_arch_setup): New function.
9977 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9979 (mips_cannot_store_register): Likewise.
9980 (the_low_target): Update .arch_setup, .num_regs and .regmap
9981 initializers. Add .regset_bitmap initializer.
9982 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9984 * linux-bfin-low.c (the_low_target): Likewise.
9985 * linux-cris-low.c (the_low_target): Likewise.
9986 * linux-crisv32-low.c (the_low_target): Likewise.
9987 * linux-ia64-low.c (the_low_target): Likewise.
9988 * linux-m32r-low.c (the_low_target): Likewise.
9989 * linux-m68k-low.c (the_low_target): Likewise.
9990 * linux-ppc-low.c (the_low_target): Likewise.
9991 * linux-s390-low.c (the_low_target): Likewise.
9992 * linux-sh-low.c (the_low_target): Likewise.
9993 * linux-sparc-low.c (the_low_target): Likewise.
9994 * linux-tic6x-low.c (the_low_target): Likewise.
9995 * linux-x86-low.c (the_low_target): Likewise.
9996 * linux-xtensa-low.c (the_low_target): Likewise.
9997 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9998 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9999 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10001 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10002 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10004 2012-02-29 Yao Qi <yao@codesourcery.com>
10005 Pedro Alves <palves@redhat.com>
10007 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10008 `step_over_finished' is true.
10010 2012-02-27 Pedro Alves <palves@redhat.com>
10012 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10013 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10015 2012-02-27 Pedro Alves <palves@redhat.com>
10018 * linux-low.c (pid_is_stopped): New.
10019 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10021 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10023 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10026 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10028 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10030 2012-02-24 Luis Machado <lgustavo@codesourcery>
10032 * server.c (handle_query): Advertise support for target-side
10033 breakpoint condition evaluation.
10034 (process_point_options): New function.
10035 (process_serial_event): When inserting a breakpoint, check for
10036 a target-side condition that should be evaluated.
10038 * mem-break.c: Include regcache.h and ax.h.
10039 (point_cond_list_t): New data structure.
10040 (breakpoint) <cond_list>: New field.
10041 (find_gdb_breakpoint_at): Make non-static.
10042 (delete_gdb_breakpoint_at): Clear any target-side
10044 (clear_gdb_breakpoint_conditions): New function.
10045 (add_condition_to_breakpoint): Likewise.
10046 (add_breakpoint_condition): Likewise.
10047 (gdb_condition_true_at_breakpoint): Likewise.
10048 (gdb_breakpoint_here): Return result directly instead
10049 of going through a local variable.
10051 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10052 (clear_gdb_breakpoint_conditions): Likewise.
10053 (add_breakpoint_condition): Likewise.
10054 (gdb_condition_true_at_breakpoint): Likewise.
10056 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10057 (need_step_over_p): Take target-side breakpoint condition into
10060 2012-02-24 Luis Machado <lgustavo@codesourcery>
10062 * server.h: Include tracepoint.h.
10063 (agent_mem_read, agent_get_trace_state_variable_value,
10064 agent_set_trace_state_variable_value,
10065 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10066 get_set_tsv_func_addr): New prototypes.
10068 * ax.h: New include file.
10069 * ax.c: New source file.
10071 * tracepoint.c: Include ax.h.
10072 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10073 agent_expr, eval_result_type): Move to ax.h.
10074 (parse_agent_expr): Rename to ...
10075 (gdb_parse_agent_expr): ... this, make it non-static and move
10077 (unparse_agent_expr) Rename to ...
10078 (gdb_unparse_agent_expr): ... this, make it non-static and move
10080 (eval_agent_expr): Rename to ...
10081 (eval_tracepoint_agent_expr): ... this.
10082 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10083 forward declarations.
10084 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10085 (agent_get_trace_state_variable_value): New function.
10086 (agent_set_trace_state_variable_value): New function.
10087 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10088 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10089 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10090 (condition_true_at_tracepoint): Likewise.
10091 (parse_agent_expr): Rename to ...
10092 (gdb_parse_agent_expr): ... this and move to ax.c.
10093 (unparse_agent_expr): Rename to ...
10094 (gdb_unparse_agent_expr): ... this and move to ax.c.
10095 (gdb_agent_op_name): Move to ax.c.
10096 (eval_agent_expr): Rename to ...
10097 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10099 (eval_tracepoint_agent_expr): New function.
10100 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10102 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10104 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10105 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10106 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10107 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10108 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10109 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10110 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10111 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10112 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10113 (compile_bytecodes): Remove forward declaration.
10114 (is_goto_target): Move to ax.c.
10115 (compile_bytecodes): Move to ax.c and call
10116 agent_get_trace_state_variable_value (...) and
10117 agent_set_trace_state_variable_value (...).
10119 * Makefile.in: Update ax.c and IPA dependencies.
10121 2012-02-24 Pedro Alves <palves@redhat.com>
10123 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10124 (cmd_bigqtbuffer_circular): ... this. Only handle
10125 'QTBuffer:circular:'.
10126 (handle_tracepoint_general_set): Adjust.
10128 2012-02-16 Yao Qi <yao@codesourcery.com>
10130 * inferiors.c: Move code to ...
10131 * dll.c: .... here. New.
10132 * server.h: Declare clear_dlls.
10133 * Makefile.in (SFILES): Add dll.c.
10137 2012-02-11 Yao Qi <yao@codesourcery.com>
10139 * server.c: (handle_monitor_command): Add a new parameter
10141 (handle_query): Update caller.
10143 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10145 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10146 * configure, config.in: Regenerate.
10147 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10150 2012-02-02 Pedro Alves <palves@redhat.com>
10152 Try SIGKILL first, then PTRACE_KILL.
10153 * linux-low.c (linux_kill_one_lwp): New.
10154 (linux_kill_one_lwp): Rename to ...
10155 (kill_one_lwp_callback): ... this. Use the new
10156 linux_kill_one_lwp.
10158 2012-02-02 Pedro Alves <palves@redhat.com>
10160 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10163 2012-01-27 Pedro Alves <palves@redhat.com>
10165 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10166 (elf_64_file_p): Make static.
10167 (linux_pid_exe_is_elf_64_file): New.
10168 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10169 Delete declarations.
10170 (linux_pid_exe_is_elf_64_file): Declare.
10171 * linux-x86-low.c (x86_arch_setup): Use
10172 linux_pid_exe_is_elf_64_file.
10174 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10176 * linux-low.c (linux_wait_for_event_1): Rename to ...
10177 (linux_wait_for_event): ... here and merge it with former
10178 linux_wait_for_event - new variable wait_ptid, use it.
10179 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10181 2012-01-23 Pedro Alves <palves@redhat.com>
10183 * server.c (main): Avoid yet another case of infinite loop while
10184 detaching/killing after a longjmp.
10186 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10189 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10191 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10193 * hostio.c (handle_readlink): New function.
10194 (handle_vFile): Call it to handle "vFile:readlink" packets.
10196 2012-01-20 Pedro Alves <palves@redhat.com>
10197 Ulrich Weigand <ulrich.weigand@linaro.org>
10199 * server.c (handle_v_requests): Only support vAttach and vRun to
10200 start multiple processes when in extended protocol mode.
10202 2012-01-17 Pedro Alves <palves@redhat.com>
10204 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10205 memalign plus mprotect to allocate the scratch buffer.
10207 2012-01-13 Pedro Alves <palves@redhat.com>
10209 * server.c (attach_inferior): Clear `cont_thread'.
10211 2012-01-13 Pedro Alves <palves@redhat.com>
10213 * server.c (main): Avoid infinite loop while detaching/killing
10216 2012-01-09 Doug Evans <dje@google.com>
10218 * server.c (start_inferior): Set last_ptid in --wrapper case.
10220 2012-01-06 Yao Qi <yao@codesourcery.com>
10222 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10224 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10226 2012-01-04 Yao Qi <yao@codesourcery.com>
10228 * tracepoint.c (cmd_qtdp): Print debug message
10229 for static tracepoint.
10231 2012-01-04 Yao Qi <yao@codesourcery.com>
10233 * tracepoint.c (trace_vdebug): Differentiate debug message
10234 between gdbserver and IPA.
10236 2012-01-03 Yao Qi <yao@codesourcery.com>
10238 * tracepoint.c (tracepoint_was_hit): Don't collect for
10241 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10243 * terminal.h: Reformat copyright header.
10245 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10247 * server.c (gdbserver_version): Update copyright year.
10248 * gdbreplay.c (gdbreplay_version): Likewise.
10250 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10252 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10255 2011-12-18 Hui Zhu <teawater@gmail.com>
10256 * linux-low.c (linux_create_inferior): Save return value to ret.
10258 2011-12-18 Hui Zhu <teawater@gmail.com>
10260 * linux-low.c (linux_create_inferior): Save return value to ret.
10262 2011-12-16 Doug Evans <dje@google.com>
10264 * linux-low.c (linux_create_inferior): If stdio connection,
10265 redirect stdin from /dev/null, stdout to stderr.
10266 * remote-utils.c (remote_is_stdio): New static global.
10267 (remote_connection_is_stdio): New function.
10268 (remote_prepare): Handle stdio connection.
10269 (remote_open): Ditto.
10270 (remote_close): Don't close stdin for stdio connections.
10271 (read_prim,write_prim): New functions. Replace all calls to
10272 read/write to these.
10273 * server.c (main): Watch for "-" argument. Move call to
10274 remote_prepare before start_inferior.
10275 * server.h (STDIO_CONNECTION_NAME): New macro.
10276 (remote_connection_is_stdio): Declare.
10278 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10279 in debugging output.
10281 2011-12-15 Yao Qi <yao@codesourcery.com>
10283 * tracepoint.c: Include sys/syscall.h.
10284 (gdb_ust_thread): Remove preprocessor conditional.
10286 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10288 * linux-low.c (linux_detach_one_lwp): Call
10289 the_low_target.prepare_to_resume before detaching.
10291 2011-12-14 Yao Qi <yao@codesourcery.com>
10293 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10296 2011-12-14 Yao Qi <yao@codesourcery.com>
10298 * i386-low.c (i386_low_stopped_data_address): Initialize local
10299 variable `control'.
10301 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10305 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10306 DR_CONTROL unless necessary. Extend comments.
10307 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10308 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10310 2011-12-13 Yao Qi <yao@codesourcery.com>
10312 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10314 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10316 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10318 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10319 Print new debug message for such case.
10321 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10323 Fix overlapping memcpy.
10324 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10325 the read_inferior_memory transfer.
10326 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10327 write_inferior_memory transfer.
10328 (set_fast_tracepoint_jump): New variable buf. Use it for the
10329 read_inferior_memory and write_inferior_memory transfers.
10330 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10331 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10332 Use it for the write_inferior_memory transfer.
10333 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10336 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10338 * linux-low.c (fetch_register, store_register): Make code
10339 consistent, fix formatting.
10341 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10343 * linux-low.c (usr_store_inferior_registers): Factor out code
10344 to handle individual registers into...
10345 (store_register): ... this new function.
10347 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10349 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10350 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10351 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10352 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10353 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10354 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10355 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10356 (srv_xmlfiles): Add new XML files.
10358 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10360 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10361 (init_registers_s390_linux32v1): Add prototype.
10362 (init_registers_s390_linux32v2): Likewise.
10363 (init_registers_s390_linux64v1): Likewise.
10364 (init_registers_s390_linux64v2): Likewise.
10365 (init_registers_s390x_linux64v1): Likewise.
10366 (init_registers_s390x_linux64v2): Likewise.
10367 (s390_num_regs): Increment to 52.
10368 (s390_regmap): Add orig_r2 register.
10369 (s390_num_regs_3264): Increment to 68.
10370 (s390_regmap_3264): Add orig_r2 register.
10371 (s390_collect_ptrace_register): Handle orig_r2 register.
10372 (s390_supply_ptrace_register): Likewise.
10373 (s390_fill_last_break): New function.
10374 (s390_store_last_break): Likewise.
10375 (s390_fill_system_call): New function.
10376 (s390_store_system_call): Likewise.
10377 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10379 (s390_check_regset): New function.
10380 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10381 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10382 Update target_regsets for available register sets.
10384 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10385 Jan Kratochvil <jan.kratochvil@redhat.com>
10387 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10388 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10390 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10391 * linux-low.h (struct process_info_private): New member r_debug.
10392 * server.c (handle_qxfer_libraries): Call
10393 the_target->qxfer_libraries_svr4.
10394 (handle_qxfer_libraries_svr4): New function.
10395 (qxfer_packets): New entry "libraries-svr4".
10396 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10397 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10398 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10399 PACKET_qXfer_libraries_svr4.
10401 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10403 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10404 PSW address/mask between 8-byte and 16-byte formats.
10405 (s390_supply_ptrace_register): Likewise.
10406 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10407 basic addressing mode bit.
10409 2011-11-24 Stan Shebs <stan@codesourcery.com>
10411 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10413 2011-11-17 Stan Shebs <stan@codesourcery.com>
10415 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10416 (tracing_start_time): New global.
10417 (tracing_stop_time): New global.
10418 (tracing_user_name): New global.
10419 (tracing_notes): New global.
10420 (tracing_stop_note): New global.
10421 (cmd_qtstart): Set traceframe_usage, start_time.
10422 (stop_tracing): Set stop_time.
10423 (cmd_qtstatus): Report additional status.
10424 (cmd_qtp): New function.
10425 (handle_tracepoint_query): Call it.
10426 (cmd_qtnotes): New function.
10427 (handle_tracepoint_general_set): Call it.
10428 (get_timestamp): Rename from tsv_get_timestamp.
10430 2011-11-14 Stan Shebs <stan@codesourcery.com>
10431 Kwok Cheung Yeung <kcy@codesourcery.com>
10433 * linux-x86-low.c (small_jump_insn): New.
10434 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10435 trampoline and error message, build a trampoline and issue a small
10436 jump instruction to it.
10437 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10438 trampoline and error message.
10439 (x86_get_min_fast_tracepoint_insn_len): New.
10440 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10441 * linux-low.h (struct linux_target_ops): Add arguments to
10442 install_fast_tracepoint_jump_pad operation, add new operation.
10443 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10445 (linux_get_min_fast_tracepoint_insn_len): New function.
10446 (linux_target_op): Add new operation.
10447 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10448 (gdb_trampoline_buffer_end): Ditto.
10449 (gdb_trampoline_buffer_error): Ditto.
10450 (struct ipa_sym_addresses): Add fields for new IPA variables.
10451 (symbol_list): Add entries for new IPA variables.
10452 (struct tracepoint): Add fields to hold the address range of the
10453 trampoline used by the tracepoint.
10454 (trampoline_buffer_head): New static variable.
10455 (trampoline_buffer_tail): Ditto.
10456 (claim_trampoline_space): New function.
10457 (have_fast_tracepoint_trampoline_buffer): New function.
10458 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10460 (install_fast_tracepoint): Ditto, also add error buffer argument.
10461 (cmd_qtminftpilen): New function.
10462 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10463 (fast_tracepoint_from_trampoline_address): New function.
10464 (fast_tracepoint_collecting): Handle trampoline as part of jump
10466 (set_trampoline_buffer_space): New function.
10467 (initialize_tracepoint): Initialize new IPA variables.
10468 * target.h (struct target_ops): Add arguments to
10469 install_fast_tracepoint_jump_pad operation, add new
10470 get_min_fast_tracepoint_insn_len operation.
10471 (target_get_min_fast_tracepoint_insn_len): New.
10472 (install_fast_tracepoint_jump_pad): Add arguments.
10473 * server.h (IPA_BUFSIZ): Define.
10474 * linux-i386-ipa.c: Include extra header files.
10475 (initialize_fast_tracepoint_trampoline_buffer): New function.
10476 (initialize_low_tracepoint): Call it.
10477 * server.h (set_trampoline_buffer_space): Declare.
10478 (claim_trampoline_space): Ditto.
10479 (have_fast_tracepoint_trampoline_buffer): Ditto.
10481 2011-11-14 Yao Qi <yao@codesourcery.com>
10483 * server.c (handle_query): Handle InstallInTrace for qSupported.
10484 * tracepoint.c (add_tracepoint): Sort list.
10485 (install_tracepoint, download_tracepoint): New.
10486 (cmd_qtdp): Call them to install and download tracepoints.
10487 (sort_tracepoints): Removed.
10488 (cmd_qtstart): Update.
10490 2011-11-14 Yao Qi <yao@codesourcery.com>
10492 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10493 * mem-break.h: Declare.
10494 * tracepoint.c (cmd_qtstart): Move some code to ...
10495 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10497 (download_tracepoints): Move some code to ...
10498 (download_tracepoint_1): ... here. New.
10500 2011-11-08 Yao Qi <yao@codesourcery.com>
10502 * remote-utils.c (relocate_instruction): A comment fix.
10504 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10506 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10507 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10508 dr_status_mirror and dr_control_mirror from debug_reg_state.
10509 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10510 (i386_initial_stuff): Remove use of deleted globals.
10511 (i386_get_thread_context, i386_set_thread_context,
10512 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10513 from debug_reg_state.
10515 2011-11-05 Yao Qi <yao@codesourcery.com>
10517 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10518 address as TPOINT's.
10520 2011-11-02 Stan Shebs <stan@codesourcery.com>
10522 * tracepoint.c (agent_mem_read_string): New function.
10523 (eval_agent_expr): Call it for tracenz.
10524 * server.c (handle_query): Report support for tracenz.
10526 2011-11-02 Yao Qi <yao@codesourcery.com>
10528 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10530 2011-11-02 Yao Qi <yao@codesourcery.com>
10532 * target.h: Fix a typo in comment.
10534 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10536 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10537 clobber the breakpoints' shadows with fast tracepoint jumps.
10538 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10539 * target.c (write_inferior_memory): Also pass MYADDR down to
10542 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10544 * configure.ac: Check support for personality routine.
10545 * configure: Regenerate.
10546 * config.in: Likewise.
10547 * linux-low.c: Include <sys/personality.h>.
10548 Define ADDR_NO_RANDOMIZE if necessary.
10549 (linux_create_inferior): Disable address space randomization when
10550 forking inferior, if requested.
10551 (linux_supports_disable_randomization): New function.
10552 (linux_target_ops): Install it.
10553 * server.h (disable_randomization): Declare.
10554 * server.c (disable_randomization): New global variable.
10555 (handle_general_set): Handle QDisableRandomization.
10556 (handle_query): Likewise for qSupported.
10557 (main): Support --disable-randomization and --no-disable-randomization
10558 command line arguments.
10559 * target.h (struct target_ops): Add supports_disable_randomization.
10560 (target_supports_disable_randomization): New macro.
10562 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10564 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10566 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10567 [!PT_GETDSBT] (target_loadmap): New definition.
10568 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10569 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10570 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10571 and PT_GETDSBT to LINUX_LOADMAP.
10572 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10573 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10575 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10577 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10578 (arm_linux_hwbp_cap): New static variable.
10579 (arm_linux_get_hwbp_cap): Replace by ...
10580 (arm_linux_init_hwbp_cap): ... this new function.
10581 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10582 (arm_linux_get_hw_watchpoint_count): Likewise.
10583 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10584 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10585 (arm_prepare_to_resume): Use perror_with_name instead of error.
10587 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10589 * linux-arm-low.c: Include <signal.h>.
10590 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10591 (struct arm_linux_hwbp_cap): New data type.
10592 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10593 (struct arm_linux_hw_breakpoint): New data type.
10594 (MAX_BPTS, MAX_WPTS): Define.
10595 (struct arch_process_info, struct arch_lwp_info): New data types.
10596 (arm_linux_get_hwbp_cap): New function.
10597 (arm_linux_get_hw_breakpoint_count): Likewise.
10598 (arm_linux_get_hw_watchpoint_count): Likewise.
10599 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10600 (arm_hwbp_control_initialize): Likewise.
10601 (arm_hwbp_control_is_enabled): Likewise.
10602 (arm_hwbp_control_is_initialized): Likewise.
10603 (arm_hwbp_control_disable): Likewise.
10604 (arm_linux_hw_breakpoint_equal): Likewise.
10605 (arm_linux_hw_point_initialize): Likewise.
10606 (struct update_registers_data): New data structure.
10607 (update_registers_callback: New function.
10608 (arm_insert_point): Likewise.
10609 (arm_remove_point): Likewise.
10610 (arm_stopped_by_watchpoint): Likewise.
10611 (arm_stopped_data_address): Likewise.
10612 (arm_new_process): Likewise.
10613 (arm_new_thread): Likewise.
10614 (arm_prepare_to_resume): Likewise.
10615 (the_low_target): Register arm_insert_point, arm_remove_point,
10616 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10617 arm_new_thread, and arm_prepare_to_resume.
10619 2011-09-15 Stan Shebs <stan@codesourcery.com>
10621 * server.h (struct emit_ops): Add compare-goto fields.
10622 * tracepoint.c (gdb_agent_op_sizes): New table.
10623 (emit_eq_goto): New function.
10624 (emit_ne_goto): New function.
10625 (emit_lt_goto): New function.
10626 (emit_le_goto): New function.
10627 (emit_gt_goto): New function.
10628 (emit_ge_goto): New function.
10629 (is_goto_target): New function.
10630 (compile_bytecodes): Recognize special cases of compare-goto
10631 combinations and call specialized emitters for them.
10632 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10633 (amd64_emit_ne_goto): New function.
10634 (amd64_emit_lt_goto): New function.
10635 (amd64_emit_le_goto): New function.
10636 (amd64_emit_gt_goto): New function.
10637 (amd64_emit_ge_goto): New function.
10638 (amd64_emit_ops): Add the new functions.
10639 (i386_emit_eq_goto): New function.
10640 (i386_emit_ne_goto): New function.
10641 (i386_emit_lt_goto): New function.
10642 (i386_emit_le_goto): New function.
10643 (i386_emit_gt_goto): New function.
10644 (i386_emit_ge_goto): New function.
10645 (i386_emit_ops): Add the new functions.
10647 2011-09-08 Stan Shebs <stan@codesourcery.com>
10649 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10650 (i386_emit_epilogue): Restore %ebx.
10652 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10654 * server.c (step_thread): Remove definition.
10655 (process_serial_event): Don't handle Hs.
10656 * server.h (step_thread): Remove declaration.
10657 * target.c (set_desired_inferior): Remove use of step_thread.
10659 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10661 * linux-low.c: Include linux-procfs.h.
10662 (linux_attach_lwp_1): Update comments.
10663 (linux_attach): Scan for existing threads when attaching to a
10664 process that is the tgid.
10665 * Makefile.in: Update dependencies.
10667 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10669 * configure.srv: Add linux-procfs.o dependencies.
10671 2011-08-14 Yao Qi <yao@codesourcery.com>
10673 * target.h (struct target_ops): Fix indent.
10674 * win32-low.c (win32_target_ops): Fix comment.
10676 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10677 Yao Qi <yao@codesourcery.com>
10679 * Makefile.in (clean): Remove tic6x-*.c files.
10680 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10681 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10682 (tic6x-c64xp-linux.c): Likewise.
10683 * configure.srv: Add support for tic6x-*-uclinux.
10684 * linux-tic6x-low.c: New.
10685 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10687 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10688 Yao Qi <yao@codesourcery.com>
10690 * target.h (struct target_ops): Add read_loadmap.
10691 * linux-low.c (struct target_loadseg): New type.
10692 (struct target_loadmap): New type.
10693 (linux_read_loadmap): New function.
10694 (linux_target_ops): Add linux_read_loadmap.
10695 * server.c (handle_query): Support qXfer:fdpic:read packet.
10696 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10699 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10701 * win32-low.c: Include <stdint.h>.
10703 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10705 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10706 to the inferior here.
10707 (i386_remove_aligned_watchpoint): Ditto.
10708 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10709 fit part of the watchpoint in the debug registers.
10710 (i386_update_inferior_debug_regs): New.
10711 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10712 registers, and only update the inferior on success.
10713 (i386_low_remove_watchpoint): Ditto.
10715 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10717 * linux-low.c (compare_ints, unique, list_threads, show_process,
10718 linux_core_of_thread): Delete.
10719 (linux_target_ops): Change linux_core_of_thread to
10720 linux_common_core_of_thread.
10721 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10722 * utils.c (malloc_failure): Change type of argument.
10723 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10724 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10725 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10726 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10727 (IPA_OBJS): Add common-utils-ipa.o.
10728 (ptid_h, linux_osdata_h): New macros.
10729 (server_h): Add common/common-utils.h, common/xml-utils.h,
10730 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10732 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10733 ptid.o, buffer.o): New rules.
10734 (linux-low.o): Add common/linux-osdata.h as a dependency.
10735 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10736 * configure.ac: Add AC_HEADER_DIRENT check.
10737 * config.in: Regenerate.
10738 * configure: Regenerate.
10739 * remote-utils.c (xml_escape_text): Delete.
10740 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10741 buffer_xml_printf): Move to common/buffer.c.
10742 * server.c (main): Remove call to initialize_inferiors.
10743 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10744 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10745 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10746 internal_error, gdb_assert, gdb_assert_fail): Delete.
10747 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10748 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10750 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10751 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10752 initialize_inferiors): Delete.
10754 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10756 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10759 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10761 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10763 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10765 2011-05-26 Yao Qi <yao@codesourcery.com>
10767 * Makefile.in (thread-db.o): Track dependence to
10768 common/gdb_thread_db.h.
10769 * thread-db.c: include gdb_thread_db.h from right place.
10771 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10773 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10774 __FILE__ and __LINE__ to internal_error.
10776 2011-05-13 Doug Evans <dje@google.com>
10778 * thread-db.c (try_thread_db_load_from_sdir): New function.
10779 (try_thread_db_load_from_dir): New function.
10780 (thread_db_load_search): Handle $sdir, ignore $pdir.
10781 Remove trying of system directories if search of
10782 libthread-db-search-path fails, that is now done via $sdir.
10784 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10786 * server.c (handle_query): Add EnableDisableTracepoints to the list
10787 of supported features.
10788 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10790 (cmd_qtenable_disable): New.
10791 (cmd_qtstart): Install tracepoints even if disabled.
10792 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10793 receiving a QTEnable or QTDisable packet.
10794 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10795 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10797 (gdb_probe): Skip data collection if static tracepoint is disabled.
10799 2011-05-10 Doug Evans <dje@google.com>
10801 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10803 2011-05-04 Doug Evans <dje@google.com>
10805 * linux-low.c (linux_join): Skip process lookup.
10806 * spu-low.c (spu_join): Ditto.
10807 * server.c (join_inferiors_callback): Delete.
10808 (process_serial_event): For 'D' packet (detach) call join_inferior
10811 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10813 * README: Don't mention xscale*-*-linux*.
10814 * configure.srv (xscale*-*-linux*): Don't handle target.
10816 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10818 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10820 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10821 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10822 (i386_emit_void_call_2): Likewise.
10824 2011-04-26 Yao Qi <yao@codesourcery.com>
10826 * linux-low.c: Move common macros to linux-ptrace.h.
10827 Include linux-ptrace.h.
10828 * Makefile.in (linux_ptrace_h): New.
10829 (linux-low.o): Depends on linux-ptrace.h.
10831 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10833 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10834 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10835 (remote_prepare): New function with most of the TCP code from ...
10836 (remote_open): ... here. Detect PORT here unconditionally. Move also
10837 setting transport_is_reliable.
10838 * server.c (run_once): New variable.
10839 (gdbserver_usage): Document it.
10840 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10841 the first run if RUN_ONCE.
10842 * server.h (run_once, remote_prepare): New declarations.
10844 2011-04-19 Tom Tromey <tromey@redhat.com>
10846 * win32-low.c (handle_load_dll): Remove duplicate "the".
10848 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10850 Remove support for old Cygwin 1.5 versions.
10851 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10852 function to avoid warning.
10853 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10856 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10858 * gdbserver/server.h (Macro _): Define it if not available.
10860 2011-03-14 Michael Snyder <msnyder@vmware.com>
10862 * hostio.c (handle_close): Remove unnecessary null test.
10864 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10866 * Makefile.in (maintainer-clean realclean distclean): Remove
10867 "make ... subdir_do" command.
10869 2011-03-10 Michael Snyder <msnyder@vmware.com>
10871 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10873 * server.c (handle_v_run): Free alloced buffer on early return.
10875 2011-03-09 Yao Qi <yao@codesourcery.com>
10878 2011-03-04 Yao Qi <yao@codesourcery.com>
10880 * Makefile.in: Remove GNU make feature --directory.
10882 2011-03-05 Yao Qi <yao@codesourcery.com>
10884 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10885 (subdir_do): New make target. Copied from gdb/Makefile.
10886 (maintainer-clean, realclean, distclean, clean): Call corresponding
10887 make targets in common/Makefile.
10889 2011-02-11 Yao Qi <yao@codesourcery.com>
10891 * configure.ac: Call AC_PROG_RANLIB.
10892 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10893 * configure: Regenerate.
10895 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10897 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10899 2011-03-06 Yao Qi <yao@codesourcery.com>
10901 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10903 2011-03-05 Yao Qi <yao@codesourcery.com>
10905 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10906 (subdir_do): New make target. Copied from gdb/Makefile.
10907 (maintainer-clean, realclean, distclean, clean): Call corresponding
10908 make targets in common/Makefile.
10910 2011-03-04 Yao Qi <yao@codesourcery.com>
10912 * Makefile.in: Remove GNU make feature --directory.
10914 2011-03-04 Michael Snyder <msnyder@vmware.com>
10916 * server.c (queue_stop_reply): Call xmalloc not malloc.
10918 2011-03-02 Michael Snyder <msnyder@vmware.com>
10920 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10922 2011-02-28 Michael Snyder <msnyder@vmware.com>
10924 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10925 (cmd_qtframe): Ditto.
10926 (cmd_qtbuffer): Ditto.
10927 (cmd_bigqtbuffer): Ditto.
10929 * utils.c (decimal2str): Initialize 'width' to nine, then
10930 don't mess with it.
10932 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10934 * hostio.c (require_data): Free *data, not data.
10936 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10938 * hostio.c (require_data): Use free, not xfree.
10940 2011-02-27 Michael Snyder <msnyder@vmware.com>
10942 * server.c (handle_query): Discard unused value.
10944 * hostio.c (require_data): Free malloc memory before returning
10947 2011-02-26 Michael Snyder <msnyder@vmware.com>
10949 * linux-low.c (list_threads): Call closedir for dirent.
10951 2011-02-27 Michael Snyder <msnyder@vmware.com>
10953 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10954 a case statement falls through.
10956 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10958 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10961 2011-02-26 Michael Snyder <msnyder@vmware.com>
10963 * utils.c (decimal2str): Eliminate dead code and dead param.
10964 (pulongest): Drop dead param from call to decimal2str.
10967 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10969 Revert the following patch (not approved yet):
10970 2011-02-21 Hui Zhu <teawater@gmail.com>
10971 * tracepoint.c (tp_printf): New function.
10972 (eval_agent_expr): Handle gdb_agent_op_printf.
10974 2011-02-21 Hui Zhu <teawater@gmail.com>
10976 * tracepoint.c (tp_printf): New function.
10977 (eval_agent_expr): Handle gdb_agent_op_printf.
10979 2011-02-18 Tom Tromey <tromey@redhat.com>
10981 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10982 (tracepoint.o): Likewise.
10983 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10984 (gdb_agent_op_names): Likewise.
10986 2011-02-18 Tom Tromey <tromey@redhat.com>
10988 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10989 gdb_agent_op_rot>: New constants.
10990 (gdb_agent_op_names): Add pick and roll.
10991 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10994 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10996 * aclocal.m4: Regenerated with aclocal-1.11.1.
10998 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11000 * server.c (handle_qxfer_traceframe_info): New.
11001 (qxfer_packets): Register "traceframe-info".
11002 (handle_query): Report support for qXfer:traceframe-info:read+.
11003 * tracepoint.c (match_blocktype): New.
11004 (traceframe_find_block_type): Rename to ...
11005 (traceframe_walk_blocks): ... this. Add callback filter argument,
11007 (traceframe_find_block_type): New, reimplemented on top of
11008 traceframe_walk_blocks.
11009 (build_traceframe_info_xml): New.
11010 (traceframe_read_info): New.
11011 * server.h (traceframe_read_info): Declare.
11013 2011-02-11 Yao Qi <yao@codesourcery.com>
11015 * configure.ac: Call AC_PROG_RANLIB.
11016 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11017 * configure: Regenerate.
11019 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11021 * server.c (gdb_read_memory): Change return semantics to allow
11023 (handle_search_memory_1): Adjust.
11024 (process_serial_event) <'m' packet>: Handle partial transfers.
11025 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11027 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11029 * regcache.c (init_register_cache): Initialize
11030 regcache->register_status.
11031 (free_register_cache): Release regcache->register_status.
11032 (regcache_cpy): Copy register_status.
11033 (registers_to_string): Print 'x's for unavailable registers.
11034 (supply_register): Mark the register's status valid or
11035 unavailable, depending on whether a buffer was passed in or not.
11036 (supply_register_zeroed): New.
11037 (supply_regblock): Mark the registers' status valid or
11038 unavailable, depending on whether a buffer was passed in or not.
11039 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11040 (struct regcache): New `register_status' field.
11041 (supply_register_zeroed): Declare.
11042 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11043 supply_register_zeroed, rather than passing a NULL buffer to
11045 * tracepoint.c (fetch_traceframe_registers): Update comment.
11047 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11049 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11052 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11054 * server.h (decode_xfer_write): Change prototype.
11055 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11056 and don't extract the annex here.
11057 * server.c (decode_xfer_read): Remove `annex' parameter,
11058 and don't extract the annex here.
11059 (decode_xfer): New.
11060 (struct qxfer): New.
11061 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11062 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11063 (handle_qxfer_statictrace): New functions, abstracted out from
11064 handle_query, and made to use the struct qxfer interface.
11065 (handle_threads_qxfer_proper): Rename to ...
11066 (handle_qxfer_threads_proper): ... this.
11067 (handle_threads_qxfer): Rename to ...
11068 (handle_qxfer_threads): ... this. Adjust.
11069 (qxfer_packets): New array.
11070 (handle_qxfer): New function.
11071 (handle_query): Use handle_qxfer.
11073 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11075 * gdbreplay.c: Shorten lines of >= 80 columns.
11076 * linux-low.c: Ditto.
11077 * linux-ppc-low.c: Ditto.
11078 * linux-s390-low.c: Ditto.
11079 * linux-sparc-low.c: Ditto.
11080 * linux-x86-low.c: Ditto.
11081 * linux-xtensa-low.c: Ditto.
11082 * mem-break.c: Ditto.
11083 * nto-low.c: Ditto.
11084 * regcache.h: Ditto.
11085 * remote-utils.c: Ditto.
11088 * thread-db.c: Ditto.
11089 * tracepoint.c: Ditto.
11091 * win32-low.h: Ditto.
11093 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11095 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11098 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11100 * server.c (gdbserver_version): Update copyright year in version
11102 * gdbreplay.c (gdbreplay_version): Ditto.
11104 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11106 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11107 * linux-bfin-low.c: New file.
11108 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11109 PT_DATA_ADDR for BFIN targets.
11110 * Makefile.in (SFILES): Add linux-bfin-low.c.
11111 (clean): Remove reg-bfin.c.
11112 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11113 * README: Mention supported Blackfin targets.
11115 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11117 * .gitignore: New file.
11119 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11121 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11123 2010-10-22 Jie Zhang <jie@codesourcery.com>
11125 * Makefile.in: Add FLAGS_TO_PASS variable.
11126 (install): Remove dependency of install-only and recursively
11127 invoke make for install-only.
11129 2010-10-04 Doug Evans <dje@google.com>
11131 * Makefile.in (uninstall): Use $(DESTDIR).
11133 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11137 * linux-x86-low.c (compat_siginfo_from_siginfo)
11138 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11139 si_code is < 0. Check for si_code == SI_TIMER before checking for
11142 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11144 * lynx-i386-low.c: New file.
11145 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11147 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11149 * lynx-low.c (ptrace_request_to_str): Remove handling for
11150 request values that have been removed in LynxOS 5.x.
11152 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11154 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11157 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11159 * configure.ac: Add --enable-inprocess-agent option.
11160 * configure: Rebuilt.
11162 2010-09-06 Yao Qi <yao@codesourcery.com>
11164 * linux-low.c (linux_kill): Remove unused variable.
11165 (linux_stabilize_threads): Likewise.
11166 * server.c (start_inferior): Likewise.
11167 (queue_stop_reply_callback): Likewise.
11168 * tracepoint.c (do_action_at_tracepoint): Likewise.
11170 2010-09-06 Yao Qi <yao@codesourcery.com>
11172 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11175 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11177 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11179 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11181 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11184 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11186 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11187 gdbserver/lynx-ppc-low.c: New files.
11188 * Makefile.in (lynx_low_h): New variable.
11189 (lynx-low.o, lynx-ppc-low.o): New rules.
11190 * configure.ac: On LynxOS, link with -lnetinet.
11191 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11192 * configure: regenerate.
11194 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11196 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11197 * configure.ac: Add check for vasprintf and vsnprintf.
11198 * configure, config.in: Regenerate.
11199 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11201 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11203 * gdbreplay.c: Move include of alloca.h up, next to include of
11205 * server.h: Add include of malloc.h.
11206 * mem-break.c: Remove include of malloc.h.
11207 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11209 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11211 * Makefile.in (memmem.o): Build with -Wno-error.
11213 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11215 * utils.c (xsnprintf): Make non-static.
11216 * server.h: Add xsnprintf declaration.
11217 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11218 replace calls to snprintf by calls to xsnprintf throughout.
11220 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11222 * configure.ac: Add configure check for alloca.
11223 * configure, config.in: Regenerate.
11224 * server.h: Include alloca.h if it exists.
11225 * gdbreplay.c: Include alloca.h if it exists.
11227 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11229 * linux-low.c (__SIGRTMIN): Define if not already defined.
11230 (linux_create_inferior): Check for __ANDROID__ rather than
11232 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11233 are already deferred.
11234 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11235 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11236 stopped and already has a pending signal to report.
11237 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11238 a pending signal to report or is moving out of a jump pad.
11239 (linux_init_signals): Check for __ANDROID__ rather than
11242 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11244 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11245 debug_threads check. Avoid a linear search when not doing debug
11248 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11250 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11251 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11252 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11253 (process_event): Change local fd's type to gdb_fildes_t.
11254 (create_file_handler): Adjust prototype.
11255 (delete_file_handler): Adjust prototype.
11256 (handle_file_event): Adjust prototype. Use pfildes.
11257 (create_file_event): Adjsut prototype.
11258 * remote-utils.c (remote_desc, listen_desc): Change type to
11260 * server.h: New gdb_fildes_t typedef.
11261 [USE_WIN32API]: Include winsock2.h.
11262 (delete_file_handler, add_file_handler): Adjust prototypes.
11263 (pfildes): Declare.
11264 * utils.c (pfildes): New.
11266 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11268 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11269 * configure: Regenerate.
11271 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11273 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11274 (linux_done_accessing_memory): ... this.
11275 (linux_target_ops): Adjust.
11276 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11277 * nto-low.c (nto_target_ops): Adjust comment.
11278 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11279 * spu-low.c (spu_target_ops): Adjust comment.
11280 * target.h (target_ops): Rename unprepare_to_access_memory field
11281 to done_accessing_memory.
11282 (unprepare_to_access_memory): Rename to ...
11283 (done_accessing_memory): ... this.
11285 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11287 * linux-low.c (linux_prepare_to_access_memory): New.
11288 (linux_unprepare_to_access_memory): New.
11289 (linux_target_ops): Install them.
11290 * server.c (read_memory): Rename to ...
11291 (gdb_read_memory): ... this. Use
11292 prepare_to_access_memory/prepare_to_access_memory.
11293 (write_memory): Rename to ...
11294 (gdb_write_memory): ... this. Use
11295 prepare_to_access_memory/prepare_to_access_memory.
11296 (handle_search_memory_1): Adjust.
11297 (process_serial_event): Adjust.
11298 * target.h (struct target_ops): New fields
11299 prepare_to_access_memory and unprepare_to_access_memory.
11300 (prepare_to_access_memory, unprepare_to_access_memory): New.
11301 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11302 prepare_to_access_memory/prepare_to_access_memory.
11303 * nto-low.c (nto_target_ops): Adjust.
11304 * spu-low.c (spu_target_ops): Adjust.
11305 * win32-low.c (win32_target_ops): Adjust.
11307 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11309 * Makefile.in (WARN_CFLAGS): Get it from configure.
11310 (WERROR_CFLAGS): New.
11311 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11312 * configure.ac: Introduce --enable-werror, which adds -Werror to
11313 the compiler command line. Enabled by default. Disable with
11314 --disable-werror. Add -Wdeclaration-after-statement
11315 Wpointer-arith and -Wformat-nonliteral to warning flags.
11316 * configure: Regenerate.
11318 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11320 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11322 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11324 * gdbreplay.c (remote_error): New.
11326 (expect): Use gdbchar. Check for error reading from GDB.
11327 Clarify sync error output.
11328 (play): Check for errors writing to GDB.
11329 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11330 * remote-utils.c (getpkt): Check for errors writing to the remote
11333 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11335 * linux-low.c (linux_wait_1): Move non-debugging code out of
11336 `debug_threads' control.
11338 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11340 * linux-low.c (linux_wait_1): Don't set last_status here.
11341 * server.c (push_event, queue_stop_reply_callback): Assert we're
11342 not pushing a TARGET_WAITKIND_IGNORE event.
11343 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11344 (myresume, handle_target_event): Set the thread's last_resume_kind
11345 and last_status from the target returned status.
11347 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11351 * linux-x86-low.c (update_debug_registers_callback): New.
11352 (i386_dr_low_set_addr): Use it.
11353 (i386_dr_low_get_addr): New.
11354 (i386_dr_low_set_control): Use update_debug_registers_callback.
11355 (i386_dr_low_get_control): New.
11356 (i386_dr_low_get_status): Adjust.
11357 * linux-low.c (linux_stop_lwp): New.
11358 * linux-low.h (linux_stop_lwp): Declare.
11360 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11361 argument instead of a i386_debug_reg_state.
11362 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11363 a i386_debug_reg_state.
11364 (i386_insert_aligned_watchpoint): Adjust.
11365 (i386_remove_aligned_watchpoint): Adjust.
11366 (i386_low_stopped_data_address): Read the debug registers from the
11367 inferior instead of from the mirrors.
11368 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11369 (i386_dr_low_get_addr): Declare.
11370 (i386_dr_low_get_control): Declare.
11371 (i386_dr_low_get_status): Change prototype.
11373 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11374 (i386_dr_low_get_addr): New.
11375 (i386_dr_low_get_control): New.
11376 (i386_dr_low_get_status): Adjust prototype. Return
11378 (i386_initial_stuff): Clear dr_status_mirror and
11380 (i386_get_thread_context): Adjust.
11381 (i386_set_thread_context): Adjust.
11382 (i386_thread_added): Adjust.
11384 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11386 * linux-low.h (linux_thread_area): Delete declaration.
11388 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11390 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11391 after its termination.
11393 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11395 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11396 (gdb_wants_all_stopped): Delete.
11397 (linux_wait_1): Don't call them.
11398 * server.c (handle_v_cont): Tag all threads as want-stopped.
11399 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11400 stopped as "client-wants-stopped".
11402 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11404 * Makefile.in (signals_h): New.
11405 (server_h): Depend on it.
11406 (server.o): Don't depend on $(signals_def).
11407 (signals.o): Depend on $(signals_def).
11409 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11411 * Makefile.in (signals_def): New.
11412 (server_h): Append include/gdb/signals.h and signals_def.
11413 (server.o): Append signals_def.
11415 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11417 * server.c (handle_target_event): Use target_signal_to_host for
11418 resume_info.sig initialization.
11419 * target.h (struct thread_resume) <sig>: New comment.
11421 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11423 * server.c (handle_query): strcpy() the returned string from paddress()
11424 instead of sprintf().
11425 * utils.c (paddress): Return phex_nz().
11427 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11429 * server.c (handle_v_cont): Call mourn_inferior if process
11431 (myresume): Likewise.
11433 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11435 Static tracepoints, and integration with UST.
11437 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11438 * mem-break.c (uninsert_all_breakpoints)
11439 (reinsert_all_breakpoints): New.
11440 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11441 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11442 (gdb_agent_ust_loaded, helper_thread_id)
11443 (gdb_agent_helper_thread_id): New macros.
11444 (struct ipa_sym_addresses): Add addr_ust_loaded,
11445 addr_helper_thread_id, addr_cmd_buf.
11446 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11447 (in_process_agent_loaded_ust): New.
11448 (write_e_ust_not_loaded): New.
11449 (maybe_write_ipa_ust_not_loaded): New.
11450 (struct collect_static_trace_data_action): New.
11451 (enum tracepoint_type) <static_tracepoint>: New.
11452 (struct tracepoint) <handle>: Mention static tracepoints.
11453 (struct static_tracepoint_ctx): New.
11454 (CMD_BUF_SIZE): New.
11455 (add_tracepoint_action): Handle static tracepoint actions.
11456 (unprobe_marker_at): New.
11457 (clear_installed_tracepoints): Handle static tracepoints.
11458 (cmd_qtdp): Handle static tracepoints.
11459 (probe_marker_at): New.
11460 (cmd_qtstart): Handle static tracepoints.
11461 (response_tracepoint): Handle static tracepoints.
11462 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11463 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11464 (get_context_regcache): Handle static tracepoints.
11465 (do_action_at_tracepoint): Handle static tracepoint actions.
11466 (traceframe_find_block_type): Handle static trace data blocks.
11467 (traceframe_read_sdata): New.
11468 (download_tracepoints): Download static tracepoint actions.
11469 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11470 (GDB_PROBE_NAME): New.
11472 (GET_UST_SYM): New.
11475 (ust_marker_to_static_tracepoint): New.
11477 (collect_ust_data_at_tracepoint): New.
11478 (gdb_ust_probe): New.
11479 (UNIX_PATH_MAX, SOCK_DIR): New.
11480 (gdb_ust_connect_sync_socket): New.
11481 (resume_thread, stop_thread): New.
11482 (run_inferior_command): New.
11483 (init_named_socket): New.
11484 (gdb_ust_socket_init): New.
11485 (cstr_to_hexstr): New.
11487 (first_marker, next_marker): New.
11488 (response_ust_marker): New.
11489 (cmd_qtfstm, cmd_qtsstm): New.
11490 (unprobe_marker_at, probe_marker_at): New.
11491 (cmd_qtstmat, gdb_ust_thread): New.
11492 (gdb_ust_init): New.
11493 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11494 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11495 (ST_REGENTRY): New.
11496 (x86_64_st_collect_regmap): New.
11497 (X86_64_NUM_ST_COLLECT_GREGS): New.
11498 (AMD64_RIP_REGNUM): New.
11499 (supply_static_tracepoint_registers): New.
11500 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11501 (ST_REGENTRY): New.
11502 (i386_st_collect_regmap): New.
11503 (i386_NUM_ST_COLLECT_GREGS): New.
11504 (supply_static_tracepoint_registers): New.
11505 * server.c (handle_query): Handle qXfer:statictrace:read.
11506 <qSupported>: Report support for StaticTracepoints, and
11507 qXfer:statictrace:read features.
11508 * server.h (traceframe_read_sdata)
11509 (supply_static_tracepoint_registers): Declare.
11510 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11511 (unpack_varlen_hex): Include in IPA build.
11512 * Makefile.in (ustlibs, ustinc): New.
11513 (IPA_OBJS): Add remote-utils-ipa.o.
11514 ($(IPA_LIB)): Link -ldl and -lpthread.
11516 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11517 * config.in, configure: Regenerate.
11519 2010-06-20 Ian Lance Taylor <iant@google.com>
11520 Pedro Alves <pedro@codesourcery.com>
11522 * linux-x86-low.c (always_true): Delete.
11523 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11524 trying to fool the compiler with always_true.
11526 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11528 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11529 conditions in gdbserver.
11531 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11533 * spu-low.c (spu_read_memory): Wrap around local store limit.
11534 (spu_write_memory): Likewise.
11536 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11538 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11539 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11541 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11543 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11544 uses with LONGEST uses.
11546 2010-06-14 Stan Shebs <stan@codesourcery.com>
11547 Pedro Alves <pedro@codesourcery.com>
11551 * linux-x86-low.c: Include limits.h.
11553 (always_true): New.
11556 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11557 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11558 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11559 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11560 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11561 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11562 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11563 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11564 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11565 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11566 (amd64_emit_void_call_2): New.
11567 (amd64_emit_ops): New.
11568 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11569 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11570 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11571 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11572 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11573 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11574 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11575 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11576 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11577 (i386_emit_stack_adjust, i386_emit_int_call_1)
11578 (i386_emit_void_call_2): New.
11579 (i386_emit_ops): New.
11580 (x86_emit_ops): New.
11581 (the_low_target): Install x86_emit_ops.
11582 * server.h (struct emit_ops): New.
11583 (get_raw_reg_func_addr): Declare.
11584 (current_insn_ptr, emit_error): Declare.
11585 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11586 (set_trace_state_variable_value): New defines.
11587 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11588 addr_get_trace_state_variable_value and
11589 addr_set_trace_state_variable_value.
11590 (symbol_list): New fields for get_raw_reg,
11591 get_trace_state_variable_value and set_trace_state_variable_value.
11592 (condfn): New typedef.
11593 (struct tracepoint): New field `compiled_cond'.
11594 (do_action_at_tracepoint): Clear compiled_cond.
11595 (get_trace_state_variable_value, set_trace_state_variable_value):
11597 (condition_true_at_tracepoint): If there's a compiled condition,
11599 (current_insn_ptr, emit_error): New globals.
11600 (struct bytecode_address): New.
11601 (get_raw_reg_func_addr): New.
11602 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11603 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11604 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11605 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11606 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11607 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11608 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11609 (compile_tracepoint_condition, compile_bytecodes): New.
11610 * target.h (emit_ops): Forward declare.
11611 (struct target_ops): New field emit_ops.
11612 (target_emit_ops): New.
11613 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11614 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11615 * linux-low.c (linux_emit_ops): New.
11616 (linux_target_ops): Install it.
11617 * linux-low.h (struct linux_target_ops): New field emit_ops.
11619 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11621 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11622 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11624 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11625 Stan Shebs <stan@codesourcery.com>
11627 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11628 (all): Depend on $(extra_libraries).
11629 (install-only): Install the IPA.
11630 (IPA_OBJS, IPA_LIB): New.
11631 (clean): Remove the IPA lib.
11632 (IPAGENT_CFLAGS): New.
11633 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11634 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11635 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11636 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11637 * configure.ac: Check for atomic builtins support in the compiler.
11638 (IPA_DEPFILES, extra_libraries): Define.
11639 * configure.srv (ipa_obj): Add description.
11640 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11641 (i[34567]86-*-linux*): Set ipa_obj.
11642 (x86_64-*-linux*): Set ipa_obj.
11643 * linux-low.c (stabilizing_threads): New.
11644 (supports_fast_tracepoints): New.
11645 (linux_detach): Stabilize threads before detaching.
11646 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11647 the lwp is either not stabilizing, or is moving out of a jump pad.
11648 (linux_fast_tracepoint_collecting): New.
11649 (maybe_move_out_of_jump_pad): New.
11650 (enqueue_one_deferred_signal): New.
11651 (dequeue_one_deferred_signal): New.
11652 (linux_wait_for_event_1): If moving out of a jump pad, defer
11653 pending signals to later.
11654 (linux_stabilize_threads): New.
11655 (linux_wait_1): Check if threads need moving out of jump pads, and
11657 (stuck_in_jump_pad_callback): New.
11658 (move_out_of_jump_pad_callback): New.
11659 (lwp_running): New.
11660 (linux_resume_one_lwp): Handle moving out of jump pads.
11661 (linux_set_resume_request): Dequeue deferred signals.
11662 (need_step_over_p): Also step over fast tracepoint jumps.
11663 (start_step_over): Also uninsert fast tracepoint jumps.
11664 (finish_step_over): Also reinsert fast tracepoint jumps.
11665 (linux_install_fast_tracepoint_jump): New.
11666 (linux_target_ops): Install linux_stabilize_threads and
11667 linux_install_fast_tracepoint_jump_pad.
11668 * linux-low.h (linux_target_ops) <get_thread_area,
11669 install_fast_tracepoint_jump_pad>: New fields.
11670 (struct lwp_info) <collecting_fast_tracepoint,
11671 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11672 (linux_get_thread_area): Declare.
11673 * linux-x86-low.c (jump_insn): New.
11674 (x86_get_thread_area): New.
11675 (append_insns): New.
11676 (push_opcode): New.
11677 (amd64_install_fast_tracepoint_jump_pad): New.
11678 (i386_install_fast_tracepoint_jump_pad): New.
11679 (x86_install_fast_tracepoint_jump_pad): New.
11680 (the_low_target): Install x86_get_thread_area and
11681 x86_install_fast_tracepoint_jump_pad.
11682 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11683 (struct fast_tracepoint_jump): New.
11684 (fast_tracepoint_jump_insn): New.
11685 (fast_tracepoint_jump_shadow): New.
11686 (find_fast_tracepoint_jump_at): New.
11687 (fast_tracepoint_jump_here): New.
11688 (delete_fast_tracepoint_jump): New.
11689 (set_fast_tracepoint_jump): New.
11690 (uninsert_fast_tracepoint_jumps_at): New.
11691 (reinsert_fast_tracepoint_jumps_at): New.
11692 (set_breakpoint_at): Use write_inferior_memory.
11693 (uninsert_raw_breakpoint): Use write_inferior_memory.
11694 (check_mem_read): Mask out fast tracepoint jumps.
11695 (check_mem_write): Mask out fast tracepoint jumps.
11696 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11697 (set_fast_tracepoint_jump): Declare.
11698 (delete_fast_tracepoint_jump)
11699 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11700 (reinsert_fast_tracepoint_jumps_at): Declare.
11701 * regcache.c: Don't compile many functions when building the
11702 in-process agent library.
11703 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11704 the register buffer in the heap.
11705 (free_register_cache): If the register buffer isn't owned by the
11706 regcache, don't free it.
11707 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11708 pre-existing register caches.
11709 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11711 (convert_ascii_to_int): : Constify `from' parameter type.
11712 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11713 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11714 the needed buffer in-place.
11715 (relocate_instruction): New.
11716 * server.c (handle_query) <qSymbols>: If the target supports
11717 tracepoints, give it a chance of looking up symbols. Report
11718 support for fast tracepoints.
11719 (handle_status): Stabilize threads.
11720 (process_serial_event): Adjust.
11721 * server.h (struct fast_tracepoint_jump): Forward declare.
11722 (struct process_info) <fast_tracepoint_jumps>: New field.
11723 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11724 (decode_X_packet, decode_M_packet): Adjust.
11725 (relocate_instruction): Declare.
11726 (in_process_agent_loaded): Declare.
11727 (tracepoint_look_up_symbols): Declare.
11728 (struct fast_tpoint_collect_status): Declare.
11729 (fast_tracepoint_collecting): Declare.
11730 (force_unlock_trace_buffer): Declare.
11731 (handle_tracepoint_bkpts): Declare.
11732 (initialize_low_tracepoint)
11733 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11734 * target.h (struct target_ops) <stabilize_threads,
11735 install_fast_tracepoint_jump_pad>: New fields.
11736 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11737 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11738 [HAVE_STDINT_H]: Include stdint.h.
11739 (trace_debug_1): Rename to ...
11740 (trace_vdebug): ... this.
11741 (trace_debug): Rename to ...
11742 (trace_debug_1): ... this. Add `level' parameter.
11743 (trace_debug): New.
11744 (ATTR_USED, ATTR_NOINLINE): New.
11745 (IP_AGENT_EXPORT): New.
11746 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11747 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11748 (about_to_request_buffer_space, trace_buffer_is_full)
11749 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11750 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11751 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11752 (traceframe_write_count, traceframes_created)
11753 (trace_state_variables)
11754 New renaming defines.
11755 (struct ipa_sym_addresses): New.
11756 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11757 (symbol_list): New.
11758 (ipa_sym_addrs): New.
11759 (all_tracepoint_symbols_looked_up): New.
11760 (in_process_agent_loaded): New.
11761 (write_e_ipa_not_loaded): New.
11762 (maybe_write_ipa_not_loaded): New.
11763 (tracepoint_look_up_symbols): New.
11764 (debug_threads) [IN_PROCESS_AGENT]: New.
11765 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11766 (UNKNOWN_SIDE_EFFECTS): New.
11767 (stop_tracing): New.
11768 (flush_trace_buffer): New.
11769 (stop_tracing_bkpt): New.
11770 (flush_trace_buffer_bkpt): New.
11771 (read_inferior_integer): New.
11772 (read_inferior_uinteger): New.
11773 (read_inferior_data_pointer): New.
11774 (write_inferior_data_pointer): New.
11775 (write_inferior_integer): New.
11776 (write_inferior_uinteger): New.
11777 (struct collect_static_trace_data_action): Delete.
11778 (enum tracepoint_type): New.
11779 (struct tracepoint) <type>: New field `type'.
11780 <actions_str, step_actions, step_actions_str>: Only include in
11782 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11783 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11784 (tracepoints): Use IP_AGENT_EXPORT.
11785 (last_tracepoint): Don't include in the IPA.
11786 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11787 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11788 (alloced_trace_state_variables): New.
11789 (trace_state_variables): Use IP_AGENT_EXPORT.
11790 (traceframe_t): Delete unused variable.
11791 (circular_trace_buffer): Don't include in the IPA.
11792 (trace_buffer_start): Delete.
11793 (struct trace_buffer_control): New.
11794 (trace_buffer_free): Delete.
11795 (struct ipa_trace_buffer_control): New.
11796 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11797 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11799 (trace_buffer_ctrl): New.
11800 (TRACE_BUFFER_CTRL_CURR): New.
11801 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11802 Reimplement as macros.
11803 (trace_buffer_wrap): Delete.
11804 (traceframe_write_count, traceframe_read_count)
11805 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11806 (struct tracepoint_hit_ctx) <type>: New field.
11807 (struct fast_tracepoint_ctx): New.
11808 (memory_barrier): New.
11810 (record_tracepoint_error): Update atomically in the IPA.
11811 (clear_inferior_trace_buffer): New.
11812 (about_to_request_buffer_space): New.
11813 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11814 updating the same buffer.
11815 (add_tracepoint): Default the tracepoint's type to trap
11816 tracepoint, and orig_size to -1.
11817 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11818 internal variables.
11819 (create_trace_state_variable): New parameter `gdb'. Handle it.
11820 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11821 (cmd_qtdp): Handle fast tracepoints.
11822 (cmd_qtdv): Adjust.
11823 (max_jump_pad_size): New.
11824 (gdb_jump_pad_head): New.
11825 (get_jump_space_head): New.
11826 (claim_jump_space): New.
11827 (sort_tracepoints): New.
11828 (MAX_JUMP_SIZE): New.
11829 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11831 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11832 support. Upload fast traceframes, and delete internal IPA
11834 (stop_tracing_handler): New.
11835 (flush_trace_buffer_handler): New.
11836 (cmd_qtstop): Upload fast tracepoints.
11837 (response_tracepoint): Handle fast tracepoints.
11838 (tracepoint_finished_step): Upload fast traceframes. Set the
11839 tracepoint hit context's tracepoint type.
11840 (handle_tracepoint_bkpts): New.
11841 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11842 type. Add comment about fast tracepoints.
11843 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11844 non-existing action_str field.
11845 (get_context_regcache): Handle fast tracepoints.
11846 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11848 (fast_tracepoint_from_jump_pad_address): New.
11849 (fast_tracepoint_from_ipa_tpoint_address): New.
11850 (collecting_t): New.
11851 (force_unlock_trace_buffer): New.
11852 (fast_tracepoint_collecting): New.
11854 (gdb_collect): New.
11855 (write_inferior_data_ptr): New.
11856 (target_tp_heap): New.
11857 (target_malloc): New.
11858 (download_agent_expr): New.
11860 (download_tracepoints): New.
11861 (download_trace_state_variables): New.
11862 (upload_fast_traceframes): New.
11863 (IPA_FIRST_TRACEFRAME): New.
11864 (IPA_NEXT_TRACEFRAME_1): New.
11865 (IPA_NEXT_TRACEFRAME): New.
11866 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11867 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11868 (gdb_jump_pad_buffer_end): New.
11869 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11870 (initialize_tracepoint): Adjust.
11871 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11872 buffer. Initialize the low module.
11873 * utils.c (PREFIX, TOOLNAME): New.
11874 (malloc_failure): Use PREFIX.
11875 (error): In the IPA, an error causes an exit.
11876 (fatal, warning): Use PREFIX.
11877 (internal_error): Use TOOLNAME.
11878 (NUMCELLS): Increase to 10.
11879 * configure, config.in: Regenerate.
11881 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11883 * server.c (handle_query) <qSupported>: Do two passes over the
11884 qSupported string to avoid nesting strtok.
11886 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11888 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11890 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11891 -Wl,--dynamic-list.
11892 * configure: Regenerate.
11893 * proc-service.list: New.
11895 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11897 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11900 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11902 * gdbreplay.c (remote_open): Check error return from socket() call by
11903 its equality to -1 not by it being negative.
11904 * remote-utils.c (remote_open): Likewise.
11906 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11908 * config.h: Regenerate.
11910 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11912 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11913 doesn't provide PTRACE_GET_THREAD_AREA.
11915 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11917 * linux-m68k-low.c: Include <asm/ptrace.h>
11918 (ps_get_thread_area): Implement.
11920 2010-05-03 Doug Evans <dje@google.com>
11922 * event-loop.c (struct callback_event): New struct.
11923 (callback_list): New global.
11924 (append_callback_event, delete_callback_event): New functions.
11925 (process_callback): New function.
11926 (start_event_loop): Call it.
11927 * remote-utils.c (NOT_SCHEDULED): Define.
11928 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11929 moved out of readchar.
11930 (readchar): Rewrite. Call reschedule before returning.
11931 (reset_readchar): New function.
11932 (remote_close): Call it.
11933 (process_remaining, reschedule): New functions.
11934 * server.h (callback_handler_func): New typedef.
11935 (append_callback_event, delete_callback_event): Declare.
11937 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11939 * proc-service.c (ps_pglobal_lookup): Use
11940 thread_db_look_up_one_symbol.
11941 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11942 parameter. Use it instead of all_symbols_looked_up.
11943 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11945 (all_symbols_looked_up): Don't declare.
11946 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11947 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11949 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11950 Set all_symbols_looked_up here.
11951 (thread_db_look_up_one_symbol): New.
11952 (thread_db_get_tls_address): Adjust.
11953 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11954 thread_db object on the heap, and tentatively set it in the
11956 (thread_db_init): Don't set all_symbols_looked_up here.
11957 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11959 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11961 * linux-low.c (linux_kill, linux_detach): Adjust.
11962 (status_pending_p_callback): Remove redundant statement. Check
11963 for !TARGET_WAITIKIND_IGNORE, instead of
11964 TARGET_WAITKIND_STOPPED.
11965 (handle_tracepoints): Make sure LWP is locked. Adjust.
11966 (linux_wait_for_event_1): Adjust.
11967 (linux_cancel_breakpoints): New.
11968 (unsuspend_one_lwp): New.
11969 (unsuspend_all_lwps): New.
11970 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11971 (send_sigstop_callback): Change return type to int, add new
11972 `except' parameter and handle it.
11973 (suspend_and_send_sigstop_callback): New.
11974 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11975 pass them down. If SUSPEND, also increment the lwp's suspend
11977 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11978 (need_step_over_p): Don't consider suspended LWPs.
11979 (start_step_over): Adjust.
11980 (proceed_one_lwp): Change return type to int, add new `except'
11981 parameter and handle it.
11982 (unsuspend_and_proceed_one_lwp): New.
11983 (proceed_all_lwps): Use find_inferior instead of
11985 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11986 also decrement the suspend count of LWPs. Pass `except' down,
11987 instead of hacking its suspend count.
11988 (linux_pause_all): Add `freeze' parameter. Adjust.
11989 (linux_unpause_all): New.
11990 (linux_target_ops): Install linux_unpause_all.
11991 * server.c (handle_status): Adjust.
11992 * target.h (struct target_ops): New fields `unpause_all' and
11993 `cancel_breakpoints'. Add new parameter to `pause_all'.
11994 (pause_all): Add new `freeze' parameter.
11995 (unpause_all): New.
11996 (cancel_breakpoints): New.
11997 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11998 cancel breakpoints.
11999 (cmd_qtstart): Pause threads.
12000 (stop_tracing): Pause threads, and cancel breakpoints.
12001 * win32-low.c (win32_target_ops): Adjust.
12003 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12005 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12006 the inferior right away from here...
12007 (linux_wait_1): ... to here, and adjust to check the thread's
12008 last_resume_kind instead of the lwp's step or stop_expected flags.
12010 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12012 * README: Use consistent `GDB' and `GDBserver' spellings.
12014 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12016 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12017 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12018 (linux_detach_one_lwp): Assume the lwp is stopped.
12019 (any_thread_of): Delete.
12020 (linux_detach): Stop all lwps here. Don't blindly delete all
12022 (delete_lwp_callback): New.
12023 (linux_mourn): Delete all lwps of the process that is gone.
12024 (linux_wait_1): Don't delete the last lwp of the process here.
12025 * mem-break.h (mark_breakpoints_out): Declare.
12026 * mem-break.c (mark_breakpoints_out): New.
12027 (free_all_breakpoints): Use it.
12028 * server.c (handle_target_event): If the process is gone, mark
12030 * thread-db.c (struct thread_db) <create_bp>: New field.
12031 (thread_db_enable_reporting): Fix prototype. Store a thread event
12032 breakpoint reference in the thread_db struct.
12033 (thread_db_load_search): Clear the thread_db object.
12034 (try_thread_db_load_1): Ditto.
12035 (switch_to_process): New.
12036 (disable_thread_event_reporting): Use it.
12037 (remove_thread_event_breakpoints): New.
12038 (thread_db_detach, thread_db_mourn): Use it.
12040 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12042 * linux-low.c (linux_enable_event_reporting): New.
12043 (linux_wait_for_event_1, handle_extended_wait): Use it.
12045 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12047 * linux-low.c (linux_kill_one_lwp, linux_kill)
12048 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12049 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12050 SIGSTOP even if the LWP is stopped.
12051 (send_sigstop_callback): New.
12052 (stop_all_lwps): Use send_sigstop_callback instead.
12053 (linux_resume_one_thread): Adjust.
12054 (proceed_one_lwp): Still proceed an LWP that the client has
12055 requested to stop, if we haven't reported it as stopped yet. Make
12056 sure that LWPs the client want stopped, have a pending SIGSTOP.
12058 2010-04-26 Doug Evans <dje@google.com>
12060 * server.c (handle_general_set): Make static.
12062 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12063 Print received char after testing for error/eof instead of before.
12064 (input_interrupt): Tweak comment.
12066 2010-04-23 Doug Evans <dje@google.com>
12068 * server.c (start_inferior): Print inferior argv if --debug.
12070 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12072 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12073 * nto-x86-low.c: Include server.h
12075 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12077 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12078 be consistent with other sources of this directory.
12079 (init_registers_amd64): Correct name of source file of this function
12082 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12084 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12085 64-bit executables.
12087 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12089 * win32-i386-low.c: Add 64-bit support.
12090 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12091 (init_registers_amd64): Declare.
12092 (mappings): Add 64-bit version of array.
12093 (init_windows_x86): New function.
12094 (the_low_target): Change init_arch field to init_windows_x86.
12096 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12098 * win32-low.c: Adapt to support also 64-bit architecture.
12099 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12100 (get_image_name): Use SIZE_T type for local variable `done'.
12101 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12102 (toolhelp_get_dll_name): Idem.
12103 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12104 Use uintptr_t typecast to avoid warning.
12105 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12106 (handle_exception): Use phex_nz to avoid warning.
12107 (win32_wait): Remove unused local variable `process'.
12109 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12111 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12114 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12116 * configure.ac: Use `ws2_32' library for srv_mingw.
12117 * configure: Regenerate.
12118 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12119 * remote-utils.c: Likewise.
12121 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12123 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12124 if __x86_64__ is defined.
12126 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12128 * configure: Regenerate.
12130 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12132 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12133 * target.h (target_ops): New get_tib_address field.
12134 * win32-low.h (win32_thread_info): Add thread_local_base field.
12135 * win32-low.c (child_add_thread): Add tlb argument.
12136 Set thread_local_base field to TLB.
12137 (get_child_debug_event): Adapt to child_add_thread change.
12138 (win32_get_tib_address): New function.
12139 (win32_target_ops): Set get_tib_address field to
12140 win32_get_tib_address.
12141 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12143 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12145 * linux-low.c (linux_mourn): Also remove the process.
12146 * server.c (handle_target_event): Don't remove the process here.
12147 * nto-low.c (nto_mourn): New.
12148 (nto_target_ops): Install it.
12149 * spu-low.c (spu_mourn): New.
12150 (spu_target_ops): Install it.
12151 * win32-low.c (win32_mourn): New.
12152 (win32_target_ops): Install it.
12154 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12156 * server.h (buffer_xml_printf): Remove redundant `;'.
12158 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12160 * regcache.c (set_register_cache): Invalidate regcaches before
12161 changing the register cache layout.
12162 (regcache_invalidate_one): Allow a NULL regcache.
12163 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12164 regcaches before changing the register cache layout or the target
12167 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12169 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12170 variable warning on Linux/x86-64.
12172 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12174 GDBserver disconnected tracing support.
12176 * linux-low.c (linux_remove_process): Delete.
12177 (add_lwp): Don't set last_resume_kind here.
12178 (linux_kill): Use `mourn'.
12179 (linux_detach): Use `thread_db_detach', and `mourn'.
12180 (linux_mourn): New.
12181 (linux_attach_lwp_1): Adjust comment.
12182 (linux_attach): last_resume_kind moved the thread_info; adjust.
12183 (status_pending_p_callback): Adjust.
12184 (linux_wait_for_event_1): Adjust.
12185 (count_events_callback, select_singlestep_lwp_callback)
12186 (select_event_lwp_callback, cancel_breakpoints_callback)
12187 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12188 (proceed_one_lwp): Adjust.
12189 (linux_async): Add debug output.
12190 (linux_thread_stopped): New.
12191 (linux_pause_all): New.
12192 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12194 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12195 (thread_db_free): Delete declaration.
12196 (thread_db_detach, thread_db_mourn): Declare.
12197 * thread-db.c (thread_db_init): Use thread_db_mourn.
12198 (thread_db_free): Delete, split in two.
12199 (disable_thread_event_reporting): New.
12200 (thread_db_detach): New.
12201 (thread_db_mourn): New.
12203 * server.h (struct thread_info) <last_resume_kind>: New field.
12204 <attached>: Add comment.
12205 <gdb_detached>: New field.
12206 (handler_func): Change return type to int.
12207 (handle_serial_event, handle_target_event): Ditto.
12208 (gdb_connected): Declare.
12210 (disconnected_tracing): Declare.
12211 (stop_tracing): Declare.
12213 * server.c (handle_query) <qSupported>: Report support for
12214 disconnected tracing.
12215 (queue_stop_reply_callback): Account for running threads.
12216 (gdb_wants_thread_stopped): New.
12217 (gdb_wants_all_threads_stopped): New.
12218 (gdb_reattached_process): New.
12219 (handle_status): Clear the `gdb_detached' flag of all processes.
12220 In all-stop, stop all threads.
12221 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12222 (process_serial_event): If the remote connection breaks, or if an
12223 exit was forced with "monitor exit", force an event loop exit.
12224 Handle disconnected tracing on detach.
12225 (handle_serial_event): Adjust.
12226 (handle_target_event): If GDB isn't connected, forward events back
12227 to the inferior, unless the last process exited, in which case,
12228 exit gdbserver. Adjust interface.
12230 * remote-utils.c (remote_open): Don't block in accept. Instead
12231 register an event loop source on the listen socket file
12232 descriptor. Refactor bits into ...
12233 (listen_desc): ... this new global.
12234 (gdb_connected): ... this new function.
12235 (enable_async_notification): ... this new function.
12236 (handle_accept_event): ... this new function.
12237 (remote_close): Clear remote_desc.
12239 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12241 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12243 (mourn_inferior): Define.
12244 (target_process_qsupported): Avoid the dangling else problem.
12245 (thread_stopped): Define.
12246 (pause_all): Define.
12247 (target_waitstatus_to_string): Declare.
12248 * target.c (target_waitstatus_to_string): New.
12250 * tracepoint.c (tracing): Make extern.
12251 (disconnected_tracing): New.
12252 (stop_tracing): Make extern. Handle tracing stops due to GDB
12254 (cmd_qtdisconnected): New.
12255 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12256 (handle_tracepoint_general_set): Handle QTDisconnected.
12258 * event-loop.c (event_handler_func): Change return type to int.
12259 (process_event): Bail out if the event handler wants the event
12261 (handle_file_event): Ditto.
12262 (start_event_loop): Bail out if the event handler wants the event
12265 * nto-low.c (nto_target_ops): Adjust.
12266 * spu-low.c (spu_wait): Don't remove the process here.
12267 (spu_target_ops): Adjust.
12268 * win32-low.c (win32_wait): Don't remove the process here.
12269 (win32_target_ops): Adjust.
12271 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12273 * regcache.c (realloc_register_cache): Invalidate inferior's
12274 regcache before recreating it.
12276 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12278 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12280 2010-04-09 Stan Shebs <stan@codesourcery.com>
12281 Pedro Alves <pedro@codesourcery.com>
12283 * server.h (LONGEST): New.
12284 (struct thread_info) <while_stepping>: New field.
12285 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12287 (initialize_tracepoint, handle_tracepoint_general_set)
12288 (handle_tracepoint_query, tracepoint_finished_step)
12289 (tracepoint_was_hit, release_while_stepping_state_list):
12290 (current_traceframe): Declare.
12291 * server.c (handle_general_set): Handle tracepoint packets.
12292 (read_memory): New.
12293 (write_memory): New.
12294 (handle_search_memory_1): Use read_memory.
12295 (handle_query): Report support for conditional tracepoints, trace
12296 state variables, and tracepoint sources. Handle tracepoint
12298 (main): Initialize the tracepoints module.
12299 (process_serial_event): Handle traceframe reads/writes.
12301 * linux-low.c (handle_tracepoints): New.
12302 (linux_wait_1): Call it.
12303 (linux_resume_one_lwp): Handle while-stepping.
12304 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12305 (linux_target_ops): Install them.
12306 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12308 * linux-x86-low.c (x86_supports_tracepoints): New.
12309 (the_low_target). Install it.
12311 * mem-break.h (delete_breakpoint): Declare.
12312 * mem-break.c (delete_breakpoint): Make external.
12314 * target.h (struct target_ops): Add `supports_tracepoints',
12315 `read_pc', and `write_pc' fields.
12316 (target_supports_tracepoints): Define.
12317 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12320 * regcache.h (struct regcache) <registers_owned>: New field.
12321 (init_register_cache, regcache_cpy): Declare.
12322 (regcache_read_pc, regcache_write_pc): Declare.
12323 (register_cache_size): Declare.
12324 (supply_regblock): Declare.
12325 * regcache.c (init_register_cache): New.
12326 (new_register_cache): Use it.
12327 (regcache_cpy): New.
12328 (register_cache_size): New.
12329 (supply_regblock): New.
12330 (regcache_read_pc, regcache_write_pc): New.
12332 * tracepoint.c: New.
12334 * Makefile.in (OBS): Add tracepoint.o.
12335 (tracepoint.o): New rule.
12337 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12339 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12341 (i386-mmx.c): Likewise.
12342 (i386-mmx-linux.o): Likewise.
12343 (i386-mmx-linux.c): Likewise.
12345 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12346 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12347 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12348 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12350 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12351 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12352 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12354 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12356 * Makefile.in (clean): Updated.
12358 (i386-avx.c): Likewise.
12359 (i386-avx-linux.o): Likewise.
12360 (i386-avx-linux.c): Likewise.
12361 (amd64-avx.o): Likewise.
12362 (amd64-avx.c): Likewise.
12363 (amd64-avx-linux.o): Likewise.
12364 (amd64-avx-linux.c): Likewise.
12366 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12367 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12368 (srv_amd64_regobj): Add amd64-avx.o.
12369 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12370 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12371 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12372 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12373 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12374 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12375 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12377 * i387-fp.c: Include "i386-xstate.h".
12379 (i387_cache_to_xsave): Likewise.
12380 (i387_xsave_to_cache): Likewise.
12381 (x86_xcr0): Likewise.
12383 * i387-fp.h (i387_cache_to_xsave): Likewise.
12384 (i387_xsave_to_cache): Likewise.
12385 (x86_xcr0): Likewise.
12387 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12388 * linux-crisv32-low.c (target_regsets): Likewise.
12389 * linux-m68k-low.c (target_regsets): Likewise.
12390 * linux-mips-low.c (target_regsets): Likewise.
12391 * linux-ppc-low.c (target_regsets): Likewise.
12392 * linux-s390-low.c (target_regsets): Likewise.
12393 * linux-sh-low.c (target_regsets): Likewise.
12394 * linux-sparc-low.c (target_regsets): Likewise.
12395 * linux-xtensa-low.c (target_regsets): Likewise.
12397 * linux-low.c: Include <sys/uio.h>.
12398 (regsets_fetch_inferior_registers): Support nt_type.
12399 (regsets_store_inferior_registers): Likewise.
12400 (linux_process_qsupported): New.
12401 (linux_target_ops): Add linux_process_qsupported.
12403 * linux-low.h (regset_info): Add nt_type.
12404 (linux_target_ops): Add process_qsupported.
12406 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12408 (init_registers_i386_avx_linux): New.
12409 (init_registers_amd64_avx_linux): Likewise.
12410 (xmltarget_i386_linux_no_xml): Likewise.
12411 (xmltarget_amd64_linux_no_xml): Likewise.
12412 (PTRACE_GETREGSET): Likewise.
12413 (PTRACE_SETREGSET): Likewise.
12414 (x86_fill_xstateregset): Likewise.
12415 (x86_store_xstateregset): Likewise.
12416 (use_xml): Likewise.
12417 (x86_linux_update_xmltarget): Likewise.
12418 (x86_linux_process_qsupported): Likewise.
12419 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12420 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12421 init_registers_i386_linux here. Call
12422 x86_linux_update_xmltarget.
12423 (the_low_target): Add x86_linux_process_qsupported.
12425 * server.c (handle_query): Call target_process_qsupported.
12427 * target.h (target_ops): Add process_qsupported.
12428 (target_process_qsupported): New.
12430 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12432 * inferiors.c (add_thread): Set last_status kind to
12433 TARGET_WAITKIND_IGNORE.
12434 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12435 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12436 (linux_wait_1): Move `thread' local definition to block that uses
12437 it. Don't NULL initialize `event_child'.
12438 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12439 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12440 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12442 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12444 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12445 an extended waitstatus, or by a watchpoint.
12446 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12447 thread was stepping or has been stopped by a watchpoint.
12449 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12451 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12452 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12453 of another, then delete the previous, and validate all
12455 (validate_inserted_breakpoint): New.
12456 (delete_disabled_breakpoints): New.
12457 (validate_breakpoints): New.
12458 (check_mem_read): Validate breakpoints before trusting their
12459 shadow. Delete disabled breakpoints.
12460 (check_mem_write): Validate breakpoints before trusting they
12461 should be inserted. Delete disabled breakpoints.
12462 * mem-break.h (validate_breakpoints):
12463 * server.c (handle_query): Validate breakpoints when we see a
12466 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12468 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12469 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12470 if we could tell there's a GDB breakpoint at stop_pc.
12471 (need_step_over_p): Don't do a step over if we find a GDB
12472 breakpoint at the resume PC.
12474 * mem-break.c (struct raw_breakpoint): New.
12475 (enum bkpt_type): New type `gdb_breakpoint'.
12476 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12477 fields. New field `raw'.
12478 (find_raw_breakpoint_at): New.
12479 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12480 breakpoint instead.
12481 (set_breakpoint_at): Adjust.
12482 (delete_raw_breakpoint): New.
12483 (release_breakpoint): New.
12484 (delete_breakpoint): Rename to...
12485 (delete_breakpoint_1): ... this. Add proc parameter. Use
12486 release_breakpoint. Return ENOENT.
12487 (delete_breakpoint): Reimplement.
12488 (find_breakpoint_at): Delete.
12489 (find_gdb_breakpoint_at): New.
12490 (delete_breakpoint_at): Delete.
12491 (set_gdb_breakpoint_at): New.
12492 (delete_gdb_breakpoint_at): New.
12493 (gdb_breakpoint_here): New.
12494 (set_reinsert_breakpoint): Use release_breakpoint.
12495 (uninsert_breakpoint): Rename to ...
12496 (uninsert_raw_breakpoint): ... this.
12497 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12498 (reinsert_raw_breakpoint): Change parameter type to
12500 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12502 (check_breakpoints): Adjust. Use release_breakpoint.
12503 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12504 (breakpoint_inserted_here): Ditto.
12505 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12506 Don't trust the breakpoint's shadow if it is not inserted.
12507 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12508 (delete_all_breakpoints): Adjust.
12509 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12510 use delete_breakpoint_1.
12512 * mem-break.h (breakpoints_supported): Delete declaration.
12513 (set_gdb_breakpoint_at): Declare.
12514 (gdb_breakpoint_here): Declare.
12515 (delete_breakpoint_at): Delete.
12516 (delete_gdb_breakpoint_at): Declare.
12518 * server.h (struct raw_breakpoint): Forward declare.
12519 (struct process_info): New field `raw_breakpoints'.
12521 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12524 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12526 * linux-low.c (status_pending_p_callback): Fix comment.
12527 (linux_wait_for_event_1): Move most of the internal breakpoint
12528 handling from here...
12529 (linux_wait_1): ... to here.
12530 (count_events_callback): New.
12531 (select_singlestep_lwp_callback): New.
12532 (select_event_lwp_callback): New.
12533 (cancel_breakpoints_callback): New.
12534 (select_event_lwp): New.
12535 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12536 priority to all LWPs that have had events that should be reported
12537 to the client. Cancel breakpoints when about to reporting the
12538 event to the client, not while stopping lwps. No longer cancel
12539 finished single-steps here.
12540 (cancel_finished_single_step): Delete.
12541 (cancel_finished_single_steps): Delete.
12543 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12545 * mem-break.c (enum bkpt_type): New.
12546 (struct breakpoint): New field `type'.
12547 (set_breakpoint_at): Change return type to struct breakpoint
12548 pointer. Set type to `other_breakpoint' by default.
12549 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12550 in the breakpoint list.
12551 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12552 (reinsert_breakpoint): Rename to ...
12553 (reinsert_raw_breakpoint): ... this.
12554 (reinsert_breakpoints_at): Adjust.
12555 * mem-break.h (struct breakpoint): Declare.
12556 (set_breakpoint_at): Change return type to struct breakpoint
12559 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12561 * server.c (handle_query): Assign, not compare.
12563 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12565 Teach linux gdbserver to step-over-breakpoints.
12567 * linux-low.c (can_hardware_single_step): New.
12568 (supports_breakpoints): New.
12569 (handle_extended_wait): If stopping threads, read the stop pc of
12570 the new cloned LWP.
12572 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12573 low target doesn't support retrieving the PC.
12574 (add_lwp): Set last_resume_kind to resume_continue.
12575 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12576 (linux_attach): Don't clear stop_expected. Set the lwp's
12577 last_resume_kind to resume_stop.
12578 (linux_detach_one_lwp): Don't check for removed breakpoints.
12579 (check_removed_breakpoint): Delete.
12580 (status_pending_p): Rename to ...
12581 (status_pending_p_callback): ... this. Don't check for removed
12582 breakpoints. Don't consider threads that are stopped from GDB's
12584 (linux_wait_for_lwp): Always read the stop_pc here.
12585 (cancel_breakpoint): New.
12586 (step_over_bkpt): New global.
12587 (linux_wait_for_event_1): Implement stepping over breakpoints.
12588 (gdb_wants_lwp_stopped): New.
12589 (gdb_wants_all_stopped): New.
12590 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12591 single-step traps here. Store the thread's last reported target
12593 (send_sigstop): Don't clear stop_expected. Always set it,
12595 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12596 (cancel_finished_single_step): New.
12597 (cancel_finished_single_steps): New.
12598 (wait_for_sigstop): Don't cancel finished single-step traps here.
12599 (linux_resume_one_lwp): Don't check for removed breakpoints.
12600 Don't set `step' on non-hardware step archs.
12601 (linux_set_resume_request): Ignore resume_stop requests if already
12602 stopping or stopped. Set the lwp's last_resume_kind.
12603 (resume_status_pending_p): Don't check for removed breakpoints.
12604 (need_step_over_p): New.
12605 (start_step_over): New.
12606 (finish_step_over): New.
12607 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12608 requests. Clear the thread's last reported target waitstatus.
12609 Don't use the `suspended' flag. Don't consider pending breakpoints.
12610 (linux_resume): Start a step-over if necessary.
12611 (proceed_one_lwp): New.
12612 (proceed_all_lwps): New.
12613 (unstop_all_lwps): New.
12614 * linux-low.h (struct lwp_info): Rewrite comment for the
12615 `suspended' flag. Add the `stop_pc' field. Delete the
12616 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12617 Add `'last_resume_kind' and `need_step_over' fields.
12618 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12619 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12620 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12621 (set_raw_breakpoint_at): New.
12622 (set_breakpoint_at): Rewrite to use it.
12623 (reinsert_breakpoint_handler): Delete.
12624 (set_reinsert_breakpoint): New.
12625 (reinsert_breakpoint_by_bp): Delete.
12626 (delete_reinsert_breakpoints): New.
12627 (uninsert_breakpoint): Rewrite.
12628 (uninsert_breakpoints_at): New.
12629 (reinsert_breakpoint): Rewrite.
12630 (reinsert_breakpoints_at): New.
12631 (check_breakpoints): Rewrite.
12632 (breakpoint_here): New.
12633 (breakpoint_inserted_here): New.
12634 (check_mem_read): Adjust.
12635 * mem-break.h (breakpoints_supported, breakpoint_here)
12636 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12637 (reinsert_breakpoint_by_bp): Delete declaration.
12638 (delete_reinsert_breakpoints): Declare.
12639 (reinsert_breakpoint): Delete declaration.
12640 (reinsert_breakpoints_at): Declare.
12641 (uninsert_breakpoint): Delete declaration.
12642 (uninsert_breakpoints_at): Declare.
12643 (check_breakpoints): Adjust prototype.
12644 * server.h: Adjust include order.
12645 (struct thread_info): Declare here. Add a `last_status' field.
12647 2010-03-23 Michael Snyder <msnyder@vmware.com>
12649 * server.c (crc32): New function.
12650 (handle_query): Add handling for 'qCRC:' request.
12652 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12654 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12655 lwp had been stopped by a watchpoint.
12657 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12659 * server.h (internal_error): Declare.
12660 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12661 * utils.c (internal_error): New function.
12663 2010-03-15 Andreas Schwab <schwab@redhat.com>
12665 * configure.srv: Fix typo setting srv_regobj.
12667 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12669 * linux-low.c (fetch_register): Avoid passing a non string literal
12671 (usr_store_inferior_registers): Ditto.
12673 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12675 * linux-low.c (linux_write_memory): Bail out early if peeking
12678 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12680 * linux-low.h (struct lwp_info): New fields
12681 `stopped_by_watchpoint' and `stopped_data_address'.
12682 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12683 here, and cache them in the lwp object.
12684 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12686 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12688 (linux_stopped_by_watchpoint): Rewrite.
12689 (linux_stopped_data_address): Rewrite.
12691 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12693 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12694 switching the current inferior, not before.
12696 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12698 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12699 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12700 i386-linux.c and amd64-linux.c.
12701 (reg-i386.o): Removed.
12702 (reg-i386.c): Likewise.
12703 (reg-i386-linux.o): Likewise.
12704 (reg-i386-linux.c): Likewise.
12705 (reg-x86-64.o): Likewise.
12706 (reg-x86-64.c): Likewise.
12707 (reg-x86-64-linux.o): Likewise.
12708 (reg-x86-64-linux.c): Likewise.
12710 (i386.c): Likewise.
12711 (i386-linux.o): Likewise.
12712 (i386-linux.c): Likewise.
12713 (amd64.o): Likewise.
12714 (amd64.c): Likewise.
12715 (amd64-linux.o): Likewise.
12716 (amd64-linux.c): Likewise.
12718 * configure.srv (srv_i386_regobj): New.
12719 (srv_i386_linux_regobj): Likewise.
12720 (srv_amd64_regobj): Likewise.
12721 (srv_amd64_linux_regobj): Likewise.
12722 (srv_i386_32bit_xmlfiles): Likewise.
12723 (srv_i386_64bit_xmlfiles): Likewise.
12724 (srv_i386_xmlfiles): Likewise.
12725 (srv_amd64_xmlfiles): Likewise.
12726 (srv_i386_linux_xmlfiles): Likewise.
12727 (srv_amd64_linux_xmlfiles): Likewise.
12728 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12729 srv_xmlfiles to $srv_i386_xmlfiles.
12730 (i[34567]86-*-mingw32ce*): Likewise.
12731 (i[34567]86-*-mingw*): Likewise.
12732 (i[34567]86-*-nto*): Likewise.
12733 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12734 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12735 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12736 (x86_64-*-linux*): Likewise.
12738 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12739 (init_registers_amd64_linux): New.
12740 (x86_arch_setup): Replace init_registers_x86_64_linux with
12741 init_registers_amd64_linux.
12743 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12745 * configure.ac: Check for libdl. If it is not available link against
12746 static libthread_db.
12747 * configure: Regenerate.
12749 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12753 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12754 handing a read watchpoint.
12755 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12757 2010-02-12 Doug Evans <dje@google.com>
12759 * linux-low.c (linux_supports_tracefork_flag): Document.
12760 (linux_look_up_symbols): Add comment.
12762 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12764 * regcache.c (supply_register): Clear regcache if buf is NULL.
12766 2010-02-02 Nicolas Roche <roche@sourceware.org>
12767 Joel Brobecker <brobecker@adacore.com>
12769 * inferiors.c (find_inferior): Add function documentation.
12770 (unloaded_dll): Handle the case where the unloaded dll has not
12771 been previously registered in the dll list.
12773 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12775 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12776 (thumb2_breakpoint): New.
12777 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12779 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12781 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12782 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12785 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12787 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12789 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12791 * linux-s390-low.c (s390_collect_ptrace_register)
12792 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12794 2010-01-21 Doug Evans <dje@google.com>
12796 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12797 (PTRACE_ARG4_TYPE): New macro.
12798 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12799 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12800 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12801 (usr_store_inferior_registers): Ditto.
12802 (linux_read_memory, linux_write_memory): Ditto.
12803 (linux_test_for_tracefork): Ditto.
12805 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12806 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12808 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12810 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12813 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12815 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12816 prototype to take a regcache. Adjust.
12818 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12820 * regcache.h (struct thread_info): Forward declare.
12821 (struct regcache): New.
12822 (new_register_cache): Adjust prototype.
12823 (get_thread_regcache): Declare.
12824 (free_register_cache): Adjust prototype.
12825 (registers_to_string, registers_from_string): Ditto.
12826 (supply_register, supply_register_by_name, collect_register)
12827 (collect_register_as_string, collect_register_by_name): Ditto.
12828 * regcache.c (struct inferior_regcache_data): Delete.
12829 (get_regcache): Rename to ...
12830 (get_thread_regcache): ... this. Adjust. Switch inferior before
12831 fetching registers.
12832 (regcache_invalidate_one): Adjust.
12833 (regcache_invalidate): Fix prototype.
12834 (new_register_cache): Return the new register cache.
12835 (free_register_cache): Change prototype.
12836 (realloc_register_cache): Adjust.
12837 (registers_to_string): Change prototype to take a regcache. Adjust.
12838 (registers_from_string): Ditto.
12839 (register_data): Ditto.
12840 (supply_register): Ditto.
12841 (supply_register_by_name): Ditto.
12842 (collect_register): Ditto.
12843 (collect_register_as_string): Ditto.
12844 (collect_register_by_name): Ditto.
12845 * server.c (process_serial_event): Adjust.
12846 * linux-low.h (regset_fill_func, regset_store_func): Change
12848 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12850 * linux-low.c (get_stop_pc): Adjust.
12851 (check_removed_breakpoint): Adjust.
12852 (linux_wait_for_event): Adjust.
12853 (linux_resume_one_lwp): Adjust.
12854 (fetch_register): Add regcache parameter. Adjust.
12855 (usr_store_inferior_registers): Ditto.
12856 (regsets_fetch_inferior_registers): Ditto.
12857 (regsets_store_inferior_registers): Ditto.
12858 (linux_fetch_registers, linux_store_registers): Ditto.
12859 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12861 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12863 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12864 prototype to take a regcache.
12865 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12866 * remote-utils.c (convert_ascii_to_int, outreg)
12867 (prepare_resume_reply): Change prototype to take a regcache.
12869 * target.h (struct target_ops) <fetch_registers, store_registers>:
12870 Change prototype to take a regcache.
12871 (fetch_inferior_registers, store_inferior_registers): Change
12872 prototype to take a regcache. Adjust.
12873 * proc-service.c (ps_lgetregs): Adjust.
12874 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12875 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12876 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12877 take a regcache. Adjust.
12878 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12879 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12880 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12881 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12882 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12883 (cris_cannot_fetch_register):
12884 (cris_breakpoint_at): Change prototype to take a regcache.
12886 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12887 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12888 to take a regcache. Adjust.
12889 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12891 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12892 take a regcache. Adjust.
12893 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12894 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12895 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12896 * linux-mips-low.c (mips_get_pc):
12897 (mips_set_pc): Change prototype to take a regcache. Adjust.
12898 (mips_reinsert_addr): Adjust.
12899 (mips_collect_register): Change prototype to take a regcache.
12901 (mips_supply_register):
12902 (mips_collect_register_32bit, mips_supply_register_32bit)
12903 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12904 (mips_store_fpregset): Ditto.
12905 * linux-ppc-low.c (ppc_supply_ptrace_register)
12906 (ppc_supply_ptrace_register): Ditto.
12907 (parse_spufs_run): Adjust.
12908 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12909 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12910 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12911 take a regcache. Adjust.
12912 * linux-s390-low.c (s390_collect_ptrace_register)
12913 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12914 (s390_set_pc): Change prototype to take a regcache. Adjust.
12915 (s390_arch_setup): Adjust.
12916 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12917 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12918 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12919 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12920 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12922 (sparc_breakpoint_at): Adjust.
12923 * linux-xtensa-low.c (xtensa_fill_gregset):
12924 (xtensa_store_gregset):
12925 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12926 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12927 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12928 prototype to take a regcache. Adjust.
12929 * win32-arm-low.c (arm_fetch_inferior_register)
12930 (arm_store_inferior_register): Change prototype to take a
12932 * win32-i386-low.c (i386_fetch_inferior_register)
12933 (i386_store_inferior_register): Change prototype to take a
12935 * win32-low.c (child_fetch_inferior_registers)
12936 (child_store_inferior_registers): Change prototype to take a
12938 (win32_wait): Adjust.
12939 (win32_fetch_inferior_registers): Change prototype to take a
12941 (win32_store_inferior_registers): Adjust.
12942 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12943 store_inferior_register>: Change prototype to take a regcache.
12945 2010-01-20 Doug Evans <dje@google.com>
12947 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12949 (linux_wait_for_event1, linux_init_signals): Ditto.
12950 (W_STOPCODE): Provide definition if missing.
12952 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12954 * linux-low.c (linux_core_of_thread): New.
12955 (compare_ints, show_process, list_threads): New.
12956 (linux_qxfer_osdata): Report threads and cores.
12957 (linux_target_op): Register linux_core_of_thread.
12958 * remote-utils.c (prepare_resume_reply): Report the core.
12959 (buffer_xml_printf): Support %d specifier.
12960 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12962 (handle_query): Handle qXfer:threads. Announce availability
12964 * target.h (struct target_ops): New field core_of_thread.
12966 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12968 * Makefile.in (clean): Remove new generated files.
12969 (reg-s390.o, reg-s390.c): Remove rules.
12970 (reg-s390x.o, reg-s390x.c): Likewise.
12971 (s390-linux32.o, s390-linux32.c): Add rules.
12972 (s390-linux64.o, s390-linux64.c): Likewise.
12973 (s390x-linux64.o, s390x-linux64.c): Likewise.
12974 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12975 * linux-s390-low.c: Include <elf.h>.
12976 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12977 (init_registers_s390): Remove prototype.
12978 (init_registers_s390x): Likewise.
12979 (init_registers_s390_linux32): Add prototype.
12980 (init_registers_s390_linux64): Likewise.
12981 (init_registers_s390x_linux64): Likewise.
12982 (s390_num_regs_3264): New define.
12983 (s390_regmap_3264): New global variable.
12984 (s390_cannot_fetch_register): Remove obsolete check.
12985 (s390_cannot_store_register): Likewise.
12986 (s390_collect_ptrace_register): Handle upper/lower register halves.
12987 (s390_supply_ptrace_register): Likewise.
12988 (s390_fill_gregset): Update to register number changes.
12989 (s390_get_hwcap): New routine.
12990 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12991 Install appropriate regmap and register set.
12993 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12995 * server.c (gdbserver_version): Update copyright year to 2010.
12996 * gdbreplay.c (gdbreplay_version): Likewise.
12998 2009-12-28 Doug Evans <dje@google.com>
13000 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13001 elf/external.h. Include <elf.h> instead but only if necessary.
13003 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13005 * linux-low.c (linux_remove_process): Remove `detaching'
13006 parameter. Don't release/detach from thread_db here.
13007 (linux_kill): Release/detach from thread_db here, ...
13008 (linux_detach): ... and here, before actually detaching.
13009 (linux_wait_1): ... and here, when a process exits.
13010 * thread-db.c (any_thread_of): New.
13011 (thread_db_free): Switch the current inferior to a thread of the
13014 2009-12-21 Doug Evans <dje@google.com>
13016 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13018 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13019 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13020 warning ifndef __NR_tkill. Move setting of errno there too.
13021 Delete unnecessary resetting of errno after syscall.
13022 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13024 * configure.ac: Check for dladdr.
13025 * config.in: Regenerate.
13026 * configure: Regenerate.
13027 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13028 (try_thread_db_load): Update.
13030 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13032 2009-12-18 Doug Evans <dje@google.com>
13034 * event-loop.c: Include unistd.h if it exists.
13036 * linux-low.c (my_waitpid): Move definition away from being in
13037 between linux_tracefork_child/linux_test_for_tracefork.
13039 * gdb_proc_service.h (psaddr_t): Fix type.
13040 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13041 signature to match glibc.
13043 2009-12-16 Doug Evans <dje@google.com>
13045 * linux-low.c (linux_read_memory): Fix argument to read.
13047 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13049 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13050 events, don't leave current_inferior pointing at null.
13052 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13054 * win32-low.c (LOG): Delete.
13055 (OUTMSG): Output to stderr.
13056 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13057 on compile time LOG macro.
13058 (win32_wait): Fix debug output.
13060 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13062 * win32-low.c (win32_add_one_solib): If the dll name is
13063 "ntdll.dll", prepend the system directory to the dll path.
13065 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13067 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13069 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13070 Vladimir Prus <vladimir@codesourcery.com>
13072 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13073 * configure.ac: Check for __mcoldfire__ and set
13074 gdb_cv_m68k_is_coldfire.
13075 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13076 reg-cf.o and reg-m68k.o.
13077 * configure: Regenerated.
13079 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13081 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13082 Pass it to thread_db_free.
13083 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13084 proper `detaching' argument to linux_remove_process.
13085 * linux-low.h (thread_db_free): Add `detaching' parameter.
13086 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13088 (thread_db_free): Add `detaching' parameter. Only
13089 call td_ta_clear_event if detaching from process.
13091 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13093 * thread-db.c (thread_db_free): Fix typo.
13095 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13098 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13100 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13102 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13103 with an i686 compiler.
13104 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13106 * configure: Rebuilt.
13108 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13112 * server.c (handle_search_memory_1): Correct read_addr initialization
13113 in loop for searching subsequent chunks.
13115 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13117 * configure.ac: New --with-libthread-db option.
13118 * thread-db.c: Allow direct dependence on libthread_db.
13119 (thread_db_free): Adjust.
13120 * config.in: Regenerate.
13121 * configure: Likewise.
13123 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13126 * thread-db.c (attach_thread): New function.
13127 (maybe_attach_thread): Return success/failure.
13128 (find_new_threads_callback): Adjust.
13129 (thread_db_find_new_threads): Loop until no new threads.
13131 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13133 * proc-service.c (ps_lgetregs): Formatting.
13135 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13137 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13138 * configure.ac: Adjust.
13139 * linux-low.h (struct process_info_private): Move members to struct
13141 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13142 * linux-low.c (linux_remove_process): Adjust.
13143 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13144 * server.c (handle_query): Move code ...
13145 (handle_monitor_command): ... here. New function.
13146 * target.h (struct target_ops): New member.
13147 * thread-db.c (struct thread_db): New.
13148 (libthread_db_search_path): New variable.
13149 (thread_db_create_event, thread_db_enable_reporting)
13150 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13151 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13152 (try_thread_db_load_1, dladdr_to_soname): New functions.
13153 (try_thread_db_load, thread_db_load_search): New functions.
13154 (thread_db_init): Search for libthread_db.
13155 (thread_db_free): New function.
13156 (thread_db_handle_monitor_command): Likewise.
13157 * config.in: Regenerate.
13158 * configure: Regenerate.
13160 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13162 * spu-low.c (spu_kill): Wait for inferior to terminate.
13163 Call clear_inferiors.
13164 (spu_detach): Call clear_inferiors.
13166 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13168 * aclocal.m4: Regenerate.
13169 * config.in: Likewise.
13170 * configure: Likewise.
13172 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13174 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13175 (parse_spufs_run): New function.
13176 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13177 (ppc_breakpoint_at): Handle SPU breakpoints.
13179 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13181 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13182 (SPUFS_MAGIC): Define.
13183 (spu_enumerate_spu_ids): New function.
13184 (linux_qxfer_spu): New function.
13185 (linux_target_ops): Install linux_qxfer_spu.
13187 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13189 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13190 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13191 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13192 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13193 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13194 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13195 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13196 (init_registers_powerpc_cell32l): Add prototype.
13197 (init_registers_powerpc_cell64l): Likewise.
13198 (ppc_arch_setup): Detect Cell/B.E. architecture.
13200 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13202 * Makefile.in (datarootdir): New variable.
13204 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13206 * linux-low.c (linux_write_memory): Update debugging output.
13207 * Makefile.in (clean): Add new descriptions.
13208 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13209 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13210 * configure.srv: Add new files for arm*-*-linux*.
13211 * linux-arm-low.c: Add new declarations.
13212 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13213 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13214 (HWCAP_VFPv3D16): New.
13215 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13216 instead of __IWMMXT__.
13217 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13218 (arm_arch_setup): New.
13219 (target_regsets): Remove #ifdef. Add VFP regset.
13220 (the_low_target): Use arm_arch_setup.
13222 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13224 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13225 the main thread again.
13227 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13229 Adding Neutrino gdbserver.
13230 * configure: Regenerated.
13231 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13232 * configure.srv (i[34567]86-*-nto*): New target.
13233 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13234 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13235 (nto_comctrl) [__QNX__]: New function.
13236 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13238 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13240 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13243 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13244 Pedro Alves <pedro@codesourcery.com>
13246 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13247 don't support CONTEXT_EXTENDED_REGISTERS.
13248 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13249 (the_low_target): Install them.
13250 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13251 failing with ERROR_PIPE_NOT_CONNECTED.
13253 2009-06-30 Doug Evans <dje@google.com>
13254 Pierre Muller <muller@ics.u-strasbg.fr>
13256 Add h/w watchpoint support to x86-linux, win32-i386.
13257 * Makefile.in (SFILES): Add i386-low.c
13258 (i386_low_h): Define.
13259 (i386-low.o): Add dependencies.
13260 (linux-x86-low.o): Add i386-low.h dependency.
13261 (win32-i386-low.o): Ditto.
13262 * i386-low.c: New file.
13263 * i386-low.h: New file.
13264 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13265 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13266 * linux-low.c (linux_add_process): Initialize arch_private.
13267 (linux_remove_process): Free arch_private.
13268 (add_lwp): Initialize arch_private.
13269 (delete_lwp): Free arch_private.
13270 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13272 * linux-low.h (process_info_private): New member arch_private.
13273 (lwp_info): New member arch_private.
13274 (linux_target_ops): New members new_process, new_thread,
13276 (ptid_of): New macro.
13277 * linux-x86-low.c: Include stddef.h, i386-low.h.
13278 (arch_process_info): New struct.
13279 (arch_lwp_info): New struct.
13280 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13281 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13282 (i386_dr_low_get_status): New function.
13283 (x86_insert_point, x86_remove_point): New functions.
13284 (x86_stopped_by_watchpoint): New function.
13285 (x86_stopped_data_address): New function.
13286 (x86_linux_new_process, x86_linux_new_thread): New functions.
13287 (x86_linux_prepare_to_resume): New function.
13288 (the_low_target): Add entries for insert_point, remove_point,
13289 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13291 * server.c (debug_hw_points): New global.
13292 (monitor_show_help): Document set debug-hw-points.
13293 (handle_query): Process "set debug-hw-points".
13294 * server.h (debug_hw_points): Declare.
13295 (paddress): Declare.
13296 * utils.c (NUMCELLS, CELLSIZE): New macros.
13297 (get_sell, xsnprintf, paddress): New functions.
13298 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13299 remove_point, stopped_by_watchpoint, stopped_data_address.
13300 * win32-i386-low.c: Include i386-low.h.
13301 (debug_reg_state): Replaces dr.
13302 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13303 (i386_dr_low_get_status): New function.
13304 (i386_insert_point, i386_remove_point): New functions.
13305 (i386_stopped_by_watchpoint): New function.
13306 (i386_stopped_data_address): New function.
13307 (i386_initial_stuff): Update.
13308 (get_thread_context,set_thread_context,i386_thread_added): Update.
13309 (the_low_target): Add entries for insert_point,
13310 remove_point, stopped_by_watchpoint, stopped_data_address.
13311 * win32-low.c (win32_insert_watchpoint): New function.
13312 (win32_remove_watchpoint): New function.
13313 (win32_stopped_by_watchpoint): New function.
13314 (win32_stopped_data_address): New function.
13315 (win32_target_ops): Add entries for insert_watchpoint,
13316 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13317 * win32-low.h (win32_target_ops): New members insert_point,
13318 remove_point, stopped_by_watchpoint, stopped_data_address.
13320 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13322 * server.c (process_serial_event): Re-return unsupported, not
13323 error, if the type isn't recognized. Re-allow supporting only
13324 insert or remove packets. Also call require_running for
13325 breakpoints. Add missing break statement to default case. Tidy.
13326 * target.h (struct target_ops): Rename insert_watchpoint to
13327 insert_point, and remove_watchpoint to remove_point.
13329 * linux-low.h (struct linux_target_ops): Likewise.
13330 * linux-low.c (linux_insert_watchpoint): Rename to ...
13331 (linux_insert_point): ... this. Adjust.
13332 (linux_remove_watchpoint): Rename to ...
13333 (linux_remove_point): ... this. Adjust.
13334 (linux_target_ops): Adjust.
13335 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13336 (cris_insert_point): ... this.
13337 (cris_remove_watchpoint): Rename to ...
13338 (cris_remove_point): ... this.
13339 (the_low_target): Adjust.
13341 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13343 * server.c (handle_v_kill): Pass signal_pid to
13344 kill_inferior if multi_process is zero.
13346 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13348 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13349 * target.h (target_ops): Comment for *_watchpoint to make it clear
13350 the functions can get types '0' and '1'.
13352 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13354 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13355 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13356 * regcache.c (get_regcache): Likewise.
13357 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13358 * win32-low.c (child_fetch_inferior_registers): Remove check for
13361 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13362 Pedro Alves <pedro@codesourcery.com>
13364 * target.h (struct target_ops) <supports_multi_process>: New
13366 (target_supports_multi_process): New.
13367 * server.c (handle_query): Even if GDB reports support, only
13368 enable multi-process if the target also supports it. Report
13369 multi-process support only if the target backend supports it.
13370 * linux-low.c (linux_supports_multi_process): New function.
13371 (linux_target_ops): Install it as target_supports_multi_process
13374 2009-05-24 Doug Evans <dje@google.com>
13376 Global renaming of find_thread_pid to find_thread_ptid.
13377 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13378 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13379 All callers updated.
13381 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13382 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13385 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13386 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13387 (linux_resume_one_lwp): Ditto.
13389 2009-05-23 Doug Evans <dje@google.com>
13391 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13392 from struct inferior_list_entry * to struct lwp_info *.
13393 All callers updated.
13395 2009-05-13 Doug Evans <dje@google.com>
13397 * linux-x86-low.c: Don't include assert.h.
13398 (x86_siginfo_fixup): Use fatal, not assert.
13399 (x86_arch_setup): Fix comment.
13401 2009-05-12 Doug Evans <dje@google.com>
13403 Biarch support for i386/amd64 gdbserver.
13404 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13405 Add linux-x86-low.c.
13406 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13407 (linux-x86-low.o): Add.
13408 * linux-x86-64-low.c: Delete.
13409 * linux-i386-low.c: Delete.
13410 * linux-x86-low.c: New file.
13411 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13413 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13415 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13416 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13417 (linux_child_pid_to_exec_file): New function.
13418 (elf_64_header_p, elf_64_file_p): New functions.
13419 (siginfo_fixup): New function.
13420 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13421 give target a chance to convert layout.
13422 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13423 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13425 2009-05-07 Doug Evans <dje@google.com>
13427 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13428 (regsets_store_inferior_registers): Ditto.
13430 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13434 * linux-low.c (must_set_ptrace_flags): Delete.
13435 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13437 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13438 `lwp->must_set_ptrace_flags' instead.
13439 (linux_wait_for_event_1): Set ptrace options here.
13440 (linux_wait_1): ... not here.
13442 2009-04-30 Doug Evans <dje@google.com>
13444 * inferiors.c (started_inferior_callback): New function.
13445 (attached_inferior_callback): New function.
13446 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13447 * server.c (print_started_pid, print_attached_pid): New functions.
13448 (detach_or_kill_for_exit): New function.
13449 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13450 * server.h (have_started_inferiors_p): Declare.
13451 (have_attached_inferiors_p): Declare.
13453 * inferiors.c (remove_process): Fix memory leak, free process.
13454 * linux-low.c (linux_remove_process): New function.
13455 (linux_kill): Call it instead of remove_process.
13456 (linux_detach, linux_wait_1): Ditto.
13458 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13460 * configure.srv: Add x86 Windows CE target.
13462 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13464 * inferiors.c (get_thread_process): Make global.
13465 * server.h (get_thread_process): Add prototype.
13466 * thread-db.c (find_one_thread): Use get_thread_process
13467 instead of current_process.
13468 (thread_db_get_tls_address): Do not crash if called when
13469 thread layer is not yet initialized.
13471 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13473 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13474 * spu-low.c (current_tid): Rename to ...
13475 (current_ptid): ... this.
13476 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13477 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13478 ptid_get_lwp (current_ptid) instead of current_tid.
13479 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13480 instead of current_tid. Use find_process_pid to verify pid
13481 argument is valid. Pass proper argument to remove_process.
13482 (spu_thread_alive): Compare current_ptid instead of current_tid.
13483 (spu_resume): Likewise.
13485 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13487 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13490 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13492 Implement the multiprocess extensions, and add linux multiprocess
13495 * server.h (ULONGEST): Declare.
13496 (struct ptid, ptid_t): New.
13497 (minus_one_ptid, null_ptid): Declare.
13498 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13499 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13500 (struct inferior_list_entry): Change `id' type from unsigned from
13502 (struct sym_cache, struct breakpoint, struct
13503 process_info_private): Forward declare.
13504 (struct process_info): Declare.
13505 (current_process): Declare.
13506 (all_processes): Declare.
13507 (initialize_inferiors): Declare.
13508 (add_thread): Adjust to use ptid_t.
13509 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13510 (add_process, remove_process, find_thread_pid): Declare.
13511 (find_inferior_id): Adjust to use ptid_t.
13512 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13513 (multi_process): Declare.
13514 (push_event): Adjust to use ptid_t.
13515 (read_ptid, write_ptid): Declare.
13516 (prepare_resume_reply): Adjust to use ptid_t.
13517 (clear_symbol_cache): Declare.
13518 * inferiors.c (all_processes): New.
13519 (null_ptid, minus_one_ptid): New.
13520 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13521 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13522 (add_thread): Change unsigned long to ptid. Remove gdb_id
13524 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13525 (gdb_id_to_thread): Rename to ...
13526 (find_thread_pid): ... this. Change unsigned long to ptid.
13527 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13528 (loaded_dll, pull_pid_from_list): Adjust.
13529 (add_process, remove_process, find_process_pid)
13530 (get_thread_process, current_process, initialize_inferiors): New.
13531 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13532 (struct target_waitstatus) <related_pid>: Ditto.
13533 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13534 return type to int.
13535 (struct target_ops) <join>: Add `pid' argument.
13536 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13537 (struct target_ops) <wait>: Add `ptid' field. Change return type
13539 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13540 (mywait): Add `ptid' argument. Change return type to ptid_t.
13541 (target_pid_to_str): Declare.
13542 * target.c (set_desired_inferior): Adjust to use ptids.
13543 (mywait): Add new `ptid' argument. Adjust.
13544 (target_pid_to_str): New.
13545 * mem-break.h (free_all_breakpoints): Declare.
13546 * mem-break.c (breakpoints): Delelete.
13547 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13548 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13549 to use per-process breakpoint list.
13550 (free_all_breakpoints): New.
13551 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13552 (symbol_cache, all_symbols_looked_up): Delete.
13554 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13556 (prepare_resume_reply): Change ptid argument's type from unsigned
13557 long to ptid_t. Adjust. Implement W;process and X;process.
13558 (free_sym_cache, clear_symbol_cache): New.
13559 (look_up_one_symbol): Adjust to per-process symbol cache. *
13560 * server.c (cont_thread, general_thread, step_thread): Change type
13562 (attached): Delete.
13563 (multi_process): New.
13564 (last_ptid): Change type to ptid_t.
13565 (struct vstop_notif) <ptid>: Change type to ptid_t.
13566 (queue_stop_reply, push_event): Change `ptid' argument's type to
13568 (discard_queued_stop_replies): Add `pid' argument.
13569 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13570 changes. Don't reference the `attached' global.
13571 (attach_inferior): Adjust to mywait interface changes.
13572 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13573 features. Handle and report "multiprocess+". Handle
13575 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13577 (handle_v_kill): New.
13578 (handle_v_stopped): Adjust to use target_pid_to_str.
13579 (handle_v_requests): Allow multiple attaches and runs when
13580 multiprocess extensions are in effect. Handle "vKill".
13581 (myresume): Adjust to use ptids.
13582 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13583 (handle_status): Adjust to discard_queued_stop_replies interface
13585 (first_thread_of, kill_inferior_callback)
13586 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13587 (main): Call initialize_inferiors. Adjust to use ptids, killing
13588 and detaching from all inferiors. Handle multiprocess packet
13590 * linux-low.h: Include gdb_proc_service.h.
13591 (struct process_info_private): New.
13592 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13593 <lwpid_of>: Use ptid_get_lwp.
13594 (get_lwp_thread): Adjust.
13595 (struct lwp_info): Add `dead' member.
13596 (find_lwp_pid): Declare.
13597 * linux-low.c (thread_db_active): Delete.
13598 (new_inferior): Adjust comment.
13599 (inferior_pid): Delete.
13600 (linux_add_process): New.
13601 (handle_extended_wait): Adjust.
13602 (add_lwp): Change unsigned long to ptid.
13603 (linux_create_inferior): Add process to processes table. Adjust
13604 to use ptids. Don't set new_inferior here.
13605 (linux_attach_lwp): Rename to ...
13606 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13607 it. Adjust to use ptids.
13608 (linux_attach_lwp): New.
13609 (linux_attach): Add process to processes table. Don't set
13611 (struct counter): New.
13612 (second_thread_of_pid_p, last_thread_of_process_p): New.
13613 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13614 multiple processes.
13615 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13616 processes. Remove process from process table.
13617 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13618 to multiple processes.
13619 (any_thread_of): New.
13620 (linux_detach): Add `pid' argument, and handle it. Remove process
13621 from processes table.
13622 (linux_join): Add `pid' argument. Handle it.
13623 (linux_thread_alive): Change unsighed long argument to ptid_t.
13624 Consider dead lwps as not being alive.
13625 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13626 threads we're not interested in.
13627 (same_lwp, find_lwp_pid): New.
13628 (linux_wait_for_lwp): Change `pid' argument's type from int to
13630 (linux_wait_for_event): Rename to ...
13631 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13632 from int to ptid_t. Adjust.
13633 (linux_wait_for_event): New.
13634 (linux_wait_1): Add `ptid' argument. Change return type to
13635 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13636 that exit from the process table.
13637 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13639 (mark_lwp_dead): New.
13640 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13641 stopping all threads, mark its main lwp as dead.
13642 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13644 (fetch_register, usr_store_inferior_registers)
13645 (regsets_fetch_inferior_registers)
13646 (regsets_store_inferior_registers, linux_read_memory)
13647 (linux_write_memory): Inline `inferior_pid'.
13648 (linux_look_up_symbols): Adjust to use per-process
13649 `thread_db_active'.
13650 (linux_request_interrupt): Adjust to use ptids.
13651 (linux_read_auxv): Inline `inferior_pid'.
13652 (initialize_low): Don't reference thread_db_active.
13653 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13654 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13655 (ps_getpid): Return the pid of the current inferior.
13656 * thread-db.c (proc_handle, thread_agent): Delete.
13657 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13659 (find_one_thread): Change argument type to ptid_t. Adjust to
13661 (maybe_attach_thread): Adjust to per-process data and ptids.
13662 (thread_db_find_new_threads): Ditto.
13663 (thread_db_init): Ditto.
13664 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13665 processes table. Adjust to use ptids.
13666 (spu_kill, spu_detach): Adjust interface. Remove process from
13668 (spu_join, spu_thread_alive): Adjust interface.
13669 (spu_wait): Adjust interface. Remove process from processes
13670 table. Adjust to use ptids.
13671 * win32-low.c (current_inferior_tid): Delete.
13672 (current_inferior_ptid): New.
13673 (debug_event_ptid): New.
13674 (thread_rec): Take a ptid. Adjust.
13675 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13676 (child_delete_thread): Ditto.
13677 (do_initial_child_stuff): Add `attached' argument. Add process to
13679 (child_fetch_inferior_registers, child_store_inferior_registers):
13681 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13682 (win32_attach): Pass 1 to do_initial_child_stuff.
13683 (win32_kill): Adjust interface. Remove process from processes
13685 (win32_detach): Ditto.
13686 (win32_join): Adjust interface.
13687 (win32_thread_alive): Take a ptid.
13688 (win32_resume): Adjust to use ptids.
13689 (get_child_debug_event): Ditto.
13690 (win32_wait): Adjust interface. Remove exiting process from
13693 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13695 Non-stop mode support.
13697 * server.h (non_stop): Declare.
13698 (gdb_client_data, handler_func): Declare.
13699 (delete_file_handler, add_file_handler, start_event_loop):
13701 (handle_serial_event, handle_target_event, push_event)
13702 (putpkt_notif): Declare.
13703 * target.h (enum resume_kind): New.
13704 (struct thread_resume): Replace `step' field by `kind' field.
13705 (TARGET_WNOHANG): Define.
13706 (struct target_ops) <wait>: Add `options' argument.
13707 <supports_non_stop, async, start_non_stop>: New fields.
13708 (target_supports_non_stop, target_async): New.
13709 (start_non_stop): Declare.
13710 (mywait): Add `options' argument.
13711 * target.c (mywait): Add `options' argument. Print child exit
13712 notifications here.
13713 (start_non_stop): New.
13714 * server.c (non_stop, own_buf, mem_buf): New globals.
13715 (struct vstop_notif): New.
13716 (notif_queue): New global.
13717 (queue_stop_reply, push_event, discard_queued_stop_replies)
13718 (send_next_stop_reply): New.
13719 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13721 (attach_inferior): In non-stop mode, don't wait for the target
13723 (handle_general_set): Handle QNonStop.
13724 (handle_query): When handling qC, return the current general
13725 thread, instead of the first thread of the list.
13726 (handle_query): If the backend supports non-stop mode, include
13727 QNonStop+ in the qSupported query response.
13728 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13730 (handle_v_attach, handle_v_run): Handle non-stop mode.
13731 (handle_v_stopped): New.
13732 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13733 (myresume): Adjust to use resume_kind. Handle non-stop.
13734 (queue_stop_reply_callback): New.
13735 (handle_status): Handle non-stop mode.
13736 (main): Clear non_stop flag on reconnection. Use the event-loop.
13737 Refactor serial protocol handling from here ...
13738 (process_serial_event): ... to this new function. When GDB
13739 selects any thread, select one here. In non-stop mode, wait until
13740 GDB acks all pending events before exiting.
13741 (handle_serial_event, handle_target_event): New.
13742 * remote-utils.c (remote_open): Install remote_desc in the event
13744 (remote_close): Remove remote_desc from the event loop.
13745 (putpkt_binary): Rename to...
13746 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13747 (putpkt_binary): New as wrapper around putpkt_binary_1.
13748 (putpkt_notif): New.
13749 (prepare_resume_reply): In non-stop mode, don't change the
13751 * event-loop.c: New.
13752 * Makefile.in (OBJ): Add event-loop.o.
13753 (event-loop.o): New rule.
13755 * linux-low.h (pid_of): Moved here.
13757 (get_lwp_thread): Use lwpid_of.
13758 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13759 * linux-low.c (pid_of): Delete.
13760 (inferior_pid): Use lwpid_of.
13761 (linux_event_pipe): New.
13762 (target_is_async_p): New.
13764 (handle_extended_wait): Use lwpid_of.
13765 (add_lwp): Don't set lwpid field.
13766 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13767 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13768 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13769 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13770 first. Adjust to linux_wait_for_event interface changes. Use
13772 (linux_detach): Don't delete the main lwp here.
13773 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13774 (status_pending_p): Don't consider explicitly suspended lwps.
13775 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13776 pointer. Add OPTIONS argument. Change return type to int. Use
13777 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13778 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13779 pointer. Add status pointer argument. Return a pid instead of a
13780 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13781 changes. In non-stop mode, don't switch to a random thread.
13782 (linux_wait): Rename to...
13783 (linux_wait_1): ... this. Add target_options argument, and handle
13784 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13785 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13786 clean exit and signal exit code. Don't stop all threads in
13787 non-stop mode. In all-stop mode, only stop all threads when
13788 reporting a stop to GDB. Handle explicit thread stop requests.
13789 (async_file_flush, async_file_mark): New.
13791 (send_sigstop): Use lwpid_of.
13792 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13793 interface changes. In non-stop mode, don't switch to a random
13795 (linux_resume_one_lwp): Use lwpid_of.
13796 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13797 (linux_resume_one_thread): ... this. Handle resume_stop. In
13798 non-stop mode, don't look for pending flag in all threads.
13799 (resume_status_pending_p): Don't consider explicitly suspended
13801 (my_waitpid): Reimplement. Emulate __WALL.
13802 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13804 (sigchld_handler, linux_supports_non_stop, linux_async)
13805 (linux_start_non_stop): New.
13806 (linux_target_ops): Register linux_supports_non_stop, linux_async
13807 and linux_start_non_stop.
13808 (initialize_low): Install SIGCHLD handler.
13809 * thread-db.c (thread_db_create_event, find_one_thread)
13810 (thread_db_get_tls_address): Use lwpid_of.
13811 * win32-low.c (win32_detach): Adjust to use resume_kind.
13812 (win32_wait): Add `options' argument.
13813 * spu-low.c (spu_resume): Adjust to use resume_kind.
13814 (spu_wait): Add `options' argument.
13816 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13818 Decouple target code from remote protocol.
13820 * target.h (enum target_waitkind): New.
13821 (struct target_waitstatus): New.
13822 (struct target_ops) <wait>: Return an unsigned long. Take a
13823 target_waitstatus pointer instead of a char pointer.
13824 (mywait): Likewise.
13825 * target.c (mywait): Change prototype to return an unsigned long.
13826 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13827 * server.h (thread_from_wait, old_thread_from_wait): Delete
13829 (prepare_resume_reply): Change prototype to take a
13831 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13832 (last_status, last_ptid): New.
13833 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13834 pid instead of a signal.
13835 (attach_inferior): Remove "status" and "signal" parameters.
13837 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13839 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13840 (handle_v_requests, myresume): Remove "status" and "signal"
13841 parameters. Adjust.
13842 (handle_status): New.
13843 (main): Delete local `status'. Adjust.
13844 * remote-utils.c: Include target.h.
13845 (prepare_resume_reply): Change prototype to take a
13846 target_waitstatus. Adjust.
13848 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13850 * spu-low.c (spu_wait): Adjust.
13851 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13853 (win32_wait): Adjust.
13855 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13857 * target.h (struct thread_resume): Delete leave_stopped member.
13858 (struct target_ops): Add a `n' argument to the `resume' callback.
13859 * server.c (start_inferior): Adjust.
13860 (handle_v_cont, myresume): Adjust.
13861 * linux-low.c (check_removed_breakpoint): Adjust to resume
13862 interface change, and to removed leave_stopped field.
13863 (resume_ptr): Delete.
13864 (struct thread_resume_array): New.
13865 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13866 resume interface change.
13867 (linux_continue_one_thread, linux_queue_one_thread)
13868 (resume_status_pending_p): Check if the resume field is NULL
13869 instead of checking the leave_stopped member.
13870 (linux_resume): Adjust to the target resume interface change.
13871 * spu-low.c (spu_resume): Adjust to the target resume interface
13873 * win32-low.c (win32_detach, win32_resume): Ditto.
13875 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13877 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13879 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13881 (linux_continue_one_thread): Only preserve the stepping flag if
13882 there's a pending breakpoint.
13884 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13886 * server.c (main): After the inferior having exited, call
13887 remote_close before exiting gdbserver.
13889 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13891 Fix size of FPSCR in Power 7 processors.
13892 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13893 (PPC_FEATURE_HAS_DFP): New #define.
13894 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13897 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13899 * server.c (handle_query) Whitespace and formatting.
13901 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13903 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13904 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13905 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13906 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13907 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13908 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13909 Makefile.in, configure.ac: Fix whitespace throughout.
13910 * configure: Regenerate.
13912 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13914 * inferiors.c (find_inferior): Make it safe for the callback
13915 function to delete the currently iterated inferior.
13917 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13919 * Makefile.in (linuw_low_h): Move higher.
13920 (thread-db.o): Depend on $(linux_low_h).
13922 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13924 Rename "process" to "lwp" throughout.
13926 * linux-low.c (all_processes): Rename to...
13927 (all_lwps): ... this.
13928 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13929 (add_process): Rename to ...
13930 (add_lwp): ... this. Adjust.
13931 (linux_create_inferior): Adjust.
13932 (linux_attach_lwp): Adjust.
13933 (linux_attach): Adjust.
13934 (linux_kill_one_process): Rename to ...
13935 (linux_kill_one_lwp): ... this. Adjust.
13936 (linux_kill): Adjust.
13937 (linux_detach_one_process): Rename to ...
13938 (linux_detach_one_lwp): ... this. Adjust.
13939 (linux_detach): Adjust.
13940 (check_removed_breakpoint): Adjust.
13941 (status_pending_p): Adjust.
13942 (linux_wait_for_process): Rename to ...
13943 (linux_wait_for_lwp): ... this. Adjust.
13944 (linux_wait_for_event): Adjust.
13945 (send_sigstop): Adjust.
13946 (wait_for_sigstop): Adjust.
13947 (stop_all_processes): Rename to ...
13948 (stop_all_lwps): ... this.
13949 (linux_resume_one_process): Rename to ...
13950 (linux_resume_one_lwp): ... this. Adjust.
13951 (linux_set_resume_request, linux_continue_one_thread)
13952 (linux_queue_one_thread, resume_status_pending_p)
13953 (usr_store_inferior_registers, regsets_store_inferior_registers)
13954 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13956 * linux-low.h (get_process): Rename to ...
13957 (get_lwp): ... this. Adjust.
13958 (get_thread_process): Rename to ...
13959 (get_thread_lwp): ... this. Adjust.
13960 (get_process_thread): Rename to ...
13961 (get_lwp_thread): ... this. Adjust.
13962 (struct process_info): Rename to ...
13963 (struct lwp_info): ... this.
13964 (all_processes): Rename to ...
13965 (all_lwps): ... this.
13966 * proc-service.c (ps_lgetregs): Adjust.
13967 * thread-db.c (thread_db_create_event, find_one_thread)
13968 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13970 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13972 * server.c (handle_query): Handle "qAttached".
13974 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13976 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13977 GPLv3, update license URL.
13979 2009-03-01 Doug Evans <dje@google.com>
13981 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13982 (server_h): Add gdb_signals.h.
13983 (signals.o): Update.
13984 * server.h (target_signal_from_host,target_signal_to_host_p)
13985 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13987 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13989 * remote-utils.c (getpkt): Also generate remote-debug
13990 information if noack_mode is set.
13992 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13994 * server.c (handle_query): Report qXfer:siginfo:read and
13995 qXfer:siginfo:write as supported and handle them.
13996 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13997 * linux-low.c (linux_xfer_siginfo): New.
13998 (linux_target_ops): Set it.
14000 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14002 * server.c (gdbserver_usage): Mention --remote-debug.
14003 (main): Accept '--remote-debug' switch.
14005 2009-01-18 Doug Evans <dje@google.com>
14007 * regcache.c (new_register_cache): No need to check result of xcalloc.
14008 * server.c (handle_search_memory): Back out calls to xmalloc,
14009 result is checked and error is returned to user upon failure.
14010 (handle_query): Ditto. Add more checks for result of malloc.
14011 (handle_v_cont): Check result of malloc, report error back to
14013 (handle_v_run): Ditto. Call freeargv.
14014 * server.h (freeargv): Declare.
14015 * utils.c (freeargv): New fn.
14017 2009-01-15 Doug Evans <dje@google.com>
14019 * gdbreplay.c (perror_with_name): Make arg const char *.
14020 * server.h (target_signal_to_name): Make return type const char *.
14021 * thread-db.c (thread_db_err_str): Make return type const char *.
14022 * utils.c (perror_with_name): Make arg const char *.
14024 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14026 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14027 when handling a EXIT_PROCESS_DEBUG_EVENT.
14029 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14031 * gdbreplay.c (gdbreplay_version): Update copyright year.
14032 * server.c (gdbserver_version): Likewise.
14034 2009-01-05 Doug Evans <dje@google.com>
14036 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14037 (handle_extended_wait): Improve comment.
14039 2008-12-13 Doug Evans <dje@google.com>
14041 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14042 * server.h (ATTR_MALLOC): New macro.
14043 (xmalloc,xcalloc,xstrdup): Declare.
14044 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14045 * inferiors.c: Ditto.
14046 * linux-low.c: Ditto.
14047 * mem-break.c: Ditto.
14048 * regcache.c: Ditto.
14049 * remote-utils.c: Ditto.
14052 * win32-low.c: Ditto.
14054 2008-12-12 Doug Evans <dje@google.com>
14056 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14057 in debugging printf.
14059 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14061 2008-12-09 Doug Evans <dje@google.com>
14063 * linux-low.h (struct process_info): Delete member tid, unused.
14064 * thread-db.c (find_one_thread): Update.
14065 (maybe_attach_thread): Update.
14067 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14069 * target.h (struct target_ops): Add qxfer_osdata member.
14070 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14072 (linux_qxfer_osdata): New functions.
14073 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14075 * server.c (handle_query): Handle "qXfer:osdata:read:".
14076 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14077 (buffer_xml_printf): New functions.
14078 * server.h (struct buffer): New.
14079 (buffer_grow_str, buffer_grow_str0): New macros.
14080 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14081 (buffer_xml_printf): Declare.
14083 2008-11-24 Doug Evans <dje@google.com>
14085 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14087 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14089 * server.c (handle_v_run): Always use the supplied argument list.
14091 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14093 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14094 (xtensa_regmap_table): Add entry for scompare1.
14096 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14098 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14099 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14100 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14101 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14102 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14103 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14104 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14105 XML target descriptions.
14106 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14107 when inferior is running on an ISA 2.05 or later processor. Add
14108 special case to return offset for full 64-bit slot of FPSCR when
14111 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14113 * Makefile.in (SFILES, clean): Added sparc64 files.
14114 (reg-sparc64.o, reg-sparc64.c): New.
14115 * configure.srv (sparc*-*-linux*): New configuration.
14116 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14117 syscall arguments for SPARC.
14118 (regsets_store_inferior_registers): Likewise.
14119 * linux-sparc-low.c: New file.
14121 2008-10-21 Doug Evans <dje@google.com>
14123 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14124 (READLINE_DIR,READLINE_DEP): Delete.
14125 (INTERNAL_CFLAGS): Update.
14126 (LINTFLAGS): Update.
14128 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14130 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14131 whole argv from the last run, not just argv[0].
14133 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14135 * regcache.c (new_register_cache): Return NULL if the register
14136 cache size isn't known yet.
14137 (free_register_cache): Avoid dereferencing a NULL regcache.
14139 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14141 * configure.srv: Merge MIPS and MIPS64.
14143 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14145 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14147 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14149 * Makefile.in: Add required vsx dependencies.
14151 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14152 Declare init_registers_powerpc_vsx32l.
14153 Declare init_registers_powerpc_vsx64l.
14154 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14155 (ppc_arch_setup): Check for VSX in hwcap.
14156 (ppc_fill_vsxregset): New function.
14157 (ppc_store_vsxregset): New function.
14158 Add new VSX entry in regset_info target_regsets.
14160 * configure.srv: Add new VSX dependencies.
14162 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14164 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14165 (remote_open): Set or clear transport_is_reliable.
14166 (putpkt_binary): Don't expect acks in noack mode.
14167 (getpkt): Don't send ack/nac in noack mode.
14168 * server.c (handle_general_set): Handle QStartNoAckMode.
14169 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14171 (main): Reset noack_mode on every connection.
14172 * server.h (noack_mode): Declare.
14174 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14176 * Makefile.in (GDBREPLAY_OBS): New variable.
14177 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14179 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14180 Daniel Jacobowitz <dan@codesourcery.com>
14182 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14183 (usr_store_inferior_registers): Likewise.
14184 (regsets_store_inferior_registers): Likewise.
14186 2008-07-31 Rolf Jansen <rj@surtec.com>
14187 Pedro Alves <pedro@codesourcery.com>
14189 * configure.ac: Check for memmem declaration.
14190 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14191 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14192 (disable_packet_qfThreadInfo): Unconditionally compile.
14193 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14194 * configure, config.in: Regenerate.
14196 2008-07-28 Doug Kwan <dougkwan@google.com>
14198 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14199 (linux_write_memory): Remove declaration of errno.
14201 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14203 * linux-low.c (handle_extended_wait): Do not use "status"
14204 variable uninitialized.
14206 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14208 * server.c (handle_v_attach): Inhibit reporting dll changes.
14210 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14212 * remote-utils.c (prepare_resume_reply): If requested, don't
14213 output "thread:TID" in the T stop reply.
14215 * server.c (disable_packet_vCont, disable_packet_Tthread)
14216 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14217 (handle_query): If requested, disable support for qC, qfThreadInfo
14219 (handle_v_requests): If requested, disable support for vCont.
14220 (gdbserver_show_disableable): New.
14221 (main): Handle --disable-packet and --disable-packet=LIST.
14223 * server.h (disable_packet_vCont, disable_packet_Tthread)
14224 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14226 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14228 * server.c (gdbserver_usage): Mention --version.
14230 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14232 * Makefile.in (gdbreplay.o): New rule.
14234 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14236 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14237 message, not gdbserver.
14239 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14240 Nathan Sidwell <nathan@codesourcery.com>
14241 Joseph Myers <joseph@codesourcery.com>
14243 * acinclude.m4: Include ../../config/acx.m4.
14244 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14245 * configure, config.in: Regenerate.
14246 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14247 * server.c (gdbserver_version): Print PKGVERSION.
14248 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14249 (main): Adjust gdbserver_usage calls.
14250 * gdbreplay.c (version, host_name): Add declarations.
14251 (gdbreplay_version, gdbreplay_usage): New.
14252 (main): Accept --version and --help options.
14254 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14256 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14257 (arm_breakpoint_at): Handle Thumb.
14258 (the_low_target): Add comment.
14260 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14262 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14264 2008-05-09 Doug Evans <dje@google.com>
14266 * server.h (decode_search_memory_packet): Declare.
14267 * remote-utils.c (decode_search_memory_packet): New fn.
14268 * server.c (handle_search_memory_1): New fn.
14269 (handle_search_memory): New fn.
14270 (handle_query): Process qSearch:memory packets.
14272 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14274 * regcache.c (registers_length): Remove.
14275 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14276 full register packet.
14277 * regcache.h (registers_length): Remove prototype.
14278 * server.h (PBUFSIZ): Define to 16384.
14280 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14282 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14283 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14284 powerpc-64l.o, and powerpc-altivec64l.o.
14285 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14286 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14287 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14288 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14289 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14292 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14293 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14294 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14295 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14296 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14297 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14298 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14299 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14300 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14301 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14304 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14305 (init_registers_powerpc_32l): ... this new prototype.
14306 (init_registers_powerpc_32): Remove, replace by ...
14307 (init_registers_powerpc_altivec32l): ... this new prototype.
14308 (init_registers_powerpc_e500): Remove, replace by ...
14309 (init_registers_powerpc_e500l): ... this new prototype.
14310 (init_registers_ppc64): Remove, replace by ...
14311 (init_registers_powerpc_64l): ... this new prototype.
14312 (init_registers_powerpc_64): Remove, replace by ...
14313 (init_registers_powerpc_altivec64l): ... this new prototype.
14314 (ppc_num_regs): Set to 73.
14315 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14316 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14317 (ppc_cannot_store_register): Handle orig_r3 and trap.
14318 (ppc_arch_setup): Update init_registers_... calls.
14319 (ppc_fill_gregset): Handle orig_r3 and trap.
14321 * inferiors.c (clear_inferiors): Reset current_inferior.
14323 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14325 * acinclude.m4: Add override.m4.
14326 * configure: Regenerate.
14328 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14330 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14331 initial call to init_register_ppc64.
14333 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14335 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14336 single powerpc*-*-linux* case.
14337 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14339 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14341 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14342 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14344 * linux-ppc-low.c: Include <elf.h>.
14345 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14346 (ppc_hwcap): New global variable.
14347 (ppc_regmap): Remove __SPE__ #ifdef sections.
14348 (ppc_regmap_e500): New global variable.
14349 (ppc_cannot_store_register): Update __SPE__ special case.
14350 (ppc_get_hwcap): New function.
14351 (ppc_arch_setup): Use it to determine whether inferior supports
14352 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14353 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14354 Do not access registers if target does not support AltiVec.
14355 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14356 Do not access registers if target does not support SPE.
14357 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14359 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14361 * linux-low.c (disabled_regsets, num_regsets): New.
14362 (use_regsets_p): Delete.
14363 (linux_wait_for_process): Clear disabled_regsets.
14364 (regsets_fetch_inferior_registers): Check and set it.
14365 (regsets_store_inferior_registers): Likewise.
14366 (linux_fetch_registers, linux_store_registers): Do not use
14368 (initialize_low): Allocate disabled_regsets.
14370 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14372 * Makefile.in (LIBOBJS): New.
14373 (OBS): Use LIBOBJS.
14374 (memmem.o): New rule.
14375 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14376 * configure: Regenerated.
14378 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14380 * server.c (handle_query): Never return "unsupported" for
14381 qXfer:features:read queries.
14383 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14385 * server.c (get_features_xml): Fix inverted condition.
14386 (handle_query): Always support qXfer:feature:read.
14388 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14390 * server.c (wrapper_argv): New.
14391 (start_inferior): Handle wrapper_argv. If set, expect an extra
14393 (gdbserver_usage): Document --wrapper.
14394 (main): Parse --wrapper.
14396 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14398 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14399 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14400 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14401 (ppc_set_pc): Likewise.
14402 (ppc_arch_setup): New function.
14403 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14404 of collect_register.
14405 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14407 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14409 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14410 instead of linux-ppc64-low.o.
14411 * linux-ppc64-low.c: Remove file.
14412 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14413 (linux-ppc64-low.o): Remove rule.
14415 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14416 (init_registers_powerpc_64): Likewise.
14417 (ppc_regmap): Conditionally define depending on __powerpc64__.
14418 (ppc_cannot_store_register): Do not special-case "fpscr" when
14419 compiled on __powerpc64__.
14420 (ppc_collect_ptrace_register): New function.
14421 (ppc_supply_ptrace_register): New function.
14422 (ppc_breakpoint): Change type to "unsigned int".
14423 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14424 (the_low_target): Conditionally provide initializers for the
14425 arch_setup member depending on __powerpc64__. Install
14426 collect_ptrace_register and supply_ptrace_register members.
14428 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14430 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14431 * server.c (gdbserver_xmltarget): Define.
14432 (get_features_xml): Use it to replace "target.xml" and arch_string.
14434 * configure.srv: Remove srv_xmltarget. Add XML files that were
14435 mentioned there to srv_xmlfiles instead. Remove conditional tests
14436 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14437 srv_xmlfiles and srv_regobj to include all possible choices.
14438 * configure.ac (srv_xmltarget): Remove.
14439 (srv_xmlfiles): Do not add "target.xml".
14440 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14441 checks for supplementary target information.
14442 * configure: Regenerate.
14443 * Makefile.in (XML_TARGET): Remove.
14444 (target.xml): Remove rule.
14445 (clean): Do not clean up target.xml.
14446 (.PRECIOUS): Do not mention target.xml.
14448 * target.h (struct target_ops): Remove arch_string member.
14449 * linux-low.c (linux_arch_string): Remove.
14450 (linux_target_ops): Remove arch_string initializer.
14451 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14452 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14453 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14454 * spu-low.c (spu_arch_string): Remove.
14455 (spu_target_ops): Remove arch_string initializer.
14456 * win32-low.c (win32_arch_string): Remove.
14457 (win32_target_ops): Remove arch_string initializer.
14458 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14459 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14460 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14462 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14464 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14465 by collect_ptrace_register and supply_ptrace_register hooks.
14466 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14467 instead of checking for the_low_target.left_pad_xfer.
14468 (usr_store_inferior_registers): Use collect_ptrace_register callback
14469 instead of checking for the_low_target.left_pad_xfer.
14471 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14472 (s390_supply_ptrace_register): Likewise.
14473 (s390_fill_gregset): Call s390_collect_ptrace_register.
14474 (the_low_target): Update.
14476 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14477 (ppc_supply_ptrace_register): Likewise.
14478 (the_low_target): Update.
14480 * linux-i386-low.c (the_low_target): Update.
14481 * linux-x86-64-low.c (the_low_target): Update.
14483 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14485 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14486 reg-s390.o and reg-s390x.o.
14488 * linux-low.c (new_inferior): New global variable.
14489 (linux_create_inferior, linux_attach): Set it.
14490 (linux_wait_for_process): Call the_low_target.arch_setup after the
14491 target has stopped for the first time.
14492 (initialize_low): Do not call the_low_target.arch_setup.
14494 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14495 (s390_set_pc): Likewise.
14496 (s390_arch_setup): New function.
14497 (the_low_target): Use s390_arch_setup as arch_setup routine.
14499 * regcache.c (realloc_register_cache): New function.
14500 (set_register_cache): Call it for each existing regcache.
14502 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14504 * server.h (init_registers): Remove prototype.
14506 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14507 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14508 instead of init_registers ().
14509 * linux-arm-low.c (init_registers_arm): Add prototype.
14510 (init_registers_arm_with_iwmmxt): Likewise.
14511 (the_low_target): Add initializer for arch_setup field.
14512 * linux-cris-low.c (init_registers_cris): Add prototype.
14513 (the_low_target): Add initializer for arch_setup field.
14514 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14515 (the_low_target): Add initializer for arch_setup field.
14516 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14517 (the_low_target): Add initializer for arch_setup field.
14518 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14519 (the_low_target): Add initializer for arch_setup field.
14520 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14521 (the_low_target): Add initializer for arch_setup field.
14522 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14523 (the_low_target): Add initializer for arch_setup field.
14524 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14525 (init_registers_mips64_linux): Likewise.
14526 (the_low_target): Add initializer for arch_setup field.
14527 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14528 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14529 (the_low_target): Add initializer for arch_setup field.
14530 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14531 (init_registers_powerpc_64): Likewise.
14532 (the_low_target): Add initializer for arch_setup field.
14533 * linux-s390-low.c (init_registers_s390): Add prototype.
14534 (init_registers_s390x): Likewise.
14535 (the_low_target): Add initializer for arch_setup field.
14536 * linux-sh-low.c (init_registers_sh): Add prototype.
14537 (the_low_target): Add initializer for arch_setup field.
14538 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14539 (the_low_target): Add initializer for arch_setup field.
14540 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14541 (the_low_target): Add initializer for arch_setup field.
14543 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14544 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14545 instead of init_registers ().
14546 * win32-arm-low.c (init_registers_arm): Add prototype.
14547 (the_low_target): Add initializer for arch_setup field.
14548 * win32-i386-low.c (init_registers_i386): Add prototype.
14549 (the_low_target): Add initializer for arch_setup field.
14551 * spu-low.c (init_registers_spu): Add prototype.
14552 (initialize_low): Call initialie_registers_spu () instead of
14553 initialize_registers ().
14555 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14557 * server.c (handle_v_requests): When handling the vRun and vAttach
14558 packets, if already debugging a process, don't kill it. Return an
14561 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14563 * server.c (handle_query): Correct length check.
14565 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14567 * win32-low.c (do_initial_child_stuff): Add process handle
14568 parameter. Set current_process_handle and current_process_id from the
14569 parameters. Clear globals.
14570 (win32_create_inferior): Don't set current_process_handle and
14571 current_process_id here. Instead pass them on the call to
14572 do_initial_child_stuff.
14573 (win32_attach): Likewise.
14574 (win32_clear_inferiors): New.
14575 (win32_kill): Don't close the current process handle or the
14576 current thread handle here. Instead call win32_clear_inferiors.
14577 (win32_detach): Don't open a new handle to the process. Call
14578 win32_clear_inferiors.
14579 (win32_join): Don't rely on current_process_handle; open a new
14580 handle using the process id.
14581 (win32_wait): Call win32_clear_inferiors when the inferior process
14584 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14586 * server.c (monitor_show_help): Add "exit".
14588 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14590 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14591 (clean): Add reg-xtensa.c.
14592 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14593 * configure.srv (xtensa*-*-linux*) New target.
14594 * linux-xtensa-low.c: New.
14595 * xtensa-xtregs.c: New.
14597 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14599 * hostio.c: Don't include errno.h.
14600 (errno_to_fileio_errno): Move to hostio-errno.
14601 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14602 error number outputting to the target->hostio_last_error callback.
14603 (hostio_packet_error): Use FILEIO_EINVAL directly.
14604 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14605 calls to hostio_error.
14606 * hostio-errno.c: New.
14607 * server.h (hostio_last_error_from_errno): Declare.
14608 * target.h (target_ops): Add hostio_last_error member.
14609 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14610 as hostio_last_error handler.
14611 * spu-low.c (spu_target_ops): Likewise.
14612 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14613 (wince_hostio_last_error): New functions.
14614 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14615 as hostio_last_error handler.
14616 (win32_target_ops) [!_WIN32_WCE]: Register
14617 hostio_last_error_from_errno as hostio_last_error handler.
14618 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14619 (hostio-errno.o): New rule.
14620 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14621 * configure.srv (srv_hostio_err_objs): New variable. Default to
14623 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14624 * configure: Regenerate.
14626 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14628 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14629 (linux_kill, linux_detach): Clean up the process list.
14630 * remote-utils.c (remote_open): Improve port number parsing.
14631 (putpkt_binary, input_interrupt): Only send interrupts if the target
14633 * server.c (extended_protocol): Make static.
14634 (attached): Define earlier.
14635 (exit_requested, response_needed, program_argv): New variables.
14636 (target_running): New.
14637 (start_inferior): Clear attached here.
14638 (attach_inferior): Set attached here.
14639 (require_running): Define.
14640 (handle_query): Use require_running and target_running. Implement
14642 (handle_v_attach, handle_v_run): New.
14643 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14644 (gdbserver_usage): Update.
14645 (main): Redo argument parsing. Handle --debug and --multi. Handle
14646 --attach along with other options or after the port. Save
14647 program_argv. Support no initial program. Resynchronize
14648 communication with GDB after an error. Handle "monitor exit".
14649 Use require_running and target_running. Always allow the extended
14650 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14651 restart in extended mode.
14652 * README: Refer to the GDB manual. Update --attach usage.
14654 2007-12-20 Andreas Schwab <schwab@suse.de>
14656 * linux-low.c (STACK_SIZE): Define.
14657 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14658 (linux_test_for_tracefork): Likewise.
14660 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14662 * linux-low.c (linux_wait_for_event): Update messages. Do not
14663 reinsert auto-delete breakpoints.
14664 * mem-break.c (struct breakpoint): Change return type of handler to
14666 (set_breakpoint_at): Update handler type.
14667 (reinsert_breakpoint_handler): Return 1 instead of calling
14669 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14671 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14672 * mem-break.h (set_breakpoint_at): Update handler type.
14673 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14674 * win32-low.c (auto_delete_breakpoint): New.
14675 (get_child_debug_event): Use it.
14677 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14679 * configure.ac: Check for pread and pwrite.
14680 * hostio.c (handle_pread): Fall back to lseek and read.
14681 (handle_pwrite): Fall back to lseek and write.
14682 * config.in, configure: Regenerated.
14684 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14686 * server.c (myresume): Add own_buf argument.
14687 (main): Update calls.
14689 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14691 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14692 * remote-utils.c (remote_open): Do not call disable_async_io.
14693 (block_async_io): Delete.
14694 (unblock_async_io): Make static.
14695 (initialize_async_io): New.
14696 * server.c (handle_v_cont): Handle async I/O here.
14697 (myresume): Likewise. Move other common resume tasks here...
14698 (main): ... from here. Call initialize_async_io. Disable async
14699 I/O before the main loop.
14700 * server.h (initialize_async_io): Declare.
14701 (block_async_io, unblock_async_io): Delete prototypes.
14702 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14704 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14706 * remote-utils.c (readchar): Allow binary data in received messages.
14708 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14710 * win32-low.c (attaching): New global.
14711 (win32_create_inferior): Clear the `attaching' global.
14712 (win32_attach): Set the `attaching' global.
14713 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14714 attaching. Only set a breakpoint at the entry point if not
14717 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14719 * server.c (main): Don't report dll events on the initial
14720 connection on attaches.
14722 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14724 * server.c (main): Relax numerical bases supported for the pid of
14725 the --attach command line argument.
14727 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14729 * win32-low.c (win32_attach): Call OpenProcess before
14730 DebugActiveProcess, not after. Add last error output to error
14733 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14735 * win32-low.c (win32_get_thread_context)
14736 (win32_set_thread_context): New functions.
14737 (thread_rec): Use win32_get_thread_context.
14738 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14739 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14742 2007-12-03 Leo Zayas
14743 Pedro Alves <pedro_alves@portugalmail.pt>
14745 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14747 (child_add_thread): Minor cleanup.
14748 (child_continue): Resume artificially suspended threads before
14749 calling ContinueDebugEvent.
14750 (suspend_one_thread): New.
14751 (fake_breakpoint_event): New.
14752 (get_child_debug_event): Change return type to int. Check here if
14753 gdb sent an interrupt request. If a soft interrupt was requested,
14754 fake a breakpoint event. Return 0 if there is no event to handle,
14756 (win32_wait): Don't check here if gdb sent an interrupt request.
14757 Ensure there is a valid event to handle.
14758 (win32_request_interrupt): Add soft interruption method as last
14761 2007-12-03 Leo Zayas
14762 Pedro Alves <pedro_alves@portugalmail.pt>
14764 * win32-low.h (win32_thread_info): Add descriptions to the
14765 structure members. Replace `suspend_count' counter by a
14767 * win32-low.c (thread_rec): Update condition of when to get the
14768 context from the inferior. Rely on ContextFlags being set if it
14769 has already been retrieved. Only suspend the inferior thread if
14770 we haven't already. Warn if that fails.
14771 (continue_one_thread): s/suspend_count/suspended/. Only call
14772 ResumeThread once. Warn if that fails.
14774 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14776 * win32-low.c (win32_wait): Don't read from the inferior when it
14777 has already exited.
14779 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14781 * Makefile.in (win32_low_h): New variable.
14782 (win32-low.o): Add dependency on $(win32_low_h).
14783 (win32-arm-low.o, win32-i386-low.o): New rules.
14785 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14787 * hostio.c: Correct copyright year.
14789 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14791 * Makefile.in (OBS): Add hostio.o.
14792 (hostio.o): New rule.
14793 * server.h (handle_vFile): Declare.
14794 * hostio.c: New file.
14795 * server.c (handle_v_requests): Take packet_len and new_packet_len
14796 for binary packets. Call handle_vFile.
14797 (main): Update call to handle_v_requests.
14799 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14801 * linux-low.c: Include <sched.h>.
14803 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14805 * linux-low.c (linux_tracefork_grandchild): New.
14806 (linux_tracefork_child): Use clone.
14807 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14809 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14811 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14813 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14815 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14817 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14819 * inferiors.c (change_inferior_id): Delete.
14820 (add_pid_to_list, pull_pid_from_list): New.
14821 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14822 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14823 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14824 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14825 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14826 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14827 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14828 (using_threads): Always set to 1.
14829 (handle_extended_wait): New.
14830 (add_process): Do not set TID.
14831 (linux_create_inferior): Set must_set_ptrace_flags.
14832 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14833 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14834 (linux_thread_alive): Rename TID argument to LWPID.
14835 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14836 (linux_wait_for_event): Do not use TID or check using_threads. Update
14837 call to dead_thread_notify. Call handle_extended_wait.
14838 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14839 (send_sigstop): Delete sigstop_sent.
14840 (wait_for_sigstop): Avoid TID.
14841 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14842 (linux_test_for_tracefork): New.
14843 (linux_lookup_signals): Use thread_db_active and
14844 linux_supports_tracefork_flag.
14845 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14846 * linux-low.h (get_process_thread): Avoid TID.
14847 (struct process_ifo): Move thread_known and tid to the end. Remove
14849 (linux_attach_lwp, thread_db_init): Update prototypes.
14850 * server.h (change_inferior_id): Delete prototype.
14851 (add_pid_to_list, pull_pid_from_list): New prototypes.
14852 * thread-db.c (thread_db_use_events): New.
14853 (find_first_thread): Rename to...
14854 (find_one_thread): ...this. Update callers and messages. Do not
14855 call fatal. Check thread_db_use_events. Do not call
14856 change_inferior_id or new_thread_notify.
14857 (maybe_attach_thread): Update. Do not call new_thread_notify.
14858 (thread_db_init): Set thread_db_use_events. Check use_events.
14859 * utils.c (fatal, warning): Correct message prefix.
14861 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14863 * Makefile.in (clean): Remove new files.
14864 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14865 (powerpc-64.o, powerpc-64.c): New rules.
14866 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14867 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14869 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14871 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14872 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14873 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14874 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14875 (target_regsets): Add AltiVec and SPE register sets.
14876 * configure.ac: Check for AltiVec and SPE.
14877 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14878 (ppc_fill_vrregset, ppc_store_vrregset): New.
14879 (target_regsets): Add AltiVec register set.
14880 * configure: Regenerated.
14882 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14884 * linux-low.c (O_LARGEFILE): Define.
14885 (linux_read_memory): Use /proc/PID/mem.
14886 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14887 * configure, config.in: Regenerated.
14889 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14891 * linux-low.c (linux_wait_for_event): Do not pass signals while
14894 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14896 * win32-low.c (create_process): New.
14897 (win32_create_inferior): Use create_process instead of
14898 CreateProcess. If create_process failed retry appending an ".exe"
14899 suffix. Store the GetLastError result immediatelly after
14900 create_process calls and use it on the call to error.
14902 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14904 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14906 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14908 * configure.ac: Switch license to GPLv3.
14910 2007-08-01 Michael Snyder <msnyder@access-company.com>
14912 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14914 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14916 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14918 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14919 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14920 CloseToolhelp32Snapshot.
14921 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14922 CloseToolhelp32Snapshot.
14924 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14926 * server.c (main): Check for inferior exit before main loop.
14928 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14930 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14931 instead of on tmp_desc.
14933 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14934 Daniel Jacobowitz <dan@codesourcery.com>
14936 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14937 (add_thread): Minor cleanups.
14938 (clear_inferiors): Move lower in the file. Clear the DLL
14940 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14941 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14942 (xml_escape_text): New.
14943 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14945 (handle_v_cont): Report errors.
14946 (gdbserver_version): Update.
14947 (main): Correct size of own_buf. Do not report initial DLL events.
14948 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14949 (unloaded_dll, xml_escape_text): New.
14950 * win32-low.c (enum target_waitkind): Update comments.
14951 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14952 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14953 (win32_EnumProcessModules, win32_GetModuleInformation)
14954 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14955 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14956 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14957 (win32_Module32First, win32_Module32Next, load_toolhelp)
14958 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14959 (get_child_debug_event): Handle DLL events.
14960 (win32_wait): Likewise.
14962 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14964 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14965 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14967 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14969 * win32-low.c (handle_output_debug_string): Ignore event if not
14972 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14974 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14976 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14978 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14980 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14982 * inferiors.c (change_inferior_id): Add comment.
14983 * linux-low.c (check_removed_breakpoint): Add an early
14984 prototype. Improve debug output.
14985 (linux_attach): Doc update.
14986 (linux_detach_one_process, linux_detach): Clean up before releasing
14988 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14989 * linux-low.h (struct process_info): Doc improvement.
14990 * mem-break.c (delete_all_breakpoints): New.
14991 * mem-break.h (delete_all_breakpoints): New prototype.
14992 * thread-db.c (find_first_thread): New.
14993 (thread_db_create_event): Call it instead of
14994 thread_db_find_new_threads. Clean up unused variables.
14995 (maybe_attach_thread): Remove first thread handling.
14996 (thread_db_find_new_threads): Use find_first_thread.
14997 (thread_db_get_tls_address): Likewise.
14999 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15001 * thread-db.c (thread_db_find_new_threads): Add prototype.
15002 (thread_db_create_event): Check for the main thread before adding
15004 (maybe_attach_thread): Only enable event reporting if TID == 0.
15005 (thread_db_get_tls_address): Check for new threads.
15007 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15009 * linux-low.c (linux_create_inferior): Try execv before execvp.
15010 * spu-low.c (spu_create_inferior): Likewise.
15012 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15014 * linux-low.c (linux_create_inferior): Change execv to execvp.
15015 * spu-low.c (spu_create_inferior): Likewies.
15017 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15019 * Makefile.in (clean): Clean new files instead of deleted ones.
15020 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15021 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15023 * configure.srv: Specify XML files and new regformats for MIPS and
15025 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15026 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15027 an entry for the restart register.
15028 (mips_cannot_fetch_register, mips_cannot_store_register)
15029 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15030 register names to match the XML descriptions.
15031 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15032 restart register instead of $0.
15034 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15035 Markus Deuling <deuling@de.ibm.com>
15037 * remote-utils.c (decode_xfer_write): New function.
15038 * server.h (decode_xfer_write): Add prototype.
15039 * server.c (handle_query): Add PACKET_LEN argument. Support
15040 qXfer:spu:read and qXfer:spu:write packets.
15041 (main): Pass packet_len to handle_query.
15042 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15043 * target.h (target_ops): Add qxfer_spu.
15045 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15047 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15048 accessing non-seekable spufs files.
15050 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15052 * server.c (handle_query): Add reply for qC packet.
15054 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15055 Leo Zayas <lerele@champenstudios@com>
15057 * server.h (check_remote_input_interrupt_request): New function.
15058 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15059 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15060 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15061 (check_remote_input_interrupt_request): New function.
15062 * server.h (check_remote_input_interrupt_request): Declare.
15063 * win32-low.c (winapi_DebugBreakProcess,
15064 winapi_GenerateConsoleCtrlEvent): New typedefs.
15065 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15067 (win32_wait): Check for remote interrupt request
15068 with check_remote_input_interrupt_request.
15069 (win32_request_interrupt): New function.
15070 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15072 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15074 * win32-low.c (debug_registers_changed,
15075 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15076 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15077 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15078 (thread_rec): Get context using the low target.
15079 (child_add_thread): Call thread_added on the low target,
15080 which does the same thing.
15082 (do_initial_child_stuff): Remove debug registers references.
15083 Set context using the low target. Resume threads after
15084 setting the contexts.
15085 (child_continue): Remove dead variable. Remove debug
15086 registers references.
15087 (child_fetch_inferior_registers): Go through the low target.
15088 (do_child_store_inferior_registers): Remove.
15089 (child_store_inferior_registers): Go through the low target.
15090 (win32_resume): Remove debug registers references.
15091 Set context using the low target.
15092 (handle_exception): Change return type to void. Don't record
15093 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15094 first chance exception.
15095 (get_child_debug_event): Change return type to void. Remove
15096 goto loop. Always return after waiting for debug event.
15097 (win32_wait): Convert to switch statement. Handle spurious
15100 * win32-i386-low.c (debug_registers_changed,
15101 debug_registers_used): New.
15102 (initial_stuff): Rename to ...
15103 (i386_initial_stuff): ... this. Clear debug registers
15105 (store_debug_registers): Delete.
15106 (i386_get_thread_context): New.
15107 (load_debug_registers): Delete.
15108 (i386_set_thread_context): New.
15109 (i386_thread_added): New.
15110 (single_step): Rename to ...
15111 (i386_single_step): ... this.
15112 (do_fetch_inferior_registers): Rename to ...
15113 (i386_fetch_inferior_register): ... this.
15114 (i386_store_inferior_register): New.
15115 (the_low_target): Adapt to new interface.
15117 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15118 (arm_get_thread_context): New.
15119 (arm_set_thread_context): New.
15121 (do_fetch_inferior_registers): Rename to ...
15122 (arm_fetch_inferior_register): ... this.
15123 (arm_store_inferior_register): New.
15124 (arm_wince_breakpoint): Reimplement as unsigned long.
15125 (arm_wince_breakpoint_len): Define.
15126 (the_low_target): Adapt to new interface.
15128 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15129 load_debug_registers. Add get_thread_context, set_thread_context,
15130 thread_added and store_inferior_register. Rename
15131 fetch_inferior_registers to fetch_inferior_register.
15132 (regptr): Remove declaration.
15134 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15136 * linux-low.c (linux_detach): Change return type to int. Return 0.
15137 * spu-low.c (spu_detach): Likewise.
15139 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15141 * target.h (target_ops): Change return type of detach to int.
15143 (join_inferior): New.
15144 * server.c (main): Don't skip detach support on mingw32.
15145 If the inferior doesn't support detaching return error.
15146 Call join_inferior instead of using waitpid.
15147 * linux-low.c (linux_join): New.
15148 (linux_target_op): Add linux_join.
15149 * spu-low.c (spu_join): New.
15150 (spu_target_ops): Add spu_join.
15151 * win32-low.c (win32_detach): Adapt to new interface.
15152 Reopen current_process_handle before detaching. Issue a child
15153 resume before detaching.
15155 (win32_target_op): Add win32_join.
15157 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15159 * win32-low.c (win32-attach): Fix return value.
15160 * target.h (target_ops): Describe ATTACH return values.
15162 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15164 * win32-low.c (GETPROCADDRESS): Define.
15165 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15166 (winapi_DebugSetProcessKillOnExit): Likewise.
15167 (win32_create_inferior): Force usage of ansi CreateProcessA.
15168 (win32_attach): Use GETPROCADDRESS.
15169 (win32_detach): Likewise.
15171 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15173 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15175 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15177 * win32-low.c: Commit leftover changes from 2007-03-29.
15179 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15181 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15182 fields short instead of int. Add explicit padding.
15183 (i387_cache_to_fsave): Remove unnecessary casts.
15184 (i387_fsave_to_cache): Doc fix.
15185 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15187 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15189 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15190 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15192 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15194 * configure.srv (arm*-*-mingw32ce*): Move near the other
15197 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15199 * configure.ac: Add errno checking.
15200 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15201 sys/file.h and malloc.h.
15202 (AC_CHECK_DECLS): Add perror.
15203 (srv_mingwce): Handle.
15204 * configure.srv (i[34567]86-*-cygwin*): Add
15205 win32-i386-low.o to srv_tgtobj.
15206 (i[34567]86-*-mingw*): Likewise.
15207 (arm*-*-mingw32ce*): Add case.
15208 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15209 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15210 [__MINGW32CE__] (strerror): New function.
15211 [__MINGW32CE__] (errno): Define to GetLastError.
15212 [__MINGW32CE__] (COUNTOF): New macro.
15213 (remote_open): Remove extra close call.
15214 * mem-break.c (delete_breakpoint_at): New function.
15215 * mem-break.h (delete_breakpoint_at): Declare.
15216 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15217 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15218 [USE_WIN32API] (read, write): Add char* casts.
15219 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15220 * server.h: Include wincecompat.h on Windows CE.
15221 [HAVE_ERRNO_H]: Check.
15222 (perror): Declare if not declared.
15223 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15224 (perror_with_name): Remove errno declaration.
15225 * wincecompat.h: New.
15226 * wincecompat.c: New.
15227 * win32-low.h: New.
15228 * win32-arm-low.c: New.
15229 * win32-i386-low.c: New.
15230 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15231 (OUTMSG2): Make it safe.
15233 (COUNTOF): New macro.
15234 (NUM_REGS): Get it from the low target.
15235 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15236 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15237 (thread_rec): Let low target handle debug registers.
15238 (child_add_thread): Likewise.
15239 (child_init_thread_list): Likewise.
15240 (continue_one_thread): Likewise.
15242 (do_child_fetch_inferior_registers): Move to ...
15243 * win32-i386-low.c: ... here, and rename to ...
15244 (do_fetch_inferior_registers): ... this.
15245 * win32-low.c (child_fetch_inferior_registers):
15246 Go through the low target.
15247 (do_child_store_inferior_registers): Use regptr.
15248 (strwinerror): New function.
15249 (win32_create_inferior): Handle Windows CE.
15250 Use strwinerror instead of strerror on Windows error
15251 codes. Add program to the error output.
15252 Don't close the main thread handle on Windows CE.
15253 (win32_attach): Use coredll.dll on Windows CE.
15254 (win32_kill): Close current process and current
15256 (win32_detach): Use coredll.dll on Windows CE.
15257 (win32_resume): Let low target handle debug registers, and
15259 (handle_exception): Add/Remove initial breakpoint. Avoid
15260 non-existant WSTOPSIG on Windows CE.
15261 (win32_read_inferior_memory): Cast to remove warning.
15262 (win32_arch_string): Go through the low target.
15263 (initialize_low): Call set_breakpoint_data with the low
15264 target's breakpoint.
15265 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15266 FOP_REGNUM, mappings): Move to ...
15267 * win32-i386-low.c: ... here.
15268 * win32-low.c (win32_thread_info): Move to ...
15269 * win32-low.h: ... here.
15270 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15271 win32-arm-low.c and wincecompat.c.
15272 (all:): Add $EXEEXT.
15273 (install-only:): Likewise.
15274 (gdbserver:): Likewise.
15275 (gdbreplay:): Likewise.
15276 * config.in: Regenerate.
15277 * configure: Regenerate.
15279 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15281 * win32-low.c: Rename typedef thread_info to
15282 win32_thread_info throughout.
15284 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15286 * win32-i386-low.c: Rename to ...
15287 * win32-low.c: ... this.
15288 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15289 * Makefile.in: Likewise.
15291 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15293 * remote-utils.c (monitor_output): Constify msg parameter.
15294 * server.h (monitor_output): Likewise.
15295 * win32-i386-low.c (handle_output_debug_string): New.
15296 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15297 handle_output_debug_string.
15298 (get_child_debug_event): Likewise.
15300 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15302 * server.c (main): Correct strtoul check.
15304 2007-03-27 Jon Ringle <jon@ringle.org>
15306 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15308 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15310 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15312 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15314 * terminal.h: Check HAVE_SGTTY_H.
15316 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15318 * remote-utils.c (remote_open): Print out the assigned port number.
15320 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15322 * remote-utils.c (monitor_output): New function.
15323 * server.c (debug_threads): Define here.
15324 (monitor_show_help): New function.
15325 (handle_query): Handle qRcmd.
15326 (main): Do not handle 'd' packet.
15327 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15328 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15331 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15333 * Makefile.in (EXEEXT): New.
15334 (clean): Use $(EXEEXT).
15336 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15338 * target.h (target_ops): Rename send_signal to request_interrupt,
15339 and remove enum target_signal parameter.
15340 * linux-low.c (linux_request_interrupt): Rename from
15341 linux_send_signal, and always send SIGINT.
15342 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15343 and always send SIGINT.
15344 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15346 (input_interrupt): Likewise.
15348 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15350 * server.c (get_features_xml): Check if target implemented
15352 * win32-i386-low.c (win32_arch_string): New.
15353 (win32_target_ops): Add win32_arch_string as arch_string member.
15355 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15357 * spu-low.c (spu_arch_string): New.
15358 (spu_target_ops): Add spu_arch_string.
15360 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15362 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15363 * configure.ac: Do not check for terminal.h.
15364 * configure, config.in: Regenerated.
15366 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15368 * Makefile.in (OBS): Add $(XML_BUILTIN).
15369 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15371 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15372 (arm-with-iwmmxt.c): New.
15373 * config.in, configure: Regenerate.
15374 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15375 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15376 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15377 (arm*-*-linux*): Add iWMMXt and regset support.
15378 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15379 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15380 (arm_store_wmmxregset, target_regsets): New.
15381 * server.c (get_features_xml): Take annex argument. Check builtin
15383 (handle_query): Handle multiple annexes.
15385 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15387 * remote-utils.c [USE_WIN32API] (read, write): Define.
15388 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15391 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15393 * linux-i386-low.c (the_low_target): Set arch_string.
15394 * linux-x86-64-low.c (the_low_target): Likewise.
15395 * linux-low.c (linux_arch_string): New.
15396 (linux_target_ops): Add it.
15397 * linux-low.h (struct linux_target_ops): Add arch_string.
15398 * server.c (write_qxfer_response): Use const void * for DATA.
15399 (get_features_xml): New.
15400 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15401 * target.h (struct target_ops): Add arch_string method.
15403 2007-01-03 Denis Pilat <denis.pilat@st.com>
15404 Daniel Jacobowitz <dan@codesourcery.com>
15406 * linux-low.c (linux_kill): Handle being called with no threads.
15407 * win32-i386-low.c (win32_kill): Likewise.
15408 (get_child_debug_event): Clear current_process_handle.
15410 2006-12-30 Denis PILAT <denis.pilat@st.com>
15411 Daniel Jacobowitz <dan@codesourcery.com>
15413 * remote-utils.c (remote_open): Check the type of specified
15414 serial port devices before opening them.
15415 * server.c (main): Kill the inferior if an error occurs during
15416 the first remote_open.
15418 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15420 * README: Update supported targets.
15422 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15424 * Makefile.in (clean): Remove reg-mips64.c.
15425 (reg-mips64.c, reg-mips64.o): New rules.
15426 * configure.srv: Handle mips64. Include regset support for mips.
15427 * linux-mips-low.c (union mips_register): New.
15428 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15429 (mips_breakpoint, mips_breakpoint_at): Use int.
15430 (mips_collect_register, mips_supply_register)
15431 (mips_collect_register_32bit, mips_supply_register_32bit)
15432 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15433 (mips_store_fpregset, target_regsets): New.
15434 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15436 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15438 * configure.srv: Add target "spu*-*-*".
15439 * Makefile.in (clean): Remove reg-spu.c.
15440 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15441 * spu-low.c: New file.
15443 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15445 * configure.ac: Correct td_thr_tls_get_addr test.
15446 * configure: Regenerated.
15448 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15450 * linux-low.c (linux_wait_for_event): Reformat. Use the
15451 pass_signals array.
15452 * remote-utils.c (decode_address_to_semicolon): New.
15453 * server.c (pass_signals, handle_general_set): New.
15454 (handle_query): Mention QPassSignals for qSupported.
15455 (main): Call handle_general_set.
15456 * server.h (pass_signals, decode_address_to_semicolon): New.
15458 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15460 * server.c (handle_query): Correct error handling for read_auxv.
15462 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15464 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15465 and srv_linux_thread_db to yes.
15466 * linux-s390-low.c (s390_fill_gregset): New function.
15467 (target_regsets): Define data structure.
15469 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15471 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15472 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15473 * config.in, configure: Regenerated.
15474 * inferiors.c (gdb_id_to_thread): New function.
15475 (gdb_id_to_thread_id): Use it.
15476 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15477 * linux-low.h (struct process_info): Add th member.
15478 (thread_db_get_tls_address): New prototype.
15479 * remote-utils.c (decode_address): Make non-static.
15480 * server.c (handle_query): Handle qGetTLSAddr.
15481 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15482 * target.h (struct target_ops): Add get_tls_address.
15483 * thread-db.c (maybe_attach_thread): Save the thread handle.
15484 (thread_db_get_tls_address): New.
15486 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15488 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15489 (linux_resume_one_process): Take a siginfo_t *. Update all
15490 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15491 (struct pending_signals): Add a siginfo_t.
15492 (linux_wait_for_process): Always set last_status.
15493 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15494 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15495 * linux-low.h (struct process_info): Add last_status.
15497 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15499 * remote-utils.c (try_rle): New function.
15500 (putpkt_binary): Use it.
15502 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15504 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15505 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15506 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15507 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15508 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15511 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15513 * server.c (terminal_fd): New variable.
15514 (old_foreground_pgrp): Likewise.
15515 (restore_old_foreground_pgrp): New function.
15516 (start_inferior): Record the terminal file descriptor in terminal_fd
15517 and its original foreground group in old_foreground_pgrp. Register
15518 restore_old_foreground_pgrp with atexit().
15520 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15522 * server.c (handle_query): Correct qPart to qXfer.
15524 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15526 * configure.ac: Check for more headers which are missing on
15527 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15528 * configure.srv: Add Cygwin and mingw32.
15529 * remote-utils.c: Don't include headers unconditionally which
15530 are missing on mingw32. Include <winsock.h> for mingw32.
15531 (remote_open): Adjust for mingw32 support. Flush
15532 standard error after writing to it.
15533 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15534 (unblock_async_io, enable_async_io, disable_async_io)
15535 (readchar, getpkt): Update for Winsock support.
15536 (prepare_resume_reply): Expect a protocol signal number.
15537 * server.c: Disable <sys/wait.h> on mingw32.
15538 (start_inferior): Adjust for mingw32 support. Flush
15539 standard error after writing to it.
15540 (attach_inferior): Likewise. Use protocol signal
15542 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15544 * win32-i386-low.c: New file.
15545 * Makefile.in (XM_CLIBS): Set.
15546 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15547 (win32-i386-low.o): New dependency rule.
15548 * linux-low.c (linux_wait): Use target signal numbers.
15549 * target.h (struct target_ops): Doc fix.
15550 * server.h (target_signal_to_name): New prototype.
15551 * gdbreplay.c: Don't include headers unconditionally which
15552 are missing on mingw32. Include <winsock.h> for mingw32.
15553 (remote_close, remote_open): Adjust for Winsock support.
15554 * configure, config.in: Regenerated.
15556 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15558 * server.c (decode_xfer_read, write_qxfer_response): New.
15559 (handle_query): Take a packet length argument. Handle
15560 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15561 the qSupported response.
15562 (main): Update call to handle_query.
15564 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15566 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15567 (putpkt_binary): Renamed from putpkt and adjusted for binary
15569 (putpkt): New wrapper for putpkt_binary.
15570 (readchar): Don't mask off the high bit.
15571 (decode_X_packet): New function.
15572 * server.c (main): Call putpkt_binary if a handler sets the packet
15573 length. Save the length of the incoming packet. Handle 'X'.
15574 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15576 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15578 * server.c (handle_query): Handle qSupported.
15580 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15582 * remote-utils.c (all_symbols_looked_up): New variable.
15583 (look_up_one_symbol): Check it.
15584 * server.h (look_up_one_symbol): New declaration.
15585 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15587 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15589 * Makefile.in (linux-arm-low.o): Update dependencies.
15590 * linux-arm-low.c: Include "gdb_proc_service.h".
15591 (PTRACE_GET_THREAD_AREA): Define.
15592 (ps_get_thread_area): New function.
15594 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15596 * configure.srv (m68k*-*-uclinux*): New target.
15597 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15598 (linux_resume_one_process): Remove extraneous cast.
15599 (linux_read_offsets): New.
15600 (linux_target_op): Add linux_read_offsets on mmuless systems.
15601 * server.c (handle_query): Add qOffsets logic.
15602 * target.h (struct target_ops): Add read_offsets.
15604 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15606 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15607 (PTRACE_GET_THREAD_AREA): Define.
15608 (ps_get_thread_area): New function.
15609 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15610 (linux-x86-64-low.o): Update.
15612 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15614 * configure.ac: Remove checks for prfpregset_t.
15615 * gdb_proc_service.h: New file.
15616 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15617 new "gdb_proc_service.h".
15618 * proc-service.c: Likewise.
15619 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15620 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15621 * Makefile.in (gdb_proc_service_h): Updated.
15622 * configure, config.in: Regenerated.
15624 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15626 * remote-utils.c (prepare_resume_reply): Move declaration
15627 of gdb_id_from_wait to the top of the block.
15629 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15631 * linux-low.c (regsets_store_inferior_registers): Read the regset
15632 from the target before filling it.
15634 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15636 * server.c (attach_inferior): Return SIGTRAP for a successful
15639 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15641 * Makefile.in (OBS): Add version.o.
15642 (STAGESTUFF): Delete.
15643 (version.o): Add dependencies.
15644 (version.c): Replace rule.
15645 (clean): Remove version.c.
15646 * server.c (gdbserver_version): New.
15647 (gdbserver_usage): Use printf.
15648 (main): Handle --version and --help.
15649 * server.h (version, host_name): Add declarations.
15651 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15663 * linux-x86-64-low.c:
15665 * linux-s390-low.c:
15666 * linux-ppc64-low.c:
15668 * linux-mips-low.c:
15669 * linux-m68k-low.c:
15670 * linux-m32r-low.c:
15673 * linux-ia64-low.c:
15674 * linux-i386-low.c:
15675 * linux-crisv32-low.c:
15687 * gdbserver.1: Add (C) after Copyright. Update the FSF
15690 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15692 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15693 (arm_breakpoint_at): Recognize both breakpoints.
15694 (the_low_target): Use the correct breakpoint instruction.
15696 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15698 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15699 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15700 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15701 (the_low_target): Update.
15703 2005-10-25 Andreas Schwab <schwab@suse.de>
15705 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15707 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15708 (ia64_num_regs): Reduce to 462.
15710 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15712 * acinclude.m4: Correct quoting.
15713 * aclocal.m4: Regenerated.
15715 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15716 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15717 (thread_db_init): Call thread_db_err_str.
15718 * configure.ac: Check for TD_VERSION.
15719 * config.in, configure: Regenerated.
15721 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15723 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15725 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15727 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15728 is not available. Define HAVE_PTRACE_GETREGS if it is.
15729 * config.in, configure: Regenerated.
15730 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15731 * linux-i386-low.c, linux-m68k-low.c: Update to use
15732 HAVE_PTRACE_GETREGS.
15733 * linux-low.c (regsets_fetch_inferior_registers)
15734 (regsets_store_inferior_registers): Only return 0 if we processed
15736 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15737 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15739 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15741 * inferiors.c (struct thread_info): Add gdb_id.
15742 (add_thread): Add gdb_id argument.
15743 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15744 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15745 calls to add_thread.
15746 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15747 * server.c (handle_query): Use thread_to_gdb_id.
15748 (handle_v_cont, main): Use gdb_id_to_thread_id.
15749 * server.h (add_thread): Update prototype.
15750 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15753 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15755 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15756 left-padded registers.
15757 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15758 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15760 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15762 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15763 * configure: Regenerate.
15764 * config.in: Regenerate.
15765 * server.h (NEED_DECLARATION_STRERROR):
15766 Replace with !HAVE_DECL_STRERROR.
15768 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15770 * linux-low.c (linux_wait, linux_send_signal): Don't test
15771 an unsigned long variable for > 0 if it could be MAX_ULONG.
15772 * server.c (myresume): Likewise.
15773 * target.c (set_desired_inferior): Likewise.
15775 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15777 * configure.ac: Simplify and improve check for socklen_t.
15778 * configure, config.in: Regenerate.
15780 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15782 * acconfig.h: Remove.
15783 * configure.ac: Add a test for socklen_t. Use three-argument
15784 AC_DEFINE throughout.
15785 * config.in: Regenerated using autoheader 2.59.
15786 * configure: Regenerated.
15788 * gdbreplay.c (socklen_t): Provide a default.
15789 (remote_open): Use socklen_t.
15790 * remote-utils.c (socklen_t): Provide a default.
15791 (remote_open): Use socklen_t.
15792 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15795 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15797 * linux-low.c (linux_read_memory, linux_write_memory)
15798 (linux_read_auxv): Likewise.
15799 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15800 (check_mem_write): Likewise.
15801 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15803 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15804 (registers_from_string, register_data): Likewise.
15805 * server.c (handle_query, main): Likewise.
15806 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15807 (decode_M_packet): Likewise.
15808 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15809 * target.h (struct target_ops): Update read_memory, write_memory,
15811 (read_inferior_memory, write_inferior_memory): Update.
15812 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15813 to unsigned char *.
15814 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15815 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15816 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15817 linux-s390-low.c, linux-sh-low.c: Update for changes in
15818 read_inferior_memory and the_low_target->breakpoint.
15820 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15822 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15823 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15824 * configure.srv: Add powerpc64-*-linux*.
15825 * linux-ppc64-low.c: New file.
15827 2005-05-23 Orjan Friberg <orjanf@axis.com>
15829 * linux-cris-low.c: New file with support for CRIS.
15830 * linux-crisv32-low.c: Ditto for CRISv32.
15831 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15832 (clean): Add reg-cris.c and reg-crisv32.c.
15833 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15834 reg-crisv32.o, and reg-crisv32.c to make rules.
15835 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15836 recognized targets.
15838 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15840 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15841 of sizeof (PTRACE_XFER_TYPE).
15842 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15844 2005-05-12 Orjan Friberg <orjanf@axis.com>
15846 * target.h (struct target_ops): Add insert_watchpoint,
15847 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15848 pointers for hardware watchpoint support.
15849 * linux-low.h (struct linux_target_ops): Ditto.
15850 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15851 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15852 to linux_target_ops.
15853 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15855 * server.c (main): Recognize 'Z' and 'z' packets.
15857 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15859 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15860 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15861 (the_low_target): Add new members.
15863 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15865 * proc-service.c (ps_lgetregs): Search all_processes instead of
15868 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15870 * server.c (start_inferior): Change return type to int.
15871 (attach_inferior): Change sigptr to int *.
15872 (handle_v_cont, handle_v_requests): Change signal to int *.
15873 (main): Change signal to int.
15875 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15877 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15878 * configure.srv: Add m32r*-*-linux*.
15879 * linux-m32r-low.c: New file.
15881 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15883 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15885 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15887 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15888 Take unsigned long arguments for PIDs.
15889 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15890 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15891 (wait_for_sigstop, linux_resume_one_process)
15892 (regsets_fetch_inferior_registers, linux_send_signal)
15893 (linux_read_auxv): Likewise. Update the types of variables holding
15894 PIDs. Update format string specifiers.
15895 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15896 * remote-utils.c (prepare_resume_reply): Likewise.
15897 * server.c (cont_thread, general_thread, step_thread)
15898 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15900 (handle_query): Update format specifiers.
15901 (handle_v_cont, main): Use strtoul for thread IDs.
15902 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15903 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15904 (general_thread, step_thread, thread_from_wait)
15905 (old_thread_from_wait): Update.
15906 * target.h (struct thread_resume): Use unsigned long for THREAD.
15907 (struct target_ops): Use unsigned long for arguments to attach and
15910 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15912 * acinclude.m4: Include bfd/bfd.m4 directly.
15913 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15914 <agriffis@toolchain.org>.
15915 * aclocal.m4, configure: Regenerated.
15917 2005-01-07 Andrew Cagney <cagney@gnu.org>
15919 * configure.ac: Rename configure.in, require autoconf 2.59.
15920 * configure: Re-generate.
15922 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15924 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15925 LIBS when finished.
15926 * aclocal.m4: Regenerated.
15927 * configure: Regenerated.
15929 2004-11-21 Andreas Schwab <schwab@suse.de>
15931 * linux-m68k-low.c (m68k_num_gregs): Define.
15932 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15933 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15934 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15935 (m68k_breakpoint_at): New. Add to the_low_target.
15937 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15938 srv_linux_thread_db to yes.
15940 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15942 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15943 (ARCH_SET_FS): Likewise.
15944 (ARCH_GET_FS): Likewise.
15945 (ARCH_GET_GS): Likewise.
15947 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15949 * linux-i386-low.c (ps_get_thread_area): New.
15950 * linux-x86-64-low.c (ps_get_thread_area): New.
15951 * linux-low.c: Include <sys/syscall.h>.
15952 (linux_kill_one_process): Don't kill the first thread here.
15953 (linux_kill): Kill the first thread here.
15954 (kill_lwp): New function.
15955 (send_sigstop, linux_send_signal): Use it.
15956 * proc-service.c: Clean up #ifdefs.
15957 (fpregset_info): Delete.
15958 (ps_lgetregs): Update and enable implementation.
15959 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15961 * remote-utils.c (struct sym_cache, symbol_cache): New.
15962 (input_interrupt): Print a clearer message.
15963 (async_io_enabled): New variable.
15964 (enable_async_io, disable_async_io): Use it. Update comments.
15965 (look_up_one_symbol): Use the symbol cache.
15966 * thread-db.c (thread_db_look_up_symbols): New function.
15967 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15969 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15971 * configure.in: Test for -rdynamic.
15972 * configure: Regenerated.
15973 * Makefile (INTERNAL_LDFLAGS): New.
15974 (gdbserver, gdbreplay): Use it.
15976 2004-09-02 Andrew Cagney <cagney@gnu.org>
15978 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15980 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15982 * linux-low.c (linux_wait): Clear all_processes list also.
15984 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15986 * linux-low.c: Include <errno.h>. Remove extern declaration of
15989 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15991 * gdbreplay.c, server.h, utils.c: Update copyright years.
15993 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15995 * server.c (main): Print child status or termination signal from
15996 variable 'signal', not 'sig'.
15998 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16000 * linux-low.c (linux_read_memory): Change return type to
16001 int. Check for and return error from ptrace().
16002 * target.c (read_inferior_memory): Change return type to int. Pass
16003 back return status from the_target->read_memory().
16004 * target.h (struct target_ops): Adapt *read_memory() prototype.
16006 (read_inferior_memory): Adapt prototype.
16007 * server.c (main): Return an error packet if
16008 read_inferior_memory() returns an error.
16010 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16012 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16013 Unify with other clean targets.
16015 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16017 * server.c (handle_v_cont): Call set_desired_inferior.
16019 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16021 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16023 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16025 * linux-low.c (linux_wait): Unblock async I/O.
16026 (linux_resume): Block and enable async I/O.
16027 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16028 * server.h (block_async_io, unblock_async_io): Add prototypes.
16030 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16032 * remote-utils.c (remote_open): Print a status notice after
16033 opening a TCP port.
16034 * server.c (attach_inferior): Print a status notice after
16037 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16039 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16041 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16043 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16045 * server.c, target.h: Update copyright years.
16047 2004-02-25 Roland McGrath <roland@redhat.com>
16049 * target.h (struct target_ops): New member `read_auxv'.
16050 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16051 * linux-low.c (linux_read_auxv): New function.
16052 (linux_target_ops): Initialize `read_auxv' member to that.
16054 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16056 Committed by Jim Blandy <jimb@redhat.com>.
16058 * linux-s390-low.c (s390_num_regs): Update.
16059 (s390_regmap): Remove control registers. Use __s390x__ predefine
16060 instead of GPR_SIZE to distiguish s390 and s390x targets.
16062 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16064 * linux-low.c: Update copyright year.
16065 (check_removed_breakpoint): Clear pending_is_breakpoint.
16066 (linux_set_resume_request, linux_queue_one_thread)
16067 (resume_status_pending_p): New functions.
16068 (linux_continue_one_thread): Use process->resume.
16069 (linux_resume): Only resume threads if there are no pending events.
16070 * linux-low.h (struct process_info): Add resume request
16073 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16075 * regcache.c (new_register_cache): Clear the allocated register
16076 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16078 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16080 * linux-low.c (linux_resume): Take a struct thread_resume *
16082 (linux_wait): Update call.
16083 (resume_ptr): New static variable.
16084 (linux_continue_one_thread): Renamed from
16085 linux_continue_one_process. Use resume_ptr.
16086 (linux_resume): Use linux_continue_one_thread.
16087 * server.c (handle_v_cont, handle_v_requests): New functions.
16088 (myresume): New function.
16089 (main): Handle 'v' case.
16090 * target.h (struct thread_resume): New type.
16091 (struct target_ops): Change argument of "resume" to struct
16093 (myresume): Delete macro.
16095 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16097 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16098 (uninstall): Support DESTDIR.
16100 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16102 * configure.srv: Add xscale*linux copy of arm*linux entry.
16104 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16106 * linux-arm-low.c (arm_reinsert_addr): New function.
16107 (the_low_target): Add arm_reinsert_addr.
16109 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16111 * mem-break.c: Remove whitespace at end of file.
16113 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16115 * configure.in: Check whether we need to prototype strerror.
16116 * server.h: Optionally prototype strerror.
16117 * gdbreplay.c (perror_with_name): Use strerror.
16118 * linux-low.c (linux_attach_lwp): Use strerror.
16119 * utils.c (perror_with_name): Use strerror.
16120 * config.in, configure: Regenerated.
16122 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16124 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16125 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16127 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16129 * Makefile.in (SFILES): Update.
16130 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16131 low-sun3.c: Remove files.
16133 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16135 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16136 (linux_detach_one_process, linux_detach): New functions.
16137 (linux_target_ops): Add linux_detach.
16138 * server.c (main): Handle 'D' packet.
16139 * target.h (struct target_ops): Add "detach" member.
16140 (detach_inferior): Define.
16142 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16144 From Kelley Cook <kelleycook@wideopenwest.com>:
16145 * configure.srv: Accept i[34567]86 variants.
16147 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16149 * linux-low.c (linux_wait_for_event): Correct comment typos.
16150 (linux_resume_one_process): Call check_removed_breakpoint.
16151 (linux_send_signal): New function.
16152 (linux_target_ops): Add linux_send_signal.
16153 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16155 * target.h (struct target_ops): Add send_signal.
16157 2003-05-29 Jim Blandy <jimb@redhat.com>
16159 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16160 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16161 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16162 away part of the register's value.
16164 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16166 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16167 (linux_wait_for_event, linux_init_signals): Likewise.
16169 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16171 * configure.in: Check for stdlib.h.
16172 * configure: Regenerated.
16173 * config.in: Regenerated.
16175 2003-01-04 Andreas Schwab <schwab@suse.de>
16177 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16179 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16181 * Makefile.in: Remove obsolete code.
16183 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16185 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16186 defined(PT_FPR0_HI).
16188 2002-11-17 Stuart Hughes <seh@zee2.com>
16190 * linux-arm-low.c (arm_num_regs): Increase.
16191 (arm_regmap): Include status register.
16193 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16195 * linux-low.c (register_addr): Remove incorrect -1 check.
16197 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16199 * linux-low.c (linux_create_inferior): Call setpgid. Return
16201 (unstopped_p, linux_signal_pid): Remove.
16202 (linux_target_ops): Remove linux_signal_pid.
16203 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16204 global instead of target method.
16205 * target.h (struct target_ops): Remove signal_pid. Update comment
16206 for create_inferior.
16207 * server.c (signal_pid): New variable.
16208 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16209 gdbserver. Set the child to be the foreground process group.
16210 (attach_inferior): Set signal_pid.
16212 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16214 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16216 2002-08-20 Jim Blandy <jimb@redhat.com>
16218 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16221 2002-08-01 Andrew Cagney <cagney@redhat.com>
16223 * Makefile.in: Make chill references obsolete.
16225 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16227 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16228 * configure: Regenerate.
16229 * config.in: Regenerate.
16231 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16233 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16234 (perror_with_name, remote_close, remote_open, expect, play): Static.
16236 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16238 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16239 byte offsets instead of an array of indexes.
16240 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16242 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16244 * regcache.c: Add comment.
16246 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16248 * thread-db.c: New file.
16249 * proc-service.c: New file.
16250 * acinclude.m4: New file.
16251 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16252 proc-service.o, and thread-db.o.
16253 (linux-low.o): Add USE_THREAD_DB.
16254 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16255 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16256 * aclocal.m4: Regenerated.
16257 * config.in: Regenerated.
16258 * configure: Regenerated.
16259 * configure.in: Check for proc_service.h, sys/procfs.h,
16260 thread_db.h, and linux/elf.h headrs.
16261 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16262 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16263 Check for -lthread_db and thread support.
16264 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16265 PowerPC, and SuperH.
16266 * i387-fp.c: Constify arguments.
16267 * i387-fp.h: Likewise.
16268 * inferiors.c: (struct thread_info): Renamed from
16269 `struct inferior_info'. Remove PID member. Use generic inferior
16270 list header. All uses updated.
16271 (inferiors, signal_pid): Removed.
16272 (all_threads): New variable.
16273 (get_thread): Define.
16274 (add_inferior_to_list): New function.
16275 (for_each_inferior): New function.
16276 (change_inferior_id): New function.
16277 (add_inferior): Removed.
16278 (remove_inferior): New function.
16279 (add_thread): New function.
16280 (free_one_thread): New function.
16281 (remove_thread): New function.
16282 (clear_inferiors): Use for_each_inferior and free_one_thread.
16283 (find_inferior): New function.
16284 (find_inferior_id): New function.
16285 (inferior_target_data): Update argument type.
16286 (set_inferior_target_data): Likewise.
16287 (inferior_regcache_data): Likewise.
16288 (set_inferior_regcache_data): Likewise.
16289 * linux-low.c (linux_bp_reinsert): Remove.
16290 (all_processes, stopping_threads, using_thrads)
16291 (struct pending_signals, debug_threads, pid_of): New.
16292 (inferior_pid): Replace with macro.
16293 (struct inferior_linux_data): Remove.
16294 (get_stop_pc, add_process): New functions.
16295 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16296 Use add_process and add_thread.
16297 (linux_attach_lwp): New function, based on old linux_attach. Use
16298 add_process and add_thread. Set stop_expected for new threads.
16299 (linux_attach): New function.
16300 (linux_kill_one_process): New function.
16301 (linux_kill): Kill all LWPs.
16302 (linux_thread_alive): Use find_inferior_id.
16303 (check_removed_breakpoints, status_pending_p): New functions.
16304 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16305 Update. Use WNOHANG. Wait for cloned processes also. Update process
16306 struct for the found process.
16307 (linux_wait_for_event): New function.
16308 (linux_wait): Use it. Support LWPs.
16309 (send_sigstop, wait_for_sigstop, stop_all_processes)
16310 (linux_resume_one_process, linux_continue_one_process): New functions.
16311 (linux_resume): Support LWPs.
16312 (REGISTER_RAW_SIZE): Remove.
16313 (fetch_register): Use register_size instead. Call supply_register.
16314 (usr_store_inferior_registers): Likewise. Call collect_register.
16315 Fix recursive case.
16316 (regsets_fetch_inferior_registers): Improve error message.
16317 (regsets_store_inferior_registers): Add debugging.
16318 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16319 (unstopped_p, linux_signal_pid): New functions.
16320 (linux_target_ops): Add linux_signal_pid.
16321 (linux_init_signals): New function.
16322 (initialize_low): Call it. Initialize using_threads.
16323 * regcache.c (inferior_regcache_data): Add valid
16325 (get_regcache): Fetch registers lazily. Add fetch argument
16326 and update all callers.
16327 (regcache_invalidate_one, regcache_invalidate): New
16329 (new_register_cache): Renamed from create_register_cache.
16330 Return the new regcache.
16331 (free_register_cache): Change argument to a void *.
16332 (registers_to_string, registers_from_string): Call get_regcache
16333 with fetch flag set.
16334 (register_data): Make static. Pass fetch flag to get_regcache.
16335 (supply_register): Call get_regcache with fetch flag clear.
16336 (collect_register): Call get_regcache with fetch flag set.
16337 (collect_register_as_string): New function.
16338 * regcache.h: Update.
16339 * remote-utils.c (putpkt): Flush after debug output and use
16341 Handle input interrupts while waiting for an ACK.
16342 (input_interrupt): Use signal_pid method.
16343 (getpkt): Flush after debug output and use stderr.
16344 (outreg): Use collect_register_as_string.
16345 (new_thread_notify, dead_thread_notify): New functions.
16346 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16347 and general_thread.
16348 (look_up_one_symbol): Flush after debug output.
16349 * server.c (step_thread, server_waiting): New variables.
16350 (start_inferior): Don't use signal_pid. Update call to mywait.
16351 (attach_inferior): Update call to mywait.
16352 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16353 (main): Don't fetch/store registers explicitly. Use
16354 set_desired_inferior. Support proposed ``Hs'' packet. Update
16356 * server.h: Update.
16357 (struct inferior_list, struct_inferior_list_entry): New.
16358 * target.c (set_desired_inferior): New.
16359 (write_inferior_memory): Constify.
16360 (mywait): New function.
16361 * target.h: Update.
16362 (struct target_ops): New signal_pid method.
16363 (mywait): Removed macro, added prototype.
16365 * linux-low.h (regset_func): Removed.
16366 (regset_fill_func, regset_store_func): New.
16367 (enum regset_type): New.
16368 (struct regset_info): Add type field. Use new operation types.
16369 (struct linux_target_ops): stop_pc renamed to get_pc.
16370 Add decr_pc_after_break and breakpoint_at.
16371 (get_process, get_thread_proess, get_process_thread)
16372 (strut process_info, all_processes, linux_attach_lwp)
16373 (thread_db_init): New.
16375 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16376 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16377 (the_low_target): Add new members.
16378 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16379 (i386_store_fpxregset): Constify.
16380 (target_regsets): Add new kind identifier.
16381 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16382 (i386_set_pc): Add debugging.
16383 (i386_breakpoint_at): New function.
16384 (the_low_target): Add new members.
16385 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16386 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16387 (mips_breakpoint_at): New.
16388 (the_low_target): Add new members.
16389 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16390 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16391 (the_low_target): Add new members.
16392 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16393 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16394 (the_low_target): Add new members.
16395 * linux-x86-64-low.c (target_regsets): Add new kind
16398 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16400 From Martin Pool <mbp@samba.org>:
16401 * server.c (gdbserver_usage): New function.
16404 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16406 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16407 stop_at -> stop_pc.
16409 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16411 * Makefile.in: Remove obsolete code.
16413 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16415 * linux-low.c (regsets_fetch_inferior_registers),
16416 (regsets_store_inferior_registers): Removed cast to int from
16418 * regcache.h: Added declaration of struct inferior_info.
16420 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16422 * inferiors.c (struct inferior_info): Add regcache_data.
16423 (add_inferior): Call create_register_cache.
16424 (clear_inferiors): Call free_register_cache.
16425 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16426 * regcache.c (struct inferior_regcache_data): New.
16427 (registers): Remove.
16428 (get_regcache): New function.
16429 (create_register_cache, free_register_cache): New functions.
16430 (set_register_cache): Don't initialize the register cache here.
16431 (registers_to_string, registers_from_string, register_data): Call
16433 * regcache.h: Add prototypes.
16434 * server.h: Likewise.
16436 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16438 * mem-break.c: New file.
16439 * mem-break.h: New file.
16440 * Makefile.in: Add mem-break.o rule; update server.h
16442 * inferiors.c (struct inferior_info): Add target_data
16444 (clear_inferiors): Free target_data member if set.
16445 (inferior_target_data, set_inferior_target_data): New functions.
16446 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16447 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16448 * linux-low.c (linux_bp_reinsert): New variable.
16449 (struct inferior_linux_data): New.
16450 (linux_create_inferior): Use set_inferior_target_data.
16451 (linux_attach): Likewise. Call add_inferior.
16452 (linux_wait_for_one_inferior): New function.
16453 (linux_wait): Call it.
16454 (linux_write_memory): Add const.
16455 (initialize_low): Call set_breakpoint_data.
16456 * linux-low.h (struct linux_target_ops): Add breakpoint
16458 * server.c (attach_inferior): Remove extra add_inferior
16460 * server.h: Include mem-break.h. Update inferior.c
16462 * target.c (read_inferior_memory)
16463 (write_inferior_memory): New functions.
16464 * target.h (read_inferior_memory)
16465 (write_inferior_memory): Change macros to prototypes.
16466 (struct target_ops): Update comments. Add const to write_memory
16469 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16471 * linux-low.c (usr_store_inferior_registers): Support
16472 registers which are allowed to fail to store.
16473 * linux-low.h (linux_target_ops): Likewise.
16474 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16475 (ppc_cannot_store_register): FPSCR may not be storable.
16477 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16479 * server.h: Include <string.h> if HAVE_STRING_H.
16480 * ChangeLog: Correct paths in last ChangeLog entry.
16482 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16484 * linux-low.h: Remove obsolete prototypes.
16485 (struct linux_target_ops): New.
16486 (extern the_low_target): New.
16487 * linux-low.c (num_regs, regmap): Remove declarations.
16488 (register_addr): Use the_low_target explicitly.
16489 (fetch_register): Likewise.
16490 (usr_fetch_inferior_registers): Likewise.
16491 (usr_store_inferior_registers): Likewise.
16492 * linux-arm-low.c (num_regs): Remove.
16493 (arm_num_regs): Define.
16494 (arm_regmap): Renamed from regmap, made static.
16495 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16497 (arm_cannot_store_register): Renamed from cannot_store_register,
16499 (the_low_target): New.
16500 * linux-i386-low.c (num_regs): Remove.
16501 (i386_num_regs): Define.
16502 (i386_regmap): Renamed from regmap, made static.
16503 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16505 (i386_cannot_store_register): Renamed from cannot_store_register,
16507 (the_low_target): New.
16508 * linux-ia64-low.c (num_regs): Remove.
16509 (ia64_num_regs): Define.
16510 (ia64_regmap): Renamed from regmap, made static.
16511 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16513 (ia64_cannot_store_register): Renamed from cannot_store_register,
16515 (the_low_target): New.
16516 * linux-m68k-low.c (num_regs): Remove.
16517 (m68k_num_regs): Define.
16518 (m68k_regmap): Renamed from regmap, made static.
16519 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16521 (m68k_cannot_store_register): Renamed from cannot_store_register,
16523 (the_low_target): New.
16524 * linux-mips-low.c (num_regs): Remove.
16525 (mips_num_regs): Define.
16526 (mips_regmap): Renamed from regmap, made static.
16527 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16529 (mips_cannot_store_register): Renamed from cannot_store_register,
16531 (the_low_target): New.
16532 * linux-ppc-low.c (num_regs): Remove.
16533 (ppc_num_regs): Define.
16534 (ppc_regmap): Renamed from regmap, made static.
16535 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16537 (ppc_cannot_store_register): Renamed from cannot_store_register,
16539 (the_low_target): New.
16540 * linux-s390-low.c (num_regs): Remove.
16541 (s390_num_regs): Define.
16542 (s390_regmap): Renamed from regmap, made static.
16543 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16545 (s390_cannot_store_register): Renamed from cannot_store_register,
16547 (the_low_target): New.
16548 * linux-sh-low.c (num_regs): Remove.
16549 (sh_num_regs): Define.
16550 (sh_regmap): Renamed from regmap, made static.
16551 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16553 (sh_cannot_store_register): Renamed from cannot_store_register,
16555 (the_low_target): New.
16556 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16557 (the_low_target): New.
16559 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16561 * Makefile.in: Add stamp-h target.
16562 * configure.in: Create stamp-h.
16563 * configure: Regenerated.
16565 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16567 * inferiors.c: New file.
16568 * target.c: New file.
16569 * target.h: New file.
16570 * Makefile.in: Add target.o and inferiors.o. Update
16572 * linux-low.c (inferior_pid): New static variable,
16573 moved from server.c.
16574 (linux_create_inferior): Renamed from create_inferior.
16575 Call add_inferior. Return 0 on success instead of a PID.
16576 (linux_attach): Renamed from myattach.
16577 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16578 (linux_thread_alive): Renamed from mythread_alive.
16579 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16581 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16582 (regsets_store_inferior_registers): Correct error message.
16583 Add missing ``return 0''.
16584 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16585 (linux_store_registers): Renamed from store_inferior_registers.
16586 (linux_read_memory): Renamed from read_inferior_memory.
16587 (linux_write_memory): Renamed from write_inferior_memory.
16588 (linux_target_ops): New structure.
16589 (initialize_low): Call set_target_ops ().
16590 * remote-utils.c (unhexify): New function.
16591 (hexify): New function.
16592 (input_interrupt): Send signals to ``signal_pid''.
16593 * server.c (inferior_pid): Remove.
16594 (start_inferior): Update create_inferior call.
16595 (attach_inferior): Call add_inferior.
16596 (handle_query): New function.
16597 (main): Call handle_query for `q' packets.
16598 * server.h: Include "target.h". Remove obsolete prototypes.
16599 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16601 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16603 * Makefile.in: Add WARN_CFLAGS. Update configury
16605 * configure.in: Check for <string.h>
16606 * configure: Regenerate.
16607 * config.in: Regenerate.
16608 * gdbreplay.c: Include needed system headers.
16609 (remote_open): Remove strchr prototype.
16610 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16611 * regcache.c (supply_register): Change buf argument to const void *.
16612 (supply_register_by_name): Likewise.
16613 (collect_register): Change buf argument to void *.
16614 (collect_register_by_name): Likewise.
16615 * regcache.h: Add missing prototypes.
16616 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16617 * server.c (handle_query): New function.
16618 (attached): New static variable, moved out of main.
16619 (main): Quiet longjmp clobber warnings.
16620 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16621 * utils.c (error): Remove NORETURN.