1 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
3 * tracepoint.h (current_traceframe): Remove declaration.
5 2018-06-18 Alan Hayward <alan.hayward@arm.com>
7 * linux-aarch64-low.c (is_sve_tdesc): New function.
8 (aarch64_sve_regs_copy_to_regcache): Likewise.
9 (aarch64_sve_regs_copy_from_regcache): Likewise.
10 (aarch64_regs_info): Add SVE checks.
11 (initialize_low_arch): Initialize SVE.
13 2018-06-18 Alan Hayward <alan.hayward@arm.com>
15 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
17 2018-06-11 Alan Hayward <alan.hayward@arm.com>
19 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
20 (initialize_low_tracepoint): Likewise
21 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
22 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
24 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
26 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
28 2018-06-11 Alan Hayward <alan.hayward@arm.com>
30 * server.h (PBUFSIZ): Increase size
32 2018-06-11 Alan Hayward <alan.hayward@arm.com>
34 * regcache.c (regcache::raw_compare): New function.
35 * regcache.h (regcache::raw_compare): New declaration.
37 2018-06-11 Alan Hayward <alan.hayward@arm.com>
39 * regcache.c (new_register_cache): Use new.
40 (free_register_cache): Use delete.
41 (register_data): Use const.
42 (supply_register): Move body inside regcache.
43 (regcache::raw_supply): New override function.
44 (collect_register): Move body inside regcache.
45 (regcache::raw_collect): New override function.
46 (regcache::get_register_status): New override function.
47 * regcache.h (struct regcache): Inherit from reg_buffer_common.
49 2018-06-09 Tom Tromey <tom@tromey.com>
51 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
53 (event_queue): Use std::queue.
54 (gdb_event_xfree): Remove.
55 (initialize_event_loop, process_event, wait_for_event): Update.
57 2018-06-08 Stan Cox <scox@redhat.com>
59 * win32-low.c (win32_create_inferior): last_ptid and last_status
60 moved to client_state.
62 2018-06-08 Pedro Alves <palves@redhat.com>
64 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
65 common/common-exceptions.o, common/common-utils.o,
66 common/errors.o, common/print-utils.o and utils.o.
67 * gdbreplay.c: Include "common-defs.h" instead of the two
68 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
70 (perror_with_name): Delete.
71 (remote_open): Use xstrdup instead of strdup.
73 (captured_main): ... this.
76 2018-06-08 Tom Tromey <tom@tromey.com>
78 * linux-low.c (linux_low_read_btrace): Update.
80 2018-06-04 Stan Cox <scox@redhat.com>
82 * server.h (struct client_state): New.
83 * server.c (cont_thread, general_thread, multi_process)
84 (report_fork_events, report_vfork_events, report_exec_events)
85 (report_thread_events, swbreak_feature, hwbreak_feature)
86 (vCont_supported, disable_randomization, pass_signals)
87 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
88 Moved to client_state.
89 * remote-utils.c (remote_debug, noack_mode)
90 (transport_is_reliable): Moved to client_state.
91 * tracepoint.c (current_traceframe): Moved to client_state.
94 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
95 linux-low.c, remote-utils.h, target.c: Use client_state.
97 2018-05-31 Alan Hayward <alan.hayward@arm.com>
99 * configure.srv: Add new c/h file.
101 2018-05-31 Alan Hayward <alan.hayward@arm.com>
103 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
106 2018-05-25 Maciej W. Rozycki <macro@mips.com>
108 * gdb.arch/mips-fpregset-core.exp: New test.
109 * gdb.arch/mips-fpregset-core.c: New test source.
111 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
114 * hostio.c (require_int): Do not report overflow for integers
115 between 0xfffffff and 0x7fffffff.
117 2018-05-22 Maciej W. Rozycki <macro@mips.com>
119 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
120 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
121 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
123 (the_low_target): Wire them.
125 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
127 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
128 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
129 mode. Call collect_register_by_name with vscr using
130 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
131 (ppc_store_vrregset): Add and set vscr_offset variable as in
132 ppc_fill_vrregset. Call supply_register_by_name with vscr using
135 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
137 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
138 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
139 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
141 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
143 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
144 (ppc_store_vsxregset): Likewise.
145 (ppc_fill_vrregset): Likewise.
146 (ppc_store_vrregset): Likewise.
147 (ppc_fill_evrregset): Likewise.
148 (ppc_store_evrregset): Likewise.
149 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
150 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
153 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
155 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
156 wordsize of the inferior. Call ppc_linux_target_wordsize.
158 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
160 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
161 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
162 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
163 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
164 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
165 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
166 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
167 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
168 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
169 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
170 (tdesc_powerpc_e500l): Remove.
171 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
172 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
173 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
174 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
176 (ppc_arch_setup): Remove target description matching code. Fill a
177 ppc_linux_features struct and call ppc_linux_match_description
180 2018-05-22 Maciej W. Rozycki <macro@mips.com>
182 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
183 width of the requested register exceeds the width of the
185 (mips_cannot_store_register): Likewise.
187 2018-05-21 Maciej W. Rozycki <macro@mips.com>
189 * linux-mips-low.c (mips_fetch_register): New function. Update
191 (mips_store_gregset): Supply 0 rather than $restart for $zero.
192 (the_low_target): Wire `mips_fetch_register'.
194 2018-05-10 Joel Brobecker <brobecker@adacore.com>
196 * lynx-i386-low.c (LYNXOS_178): New macro.
197 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
198 the layout on LynxOS-178.
199 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
200 handle floating point registers that are not supported by
203 2018-05-10 Tom Tromey <tom@tromey.com>
205 * configure: Rebuild.
207 2018-05-10 Joel Brobecker <brobecker@adacore.com>
210 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
211 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
212 Use it to set the expedite_regs field in the given tdesc.
213 * x86-tdesc.h: New file.
214 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
215 Adjust following the addition of the new expedite_regs parameter
217 * linux-tic6x-low.c (tic6x_read_description): Likewise.
218 * linux-x86-tdesc.c: #include "x86-tdesc.h".
219 (i386_linux_read_description, amd64_linux_read_description):
220 Adjust following the addition of the new expedite_regs parameter
222 * lynx-i386-low.c: #include "x86-tdesc.h".
223 (lynx_i386_arch_setup): Adjust following the addition of the new
224 expedite_regs parameter to init_target_desc.
225 * nto-x86-low.c: #include "x86-tdesc.h".
226 (nto_x86_arch_setup): Adjust following the addition of the new
227 expedite_regs parameter to init_target_desc.
228 * win32-i386-low.c: #include "x86-tdesc.h".
229 (i386_arch_setup): Adjust following the addition of the new
230 expedite_regs parameter to init_target_desc.
232 2018-05-10 Joel Brobecker <brobecker@adacore.com>
235 * win32-low.c (win32_create_inferior): Add call to my_wait
236 setting last_status global.
238 2018-05-10 Joel Brobecker <brobecker@adacore.com>
241 * win32-low.c (create_process): Only call gdb_tilde_expand if
242 inferior_cwd is not NULL.
244 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
246 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
247 registers to the cache if their values have changed.
248 (i387_xsave_to_cache): Provide default values for x87 control
249 registers when these features are available, but disabled.
250 * regcache.c (supply_register_by_name_zeroed): New function.
251 * regcache.h (supply_register_by_name_zeroed): Declare new
254 2018-05-07 Tom Tromey <tom@tromey.com>
256 * configure: Rebuild.
258 2018-05-04 Tom Tromey <tom@tromey.com>
260 * configure: Rebuild.
262 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
263 Pedro Alves <palves@redhat.com>
265 * linux-aarch64-low.c (aarch64_stopped_data_address):
268 2018-04-27 Tom Tromey <tom@tromey.com>
270 * configure: Rebuild.
272 2018-04-23 Tom Tromey <tom@tromey.com>
274 * configure: Rebuild.
276 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
278 * Makefile.in (depcomp): Add "..".
279 (all_deps_files): New and use it.
281 2018-04-18 Alan Hayward <alan.hayward@arm.com>
283 * configure.srv (aarch64*-*-linux*): Don't include xml.
284 (i[34567]86-*-cygwin*): Likewise.
285 (i[34567]86-*-linux*): Likewise.
286 (i[34567]86-*-lynxos*): Likewise.
287 (i[34567]86-*-mingw32ce*): Likewise.
288 (i[34567]86-*-mingw*): Likewise.
289 (i[34567]86-*-nto*): Likewise.
290 (tic6x-*-uclinux): Likewise.
291 (x86_64-*-linux*): Likewise.
292 (x86_64-*-mingw*): Likewise.
293 (x86_64-*-cygwin*): Likewise.
295 2018-04-18 Alan Hayward <alan.hayward@arm.com>
297 * tdesc.c: Remove xml parameter.
299 2018-04-18 Alan Hayward <alan.hayward@arm.com>
301 * server.c (get_features_xml): Remove cast.
302 * tdesc.c (void target_desc::accept): Fill in function.
303 (tdesc_get_features_xml): Remove old xml creation.
304 (print_xml_feature::visit_pre): Add xml vistor.
305 * tdesc.h (struct target_desc): Make xmltarget mutable.
306 (tdesc_get_features_xml): Remove declaration.
308 2018-04-18 Alan Hayward <alan.hayward@arm.com>
310 * tdesc.c (tdesc_architecture_name): Add new function.
311 (tdesc_osabi_name): Likewise.
312 (tdesc_get_features_xml): Use new functions.
314 2018-04-18 Alan Hayward <alan.hayward@arm.com>
316 * tdesc.c (tdesc_create_flags): Remove.
317 (tdesc_add_flag): Likewise.
318 (tdesc_named_type): Likewise.
319 (tdesc_create_union): Likewise.
320 (tdesc_create_struct): Likewise.
321 (tdesc_create_vector): Likewise.
322 (tdesc_add_bitfield): Likewise.
323 (tdesc_add_field): Likewise.
324 (tdesc_set_struct_size): Likewise.
326 2018-04-18 Alan Hayward <alan.hayward@arm.com>
328 * tdesc.c (~target_desc): Remove implictly deleted items.
329 (init_target_desc): Iterate all features.
330 (tdesc_get_features_xml): Use vector.
331 (tdesc_create_feature): Create feature.
332 * tdesc.h (tdesc_feature) Remove
333 (target_desc): Add features.
335 2018-04-18 Alan Hayward <alan.hayward@arm.com>
337 * Makefile.in: Add common/tdesc.c
338 * tdesc.c (init_target_desc): init all reg_defs from register
340 (tdesc_create_reg): Create tdesc_reg.
341 * tdesc.h (tdesc_feature): Add register vector.
343 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
345 * tdesc.h (struct target_desc) <features>: Change type to
346 std::vector<std::string>.
347 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
349 (tdesc_get_features_xml): Likewise.
350 (tdesc_create_feature): Likewise.
352 2018-03-26 Alan Hayward <alan.hayward@arm.com>
354 * regcache.c (find_register_by_number): Return a ref.
355 (find_regno): Use references.
356 (register_size): Likewise.
357 (register_data): Likewise.
358 * tdesc.c (target_desc::~target_desc): Remove free calls.
359 (target_desc::operator==): Use std::vector compare.
360 (init_target_desc): Use reference.
361 (tdesc_create_reg): Use reg constructors.
362 * tdesc.h (struct target_desc): Replace pointer with object.
364 2018-03-23 Alan Hayward <alan.hayward@arm.com>
366 * regcache.c (find_register_by_number): Make static.
367 (find_regno): Use find_register_by_number
368 * regcache.h (struct reg): Remove declaration.
370 2018-03-23 Alan Hayward <alan.hayward@arm.com>
372 * tdesc.c (target_desc::~target_desc): Move to here.
373 (target_desc::operator==): Likewise.
374 * tdesc.h (target_desc::~target_desc): Move from here.
375 (target_desc::operator==): Likewise.
377 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
379 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
381 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
383 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
385 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
386 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
387 and init_registers_s390_gs_linux64.
389 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
391 * linux-s390-low.c (s390_fill_gs): Remove function.
392 (s390_fill_gsbc): Remove function.
393 (s390_regsets): Set fill functions for the guarded storage regsets
396 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
398 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
399 the word size. Add comment.
400 (s390_get_wordsize): New function.
401 (s390_arch_setup): No longer select a temporary tdesc to fetch the
402 pswm with it. Instead, use s390_get_wordsize to determine the
403 word size first and derive the correct tdesc from that directly.
405 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
407 * Makefile.in: Include silent-rules.mk.
408 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
409 (COMPILE): Add ECHO_CXX.
410 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
411 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
412 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
413 (version-generated.c): Add ECHO_GEN.
414 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
415 (IPAGENT_COMPILE): Add ECHO_CXX.
416 (%-generated.c): Add ECHO_REGDAT.
418 2018-03-14 Tom Tromey <tom@tromey.com>
421 * ax.c (ax_printf): Special case for NULL.
423 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
425 * linux-low.c (linux_qxfer_libraries_svr4): Use
426 xml_escape_text_append.
428 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
430 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
432 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
434 * server.c (handle_general_set): Remove unnecessary xstrdup.
436 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
438 * server.c (parse_debug_format_options): Adjust to
439 delim_string_to_char_ptr_vec changes.
440 * thread-db.c (thread_db_load_search): Adjust to
441 dirnames_to_char_ptr_vec changes.
443 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
445 * target.h (target_enable_btrace, target_disable_btrace)
446 (target_read_btrace, target_read_btrace_conf): Turn macro into
447 inline function. Throw error if target method is not defined.
448 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
449 check for btrace target method. Be prepared to handle exceptions
450 from btrace target methods.
452 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
454 * server.c (captured_main): Change order of error message printed
455 when the current working directory cannot be found.
457 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
459 * server.c: Include "filenames.h" and "pathstuff.h".
460 (program_name): Delete variable.
461 (program_path): New anonymous class.
462 (get_exec_wrapper): Use "program_path" instead of
464 (handle_v_run): Likewise.
465 (captured_main): Likewise.
466 (process_serial_event): Likewise.
468 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
470 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
471 (OBJS): Add "pathstuff.o".
472 * server.c (current_directory): New global variable.
473 (captured_main): Initialize "current_directory".
475 2018-02-26 Alan Hayward <alan.hayward@arm.com>
477 * tdesc.c: Use common/tdesc.h.
480 2018-02-20 Alan Hayward <alan.hayward@arm.com>
481 Simon Marchi <simon.marchi@ericsson.com>
483 * Makefile.in: Switch order of make rules.
485 2018-02-19 Alan Hayward <alan.hayward@arm.com>
487 * Makefile.in: Add common directory in build.
488 * configure.ac: Add common reference.
489 * configure: Regenerate.
491 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
493 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
494 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
495 * spu-low.c (spu_target_ops): Likewise.
496 * win32-low.c (win32_target_ops): Likewise.
497 * server.c (supported_btrace_packets): Report packets unconditionally.
498 * target.h (target_ops) <supports_btrace>: Remove.
499 (target_supports_btrace): Remove.
501 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
503 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
504 (handle_btrace_disable): Change return type to void. Use exceptions
506 (handle_btrace_general_set): Catch exception and copy message to
509 2018-02-08 Tom Tromey <tom@tromey.com>
511 * linux-low.c (install_software_single_step_breakpoints): Use
513 * inferiors.c (make_cleanup_restore_current_thread): Remove.
514 (do_restore_current_thread_cleanup): Remove.
515 * gdbthread.h (make_cleanup_restore_current_thread): Don't
518 2018-02-08 Tom Tromey <tom@tromey.com>
520 * mem-break.c (set_raw_breakpoint_at): Use
521 gdb::unique_xmalloc_ptr.
523 2018-01-30 Pedro Alves <palves@redhat.com>
526 * target.c (target_terminal::terminal_state): Rename to ...
527 (target_terminal::m_terminal_state): ... this.
529 2018-01-19 James Clarke <jrtc27@jrtc27.com>
531 * linux-low.c (handle_extended_wait): Surround call to
532 thread_db_notice_clone with #ifdef USE_THREAD_DB.
534 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
536 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
537 linux_ptrace_attach_fail_reason_string now returning an
539 (linux_attach): Likewise.
540 * thread-db.c (attach_thread): Likewise.
542 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
545 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
546 checking for fs_base/gs_base fields in struct user_regs_struct.
547 * configure: Regenerate.
549 2018-01-16 Yao Qi <yao.qi@linaro.org>
552 * linux-low.c (fetch_register): Call supply_register instead of
555 2018-01-08 Yao Qi <yao.qi@linaro.org>
556 Simon Marchi <simon.marchi@ericsson.com>
558 * Makefile.in (OBS): Remove selftest.o.
559 * configure.ac: Set srv_selftest_objs if $development is true.
560 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
561 * configure: Re-generated.
562 * server.c (captured_main): Wrap variable selftest_filter with
565 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
567 * server.c (parse_debug_format_options): Return std::string.
568 (handle_monitor_command, captured_main): Adjust.
570 2018-01-05 Pedro Alves <palves@redhat.com>
573 * server.c (captured_main): Pass quiet=false to
574 save_original_signals_state.
576 2018-01-01 Joel Brobecker <brobecker@adacore.com>
578 * gdbreplay.c (gdbreplay_version): Update copyright year in
580 * server.c (gdbserver_version): Likewise.
582 2017-12-08 Tom Tromey <tom@tromey.com>
584 * ax.c (ax_printf): Update.
586 2017-12-07 Yao Qi <yao.qi@linaro.org>
588 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
589 aarch64_linux_read_description.
590 * linux-amd64-ipa.c (idx2mask): New array.
591 (get_ipa_tdesc): Move idx2mask out.
592 (initialize_low_tracepoint): Initialize target descriptions.
593 * linux-i386-ipa.c (idx2mask): New array.
594 (get_ipa_tdesc): Move idx2mask out.
595 (initialize_low_tracepoint): Initialize target descriptions.
597 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
599 * tdesc.c (struct tdesc_type): Change return type.
600 (tdesc_add_flag): Change parameter type.
601 (tdesc_add_bitfield): Likewise.
602 (tdesc_add_field): Likewise.
603 (tdesc_set_struct_size): Likewise.
605 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
607 * regcache.c (registers_to_string): Remove unused variable.
609 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
611 * inferiors.c (for_each_inferior_with_data): Remove.
612 * inferiors.h (for_each_inferior_with_data): Remove.
613 * server.c (handle_qxfer_threads_worker): Change parameter type.
614 (handle_qxfer_threads_proper): Use for_each_thread.
616 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
618 * inferiors.c (for_each_inferior): Remove.
619 (clear_inferiors): Use for_each_thread.
620 * inferiors.h (for_each_inferior): Remove.
621 * linux-low.c (linux_wait_for_event_filtered): Use
623 (linux_stabilize_threads): Likewise.
624 * regcache.c (regcache_release): Likewise.
625 * server.c (gdb_wants_all_threads_stopped): Likewise.
626 (clear_pending_status_callback): Remove.
627 (handle_status): Use for_each_thread.
628 (captured_main): Likewise.
629 * win32-low.c (child_init_thread_list): Likewise.
630 (win32_clear_inferiors): Likewise.
631 (fake_breakpoint_event): Likewise.
633 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
635 * inferiors.h (find_inferior): Remove.
636 * inferiors.c (find_inferior): Remove.
638 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
640 * linux-low.c (resume_status_pending_p): Update comment.
641 (need_step_over_p): Update comment.
643 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
645 * linux-low.c (proceed_one_lwp): Return void, change parameter
647 (unsuspend_and_proceed_one_lwp): Likewise.
648 (proceed_all_lwps): Use for_each_thread.
649 (unstop_all_lwps): Likewise.
651 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
653 * linux-low.c (linux_resume_one_thread): Return void, take
655 (linux_resume): Use for_each_thread.
657 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
659 * linux-low.c (send_sigstop_callback): Return void, change
660 parameter type. Rename to...
661 (send_sigstop): ... this.
662 (suspend_and_send_sigstop_callback): Return void, change parameter
664 (suspend_and_send_sigstop): ... this.
665 (stop_all_lwps): Use for_each_thread.
667 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
669 * linux-low.c (lwp_running): Return bool, remove unused
671 (linux_stabilize_threads): Use find_thread.
673 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
675 * linux-low.c (select_singlestep_lwp_callback): Remove.
676 (count_events_callback): Remove.
677 (select_event_lwp_callback): Remove.
678 (select_event_lwp): Use find_thread/for_each_thread.
680 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
682 * linux-low.c (not_stopped_callback): Return bool, take filter
684 (linux_wait_for_event_filtered): Use find_thread.
685 (linux_wait_1): Likewise.
687 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
689 * linux-low.c (same_lwp): Remove.
690 (find_lwp_pid): Use find_thread.
692 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
694 * linux-low.c (delete_lwp_callback): Remove.
695 (linux_mourn): Use for_each_thread.
697 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
699 * linux-low.c (linux_detach_lwp_callback): Return void, remove
700 args parameter, don't check for pid.
701 (linux_detach): Use for_each_thread.
703 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
705 * linux-low.c (struct counter): Remove.
706 (second_thread_of_pid_p): Remove.
707 (last_thread_of_process_p): Use find_thread.
709 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
711 * inferiors.c (find_inferior_in_random): Remove.
712 * inferiors.h (find_inferior_in_random): Remove.
713 * linux-low.c (status_pending_p_callback): Return bool, accept
714 parameter ptid directly.
715 (linux_wait_for_event_filtered): Use find_thread_in_random.
716 (linux_wait_1): Likewise.
718 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
720 * inferiors.c (find_inferior_id): Remove.
721 (find_thread_ptid): Move implemention from find_inferior_id to
723 * inferiors.h (find_inferior_id): Remove.
724 * server.c (handle_status): Use find_thread_ptid.
725 (process_serial_event): Likewise.
726 * thread-db.c (find_one_thread): Likewise.
727 (thread_db_thread_handle): Likewise.
728 * win32-low.c (thread_rec): Likewise.
729 (child_delete_thread): Likewise.
730 (win32_thread_alive): Likewise.
731 (get_child_debug_event): Likewise.
733 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
735 * linux-mips-low.c (update_watch_registers_callback): Return
736 void, remove pid_p parameter, don't check for pid.
737 (mips_insert_point, mips_remove_point): Use for_each_thread.
739 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
741 * lynx.low (lynx_delete_thread_callback): Remove.
742 (lynx_mourn): Use for_each_thread.
744 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
746 * regcache.c (regcache_invalidate_one): Remove.
747 (regcache_invalidate_pid): use for_each_thread.
749 2017-11-26 Tom Tromey <tom@tromey.com>
751 * linux-low.c (linux_create_inferior): Update.
753 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
755 * spu-low.c (spu_create_inferior): Fix typo in argument name.
757 2017-11-24 Alan Hayward <alan.hayward@arm.com>
759 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
760 * linux-aarch64-low.c (initialize_low_arch): Call init func.
761 * linux-aarch64-tdesc-selftest.c: New file.
762 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
764 2017-11-24 Alan Hayward <alan.hayward@arm.com>
766 * configure.srv: Add new file.
767 * linux-aarch64-low.c (initialize_low_arch): Call init func.
768 * linux-aarch64-tdesc-selftest.c: New file.
769 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
771 2017-11-24 Alan Hayward <alan.hayward@arm.com>
773 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
774 * linux-aarch64-low.c (initialize_low_arch): Remove init.
775 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
777 2017-11-24 Alan Hayward <alan.hayward@arm.com>
779 * configure.srv: Add new files.
780 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
781 aarch64_linux_read_description.
782 * linux-aarch64-low.c (aarch64_linux_read_description):
783 Merge with aarch64_arch_setup.
784 (aarch64_arch_setup): Call aarch64_linux_read_description.
785 * linux-aarch64-tdesc.c: New file.
786 * linux-aarch64-tdesc.h: New file.
788 2017-11-24 Yao Qi <yao.qi@linaro.org>
790 * configure.srv: Set $srv_regobj for tic6x-linux.
791 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
792 (tic6x_read_description): Move some code to tic6x_arch_setup.
793 (tic6x_tdesc_test): New function.
794 (initialize_low_arch): Call selftests::register_test.
796 2017-11-22 Yao Qi <yao.qi@linaro.org>
798 * remote-utils.c (prepare_resume_reply): Use memcpy.
800 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
802 * linux-low.c (kill_one_lwp_callback): Return void, take
803 argument directly, don't filter on pid.
804 (linux_kill): Use for_each_thread.
806 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
808 * linux-low.c (need_step_over_p): Return bool, remove dummy
810 (linux_resume, proceed_all_lwps): Use find_thread.
812 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
814 * linux-low.c (resume_status_pending_p): Return bool, remove
816 (linux_resume): Use find_thread.
818 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
820 * linux-low.c (struct thread_resume_array): Remove.
821 (linux_set_resume_request): Return void, take arguments
823 (linux_resume): Use for_each_thread.
825 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
827 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
828 return bool, remove data argument.
829 (linux_stabilize_threads): Use find_thread.
831 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
833 * linux-low.c (unsuspend_one_lwp): Remove.
834 (unsuspend_all_lwps): Use for_each_thread, inline code from
837 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
839 * gdbthread.h (find_thread): Add overload with ptid_t filter.
840 * linux-low.c (struct iterate_over_lwps_args): Remove.
841 (iterate_over_lwps_filter): Remove.
842 (iterate_over_lwps): Use find_thread.
844 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
846 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
847 (linux_handle_new_gdb_connection): Use for_each_thread, inline
848 code from reset_lwp_ptrace_options_callback.
850 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
852 * linux-arm-low.c (struct update_registers_data): Remove.
853 (update_registers_callback): Return void, take arguments
854 directly, don't check thread's pid.
855 (arm_insert_point, arm_remove_point): Use for_each_thread.
857 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
859 * win32-low.c (continue_one_thread): Return void, take argument
861 (child_continue): Use for_each_thread.
863 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
865 * win32-i386-low.c (update_debug_registers_callback): Rename
867 (update_debug_registers): ... this, return void, remove pid_p arg.
868 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
870 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
872 * inferiors.h (struct process_info): Add constructor, initialize
874 <syscalls_to_catch>: Change type to std::vector<int>.
875 * inferiors.c (add_process): Allocate process_info with new.
876 (remove_process): Free process_info with delete.
877 * linux-low.c (handle_extended_wait): Adjust.
878 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
879 * server.c (handle_general_set): Adjust.
881 2017-11-16 Pedro Alves <palves@redhat.com>
883 * remote-utils.c (remote_close): Block SIGIO signals instead of
884 uninstalling the SIGIO handler.
886 2017-11-16 Alan Hayward <alan.hayward@arm.com>
888 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
890 2017-11-16 Yao Qi <yao.qi@linaro.org>
892 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
893 (tic6x_store_gregset): Likewise.
894 (tic6x_usrregs_info): Move it up.
896 2017-11-15 Alan Hayward <alan.hayward@arm.com>
898 * Makefile.in: Update arch rules.
899 * configure.srv: Explicitly mark arch/ files.
901 2017-11-13 Andreas Schwab <schwab@suse.de>
903 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
905 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
907 2017-11-06 Pedro Alves <palves@redhat.com>
909 * config.in, configure: Regenerate.
911 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
913 * target.c (struct thread_search): Remove.
914 (thread_search_callback): Remove.
915 (prepare_to_access_memory): Use for_each_thread instead of
916 find_inferior. Inline code from thread_search_callback.
918 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
920 * server.c (struct visit_actioned_threads_data): Remove.
921 (visit_actioned_threads): Change prototype to take arguments
923 (resume): Use find_thread instead of find_inferior.
925 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
927 * server.c (queue_stop_reply_callback): Change prototype, return
929 (find_status_pending_thread_callback): Remove.
930 (handle_status): Replace find_inferior with find_thread and
933 2017-10-25 Alan Hayward <alan.hayward@arm.com>
935 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
937 (aarch64_store_gregset): Likewise.
938 (aarch64_fill_fpregset): Likewise.
939 (aarch64_store_fpregset): Likewise.
941 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
943 * gdbthread.h (find_thread, for_each_thread): New functions.
944 * inferiors.c (thread_of_pid): Remove.
945 (find_any_thread_of_pid): Use find_thread.
946 * linux-low.c (num_lwps): Use for_each_thread.
948 2017-10-17 Yao Qi <yao.qi@linaro.org>
950 * Makefile.in: Remove one rule.
951 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
953 2017-10-17 Yao Qi <yao.qi@linaro.org>
955 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
956 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
958 2017-10-17 Yao Qi <yao.qi@linaro.org>
960 * configure.srv: Rename arm.o with arch/arm.o.
962 2017-10-17 Yao Qi <yao.qi@linaro.org>
964 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
965 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
966 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
967 (arch-i386.o, arch-amd64.o): Remove rules.
968 (arch/%.o): New rule.
969 Update POSTCOMPILE and COMPILE.pre.
970 * configure.ac: Invoke AC_CONFIG_COMMANDS.
971 * configure: Re-generated.
972 * configure.srv: Replace arch-i386.o with arch/i386.o.
973 Replace arch-amd64.o with arch/amd64.o.
975 2017-10-16 Yao Qi <yao.qi@linaro.org>
977 * configure: Regenerated.
979 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
981 * inferiors.h: (struct inferior_list): Remove.
982 (struct inferior_list_entry); Remove.
983 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
984 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
985 get_first_inferior): Remove.
986 (for_each_inferior, for_each_inferior_with_data, find_inferior,
987 find_inferior_id, find_inferior_in_random): Change signature.
988 * inferiors.c (all_threads): Change type to
989 std::list<thread_info *>.
990 (get_thread): Remove macro.
991 (find_inferior, find_inferior_id): Change signature, implement
993 (find_inferior_in_random): Change signature, implement using
994 find_thread_in_random.
995 (for_each_inferior, for_each_inferior_with_data): Change
996 signature, implement using for_each_thread.
997 (add_inferior_to_list, remove_inferior): Remove.
998 (add_thread, get_first_thread, thread_of_pid,
999 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1000 (get_first_inferior, one_inferior_p, clear_inferior_list):
1002 (clear_inferiors, get_thread_process): Update.
1003 * gdbthread.h: Include <list>.
1004 (struct thread_info) <entry>: Remove field.
1006 (all_threads): Change type to std::list<thread_info *>.
1007 (get_first_inferior): Add doc.
1008 (find_thread, for_each_thread, find_thread_in_random): New
1010 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1011 * linux-arm-low.c (update_registers_callback): Update.
1012 * linux-low.c (second_thread_of_pid_p): Update.
1013 (kill_one_lwp_callback, linux_detach_lwp_callback,
1014 delete_lwp_callback, status_pending_p_callback, same_lwp,
1015 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1016 iterate_over_lwps, not_stopped_callback,
1017 resume_stopped_resumed_lwps, count_events_callback,
1018 select_singlestep_lwp_callback, select_event_lwp_callback,
1019 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1020 suspend_and_send_sigstop_callback, wait_for_sigstop,
1021 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1022 lwp_running, linux_set_resume_request, resume_status_pending_p,
1023 need_step_over_p, start_step_over, linux_resume_one_thread,
1024 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1025 reset_lwp_ptrace_options_callback): Update.
1026 * linux-mips-low.c (update_watch_registers_callback): Update.
1027 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1029 (free_register_cache_thread_one): Remove.
1030 (regcache_release): Update.
1031 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1032 handle_qxfer_threads_worker): Update.
1033 (handle_query): Update, use list iterator.
1034 (visit_actioned_threads, handle_pending_status,
1035 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1036 clear_pending_status_callback, set_pending_status_callback,
1037 find_status_pending_thread_callback, handle_status,
1038 process_serial_event): Update.
1039 * target.c (thread_search_callback): Update.
1040 * thread-db.c (thread_db_get_tls_address): Update.
1041 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1043 * win32-i386-low.c (update_debug_registers_callback): Update.
1044 * win32-low.c (delete_thread_info, child_delete_thread,
1045 continue_one_thread, suspend_one_thread,
1046 get_child_debug_event): Adjust.
1048 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1050 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1051 * inferiors.h: Include <list>.
1052 (struct process_info) <entry>: Remove field.
1054 (pid_of): Change macro to function.
1055 (ptid_of, lwpid_of): Remove macro.
1056 (all_processes): Change type to std::list<process_info *>.
1057 (ALL_PROCESSES): Remove macro.
1058 (for_each_process, find_process): New function.
1059 * inferiors.c (all_processes): Change type to
1060 std::list<process_info *>.
1061 (find_thread_process): Adjust.
1062 (add_process): Likewise.
1063 (remove_process): Likewise.
1064 (find_process_pid): Likewise.
1065 (get_first_process): Likewise.
1066 (started_inferior_callback): Remove.
1067 (have_started_inferiors_p): Adjust.
1068 (attached_inferior_callback): Remove.
1069 (have_attached_inferiors_p): Adjust.
1070 * linux-low.c (check_zombie_leaders): Likewise.
1071 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1072 (x86_linux_update_xmltarget): Adjust.
1073 * server.c (handle_query): Likewise.
1074 (gdb_reattached_process): Remove.
1075 (handle_status): Adjust.
1076 (kill_inferior_callback): Likewise.
1077 (detach_or_kill_inferior): Remove.
1078 (print_started_pid): Likewise.
1079 (print_attached_pid): Likewise.
1080 (detach_or_kill_for_exit): Update.
1081 (process_serial_event): Likewise.
1082 * linux-arm-low.c (arm_new_fork): Likewise.
1084 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1086 * dll.h: Include <list>.
1087 (struct dll_info): Add constructor.
1088 <entry>: Remove field.
1089 (all_dlls): Change type to std::list<dll_info>.
1090 * dll.c: Include <algorithm>.
1091 (get_dll): Remove macro.
1092 (all_dlls): Change type to std::list<dll_info *>.
1093 (free_one_dll): Remove.
1094 (match_dll): Likewise.
1095 (loaded_dll): Adjust.
1096 (unloaded_dll): Adjust to all_dlls type change, use
1097 std::find_if. Inline code from match_dll.
1098 (clear_dlls): Adjust to all_dlls type change.
1099 * server.c (emit_dll_description): Remove.
1100 (handle_qxfer_libraries): Adjust to all_dlls type change,
1101 integrate emit_dll_description's functionality.
1103 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1105 * linux-low.h (struct linux_target_ops) <delete_process>: New
1107 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1108 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1109 (struct linux_target_ops): Add delete_process callback.
1110 * linux-arm-low.c (arm_delete_process): New.
1111 (struct linux_target_ops): Add delete_process callback.
1112 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1113 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1114 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1115 * linux-mips-low.c (mips_linux_delete_process): New.
1116 (struct linux_target_ops): Add delete_process callback.
1117 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1118 * linux-s390-low.c (struct linux_target_ops): Likewise.
1119 * linux-sh-low.c (struct linux_target_ops): Likewise.
1120 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1121 * linux-tile-low.c (struct linux_target_ops): Likewise.
1122 * linux-x86-low.c (x86_linux_delete_process): New.
1123 (struct linux_target_ops): Add delete_process callback.
1124 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1126 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1128 * linux-aarch64-low.c (the_low_target): Add thread delete
1130 * linux-arm-low.c (arm_delete_thread): New function.
1131 (the_low_target): Add thread delete callback.
1132 * linux-bfin-low.c (the_low_target): Likewise.
1133 * linux-crisv32-low.c (the_low_target): Likewise.
1134 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1136 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1138 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1139 * linux-mips-low.c (mips_linux_delete_thread): New function.
1140 (the_low_target): Add thread delete callback.
1141 * linux-ppc-low.c (the_low_target): Likewise.
1142 * linux-s390-low.c (the_low_target): Likewise.
1143 * linux-sh-low.c (the_low_target): Likewise.
1144 * linux-tic6x-low.c (the_low_target): Likewise.
1145 * linux-tile-low.c (the_low_target): Likewise.
1146 * linux-x86-low.c (the_low_target): Likewise.
1147 * linux-xtensa-low.c (the_low_target): Likewise.
1149 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1151 * win32-low.c: Include "common-inferior.h".
1153 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1155 * inferiors.c (set_inferior_cwd): New function.
1156 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1157 (handle_query): Inform that QSetWorkingDir is supported.
1158 * win32-low.c (create_process): Pass the inferior's cwd to
1161 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1163 * inferiors.c (current_inferior_cwd): New global variable.
1164 (get_inferior_cwd): New function.
1165 * inferiors.h (struct process_info) <cwd>: New field.
1167 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1169 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1170 (OBS): Add gdb_tilde_expand.o.
1172 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1174 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1175 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1177 2017-09-29 Pedro Alves <palves@redhat.com>
1179 * ax.c (gdb_parse_agent_expr): Constify.
1180 * ax.h (gdb_parse_agent_expr): Constify.
1181 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1183 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1184 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1185 * remote-utils.h (read_ptid): Constify.
1186 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1187 (process_point_options, process_serial_event): Constify.
1188 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1189 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1190 (cmd_qtbuffer): Constify.
1192 2017-09-29 Pedro Alves <palves@redhat.com>
1194 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1197 2017-09-29 Pedro Alves <palves@redhat.com>
1199 * linux-low.c (handle_extended_wait): Pass parent thread instead
1200 of process to thread_db_notice_clone.
1201 * linux-low.h (thread_db_notice_clone): Replace parent process
1202 parameter with parent thread parameter.
1203 * thread-db.c (find_one_thread): Add comment.
1204 (thread_db_notice_clone): Replace parent process parameter with
1205 parent thread parameter. Temporarily switch to the parent thread.
1207 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1209 * gdbthread.h: Include "common-gdbthread.h".
1210 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1211 "if" when validating the ptid.
1212 * remote-utils.c: Include "gdbthread.h".
1213 (prepare_resume_reply): Use "switch_to_thread".
1214 * target.c (done_accessing_memory): Likewise.
1216 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1218 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1219 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1220 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1221 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1222 s390x-gs-linux64-ipa.o to ipa_obj.
1223 * linux-s390-low.c (HWCAP_S390_GS): New define.
1224 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1226 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1227 (s390_arch_setup): Check for guarded-storage support and choose
1229 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1230 init_registers_s390x_gs_linux64.
1231 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1233 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1234 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1236 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1238 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1240 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1242 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1243 (thread_db_thread_handle): Declare.
1244 * linux-low.c (linux_target_ops): Initialize thread_handle.
1245 * server.c (handle_qxfer_threads_worker): Add support for
1247 * target.h (struct target_ops): Add new function pointer,
1249 (target_thread_handle): Define.
1250 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1252 (thread_db_thread_handle): New function.
1254 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1256 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1257 * linux-low.h (thread_db_notice_clone): Declare.
1258 * thread-db.c (thread_db_notice_clone): New function.
1260 2017-09-21 Pedro Alves <palves@redhat.com>
1262 * server.c (gdb_read_memory, handle_status, process_serial_event)
1263 (handle_serial_event, handle_target_event): Adjust to
1264 set_desired_thread prototype change.
1265 * target.c (set_desired_thread): Remove 'use_general' parameter
1267 * target.h (set_desired_thread): Remove 'use_general' parameter.
1269 2017-09-20 Tom Tromey <tom@tromey.com>
1271 * target.c (target_terminal::terminal_state): Define.
1272 (target_terminal::init): Rename from target_terminal_init.
1273 (target_terminal::inferior): Rename from
1274 target_terminal_inferior.
1275 (target_terminal::ours): Rename from target_terminal_ours.
1276 (target_terminal::ours_for_output, target_terminal::info): New.
1278 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1280 * server.c (accumulate_file_name_length): Remove.
1281 (emit_dll_description): Adjust to std::string change.
1282 (handle_qxfer_libraries): Use std::string to hold document.
1284 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1286 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1287 return type of xml_escape_text.
1288 * server.c (emit_dll_description): Likewise.
1290 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1292 * server.c (captured_main): Accept argument for --selftest.
1293 Update run_tests call.
1294 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1295 when registering selftests.
1297 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1299 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1300 instead of "VEC" for "target_desc.reg_defs".
1301 (regcache_cpy): Likewise.
1302 (registers_to_string): Likewise.
1303 (registers_from_string): Likewise.
1304 (find_regno): Likewise.
1305 (supply_regblock): Likewise.
1306 (regcache_raw_read_unsigned): Likewise.
1307 * tdesc.c (init_target_desc): Likewise.
1308 (tdesc_create_reg): Likewise.
1309 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1310 (struct target_desc) <reg_defs>: Convert to "std::vector".
1311 (target_desc): Do not initialize "reg_defs".
1312 (~target_desc): Update code to use "std::vector" instead of "VEC"
1313 for "target_desc.reg_defs".
1314 (operator==): Likewise.
1316 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1318 * inferiors.h (thread_to_gdb_id): Remove.
1319 * inferiors.c (thread_to_gdb_id): Remove.
1320 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1321 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1322 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1324 * nto-low.c (nto_fetch_registers, nto_store_registers,
1325 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1327 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1329 * inferiors.h (gdb_id_to_thread_id): Remove.
1330 * inferiors.c (gdb_id_to_thread_id): Remove.
1331 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1332 removal. Move pid declaration closer to where it's used.
1334 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1336 * server.c (handle_detach): New function.
1337 (process_serial_event): Move code out, call handle_detach.
1339 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1341 * server.c (require_running): Rename to ...
1342 (require_running_or_return): ... this ...
1343 (require_running_or_break): ... and this.
1344 (handle_query, process_serial_event): Adjust.
1346 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1348 * linux-low.c (linux_set_resume_request): Remove unused
1351 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1353 * server.c (first_thread_of): Remove.
1354 (process_serial_event): Replace usage of first_thread_of with
1355 find_any_thread_of_pid.
1356 * tracepoint.c (same_process_p): Remove.
1357 (gdb_agent_about_to_close): Replace usage of same_process_p with
1358 find_any_thread_of_pid.
1359 * linux-x86-low.c (same_process_callback): Remove.
1360 (x86_arch_setup_process_callback): Replace usage of
1361 same_process_callback with find_any_thread_of_pid.
1362 * thread-db.c (any_thread_of): Remove.
1363 (switch_to_process): Replace usage of any_thread_of with
1364 find_any_thread_of_pid.
1365 * inferiors.c (thread_pid_matches_callback): Remove.
1366 (find_thread_process): Adjust to use find_any_thread_of_pid.
1368 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1370 * regcache.c (get_thread_regcache): Guard calls to "memset"
1373 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1375 * linux-low.c (handle_extended_wait): Use
1376 "allocate_target_description" instead of "XNEW".
1377 * linux-x86-low.c (initialize_low_arch): Likewise.
1379 2017-09-05 Yao Qi <yao.qi@linaro.org>
1381 * configure.srv (srv_i386_regobj): Remove.
1382 (srv_amd64_regobj): Remove.
1383 (srv_regobj): Set it to "" for x86 non-linux targets.
1384 * linux-x86-tdesc.c (i386_linux_read_description):
1385 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1386 (init_registers_i386): Remove the declaration.
1387 (tdesc_i386): Remove the declaration.
1388 (lynx_i386_arch_setup): Call i386_create_target_description.
1389 * nto-x86-low.c: Likewise.
1390 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1391 [!__x86_64__]: include arch/i386.h.
1392 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1394 2017-09-05 Yao Qi <yao.qi@linaro.org>
1396 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1397 i386/amd64-XXX-linux from it.
1399 2017-09-05 Yao Qi <yao.qi@linaro.org>
1401 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1403 (ipa_amd64_linux_regobj): Remove.
1404 (ipa_x32_linux_regobj): Remove.
1406 2017-09-05 Yao Qi <yao.qi@linaro.org>
1408 * Makefile.in (arch-amd64.o): New rule.
1409 * configure.srv: Append arch-amd64.o.
1410 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1411 (get_ipa_tdesc): Call amd64_linux_read_description.
1412 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1413 and init_registers_amd64_XXX.
1414 * linux-x86-low.c (x86_linux_read_description): Call
1415 amd64_linux_read_description.
1416 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1417 (initialize_low_arch): Don't call init_registers_x32_XXX and
1418 init_registers_amd64_XXX.
1419 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1420 and tdesc_amd64_XXX.
1421 [__x86_64__] (amd64_tdesc_test): New function.
1422 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1423 and init_registers_amd64_XXX.
1424 * linux-x86-tdesc.c: Include arch/amd64.h.
1425 (xcr0_to_tdesc_idx): New function.
1426 (i386_linux_read_description): New function.
1427 (amd64_get_ipa_tdesc_idx): New function.
1428 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1429 (amd64_get_ipa_tdesc): Declare.
1431 2017-09-05 Yao Qi <yao.qi@linaro.org>
1433 * configure.srv (srv_i386_linux_xmlfiles): Remove
1434 i386/i386-XXX-linux.xml from it.
1436 2017-09-05 Yao Qi <yao.qi@linaro.org>
1438 * configure.srv: Set srv_i386_linux_regobj empty if $development
1440 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1441 initialize_low_tdesc.
1442 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1443 with #if initialize_low_tdesc.
1444 * linux-x86-tdesc-selftest.c: New file.
1445 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1447 2017-09-05 Yao Qi <yao.qi@linaro.org>
1449 * Makefile.in (arch-i386.o): New rule.
1450 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1451 (x86_64-*-linux*): Likewise.
1452 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1453 include arch/i386.h.
1454 (i386_linux_read_description): Remove code and call
1455 i386_create_target_description.
1456 * tdesc.c (allocate_target_description): New function.
1457 * tdesc.h (set_tdesc_architecture): Remove declaration.
1458 (set_tdesc_osabi): Likewise.
1460 2017-09-05 Yao Qi <yao.qi@linaro.org>
1462 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1463 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1464 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1466 * server.c (get_features_xml): Call tdesc_get_features_xml.
1467 * tdesc.c (set_tdesc_architecture): New function.
1468 (set_tdesc_osabi): New function.
1469 (tdesc_get_features_xml): New function.
1470 (tdesc_create_feature): Add an argument.
1471 * tdesc.h (struct target_desc) <features>: New field.
1472 <arch, osabi>: New field.
1473 (~target_desc): xfree features, arch, and osabi.
1474 (target_desc::oerator==): Don't compare .xmltarget.
1475 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1476 (set_tdesc_osabi): Likewise.
1477 (tdesc_get_features_xml): Likewise.
1479 2017-09-05 Yao Qi <yao.qi@linaro.org>
1481 * linux-x86-tdesc.c: Include selftest.h.
1482 (i386_tdesc_test): New function.
1483 (initialize_low_tdesc): Call selftests::register_test.
1484 * tdesc.h: Include regdef.h.
1485 (target_desc): Override operator == and !=.
1487 2017-09-05 Yao Qi <yao.qi@linaro.org>
1489 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1490 (ipa_obj): Likewise.
1491 * linux-i386-ipa.c: Include common/x86-xstate.h
1492 (get_ipa_tdesc): Call i386_linux_read_description.
1493 (initialize_low_tracepoint): Don't call init_registers_XXX
1494 functions, call initialize_low_tdesc instead.
1495 * linux-x86-low.c (x86_linux_read_description): Call
1496 i386_linux_read_description.
1497 (initialize_low_arch): Don't call init_registers_i386_XXX
1498 functions, call initialize_low_tdesc.
1499 * linux-x86-tdesc.c: New file.
1500 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1501 (i386_get_ipa_tdesc_idx): Declare.
1502 (i386_get_ipa_tdesc): Declare.
1503 (initialize_low_tdesc): Declare.
1505 2017-09-05 Yao Qi <yao.qi@linaro.org>
1507 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1510 2017-09-05 Yao Qi <yao.qi@linaro.org>
1512 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1513 * regcache.c (get_thread_regcache): Use VEC_length.
1514 (init_register_cache): Likewise.
1515 (regcache_cpy): Likewise.
1516 (registers_to_string): Iterate reg_defs via VEC_iterate.
1517 (find_regno): Likewise.
1518 (find_register_by_number): Use VEC_index.
1519 (register_size): Call find_register_by_number.
1520 (register_data): Call find_register_by_number.
1521 (supply_regblock): Use VEC_length.
1522 (regcache_raw_read_unsigned): Likewise.
1523 * tdesc.c (init_target_desc): Iterate reg_defs via
1525 (default_description): Update initializer.
1526 (copy_target_description): Don't update field num_registers.
1527 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1528 <num_registers>: Remove.
1530 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1532 * Makefile.in (.SECONDARY): Define target.
1534 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1536 * linux-low.c (linux_wait_1): Adjust.
1537 * server.c (queue_stop_reply_callback): Adjust.
1539 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1541 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1542 QEnvironmentUnset and QEnvironmentReset packets.
1543 (handle_query): Inform remote that QEnvironmentHexEncoded,
1544 QEnvironmentUnset and QEnvironmentReset are supported.
1546 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1548 * inferiors.h (inferior_target_data): Rename to ...
1549 (thread_target_data): ... this.
1550 (inferior_regcache_data): Rename to ...
1551 (thread_regcache_data): ... this.
1552 (set_inferior_regcache_data): Rename to ...
1553 (set_thread_regcache_data): ... this.
1554 * inferiors.c (inferior_target_data): Rename to ...
1555 (thread_target_data): ... this.
1556 (inferior_regcache_data): Rename to ...
1557 (thread_regcache_data): ... this.
1558 (set_inferior_regcache_data): Rename to ...
1559 (set_thread_regcache_data): ... this.
1560 (free_one_thread): Update.
1561 * linux-low.h (get_thread_lwp): Update.
1562 * regcache.c (get_thread_regcache): Update.
1563 (regcache_invalidate_thread): Update.
1564 (free_register_cache_thread): Update.
1565 * win32-i386-low.c (update_debug_registers_callback): Update.
1566 (win32_get_current_dr): Update.
1567 * win32-low.c (thread_rec): Update.
1568 (delete_thread_info): Update.
1569 (continue_one_thread): Update.
1570 (suspend_one_thread): Update.
1572 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1574 * inferiors.c (set_inferior_target_data): Remove.
1575 * inferiors.h (set_inferior_target_data): Remove.
1577 2017-08-18 Yao Qi <yao.qi@linaro.org>
1579 * Makefile.in (OBS): Add selftest.o.
1580 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1581 * configure, config.in: Re-generated.
1582 * server.c: Include common/sefltest.h.
1583 (captured_main): Handle option --selftest.
1585 2017-08-09 Yao Qi <yao.qi@linaro.org>
1587 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1588 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1589 i386-avx-mpx.o and i386-mmx.o.
1590 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1591 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1592 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1593 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1594 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1595 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1596 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1597 i386/amd64-avx-mpx.xml.
1599 2017-08-09 Yao Qi <yao.qi@linaro.org>
1601 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1602 and x32-avx-avx512.o.
1603 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1604 i386/x32-avx-avx512.xml.
1606 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1608 * tracepoint.h (enum class fast_tpoint_collect_result): New
1610 (fast_tracepoint_collecting): Change return type to
1611 fast_tpoint_collect_result.
1612 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1613 * linux-low.h: Include tracepoint.h.
1614 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1615 fast_tpoint_collect_result.
1616 * linux-low.c (handle_tracepoints): Adjust.
1617 (linux_fast_tracepoint_collecting): Change return type to
1618 fast_tpoint_collect_result.
1619 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1620 linux_wait_1, stuck_in_jump_pad_callback,
1621 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1622 proceed_one_lwp): Adjust to type change.
1624 2017-07-10 Yao Qi <yao.qi@linaro.org>
1626 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1628 2017-06-29 Yao Qi <yao.qi@linaro.org>
1630 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1632 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1634 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1636 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1638 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1640 * linux-low.c (linux_create_inferior): Adjust code to access the
1641 environment information via 'gdb_environ' class.
1642 * lynx-low.c (lynx_create_inferior): Likewise.
1643 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1644 (get_environ): Return a pointer to 'our_environ'.
1645 (captured_main): Initialize 'our_environ'.
1646 * server.h (get_environ): Adjust prototype.
1647 * spu-low.c (spu_create_inferior): Adjust code to access the
1648 environment information via 'gdb_environ' class.
1650 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1652 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1653 usage of "register" keyword.
1655 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1657 * configure: Re-generate.
1659 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1661 * configure: Re-generate.
1663 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1665 * Makefile.in (COMPILE.pre): Add "-x c++".
1667 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1669 * fork-child.c: Conditionally include <signal.h>.
1671 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1673 * server.c (handle_general_set): Handle new packet
1674 "QStartupWithShell".
1675 (handle_query): Add "QStartupWithShell" to the list of supported
1677 (gdbserver_usage): Add help text explaining the
1678 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1680 (captured_main): Recognize and act upon the presence of the new
1683 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1684 Pedro Alves <palves@redhat.com>
1686 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1687 * configure: Regenerate.
1688 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1690 (i[34567]86-*-lynxos*): Likewise.
1691 (spu*-*-*): Likewise.
1692 * fork-child.c: New file.
1693 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1695 (linux_ptrace_fun): New function.
1696 (linux_create_inferior): Adjust function prototype to reflect
1697 change on "target.h". Adjust function code to use
1699 (linux_request_interrupt): Delete "signal_pid".
1700 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1701 (lynx_ptrace_fun): New function.
1702 (lynx_create_inferior): Adjust function prototype to reflect
1703 change on "target.h". Adjust function code to use
1705 * nto-low.c (nto_create_inferior): Adjust function prototype and
1706 code to reflect change on "target.h". Update comments.
1707 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1708 "common-terminal.h" and "environ.h".
1709 (terminal_fd): Moved to fork-child.c.
1710 (old_foreground_pgrp): Likewise.
1711 (restore_old_foreground_pgrp): Likewise.
1712 (last_status): Make it global.
1713 (last_ptid): Likewise.
1714 (our_environ): New variable.
1715 (startup_with_shell): Likewise.
1716 (program_name): Likewise.
1717 (program_argv): Rename to...
1718 (program_args): ...this.
1719 (wrapper_argv): New variable.
1720 (start_inferior): Delete function.
1721 (get_exec_wrapper): New function.
1722 (get_exec_file): Likewise.
1723 (get_environ): Likewise.
1724 (prefork_hook): Likewise.
1725 (post_fork_inferior): Likewise.
1726 (postfork_hook): Likewise.
1727 (postfork_child_hook): Likewise.
1728 (handle_v_run): Update code to deal with arguments coming from the
1729 remote host. Update calls from "start_inferior" to
1731 (captured_main): Likewise. Initialize environment variable. Call
1733 * server.h (post_fork_inferior): New prototype.
1734 (get_environ): Likewise.
1735 (last_status): Declare.
1736 (last_ptid): Likewise.
1737 (signal_pid): Likewise.
1738 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1739 (spu_ptrace_fun): New function.
1740 (spu_create_inferior): Adjust function prototype to reflect change
1741 on "target.h". Adjust function code to use "fork_inferior".
1742 * target.c (target_terminal_init): New function.
1743 (target_terminal_inferior): Likewise.
1744 (target_terminal_ours): Likewise.
1745 * target.h: Include <vector>.
1746 (struct target_ops) <create_inferior>: Update prototype.
1747 (create_inferior): Update macro.
1748 * utils.c (gdb_flush_out_err): New function.
1749 * win32-low.c (win32_create_inferior): Adjust function prototype
1750 and code to reflect change on "target.h".
1752 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1754 * inferiors.c (switch_to_thread): New function.
1756 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1758 * Makefile.in (SFILE): Add "common/job-control.c".
1759 (OBS): Add "job-control.o".
1761 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1763 * Makefile: Remove "@host_makefile_frag@".
1765 2017-05-05 Pedro Alves <palves@redhat.com>
1767 * configure: Regenerate.
1769 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1771 * configure: Regenerate.
1773 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1775 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1776 software_single_step change of return type to
1777 std::vector<CORE_ADDR>.
1778 * linux-low.c (install_software_single_step_breakpoints):
1780 * linux-low.h (install_software_single_step_breakpoints):
1783 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1785 * remote-utils.c: Include "gdb_termios.h" instead of
1787 * terminal.h: Delete file.
1789 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1791 * server.c: Include <vector>.
1792 <program_argv, wrapper_argv>: Convert to std::vector.
1793 (start_inferior): Rewrite function to use C++.
1794 (handle_v_run): Likewise. Update code that calculates the argv
1795 based on the vRun packet; use C++.
1796 (captured_main): Likewise.
1798 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1800 * server.c (handle_v_cont): Initialize thread_resume::thread
1803 2017-04-05 Pedro Alves <palves@redhat.com>
1805 * configure: Regenerate.
1807 2017-04-05 Pedro Alves <palves@redhat.com>
1809 * gdbreplay.c (sync_error): Constify.
1810 * linux-x86-low.c (push_opcode): Constify.
1812 2017-04-05 Pedro Alves <palves@redhat.com>
1814 * win32-low.c (get_child_debug_event)
1815 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1816 Report TARGET_WAITKIND_SPURIOUS instead.
1818 2017-04-05 Pedro Alves <palves@redhat.com>
1820 * remote-utils.c (remote_prepare, remote_open): Constify.
1821 * remote-utils.h (remote_prepare, remote_open): Constify.
1822 * server.c (captured_main): Constify 'port' handling.
1824 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1826 * Makefile.in (clean): Clear .deps.
1828 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1830 * .gitignore: Remove generated files, replace with wildcard.
1831 * (clean): Replace removal of generated files with wildcard.
1832 (version.c): Replace with...
1833 (version-generated.c): ...this.
1834 (xml-builtin.c): Replace with...
1835 (xml-builtin-generated.c): ...this.
1836 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1837 (%.c: *regformats*): Replace with...
1838 (%-generated.c: *regformats*): ...this.
1840 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1842 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1843 (xtensa_fill_gregset): Call collect_register_by_name for
1845 (xtensa_store_gregset): Call supply_register_by_name for
1848 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1850 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1851 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1852 (xtensa_store_gregset): Call supply_register for all registers in
1853 a0_regnum..a0_regnum + C0_NREGS range.
1855 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1857 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1858 (ax-ipa.o: ax.c): Remove.
1859 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1860 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1861 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1862 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1863 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1865 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1867 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1868 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1869 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1870 (errors-ipa.o: ../common/errors.c): Remove.
1871 (format-ipa.o: ../common/format.c): Remove.
1872 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1874 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1876 * Makefile.in (%-ipa.o: %.c): New rule.
1877 (tracepoint-ipa.o: tracepoint.c): Remove.
1878 (utils-ipa.o: utils.c): Remove.
1879 (remote-utils-ipa.o: remote-utils.c): Remove.
1880 (regcache-ipa.o: regcache.c): Remove.
1881 (i386-linux-ipa.o: i386-linux.c): Remove.
1882 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1883 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1884 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1885 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1886 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1887 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1888 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1889 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1890 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1891 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1892 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1893 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1894 (aarch64-ipa.o: aarch64.c): Remove.
1895 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1896 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1897 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1898 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1899 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1900 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1901 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1902 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1903 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1904 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1905 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1906 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1907 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1908 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1909 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1910 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1911 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1912 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1913 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1914 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1915 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1916 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1917 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1918 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1919 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1920 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1921 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1922 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1923 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1924 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1925 (tdesc-ipa.o: tdesc.c): Remove.
1926 (x32-linux-ipa.o: x32-linux.c): Remove.
1927 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1928 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1930 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1932 * Makefile.in (%.o: ../arch/%.c): New rule.
1933 (arm.o: ../arch/arm.c): Remove.
1934 (arm-linux.o: ../arch/arm-linux.c): Remove.
1935 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1936 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1938 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1940 * Makefile.in (%.o: ../nat/%.c): New rule.
1941 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1942 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1943 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1944 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1945 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1946 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1947 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1948 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1949 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1950 (linux-personality.o: ../nat/linux-personality.c): Remove.
1951 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1952 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1953 (x86-linux.o: ../nat/x86-linux.c): Remove.
1954 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1955 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1957 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1959 * Makefile.in (%.o: ../common/%.c): New rule.
1960 (signals.o: ../common/signals.c): Remove.
1961 (print-utils.o: ../common/print-utils.c): Remove.
1962 (rsp-low.o: ../common/rsp-low.c): Remove.
1963 (common-utils.o: ../common/common-utils.c): Remove.
1964 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1965 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1966 (vec.o: ../common/vec.c): Remove.
1967 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1968 (xml-utils.o: ../common/xml-utils.c): Remove.
1969 (ptid.o: ../common/ptid.c): Remove.
1970 (buffer.o: ../common/buffer.c): Remove.
1971 (format.o: ../common/format.c): Remove.
1972 (filestuff.o: ../common/filestuff.c): Remove.
1973 (agent.o: ../common/agent.c): Remove.
1974 (errors.o: ../common/errors.c): Remove.
1975 (environ.o: ../common/environ.c): Remove.
1976 (common-debug.o: ../common/common-debug.c): Remove.
1977 (cleanups.o: ../common/cleanups.c): Remove.
1978 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1979 (fileio.o: ../common/fileio.c): Remove.
1980 (common-regcache.o: ../common/common-regcache.c): Remove.
1981 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1982 (new-op.o: ../common/new-op.c): Remove.
1983 (btrace-common.o: ../common/btrace-common.c): Remove.
1985 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1987 * Makefile.in (%.o: ../target/%.c): New rule.
1988 (waitstatus.o: ../target/waitstatus.c): Remove.
1990 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1993 (%.c: ../regformats/%.dat,
1994 (%.c: ../regformats/arm/%.dat,
1995 (%.c: ../regformats/i386/%.dat,
1996 (%.c: ../regformats/rs6000/%.dat): New rules.
1997 (aarch64.c): Remove.
1998 (reg-arm.c): Remove.
1999 (arm-with-iwmmxt.c): Remove.
2000 (arm-with-vfpv2.c): Remove.
2001 (arm-with-vfpv3.c): Remove.
2002 (arm-with-neon.c): Remove.
2003 (reg-bfin.c): Remove.
2004 (reg-cris.c): Remove.
2005 (reg-crisv32.c): Remove.
2007 (i386-linux.c): Remove.
2008 (i386-avx.c): Remove.
2009 (i386-avx-linux.c): Remove.
2010 (i386-avx-avx512.c): Remove.
2011 (i386-avx-avx512-linux.c): Remove.
2012 (i386-mpx.c): Remove.
2013 (i386-mpx-linux.c): Remove.
2014 (i386-avx-mpx-avx512-pku.c): Remove.
2015 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2016 (i386-avx-mpx.c): Remove.
2017 (i386-avx-mpx-linux.c): Remove.
2018 (i386-mmx.c): Remove.
2019 (i386-mmx-linux.c): Remove.
2020 (reg-ia64.c): Remove.
2021 (reg-m32r.c): Remove.
2022 (reg-m68k.c): Remove.
2024 (mips-linux.c): Remove.
2025 (mips-dsp-linux.c): Remove.
2026 (mips64-linux.c): Remove.
2027 (mips64-dsp-linux.c): Remove.
2028 (nios2-linux.c): Remove.
2029 (powerpc-32.c): Remove.
2030 (powerpc-32l.c): Remove.
2031 (powerpc-altivec32l.c): Remove.
2032 (powerpc-cell32l.c): Remove.
2033 (powerpc-vsx32l.c): Remove.
2034 (powerpc-isa205-32l.c): Remove.
2035 (powerpc-isa205-altivec32l.c): Remove.
2036 (powerpc-isa205-vsx32l.c): Remove.
2037 (powerpc-e500l.c): Remove.
2038 (powerpc-64l.c): Remove.
2039 (powerpc-altivec64l.c): Remove.
2040 (powerpc-cell64l.c): Remove.
2041 (powerpc-vsx64l.c): Remove.
2042 (powerpc-isa205-64l.c): Remove.
2043 (powerpc-isa205-altivec64l.c): Remove.
2044 (powerpc-isa205-vsx64l.c): Remove.
2045 (s390-linux32.c): Remove.
2046 (s390-linux32v1.c): Remove.
2047 (s390-linux32v2.c): Remove.
2048 (s390-linux64.c): Remove.
2049 (s390-linux64v1.c): Remove.
2050 (s390-linux64v2.c): Remove.
2051 (s390-te-linux64.c): Remove.
2052 (s390-vx-linux64.c): Remove.
2053 (s390-tevx-linux64.c): Remove.
2054 (s390x-linux64.c): Remove.
2055 (s390x-linux64v1.c): Remove.
2056 (s390x-linux64v2.c): Remove.
2057 (s390x-te-linux64.c): Remove.
2058 (s390x-vx-linux64.c): Remove.
2059 (s390x-tevx-linux64.c): Remove.
2060 (tic6x-c64xp-linux.c): Remove.
2061 (tic6x-c64x-linux.c): Remove.
2062 (tic6x-c62x-linux.c): Remove.
2064 (reg-sparc64.c): Remove.
2065 (reg-spu.c): Remove.
2067 (amd64-linux.c): Remove.
2068 (amd64-avx.c): Remove.
2069 (amd64-avx-linux.c): Remove.
2070 (amd64-avx-avx512.c): Remove.
2071 (amd64-avx-avx512-linux.c): Remove.
2072 (amd64-mpx.c): Remove.
2073 (amd64-mpx-linux.c): Remove.
2074 (amd64-avx-mpx-avx512-pku.c): Remove.
2075 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2076 (amd64-avx-mpx.c): Remove.
2077 (amd64-avx-mpx-linux.c): Remove.
2079 (x32-linux.c): Remove.
2080 (x32-avx.c): Remove.
2081 (x32-avx-linux.c): Remove.
2082 (x32-avx-avx512.c): Remove.
2083 (x32-avx-avx512-linux.c): Remove.
2084 (reg-xtensa.c): Remove.
2085 (reg-tilegx.c): Remove.
2086 (reg-tilegx32.c): Remove.
2088 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2090 * Makefile.in (SFILES): Add "common/environ.c".
2091 (OBJS): Add "common/environ.h".
2093 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2095 * configure.ac: Check if the fs_base and gs_base members of
2096 `struct user_regs_struct' exist.
2097 * config.in: Regenerated.
2098 * configure: Likewise.
2100 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2102 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2104 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2105 (get_next_pcs_syscall_next_pc): Likewise.
2107 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2109 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2110 * nto-x86-low.c: Likewise.
2112 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2114 * Makefile.in: Include disable-implicit-rules.mk.
2116 2016-11-23 Pedro Alves <palves@redhat.com>
2118 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2119 (debug_vprintf): Use std::chrono::steady_clock instead of
2120 gettimeofday. Use '.' instead of ':'.
2121 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2122 (get_timestamp): Use std::chrono::steady_clock instead of
2125 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2127 * Makefile.in: Fix whitespace formatting.
2129 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2131 * Makefile.in (SFILES, OBS): Flatten list and order
2134 2016-11-23 Pedro Alves <palves@redhat.com>
2136 * event-loop.c (handle_file_event): Use warning.
2137 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2138 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2141 2016-11-23 Pedro Alves <palves@redhat.com>
2143 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2145 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2146 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2147 debug_printf and debug_flush for debug output.
2148 * server.c (handle_general_set): Likewise.
2149 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2152 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2154 * Makefile.in (.c.o): Replace rule with ...
2155 (%.o: %.c): ... this one.
2157 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2159 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2160 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2162 * configure.ac: Remove checks for the make program.
2163 * configure: Re-generate.
2165 2016-10-28 Pedro Alves <palves@redhat.com>
2167 * Makefile.in (CXX_DIALECT): Get from configure.
2168 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2169 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2170 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2171 * config.in: Regenerate.
2172 * configure: Regenerate.
2174 2016-10-27 Yao Qi <yao.qi@linaro.org>
2176 * linux-low.c (linux_supports_range_stepping): Return true if
2177 can_software_single_step return true.
2179 2016-10-27 Yao Qi <yao.qi@linaro.org>
2181 * inferiors.c (find_inferior_in_random): New function.
2182 * inferiors.h (find_inferior_in_random): Declare.
2183 * linux-low.c (linux_wait_for_event_filtered): Call
2184 find_inferior_in_random instead of find_inferior.
2186 2016-10-27 Yao Qi <yao.qi@linaro.org>
2188 * linux-low.c (linux_wait_1): If single-step breakpoints are
2189 inserted, remove them.
2191 2016-10-26 Pedro Alves <palves@redhat.com>
2193 * linux-low.c (handle_extended_wait): Link parent/child fork
2195 (linux_wait_1): Unlink them.
2196 (linux_set_resume_request): Ignore resume requests for
2197 already-resumed and unhandled fork child threads.
2198 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2199 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2201 (handle_v_requests) <vCont>: Don't call require_running.
2202 * server.h (in_queued_stop_replies): New declaration.
2204 2016-10-24 Yao Qi <yao.qi@linaro.org>
2207 * linux-aarch64-low.c (append_insns): Cast the return value to
2210 2016-10-10 Yao Qi <yao.qi@linaro.org>
2212 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2214 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2216 * target.c (target_supports_multi_process): New function, moved
2218 * target.h (target_supports_multi_process): ... here. Remove
2221 2016-10-05 Tom Tromey <tom@tromey.com>
2224 * tracepoint.c (handle_tracepoint_bkpts): Check
2225 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2227 2016-10-05 Yao Qi <yao.qi@linaro.org>
2229 * configure.srv: Update the path of arm-*.xml files.
2231 2016-10-05 Terry Guo <terry.guo@arm.com>
2232 Yao Qi <yao.qi@linaro.org>
2234 * Makefile.in: Adjust the path of rules.
2235 * configure.srv: Update the path of xml files.
2236 * regformats/arm-with-iwmmxt.dat: Regenerated.
2237 * regformats/arm-with-neon.dat: Likewise.
2238 * regformats/arm-with-vfpv2.dat: Likewise.
2239 * regformats/arm-with-vfpv3.dat Likewise.
2241 2016-09-30 Yao Qi <yao.qi@linaro.org>
2244 * target.c (target_stop_and_wait): Don't call
2245 target_continue_no_signal, use resume_stop instead.
2247 2016-09-26 Yao Qi <yao.qi@linaro.org>
2249 * linux-low.c (linux_wait_1): Call debug_exit.
2251 2016-09-23 Pedro Alves <palves@redhat.com>
2253 * Makefile.in (SFILES): Add common/new-op.c.
2254 (OBS): Add common/new-op.o.
2255 (new-op.o): New rule.
2257 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2259 * .gitinore: Ignore more files.
2261 2016-09-21 Yao Qi <yao.qi@linaro.org>
2263 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2266 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2268 * server.c (start_inferior): Call target_mourn_inferior instead of
2269 mourn_inferior; pass ptid_t argument to it.
2271 (handle_target_event): Likewise.
2272 * target.c (target_mourn_inferior): New function.
2273 * target.h (mourn_inferior): Delete macro.
2275 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2277 * linux-low.c (lwp_is_stepping): New function.
2279 2016-09-06 Carl Love <cel@us.ibm.com>
2281 * server.c (start_inferior): Fixed comment, requested comment change
2282 didn't get updated correctly. Removed reference to ptrace () call as
2283 it is only true on Linux systems.
2285 2016-09-06 Carl Love <cel@us.ibm.com>
2287 * server.c (start_inferior): Do not call
2288 function target_post_create_inferior () if the
2289 inferior process has already exited.
2291 2016-09-05 Pedro Alves <palves@redhat.com>
2293 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2294 (COMPILE.pre, CC_LD): Use CXX directly.
2295 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2296 * acinclude.m4: Don't include build-with-cxx.m4.
2297 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2298 * configure: Regenerate.
2300 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2303 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2304 call writing data to own_buf.
2306 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2308 * target.c (mywait): Call target_wait instead of
2310 (target_wait): New function.
2312 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2314 * server.c (start_inferior): New variable 'ptid'. Replace calls
2315 to the_target->resume by target_continue{,_no_signal}, depending
2317 * target.c (target_stop_and_wait): Call target_continue_no_signal
2318 instead of the_target->resume.
2319 (target_continue): New function.
2321 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2323 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2325 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2328 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2330 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2331 * linux-arm-low.c (ps_get_thread_area): Likewise.
2332 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2333 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2334 * linux-mips-low.c (ps_get_thread_area): Likewise.
2335 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2336 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2337 * linux-x86-low.c (ps_get_thread_area): Likewise.
2338 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2340 2016-08-19 Pedro Alves <palves@redhat.com>
2342 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2344 2016-08-19 Pedro Alves <palves@redhat.com>
2346 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2347 comment. Use memcpy instead of casting through unsigned long.
2349 2016-08-19 Pedro Alves <palves@redhat.com>
2351 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2352 allocating around 0x80000000.
2354 2016-08-19 Pedro Alves <palves@redhat.com>
2357 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2358 (x32-avx512-linux-ipa.o): New rules.
2359 * configure.ac (x86_64-*-linux*): New x32 check.
2360 * configure.srv (ipa_x32_linux_regobj): New.
2361 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2362 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2364 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2366 * configure: Regenerate.
2368 2016-08-09 Pedro Alves <palves@redhat.com>
2371 * Makefile.in (OBS): Add signals-state-save-restore.o.
2372 (signals-state-save-restore.o): New rule.
2373 * config.in: Regenerate.
2374 * configure: Regenerate.
2375 * linux-low.c: Include "signals-state-save-restore.h".
2376 (linux_create_inferior): Call
2377 restore_original_signals_state.
2378 * server.c: Include "dispositions-save-restore.h".
2379 (captured_main): Call save_original_signals_state.
2381 2016-08-05 Pedro Alves <palves@redhat.com>
2383 * configure: Regenerate.
2385 2016-08-04 Yao Qi <yao.qi@linaro.org>
2387 * linux-low.c (regsets_fetch_inferior_registers): Check
2388 errno is ESRCH or not.
2390 2016-08-02 Yao Qi <yao.qi@linaro.org>
2392 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2393 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2394 (thread_db_load_search): Update.
2395 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2396 td_ta_set_event and td_ta_event_getmsg.
2398 2016-07-26 Pedro Alves <palves@redhat.com>
2401 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2402 of unsigned long for 64-bit registers and use uint32_t instead of
2403 unsigned int for 32-bit registers.
2405 2016-07-26 Pedro Alves <palves@redhat.com>
2407 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2410 2016-07-21 Tom Tromey <tom@tromey.com>
2412 * configure: Rebuild.
2414 2016-07-21 Yao Qi <yao.qi@linaro.org>
2416 * mem-break.c (find_gdb_breakpoint): Cast bp to
2417 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2419 2016-07-21 Yao Qi <yao.qi@linaro.org>
2421 * server.c (handle_v_requests): Support s and S actions
2422 if target_supports_software_single_step return true.
2424 2016-07-21 Yao Qi <yao.qi@linaro.org>
2426 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2427 is resume_step, call maybe_hw_step.
2428 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2430 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2432 (proceed_one_lwp): If resume request is resume_step, install
2433 reinsert breakpoints and call maybe_hw_step.
2435 2016-07-21 Yao Qi <yao.qi@linaro.org>
2437 * linux-low.c (proceed_one_lwp): Declare.
2438 (linux_resume_one_thread): Remove local variable 'step'.
2439 Lift code enqueue signal. Call proceed_one_lwp instead of
2440 linux_resume_one_lwp.
2442 2016-07-21 Yao Qi <yao.qi@linaro.org>
2444 * linux-low.c (linux_resume_one_thread): Call
2445 enqueue_pending_signal.
2447 2016-07-21 Yao Qi <yao.qi@linaro.org>
2449 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2450 * inferiors.c (do_restore_current_thread_cleanup): New function.
2451 (make_cleanup_restore_current_thread): Likewise.
2452 * linux-low.c (install_software_single_step_breakpoints): Call
2453 make_cleanup_restore_current_thread. Switch current_thread to
2456 2016-07-21 Yao Qi <yao.qi@linaro.org>
2458 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2459 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2460 (clone_one_breakpoint): Likewise.
2461 (delete_reinsert_breakpoints): Change parameter to thread.
2463 (has_reinsert_breakpoints): Likewise.
2464 (uninsert_reinsert_breakpoints): Likewise.
2465 (reinsert_reinsert_breakpoints): Likewise.
2466 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2467 (delete_reinsert_breakpoints): Likewise.
2468 (reinsert_reinsert_breakpoints): Likewise.
2469 (uninsert_reinsert_breakpoints): Likewise.
2470 (has_reinsert_breakpoints): Likewise.
2472 2016-07-21 Yao Qi <yao.qi@linaro.org>
2474 * inferiors.c (get_thread_process): Make parameter const.
2475 * inferiors.h (get_thread_process): Update declaration.
2476 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2477 Add new parameters child_thread and parent_thread. Callers
2479 * mem-break.h (clone_all_breakpoints): Update declaration.
2481 2016-07-21 Yao Qi <yao.qi@linaro.org>
2483 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2484 <command_list, handler>: Remove.
2485 (struct gdb_breakpoint): New.
2486 (struct other_breakpoint): New.
2487 (struct reinsert_breakpoint): New.
2488 (is_gdb_breakpoint): New function.
2489 (any_persistent_commands): Update command_list if
2490 is_gdb_breakpoint returns true.
2491 (set_breakpoint): Create breakpoints according to their types.
2492 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2493 (set_gdb_breakpoint_1): Likewise.
2494 (set_gdb_breakpoint): Likewise.
2495 (clear_breakpoint_conditions): Change parameter type to
2496 'struct gdb_breakpoint *'.
2497 (clear_breakpoint_commands): Likewise.
2498 (clear_breakpoint_conditions_and_commands): Likewise.
2499 (add_condition_to_breakpoint): Likewise.
2500 (add_breakpoint_condition): Likewise.
2501 (add_commands_to_breakpoint): Likewise.
2502 (check_breakpoints): Check other_breakpoint.
2503 (clone_one_breakpoint): Clone breakpopint according to its type.
2504 * mem-break.h (struct gdb_breakpoint): Declare.
2505 (set_gdb_breakpoint): Update declaration.
2506 (clear_breakpoint_conditions_and_commands): Likewise.
2507 (add_breakpoint_condition): Likewise.
2508 (add_breakpoint_commands): Likewise.
2509 * server.c (process_point_options): Change parameter type to
2510 'struct gdb_breakpoint *'.
2512 2016-07-21 Yao Qi <yao.qi@linaro.org>
2514 * mem-break.c (set_breakpoint_at): Rename it to ...
2515 (set_breakpoint_type_at): ... it.
2516 (set_breakpoint_at): Call set_breakpoint_type_at.
2517 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2518 * mem-break.h (set_breakpoint_at): Update comments.
2520 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2522 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2524 (nios2_store_gregset): Likewise.
2526 2016-07-01 Pedro Alves <palves@redhat.com>
2527 Antoine Tremblay <antoine.tremblay@ericsson.com>
2529 * linux-low.c: Change interface to take the target lwp_info
2530 pointer directly and return void. Handle detaching from a zombie
2532 (linux_detach_lwp_callback): New function.
2533 (linux_detach): Detach from the leader thread after detaching from
2536 2016-06-28 Yao Qi <yao.qi@linaro.org>
2538 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2539 for variable new_offset.
2540 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2541 (aarch64_ftrace_insn_reloc_cb): Likewise.
2542 (aarch64_ftrace_insn_reloc_tb): Likewise.
2543 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2544 PRIx64 instead of PRIx32.
2546 2016-06-28 Yao Qi <yao.qi@linaro.org>
2548 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2549 (the_low_target): Install arm_get_syscall_trapinfo.
2551 2016-06-28 Yao Qi <yao.qi@linaro.org>
2553 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2555 (the_low_target): Install aarch64_get_syscall_trapinfo.
2557 2016-06-28 Yao Qi <yao.qi@linaro.org>
2559 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2561 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2562 Remove parameter sysno.
2563 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2566 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2568 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2569 (s390_emit_ne_goto): Likewise.
2570 (s390_emit_lt_goto): Likewise.
2571 (s390_emit_le_goto): Likewise.
2572 (s390_emit_gt_goto): Likewise.
2573 (s390_emit_ge_goto): Likewise.
2574 (s390x_emit_eq_goto): Likewise.
2575 (s390x_emit_ne_goto): Likewise.
2576 (s390x_emit_lt_goto): Likewise.
2577 (s390x_emit_le_goto): Likewise.
2578 (s390x_emit_gt_goto): Likewise.
2579 (s390x_emit_ge_goto): Likewise.
2580 (s390_emit_ops_impl): Mark variable static.
2581 (s390x_emit_ops): Likewise.
2583 2016-06-17 Yao Qi <yao.qi@linaro.org>
2585 * linux-low.c (handle_extended_wait): Call
2586 uninsert_reinsert_breakpoints for the parent process. Remove
2587 reinsert breakpoints from the child process. Reinsert them to
2588 the parent process when vfork is done.
2589 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2590 (reinsert_reinsert_breakpoints): New function.
2591 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2592 (reinsert_reinsert_breakpoints): Declare.
2594 2016-06-17 Yao Qi <yao.qi@linaro.org>
2596 * linux-low.c (handle_extended_wait): If the parent is doing
2597 step-over, remove the reinsert breakpoints from the forked child.
2599 2016-06-17 Yao Qi <yao.qi@linaro.org>
2601 * linux-low.c (unsuspend_all_lwps): Declare.
2602 (linux_low_filter_event): If thread exited, call finish_step_over.
2603 If step-over is finished, unsuspend other threads.
2605 2016-06-17 Yao Qi <yao.qi@linaro.org>
2607 * linux-low.c (linux_resume_one_lwp_throw): Assert
2608 has_reinsert_breakpoints returns false.
2609 * mem-break.c (delete_disabled_breakpoints): Assert
2610 bp type isn't reinsert_breakpoint.
2612 2016-06-17 Yao Qi <yao.qi@linaro.org>
2614 * linux-low.c (maybe_hw_step): New function.
2615 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2616 (finish_step_over): Switch current_thread to lwp temporarily,
2617 and assert has_reinsert_breakpoints returns true.
2618 (proceed_one_lwp): Call maybe_hw_step.
2619 * mem-break.c (has_reinsert_breakpoints): New function.
2620 * mem-break.h (has_reinsert_breakpoints): Declare.
2622 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2624 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2626 2016-05-17 Yao Qi <yao.qi@linaro.org>
2628 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2629 instead of find_inferior.
2631 2016-05-05 Yao Qi <yao.qi@linaro.org>
2633 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2634 Initialize res to zero.
2636 2016-05-05 Yao Qi <yao.qi@linaro.org>
2638 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2641 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2643 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2644 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2645 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2647 2016-04-28 Par Olsson <par.olsson@windriver.com>
2648 Simon Marchi <simon.marchi@ericsson.com>
2650 * tracepoint.c (write_inferior_int8): New function.
2651 (cmd_qtenable_disable): Write enable flag using
2652 write_inferior_int8.
2654 2016-04-25 Yao Qi <yao.qi@linaro.org>
2656 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2657 (need_step_over_p): Return zero if the LWP has pending signals
2658 can be delivered on software single step target.
2660 2016-04-25 Yao Qi <yao.qi@linaro.org>
2662 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2663 return instead of error.
2665 2016-04-22 Yao Qi <yao.qi@linaro.org>
2667 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2670 2016-04-22 Yao Qi <yao.qi@linaro.org>
2672 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2673 signal when stepping over breakpoint with software single
2676 2016-04-21 Pedro Alves <palves@redhat.com>
2678 * linux-s390-low.c (s390_collect_ptrace_register)
2679 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2681 (s390_check_regset): Use void * instead of gdb_byte *.
2683 2016-04-20 Pedro Alves <palves@redhat.com>
2685 * configure: Renegerate.
2687 2016-04-20 Yao Qi <yao.qi@linaro.org>
2689 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2690 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2692 (arm_store_gregset): Likewise.
2694 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2696 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2697 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2698 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2699 (amd64-avx-mpx-linux.c): New rules.
2700 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2701 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2702 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2703 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2704 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2705 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2706 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2707 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2708 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2709 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2710 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2711 * linux-x86-low.c (x86_linux_read_description): Add case for
2712 X86_XSTATE_AVX_MPX_MASK.
2713 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2714 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2715 init_registers_i386_avx_mpx_linux.
2716 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2717 (initialize_low_tracepoint): Call
2718 init_registers_i386_avx_mpx_linux.
2719 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2720 (initialize_low_tracepoint): Call
2721 init_registers_amd64_avx_mpx_linux.
2722 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2723 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2724 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2727 2016-04-18 Pedro Alves <palves@redhat.com>
2729 * configure: Regenerate.
2731 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2733 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2734 (aarch64_emit_sub): Likewise.
2736 2016-04-12 Pedro Alves <palves@redhat.com>
2738 * utils.c (prepare_to_throw_exception): Delete.
2740 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2742 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2744 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2746 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2748 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2750 * linux-aarch64-ipa.c: Add <elf.h> include.
2751 * linux-ppc-ipa.c: Add <elf.h> include.
2752 * linux-s390-ipa.c: Add <elf.h> include.
2754 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2756 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2757 (get_raw_reg_ptr): Likewise.
2758 (get_trace_state_variable_value_ptr): Likewise.
2759 (set_trace_state_variable_value_ptr): Likewise.
2760 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2763 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2764 Marcin Kościelnicki <koriakin@0x04.net>
2767 * linux-ppc-low.c (emit_insns): New function.
2768 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2769 (ppc_emit_prologue): New function.
2770 (ppc_emit_epilogue): New function.
2771 (ppc_emit_add): New function.
2772 (ppc_emit_sub): New function.
2773 (ppc_emit_mul): New function.
2774 (ppc_emit_lsh): New function.
2775 (ppc_emit_rsh_signed): New function.
2776 (ppc_emit_rsh_unsigned): New function.
2777 (ppc_emit_ext): New function.
2778 (ppc_emit_zero_ext): New function.
2779 (ppc_emit_log_not): New function.
2780 (ppc_emit_bit_and): New function.
2781 (ppc_emit_bit_or): New function.
2782 (ppc_emit_bit_xor): New function.
2783 (ppc_emit_bit_not): New function.
2784 (ppc_emit_equal): New function.
2785 (ppc_emit_less_signed): New function.
2786 (ppc_emit_less_unsigned): New function.
2787 (ppc_emit_ref): New function.
2788 (ppc_emit_const): New function.
2789 (ppc_emit_reg): New function.
2790 (ppc_emit_pop): New function.
2791 (ppc_emit_stack_flush): New function.
2792 (ppc_emit_swap): New function.
2793 (ppc_emit_stack_adjust): New function.
2794 (ppc_emit_call): New function.
2795 (ppc_emit_int_call_1): New function.
2796 (ppc_emit_void_call_2): New function.
2797 (ppc_emit_if_goto): New function.
2798 (ppc_emit_goto): New function.
2799 (ppc_emit_eq_goto): New function.
2800 (ppc_emit_ne_goto): New function.
2801 (ppc_emit_lt_goto): New function.
2802 (ppc_emit_le_goto): New function.
2803 (ppc_emit_gt_goto): New function.
2804 (ppc_emit_ge_goto): New function.
2805 (ppc_write_goto_address): New function.
2806 (ppc_emit_ops_impl): New static variable.
2807 (ppc64v1_emit_prologue): New function.
2808 (ppc64v2_emit_prologue): New function.
2809 (ppc64_emit_epilogue): New function.
2810 (ppc64_emit_add): New function.
2811 (ppc64_emit_sub): New function.
2812 (ppc64_emit_mul): New function.
2813 (ppc64_emit_lsh): New function.
2814 (ppc64_emit_rsh_signed): New function.
2815 (ppc64_emit_rsh_unsigned): New function.
2816 (ppc64_emit_ext): New function.
2817 (ppc64_emit_zero_ext): New function.
2818 (ppc64_emit_log_not): New function.
2819 (ppc64_emit_bit_and): New function.
2820 (ppc64_emit_bit_or): New function.
2821 (ppc64_emit_bit_xor): New function.
2822 (ppc64_emit_bit_not): New function.
2823 (ppc64_emit_equal): New function.
2824 (ppc64_emit_less_signed): New function.
2825 (ppc64_emit_less_unsigned): New function.
2826 (ppc64_emit_ref): New function.
2827 (ppc64_emit_const): New function.
2828 (ppc64v1_emit_reg): New function.
2829 (ppc64v2_emit_reg): New function.
2830 (ppc64_emit_pop): New function.
2831 (ppc64_emit_stack_flush): New function.
2832 (ppc64_emit_swap): New function.
2833 (ppc64v1_emit_call): New function.
2834 (ppc64v2_emit_call): New function.
2835 (ppc64v1_emit_int_call_1): New function.
2836 (ppc64v2_emit_int_call_1): New function.
2837 (ppc64v1_emit_void_call_2): New function.
2838 (ppc64v2_emit_void_call_2): New function.
2839 (ppc64_emit_if_goto): New function.
2840 (ppc64_emit_eq_goto): New function.
2841 (ppc64_emit_ne_goto): New function.
2842 (ppc64_emit_lt_goto): New function.
2843 (ppc64_emit_le_goto): New function.
2844 (ppc64_emit_gt_goto): New function.
2845 (ppc64_emit_ge_goto): New function.
2846 (ppc64v1_emit_ops_impl): New static variable.
2847 (ppc64v2_emit_ops_impl): New static variable.
2848 (ppc_emit_ops): New function.
2849 (linux_low_target): Wire in ppc_emit_ops.
2851 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2852 Marcin Kościelnicki <koriakin@0x04.net>
2855 * Makefile.in: Add powerpc-*-ipa.o
2856 * configure.srv: Add ipa_obj for powerpc*-linux.
2857 * linux-ppc-ipa.c: New file.
2858 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2860 (PPC_FIELD): New macro.
2861 (PPC_SEXT): New macro.
2862 (PPC_OP6): New macro.
2863 (PPC_BO): New macro.
2864 (PPC_LI): New macro.
2865 (PPC_BD): New macro.
2866 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2867 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2868 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2869 (ppc_get_thread_area): New function.
2870 (is_elfv2_inferior): New function.
2871 (gen_ds_form): New function.
2872 (GEN_STD): New macro.
2873 (GEN_STDU): New macro.
2874 (GEN_LD): New macro.
2875 (GEN_LDU): New macro.
2876 (gen_d_form): New function.
2877 (GEN_ADDI): New macro.
2878 (GEN_ADDIS): New macro.
2879 (GEN_LI): New macro.
2880 (GEN_LIS): New macro.
2881 (GEN_ORI): New macro.
2882 (GEN_ORIS): New macro.
2883 (GEN_LWZ): New macro.
2884 (GEN_STW): New macro.
2885 (GEN_STWU): New macro.
2886 (gen_xfx_form): New function.
2887 (GEN_MFSPR): New macro.
2888 (GEN_MTSPR): New macro.
2889 (GEN_MFCR): New macro.
2890 (GEN_MTCR): New macro.
2891 (GEN_SYNC): New macro.
2892 (GEN_LWSYNC): New macro.
2893 (gen_x_form): New function.
2894 (GEN_OR): New macro.
2895 (GEN_MR): New macro.
2896 (GEN_LWARX): New macro.
2897 (GEN_STWCX): New macro.
2898 (GEN_CMPW): New macro.
2899 (gen_md_form): New function.
2900 (GEN_RLDICL): New macro.
2901 (GEN_RLDICR): New macro.
2902 (gen_i_form): New function.
2904 (GEN_BL): New macro.
2905 (gen_b_form): New function.
2906 (GEN_BNE): New macro.
2907 (GEN_LOAD): New macro.
2908 (GEN_STORE): New macro.
2909 (gen_limm): New function.
2910 (gen_atomic_xchg): New function.
2911 (gen_call): New function.
2912 (ppc_relocate_instruction): New function.
2913 (ppc_install_fast_tracepoint_jump_pad): New function.
2914 (ppc_get_min_fast_tracepoint_insn_len): New function.
2915 (ppc_get_ipa_tdesc_idx): New function.
2916 (the_low_target): Wire in the new functions.
2917 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2919 * linux-ppc-tdesc.h: New file.
2921 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2923 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2924 (alloc_jump_pad_buffer): New function.
2925 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2926 (alloc_jump_pad_buffer): New function.
2927 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2928 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2929 (alloc_jump_pad_buffer): New function.
2930 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2931 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2932 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2933 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2935 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2937 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2938 * linux-amd64-ipa.c: Likewise.
2939 * linux-i386-ipa.c: Likewise.
2940 * linux-s390-ipa.c: Likewise.
2941 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2942 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2943 set_trace_state_variable_value_ptr.
2944 (struct ipa_sym_addresses): Likewise.
2945 (symbol_list): Likewise.
2946 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2947 accessing gdb_collect directly.
2948 (gdb_collect_ptr_type): New typedef.
2949 (get_raw_reg_ptr_type): New typedef.
2950 (get_trace_state_variable_value_ptr_type): New typedef.
2951 (set_trace_state_variable_value_ptr_type): New typedef.
2952 (gdb_collect_ptr): New global.
2953 (get_raw_reg_ptr): New global.
2954 (get_trace_state_variable_value_ptr): New global.
2955 (set_trace_state_variable_value_ptr): New global.
2956 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2957 accessing get_raw_reg directly.
2958 (get_get_tsv_func_addr): Likewise for
2959 get_trace_state_variable_value_ptr.
2960 (get_set_tsv_func_addr): Likewise for
2961 set_trace_state_variable_value_ptr.
2962 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2964 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2966 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2968 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2970 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2972 (relocate_instruction): Remove own_buf.
2973 * server.c (own_buf): Make global.
2974 (handle_v_requests): Make global.
2975 * server.h (own_buf): New declaration.
2976 (handle_v_requests): New prototype.
2978 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2981 * linux-s390-low.c (add_insns): New function.
2982 (s390_emit_prologue): New function.
2983 (s390_emit_epilogue): New function.
2984 (s390_emit_add): New function.
2985 (s390_emit_sub): New function.
2986 (s390_emit_mul): New function.
2987 (s390_emit_lsh): New function.
2988 (s390_emit_rsh_signed): New function.
2989 (s390_emit_rsh_unsigned): New function.
2990 (s390_emit_ext): New function.
2991 (s390_emit_log_not): New function.
2992 (s390_emit_bit_and): New function.
2993 (s390_emit_bit_or): New function.
2994 (s390_emit_bit_xor): New function.
2995 (s390_emit_bit_not): New function.
2996 (s390_emit_equal): New function.
2997 (s390_emit_less_signed): New function.
2998 (s390_emit_less_unsigned): New function.
2999 (s390_emit_ref): New function.
3000 (s390_emit_if_goto): New function.
3001 (s390_emit_goto): New function.
3002 (s390_write_goto_address): New function.
3003 (s390_emit_litpool): New function.
3004 (s390_emit_const): New function.
3005 (s390_emit_call): New function.
3006 (s390_emit_reg): New function.
3007 (s390_emit_pop): New function.
3008 (s390_emit_stack_flush): New function.
3009 (s390_emit_zero_ext): New function.
3010 (s390_emit_swap): New function.
3011 (s390_emit_stack_adjust): New function.
3012 (s390_emit_set_r2): New function.
3013 (s390_emit_int_call_1): New function.
3014 (s390_emit_void_call_2): New function.
3015 (s390_emit_eq_goto): New function.
3016 (s390_emit_ne_goto): New function.
3017 (s390_emit_lt_goto): New function.
3018 (s390_emit_le_goto): New function.
3019 (s390_emit_gt_goto): New function.
3020 (s390_emit_ge_goto): New function.
3021 (s390x_emit_prologue): New function.
3022 (s390x_emit_epilogue): New function.
3023 (s390x_emit_add): New function.
3024 (s390x_emit_sub): New function.
3025 (s390x_emit_mul): New function.
3026 (s390x_emit_lsh): New function.
3027 (s390x_emit_rsh_signed): New function.
3028 (s390x_emit_rsh_unsigned): New function.
3029 (s390x_emit_ext): New function.
3030 (s390x_emit_log_not): New function.
3031 (s390x_emit_bit_and): New function.
3032 (s390x_emit_bit_or): New function.
3033 (s390x_emit_bit_xor): New function.
3034 (s390x_emit_bit_not): New function.
3035 (s390x_emit_equal): New function.
3036 (s390x_emit_less_signed): New function.
3037 (s390x_emit_less_unsigned): New function.
3038 (s390x_emit_ref): New function.
3039 (s390x_emit_if_goto): New function.
3040 (s390x_emit_const): New function.
3041 (s390x_emit_call): New function.
3042 (s390x_emit_reg): New function.
3043 (s390x_emit_pop): New function.
3044 (s390x_emit_stack_flush): New function.
3045 (s390x_emit_zero_ext): New function.
3046 (s390x_emit_swap): New function.
3047 (s390x_emit_stack_adjust): New function.
3048 (s390x_emit_int_call_1): New function.
3049 (s390x_emit_void_call_2): New function.
3050 (s390x_emit_eq_goto): New function.
3051 (s390x_emit_ne_goto): New function.
3052 (s390x_emit_lt_goto): New function.
3053 (s390x_emit_le_goto): New function.
3054 (s390x_emit_gt_goto): New function.
3055 (s390x_emit_ge_goto): New function.
3056 (s390_emit_ops): New function.
3057 (struct linux_target_ops): Fill in emit_ops hook.
3059 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3062 * Makefile.in: Add s390 IPA files.
3063 * configure.srv: Build IPA for s390.
3064 * linux-s390-ipa.c: New file.
3065 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3066 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3067 (tdesc_s390_linux32): Likewise.
3068 (init_registers_s390_linux32v1): Likewise.
3069 (tdesc_s390_linux32v1): Likewise.
3070 (init_registers_s390_linux32v2): Likewise.
3071 (tdesc_s390_linux32v2): Likewise.
3072 (init_registers_s390_linux64): Likewise.
3073 (tdesc_s390_linux64): Likewise.
3074 (init_registers_s390_linux64v1): Likewise.
3075 (tdesc_s390_linux64v1): Likewise.
3076 (init_registers_s390_linux64v2): Likewise.
3077 (tdesc_s390_linux64v2): Likewise.
3078 (init_registers_s390_te_linux64): Likewise.
3079 (tdesc_s390_te_linux64): Likewise.
3080 (init_registers_s390_vx_linux64): Likewise.
3081 (tdesc_s390_vx_linux64): Likewise.
3082 (init_registers_s390_tevx_linux64): Likewise.
3083 (tdesc_s390_tevx_linux64): Likewise.
3084 (init_registers_s390x_linux64): Likewise.
3085 (tdesc_s390x_linux64): Likewise.
3086 (init_registers_s390x_linux64v1): Likewise.
3087 (tdesc_s390x_linux64v1): Likewise.
3088 (init_registers_s390x_linux64v2): Likewise.
3089 (tdesc_s390x_linux64v2): Likewise.
3090 (init_registers_s390x_te_linux64): Likewise.
3091 (tdesc_s390x_te_linux64): Likewise.
3092 (init_registers_s390x_vx_linux64): Likewise.
3093 (tdesc_s390x_vx_linux64): Likewise.
3094 (init_registers_s390x_tevx_linux64): Likewise.
3095 (tdesc_s390x_tevx_linux64): Likewise.
3096 (have_hwcap_s390_vx): New static variable.
3097 (s390_arch_setup): Fill have_hwcap_s390_vx.
3098 (s390_get_thread_area): New function.
3099 (s390_ft_entry_gpr_esa): New const.
3100 (s390_ft_entry_gpr_zarch): New const.
3101 (s390_ft_entry_misc): New const.
3102 (s390_ft_entry_fr): New const.
3103 (s390_ft_entry_vr): New const.
3104 (s390_ft_main_31): New const.
3105 (s390_ft_main_64): New const.
3106 (s390_ft_exit_fr): New const.
3107 (s390_ft_exit_vr): New const.
3108 (s390_ft_exit_misc): New const.
3109 (s390_ft_exit_gpr_esa): New const.
3110 (s390_ft_exit_gpr_zarch): New const.
3111 (append_insns): New function.
3112 (s390_relocate_instruction): New function.
3113 (s390_install_fast_tracepoint_jump_pad): New function.
3114 (s390_get_min_fast_tracepoint_insn_len): New function.
3115 (s390_get_ipa_tdesc_idx): New function.
3116 (struct linux_target_ops): Wire in the above functions.
3117 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3118 * linux-s390-tdesc.h: New file.
3120 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3122 * linux-s390-low.c (s390_supports_tracepoints): New function.
3123 (struct linux_target_ops): Fill supports_tracepoints hook.
3125 2016-03-18 Yao Qi <yao.qi@linaro.org>
3127 * linux-low.c (lwp_signal_can_be_delivered): New function.
3128 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3130 2016-03-18 Yao Qi <yao.qi@linaro.org>
3132 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3133 0 if signal is enqueued. Remove 'signal' from one debugging
3134 message. Move one debugging message to some lines below.
3135 Remove code setting 'signal' to 0.
3137 2016-03-18 Yao Qi <yao.qi@linaro.org>
3139 * linux-low.c (linux_low_filter_event): Remove redundant
3140 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3142 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3144 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3145 (struct linux_target_ops): Wire in the above.
3147 2016-03-03 Yao Qi <yao.qi@linaro.org>
3149 * linux-low.c: Update comments to start_step_over.
3151 2016-03-03 Yao Qi <yao.qi@linaro.org>
3154 * linux-low.c (handle_extended_wait): Set child suspended
3155 if event_lwp->bp_reinsert isn't zero.
3157 2016-03-02 Yao Qi <yao.qi@linaro.org>
3159 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3160 enqueue_pending_signal.
3162 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3164 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3167 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3169 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3170 (s390_regmap_3264) [!__s390x__]: New global.
3171 (s390_collect_ptrace_register): Skip map entries containing -1.
3172 (s390_supply_ptrace_register): Ditto.
3173 (s390_fill_gprs_high): New function.
3174 (s390_store_gprs_high): New function.
3175 (s390_regsets): Add NT_S390_HIGH_GPRS.
3176 (s390_get_hwcap): Enable on 31-bit.
3177 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3178 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3179 Detect NT_S390_HIGH_GPRS.
3180 (s390_usrregs_info_3264): Enable on 31-bit.
3181 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3182 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3184 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3187 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3188 * configure.srv: Ditto.
3189 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3190 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3191 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3192 (init_registers_amd64_linux): Remove prototype.
3193 (tdesc_amd64_linux): Remove declaration.
3194 (get_ipa_tdesc): New function.
3195 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3196 initialize remaining tdescs.
3197 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3198 (init_registers_i386_linux): Remove prototype.
3199 (tdesc_i386_linux): Remove declaration.
3200 (get_ipa_tdesc): New function.
3201 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3202 initialize remaining tdescs.
3203 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3204 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3205 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3206 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3207 (x86_get_ipa_tdesc_idx): New function.
3208 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3209 * linux-x86-tdesc.h: New file.
3210 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3211 (target_get_ipa_tdesc_idx): New macro.
3212 * tracepoint.c (ipa_tdesc_idx): New macro.
3213 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3214 (symbol_list): Add ipa_tdesc_idx.
3215 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3216 (ipa_tdesc): Remove.
3217 (ipa_tdesc_idx): New variable.
3218 (get_context_regcache): Use get_ipa_tdesc.
3219 (gdb_collect): Ditto.
3221 * tracepoint.h (get_ipa_tdesc): New prototype.
3222 (ipa_tdesc): Remove.
3224 2016-02-24 Pedro Alves <palves@redhat.com>
3226 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3227 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3228 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3229 Factor out common code between the USE_SIGTRAP_SIGINFO and
3230 !USE_SIGTRAP_SIGINFO blocks.
3231 (linux_low_filter_event): Call save_stop_reason instead of
3232 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3234 (linux_wait_1): Update comments.
3236 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3238 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3239 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3240 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3241 ppc_insert_point, ppc_remove_point.
3243 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3245 * linux-s390-low.c (s390_supports_z_point_type): New function.
3246 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3248 2016-02-16 Yao Qi <yao.qi@linaro.org>
3250 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3251 PC. Get pc from regcache_read_pc.
3253 2016-02-12 Yao Qi <yao.qi@linaro.org>
3255 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3256 or linux_get_pc_32bit.
3257 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3259 2016-02-12 Yao Qi <yao.qi@linaro.org>
3261 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3262 arm_linux_get_next_pcs_fixup.
3264 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3266 * tracepoint.c (x_tracepoint_action_download): Change
3267 write_inferior_data_ptr to write_inferior_data_pointer.
3268 (cmd_qtstart): Likewise.
3269 (write_inferior_data_ptr): Remove.
3270 (download_agent_expr): Change write_inferior_data_ptr to
3271 write_inferior_data_pointer.
3272 (download_tracepoint_1): Likewise.
3273 (download_tracepoint): Likewise.
3274 (download_trace_state_variables): Likewise.
3276 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3277 Marcin Kościelnicki <koriakin@0x04.net>
3279 * tracepoint.c (struct tracepoint_action_ops): Remove.
3280 (struct tracepoint_action): Remove ops.
3281 (m_tracepoint_action_download, r_tracepoint_action_download)
3282 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3283 size and offset accordingly.
3284 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3285 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3286 (tracepoint_action_send, tracepoint_action_download): New functions.
3287 Helpers for trace action handlers.
3288 (add_tracepoint_action): Remove setup actions ops.
3289 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3291 2016-02-10 Yao Qi <yao.qi@linaro.org>
3293 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3295 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3297 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3299 * configure: Regenerate.
3301 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3303 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3304 void * to gdb_byte *.
3305 * linux-low.c (siginfo_fixup): Likewise.
3306 (linux_xfer_siginfo): Likewise.
3307 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3309 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3311 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3313 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3315 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3317 * linux-x86-low.c [__x86_64__]: Include
3318 "nat/amd64-linux-siginfo.h".
3319 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3320 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3321 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3322 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3323 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3324 (cpt_si_fd, si_timerid, si_overrun): Move from
3325 nat/amd64-linux-siginfo.c.
3326 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3328 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3330 * server.c (skip_to_semicolon): Remove.
3331 (process_point_options): Use strchrnul instead of
3334 2016-01-26 Yao Qi <yao.qi@linaro.org>
3336 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3337 * linux-low.c (install_software_single_step_breakpoints): Don't
3338 call regcache_read_pc.
3339 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3342 2016-01-26 Yao Qi <yao.qi@linaro.org>
3344 * linux-low.c (install_software_single_step_breakpoints): Call
3345 regcache_read_pc instead of get_pc.
3347 2016-01-26 Yao Qi <yao.qi@linaro.org>
3349 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3350 (unblock_async_io): Rename to ...
3351 (block_unblock_async_io): ... it. New function.
3352 (enable_async_io): Don't install SIGIO handler. Unblock it
3354 (disable_async_io): Don't ignore SIGIO. Block it instead.
3355 (initialize_async_io): Install SIGIO handler. Don't call
3358 2016-01-26 Yao Qi <yao.qi@linaro.org>
3360 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3361 first character is '\003', call *the_target->request_interrupt.
3363 2016-01-25 Yao Qi <yao.qi@linaro.org>
3365 * remote-utils.c (new_thread_notify): Remove.
3366 (dead_thread_notify): Likewise.
3367 * remote-utils.h (new_thread_notify): Remove declaration.
3368 (dead_thread_notify): Likewise.
3370 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3372 * gdb.trace/pending.exp: Fix expected message on continue.
3374 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3376 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3377 it works properly on big-endian machines where sizeof (CORE_ADDR)
3380 2016-01-21 Pedro Alves <palves@redhat.com>
3382 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3383 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3384 * configure: Regenerate.
3386 2016-01-21 Yao Qi <yao.qi@linaro.org>
3388 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3389 is_thumb and set it according to CPSR saved on the stack.
3390 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3391 arm_sigreturn_next_pc.
3393 2016-01-18 Yao Qi <yao.qi@linaro.org>
3395 * linux-low.c (linux_set_pc_64bit): New function.
3396 (linux_get_pc_64bit): New function.
3397 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3399 * linux-sparc-low.c (debug_threads): Remove declaration.
3400 (sparc_get_pc): Remove.
3401 (the_low_target): Use linux_get_pc_64bit instead of
3403 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3404 (the_low_target): Use linux_get_pc_64bit and
3407 2016-01-18 Yao Qi <yao.qi@linaro.org>
3409 * linux-arm-low.c (debug_threads): Remove declaration.
3410 (arm_get_pc, arm_set_pc): Remove.
3411 (the_low_target): Use linux_get_pc_32bit and
3413 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3414 (the_low_target): Use linux_get_pc_32bit and
3416 * linux-cris-low.c (debug_threads): Remove declaration.
3417 (cris_get_pc, cris_set_pc,): Remove.
3418 (the_low_target): Use linux_get_pc_32bit and
3420 * linux-crisv32-low.c (debug_threads): Remove declaration.
3421 (cris_get_pc, cris_set_pc): Remove.
3422 (the_low_target): Use linux_get_pc_32bit and
3424 * linux-low.c: Include inttypes.h.
3425 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3426 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3427 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3428 (the_low_target): Use linux_get_pc_32bit and
3430 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3431 (the_low_target): Use linux_get_pc_32bit and
3433 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3434 (the_low_target): Use linux_get_pc_32bit and
3436 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3437 (the_low_target): Use linux_get_pc_32bit and
3439 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3440 (the_low_target): Use linux_get_pc_32bit and
3443 2016-01-18 Gary Benson <gbenson@redhat.com>
3445 * configure.ac (AC_FUNC_FORK): New check.
3446 * config.in: Regenerate.
3447 * configure: Likewise.
3449 2016-01-14 Yao Qi <yao.qi@linaro.org>
3451 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3452 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3453 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3454 arm_get_next_pcs_ctor.
3456 2016-01-12 Josh Stone <jistone@redhat.com>
3457 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3459 * inferiors.h: Include "gdb_vecs.h".
3460 (struct process_info): Add syscalls_to_catch.
3461 * inferiors.c (remove_process): Free syscalls_to_catch.
3462 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3463 syscall_return stops.
3464 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3465 * server.c (handle_general_set): Handle QCatchSyscalls.
3466 (handle_query): Report support for QCatchSyscalls.
3467 * target.h (struct target_ops): Add supports_catch_syscall.
3468 (target_supports_catch_syscall): New macro.
3469 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3470 (struct lwp_info): Add syscall_state.
3471 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3472 Maintain syscall_state and syscalls_to_catch across exec.
3473 (get_syscall_trapinfo): New function, proxy to the_low_target.
3474 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3475 (linux_low_filter_event): Toggle syscall_state entry/return for
3476 syscall traps, and set it ignored for all others.
3477 (gdb_catching_syscalls_p): New function.
3478 (gdb_catch_this_syscall_p): New function.
3479 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3480 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3481 (linux_supports_catch_syscall): New function.
3482 (linux_target_ops): Install it.
3483 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3484 (the_low_target): Install it.
3486 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3488 * acinclude.m4: Include new ../warning.m4 file.
3489 * configure: Regenerated.
3490 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3492 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3494 * ax.c (is_goto_target): Mark static.
3495 * linux-low.c (register_addr): Likewise.
3496 (linux_fetch_registers, linux_store_registers): Likewise.
3497 * mem-break.c (any_persistent_commands): Fix old prototype.
3498 (add_commands_to_breakpoint): Mark static.
3499 * regcache.c (find_register_by_name): Delete unused func.
3500 * remote-utils.c (hex_or_minus_one): Mark static.
3501 * server.c (monitor_show_help): Mark static.
3502 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3503 handle_v_requests): Likewise.
3505 2016-01-12 Pedro Alves <palves@redhat.com>
3507 Remove use of the registered trademark symbol throughout.
3509 2016-01-08 Yao Qi <yao.qi@linaro.org>
3511 * remote-utils.c (getpkt): If c is '\003', call target hook
3514 2016-01-06 Yao Qi <yao.qi@linaro.org>
3516 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3517 linux-aarch32-low.c.
3518 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3519 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3520 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3521 (thumb2_breakpoint): Declare.
3522 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3523 linux-aarch32-low.h.
3524 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3525 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3526 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3528 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3530 * gdbreplay.c (gdbreplay_version): Change copyright year in
3532 * server.c (gdbserver_version): Likewise.
3534 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3536 * server.c (crc32_table): Delete.
3537 (crc32): Use libiberty's xcrc32 function.
3539 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3541 * lynx-low.c (lynx_delete_thread_callback): New function.
3542 (lynx_mourn): Properly delete our process and all of its
3543 threads. Remove call to clear_inferiors.
3545 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3547 * target.c (thread_search_callback): Add check that
3548 the thread_stopped target callback is not NULL before
3551 2015-12-21 Yao Qi <yao.qi@linaro.org>
3553 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3556 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3558 * server.c (handle_query): Call target_supports_software_single_step.
3560 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3562 * linux-low.c (single_step): New function.
3563 (linux_resume_one_lwp_throw): Call single_step.
3564 (start_step_over): Likewise.
3566 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3568 * Makefile.in (SFILES): Append arch/arm-linux.c,
3569 arch/arm-get-next-pcs.c.
3570 (arm-linux.o): New rule.
3571 (arm-get-next-pcs.o): New rule.
3572 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3574 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3575 to linux-aarch32-low.c.
3576 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3577 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3578 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3579 (thumb2_breakpoint_len): Likewise.
3580 (arm_is_thumb_mode): Make non-static.
3581 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3582 from linux-aarch32-low.c.
3583 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3584 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3585 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3586 (thumb2_breakpoint_len): Likewise.
3587 (arm_is_thumb_mode): New declaration.
3588 * linux-arm-low.c: Include arch/arm-linux.h
3589 aarch/arm-get-next-pcs.h, sys/syscall.h.
3590 (get_next_pcs_ops): New struct.
3591 (get_next_pcs_addr_bits_remove): New function.
3592 (get_next_pcs_is_thumb): New function.
3593 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3594 (arm_sigreturn_next_pc): Likewise.
3595 (get_next_pcs_syscall_next_pc): Likewise.
3596 (arm_gdbserver_get_next_pcs): Likewise.
3597 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3599 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3600 * server.h: Include gdb_vecs.h.
3602 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3604 * Makefile.in (SFILES): Append common/common-regcache.c.
3605 (OBS): Append common-regcache.o.
3606 (common-regcache.o): New rule.
3607 * regcache.c (init_register_cache): Initialize cache to
3609 (regcache_raw_read_unsigned): New function.
3610 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3611 register_status enum.
3613 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3615 * linux-aarch64-low.c (the_low_targets): Rename
3616 breakpoint_reinsert_addr to get_next_pcs.
3617 * linux-arm-low.c (the_low_targets): Likewise.
3618 * linux-bfin-low.c (the_low_targets): Likewise.
3619 * linux-cris-low.c (the_low_targets): Likewise.
3620 * linux-crisv32-low.c (the_low_targets): Likewise.
3621 * linux-low.c (can_software_single_step): Likewise.
3622 (install_software_single_step_breakpoints): New function.
3623 (start_step_over): Use install_software_single_step_breakpoints.
3624 * linux-low.h: New CORE_ADDR vector.
3625 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3627 * linux-mips-low.c (the_low_targets): Likewise.
3628 * linux-nios2-low.c (the_low_targets): Likewise.
3629 * linux-sparc-low.c (the_low_targets): Likewise.
3631 2015-12-17 Pedro Alves <palves@redhat.com>
3633 * linux-low.c (linux_kill_one_lwp): Remove references to
3635 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3637 (linux_init_signals): Delete.
3638 (initialize_low): Adjust.
3639 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3641 2015-12-16 Pedro Alves <palves@redhat.com>
3643 * configure.ac (compiler warning flags): When testing a
3644 -Wno-foo option, check whether -Wfoo works instead.
3645 * configure: Regenerate.
3647 2015-12-11 Don Breazeal <donb@codesourcery.com>
3649 * server.c (process_serial_event): Don't exit from gdbserver
3650 in remote mode if there are still active inferiors.
3652 2015-12-11 Yao Qi <yao.qi@linaro.org>
3654 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3655 arm_breakpoint_at if the process is 32-bit.
3657 2015-12-11 Yao Qi <yao.qi@linaro.org>
3659 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3662 2015-12-07 Yao Qi <yao.qi@linaro.org>
3664 * configure.srv: Append arm.o to srv_tgtobj for
3665 aarch64*-*-linux* target.
3666 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3667 from linux-arm-low.c.
3668 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3669 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3670 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3671 (thumb2_breakpoint_len): Likewise.
3672 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3673 (arm_breakpoint_kinds): Likewise.
3674 (arm_breakpoint_kind_from_pc): Likewise.
3675 (arm_sw_breakpoint_from_kind): Likewise.
3676 (arm_breakpoint_kind_from_current_state): Likewise.
3677 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3678 (arm_sw_breakpoint_from_kind): Declare.
3679 (arm_breakpoint_kind_from_current_state): Declare.
3680 (arm_breakpoint_at): Declare.
3681 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3682 arm_sw_breakpoint_from_kind if process is 32-bit.
3683 (aarch64_breakpoint_kind_from_pc): New function.
3684 (aarch64_breakpoint_kind_from_current_state): New function.
3685 (the_low_target): Initialize fields breakpoint_kind_from_pc
3686 and breakpoint_kind_from_current_state.
3687 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3688 linux-aarch32-low.c.
3689 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3690 (arm_breakpoint, arm_breakpoint_len): Likewise.
3691 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3692 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3693 (arm_is_thumb_mode): Likewise.
3694 (arm_breakpoint_at): Likewise.
3695 (arm_breakpoint_kind_from_pc): Likewise.
3696 (arm_sw_breakpoint_from_kind): Likewise.
3697 (arm_breakpoint_kind_from_current_state): Likewise.
3700 2015-08-04 Yao Qi <yao.qi@linaro.org>
3702 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3703 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3704 * server.c (extended_protocol): Remove "static".
3705 * server.h (extended_protocol): Declare it.
3707 2015-12-04 Josh Stone <jistone@redhat.com>
3709 * target.h (struct target_ops) <arch_setup>: Rename to ...
3710 (struct target_ops) <post_create_inferior>: ... this.
3711 (target_arch_setup): Rename to ...
3712 (target_post_create_inferior): ... this, calling post_create_inferior.
3713 * server.c (start_inferior): Update target_arch_setup calls to
3714 target_post_create_inferior.
3715 * linux-low.c (linux_low_ptrace_options): Forward declare.
3716 (linux_arch_setup): Update its comment for general use.
3717 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3718 (struct linux_target_ops): Use linux_post_create_inferior.
3719 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3720 to post_create_inferior.
3721 * nto-low.c (struct nto_target_ops): Likewise.
3722 * spu-low.c (struct spu_target_ops): Likewise.
3723 * win32-low.c (struct win32_target_ops): Likewise.
3725 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3727 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3729 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3731 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3732 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3733 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3734 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3735 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3736 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3737 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3738 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3739 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3740 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3741 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3742 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3744 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3746 * linux-low.c (linux_look_up_symbols): Don't call
3747 linux_supports_traceclone.
3748 * linux-low.h (thread_db_init): Remove use_events argument.
3749 * thread-db.c (thread_db_use_event): Remove global variable.
3750 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3751 (struct thread_db) <td_create_bp>: Remove field.
3752 (thread_db_create_event): Remove function.
3753 (thread_db_enable_reporting): Likewise.
3754 (find_one_thread): Don't check for thread_db_use_events.
3755 (attach_thread): Likewise.
3756 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3757 (try_thread_db_load_1): Don't check for thread_db_use_events.
3758 (thread_db_init): Remove use_events argument and thread events
3760 (remove_thread_event_breakpoints): Remove function.
3761 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3763 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3765 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3767 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3768 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3769 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3770 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3771 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3773 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3775 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3776 * linux-low.c (can_hardware_single_step): Use
3777 supports_hardware_single_step.
3778 (can_software_single_step): New function.
3779 (start_step_over): Call can_software_single_step.
3780 (linux_supports_hardware_single_step): New function.
3781 (struct target_ops) <supports_software_single_step>: Initialize.
3782 * linux-low.h (struct linux_target_ops)
3783 <supports_hardware_single_step>: Initialize.
3784 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3785 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3786 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3787 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3788 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3789 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3790 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3791 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3792 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3793 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3795 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3796 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3798 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3799 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3800 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3802 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3803 * target.h (struct target_ops): <supports_software_single_step>:
3805 (target_supports_software_single_step): New macro.
3807 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3809 * linux-low.c (linux_wait_1): Fix pc advance condition.
3810 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3811 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3813 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3815 * linux-arm-low.c (arm_is_thumb_mode): New function.
3816 (arm_breakpoint_at): Use arm_is_thumb_mode.
3817 (arm_breakpoint_kind_from_current_state): New function.
3818 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3820 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3821 (linux_breakpoint_kind_from_current_state): New function.
3822 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3823 * linux-low.h (struct linux_target_ops)
3824 <breakpoint_kind_from_current_state>: New field.
3825 * target.h (struct target_ops): Likewise.
3826 (target_breakpoint_kind_from_current_state): New macro.
3828 2015-11-30 Pedro Alves <palves@redhat.com>
3830 * linux-low.c (linux_resume): Wake up the event loop before
3833 2015-11-30 Pedro Alves <palves@redhat.com>
3835 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3837 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3839 * target.c (struct thread_search): New structure.
3840 (thread_search_callback): New function.
3841 (prev_general_thread): New global.
3842 (prepare_to_access_memory, done_accessing_memory): New functions.
3843 * target.h (prepare_to_access_memory, done_accessing_memory):
3844 Replace macros with function declarations.
3846 2015-11-30 Pedro Alves <palves@redhat.com>
3849 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3850 report TARGET_WAITKIND_NO_RESUMED.
3851 * remote-utils.c (prepare_resume_reply): Handle
3852 TARGET_WAITKIND_NO_RESUMED.
3853 * server.c (report_no_resumed): New global.
3854 (handle_query) <qSupported>: Handle "no-resumed+". Report
3855 "no-resumed+" support.
3856 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3857 return error if the client doesn't support no-resumed events.
3858 (push_stop_notification): New function.
3859 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3860 events if the client supports them.
3862 2015-11-30 Pedro Alves <palves@redhat.com>
3864 * linux-low.c (thread_still_has_status_pending_p): Don't check
3866 (lwp_resumed): New function.
3867 (status_pending_p_callback): Return early if the LWP is not
3868 supposed to be resumed.
3870 2015-11-30 Pedro Alves <palves@redhat.com>
3872 * linux-low.c (handle_extended_wait): Assert that the LWP's
3873 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3874 thread create events, leave the new child's status pending.
3875 (linux_low_filter_event): If GDB wants to hear about thread exit
3876 events, leave the LWP marked dead and don't delete it.
3877 (linux_wait_for_event_filtered): Don't check for thread exit.
3878 (filter_exit_event): New function.
3879 (linux_wait_1): Use it, when returning an exit event.
3880 (linux_resume_one_lwp_throw): Assert that the LWP's
3881 waitstatus is TARGET_WAITKIND_IGNORE.
3882 * remote-utils.c (prepare_resume_reply): Handle
3883 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3884 * server.c (report_thread_events): New global.
3885 (handle_general_set): Handle QThreadEvents.
3886 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3887 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3888 TARGET_WAITKIND_THREAD_EXITED.
3889 * server.h (report_thread_events): Declare.
3891 2015-11-30 Pedro Alves <palves@redhat.com>
3893 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3894 the thread's last_resume_kind was resume_stop.
3896 2015-11-30 Pedro Alves <palves@redhat.com>
3898 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3901 2015-11-30 Pedro Alves <palves@redhat.com>
3903 * server.c (handle_v_requests): Handle vCtrlC.
3905 2015-11-30 Pedro Alves <palves@redhat.com>
3907 * gdbthread.h (find_any_thread_of_pid): Declare.
3908 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3910 * server.c (handle_query): If current_thread is NULL, look for
3911 another thread of the selected process.
3913 2015-11-26 Daniel Colascione <dancol@dancol.org>
3914 Simon Marchi <simon.marchi@ericsson.com>
3916 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3917 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3919 * target.h (struct target_ops) <thread_name>: New field.
3920 (target_thread_name): New macro.
3922 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3924 * regcache.h (regcache_invalidate_pid): Add declaration.
3925 * regcache.c (regcache_invalidate_pid): New function, extracted
3926 from regcache_invalidate.
3927 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3928 Add trivial documentation comment.
3929 * lynx-low.c: Use regcache_invalidate_pid instead of
3930 regcache_invalidate.
3932 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3934 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3935 and Elf64_auxv_t if the target is Android.
3937 2015-11-22 Doug Evans <xdje42@gmail.com>
3939 * target.h: #include <sys/types.h>.
3941 2015-11-19 Pedro Alves <palves@redhat.com>
3943 * linux-low.c (linux_process_qsupported): Change prototype.
3945 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3947 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3948 and adjust to loop over all features.
3949 * server.c (handle_query) <qSupported>: Adjust to call
3950 target_process_qsupported once, passing it a vector of unprocessed
3952 * target.h (struct target_ops) <process_qsupported>: Change
3954 (target_process_qsupported): Adjust.
3956 2015-11-19 Pedro Alves <palves@redhat.com>
3958 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3960 * configure: Regenerate.
3962 2015-11-19 Pedro Alves <palves@redhat.com>
3964 * configure: Regenerate.
3966 2015-11-19 Yao Qi <yao.qi@linaro.org>
3968 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3971 2015-11-19 Yao Qi <yao.qi@linaro.org>
3973 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3974 (struct aarch64_operand): Move enum out.
3976 2015-11-19 Yao Qi <yao.qi@linaro.org>
3978 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3979 struct user_fpsimd_state *.
3980 (aarch64_store_fpregset): Likewise.
3982 2015-11-19 Yao Qi <yao.qi@linaro.org>
3984 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3985 struct user_pt_regs *.
3986 (aarch64_store_gregset): Likewise.
3988 2015-11-18 Pedro Alves <palves@redhat.com>
3990 * Makefile.in (all_object_files): Add $IPA_OBJS.
3992 2015-11-17 Pedro Alves <palves@redhat.com>
3994 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3995 GDB_SIGNAL_0 and gdb_signal_to_string.
3997 2015-11-17 Pedro Alves <palves@redhat.com>
3999 * win32-low.c (handle_output_debug_string): Remove parameter.
4000 (win32_kill): Remove our_status local and adjust call to
4001 handle_output_debug_string.
4002 (get_child_debug_event): Adjust call to
4003 handle_output_debug_string.
4005 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4007 * linux-mips-low.c (mips_fill_gregset): Add cast.
4008 (mips_store_gregset): Likewise.
4009 (mips_fill_fpregset): Likewise.
4010 (mips_store_fpregset): Likewise.
4012 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4014 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4017 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4019 * linux-mips-low.c (mips_linux_new_thread): Change type of
4020 watch_type to enum target_hw_bp_type.
4022 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4024 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4025 Change return type to arm_hwbp_type.
4027 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4029 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4030 (arm_store_gregset): Likewise.
4031 * linux-arm-low.c (arm_get_hwcap): Likewise.
4032 (arm_read_description): Likewise.
4034 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4036 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4038 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4040 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4041 (ppc_fill_vsxregset): Likewise.
4042 (ppc_store_vsxregset): Likewise.
4043 (ppc_fill_vrregset): Likewise.
4044 (ppc_store_vrregset): Likewise.
4045 (ppc_fill_evrregset): Likewise.
4046 (ppc_store_evrregset): Likewise.
4048 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4050 * linux-ppc-low.c (ppc_usrregs_info): Remove
4051 forward-declaration.
4052 (ppc_arch_setup): Move lower in file.
4054 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4056 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4057 (ps_pdwrite): Likewise.
4059 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4061 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4062 to after assert checks.
4064 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4066 * proc-service.c (ps_pdread): Add/adjust casts.
4067 (ps_pdwrite): Add/adjust casts.
4069 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4071 * server.c (handle_search_memory_1): Cast return value of
4074 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4076 * server.c (write_qxfer_response): Change type of data to
4079 2015-10-29 Pedro Alves <palves@redhat.com>
4081 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4083 2015-10-29 Pedro Alves <palves@redhat.com>
4085 * tracepoint.c (clear_installed_tracepoints): Add casts.
4087 2015-10-29 Pedro Alves <palves@redhat.com>
4089 * server.c (handle_v_cont, process_serial_event): Add enum
4090 gdb_signal casts to signal parsing code.
4092 2015-10-29 Pedro Alves <palves@redhat.com>
4094 * linux-low.h (NULL_REGSET): Define.
4095 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4096 * linux-arm-low.c (arm_regsets): Likewise.
4097 * linux-crisv32-low.c (cris_regsets): Likewise.
4098 * linux-m68k-low.c (m68k_regsets): Likewise.
4099 * linux-mips-low.c (mips_regsets): Likewise.
4100 * linux-nios2-low.c (nios2_regsets): Likewise.
4101 * linux-ppc-low.c (ppc_regsets): Likewise.
4102 * linux-s390-low.c (s390_regsets): Likewise.
4103 * linux-sh-low.c (sh_regsets): Likewise.
4104 * linux-sparc-low.c (sparc_regsets): Likewise.
4105 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4106 * linux-tile-low.c (tile_regsets): Likewise.
4107 * linux-x86-low.c (x86_regsets): Likewise.
4108 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4110 2015-10-29 Pedro Alves <palves@redhat.com>
4112 * linux-low.h (NULL_REGSET): Define.
4113 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4114 * linux-arm-low.c (arm_regsets): Likewise.
4115 * linux-crisv32-low.c (cris_regsets): Likewise.
4116 * linux-m68k-low.c (m68k_regsets): Likewise.
4117 * linux-mips-low.c (mips_regsets): Likewise.
4118 * linux-nios2-low.c (nios2_regsets): Likewise.
4119 * linux-ppc-low.c (ppc_regsets): Likewise.
4120 * linux-s390-low.c (s390_regsets): Likewise.
4121 * linux-sh-low.c (sh_regsets): Likewise.
4122 * linux-sparc-low.c (sparc_regsets): Likewise.
4123 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4124 * linux-tile-low.c (tile_regsets): Likewise.
4125 * linux-x86-low.c (x86_regsets): Likewise.
4126 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4128 2015-10-26 Doug Evans <dje@google.com>
4130 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4132 2015-10-26 Doug Evans <dje@google.com>
4134 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4136 2015-10-26 Doug Evans <dje@google.com>
4138 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4140 (attach_thread, find_new_threads_callback): Ditto.
4142 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4144 * mem-break.h (set_breakpoint_data): Remove.
4146 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4148 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4149 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4150 (initialize_low): Remove set_breakpoint_data call.
4151 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4152 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4153 (initialize_low): Remove set_breakpoint_data call.
4154 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4155 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4156 (initialize_low): Remove set_breakpoint_data call.
4158 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4160 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4161 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4162 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4163 * target.h (target_breakpoint_kind_from_pc): New macro.
4165 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4167 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4168 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4169 the default breakpoint kind.
4171 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4173 * linux-arm-low.c (arm_supports_z_point_type): Add software
4176 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4178 * linux-arm-low.c: Refactor breakpoint definitions.
4179 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4180 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4182 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4184 * Makefile.in: Add arm.c/o.
4185 * configure.srv: Likewise.
4186 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4187 (arm_breakpoint_kind_from_pc): New function.
4188 (arm_sw_breakpoint_from_kind): Return proper kind.
4189 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4191 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4193 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4195 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4196 (struct raw_breakpoint) <size>: Remove.
4197 (struct raw_breakpoint) <kind>: Add.
4198 (bp_size): New function.
4199 (bp_opcode): Likewise.
4200 (find_raw_breakpoint_at): Adjust for kind.
4201 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4202 (remove_memory_breakpoint): Adjust for kind call bp_size.
4203 (set_raw_breakpoint_at): Adjust for kind.
4204 (set_breakpoint): Likewise.
4205 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4206 (delete_raw_breakpoint): Adjust for kind.
4207 (delete_breakpoint): Likewise.
4208 (find_gdb_breakpoint): Likewise.
4209 (set_gdb_breakpoint_1): Likewise.
4210 (set_gdb_breakpoint): Likewise.
4211 (delete_gdb_breakpoint_1): Likewise.
4212 (delete_gdb_breakpoint): Likewise.
4213 (uninsert_raw_breakpoint): Likewise.
4214 (reinsert_raw_breakpoint): Likewise.
4215 (set_breakpoint_data): Remove.
4216 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4217 (check_mem_read): Adjust for kind call bp_size.
4218 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4219 (clone_one_breakpoint): Adjust for kind.
4220 * mem-break.h (set_gdb_breakpoint): Likewise.
4221 (delete_gdb_breakpoint): Likewise.
4222 * server.c (process_serial_event): Likewise.
4224 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4226 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4227 (struct linux_target_ops) <breakpoint>: Remove.
4228 (struct linux_target_ops) <breakpoint_len>: Remove.
4229 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4230 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4231 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4232 (arm_sw_breakpoint_from_kind): New function.
4233 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4234 (struct linux_target_ops) <breakpoint>: Remove.
4235 (struct linux_target_ops) <breakpoint_len>: Remove.
4236 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4237 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4238 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4239 (struct linux_target_ops) <breakpoint>: Remove.
4240 (struct linux_target_ops) <breakpoint_len>: Remove.
4241 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4242 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4243 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4244 (struct linux_target_ops) <breakpoint>: Remove.
4245 (struct linux_target_ops) <breakpoint_len>: Remove.
4246 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4247 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4248 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4249 and sw_breakpoint_from_kind to increment the pc.
4250 (linux_breakpoint_kind_from_pc): New function.
4251 (linux_sw_breakpoint_from_kind): New function.
4252 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4253 (initialize_low): Call breakpoint_kind_from_pc and
4254 sw_breakpoint_from_kind to replace breakpoint_data/len.
4255 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4257 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4258 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4259 (struct linux_target_ops) <breakpoint>: Remove.
4260 (struct linux_target_ops) <breakpoint_len>: Remove.
4261 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4262 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4263 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4264 (struct linux_target_ops) <breakpoint>: Remove.
4265 (struct linux_target_ops) <breakpoint_len>: Remove.
4266 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4267 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4268 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4269 (struct linux_target_ops) <breakpoint>: Remove.
4270 (struct linux_target_ops) <breakpoint_len>: Remove.
4271 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4272 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4273 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4274 (struct linux_target_ops) <breakpoint>: Remove.
4275 (struct linux_target_ops) <breakpoint_len>: Remove.
4276 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4277 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4278 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4279 (struct linux_target_ops) <breakpoint>: Remove.
4280 (struct linux_target_ops) <breakpoint_len>: Remove.
4281 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4282 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4283 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4284 (struct linux_target_ops) <breakpoint>: Remove.
4285 (struct linux_target_ops) <breakpoint_len>: Remove.
4286 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4287 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4288 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4289 (struct linux_target_ops) <breakpoint>: Remove.
4290 (struct linux_target_ops) <breakpoint_len>: Remove.
4291 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4292 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4293 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4294 (struct linux_target_ops) <breakpoint>: Remove.
4295 (struct linux_target_ops) <breakpoint_len>: Remove.
4296 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4297 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4298 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4299 (struct linux_target_ops) <breakpoint>: Remove.
4300 (struct linux_target_ops) <breakpoint_len>: Remove.
4301 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4302 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4303 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4304 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4305 (struct linux_target_ops) <breakpoint>: Remove.
4306 (struct linux_target_ops) <breakpoint_len>: Remove.
4307 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4308 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4309 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4310 (struct linux_target_ops) <breakpoint>: Remove.
4311 (struct linux_target_ops) <breakpoint_len>: Remove.
4312 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4313 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4315 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4317 * linux-cris-low.c (cris_get_pc): Remove void arg.
4319 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4321 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4324 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4326 * inferiors.c (thread_pid_matches_callback): New function.
4327 (find_thread_process): New function.
4328 (remove_thread): Reset current_thread.
4329 (remove_process): Assert threads have been removed first.
4331 2015-10-15 Yao Qi <yao.qi@linaro.org>
4333 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4335 (aarch64_remove_point): Likewise.
4336 * regcache.c (regcache_register_size): New function.
4338 2015-10-12 Yao Qi <yao.qi@linaro.org>
4340 * linux-aarch64-low.c: Update all callers as emit_load_store
4341 is renamed to aarch64_emit_load_store.
4343 2015-10-12 Yao Qi <yao.qi@linaro.org>
4345 * linux-aarch64-low.c: Update all callers of function renaming
4346 from emit_insn to aarch64_emit_insn.
4348 2015-10-12 Yao Qi <yao.qi@linaro.org>
4350 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4351 arch/aarch64-insn.h.
4352 (struct aarch64_memory_operand): Likewise.
4354 (emit_insn): Move to arch/aarch64-insn.c.
4355 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4356 (emit_load_store): Move to arch/aarch64-insn.c.
4357 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4358 (can_encode_int32): Remove.
4360 2015-10-12 Yao Qi <yao.qi@linaro.org>
4362 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4363 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4364 (aarch64_relocate_instruction): Likewise.
4365 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4366 (struct aarch64_insn_visitor): Likewise.
4368 2015-10-12 Yao Qi <yao.qi@linaro.org>
4370 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4371 (struct aarch64_insn_visitor): New.
4372 (struct aarch64_insn_relocation_data): New.
4373 (aarch64_ftrace_insn_reloc_b): New function.
4374 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4375 (aarch64_ftrace_insn_reloc_cb): Likewise.
4376 (aarch64_ftrace_insn_reloc_tb): Likewise.
4377 (aarch64_ftrace_insn_reloc_adr): Likewise.
4378 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4379 (aarch64_ftrace_insn_reloc_others): Likewise.
4381 (aarch64_relocate_instruction): Use visitor.
4383 2015-10-12 Yao Qi <yao.qi@linaro.org>
4385 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4386 int. Add argument buf.
4387 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4388 aarch64_relocate_instruction.
4390 2015-10-12 Yao Qi <yao.qi@linaro.org>
4392 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4393 argument insn. Remove local variable insn. Don't call
4395 (aarch64_install_fast_tracepoint_jump_pad): Call
4398 2015-09-30 Yao Qi <yao.qi@linaro.org>
4400 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4401 (emit_load_store_pair): Likewise.
4403 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4405 * dll.c (match_dll): Add cast(s).
4406 (unloaded_dll): Likewise.
4407 * linux-low.c (second_thread_of_pid_p): Likewise.
4408 (delete_lwp_callback): Likewise.
4409 (count_events_callback): Likewise.
4410 (select_event_lwp_callback): Likewise.
4411 (linux_set_resume_request): Likewise.
4412 * server.c (accumulate_file_name_length): Likewise.
4413 (emit_dll_description): Likewise.
4414 (handle_qxfer_threads_worker): Likewise.
4415 (visit_actioned_threads): Likewise.
4416 * thread-db.c (any_thread_of): Likewise.
4417 * tracepoint.c (same_process_p): Likewise.
4418 (match_blocktype): Likewise.
4419 (build_traceframe_info_xml): Likewise.
4421 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4423 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4425 (gdb_unparse_agent_expr): Likewise.
4426 * hostio.c (require_data): Likewise.
4427 (handle_pread): Likewise.
4428 * linux-low.c (disable_regset): Likewise.
4429 (fetch_register): Likewise.
4430 (store_register): Likewise.
4431 (get_dynamic): Likewise.
4432 (linux_qxfer_libraries_svr4): Likewise.
4433 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4434 (set_fast_tracepoint_jump): Likewise.
4435 (uninsert_fast_tracepoint_jumps_at): Likewise.
4436 (reinsert_fast_tracepoint_jumps_at): Likewise.
4437 (validate_inserted_breakpoint): Likewise.
4438 (clone_agent_expr): Likewise.
4439 * regcache.c (init_register_cache): Likewise.
4440 * remote-utils.c (putpkt_binary_1): Likewise.
4441 (decode_M_packet): Likewise.
4442 (decode_X_packet): Likewise.
4443 (look_up_one_symbol): Likewise.
4444 (relocate_instruction): Likewise.
4445 (monitor_output): Likewise.
4446 * server.c (handle_search_memory): Likewise.
4447 (handle_qxfer_exec_file): Likewise.
4448 (handle_qxfer_libraries): Likewise.
4449 (handle_qxfer): Likewise.
4450 (handle_query): Likewise.
4451 (handle_v_cont): Likewise.
4452 (handle_v_run): Likewise.
4453 (captured_main): Likewise.
4454 * target.c (write_inferior_memory): Likewise.
4455 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4456 * tracepoint.c (init_trace_buffer): Likewise.
4457 (add_tracepoint_action): Likewise.
4458 (add_traceframe): Likewise.
4459 (add_traceframe_block): Likewise.
4460 (cmd_qtdpsrc): Likewise.
4461 (cmd_qtdv): Likewise.
4462 (cmd_qtstatus): Likewise.
4463 (response_source): Likewise.
4464 (response_tsv): Likewise.
4465 (cmd_qtnotes): Likewise.
4466 (gdb_collect): Likewise.
4467 (initialize_tracepoint): Likewise.
4469 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4471 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4472 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4473 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4475 (enum aarch64_condition_codes): New enum.
4476 (w0): New static global.
4479 (struct aarch64_memory_operand) <type>: New
4480 MEMORY_OPERAND_POSTINDEX type.
4481 (postindex_memory_operand): New helper function.
4482 (emit_ret): New function.
4483 (emit_load_store_pair): New function, factored out of emit_stp
4484 with support for MEMORY_OPERAND_POSTINDEX.
4485 (emit_stp): Rewrite using emit_load_store_pair.
4486 (emit_ldp): New function.
4487 (emit_load_store): Likewise.
4488 (emit_ldr): Mention post-index instruction in comment.
4489 (emit_ldrh): New function.
4490 (emit_ldrb): New function.
4491 (emit_ldrsw): Mention post-index instruction in comment.
4492 (emit_str): Likewise.
4493 (emit_subs): New function.
4494 (emit_cmp): Likewise.
4495 (emit_and): Likewise.
4496 (emit_orr): Likewise.
4497 (emit_orn): Likewise.
4498 (emit_eor): Likewise.
4499 (emit_mvn): Likewise.
4500 (emit_lslv): Likewise.
4501 (emit_lsrv): Likewise.
4502 (emit_asrv): Likewise.
4503 (emit_mul): Likewise.
4504 (emit_sbfm): Likewise.
4505 (emit_sbfx): Likewise.
4506 (emit_ubfm): Likewise.
4507 (emit_ubfx): Likewise.
4508 (emit_csinc): Likewise.
4509 (emit_cset): Likewise.
4510 (emit_nop): Likewise.
4511 (emit_ops_insns): New helper function.
4512 (emit_pop): Likewise.
4513 (emit_push): Likewise.
4514 (aarch64_emit_prologue): New function.
4515 (aarch64_emit_epilogue): Likewise.
4516 (aarch64_emit_add): Likewise.
4517 (aarch64_emit_sub): Likewise.
4518 (aarch64_emit_mul): Likewise.
4519 (aarch64_emit_lsh): Likewise.
4520 (aarch64_emit_rsh_signed): Likewise.
4521 (aarch64_emit_rsh_unsigned): Likewise.
4522 (aarch64_emit_ext): Likewise.
4523 (aarch64_emit_log_not): Likewise.
4524 (aarch64_emit_bit_and): Likewise.
4525 (aarch64_emit_bit_or): Likewise.
4526 (aarch64_emit_bit_xor): Likewise.
4527 (aarch64_emit_bit_not): Likewise.
4528 (aarch64_emit_equal): Likewise.
4529 (aarch64_emit_less_signed): Likewise.
4530 (aarch64_emit_less_unsigned): Likewise.
4531 (aarch64_emit_ref): Likewise.
4532 (aarch64_emit_if_goto): Likewise.
4533 (aarch64_emit_goto): Likewise.
4534 (aarch64_write_goto_address): Likewise.
4535 (aarch64_emit_const): Likewise.
4536 (aarch64_emit_call): Likewise.
4537 (aarch64_emit_reg): Likewise.
4538 (aarch64_emit_pop): Likewise.
4539 (aarch64_emit_stack_flush): Likewise.
4540 (aarch64_emit_zero_ext): Likewise.
4541 (aarch64_emit_swap): Likewise.
4542 (aarch64_emit_stack_adjust): Likewise.
4543 (aarch64_emit_int_call_1): Likewise.
4544 (aarch64_emit_void_call_2): Likewise.
4545 (aarch64_emit_eq_goto): Likewise.
4546 (aarch64_emit_ne_goto): Likewise.
4547 (aarch64_emit_lt_goto): Likewise.
4548 (aarch64_emit_le_goto): Likewise.
4549 (aarch64_emit_gt_goto): Likewise.
4550 (aarch64_emit_ge_got): Likewise.
4551 (aarch64_emit_ops_impl): New static global variable.
4552 (aarch64_emit_ops): New target function, return
4553 &aarch64_emit_ops_impl.
4554 (struct linux_target_ops): Install it.
4556 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4558 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4559 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4561 * linux-aarch64-ipa.c: New file.
4562 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4564 (aarch64_get_thread_area): New target method.
4565 (extract_signed_bitfield): New helper function.
4566 (aarch64_decode_ldr_literal): New function.
4567 (enum aarch64_opcodes): New enum.
4568 (struct aarch64_register): New struct.
4569 (struct aarch64_operand): New struct.
4570 (x0): New static global.
4579 (aarch64_register): New helper function.
4580 (register_operand): Likewise.
4581 (immediate_operand): Likewise.
4582 (struct aarch64_memory_operand): New struct.
4583 (offset_memory_operand): New helper function.
4584 (preindex_memory_operand): Likewise.
4585 (enum aarch64_system_control_registers): New enum.
4586 (ENCODE): New macro.
4587 (emit_insn): New helper function.
4588 (emit_b): New function.
4589 (emit_bcond): Likewise.
4590 (emit_cb): Likewise.
4591 (emit_tb): Likewise.
4592 (emit_blr): Likewise.
4593 (emit_stp): Likewise.
4594 (emit_ldp_q_offset): Likewise.
4595 (emit_stp_q_offset): Likewise.
4596 (emit_load_store): Likewise.
4597 (emit_ldr): Likewise.
4598 (emit_ldrsw): Likewise.
4599 (emit_str): Likewise.
4600 (emit_ldaxr): Likewise.
4601 (emit_stxr): Likewise.
4602 (emit_stlr): Likewise.
4603 (emit_data_processing_reg): Likewise.
4604 (emit_data_processing): Likewise.
4605 (emit_add): Likewise.
4606 (emit_sub): Likewise.
4607 (emit_mov): Likewise.
4608 (emit_movk): Likewise.
4609 (emit_mov_addr): Likewise.
4610 (emit_mrs): Likewise.
4611 (emit_msr): Likewise.
4612 (emit_sevl): Likewise.
4613 (emit_wfe): Likewise.
4614 (append_insns): Likewise.
4615 (can_encode_int32_in): New helper function.
4616 (aarch64_relocate_instruction): New function.
4617 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4618 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4619 (struct linux_target_ops): Install aarch64_get_thread_area,
4620 aarch64_install_fast_tracepoint_jump_pad and
4621 aarch64_get_min_fast_tracepoint_insn_len.
4623 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4625 * Makefile.in (aarch64-insn.o): New rule.
4626 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4628 2015-09-21 Yao Qi <yao.qi@linaro.org>
4630 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4632 2015-09-21 Yao Qi <yao.qi@linaro.org>
4634 * tracepoint.c (max_jump_pad_size): Remove.
4636 2015-09-18 Yao Qi <yao.qi@linaro.org>
4638 * linux-aarch64-low.c: Don't include sys/uio.h.
4639 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4641 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4643 * tracepoint.c (eval_result_type): Change prototype.
4644 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4646 2015-09-15 Pedro Alves <palves@redhat.com>
4648 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4649 Check whether to report exec events instead of checking whether
4650 multiprocess is enabled.
4652 2015-09-15 Pedro Alves <palves@redhat.com>
4655 * remote-utils.c (prepare_resume_reply): Merge
4656 TARGET_WAITKIND_VFORK_DONE switch case with the
4657 TARGET_WAITKIND_FORKED case.
4659 2015-09-15 Yao Qi <yao.qi@linaro.org>
4661 * server.c (handle_query): Check string comparison using
4662 "else if" instead of "if".
4664 2015-09-15 Yao Qi <yao.qi@linaro.org>
4666 * server.c (vCont_supported): New global variable.
4667 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4668 matches. Append ";vContSupported+" to own_buf.
4669 (handle_v_requests): Append ";s;S" to own_buf if target supports
4670 hardware single step or vCont_supported is false.
4671 (capture_main): Set vCont_supported to zero.
4673 2015-09-15 Yao Qi <yao.qi@linaro.org>
4675 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4677 (linux_supports_hardware_single_step): ... New function.
4678 (linux_target_ops): Update.
4679 * lynx-low.c (lynx_target_ops): Set field
4680 supports_hardware_single_step to target_can_do_hardware_single_step.
4681 * nto-low.c (nto_target_ops): Likewise.
4682 * spu-low.c (spu_target_ops): Likewise.
4683 * win32-low.c (win32_target_ops): Likewise.
4684 * target.c (target_can_do_hardware_single_step): New function.
4685 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4686 Remove. <supports_hardware_single_step>: New field.
4687 (target_supports_conditional_breakpoints): Remove.
4688 (target_supports_hardware_single_step): New macro.
4689 (target_can_do_hardware_single_step): Declare.
4690 * server.c (handle_query): Use target_supports_hardware_single_step
4691 instead of target_supports_conditional_breakpoints.
4693 2015-09-15 Yao Qi <yao.qi@linaro.org>
4695 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4697 (struct linux_target_ops the_low_target): Install
4698 aarch64_linux_siginfo_fixup.
4700 2015-09-11 Don Breazeal <donb@codesourcery.com>
4701 Luis Machado <lgustavo@codesourcery.com>
4703 * linux-low.c (linux_mourn): Static declaration.
4704 (linux_arch_setup): Move in front of
4705 handle_extended_wait.
4706 (linux_arch_setup_thread): New function.
4707 (handle_extended_wait): Handle exec events. Call
4708 linux_arch_setup_thread. Make event_lwp argument a
4709 pointer-to-a-pointer.
4710 (check_zombie_leaders): Do not check stopped threads.
4711 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4712 (linux_low_filter_event): Add lwp and thread for exec'ing
4713 non-leader thread if leader thread has been deleted.
4714 Refactor code into linux_arch_setup_thread and call it.
4715 Pass child lwp pointer by reference to handle_extended_wait.
4716 (linux_wait_for_event_filtered): Update comment.
4717 (linux_wait_1): Prevent clobbering exec event status.
4718 (linux_supports_exec_events): New function.
4719 (linux_target_ops) <supports_exec_events>: Initialize new member.
4720 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4722 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4723 * server.c (report_exec_events): New global variable.
4724 (handle_query): Handle qSupported query for exec-events feature.
4725 (captured_main): Initialize report_exec_events.
4726 * server.h (report_exec_events): Declare new global variable.
4727 * target.h (struct target_ops) <supports_exec_events>: New
4729 (target_supports_exec_events): New macro.
4730 * win32-low.c (win32_target_ops) <supports_exec_events>:
4731 Initialize new member.
4733 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4735 * linux-low.c (linux_low_enable_btrace): Remove.
4736 (linux_target_ops): Replace linux_low_enable_btrace with
4737 linux_enable_btrace.
4739 2015-09-03 Yao Qi <yao.qi@linaro.org>
4741 * linux-aarch64-low.c (aarch64_insert_point): Call
4742 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4745 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4747 * linux-low.c (check_stopped_by_breakpoint): Use
4748 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4750 2015-08-27 Pedro Alves <palves@redhat.com>
4752 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4754 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4756 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4757 the XNEW-family equivalent.
4758 (compile_bytecodes): Likewise.
4759 * dll.c (loaded_dll): Likewise.
4760 * event-loop.c (append_callback_event): Likewise.
4761 (create_file_handler): Likewise.
4762 (create_file_event): Likewise.
4763 * hostio.c (handle_open): Likewise.
4764 * inferiors.c (add_thread): Likewise.
4765 (add_process): Likewise.
4766 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4767 * linux-arm-low.c (arm_new_process): Likewise.
4768 (arm_new_thread): Likewise.
4769 * linux-low.c (add_to_pid_list): Likewise.
4770 (linux_add_process): Likewise.
4771 (handle_extended_wait): Likewise.
4772 (add_lwp): Likewise.
4773 (enqueue_one_deferred_signal): Likewise.
4774 (enqueue_pending_signal): Likewise.
4775 (linux_resume_one_lwp_throw): Likewise.
4776 (linux_resume_one_thread): Likewise.
4777 (linux_read_memory): Likewise.
4778 (linux_write_memory): Likewise.
4779 * linux-mips-low.c (mips_linux_new_process): Likewise.
4780 (mips_linux_new_thread): Likewise.
4781 (mips_add_watchpoint): Likewise.
4782 * linux-x86-low.c (initialize_low_arch): Likewise.
4783 * lynx-low.c (lynx_add_process): Likewise.
4784 * mem-break.c (set_raw_breakpoint_at): Likewise.
4785 (set_breakpoint): Likewise.
4786 (add_condition_to_breakpoint): Likewise.
4787 (add_commands_to_breakpoint): Likewise.
4788 (clone_agent_expr): Likewise.
4789 (clone_one_breakpoint): Likewise.
4790 * regcache.c (new_register_cache): Likewise.
4791 * remote-utils.c (look_up_one_symbol): Likewise.
4792 * server.c (queue_stop_reply): Likewise.
4793 (start_inferior): Likewise.
4794 (queue_stop_reply_callback): Likewise.
4795 (handle_target_event): Likewise.
4796 * spu-low.c (fetch_ppc_memory): Likewise.
4797 (store_ppc_memory): Likewise.
4798 * target.c (set_target_ops): Likewise.
4799 * thread-db.c (thread_db_load_search): Likewise.
4800 (try_thread_db_load_1): Likewise.
4801 * tracepoint.c (add_tracepoint): Likewise.
4802 (add_tracepoint_action): Likewise.
4803 (create_trace_state_variable): Likewise.
4804 (cmd_qtdpsrc): Likewise.
4805 (cmd_qtro): Likewise.
4806 (add_while_stepping_state): Likewise.
4807 * win32-low.c (child_add_thread): Likewise.
4808 (get_image_name): Likewise.
4810 2015-08-25 Yao Qi <yao.qi@linaro.org>
4812 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4814 2015-08-25 Yao Qi <yao.qi@linaro.org>
4816 * Makefile.in (aarch64-linux.o): New rule.
4817 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4819 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4820 (aarch64_init_debug_reg_state): Make it extern.
4821 (aarch64_linux_prepare_to_resume): Remove.
4823 2015-08-25 Yao Qi <yao.qi@linaro.org>
4825 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4826 lwp_arch_private_info and ptid_of_lwp.
4828 2015-08-25 Yao Qi <yao.qi@linaro.org>
4830 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4831 Find proc_info by find_process_pid. All callers updated.
4833 2015-08-25 Yao Qi <yao.qi@linaro.org>
4835 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4837 (debug_reg_change_callback): Remove.
4838 (aarch64_notify_debug_reg_change): Remove.
4840 2015-08-25 Yao Qi <yao.qi@linaro.org>
4842 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4843 Call current_lwp_ptid.
4845 2015-08-25 Yao Qi <yao.qi@linaro.org>
4847 * linux-aarch64-low.c (debug_reg_change_callback): Use
4850 2015-08-25 Yao Qi <yao.qi@linaro.org>
4852 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4854 2015-08-25 Yao Qi <yao.qi@linaro.org>
4856 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4858 2015-08-25 Yao Qi <yao.qi@linaro.org>
4860 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4863 2015-08-25 Yao Qi <yao.qi@linaro.org>
4865 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4867 (debug_reg_change_callback): Remove argument entry and add argument
4868 lwp. Remove local variable thread. Don't print thread id in the
4869 debugging output. Don't check whether pid of thread equals to pid.
4870 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4871 iterate_over_lwps instead find_inferior.
4873 2015-08-24 Pedro Alves <palves@redhat.com>
4875 * inferiors.c (get_first_process): New function.
4876 * inferiors.h (get_first_process): New declaration.
4877 * remote-utils.c (read_ptid): Default to the first process in the
4878 list, instead of to the current thread's process.
4880 2015-08-24 Pedro Alves <palves@redhat.com>
4882 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4883 * event-loop.c: Likewise.
4884 * remote-utils.c: Likewise.
4885 * tracepoint.c: Likewise.
4887 2015-08-24 Pedro Alves <palves@redhat.com>
4889 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4892 2015-08-21 Pedro Alves <palves@redhat.com>
4894 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4895 instead of literal 1.
4897 2015-08-21 Pedro Alves <palves@redhat.com>
4899 * tdesc.c (default_description): Explicitly zero-initialize.
4901 2015-08-21 Pedro Alves <palves@redhat.com>
4904 * inferiors.c (remove_thread): Discard any pending stop reply for
4906 * server.c (remove_all_on_match_pid): Rename to ...
4907 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4909 (discard_queued_stop_replies): Change parameter to a ptid. Now
4911 (handle_v_kill, kill_inferior_callback, captured_main)
4912 (process_serial_event): Adjust.
4913 * server.h (discard_queued_stop_replies): Declare.
4915 2015-08-21 Pedro Alves <palves@redhat.com>
4917 * linux-low.c (wait_for_sigstop): Always switch to no thread
4918 selected if the previously current thread dies.
4919 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4920 process instead of the current thread's.
4921 * remote-utils.c (input_interrupt): Don't check if there's no
4923 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4924 current thread to the general thread fails, error out.
4925 (handle_qxfer_auxv, handle_qxfer_libraries)
4926 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4927 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4928 (handle_query): Check if there's a thread selected instead of
4929 checking whether there's any thread in the thread list.
4930 (handle_qxfer_threads, handle_qxfer_btrace)
4931 (handle_qxfer_btrace_conf): Don't error out early if there's no
4932 thread in the thread list.
4933 (handle_v_cont, myresume): Don't set the current thread to the
4935 (process_serial_event) <Hg handling>: Also set thread_id if the
4936 previous general thread is still alive.
4937 (process_serial_event) <g/G handling>: If setting the current
4938 thread to the general thread fails, error out.
4939 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4940 thread's lwp instead of the current thread's.
4941 * target.c (set_desired_thread): If the desired thread was not
4942 found, leave the current thread pointing to NULL. Return an int
4943 (boolean) indicating success.
4944 * target.h (set_desired_thread): Change return type to int.
4946 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4948 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4949 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4951 (ps_get_thread_area): New function.
4953 2015-08-19 Gary Benson <gbenson@redhat.com>
4955 * hostio.c (handle_pread): Do not attempt to read more data
4956 than hostio_reply_with_data can fit in a packet.
4958 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4960 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4962 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4964 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4966 2015-08-06 Pedro Alves <palves@redhat.com>
4968 * tracepoint.c (expr_eval_result): Now an int.
4970 2015-08-06 Pedro Alves <palves@redhat.com>
4972 * gdbthread.h (struct regcache): Forward declare.
4973 (struct thread_info) <regcache_data>: Now a struct regcache
4975 * inferiors.c (inferior_regcache_data)
4976 (set_inferior_regcache_data): Now work with struct regcache
4978 * inferiors.h (struct regcache): Forward declare.
4979 (inferior_regcache_data, set_inferior_regcache_data): Now work
4980 with struct regcache pointers.
4981 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4982 (free_register_cache_thread): Remove struct regcache pointer
4985 2015-08-06 Pedro Alves <palves@redhat.com>
4987 * server.c (captured_main): On error, print the exception message
4988 to stderr, and if run_once is set, throw a quit.
4990 2015-08-06 Pedro Alves <palves@redhat.com>
4992 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4995 2015-08-06 Pedro Alves <palves@redhat.com>
4997 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4998 reading beyond the passed in buffer length.
5000 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5002 * tracepoint.c (symbol_list) <required>: Remove.
5004 2015-08-06 Pedro Alves <palves@redhat.com>
5006 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5007 count if stopping and suspending threads.
5008 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5009 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5010 (linux_detach): Complete an ongoing step-over.
5011 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5013 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5014 (linux_wait_1): If passing a signal to the inferior after
5015 finishing a step-over, unsuspend and re-resume all lwps. If we
5016 see a single-step event but the thread should be continuing, don't
5017 pass the trap to gdb.
5018 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5019 internal_error instead of gdb_assert.
5020 (enqueue_pending_signal): New function.
5021 (check_ptrace_stopped_lwp_gone): Add debug output.
5022 (start_step_over): Use internal_error instead of gdb_assert.
5023 (complete_ongoing_step_over): New function.
5024 (linux_resume_one_thread): Don't resume a suspended thread.
5025 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5028 2015-08-06 Pedro Alves <palves@redhat.com>
5030 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5031 (linux_thread_alive): Use lwp_is_marked_dead.
5032 (extended_event_reported): Delete.
5033 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5034 instead of extended_event_reported.
5035 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5037 (lwp_is_marked_dead): New function.
5038 (lwp_running): Use lwp_is_marked_dead.
5039 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5042 2015-08-06 Pedro Alves <palves@redhat.com>
5044 * linux-low.c (linux_wait_1): Move fork event output out of the
5045 !report_to_gdb check. Pass event_child->waitstatus to
5046 target_waitstatus_to_string instead of ourstatus.
5048 2015-08-04 Yao Qi <yao.qi@linaro.org>
5050 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5051 if current_thread is 32 bit.
5053 2015-08-04 Yao Qi <yao.qi@linaro.org>
5055 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5056 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5057 * server.c (extended_protocol): Remove "static".
5058 * server.h (extended_protocol): Declare it.
5060 2015-08-04 Yao Qi <yao.qi@linaro.org>
5062 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5063 both aarch64 and aarch32.
5064 (aarch64_set_pc): Likewise.
5066 2015-08-04 Yao Qi <yao.qi@linaro.org>
5068 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5069 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5070 arm-with-neon.xml to srv_xmlfiles.
5071 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5072 (is_64bit_tdesc): New function.
5073 (aarch64_linux_read_description): New function.
5074 (aarch64_arch_setup): Call aarch64_linux_read_description.
5075 (regs_info): Rename to regs_info_aarch64.
5076 (aarch64_regs_info): Return right regs_info.
5077 (initialize_low_arch): Call initialize_low_arch_aarch32.
5079 2015-08-04 Yao Qi <yao.qi@linaro.org>
5081 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5082 * linux-aarch32-low.c: New file.
5083 * linux-aarch32-low.h: New file.
5084 * linux-arm-low.c (arm_fill_gregset): Move it to
5085 linux-aarch32-low.c.
5086 (arm_store_gregset): Likewise.
5087 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5088 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5089 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5090 (regs_info): Rename to regs_info_arm.
5091 (arm_regs_info): Return regs_info_aarch32 if
5092 have_ptrace_getregset is 1 and target description is
5093 arm_with_neon or arm_with_vfpv3.
5094 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5095 Call initialize_low_arch_aarch32 instead.
5097 2015-08-04 Yao Qi <yao.qi@linaro.org>
5099 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5100 * linux-low.c: ... here.
5101 * linux-low.h (have_ptrace_getregset): Declare it.
5103 2015-08-04 Pedro Alves <palves@redhat.com>
5105 * thread-db.c (struct thread_db): Use new typedefs.
5106 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5108 (disable_thread_event_reporting): Cast result of dlsym to
5109 destination function pointer type.
5110 (thread_db_mourn): Use td_ta_delete_ftype.
5112 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5114 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5116 (CDX_BREAKPOINT): Define for R2.
5117 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5118 (the_low_target): Add comments.
5120 2015-07-30 Yao Qi <yao.qi@linaro.org>
5122 * linux-arm-low.c (arm_hwcap): Remove it.
5123 (arm_read_description): New local variable arm_hwcap. Don't
5124 set arm_hwcap to zero.
5126 2015-07-30 Yao Qi <yao.qi@linaro.org>
5128 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5129 Use regcache->tdesc instead.
5130 (arm_store_wmmxregset): Likewise.
5131 (arm_fill_vfpregset): Likewise.
5132 (arm_store_vfpregset): Likewise.
5134 2015-07-30 Yao Qi <yao.qi@linaro.org>
5136 * linux-arm-low.c: Include arch/arm.h.
5137 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5138 (arm_store_gregset): Likewise.
5140 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5142 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5143 ptrace's 4th parameter.
5145 2015-07-27 Yao Qi <yao.qi@linaro.org>
5147 * configure.srv (case aarch64*-*-linux*): Don't set
5150 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5152 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5154 * linux-arm-low.c: Likewise.
5155 * linux-cris-low.c: Likewise.
5156 * linux-crisv32-low.c: Likewise.
5157 * linux-low.c: Likewise.
5158 * linux-m68k-low.c: Likewise.
5159 * linux-mips-low.c: Likewise.
5160 * linux-nios2-low.c: Likewise.
5161 * linux-s390-low.c: Likewise.
5162 * linux-sparc-low.c: Likewise.
5163 * linux-tic6x-low.c: Likewise.
5164 * linux-tile-low.c: Likewise.
5165 * linux-x86-low.c: Likewise.
5167 2015-07-24 Pedro Alves <palves@redhat.com>
5169 * config.in: Regenerate.
5170 * configure: Regenerate.
5172 2015-07-24 Pedro Alves <palves@redhat.com>
5174 * acinclude.m4: Include ../ptrace.m4.
5175 * configure.ac: Call GDB_AC_PTRACE.
5176 * config.in, configure: Regenerate.
5178 2015-07-24 Yao Qi <yao.qi@linaro.org>
5180 * linux-low.c (linux_create_inferior): Remove setting to
5181 proc->priv->new_inferior.
5182 (linux_attach): Likewise.
5183 (linux_low_filter_event): Likewise.
5184 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5186 2015-07-24 Yao Qi <yao.qi@linaro.org>
5188 * linux-low.c (linux_arch_setup): New function.
5189 (linux_low_filter_event): If proc->tdesc is NULL and
5190 proc->attached is true, call the_low_target.arch_setup.
5191 Otherwise, keep status pending, and return.
5192 (linux_resume_one_lwp_throw): Don't call get_pc if
5193 thread->while_stepping isn't NULL. Don't call
5194 get_thread_regcache if proc->tdesc is NULL.
5195 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5196 (linux_target_ops): Install arch_setup.
5197 * server.c (start_inferior): Call the_target->arch_setup.
5198 * target.h (struct target_ops) <arch_setup>: New field.
5199 (target_arch_setup): New marco.
5200 * lynx-low.c (lynx_target_ops): Update.
5201 * nto-low.c (nto_target_ops): Update.
5202 * spu-low.c (spu_target_ops): Update.
5203 * win32-low.c (win32_target_ops): Update.
5205 2015-07-24 Yao Qi <yao.qi@linaro.org>
5207 * linux-low.c (linux_add_process): Don't set
5208 proc->priv->new_inferior.
5209 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5210 (linux_attach): Likewise.
5212 2015-07-24 Yao Qi <yao.qi@linaro.org>
5214 * server.c (start_inferior): Code refactor.
5216 2015-07-24 Yao Qi <yao.qi@linaro.org>
5218 * server.c (process_serial_event): Set general_thread.
5220 2015-07-21 Yao Qi <yao.qi@linaro.org>
5222 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5223 aarch64_linux_get_debug_reg_capacity.
5225 2015-07-17 Yao Qi <yao.qi@linaro.org>
5227 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5228 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5229 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5230 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5231 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5232 (AARCH64_HWP_ALIGNMENT): Likewise.
5233 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5234 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5235 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5236 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5237 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5238 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5239 (struct aarch64_debug_reg_state): Likewise.
5240 (struct arch_lwp_info): Likewise.
5241 (aarch64_align_watchpoint): Likewise.
5242 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5243 (aarch64_watchpoint_length): Likewise.
5244 (aarch64_point_encode_ctrl_reg): Likewise
5245 (aarch64_point_is_aligned): Likewise.
5246 (aarch64_align_watchpoint): Likewise.
5247 (aarch64_linux_set_debug_regs):
5248 (aarch64_dr_state_insert_one_point): Likewise.
5249 (aarch64_dr_state_remove_one_point): Likewise.
5250 (aarch64_handle_breakpoint): Likewise.
5251 (aarch64_handle_aligned_watchpoint): Likewise.
5252 (aarch64_handle_unaligned_watchpoint): Likewise.
5253 (aarch64_handle_watchpoint): Likewise.
5255 2015-07-17 Yao Qi <yao.qi@linaro.org>
5257 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5258 and don't aarch64_get_debug_reg_state. All callers update.
5259 (aarch64_handle_aligned_watchpoint): Likewise.
5260 (aarch64_handle_unaligned_watchpoint): Likewise.
5261 (aarch64_handle_watchpoint): Likewise.
5262 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5263 (aarch64_remove_point): Likewise.
5265 2015-07-17 Yao Qi <yao.qi@linaro.org>
5267 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5269 (aarch64_handle_unaligned_watchpoint): Likewise.
5271 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5273 Revert the previous 3 commits:
5274 Move gdb_regex* to common/
5275 Move linux_find_memory_regions_full & co.
5276 gdbserver build-id attribute generator
5278 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5279 Jan Kratochvil <jan.kratochvil@redhat.com>
5281 gdbserver build-id attribute generator.
5282 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5283 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5284 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5286 (get_dynamic): Use find_pdhr to traverse program headers.
5287 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5288 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5289 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5290 (get_hex_build_id): New.
5291 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5292 to reply XML document.
5294 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5295 Jan Kratochvil <jan.kratochvil@redhat.com>
5297 * target.c: Include target/target-utils.h and fcntl.h.
5298 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5299 (target_fileio_read_stralloc): New functions.
5301 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5303 * Makefile.in (OBS): Add gdb_regex.o.
5305 * config.in: Rebuilt.
5306 * configure: Rebuilt.
5308 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5309 Jan Kratochvil <jan.kratochvil@redhat.com>
5311 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5312 * Makefile.in (OBS): Add target-utils.o.
5313 (linux-maps.o, target-utils.o): New.
5314 * configure.srv (srv_linux_obj): Add linux-maps.o.
5316 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5318 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5320 (the_low_target): Install it.
5322 2015-07-14 Pedro Alves <palves@redhat.com>
5324 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5325 Instead, ignore ECHILD, and throw an error for other errnos.
5327 2015-07-10 Pedro Alves <palves@redhat.com>
5329 * event-loop.c (struct callback_event) <data>: Change type to
5330 gdb_client_data instance instead of gdb_client_data pointer.
5331 (append_callback_event): Adjust.
5333 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5335 * linux-aarch64-low.c: Add comments for each linux_target_ops
5336 method. Remove comments already covered in target_ops and
5337 linux_target_ops definitions.
5338 (the_low_target): Add comments for each unimplemented method.
5340 2015-07-09 Yao Qi <yao.qi@linaro.org>
5342 * linux-aarch64-low.c (aarch64_regmap): Remove.
5343 (aarch64_usrregs_info): Remove.
5344 (regs_info): Set field usrregs to NULL.
5346 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5348 * linux-low.c: Include "rsp-low.h"
5349 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5350 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5351 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5352 (handle_btrace_enable_pt): New.
5353 (handle_btrace_general_set): Support "pt".
5354 (handle_btrace_conf_general_set): Support "pt:size".
5356 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5358 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5361 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5363 * linux-aarch64-low.c: Remove comment about endianness.
5364 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5365 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5368 2015-06-24 Gary Benson <gbenson@redhat.com>
5370 * linux-i386-ipa.c (stdint.h): Do not include.
5371 * lynx-i386-low.c (stdint.h): Likewise.
5372 * lynx-ppc-low.c (stdint.h): Likewise.
5373 * mem-break.c (stdint.h): Likewise.
5374 * thread-db.c (stdint.h): Likewise.
5375 * tracepoint.c (stdint.h): Likewise.
5376 * win32-low.c (stdint.h): Likewise.
5378 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5380 * server.c (write_qxfer_response): Update call to
5381 remote_escape_output.
5383 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5384 Jan Kratochvil <jan.kratochvil@redhat.com>
5386 Merge multiple hex conversions.
5387 * gdbreplay.c (tohex): Rename to 'fromhex'.
5388 (logchar): Use fromhex.
5390 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5392 * server.c (handle_qxfer_libraries): Set `version' attribute for
5395 2015-06-10 Gary Benson <gbenson@redhat.com>
5397 * target.h (struct target_ops) <multifs_open>: New field.
5398 <multifs_unlink>: Likewise.
5399 <multifs_readlink>: Likewise.
5400 * linux-low.c (nat/linux-namespaces.h): New include.
5401 (linux_target_ops): Initialize the_target->multifs_open,
5402 the_target->multifs_unlink and the_target->multifs_readlink.
5403 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5404 * hostio.c (hostio_fs_pid): New static variable.
5405 (hostio_handle_new_gdb_connection): New function.
5406 (handle_setfs): Likewise.
5407 (handle_open): Use the_target->multifs_open as appropriate.
5408 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5409 (handle_readlink): Use the_target->multifs_readlink as
5411 (handle_vFile): Handle vFile:setfs packets.
5412 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5413 after target_handle_new_gdb_connection.
5415 2015-06-10 Gary Benson <gbenson@redhat.com>
5417 * configure.ac (AC_CHECK_FUNCS): Add setns.
5418 * config.in: Regenerate.
5419 * configure: Likewise.
5420 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5421 (linux-namespaces.o): New rule.
5422 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5424 2015-06-09 Gary Benson <gbenson@redhat.com>
5426 * hostio.c (handle_open): Process mode argument with
5427 fileio_to_host_mode.
5429 2015-06-01 Yao Qi <yao.qi@linaro.org>
5431 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5432 * linux-x86-low.c: Likewise.
5434 2015-05-28 Don Breazeal <donb@codesourcery.com>
5436 * linux-low.c (handle_extended_wait): Initialize
5437 thread_info.last_resume_kind for new fork children.
5439 2015-05-15 Pedro Alves <palves@redhat.com>
5441 * target.h (target_handle_new_gdb_connection): Rewrite using if
5442 wrapped in do/while.
5444 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5446 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5447 * configure, config.in: Regenerate.
5448 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5451 2015-05-12 Don Breazeal <donb@codesourcery.com>
5453 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5454 PTRACE_EVENT_VFORK_DONE.
5455 (linux_low_ptrace_options, extended_event_reported): Add vfork
5457 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5458 and "vforkdone" for RSP 'T' Stop Reply Packet.
5459 * server.h (report_vfork_events): Declare
5462 2015-05-12 Don Breazeal <donb@codesourcery.com>
5464 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5465 (the_low_target) <new_fork>: Initialize new member.
5466 * linux-arm-low.c (arm_new_fork): New function.
5467 (the_low_target) <new_fork>: Initialize new member.
5468 * linux-low.c (handle_extended_wait): Call new target function
5470 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5471 * linux-mips-low.c (mips_add_watchpoint): New function
5472 extracted from mips_insert_point.
5473 (the_low_target) <new_fork>: Initialize new member.
5474 (mips_linux_new_fork): New function.
5475 (mips_insert_point): Call mips_add_watchpoint.
5476 * linux-x86-low.c (x86_linux_new_fork): New function.
5477 (the_low_target) <new_fork>: Initialize new member.
5479 2015-05-12 Don Breazeal <donb@codesourcery.com>
5481 * linux-low.c (handle_extended_wait): Implement return value,
5482 rename argument 'event_child' to 'event_lwp', handle
5483 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5484 (linux_low_ptrace_options): New function.
5485 (linux_low_filter_event): Call linux_low_ptrace_options,
5486 use different argument fo linux_enable_event_reporting,
5487 use return value from handle_extended_wait.
5488 (extended_event_reported): New function.
5489 (linux_wait_1): Call extended_event_reported and set
5490 status to report fork events.
5491 (linux_write_memory): Add pid to debug message.
5492 (reset_lwp_ptrace_options_callback): New function.
5493 (linux_handle_new_gdb_connection): New function.
5494 (linux_target_ops): Initialize new structure member.
5495 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5496 * lynx-low.c: Initialize new structure member.
5497 * remote-utils.c (prepare_resume_reply): Implement stop reason
5498 "fork" for "T" stop message.
5499 * server.c (handle_query): Call handle_new_gdb_connection.
5500 * server.h (report_fork_events): Declare global flag.
5501 * target.h (struct target_ops) <handle_new_gdb_connection>:
5503 (target_handle_new_gdb_connection): New macro.
5504 * win32-low.c: Initialize new structure member.
5506 2015-05-12 Don Breazeal <donb@codesourcery.com>
5508 * mem-break.c (APPEND_TO_LIST): Define macro.
5509 (clone_agent_expr): New function.
5510 (clone_one_breakpoint): New function.
5511 (clone_all_breakpoints): New function.
5512 * mem-break.h: Declare new functions.
5514 2015-05-12 Don Breazeal <donb@codesourcery.com>
5516 * linux-low.c (linux_supports_fork_events): New function.
5517 (linux_supports_vfork_events): New function.
5518 (linux_target_ops): Initialize new structure members.
5519 (initialize_low): Call linux_check_ptrace_features.
5520 * lynx-low.c (lynx_target_ops): Initialize new structure
5522 * server.c (report_fork_events, report_vfork_events):
5524 (handle_query): Add new features to qSupported packet and
5526 (captured_main): Initialize new global variables.
5527 * target.h (struct target_ops) <supports_fork_events>:
5529 <supports_vfork_events>: New member.
5530 (target_supports_fork_events): New macro.
5531 (target_supports_vfork_events): New macro.
5532 * win32-low.c (win32_target_ops): Initialize new structure
5535 2015-05-12 Gary Benson <gbenson@redhat.com>
5537 * server.c (handle_qxfer_exec_file): Use current process
5540 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5542 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5543 Remove HAVE_PTRACE_GETREGS conditionals.
5544 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5545 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5547 2015-05-08 Yao Qi <yao.qi@linaro.org>
5549 * linux-low.c (linux_supports_conditional_breakpoints): New
5551 (linux_target_ops): Install new target method.
5552 * lynx-low.c (lynx_target_ops): Install NULL hook for
5553 supports_conditional_breakpoints.
5554 * nto-low.c (nto_target_ops): Likewise.
5555 * spu-low.c (spu_target_ops): Likewise.
5556 * win32-low.c (win32_target_ops): Likewise.
5557 * server.c (handle_query): Check
5558 target_supports_conditional_breakpoints.
5559 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5561 (target_supports_conditional_breakpoints): New macro.
5563 2015-05-06 Pedro Alves <palves@redhat.com>
5566 * server.c (start_inferior): If the process exits, mourn it.
5568 2015-04-21 Gary Benson <gbenson@redhat.com>
5570 * hostio.c (fileio_open_flags_to_host): Factored out to
5571 fileio_to_host_openflags in common/fileio.c. Single use
5574 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5576 * linux-xtensa-low.c (xtensa_fill_gregset)
5577 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5580 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5582 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5583 (regs_info): Replace usrregs pointer with NULL.
5585 2015-04-17 Gary Benson <gbenson@redhat.com>
5587 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5588 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5589 * server.c (handle_qxfer_exec_file): New function.
5590 (qxfer_packets): Add exec-file entry.
5591 (handle_query): Report qXfer:exec-file:read as supported packet.
5593 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5595 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5597 2015-04-09 Gary Benson <gbenson@redhat.com>
5599 * hostio-errno.c (errno_to_fileio_error): Remove function.
5600 Update caller to use remote_fileio_to_fio_error.
5602 2015-04-09 Yao Qi <yao.qi@linaro.org>
5604 * linux-low.c (linux_insert_point): Call
5605 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5606 (linux_remove_point): Call remove_memory_breakpoint if type is
5608 * linux-x86-low.c (x86_insert_point): Don't call
5609 insert_memory_breakpoint.
5610 (x86_remove_point): Don't call remove_memory_breakpoint.
5612 2015-04-01 Pedro Alves <palves@redhat.com>
5613 Cleber Rosa <crosa@redhat.com>
5615 * server.c (gdbserver_usage): Reorganize and extend the usage
5618 2015-03-24 Pedro Alves <palves@redhat.com>
5620 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5621 output. Also dump TRAP_TRACE.
5622 (linux_low_filter_event): In debug output, distinguish a
5623 resume_stop SIGSTOP from a delayed SIGSTOP.
5625 2015-03-24 Gary Benson <gbenson@redhat.com>
5627 * linux-x86-low.c (x86_linux_new_thread): Moved to
5629 (x86_linux_prepare_to_resume): Likewise.
5631 2015-03-24 Gary Benson <gbenson@redhat.com>
5633 * Makefile.in (x86-linux-dregs.o): New rule.
5634 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5635 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5636 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5637 (x86_linux_dr_get): Likewise.
5638 (x86_linux_dr_set): Likewise.
5639 (update_debug_registers_callback): Likewise.
5640 (x86_linux_dr_set_addr): Likewise.
5641 (x86_linux_dr_get_addr): Likewise.
5642 (x86_linux_dr_set_control): Likewise.
5643 (x86_linux_dr_get_control): Likewise.
5644 (x86_linux_dr_get_status): Likewise.
5645 (x86_linux_update_debug_registers): Likewise.
5647 2015-03-24 Gary Benson <gbenson@redhat.com>
5649 * linux-x86-low.c (x86_linux_update_debug_registers):
5650 New function, factored out from...
5651 (x86_linux_prepare_to_resume): ...this.
5653 2015-03-24 Gary Benson <gbenson@redhat.com>
5655 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5656 (x86_linux_dr_set): Likewise.
5657 (update_debug_registers_callback): Likewise.
5658 (x86_linux_dr_set_addr): Likewise.
5659 (x86_linux_dr_get_addr): Likewise.
5660 (x86_linux_dr_set_control): Likewise.
5661 (x86_linux_dr_get_control): Likewise.
5662 (x86_linux_dr_get_status): Likewise.
5663 (x86_linux_prepare_to_resume): Likewise.
5665 2015-03-24 Gary Benson <gbenson@redhat.com>
5667 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5668 Use perror_with_name. Pass string through gettext.
5669 (x86_linux_dr_set): Likewise.
5671 2015-03-24 Gary Benson <gbenson@redhat.com>
5673 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5674 (x86_linux_dr_set_addr): ...this.
5675 (x86_dr_low_get_addr): Rename to...
5676 (x86_linux_dr_get_addr): ...this.
5677 (x86_dr_low_set_control): Rename to...
5678 (x86_linux_dr_set_control): ...this.
5679 (x86_dr_low_get_control): Rename to...
5680 (x86_linux_dr_get_control): ...this.
5681 (x86_dr_low_get_status): Rename to...
5682 (x86_linux_dr_get_status): ...this.
5683 (x86_dr_low): Update with new function names.
5685 2015-03-24 Gary Benson <gbenson@redhat.com>
5687 * Makefile.in (x86-linux.o): New rule.
5688 * configure.srv: Add x86-linux.o to relevant targets.
5689 * linux-low.c (lwp_set_arch_private_info): New function.
5690 (lwp_arch_private_info): Likewise.
5691 * linux-x86-low.c: Include nat/x86-linux.h.
5692 (arch_lwp_info): Removed structure.
5693 (update_debug_registers_callback):
5694 Use lwp_set_debug_registers_changed.
5695 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5696 and lwp_set_debug_registers_changed.
5697 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5699 2015-03-24 Gary Benson <gbenson@redhat.com>
5701 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5702 * linux-arm-low.c (arm_new_thread): Likewise.
5703 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5704 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5705 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5706 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5708 2015-03-24 Gary Benson <gbenson@redhat.com>
5710 * linux-low.c (ptid_of_lwp): New function.
5711 (lwp_is_stopped): Likewise.
5712 (lwp_stop_reason): Likewise.
5713 * linux-x86-low.c (update_debug_registers_callback):
5715 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5718 2015-03-24 Gary Benson <gbenson@redhat.com>
5720 * linux-low.h (linux_stop_lwp): Remove declaration.
5722 2015-03-24 Gary Benson <gbenson@redhat.com>
5724 * linux-low.h: Include nat/linux-nat.h.
5725 * linux-low.c (iterate_over_lwps_args): New structure.
5726 (iterate_over_lwps_filter): New function.
5727 (iterate_over_lwps): Likewise.
5728 * linux-x86-low.c (update_debug_registers_callback):
5729 Update signature to what iterate_over_lwps expects.
5730 Remove PID check that iterate_over_lwps now performs.
5731 (x86_dr_low_set_addr): Use iterate_over_lwps.
5732 (x86_dr_low_set_control): Likewise.
5734 2015-03-24 Gary Benson <gbenson@redhat.com>
5736 * linux-x86-low.c (x86_debug_reg_state): New function.
5737 (x86_linux_prepare_to_resume): Use the above.
5739 2015-03-24 Gary Benson <gbenson@redhat.com>
5741 * linux-low.c (current_lwp_ptid): New function.
5742 * linux-x86-low.c: Include nat/linux-nat.h.
5743 (x86_dr_low_get_addr): Use current_lwp_ptid.
5744 (x86_dr_low_get_control): Likewise.
5745 (x86_dr_low_get_status): Likewise.
5747 2015-03-20 Pedro Alves <palves@redhat.com>
5749 * tracepoint.c (cmd_qtstatus): Make "str" const.
5751 2015-03-20 Pedro Alves <palves@redhat.com>
5753 * server.c (handle_general_set): Make "req_str" const.
5755 2015-03-19 Pedro Alves <palves@redhat.com>
5757 * linux-low.c (linux_resume_one_lwp): Rename to ...
5758 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5759 instead call perror_with_name.
5760 (check_ptrace_stopped_lwp_gone): New function.
5761 (linux_resume_one_lwp): Reimplement as wrapper around
5762 linux_resume_one_lwp_throw that swallows errors if the LWP is
5765 2015-03-19 Pedro Alves <palves@redhat.com>
5767 * linux-low.c (count_events_callback, select_event_lwp_callback):
5768 No longer check whether the thread has resume_stop as last resume
5771 2015-03-19 Pedro Alves <palves@redhat.com>
5773 * linux-low.c (count_events_callback, select_event_lwp_callback):
5774 Use the lwp's status_pending_p field, not the thread's.
5776 2015-03-19 Pedro Alves <palves@redhat.com>
5778 * linux-low.c (select_event_lwp_callback): Update comments to
5779 no longer mention SIGTRAP.
5781 2015-03-18 Gary Benson <gbenson@redhat.com>
5783 * server.c (handle_query): Do not report vFile:fstat as supported.
5785 2015-03-11 Gary Benson <gbenson@redhat.com>
5787 * hostio.c (sys/types.h): New include.
5788 (sys/stat.h): Likewise.
5789 (common-remote-fileio.h): Likewise.
5790 (handle_fstat): New function.
5791 (handle_vFile): Handle vFile:fstat packets.
5793 2015-03-11 Gary Benson <gbenson@redhat.com>
5795 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5796 struct stat.st_blocks and struct stat.st_blksize.
5797 * configure: Regenerate.
5798 * config.in: Likewise.
5799 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5800 (OBS): Add common-remote-fileio.o.
5801 (common-remote-fileio.o): New rule.
5803 2015-03-09 Pedro Alves <palves@redhat.com>
5805 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5806 'struct sockaddr' pointer in 'accept' call.
5808 2015-03-09 Pedro Alves <palves@redhat.com>
5811 2015-03-07 Pedro Alves <palves@redhat.com>
5812 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5813 or <winsock2.h> here. Instead include "gdb_socket.h".
5814 (remote_open): Use union gdb_sockaddr_u.
5815 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5816 or <winsock2.h> here. Instead include "gdb_socket.h".
5817 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5818 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5820 (init_named_socket, gdb_agent_helper_thread): Use union
5823 2015-03-07 Pedro Alves <palves@redhat.com>
5825 * configure.ac (build_warnings): Move
5826 -Wdeclaration-after-statement to the C-specific set.
5827 * configure: Regenerate.
5829 2015-03-07 Pedro Alves <palves@redhat.com>
5831 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5832 or <winsock2.h> here. Instead include "gdb_socket.h".
5833 (remote_open): Use union gdb_sockaddr_u.
5834 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5835 or <winsock2.h> here. Instead include "gdb_socket.h".
5836 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5837 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5839 (init_named_socket, gdb_agent_helper_thread): Use union
5842 2015-03-07 Pedro Alves <palves@redhat.com>
5844 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5847 2015-03-06 Yao Qi <yao.qi@linaro.org>
5849 * linux-aarch64-low.c (aarch64_insert_point): Use
5850 show_debug_regs as a boolean.
5851 (aarch64_remove_point): Likewise.
5853 2015-03-05 Pedro Alves <palves@redhat.com>
5855 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5856 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5857 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5858 * nto-low.c (nto_target_ops): Likewise.
5859 * spu-low.c (spu_target_ops): Likewise.
5860 * win32-low.c (win32_target_ops): Likewise.
5862 2015-03-04 Pedro Alves <palves@redhat.com>
5864 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5865 Decide whether a breakpoint triggered based on the SIGTRAP's
5867 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5868 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5869 (linux_low_filter_event): Check for breakpoints before checking
5871 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5873 (linux_stopped_by_sw_breakpoint)
5874 (linux_supports_stopped_by_sw_breakpoint)
5875 (linux_stopped_by_hw_breakpoint)
5876 (linux_supports_stopped_by_hw_breakpoint): New functions.
5877 (linux_target_ops): Install new target methods.
5879 2015-03-04 Pedro Alves <palves@redhat.com>
5881 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5882 * server.c (swbreak_feature, hwbreak_feature): New globals.
5883 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5884 (captured_main): Clear swbreak_feature and hwbreak_feature.
5885 * server.h (swbreak_feature, hwbreak_feature): Declare.
5886 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5887 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5888 supports_stopped_by_hw_breakpoint>: New fields.
5889 (target_supports_stopped_by_sw_breakpoint)
5890 (target_stopped_by_sw_breakpoint)
5891 (target_supports_stopped_by_hw_breakpoint)
5892 (target_stopped_by_hw_breakpoint): Declare.
5894 2015-03-04 Pedro Alves <palves@redhat.com>
5896 enum lwp_stop_reason -> enum target_stop_reason
5897 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5898 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5899 (linux_wait_1, stuck_in_jump_pad_callback)
5900 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5901 (linux_stopped_by_watchpoint):
5902 * linux-low.h (enum lwp_stop_reason): Delete.
5903 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5904 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5906 2015-03-04 Yao Qi <yao.qi@linaro.org>
5908 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5910 2015-03-03 Gary Benson <gbenson@redhat.com>
5912 * hostio.c (handle_vFile): Fix prefix lengths.
5914 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5916 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5919 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5921 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5922 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5923 (clean): Add "rm -f" for above C files.
5924 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5925 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5926 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5927 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5928 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5929 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5930 (init_registers_s390x_vx_linux64)
5931 (init_registers_s390x_tevx_linux64)
5932 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5933 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5935 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5936 (s390_store_vxrs_high): New functions.
5937 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5939 (s390_arch_setup): Add logic for selecting one of the new target
5940 descriptions. Activate the new vector regsets if applicable.
5941 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5942 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5943 and init_registers_s390x_tevx_linux64.
5945 2015-03-01 Pedro Alves <palves@redhat.com>
5947 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5950 2015-02-27 Pedro Alves <palves@redhat.com>
5952 * linux-x86-low.c (u_debugreg_offset): New function.
5953 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5955 2015-02-27 Pedro Alves <palves@redhat.com>
5957 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5958 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5959 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5960 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5961 (ps_lsetfpregs, ps_getpid)
5962 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5963 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5964 (ps_lsetxregs, ps_plog): Declare.
5966 2015-02-27 Pedro Alves <palves@redhat.com>
5968 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5969 IP_AGENT_EXPORT_FUNC.
5970 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5971 IP_AGENT_EXPORT_FUNC.
5972 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5973 (IP_AGENT_EXPORT): Delete.
5974 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5975 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5976 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5977 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5978 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5979 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5980 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5981 (traceframe_read_count, traceframe_write_count)
5982 (traceframes_created, trace_state_variables, get_raw_reg)
5983 (get_trace_state_variable_value, set_trace_state_variable_value)
5984 (ust_loaded, helper_thread_id, cmd_buf): Use
5985 IPA_SYM_EXPORTED_NAME.
5986 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5987 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5988 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5989 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5990 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5991 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5992 EXTERN_C_PUSH/EXTERN_C_POP.
5993 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5994 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5995 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5996 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5997 (traceframe_write_count, traceframe_read_count)
5998 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5999 (about_to_request_buffer_space, get_trace_state_variable_value)
6000 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6001 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6002 EXTERN_C_PUSH/EXTERN_C_POP.
6003 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6004 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6005 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6006 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6007 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6008 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6009 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6010 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6012 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6013 (IP_AGENT_EXPORT_VAR_DECL): Define.
6015 (gdb_agent_get_raw_reg): Declare.
6017 2015-02-27 Tom Tromey <tromey@redhat.com>
6018 Pedro Alves <palves@redhat.com>
6020 Rename symbols whose names are reserved C++ keywords throughout.
6022 2015-02-27 Pedro Alves <palves@redhat.com>
6024 * Makefile.in (COMPILER): New, get it from autoconf.
6025 (CXX): Get from autoconf instead.
6026 (COMPILE.pre): Use COMPILER.
6027 (CC-LD): Rename to ...
6028 (CC_LD): ... this. Use COMPILER.
6029 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6030 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6031 * acinclude.m4: Include build-with-cxx.m4.
6032 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6033 Disable -Werror by default if building in C++ mode.
6034 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6035 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6036 the C++ compiler. Save/restore CXXFLAGS too.
6037 * configure: Regenerate.
6039 2015-02-27 Pedro Alves <palves@redhat.com>
6041 * acinclude.m4: Include libiberty.m4.
6042 * configure.ac: Call libiberty_INIT.
6043 * config.in, configure: Regenerate.
6045 2015-02-26 Pedro Alves <palves@redhat.com>
6047 * linux-low.c (linux_wait_1): When incrementing the PC past a
6048 program breakpoint always use the_low_target.breakpoint_len as
6049 increment, rather than the maximum between that and
6050 the_low_target.decr_pc_after_break.
6052 2015-02-23 Pedro Alves <palves@redhat.com>
6054 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6055 thread was doing a step-over; always adjust the PC if
6056 we stepped over a permanent breakpoint.
6057 (linux_wait_1): If we stepped over breakpoint that was on top of a
6058 permanent breakpoint, manually advance the PC past it.
6060 2015-02-23 Pedro Alves <palves@redhat.com>
6062 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6064 (x86_fill_gregset, x86_store_gregset): Use it when handling
6067 2015-02-20 Pedro Alves <palves@redhat.com>
6069 * thread-db.c: Include "nat/linux-procfs.h".
6070 (thread_db_init): Skip listing new threads if the kernel supports
6071 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6073 2015-02-20 Pedro Alves <palves@redhat.com>
6075 * linux-low.c (status_pending_p_callback): Use ptid_match.
6077 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6079 PR breakpoints/16812
6080 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6081 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6082 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6084 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6086 PR breakpoints/15956
6087 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6089 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6091 * linux-low.c (linux_low_btrace_conf): Print size.
6092 * server.c (handle_btrace_conf_general_set): New.
6093 (hanle_general_set): Call handle_btrace_conf_general_set.
6094 (handle_query): Report Qbtrace-conf:bts:size as supported.
6096 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6098 * linux-low.c (linux_low_enable_btrace): Update parameters.
6099 (linux_low_btrace_conf): New.
6100 (linux_target_ops)<to_btrace_conf>: Initialize.
6101 * server.c (current_btrace_conf): New.
6102 (handle_btrace_enable): Rename to ...
6103 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
6104 to target_enable_btrace. Update comment. Update users.
6105 (handle_qxfer_btrace_conf): New.
6106 (qxfer_packets): Add btrace-conf entry.
6107 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6108 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6109 (target_ops)<read_btrace_conf>: New.
6110 (target_enable_btrace): Update parameters.
6111 (target_read_btrace_conf): New.
6113 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6115 * server.c (handle_btrace_general_set): Remove call to
6116 target_supports_btrace.
6117 (supported_btrace_packets): New.
6118 (handle_query): Call supported_btrace_packets.
6119 * target.h: include btrace-common.h.
6120 (btrace_target_info): Removed.
6121 (supports_btrace, target_supports_btrace): Update parameters.
6123 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6125 * Makefile.in (SFILES): Add common/btrace-common.c.
6126 (OBS): Add common/btrace-common.o.
6127 (btrace-common.o): Add build rules.
6128 * linux-low: Include btrace-common.h.
6129 (linux_low_read_btrace): Use struct btrace_data. Call
6130 btrace_data_init and btrace_data_fini.
6132 2015-02-06 Pedro Alves <palves@redhat.com>
6134 * thread-db.c (find_new_threads_callback): Add debug output.
6136 2015-02-04 Pedro Alves <palves@redhat.com>
6138 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6139 (resume_stopped_resumed_lwps): New function.
6140 (linux_wait_for_event_filtered): Use it.
6142 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6144 * Makefile.in (SFILES): Add linux-personality.c.
6145 (linux-personality.o): New rule.
6146 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6147 list of objects to be built.
6148 * linux-low.c: Include nat/linux-personality.h.
6149 (linux_create_inferior): Remove code to disable address space
6150 randomization (moved to ../nat/linux-personality.c). Create
6151 cleanup to disable address space randomization.
6153 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6155 * Makefile.in (posix-strerror.o): New rule.
6156 (mingw-strerror.o): Likewise.
6157 * configure: Regenerated.
6158 * configure.ac: Source file ../common/common.host. Initialize new
6159 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6161 2015-01-14 Yao Qi <yao@codesourcery.com>
6163 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6164 (ppc-linux.o): New rule.
6165 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6166 * configure.ac: AC_CHECK_FUNCS(getauxval).
6167 * config.in: Re-generated.
6168 * configure: Re-generated.
6169 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6170 ppc64_64bit_inferior_p
6172 2015-01-14 Yao Qi <yao@codesourcery.com>
6174 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6175 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6176 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6177 (PT_ORIG_R3, PT_TRAP): Likewise.
6178 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6179 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6180 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6182 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6184 * i387-fp.c (i387_cache_to_xsave): In look over
6185 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6186 zmmh_low_space field by use of zmmh_high_space.
6188 2015-01-09 Pedro Alves <palves@redhat.com>
6190 * linux-low.c (step_over_bkpt): Move higher up in the file.
6191 (handle_extended_wait): Don't store the stop_pc here.
6192 (get_stop_pc): Adjust comments and rename to ...
6193 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6194 stopped for a software breakpoint or hardware breakpoint.
6195 (thread_still_has_status_pending_p): New function.
6196 (status_pending_p_callback): Use
6197 thread_still_has_status_pending_p. If the event is no longer
6198 interesting, resume the LWP.
6199 (handle_tracepoints): Add assert.
6200 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6201 (wstatus_maybe_breakpoint): New function.
6202 (cancel_breakpoint): Delete function.
6203 (check_stopped_by_watchpoint): New function, factored out from
6204 linux_low_filter_event.
6205 (lp_status_maybe_breakpoint): Delete function.
6206 (linux_low_filter_event): Remove filter_ptid argument.
6207 Leave thread group exits pending here. Store the LWP's stop PC.
6208 Always leave events pending.
6209 (linux_wait_for_event_filtered): Pull all events out of the
6210 kernel, and leave them all pending.
6211 (count_events_callback, select_event_lwp_callback): Consider all
6213 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6214 (select_event_lwp): Only give preference to the stepping LWP in
6215 all-stop mode. Adjust comments.
6216 (ignore_event): New function.
6217 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6218 references to cancel_breakpoints. Adjust to renames. Also give
6219 equal priority to all LWPs that have had events in non-stop mode.
6220 If reporting a software breakpoint event, unadjust the LWP's PC.
6221 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6222 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6224 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6225 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6226 (linux_stopped_by_watchpoint): Adjust.
6227 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6228 * linux-low.h (enum lwp_stop_reason): New.
6229 (struct lwp_info) <stop_pc>: Adjust comment.
6230 <stopped_by_watchpoint>: Delete field.
6231 <stop_reason>: New field.
6232 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6233 * mem-break.c (software_breakpoint_inserted_here)
6234 (hardware_breakpoint_inserted_here): New function.
6235 * mem-break.h (software_breakpoint_inserted_here)
6236 (hardware_breakpoint_inserted_here): Declare.
6237 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6238 (cancel_breakpoints): Delete.
6239 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6240 (upload_fast_traceframes): Remove references to
6243 2015-01-09 Pedro Alves <palves@redhat.com>
6245 * thread-db.c (find_new_threads_callback): Ignore thread if the
6246 kernel thread ID is -1.
6248 2015-01-09 Pedro Alves <palves@redhat.com>
6250 * linux-low.c (linux_attach_fail_reason_string): Move to
6251 nat/linux-ptrace.c, and rename.
6252 (linux_attach_lwp): Update comment.
6253 (attach_proc_task_lwp_callback): New function.
6254 (linux_attach): Adjust to rename and use
6255 linux_proc_attach_tgid_threads.
6256 (linux_attach_fail_reason_string): Delete declaration.
6258 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6260 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6261 * server.c (gdbserver_version): Likewise.
6263 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6265 * remote-utils.c: Include ctype.h.
6266 (input_interrupt): Explicitly handle the case when the char
6267 received is the NUL byte. Improve the printing of non-ASCII
6270 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6272 * linux-low.c (linux_low_filter_event): Update call to
6273 linux_enable_event_reporting following the addition of
6274 a new parameter to that function.
6276 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6279 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6280 (AARCH64_FPCR_REGNO): Likewise.
6281 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6282 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6283 (aarch64_store_fpregset): Likewise.
6285 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6287 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6288 Remove FIXME comment about assumption about N.
6290 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6292 * configure.ac: If large-file support is disabled in GDBserver,
6293 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6294 * configure: Regenerate.
6296 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6298 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6299 warning upon ENODATA from ptrace.
6300 * linux-s390-low.c (s390_store_tdb): New.
6301 (s390_regsets): Add regset for NT_S390_TDB.
6303 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6305 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6306 without a fill_function.
6307 * linux-s390-low.c (s390_fill_last_break): Remove.
6308 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6309 (s390_arch_setup): Use regset's size instead of fill_function for
6312 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6314 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6315 the regset's store function when ptrace returned an error.
6316 * regcache.c (get_thread_regcache): Invalidate register cache
6317 before fetching inferior's registers.
6319 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6321 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6322 while-loop as for-loop.
6323 (regsets_store_inferior_registers): Likewise.
6325 2014-11-28 Yao Qi <yao@codesourcery.com>
6327 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6328 * config.in, configure: Re-generate.
6329 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6332 2014-11-21 Yao Qi <yao@codesourcery.com>
6334 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6335 (AC_CHECK_HEADERS): Remove malloc.h.
6336 * configure: Re-generated.
6337 * config.in: Re-generated.
6338 * server.h: Don't include alloca.h and malloc.h.
6339 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6340 Don't include malloc.h.
6342 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6344 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6345 corresponding ERRNO check in same block.
6347 2014-11-12 Pedro Alves <palves@redhat.com>
6349 * server.c (cont_thread): Update comment.
6350 (start_inferior, attach_inferior): No longer clear cont_thread.
6351 (handle_v_cont): No longer set cont_thread.
6352 (captured_main): Clear cont_thread each time a GDB connects.
6354 2014-11-12 Pedro Alves <palves@redhat.com>
6356 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6357 thread, and don't resume all threads if the Hc thread has exited.
6359 2014-11-12 Pedro Alves <palves@redhat.com>
6361 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6362 the process group instead of to a specific LWP.
6364 2014-10-15 Pedro Alves <palves@redhat.com>
6367 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6369 (arm_set_thread_context): Delete.
6370 (the_low_target): Adjust.
6371 * win32-i386-low.c (debug_registers_changed)
6372 (debug_registers_used): Delete.
6373 (update_debug_registers_callback): New function.
6374 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6375 needing to update their debug registers.
6376 (win32_get_current_dr): New function.
6377 (x86_dr_low_get_addr, x86_dr_low_get_control)
6378 (x86_dr_low_get_status): Fetch the debug register from the thread
6380 (i386_initial_stuff): Adjust.
6381 (i386_get_thread_context): Remove current_event parameter. Don't
6382 clear debug_registers_changed nor copy DR values to
6384 (i386_set_thread_context): Delete.
6385 (i386_prepare_to_resume): New function.
6386 (i386_thread_added): Mark the thread as needing to update irs
6388 (the_low_target): Remove i386_set_thread_context and install
6389 i386_prepare_to_resume.
6390 * win32-low.c (win32_get_thread_context): Adjust.
6391 (win32_set_thread_context): Use SetThreadContext
6393 (win32_prepare_to_resume): New function.
6394 (win32_require_context): New function, factored out from ...
6395 (thread_rec): ... this.
6396 (continue_one_thread): Call win32_prepare_to_resume on each thread
6397 we're about to continue.
6398 (win32_resume): Call win32_prepare_to_resume on the event thread.
6399 * win32-low.h (struct win32_thread_info)
6400 <debug_registers_changed>: New field.
6401 (struct win32_target_ops): Change prototype of set_thread_context,
6402 delete set_thread_context and add prepare_to_resume.
6403 (win32_require_context): New declaration.
6405 2014-10-08 Gary Benson <gbenson@redhat.com>
6407 * server.h: Do not include common-exceptions.h.
6409 2014-10-08 Gary Benson <gbenson@redhat.com>
6411 * server.h: Do not include cleanups.h.
6413 2014-09-30 James Hogan <james.hogan@imgtec.com>
6415 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6418 2014-09-23 Yao Qi <yao@codesourcery.com>
6420 * linux-low.c (lp_status_maybe_breakpoint): New function.
6421 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6422 (count_events_callback): Likewise.
6423 (select_event_lwp_callback): Likewise.
6424 (cancel_breakpoints_callback): Likewise.
6426 2014-09-19 Don Breazeal <donb@codesourcery.com>
6428 * linux-low.c (handle_extended_wait): Call
6429 linux_ptrace_get_extended_event.
6430 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6431 linux_is_extended_waitstatus.
6433 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6435 * Makefile.in (CPPFLAGS): Define.
6436 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6437 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6439 2014-09-16 Gary Benson <gbenson@redhat.com>
6441 * inferiors.h (current_inferior): Renamed as...
6442 (current_thread): New variable. All uses updated.
6443 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6444 (maybe_move_out_of_jump_pad): Likewise.
6445 (cancel_breakpoint): Likewise.
6446 (linux_low_filter_event): Likewise.
6447 (wait_for_sigstop): Likewise.
6448 (linux_resume_one_lwp): Likewise.
6449 (need_step_over_p): Likewise.
6450 (start_step_over): Likewise.
6451 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6452 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6453 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6454 and save_inferior as saved_thread.
6455 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6457 (regcache_invalidate_thread): Likewise.
6458 * remote-utils.c (prepare_resume_reply): Likewise.
6459 * thread-db.c (thread_db_get_tls_address): Likewise.
6460 (disable_thread_event_reporting): Likewise.
6461 (remove_thread_event_breakpoints): Likewise.
6462 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6464 * target.h (set_desired_inferior): Renamed as...
6465 (set_desired_thread): New declaration. All uses updated.
6466 * server.c (myresume): Updated comment to reference thread instead
6468 (handle_serial_event): Likewise.
6469 (handle_target_event): Likewise.
6471 2014-09-12 Tom Tromey <tromey@redhat.com>
6472 Gary Benson <gbenson@redhat.com>
6474 * regcache.h: Include common-regcache.h.
6475 (regcache_read_pc): Don't declare.
6476 * regcache.c (get_thread_regcache_for_ptid): New function.
6478 2014-09-11 Tom Tromey <tromey@redhat.com>
6479 Gary Benson <gbenson@redhat.com>
6481 * symbol.c: New file.
6482 * Makefile.in (SFILES): Add symbol.c.
6483 (OBS): Add symbol.o.
6485 2014-09-11 Gary Benson <gbenson@redhat.com>
6487 * target.c (target_stop_ptid, target_continue_ptid): New
6490 2014-09-11 Tom Tromey <tromey@redhat.com>
6491 Gary Benson <gbenson@redhat.com>
6493 * target.h: Include target/target.h.
6494 * target.c (target_read_memory, target_read_uint32)
6495 (target_write_memory): New functions.
6497 2014-09-11 Gary Benson <gbenson@redhat.com>
6499 * server.h (debug_hw_points): Don't declare.
6500 * server.c (debug_hw_points): Don't define. Replace all uses
6501 with show_debug_regs.
6502 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6503 all uses with show_debug_regs.
6505 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6507 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6508 endianness into account.
6509 (ppc_supply_ptrace_register): Likewise.
6511 2014-09-03 James Hogan <james.hogan@imgtec.com>
6513 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6514 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6516 2014-09-03 Gary Benson <gbenson@redhat.com>
6518 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6519 ALL_DEBUG_ADDRESS_REGISTERS.
6521 2014-09-02 Gary Benson <gbenson@redhat.com>
6523 * i386-low.h: Renamed as...
6524 * x86-low.h: New file. All type, function and variable name
6525 prefixes changed from "i386_" to "x86_". All references updated.
6526 * i386-low.c: Renamed as...
6527 * x86-low.c: New file. All type, function and variable name
6528 prefixes changed from "i386_" to "x86_". All references updated.
6530 2014-09-02 Gary Benson <gbenson@redhat.com>
6532 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6533 (x86_linux_new_thread): Likewise.
6535 2014-08-29 Gary Benson <gbenson@redhat.com>
6537 * server.h (setjmp.h): Do not include.
6538 (toplevel): Do not declare.
6539 (common-exceptions.h): Include.
6540 (cleanups.h): Likewise.
6541 * server.c (toplevel): Do not define.
6542 (exit_code): New static global.
6543 (detach_or_kill_for_exit_cleanup): New function.
6544 (main): New function. Original main renamed to...
6545 (captured_main): New function.
6546 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6548 2014-08-29 Gary Benson <gbenson@redhat.com>
6550 * Makefile.in (SFILES): Add common/common-exceptions.c.
6551 (OBS): Add common-exceptions.o.
6552 (common-exceptions.o): New rule.
6553 * utils.c (prepare_to_throw_exception): New function.
6555 2014-08-29 Gary Benson <gbenson@redhat.com>
6557 * config.in: Regenerate.
6558 * configure: Likewise.
6560 2014-08-29 Gary Benson <gbenson@redhat.com>
6562 * Makefile.in (SFILES): Add common/cleanups.c.
6564 (cleanups.o): New rule.
6566 2014-08-29 Gary Benson <gbenson@redhat.com>
6568 * utils.c (internal_vwarning): New function.
6570 2014-08-28 Gary Benson <gbenson@redhat.com>
6572 * utils.h (fatal): Remove declaration.
6573 * utils.c (fatal): Remove function.
6575 2014-08-28 Gary Benson <gbenson@redhat.com>
6577 * tracepoint.c (gdb_agent_init): Replace fatal with
6579 (initialize_tracepoint): Likewise.
6581 2014-08-28 Gary Benson <gbenson@redhat.com>
6583 * remote-utils.c (remote_prepare): Replace fatal with error.
6585 2014-08-28 Gary Benson <gbenson@redhat.com>
6587 * linux-low.c (linux_async): Replace fatal with warning.
6589 (linux_start_non_stop): Return -1 if linux_async failed.
6591 2014-08-28 Gary Benson <gbenson@redhat.com>
6593 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6595 (i386_dr_low_get_addr): Remove vague comment.
6596 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6599 2014-08-28 Gary Benson <gbenson@redhat.com>
6601 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6602 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6604 (linux_resume_one_lwp): Likewise.
6605 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6607 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6608 with internal_error.
6609 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6610 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6611 (find_register_by_name): Replace fatal with internal_error.
6612 (find_regno): Likewise.
6613 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6614 * thread-db.c (thread_db_create_event): Likewise.
6615 (thread_db_load_search): Likewise.
6616 (try_thread_db_load_1): Likewise.
6617 * tracepoint.c (get_jump_space_head): Replace fatal with
6619 (claim_trampoline_space): Likewise.
6620 (have_fast_tracepoint_trampoline_buffer): Likewise.
6621 (cmd_qtstart): Likewise.
6622 (stop_tracing): Likewise.
6623 (fast_tracepoint_collecting): Likewise.
6624 (target_malloc): Likewise.
6625 (download_tracepoint): Likewise.
6626 (download_trace_state_variables): Replace check with gdb_assert.
6627 (upload_fast_traceframes): Replace fatal with internal_error.
6629 2014-08-19 Tom Tromey <tromey@redhat.com>
6630 Gary Benson <gbenson@redhat.com>
6632 * Makefile.in (SFILES): Add common/common-debug.c.
6633 (OBS): Add common-debug.o.
6634 (common-debug.o): New rule.
6635 * debug.h (debug_printf): Don't declare.
6636 * debug.c (debug_printf): Renamed and rewritten as...
6637 (debug_vprintf): New function.
6639 2014-08-19 Gary Benson <gbenson@redhat.com>
6641 * utils.h: Do not include print-utils.h.
6643 2014-08-19 Tom Tromey <tromey@redhat.com>
6644 Gary Benson <gbenson@redhat.com>
6646 * server.h: Add static assertion.
6647 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6649 2014-08-19 Tom Tromey <tromey@redhat.com>
6650 Gary Benson <gbenson@redhat.com>
6652 * Makefile.in (SFILES): Add common/errors.c.
6653 (OBS): Add errors.o.
6654 (IPA_OBS): Add errors-ipa.o.
6655 (errors.o): New rule.
6656 (errors-ipa.o): Likewise.
6657 * utils.h (perror_with_name, error, warning): Don't declare.
6658 * utils.c (warning): Renamed and rewritten as...
6659 (vwarning): New function.
6660 (error): Renamed and rewritten as...
6661 (verror): New function.
6662 (internal_error): Renamed and rewritten as...
6663 (internal_verror): New function.
6665 2014-08-07 Gary Benson <gbenson@redhat.com>
6667 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6668 * configure: Regenerate.
6669 * config.in: Likewise.
6670 * server.h: Do not include errno.h.
6671 * event-loop.c: Likewise.
6672 * hostio-errno.c: Likewise.
6673 * linux-low.c: Likewise.
6674 * remote-utils.c: Likewise.
6675 * spu-low.c: Likewise.
6676 * utils.c: Likewise.
6677 * gdbreplay.c: Unconditionally include errno.h.
6679 2014-08-07 Gary Benson <gbenson@redhat.com>
6681 * server.h: Do not include string.h.
6682 * event-loop.c: Likewise.
6683 * linux-low.c: Likewise.
6684 * regcache.c: Likewise.
6685 * remote-utils.c: Likewise.
6686 * spu-low.c: Likewise.
6687 * utils.c: Likewise.
6689 2014-08-07 Gary Benson <gbenson@redhat.com>
6691 * server.h: Do not include gdb_assert.h.
6693 2014-08-07 Gary Benson <gbenson@redhat.com>
6695 * server.h: Do not include common-utils.h.
6697 2014-08-07 Gary Benson <gbenson@redhat.com>
6699 * server.h: Do not include ptid.h.
6700 * notif.h: Likewise.
6702 2014-08-07 Gary Benson <gbenson@redhat.com>
6704 * server.h: Do not include gdb_locale.h.
6706 2014-08-07 Gary Benson <gbenson@redhat.com>
6708 * server.h: Do not include gdb/signals.h.
6709 * win32-low.c: Likewise.
6711 2014-08-07 Gary Benson <gbenson@redhat.com>
6713 * server.h: Do not include pathmax.h.
6715 2014-08-07 Gary Benson <gbenson@redhat.com>
6717 * server.h: Do not include libiberty.h.
6718 * linux-bfin-low.c: Likewise.
6720 2014-08-07 Gary Benson <gbenson@redhat.com>
6722 * server.h: Do not include ansidecl.h.
6724 2014-08-07 Gary Benson <gbenson@redhat.com>
6726 * linux-x86-low.c: Do not include stddef.h.
6727 * lynx-ppc-low.c: Likewise.
6728 * tracepoint.c: Likewise.
6730 2014-08-07 Gary Benson <gbenson@redhat.com>
6732 * server.h: Do not include stdarg.h.
6733 * nto-low.c: Likewise.
6735 2014-08-07 Gary Benson <gbenson@redhat.com>
6737 * server.h: Do not include stdlib.h.
6738 * inferiors.c: Likewise.
6739 * linux-low.c: Likewise.
6740 * regcache.c: Likewise.
6741 * spu-low.c: Likewise.
6742 * tracepoint.c: Likewise.
6743 * utils.c: Likewise.
6745 2014-08-07 Gary Benson <gbenson@redhat.com>
6747 * server.h: Do not include stdio.h.
6748 * linux-low.c: Likewise.
6749 * remote-utils.c: Likewise.
6750 * spu-low.c: Likewise.
6751 * utils.c: Likewise.
6752 * wincecompat.c: Likewise.
6754 2014-08-06 Gary Benson <gbenson@redhat.com>
6756 * regcache.c (init_register_cache): Move conditionals inside if.
6758 2014-08-06 Gary Benson <gbenson@redhat.com>
6760 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6762 2014-07-31 Gary Benson <gbenson@redhat.com>
6764 * ax.h: Do not include server.h.
6765 * gdbthread.h: Likewise.
6766 * lynx-low.h: Likewise.
6767 * notif.h: Likewise.
6769 2014-07-30 Gary Benson <gbenson@redhat.com>
6771 * server.h: Include common-defs.h.
6772 Do not include config.h or build-gnulib-gdbserver/config.h.
6774 2014-07-30 Gary Benson <gbenson@redhat.com>
6776 * hostio-errno.c: Move server.h to top of includes list.
6777 * inferiors.c: Likewise.
6778 * linux-x86-low.c: Likewise.
6779 * notif.c: Include server.h.
6781 2014-07-24 Tom Tromey <tromey@redhat.com>
6782 Gary Benson <gbenson@redhat.com>
6784 * server.h (CORE_ADDR): Now unsigned.
6786 2014-07-16 Pedro Alves <palves@redhat.com>
6788 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6790 2014-07-15 Pedro Alves <palves@redhat.com>
6792 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6795 2014-07-11 Pedro Alves <palves@redhat.com>
6797 * linux-low.c (kill_wait_lwp): New function, based on
6798 kill_one_lwp_callback, but use my_waitpid directly.
6799 (kill_one_lwp_callback, linux_kill): Use it.
6801 2014-06-23 Pedro Alves <palves@redhat.com>
6803 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6804 before setting DR0..DR3.
6806 2014-06-20 Gary Benson <gbenson@redhat.com>
6808 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6809 * configure: Regenerated.
6810 * config.in: Likewise.
6812 2014-06-20 Gary Benson <gbenson@redhat.com>
6814 * Makefile.in (SFILES): Update locations for files moved
6816 (object file files): Reordered.
6818 2014-06-20 Gary Benson <gbenson@redhat.com>
6820 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6821 (i386_dr_low_set_addr): Likewise.
6822 (i386_dr_low_get_addr): Likewise.
6823 (i386_dr_low_can_set_control): Likewise.
6824 (i386_dr_low_set_control): Likewise.
6825 (i386_dr_low_get_control): Likewise.
6826 (i386_dr_low_get_status): Likewise.
6827 (i386_get_debug_register_length): Likewise.
6828 * linux-x86-low.c (i386_dr_low_set_addr):
6829 Changed signature. Made static.
6830 (i386_dr_low_get_addr): Likewise.
6831 (i386_dr_low_set_control): Likewise.
6832 (i386_dr_low_get_control): Likewise.
6833 (i386_dr_low_get_status): Likewise.
6834 (i386_dr_low): New global variable.
6835 * win32-i386-low.c (i386_dr_low_set_addr):
6836 Changed signature. Made static.
6837 (i386_dr_low_get_addr): Likewise.
6838 (i386_dr_low_set_control): Likewise.
6839 (i386_dr_low_get_control): Likewise.
6840 (i386_dr_low_get_status): Likewise.
6841 (i386_dr_low): New global variable.
6843 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6845 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6846 * Makefile.in (AR, AR_FLAGS): Define.
6847 * configure: Regenerate.
6849 2014-06-19 Gary Benson <gbenson@redhat.com>
6851 * Makefile.in (i386-dregs.o): New rule.
6852 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6853 * i386-low.c (target.h): Remove include.
6854 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6855 (DR_CONTROL_SHIFT): Likewise.
6856 (DR_CONTROL_SIZE): Likewise.
6857 (DR_RW_EXECUTE): Likewise.
6858 (DR_RW_WRITE): Likewise.
6859 (DR_RW_READ): Likewise.
6860 (DR_RW_IORW): Likewise.
6861 (DR_LEN_1): Likewise.
6862 (DR_LEN_2): Likewise.
6863 (DR_LEN_4): Likewise.
6864 (DR_LEN_8): Likewise.
6865 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6866 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6867 (DR_ENABLE_SIZE): Likewise.
6868 (DR_LOCAL_SLOWDOWN): Likewise.
6869 (DR_GLOBAL_SLOWDOWN): Likewise.
6870 (DR_CONTROL_RESERVED): Likewise.
6871 (I386_DR_CONTROL_MASK): Likewise.
6872 (I386_DR_VACANT): Likewise.
6873 (I386_DR_LOCAL_ENABLE): Likewise.
6874 (I386_DR_GLOBAL_ENABLE): Likewise.
6875 (I386_DR_DISABLE): Likewise.
6876 (I386_DR_SET_RW_LEN): Likewise.
6877 (I386_DR_GET_RW_LEN): Likewise.
6878 (I386_DR_WATCH_HIT): Likewise.
6879 (i386_wp_op_t): Likewise.
6880 (i386_show_dr): Likewise.
6881 (i386_length_and_rw_bits): Likewise.
6882 (i386_insert_aligned_watchpoint): Likewise.
6883 (i386_remove_aligned_watchpoint): Likewise.
6884 (i386_handle_nonaligned_watchpoint): Likewise.
6885 i386_update_inferior_debug_regs(): Likewise.
6886 (i386_dr_insert_watchpoint): Likewise.
6887 (i386_dr_remove_watchpoint): Likewise.
6888 (i386_dr_region_ok_for_watchpoint): Likewise.
6889 (i386_dr_stopped_data_address): Likewise.
6890 (i386_dr_stopped_by_watchpoint): Likewise.
6892 2014-06-19 Gary Benson <gbenson@redhat.com>
6894 * i386-low.c (i386_dr_show): Renamed to
6895 i386_show_dr and made static. All uses updated.
6896 (i386_dr_length_and_rw_bits): Renamed to
6897 i386_length_and_rw_bits and made static.
6899 (i386_dr_insert_aligned_watchpoint): Renamed to
6900 i386_insert_aligned_watchpoint and made static.
6902 (i386_dr_remove_aligned_watchpoint): Renamed to
6903 i386_remove_aligned_watchpoint and made static.
6905 (i386_dr_update_inferior_debug_regs): Renamed to
6906 i386_update_inferior_debug_regs and made static.
6909 2014-06-18 Gary Benson <gbenson@redhat.com>
6911 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6912 (i386_dr_low_can_set_control): Likewise.
6913 (i386_get_debug_register_length): Likewise.
6914 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6915 (i386_dr_low_can_set_control): Likewise.
6916 (i386_get_debug_register_length): Likewise.
6918 2014-06-17 Gary Benson <gbenson@redhat.com>
6920 * i386-low.h (i386-dregs.h): New include.
6921 (DR_FIRSTADDR): Now in i386-dregs.h.
6922 (DR_LASTADDR): Likewise.
6923 (DR_NADDR): Likewise.
6924 (DR_STATUS): Likewise.
6925 (DR_CONTROL): Likewise.
6926 (i386_debug_reg_state): Likewise.
6927 (i386_dr_insert_watchpoint): Likewise.
6928 (i386_dr_remove_watchpoint): Likewise.
6929 (i386_dr_region_ok_for_watchpoint): Likewise.
6930 (i386_dr_stopped_data_address): Likewise.
6931 (i386_dr_stopped_by_watchpoint): Likewise.
6932 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6934 2014-06-18 Gary Benson <gbenson@redhat.com>
6936 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6937 i386_dr_insert_watchpoint.
6938 (i386_low_remove_watchpoint): Renamed to
6939 i386_dr_remove_watchpoint.
6940 (i386_low_region_ok_for_watchpoint): Renamed to
6941 i386_dr_region_ok_for_watchpoint.
6942 (i386_low_stopped_data_address): Renamed to
6943 i386_dr_stopped_data_address.
6944 (i386_low_stopped_by_watchpoint): Renamed to
6945 i386_dr_stopped_by_watchpoint.
6946 * i386-low.c (i386_show_dr): Renamed to
6947 i386_dr_show and made nonstatic. All uses updated.
6948 (i386_length_and_rw_bits): Renamed to
6949 i386_dr_length_and_rw_bits and made nonstatic.
6951 (i386_insert_aligned_watchpoint): Renamed to
6952 i386_dr_insert_aligned_watchpoint and made nonstatic.
6954 (i386_remove_aligned_watchpoint): Renamed to
6955 i386_dr_remove_aligned_watchpoint and made nonstatic.
6957 (i386_update_inferior_debug_regs): Renamed to
6958 i386_dr_update_inferior_debug_regs and made nonstatic.
6960 (i386_low_insert_watchpoint): Renamed to
6961 i386_dr_insert_watchpoint. All uses updated.
6962 (i386_low_remove_watchpoint): Renamed to
6963 i386_dr_remove_watchpoint. All uses updated.
6964 (i386_low_region_ok_for_watchpoint): Renamed to
6965 i386_dr_region_ok_for_watchpoint. All uses updated.
6966 (i386_low_stopped_data_address): Renamed to
6967 i386_dr_stopped_data_address. All uses updated.
6968 (i386_low_stopped_by_watchpoint): Renamed to
6969 i386_dr_stopped_by_watchpoint. All uses updated.
6971 2014-06-18 Gary Benson <gbenson@redhat.com>
6973 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6974 (i386_dr_low_can_set_control): Likewise.
6975 (i386_insert_aligned_watchpoint): New check.
6977 2014-06-18 Gary Benson <gbenson@redhat.com>
6979 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6982 2014-06-18 Gary Benson <gbenson@redhat.com>
6984 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6985 instead of fatal and error.
6986 (i386_handle_nonaligned_watchpoint): Likewise.
6988 2014-06-18 Gary Benson <gbenson@redhat.com>
6990 * i386-low.c (i386_get_debug_register_length): New macro.
6991 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6992 (i386_show_dr): Use debug_printf instead of fprintf. Use
6993 phex to format values.
6995 2014-06-18 Gary Benson <gbenson@redhat.com>
6997 * i386-low.h: Comment changes.
6998 * i386-low.c: Likewise.
7000 2014-06-18 Gary Benson <gbenson@redhat.com>
7002 * i386-low.c: Whitespace changes.
7004 2014-06-12 Tom Tromey <tromey@redhat.com>
7006 * utils.c (freeargv): Remove.
7008 2014-06-12 Tom Tromey <tromey@redhat.com>
7010 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7011 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7012 (parse_debug_format_options): Likewise.
7013 (gdbserver_usage): Likewise.
7014 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7015 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7016 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7018 ($(LIBGNU)): Depend on libiberty.
7019 (all-lib): Recurse into all subdirs.
7020 (install-only): Invoke "install" target in subdirs.
7021 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7023 * configure: Rebuild.
7024 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7025 for vasprintf, vsnprintf, or gettimeofday.
7026 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7029 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7031 * development.sh: Delete.
7032 * Makefile.in (config.status): Adjust dependency on development.sh.
7033 * configure.ac: Adjust development.sh source call.
7034 * configure: Regenerate.
7036 2014-06-02 Pedro Alves <palves@redhat.com>
7038 * ax.c (gdb_free_agent_expr): New function.
7039 * ax.h (gdb_free_agent_expr): New declaration.
7040 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7042 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7044 (clear_breakpoint_conditions_and_commands): New function.
7045 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7046 (clear_breakpoint_conditions_and_commands): New declaration.
7048 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7050 * linux-aarch64-low.c (asm/ptrace.h): Include.
7052 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7054 Fix TLS access for -static -pthread.
7055 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7056 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7057 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7059 2014-05-20 Pedro Alves <palves@redhat.com>
7061 * linux-aarch64-low.c (aarch64_insert_point)
7062 (aarch64_remove_point): No longer check whether the type is
7063 supported here. Adjust to new interface.
7064 (the_low_target): Install aarch64_supports_z_point_type as
7065 supports_z_point_type method.
7066 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7067 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7068 instead of a Z packet char. Adjust.
7069 (arm_supports_z_point_type): New function.
7070 (arm_insert_point, arm_remove_point): Adjust to new interface.
7071 (the_low_target): Install arm_supports_z_point_type.
7072 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7073 (cris_insert_point, cris_remove_point): Adjust to new interface.
7074 Don't check whether the type is supported here.
7075 (the_low_target): Install cris_supports_z_point_type.
7076 * linux-low.c (linux_supports_z_point_type): New function.
7077 (linux_insert_point, linux_remove_point): Adjust to new interface.
7078 * linux-low.h (struct linux_target_ops) <insert_point,
7079 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7080 raw_breakpoint pointer parameter.
7081 <supports_z_point_type>: New method.
7082 * linux-mips-low.c (mips_supports_z_point_type): New function.
7083 (mips_insert_point, mips_remove_point): Adjust to new interface.
7084 Use mips_supports_z_point_type.
7085 (the_low_target): Install mips_supports_z_point_type.
7086 * linux-ppc-low.c (the_low_target): Install NULL as
7087 supports_z_point_type method.
7088 * linux-s390-low.c (the_low_target): Install NULL as
7089 supports_z_point_type method.
7090 * linux-sparc-low.c (the_low_target): Install NULL as
7091 supports_z_point_type method.
7092 * linux-x86-low.c (x86_supports_z_point_type): New function.
7093 (x86_insert_point): Adjust to new insert_point interface. Use
7094 insert_memory_breakpoint. Adjust to new
7095 i386_low_insert_watchpoint interface.
7096 (x86_remove_point): Adjust to remove_point interface. Use
7097 remove_memory_breakpoint. Adjust to new
7098 i386_low_remove_watchpoint interface.
7099 (the_low_target): Install x86_supports_z_point_type.
7100 * lynx-low.c (lynx_target_ops): Install NULL as
7101 supports_z_point_type callback.
7102 * nto-low.c (nto_supports_z_point_type): New.
7103 (nto_insert_point, nto_remove_point): Adjust to new interface.
7104 (nto_target_ops): Install nto_supports_z_point_type.
7105 * mem-break.c: Adjust intro comment.
7106 (struct raw_breakpoint) <raw_type, size>: New fields.
7107 <inserted>: Update comment.
7108 <shlib_disabled>: Delete field.
7109 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7110 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7111 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7112 (raw_bkpt_type_to_target_hw_bp_type): New function.
7113 (find_enabled_raw_code_breakpoint_at): New function.
7114 (find_raw_breakpoint_at): New type and size parameters. Use them.
7115 (insert_memory_breakpoint): New function, based off
7116 set_raw_breakpoint_at.
7117 (remove_memory_breakpoint): New function.
7118 (set_raw_breakpoint_at): Reimplement.
7119 (set_breakpoint): New, based on set_breakpoint_at.
7120 (set_breakpoint_at): Reimplement.
7121 (delete_raw_breakpoint): Go through the_target->remove_point
7122 instead of assuming memory breakpoints.
7123 (find_gdb_breakpoint_at): Delete.
7124 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7125 (find_gdb_breakpoint): New function.
7126 (set_gdb_breakpoint_at): Delete.
7127 (z_type_supported): New function.
7128 (set_gdb_breakpoint_1): New function, loosely based off
7129 set_gdb_breakpoint_at.
7130 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7131 (delete_gdb_breakpoint_at): Delete.
7132 (delete_gdb_breakpoint_1): New function, loosely based off
7133 delete_gdb_breakpoint_at.
7134 (delete_gdb_breakpoint): New function.
7135 (clear_gdb_breakpoint_conditions): Rename to ...
7136 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7138 (add_condition_to_breakpoint): Make static.
7139 (add_breakpoint_condition): Take a struct breakpoint pointer
7140 instead of an address. Adjust.
7141 (gdb_condition_true_at_breakpoint): Rename to ...
7142 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7144 (gdb_condition_true_at_breakpoint): Reimplement.
7145 (add_breakpoint_commands): Take a struct breakpoint pointer
7146 instead of an address. Adjust.
7147 (gdb_no_commands_at_breakpoint): Rename to ...
7148 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7149 parameter. Return true if no breakpoint was found. Change debug
7151 (gdb_no_commands_at_breakpoint): Reimplement.
7152 (run_breakpoint_commands): Rename to ...
7153 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7154 and change return type to boolean.
7155 (run_breakpoint_commands): New function.
7156 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7157 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7158 breakpoint. Go through the_target->remove_point instead of
7159 assuming memory breakpoint.
7160 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7161 software and hardware breakpoints.
7162 (reinsert_raw_breakpoint): Go through the_target->insert_point
7163 instead of assuming memory breakpoint.
7164 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7165 software and hardware breakpoints.
7166 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7167 Check both software and hardware breakpoints.
7168 (validate_inserted_breakpoint): Assert the breakpoint is a
7169 software breakpoint. Set the inserted flag to -1 instead of
7170 setting shlib_disabled.
7171 (delete_disabled_breakpoints): Adjust.
7172 (validate_breakpoints): Only validate software breakpoints.
7173 Adjust to inserted flag change.
7174 (check_mem_read, check_mem_write): Skip breakpoint types other
7175 than software breakpoints. Adjust to inserted flag change.
7176 * mem-break.h (enum raw_bkpt_type): New enum.
7177 (raw_breakpoint, struct process_info): Forward declare.
7178 (Z_packet_to_target_hw_bp_type): Delete declaration.
7179 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7180 (set_gdb_breakpoint, delete_gdb_breakpoint)
7181 (clear_breakpoint_conditions): New declarations.
7182 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7183 (breakpoint_inserted_here): Update comment.
7184 (add_breakpoint_condition, add_breakpoint_commands): Replace
7185 address parameter with a breakpoint pointer parameter.
7186 (gdb_breakpoint_here): Update comment.
7187 (delete_gdb_breakpoint_at): Delete.
7188 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7189 * server.c (process_point_options): Take a struct breakpoint
7190 pointer instead of an address. Adjust.
7191 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7192 delete_gdb_breakpoint.
7193 * spu-low.c (spu_target_ops): Install NULL as
7194 supports_z_point_type method.
7195 * target.h: Include mem-break.h.
7196 (struct target_ops) <prepare_to_access_memory>: Update comment.
7197 <supports_z_point_type>: New field.
7198 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7199 instead of a char. Also take a raw breakpoint pointer.
7200 * win32-arm-low.c (the_low_target): Install NULL as
7201 supports_z_point_type.
7202 * win32-i386-low.c (i386_supports_z_point_type): New function.
7203 (i386_insert_point, i386_remove_point): Adjust to new interface.
7204 (the_low_target): Install i386_supports_z_point_type.
7205 * win32-low.c (win32_supports_z_point_type): New function.
7206 (win32_insert_point, win32_remove_point): Adjust to new interface.
7207 (win32_target_ops): Install win32_supports_z_point_type.
7208 * win32-low.h (struct win32_target_ops):
7209 <supports_z_point_type>: New method.
7210 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7211 instead of a char. Also take a raw breakpoint pointer.
7213 2014-05-20 Pedro Alves <palves@redhat.com>
7215 * mem-break.h: Include break-common.h.
7216 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7217 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7218 (Z_packet_to_target_hw_bp_type): New declaration.
7219 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7220 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7221 (Z_PACKET_ACCESS_WP): Delete macros.
7222 (Z_packet_to_hw_type): Delete function.
7223 * i386-low.h: Don't include break-common.h here.
7224 (Z_packet_to_hw_type): Delete declaration.
7225 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7226 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7227 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7228 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7229 * linux-aarch64-low.c: Don't include break-common.h here.
7230 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7231 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7232 (Z_packet_to_target_hw_bp_type): Delete function.
7233 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7235 (mips_insert_point, mips_remove_point): Use
7236 Z_packet_to_target_hw_bp_type.
7238 2014-05-20 Pedro Alves <palves@redhat.com>
7240 * linux-aarch64-low.c: Include break-common.h.
7241 (enum target_point_type): Delete.
7242 (Z_packet_to_point_type): Rename to ...
7243 (Z_packet_to_target_hw_bp_type): ... this, and return a
7244 target_hw_bp_type instead.
7245 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7246 instead of an enum target_point_type.
7247 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7249 (aarch64_dr_state_insert_one_point)
7250 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7251 (aarch64_handle_aligned_watchpoint)
7252 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7253 Take an enum target_hw_bp_type instead of an enum
7255 (aarch64_supports_z_point_type): New function.
7256 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7257 use Z_packet_to_target_hw_bp_type.
7259 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7261 * configure.ac: Only use -Werror by default when DEVELOPMENT
7263 * configure: Regenerate.
7265 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7267 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7268 * linux-x86-low.c (X86_64_USER_REGS): New.
7269 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7271 2014-04-28 Yao Qi <yao@codesourcery.com>
7273 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7276 2014-04-25 Pedro Alves <palves@redhat.com>
7279 * linux-low.c (linux_attach_fail_reason_string): New function.
7280 (linux_attach_lwp): Delete.
7281 (linux_attach_lwp_1): Rename to ...
7282 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7283 argument. Remove "initial" parameter. Return int instead of
7284 void. Don't error or warn here.
7285 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7286 failure to attach to the tgid. Call warning when failing to
7288 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7289 argument. Remove "initial" parameter. Return int instead of
7290 void. Don't error or warn here.
7291 (linux_attach_fail_reason_string): New declaration.
7292 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7293 interface change. Use linux_attach_fail_reason_string.
7295 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7296 Walfred Tedeschi <walfred.tedeschi@intel.com>
7298 * Makefile.in: Added rules to handle new files
7299 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7300 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7301 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7302 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7303 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7304 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7306 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7307 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7308 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7309 i386/x32-avx512.xml.
7310 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7311 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7312 i386/x32-avx512-linux.xml.
7313 * i387-fp.c (num_avx512_k_registers): New constant for number
7315 (num_avx512_zmmh_low_registers): New constant for number of
7316 lower ZMM registers (0-15).
7317 (num_avx512_zmmh_high_registers): New constant for number of
7318 higher ZMM registers (16-31).
7319 (num_avx512_ymmh_registers): New contant for number of higher
7320 YMM registers (ymm16-31 added by avx521 on x86_64).
7321 (num_avx512_xmm_registers): New constant for number of higher
7322 XMM registers (xmm16-31 added by AVX512 on x86_64).
7323 (struct i387_xsave): Add space for AVX512 registers.
7324 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7325 Add code to handle AVX512 registers.
7326 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7327 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7328 prototypei from generated file.
7329 (tdesc_amd64_avx512_linux): Likewise.
7330 (init_registers_x32_avx512_linux): Likewise.
7331 (tdesc_x32_avx512_linux): Likewise.
7332 (init_registers_i386_avx512_linux): Likewise.
7333 (tdesc_i386_avx512_linux): Likewise.
7334 (x86_64_regmap): Add AVX512 registers.
7335 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7337 (initialize_low_arch): Add code to initialize AVX512 registers.
7339 2014-04-23 Pedro Alves <palves@redhat.com>
7341 * mem-break.c (find_gdb_breakpoint_at): Make static.
7342 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7344 2014-04-23 Pedro Alves <palves@redhat.com>
7346 * i386-low.c: Don't include break-common.h here.
7347 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7348 prototype to take target_hw_bp_type as argument instead of a Z
7350 * i386-low.h: Include break-common.h here.
7351 (Z_packet_to_hw_type): Declare.
7352 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7354 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7355 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7356 (x86_remove_point): Convert the packet number to a
7357 target_hw_bp_type before calling i386_low_remove_watchpoint.
7358 * win32-i386-low.c (i386_insert_point): Convert the packet number
7359 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7360 (i386_remove_point): Convert the packet number to a
7361 target_hw_bp_type before calling i386_low_remove_watchpoint.
7363 2014-04-23 Pedro Alves <palves@redhat.com>
7365 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7367 2014-04-10 Pedro Alves <palves@redhat.com>
7369 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7370 Check if the condition or command is NULL before checking if the
7371 breakpoint is known. On success, return true.
7372 * mem-break.h (add_breakpoint_condition): Document return.
7373 (add_breakpoint_commands): Add describing comment.
7374 * server.c (skip_to_semicolon): New function.
7375 (process_point_options): Use it.
7377 2014-04-09 Pedro Alves <palves@redhat.com>
7379 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7382 2014-02-27 Pedro Alves <palves@redhat.com>
7385 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7387 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7389 (last_thread_of_process_p): Take a PID argument instead of a
7391 (linux_wait_for_lwp): Delete.
7392 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7394 (linux_low_filter_event): New function, party factored out from
7395 linux_wait_for_event.
7396 (linux_wait_for_event): Rename to ...
7397 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7398 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7399 sigsuspend. Check for zombie leaders.
7400 (linux_wait_for_event): Reimplement as wrapper around
7401 linux_wait_for_event_filtered.
7402 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7403 a normal or signal exit is seen, it's the whole process exiting.
7404 (wait_for_sigstop): No longer a for_each_inferior callback.
7405 Rewrite on top of linux_wait_for_event_filtered.
7406 (stop_all_lwps): Call wait_for_sigstop directly.
7407 * server.c (resume, handle_target_event): Handle
7408 TARGET_WAITKIND_NO_RESUMED.
7410 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7412 * win32-low.c (psapi_get_dll_name,
7413 * win32_CreateToolhelp32Snapshot): Delete.
7414 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7415 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7417 (handle_load_dll): Add function description.
7418 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7420 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7422 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7424 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7425 base address when calling win32_add_one_solib.
7426 (handle_load_dll): Delete local variable load_addr.
7427 Remove 0x1000 offset applied to DLL base address when calling
7428 win32_add_one_solib.
7429 (handle_unload_dll): Add comment.
7431 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7433 * win32-low.c (win32_add_all_dlls): Renames
7434 win32_ensure_ntdll_loaded. Rewrite function documentation.
7435 Adjust implementation to always load all DLLs.
7436 Add 0x1000 offset to DLL base address when calling
7437 win32_add_one_solib.
7438 (child_initialization_done): New static global.
7439 (do_initial_child_stuff): Set child_initialization_done to
7440 zero during child initialization, and 1 after. Replace call
7441 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7443 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7444 (handle_unload_dll): Add function documentation.
7445 (get_child_debug_event): Ignore load and unload DLL events
7446 during child initialization.
7448 2014-02-20 Doug Evans <dje@google.com>
7450 Remove global all_lwps.
7451 * inferiors.h (ptid_of): Move here from linux-low.h.
7452 (pid_of, lwpid_of): Ditto.
7453 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7454 parameter is a struct thread_info * now.
7455 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7456 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7457 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7459 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7460 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7461 * linux-arm-low.c (update_registers_callback): Update, "entry"
7462 parameter is a struct thread_info * now.
7463 Fetch lwpid from current_inferior directly.
7464 (arm_insert_point): Pass &all_threads to find_inferior instead of
7466 (arm_remove_point): Ditto.
7467 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7468 (arm_prepare_to_resume): Fetch pid from thread.
7469 (arm_read_description): Fetch lwpid from current_inferior directly.
7470 * linux-low.c (all_lwps): Delete.
7471 (delete_lwp): Delete call to remove_inferior.
7472 (handle_extended_wait): Fetch lwpid from thread.
7473 (add_lwp): Don't set lwp->entry.id. Remove call to
7474 add_inferior_to_list.
7475 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7476 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7477 (kill_one_lwp_callback): Ditto.
7478 (linux_kill): Don't dereference NULL pointer.
7479 Fetch ptid,lwpid from thread.
7480 (get_detach_signal): Fetch ptid from thread.
7481 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7482 Simplify call to regcache_invalidate_thread.
7483 (delete_lwp_callback): Update, "entry" parameter is a
7484 struct thread_info * now. Fetch pid from thread.
7485 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7486 (status_pending_p_callback): Update, "entry" parameter is a
7487 struct thread_info * now. Fetch ptid from thread.
7488 (find_lwp_pid): Update, "entry" parameter is a
7489 struct thread_info * now.
7490 (linux_wait_for_lwp): Fetch pid from thread.
7491 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7492 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7493 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7494 (dequeue_one_deferred_signal): Ditto.
7495 (cancel_breakpoint): Fetch ptid from current_inferior.
7496 (linux_wait_for_event): Pass &all_threads to find_inferior,
7497 not &all_lwps. Fetch ptid, lwpid from thread.
7498 (count_events_callback): Update, "entry" parameter is a
7499 struct thread_info * now.
7500 (select_singlestep_lwp_callback): Ditto.
7501 (select_event_lwp_callback): Ditto.
7502 (cancel_breakpoints_callback): Ditto.
7503 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7505 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7506 (unsuspend_one_lwp): Update, "entry" parameter is a
7507 struct thread_info * now.
7508 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7510 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7511 Fetch lwpid from thread, not lwp.
7512 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7513 Pass &all_threads to find_inferior, not &all_lwps.
7514 (send_sigstop): Fetch lwpid from thread, not lwp.
7515 (send_sigstop_callback): Update, "entry" parameter is a
7516 struct thread_info * now.
7517 (suspend_and_send_sigstop_callback): Ditto.
7518 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7519 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7520 struct thread_info * now.
7521 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7523 (lwp_running): Update, "entry" parameter is a
7524 struct thread_info * now.
7525 (stop_all_lwps): Fetch ptid from thread.
7526 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7527 (linux_resume_one_lwp): Fetch lwpid from thread.
7528 (linux_set_resume_request): Update, "entry" parameter is a
7529 struct thread_info * now. Fetch pid, lwpid from thread.
7530 (resume_status_pending_p): Update, "entry" parameter is a
7531 struct thread_info * now.
7532 (need_step_over_p): Ditto. Fetch lwpid from thread.
7533 (start_step_over): Fetch lwpid from thread.
7534 (linux_resume_one_thread): Update, "entry" parameter is a
7535 struct thread_info * now. Fetch lwpid from thread.
7536 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7537 (proceed_one_lwp): Update, "entry" parameter is a
7538 struct thread_info * now. Fetch lwpid from thread.
7539 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7540 struct thread_info * now.
7541 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7542 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7543 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7545 (regsets_store_inferior_registers): Ditto.
7546 (fetch_register, store_register): Ditto.
7547 (linux_read_memory, linux_write_memory): Ditto.
7548 (linux_request_interrupt): Ditto.
7549 (linux_read_auxv): Ditto.
7550 (linux_xfer_siginfo): Ditto.
7551 (linux_qxfer_spu): Ditto.
7552 (linux_qxfer_libraries_svr4): Ditto.
7553 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7554 moved to inferiors.h.
7556 (get_thread_lwp): Update.
7557 (struct lwp_info): Delete member "entry". Simplify comment for
7560 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7561 current_inferior directly.
7562 (update_watch_registers_callback): Update, "entry" parameter is a
7563 struct thread_info * now. Fetch pid from thread.
7564 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7565 (mips_insert_point): Fetch lwpid from current_inferior.
7566 Pass &all_threads to find_inferior, not &all_lwps.
7567 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7568 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7570 (mips_stopped_data_address): Ditto.
7571 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7573 * linux-tile-low.c (tile_arch_setup): Ditto.
7574 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7575 (update_debug_registers_callback): Update, "entry" parameter is a
7576 struct thread_info * now. Fetch pid from thread.
7577 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7578 Pass &all_threads to find_inferior, not &all_lwps.
7579 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7580 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7581 Pass &all_threads to find_inferior, not &all_lwps.
7582 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7583 (i386_dr_low_get_status): Ditto.
7584 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7585 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7586 (x86_linux_read_description): Ditto.
7587 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7589 2014-02-20 Doug Evans <dje@google.com>
7591 * inferiors.c (get_first_inferior): Fix buglet.
7593 2014-02-19 Doug Evans <dje@google.com>
7595 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7596 * inferiors.c (add_thread): Change result type to struct thread_info *.
7597 All callers updated.
7598 (add_lwp): Call add_thread here instead of in callers.
7599 All callers updated.
7600 * linux-low.h (get_lwp_thread): Rewrite.
7601 (struct lwp_info): New member "thread".
7603 2014-02-19 Doug Evans <dje@google.com>
7605 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7606 All callers updated.
7608 2014-02-19 Doug Evans <dje@google.com>
7610 * inferiors.c (add_thread): Fix whitespace.
7612 2014-02-19 Doug Evans <dje@google.com>
7614 * dll.c (clear_dlls): Replace accessing list implemention details
7616 * gdbthread.h (get_first_thread): Declare.
7617 * inferiors.c (for_each_inferior_with_data): New function.
7618 (get_first_thread): New function.
7619 (find_thread_ptid): Simplify.
7620 (get_first_inferior): New function.
7621 (clear_list): Delete.
7622 (one_inferior_p): New function.
7623 (clear_inferior_list): New function.
7624 (clear_inferiors): Update.
7625 * inferiors.h (for_each_inferior_with_data): Declare.
7626 (clear_inferior_list): Declare.
7627 (one_inferior_p): Declare.
7628 (get_first_inferior): Declare.
7629 * linux-low.c (linux_wait_for_event): Replace accessing list
7630 implemention details with API function.
7631 * server.c (target_running): Ditto.
7632 (accumulate_file_name_length): New function.
7633 (emit_dll_description): New function.
7634 (handle_qxfer_libraries): Replace accessing list implemention
7635 details with API function.
7636 (handle_qxfer_threads_worker): New function.
7637 (handle_qxfer_threads_proper): Replace accessing list implemention
7638 details with API function.
7639 (handle_query): Ditto.
7640 (visit_actioned_threads_callback_ftype): New typedef.
7641 (visit_actioned_threads_data): New struct.
7642 (visit_actioned_threads): Rewrite to be find_inferior callback.
7643 (resume): Call find_inferior.
7644 (handle_status): Replace accessing list implemention
7645 details with API function.
7646 (process_serial_event): Replace accessing list implemention details
7648 * target.c (set_desired_inferior): Replace accessing list implemention
7649 details with API function.
7650 * tracepoint.c (same_process_p): New function.
7651 (gdb_agent_about_to_close): Replace accessing list implemention
7652 details with API function.
7653 * win32-low.c (child_delete_thread): Replace accessing list
7654 implemention details with API function.
7655 (match_dll_by_basename): New function.
7656 (dll_is_loaded_by_basename): New function.
7657 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7658 details call to dll_is_loaded_by_basename.
7660 2014-02-19 Doug Evans <dje@google.com>
7662 * dll.h (struct dll_info): Add comment.
7663 * gdbthread.h (struct thread_info): Add comment.
7664 (current_ptid): Simplify.
7665 * inferiors.c (add_process): Update.
7666 (remove_process): Update.
7667 * inferiors.h (struct process_info): Rename member "head" to "entry".
7668 * linux-low.c (delete_lwp): Update.
7670 (last_thread_of_process_p): Update.
7671 (kill_one_lwp_callback, linux_kill): Update.
7672 (status_pending_p_callback): Update.
7673 (wait_for_sigstop): Update. Simplify read of ptid.
7674 (start_step_over): Update.
7675 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7676 (get_lwp_thread): Update.
7677 (struct lwp_info): Rename member "head" to "entry".
7678 * regcache.h (inferior_list_entry): Delete.
7679 * server.c (kill_inferior_callback): Update.
7680 (detach_or_kill_inferior_callback): Update.
7681 (print_started_pid): Update.
7682 (print_attached_pid): Update.
7683 (process_serial_event): Simplify read of ptid.
7684 * thread-db.c (thread_db_create_event): Update.
7685 (thread_db_get_tls_address): Update.
7686 * win32-low.c (current_inferior_ptid): Simplify.
7688 2014-02-19 Tom Tromey <tromey@redhat.com>
7690 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7692 (target_supports_btrace): Update.
7694 2014-02-14 Yao Qi <yao@codesourcery.com>
7696 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7697 (rsp-low-ipa.o): New target.
7699 2014-02-12 Tom Tromey <tromey@redhat.com>
7701 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7702 convert_ascii_to_int.
7703 * regcache.c (registers_to_string): Likewise.
7704 * remote-utils.c (decode_M_packet): Likewise.
7705 * server.c (process_serial_event): Likewise.
7707 2014-02-12 Tom Tromey <tromey@redhat.com>
7709 * server.c (handle_query, handle_v_run): Use hex2bin, not
7711 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7713 2014-02-12 Tom Tromey <tromey@redhat.com>
7715 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7716 convert_int_to_ascii.
7717 * regcache.c (registers_to_string, collect_register_as_string):
7719 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7721 * server.c (process_serial_event): Likewise.
7722 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7723 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7725 2014-02-12 Tom Tromey <tromey@redhat.com>
7727 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7728 bin2hex, not hexify.
7729 * tracepoint.c (cmd_qtstatus): Likewise.
7731 2014-02-12 Tom Tromey <tromey@redhat.com>
7733 * remote-utils.c (monitor_output): Pass explicit length to
7736 2014-02-12 Tom Tromey <tromey@redhat.com>
7738 * tracepoint.c: Include rsp-low.h.
7739 * server.c: Include rsp-low.h.
7740 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7741 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7743 * remote-utils.c: Include rsp-low.h.
7744 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7745 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7746 (convert_int_to_ascii, convert_ascii_to_int): Move to
7748 * regcache.c: Include rsp-low.h.
7749 * ax.c: Include rsp-low.h.
7750 * Makefile.in (SFILES): Add common/rsp-low.c.
7751 (OBS): Add rsp-low.o.
7752 (rsp-low.o): New target.
7754 2014-02-12 Tom Tromey <tromey@redhat.com>
7756 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7757 Include print-utils.h.
7758 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7759 (plongest, thirty_two, phex_nz): Remove.
7760 * Makefile.in (SFILES): Add common/print-utils.c.
7761 (OBS): Add print-utils.o.
7762 (print-utils-ipa.o): New target.
7763 (print-utils.o): New target.
7764 (IPA_OBJS): Add print-utils-ipa.o.
7766 2014-02-06 Tom Tromey <tromey@redhat.com>
7768 * Makefile.in (SFILES): Fix indentation.
7770 2014-02-05 Doug Evans <dje@google.com>
7772 * linux-low.c (linux_wait_for_event): Improve comment.
7773 (linux_wait_1): Keep current_inferior in sync with event_child.
7775 2014-01-22 Doug Evans <dje@google.com>
7777 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7779 2014-01-22 Doug Evans <dje@google.com>
7781 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7782 * configure: Regenerate.
7783 * config.in: Regenerate.
7784 * Makefile.in (SFILES): Add debug.c.
7786 * debug.c: New file.
7787 * debug.h: New file.
7788 * linux-aarch64-low.c (*): Update all debugging printfs to use
7789 debug_printf instead of fprintf.
7790 * linux-arm-low.c (*): Ditto.
7791 * linux-cris-low.c (*): Ditto.
7792 * linux-crisv32-low.c (*): Ditto.
7793 * linux-m32r-low.c (*): Ditto.
7794 * linux-sparc-low.c (*): Ditto.
7795 * linux-x86.c (*): Ditto.
7796 * linux-low.c (*): Ditto.
7797 (linux_wait_1): Add calls to debug_enter, debug_exit.
7798 (linux_wait): Remove redundant debugging printf.
7799 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7800 (linux_resume, unstop_all_lwps): Ditto.
7801 * mem-break.c (*): Update all debugging printfs to use
7802 debug_printf instead of fprintf.
7803 * remote-utils.c (*): Ditto.
7804 * thread-db.c (*): Ditto.
7805 * server.c #include <ctype.h>, "gdb_vecs.h".
7806 (debug_threads): Moved to debug.c.
7807 (*): Update all debugging printfs to use debug_printf instead of
7809 (start_inferior): Replace call to fflush with call to debug_flush.
7810 (monitor_show_help): Mention set debug-format.
7811 (parse_debug_format_options): New function.
7812 (handle_monitor_command): Handle "monitor set debug-format".
7813 (gdbserver_usage): Mention --debug-format.
7814 (main): Parse --debug-format.
7815 * server.h (debug_threads): Declaration moved to debug.h.
7817 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7818 trace_debug_1 that uses debug_printf.
7819 (tracepoint_look_up_symbols): Update all debugging printfs to use
7820 debug_printf instead of fprintf.
7822 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7824 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7827 2014-01-17 Pedro Alves <palves@redhat.com>
7830 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7831 defined after including gdb_proc_service.h.
7833 2014-01-16 Doug Evans <dje@google.com>
7835 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7836 (match_dll): Use it.
7838 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7840 * target.h (target_ops) <read_btrace>: Change parameters and
7841 return type to allow error reporting.
7842 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7843 trace reading errors on.
7844 * linux-low.c (linux_low_read_btrace): Pass trace reading
7846 (linux_low_disable_btrace): New.
7848 2014-01-15 Doug Evans <dje@google.com>
7850 * inferiors.c (thread_id_to_gdb_id): Delete.
7851 * inferiors.h (thread_id_to_gdb_id): Delete.
7853 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7855 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7856 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7859 2014-01-08 Pedro Alves <palves@redhat.com>
7861 * server.c (handle_status): Don't discard previous queued stop
7862 replies or thread's pending status here.
7863 (main) <disconnection>: Do it here instead.
7865 2014-01-08 Pedro Alves <palves@redhat.com>
7867 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7868 * server.c (visit_actioned_threads, handle_pending_status): New
7870 (handle_v_cont): Factor out parts to ...
7871 (resume): ... this new function. If in all-stop, and a thread
7872 being resumed has a pending status, report it without actually
7874 (myresume): Adjust to use the new 'resume' function.
7875 (clear_pending_status_callback, set_pending_status_callback)
7876 (find_status_pending_thread_callback): New functions.
7877 (handle_status): Handle the case of multiple threads having
7878 interesting statuses to report. Report threads' real last signal
7879 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7880 with an interesting thread to report the status for, instead of
7881 always reporting the status of the first thread.
7883 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7885 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7886 * gdbreplay.c (gdbreplay_version): Likewise.
7888 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7890 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7891 iov.iov_len with the real length in use.
7893 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7895 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7896 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7897 for all targets that use win32-low.c.
7898 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7899 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7901 2013-12-13 Pedro Alves <palves@redhat.com>
7903 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7904 if equal to TARGET_WAITKIND_LOADED.
7905 * win32-low.c (cached_status): New static global.
7906 (win32_wait): Add declaration.
7907 (do_initial_child_stuff): Flush all initial pending debug events
7908 up to the initial breakpoint.
7909 (win32_wait): If CACHED_STATUS was set, return that instead
7910 of doing a real wait. Remove the code resuming the execution
7911 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7912 during the initial phase. Also remove the code changing
7913 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7914 TARGET_WAITKIND_STOPPED.
7916 2013-12-11 Yao Qi <yao@codesourcery.com>
7918 * notif.c (handle_notif_ack): Return 0 if no notification
7921 2013-11-20 Doug Evans <dje@google.com>
7923 * linux-low.c (linux_set_resume_request): Fix comment.
7925 2013-11-20 Doug Evans <dje@google.com>
7927 * linux-low.c (resume_status_pending_p): Tweak comment.
7929 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7931 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7932 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7933 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7934 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7935 (srv_amd64_regobj): Add amd64-mpx.o.
7936 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7937 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7938 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7939 * i387-fp.c (num_pl_bnd_register) Added constant.
7940 (num_pl_bnd_cfg_registers) Added constant.
7941 (struct i387_xsave) Added reserved area and MPX fields.
7942 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7943 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7945 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7946 (init_registers_amd64_mpx_linux): Declare new function.
7947 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7948 (x86_64_regmap): Add MPX registers.
7949 (x86_linux_read_description): Add MPX case.
7950 (initialize_low_arch): Initialize MPX targets.
7952 2013-11-18 Tom Tromey <tromey@redhat.com>
7954 * configure: Rebuild.
7955 * configure.ac: Don't check for stdlib.h.
7956 * gdbreplay.c: Unconditionally include stdlib.h.
7958 2013-11-18 Tom Tromey <tromey@redhat.com>
7960 * config.in: Rebuild.
7961 * configure: Rebuild.
7962 * configure.ac: Don't use AC_HEADER_DIRENT.
7964 2013-11-18 Tom Tromey <tromey@redhat.com>
7966 * server.h: Don't check HAVE_STRING_H.
7967 * gdbreplay.c: Don't check HAVE_STRING_H.
7968 * configure: Rebuild.
7970 2013-11-18 Tom Tromey <tromey@redhat.com>
7972 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7975 2013-11-08 Tom Tromey <tromey@redhat.com>
7977 * configure, config.in: Rebuild.
7978 * configure.ac: Remove unused configury.
7980 2013-11-08 Tom Tromey <tromey@redhat.com>
7982 * acinclude.m4: Include common.m4, codeset.m4.
7983 * configure, config.in: Rebuild.
7984 * configure.ac: Use GDB_AC_COMMON.
7986 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7988 * linux-s390-low.c (HWCAP_S390_TE): New define.
7989 (s390_arch_setup): Consider the TE field in the HWCAP for
7990 determining 'have_regset_tdb'.
7992 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7995 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7998 2013-10-02 Pedro Alves <palves@redhat.com>
8000 * server.c (process_serial_event): Don't output "GDBserver
8001 exiting" if GDB is connected through stdio.
8002 * target.c (mywait): Likewise, be silent if GDB is connected
8005 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8007 * lynx-low.c (lynx_add_threads_after_attach): New function.
8008 (lynx_attach): Remove call to add_thread. Add call to
8009 lynx_add_threads_after_attach instead.
8011 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8013 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8014 * config.in, configure: Regenerated.
8016 2013-09-18 Yao Qi <yao@codesourcery.com>
8019 * server.c (start_inferior): Clear 'resume_info'.
8021 2013-09-16 Jiong Wang <jiwang@tilera.com>
8023 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8026 2013-09-16 Jiong Wang <jiwang@tilera.com>
8028 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8029 linux-tile-low.o to srv_tgtobj.
8031 2013-09-16 Will Newton <will.newton@linaro.org>
8033 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8036 2013-09-06 Pedro Alves <palves@redhat.com>
8038 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8039 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8040 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8041 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8042 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8043 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8045 2013-09-06 Pedro Alves <palves@redhat.com>
8047 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8048 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8050 2013-09-06 Pedro Alves <palves@redhat.com>
8052 * linux-amd64-ipa.c: Include tracepoint.h.
8053 * linux-i386-ipa.c: Include tracepoint.h.
8055 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8057 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8058 (ps_get_thread_area): New function.
8060 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8062 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8063 (initialize_low_arch): Call init_registers_crisv32 rather than
8064 init_register_crisv32.
8066 2013-09-05 Pedro Alves <palves@redhat.com>
8068 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8070 * hostio.h: ... this new file.
8071 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8072 win32-low.c: Include hostio.h.
8074 2013-09-05 Pedro Alves <palves@redhat.com>
8076 * server.h (gdb_client_data, handler_func, callback_handler_func)
8077 (delete_file_handler, add_file_handler, append_callback_event)
8078 (delete_callback_event, start_event_loop, initialize_event_loop):
8079 Move to event-loop.h and include it.
8080 * event-loop.h: New file.
8082 2013-09-05 Pedro Alves <palves@redhat.com>
8084 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8085 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8086 (loaded_dll, unloaded_dll): Move to ...
8087 * dll.h: ... this new file.
8088 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8090 2013-09-05 Pedro Alves <palves@redhat.com>
8092 * server.h (current_process, get_thread_process, all_processes)
8093 (add_inferior_to_list, for_each_inferior, current_inferior)
8094 (remove_inferior, add_process, remove_process, find_process_pid)
8095 (have_started_inferiors_p, have_attached_inferiors_p)
8096 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8097 (clear_inferiors, find_inferior, find_inferior_id)
8098 (inferior_target_data, set_inferior_target_data)
8099 (inferior_regcache_data, set_inferior_regcache_data): Move to
8100 inferiors.h, and include it.
8101 * inferiors.h: New file.
8103 2013-09-05 Pedro Alves <palves@redhat.com>
8105 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8109 2013-09-05 Pedro Alves <palves@redhat.com>
8111 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8113 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8114 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8115 (handle_tracepoint_general_set, handle_tracepoint_query)
8116 (tracepoint_finished_step, tracepoint_was_hit)
8117 (release_while_stepping_state_list, current_traceframe)
8118 (in_readonly_region, traceframe_read_mem)
8119 (fetch_traceframe_registers, traceframe_read_sdata)
8120 (traceframe_read_info, struct fast_tpoint_collect_status)
8121 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8122 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8123 (supply_fast_tracepoint_registers)
8124 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8125 (ipa_tdesc, claim_trampoline_space)
8126 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8127 (agent_mem_read, agent_get_trace_state_variable_value)
8128 (agent_set_trace_state_variable_value, agent_tsv_read)
8129 (agent_mem_read_string, get_raw_reg_func_addr)
8130 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8131 * tracepoint.h: ... this new file.
8133 2013-09-05 Pedro Alves <palves@redhat.com>
8135 * server.h (perror_with_name, error, fatal, warning, paddress)
8136 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8138 * utils.h: New file.
8140 2013-09-05 Pedro Alves <palves@redhat.com>
8142 * server.h (remote_debug, noack_mode, transport_is_reliable)
8143 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8144 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8145 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8146 (write_enn, initialize_async_io, enable_async_io)
8147 (disable_async_io, check_remote_input_interrupt_request)
8148 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8149 (dead_thread_notify, prepare_resume_reply)
8150 (decode_address_to_semicolon, decode_address, decode_m_packet)
8151 (decode_M_packet, decode_X_packet, decode_xfer_write)
8152 (decode_search_memory_packet, unhexify, hexify)
8153 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8154 (look_up_one_symbol, relocate_instruction)
8155 (monitor_output): Move to remote-utils.h, and include it.
8156 * remote-utils.h: New file.
8158 2013-09-05 Pedro Alves <palves@redhat.com>
8160 * server.h (_): Delete.
8162 2013-09-02 Pedro Alves <palves@redhat.com>
8164 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8165 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8167 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8169 2013-09-02 Pierre Muller <muller@sourceware.org>
8171 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8172 or WriteProcessMemory complete successfully and handle
8173 ERROR_PARTIAL_COPY error.
8175 2013-09-02 Pedro Alves <palves@redhat.com>
8177 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8178 error instead of EIO.
8180 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8183 * linux-low.c: Include filestuff.h.
8184 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8185 * lynx-low.c: Include filestuff.h.
8186 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8187 * server.c: Include filestuff.h.
8188 (main): Call notice_open_fds.
8189 * spu-low.c: Include filestuff.h.
8190 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8192 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8194 * Makefile.in: Explain why ../target and ../nat are not
8195 listed as include file search paths.
8196 (linux-waitpid.o): New object file rule.
8197 * configure.srv (srv_native_linux_obj): New variable.
8198 Replace all occurrences of linux native object files with
8199 $srv_native_linux_obj.
8200 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8201 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8202 (linux_enable_event_reporting): Remove declaration.
8203 (my_waitpid): Moved to common/linux-waitpid.c.
8204 (linux_wait_for_event): Pass ptid when calling
8205 linux_enable_event_reporting.
8206 (linux_supports_tracefork_flag): Remove.
8207 (linux_enable_event_reporting): Likewise.
8208 (linux_tracefork_grandchild): Remove.
8209 (STACK_SIZE): Moved to common/linux-ptrace.c.
8210 (linux_tracefork_child): Remove.
8211 (linux_test_for_tracefork): Remove.
8212 (linux_look_up_symbols): Call linux_supports_traceclone.
8213 (initialize_low): Remove call to linux_test_for_tracefork.
8214 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8215 common/linux-ptrace.h.
8216 (PTRACE_TYPE_ARG4): Likewise.
8217 Include linux-ptrace.h.
8219 2013-08-21 Pedro Alves <palves@redhat.com>
8221 * config.in: Renegerate.
8223 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8225 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8226 (SFILES): Remove $(srcdir)/common/target-common.c and
8227 add $(srcdir)/target/waitstatus.c.
8228 (OBS): Remove target-common.o and add waitstatus.o.
8229 (server_h): Remove $(srcdir)/../common/target-common.h and
8230 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8231 and $(srcdir)/../target/waitstatus.h.
8232 (target-common.o): Remove.
8233 (waitstatus.o): New target object file.
8234 * target.h: Do not include target-common.h and
8235 include target/resume.h, target/wait.h and
8236 target/waitstatus.h.
8238 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8240 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8241 to PTRACE_TYPE_ARG3.
8242 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8243 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8245 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8246 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8248 2013-07-27 Jie Zhang <jie@codesourcery.com>
8249 Daniel Jacobowitz <dan@codesourcery.com>
8250 Yao Qi <yao@codesourcery.com>
8252 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8253 (mips-linux-watch.o): New rule.
8254 (mips_linux_watch_h): New variable.
8255 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8257 * linux-mips-low.c: Include mips-linux-watch.h.
8258 (struct arch_process_info, struct arch_lwp_info): New.
8259 (update_watch_registers_callback): New function.
8260 (mips_linux_new_process, mips_linux_new_thread) New functions.
8261 (mips_linux_prepare_to_resume, mips_insert_point): New
8263 (mips_remove_point, mips_stopped_by_watchpoint): New
8265 (rsp_bp_type_to_target_hw_bp_type): New function.
8266 (mips_stopped_data_address): New function.
8267 (the_low_target): Add watchpoint support functions.
8269 2013-07-27 Yao Qi <yao@codesourcery.com>
8271 * i386-low.c: Include break-common.h.
8272 (enum target_hw_bp_type): Remove.
8274 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8276 * Makefile.in (SFILES): /common/target-common.c.
8277 (OBS): Add target-common.o.
8278 (server_h): Add $(srcdir)/../common/target-common.h.
8279 (target-common.o): New target.
8280 * server.c (queue_stop_reply_callback): Free
8281 status string after use.
8282 * target.c (target_waitstatus_to_string): Remove.
8283 * target.h: Include target-common.h.
8284 (resume_kind): Likewise.
8285 (target_waitkind): Likewise.
8286 (target_waitstatus): Likewise.
8287 (TARGET_WNOHANG): Likewise.
8289 2013-07-04 Yao Qi <yao@codesourcery.com>
8291 * Makefile.in (host_alias): Use @host_noncanonical@.
8292 (target_alias): Use @target_noncanonical@.
8293 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8294 ACX_NONCANONICAL_HOST.
8295 * configure: Regenerated.
8298 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8300 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8301 * configure: Rebuild.
8302 * Makefile.in (version_host, version_target): Get from configure.
8303 (version.c): Use $(version_host) and $(version_target).
8305 2013-07-03 Pedro Alves <palves@redhat.com>
8307 * Makefile.in (config.status): Depend on development.sh.
8308 * acinclude.m4: Include libmcheck.m4.
8309 * configure: Regenerate.
8311 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8313 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8314 attribute inside the parentheses.
8315 (winapi_DebugSetProcessKillOnExit): Ditto.
8316 (winapi_DebugBreakProcess): Ditto.
8317 (winapi_GenerateConsoleCtrlEvent): Ditto.
8319 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8321 * notif.h (notif_event): Add a dummy member to avoid compiler
8324 2013-07-01 Pedro Alves <palves@redhat.com>
8326 * hostio.c (HOSTIO_PATH_MAX): Define.
8327 (require_filename, handle_open, handle_unlink, handle_readlink):
8330 2013-07-01 Pedro Alves <palves@redhat.com>
8332 * server.h: Include "pathmax.h".
8333 * linux-low.c: Don't include sys/param.h.
8334 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8336 * win32-low.c: Don't include sys/param.h.
8337 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8339 2013-07-01 Pedro Alves <palves@redhat.com>
8341 * event-loop.c: Don't check HAVE_UNISTD_H before including
8343 * gdbreplay.c: Likewise.
8344 * remote-utils.c: Likewise.
8345 * server.c: Likewise.
8346 * configure.ac: Don't check for unistd.h.
8347 * configure: Regenerate.
8349 2013-06-28 Tom Tromey <tromey@redhat.com>
8351 * Makefile.in (version.c): Use version.in, not
8354 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8356 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8357 * configure: Rebuild.
8358 * Makefile.in (version_host, version_target): Get from configure.
8359 (version.c): Use $(version_host) and $(version_target).
8361 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8363 Fix trace-status to output user name without trailing colon.
8364 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8366 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8368 Fix trace-status to output proper start-time and stop-time.
8369 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8370 output start time and stop time in hex as gdb expects.
8372 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8374 * tracepoint.c (build_traceframe_info_xml): Output trace state
8375 variables present in the trace buffer.
8377 2013-06-24 Tom Tromey <tromey@redhat.com>
8379 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8381 (version.o): Remove.
8382 * gdbreplay.c: Include version.h.
8383 (version, host_name): Don't declare.
8384 * server.h: Include version.h.
8385 (version, host_name): Don't declare.
8387 2013-06-12 Pedro Alves <palves@redhat.com>
8389 * linux-x86-low.c (linux_is_elf64): Delete global.
8390 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8391 with local linux_pid_exe_is_elf_64_file use.
8393 2013-06-11 Pedro Alves <palves@redhat.com>
8395 * linux-low.c (regset_disabled, disable_regset): New functions.
8396 (regsets_fetch_inferior_registers)
8397 (regsets_store_inferior_registers): Use them.
8398 (initialize_regsets_info); Don't allocate the disabled_regsets
8400 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8403 2013-06-11 Pedro Alves <palves@redhat.com>
8405 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8408 2013-06-11 Pedro Alves <palves@redhat.com>
8410 * linux-x86-low.c (initialize_low_arch): Call
8411 init_registers_x32_avx_linux.
8413 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8415 Fix compatibility with Android Bionic.
8416 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8419 2013-06-07 Pedro Alves <palves@redhat.com>
8422 * Makefile.in (OBS): Add tdesc.o.
8423 (IPA_OBJS): Add tdesc-ipa.o.
8424 (tdesc-ipa.o): New rule.
8425 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8427 * linux-low.c (new_inferior): Delete.
8428 (disabled_regsets, num_regsets): Delete.
8429 (linux_add_process): Adjust to set the new per-process
8431 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8432 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8433 was a stop. When calling arch_setup, switch the current inferior
8434 to the thread that got an event.
8435 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8436 (regsets_fetch_inferior_registers)
8437 (regsets_store_inferior_registers): New regsets_info parameter.
8439 (linux_register_in_regsets): New regs_info parameter. Adjust to
8441 (register_addr, fetch_register, store_register): New usrregs_info
8442 parameter. Adjust to use it.
8443 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8444 parameter regs_info. Adjust to use it.
8445 (linux_fetch_registers): Get the current inferior's regs_info, and
8447 (linux_store_registers): Ditto.
8448 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8449 (initialize_low): Don't initialize the target_regsets here. Call
8450 initialize_low_arch.
8451 * linux-low.h (target_regsets): Delete declaration.
8452 (struct regsets_info): New.
8453 (struct usrregs_info): New.
8454 (struct regs_info): New.
8455 (struct process_info_private) <new_inferior>: New field.
8456 (struct linux_target_ops): Delete the num_regs, regmap, and
8457 regset_bitmap fields. New field regs_info.
8458 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8459 * i387-fp.c (num_xmm_registers): Delete.
8460 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8461 calls to new interface.
8462 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8463 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8464 Infer the number of xmm registers from the regcache's target
8466 * i387-fp.h (num_xmm_registers): Delete.
8467 * inferiors.c (add_thread): Don't install the thread's regcache
8469 * proc-service.c (gregset_info): Fetch the current inferior's
8470 regs_info. Adjust to use it.
8471 * regcache.c: Include tdesc.h.
8472 (register_bytes, reg_defs, num_registers)
8473 (gdbserver_expedite_regs): Delete.
8474 (get_thread_regcache): If the thread doesn't have a regcache yet,
8475 create one, instead of aborting gdbserver.
8476 (regcache_invalidate_one): Rename to ...
8477 (regcache_invalidate_thread): ... this.
8478 (regcache_invalidate_one): New.
8479 (regcache_invalidate): Only invalidate registers of the current
8481 (init_register_cache): Add target_desc parameter, and use it.
8482 (new_register_cache): Ditto. Assert the target description has a
8483 non zero registers_size.
8484 (regcache_cpy): Add assertions. Adjust.
8485 (realloc_register_cache, set_register_cache): Delete.
8486 (registers_to_string, registers_from_string): Adjust.
8487 (find_register_by_name, find_regno, find_register_by_number)
8488 (register_cache_size): Add target_desc parameter, and use it.
8489 (free_register_cache_thread, free_register_cache_thread_one)
8490 (regcache_release, register_cache_size): New.
8491 (register_size): Add target_desc parameter, and use it.
8492 (register_data, supply_register, supply_register_zeroed)
8493 (supply_regblock, supply_register_by_name, collect_register)
8494 (collect_register_as_string, collect_register_by_name): Adjust.
8495 * regcache.h (struct target_desc): Forward declare.
8496 (struct regcache) <tdesc>: New field.
8497 (init_register_cache, new_register_cache): Add target_desc
8499 (regcache_invalidate_thread): Declare.
8500 (regcache_invalidate_one): Delete declaration.
8501 (regcache_release): Declare.
8502 (find_register_by_number, register_cache_size, register_size)
8503 (find_regno): Add target_desc parameter.
8504 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8506 * remote-utils.c: Include tdesc.h.
8507 (outreg, prepare_resume_reply): Adjust.
8508 * server.c: Include tdesc.h.
8509 (gdbserver_xmltarget): Delete declaration.
8510 (get_features_xml, process_serial_event): Adjust.
8511 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8513 (struct process_info) <tdesc>: New field.
8514 (ipa_tdesc): Declare.
8515 * tdesc.c: New file.
8516 * tdesc.h: New file.
8517 * tracepoint.c: Include tdesc.h.
8518 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8519 (get_context_regcache): Adjust to pass ipa_tdesc down.
8520 (do_action_at_tracepoint): Adjust to get the register cache size
8521 from the context regcache's description.
8522 (traceframe_walk_blocks): Adjust to get the register cache size
8523 from the current trace frame's description.
8524 (traceframe_get_pc): Adjust to get current trace frame's
8525 description and pass it down.
8526 (gdb_collect): Adjust to get the register cache size from the
8528 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8529 (gdbserver_xmltarget): Delete.
8530 (initialize_low_tracepoint): Set the ipa's target description.
8531 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8532 (initialize_low_tracepoint): Set the ipa's target description.
8533 * linux-x86-low.c: Include tdesc.h.
8534 [__x86_64__] (is_64bit_tdesc): New.
8535 (ps_get_thread_area, x86_get_thread_area): Use it.
8536 (i386_cannot_store_register): Rename to ...
8537 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8538 (i386_cannot_fetch_register): Rename to ...
8539 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8540 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8542 (target_regsets): Rename to ...
8543 (x86_regsets): ... this.
8544 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8546 (x86_siginfo_fixup): Use is_64bit_tdesc.
8547 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8548 (tdesc_x32_avx_linux, tdesc_x32_linux)
8549 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8551 (x86_linux_update_xmltarget): Delete.
8552 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8553 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8554 (AMD64_LINUX_USER64_CS): New.
8555 (x86_linux_read_description): New, based on
8556 x86_linux_update_xmltarget.
8557 (same_process_callback): New.
8558 (x86_arch_setup_process_callback): New.
8559 (x86_linux_update_xmltarget): New.
8560 (x86_regsets_info): New.
8561 (amd64_linux_regs_info): New.
8562 (i386_linux_usrregs_info): New.
8563 (i386_linux_regs_info): New.
8564 (x86_linux_regs_info): New.
8565 (x86_arch_setup): Reimplement.
8566 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8567 (x86_emit_ops): Ditto.
8568 (the_low_target): Adjust. Install x86_linux_regs_info,
8569 x86_cannot_fetch_register, and x86_cannot_store_register.
8570 (initialize_low_arch): New.
8571 * linux-ia64-low.c (tdesc_ia64): Declare.
8572 (ia64_fetch_register): Adjust.
8573 (ia64_usrregs_info, regs_info): New globals.
8574 (ia64_regs_info): New function.
8575 (the_low_target): Adjust.
8576 (initialize_low_arch): New function.
8577 * linux-sparc-low.c (tdesc_sparc64): Declare.
8578 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8580 (sparc_arch_setup): New function.
8581 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8582 (the_low_target): Adjust.
8583 (initialize_low_arch): New function.
8584 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8585 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8586 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8587 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8588 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8589 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8590 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8591 (tdesc_powerpc_isa205_vsx64l): Declare.
8592 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8593 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8594 (ppc_set_pc, ppc_get_hwcap): Adjust.
8595 (ppc_usrregs_info): Forward declare.
8596 (!__powerpc64__) ppc_regmap_adjusted: New global.
8597 (ppc_arch_setup): Adjust to the current process'es target
8599 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8600 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8601 (ppc_store_evrregset): Adjust.
8602 (target_regsets): Rename to ...
8603 (ppc_regsets): ... this, and make static.
8604 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8605 (ppc_regs_info): New function.
8606 (the_low_target): Adjust.
8607 (initialize_low_arch): New function.
8608 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8609 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8610 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8611 (tdesc_s390x_linux64v2): Declare.
8612 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8613 (s390_fill_gregset, s390_store_last_break): Adjust.
8614 (target_regsets): Rename to ...
8615 (s390_regsets): ... this, and make static.
8616 (s390_get_pc, s390_set_pc): Adjust.
8617 (s390_get_hwcap): New target_desc parameter, and use it.
8618 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8619 (s390_arch_setup): Adjust to set the current process'es target
8620 description. Don't adjust the regmap.
8621 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8622 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8623 (regs_info_3264): New globals.
8624 (s390_regs_info): New function.
8625 (the_low_target): Adjust.
8626 (initialize_low_arch): New function.
8627 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8628 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8629 [__mips64] (init_registers_mips_linux)
8630 (init_registers_mips_dsp_linux): Delete defines.
8631 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8632 (have_dsp): New global.
8633 (mips_read_description): New, based on mips_arch_setup.
8634 (mips_arch_setup): Reimplement.
8635 (get_usrregs_info): New function.
8636 (mips_cannot_fetch_register, mips_cannot_store_register)
8637 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8638 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8639 (target_regsets): Rename to ...
8640 (mips_regsets): ... this, and make static.
8641 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8642 (dsp_regs_info, regs_info): New globals.
8643 (mips_regs_info): New function.
8644 (the_low_target): Adjust.
8645 (initialize_low_arch): New function.
8646 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8647 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8649 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8650 (arm_read_description): New, with bits factored from
8652 (arm_arch_setup): Reimplement.
8653 (target_regsets): Rename to ...
8654 (arm_regsets): ... this, and make static.
8655 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8656 (arm_regs_info): New function.
8657 (the_low_target): Adjust.
8658 (initialize_low_arch): New function.
8659 * linux-m68k-low.c (tdesc_m68k): Declare.
8660 (target_regsets): Rename to ...
8661 (m68k_regsets): ... this, and make static.
8662 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8663 (m68k_regs_info): New function.
8664 (m68k_arch_setup): New function.
8665 (the_low_target): Adjust.
8666 (initialize_low_arch): New function.
8667 * linux-sh-low.c (tdesc_sharch): Declare.
8668 (target_regsets): Rename to ...
8669 (sh_regsets): ... this, and make static.
8670 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8671 (sh_regs_info, sh_arch_setup): New functions.
8672 (the_low_target): Adjust.
8673 (initialize_low_arch): New function.
8674 * linux-bfin-low.c (tdesc_bfin): Declare.
8675 (bfin_arch_setup): New function.
8676 (bfin_usrregs_info, regs_info): New globals.
8677 (bfin_regs_info): New function.
8678 (the_low_target): Adjust.
8679 (initialize_low_arch): New function.
8680 * linux-cris-low.c (tdesc_cris): Declare.
8681 (cris_arch_setup): New function.
8682 (cris_usrregs_info, regs_info): New globals.
8683 (cris_regs_info): New function.
8684 (the_low_target): Adjust.
8685 (initialize_low_arch): New function.
8686 * linux-cris-low.c (tdesc_crisv32): Declare.
8687 (cris_arch_setup): New function.
8688 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8689 (cris_regs_info): New function.
8690 (the_low_target): Adjust.
8691 (initialize_low_arch): New function.
8692 * linux-m32r-low.c (tdesc_m32r): Declare.
8693 (m32r_arch_setup): New function.
8694 (m32r_usrregs_info, regs_info): New globals.
8695 (m32r_regs_info): Adjust.
8696 (initialize_low_arch): New function.
8697 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8698 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8699 (tic6x_usrregs_info): Forward declare.
8700 (tic6x_read_description): New function, based on ...
8701 (tic6x_arch_setup): ... this. Reimplement.
8702 (target_regsets): Rename to ...
8703 (tic6x_regsets): ... this, and make static.
8704 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8705 (tic6x_regs_info): New function.
8706 (the_low_target): Adjust.
8707 (initialize_low_arch): New function.
8708 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8709 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8710 (target_regsets): Rename to ...
8711 (xtensa_regsets): ... this, and make static.
8712 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8714 (xtensa_arch_setup, xtensa_regs_info): New functions.
8715 (the_low_target): Adjust.
8716 (initialize_low_arch): New function.
8717 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8718 (nios2_arch_setup): Set the current process'es tdesc.
8719 (target_regsets): Rename to ...
8720 (nios2_regsets): ... this.
8721 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8722 (nios2_regs_info): New function.
8723 (the_low_target): Adjust.
8724 (initialize_low_arch): New function.
8725 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8726 (aarch64_arch_setup): Set the current process'es tdesc.
8727 (target_regsets): Rename to ...
8728 (aarch64_regsets): ... this.
8729 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8730 (aarch64_regs_info): New function.
8731 (the_low_target): Adjust.
8732 (initialize_low_arch): New function.
8733 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8735 (target_regsets): Rename to ...
8736 (tile_regsets): ... this.
8737 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8738 (tile_regs_info): New function.
8739 (tile_arch_setup): Set the current process'es tdesc.
8740 (the_low_target): Adjust.
8741 (initialize_low_arch): New function.
8742 * spu-low.c (tdesc_spu): Declare.
8743 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8744 * win32-arm-low.c (tdesc_arm): Declare.
8745 (arm_arch_setup): New function.
8746 (the_low_target): Install arm_arch_setup instead of
8748 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8749 (init_windows_x86): Rename to ...
8750 (i386_arch_setup): ... this. Set `win32_tdesc'.
8751 (the_low_target): Adjust.
8752 * win32-low.c (win32_tdesc): New global.
8753 (child_add_thread): Don't create the thread cache here.
8754 (do_initial_child_stuff): Set the new process'es tdesc.
8755 * win32-low.h (struct target_desc): Forward declare.
8756 (win32_tdesc): Declare.
8757 * lynx-i386-low.c (tdesc_i386): Declare global.
8758 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8759 * lynx-low.c (lynx_tdesc): New global.
8760 (lynx_add_process): Set the new process'es tdesc.
8761 * lynx-low.h (struct target_desc): Forward declare.
8762 (lynx_tdesc): Declare global.
8763 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8764 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8765 * nto-low.c (nto_tdesc): New global.
8766 (do_attach): Set the new process'es tdesc.
8767 * nto-low.h (struct target_desc): Forward declare.
8768 (nto_tdesc): Declare.
8769 * nto-x86-low.c (tdesc_i386): Declare.
8770 (nto_x86_arch_setup): Set `nto_tdesc'.
8772 2013-06-04 Gary Benson <gbenson@redhat.com>
8774 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8775 to qSupported response when appropriate.
8776 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8777 with nonzero-length annex.
8778 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8779 arguments supplied in annex.
8781 2013-05-31 Doug Evans <dje@google.com>
8784 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8785 64 bits in 64-cross-32 environment.
8787 2013-05-28 Pedro Alves <palves@redhat.com>
8789 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8790 (aarch64-without-fpu.c): Delete rule.
8791 * configure.srv (aarch64*-*-linux*): Remove references to
8792 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8793 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8796 2013-05-24 Pedro Alves <palves@redhat.com>
8798 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8799 instead of strchr/decode_address. Error if the range isn't split
8800 with a ','. Don't assume there's be a ':' in the action.
8802 2013-05-23 Yao Qi <yao@codesourcery.com>
8803 Pedro Alves <palves@redhat.com>
8805 * linux-low.c (lwp_in_step_range): New function.
8806 (linux_wait_1): If the thread was range stepping and stopped
8807 outside the stepping range, report the stop to GDB. Otherwise,
8808 continue stepping. Add range stepping debug output.
8809 (linux_set_resume_request): Copy the step range from the resume
8811 (linux_supports_range_stepping): New.
8812 (linux_target_ops) <supports_range_stepping>: Set to
8813 linux_supports_range_stepping.
8814 * linux-low.h (struct linux_target_ops)
8815 <supports_range_stepping>: New field.
8816 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8817 * linux-x86-low.c (x86_supports_range_stepping): New.
8818 (the_low_target) <supports_range_stepping>: Set to
8819 x86_supports_range_stepping.
8820 * server.c (handle_v_cont): Handle 'r' action.
8821 (handle_v_requests): Append ";r" if the target supports range
8823 * target.h (struct thread_resume) <step_range_start,
8824 step_range_end>: New fields.
8825 (struct target_ops) <supports_range_stepping>:
8827 (target_supports_range_stepping): New macro.
8829 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8831 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8832 confusion in comment.
8834 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8836 * lynx-low.c (struct process_info_private): New type.
8837 (lynx_add_process): New function.
8838 (lynx_create_inferior, lynx_attach): Replace calls to
8839 add_process by calls to lynx_add_process.
8840 (lynx_resume): If PTID is null, then try using
8841 current_process()->private->last_wait_event_ptid.
8843 (lynx_clear_inferiors): Delete. The contents of that function
8844 has been inlined in lynx_mourn;
8845 (lynx_wait_1): Save the ptid in the process's private data.
8846 (lynx_mourn): Free the process' private data. Replace call
8847 to lynx_clear_inferiors by call to clear_inferiors.
8849 2013-05-17 Yao Qi <yao@codesourcery.com>
8851 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8854 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8856 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8857 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8858 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8859 PT_TEXT_END_ADDR guards. Update comments.
8860 (linux_target_op) <read_offsets>: Conditionally define to
8861 linux_read_offsets if the target is UCLIBC and if it defines
8862 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8864 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8865 Andrew Jenner <andrew@codesourcery.com>
8867 * Makefile.in (SFILES): Add linux-nios2-low.c.
8868 (clean): Add action to delete nios2-linux.c.
8869 (nios2-linux.c): New rule.
8870 * configure.srv: Add nios2*-*-linux*.
8871 * linux-nios2-low.c: New.
8873 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8875 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8877 2013-04-25 Hui Zhu <hui@codesourcery.com>
8880 * ax.c (ax_printf): Add fflush.
8882 2013-04-22 Tom Tromey <tromey@redhat.com>
8884 * Makefile.in (SFILES): Add filestuff.c.
8885 (OBS): Add filestuff.o.
8886 (filestuff.o): New target.
8887 * config.in, configure: Rebuild.
8888 * configure.ac: Check for fdwalk, pipe2.
8890 2013-04-17 Pedro Alves <palves@redhat.com>
8892 * configure.ac (USE_THREAD_DB): Delete variable.
8893 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8894 Don't AC_SUBST USE_THREAD_DB.
8895 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8896 * config.in, configure: Regenerate.
8898 2013-04-16 Pedro Alves <palves@redhat.com>
8900 * linux-low.h (struct lwp_info) <thread_known>: Move under
8901 the USE_THREAD_DB #ifdef.
8903 2013-04-16 Pedro Alves <palves@redhat.com>
8905 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8906 (linux-low.o): Delete rule.
8907 * linux-low.h: Always include "gdb_thread_db.h" instead of
8908 conditionally including thread_db.h.
8909 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8912 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8914 * Makefile.in (install-only): Fix make install regression.
8916 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8918 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8919 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8921 * gdbserver.1: Remove.
8923 2013-03-22 Pedro Alves <palves@redhat.com>
8925 * linux-low.c (handle_extended_wait): Don't call
8926 linux_enable_event_reporting.
8928 2013-03-15 Tony Theodore <tonyt@logyst.com>
8931 * Makefile.in (SHELL): Use @SHELL@.
8933 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8935 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8938 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8940 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8941 Remove extraneous NULL element.
8943 2013-03-13 Yao Qi <yao@codesourcery.com>
8945 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8946 'V' block in trace frame.
8948 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8950 * target.h (struct target_ops): Add btrace ops.
8951 (target_supports_btrace): New macro.
8952 (target_enable_btrace): New macro.
8953 (target_disable_btrace): New macro.
8954 (target_read_btrace): New macro.
8955 * gdbthread.h (struct thread_info): Add btrace field.
8956 * server.c: Include btrace-common.h.
8957 (handle_btrace_general_set): New function.
8958 (handle_btrace_enable): New function.
8959 (handle_btrace_disable): New function.
8960 (handle_general_set): Call handle_btrace_general_set.
8961 (handle_qxfer_btrace): New function.
8962 (struct qxfer qxfer_packets[]): Add btrace entry.
8963 * inferiors.c (remove_thread): Disable btrace.
8964 * linux-low: Include linux-btrace.h.
8965 (linux_low_enable_btrace): New function.
8966 (linux_low_read_btrace): New function.
8967 (linux_target_ops): Add btrace ops.
8968 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8969 Add srv_linux_btrace=yes.
8970 (x86_64-*-linux*): Add linux-btrace.o.
8971 Add srv_linux_btrace=yes.
8972 * configure.ac: Define HAVE_LINUX_BTRACE.
8973 * config.in: Regenerated.
8974 * configure: Regenerated.
8976 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8978 * server.c (handle_qxfer): Preserve error message if -3 is
8980 (qxfer): Document the -3 return value.
8982 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8984 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8985 (linux_btrace_h): New variable.
8986 (linux-btrace.o): New rule.
8988 2013-03-08 Stan Shebs <stan@codesourcery.com>
8989 Hafiz Abid Qadeer <abidh@codesourcery.com>
8991 * tracepoint.c (trace_buffer_size): New global.
8992 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8993 (init_trace_buffer): Change to one-argument function. Allocate
8994 trace buffer memory.
8995 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8996 handle QTBuffer:size packet.
8997 (cmd_bigqtbuffer_size): New function.
8998 (initialize_tracepoint): Call init_trace_buffer with
8999 DEFAULT_TRACE_BUFFER_SIZE.
9000 * server.c (handle_query): Add QTBuffer:size in the
9003 2013-03-07 Yao Qi <yao@codesourcery.com>
9005 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9006 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9008 (cmd_qtsp): Adjust condition. Do post increment.
9009 Set cur_action and cur_step_action back to 0.
9011 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9014 * linux-low.c (linux_write_memory): Return early success if LEN is
9017 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9019 * configure.srv: Add x86_64-*-cygwin* as target.
9021 2013-02-28 Tom Tromey <tromey@redhat.com>
9023 * configure.ac: Invoke AC_SYS_LARGEFILE.
9024 * configure, config.in: Rebuild.
9026 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9028 * win32-low.c: Throughout, fix format strings and casts of
9029 printf-like functions to avoid type related warnings on all
9031 (get_child_debug_event): Print dwDebugEventCode as hex since
9032 that's how it's usually documented.
9034 2013-02-28 Yao Qi <yao@codesourcery.com>
9036 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9039 2013-02-27 Jiong Wang <jiwang@tilera.com>
9041 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9042 (reg-tilegx32.c): New rule.
9043 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9044 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9045 different register info initializer according to elf class.
9046 (init_registers_tilgx32): New function. The tilegx32 register info
9048 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9049 (tile_store_gregset): Likewise.
9051 2013-02-27 Yao Qi <yao@codesourcery.com>
9053 * server.c (process_point_options): Print debug message when
9054 debug_threads is true.
9056 2013-02-26 Yao Qi <yao@codesourcery.com>
9058 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9060 2013-02-19 Pedro Alves <palves@redhat.com>
9061 Kai Tietz <ktietz@redhat.com>
9065 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9066 instead of strtoul to extract address from packet.
9067 (process_serial_event) <'z'>: Likewise.
9069 2013-02-18 Yao Qi <yao@codesourcery.com>
9071 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9073 2013-02-14 Pedro Alves <palves@redhat.com>
9077 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9078 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9080 2013-02-14 Pedro Alves <palves@redhat.com>
9082 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9084 2013-02-14 Pedro Alves <palves@redhat.com>
9086 * tracepoint.c (save_string): Delete.
9087 (add_tracepoint_action): Use savestring instead of save_string.
9089 2013-02-12 Pedro Alves <palves@redhat.com>
9091 * linux-xtensa-low.c: Ditto.
9092 * xtensa-xtregs.c: Ditto.
9094 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9096 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9099 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9101 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9102 aarch64_num_wp_regs and aarch64_num_bp_regs to
9103 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9105 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9107 * linux-aarch64-low.c (ps_get_thread_area): Replace
9108 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9110 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9111 Marcus Shawcroft <marcus.shawcroft@arm.com>
9112 Nigel Stephens <nigel.stephens@arm.com>
9113 Yufeng Zhang <yufeng.zhang@arm.com>
9115 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9116 (aarch64.c, aarch64-without-fpu.c): New targets.
9117 * configure.srv (aarch64*-*-linux*): New.
9118 * linux-aarch64-low.c: New file.
9120 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9122 * linux-low.c (handle_extended_wait, linux_create_inferior)
9123 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9124 (dequeue_one_deferred_signal, linux_resume_one_thread)
9125 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9126 (linux_tracefork_grandchild, linux_test_for_tracefork)
9127 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9128 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9129 where the argument is 0.
9131 2013-01-25 Yao Qi <yao@codesourcery.com>
9133 * event-loop.c: Include "queue.h".
9134 (gdb_event_p): New typedef.
9135 (struct gdb_event) <next_event>: Remove.
9136 (event_queue): Change to QUEUE(gdb_event_p).
9137 (async_queue_event): Remove.
9138 (gdb_event_xfree): New.
9139 (initialize_event_loop): New.
9140 (process_event): Use API from QUEUE.
9141 (wait_for_event): Likewise.
9142 * server.c (main): Call initialize_event_loop.
9143 * server.h (initialize_event_loop): Declare.
9145 2013-01-18 Yao Qi <yao@codesourcery.com>
9147 * ax.h (struct eval_agent_expr_context): New.
9148 (gdb_eval_agent_expr): Update declaration.
9149 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9150 TFRAME. Add new argument CTX.
9151 * server.h (struct eval_agent_expr_context): Declare.
9152 (agent_mem_read, agent_tsv_read): Update declaration.
9153 (agent_mem_read_string): Likewise.
9154 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9155 (add_traceframe_block): Add new argument TPOINT.
9156 Increase TPOINT->traceframe_usage.
9157 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9158 eval_tracepoint_agent_expr.
9159 (condition_true_at_tracepoint): Likewise.
9160 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9161 (agent_mem_read_string, agent_tsv_read): Likewise.
9163 2013-01-16 Yao Qi <yao@codesourcery.com>
9165 * linux-low.c (linux_resume_one_lwp): Don't check
9166 'lwp->bp_reinsert != 0'.
9168 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9169 Pedro Alves <palves@redhat.com>
9171 * lynx-low.c (ptrace_request_to_str): Define a temporary
9172 macro and use it to simplify this function's implementation.
9174 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9176 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9179 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9181 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9183 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9185 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9187 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9189 * lynx-low.c (lynx_resume): Use the resume_info parameter
9190 to determine the ptid for the lynx_ptrace call, unless
9191 it is equal to minus_one_ptid, in which case we use the
9192 ptid of the current_inferior.
9193 (lynx_wait_1): After having received a thread create/exit
9194 event, resume the inferior's execution using the signaling
9195 thread's ptid, rather than the old ptid.
9197 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9199 * lynx-low.c (lynx_resume): Delete variable ret.
9201 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9203 * gdbreplay.c (gdbreplay_version): Update copyright year.
9204 * server.c (gdbserver_version): Likewise.
9206 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9208 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9211 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9213 * lynx-low.c (ptrace_request_to_str): Add handling for
9216 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9218 * lynx-low.c (lynx_attach): Delete variable new_process.
9220 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9222 * lynx-low.c (lynx_create_inferior): Delete variable
9225 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9227 * lynx-low.c (ptrace_request_to_str): Do not handle
9228 PTRACE_GETTHREADLIST if this macro does not exist.
9230 2012-12-15 Yao Qi <yao@codesourcery.com>
9232 * Makefile.in (OBS): Add notif.o.
9233 * notif.c, notif.h: New.
9234 * server.c: Include "notif.h".
9235 (struct vstop_notif) <next>: Remove.
9237 (queue_stop_reply): Update.
9238 (push_event, send_next_stop_reply): Remove.
9239 (discard_queued_stop_replies): Update.
9240 (notif_stop): New variable.
9241 (handle_v_stopped): Remove.
9242 (handle_v_requests): Don't call handle_v_stopped. Call
9243 handle_ack_notif instead.
9244 (queue_stop_reply_callback): Call notif_event_enque instead
9245 of queue_stop_reply.
9246 (handle_status): Don't call send_next_stop_reply, call
9247 notif_write_event instead.
9248 (kill_inferior_callback): Likewise.
9249 (detach_or_kill_inferior_callback): Likewise.
9250 (main): Call initialize_notif.
9251 (process_serial_event): Call QUEUE_is_empty.
9252 (handle_target_event): Call notif_push instead of push event.
9253 * server.h (push_event): Remove declaration.
9255 2012-12-10 Tom Tromey <tromey@redhat.com>
9257 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9258 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9261 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9262 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9263 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9264 (amd64-linux-ipa.o, ax.o): Rewrite.
9265 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9266 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9267 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9268 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9269 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9270 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9271 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9272 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9273 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9274 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9275 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9276 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9277 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9278 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9279 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9280 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9281 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9282 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9283 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9284 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9285 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9286 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9287 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9288 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9289 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9290 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9291 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9292 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9293 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9294 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9295 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9296 (reg-tilegx.o): Remove.
9297 (all_object_files): New macro.
9298 Include .deps files.
9299 * aclocal.m4, configure: Rebuild.
9300 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9301 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9302 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9304 2012-12-05 Tom Tromey <tromey@redhat.com>
9307 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9309 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9311 * configure.ac: Check for linux/perf_event.h.
9312 * config.in: Regenerated.
9313 * configure: Regenerated.
9315 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9317 * hostio.c (handle_readlink): Decrease buffer size
9318 parameter passed to readlink by one byte.
9320 2012-11-26 Yao Qi <yao@codesourcery.com>
9322 * configure.ac (build_warnings): Append '-Wempty-body'.
9323 * configure: Regenerated.
9324 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9327 2012-11-15 Pierre Muller <muller@sourceware.org>
9329 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9330 * config.in: Regenerate.
9331 * configure: Regenerate.
9332 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9333 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9334 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9335 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9337 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9338 instead of <sys/wait.h> header.
9339 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9341 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9343 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9344 (various make rules): Remove -DGDBSERVER
9346 2012-11-09 Yao Qi <yao@codesourcery.com>
9348 * spu-low.c (current_ptid): Move it to ..
9349 * gdbthread.h: ... here. New.
9350 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9351 * server.c (myresume, process_serial_event): Likewise.
9352 * thread-db.c (thread_db_find_new_threads): Likewise.
9353 * tracepoint.c (run_inferior_command): Likewise.
9355 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9357 * server.c (handle_search_memory_1): Include access length in
9360 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9362 * linux-crisv32-low.c: Fix compile errors.
9364 2012-09-04 Yao Qi <yao@codesourcery.com>
9366 * tracepoint.c (cmd_qtsv): Adjust debug message.
9367 Don't check CUR_TPOINT.
9369 2012-08-28 Yao Qi <yao@codesourcery.com>
9371 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9372 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9373 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9374 Remove declarations of xmalloc, xreallloc, xstrdup and
9376 * Makefile.in (libiberty_h): New.
9377 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9378 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9380 2012-08-23 Yao Qi <yao@codesourcery.com>
9382 * server.h: Remove declaration of 'xsnprintf'.
9384 2012-08-22 Keith Seitz <keiths@redhat.com>
9386 * server.h: Include build-gnulib-gbserver/config.h.
9387 * gdbreplay.c: Likewise.
9389 2012-08-08 Doug Evans <dje@google.com>
9391 * Makefile.in (SFILES): Add gdb_vecs.c.
9392 (OBS): Add gdb_vecs.o.
9393 (gdb_vecs_h, host_defs_h): New variables.
9394 (thread-db.o): Add $(gdb_vecs_h) dependency.
9395 (gdb_vecs.o): New rule.
9396 * thread-db.c: #include "gdb_vecs.h".
9397 (thread_db_load_search): Use a vector to iterate over path elements.
9398 Handle text appearing after "$pdir".
9400 * configure.ac: Add check for strstr.
9401 * config.in: Regenerate.
9402 * configure: Regenerate.
9404 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9406 * hostio.c (handle_pread): If pread fails, fall back to attempting
9408 (handle_pwrite): Likewise for pwrite.
9410 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9412 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9413 between unsupported TYPE and unimplementable ADDR/LEN combination.
9414 (arm_insert_point): Act on new return value.
9416 2012-07-31 Pedro Alves <palves@redhat.com>
9418 * server.c (process_point_options): Only skip tokens if we find
9419 one that is unrecognized. Don't treat 'X' specially while
9420 skipping unrecognized tokens.
9422 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9424 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9425 to 4-byte-align HW breakpoint addresses for Thumb.
9427 2012-07-27 Yao Qi <yao@codesourcery.com>
9431 * server.h: Declare gdb_agent_about_to_close.
9432 * target.c (kill_inferior): Include "agent.h".
9433 New. Send command 'kill'.
9434 * target.h (kill_inferior): Removed macro.
9435 * tracepoint.c (gdb_agent_about_to_close): New.
9436 (gdb_agent_helper_thread): Handle command 'close'.
9437 Wait endlessly until the inferior stops.
9438 Install gdb_agent_remove_socket to atexit hook.
9439 (agent_socket_name): New static variable.
9440 (gdb_agent_socket_init): Replace local variable 'name' with
9441 'agent_socket_name'.
9442 (gdb_agent_remove_socket): New.
9444 2012-07-27 Yao Qi <yao@codesourcery.com>
9446 * server.c (process_point_options): Stop at 'X' when parsing.
9448 2012-07-19 Michael Eager <eager@eagercon.com>
9450 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9452 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9453 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9454 hardware breakpoint.
9456 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9458 * gdbserver/linux-low.c (initialize_low): Call
9459 linux_ptrace_init_warnings.
9461 2012-07-02 Doug Evans <dje@google.com>
9463 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9466 2012-07-02 Stan Shebs <stan@codesourcery.com>
9468 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9469 (ax.o): Add it to build rule.
9471 (OBS): Add format.o.
9472 (IPA_OBS): Add format.o.
9473 * server.c (handle_query): Claim support for breakpoint commands.
9474 (process_point_options): Add command case.
9475 (process_serial_event): Leave running if there are printfs in
9477 * mem-break.h (any_persistent_commands): Declare.
9478 (add_breakpoint_commands): Declare.
9479 (gdb_no_commands_at_breakpoint): Declare.
9480 (run_breakpoint_commands): Declare.
9481 * mem-break.c (struct point_command_list): New struct.
9482 (struct breakpoint): New field command_list.
9483 (any_persistent_commands): New function.
9484 (add_commands_to_breakpoint): New function.
9485 (add_breakpoint_commands): New function.
9486 (gdb_no_commands_at_breakpoint): New function.
9487 (run_breakpoint_commands): New function.
9488 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9490 * ax.c: Include format.h.
9491 (ax_printf): New function.
9492 (gdb_eval_agent_expr): Add printf opcode.
9494 2012-06-13 Yao Qi <yao@codesourcery.com>
9496 * server.c (start_inferior): Remove duplicated writes to fields
9497 'last_resume_kind' and 'last_status' of 'current_inferior'.
9499 2012-06-12 Yao Qi <yao@codesourcery.com>
9500 Pedro Alves <palves@redhat.com>
9502 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9504 * server.c (handle_v_cont): Extend comment.
9506 2012-06-11 Yao Qi <yao@codesourcery.com>
9508 * linux-low.c (linux_attach): Add 'static'.
9510 2012-06-06 Yao Qi <yao@codesourcery.com>
9512 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9514 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9516 Fix gcc -flto compilation warning.
9517 * server.c (main): Make variable multi_mode and attach volatile.
9519 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9521 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9522 if the platform doesn't know about it.
9524 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9526 * Makefile.in (SFILES): Add linux-tile-low.c.
9527 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9528 * configure.srv: Handle tilegx-*-linux*.
9529 * linux-tile-low.c: New file.
9531 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9533 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9535 2012-05-24 Pedro Alves <palves@redhat.com>
9539 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9541 2012-05-24 Pedro Alves <palves@redhat.com>
9545 Replace target_signal with gdb_signal throughout.
9547 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9549 * linux-low.c (linux_store_registers): Avoid the copying sequence
9550 when no data has been retrieved by ptrace.
9552 2012-05-22 Will Deacon <will.deacon@arm.com>
9554 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9555 Include asm/ptrace.h.
9556 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9559 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9561 * linux-low.c (linux_store_registers): Don't re-retrieve data
9562 with ptrace that has already been obtained from /proc. Always
9563 copy any data retrieved with ptrace to the buffer supplied.
9565 2012-05-11 Yao Qi <yao@codesourcery.com>
9566 Pedro Alves <palves@redhat.com>
9568 * linux-low.c (enum stopping_threads_kind): New.
9569 (stopping_threads): Change type to `enum stopping_threads_kind'.
9570 (handle_extended_wait): If stopping and suspending threads, leave
9571 the new_lwp suspended too.
9572 (linux_wait_for_event): Adjust.
9573 (stop_all_lwps): Set `stopping_threads' to
9574 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9575 whether we're suspending threads or just stopping them. Assert no
9578 2012-04-29 Yao Qi <yao@codesourcery.com>
9580 * server.h: Move some code to ...
9581 * gdbthread.h: ... here. New.
9582 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9583 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9584 (nto-low.o, win32-low.o): Likewise.
9585 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9586 * regcache.c, remote-utils.c, server.c: Likewise.
9587 * target.c, tracepoint.c, win32-low.c: Likewise.
9589 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9591 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9592 (PTRACE_ARG4_TYPE): Likewise.
9593 (PTRACE_XFER_TYPE): Likewise.
9594 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9595 ptrace to PTRACE_ARG3_TYPE.
9596 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9597 (PTRACE_ARG4_TYPE): Likewise.
9598 (PTRACE_XFER_TYPE): Likewise.
9599 (linux_detach_one_lwp): Cast fourth argument of
9600 ptrace to long then PTRACE_ARG4_TYPE.
9601 (regsets_fetch_inferior_registers): Cast third argument of
9602 ptrace to long then PTRACE_ARG3_TYPE.
9603 (regsets_store_inferior_registers): Likewise.
9605 2012-04-20 Pedro Alves <palves@redhat.com>
9607 * configure: Regenerate.
9609 2012-04-19 Pedro Alves <palves@redhat.com>
9611 * Makefile.in (GNULIB_BUILDDIR): New.
9612 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9613 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9614 (all, install-only, uninstall, clean-info, all-lib, clean): No
9615 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9616 (maintainer-clean realclean distclean): Use subdir_do.
9618 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9619 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9620 * acinclude.m4: Include acx_configure_dir.m4.
9621 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9622 calls. Call AC_PROG_RANLIB. Configure gnulib using
9625 (GNULIB_STDINT_H): Adjust.
9626 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9627 * gdbreplay.c: Include build-gnulib/config.h.
9628 * server.h: Likewise.
9629 * aclocal.m4: Regenerate.
9630 * config.in: Regenerate.
9631 * configure: Regenerate.
9633 2012-04-19 Pedro Alves <palves@redhat.com>
9635 * Makefile.in (LIBGNU, INCGNU): Adjust.
9636 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9637 (all, install-only, uninstall, clean-info, all-lib, clean)
9638 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9639 * configure.ac: Adjust AC_OUTPUT output.
9640 * aclocal.m4: Regenerate.
9641 * configure: Regenerate.
9643 2012-04-19 Pedro Alves <palves@redhat.com>
9645 * Makefile.in (generated_files): New.
9646 (server_h): Remove the explicit dependency on config.h, and depend
9647 on $generated_files.
9649 2012-04-19 Pedro Alves <palves@redhat.com>
9651 * Makefile.in (INCGNU): Add -Ignulib.
9653 2012-04-19 Pedro Alves <palves@redhat.com>
9655 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9656 (INCGNU): ... this, and spell out -I here.
9657 (GNULIB_LIB): Rename to ...
9659 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9661 2012-04-19 Pedro Alves <palves@redhat.com>
9663 * config.in: Regenerate.
9665 2012-04-19 Pedro Alves <palves@redhat.com>
9667 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9668 * server.h (memmem): Remove declaration.
9669 * config.in: Regenerate.
9670 * configure: Regenerate.
9672 2012-04-19 Yao Qi <yao@codesourcery.com>
9674 * Makefile.in (SFILES): Add common/vec.c.
9678 2012-04-19 Yao Qi <yao@codesourcery.com>
9680 * remote-utils.c (prepare_resume_reply): Replace with macro
9681 target_core_of_thread.
9682 * server.c (handle_qxfer_threads_proper): Likewise.
9683 * target.h (traget_core_of_thread): New macro.
9685 2012-04-18 Pedro Alves <palves@redhat.com>
9687 * aclocal.m4: Regenerate.
9688 * configure: Regenerate.
9690 2012-04-16 Yao Qi <yao@codesourcery.com>
9692 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9693 duplicated on address.
9695 2012-04-16 Yao Qi <yao@codesourcery.com>
9697 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9698 (struct tracepoint_action_ops) <send>: New field.
9699 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9700 (agent_expr_send, x_tracepoint_action_send): New.
9701 (l_tracepoint_action_send): New.
9702 (cmd_qtdp): Download and install tracepoint
9703 according to `use_agent'.
9704 (run_inferior_command): Add one more parameter `len'.
9706 (tracepoint_send_agent): New.
9707 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9709 2012-04-16 Yao Qi <yao@codesourcery.com>
9711 * tracepoint.c (download_tracepoints): Moved to ...
9712 (cmd_qtstart): ... here.
9714 2012-04-14 Yao Qi <yao@codesourcery.com>
9716 * tracepoint.c: Include inttypes.h.
9717 (struct collect_memory_action): Use sized types.
9718 (struct tracepoint): Likewise.
9719 (cmd_qtdp, stop_tracing): Update print specifiers.
9720 (cmd_qtp, response_tracepoint): Likewise.
9721 (collect_data_at_tracepoint): Likewise.
9722 (collect_data_at_step): Likewise.
9724 2012-04-14 Yao Qi <yao@codesourcery.com>
9726 Import gnulib module inttypes.
9727 * aclocal.m4, config.in, configure: Regenerated.
9729 2012-04-14 Yao Qi <yao@codesourcery.com>
9731 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9732 Makefile and config.status at last.
9734 2012-04-13 Yao Qi <yao@codesourcery.com>
9736 * tracepoint.c: Include stdint.h unconditionally.
9738 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9740 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9741 on BFD_HAVE_SYS_PROCFS_TYPE.
9742 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9743 * configure: Regenerate.
9744 * config.in: Likewise.
9746 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9748 * Makefile.in (clean): Also remove x32.c x32-linux.c
9749 x32-avx.c x32-avx-linux.c.
9750 (x32.o): New target.
9752 (x32-linux.o): Likewise.
9753 (x32-linux.c): Likewise.
9754 (x32-avx.o): Likewise.
9755 (x32-avx.c): Likewise.
9756 (x32-avx-linux.o): Likewise.
9757 (x32-avx-linux.c): Likewise.
9759 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9760 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9761 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9762 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9763 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9764 i386/x32-avx-linux.xml.
9766 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9767 (init_registers_x32_avx_linux): Likwise.
9768 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9769 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9771 2012-04-13 Pedro Alves <palves@redhat.com>
9773 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9774 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9775 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9776 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9779 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9781 * linux-x86-low.c (compat_x32_clock_t): New.
9782 (compat_x32_siginfo_t): Likewise.
9783 (compat_x32_siginfo_from_siginfo): Likewise.
9784 (siginfo_from_compat_x32_siginfo): Likewise.
9785 (linux_is_elf64): Likewise.
9786 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9787 and siginfo_from_compat_x32_siginfo for x32.
9788 (x86_arch_setup): Set linux_is_elf64.
9790 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9793 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9795 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9796 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9797 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9798 compatible with process.
9800 2012-04-12 Yao Qi <yao@codesourcery.com>
9802 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9803 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9804 (install-only, install-info, clean): Handle sub dir gnulib.
9805 (all-lib, am--refresh): New targets.
9806 (memmem.o): Remove target.
9807 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9808 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9809 (AC_REPLACE_FUNCS): Remove memmem.
9810 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9811 (AC_OUTPUT): Generate Makefile in gnulib/.
9812 * aclocal.m4, config.in, configure: Regenerated.
9814 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9816 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9818 2012-04-05 Pedro Alves <palves@redhat.com>
9820 -Werror=strict-aliasing
9822 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9825 2012-04-04 Pedro Alves <palves@redhat.com>
9827 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9828 (sparc_store_gregset_from_stack, sparc_store_gregset)
9829 (sparc_breakpoint_at): Fix formatting.
9831 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9833 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9835 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9836 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9837 * config.in: Regenerate.
9838 * configure: Likewise.
9840 2012-03-29 Pedro Alves <palves@redhat.com>
9842 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9843 Correct ptrace arguments.
9845 2012-03-28 Pedro Alves <palves@redhat.com>
9847 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9848 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9849 (IA64_FR1_REGNUM): New defines.
9850 (ia64_fetch_register): New.
9851 (the_low_target): Install it.
9852 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9854 * linux-low.c (linux_fetch_registers): Try the
9855 the_low_target.fetch_register hook first.
9857 * linux-arm-low.c (the_low_target): Adjust.
9858 * linux-bfin-low.c (the_low_target): Adjust.
9859 * linux-cris-low.c (the_low_target): Adjust.
9860 * linux-crisv32-low.c (the_low_target): Adjust.
9861 * linux-m32r-low.c (the_low_target): Adjust.
9862 * linux-m68k-low.c (the_low_target): Adjust.
9863 * linux-mips-low.c (the_low_target): Adjust.
9864 * linux-ppc-low.c (the_low_target): Adjust.
9865 * linux-s390-low.c (the_low_target): Adjust.
9866 * linux-sh-low.c (the_low_target): Adjust.
9867 * linux-sparc-low.c (the_low_target): Adjust.
9868 * linux-tic6x-low.c (the_low_target): Adjust.
9869 * linux-x86-low.c (the_low_target): Adjust.
9870 * linux-xtensa-low.c (the_low_target): Adjust.
9872 2012-03-26 Pedro Alves <palves@redhat.com>
9874 * server.c (handle_qxfer_libraries): Don't bail early if
9875 the_target->qxfer_libraries_svr4 is not NULL.
9877 2012-03-26 Pedro Alves <palves@redhat.com>
9879 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9881 2012-03-23 Pedro Alves <palves@redhat.com>
9883 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9884 "library-list-svr4" element's start tag when the the DSO list is
9887 2012-03-23 Pedro Alves <palves@redhat.com>
9889 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9890 a variable whose type size is the same as the inferior's pointer
9893 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9895 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9897 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9898 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9899 * linux-low.h: Include <signal.h>.
9900 (struct siginfo): Remove forward declaration.
9901 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9904 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9906 * .gitignore: Ignore more files.
9908 2012-03-19 Pedro Alves <palves@redhat.com>
9909 Jan Kratochvil <jan.kratochvil@redhat.com>
9911 * server.c (cont_thread, general_thread): Add describing comments.
9912 (start_inferior): Clear `cont_thread'.
9913 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9916 2012-03-15 Yao Qi <yao@codesourcery.com>
9918 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9920 (cmd_qtdp): ... here.
9922 2012-03-15 Yao Qi <yao@codesourcery.com>
9924 * tracepoint.c (struct tracepoint_action_ops): New.
9925 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9926 (m_tracepoint_action_download): New.
9927 (r_tracepoint_action_download): New.
9928 (x_tracepoint_action_download): New.
9929 (l_tracepoint_action_download): New.
9930 (add_tracepoint_action): Install `action->ops' according type.
9931 (download_tracepoint_1): Move code `download' function pointer
9932 of various tracepoint_action_ops.
9934 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9936 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9937 linux_ptrace_attach_warnings.
9939 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9941 * Makefile.in (linux-ptrace.o): New.
9942 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9943 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9944 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9945 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9946 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9948 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9950 2012-03-08 Yao Qi <yao@codesourcery.com>
9951 Pedro Alves <palves@redhat.com>
9953 Fix PR server/13392.
9954 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9956 * tracepoint.c (remove_tracepoint): New.
9957 (cmd_qtdp): Call remove_tracepoint when failed to install.
9959 2012-03-07 Pedro Alves <palves@redhat.com>
9961 * linux-low.c (get_detach_signal): New.
9962 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9963 Pass on pending signals to PTRACE_DETACH. Check the result of the
9965 * server.c (program_signals, program_signals_p): New.
9966 (handle_general_set): Handle QProgramSignals.
9967 * server.h (program_signals, program_signals_p): Declare.
9969 2012-03-05 Pedro Alves <palves@redhat.com>
9970 Jan Kratochvil <jan.kratochvil@redhat.com>
9972 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9975 2012-03-03 Yao Qi <yao@codesourcery.com>
9977 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9978 agent_look_up_symbols.
9980 2012-03-03 Yao Qi <yao@codesourcery.com>
9982 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9983 (linux-x86-low.o): Likewise.
9984 * server.h: Remove in_process_agent_loaded.
9985 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9989 2012-03-03 Yao Qi <yao@codesourcery.com>
9991 * tracepoint.c (gdb_agent_capability): New global.
9992 (in_process_agent_loaded_ust): Renamed to
9993 `in_process_agent_supports_ust'.
9995 (in_process_agent_supports_ust): Call agent_capability_check.
9996 (clear_installed_tracepoints): Assert that agent supports
9999 2012-03-03 Yao Qi <yao@codesourcery.com>
10001 * linux-low.c (linux_supports_agent): New.
10002 (linux_target_ops): Initialize field `supports_agent' with
10003 linux_supports_agent.
10004 * target.h (struct target_ops) <supports_agent>: New.
10005 (target_supports_agent): New macro.
10006 * server.c (handle_general_set): Handle packet 'QAgent'.
10007 (handle_query): Send `QAgent+'.
10008 * Makefile.in (server.o): Depends on agent.h.
10010 2012-03-03 Yao Qi <yao@codesourcery.com>
10012 * Makefile.in (OBS): Add agent.o.
10013 Add new rule for agent.o.
10014 Track dependence of tracepoint.c on agent.h.
10015 * tracepoint.c (run_inferior_command_1):
10016 (run_inferior_command): Call agent_run_command.
10017 (gdb_ust_connect_sync_socket): Deleted. Move it to
10019 (resume_thread, stop_thread): Likewise.
10020 (gdb_ust_socket_init): Renamed to ...
10021 (gdb_agent_socket_init): ... New.
10022 (gdb_ust_thread): Renamed to ...
10023 (gdb_agent_helper_thread): ... New.
10024 (gdb_ust_init): Move some code to ...
10025 (gdb_agent_init): ... here. New.
10026 [HAVE_UST]: Call gdb_ust_init.
10027 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10028 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10029 * config.in, configure: Regenerated.
10031 2012-03-02 Pedro Alves <palves@redhat.com>
10033 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10034 * linux-low.c (struct simple_pid_list): New.
10035 (stopped_pids): New a struct simple_pid_list pointer.
10036 (add_to_pid_list, pull_pid_from_list): New.
10037 (handle_extended_wait): Don't assume the first signal new children
10038 report is SIGSTOP. Adjust call to pull_pid_from_list.
10039 (linux_wait_for_lwp): Adjust.
10041 2012-03-02 Yao Qi <yao@codesourcery.com>
10043 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10046 2012-03-02 Yao Qi <yao@codesourcery.com>
10048 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10049 `stop_pc' and `tpoint'. Update caller.
10051 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10053 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10054 * linux-low.c (use_linux_regsets): New macro.
10055 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10056 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10057 (linux_register_in_regsets): New function.
10058 (usr_fetch_inferior_registers): Skip registers covered by
10060 (usr_store_inferior_registers): Likewise.
10061 (usr_fetch_inferior_registers): New macro.
10062 (usr_store_inferior_registers): Likewise.
10063 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10064 (linux_store_registers): Likewise.
10065 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10067 (init_registers_mips64_dsp_linux): Likewise.
10068 (init_registers_mips_linux): New macro.
10069 (init_registers_mips_dsp_linux): Likewise.
10070 (mips_dsp_num_regs): Likewise.
10071 (DSP_BASE, DSP_CONTROL): New fallback macros.
10072 (mips_base_regs): New macro.
10073 (mips_regmap): Use it. Fix the size.
10074 (mips_dsp_regmap): New variable.
10075 (mips_dsp_regset_bitmap): Likewise.
10076 (mips_arch_setup): New function.
10077 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10079 (mips_cannot_store_register): Likewise.
10080 (the_low_target): Update .arch_setup, .num_regs and .regmap
10081 initializers. Add .regset_bitmap initializer.
10082 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10084 * linux-bfin-low.c (the_low_target): Likewise.
10085 * linux-cris-low.c (the_low_target): Likewise.
10086 * linux-crisv32-low.c (the_low_target): Likewise.
10087 * linux-ia64-low.c (the_low_target): Likewise.
10088 * linux-m32r-low.c (the_low_target): Likewise.
10089 * linux-m68k-low.c (the_low_target): Likewise.
10090 * linux-ppc-low.c (the_low_target): Likewise.
10091 * linux-s390-low.c (the_low_target): Likewise.
10092 * linux-sh-low.c (the_low_target): Likewise.
10093 * linux-sparc-low.c (the_low_target): Likewise.
10094 * linux-tic6x-low.c (the_low_target): Likewise.
10095 * linux-x86-low.c (the_low_target): Likewise.
10096 * linux-xtensa-low.c (the_low_target): Likewise.
10097 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10098 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10099 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10101 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10102 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10104 2012-02-29 Yao Qi <yao@codesourcery.com>
10105 Pedro Alves <palves@redhat.com>
10107 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10108 `step_over_finished' is true.
10110 2012-02-27 Pedro Alves <palves@redhat.com>
10112 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10113 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10115 2012-02-27 Pedro Alves <palves@redhat.com>
10118 * linux-low.c (pid_is_stopped): New.
10119 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10121 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10123 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10126 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10128 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10130 2012-02-24 Luis Machado <lgustavo@codesourcery>
10132 * server.c (handle_query): Advertise support for target-side
10133 breakpoint condition evaluation.
10134 (process_point_options): New function.
10135 (process_serial_event): When inserting a breakpoint, check for
10136 a target-side condition that should be evaluated.
10138 * mem-break.c: Include regcache.h and ax.h.
10139 (point_cond_list_t): New data structure.
10140 (breakpoint) <cond_list>: New field.
10141 (find_gdb_breakpoint_at): Make non-static.
10142 (delete_gdb_breakpoint_at): Clear any target-side
10144 (clear_gdb_breakpoint_conditions): New function.
10145 (add_condition_to_breakpoint): Likewise.
10146 (add_breakpoint_condition): Likewise.
10147 (gdb_condition_true_at_breakpoint): Likewise.
10148 (gdb_breakpoint_here): Return result directly instead
10149 of going through a local variable.
10151 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10152 (clear_gdb_breakpoint_conditions): Likewise.
10153 (add_breakpoint_condition): Likewise.
10154 (gdb_condition_true_at_breakpoint): Likewise.
10156 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10157 (need_step_over_p): Take target-side breakpoint condition into
10160 2012-02-24 Luis Machado <lgustavo@codesourcery>
10162 * server.h: Include tracepoint.h.
10163 (agent_mem_read, agent_get_trace_state_variable_value,
10164 agent_set_trace_state_variable_value,
10165 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10166 get_set_tsv_func_addr): New prototypes.
10168 * ax.h: New include file.
10169 * ax.c: New source file.
10171 * tracepoint.c: Include ax.h.
10172 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10173 agent_expr, eval_result_type): Move to ax.h.
10174 (parse_agent_expr): Rename to ...
10175 (gdb_parse_agent_expr): ... this, make it non-static and move
10177 (unparse_agent_expr) Rename to ...
10178 (gdb_unparse_agent_expr): ... this, make it non-static and move
10180 (eval_agent_expr): Rename to ...
10181 (eval_tracepoint_agent_expr): ... this.
10182 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10183 forward declarations.
10184 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10185 (agent_get_trace_state_variable_value): New function.
10186 (agent_set_trace_state_variable_value): New function.
10187 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10188 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10189 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10190 (condition_true_at_tracepoint): Likewise.
10191 (parse_agent_expr): Rename to ...
10192 (gdb_parse_agent_expr): ... this and move to ax.c.
10193 (unparse_agent_expr): Rename to ...
10194 (gdb_unparse_agent_expr): ... this and move to ax.c.
10195 (gdb_agent_op_name): Move to ax.c.
10196 (eval_agent_expr): Rename to ...
10197 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10199 (eval_tracepoint_agent_expr): New function.
10200 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10202 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10204 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10205 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10206 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10207 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10208 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10209 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10210 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10211 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10212 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10213 (compile_bytecodes): Remove forward declaration.
10214 (is_goto_target): Move to ax.c.
10215 (compile_bytecodes): Move to ax.c and call
10216 agent_get_trace_state_variable_value (...) and
10217 agent_set_trace_state_variable_value (...).
10219 * Makefile.in: Update ax.c and IPA dependencies.
10221 2012-02-24 Pedro Alves <palves@redhat.com>
10223 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10224 (cmd_bigqtbuffer_circular): ... this. Only handle
10225 'QTBuffer:circular:'.
10226 (handle_tracepoint_general_set): Adjust.
10228 2012-02-16 Yao Qi <yao@codesourcery.com>
10230 * inferiors.c: Move code to ...
10231 * dll.c: .... here. New.
10232 * server.h: Declare clear_dlls.
10233 * Makefile.in (SFILES): Add dll.c.
10237 2012-02-11 Yao Qi <yao@codesourcery.com>
10239 * server.c: (handle_monitor_command): Add a new parameter
10241 (handle_query): Update caller.
10243 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10245 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10246 * configure, config.in: Regenerate.
10247 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10250 2012-02-02 Pedro Alves <palves@redhat.com>
10252 Try SIGKILL first, then PTRACE_KILL.
10253 * linux-low.c (linux_kill_one_lwp): New.
10254 (linux_kill_one_lwp): Rename to ...
10255 (kill_one_lwp_callback): ... this. Use the new
10256 linux_kill_one_lwp.
10258 2012-02-02 Pedro Alves <palves@redhat.com>
10260 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10263 2012-01-27 Pedro Alves <palves@redhat.com>
10265 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10266 (elf_64_file_p): Make static.
10267 (linux_pid_exe_is_elf_64_file): New.
10268 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10269 Delete declarations.
10270 (linux_pid_exe_is_elf_64_file): Declare.
10271 * linux-x86-low.c (x86_arch_setup): Use
10272 linux_pid_exe_is_elf_64_file.
10274 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10276 * linux-low.c (linux_wait_for_event_1): Rename to ...
10277 (linux_wait_for_event): ... here and merge it with former
10278 linux_wait_for_event - new variable wait_ptid, use it.
10279 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10281 2012-01-23 Pedro Alves <palves@redhat.com>
10283 * server.c (main): Avoid yet another case of infinite loop while
10284 detaching/killing after a longjmp.
10286 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10289 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10291 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10293 * hostio.c (handle_readlink): New function.
10294 (handle_vFile): Call it to handle "vFile:readlink" packets.
10296 2012-01-20 Pedro Alves <palves@redhat.com>
10297 Ulrich Weigand <ulrich.weigand@linaro.org>
10299 * server.c (handle_v_requests): Only support vAttach and vRun to
10300 start multiple processes when in extended protocol mode.
10302 2012-01-17 Pedro Alves <palves@redhat.com>
10304 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10305 memalign plus mprotect to allocate the scratch buffer.
10307 2012-01-13 Pedro Alves <palves@redhat.com>
10309 * server.c (attach_inferior): Clear `cont_thread'.
10311 2012-01-13 Pedro Alves <palves@redhat.com>
10313 * server.c (main): Avoid infinite loop while detaching/killing
10316 2012-01-09 Doug Evans <dje@google.com>
10318 * server.c (start_inferior): Set last_ptid in --wrapper case.
10320 2012-01-06 Yao Qi <yao@codesourcery.com>
10322 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10324 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10326 2012-01-04 Yao Qi <yao@codesourcery.com>
10328 * tracepoint.c (cmd_qtdp): Print debug message
10329 for static tracepoint.
10331 2012-01-04 Yao Qi <yao@codesourcery.com>
10333 * tracepoint.c (trace_vdebug): Differentiate debug message
10334 between gdbserver and IPA.
10336 2012-01-03 Yao Qi <yao@codesourcery.com>
10338 * tracepoint.c (tracepoint_was_hit): Don't collect for
10341 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10343 * terminal.h: Reformat copyright header.
10345 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10347 * server.c (gdbserver_version): Update copyright year.
10348 * gdbreplay.c (gdbreplay_version): Likewise.
10350 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10352 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10355 2011-12-18 Hui Zhu <teawater@gmail.com>
10356 * linux-low.c (linux_create_inferior): Save return value to ret.
10358 2011-12-18 Hui Zhu <teawater@gmail.com>
10360 * linux-low.c (linux_create_inferior): Save return value to ret.
10362 2011-12-16 Doug Evans <dje@google.com>
10364 * linux-low.c (linux_create_inferior): If stdio connection,
10365 redirect stdin from /dev/null, stdout to stderr.
10366 * remote-utils.c (remote_is_stdio): New static global.
10367 (remote_connection_is_stdio): New function.
10368 (remote_prepare): Handle stdio connection.
10369 (remote_open): Ditto.
10370 (remote_close): Don't close stdin for stdio connections.
10371 (read_prim,write_prim): New functions. Replace all calls to
10372 read/write to these.
10373 * server.c (main): Watch for "-" argument. Move call to
10374 remote_prepare before start_inferior.
10375 * server.h (STDIO_CONNECTION_NAME): New macro.
10376 (remote_connection_is_stdio): Declare.
10378 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10379 in debugging output.
10381 2011-12-15 Yao Qi <yao@codesourcery.com>
10383 * tracepoint.c: Include sys/syscall.h.
10384 (gdb_ust_thread): Remove preprocessor conditional.
10386 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10388 * linux-low.c (linux_detach_one_lwp): Call
10389 the_low_target.prepare_to_resume before detaching.
10391 2011-12-14 Yao Qi <yao@codesourcery.com>
10393 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10396 2011-12-14 Yao Qi <yao@codesourcery.com>
10398 * i386-low.c (i386_low_stopped_data_address): Initialize local
10399 variable `control'.
10401 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10405 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10406 DR_CONTROL unless necessary. Extend comments.
10407 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10408 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10410 2011-12-13 Yao Qi <yao@codesourcery.com>
10412 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10414 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10416 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10418 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10419 Print new debug message for such case.
10421 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10423 Fix overlapping memcpy.
10424 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10425 the read_inferior_memory transfer.
10426 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10427 write_inferior_memory transfer.
10428 (set_fast_tracepoint_jump): New variable buf. Use it for the
10429 read_inferior_memory and write_inferior_memory transfers.
10430 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10431 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10432 Use it for the write_inferior_memory transfer.
10433 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10436 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10438 * linux-low.c (fetch_register, store_register): Make code
10439 consistent, fix formatting.
10441 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10443 * linux-low.c (usr_store_inferior_registers): Factor out code
10444 to handle individual registers into...
10445 (store_register): ... this new function.
10447 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10449 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10450 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10451 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10452 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10453 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10454 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10455 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10456 (srv_xmlfiles): Add new XML files.
10458 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10460 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10461 (init_registers_s390_linux32v1): Add prototype.
10462 (init_registers_s390_linux32v2): Likewise.
10463 (init_registers_s390_linux64v1): Likewise.
10464 (init_registers_s390_linux64v2): Likewise.
10465 (init_registers_s390x_linux64v1): Likewise.
10466 (init_registers_s390x_linux64v2): Likewise.
10467 (s390_num_regs): Increment to 52.
10468 (s390_regmap): Add orig_r2 register.
10469 (s390_num_regs_3264): Increment to 68.
10470 (s390_regmap_3264): Add orig_r2 register.
10471 (s390_collect_ptrace_register): Handle orig_r2 register.
10472 (s390_supply_ptrace_register): Likewise.
10473 (s390_fill_last_break): New function.
10474 (s390_store_last_break): Likewise.
10475 (s390_fill_system_call): New function.
10476 (s390_store_system_call): Likewise.
10477 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10479 (s390_check_regset): New function.
10480 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10481 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10482 Update target_regsets for available register sets.
10484 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10485 Jan Kratochvil <jan.kratochvil@redhat.com>
10487 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10488 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10490 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10491 * linux-low.h (struct process_info_private): New member r_debug.
10492 * server.c (handle_qxfer_libraries): Call
10493 the_target->qxfer_libraries_svr4.
10494 (handle_qxfer_libraries_svr4): New function.
10495 (qxfer_packets): New entry "libraries-svr4".
10496 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10497 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10498 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10499 PACKET_qXfer_libraries_svr4.
10501 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10503 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10504 PSW address/mask between 8-byte and 16-byte formats.
10505 (s390_supply_ptrace_register): Likewise.
10506 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10507 basic addressing mode bit.
10509 2011-11-24 Stan Shebs <stan@codesourcery.com>
10511 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10513 2011-11-17 Stan Shebs <stan@codesourcery.com>
10515 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10516 (tracing_start_time): New global.
10517 (tracing_stop_time): New global.
10518 (tracing_user_name): New global.
10519 (tracing_notes): New global.
10520 (tracing_stop_note): New global.
10521 (cmd_qtstart): Set traceframe_usage, start_time.
10522 (stop_tracing): Set stop_time.
10523 (cmd_qtstatus): Report additional status.
10524 (cmd_qtp): New function.
10525 (handle_tracepoint_query): Call it.
10526 (cmd_qtnotes): New function.
10527 (handle_tracepoint_general_set): Call it.
10528 (get_timestamp): Rename from tsv_get_timestamp.
10530 2011-11-14 Stan Shebs <stan@codesourcery.com>
10531 Kwok Cheung Yeung <kcy@codesourcery.com>
10533 * linux-x86-low.c (small_jump_insn): New.
10534 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10535 trampoline and error message, build a trampoline and issue a small
10536 jump instruction to it.
10537 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10538 trampoline and error message.
10539 (x86_get_min_fast_tracepoint_insn_len): New.
10540 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10541 * linux-low.h (struct linux_target_ops): Add arguments to
10542 install_fast_tracepoint_jump_pad operation, add new operation.
10543 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10545 (linux_get_min_fast_tracepoint_insn_len): New function.
10546 (linux_target_op): Add new operation.
10547 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10548 (gdb_trampoline_buffer_end): Ditto.
10549 (gdb_trampoline_buffer_error): Ditto.
10550 (struct ipa_sym_addresses): Add fields for new IPA variables.
10551 (symbol_list): Add entries for new IPA variables.
10552 (struct tracepoint): Add fields to hold the address range of the
10553 trampoline used by the tracepoint.
10554 (trampoline_buffer_head): New static variable.
10555 (trampoline_buffer_tail): Ditto.
10556 (claim_trampoline_space): New function.
10557 (have_fast_tracepoint_trampoline_buffer): New function.
10558 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10560 (install_fast_tracepoint): Ditto, also add error buffer argument.
10561 (cmd_qtminftpilen): New function.
10562 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10563 (fast_tracepoint_from_trampoline_address): New function.
10564 (fast_tracepoint_collecting): Handle trampoline as part of jump
10566 (set_trampoline_buffer_space): New function.
10567 (initialize_tracepoint): Initialize new IPA variables.
10568 * target.h (struct target_ops): Add arguments to
10569 install_fast_tracepoint_jump_pad operation, add new
10570 get_min_fast_tracepoint_insn_len operation.
10571 (target_get_min_fast_tracepoint_insn_len): New.
10572 (install_fast_tracepoint_jump_pad): Add arguments.
10573 * server.h (IPA_BUFSIZ): Define.
10574 * linux-i386-ipa.c: Include extra header files.
10575 (initialize_fast_tracepoint_trampoline_buffer): New function.
10576 (initialize_low_tracepoint): Call it.
10577 * server.h (set_trampoline_buffer_space): Declare.
10578 (claim_trampoline_space): Ditto.
10579 (have_fast_tracepoint_trampoline_buffer): Ditto.
10581 2011-11-14 Yao Qi <yao@codesourcery.com>
10583 * server.c (handle_query): Handle InstallInTrace for qSupported.
10584 * tracepoint.c (add_tracepoint): Sort list.
10585 (install_tracepoint, download_tracepoint): New.
10586 (cmd_qtdp): Call them to install and download tracepoints.
10587 (sort_tracepoints): Removed.
10588 (cmd_qtstart): Update.
10590 2011-11-14 Yao Qi <yao@codesourcery.com>
10592 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10593 * mem-break.h: Declare.
10594 * tracepoint.c (cmd_qtstart): Move some code to ...
10595 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10597 (download_tracepoints): Move some code to ...
10598 (download_tracepoint_1): ... here. New.
10600 2011-11-08 Yao Qi <yao@codesourcery.com>
10602 * remote-utils.c (relocate_instruction): A comment fix.
10604 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10606 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10607 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10608 dr_status_mirror and dr_control_mirror from debug_reg_state.
10609 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10610 (i386_initial_stuff): Remove use of deleted globals.
10611 (i386_get_thread_context, i386_set_thread_context,
10612 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10613 from debug_reg_state.
10615 2011-11-05 Yao Qi <yao@codesourcery.com>
10617 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10618 address as TPOINT's.
10620 2011-11-02 Stan Shebs <stan@codesourcery.com>
10622 * tracepoint.c (agent_mem_read_string): New function.
10623 (eval_agent_expr): Call it for tracenz.
10624 * server.c (handle_query): Report support for tracenz.
10626 2011-11-02 Yao Qi <yao@codesourcery.com>
10628 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10630 2011-11-02 Yao Qi <yao@codesourcery.com>
10632 * target.h: Fix a typo in comment.
10634 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10636 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10637 clobber the breakpoints' shadows with fast tracepoint jumps.
10638 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10639 * target.c (write_inferior_memory): Also pass MYADDR down to
10642 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10644 * configure.ac: Check support for personality routine.
10645 * configure: Regenerate.
10646 * config.in: Likewise.
10647 * linux-low.c: Include <sys/personality.h>.
10648 Define ADDR_NO_RANDOMIZE if necessary.
10649 (linux_create_inferior): Disable address space randomization when
10650 forking inferior, if requested.
10651 (linux_supports_disable_randomization): New function.
10652 (linux_target_ops): Install it.
10653 * server.h (disable_randomization): Declare.
10654 * server.c (disable_randomization): New global variable.
10655 (handle_general_set): Handle QDisableRandomization.
10656 (handle_query): Likewise for qSupported.
10657 (main): Support --disable-randomization and --no-disable-randomization
10658 command line arguments.
10659 * target.h (struct target_ops): Add supports_disable_randomization.
10660 (target_supports_disable_randomization): New macro.
10662 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10664 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10666 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10667 [!PT_GETDSBT] (target_loadmap): New definition.
10668 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10669 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10670 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10671 and PT_GETDSBT to LINUX_LOADMAP.
10672 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10673 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10675 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10677 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10678 (arm_linux_hwbp_cap): New static variable.
10679 (arm_linux_get_hwbp_cap): Replace by ...
10680 (arm_linux_init_hwbp_cap): ... this new function.
10681 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10682 (arm_linux_get_hw_watchpoint_count): Likewise.
10683 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10684 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10685 (arm_prepare_to_resume): Use perror_with_name instead of error.
10687 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10689 * linux-arm-low.c: Include <signal.h>.
10690 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10691 (struct arm_linux_hwbp_cap): New data type.
10692 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10693 (struct arm_linux_hw_breakpoint): New data type.
10694 (MAX_BPTS, MAX_WPTS): Define.
10695 (struct arch_process_info, struct arch_lwp_info): New data types.
10696 (arm_linux_get_hwbp_cap): New function.
10697 (arm_linux_get_hw_breakpoint_count): Likewise.
10698 (arm_linux_get_hw_watchpoint_count): Likewise.
10699 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10700 (arm_hwbp_control_initialize): Likewise.
10701 (arm_hwbp_control_is_enabled): Likewise.
10702 (arm_hwbp_control_is_initialized): Likewise.
10703 (arm_hwbp_control_disable): Likewise.
10704 (arm_linux_hw_breakpoint_equal): Likewise.
10705 (arm_linux_hw_point_initialize): Likewise.
10706 (struct update_registers_data): New data structure.
10707 (update_registers_callback: New function.
10708 (arm_insert_point): Likewise.
10709 (arm_remove_point): Likewise.
10710 (arm_stopped_by_watchpoint): Likewise.
10711 (arm_stopped_data_address): Likewise.
10712 (arm_new_process): Likewise.
10713 (arm_new_thread): Likewise.
10714 (arm_prepare_to_resume): Likewise.
10715 (the_low_target): Register arm_insert_point, arm_remove_point,
10716 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10717 arm_new_thread, and arm_prepare_to_resume.
10719 2011-09-15 Stan Shebs <stan@codesourcery.com>
10721 * server.h (struct emit_ops): Add compare-goto fields.
10722 * tracepoint.c (gdb_agent_op_sizes): New table.
10723 (emit_eq_goto): New function.
10724 (emit_ne_goto): New function.
10725 (emit_lt_goto): New function.
10726 (emit_le_goto): New function.
10727 (emit_gt_goto): New function.
10728 (emit_ge_goto): New function.
10729 (is_goto_target): New function.
10730 (compile_bytecodes): Recognize special cases of compare-goto
10731 combinations and call specialized emitters for them.
10732 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10733 (amd64_emit_ne_goto): New function.
10734 (amd64_emit_lt_goto): New function.
10735 (amd64_emit_le_goto): New function.
10736 (amd64_emit_gt_goto): New function.
10737 (amd64_emit_ge_goto): New function.
10738 (amd64_emit_ops): Add the new functions.
10739 (i386_emit_eq_goto): New function.
10740 (i386_emit_ne_goto): New function.
10741 (i386_emit_lt_goto): New function.
10742 (i386_emit_le_goto): New function.
10743 (i386_emit_gt_goto): New function.
10744 (i386_emit_ge_goto): New function.
10745 (i386_emit_ops): Add the new functions.
10747 2011-09-08 Stan Shebs <stan@codesourcery.com>
10749 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10750 (i386_emit_epilogue): Restore %ebx.
10752 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10754 * server.c (step_thread): Remove definition.
10755 (process_serial_event): Don't handle Hs.
10756 * server.h (step_thread): Remove declaration.
10757 * target.c (set_desired_inferior): Remove use of step_thread.
10759 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10761 * linux-low.c: Include linux-procfs.h.
10762 (linux_attach_lwp_1): Update comments.
10763 (linux_attach): Scan for existing threads when attaching to a
10764 process that is the tgid.
10765 * Makefile.in: Update dependencies.
10767 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10769 * configure.srv: Add linux-procfs.o dependencies.
10771 2011-08-14 Yao Qi <yao@codesourcery.com>
10773 * target.h (struct target_ops): Fix indent.
10774 * win32-low.c (win32_target_ops): Fix comment.
10776 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10777 Yao Qi <yao@codesourcery.com>
10779 * Makefile.in (clean): Remove tic6x-*.c files.
10780 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10781 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10782 (tic6x-c64xp-linux.c): Likewise.
10783 * configure.srv: Add support for tic6x-*-uclinux.
10784 * linux-tic6x-low.c: New.
10785 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10787 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10788 Yao Qi <yao@codesourcery.com>
10790 * target.h (struct target_ops): Add read_loadmap.
10791 * linux-low.c (struct target_loadseg): New type.
10792 (struct target_loadmap): New type.
10793 (linux_read_loadmap): New function.
10794 (linux_target_ops): Add linux_read_loadmap.
10795 * server.c (handle_query): Support qXfer:fdpic:read packet.
10796 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10799 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10801 * win32-low.c: Include <stdint.h>.
10803 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10805 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10806 to the inferior here.
10807 (i386_remove_aligned_watchpoint): Ditto.
10808 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10809 fit part of the watchpoint in the debug registers.
10810 (i386_update_inferior_debug_regs): New.
10811 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10812 registers, and only update the inferior on success.
10813 (i386_low_remove_watchpoint): Ditto.
10815 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10817 * linux-low.c (compare_ints, unique, list_threads, show_process,
10818 linux_core_of_thread): Delete.
10819 (linux_target_ops): Change linux_core_of_thread to
10820 linux_common_core_of_thread.
10821 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10822 * utils.c (malloc_failure): Change type of argument.
10823 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10824 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10825 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10826 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10827 (IPA_OBJS): Add common-utils-ipa.o.
10828 (ptid_h, linux_osdata_h): New macros.
10829 (server_h): Add common/common-utils.h, common/xml-utils.h,
10830 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10832 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10833 ptid.o, buffer.o): New rules.
10834 (linux-low.o): Add common/linux-osdata.h as a dependency.
10835 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10836 * configure.ac: Add AC_HEADER_DIRENT check.
10837 * config.in: Regenerate.
10838 * configure: Regenerate.
10839 * remote-utils.c (xml_escape_text): Delete.
10840 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10841 buffer_xml_printf): Move to common/buffer.c.
10842 * server.c (main): Remove call to initialize_inferiors.
10843 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10844 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10845 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10846 internal_error, gdb_assert, gdb_assert_fail): Delete.
10847 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10848 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10850 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10851 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10852 initialize_inferiors): Delete.
10854 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10856 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10859 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10861 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10863 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10865 2011-05-26 Yao Qi <yao@codesourcery.com>
10867 * Makefile.in (thread-db.o): Track dependence to
10868 common/gdb_thread_db.h.
10869 * thread-db.c: include gdb_thread_db.h from right place.
10871 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10873 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10874 __FILE__ and __LINE__ to internal_error.
10876 2011-05-13 Doug Evans <dje@google.com>
10878 * thread-db.c (try_thread_db_load_from_sdir): New function.
10879 (try_thread_db_load_from_dir): New function.
10880 (thread_db_load_search): Handle $sdir, ignore $pdir.
10881 Remove trying of system directories if search of
10882 libthread-db-search-path fails, that is now done via $sdir.
10884 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10886 * server.c (handle_query): Add EnableDisableTracepoints to the list
10887 of supported features.
10888 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10890 (cmd_qtenable_disable): New.
10891 (cmd_qtstart): Install tracepoints even if disabled.
10892 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10893 receiving a QTEnable or QTDisable packet.
10894 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10895 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10897 (gdb_probe): Skip data collection if static tracepoint is disabled.
10899 2011-05-10 Doug Evans <dje@google.com>
10901 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10903 2011-05-04 Doug Evans <dje@google.com>
10905 * linux-low.c (linux_join): Skip process lookup.
10906 * spu-low.c (spu_join): Ditto.
10907 * server.c (join_inferiors_callback): Delete.
10908 (process_serial_event): For 'D' packet (detach) call join_inferior
10911 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10913 * README: Don't mention xscale*-*-linux*.
10914 * configure.srv (xscale*-*-linux*): Don't handle target.
10916 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10918 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10920 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10921 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10922 (i386_emit_void_call_2): Likewise.
10924 2011-04-26 Yao Qi <yao@codesourcery.com>
10926 * linux-low.c: Move common macros to linux-ptrace.h.
10927 Include linux-ptrace.h.
10928 * Makefile.in (linux_ptrace_h): New.
10929 (linux-low.o): Depends on linux-ptrace.h.
10931 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10933 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10934 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10935 (remote_prepare): New function with most of the TCP code from ...
10936 (remote_open): ... here. Detect PORT here unconditionally. Move also
10937 setting transport_is_reliable.
10938 * server.c (run_once): New variable.
10939 (gdbserver_usage): Document it.
10940 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10941 the first run if RUN_ONCE.
10942 * server.h (run_once, remote_prepare): New declarations.
10944 2011-04-19 Tom Tromey <tromey@redhat.com>
10946 * win32-low.c (handle_load_dll): Remove duplicate "the".
10948 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10950 Remove support for old Cygwin 1.5 versions.
10951 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10952 function to avoid warning.
10953 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10956 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10958 * gdbserver/server.h (Macro _): Define it if not available.
10960 2011-03-14 Michael Snyder <msnyder@vmware.com>
10962 * hostio.c (handle_close): Remove unnecessary null test.
10964 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10966 * Makefile.in (maintainer-clean realclean distclean): Remove
10967 "make ... subdir_do" command.
10969 2011-03-10 Michael Snyder <msnyder@vmware.com>
10971 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10973 * server.c (handle_v_run): Free alloced buffer on early return.
10975 2011-03-09 Yao Qi <yao@codesourcery.com>
10978 2011-03-04 Yao Qi <yao@codesourcery.com>
10980 * Makefile.in: Remove GNU make feature --directory.
10982 2011-03-05 Yao Qi <yao@codesourcery.com>
10984 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10985 (subdir_do): New make target. Copied from gdb/Makefile.
10986 (maintainer-clean, realclean, distclean, clean): Call corresponding
10987 make targets in common/Makefile.
10989 2011-02-11 Yao Qi <yao@codesourcery.com>
10991 * configure.ac: Call AC_PROG_RANLIB.
10992 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10993 * configure: Regenerate.
10995 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10997 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10999 2011-03-06 Yao Qi <yao@codesourcery.com>
11001 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11003 2011-03-05 Yao Qi <yao@codesourcery.com>
11005 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11006 (subdir_do): New make target. Copied from gdb/Makefile.
11007 (maintainer-clean, realclean, distclean, clean): Call corresponding
11008 make targets in common/Makefile.
11010 2011-03-04 Yao Qi <yao@codesourcery.com>
11012 * Makefile.in: Remove GNU make feature --directory.
11014 2011-03-04 Michael Snyder <msnyder@vmware.com>
11016 * server.c (queue_stop_reply): Call xmalloc not malloc.
11018 2011-03-02 Michael Snyder <msnyder@vmware.com>
11020 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11022 2011-02-28 Michael Snyder <msnyder@vmware.com>
11024 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11025 (cmd_qtframe): Ditto.
11026 (cmd_qtbuffer): Ditto.
11027 (cmd_bigqtbuffer): Ditto.
11029 * utils.c (decimal2str): Initialize 'width' to nine, then
11030 don't mess with it.
11032 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11034 * hostio.c (require_data): Free *data, not data.
11036 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11038 * hostio.c (require_data): Use free, not xfree.
11040 2011-02-27 Michael Snyder <msnyder@vmware.com>
11042 * server.c (handle_query): Discard unused value.
11044 * hostio.c (require_data): Free malloc memory before returning
11047 2011-02-26 Michael Snyder <msnyder@vmware.com>
11049 * linux-low.c (list_threads): Call closedir for dirent.
11051 2011-02-27 Michael Snyder <msnyder@vmware.com>
11053 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11054 a case statement falls through.
11056 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11058 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11061 2011-02-26 Michael Snyder <msnyder@vmware.com>
11063 * utils.c (decimal2str): Eliminate dead code and dead param.
11064 (pulongest): Drop dead param from call to decimal2str.
11067 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11069 Revert the following patch (not approved yet):
11070 2011-02-21 Hui Zhu <teawater@gmail.com>
11071 * tracepoint.c (tp_printf): New function.
11072 (eval_agent_expr): Handle gdb_agent_op_printf.
11074 2011-02-21 Hui Zhu <teawater@gmail.com>
11076 * tracepoint.c (tp_printf): New function.
11077 (eval_agent_expr): Handle gdb_agent_op_printf.
11079 2011-02-18 Tom Tromey <tromey@redhat.com>
11081 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11082 (tracepoint.o): Likewise.
11083 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11084 (gdb_agent_op_names): Likewise.
11086 2011-02-18 Tom Tromey <tromey@redhat.com>
11088 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11089 gdb_agent_op_rot>: New constants.
11090 (gdb_agent_op_names): Add pick and roll.
11091 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11094 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11096 * aclocal.m4: Regenerated with aclocal-1.11.1.
11098 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11100 * server.c (handle_qxfer_traceframe_info): New.
11101 (qxfer_packets): Register "traceframe-info".
11102 (handle_query): Report support for qXfer:traceframe-info:read+.
11103 * tracepoint.c (match_blocktype): New.
11104 (traceframe_find_block_type): Rename to ...
11105 (traceframe_walk_blocks): ... this. Add callback filter argument,
11107 (traceframe_find_block_type): New, reimplemented on top of
11108 traceframe_walk_blocks.
11109 (build_traceframe_info_xml): New.
11110 (traceframe_read_info): New.
11111 * server.h (traceframe_read_info): Declare.
11113 2011-02-11 Yao Qi <yao@codesourcery.com>
11115 * configure.ac: Call AC_PROG_RANLIB.
11116 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11117 * configure: Regenerate.
11119 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11121 * server.c (gdb_read_memory): Change return semantics to allow
11123 (handle_search_memory_1): Adjust.
11124 (process_serial_event) <'m' packet>: Handle partial transfers.
11125 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11127 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11129 * regcache.c (init_register_cache): Initialize
11130 regcache->register_status.
11131 (free_register_cache): Release regcache->register_status.
11132 (regcache_cpy): Copy register_status.
11133 (registers_to_string): Print 'x's for unavailable registers.
11134 (supply_register): Mark the register's status valid or
11135 unavailable, depending on whether a buffer was passed in or not.
11136 (supply_register_zeroed): New.
11137 (supply_regblock): Mark the registers' status valid or
11138 unavailable, depending on whether a buffer was passed in or not.
11139 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11140 (struct regcache): New `register_status' field.
11141 (supply_register_zeroed): Declare.
11142 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11143 supply_register_zeroed, rather than passing a NULL buffer to
11145 * tracepoint.c (fetch_traceframe_registers): Update comment.
11147 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11149 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11152 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11154 * server.h (decode_xfer_write): Change prototype.
11155 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11156 and don't extract the annex here.
11157 * server.c (decode_xfer_read): Remove `annex' parameter,
11158 and don't extract the annex here.
11159 (decode_xfer): New.
11160 (struct qxfer): New.
11161 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11162 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11163 (handle_qxfer_statictrace): New functions, abstracted out from
11164 handle_query, and made to use the struct qxfer interface.
11165 (handle_threads_qxfer_proper): Rename to ...
11166 (handle_qxfer_threads_proper): ... this.
11167 (handle_threads_qxfer): Rename to ...
11168 (handle_qxfer_threads): ... this. Adjust.
11169 (qxfer_packets): New array.
11170 (handle_qxfer): New function.
11171 (handle_query): Use handle_qxfer.
11173 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11175 * gdbreplay.c: Shorten lines of >= 80 columns.
11176 * linux-low.c: Ditto.
11177 * linux-ppc-low.c: Ditto.
11178 * linux-s390-low.c: Ditto.
11179 * linux-sparc-low.c: Ditto.
11180 * linux-x86-low.c: Ditto.
11181 * linux-xtensa-low.c: Ditto.
11182 * mem-break.c: Ditto.
11183 * nto-low.c: Ditto.
11184 * regcache.h: Ditto.
11185 * remote-utils.c: Ditto.
11188 * thread-db.c: Ditto.
11189 * tracepoint.c: Ditto.
11191 * win32-low.h: Ditto.
11193 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11195 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11198 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11200 * server.c (gdbserver_version): Update copyright year in version
11202 * gdbreplay.c (gdbreplay_version): Ditto.
11204 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11206 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11207 * linux-bfin-low.c: New file.
11208 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11209 PT_DATA_ADDR for BFIN targets.
11210 * Makefile.in (SFILES): Add linux-bfin-low.c.
11211 (clean): Remove reg-bfin.c.
11212 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11213 * README: Mention supported Blackfin targets.
11215 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11217 * .gitignore: New file.
11219 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11221 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11223 2010-10-22 Jie Zhang <jie@codesourcery.com>
11225 * Makefile.in: Add FLAGS_TO_PASS variable.
11226 (install): Remove dependency of install-only and recursively
11227 invoke make for install-only.
11229 2010-10-04 Doug Evans <dje@google.com>
11231 * Makefile.in (uninstall): Use $(DESTDIR).
11233 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11237 * linux-x86-low.c (compat_siginfo_from_siginfo)
11238 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11239 si_code is < 0. Check for si_code == SI_TIMER before checking for
11242 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11244 * lynx-i386-low.c: New file.
11245 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11247 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11249 * lynx-low.c (ptrace_request_to_str): Remove handling for
11250 request values that have been removed in LynxOS 5.x.
11252 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11254 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11257 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11259 * configure.ac: Add --enable-inprocess-agent option.
11260 * configure: Rebuilt.
11262 2010-09-06 Yao Qi <yao@codesourcery.com>
11264 * linux-low.c (linux_kill): Remove unused variable.
11265 (linux_stabilize_threads): Likewise.
11266 * server.c (start_inferior): Likewise.
11267 (queue_stop_reply_callback): Likewise.
11268 * tracepoint.c (do_action_at_tracepoint): Likewise.
11270 2010-09-06 Yao Qi <yao@codesourcery.com>
11272 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11275 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11277 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11279 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11281 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11284 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11286 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11287 gdbserver/lynx-ppc-low.c: New files.
11288 * Makefile.in (lynx_low_h): New variable.
11289 (lynx-low.o, lynx-ppc-low.o): New rules.
11290 * configure.ac: On LynxOS, link with -lnetinet.
11291 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11292 * configure: regenerate.
11294 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11296 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11297 * configure.ac: Add check for vasprintf and vsnprintf.
11298 * configure, config.in: Regenerate.
11299 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11301 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11303 * gdbreplay.c: Move include of alloca.h up, next to include of
11305 * server.h: Add include of malloc.h.
11306 * mem-break.c: Remove include of malloc.h.
11307 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11309 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11311 * Makefile.in (memmem.o): Build with -Wno-error.
11313 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11315 * utils.c (xsnprintf): Make non-static.
11316 * server.h: Add xsnprintf declaration.
11317 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11318 replace calls to snprintf by calls to xsnprintf throughout.
11320 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11322 * configure.ac: Add configure check for alloca.
11323 * configure, config.in: Regenerate.
11324 * server.h: Include alloca.h if it exists.
11325 * gdbreplay.c: Include alloca.h if it exists.
11327 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11329 * linux-low.c (__SIGRTMIN): Define if not already defined.
11330 (linux_create_inferior): Check for __ANDROID__ rather than
11332 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11333 are already deferred.
11334 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11335 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11336 stopped and already has a pending signal to report.
11337 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11338 a pending signal to report or is moving out of a jump pad.
11339 (linux_init_signals): Check for __ANDROID__ rather than
11342 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11344 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11345 debug_threads check. Avoid a linear search when not doing debug
11348 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11350 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11351 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11352 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11353 (process_event): Change local fd's type to gdb_fildes_t.
11354 (create_file_handler): Adjust prototype.
11355 (delete_file_handler): Adjust prototype.
11356 (handle_file_event): Adjust prototype. Use pfildes.
11357 (create_file_event): Adjsut prototype.
11358 * remote-utils.c (remote_desc, listen_desc): Change type to
11360 * server.h: New gdb_fildes_t typedef.
11361 [USE_WIN32API]: Include winsock2.h.
11362 (delete_file_handler, add_file_handler): Adjust prototypes.
11363 (pfildes): Declare.
11364 * utils.c (pfildes): New.
11366 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11368 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11369 * configure: Regenerate.
11371 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11373 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11374 (linux_done_accessing_memory): ... this.
11375 (linux_target_ops): Adjust.
11376 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11377 * nto-low.c (nto_target_ops): Adjust comment.
11378 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11379 * spu-low.c (spu_target_ops): Adjust comment.
11380 * target.h (target_ops): Rename unprepare_to_access_memory field
11381 to done_accessing_memory.
11382 (unprepare_to_access_memory): Rename to ...
11383 (done_accessing_memory): ... this.
11385 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11387 * linux-low.c (linux_prepare_to_access_memory): New.
11388 (linux_unprepare_to_access_memory): New.
11389 (linux_target_ops): Install them.
11390 * server.c (read_memory): Rename to ...
11391 (gdb_read_memory): ... this. Use
11392 prepare_to_access_memory/prepare_to_access_memory.
11393 (write_memory): Rename to ...
11394 (gdb_write_memory): ... this. Use
11395 prepare_to_access_memory/prepare_to_access_memory.
11396 (handle_search_memory_1): Adjust.
11397 (process_serial_event): Adjust.
11398 * target.h (struct target_ops): New fields
11399 prepare_to_access_memory and unprepare_to_access_memory.
11400 (prepare_to_access_memory, unprepare_to_access_memory): New.
11401 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11402 prepare_to_access_memory/prepare_to_access_memory.
11403 * nto-low.c (nto_target_ops): Adjust.
11404 * spu-low.c (spu_target_ops): Adjust.
11405 * win32-low.c (win32_target_ops): Adjust.
11407 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11409 * Makefile.in (WARN_CFLAGS): Get it from configure.
11410 (WERROR_CFLAGS): New.
11411 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11412 * configure.ac: Introduce --enable-werror, which adds -Werror to
11413 the compiler command line. Enabled by default. Disable with
11414 --disable-werror. Add -Wdeclaration-after-statement
11415 Wpointer-arith and -Wformat-nonliteral to warning flags.
11416 * configure: Regenerate.
11418 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11420 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11422 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11424 * gdbreplay.c (remote_error): New.
11426 (expect): Use gdbchar. Check for error reading from GDB.
11427 Clarify sync error output.
11428 (play): Check for errors writing to GDB.
11429 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11430 * remote-utils.c (getpkt): Check for errors writing to the remote
11433 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11435 * linux-low.c (linux_wait_1): Move non-debugging code out of
11436 `debug_threads' control.
11438 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11440 * linux-low.c (linux_wait_1): Don't set last_status here.
11441 * server.c (push_event, queue_stop_reply_callback): Assert we're
11442 not pushing a TARGET_WAITKIND_IGNORE event.
11443 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11444 (myresume, handle_target_event): Set the thread's last_resume_kind
11445 and last_status from the target returned status.
11447 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11451 * linux-x86-low.c (update_debug_registers_callback): New.
11452 (i386_dr_low_set_addr): Use it.
11453 (i386_dr_low_get_addr): New.
11454 (i386_dr_low_set_control): Use update_debug_registers_callback.
11455 (i386_dr_low_get_control): New.
11456 (i386_dr_low_get_status): Adjust.
11457 * linux-low.c (linux_stop_lwp): New.
11458 * linux-low.h (linux_stop_lwp): Declare.
11460 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11461 argument instead of a i386_debug_reg_state.
11462 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11463 a i386_debug_reg_state.
11464 (i386_insert_aligned_watchpoint): Adjust.
11465 (i386_remove_aligned_watchpoint): Adjust.
11466 (i386_low_stopped_data_address): Read the debug registers from the
11467 inferior instead of from the mirrors.
11468 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11469 (i386_dr_low_get_addr): Declare.
11470 (i386_dr_low_get_control): Declare.
11471 (i386_dr_low_get_status): Change prototype.
11473 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11474 (i386_dr_low_get_addr): New.
11475 (i386_dr_low_get_control): New.
11476 (i386_dr_low_get_status): Adjust prototype. Return
11478 (i386_initial_stuff): Clear dr_status_mirror and
11480 (i386_get_thread_context): Adjust.
11481 (i386_set_thread_context): Adjust.
11482 (i386_thread_added): Adjust.
11484 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11486 * linux-low.h (linux_thread_area): Delete declaration.
11488 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11490 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11491 after its termination.
11493 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11495 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11496 (gdb_wants_all_stopped): Delete.
11497 (linux_wait_1): Don't call them.
11498 * server.c (handle_v_cont): Tag all threads as want-stopped.
11499 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11500 stopped as "client-wants-stopped".
11502 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11504 * Makefile.in (signals_h): New.
11505 (server_h): Depend on it.
11506 (server.o): Don't depend on $(signals_def).
11507 (signals.o): Depend on $(signals_def).
11509 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11511 * Makefile.in (signals_def): New.
11512 (server_h): Append include/gdb/signals.h and signals_def.
11513 (server.o): Append signals_def.
11515 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11517 * server.c (handle_target_event): Use target_signal_to_host for
11518 resume_info.sig initialization.
11519 * target.h (struct thread_resume) <sig>: New comment.
11521 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11523 * server.c (handle_query): strcpy() the returned string from paddress()
11524 instead of sprintf().
11525 * utils.c (paddress): Return phex_nz().
11527 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11529 * server.c (handle_v_cont): Call mourn_inferior if process
11531 (myresume): Likewise.
11533 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11535 Static tracepoints, and integration with UST.
11537 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11538 * mem-break.c (uninsert_all_breakpoints)
11539 (reinsert_all_breakpoints): New.
11540 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11541 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11542 (gdb_agent_ust_loaded, helper_thread_id)
11543 (gdb_agent_helper_thread_id): New macros.
11544 (struct ipa_sym_addresses): Add addr_ust_loaded,
11545 addr_helper_thread_id, addr_cmd_buf.
11546 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11547 (in_process_agent_loaded_ust): New.
11548 (write_e_ust_not_loaded): New.
11549 (maybe_write_ipa_ust_not_loaded): New.
11550 (struct collect_static_trace_data_action): New.
11551 (enum tracepoint_type) <static_tracepoint>: New.
11552 (struct tracepoint) <handle>: Mention static tracepoints.
11553 (struct static_tracepoint_ctx): New.
11554 (CMD_BUF_SIZE): New.
11555 (add_tracepoint_action): Handle static tracepoint actions.
11556 (unprobe_marker_at): New.
11557 (clear_installed_tracepoints): Handle static tracepoints.
11558 (cmd_qtdp): Handle static tracepoints.
11559 (probe_marker_at): New.
11560 (cmd_qtstart): Handle static tracepoints.
11561 (response_tracepoint): Handle static tracepoints.
11562 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11563 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11564 (get_context_regcache): Handle static tracepoints.
11565 (do_action_at_tracepoint): Handle static tracepoint actions.
11566 (traceframe_find_block_type): Handle static trace data blocks.
11567 (traceframe_read_sdata): New.
11568 (download_tracepoints): Download static tracepoint actions.
11569 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11570 (GDB_PROBE_NAME): New.
11572 (GET_UST_SYM): New.
11575 (ust_marker_to_static_tracepoint): New.
11577 (collect_ust_data_at_tracepoint): New.
11578 (gdb_ust_probe): New.
11579 (UNIX_PATH_MAX, SOCK_DIR): New.
11580 (gdb_ust_connect_sync_socket): New.
11581 (resume_thread, stop_thread): New.
11582 (run_inferior_command): New.
11583 (init_named_socket): New.
11584 (gdb_ust_socket_init): New.
11585 (cstr_to_hexstr): New.
11587 (first_marker, next_marker): New.
11588 (response_ust_marker): New.
11589 (cmd_qtfstm, cmd_qtsstm): New.
11590 (unprobe_marker_at, probe_marker_at): New.
11591 (cmd_qtstmat, gdb_ust_thread): New.
11592 (gdb_ust_init): New.
11593 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11594 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11595 (ST_REGENTRY): New.
11596 (x86_64_st_collect_regmap): New.
11597 (X86_64_NUM_ST_COLLECT_GREGS): New.
11598 (AMD64_RIP_REGNUM): New.
11599 (supply_static_tracepoint_registers): New.
11600 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11601 (ST_REGENTRY): New.
11602 (i386_st_collect_regmap): New.
11603 (i386_NUM_ST_COLLECT_GREGS): New.
11604 (supply_static_tracepoint_registers): New.
11605 * server.c (handle_query): Handle qXfer:statictrace:read.
11606 <qSupported>: Report support for StaticTracepoints, and
11607 qXfer:statictrace:read features.
11608 * server.h (traceframe_read_sdata)
11609 (supply_static_tracepoint_registers): Declare.
11610 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11611 (unpack_varlen_hex): Include in IPA build.
11612 * Makefile.in (ustlibs, ustinc): New.
11613 (IPA_OBJS): Add remote-utils-ipa.o.
11614 ($(IPA_LIB)): Link -ldl and -lpthread.
11616 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11617 * config.in, configure: Regenerate.
11619 2010-06-20 Ian Lance Taylor <iant@google.com>
11620 Pedro Alves <pedro@codesourcery.com>
11622 * linux-x86-low.c (always_true): Delete.
11623 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11624 trying to fool the compiler with always_true.
11626 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11628 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11629 conditions in gdbserver.
11631 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11633 * spu-low.c (spu_read_memory): Wrap around local store limit.
11634 (spu_write_memory): Likewise.
11636 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11638 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11639 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11641 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11643 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11644 uses with LONGEST uses.
11646 2010-06-14 Stan Shebs <stan@codesourcery.com>
11647 Pedro Alves <pedro@codesourcery.com>
11651 * linux-x86-low.c: Include limits.h.
11653 (always_true): New.
11656 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11657 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11658 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11659 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11660 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11661 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11662 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11663 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11664 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11665 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11666 (amd64_emit_void_call_2): New.
11667 (amd64_emit_ops): New.
11668 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11669 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11670 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11671 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11672 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11673 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11674 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11675 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11676 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11677 (i386_emit_stack_adjust, i386_emit_int_call_1)
11678 (i386_emit_void_call_2): New.
11679 (i386_emit_ops): New.
11680 (x86_emit_ops): New.
11681 (the_low_target): Install x86_emit_ops.
11682 * server.h (struct emit_ops): New.
11683 (get_raw_reg_func_addr): Declare.
11684 (current_insn_ptr, emit_error): Declare.
11685 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11686 (set_trace_state_variable_value): New defines.
11687 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11688 addr_get_trace_state_variable_value and
11689 addr_set_trace_state_variable_value.
11690 (symbol_list): New fields for get_raw_reg,
11691 get_trace_state_variable_value and set_trace_state_variable_value.
11692 (condfn): New typedef.
11693 (struct tracepoint): New field `compiled_cond'.
11694 (do_action_at_tracepoint): Clear compiled_cond.
11695 (get_trace_state_variable_value, set_trace_state_variable_value):
11697 (condition_true_at_tracepoint): If there's a compiled condition,
11699 (current_insn_ptr, emit_error): New globals.
11700 (struct bytecode_address): New.
11701 (get_raw_reg_func_addr): New.
11702 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11703 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11704 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11705 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11706 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11707 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11708 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11709 (compile_tracepoint_condition, compile_bytecodes): New.
11710 * target.h (emit_ops): Forward declare.
11711 (struct target_ops): New field emit_ops.
11712 (target_emit_ops): New.
11713 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11714 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11715 * linux-low.c (linux_emit_ops): New.
11716 (linux_target_ops): Install it.
11717 * linux-low.h (struct linux_target_ops): New field emit_ops.
11719 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11721 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11722 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11724 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11725 Stan Shebs <stan@codesourcery.com>
11727 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11728 (all): Depend on $(extra_libraries).
11729 (install-only): Install the IPA.
11730 (IPA_OBJS, IPA_LIB): New.
11731 (clean): Remove the IPA lib.
11732 (IPAGENT_CFLAGS): New.
11733 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11734 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11735 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11736 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11737 * configure.ac: Check for atomic builtins support in the compiler.
11738 (IPA_DEPFILES, extra_libraries): Define.
11739 * configure.srv (ipa_obj): Add description.
11740 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11741 (i[34567]86-*-linux*): Set ipa_obj.
11742 (x86_64-*-linux*): Set ipa_obj.
11743 * linux-low.c (stabilizing_threads): New.
11744 (supports_fast_tracepoints): New.
11745 (linux_detach): Stabilize threads before detaching.
11746 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11747 the lwp is either not stabilizing, or is moving out of a jump pad.
11748 (linux_fast_tracepoint_collecting): New.
11749 (maybe_move_out_of_jump_pad): New.
11750 (enqueue_one_deferred_signal): New.
11751 (dequeue_one_deferred_signal): New.
11752 (linux_wait_for_event_1): If moving out of a jump pad, defer
11753 pending signals to later.
11754 (linux_stabilize_threads): New.
11755 (linux_wait_1): Check if threads need moving out of jump pads, and
11757 (stuck_in_jump_pad_callback): New.
11758 (move_out_of_jump_pad_callback): New.
11759 (lwp_running): New.
11760 (linux_resume_one_lwp): Handle moving out of jump pads.
11761 (linux_set_resume_request): Dequeue deferred signals.
11762 (need_step_over_p): Also step over fast tracepoint jumps.
11763 (start_step_over): Also uninsert fast tracepoint jumps.
11764 (finish_step_over): Also reinsert fast tracepoint jumps.
11765 (linux_install_fast_tracepoint_jump): New.
11766 (linux_target_ops): Install linux_stabilize_threads and
11767 linux_install_fast_tracepoint_jump_pad.
11768 * linux-low.h (linux_target_ops) <get_thread_area,
11769 install_fast_tracepoint_jump_pad>: New fields.
11770 (struct lwp_info) <collecting_fast_tracepoint,
11771 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11772 (linux_get_thread_area): Declare.
11773 * linux-x86-low.c (jump_insn): New.
11774 (x86_get_thread_area): New.
11775 (append_insns): New.
11776 (push_opcode): New.
11777 (amd64_install_fast_tracepoint_jump_pad): New.
11778 (i386_install_fast_tracepoint_jump_pad): New.
11779 (x86_install_fast_tracepoint_jump_pad): New.
11780 (the_low_target): Install x86_get_thread_area and
11781 x86_install_fast_tracepoint_jump_pad.
11782 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11783 (struct fast_tracepoint_jump): New.
11784 (fast_tracepoint_jump_insn): New.
11785 (fast_tracepoint_jump_shadow): New.
11786 (find_fast_tracepoint_jump_at): New.
11787 (fast_tracepoint_jump_here): New.
11788 (delete_fast_tracepoint_jump): New.
11789 (set_fast_tracepoint_jump): New.
11790 (uninsert_fast_tracepoint_jumps_at): New.
11791 (reinsert_fast_tracepoint_jumps_at): New.
11792 (set_breakpoint_at): Use write_inferior_memory.
11793 (uninsert_raw_breakpoint): Use write_inferior_memory.
11794 (check_mem_read): Mask out fast tracepoint jumps.
11795 (check_mem_write): Mask out fast tracepoint jumps.
11796 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11797 (set_fast_tracepoint_jump): Declare.
11798 (delete_fast_tracepoint_jump)
11799 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11800 (reinsert_fast_tracepoint_jumps_at): Declare.
11801 * regcache.c: Don't compile many functions when building the
11802 in-process agent library.
11803 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11804 the register buffer in the heap.
11805 (free_register_cache): If the register buffer isn't owned by the
11806 regcache, don't free it.
11807 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11808 pre-existing register caches.
11809 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11811 (convert_ascii_to_int): : Constify `from' parameter type.
11812 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11813 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11814 the needed buffer in-place.
11815 (relocate_instruction): New.
11816 * server.c (handle_query) <qSymbols>: If the target supports
11817 tracepoints, give it a chance of looking up symbols. Report
11818 support for fast tracepoints.
11819 (handle_status): Stabilize threads.
11820 (process_serial_event): Adjust.
11821 * server.h (struct fast_tracepoint_jump): Forward declare.
11822 (struct process_info) <fast_tracepoint_jumps>: New field.
11823 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11824 (decode_X_packet, decode_M_packet): Adjust.
11825 (relocate_instruction): Declare.
11826 (in_process_agent_loaded): Declare.
11827 (tracepoint_look_up_symbols): Declare.
11828 (struct fast_tpoint_collect_status): Declare.
11829 (fast_tracepoint_collecting): Declare.
11830 (force_unlock_trace_buffer): Declare.
11831 (handle_tracepoint_bkpts): Declare.
11832 (initialize_low_tracepoint)
11833 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11834 * target.h (struct target_ops) <stabilize_threads,
11835 install_fast_tracepoint_jump_pad>: New fields.
11836 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11837 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11838 [HAVE_STDINT_H]: Include stdint.h.
11839 (trace_debug_1): Rename to ...
11840 (trace_vdebug): ... this.
11841 (trace_debug): Rename to ...
11842 (trace_debug_1): ... this. Add `level' parameter.
11843 (trace_debug): New.
11844 (ATTR_USED, ATTR_NOINLINE): New.
11845 (IP_AGENT_EXPORT): New.
11846 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11847 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11848 (about_to_request_buffer_space, trace_buffer_is_full)
11849 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11850 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11851 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11852 (traceframe_write_count, traceframes_created)
11853 (trace_state_variables)
11854 New renaming defines.
11855 (struct ipa_sym_addresses): New.
11856 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11857 (symbol_list): New.
11858 (ipa_sym_addrs): New.
11859 (all_tracepoint_symbols_looked_up): New.
11860 (in_process_agent_loaded): New.
11861 (write_e_ipa_not_loaded): New.
11862 (maybe_write_ipa_not_loaded): New.
11863 (tracepoint_look_up_symbols): New.
11864 (debug_threads) [IN_PROCESS_AGENT]: New.
11865 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11866 (UNKNOWN_SIDE_EFFECTS): New.
11867 (stop_tracing): New.
11868 (flush_trace_buffer): New.
11869 (stop_tracing_bkpt): New.
11870 (flush_trace_buffer_bkpt): New.
11871 (read_inferior_integer): New.
11872 (read_inferior_uinteger): New.
11873 (read_inferior_data_pointer): New.
11874 (write_inferior_data_pointer): New.
11875 (write_inferior_integer): New.
11876 (write_inferior_uinteger): New.
11877 (struct collect_static_trace_data_action): Delete.
11878 (enum tracepoint_type): New.
11879 (struct tracepoint) <type>: New field `type'.
11880 <actions_str, step_actions, step_actions_str>: Only include in
11882 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11883 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11884 (tracepoints): Use IP_AGENT_EXPORT.
11885 (last_tracepoint): Don't include in the IPA.
11886 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11887 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11888 (alloced_trace_state_variables): New.
11889 (trace_state_variables): Use IP_AGENT_EXPORT.
11890 (traceframe_t): Delete unused variable.
11891 (circular_trace_buffer): Don't include in the IPA.
11892 (trace_buffer_start): Delete.
11893 (struct trace_buffer_control): New.
11894 (trace_buffer_free): Delete.
11895 (struct ipa_trace_buffer_control): New.
11896 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11897 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11899 (trace_buffer_ctrl): New.
11900 (TRACE_BUFFER_CTRL_CURR): New.
11901 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11902 Reimplement as macros.
11903 (trace_buffer_wrap): Delete.
11904 (traceframe_write_count, traceframe_read_count)
11905 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11906 (struct tracepoint_hit_ctx) <type>: New field.
11907 (struct fast_tracepoint_ctx): New.
11908 (memory_barrier): New.
11910 (record_tracepoint_error): Update atomically in the IPA.
11911 (clear_inferior_trace_buffer): New.
11912 (about_to_request_buffer_space): New.
11913 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11914 updating the same buffer.
11915 (add_tracepoint): Default the tracepoint's type to trap
11916 tracepoint, and orig_size to -1.
11917 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11918 internal variables.
11919 (create_trace_state_variable): New parameter `gdb'. Handle it.
11920 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11921 (cmd_qtdp): Handle fast tracepoints.
11922 (cmd_qtdv): Adjust.
11923 (max_jump_pad_size): New.
11924 (gdb_jump_pad_head): New.
11925 (get_jump_space_head): New.
11926 (claim_jump_space): New.
11927 (sort_tracepoints): New.
11928 (MAX_JUMP_SIZE): New.
11929 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11931 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11932 support. Upload fast traceframes, and delete internal IPA
11934 (stop_tracing_handler): New.
11935 (flush_trace_buffer_handler): New.
11936 (cmd_qtstop): Upload fast tracepoints.
11937 (response_tracepoint): Handle fast tracepoints.
11938 (tracepoint_finished_step): Upload fast traceframes. Set the
11939 tracepoint hit context's tracepoint type.
11940 (handle_tracepoint_bkpts): New.
11941 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11942 type. Add comment about fast tracepoints.
11943 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11944 non-existing action_str field.
11945 (get_context_regcache): Handle fast tracepoints.
11946 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11948 (fast_tracepoint_from_jump_pad_address): New.
11949 (fast_tracepoint_from_ipa_tpoint_address): New.
11950 (collecting_t): New.
11951 (force_unlock_trace_buffer): New.
11952 (fast_tracepoint_collecting): New.
11954 (gdb_collect): New.
11955 (write_inferior_data_ptr): New.
11956 (target_tp_heap): New.
11957 (target_malloc): New.
11958 (download_agent_expr): New.
11960 (download_tracepoints): New.
11961 (download_trace_state_variables): New.
11962 (upload_fast_traceframes): New.
11963 (IPA_FIRST_TRACEFRAME): New.
11964 (IPA_NEXT_TRACEFRAME_1): New.
11965 (IPA_NEXT_TRACEFRAME): New.
11966 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11967 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11968 (gdb_jump_pad_buffer_end): New.
11969 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11970 (initialize_tracepoint): Adjust.
11971 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11972 buffer. Initialize the low module.
11973 * utils.c (PREFIX, TOOLNAME): New.
11974 (malloc_failure): Use PREFIX.
11975 (error): In the IPA, an error causes an exit.
11976 (fatal, warning): Use PREFIX.
11977 (internal_error): Use TOOLNAME.
11978 (NUMCELLS): Increase to 10.
11979 * configure, config.in: Regenerate.
11981 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11983 * server.c (handle_query) <qSupported>: Do two passes over the
11984 qSupported string to avoid nesting strtok.
11986 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11988 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11990 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11991 -Wl,--dynamic-list.
11992 * configure: Regenerate.
11993 * proc-service.list: New.
11995 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11997 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12000 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12002 * gdbreplay.c (remote_open): Check error return from socket() call by
12003 its equality to -1 not by it being negative.
12004 * remote-utils.c (remote_open): Likewise.
12006 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12008 * config.h: Regenerate.
12010 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12012 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12013 doesn't provide PTRACE_GET_THREAD_AREA.
12015 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12017 * linux-m68k-low.c: Include <asm/ptrace.h>
12018 (ps_get_thread_area): Implement.
12020 2010-05-03 Doug Evans <dje@google.com>
12022 * event-loop.c (struct callback_event): New struct.
12023 (callback_list): New global.
12024 (append_callback_event, delete_callback_event): New functions.
12025 (process_callback): New function.
12026 (start_event_loop): Call it.
12027 * remote-utils.c (NOT_SCHEDULED): Define.
12028 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12029 moved out of readchar.
12030 (readchar): Rewrite. Call reschedule before returning.
12031 (reset_readchar): New function.
12032 (remote_close): Call it.
12033 (process_remaining, reschedule): New functions.
12034 * server.h (callback_handler_func): New typedef.
12035 (append_callback_event, delete_callback_event): Declare.
12037 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12039 * proc-service.c (ps_pglobal_lookup): Use
12040 thread_db_look_up_one_symbol.
12041 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12042 parameter. Use it instead of all_symbols_looked_up.
12043 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12045 (all_symbols_looked_up): Don't declare.
12046 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12047 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12049 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12050 Set all_symbols_looked_up here.
12051 (thread_db_look_up_one_symbol): New.
12052 (thread_db_get_tls_address): Adjust.
12053 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12054 thread_db object on the heap, and tentatively set it in the
12056 (thread_db_init): Don't set all_symbols_looked_up here.
12057 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12059 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12061 * linux-low.c (linux_kill, linux_detach): Adjust.
12062 (status_pending_p_callback): Remove redundant statement. Check
12063 for !TARGET_WAITIKIND_IGNORE, instead of
12064 TARGET_WAITKIND_STOPPED.
12065 (handle_tracepoints): Make sure LWP is locked. Adjust.
12066 (linux_wait_for_event_1): Adjust.
12067 (linux_cancel_breakpoints): New.
12068 (unsuspend_one_lwp): New.
12069 (unsuspend_all_lwps): New.
12070 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12071 (send_sigstop_callback): Change return type to int, add new
12072 `except' parameter and handle it.
12073 (suspend_and_send_sigstop_callback): New.
12074 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12075 pass them down. If SUSPEND, also increment the lwp's suspend
12077 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12078 (need_step_over_p): Don't consider suspended LWPs.
12079 (start_step_over): Adjust.
12080 (proceed_one_lwp): Change return type to int, add new `except'
12081 parameter and handle it.
12082 (unsuspend_and_proceed_one_lwp): New.
12083 (proceed_all_lwps): Use find_inferior instead of
12085 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12086 also decrement the suspend count of LWPs. Pass `except' down,
12087 instead of hacking its suspend count.
12088 (linux_pause_all): Add `freeze' parameter. Adjust.
12089 (linux_unpause_all): New.
12090 (linux_target_ops): Install linux_unpause_all.
12091 * server.c (handle_status): Adjust.
12092 * target.h (struct target_ops): New fields `unpause_all' and
12093 `cancel_breakpoints'. Add new parameter to `pause_all'.
12094 (pause_all): Add new `freeze' parameter.
12095 (unpause_all): New.
12096 (cancel_breakpoints): New.
12097 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12098 cancel breakpoints.
12099 (cmd_qtstart): Pause threads.
12100 (stop_tracing): Pause threads, and cancel breakpoints.
12101 * win32-low.c (win32_target_ops): Adjust.
12103 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12105 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12106 the inferior right away from here...
12107 (linux_wait_1): ... to here, and adjust to check the thread's
12108 last_resume_kind instead of the lwp's step or stop_expected flags.
12110 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12112 * README: Use consistent `GDB' and `GDBserver' spellings.
12114 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12116 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12117 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12118 (linux_detach_one_lwp): Assume the lwp is stopped.
12119 (any_thread_of): Delete.
12120 (linux_detach): Stop all lwps here. Don't blindly delete all
12122 (delete_lwp_callback): New.
12123 (linux_mourn): Delete all lwps of the process that is gone.
12124 (linux_wait_1): Don't delete the last lwp of the process here.
12125 * mem-break.h (mark_breakpoints_out): Declare.
12126 * mem-break.c (mark_breakpoints_out): New.
12127 (free_all_breakpoints): Use it.
12128 * server.c (handle_target_event): If the process is gone, mark
12130 * thread-db.c (struct thread_db) <create_bp>: New field.
12131 (thread_db_enable_reporting): Fix prototype. Store a thread event
12132 breakpoint reference in the thread_db struct.
12133 (thread_db_load_search): Clear the thread_db object.
12134 (try_thread_db_load_1): Ditto.
12135 (switch_to_process): New.
12136 (disable_thread_event_reporting): Use it.
12137 (remove_thread_event_breakpoints): New.
12138 (thread_db_detach, thread_db_mourn): Use it.
12140 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12142 * linux-low.c (linux_enable_event_reporting): New.
12143 (linux_wait_for_event_1, handle_extended_wait): Use it.
12145 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12147 * linux-low.c (linux_kill_one_lwp, linux_kill)
12148 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12149 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12150 SIGSTOP even if the LWP is stopped.
12151 (send_sigstop_callback): New.
12152 (stop_all_lwps): Use send_sigstop_callback instead.
12153 (linux_resume_one_thread): Adjust.
12154 (proceed_one_lwp): Still proceed an LWP that the client has
12155 requested to stop, if we haven't reported it as stopped yet. Make
12156 sure that LWPs the client want stopped, have a pending SIGSTOP.
12158 2010-04-26 Doug Evans <dje@google.com>
12160 * server.c (handle_general_set): Make static.
12162 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12163 Print received char after testing for error/eof instead of before.
12164 (input_interrupt): Tweak comment.
12166 2010-04-23 Doug Evans <dje@google.com>
12168 * server.c (start_inferior): Print inferior argv if --debug.
12170 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12172 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12173 * nto-x86-low.c: Include server.h
12175 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12177 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12178 be consistent with other sources of this directory.
12179 (init_registers_amd64): Correct name of source file of this function
12182 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12184 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12185 64-bit executables.
12187 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12189 * win32-i386-low.c: Add 64-bit support.
12190 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12191 (init_registers_amd64): Declare.
12192 (mappings): Add 64-bit version of array.
12193 (init_windows_x86): New function.
12194 (the_low_target): Change init_arch field to init_windows_x86.
12196 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12198 * win32-low.c: Adapt to support also 64-bit architecture.
12199 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12200 (get_image_name): Use SIZE_T type for local variable `done'.
12201 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12202 (toolhelp_get_dll_name): Idem.
12203 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12204 Use uintptr_t typecast to avoid warning.
12205 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12206 (handle_exception): Use phex_nz to avoid warning.
12207 (win32_wait): Remove unused local variable `process'.
12209 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12211 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12214 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12216 * configure.ac: Use `ws2_32' library for srv_mingw.
12217 * configure: Regenerate.
12218 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12219 * remote-utils.c: Likewise.
12221 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12223 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12224 if __x86_64__ is defined.
12226 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12228 * configure: Regenerate.
12230 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12232 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12233 * target.h (target_ops): New get_tib_address field.
12234 * win32-low.h (win32_thread_info): Add thread_local_base field.
12235 * win32-low.c (child_add_thread): Add tlb argument.
12236 Set thread_local_base field to TLB.
12237 (get_child_debug_event): Adapt to child_add_thread change.
12238 (win32_get_tib_address): New function.
12239 (win32_target_ops): Set get_tib_address field to
12240 win32_get_tib_address.
12241 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12243 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12245 * linux-low.c (linux_mourn): Also remove the process.
12246 * server.c (handle_target_event): Don't remove the process here.
12247 * nto-low.c (nto_mourn): New.
12248 (nto_target_ops): Install it.
12249 * spu-low.c (spu_mourn): New.
12250 (spu_target_ops): Install it.
12251 * win32-low.c (win32_mourn): New.
12252 (win32_target_ops): Install it.
12254 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12256 * server.h (buffer_xml_printf): Remove redundant `;'.
12258 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12260 * regcache.c (set_register_cache): Invalidate regcaches before
12261 changing the register cache layout.
12262 (regcache_invalidate_one): Allow a NULL regcache.
12263 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12264 regcaches before changing the register cache layout or the target
12267 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12269 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12270 variable warning on Linux/x86-64.
12272 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12274 GDBserver disconnected tracing support.
12276 * linux-low.c (linux_remove_process): Delete.
12277 (add_lwp): Don't set last_resume_kind here.
12278 (linux_kill): Use `mourn'.
12279 (linux_detach): Use `thread_db_detach', and `mourn'.
12280 (linux_mourn): New.
12281 (linux_attach_lwp_1): Adjust comment.
12282 (linux_attach): last_resume_kind moved the thread_info; adjust.
12283 (status_pending_p_callback): Adjust.
12284 (linux_wait_for_event_1): Adjust.
12285 (count_events_callback, select_singlestep_lwp_callback)
12286 (select_event_lwp_callback, cancel_breakpoints_callback)
12287 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12288 (proceed_one_lwp): Adjust.
12289 (linux_async): Add debug output.
12290 (linux_thread_stopped): New.
12291 (linux_pause_all): New.
12292 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12294 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12295 (thread_db_free): Delete declaration.
12296 (thread_db_detach, thread_db_mourn): Declare.
12297 * thread-db.c (thread_db_init): Use thread_db_mourn.
12298 (thread_db_free): Delete, split in two.
12299 (disable_thread_event_reporting): New.
12300 (thread_db_detach): New.
12301 (thread_db_mourn): New.
12303 * server.h (struct thread_info) <last_resume_kind>: New field.
12304 <attached>: Add comment.
12305 <gdb_detached>: New field.
12306 (handler_func): Change return type to int.
12307 (handle_serial_event, handle_target_event): Ditto.
12308 (gdb_connected): Declare.
12310 (disconnected_tracing): Declare.
12311 (stop_tracing): Declare.
12313 * server.c (handle_query) <qSupported>: Report support for
12314 disconnected tracing.
12315 (queue_stop_reply_callback): Account for running threads.
12316 (gdb_wants_thread_stopped): New.
12317 (gdb_wants_all_threads_stopped): New.
12318 (gdb_reattached_process): New.
12319 (handle_status): Clear the `gdb_detached' flag of all processes.
12320 In all-stop, stop all threads.
12321 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12322 (process_serial_event): If the remote connection breaks, or if an
12323 exit was forced with "monitor exit", force an event loop exit.
12324 Handle disconnected tracing on detach.
12325 (handle_serial_event): Adjust.
12326 (handle_target_event): If GDB isn't connected, forward events back
12327 to the inferior, unless the last process exited, in which case,
12328 exit gdbserver. Adjust interface.
12330 * remote-utils.c (remote_open): Don't block in accept. Instead
12331 register an event loop source on the listen socket file
12332 descriptor. Refactor bits into ...
12333 (listen_desc): ... this new global.
12334 (gdb_connected): ... this new function.
12335 (enable_async_notification): ... this new function.
12336 (handle_accept_event): ... this new function.
12337 (remote_close): Clear remote_desc.
12339 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12341 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12343 (mourn_inferior): Define.
12344 (target_process_qsupported): Avoid the dangling else problem.
12345 (thread_stopped): Define.
12346 (pause_all): Define.
12347 (target_waitstatus_to_string): Declare.
12348 * target.c (target_waitstatus_to_string): New.
12350 * tracepoint.c (tracing): Make extern.
12351 (disconnected_tracing): New.
12352 (stop_tracing): Make extern. Handle tracing stops due to GDB
12354 (cmd_qtdisconnected): New.
12355 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12356 (handle_tracepoint_general_set): Handle QTDisconnected.
12358 * event-loop.c (event_handler_func): Change return type to int.
12359 (process_event): Bail out if the event handler wants the event
12361 (handle_file_event): Ditto.
12362 (start_event_loop): Bail out if the event handler wants the event
12365 * nto-low.c (nto_target_ops): Adjust.
12366 * spu-low.c (spu_wait): Don't remove the process here.
12367 (spu_target_ops): Adjust.
12368 * win32-low.c (win32_wait): Don't remove the process here.
12369 (win32_target_ops): Adjust.
12371 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12373 * regcache.c (realloc_register_cache): Invalidate inferior's
12374 regcache before recreating it.
12376 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12378 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12380 2010-04-09 Stan Shebs <stan@codesourcery.com>
12381 Pedro Alves <pedro@codesourcery.com>
12383 * server.h (LONGEST): New.
12384 (struct thread_info) <while_stepping>: New field.
12385 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12387 (initialize_tracepoint, handle_tracepoint_general_set)
12388 (handle_tracepoint_query, tracepoint_finished_step)
12389 (tracepoint_was_hit, release_while_stepping_state_list):
12390 (current_traceframe): Declare.
12391 * server.c (handle_general_set): Handle tracepoint packets.
12392 (read_memory): New.
12393 (write_memory): New.
12394 (handle_search_memory_1): Use read_memory.
12395 (handle_query): Report support for conditional tracepoints, trace
12396 state variables, and tracepoint sources. Handle tracepoint
12398 (main): Initialize the tracepoints module.
12399 (process_serial_event): Handle traceframe reads/writes.
12401 * linux-low.c (handle_tracepoints): New.
12402 (linux_wait_1): Call it.
12403 (linux_resume_one_lwp): Handle while-stepping.
12404 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12405 (linux_target_ops): Install them.
12406 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12408 * linux-x86-low.c (x86_supports_tracepoints): New.
12409 (the_low_target). Install it.
12411 * mem-break.h (delete_breakpoint): Declare.
12412 * mem-break.c (delete_breakpoint): Make external.
12414 * target.h (struct target_ops): Add `supports_tracepoints',
12415 `read_pc', and `write_pc' fields.
12416 (target_supports_tracepoints): Define.
12417 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12420 * regcache.h (struct regcache) <registers_owned>: New field.
12421 (init_register_cache, regcache_cpy): Declare.
12422 (regcache_read_pc, regcache_write_pc): Declare.
12423 (register_cache_size): Declare.
12424 (supply_regblock): Declare.
12425 * regcache.c (init_register_cache): New.
12426 (new_register_cache): Use it.
12427 (regcache_cpy): New.
12428 (register_cache_size): New.
12429 (supply_regblock): New.
12430 (regcache_read_pc, regcache_write_pc): New.
12432 * tracepoint.c: New.
12434 * Makefile.in (OBS): Add tracepoint.o.
12435 (tracepoint.o): New rule.
12437 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12439 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12441 (i386-mmx.c): Likewise.
12442 (i386-mmx-linux.o): Likewise.
12443 (i386-mmx-linux.c): Likewise.
12445 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12446 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12447 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12448 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12450 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12451 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12452 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12454 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12456 * Makefile.in (clean): Updated.
12458 (i386-avx.c): Likewise.
12459 (i386-avx-linux.o): Likewise.
12460 (i386-avx-linux.c): Likewise.
12461 (amd64-avx.o): Likewise.
12462 (amd64-avx.c): Likewise.
12463 (amd64-avx-linux.o): Likewise.
12464 (amd64-avx-linux.c): Likewise.
12466 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12467 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12468 (srv_amd64_regobj): Add amd64-avx.o.
12469 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12470 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12471 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12472 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12473 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12474 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12475 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12477 * i387-fp.c: Include "i386-xstate.h".
12479 (i387_cache_to_xsave): Likewise.
12480 (i387_xsave_to_cache): Likewise.
12481 (x86_xcr0): Likewise.
12483 * i387-fp.h (i387_cache_to_xsave): Likewise.
12484 (i387_xsave_to_cache): Likewise.
12485 (x86_xcr0): Likewise.
12487 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12488 * linux-crisv32-low.c (target_regsets): Likewise.
12489 * linux-m68k-low.c (target_regsets): Likewise.
12490 * linux-mips-low.c (target_regsets): Likewise.
12491 * linux-ppc-low.c (target_regsets): Likewise.
12492 * linux-s390-low.c (target_regsets): Likewise.
12493 * linux-sh-low.c (target_regsets): Likewise.
12494 * linux-sparc-low.c (target_regsets): Likewise.
12495 * linux-xtensa-low.c (target_regsets): Likewise.
12497 * linux-low.c: Include <sys/uio.h>.
12498 (regsets_fetch_inferior_registers): Support nt_type.
12499 (regsets_store_inferior_registers): Likewise.
12500 (linux_process_qsupported): New.
12501 (linux_target_ops): Add linux_process_qsupported.
12503 * linux-low.h (regset_info): Add nt_type.
12504 (linux_target_ops): Add process_qsupported.
12506 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12508 (init_registers_i386_avx_linux): New.
12509 (init_registers_amd64_avx_linux): Likewise.
12510 (xmltarget_i386_linux_no_xml): Likewise.
12511 (xmltarget_amd64_linux_no_xml): Likewise.
12512 (PTRACE_GETREGSET): Likewise.
12513 (PTRACE_SETREGSET): Likewise.
12514 (x86_fill_xstateregset): Likewise.
12515 (x86_store_xstateregset): Likewise.
12516 (use_xml): Likewise.
12517 (x86_linux_update_xmltarget): Likewise.
12518 (x86_linux_process_qsupported): Likewise.
12519 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12520 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12521 init_registers_i386_linux here. Call
12522 x86_linux_update_xmltarget.
12523 (the_low_target): Add x86_linux_process_qsupported.
12525 * server.c (handle_query): Call target_process_qsupported.
12527 * target.h (target_ops): Add process_qsupported.
12528 (target_process_qsupported): New.
12530 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12532 * inferiors.c (add_thread): Set last_status kind to
12533 TARGET_WAITKIND_IGNORE.
12534 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12535 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12536 (linux_wait_1): Move `thread' local definition to block that uses
12537 it. Don't NULL initialize `event_child'.
12538 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12539 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12540 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12542 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12544 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12545 an extended waitstatus, or by a watchpoint.
12546 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12547 thread was stepping or has been stopped by a watchpoint.
12549 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12551 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12552 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12553 of another, then delete the previous, and validate all
12555 (validate_inserted_breakpoint): New.
12556 (delete_disabled_breakpoints): New.
12557 (validate_breakpoints): New.
12558 (check_mem_read): Validate breakpoints before trusting their
12559 shadow. Delete disabled breakpoints.
12560 (check_mem_write): Validate breakpoints before trusting they
12561 should be inserted. Delete disabled breakpoints.
12562 * mem-break.h (validate_breakpoints):
12563 * server.c (handle_query): Validate breakpoints when we see a
12566 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12568 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12569 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12570 if we could tell there's a GDB breakpoint at stop_pc.
12571 (need_step_over_p): Don't do a step over if we find a GDB
12572 breakpoint at the resume PC.
12574 * mem-break.c (struct raw_breakpoint): New.
12575 (enum bkpt_type): New type `gdb_breakpoint'.
12576 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12577 fields. New field `raw'.
12578 (find_raw_breakpoint_at): New.
12579 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12580 breakpoint instead.
12581 (set_breakpoint_at): Adjust.
12582 (delete_raw_breakpoint): New.
12583 (release_breakpoint): New.
12584 (delete_breakpoint): Rename to...
12585 (delete_breakpoint_1): ... this. Add proc parameter. Use
12586 release_breakpoint. Return ENOENT.
12587 (delete_breakpoint): Reimplement.
12588 (find_breakpoint_at): Delete.
12589 (find_gdb_breakpoint_at): New.
12590 (delete_breakpoint_at): Delete.
12591 (set_gdb_breakpoint_at): New.
12592 (delete_gdb_breakpoint_at): New.
12593 (gdb_breakpoint_here): New.
12594 (set_reinsert_breakpoint): Use release_breakpoint.
12595 (uninsert_breakpoint): Rename to ...
12596 (uninsert_raw_breakpoint): ... this.
12597 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12598 (reinsert_raw_breakpoint): Change parameter type to
12600 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12602 (check_breakpoints): Adjust. Use release_breakpoint.
12603 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12604 (breakpoint_inserted_here): Ditto.
12605 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12606 Don't trust the breakpoint's shadow if it is not inserted.
12607 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12608 (delete_all_breakpoints): Adjust.
12609 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12610 use delete_breakpoint_1.
12612 * mem-break.h (breakpoints_supported): Delete declaration.
12613 (set_gdb_breakpoint_at): Declare.
12614 (gdb_breakpoint_here): Declare.
12615 (delete_breakpoint_at): Delete.
12616 (delete_gdb_breakpoint_at): Declare.
12618 * server.h (struct raw_breakpoint): Forward declare.
12619 (struct process_info): New field `raw_breakpoints'.
12621 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12624 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12626 * linux-low.c (status_pending_p_callback): Fix comment.
12627 (linux_wait_for_event_1): Move most of the internal breakpoint
12628 handling from here...
12629 (linux_wait_1): ... to here.
12630 (count_events_callback): New.
12631 (select_singlestep_lwp_callback): New.
12632 (select_event_lwp_callback): New.
12633 (cancel_breakpoints_callback): New.
12634 (select_event_lwp): New.
12635 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12636 priority to all LWPs that have had events that should be reported
12637 to the client. Cancel breakpoints when about to reporting the
12638 event to the client, not while stopping lwps. No longer cancel
12639 finished single-steps here.
12640 (cancel_finished_single_step): Delete.
12641 (cancel_finished_single_steps): Delete.
12643 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12645 * mem-break.c (enum bkpt_type): New.
12646 (struct breakpoint): New field `type'.
12647 (set_breakpoint_at): Change return type to struct breakpoint
12648 pointer. Set type to `other_breakpoint' by default.
12649 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12650 in the breakpoint list.
12651 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12652 (reinsert_breakpoint): Rename to ...
12653 (reinsert_raw_breakpoint): ... this.
12654 (reinsert_breakpoints_at): Adjust.
12655 * mem-break.h (struct breakpoint): Declare.
12656 (set_breakpoint_at): Change return type to struct breakpoint
12659 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12661 * server.c (handle_query): Assign, not compare.
12663 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12665 Teach linux gdbserver to step-over-breakpoints.
12667 * linux-low.c (can_hardware_single_step): New.
12668 (supports_breakpoints): New.
12669 (handle_extended_wait): If stopping threads, read the stop pc of
12670 the new cloned LWP.
12672 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12673 low target doesn't support retrieving the PC.
12674 (add_lwp): Set last_resume_kind to resume_continue.
12675 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12676 (linux_attach): Don't clear stop_expected. Set the lwp's
12677 last_resume_kind to resume_stop.
12678 (linux_detach_one_lwp): Don't check for removed breakpoints.
12679 (check_removed_breakpoint): Delete.
12680 (status_pending_p): Rename to ...
12681 (status_pending_p_callback): ... this. Don't check for removed
12682 breakpoints. Don't consider threads that are stopped from GDB's
12684 (linux_wait_for_lwp): Always read the stop_pc here.
12685 (cancel_breakpoint): New.
12686 (step_over_bkpt): New global.
12687 (linux_wait_for_event_1): Implement stepping over breakpoints.
12688 (gdb_wants_lwp_stopped): New.
12689 (gdb_wants_all_stopped): New.
12690 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12691 single-step traps here. Store the thread's last reported target
12693 (send_sigstop): Don't clear stop_expected. Always set it,
12695 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12696 (cancel_finished_single_step): New.
12697 (cancel_finished_single_steps): New.
12698 (wait_for_sigstop): Don't cancel finished single-step traps here.
12699 (linux_resume_one_lwp): Don't check for removed breakpoints.
12700 Don't set `step' on non-hardware step archs.
12701 (linux_set_resume_request): Ignore resume_stop requests if already
12702 stopping or stopped. Set the lwp's last_resume_kind.
12703 (resume_status_pending_p): Don't check for removed breakpoints.
12704 (need_step_over_p): New.
12705 (start_step_over): New.
12706 (finish_step_over): New.
12707 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12708 requests. Clear the thread's last reported target waitstatus.
12709 Don't use the `suspended' flag. Don't consider pending breakpoints.
12710 (linux_resume): Start a step-over if necessary.
12711 (proceed_one_lwp): New.
12712 (proceed_all_lwps): New.
12713 (unstop_all_lwps): New.
12714 * linux-low.h (struct lwp_info): Rewrite comment for the
12715 `suspended' flag. Add the `stop_pc' field. Delete the
12716 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12717 Add `'last_resume_kind' and `need_step_over' fields.
12718 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12719 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12720 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12721 (set_raw_breakpoint_at): New.
12722 (set_breakpoint_at): Rewrite to use it.
12723 (reinsert_breakpoint_handler): Delete.
12724 (set_reinsert_breakpoint): New.
12725 (reinsert_breakpoint_by_bp): Delete.
12726 (delete_reinsert_breakpoints): New.
12727 (uninsert_breakpoint): Rewrite.
12728 (uninsert_breakpoints_at): New.
12729 (reinsert_breakpoint): Rewrite.
12730 (reinsert_breakpoints_at): New.
12731 (check_breakpoints): Rewrite.
12732 (breakpoint_here): New.
12733 (breakpoint_inserted_here): New.
12734 (check_mem_read): Adjust.
12735 * mem-break.h (breakpoints_supported, breakpoint_here)
12736 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12737 (reinsert_breakpoint_by_bp): Delete declaration.
12738 (delete_reinsert_breakpoints): Declare.
12739 (reinsert_breakpoint): Delete declaration.
12740 (reinsert_breakpoints_at): Declare.
12741 (uninsert_breakpoint): Delete declaration.
12742 (uninsert_breakpoints_at): Declare.
12743 (check_breakpoints): Adjust prototype.
12744 * server.h: Adjust include order.
12745 (struct thread_info): Declare here. Add a `last_status' field.
12747 2010-03-23 Michael Snyder <msnyder@vmware.com>
12749 * server.c (crc32): New function.
12750 (handle_query): Add handling for 'qCRC:' request.
12752 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12754 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12755 lwp had been stopped by a watchpoint.
12757 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12759 * server.h (internal_error): Declare.
12760 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12761 * utils.c (internal_error): New function.
12763 2010-03-15 Andreas Schwab <schwab@redhat.com>
12765 * configure.srv: Fix typo setting srv_regobj.
12767 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12769 * linux-low.c (fetch_register): Avoid passing a non string literal
12771 (usr_store_inferior_registers): Ditto.
12773 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12775 * linux-low.c (linux_write_memory): Bail out early if peeking
12778 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12780 * linux-low.h (struct lwp_info): New fields
12781 `stopped_by_watchpoint' and `stopped_data_address'.
12782 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12783 here, and cache them in the lwp object.
12784 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12786 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12788 (linux_stopped_by_watchpoint): Rewrite.
12789 (linux_stopped_data_address): Rewrite.
12791 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12793 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12794 switching the current inferior, not before.
12796 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12798 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12799 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12800 i386-linux.c and amd64-linux.c.
12801 (reg-i386.o): Removed.
12802 (reg-i386.c): Likewise.
12803 (reg-i386-linux.o): Likewise.
12804 (reg-i386-linux.c): Likewise.
12805 (reg-x86-64.o): Likewise.
12806 (reg-x86-64.c): Likewise.
12807 (reg-x86-64-linux.o): Likewise.
12808 (reg-x86-64-linux.c): Likewise.
12810 (i386.c): Likewise.
12811 (i386-linux.o): Likewise.
12812 (i386-linux.c): Likewise.
12813 (amd64.o): Likewise.
12814 (amd64.c): Likewise.
12815 (amd64-linux.o): Likewise.
12816 (amd64-linux.c): Likewise.
12818 * configure.srv (srv_i386_regobj): New.
12819 (srv_i386_linux_regobj): Likewise.
12820 (srv_amd64_regobj): Likewise.
12821 (srv_amd64_linux_regobj): Likewise.
12822 (srv_i386_32bit_xmlfiles): Likewise.
12823 (srv_i386_64bit_xmlfiles): Likewise.
12824 (srv_i386_xmlfiles): Likewise.
12825 (srv_amd64_xmlfiles): Likewise.
12826 (srv_i386_linux_xmlfiles): Likewise.
12827 (srv_amd64_linux_xmlfiles): Likewise.
12828 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12829 srv_xmlfiles to $srv_i386_xmlfiles.
12830 (i[34567]86-*-mingw32ce*): Likewise.
12831 (i[34567]86-*-mingw*): Likewise.
12832 (i[34567]86-*-nto*): Likewise.
12833 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12834 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12835 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12836 (x86_64-*-linux*): Likewise.
12838 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12839 (init_registers_amd64_linux): New.
12840 (x86_arch_setup): Replace init_registers_x86_64_linux with
12841 init_registers_amd64_linux.
12843 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12845 * configure.ac: Check for libdl. If it is not available link against
12846 static libthread_db.
12847 * configure: Regenerate.
12849 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12853 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12854 handing a read watchpoint.
12855 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12857 2010-02-12 Doug Evans <dje@google.com>
12859 * linux-low.c (linux_supports_tracefork_flag): Document.
12860 (linux_look_up_symbols): Add comment.
12862 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12864 * regcache.c (supply_register): Clear regcache if buf is NULL.
12866 2010-02-02 Nicolas Roche <roche@sourceware.org>
12867 Joel Brobecker <brobecker@adacore.com>
12869 * inferiors.c (find_inferior): Add function documentation.
12870 (unloaded_dll): Handle the case where the unloaded dll has not
12871 been previously registered in the dll list.
12873 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12875 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12876 (thumb2_breakpoint): New.
12877 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12879 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12881 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12882 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12885 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12887 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12889 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12891 * linux-s390-low.c (s390_collect_ptrace_register)
12892 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12894 2010-01-21 Doug Evans <dje@google.com>
12896 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12897 (PTRACE_ARG4_TYPE): New macro.
12898 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12899 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12900 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12901 (usr_store_inferior_registers): Ditto.
12902 (linux_read_memory, linux_write_memory): Ditto.
12903 (linux_test_for_tracefork): Ditto.
12905 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12906 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12908 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12910 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12913 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12915 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12916 prototype to take a regcache. Adjust.
12918 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12920 * regcache.h (struct thread_info): Forward declare.
12921 (struct regcache): New.
12922 (new_register_cache): Adjust prototype.
12923 (get_thread_regcache): Declare.
12924 (free_register_cache): Adjust prototype.
12925 (registers_to_string, registers_from_string): Ditto.
12926 (supply_register, supply_register_by_name, collect_register)
12927 (collect_register_as_string, collect_register_by_name): Ditto.
12928 * regcache.c (struct inferior_regcache_data): Delete.
12929 (get_regcache): Rename to ...
12930 (get_thread_regcache): ... this. Adjust. Switch inferior before
12931 fetching registers.
12932 (regcache_invalidate_one): Adjust.
12933 (regcache_invalidate): Fix prototype.
12934 (new_register_cache): Return the new register cache.
12935 (free_register_cache): Change prototype.
12936 (realloc_register_cache): Adjust.
12937 (registers_to_string): Change prototype to take a regcache. Adjust.
12938 (registers_from_string): Ditto.
12939 (register_data): Ditto.
12940 (supply_register): Ditto.
12941 (supply_register_by_name): Ditto.
12942 (collect_register): Ditto.
12943 (collect_register_as_string): Ditto.
12944 (collect_register_by_name): Ditto.
12945 * server.c (process_serial_event): Adjust.
12946 * linux-low.h (regset_fill_func, regset_store_func): Change
12948 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12950 * linux-low.c (get_stop_pc): Adjust.
12951 (check_removed_breakpoint): Adjust.
12952 (linux_wait_for_event): Adjust.
12953 (linux_resume_one_lwp): Adjust.
12954 (fetch_register): Add regcache parameter. Adjust.
12955 (usr_store_inferior_registers): Ditto.
12956 (regsets_fetch_inferior_registers): Ditto.
12957 (regsets_store_inferior_registers): Ditto.
12958 (linux_fetch_registers, linux_store_registers): Ditto.
12959 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12961 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12963 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12964 prototype to take a regcache.
12965 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12966 * remote-utils.c (convert_ascii_to_int, outreg)
12967 (prepare_resume_reply): Change prototype to take a regcache.
12969 * target.h (struct target_ops) <fetch_registers, store_registers>:
12970 Change prototype to take a regcache.
12971 (fetch_inferior_registers, store_inferior_registers): Change
12972 prototype to take a regcache. Adjust.
12973 * proc-service.c (ps_lgetregs): Adjust.
12974 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12975 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12976 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12977 take a regcache. Adjust.
12978 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12979 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12980 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12981 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12982 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12983 (cris_cannot_fetch_register):
12984 (cris_breakpoint_at): Change prototype to take a regcache.
12986 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12987 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12988 to take a regcache. Adjust.
12989 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12991 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12992 take a regcache. Adjust.
12993 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12994 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12995 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12996 * linux-mips-low.c (mips_get_pc):
12997 (mips_set_pc): Change prototype to take a regcache. Adjust.
12998 (mips_reinsert_addr): Adjust.
12999 (mips_collect_register): Change prototype to take a regcache.
13001 (mips_supply_register):
13002 (mips_collect_register_32bit, mips_supply_register_32bit)
13003 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13004 (mips_store_fpregset): Ditto.
13005 * linux-ppc-low.c (ppc_supply_ptrace_register)
13006 (ppc_supply_ptrace_register): Ditto.
13007 (parse_spufs_run): Adjust.
13008 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13009 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13010 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13011 take a regcache. Adjust.
13012 * linux-s390-low.c (s390_collect_ptrace_register)
13013 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13014 (s390_set_pc): Change prototype to take a regcache. Adjust.
13015 (s390_arch_setup): Adjust.
13016 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13017 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13018 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13019 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13020 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13022 (sparc_breakpoint_at): Adjust.
13023 * linux-xtensa-low.c (xtensa_fill_gregset):
13024 (xtensa_store_gregset):
13025 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13026 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13027 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13028 prototype to take a regcache. Adjust.
13029 * win32-arm-low.c (arm_fetch_inferior_register)
13030 (arm_store_inferior_register): Change prototype to take a
13032 * win32-i386-low.c (i386_fetch_inferior_register)
13033 (i386_store_inferior_register): Change prototype to take a
13035 * win32-low.c (child_fetch_inferior_registers)
13036 (child_store_inferior_registers): Change prototype to take a
13038 (win32_wait): Adjust.
13039 (win32_fetch_inferior_registers): Change prototype to take a
13041 (win32_store_inferior_registers): Adjust.
13042 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13043 store_inferior_register>: Change prototype to take a regcache.
13045 2010-01-20 Doug Evans <dje@google.com>
13047 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13049 (linux_wait_for_event1, linux_init_signals): Ditto.
13050 (W_STOPCODE): Provide definition if missing.
13052 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13054 * linux-low.c (linux_core_of_thread): New.
13055 (compare_ints, show_process, list_threads): New.
13056 (linux_qxfer_osdata): Report threads and cores.
13057 (linux_target_op): Register linux_core_of_thread.
13058 * remote-utils.c (prepare_resume_reply): Report the core.
13059 (buffer_xml_printf): Support %d specifier.
13060 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13062 (handle_query): Handle qXfer:threads. Announce availability
13064 * target.h (struct target_ops): New field core_of_thread.
13066 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13068 * Makefile.in (clean): Remove new generated files.
13069 (reg-s390.o, reg-s390.c): Remove rules.
13070 (reg-s390x.o, reg-s390x.c): Likewise.
13071 (s390-linux32.o, s390-linux32.c): Add rules.
13072 (s390-linux64.o, s390-linux64.c): Likewise.
13073 (s390x-linux64.o, s390x-linux64.c): Likewise.
13074 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13075 * linux-s390-low.c: Include <elf.h>.
13076 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13077 (init_registers_s390): Remove prototype.
13078 (init_registers_s390x): Likewise.
13079 (init_registers_s390_linux32): Add prototype.
13080 (init_registers_s390_linux64): Likewise.
13081 (init_registers_s390x_linux64): Likewise.
13082 (s390_num_regs_3264): New define.
13083 (s390_regmap_3264): New global variable.
13084 (s390_cannot_fetch_register): Remove obsolete check.
13085 (s390_cannot_store_register): Likewise.
13086 (s390_collect_ptrace_register): Handle upper/lower register halves.
13087 (s390_supply_ptrace_register): Likewise.
13088 (s390_fill_gregset): Update to register number changes.
13089 (s390_get_hwcap): New routine.
13090 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13091 Install appropriate regmap and register set.
13093 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13095 * server.c (gdbserver_version): Update copyright year to 2010.
13096 * gdbreplay.c (gdbreplay_version): Likewise.
13098 2009-12-28 Doug Evans <dje@google.com>
13100 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13101 elf/external.h. Include <elf.h> instead but only if necessary.
13103 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13105 * linux-low.c (linux_remove_process): Remove `detaching'
13106 parameter. Don't release/detach from thread_db here.
13107 (linux_kill): Release/detach from thread_db here, ...
13108 (linux_detach): ... and here, before actually detaching.
13109 (linux_wait_1): ... and here, when a process exits.
13110 * thread-db.c (any_thread_of): New.
13111 (thread_db_free): Switch the current inferior to a thread of the
13114 2009-12-21 Doug Evans <dje@google.com>
13116 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13118 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13119 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13120 warning ifndef __NR_tkill. Move setting of errno there too.
13121 Delete unnecessary resetting of errno after syscall.
13122 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13124 * configure.ac: Check for dladdr.
13125 * config.in: Regenerate.
13126 * configure: Regenerate.
13127 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13128 (try_thread_db_load): Update.
13130 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13132 2009-12-18 Doug Evans <dje@google.com>
13134 * event-loop.c: Include unistd.h if it exists.
13136 * linux-low.c (my_waitpid): Move definition away from being in
13137 between linux_tracefork_child/linux_test_for_tracefork.
13139 * gdb_proc_service.h (psaddr_t): Fix type.
13140 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13141 signature to match glibc.
13143 2009-12-16 Doug Evans <dje@google.com>
13145 * linux-low.c (linux_read_memory): Fix argument to read.
13147 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13149 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13150 events, don't leave current_inferior pointing at null.
13152 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13154 * win32-low.c (LOG): Delete.
13155 (OUTMSG): Output to stderr.
13156 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13157 on compile time LOG macro.
13158 (win32_wait): Fix debug output.
13160 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13162 * win32-low.c (win32_add_one_solib): If the dll name is
13163 "ntdll.dll", prepend the system directory to the dll path.
13165 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13167 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13169 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13170 Vladimir Prus <vladimir@codesourcery.com>
13172 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13173 * configure.ac: Check for __mcoldfire__ and set
13174 gdb_cv_m68k_is_coldfire.
13175 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13176 reg-cf.o and reg-m68k.o.
13177 * configure: Regenerated.
13179 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13181 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13182 Pass it to thread_db_free.
13183 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13184 proper `detaching' argument to linux_remove_process.
13185 * linux-low.h (thread_db_free): Add `detaching' parameter.
13186 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13188 (thread_db_free): Add `detaching' parameter. Only
13189 call td_ta_clear_event if detaching from process.
13191 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13193 * thread-db.c (thread_db_free): Fix typo.
13195 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13198 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13200 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13202 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13203 with an i686 compiler.
13204 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13206 * configure: Rebuilt.
13208 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13212 * server.c (handle_search_memory_1): Correct read_addr initialization
13213 in loop for searching subsequent chunks.
13215 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13217 * configure.ac: New --with-libthread-db option.
13218 * thread-db.c: Allow direct dependence on libthread_db.
13219 (thread_db_free): Adjust.
13220 * config.in: Regenerate.
13221 * configure: Likewise.
13223 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13226 * thread-db.c (attach_thread): New function.
13227 (maybe_attach_thread): Return success/failure.
13228 (find_new_threads_callback): Adjust.
13229 (thread_db_find_new_threads): Loop until no new threads.
13231 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13233 * proc-service.c (ps_lgetregs): Formatting.
13235 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13237 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13238 * configure.ac: Adjust.
13239 * linux-low.h (struct process_info_private): Move members to struct
13241 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13242 * linux-low.c (linux_remove_process): Adjust.
13243 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13244 * server.c (handle_query): Move code ...
13245 (handle_monitor_command): ... here. New function.
13246 * target.h (struct target_ops): New member.
13247 * thread-db.c (struct thread_db): New.
13248 (libthread_db_search_path): New variable.
13249 (thread_db_create_event, thread_db_enable_reporting)
13250 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13251 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13252 (try_thread_db_load_1, dladdr_to_soname): New functions.
13253 (try_thread_db_load, thread_db_load_search): New functions.
13254 (thread_db_init): Search for libthread_db.
13255 (thread_db_free): New function.
13256 (thread_db_handle_monitor_command): Likewise.
13257 * config.in: Regenerate.
13258 * configure: Regenerate.
13260 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13262 * spu-low.c (spu_kill): Wait for inferior to terminate.
13263 Call clear_inferiors.
13264 (spu_detach): Call clear_inferiors.
13266 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13268 * aclocal.m4: Regenerate.
13269 * config.in: Likewise.
13270 * configure: Likewise.
13272 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13274 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13275 (parse_spufs_run): New function.
13276 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13277 (ppc_breakpoint_at): Handle SPU breakpoints.
13279 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13281 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13282 (SPUFS_MAGIC): Define.
13283 (spu_enumerate_spu_ids): New function.
13284 (linux_qxfer_spu): New function.
13285 (linux_target_ops): Install linux_qxfer_spu.
13287 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13289 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13290 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13291 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13292 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13293 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13294 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13295 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13296 (init_registers_powerpc_cell32l): Add prototype.
13297 (init_registers_powerpc_cell64l): Likewise.
13298 (ppc_arch_setup): Detect Cell/B.E. architecture.
13300 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13302 * Makefile.in (datarootdir): New variable.
13304 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13306 * linux-low.c (linux_write_memory): Update debugging output.
13307 * Makefile.in (clean): Add new descriptions.
13308 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13309 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13310 * configure.srv: Add new files for arm*-*-linux*.
13311 * linux-arm-low.c: Add new declarations.
13312 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13313 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13314 (HWCAP_VFPv3D16): New.
13315 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13316 instead of __IWMMXT__.
13317 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13318 (arm_arch_setup): New.
13319 (target_regsets): Remove #ifdef. Add VFP regset.
13320 (the_low_target): Use arm_arch_setup.
13322 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13324 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13325 the main thread again.
13327 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13329 Adding Neutrino gdbserver.
13330 * configure: Regenerated.
13331 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13332 * configure.srv (i[34567]86-*-nto*): New target.
13333 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13334 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13335 (nto_comctrl) [__QNX__]: New function.
13336 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13338 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13340 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13343 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13344 Pedro Alves <pedro@codesourcery.com>
13346 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13347 don't support CONTEXT_EXTENDED_REGISTERS.
13348 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13349 (the_low_target): Install them.
13350 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13351 failing with ERROR_PIPE_NOT_CONNECTED.
13353 2009-06-30 Doug Evans <dje@google.com>
13354 Pierre Muller <muller@ics.u-strasbg.fr>
13356 Add h/w watchpoint support to x86-linux, win32-i386.
13357 * Makefile.in (SFILES): Add i386-low.c
13358 (i386_low_h): Define.
13359 (i386-low.o): Add dependencies.
13360 (linux-x86-low.o): Add i386-low.h dependency.
13361 (win32-i386-low.o): Ditto.
13362 * i386-low.c: New file.
13363 * i386-low.h: New file.
13364 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13365 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13366 * linux-low.c (linux_add_process): Initialize arch_private.
13367 (linux_remove_process): Free arch_private.
13368 (add_lwp): Initialize arch_private.
13369 (delete_lwp): Free arch_private.
13370 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13372 * linux-low.h (process_info_private): New member arch_private.
13373 (lwp_info): New member arch_private.
13374 (linux_target_ops): New members new_process, new_thread,
13376 (ptid_of): New macro.
13377 * linux-x86-low.c: Include stddef.h, i386-low.h.
13378 (arch_process_info): New struct.
13379 (arch_lwp_info): New struct.
13380 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13381 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13382 (i386_dr_low_get_status): New function.
13383 (x86_insert_point, x86_remove_point): New functions.
13384 (x86_stopped_by_watchpoint): New function.
13385 (x86_stopped_data_address): New function.
13386 (x86_linux_new_process, x86_linux_new_thread): New functions.
13387 (x86_linux_prepare_to_resume): New function.
13388 (the_low_target): Add entries for insert_point, remove_point,
13389 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13391 * server.c (debug_hw_points): New global.
13392 (monitor_show_help): Document set debug-hw-points.
13393 (handle_query): Process "set debug-hw-points".
13394 * server.h (debug_hw_points): Declare.
13395 (paddress): Declare.
13396 * utils.c (NUMCELLS, CELLSIZE): New macros.
13397 (get_sell, xsnprintf, paddress): New functions.
13398 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13399 remove_point, stopped_by_watchpoint, stopped_data_address.
13400 * win32-i386-low.c: Include i386-low.h.
13401 (debug_reg_state): Replaces dr.
13402 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13403 (i386_dr_low_get_status): New function.
13404 (i386_insert_point, i386_remove_point): New functions.
13405 (i386_stopped_by_watchpoint): New function.
13406 (i386_stopped_data_address): New function.
13407 (i386_initial_stuff): Update.
13408 (get_thread_context,set_thread_context,i386_thread_added): Update.
13409 (the_low_target): Add entries for insert_point,
13410 remove_point, stopped_by_watchpoint, stopped_data_address.
13411 * win32-low.c (win32_insert_watchpoint): New function.
13412 (win32_remove_watchpoint): New function.
13413 (win32_stopped_by_watchpoint): New function.
13414 (win32_stopped_data_address): New function.
13415 (win32_target_ops): Add entries for insert_watchpoint,
13416 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13417 * win32-low.h (win32_target_ops): New members insert_point,
13418 remove_point, stopped_by_watchpoint, stopped_data_address.
13420 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13422 * server.c (process_serial_event): Re-return unsupported, not
13423 error, if the type isn't recognized. Re-allow supporting only
13424 insert or remove packets. Also call require_running for
13425 breakpoints. Add missing break statement to default case. Tidy.
13426 * target.h (struct target_ops): Rename insert_watchpoint to
13427 insert_point, and remove_watchpoint to remove_point.
13429 * linux-low.h (struct linux_target_ops): Likewise.
13430 * linux-low.c (linux_insert_watchpoint): Rename to ...
13431 (linux_insert_point): ... this. Adjust.
13432 (linux_remove_watchpoint): Rename to ...
13433 (linux_remove_point): ... this. Adjust.
13434 (linux_target_ops): Adjust.
13435 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13436 (cris_insert_point): ... this.
13437 (cris_remove_watchpoint): Rename to ...
13438 (cris_remove_point): ... this.
13439 (the_low_target): Adjust.
13441 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13443 * server.c (handle_v_kill): Pass signal_pid to
13444 kill_inferior if multi_process is zero.
13446 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13448 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13449 * target.h (target_ops): Comment for *_watchpoint to make it clear
13450 the functions can get types '0' and '1'.
13452 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13454 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13455 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13456 * regcache.c (get_regcache): Likewise.
13457 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13458 * win32-low.c (child_fetch_inferior_registers): Remove check for
13461 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13462 Pedro Alves <pedro@codesourcery.com>
13464 * target.h (struct target_ops) <supports_multi_process>: New
13466 (target_supports_multi_process): New.
13467 * server.c (handle_query): Even if GDB reports support, only
13468 enable multi-process if the target also supports it. Report
13469 multi-process support only if the target backend supports it.
13470 * linux-low.c (linux_supports_multi_process): New function.
13471 (linux_target_ops): Install it as target_supports_multi_process
13474 2009-05-24 Doug Evans <dje@google.com>
13476 Global renaming of find_thread_pid to find_thread_ptid.
13477 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13478 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13479 All callers updated.
13481 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13482 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13485 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13486 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13487 (linux_resume_one_lwp): Ditto.
13489 2009-05-23 Doug Evans <dje@google.com>
13491 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13492 from struct inferior_list_entry * to struct lwp_info *.
13493 All callers updated.
13495 2009-05-13 Doug Evans <dje@google.com>
13497 * linux-x86-low.c: Don't include assert.h.
13498 (x86_siginfo_fixup): Use fatal, not assert.
13499 (x86_arch_setup): Fix comment.
13501 2009-05-12 Doug Evans <dje@google.com>
13503 Biarch support for i386/amd64 gdbserver.
13504 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13505 Add linux-x86-low.c.
13506 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13507 (linux-x86-low.o): Add.
13508 * linux-x86-64-low.c: Delete.
13509 * linux-i386-low.c: Delete.
13510 * linux-x86-low.c: New file.
13511 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13513 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13515 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13516 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13517 (linux_child_pid_to_exec_file): New function.
13518 (elf_64_header_p, elf_64_file_p): New functions.
13519 (siginfo_fixup): New function.
13520 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13521 give target a chance to convert layout.
13522 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13523 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13525 2009-05-07 Doug Evans <dje@google.com>
13527 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13528 (regsets_store_inferior_registers): Ditto.
13530 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13534 * linux-low.c (must_set_ptrace_flags): Delete.
13535 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13537 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13538 `lwp->must_set_ptrace_flags' instead.
13539 (linux_wait_for_event_1): Set ptrace options here.
13540 (linux_wait_1): ... not here.
13542 2009-04-30 Doug Evans <dje@google.com>
13544 * inferiors.c (started_inferior_callback): New function.
13545 (attached_inferior_callback): New function.
13546 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13547 * server.c (print_started_pid, print_attached_pid): New functions.
13548 (detach_or_kill_for_exit): New function.
13549 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13550 * server.h (have_started_inferiors_p): Declare.
13551 (have_attached_inferiors_p): Declare.
13553 * inferiors.c (remove_process): Fix memory leak, free process.
13554 * linux-low.c (linux_remove_process): New function.
13555 (linux_kill): Call it instead of remove_process.
13556 (linux_detach, linux_wait_1): Ditto.
13558 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13560 * configure.srv: Add x86 Windows CE target.
13562 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13564 * inferiors.c (get_thread_process): Make global.
13565 * server.h (get_thread_process): Add prototype.
13566 * thread-db.c (find_one_thread): Use get_thread_process
13567 instead of current_process.
13568 (thread_db_get_tls_address): Do not crash if called when
13569 thread layer is not yet initialized.
13571 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13573 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13574 * spu-low.c (current_tid): Rename to ...
13575 (current_ptid): ... this.
13576 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13577 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13578 ptid_get_lwp (current_ptid) instead of current_tid.
13579 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13580 instead of current_tid. Use find_process_pid to verify pid
13581 argument is valid. Pass proper argument to remove_process.
13582 (spu_thread_alive): Compare current_ptid instead of current_tid.
13583 (spu_resume): Likewise.
13585 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13587 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13590 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13592 Implement the multiprocess extensions, and add linux multiprocess
13595 * server.h (ULONGEST): Declare.
13596 (struct ptid, ptid_t): New.
13597 (minus_one_ptid, null_ptid): Declare.
13598 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13599 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13600 (struct inferior_list_entry): Change `id' type from unsigned from
13602 (struct sym_cache, struct breakpoint, struct
13603 process_info_private): Forward declare.
13604 (struct process_info): Declare.
13605 (current_process): Declare.
13606 (all_processes): Declare.
13607 (initialize_inferiors): Declare.
13608 (add_thread): Adjust to use ptid_t.
13609 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13610 (add_process, remove_process, find_thread_pid): Declare.
13611 (find_inferior_id): Adjust to use ptid_t.
13612 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13613 (multi_process): Declare.
13614 (push_event): Adjust to use ptid_t.
13615 (read_ptid, write_ptid): Declare.
13616 (prepare_resume_reply): Adjust to use ptid_t.
13617 (clear_symbol_cache): Declare.
13618 * inferiors.c (all_processes): New.
13619 (null_ptid, minus_one_ptid): New.
13620 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13621 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13622 (add_thread): Change unsigned long to ptid. Remove gdb_id
13624 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13625 (gdb_id_to_thread): Rename to ...
13626 (find_thread_pid): ... this. Change unsigned long to ptid.
13627 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13628 (loaded_dll, pull_pid_from_list): Adjust.
13629 (add_process, remove_process, find_process_pid)
13630 (get_thread_process, current_process, initialize_inferiors): New.
13631 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13632 (struct target_waitstatus) <related_pid>: Ditto.
13633 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13634 return type to int.
13635 (struct target_ops) <join>: Add `pid' argument.
13636 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13637 (struct target_ops) <wait>: Add `ptid' field. Change return type
13639 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13640 (mywait): Add `ptid' argument. Change return type to ptid_t.
13641 (target_pid_to_str): Declare.
13642 * target.c (set_desired_inferior): Adjust to use ptids.
13643 (mywait): Add new `ptid' argument. Adjust.
13644 (target_pid_to_str): New.
13645 * mem-break.h (free_all_breakpoints): Declare.
13646 * mem-break.c (breakpoints): Delelete.
13647 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13648 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13649 to use per-process breakpoint list.
13650 (free_all_breakpoints): New.
13651 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13652 (symbol_cache, all_symbols_looked_up): Delete.
13654 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13656 (prepare_resume_reply): Change ptid argument's type from unsigned
13657 long to ptid_t. Adjust. Implement W;process and X;process.
13658 (free_sym_cache, clear_symbol_cache): New.
13659 (look_up_one_symbol): Adjust to per-process symbol cache. *
13660 * server.c (cont_thread, general_thread, step_thread): Change type
13662 (attached): Delete.
13663 (multi_process): New.
13664 (last_ptid): Change type to ptid_t.
13665 (struct vstop_notif) <ptid>: Change type to ptid_t.
13666 (queue_stop_reply, push_event): Change `ptid' argument's type to
13668 (discard_queued_stop_replies): Add `pid' argument.
13669 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13670 changes. Don't reference the `attached' global.
13671 (attach_inferior): Adjust to mywait interface changes.
13672 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13673 features. Handle and report "multiprocess+". Handle
13675 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13677 (handle_v_kill): New.
13678 (handle_v_stopped): Adjust to use target_pid_to_str.
13679 (handle_v_requests): Allow multiple attaches and runs when
13680 multiprocess extensions are in effect. Handle "vKill".
13681 (myresume): Adjust to use ptids.
13682 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13683 (handle_status): Adjust to discard_queued_stop_replies interface
13685 (first_thread_of, kill_inferior_callback)
13686 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13687 (main): Call initialize_inferiors. Adjust to use ptids, killing
13688 and detaching from all inferiors. Handle multiprocess packet
13690 * linux-low.h: Include gdb_proc_service.h.
13691 (struct process_info_private): New.
13692 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13693 <lwpid_of>: Use ptid_get_lwp.
13694 (get_lwp_thread): Adjust.
13695 (struct lwp_info): Add `dead' member.
13696 (find_lwp_pid): Declare.
13697 * linux-low.c (thread_db_active): Delete.
13698 (new_inferior): Adjust comment.
13699 (inferior_pid): Delete.
13700 (linux_add_process): New.
13701 (handle_extended_wait): Adjust.
13702 (add_lwp): Change unsigned long to ptid.
13703 (linux_create_inferior): Add process to processes table. Adjust
13704 to use ptids. Don't set new_inferior here.
13705 (linux_attach_lwp): Rename to ...
13706 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13707 it. Adjust to use ptids.
13708 (linux_attach_lwp): New.
13709 (linux_attach): Add process to processes table. Don't set
13711 (struct counter): New.
13712 (second_thread_of_pid_p, last_thread_of_process_p): New.
13713 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13714 multiple processes.
13715 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13716 processes. Remove process from process table.
13717 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13718 to multiple processes.
13719 (any_thread_of): New.
13720 (linux_detach): Add `pid' argument, and handle it. Remove process
13721 from processes table.
13722 (linux_join): Add `pid' argument. Handle it.
13723 (linux_thread_alive): Change unsighed long argument to ptid_t.
13724 Consider dead lwps as not being alive.
13725 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13726 threads we're not interested in.
13727 (same_lwp, find_lwp_pid): New.
13728 (linux_wait_for_lwp): Change `pid' argument's type from int to
13730 (linux_wait_for_event): Rename to ...
13731 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13732 from int to ptid_t. Adjust.
13733 (linux_wait_for_event): New.
13734 (linux_wait_1): Add `ptid' argument. Change return type to
13735 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13736 that exit from the process table.
13737 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13739 (mark_lwp_dead): New.
13740 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13741 stopping all threads, mark its main lwp as dead.
13742 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13744 (fetch_register, usr_store_inferior_registers)
13745 (regsets_fetch_inferior_registers)
13746 (regsets_store_inferior_registers, linux_read_memory)
13747 (linux_write_memory): Inline `inferior_pid'.
13748 (linux_look_up_symbols): Adjust to use per-process
13749 `thread_db_active'.
13750 (linux_request_interrupt): Adjust to use ptids.
13751 (linux_read_auxv): Inline `inferior_pid'.
13752 (initialize_low): Don't reference thread_db_active.
13753 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13754 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13755 (ps_getpid): Return the pid of the current inferior.
13756 * thread-db.c (proc_handle, thread_agent): Delete.
13757 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13759 (find_one_thread): Change argument type to ptid_t. Adjust to
13761 (maybe_attach_thread): Adjust to per-process data and ptids.
13762 (thread_db_find_new_threads): Ditto.
13763 (thread_db_init): Ditto.
13764 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13765 processes table. Adjust to use ptids.
13766 (spu_kill, spu_detach): Adjust interface. Remove process from
13768 (spu_join, spu_thread_alive): Adjust interface.
13769 (spu_wait): Adjust interface. Remove process from processes
13770 table. Adjust to use ptids.
13771 * win32-low.c (current_inferior_tid): Delete.
13772 (current_inferior_ptid): New.
13773 (debug_event_ptid): New.
13774 (thread_rec): Take a ptid. Adjust.
13775 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13776 (child_delete_thread): Ditto.
13777 (do_initial_child_stuff): Add `attached' argument. Add process to
13779 (child_fetch_inferior_registers, child_store_inferior_registers):
13781 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13782 (win32_attach): Pass 1 to do_initial_child_stuff.
13783 (win32_kill): Adjust interface. Remove process from processes
13785 (win32_detach): Ditto.
13786 (win32_join): Adjust interface.
13787 (win32_thread_alive): Take a ptid.
13788 (win32_resume): Adjust to use ptids.
13789 (get_child_debug_event): Ditto.
13790 (win32_wait): Adjust interface. Remove exiting process from
13793 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13795 Non-stop mode support.
13797 * server.h (non_stop): Declare.
13798 (gdb_client_data, handler_func): Declare.
13799 (delete_file_handler, add_file_handler, start_event_loop):
13801 (handle_serial_event, handle_target_event, push_event)
13802 (putpkt_notif): Declare.
13803 * target.h (enum resume_kind): New.
13804 (struct thread_resume): Replace `step' field by `kind' field.
13805 (TARGET_WNOHANG): Define.
13806 (struct target_ops) <wait>: Add `options' argument.
13807 <supports_non_stop, async, start_non_stop>: New fields.
13808 (target_supports_non_stop, target_async): New.
13809 (start_non_stop): Declare.
13810 (mywait): Add `options' argument.
13811 * target.c (mywait): Add `options' argument. Print child exit
13812 notifications here.
13813 (start_non_stop): New.
13814 * server.c (non_stop, own_buf, mem_buf): New globals.
13815 (struct vstop_notif): New.
13816 (notif_queue): New global.
13817 (queue_stop_reply, push_event, discard_queued_stop_replies)
13818 (send_next_stop_reply): New.
13819 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13821 (attach_inferior): In non-stop mode, don't wait for the target
13823 (handle_general_set): Handle QNonStop.
13824 (handle_query): When handling qC, return the current general
13825 thread, instead of the first thread of the list.
13826 (handle_query): If the backend supports non-stop mode, include
13827 QNonStop+ in the qSupported query response.
13828 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13830 (handle_v_attach, handle_v_run): Handle non-stop mode.
13831 (handle_v_stopped): New.
13832 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13833 (myresume): Adjust to use resume_kind. Handle non-stop.
13834 (queue_stop_reply_callback): New.
13835 (handle_status): Handle non-stop mode.
13836 (main): Clear non_stop flag on reconnection. Use the event-loop.
13837 Refactor serial protocol handling from here ...
13838 (process_serial_event): ... to this new function. When GDB
13839 selects any thread, select one here. In non-stop mode, wait until
13840 GDB acks all pending events before exiting.
13841 (handle_serial_event, handle_target_event): New.
13842 * remote-utils.c (remote_open): Install remote_desc in the event
13844 (remote_close): Remove remote_desc from the event loop.
13845 (putpkt_binary): Rename to...
13846 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13847 (putpkt_binary): New as wrapper around putpkt_binary_1.
13848 (putpkt_notif): New.
13849 (prepare_resume_reply): In non-stop mode, don't change the
13851 * event-loop.c: New.
13852 * Makefile.in (OBJ): Add event-loop.o.
13853 (event-loop.o): New rule.
13855 * linux-low.h (pid_of): Moved here.
13857 (get_lwp_thread): Use lwpid_of.
13858 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13859 * linux-low.c (pid_of): Delete.
13860 (inferior_pid): Use lwpid_of.
13861 (linux_event_pipe): New.
13862 (target_is_async_p): New.
13864 (handle_extended_wait): Use lwpid_of.
13865 (add_lwp): Don't set lwpid field.
13866 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13867 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13868 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13869 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13870 first. Adjust to linux_wait_for_event interface changes. Use
13872 (linux_detach): Don't delete the main lwp here.
13873 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13874 (status_pending_p): Don't consider explicitly suspended lwps.
13875 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13876 pointer. Add OPTIONS argument. Change return type to int. Use
13877 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13878 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13879 pointer. Add status pointer argument. Return a pid instead of a
13880 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13881 changes. In non-stop mode, don't switch to a random thread.
13882 (linux_wait): Rename to...
13883 (linux_wait_1): ... this. Add target_options argument, and handle
13884 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13885 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13886 clean exit and signal exit code. Don't stop all threads in
13887 non-stop mode. In all-stop mode, only stop all threads when
13888 reporting a stop to GDB. Handle explicit thread stop requests.
13889 (async_file_flush, async_file_mark): New.
13891 (send_sigstop): Use lwpid_of.
13892 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13893 interface changes. In non-stop mode, don't switch to a random
13895 (linux_resume_one_lwp): Use lwpid_of.
13896 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13897 (linux_resume_one_thread): ... this. Handle resume_stop. In
13898 non-stop mode, don't look for pending flag in all threads.
13899 (resume_status_pending_p): Don't consider explicitly suspended
13901 (my_waitpid): Reimplement. Emulate __WALL.
13902 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13904 (sigchld_handler, linux_supports_non_stop, linux_async)
13905 (linux_start_non_stop): New.
13906 (linux_target_ops): Register linux_supports_non_stop, linux_async
13907 and linux_start_non_stop.
13908 (initialize_low): Install SIGCHLD handler.
13909 * thread-db.c (thread_db_create_event, find_one_thread)
13910 (thread_db_get_tls_address): Use lwpid_of.
13911 * win32-low.c (win32_detach): Adjust to use resume_kind.
13912 (win32_wait): Add `options' argument.
13913 * spu-low.c (spu_resume): Adjust to use resume_kind.
13914 (spu_wait): Add `options' argument.
13916 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13918 Decouple target code from remote protocol.
13920 * target.h (enum target_waitkind): New.
13921 (struct target_waitstatus): New.
13922 (struct target_ops) <wait>: Return an unsigned long. Take a
13923 target_waitstatus pointer instead of a char pointer.
13924 (mywait): Likewise.
13925 * target.c (mywait): Change prototype to return an unsigned long.
13926 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13927 * server.h (thread_from_wait, old_thread_from_wait): Delete
13929 (prepare_resume_reply): Change prototype to take a
13931 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13932 (last_status, last_ptid): New.
13933 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13934 pid instead of a signal.
13935 (attach_inferior): Remove "status" and "signal" parameters.
13937 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13939 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13940 (handle_v_requests, myresume): Remove "status" and "signal"
13941 parameters. Adjust.
13942 (handle_status): New.
13943 (main): Delete local `status'. Adjust.
13944 * remote-utils.c: Include target.h.
13945 (prepare_resume_reply): Change prototype to take a
13946 target_waitstatus. Adjust.
13948 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13950 * spu-low.c (spu_wait): Adjust.
13951 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13953 (win32_wait): Adjust.
13955 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13957 * target.h (struct thread_resume): Delete leave_stopped member.
13958 (struct target_ops): Add a `n' argument to the `resume' callback.
13959 * server.c (start_inferior): Adjust.
13960 (handle_v_cont, myresume): Adjust.
13961 * linux-low.c (check_removed_breakpoint): Adjust to resume
13962 interface change, and to removed leave_stopped field.
13963 (resume_ptr): Delete.
13964 (struct thread_resume_array): New.
13965 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13966 resume interface change.
13967 (linux_continue_one_thread, linux_queue_one_thread)
13968 (resume_status_pending_p): Check if the resume field is NULL
13969 instead of checking the leave_stopped member.
13970 (linux_resume): Adjust to the target resume interface change.
13971 * spu-low.c (spu_resume): Adjust to the target resume interface
13973 * win32-low.c (win32_detach, win32_resume): Ditto.
13975 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13977 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13979 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13981 (linux_continue_one_thread): Only preserve the stepping flag if
13982 there's a pending breakpoint.
13984 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13986 * server.c (main): After the inferior having exited, call
13987 remote_close before exiting gdbserver.
13989 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13991 Fix size of FPSCR in Power 7 processors.
13992 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13993 (PPC_FEATURE_HAS_DFP): New #define.
13994 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13997 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13999 * server.c (handle_query) Whitespace and formatting.
14001 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14003 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14004 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14005 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14006 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14007 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14008 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14009 Makefile.in, configure.ac: Fix whitespace throughout.
14010 * configure: Regenerate.
14012 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14014 * inferiors.c (find_inferior): Make it safe for the callback
14015 function to delete the currently iterated inferior.
14017 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14019 * Makefile.in (linuw_low_h): Move higher.
14020 (thread-db.o): Depend on $(linux_low_h).
14022 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14024 Rename "process" to "lwp" throughout.
14026 * linux-low.c (all_processes): Rename to...
14027 (all_lwps): ... this.
14028 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14029 (add_process): Rename to ...
14030 (add_lwp): ... this. Adjust.
14031 (linux_create_inferior): Adjust.
14032 (linux_attach_lwp): Adjust.
14033 (linux_attach): Adjust.
14034 (linux_kill_one_process): Rename to ...
14035 (linux_kill_one_lwp): ... this. Adjust.
14036 (linux_kill): Adjust.
14037 (linux_detach_one_process): Rename to ...
14038 (linux_detach_one_lwp): ... this. Adjust.
14039 (linux_detach): Adjust.
14040 (check_removed_breakpoint): Adjust.
14041 (status_pending_p): Adjust.
14042 (linux_wait_for_process): Rename to ...
14043 (linux_wait_for_lwp): ... this. Adjust.
14044 (linux_wait_for_event): Adjust.
14045 (send_sigstop): Adjust.
14046 (wait_for_sigstop): Adjust.
14047 (stop_all_processes): Rename to ...
14048 (stop_all_lwps): ... this.
14049 (linux_resume_one_process): Rename to ...
14050 (linux_resume_one_lwp): ... this. Adjust.
14051 (linux_set_resume_request, linux_continue_one_thread)
14052 (linux_queue_one_thread, resume_status_pending_p)
14053 (usr_store_inferior_registers, regsets_store_inferior_registers)
14054 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14056 * linux-low.h (get_process): Rename to ...
14057 (get_lwp): ... this. Adjust.
14058 (get_thread_process): Rename to ...
14059 (get_thread_lwp): ... this. Adjust.
14060 (get_process_thread): Rename to ...
14061 (get_lwp_thread): ... this. Adjust.
14062 (struct process_info): Rename to ...
14063 (struct lwp_info): ... this.
14064 (all_processes): Rename to ...
14065 (all_lwps): ... this.
14066 * proc-service.c (ps_lgetregs): Adjust.
14067 * thread-db.c (thread_db_create_event, find_one_thread)
14068 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14070 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14072 * server.c (handle_query): Handle "qAttached".
14074 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14076 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14077 GPLv3, update license URL.
14079 2009-03-01 Doug Evans <dje@google.com>
14081 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14082 (server_h): Add gdb_signals.h.
14083 (signals.o): Update.
14084 * server.h (target_signal_from_host,target_signal_to_host_p)
14085 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14087 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14089 * remote-utils.c (getpkt): Also generate remote-debug
14090 information if noack_mode is set.
14092 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14094 * server.c (handle_query): Report qXfer:siginfo:read and
14095 qXfer:siginfo:write as supported and handle them.
14096 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14097 * linux-low.c (linux_xfer_siginfo): New.
14098 (linux_target_ops): Set it.
14100 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14102 * server.c (gdbserver_usage): Mention --remote-debug.
14103 (main): Accept '--remote-debug' switch.
14105 2009-01-18 Doug Evans <dje@google.com>
14107 * regcache.c (new_register_cache): No need to check result of xcalloc.
14108 * server.c (handle_search_memory): Back out calls to xmalloc,
14109 result is checked and error is returned to user upon failure.
14110 (handle_query): Ditto. Add more checks for result of malloc.
14111 (handle_v_cont): Check result of malloc, report error back to
14113 (handle_v_run): Ditto. Call freeargv.
14114 * server.h (freeargv): Declare.
14115 * utils.c (freeargv): New fn.
14117 2009-01-15 Doug Evans <dje@google.com>
14119 * gdbreplay.c (perror_with_name): Make arg const char *.
14120 * server.h (target_signal_to_name): Make return type const char *.
14121 * thread-db.c (thread_db_err_str): Make return type const char *.
14122 * utils.c (perror_with_name): Make arg const char *.
14124 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14126 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14127 when handling a EXIT_PROCESS_DEBUG_EVENT.
14129 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14131 * gdbreplay.c (gdbreplay_version): Update copyright year.
14132 * server.c (gdbserver_version): Likewise.
14134 2009-01-05 Doug Evans <dje@google.com>
14136 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14137 (handle_extended_wait): Improve comment.
14139 2008-12-13 Doug Evans <dje@google.com>
14141 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14142 * server.h (ATTR_MALLOC): New macro.
14143 (xmalloc,xcalloc,xstrdup): Declare.
14144 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14145 * inferiors.c: Ditto.
14146 * linux-low.c: Ditto.
14147 * mem-break.c: Ditto.
14148 * regcache.c: Ditto.
14149 * remote-utils.c: Ditto.
14152 * win32-low.c: Ditto.
14154 2008-12-12 Doug Evans <dje@google.com>
14156 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14157 in debugging printf.
14159 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14161 2008-12-09 Doug Evans <dje@google.com>
14163 * linux-low.h (struct process_info): Delete member tid, unused.
14164 * thread-db.c (find_one_thread): Update.
14165 (maybe_attach_thread): Update.
14167 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14169 * target.h (struct target_ops): Add qxfer_osdata member.
14170 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14172 (linux_qxfer_osdata): New functions.
14173 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14175 * server.c (handle_query): Handle "qXfer:osdata:read:".
14176 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14177 (buffer_xml_printf): New functions.
14178 * server.h (struct buffer): New.
14179 (buffer_grow_str, buffer_grow_str0): New macros.
14180 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14181 (buffer_xml_printf): Declare.
14183 2008-11-24 Doug Evans <dje@google.com>
14185 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14187 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14189 * server.c (handle_v_run): Always use the supplied argument list.
14191 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14193 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14194 (xtensa_regmap_table): Add entry for scompare1.
14196 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14198 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14199 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14200 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14201 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14202 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14203 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14204 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14205 XML target descriptions.
14206 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14207 when inferior is running on an ISA 2.05 or later processor. Add
14208 special case to return offset for full 64-bit slot of FPSCR when
14211 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14213 * Makefile.in (SFILES, clean): Added sparc64 files.
14214 (reg-sparc64.o, reg-sparc64.c): New.
14215 * configure.srv (sparc*-*-linux*): New configuration.
14216 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14217 syscall arguments for SPARC.
14218 (regsets_store_inferior_registers): Likewise.
14219 * linux-sparc-low.c: New file.
14221 2008-10-21 Doug Evans <dje@google.com>
14223 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14224 (READLINE_DIR,READLINE_DEP): Delete.
14225 (INTERNAL_CFLAGS): Update.
14226 (LINTFLAGS): Update.
14228 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14230 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14231 whole argv from the last run, not just argv[0].
14233 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14235 * regcache.c (new_register_cache): Return NULL if the register
14236 cache size isn't known yet.
14237 (free_register_cache): Avoid dereferencing a NULL regcache.
14239 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14241 * configure.srv: Merge MIPS and MIPS64.
14243 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14245 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14247 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14249 * Makefile.in: Add required vsx dependencies.
14251 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14252 Declare init_registers_powerpc_vsx32l.
14253 Declare init_registers_powerpc_vsx64l.
14254 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14255 (ppc_arch_setup): Check for VSX in hwcap.
14256 (ppc_fill_vsxregset): New function.
14257 (ppc_store_vsxregset): New function.
14258 Add new VSX entry in regset_info target_regsets.
14260 * configure.srv: Add new VSX dependencies.
14262 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14264 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14265 (remote_open): Set or clear transport_is_reliable.
14266 (putpkt_binary): Don't expect acks in noack mode.
14267 (getpkt): Don't send ack/nac in noack mode.
14268 * server.c (handle_general_set): Handle QStartNoAckMode.
14269 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14271 (main): Reset noack_mode on every connection.
14272 * server.h (noack_mode): Declare.
14274 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14276 * Makefile.in (GDBREPLAY_OBS): New variable.
14277 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14279 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14280 Daniel Jacobowitz <dan@codesourcery.com>
14282 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14283 (usr_store_inferior_registers): Likewise.
14284 (regsets_store_inferior_registers): Likewise.
14286 2008-07-31 Rolf Jansen <rj@surtec.com>
14287 Pedro Alves <pedro@codesourcery.com>
14289 * configure.ac: Check for memmem declaration.
14290 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14291 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14292 (disable_packet_qfThreadInfo): Unconditionally compile.
14293 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14294 * configure, config.in: Regenerate.
14296 2008-07-28 Doug Kwan <dougkwan@google.com>
14298 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14299 (linux_write_memory): Remove declaration of errno.
14301 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14303 * linux-low.c (handle_extended_wait): Do not use "status"
14304 variable uninitialized.
14306 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14308 * server.c (handle_v_attach): Inhibit reporting dll changes.
14310 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14312 * remote-utils.c (prepare_resume_reply): If requested, don't
14313 output "thread:TID" in the T stop reply.
14315 * server.c (disable_packet_vCont, disable_packet_Tthread)
14316 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14317 (handle_query): If requested, disable support for qC, qfThreadInfo
14319 (handle_v_requests): If requested, disable support for vCont.
14320 (gdbserver_show_disableable): New.
14321 (main): Handle --disable-packet and --disable-packet=LIST.
14323 * server.h (disable_packet_vCont, disable_packet_Tthread)
14324 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14326 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14328 * server.c (gdbserver_usage): Mention --version.
14330 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14332 * Makefile.in (gdbreplay.o): New rule.
14334 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14336 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14337 message, not gdbserver.
14339 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14340 Nathan Sidwell <nathan@codesourcery.com>
14341 Joseph Myers <joseph@codesourcery.com>
14343 * acinclude.m4: Include ../../config/acx.m4.
14344 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14345 * configure, config.in: Regenerate.
14346 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14347 * server.c (gdbserver_version): Print PKGVERSION.
14348 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14349 (main): Adjust gdbserver_usage calls.
14350 * gdbreplay.c (version, host_name): Add declarations.
14351 (gdbreplay_version, gdbreplay_usage): New.
14352 (main): Accept --version and --help options.
14354 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14356 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14357 (arm_breakpoint_at): Handle Thumb.
14358 (the_low_target): Add comment.
14360 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14362 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14364 2008-05-09 Doug Evans <dje@google.com>
14366 * server.h (decode_search_memory_packet): Declare.
14367 * remote-utils.c (decode_search_memory_packet): New fn.
14368 * server.c (handle_search_memory_1): New fn.
14369 (handle_search_memory): New fn.
14370 (handle_query): Process qSearch:memory packets.
14372 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14374 * regcache.c (registers_length): Remove.
14375 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14376 full register packet.
14377 * regcache.h (registers_length): Remove prototype.
14378 * server.h (PBUFSIZ): Define to 16384.
14380 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14382 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14383 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14384 powerpc-64l.o, and powerpc-altivec64l.o.
14385 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14386 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14387 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14388 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14389 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14392 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14393 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14394 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14395 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14396 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14397 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14398 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14399 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14400 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14401 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14404 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14405 (init_registers_powerpc_32l): ... this new prototype.
14406 (init_registers_powerpc_32): Remove, replace by ...
14407 (init_registers_powerpc_altivec32l): ... this new prototype.
14408 (init_registers_powerpc_e500): Remove, replace by ...
14409 (init_registers_powerpc_e500l): ... this new prototype.
14410 (init_registers_ppc64): Remove, replace by ...
14411 (init_registers_powerpc_64l): ... this new prototype.
14412 (init_registers_powerpc_64): Remove, replace by ...
14413 (init_registers_powerpc_altivec64l): ... this new prototype.
14414 (ppc_num_regs): Set to 73.
14415 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14416 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14417 (ppc_cannot_store_register): Handle orig_r3 and trap.
14418 (ppc_arch_setup): Update init_registers_... calls.
14419 (ppc_fill_gregset): Handle orig_r3 and trap.
14421 * inferiors.c (clear_inferiors): Reset current_inferior.
14423 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14425 * acinclude.m4: Add override.m4.
14426 * configure: Regenerate.
14428 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14430 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14431 initial call to init_register_ppc64.
14433 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14435 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14436 single powerpc*-*-linux* case.
14437 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14439 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14441 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14442 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14444 * linux-ppc-low.c: Include <elf.h>.
14445 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14446 (ppc_hwcap): New global variable.
14447 (ppc_regmap): Remove __SPE__ #ifdef sections.
14448 (ppc_regmap_e500): New global variable.
14449 (ppc_cannot_store_register): Update __SPE__ special case.
14450 (ppc_get_hwcap): New function.
14451 (ppc_arch_setup): Use it to determine whether inferior supports
14452 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14453 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14454 Do not access registers if target does not support AltiVec.
14455 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14456 Do not access registers if target does not support SPE.
14457 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14459 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14461 * linux-low.c (disabled_regsets, num_regsets): New.
14462 (use_regsets_p): Delete.
14463 (linux_wait_for_process): Clear disabled_regsets.
14464 (regsets_fetch_inferior_registers): Check and set it.
14465 (regsets_store_inferior_registers): Likewise.
14466 (linux_fetch_registers, linux_store_registers): Do not use
14468 (initialize_low): Allocate disabled_regsets.
14470 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14472 * Makefile.in (LIBOBJS): New.
14473 (OBS): Use LIBOBJS.
14474 (memmem.o): New rule.
14475 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14476 * configure: Regenerated.
14478 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14480 * server.c (handle_query): Never return "unsupported" for
14481 qXfer:features:read queries.
14483 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14485 * server.c (get_features_xml): Fix inverted condition.
14486 (handle_query): Always support qXfer:feature:read.
14488 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14490 * server.c (wrapper_argv): New.
14491 (start_inferior): Handle wrapper_argv. If set, expect an extra
14493 (gdbserver_usage): Document --wrapper.
14494 (main): Parse --wrapper.
14496 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14498 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14499 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14500 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14501 (ppc_set_pc): Likewise.
14502 (ppc_arch_setup): New function.
14503 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14504 of collect_register.
14505 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14507 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14509 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14510 instead of linux-ppc64-low.o.
14511 * linux-ppc64-low.c: Remove file.
14512 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14513 (linux-ppc64-low.o): Remove rule.
14515 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14516 (init_registers_powerpc_64): Likewise.
14517 (ppc_regmap): Conditionally define depending on __powerpc64__.
14518 (ppc_cannot_store_register): Do not special-case "fpscr" when
14519 compiled on __powerpc64__.
14520 (ppc_collect_ptrace_register): New function.
14521 (ppc_supply_ptrace_register): New function.
14522 (ppc_breakpoint): Change type to "unsigned int".
14523 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14524 (the_low_target): Conditionally provide initializers for the
14525 arch_setup member depending on __powerpc64__. Install
14526 collect_ptrace_register and supply_ptrace_register members.
14528 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14530 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14531 * server.c (gdbserver_xmltarget): Define.
14532 (get_features_xml): Use it to replace "target.xml" and arch_string.
14534 * configure.srv: Remove srv_xmltarget. Add XML files that were
14535 mentioned there to srv_xmlfiles instead. Remove conditional tests
14536 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14537 srv_xmlfiles and srv_regobj to include all possible choices.
14538 * configure.ac (srv_xmltarget): Remove.
14539 (srv_xmlfiles): Do not add "target.xml".
14540 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14541 checks for supplementary target information.
14542 * configure: Regenerate.
14543 * Makefile.in (XML_TARGET): Remove.
14544 (target.xml): Remove rule.
14545 (clean): Do not clean up target.xml.
14546 (.PRECIOUS): Do not mention target.xml.
14548 * target.h (struct target_ops): Remove arch_string member.
14549 * linux-low.c (linux_arch_string): Remove.
14550 (linux_target_ops): Remove arch_string initializer.
14551 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14552 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14553 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14554 * spu-low.c (spu_arch_string): Remove.
14555 (spu_target_ops): Remove arch_string initializer.
14556 * win32-low.c (win32_arch_string): Remove.
14557 (win32_target_ops): Remove arch_string initializer.
14558 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14559 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14560 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14562 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14564 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14565 by collect_ptrace_register and supply_ptrace_register hooks.
14566 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14567 instead of checking for the_low_target.left_pad_xfer.
14568 (usr_store_inferior_registers): Use collect_ptrace_register callback
14569 instead of checking for the_low_target.left_pad_xfer.
14571 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14572 (s390_supply_ptrace_register): Likewise.
14573 (s390_fill_gregset): Call s390_collect_ptrace_register.
14574 (the_low_target): Update.
14576 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14577 (ppc_supply_ptrace_register): Likewise.
14578 (the_low_target): Update.
14580 * linux-i386-low.c (the_low_target): Update.
14581 * linux-x86-64-low.c (the_low_target): Update.
14583 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14585 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14586 reg-s390.o and reg-s390x.o.
14588 * linux-low.c (new_inferior): New global variable.
14589 (linux_create_inferior, linux_attach): Set it.
14590 (linux_wait_for_process): Call the_low_target.arch_setup after the
14591 target has stopped for the first time.
14592 (initialize_low): Do not call the_low_target.arch_setup.
14594 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14595 (s390_set_pc): Likewise.
14596 (s390_arch_setup): New function.
14597 (the_low_target): Use s390_arch_setup as arch_setup routine.
14599 * regcache.c (realloc_register_cache): New function.
14600 (set_register_cache): Call it for each existing regcache.
14602 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14604 * server.h (init_registers): Remove prototype.
14606 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14607 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14608 instead of init_registers ().
14609 * linux-arm-low.c (init_registers_arm): Add prototype.
14610 (init_registers_arm_with_iwmmxt): Likewise.
14611 (the_low_target): Add initializer for arch_setup field.
14612 * linux-cris-low.c (init_registers_cris): Add prototype.
14613 (the_low_target): Add initializer for arch_setup field.
14614 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14615 (the_low_target): Add initializer for arch_setup field.
14616 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14617 (the_low_target): Add initializer for arch_setup field.
14618 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14619 (the_low_target): Add initializer for arch_setup field.
14620 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14621 (the_low_target): Add initializer for arch_setup field.
14622 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14623 (the_low_target): Add initializer for arch_setup field.
14624 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14625 (init_registers_mips64_linux): Likewise.
14626 (the_low_target): Add initializer for arch_setup field.
14627 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14628 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14629 (the_low_target): Add initializer for arch_setup field.
14630 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14631 (init_registers_powerpc_64): Likewise.
14632 (the_low_target): Add initializer for arch_setup field.
14633 * linux-s390-low.c (init_registers_s390): Add prototype.
14634 (init_registers_s390x): Likewise.
14635 (the_low_target): Add initializer for arch_setup field.
14636 * linux-sh-low.c (init_registers_sh): Add prototype.
14637 (the_low_target): Add initializer for arch_setup field.
14638 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14639 (the_low_target): Add initializer for arch_setup field.
14640 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14641 (the_low_target): Add initializer for arch_setup field.
14643 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14644 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14645 instead of init_registers ().
14646 * win32-arm-low.c (init_registers_arm): Add prototype.
14647 (the_low_target): Add initializer for arch_setup field.
14648 * win32-i386-low.c (init_registers_i386): Add prototype.
14649 (the_low_target): Add initializer for arch_setup field.
14651 * spu-low.c (init_registers_spu): Add prototype.
14652 (initialize_low): Call initialie_registers_spu () instead of
14653 initialize_registers ().
14655 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14657 * server.c (handle_v_requests): When handling the vRun and vAttach
14658 packets, if already debugging a process, don't kill it. Return an
14661 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14663 * server.c (handle_query): Correct length check.
14665 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14667 * win32-low.c (do_initial_child_stuff): Add process handle
14668 parameter. Set current_process_handle and current_process_id from the
14669 parameters. Clear globals.
14670 (win32_create_inferior): Don't set current_process_handle and
14671 current_process_id here. Instead pass them on the call to
14672 do_initial_child_stuff.
14673 (win32_attach): Likewise.
14674 (win32_clear_inferiors): New.
14675 (win32_kill): Don't close the current process handle or the
14676 current thread handle here. Instead call win32_clear_inferiors.
14677 (win32_detach): Don't open a new handle to the process. Call
14678 win32_clear_inferiors.
14679 (win32_join): Don't rely on current_process_handle; open a new
14680 handle using the process id.
14681 (win32_wait): Call win32_clear_inferiors when the inferior process
14684 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14686 * server.c (monitor_show_help): Add "exit".
14688 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14690 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14691 (clean): Add reg-xtensa.c.
14692 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14693 * configure.srv (xtensa*-*-linux*) New target.
14694 * linux-xtensa-low.c: New.
14695 * xtensa-xtregs.c: New.
14697 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14699 * hostio.c: Don't include errno.h.
14700 (errno_to_fileio_errno): Move to hostio-errno.
14701 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14702 error number outputting to the target->hostio_last_error callback.
14703 (hostio_packet_error): Use FILEIO_EINVAL directly.
14704 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14705 calls to hostio_error.
14706 * hostio-errno.c: New.
14707 * server.h (hostio_last_error_from_errno): Declare.
14708 * target.h (target_ops): Add hostio_last_error member.
14709 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14710 as hostio_last_error handler.
14711 * spu-low.c (spu_target_ops): Likewise.
14712 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14713 (wince_hostio_last_error): New functions.
14714 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14715 as hostio_last_error handler.
14716 (win32_target_ops) [!_WIN32_WCE]: Register
14717 hostio_last_error_from_errno as hostio_last_error handler.
14718 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14719 (hostio-errno.o): New rule.
14720 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14721 * configure.srv (srv_hostio_err_objs): New variable. Default to
14723 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14724 * configure: Regenerate.
14726 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14728 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14729 (linux_kill, linux_detach): Clean up the process list.
14730 * remote-utils.c (remote_open): Improve port number parsing.
14731 (putpkt_binary, input_interrupt): Only send interrupts if the target
14733 * server.c (extended_protocol): Make static.
14734 (attached): Define earlier.
14735 (exit_requested, response_needed, program_argv): New variables.
14736 (target_running): New.
14737 (start_inferior): Clear attached here.
14738 (attach_inferior): Set attached here.
14739 (require_running): Define.
14740 (handle_query): Use require_running and target_running. Implement
14742 (handle_v_attach, handle_v_run): New.
14743 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14744 (gdbserver_usage): Update.
14745 (main): Redo argument parsing. Handle --debug and --multi. Handle
14746 --attach along with other options or after the port. Save
14747 program_argv. Support no initial program. Resynchronize
14748 communication with GDB after an error. Handle "monitor exit".
14749 Use require_running and target_running. Always allow the extended
14750 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14751 restart in extended mode.
14752 * README: Refer to the GDB manual. Update --attach usage.
14754 2007-12-20 Andreas Schwab <schwab@suse.de>
14756 * linux-low.c (STACK_SIZE): Define.
14757 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14758 (linux_test_for_tracefork): Likewise.
14760 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14762 * linux-low.c (linux_wait_for_event): Update messages. Do not
14763 reinsert auto-delete breakpoints.
14764 * mem-break.c (struct breakpoint): Change return type of handler to
14766 (set_breakpoint_at): Update handler type.
14767 (reinsert_breakpoint_handler): Return 1 instead of calling
14769 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14771 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14772 * mem-break.h (set_breakpoint_at): Update handler type.
14773 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14774 * win32-low.c (auto_delete_breakpoint): New.
14775 (get_child_debug_event): Use it.
14777 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14779 * configure.ac: Check for pread and pwrite.
14780 * hostio.c (handle_pread): Fall back to lseek and read.
14781 (handle_pwrite): Fall back to lseek and write.
14782 * config.in, configure: Regenerated.
14784 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14786 * server.c (myresume): Add own_buf argument.
14787 (main): Update calls.
14789 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14791 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14792 * remote-utils.c (remote_open): Do not call disable_async_io.
14793 (block_async_io): Delete.
14794 (unblock_async_io): Make static.
14795 (initialize_async_io): New.
14796 * server.c (handle_v_cont): Handle async I/O here.
14797 (myresume): Likewise. Move other common resume tasks here...
14798 (main): ... from here. Call initialize_async_io. Disable async
14799 I/O before the main loop.
14800 * server.h (initialize_async_io): Declare.
14801 (block_async_io, unblock_async_io): Delete prototypes.
14802 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14804 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14806 * remote-utils.c (readchar): Allow binary data in received messages.
14808 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14810 * win32-low.c (attaching): New global.
14811 (win32_create_inferior): Clear the `attaching' global.
14812 (win32_attach): Set the `attaching' global.
14813 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14814 attaching. Only set a breakpoint at the entry point if not
14817 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14819 * server.c (main): Don't report dll events on the initial
14820 connection on attaches.
14822 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14824 * server.c (main): Relax numerical bases supported for the pid of
14825 the --attach command line argument.
14827 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14829 * win32-low.c (win32_attach): Call OpenProcess before
14830 DebugActiveProcess, not after. Add last error output to error
14833 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14835 * win32-low.c (win32_get_thread_context)
14836 (win32_set_thread_context): New functions.
14837 (thread_rec): Use win32_get_thread_context.
14838 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14839 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14842 2007-12-03 Leo Zayas
14843 Pedro Alves <pedro_alves@portugalmail.pt>
14845 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14847 (child_add_thread): Minor cleanup.
14848 (child_continue): Resume artificially suspended threads before
14849 calling ContinueDebugEvent.
14850 (suspend_one_thread): New.
14851 (fake_breakpoint_event): New.
14852 (get_child_debug_event): Change return type to int. Check here if
14853 gdb sent an interrupt request. If a soft interrupt was requested,
14854 fake a breakpoint event. Return 0 if there is no event to handle,
14856 (win32_wait): Don't check here if gdb sent an interrupt request.
14857 Ensure there is a valid event to handle.
14858 (win32_request_interrupt): Add soft interruption method as last
14861 2007-12-03 Leo Zayas
14862 Pedro Alves <pedro_alves@portugalmail.pt>
14864 * win32-low.h (win32_thread_info): Add descriptions to the
14865 structure members. Replace `suspend_count' counter by a
14867 * win32-low.c (thread_rec): Update condition of when to get the
14868 context from the inferior. Rely on ContextFlags being set if it
14869 has already been retrieved. Only suspend the inferior thread if
14870 we haven't already. Warn if that fails.
14871 (continue_one_thread): s/suspend_count/suspended/. Only call
14872 ResumeThread once. Warn if that fails.
14874 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14876 * win32-low.c (win32_wait): Don't read from the inferior when it
14877 has already exited.
14879 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14881 * Makefile.in (win32_low_h): New variable.
14882 (win32-low.o): Add dependency on $(win32_low_h).
14883 (win32-arm-low.o, win32-i386-low.o): New rules.
14885 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14887 * hostio.c: Correct copyright year.
14889 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14891 * Makefile.in (OBS): Add hostio.o.
14892 (hostio.o): New rule.
14893 * server.h (handle_vFile): Declare.
14894 * hostio.c: New file.
14895 * server.c (handle_v_requests): Take packet_len and new_packet_len
14896 for binary packets. Call handle_vFile.
14897 (main): Update call to handle_v_requests.
14899 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14901 * linux-low.c: Include <sched.h>.
14903 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14905 * linux-low.c (linux_tracefork_grandchild): New.
14906 (linux_tracefork_child): Use clone.
14907 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14909 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14911 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14913 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14915 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14917 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14919 * inferiors.c (change_inferior_id): Delete.
14920 (add_pid_to_list, pull_pid_from_list): New.
14921 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14922 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14923 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14924 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14925 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14926 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14927 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14928 (using_threads): Always set to 1.
14929 (handle_extended_wait): New.
14930 (add_process): Do not set TID.
14931 (linux_create_inferior): Set must_set_ptrace_flags.
14932 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14933 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14934 (linux_thread_alive): Rename TID argument to LWPID.
14935 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14936 (linux_wait_for_event): Do not use TID or check using_threads. Update
14937 call to dead_thread_notify. Call handle_extended_wait.
14938 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14939 (send_sigstop): Delete sigstop_sent.
14940 (wait_for_sigstop): Avoid TID.
14941 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14942 (linux_test_for_tracefork): New.
14943 (linux_lookup_signals): Use thread_db_active and
14944 linux_supports_tracefork_flag.
14945 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14946 * linux-low.h (get_process_thread): Avoid TID.
14947 (struct process_ifo): Move thread_known and tid to the end. Remove
14949 (linux_attach_lwp, thread_db_init): Update prototypes.
14950 * server.h (change_inferior_id): Delete prototype.
14951 (add_pid_to_list, pull_pid_from_list): New prototypes.
14952 * thread-db.c (thread_db_use_events): New.
14953 (find_first_thread): Rename to...
14954 (find_one_thread): ...this. Update callers and messages. Do not
14955 call fatal. Check thread_db_use_events. Do not call
14956 change_inferior_id or new_thread_notify.
14957 (maybe_attach_thread): Update. Do not call new_thread_notify.
14958 (thread_db_init): Set thread_db_use_events. Check use_events.
14959 * utils.c (fatal, warning): Correct message prefix.
14961 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14963 * Makefile.in (clean): Remove new files.
14964 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14965 (powerpc-64.o, powerpc-64.c): New rules.
14966 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14967 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14969 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14971 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14972 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14973 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14974 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14975 (target_regsets): Add AltiVec and SPE register sets.
14976 * configure.ac: Check for AltiVec and SPE.
14977 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14978 (ppc_fill_vrregset, ppc_store_vrregset): New.
14979 (target_regsets): Add AltiVec register set.
14980 * configure: Regenerated.
14982 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14984 * linux-low.c (O_LARGEFILE): Define.
14985 (linux_read_memory): Use /proc/PID/mem.
14986 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14987 * configure, config.in: Regenerated.
14989 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14991 * linux-low.c (linux_wait_for_event): Do not pass signals while
14994 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14996 * win32-low.c (create_process): New.
14997 (win32_create_inferior): Use create_process instead of
14998 CreateProcess. If create_process failed retry appending an ".exe"
14999 suffix. Store the GetLastError result immediatelly after
15000 create_process calls and use it on the call to error.
15002 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15004 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15006 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15008 * configure.ac: Switch license to GPLv3.
15010 2007-08-01 Michael Snyder <msnyder@access-company.com>
15012 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15014 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15016 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15018 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15019 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15020 CloseToolhelp32Snapshot.
15021 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15022 CloseToolhelp32Snapshot.
15024 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15026 * server.c (main): Check for inferior exit before main loop.
15028 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15030 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15031 instead of on tmp_desc.
15033 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15034 Daniel Jacobowitz <dan@codesourcery.com>
15036 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15037 (add_thread): Minor cleanups.
15038 (clear_inferiors): Move lower in the file. Clear the DLL
15040 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15041 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15042 (xml_escape_text): New.
15043 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15045 (handle_v_cont): Report errors.
15046 (gdbserver_version): Update.
15047 (main): Correct size of own_buf. Do not report initial DLL events.
15048 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15049 (unloaded_dll, xml_escape_text): New.
15050 * win32-low.c (enum target_waitkind): Update comments.
15051 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15052 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15053 (win32_EnumProcessModules, win32_GetModuleInformation)
15054 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15055 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15056 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15057 (win32_Module32First, win32_Module32Next, load_toolhelp)
15058 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15059 (get_child_debug_event): Handle DLL events.
15060 (win32_wait): Likewise.
15062 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15064 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15065 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15067 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15069 * win32-low.c (handle_output_debug_string): Ignore event if not
15072 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15074 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15076 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15078 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15080 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15082 * inferiors.c (change_inferior_id): Add comment.
15083 * linux-low.c (check_removed_breakpoint): Add an early
15084 prototype. Improve debug output.
15085 (linux_attach): Doc update.
15086 (linux_detach_one_process, linux_detach): Clean up before releasing
15088 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15089 * linux-low.h (struct process_info): Doc improvement.
15090 * mem-break.c (delete_all_breakpoints): New.
15091 * mem-break.h (delete_all_breakpoints): New prototype.
15092 * thread-db.c (find_first_thread): New.
15093 (thread_db_create_event): Call it instead of
15094 thread_db_find_new_threads. Clean up unused variables.
15095 (maybe_attach_thread): Remove first thread handling.
15096 (thread_db_find_new_threads): Use find_first_thread.
15097 (thread_db_get_tls_address): Likewise.
15099 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15101 * thread-db.c (thread_db_find_new_threads): Add prototype.
15102 (thread_db_create_event): Check for the main thread before adding
15104 (maybe_attach_thread): Only enable event reporting if TID == 0.
15105 (thread_db_get_tls_address): Check for new threads.
15107 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15109 * linux-low.c (linux_create_inferior): Try execv before execvp.
15110 * spu-low.c (spu_create_inferior): Likewise.
15112 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15114 * linux-low.c (linux_create_inferior): Change execv to execvp.
15115 * spu-low.c (spu_create_inferior): Likewies.
15117 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15119 * Makefile.in (clean): Clean new files instead of deleted ones.
15120 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15121 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15123 * configure.srv: Specify XML files and new regformats for MIPS and
15125 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15126 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15127 an entry for the restart register.
15128 (mips_cannot_fetch_register, mips_cannot_store_register)
15129 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15130 register names to match the XML descriptions.
15131 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15132 restart register instead of $0.
15134 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15135 Markus Deuling <deuling@de.ibm.com>
15137 * remote-utils.c (decode_xfer_write): New function.
15138 * server.h (decode_xfer_write): Add prototype.
15139 * server.c (handle_query): Add PACKET_LEN argument. Support
15140 qXfer:spu:read and qXfer:spu:write packets.
15141 (main): Pass packet_len to handle_query.
15142 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15143 * target.h (target_ops): Add qxfer_spu.
15145 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15147 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15148 accessing non-seekable spufs files.
15150 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15152 * server.c (handle_query): Add reply for qC packet.
15154 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15155 Leo Zayas <lerele@champenstudios@com>
15157 * server.h (check_remote_input_interrupt_request): New function.
15158 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15159 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15160 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15161 (check_remote_input_interrupt_request): New function.
15162 * server.h (check_remote_input_interrupt_request): Declare.
15163 * win32-low.c (winapi_DebugBreakProcess,
15164 winapi_GenerateConsoleCtrlEvent): New typedefs.
15165 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15167 (win32_wait): Check for remote interrupt request
15168 with check_remote_input_interrupt_request.
15169 (win32_request_interrupt): New function.
15170 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15172 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15174 * win32-low.c (debug_registers_changed,
15175 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15176 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15177 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15178 (thread_rec): Get context using the low target.
15179 (child_add_thread): Call thread_added on the low target,
15180 which does the same thing.
15182 (do_initial_child_stuff): Remove debug registers references.
15183 Set context using the low target. Resume threads after
15184 setting the contexts.
15185 (child_continue): Remove dead variable. Remove debug
15186 registers references.
15187 (child_fetch_inferior_registers): Go through the low target.
15188 (do_child_store_inferior_registers): Remove.
15189 (child_store_inferior_registers): Go through the low target.
15190 (win32_resume): Remove debug registers references.
15191 Set context using the low target.
15192 (handle_exception): Change return type to void. Don't record
15193 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15194 first chance exception.
15195 (get_child_debug_event): Change return type to void. Remove
15196 goto loop. Always return after waiting for debug event.
15197 (win32_wait): Convert to switch statement. Handle spurious
15200 * win32-i386-low.c (debug_registers_changed,
15201 debug_registers_used): New.
15202 (initial_stuff): Rename to ...
15203 (i386_initial_stuff): ... this. Clear debug registers
15205 (store_debug_registers): Delete.
15206 (i386_get_thread_context): New.
15207 (load_debug_registers): Delete.
15208 (i386_set_thread_context): New.
15209 (i386_thread_added): New.
15210 (single_step): Rename to ...
15211 (i386_single_step): ... this.
15212 (do_fetch_inferior_registers): Rename to ...
15213 (i386_fetch_inferior_register): ... this.
15214 (i386_store_inferior_register): New.
15215 (the_low_target): Adapt to new interface.
15217 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15218 (arm_get_thread_context): New.
15219 (arm_set_thread_context): New.
15221 (do_fetch_inferior_registers): Rename to ...
15222 (arm_fetch_inferior_register): ... this.
15223 (arm_store_inferior_register): New.
15224 (arm_wince_breakpoint): Reimplement as unsigned long.
15225 (arm_wince_breakpoint_len): Define.
15226 (the_low_target): Adapt to new interface.
15228 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15229 load_debug_registers. Add get_thread_context, set_thread_context,
15230 thread_added and store_inferior_register. Rename
15231 fetch_inferior_registers to fetch_inferior_register.
15232 (regptr): Remove declaration.
15234 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15236 * linux-low.c (linux_detach): Change return type to int. Return 0.
15237 * spu-low.c (spu_detach): Likewise.
15239 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15241 * target.h (target_ops): Change return type of detach to int.
15243 (join_inferior): New.
15244 * server.c (main): Don't skip detach support on mingw32.
15245 If the inferior doesn't support detaching return error.
15246 Call join_inferior instead of using waitpid.
15247 * linux-low.c (linux_join): New.
15248 (linux_target_op): Add linux_join.
15249 * spu-low.c (spu_join): New.
15250 (spu_target_ops): Add spu_join.
15251 * win32-low.c (win32_detach): Adapt to new interface.
15252 Reopen current_process_handle before detaching. Issue a child
15253 resume before detaching.
15255 (win32_target_op): Add win32_join.
15257 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15259 * win32-low.c (win32-attach): Fix return value.
15260 * target.h (target_ops): Describe ATTACH return values.
15262 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15264 * win32-low.c (GETPROCADDRESS): Define.
15265 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15266 (winapi_DebugSetProcessKillOnExit): Likewise.
15267 (win32_create_inferior): Force usage of ansi CreateProcessA.
15268 (win32_attach): Use GETPROCADDRESS.
15269 (win32_detach): Likewise.
15271 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15273 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15275 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15277 * win32-low.c: Commit leftover changes from 2007-03-29.
15279 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15281 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15282 fields short instead of int. Add explicit padding.
15283 (i387_cache_to_fsave): Remove unnecessary casts.
15284 (i387_fsave_to_cache): Doc fix.
15285 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15287 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15289 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15290 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15292 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15294 * configure.srv (arm*-*-mingw32ce*): Move near the other
15297 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15299 * configure.ac: Add errno checking.
15300 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15301 sys/file.h and malloc.h.
15302 (AC_CHECK_DECLS): Add perror.
15303 (srv_mingwce): Handle.
15304 * configure.srv (i[34567]86-*-cygwin*): Add
15305 win32-i386-low.o to srv_tgtobj.
15306 (i[34567]86-*-mingw*): Likewise.
15307 (arm*-*-mingw32ce*): Add case.
15308 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15309 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15310 [__MINGW32CE__] (strerror): New function.
15311 [__MINGW32CE__] (errno): Define to GetLastError.
15312 [__MINGW32CE__] (COUNTOF): New macro.
15313 (remote_open): Remove extra close call.
15314 * mem-break.c (delete_breakpoint_at): New function.
15315 * mem-break.h (delete_breakpoint_at): Declare.
15316 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15317 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15318 [USE_WIN32API] (read, write): Add char* casts.
15319 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15320 * server.h: Include wincecompat.h on Windows CE.
15321 [HAVE_ERRNO_H]: Check.
15322 (perror): Declare if not declared.
15323 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15324 (perror_with_name): Remove errno declaration.
15325 * wincecompat.h: New.
15326 * wincecompat.c: New.
15327 * win32-low.h: New.
15328 * win32-arm-low.c: New.
15329 * win32-i386-low.c: New.
15330 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15331 (OUTMSG2): Make it safe.
15333 (COUNTOF): New macro.
15334 (NUM_REGS): Get it from the low target.
15335 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15336 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15337 (thread_rec): Let low target handle debug registers.
15338 (child_add_thread): Likewise.
15339 (child_init_thread_list): Likewise.
15340 (continue_one_thread): Likewise.
15342 (do_child_fetch_inferior_registers): Move to ...
15343 * win32-i386-low.c: ... here, and rename to ...
15344 (do_fetch_inferior_registers): ... this.
15345 * win32-low.c (child_fetch_inferior_registers):
15346 Go through the low target.
15347 (do_child_store_inferior_registers): Use regptr.
15348 (strwinerror): New function.
15349 (win32_create_inferior): Handle Windows CE.
15350 Use strwinerror instead of strerror on Windows error
15351 codes. Add program to the error output.
15352 Don't close the main thread handle on Windows CE.
15353 (win32_attach): Use coredll.dll on Windows CE.
15354 (win32_kill): Close current process and current
15356 (win32_detach): Use coredll.dll on Windows CE.
15357 (win32_resume): Let low target handle debug registers, and
15359 (handle_exception): Add/Remove initial breakpoint. Avoid
15360 non-existant WSTOPSIG on Windows CE.
15361 (win32_read_inferior_memory): Cast to remove warning.
15362 (win32_arch_string): Go through the low target.
15363 (initialize_low): Call set_breakpoint_data with the low
15364 target's breakpoint.
15365 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15366 FOP_REGNUM, mappings): Move to ...
15367 * win32-i386-low.c: ... here.
15368 * win32-low.c (win32_thread_info): Move to ...
15369 * win32-low.h: ... here.
15370 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15371 win32-arm-low.c and wincecompat.c.
15372 (all:): Add $EXEEXT.
15373 (install-only:): Likewise.
15374 (gdbserver:): Likewise.
15375 (gdbreplay:): Likewise.
15376 * config.in: Regenerate.
15377 * configure: Regenerate.
15379 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15381 * win32-low.c: Rename typedef thread_info to
15382 win32_thread_info throughout.
15384 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15386 * win32-i386-low.c: Rename to ...
15387 * win32-low.c: ... this.
15388 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15389 * Makefile.in: Likewise.
15391 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15393 * remote-utils.c (monitor_output): Constify msg parameter.
15394 * server.h (monitor_output): Likewise.
15395 * win32-i386-low.c (handle_output_debug_string): New.
15396 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15397 handle_output_debug_string.
15398 (get_child_debug_event): Likewise.
15400 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15402 * server.c (main): Correct strtoul check.
15404 2007-03-27 Jon Ringle <jon@ringle.org>
15406 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15408 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15410 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15412 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15414 * terminal.h: Check HAVE_SGTTY_H.
15416 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15418 * remote-utils.c (remote_open): Print out the assigned port number.
15420 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15422 * remote-utils.c (monitor_output): New function.
15423 * server.c (debug_threads): Define here.
15424 (monitor_show_help): New function.
15425 (handle_query): Handle qRcmd.
15426 (main): Do not handle 'd' packet.
15427 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15428 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15431 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15433 * Makefile.in (EXEEXT): New.
15434 (clean): Use $(EXEEXT).
15436 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15438 * target.h (target_ops): Rename send_signal to request_interrupt,
15439 and remove enum target_signal parameter.
15440 * linux-low.c (linux_request_interrupt): Rename from
15441 linux_send_signal, and always send SIGINT.
15442 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15443 and always send SIGINT.
15444 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15446 (input_interrupt): Likewise.
15448 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15450 * server.c (get_features_xml): Check if target implemented
15452 * win32-i386-low.c (win32_arch_string): New.
15453 (win32_target_ops): Add win32_arch_string as arch_string member.
15455 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15457 * spu-low.c (spu_arch_string): New.
15458 (spu_target_ops): Add spu_arch_string.
15460 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15462 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15463 * configure.ac: Do not check for terminal.h.
15464 * configure, config.in: Regenerated.
15466 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15468 * Makefile.in (OBS): Add $(XML_BUILTIN).
15469 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15471 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15472 (arm-with-iwmmxt.c): New.
15473 * config.in, configure: Regenerate.
15474 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15475 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15476 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15477 (arm*-*-linux*): Add iWMMXt and regset support.
15478 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15479 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15480 (arm_store_wmmxregset, target_regsets): New.
15481 * server.c (get_features_xml): Take annex argument. Check builtin
15483 (handle_query): Handle multiple annexes.
15485 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15487 * remote-utils.c [USE_WIN32API] (read, write): Define.
15488 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15491 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15493 * linux-i386-low.c (the_low_target): Set arch_string.
15494 * linux-x86-64-low.c (the_low_target): Likewise.
15495 * linux-low.c (linux_arch_string): New.
15496 (linux_target_ops): Add it.
15497 * linux-low.h (struct linux_target_ops): Add arch_string.
15498 * server.c (write_qxfer_response): Use const void * for DATA.
15499 (get_features_xml): New.
15500 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15501 * target.h (struct target_ops): Add arch_string method.
15503 2007-01-03 Denis Pilat <denis.pilat@st.com>
15504 Daniel Jacobowitz <dan@codesourcery.com>
15506 * linux-low.c (linux_kill): Handle being called with no threads.
15507 * win32-i386-low.c (win32_kill): Likewise.
15508 (get_child_debug_event): Clear current_process_handle.
15510 2006-12-30 Denis PILAT <denis.pilat@st.com>
15511 Daniel Jacobowitz <dan@codesourcery.com>
15513 * remote-utils.c (remote_open): Check the type of specified
15514 serial port devices before opening them.
15515 * server.c (main): Kill the inferior if an error occurs during
15516 the first remote_open.
15518 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15520 * README: Update supported targets.
15522 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15524 * Makefile.in (clean): Remove reg-mips64.c.
15525 (reg-mips64.c, reg-mips64.o): New rules.
15526 * configure.srv: Handle mips64. Include regset support for mips.
15527 * linux-mips-low.c (union mips_register): New.
15528 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15529 (mips_breakpoint, mips_breakpoint_at): Use int.
15530 (mips_collect_register, mips_supply_register)
15531 (mips_collect_register_32bit, mips_supply_register_32bit)
15532 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15533 (mips_store_fpregset, target_regsets): New.
15534 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15536 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15538 * configure.srv: Add target "spu*-*-*".
15539 * Makefile.in (clean): Remove reg-spu.c.
15540 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15541 * spu-low.c: New file.
15543 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15545 * configure.ac: Correct td_thr_tls_get_addr test.
15546 * configure: Regenerated.
15548 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15550 * linux-low.c (linux_wait_for_event): Reformat. Use the
15551 pass_signals array.
15552 * remote-utils.c (decode_address_to_semicolon): New.
15553 * server.c (pass_signals, handle_general_set): New.
15554 (handle_query): Mention QPassSignals for qSupported.
15555 (main): Call handle_general_set.
15556 * server.h (pass_signals, decode_address_to_semicolon): New.
15558 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15560 * server.c (handle_query): Correct error handling for read_auxv.
15562 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15564 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15565 and srv_linux_thread_db to yes.
15566 * linux-s390-low.c (s390_fill_gregset): New function.
15567 (target_regsets): Define data structure.
15569 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15571 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15572 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15573 * config.in, configure: Regenerated.
15574 * inferiors.c (gdb_id_to_thread): New function.
15575 (gdb_id_to_thread_id): Use it.
15576 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15577 * linux-low.h (struct process_info): Add th member.
15578 (thread_db_get_tls_address): New prototype.
15579 * remote-utils.c (decode_address): Make non-static.
15580 * server.c (handle_query): Handle qGetTLSAddr.
15581 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15582 * target.h (struct target_ops): Add get_tls_address.
15583 * thread-db.c (maybe_attach_thread): Save the thread handle.
15584 (thread_db_get_tls_address): New.
15586 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15588 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15589 (linux_resume_one_process): Take a siginfo_t *. Update all
15590 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15591 (struct pending_signals): Add a siginfo_t.
15592 (linux_wait_for_process): Always set last_status.
15593 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15594 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15595 * linux-low.h (struct process_info): Add last_status.
15597 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15599 * remote-utils.c (try_rle): New function.
15600 (putpkt_binary): Use it.
15602 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15604 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15605 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15606 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15607 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15608 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15611 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15613 * server.c (terminal_fd): New variable.
15614 (old_foreground_pgrp): Likewise.
15615 (restore_old_foreground_pgrp): New function.
15616 (start_inferior): Record the terminal file descriptor in terminal_fd
15617 and its original foreground group in old_foreground_pgrp. Register
15618 restore_old_foreground_pgrp with atexit().
15620 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15622 * server.c (handle_query): Correct qPart to qXfer.
15624 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15626 * configure.ac: Check for more headers which are missing on
15627 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15628 * configure.srv: Add Cygwin and mingw32.
15629 * remote-utils.c: Don't include headers unconditionally which
15630 are missing on mingw32. Include <winsock.h> for mingw32.
15631 (remote_open): Adjust for mingw32 support. Flush
15632 standard error after writing to it.
15633 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15634 (unblock_async_io, enable_async_io, disable_async_io)
15635 (readchar, getpkt): Update for Winsock support.
15636 (prepare_resume_reply): Expect a protocol signal number.
15637 * server.c: Disable <sys/wait.h> on mingw32.
15638 (start_inferior): Adjust for mingw32 support. Flush
15639 standard error after writing to it.
15640 (attach_inferior): Likewise. Use protocol signal
15642 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15644 * win32-i386-low.c: New file.
15645 * Makefile.in (XM_CLIBS): Set.
15646 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15647 (win32-i386-low.o): New dependency rule.
15648 * linux-low.c (linux_wait): Use target signal numbers.
15649 * target.h (struct target_ops): Doc fix.
15650 * server.h (target_signal_to_name): New prototype.
15651 * gdbreplay.c: Don't include headers unconditionally which
15652 are missing on mingw32. Include <winsock.h> for mingw32.
15653 (remote_close, remote_open): Adjust for Winsock support.
15654 * configure, config.in: Regenerated.
15656 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15658 * server.c (decode_xfer_read, write_qxfer_response): New.
15659 (handle_query): Take a packet length argument. Handle
15660 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15661 the qSupported response.
15662 (main): Update call to handle_query.
15664 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15666 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15667 (putpkt_binary): Renamed from putpkt and adjusted for binary
15669 (putpkt): New wrapper for putpkt_binary.
15670 (readchar): Don't mask off the high bit.
15671 (decode_X_packet): New function.
15672 * server.c (main): Call putpkt_binary if a handler sets the packet
15673 length. Save the length of the incoming packet. Handle 'X'.
15674 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15676 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15678 * server.c (handle_query): Handle qSupported.
15680 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15682 * remote-utils.c (all_symbols_looked_up): New variable.
15683 (look_up_one_symbol): Check it.
15684 * server.h (look_up_one_symbol): New declaration.
15685 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15687 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15689 * Makefile.in (linux-arm-low.o): Update dependencies.
15690 * linux-arm-low.c: Include "gdb_proc_service.h".
15691 (PTRACE_GET_THREAD_AREA): Define.
15692 (ps_get_thread_area): New function.
15694 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15696 * configure.srv (m68k*-*-uclinux*): New target.
15697 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15698 (linux_resume_one_process): Remove extraneous cast.
15699 (linux_read_offsets): New.
15700 (linux_target_op): Add linux_read_offsets on mmuless systems.
15701 * server.c (handle_query): Add qOffsets logic.
15702 * target.h (struct target_ops): Add read_offsets.
15704 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15706 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15707 (PTRACE_GET_THREAD_AREA): Define.
15708 (ps_get_thread_area): New function.
15709 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15710 (linux-x86-64-low.o): Update.
15712 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15714 * configure.ac: Remove checks for prfpregset_t.
15715 * gdb_proc_service.h: New file.
15716 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15717 new "gdb_proc_service.h".
15718 * proc-service.c: Likewise.
15719 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15720 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15721 * Makefile.in (gdb_proc_service_h): Updated.
15722 * configure, config.in: Regenerated.
15724 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15726 * remote-utils.c (prepare_resume_reply): Move declaration
15727 of gdb_id_from_wait to the top of the block.
15729 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15731 * linux-low.c (regsets_store_inferior_registers): Read the regset
15732 from the target before filling it.
15734 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15736 * server.c (attach_inferior): Return SIGTRAP for a successful
15739 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15741 * Makefile.in (OBS): Add version.o.
15742 (STAGESTUFF): Delete.
15743 (version.o): Add dependencies.
15744 (version.c): Replace rule.
15745 (clean): Remove version.c.
15746 * server.c (gdbserver_version): New.
15747 (gdbserver_usage): Use printf.
15748 (main): Handle --version and --help.
15749 * server.h (version, host_name): Add declarations.
15751 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15763 * linux-x86-64-low.c:
15765 * linux-s390-low.c:
15766 * linux-ppc64-low.c:
15768 * linux-mips-low.c:
15769 * linux-m68k-low.c:
15770 * linux-m32r-low.c:
15773 * linux-ia64-low.c:
15774 * linux-i386-low.c:
15775 * linux-crisv32-low.c:
15787 * gdbserver.1: Add (C) after Copyright. Update the FSF
15790 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15792 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15793 (arm_breakpoint_at): Recognize both breakpoints.
15794 (the_low_target): Use the correct breakpoint instruction.
15796 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15798 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15799 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15800 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15801 (the_low_target): Update.
15803 2005-10-25 Andreas Schwab <schwab@suse.de>
15805 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15807 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15808 (ia64_num_regs): Reduce to 462.
15810 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15812 * acinclude.m4: Correct quoting.
15813 * aclocal.m4: Regenerated.
15815 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15816 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15817 (thread_db_init): Call thread_db_err_str.
15818 * configure.ac: Check for TD_VERSION.
15819 * config.in, configure: Regenerated.
15821 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15823 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15825 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15827 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15828 is not available. Define HAVE_PTRACE_GETREGS if it is.
15829 * config.in, configure: Regenerated.
15830 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15831 * linux-i386-low.c, linux-m68k-low.c: Update to use
15832 HAVE_PTRACE_GETREGS.
15833 * linux-low.c (regsets_fetch_inferior_registers)
15834 (regsets_store_inferior_registers): Only return 0 if we processed
15836 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15837 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15839 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15841 * inferiors.c (struct thread_info): Add gdb_id.
15842 (add_thread): Add gdb_id argument.
15843 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15844 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15845 calls to add_thread.
15846 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15847 * server.c (handle_query): Use thread_to_gdb_id.
15848 (handle_v_cont, main): Use gdb_id_to_thread_id.
15849 * server.h (add_thread): Update prototype.
15850 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15853 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15855 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15856 left-padded registers.
15857 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15858 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15860 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15862 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15863 * configure: Regenerate.
15864 * config.in: Regenerate.
15865 * server.h (NEED_DECLARATION_STRERROR):
15866 Replace with !HAVE_DECL_STRERROR.
15868 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15870 * linux-low.c (linux_wait, linux_send_signal): Don't test
15871 an unsigned long variable for > 0 if it could be MAX_ULONG.
15872 * server.c (myresume): Likewise.
15873 * target.c (set_desired_inferior): Likewise.
15875 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15877 * configure.ac: Simplify and improve check for socklen_t.
15878 * configure, config.in: Regenerate.
15880 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15882 * acconfig.h: Remove.
15883 * configure.ac: Add a test for socklen_t. Use three-argument
15884 AC_DEFINE throughout.
15885 * config.in: Regenerated using autoheader 2.59.
15886 * configure: Regenerated.
15888 * gdbreplay.c (socklen_t): Provide a default.
15889 (remote_open): Use socklen_t.
15890 * remote-utils.c (socklen_t): Provide a default.
15891 (remote_open): Use socklen_t.
15892 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15895 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15897 * linux-low.c (linux_read_memory, linux_write_memory)
15898 (linux_read_auxv): Likewise.
15899 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15900 (check_mem_write): Likewise.
15901 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15903 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15904 (registers_from_string, register_data): Likewise.
15905 * server.c (handle_query, main): Likewise.
15906 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15907 (decode_M_packet): Likewise.
15908 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15909 * target.h (struct target_ops): Update read_memory, write_memory,
15911 (read_inferior_memory, write_inferior_memory): Update.
15912 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15913 to unsigned char *.
15914 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15915 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15916 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15917 linux-s390-low.c, linux-sh-low.c: Update for changes in
15918 read_inferior_memory and the_low_target->breakpoint.
15920 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15922 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15923 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15924 * configure.srv: Add powerpc64-*-linux*.
15925 * linux-ppc64-low.c: New file.
15927 2005-05-23 Orjan Friberg <orjanf@axis.com>
15929 * linux-cris-low.c: New file with support for CRIS.
15930 * linux-crisv32-low.c: Ditto for CRISv32.
15931 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15932 (clean): Add reg-cris.c and reg-crisv32.c.
15933 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15934 reg-crisv32.o, and reg-crisv32.c to make rules.
15935 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15936 recognized targets.
15938 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15940 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15941 of sizeof (PTRACE_XFER_TYPE).
15942 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15944 2005-05-12 Orjan Friberg <orjanf@axis.com>
15946 * target.h (struct target_ops): Add insert_watchpoint,
15947 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15948 pointers for hardware watchpoint support.
15949 * linux-low.h (struct linux_target_ops): Ditto.
15950 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15951 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15952 to linux_target_ops.
15953 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15955 * server.c (main): Recognize 'Z' and 'z' packets.
15957 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15959 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15960 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15961 (the_low_target): Add new members.
15963 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15965 * proc-service.c (ps_lgetregs): Search all_processes instead of
15968 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15970 * server.c (start_inferior): Change return type to int.
15971 (attach_inferior): Change sigptr to int *.
15972 (handle_v_cont, handle_v_requests): Change signal to int *.
15973 (main): Change signal to int.
15975 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15977 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15978 * configure.srv: Add m32r*-*-linux*.
15979 * linux-m32r-low.c: New file.
15981 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15983 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15985 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15987 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15988 Take unsigned long arguments for PIDs.
15989 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15990 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15991 (wait_for_sigstop, linux_resume_one_process)
15992 (regsets_fetch_inferior_registers, linux_send_signal)
15993 (linux_read_auxv): Likewise. Update the types of variables holding
15994 PIDs. Update format string specifiers.
15995 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15996 * remote-utils.c (prepare_resume_reply): Likewise.
15997 * server.c (cont_thread, general_thread, step_thread)
15998 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16000 (handle_query): Update format specifiers.
16001 (handle_v_cont, main): Use strtoul for thread IDs.
16002 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16003 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16004 (general_thread, step_thread, thread_from_wait)
16005 (old_thread_from_wait): Update.
16006 * target.h (struct thread_resume): Use unsigned long for THREAD.
16007 (struct target_ops): Use unsigned long for arguments to attach and
16010 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16012 * acinclude.m4: Include bfd/bfd.m4 directly.
16013 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16014 <agriffis@toolchain.org>.
16015 * aclocal.m4, configure: Regenerated.
16017 2005-01-07 Andrew Cagney <cagney@gnu.org>
16019 * configure.ac: Rename configure.in, require autoconf 2.59.
16020 * configure: Re-generate.
16022 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16024 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16025 LIBS when finished.
16026 * aclocal.m4: Regenerated.
16027 * configure: Regenerated.
16029 2004-11-21 Andreas Schwab <schwab@suse.de>
16031 * linux-m68k-low.c (m68k_num_gregs): Define.
16032 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16033 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16034 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16035 (m68k_breakpoint_at): New. Add to the_low_target.
16037 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16038 srv_linux_thread_db to yes.
16040 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16042 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16043 (ARCH_SET_FS): Likewise.
16044 (ARCH_GET_FS): Likewise.
16045 (ARCH_GET_GS): Likewise.
16047 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16049 * linux-i386-low.c (ps_get_thread_area): New.
16050 * linux-x86-64-low.c (ps_get_thread_area): New.
16051 * linux-low.c: Include <sys/syscall.h>.
16052 (linux_kill_one_process): Don't kill the first thread here.
16053 (linux_kill): Kill the first thread here.
16054 (kill_lwp): New function.
16055 (send_sigstop, linux_send_signal): Use it.
16056 * proc-service.c: Clean up #ifdefs.
16057 (fpregset_info): Delete.
16058 (ps_lgetregs): Update and enable implementation.
16059 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16061 * remote-utils.c (struct sym_cache, symbol_cache): New.
16062 (input_interrupt): Print a clearer message.
16063 (async_io_enabled): New variable.
16064 (enable_async_io, disable_async_io): Use it. Update comments.
16065 (look_up_one_symbol): Use the symbol cache.
16066 * thread-db.c (thread_db_look_up_symbols): New function.
16067 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16069 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16071 * configure.in: Test for -rdynamic.
16072 * configure: Regenerated.
16073 * Makefile (INTERNAL_LDFLAGS): New.
16074 (gdbserver, gdbreplay): Use it.
16076 2004-09-02 Andrew Cagney <cagney@gnu.org>
16078 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16080 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16082 * linux-low.c (linux_wait): Clear all_processes list also.
16084 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16086 * linux-low.c: Include <errno.h>. Remove extern declaration of
16089 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16091 * gdbreplay.c, server.h, utils.c: Update copyright years.
16093 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16095 * server.c (main): Print child status or termination signal from
16096 variable 'signal', not 'sig'.
16098 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16100 * linux-low.c (linux_read_memory): Change return type to
16101 int. Check for and return error from ptrace().
16102 * target.c (read_inferior_memory): Change return type to int. Pass
16103 back return status from the_target->read_memory().
16104 * target.h (struct target_ops): Adapt *read_memory() prototype.
16106 (read_inferior_memory): Adapt prototype.
16107 * server.c (main): Return an error packet if
16108 read_inferior_memory() returns an error.
16110 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16112 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16113 Unify with other clean targets.
16115 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16117 * server.c (handle_v_cont): Call set_desired_inferior.
16119 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16121 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16123 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16125 * linux-low.c (linux_wait): Unblock async I/O.
16126 (linux_resume): Block and enable async I/O.
16127 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16128 * server.h (block_async_io, unblock_async_io): Add prototypes.
16130 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16132 * remote-utils.c (remote_open): Print a status notice after
16133 opening a TCP port.
16134 * server.c (attach_inferior): Print a status notice after
16137 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16139 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16141 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16143 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16145 * server.c, target.h: Update copyright years.
16147 2004-02-25 Roland McGrath <roland@redhat.com>
16149 * target.h (struct target_ops): New member `read_auxv'.
16150 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16151 * linux-low.c (linux_read_auxv): New function.
16152 (linux_target_ops): Initialize `read_auxv' member to that.
16154 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16156 Committed by Jim Blandy <jimb@redhat.com>.
16158 * linux-s390-low.c (s390_num_regs): Update.
16159 (s390_regmap): Remove control registers. Use __s390x__ predefine
16160 instead of GPR_SIZE to distiguish s390 and s390x targets.
16162 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16164 * linux-low.c: Update copyright year.
16165 (check_removed_breakpoint): Clear pending_is_breakpoint.
16166 (linux_set_resume_request, linux_queue_one_thread)
16167 (resume_status_pending_p): New functions.
16168 (linux_continue_one_thread): Use process->resume.
16169 (linux_resume): Only resume threads if there are no pending events.
16170 * linux-low.h (struct process_info): Add resume request
16173 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16175 * regcache.c (new_register_cache): Clear the allocated register
16176 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16178 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16180 * linux-low.c (linux_resume): Take a struct thread_resume *
16182 (linux_wait): Update call.
16183 (resume_ptr): New static variable.
16184 (linux_continue_one_thread): Renamed from
16185 linux_continue_one_process. Use resume_ptr.
16186 (linux_resume): Use linux_continue_one_thread.
16187 * server.c (handle_v_cont, handle_v_requests): New functions.
16188 (myresume): New function.
16189 (main): Handle 'v' case.
16190 * target.h (struct thread_resume): New type.
16191 (struct target_ops): Change argument of "resume" to struct
16193 (myresume): Delete macro.
16195 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16197 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16198 (uninstall): Support DESTDIR.
16200 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16202 * configure.srv: Add xscale*linux copy of arm*linux entry.
16204 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16206 * linux-arm-low.c (arm_reinsert_addr): New function.
16207 (the_low_target): Add arm_reinsert_addr.
16209 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16211 * mem-break.c: Remove whitespace at end of file.
16213 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16215 * configure.in: Check whether we need to prototype strerror.
16216 * server.h: Optionally prototype strerror.
16217 * gdbreplay.c (perror_with_name): Use strerror.
16218 * linux-low.c (linux_attach_lwp): Use strerror.
16219 * utils.c (perror_with_name): Use strerror.
16220 * config.in, configure: Regenerated.
16222 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16224 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16225 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16227 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16229 * Makefile.in (SFILES): Update.
16230 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16231 low-sun3.c: Remove files.
16233 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16235 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16236 (linux_detach_one_process, linux_detach): New functions.
16237 (linux_target_ops): Add linux_detach.
16238 * server.c (main): Handle 'D' packet.
16239 * target.h (struct target_ops): Add "detach" member.
16240 (detach_inferior): Define.
16242 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16244 From Kelley Cook <kelleycook@wideopenwest.com>:
16245 * configure.srv: Accept i[34567]86 variants.
16247 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16249 * linux-low.c (linux_wait_for_event): Correct comment typos.
16250 (linux_resume_one_process): Call check_removed_breakpoint.
16251 (linux_send_signal): New function.
16252 (linux_target_ops): Add linux_send_signal.
16253 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16255 * target.h (struct target_ops): Add send_signal.
16257 2003-05-29 Jim Blandy <jimb@redhat.com>
16259 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16260 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16261 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16262 away part of the register's value.
16264 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16266 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16267 (linux_wait_for_event, linux_init_signals): Likewise.
16269 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16271 * configure.in: Check for stdlib.h.
16272 * configure: Regenerated.
16273 * config.in: Regenerated.
16275 2003-01-04 Andreas Schwab <schwab@suse.de>
16277 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16279 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16281 * Makefile.in: Remove obsolete code.
16283 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16285 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16286 defined(PT_FPR0_HI).
16288 2002-11-17 Stuart Hughes <seh@zee2.com>
16290 * linux-arm-low.c (arm_num_regs): Increase.
16291 (arm_regmap): Include status register.
16293 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16295 * linux-low.c (register_addr): Remove incorrect -1 check.
16297 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16299 * linux-low.c (linux_create_inferior): Call setpgid. Return
16301 (unstopped_p, linux_signal_pid): Remove.
16302 (linux_target_ops): Remove linux_signal_pid.
16303 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16304 global instead of target method.
16305 * target.h (struct target_ops): Remove signal_pid. Update comment
16306 for create_inferior.
16307 * server.c (signal_pid): New variable.
16308 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16309 gdbserver. Set the child to be the foreground process group.
16310 (attach_inferior): Set signal_pid.
16312 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16314 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16316 2002-08-20 Jim Blandy <jimb@redhat.com>
16318 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16321 2002-08-01 Andrew Cagney <cagney@redhat.com>
16323 * Makefile.in: Make chill references obsolete.
16325 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16327 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16328 * configure: Regenerate.
16329 * config.in: Regenerate.
16331 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16333 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16334 (perror_with_name, remote_close, remote_open, expect, play): Static.
16336 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16338 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16339 byte offsets instead of an array of indexes.
16340 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16342 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16344 * regcache.c: Add comment.
16346 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16348 * thread-db.c: New file.
16349 * proc-service.c: New file.
16350 * acinclude.m4: New file.
16351 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16352 proc-service.o, and thread-db.o.
16353 (linux-low.o): Add USE_THREAD_DB.
16354 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16355 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16356 * aclocal.m4: Regenerated.
16357 * config.in: Regenerated.
16358 * configure: Regenerated.
16359 * configure.in: Check for proc_service.h, sys/procfs.h,
16360 thread_db.h, and linux/elf.h headrs.
16361 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16362 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16363 Check for -lthread_db and thread support.
16364 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16365 PowerPC, and SuperH.
16366 * i387-fp.c: Constify arguments.
16367 * i387-fp.h: Likewise.
16368 * inferiors.c: (struct thread_info): Renamed from
16369 `struct inferior_info'. Remove PID member. Use generic inferior
16370 list header. All uses updated.
16371 (inferiors, signal_pid): Removed.
16372 (all_threads): New variable.
16373 (get_thread): Define.
16374 (add_inferior_to_list): New function.
16375 (for_each_inferior): New function.
16376 (change_inferior_id): New function.
16377 (add_inferior): Removed.
16378 (remove_inferior): New function.
16379 (add_thread): New function.
16380 (free_one_thread): New function.
16381 (remove_thread): New function.
16382 (clear_inferiors): Use for_each_inferior and free_one_thread.
16383 (find_inferior): New function.
16384 (find_inferior_id): New function.
16385 (inferior_target_data): Update argument type.
16386 (set_inferior_target_data): Likewise.
16387 (inferior_regcache_data): Likewise.
16388 (set_inferior_regcache_data): Likewise.
16389 * linux-low.c (linux_bp_reinsert): Remove.
16390 (all_processes, stopping_threads, using_thrads)
16391 (struct pending_signals, debug_threads, pid_of): New.
16392 (inferior_pid): Replace with macro.
16393 (struct inferior_linux_data): Remove.
16394 (get_stop_pc, add_process): New functions.
16395 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16396 Use add_process and add_thread.
16397 (linux_attach_lwp): New function, based on old linux_attach. Use
16398 add_process and add_thread. Set stop_expected for new threads.
16399 (linux_attach): New function.
16400 (linux_kill_one_process): New function.
16401 (linux_kill): Kill all LWPs.
16402 (linux_thread_alive): Use find_inferior_id.
16403 (check_removed_breakpoints, status_pending_p): New functions.
16404 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16405 Update. Use WNOHANG. Wait for cloned processes also. Update process
16406 struct for the found process.
16407 (linux_wait_for_event): New function.
16408 (linux_wait): Use it. Support LWPs.
16409 (send_sigstop, wait_for_sigstop, stop_all_processes)
16410 (linux_resume_one_process, linux_continue_one_process): New functions.
16411 (linux_resume): Support LWPs.
16412 (REGISTER_RAW_SIZE): Remove.
16413 (fetch_register): Use register_size instead. Call supply_register.
16414 (usr_store_inferior_registers): Likewise. Call collect_register.
16415 Fix recursive case.
16416 (regsets_fetch_inferior_registers): Improve error message.
16417 (regsets_store_inferior_registers): Add debugging.
16418 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16419 (unstopped_p, linux_signal_pid): New functions.
16420 (linux_target_ops): Add linux_signal_pid.
16421 (linux_init_signals): New function.
16422 (initialize_low): Call it. Initialize using_threads.
16423 * regcache.c (inferior_regcache_data): Add valid
16425 (get_regcache): Fetch registers lazily. Add fetch argument
16426 and update all callers.
16427 (regcache_invalidate_one, regcache_invalidate): New
16429 (new_register_cache): Renamed from create_register_cache.
16430 Return the new regcache.
16431 (free_register_cache): Change argument to a void *.
16432 (registers_to_string, registers_from_string): Call get_regcache
16433 with fetch flag set.
16434 (register_data): Make static. Pass fetch flag to get_regcache.
16435 (supply_register): Call get_regcache with fetch flag clear.
16436 (collect_register): Call get_regcache with fetch flag set.
16437 (collect_register_as_string): New function.
16438 * regcache.h: Update.
16439 * remote-utils.c (putpkt): Flush after debug output and use
16441 Handle input interrupts while waiting for an ACK.
16442 (input_interrupt): Use signal_pid method.
16443 (getpkt): Flush after debug output and use stderr.
16444 (outreg): Use collect_register_as_string.
16445 (new_thread_notify, dead_thread_notify): New functions.
16446 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16447 and general_thread.
16448 (look_up_one_symbol): Flush after debug output.
16449 * server.c (step_thread, server_waiting): New variables.
16450 (start_inferior): Don't use signal_pid. Update call to mywait.
16451 (attach_inferior): Update call to mywait.
16452 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16453 (main): Don't fetch/store registers explicitly. Use
16454 set_desired_inferior. Support proposed ``Hs'' packet. Update
16456 * server.h: Update.
16457 (struct inferior_list, struct_inferior_list_entry): New.
16458 * target.c (set_desired_inferior): New.
16459 (write_inferior_memory): Constify.
16460 (mywait): New function.
16461 * target.h: Update.
16462 (struct target_ops): New signal_pid method.
16463 (mywait): Removed macro, added prototype.
16465 * linux-low.h (regset_func): Removed.
16466 (regset_fill_func, regset_store_func): New.
16467 (enum regset_type): New.
16468 (struct regset_info): Add type field. Use new operation types.
16469 (struct linux_target_ops): stop_pc renamed to get_pc.
16470 Add decr_pc_after_break and breakpoint_at.
16471 (get_process, get_thread_proess, get_process_thread)
16472 (strut process_info, all_processes, linux_attach_lwp)
16473 (thread_db_init): New.
16475 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16476 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16477 (the_low_target): Add new members.
16478 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16479 (i386_store_fpxregset): Constify.
16480 (target_regsets): Add new kind identifier.
16481 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16482 (i386_set_pc): Add debugging.
16483 (i386_breakpoint_at): New function.
16484 (the_low_target): Add new members.
16485 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16486 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16487 (mips_breakpoint_at): New.
16488 (the_low_target): Add new members.
16489 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16490 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16491 (the_low_target): Add new members.
16492 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16493 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16494 (the_low_target): Add new members.
16495 * linux-x86-64-low.c (target_regsets): Add new kind
16498 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16500 From Martin Pool <mbp@samba.org>:
16501 * server.c (gdbserver_usage): New function.
16504 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16506 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16507 stop_at -> stop_pc.
16509 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16511 * Makefile.in: Remove obsolete code.
16513 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16515 * linux-low.c (regsets_fetch_inferior_registers),
16516 (regsets_store_inferior_registers): Removed cast to int from
16518 * regcache.h: Added declaration of struct inferior_info.
16520 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16522 * inferiors.c (struct inferior_info): Add regcache_data.
16523 (add_inferior): Call create_register_cache.
16524 (clear_inferiors): Call free_register_cache.
16525 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16526 * regcache.c (struct inferior_regcache_data): New.
16527 (registers): Remove.
16528 (get_regcache): New function.
16529 (create_register_cache, free_register_cache): New functions.
16530 (set_register_cache): Don't initialize the register cache here.
16531 (registers_to_string, registers_from_string, register_data): Call
16533 * regcache.h: Add prototypes.
16534 * server.h: Likewise.
16536 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16538 * mem-break.c: New file.
16539 * mem-break.h: New file.
16540 * Makefile.in: Add mem-break.o rule; update server.h
16542 * inferiors.c (struct inferior_info): Add target_data
16544 (clear_inferiors): Free target_data member if set.
16545 (inferior_target_data, set_inferior_target_data): New functions.
16546 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16547 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16548 * linux-low.c (linux_bp_reinsert): New variable.
16549 (struct inferior_linux_data): New.
16550 (linux_create_inferior): Use set_inferior_target_data.
16551 (linux_attach): Likewise. Call add_inferior.
16552 (linux_wait_for_one_inferior): New function.
16553 (linux_wait): Call it.
16554 (linux_write_memory): Add const.
16555 (initialize_low): Call set_breakpoint_data.
16556 * linux-low.h (struct linux_target_ops): Add breakpoint
16558 * server.c (attach_inferior): Remove extra add_inferior
16560 * server.h: Include mem-break.h. Update inferior.c
16562 * target.c (read_inferior_memory)
16563 (write_inferior_memory): New functions.
16564 * target.h (read_inferior_memory)
16565 (write_inferior_memory): Change macros to prototypes.
16566 (struct target_ops): Update comments. Add const to write_memory
16569 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16571 * linux-low.c (usr_store_inferior_registers): Support
16572 registers which are allowed to fail to store.
16573 * linux-low.h (linux_target_ops): Likewise.
16574 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16575 (ppc_cannot_store_register): FPSCR may not be storable.
16577 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16579 * server.h: Include <string.h> if HAVE_STRING_H.
16580 * ChangeLog: Correct paths in last ChangeLog entry.
16582 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16584 * linux-low.h: Remove obsolete prototypes.
16585 (struct linux_target_ops): New.
16586 (extern the_low_target): New.
16587 * linux-low.c (num_regs, regmap): Remove declarations.
16588 (register_addr): Use the_low_target explicitly.
16589 (fetch_register): Likewise.
16590 (usr_fetch_inferior_registers): Likewise.
16591 (usr_store_inferior_registers): Likewise.
16592 * linux-arm-low.c (num_regs): Remove.
16593 (arm_num_regs): Define.
16594 (arm_regmap): Renamed from regmap, made static.
16595 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16597 (arm_cannot_store_register): Renamed from cannot_store_register,
16599 (the_low_target): New.
16600 * linux-i386-low.c (num_regs): Remove.
16601 (i386_num_regs): Define.
16602 (i386_regmap): Renamed from regmap, made static.
16603 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16605 (i386_cannot_store_register): Renamed from cannot_store_register,
16607 (the_low_target): New.
16608 * linux-ia64-low.c (num_regs): Remove.
16609 (ia64_num_regs): Define.
16610 (ia64_regmap): Renamed from regmap, made static.
16611 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16613 (ia64_cannot_store_register): Renamed from cannot_store_register,
16615 (the_low_target): New.
16616 * linux-m68k-low.c (num_regs): Remove.
16617 (m68k_num_regs): Define.
16618 (m68k_regmap): Renamed from regmap, made static.
16619 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16621 (m68k_cannot_store_register): Renamed from cannot_store_register,
16623 (the_low_target): New.
16624 * linux-mips-low.c (num_regs): Remove.
16625 (mips_num_regs): Define.
16626 (mips_regmap): Renamed from regmap, made static.
16627 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16629 (mips_cannot_store_register): Renamed from cannot_store_register,
16631 (the_low_target): New.
16632 * linux-ppc-low.c (num_regs): Remove.
16633 (ppc_num_regs): Define.
16634 (ppc_regmap): Renamed from regmap, made static.
16635 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16637 (ppc_cannot_store_register): Renamed from cannot_store_register,
16639 (the_low_target): New.
16640 * linux-s390-low.c (num_regs): Remove.
16641 (s390_num_regs): Define.
16642 (s390_regmap): Renamed from regmap, made static.
16643 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16645 (s390_cannot_store_register): Renamed from cannot_store_register,
16647 (the_low_target): New.
16648 * linux-sh-low.c (num_regs): Remove.
16649 (sh_num_regs): Define.
16650 (sh_regmap): Renamed from regmap, made static.
16651 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16653 (sh_cannot_store_register): Renamed from cannot_store_register,
16655 (the_low_target): New.
16656 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16657 (the_low_target): New.
16659 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16661 * Makefile.in: Add stamp-h target.
16662 * configure.in: Create stamp-h.
16663 * configure: Regenerated.
16665 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16667 * inferiors.c: New file.
16668 * target.c: New file.
16669 * target.h: New file.
16670 * Makefile.in: Add target.o and inferiors.o. Update
16672 * linux-low.c (inferior_pid): New static variable,
16673 moved from server.c.
16674 (linux_create_inferior): Renamed from create_inferior.
16675 Call add_inferior. Return 0 on success instead of a PID.
16676 (linux_attach): Renamed from myattach.
16677 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16678 (linux_thread_alive): Renamed from mythread_alive.
16679 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16681 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16682 (regsets_store_inferior_registers): Correct error message.
16683 Add missing ``return 0''.
16684 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16685 (linux_store_registers): Renamed from store_inferior_registers.
16686 (linux_read_memory): Renamed from read_inferior_memory.
16687 (linux_write_memory): Renamed from write_inferior_memory.
16688 (linux_target_ops): New structure.
16689 (initialize_low): Call set_target_ops ().
16690 * remote-utils.c (unhexify): New function.
16691 (hexify): New function.
16692 (input_interrupt): Send signals to ``signal_pid''.
16693 * server.c (inferior_pid): Remove.
16694 (start_inferior): Update create_inferior call.
16695 (attach_inferior): Call add_inferior.
16696 (handle_query): New function.
16697 (main): Call handle_query for `q' packets.
16698 * server.h: Include "target.h". Remove obsolete prototypes.
16699 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16701 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16703 * Makefile.in: Add WARN_CFLAGS. Update configury
16705 * configure.in: Check for <string.h>
16706 * configure: Regenerate.
16707 * config.in: Regenerate.
16708 * gdbreplay.c: Include needed system headers.
16709 (remote_open): Remove strchr prototype.
16710 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16711 * regcache.c (supply_register): Change buf argument to const void *.
16712 (supply_register_by_name): Likewise.
16713 (collect_register): Change buf argument to void *.
16714 (collect_register_by_name): Likewise.
16715 * regcache.h: Add missing prototypes.
16716 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16717 * server.c (handle_query): New function.
16718 (attached): New static variable, moved out of main.
16719 (main): Quiet longjmp clobber warnings.
16720 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16721 * utils.c (error): Remove NORETURN.