1 2018-07-13 Pedro Alves <palves@redhat.com>
3 * linux-low.c (linux_detach, linux_join): Change parameter to
4 process_info pointer instead of pid. Adjust.
5 * lynx-low.c (lynx_detach, lynx_join): Likewise.
6 * nto-low.c (nto_detach): Likewise.
7 * spu-low.c (spu_detach, spu_join): Likewise.
8 * win32-low.c (win32_detach, win32_join): Likewise.
9 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
10 * target.h (struct target_ops) <detach, join>: Change parameter to
11 process_info pointer instead of pid. Adjust all implementations
13 (detach_inferior, join_inferior): Rename 'pid' parameter to
16 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
17 Jan Kratochvil <jan.kratochvil@redhat.com>
18 Paul Fertser <fercerpav@gmail.com>
19 Tsutomu Seki <sekiriki@gmail.com>
21 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
22 (OBS): Add 'common/netstuff.o'.
23 (GDBREPLAY_OBS): Likewise.
24 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
25 (remote_open): Implement support for IPv6
27 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
29 (handle_accept_event): Accept connections from IPv6 sources.
30 (remote_prepare): Handle IPv6-style hostnames; implement
31 support for IPv6 connections.
32 (remote_open): Implement support for printing connections from
35 2018-07-11 Pedro Alves <palves@redhat.com>
38 * mem-break.c (any_persistent_commands): Add process_info
39 parameter and use it instead of relying on the current process.
40 Change return type to bool.
41 * mem-break.h (any_persistent_commands): Add process_info
42 parameter and change return type to bool.
43 * server.c (handle_detach): Remove require_running_or_return call.
44 Look up the process_info for the process we're about to detach.
45 If not found, return back error to GDB. Adjust
46 any_persistent_commands call to pass down a process pointer.
48 2018-07-11 Pedro Alves <palves@redhat.com>
50 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
51 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
52 instead of collect_register_by_name.
53 * regcache.c (regcache_raw_get_unsigned_by_name): New.
54 * regcache.h (regcache_raw_get_unsigned_by_name): New.
56 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
57 Pedro Alves <palves@redhat.com>
59 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
61 2018-07-03 Tom Tromey <tom@tromey.com>
63 * linux-low.c: Update.
65 * mem-break.c: Update.
67 * remote-utils.c: Update.
71 * win32-low.c: Update.
73 2018-07-03 Tom Tromey <tom@tromey.com>
77 2018-07-03 Tom Tromey <tom@tromey.com>
79 * linux-low.c: Update.
81 2018-07-03 Tom Tromey <tom@tromey.com>
85 2018-07-03 Tom Tromey <tom@tromey.com>
87 * linux-low.c: Update.
88 * linux-mips-low.c: Update.
91 * remote-utils.c: Update.
95 * thread-db.c: Update.
97 2018-07-03 Tom Tromey <tom@tromey.com>
99 * linux-low.c: Update.
100 * linux-mips-low.c: Update.
101 * lynx-low.c: Update.
102 * mem-break.c: Update.
104 * remote-utils.c: Update.
108 * tracepoint.c: Update.
110 2018-07-03 Tom Tromey <tom@tromey.com>
112 * linux-low.c: Update.
113 * linux-ppc-low.c: Update.
114 * linux-x86-low.c: Update.
115 * proc-service.c: Update.
118 * thread-db.c: Update.
119 * win32-low.c: Update.
121 2018-07-03 Tom Tromey <tom@tromey.com>
123 * linux-low.c: Update.
124 * lynx-low.c: Update.
126 * remote-utils.c: Update.
128 * thread-db.c: Update.
129 * win32-low.c: Update.
131 2018-06-29 Joel Brobecker <brobecker@adacore.com>
133 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
134 parameter in call to 'amd64_create_target_description'.
136 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
138 * x86-tdesc.h: Remove executable permission flag.
140 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
142 * configure.ac: Remove AC_PREREQ, add missing quoting.
143 * configure: Re-generate.
144 * config.in: Re-generate.
145 * aclocal.m4: Re-generate.
147 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
149 * tracepoint.h (current_traceframe): Remove declaration.
151 2018-06-18 Alan Hayward <alan.hayward@arm.com>
153 * linux-aarch64-low.c (is_sve_tdesc): New function.
154 (aarch64_sve_regs_copy_to_regcache): Likewise.
155 (aarch64_sve_regs_copy_from_regcache): Likewise.
156 (aarch64_regs_info): Add SVE checks.
157 (initialize_low_arch): Initialize SVE.
159 2018-06-18 Alan Hayward <alan.hayward@arm.com>
161 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
163 2018-06-11 Alan Hayward <alan.hayward@arm.com>
165 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
166 (initialize_low_tracepoint): Likewise
167 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
168 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
170 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
172 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
174 2018-06-11 Alan Hayward <alan.hayward@arm.com>
176 * server.h (PBUFSIZ): Increase size
178 2018-06-11 Alan Hayward <alan.hayward@arm.com>
180 * regcache.c (regcache::raw_compare): New function.
181 * regcache.h (regcache::raw_compare): New declaration.
183 2018-06-11 Alan Hayward <alan.hayward@arm.com>
185 * regcache.c (new_register_cache): Use new.
186 (free_register_cache): Use delete.
187 (register_data): Use const.
188 (supply_register): Move body inside regcache.
189 (regcache::raw_supply): New override function.
190 (collect_register): Move body inside regcache.
191 (regcache::raw_collect): New override function.
192 (regcache::get_register_status): New override function.
193 * regcache.h (struct regcache): Inherit from reg_buffer_common.
195 2018-06-09 Tom Tromey <tom@tromey.com>
197 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
199 (event_queue): Use std::queue.
200 (gdb_event_xfree): Remove.
201 (initialize_event_loop, process_event, wait_for_event): Update.
203 2018-06-08 Stan Cox <scox@redhat.com>
205 * win32-low.c (win32_create_inferior): last_ptid and last_status
206 moved to client_state.
208 2018-06-08 Pedro Alves <palves@redhat.com>
210 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
211 common/common-exceptions.o, common/common-utils.o,
212 common/errors.o, common/print-utils.o and utils.o.
213 * gdbreplay.c: Include "common-defs.h" instead of the two
214 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
215 string.h or alloca.h.
216 (perror_with_name): Delete.
217 (remote_open): Use xstrdup instead of strdup.
218 (main): Rename to ...
219 (captured_main): ... this.
222 2018-06-08 Tom Tromey <tom@tromey.com>
224 * linux-low.c (linux_low_read_btrace): Update.
226 2018-06-04 Stan Cox <scox@redhat.com>
228 * server.h (struct client_state): New.
229 * server.c (cont_thread, general_thread, multi_process)
230 (report_fork_events, report_vfork_events, report_exec_events)
231 (report_thread_events, swbreak_feature, hwbreak_feature)
232 (vCont_supported, disable_randomization, pass_signals)
233 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
234 Moved to client_state.
235 * remote-utils.c (remote_debug, noack_mode)
236 (transport_is_reliable): Moved to client_state.
237 * tracepoint.c (current_traceframe): Moved to client_state.
240 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
241 linux-low.c, remote-utils.h, target.c: Use client_state.
243 2018-05-31 Alan Hayward <alan.hayward@arm.com>
245 * configure.srv: Add new c/h file.
247 2018-05-31 Alan Hayward <alan.hayward@arm.com>
249 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
252 2018-05-25 Maciej W. Rozycki <macro@mips.com>
254 * gdb.arch/mips-fpregset-core.exp: New test.
255 * gdb.arch/mips-fpregset-core.c: New test source.
257 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
260 * hostio.c (require_int): Do not report overflow for integers
261 between 0xfffffff and 0x7fffffff.
263 2018-05-22 Maciej W. Rozycki <macro@mips.com>
265 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
266 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
267 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
269 (the_low_target): Wire them.
271 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
273 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
274 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
275 mode. Call collect_register_by_name with vscr using
276 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
277 (ppc_store_vrregset): Add and set vscr_offset variable as in
278 ppc_fill_vrregset. Call supply_register_by_name with vscr using
281 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
283 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
284 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
285 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
287 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
289 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
290 (ppc_store_vsxregset): Likewise.
291 (ppc_fill_vrregset): Likewise.
292 (ppc_store_vrregset): Likewise.
293 (ppc_fill_evrregset): Likewise.
294 (ppc_store_evrregset): Likewise.
295 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
296 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
299 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
301 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
302 wordsize of the inferior. Call ppc_linux_target_wordsize.
304 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
306 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
307 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
308 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
309 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
310 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
311 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
312 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
313 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
314 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
315 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
316 (tdesc_powerpc_e500l): Remove.
317 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
318 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
319 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
320 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
322 (ppc_arch_setup): Remove target description matching code. Fill a
323 ppc_linux_features struct and call ppc_linux_match_description
326 2018-05-22 Maciej W. Rozycki <macro@mips.com>
328 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
329 width of the requested register exceeds the width of the
331 (mips_cannot_store_register): Likewise.
333 2018-05-21 Maciej W. Rozycki <macro@mips.com>
335 * linux-mips-low.c (mips_fetch_register): New function. Update
337 (mips_store_gregset): Supply 0 rather than $restart for $zero.
338 (the_low_target): Wire `mips_fetch_register'.
340 2018-05-10 Joel Brobecker <brobecker@adacore.com>
342 * lynx-i386-low.c (LYNXOS_178): New macro.
343 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
344 the layout on LynxOS-178.
345 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
346 handle floating point registers that are not supported by
349 2018-05-10 Tom Tromey <tom@tromey.com>
351 * configure: Rebuild.
353 2018-05-10 Joel Brobecker <brobecker@adacore.com>
356 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
357 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
358 Use it to set the expedite_regs field in the given tdesc.
359 * x86-tdesc.h: New file.
360 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
361 Adjust following the addition of the new expedite_regs parameter
363 * linux-tic6x-low.c (tic6x_read_description): Likewise.
364 * linux-x86-tdesc.c: #include "x86-tdesc.h".
365 (i386_linux_read_description, amd64_linux_read_description):
366 Adjust following the addition of the new expedite_regs parameter
368 * lynx-i386-low.c: #include "x86-tdesc.h".
369 (lynx_i386_arch_setup): Adjust following the addition of the new
370 expedite_regs parameter to init_target_desc.
371 * nto-x86-low.c: #include "x86-tdesc.h".
372 (nto_x86_arch_setup): Adjust following the addition of the new
373 expedite_regs parameter to init_target_desc.
374 * win32-i386-low.c: #include "x86-tdesc.h".
375 (i386_arch_setup): Adjust following the addition of the new
376 expedite_regs parameter to init_target_desc.
378 2018-05-10 Joel Brobecker <brobecker@adacore.com>
381 * win32-low.c (win32_create_inferior): Add call to my_wait
382 setting last_status global.
384 2018-05-10 Joel Brobecker <brobecker@adacore.com>
387 * win32-low.c (create_process): Only call gdb_tilde_expand if
388 inferior_cwd is not NULL.
390 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
392 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
393 registers to the cache if their values have changed.
394 (i387_xsave_to_cache): Provide default values for x87 control
395 registers when these features are available, but disabled.
396 * regcache.c (supply_register_by_name_zeroed): New function.
397 * regcache.h (supply_register_by_name_zeroed): Declare new
400 2018-05-07 Tom Tromey <tom@tromey.com>
402 * configure: Rebuild.
404 2018-05-04 Tom Tromey <tom@tromey.com>
406 * configure: Rebuild.
408 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
409 Pedro Alves <palves@redhat.com>
411 * linux-aarch64-low.c (aarch64_stopped_data_address):
414 2018-04-27 Tom Tromey <tom@tromey.com>
416 * configure: Rebuild.
418 2018-04-23 Tom Tromey <tom@tromey.com>
420 * configure: Rebuild.
422 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
424 * Makefile.in (depcomp): Add "..".
425 (all_deps_files): New and use it.
427 2018-04-18 Alan Hayward <alan.hayward@arm.com>
429 * configure.srv (aarch64*-*-linux*): Don't include xml.
430 (i[34567]86-*-cygwin*): Likewise.
431 (i[34567]86-*-linux*): Likewise.
432 (i[34567]86-*-lynxos*): Likewise.
433 (i[34567]86-*-mingw32ce*): Likewise.
434 (i[34567]86-*-mingw*): Likewise.
435 (i[34567]86-*-nto*): Likewise.
436 (tic6x-*-uclinux): Likewise.
437 (x86_64-*-linux*): Likewise.
438 (x86_64-*-mingw*): Likewise.
439 (x86_64-*-cygwin*): Likewise.
441 2018-04-18 Alan Hayward <alan.hayward@arm.com>
443 * tdesc.c: Remove xml parameter.
445 2018-04-18 Alan Hayward <alan.hayward@arm.com>
447 * server.c (get_features_xml): Remove cast.
448 * tdesc.c (void target_desc::accept): Fill in function.
449 (tdesc_get_features_xml): Remove old xml creation.
450 (print_xml_feature::visit_pre): Add xml vistor.
451 * tdesc.h (struct target_desc): Make xmltarget mutable.
452 (tdesc_get_features_xml): Remove declaration.
454 2018-04-18 Alan Hayward <alan.hayward@arm.com>
456 * tdesc.c (tdesc_architecture_name): Add new function.
457 (tdesc_osabi_name): Likewise.
458 (tdesc_get_features_xml): Use new functions.
460 2018-04-18 Alan Hayward <alan.hayward@arm.com>
462 * tdesc.c (tdesc_create_flags): Remove.
463 (tdesc_add_flag): Likewise.
464 (tdesc_named_type): Likewise.
465 (tdesc_create_union): Likewise.
466 (tdesc_create_struct): Likewise.
467 (tdesc_create_vector): Likewise.
468 (tdesc_add_bitfield): Likewise.
469 (tdesc_add_field): Likewise.
470 (tdesc_set_struct_size): Likewise.
472 2018-04-18 Alan Hayward <alan.hayward@arm.com>
474 * tdesc.c (~target_desc): Remove implictly deleted items.
475 (init_target_desc): Iterate all features.
476 (tdesc_get_features_xml): Use vector.
477 (tdesc_create_feature): Create feature.
478 * tdesc.h (tdesc_feature) Remove
479 (target_desc): Add features.
481 2018-04-18 Alan Hayward <alan.hayward@arm.com>
483 * Makefile.in: Add common/tdesc.c
484 * tdesc.c (init_target_desc): init all reg_defs from register
486 (tdesc_create_reg): Create tdesc_reg.
487 * tdesc.h (tdesc_feature): Add register vector.
489 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
491 * tdesc.h (struct target_desc) <features>: Change type to
492 std::vector<std::string>.
493 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
495 (tdesc_get_features_xml): Likewise.
496 (tdesc_create_feature): Likewise.
498 2018-03-26 Alan Hayward <alan.hayward@arm.com>
500 * regcache.c (find_register_by_number): Return a ref.
501 (find_regno): Use references.
502 (register_size): Likewise.
503 (register_data): Likewise.
504 * tdesc.c (target_desc::~target_desc): Remove free calls.
505 (target_desc::operator==): Use std::vector compare.
506 (init_target_desc): Use reference.
507 (tdesc_create_reg): Use reg constructors.
508 * tdesc.h (struct target_desc): Replace pointer with object.
510 2018-03-23 Alan Hayward <alan.hayward@arm.com>
512 * regcache.c (find_register_by_number): Make static.
513 (find_regno): Use find_register_by_number
514 * regcache.h (struct reg): Remove declaration.
516 2018-03-23 Alan Hayward <alan.hayward@arm.com>
518 * tdesc.c (target_desc::~target_desc): Move to here.
519 (target_desc::operator==): Likewise.
520 * tdesc.h (target_desc::~target_desc): Move from here.
521 (target_desc::operator==): Likewise.
523 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
525 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
527 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
529 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
531 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
532 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
533 and init_registers_s390_gs_linux64.
535 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
537 * linux-s390-low.c (s390_fill_gs): Remove function.
538 (s390_fill_gsbc): Remove function.
539 (s390_regsets): Set fill functions for the guarded storage regsets
542 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
544 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
545 the word size. Add comment.
546 (s390_get_wordsize): New function.
547 (s390_arch_setup): No longer select a temporary tdesc to fetch the
548 pswm with it. Instead, use s390_get_wordsize to determine the
549 word size first and derive the correct tdesc from that directly.
551 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
553 * Makefile.in: Include silent-rules.mk.
554 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
555 (COMPILE): Add ECHO_CXX.
556 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
557 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
558 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
559 (version-generated.c): Add ECHO_GEN.
560 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
561 (IPAGENT_COMPILE): Add ECHO_CXX.
562 (%-generated.c): Add ECHO_REGDAT.
564 2018-03-14 Tom Tromey <tom@tromey.com>
567 * ax.c (ax_printf): Special case for NULL.
569 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
571 * linux-low.c (linux_qxfer_libraries_svr4): Use
572 xml_escape_text_append.
574 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
576 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
578 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
580 * server.c (handle_general_set): Remove unnecessary xstrdup.
582 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
584 * server.c (parse_debug_format_options): Adjust to
585 delim_string_to_char_ptr_vec changes.
586 * thread-db.c (thread_db_load_search): Adjust to
587 dirnames_to_char_ptr_vec changes.
589 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
591 * target.h (target_enable_btrace, target_disable_btrace)
592 (target_read_btrace, target_read_btrace_conf): Turn macro into
593 inline function. Throw error if target method is not defined.
594 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
595 check for btrace target method. Be prepared to handle exceptions
596 from btrace target methods.
598 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
600 * server.c (captured_main): Change order of error message printed
601 when the current working directory cannot be found.
603 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
605 * server.c: Include "filenames.h" and "pathstuff.h".
606 (program_name): Delete variable.
607 (program_path): New anonymous class.
608 (get_exec_wrapper): Use "program_path" instead of
610 (handle_v_run): Likewise.
611 (captured_main): Likewise.
612 (process_serial_event): Likewise.
614 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
616 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
617 (OBJS): Add "pathstuff.o".
618 * server.c (current_directory): New global variable.
619 (captured_main): Initialize "current_directory".
621 2018-02-26 Alan Hayward <alan.hayward@arm.com>
623 * tdesc.c: Use common/tdesc.h.
626 2018-02-20 Alan Hayward <alan.hayward@arm.com>
627 Simon Marchi <simon.marchi@ericsson.com>
629 * Makefile.in: Switch order of make rules.
631 2018-02-19 Alan Hayward <alan.hayward@arm.com>
633 * Makefile.in: Add common directory in build.
634 * configure.ac: Add common reference.
635 * configure: Regenerate.
637 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
639 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
640 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
641 * spu-low.c (spu_target_ops): Likewise.
642 * win32-low.c (win32_target_ops): Likewise.
643 * server.c (supported_btrace_packets): Report packets unconditionally.
644 * target.h (target_ops) <supports_btrace>: Remove.
645 (target_supports_btrace): Remove.
647 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
649 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
650 (handle_btrace_disable): Change return type to void. Use exceptions
652 (handle_btrace_general_set): Catch exception and copy message to
655 2018-02-08 Tom Tromey <tom@tromey.com>
657 * linux-low.c (install_software_single_step_breakpoints): Use
659 * inferiors.c (make_cleanup_restore_current_thread): Remove.
660 (do_restore_current_thread_cleanup): Remove.
661 * gdbthread.h (make_cleanup_restore_current_thread): Don't
664 2018-02-08 Tom Tromey <tom@tromey.com>
666 * mem-break.c (set_raw_breakpoint_at): Use
667 gdb::unique_xmalloc_ptr.
669 2018-01-30 Pedro Alves <palves@redhat.com>
672 * target.c (target_terminal::terminal_state): Rename to ...
673 (target_terminal::m_terminal_state): ... this.
675 2018-01-19 James Clarke <jrtc27@jrtc27.com>
677 * linux-low.c (handle_extended_wait): Surround call to
678 thread_db_notice_clone with #ifdef USE_THREAD_DB.
680 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
682 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
683 linux_ptrace_attach_fail_reason_string now returning an
685 (linux_attach): Likewise.
686 * thread-db.c (attach_thread): Likewise.
688 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
691 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
692 checking for fs_base/gs_base fields in struct user_regs_struct.
693 * configure: Regenerate.
695 2018-01-16 Yao Qi <yao.qi@linaro.org>
698 * linux-low.c (fetch_register): Call supply_register instead of
701 2018-01-08 Yao Qi <yao.qi@linaro.org>
702 Simon Marchi <simon.marchi@ericsson.com>
704 * Makefile.in (OBS): Remove selftest.o.
705 * configure.ac: Set srv_selftest_objs if $development is true.
706 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
707 * configure: Re-generated.
708 * server.c (captured_main): Wrap variable selftest_filter with
711 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
713 * server.c (parse_debug_format_options): Return std::string.
714 (handle_monitor_command, captured_main): Adjust.
716 2018-01-05 Pedro Alves <palves@redhat.com>
719 * server.c (captured_main): Pass quiet=false to
720 save_original_signals_state.
722 2018-01-01 Joel Brobecker <brobecker@adacore.com>
724 * gdbreplay.c (gdbreplay_version): Update copyright year in
726 * server.c (gdbserver_version): Likewise.
728 2017-12-08 Tom Tromey <tom@tromey.com>
730 * ax.c (ax_printf): Update.
732 2017-12-07 Yao Qi <yao.qi@linaro.org>
734 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
735 aarch64_linux_read_description.
736 * linux-amd64-ipa.c (idx2mask): New array.
737 (get_ipa_tdesc): Move idx2mask out.
738 (initialize_low_tracepoint): Initialize target descriptions.
739 * linux-i386-ipa.c (idx2mask): New array.
740 (get_ipa_tdesc): Move idx2mask out.
741 (initialize_low_tracepoint): Initialize target descriptions.
743 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
745 * tdesc.c (struct tdesc_type): Change return type.
746 (tdesc_add_flag): Change parameter type.
747 (tdesc_add_bitfield): Likewise.
748 (tdesc_add_field): Likewise.
749 (tdesc_set_struct_size): Likewise.
751 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
753 * regcache.c (registers_to_string): Remove unused variable.
755 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
757 * inferiors.c (for_each_inferior_with_data): Remove.
758 * inferiors.h (for_each_inferior_with_data): Remove.
759 * server.c (handle_qxfer_threads_worker): Change parameter type.
760 (handle_qxfer_threads_proper): Use for_each_thread.
762 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
764 * inferiors.c (for_each_inferior): Remove.
765 (clear_inferiors): Use for_each_thread.
766 * inferiors.h (for_each_inferior): Remove.
767 * linux-low.c (linux_wait_for_event_filtered): Use
769 (linux_stabilize_threads): Likewise.
770 * regcache.c (regcache_release): Likewise.
771 * server.c (gdb_wants_all_threads_stopped): Likewise.
772 (clear_pending_status_callback): Remove.
773 (handle_status): Use for_each_thread.
774 (captured_main): Likewise.
775 * win32-low.c (child_init_thread_list): Likewise.
776 (win32_clear_inferiors): Likewise.
777 (fake_breakpoint_event): Likewise.
779 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
781 * inferiors.h (find_inferior): Remove.
782 * inferiors.c (find_inferior): Remove.
784 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
786 * linux-low.c (resume_status_pending_p): Update comment.
787 (need_step_over_p): Update comment.
789 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
791 * linux-low.c (proceed_one_lwp): Return void, change parameter
793 (unsuspend_and_proceed_one_lwp): Likewise.
794 (proceed_all_lwps): Use for_each_thread.
795 (unstop_all_lwps): Likewise.
797 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
799 * linux-low.c (linux_resume_one_thread): Return void, take
801 (linux_resume): Use for_each_thread.
803 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
805 * linux-low.c (send_sigstop_callback): Return void, change
806 parameter type. Rename to...
807 (send_sigstop): ... this.
808 (suspend_and_send_sigstop_callback): Return void, change parameter
810 (suspend_and_send_sigstop): ... this.
811 (stop_all_lwps): Use for_each_thread.
813 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
815 * linux-low.c (lwp_running): Return bool, remove unused
817 (linux_stabilize_threads): Use find_thread.
819 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
821 * linux-low.c (select_singlestep_lwp_callback): Remove.
822 (count_events_callback): Remove.
823 (select_event_lwp_callback): Remove.
824 (select_event_lwp): Use find_thread/for_each_thread.
826 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
828 * linux-low.c (not_stopped_callback): Return bool, take filter
830 (linux_wait_for_event_filtered): Use find_thread.
831 (linux_wait_1): Likewise.
833 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
835 * linux-low.c (same_lwp): Remove.
836 (find_lwp_pid): Use find_thread.
838 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
840 * linux-low.c (delete_lwp_callback): Remove.
841 (linux_mourn): Use for_each_thread.
843 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
845 * linux-low.c (linux_detach_lwp_callback): Return void, remove
846 args parameter, don't check for pid.
847 (linux_detach): Use for_each_thread.
849 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
851 * linux-low.c (struct counter): Remove.
852 (second_thread_of_pid_p): Remove.
853 (last_thread_of_process_p): Use find_thread.
855 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
857 * inferiors.c (find_inferior_in_random): Remove.
858 * inferiors.h (find_inferior_in_random): Remove.
859 * linux-low.c (status_pending_p_callback): Return bool, accept
860 parameter ptid directly.
861 (linux_wait_for_event_filtered): Use find_thread_in_random.
862 (linux_wait_1): Likewise.
864 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
866 * inferiors.c (find_inferior_id): Remove.
867 (find_thread_ptid): Move implemention from find_inferior_id to
869 * inferiors.h (find_inferior_id): Remove.
870 * server.c (handle_status): Use find_thread_ptid.
871 (process_serial_event): Likewise.
872 * thread-db.c (find_one_thread): Likewise.
873 (thread_db_thread_handle): Likewise.
874 * win32-low.c (thread_rec): Likewise.
875 (child_delete_thread): Likewise.
876 (win32_thread_alive): Likewise.
877 (get_child_debug_event): Likewise.
879 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
881 * linux-mips-low.c (update_watch_registers_callback): Return
882 void, remove pid_p parameter, don't check for pid.
883 (mips_insert_point, mips_remove_point): Use for_each_thread.
885 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
887 * lynx.low (lynx_delete_thread_callback): Remove.
888 (lynx_mourn): Use for_each_thread.
890 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
892 * regcache.c (regcache_invalidate_one): Remove.
893 (regcache_invalidate_pid): use for_each_thread.
895 2017-11-26 Tom Tromey <tom@tromey.com>
897 * linux-low.c (linux_create_inferior): Update.
899 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
901 * spu-low.c (spu_create_inferior): Fix typo in argument name.
903 2017-11-24 Alan Hayward <alan.hayward@arm.com>
905 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
906 * linux-aarch64-low.c (initialize_low_arch): Call init func.
907 * linux-aarch64-tdesc-selftest.c: New file.
908 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
910 2017-11-24 Alan Hayward <alan.hayward@arm.com>
912 * configure.srv: Add new file.
913 * linux-aarch64-low.c (initialize_low_arch): Call init func.
914 * linux-aarch64-tdesc-selftest.c: New file.
915 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
917 2017-11-24 Alan Hayward <alan.hayward@arm.com>
919 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
920 * linux-aarch64-low.c (initialize_low_arch): Remove init.
921 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
923 2017-11-24 Alan Hayward <alan.hayward@arm.com>
925 * configure.srv: Add new files.
926 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
927 aarch64_linux_read_description.
928 * linux-aarch64-low.c (aarch64_linux_read_description):
929 Merge with aarch64_arch_setup.
930 (aarch64_arch_setup): Call aarch64_linux_read_description.
931 * linux-aarch64-tdesc.c: New file.
932 * linux-aarch64-tdesc.h: New file.
934 2017-11-24 Yao Qi <yao.qi@linaro.org>
936 * configure.srv: Set $srv_regobj for tic6x-linux.
937 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
938 (tic6x_read_description): Move some code to tic6x_arch_setup.
939 (tic6x_tdesc_test): New function.
940 (initialize_low_arch): Call selftests::register_test.
942 2017-11-22 Yao Qi <yao.qi@linaro.org>
944 * remote-utils.c (prepare_resume_reply): Use memcpy.
946 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
948 * linux-low.c (kill_one_lwp_callback): Return void, take
949 argument directly, don't filter on pid.
950 (linux_kill): Use for_each_thread.
952 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
954 * linux-low.c (need_step_over_p): Return bool, remove dummy
956 (linux_resume, proceed_all_lwps): Use find_thread.
958 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
960 * linux-low.c (resume_status_pending_p): Return bool, remove
962 (linux_resume): Use find_thread.
964 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
966 * linux-low.c (struct thread_resume_array): Remove.
967 (linux_set_resume_request): Return void, take arguments
969 (linux_resume): Use for_each_thread.
971 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
973 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
974 return bool, remove data argument.
975 (linux_stabilize_threads): Use find_thread.
977 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
979 * linux-low.c (unsuspend_one_lwp): Remove.
980 (unsuspend_all_lwps): Use for_each_thread, inline code from
983 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
985 * gdbthread.h (find_thread): Add overload with ptid_t filter.
986 * linux-low.c (struct iterate_over_lwps_args): Remove.
987 (iterate_over_lwps_filter): Remove.
988 (iterate_over_lwps): Use find_thread.
990 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
992 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
993 (linux_handle_new_gdb_connection): Use for_each_thread, inline
994 code from reset_lwp_ptrace_options_callback.
996 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
998 * linux-arm-low.c (struct update_registers_data): Remove.
999 (update_registers_callback): Return void, take arguments
1000 directly, don't check thread's pid.
1001 (arm_insert_point, arm_remove_point): Use for_each_thread.
1003 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1005 * win32-low.c (continue_one_thread): Return void, take argument
1007 (child_continue): Use for_each_thread.
1009 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1011 * win32-i386-low.c (update_debug_registers_callback): Rename
1013 (update_debug_registers): ... this, return void, remove pid_p arg.
1014 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1016 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1018 * inferiors.h (struct process_info): Add constructor, initialize
1020 <syscalls_to_catch>: Change type to std::vector<int>.
1021 * inferiors.c (add_process): Allocate process_info with new.
1022 (remove_process): Free process_info with delete.
1023 * linux-low.c (handle_extended_wait): Adjust.
1024 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1025 * server.c (handle_general_set): Adjust.
1027 2017-11-16 Pedro Alves <palves@redhat.com>
1029 * remote-utils.c (remote_close): Block SIGIO signals instead of
1030 uninstalling the SIGIO handler.
1032 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1034 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1036 2017-11-16 Yao Qi <yao.qi@linaro.org>
1038 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1039 (tic6x_store_gregset): Likewise.
1040 (tic6x_usrregs_info): Move it up.
1042 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1044 * Makefile.in: Update arch rules.
1045 * configure.srv: Explicitly mark arch/ files.
1047 2017-11-13 Andreas Schwab <schwab@suse.de>
1049 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1051 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1053 2017-11-06 Pedro Alves <palves@redhat.com>
1055 * config.in, configure: Regenerate.
1057 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1059 * target.c (struct thread_search): Remove.
1060 (thread_search_callback): Remove.
1061 (prepare_to_access_memory): Use for_each_thread instead of
1062 find_inferior. Inline code from thread_search_callback.
1064 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1066 * server.c (struct visit_actioned_threads_data): Remove.
1067 (visit_actioned_threads): Change prototype to take arguments
1069 (resume): Use find_thread instead of find_inferior.
1071 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1073 * server.c (queue_stop_reply_callback): Change prototype, return
1075 (find_status_pending_thread_callback): Remove.
1076 (handle_status): Replace find_inferior with find_thread and
1079 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1081 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1083 (aarch64_store_gregset): Likewise.
1084 (aarch64_fill_fpregset): Likewise.
1085 (aarch64_store_fpregset): Likewise.
1087 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1089 * gdbthread.h (find_thread, for_each_thread): New functions.
1090 * inferiors.c (thread_of_pid): Remove.
1091 (find_any_thread_of_pid): Use find_thread.
1092 * linux-low.c (num_lwps): Use for_each_thread.
1094 2017-10-17 Yao Qi <yao.qi@linaro.org>
1096 * Makefile.in: Remove one rule.
1097 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1099 2017-10-17 Yao Qi <yao.qi@linaro.org>
1101 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1102 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1104 2017-10-17 Yao Qi <yao.qi@linaro.org>
1106 * configure.srv: Rename arm.o with arch/arm.o.
1108 2017-10-17 Yao Qi <yao.qi@linaro.org>
1110 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1111 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1112 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1113 (arch-i386.o, arch-amd64.o): Remove rules.
1114 (arch/%.o): New rule.
1115 Update POSTCOMPILE and COMPILE.pre.
1116 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1117 * configure: Re-generated.
1118 * configure.srv: Replace arch-i386.o with arch/i386.o.
1119 Replace arch-amd64.o with arch/amd64.o.
1121 2017-10-16 Yao Qi <yao.qi@linaro.org>
1123 * configure: Regenerated.
1125 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1127 * inferiors.h: (struct inferior_list): Remove.
1128 (struct inferior_list_entry); Remove.
1129 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1130 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1131 get_first_inferior): Remove.
1132 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1133 find_inferior_id, find_inferior_in_random): Change signature.
1134 * inferiors.c (all_threads): Change type to
1135 std::list<thread_info *>.
1136 (get_thread): Remove macro.
1137 (find_inferior, find_inferior_id): Change signature, implement
1139 (find_inferior_in_random): Change signature, implement using
1140 find_thread_in_random.
1141 (for_each_inferior, for_each_inferior_with_data): Change
1142 signature, implement using for_each_thread.
1143 (add_inferior_to_list, remove_inferior): Remove.
1144 (add_thread, get_first_thread, thread_of_pid,
1145 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1146 (get_first_inferior, one_inferior_p, clear_inferior_list):
1148 (clear_inferiors, get_thread_process): Update.
1149 * gdbthread.h: Include <list>.
1150 (struct thread_info) <entry>: Remove field.
1152 (all_threads): Change type to std::list<thread_info *>.
1153 (get_first_inferior): Add doc.
1154 (find_thread, for_each_thread, find_thread_in_random): New
1156 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1157 * linux-arm-low.c (update_registers_callback): Update.
1158 * linux-low.c (second_thread_of_pid_p): Update.
1159 (kill_one_lwp_callback, linux_detach_lwp_callback,
1160 delete_lwp_callback, status_pending_p_callback, same_lwp,
1161 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1162 iterate_over_lwps, not_stopped_callback,
1163 resume_stopped_resumed_lwps, count_events_callback,
1164 select_singlestep_lwp_callback, select_event_lwp_callback,
1165 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1166 suspend_and_send_sigstop_callback, wait_for_sigstop,
1167 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1168 lwp_running, linux_set_resume_request, resume_status_pending_p,
1169 need_step_over_p, start_step_over, linux_resume_one_thread,
1170 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1171 reset_lwp_ptrace_options_callback): Update.
1172 * linux-mips-low.c (update_watch_registers_callback): Update.
1173 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1175 (free_register_cache_thread_one): Remove.
1176 (regcache_release): Update.
1177 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1178 handle_qxfer_threads_worker): Update.
1179 (handle_query): Update, use list iterator.
1180 (visit_actioned_threads, handle_pending_status,
1181 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1182 clear_pending_status_callback, set_pending_status_callback,
1183 find_status_pending_thread_callback, handle_status,
1184 process_serial_event): Update.
1185 * target.c (thread_search_callback): Update.
1186 * thread-db.c (thread_db_get_tls_address): Update.
1187 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1189 * win32-i386-low.c (update_debug_registers_callback): Update.
1190 * win32-low.c (delete_thread_info, child_delete_thread,
1191 continue_one_thread, suspend_one_thread,
1192 get_child_debug_event): Adjust.
1194 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1196 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1197 * inferiors.h: Include <list>.
1198 (struct process_info) <entry>: Remove field.
1200 (pid_of): Change macro to function.
1201 (ptid_of, lwpid_of): Remove macro.
1202 (all_processes): Change type to std::list<process_info *>.
1203 (ALL_PROCESSES): Remove macro.
1204 (for_each_process, find_process): New function.
1205 * inferiors.c (all_processes): Change type to
1206 std::list<process_info *>.
1207 (find_thread_process): Adjust.
1208 (add_process): Likewise.
1209 (remove_process): Likewise.
1210 (find_process_pid): Likewise.
1211 (get_first_process): Likewise.
1212 (started_inferior_callback): Remove.
1213 (have_started_inferiors_p): Adjust.
1214 (attached_inferior_callback): Remove.
1215 (have_attached_inferiors_p): Adjust.
1216 * linux-low.c (check_zombie_leaders): Likewise.
1217 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1218 (x86_linux_update_xmltarget): Adjust.
1219 * server.c (handle_query): Likewise.
1220 (gdb_reattached_process): Remove.
1221 (handle_status): Adjust.
1222 (kill_inferior_callback): Likewise.
1223 (detach_or_kill_inferior): Remove.
1224 (print_started_pid): Likewise.
1225 (print_attached_pid): Likewise.
1226 (detach_or_kill_for_exit): Update.
1227 (process_serial_event): Likewise.
1228 * linux-arm-low.c (arm_new_fork): Likewise.
1230 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1232 * dll.h: Include <list>.
1233 (struct dll_info): Add constructor.
1234 <entry>: Remove field.
1235 (all_dlls): Change type to std::list<dll_info>.
1236 * dll.c: Include <algorithm>.
1237 (get_dll): Remove macro.
1238 (all_dlls): Change type to std::list<dll_info *>.
1239 (free_one_dll): Remove.
1240 (match_dll): Likewise.
1241 (loaded_dll): Adjust.
1242 (unloaded_dll): Adjust to all_dlls type change, use
1243 std::find_if. Inline code from match_dll.
1244 (clear_dlls): Adjust to all_dlls type change.
1245 * server.c (emit_dll_description): Remove.
1246 (handle_qxfer_libraries): Adjust to all_dlls type change,
1247 integrate emit_dll_description's functionality.
1249 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1251 * linux-low.h (struct linux_target_ops) <delete_process>: New
1253 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1254 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1255 (struct linux_target_ops): Add delete_process callback.
1256 * linux-arm-low.c (arm_delete_process): New.
1257 (struct linux_target_ops): Add delete_process callback.
1258 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1259 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1260 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1261 * linux-mips-low.c (mips_linux_delete_process): New.
1262 (struct linux_target_ops): Add delete_process callback.
1263 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1264 * linux-s390-low.c (struct linux_target_ops): Likewise.
1265 * linux-sh-low.c (struct linux_target_ops): Likewise.
1266 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1267 * linux-tile-low.c (struct linux_target_ops): Likewise.
1268 * linux-x86-low.c (x86_linux_delete_process): New.
1269 (struct linux_target_ops): Add delete_process callback.
1270 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1272 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1274 * linux-aarch64-low.c (the_low_target): Add thread delete
1276 * linux-arm-low.c (arm_delete_thread): New function.
1277 (the_low_target): Add thread delete callback.
1278 * linux-bfin-low.c (the_low_target): Likewise.
1279 * linux-crisv32-low.c (the_low_target): Likewise.
1280 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1282 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1284 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1285 * linux-mips-low.c (mips_linux_delete_thread): New function.
1286 (the_low_target): Add thread delete callback.
1287 * linux-ppc-low.c (the_low_target): Likewise.
1288 * linux-s390-low.c (the_low_target): Likewise.
1289 * linux-sh-low.c (the_low_target): Likewise.
1290 * linux-tic6x-low.c (the_low_target): Likewise.
1291 * linux-tile-low.c (the_low_target): Likewise.
1292 * linux-x86-low.c (the_low_target): Likewise.
1293 * linux-xtensa-low.c (the_low_target): Likewise.
1295 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1297 * win32-low.c: Include "common-inferior.h".
1299 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1301 * inferiors.c (set_inferior_cwd): New function.
1302 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1303 (handle_query): Inform that QSetWorkingDir is supported.
1304 * win32-low.c (create_process): Pass the inferior's cwd to
1307 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1309 * inferiors.c (current_inferior_cwd): New global variable.
1310 (get_inferior_cwd): New function.
1311 * inferiors.h (struct process_info) <cwd>: New field.
1313 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1315 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1316 (OBS): Add gdb_tilde_expand.o.
1318 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1320 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1321 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1323 2017-09-29 Pedro Alves <palves@redhat.com>
1325 * ax.c (gdb_parse_agent_expr): Constify.
1326 * ax.h (gdb_parse_agent_expr): Constify.
1327 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1329 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1330 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1331 * remote-utils.h (read_ptid): Constify.
1332 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1333 (process_point_options, process_serial_event): Constify.
1334 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1335 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1336 (cmd_qtbuffer): Constify.
1338 2017-09-29 Pedro Alves <palves@redhat.com>
1340 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1343 2017-09-29 Pedro Alves <palves@redhat.com>
1345 * linux-low.c (handle_extended_wait): Pass parent thread instead
1346 of process to thread_db_notice_clone.
1347 * linux-low.h (thread_db_notice_clone): Replace parent process
1348 parameter with parent thread parameter.
1349 * thread-db.c (find_one_thread): Add comment.
1350 (thread_db_notice_clone): Replace parent process parameter with
1351 parent thread parameter. Temporarily switch to the parent thread.
1353 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1355 * gdbthread.h: Include "common-gdbthread.h".
1356 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1357 "if" when validating the ptid.
1358 * remote-utils.c: Include "gdbthread.h".
1359 (prepare_resume_reply): Use "switch_to_thread".
1360 * target.c (done_accessing_memory): Likewise.
1362 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1364 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1365 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1366 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1367 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1368 s390x-gs-linux64-ipa.o to ipa_obj.
1369 * linux-s390-low.c (HWCAP_S390_GS): New define.
1370 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1372 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1373 (s390_arch_setup): Check for guarded-storage support and choose
1375 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1376 init_registers_s390x_gs_linux64.
1377 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1379 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1380 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1382 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1384 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1386 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1388 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1389 (thread_db_thread_handle): Declare.
1390 * linux-low.c (linux_target_ops): Initialize thread_handle.
1391 * server.c (handle_qxfer_threads_worker): Add support for
1393 * target.h (struct target_ops): Add new function pointer,
1395 (target_thread_handle): Define.
1396 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1398 (thread_db_thread_handle): New function.
1400 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1402 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1403 * linux-low.h (thread_db_notice_clone): Declare.
1404 * thread-db.c (thread_db_notice_clone): New function.
1406 2017-09-21 Pedro Alves <palves@redhat.com>
1408 * server.c (gdb_read_memory, handle_status, process_serial_event)
1409 (handle_serial_event, handle_target_event): Adjust to
1410 set_desired_thread prototype change.
1411 * target.c (set_desired_thread): Remove 'use_general' parameter
1413 * target.h (set_desired_thread): Remove 'use_general' parameter.
1415 2017-09-20 Tom Tromey <tom@tromey.com>
1417 * target.c (target_terminal::terminal_state): Define.
1418 (target_terminal::init): Rename from target_terminal_init.
1419 (target_terminal::inferior): Rename from
1420 target_terminal_inferior.
1421 (target_terminal::ours): Rename from target_terminal_ours.
1422 (target_terminal::ours_for_output, target_terminal::info): New.
1424 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1426 * server.c (accumulate_file_name_length): Remove.
1427 (emit_dll_description): Adjust to std::string change.
1428 (handle_qxfer_libraries): Use std::string to hold document.
1430 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1432 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1433 return type of xml_escape_text.
1434 * server.c (emit_dll_description): Likewise.
1436 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1438 * server.c (captured_main): Accept argument for --selftest.
1439 Update run_tests call.
1440 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1441 when registering selftests.
1443 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1445 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1446 instead of "VEC" for "target_desc.reg_defs".
1447 (regcache_cpy): Likewise.
1448 (registers_to_string): Likewise.
1449 (registers_from_string): Likewise.
1450 (find_regno): Likewise.
1451 (supply_regblock): Likewise.
1452 (regcache_raw_read_unsigned): Likewise.
1453 * tdesc.c (init_target_desc): Likewise.
1454 (tdesc_create_reg): Likewise.
1455 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1456 (struct target_desc) <reg_defs>: Convert to "std::vector".
1457 (target_desc): Do not initialize "reg_defs".
1458 (~target_desc): Update code to use "std::vector" instead of "VEC"
1459 for "target_desc.reg_defs".
1460 (operator==): Likewise.
1462 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1464 * inferiors.h (thread_to_gdb_id): Remove.
1465 * inferiors.c (thread_to_gdb_id): Remove.
1466 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1467 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1468 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1470 * nto-low.c (nto_fetch_registers, nto_store_registers,
1471 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1473 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1475 * inferiors.h (gdb_id_to_thread_id): Remove.
1476 * inferiors.c (gdb_id_to_thread_id): Remove.
1477 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1478 removal. Move pid declaration closer to where it's used.
1480 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1482 * server.c (handle_detach): New function.
1483 (process_serial_event): Move code out, call handle_detach.
1485 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1487 * server.c (require_running): Rename to ...
1488 (require_running_or_return): ... this ...
1489 (require_running_or_break): ... and this.
1490 (handle_query, process_serial_event): Adjust.
1492 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1494 * linux-low.c (linux_set_resume_request): Remove unused
1497 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1499 * server.c (first_thread_of): Remove.
1500 (process_serial_event): Replace usage of first_thread_of with
1501 find_any_thread_of_pid.
1502 * tracepoint.c (same_process_p): Remove.
1503 (gdb_agent_about_to_close): Replace usage of same_process_p with
1504 find_any_thread_of_pid.
1505 * linux-x86-low.c (same_process_callback): Remove.
1506 (x86_arch_setup_process_callback): Replace usage of
1507 same_process_callback with find_any_thread_of_pid.
1508 * thread-db.c (any_thread_of): Remove.
1509 (switch_to_process): Replace usage of any_thread_of with
1510 find_any_thread_of_pid.
1511 * inferiors.c (thread_pid_matches_callback): Remove.
1512 (find_thread_process): Adjust to use find_any_thread_of_pid.
1514 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1516 * regcache.c (get_thread_regcache): Guard calls to "memset"
1519 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1521 * linux-low.c (handle_extended_wait): Use
1522 "allocate_target_description" instead of "XNEW".
1523 * linux-x86-low.c (initialize_low_arch): Likewise.
1525 2017-09-05 Yao Qi <yao.qi@linaro.org>
1527 * configure.srv (srv_i386_regobj): Remove.
1528 (srv_amd64_regobj): Remove.
1529 (srv_regobj): Set it to "" for x86 non-linux targets.
1530 * linux-x86-tdesc.c (i386_linux_read_description):
1531 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1532 (init_registers_i386): Remove the declaration.
1533 (tdesc_i386): Remove the declaration.
1534 (lynx_i386_arch_setup): Call i386_create_target_description.
1535 * nto-x86-low.c: Likewise.
1536 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1537 [!__x86_64__]: include arch/i386.h.
1538 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1540 2017-09-05 Yao Qi <yao.qi@linaro.org>
1542 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1543 i386/amd64-XXX-linux from it.
1545 2017-09-05 Yao Qi <yao.qi@linaro.org>
1547 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1549 (ipa_amd64_linux_regobj): Remove.
1550 (ipa_x32_linux_regobj): Remove.
1552 2017-09-05 Yao Qi <yao.qi@linaro.org>
1554 * Makefile.in (arch-amd64.o): New rule.
1555 * configure.srv: Append arch-amd64.o.
1556 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1557 (get_ipa_tdesc): Call amd64_linux_read_description.
1558 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1559 and init_registers_amd64_XXX.
1560 * linux-x86-low.c (x86_linux_read_description): Call
1561 amd64_linux_read_description.
1562 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1563 (initialize_low_arch): Don't call init_registers_x32_XXX and
1564 init_registers_amd64_XXX.
1565 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1566 and tdesc_amd64_XXX.
1567 [__x86_64__] (amd64_tdesc_test): New function.
1568 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1569 and init_registers_amd64_XXX.
1570 * linux-x86-tdesc.c: Include arch/amd64.h.
1571 (xcr0_to_tdesc_idx): New function.
1572 (i386_linux_read_description): New function.
1573 (amd64_get_ipa_tdesc_idx): New function.
1574 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1575 (amd64_get_ipa_tdesc): Declare.
1577 2017-09-05 Yao Qi <yao.qi@linaro.org>
1579 * configure.srv (srv_i386_linux_xmlfiles): Remove
1580 i386/i386-XXX-linux.xml from it.
1582 2017-09-05 Yao Qi <yao.qi@linaro.org>
1584 * configure.srv: Set srv_i386_linux_regobj empty if $development
1586 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1587 initialize_low_tdesc.
1588 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1589 with #if initialize_low_tdesc.
1590 * linux-x86-tdesc-selftest.c: New file.
1591 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1593 2017-09-05 Yao Qi <yao.qi@linaro.org>
1595 * Makefile.in (arch-i386.o): New rule.
1596 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1597 (x86_64-*-linux*): Likewise.
1598 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1599 include arch/i386.h.
1600 (i386_linux_read_description): Remove code and call
1601 i386_create_target_description.
1602 * tdesc.c (allocate_target_description): New function.
1603 * tdesc.h (set_tdesc_architecture): Remove declaration.
1604 (set_tdesc_osabi): Likewise.
1606 2017-09-05 Yao Qi <yao.qi@linaro.org>
1608 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1609 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1610 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1612 * server.c (get_features_xml): Call tdesc_get_features_xml.
1613 * tdesc.c (set_tdesc_architecture): New function.
1614 (set_tdesc_osabi): New function.
1615 (tdesc_get_features_xml): New function.
1616 (tdesc_create_feature): Add an argument.
1617 * tdesc.h (struct target_desc) <features>: New field.
1618 <arch, osabi>: New field.
1619 (~target_desc): xfree features, arch, and osabi.
1620 (target_desc::oerator==): Don't compare .xmltarget.
1621 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1622 (set_tdesc_osabi): Likewise.
1623 (tdesc_get_features_xml): Likewise.
1625 2017-09-05 Yao Qi <yao.qi@linaro.org>
1627 * linux-x86-tdesc.c: Include selftest.h.
1628 (i386_tdesc_test): New function.
1629 (initialize_low_tdesc): Call selftests::register_test.
1630 * tdesc.h: Include regdef.h.
1631 (target_desc): Override operator == and !=.
1633 2017-09-05 Yao Qi <yao.qi@linaro.org>
1635 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1636 (ipa_obj): Likewise.
1637 * linux-i386-ipa.c: Include common/x86-xstate.h
1638 (get_ipa_tdesc): Call i386_linux_read_description.
1639 (initialize_low_tracepoint): Don't call init_registers_XXX
1640 functions, call initialize_low_tdesc instead.
1641 * linux-x86-low.c (x86_linux_read_description): Call
1642 i386_linux_read_description.
1643 (initialize_low_arch): Don't call init_registers_i386_XXX
1644 functions, call initialize_low_tdesc.
1645 * linux-x86-tdesc.c: New file.
1646 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1647 (i386_get_ipa_tdesc_idx): Declare.
1648 (i386_get_ipa_tdesc): Declare.
1649 (initialize_low_tdesc): Declare.
1651 2017-09-05 Yao Qi <yao.qi@linaro.org>
1653 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1656 2017-09-05 Yao Qi <yao.qi@linaro.org>
1658 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1659 * regcache.c (get_thread_regcache): Use VEC_length.
1660 (init_register_cache): Likewise.
1661 (regcache_cpy): Likewise.
1662 (registers_to_string): Iterate reg_defs via VEC_iterate.
1663 (find_regno): Likewise.
1664 (find_register_by_number): Use VEC_index.
1665 (register_size): Call find_register_by_number.
1666 (register_data): Call find_register_by_number.
1667 (supply_regblock): Use VEC_length.
1668 (regcache_raw_read_unsigned): Likewise.
1669 * tdesc.c (init_target_desc): Iterate reg_defs via
1671 (default_description): Update initializer.
1672 (copy_target_description): Don't update field num_registers.
1673 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1674 <num_registers>: Remove.
1676 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1678 * Makefile.in (.SECONDARY): Define target.
1680 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1682 * linux-low.c (linux_wait_1): Adjust.
1683 * server.c (queue_stop_reply_callback): Adjust.
1685 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1687 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1688 QEnvironmentUnset and QEnvironmentReset packets.
1689 (handle_query): Inform remote that QEnvironmentHexEncoded,
1690 QEnvironmentUnset and QEnvironmentReset are supported.
1692 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1694 * inferiors.h (inferior_target_data): Rename to ...
1695 (thread_target_data): ... this.
1696 (inferior_regcache_data): Rename to ...
1697 (thread_regcache_data): ... this.
1698 (set_inferior_regcache_data): Rename to ...
1699 (set_thread_regcache_data): ... this.
1700 * inferiors.c (inferior_target_data): Rename to ...
1701 (thread_target_data): ... this.
1702 (inferior_regcache_data): Rename to ...
1703 (thread_regcache_data): ... this.
1704 (set_inferior_regcache_data): Rename to ...
1705 (set_thread_regcache_data): ... this.
1706 (free_one_thread): Update.
1707 * linux-low.h (get_thread_lwp): Update.
1708 * regcache.c (get_thread_regcache): Update.
1709 (regcache_invalidate_thread): Update.
1710 (free_register_cache_thread): Update.
1711 * win32-i386-low.c (update_debug_registers_callback): Update.
1712 (win32_get_current_dr): Update.
1713 * win32-low.c (thread_rec): Update.
1714 (delete_thread_info): Update.
1715 (continue_one_thread): Update.
1716 (suspend_one_thread): Update.
1718 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1720 * inferiors.c (set_inferior_target_data): Remove.
1721 * inferiors.h (set_inferior_target_data): Remove.
1723 2017-08-18 Yao Qi <yao.qi@linaro.org>
1725 * Makefile.in (OBS): Add selftest.o.
1726 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1727 * configure, config.in: Re-generated.
1728 * server.c: Include common/sefltest.h.
1729 (captured_main): Handle option --selftest.
1731 2017-08-09 Yao Qi <yao.qi@linaro.org>
1733 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1734 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1735 i386-avx-mpx.o and i386-mmx.o.
1736 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1737 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1738 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1739 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1740 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1741 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1742 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1743 i386/amd64-avx-mpx.xml.
1745 2017-08-09 Yao Qi <yao.qi@linaro.org>
1747 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1748 and x32-avx-avx512.o.
1749 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1750 i386/x32-avx-avx512.xml.
1752 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1754 * tracepoint.h (enum class fast_tpoint_collect_result): New
1756 (fast_tracepoint_collecting): Change return type to
1757 fast_tpoint_collect_result.
1758 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1759 * linux-low.h: Include tracepoint.h.
1760 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1761 fast_tpoint_collect_result.
1762 * linux-low.c (handle_tracepoints): Adjust.
1763 (linux_fast_tracepoint_collecting): Change return type to
1764 fast_tpoint_collect_result.
1765 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1766 linux_wait_1, stuck_in_jump_pad_callback,
1767 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1768 proceed_one_lwp): Adjust to type change.
1770 2017-07-10 Yao Qi <yao.qi@linaro.org>
1772 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1774 2017-06-29 Yao Qi <yao.qi@linaro.org>
1776 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1778 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1780 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1782 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1784 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1786 * linux-low.c (linux_create_inferior): Adjust code to access the
1787 environment information via 'gdb_environ' class.
1788 * lynx-low.c (lynx_create_inferior): Likewise.
1789 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1790 (get_environ): Return a pointer to 'our_environ'.
1791 (captured_main): Initialize 'our_environ'.
1792 * server.h (get_environ): Adjust prototype.
1793 * spu-low.c (spu_create_inferior): Adjust code to access the
1794 environment information via 'gdb_environ' class.
1796 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1798 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1799 usage of "register" keyword.
1801 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1803 * configure: Re-generate.
1805 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1807 * configure: Re-generate.
1809 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1811 * Makefile.in (COMPILE.pre): Add "-x c++".
1813 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1815 * fork-child.c: Conditionally include <signal.h>.
1817 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1819 * server.c (handle_general_set): Handle new packet
1820 "QStartupWithShell".
1821 (handle_query): Add "QStartupWithShell" to the list of supported
1823 (gdbserver_usage): Add help text explaining the
1824 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1826 (captured_main): Recognize and act upon the presence of the new
1829 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1830 Pedro Alves <palves@redhat.com>
1832 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1833 * configure: Regenerate.
1834 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1836 (i[34567]86-*-lynxos*): Likewise.
1837 (spu*-*-*): Likewise.
1838 * fork-child.c: New file.
1839 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1841 (linux_ptrace_fun): New function.
1842 (linux_create_inferior): Adjust function prototype to reflect
1843 change on "target.h". Adjust function code to use
1845 (linux_request_interrupt): Delete "signal_pid".
1846 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1847 (lynx_ptrace_fun): New function.
1848 (lynx_create_inferior): Adjust function prototype to reflect
1849 change on "target.h". Adjust function code to use
1851 * nto-low.c (nto_create_inferior): Adjust function prototype and
1852 code to reflect change on "target.h". Update comments.
1853 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1854 "common-terminal.h" and "environ.h".
1855 (terminal_fd): Moved to fork-child.c.
1856 (old_foreground_pgrp): Likewise.
1857 (restore_old_foreground_pgrp): Likewise.
1858 (last_status): Make it global.
1859 (last_ptid): Likewise.
1860 (our_environ): New variable.
1861 (startup_with_shell): Likewise.
1862 (program_name): Likewise.
1863 (program_argv): Rename to...
1864 (program_args): ...this.
1865 (wrapper_argv): New variable.
1866 (start_inferior): Delete function.
1867 (get_exec_wrapper): New function.
1868 (get_exec_file): Likewise.
1869 (get_environ): Likewise.
1870 (prefork_hook): Likewise.
1871 (post_fork_inferior): Likewise.
1872 (postfork_hook): Likewise.
1873 (postfork_child_hook): Likewise.
1874 (handle_v_run): Update code to deal with arguments coming from the
1875 remote host. Update calls from "start_inferior" to
1877 (captured_main): Likewise. Initialize environment variable. Call
1879 * server.h (post_fork_inferior): New prototype.
1880 (get_environ): Likewise.
1881 (last_status): Declare.
1882 (last_ptid): Likewise.
1883 (signal_pid): Likewise.
1884 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1885 (spu_ptrace_fun): New function.
1886 (spu_create_inferior): Adjust function prototype to reflect change
1887 on "target.h". Adjust function code to use "fork_inferior".
1888 * target.c (target_terminal_init): New function.
1889 (target_terminal_inferior): Likewise.
1890 (target_terminal_ours): Likewise.
1891 * target.h: Include <vector>.
1892 (struct target_ops) <create_inferior>: Update prototype.
1893 (create_inferior): Update macro.
1894 * utils.c (gdb_flush_out_err): New function.
1895 * win32-low.c (win32_create_inferior): Adjust function prototype
1896 and code to reflect change on "target.h".
1898 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1900 * inferiors.c (switch_to_thread): New function.
1902 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1904 * Makefile.in (SFILE): Add "common/job-control.c".
1905 (OBS): Add "job-control.o".
1907 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1909 * Makefile: Remove "@host_makefile_frag@".
1911 2017-05-05 Pedro Alves <palves@redhat.com>
1913 * configure: Regenerate.
1915 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1917 * configure: Regenerate.
1919 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1921 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1922 software_single_step change of return type to
1923 std::vector<CORE_ADDR>.
1924 * linux-low.c (install_software_single_step_breakpoints):
1926 * linux-low.h (install_software_single_step_breakpoints):
1929 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1931 * remote-utils.c: Include "gdb_termios.h" instead of
1933 * terminal.h: Delete file.
1935 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1937 * server.c: Include <vector>.
1938 <program_argv, wrapper_argv>: Convert to std::vector.
1939 (start_inferior): Rewrite function to use C++.
1940 (handle_v_run): Likewise. Update code that calculates the argv
1941 based on the vRun packet; use C++.
1942 (captured_main): Likewise.
1944 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1946 * server.c (handle_v_cont): Initialize thread_resume::thread
1949 2017-04-05 Pedro Alves <palves@redhat.com>
1951 * configure: Regenerate.
1953 2017-04-05 Pedro Alves <palves@redhat.com>
1955 * gdbreplay.c (sync_error): Constify.
1956 * linux-x86-low.c (push_opcode): Constify.
1958 2017-04-05 Pedro Alves <palves@redhat.com>
1960 * win32-low.c (get_child_debug_event)
1961 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1962 Report TARGET_WAITKIND_SPURIOUS instead.
1964 2017-04-05 Pedro Alves <palves@redhat.com>
1966 * remote-utils.c (remote_prepare, remote_open): Constify.
1967 * remote-utils.h (remote_prepare, remote_open): Constify.
1968 * server.c (captured_main): Constify 'port' handling.
1970 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1972 * Makefile.in (clean): Clear .deps.
1974 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1976 * .gitignore: Remove generated files, replace with wildcard.
1977 * (clean): Replace removal of generated files with wildcard.
1978 (version.c): Replace with...
1979 (version-generated.c): ...this.
1980 (xml-builtin.c): Replace with...
1981 (xml-builtin-generated.c): ...this.
1982 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1983 (%.c: *regformats*): Replace with...
1984 (%-generated.c: *regformats*): ...this.
1986 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1988 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1989 (xtensa_fill_gregset): Call collect_register_by_name for
1991 (xtensa_store_gregset): Call supply_register_by_name for
1994 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1996 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1997 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1998 (xtensa_store_gregset): Call supply_register for all registers in
1999 a0_regnum..a0_regnum + C0_NREGS range.
2001 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2003 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2004 (ax-ipa.o: ax.c): Remove.
2005 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2006 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2007 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2008 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2009 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2011 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2013 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2014 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2015 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2016 (errors-ipa.o: ../common/errors.c): Remove.
2017 (format-ipa.o: ../common/format.c): Remove.
2018 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2020 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2022 * Makefile.in (%-ipa.o: %.c): New rule.
2023 (tracepoint-ipa.o: tracepoint.c): Remove.
2024 (utils-ipa.o: utils.c): Remove.
2025 (remote-utils-ipa.o: remote-utils.c): Remove.
2026 (regcache-ipa.o: regcache.c): Remove.
2027 (i386-linux-ipa.o: i386-linux.c): Remove.
2028 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2029 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2030 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2031 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2032 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2033 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2034 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2035 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2036 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2037 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2038 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2039 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2040 (aarch64-ipa.o: aarch64.c): Remove.
2041 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2042 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2043 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2044 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2045 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2046 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2047 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2048 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2049 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2050 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2051 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2052 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2053 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2054 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2055 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2056 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2057 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2058 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2059 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2060 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2061 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2062 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2063 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2064 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2065 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2066 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2067 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2068 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2069 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2070 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2071 (tdesc-ipa.o: tdesc.c): Remove.
2072 (x32-linux-ipa.o: x32-linux.c): Remove.
2073 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2074 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2076 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2078 * Makefile.in (%.o: ../arch/%.c): New rule.
2079 (arm.o: ../arch/arm.c): Remove.
2080 (arm-linux.o: ../arch/arm-linux.c): Remove.
2081 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2082 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2084 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2086 * Makefile.in (%.o: ../nat/%.c): New rule.
2087 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2088 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2089 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2090 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2091 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2092 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2093 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2094 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2095 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2096 (linux-personality.o: ../nat/linux-personality.c): Remove.
2097 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2098 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2099 (x86-linux.o: ../nat/x86-linux.c): Remove.
2100 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2101 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2103 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2105 * Makefile.in (%.o: ../common/%.c): New rule.
2106 (signals.o: ../common/signals.c): Remove.
2107 (print-utils.o: ../common/print-utils.c): Remove.
2108 (rsp-low.o: ../common/rsp-low.c): Remove.
2109 (common-utils.o: ../common/common-utils.c): Remove.
2110 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2111 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2112 (vec.o: ../common/vec.c): Remove.
2113 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2114 (xml-utils.o: ../common/xml-utils.c): Remove.
2115 (ptid.o: ../common/ptid.c): Remove.
2116 (buffer.o: ../common/buffer.c): Remove.
2117 (format.o: ../common/format.c): Remove.
2118 (filestuff.o: ../common/filestuff.c): Remove.
2119 (agent.o: ../common/agent.c): Remove.
2120 (errors.o: ../common/errors.c): Remove.
2121 (environ.o: ../common/environ.c): Remove.
2122 (common-debug.o: ../common/common-debug.c): Remove.
2123 (cleanups.o: ../common/cleanups.c): Remove.
2124 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2125 (fileio.o: ../common/fileio.c): Remove.
2126 (common-regcache.o: ../common/common-regcache.c): Remove.
2127 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2128 (new-op.o: ../common/new-op.c): Remove.
2129 (btrace-common.o: ../common/btrace-common.c): Remove.
2131 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2133 * Makefile.in (%.o: ../target/%.c): New rule.
2134 (waitstatus.o: ../target/waitstatus.c): Remove.
2136 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2139 (%.c: ../regformats/%.dat,
2140 (%.c: ../regformats/arm/%.dat,
2141 (%.c: ../regformats/i386/%.dat,
2142 (%.c: ../regformats/rs6000/%.dat): New rules.
2143 (aarch64.c): Remove.
2144 (reg-arm.c): Remove.
2145 (arm-with-iwmmxt.c): Remove.
2146 (arm-with-vfpv2.c): Remove.
2147 (arm-with-vfpv3.c): Remove.
2148 (arm-with-neon.c): Remove.
2149 (reg-bfin.c): Remove.
2150 (reg-cris.c): Remove.
2151 (reg-crisv32.c): Remove.
2153 (i386-linux.c): Remove.
2154 (i386-avx.c): Remove.
2155 (i386-avx-linux.c): Remove.
2156 (i386-avx-avx512.c): Remove.
2157 (i386-avx-avx512-linux.c): Remove.
2158 (i386-mpx.c): Remove.
2159 (i386-mpx-linux.c): Remove.
2160 (i386-avx-mpx-avx512-pku.c): Remove.
2161 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2162 (i386-avx-mpx.c): Remove.
2163 (i386-avx-mpx-linux.c): Remove.
2164 (i386-mmx.c): Remove.
2165 (i386-mmx-linux.c): Remove.
2166 (reg-ia64.c): Remove.
2167 (reg-m32r.c): Remove.
2168 (reg-m68k.c): Remove.
2170 (mips-linux.c): Remove.
2171 (mips-dsp-linux.c): Remove.
2172 (mips64-linux.c): Remove.
2173 (mips64-dsp-linux.c): Remove.
2174 (nios2-linux.c): Remove.
2175 (powerpc-32.c): Remove.
2176 (powerpc-32l.c): Remove.
2177 (powerpc-altivec32l.c): Remove.
2178 (powerpc-cell32l.c): Remove.
2179 (powerpc-vsx32l.c): Remove.
2180 (powerpc-isa205-32l.c): Remove.
2181 (powerpc-isa205-altivec32l.c): Remove.
2182 (powerpc-isa205-vsx32l.c): Remove.
2183 (powerpc-e500l.c): Remove.
2184 (powerpc-64l.c): Remove.
2185 (powerpc-altivec64l.c): Remove.
2186 (powerpc-cell64l.c): Remove.
2187 (powerpc-vsx64l.c): Remove.
2188 (powerpc-isa205-64l.c): Remove.
2189 (powerpc-isa205-altivec64l.c): Remove.
2190 (powerpc-isa205-vsx64l.c): Remove.
2191 (s390-linux32.c): Remove.
2192 (s390-linux32v1.c): Remove.
2193 (s390-linux32v2.c): Remove.
2194 (s390-linux64.c): Remove.
2195 (s390-linux64v1.c): Remove.
2196 (s390-linux64v2.c): Remove.
2197 (s390-te-linux64.c): Remove.
2198 (s390-vx-linux64.c): Remove.
2199 (s390-tevx-linux64.c): Remove.
2200 (s390x-linux64.c): Remove.
2201 (s390x-linux64v1.c): Remove.
2202 (s390x-linux64v2.c): Remove.
2203 (s390x-te-linux64.c): Remove.
2204 (s390x-vx-linux64.c): Remove.
2205 (s390x-tevx-linux64.c): Remove.
2206 (tic6x-c64xp-linux.c): Remove.
2207 (tic6x-c64x-linux.c): Remove.
2208 (tic6x-c62x-linux.c): Remove.
2210 (reg-sparc64.c): Remove.
2211 (reg-spu.c): Remove.
2213 (amd64-linux.c): Remove.
2214 (amd64-avx.c): Remove.
2215 (amd64-avx-linux.c): Remove.
2216 (amd64-avx-avx512.c): Remove.
2217 (amd64-avx-avx512-linux.c): Remove.
2218 (amd64-mpx.c): Remove.
2219 (amd64-mpx-linux.c): Remove.
2220 (amd64-avx-mpx-avx512-pku.c): Remove.
2221 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2222 (amd64-avx-mpx.c): Remove.
2223 (amd64-avx-mpx-linux.c): Remove.
2225 (x32-linux.c): Remove.
2226 (x32-avx.c): Remove.
2227 (x32-avx-linux.c): Remove.
2228 (x32-avx-avx512.c): Remove.
2229 (x32-avx-avx512-linux.c): Remove.
2230 (reg-xtensa.c): Remove.
2231 (reg-tilegx.c): Remove.
2232 (reg-tilegx32.c): Remove.
2234 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2236 * Makefile.in (SFILES): Add "common/environ.c".
2237 (OBJS): Add "common/environ.h".
2239 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2241 * configure.ac: Check if the fs_base and gs_base members of
2242 `struct user_regs_struct' exist.
2243 * config.in: Regenerated.
2244 * configure: Likewise.
2246 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2248 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2250 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2251 (get_next_pcs_syscall_next_pc): Likewise.
2253 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2255 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2256 * nto-x86-low.c: Likewise.
2258 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2260 * Makefile.in: Include disable-implicit-rules.mk.
2262 2016-11-23 Pedro Alves <palves@redhat.com>
2264 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2265 (debug_vprintf): Use std::chrono::steady_clock instead of
2266 gettimeofday. Use '.' instead of ':'.
2267 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2268 (get_timestamp): Use std::chrono::steady_clock instead of
2271 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2273 * Makefile.in: Fix whitespace formatting.
2275 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2277 * Makefile.in (SFILES, OBS): Flatten list and order
2280 2016-11-23 Pedro Alves <palves@redhat.com>
2282 * event-loop.c (handle_file_event): Use warning.
2283 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2284 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2287 2016-11-23 Pedro Alves <palves@redhat.com>
2289 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2291 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2292 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2293 debug_printf and debug_flush for debug output.
2294 * server.c (handle_general_set): Likewise.
2295 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2298 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2300 * Makefile.in (.c.o): Replace rule with ...
2301 (%.o: %.c): ... this one.
2303 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2305 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2306 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2308 * configure.ac: Remove checks for the make program.
2309 * configure: Re-generate.
2311 2016-10-28 Pedro Alves <palves@redhat.com>
2313 * Makefile.in (CXX_DIALECT): Get from configure.
2314 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2315 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2316 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2317 * config.in: Regenerate.
2318 * configure: Regenerate.
2320 2016-10-27 Yao Qi <yao.qi@linaro.org>
2322 * linux-low.c (linux_supports_range_stepping): Return true if
2323 can_software_single_step return true.
2325 2016-10-27 Yao Qi <yao.qi@linaro.org>
2327 * inferiors.c (find_inferior_in_random): New function.
2328 * inferiors.h (find_inferior_in_random): Declare.
2329 * linux-low.c (linux_wait_for_event_filtered): Call
2330 find_inferior_in_random instead of find_inferior.
2332 2016-10-27 Yao Qi <yao.qi@linaro.org>
2334 * linux-low.c (linux_wait_1): If single-step breakpoints are
2335 inserted, remove them.
2337 2016-10-26 Pedro Alves <palves@redhat.com>
2339 * linux-low.c (handle_extended_wait): Link parent/child fork
2341 (linux_wait_1): Unlink them.
2342 (linux_set_resume_request): Ignore resume requests for
2343 already-resumed and unhandled fork child threads.
2344 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2345 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2347 (handle_v_requests) <vCont>: Don't call require_running.
2348 * server.h (in_queued_stop_replies): New declaration.
2350 2016-10-24 Yao Qi <yao.qi@linaro.org>
2353 * linux-aarch64-low.c (append_insns): Cast the return value to
2356 2016-10-10 Yao Qi <yao.qi@linaro.org>
2358 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2360 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2362 * target.c (target_supports_multi_process): New function, moved
2364 * target.h (target_supports_multi_process): ... here. Remove
2367 2016-10-05 Tom Tromey <tom@tromey.com>
2370 * tracepoint.c (handle_tracepoint_bkpts): Check
2371 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2373 2016-10-05 Yao Qi <yao.qi@linaro.org>
2375 * configure.srv: Update the path of arm-*.xml files.
2377 2016-10-05 Terry Guo <terry.guo@arm.com>
2378 Yao Qi <yao.qi@linaro.org>
2380 * Makefile.in: Adjust the path of rules.
2381 * configure.srv: Update the path of xml files.
2382 * regformats/arm-with-iwmmxt.dat: Regenerated.
2383 * regformats/arm-with-neon.dat: Likewise.
2384 * regformats/arm-with-vfpv2.dat: Likewise.
2385 * regformats/arm-with-vfpv3.dat Likewise.
2387 2016-09-30 Yao Qi <yao.qi@linaro.org>
2390 * target.c (target_stop_and_wait): Don't call
2391 target_continue_no_signal, use resume_stop instead.
2393 2016-09-26 Yao Qi <yao.qi@linaro.org>
2395 * linux-low.c (linux_wait_1): Call debug_exit.
2397 2016-09-23 Pedro Alves <palves@redhat.com>
2399 * Makefile.in (SFILES): Add common/new-op.c.
2400 (OBS): Add common/new-op.o.
2401 (new-op.o): New rule.
2403 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2405 * .gitinore: Ignore more files.
2407 2016-09-21 Yao Qi <yao.qi@linaro.org>
2409 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2412 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2414 * server.c (start_inferior): Call target_mourn_inferior instead of
2415 mourn_inferior; pass ptid_t argument to it.
2417 (handle_target_event): Likewise.
2418 * target.c (target_mourn_inferior): New function.
2419 * target.h (mourn_inferior): Delete macro.
2421 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2423 * linux-low.c (lwp_is_stepping): New function.
2425 2016-09-06 Carl Love <cel@us.ibm.com>
2427 * server.c (start_inferior): Fixed comment, requested comment change
2428 didn't get updated correctly. Removed reference to ptrace () call as
2429 it is only true on Linux systems.
2431 2016-09-06 Carl Love <cel@us.ibm.com>
2433 * server.c (start_inferior): Do not call
2434 function target_post_create_inferior () if the
2435 inferior process has already exited.
2437 2016-09-05 Pedro Alves <palves@redhat.com>
2439 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2440 (COMPILE.pre, CC_LD): Use CXX directly.
2441 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2442 * acinclude.m4: Don't include build-with-cxx.m4.
2443 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2444 * configure: Regenerate.
2446 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2449 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2450 call writing data to own_buf.
2452 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2454 * target.c (mywait): Call target_wait instead of
2456 (target_wait): New function.
2458 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2460 * server.c (start_inferior): New variable 'ptid'. Replace calls
2461 to the_target->resume by target_continue{,_no_signal}, depending
2463 * target.c (target_stop_and_wait): Call target_continue_no_signal
2464 instead of the_target->resume.
2465 (target_continue): New function.
2467 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2469 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2471 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2474 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2476 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2477 * linux-arm-low.c (ps_get_thread_area): Likewise.
2478 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2479 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2480 * linux-mips-low.c (ps_get_thread_area): Likewise.
2481 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2482 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2483 * linux-x86-low.c (ps_get_thread_area): Likewise.
2484 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2486 2016-08-19 Pedro Alves <palves@redhat.com>
2488 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2490 2016-08-19 Pedro Alves <palves@redhat.com>
2492 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2493 comment. Use memcpy instead of casting through unsigned long.
2495 2016-08-19 Pedro Alves <palves@redhat.com>
2497 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2498 allocating around 0x80000000.
2500 2016-08-19 Pedro Alves <palves@redhat.com>
2503 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2504 (x32-avx512-linux-ipa.o): New rules.
2505 * configure.ac (x86_64-*-linux*): New x32 check.
2506 * configure.srv (ipa_x32_linux_regobj): New.
2507 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2508 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2510 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2512 * configure: Regenerate.
2514 2016-08-09 Pedro Alves <palves@redhat.com>
2517 * Makefile.in (OBS): Add signals-state-save-restore.o.
2518 (signals-state-save-restore.o): New rule.
2519 * config.in: Regenerate.
2520 * configure: Regenerate.
2521 * linux-low.c: Include "signals-state-save-restore.h".
2522 (linux_create_inferior): Call
2523 restore_original_signals_state.
2524 * server.c: Include "dispositions-save-restore.h".
2525 (captured_main): Call save_original_signals_state.
2527 2016-08-05 Pedro Alves <palves@redhat.com>
2529 * configure: Regenerate.
2531 2016-08-04 Yao Qi <yao.qi@linaro.org>
2533 * linux-low.c (regsets_fetch_inferior_registers): Check
2534 errno is ESRCH or not.
2536 2016-08-02 Yao Qi <yao.qi@linaro.org>
2538 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2539 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2540 (thread_db_load_search): Update.
2541 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2542 td_ta_set_event and td_ta_event_getmsg.
2544 2016-07-26 Pedro Alves <palves@redhat.com>
2547 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2548 of unsigned long for 64-bit registers and use uint32_t instead of
2549 unsigned int for 32-bit registers.
2551 2016-07-26 Pedro Alves <palves@redhat.com>
2553 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2556 2016-07-21 Tom Tromey <tom@tromey.com>
2558 * configure: Rebuild.
2560 2016-07-21 Yao Qi <yao.qi@linaro.org>
2562 * mem-break.c (find_gdb_breakpoint): Cast bp to
2563 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2565 2016-07-21 Yao Qi <yao.qi@linaro.org>
2567 * server.c (handle_v_requests): Support s and S actions
2568 if target_supports_software_single_step return true.
2570 2016-07-21 Yao Qi <yao.qi@linaro.org>
2572 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2573 is resume_step, call maybe_hw_step.
2574 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2576 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2578 (proceed_one_lwp): If resume request is resume_step, install
2579 reinsert breakpoints and call maybe_hw_step.
2581 2016-07-21 Yao Qi <yao.qi@linaro.org>
2583 * linux-low.c (proceed_one_lwp): Declare.
2584 (linux_resume_one_thread): Remove local variable 'step'.
2585 Lift code enqueue signal. Call proceed_one_lwp instead of
2586 linux_resume_one_lwp.
2588 2016-07-21 Yao Qi <yao.qi@linaro.org>
2590 * linux-low.c (linux_resume_one_thread): Call
2591 enqueue_pending_signal.
2593 2016-07-21 Yao Qi <yao.qi@linaro.org>
2595 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2596 * inferiors.c (do_restore_current_thread_cleanup): New function.
2597 (make_cleanup_restore_current_thread): Likewise.
2598 * linux-low.c (install_software_single_step_breakpoints): Call
2599 make_cleanup_restore_current_thread. Switch current_thread to
2602 2016-07-21 Yao Qi <yao.qi@linaro.org>
2604 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2605 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2606 (clone_one_breakpoint): Likewise.
2607 (delete_reinsert_breakpoints): Change parameter to thread.
2609 (has_reinsert_breakpoints): Likewise.
2610 (uninsert_reinsert_breakpoints): Likewise.
2611 (reinsert_reinsert_breakpoints): Likewise.
2612 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2613 (delete_reinsert_breakpoints): Likewise.
2614 (reinsert_reinsert_breakpoints): Likewise.
2615 (uninsert_reinsert_breakpoints): Likewise.
2616 (has_reinsert_breakpoints): Likewise.
2618 2016-07-21 Yao Qi <yao.qi@linaro.org>
2620 * inferiors.c (get_thread_process): Make parameter const.
2621 * inferiors.h (get_thread_process): Update declaration.
2622 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2623 Add new parameters child_thread and parent_thread. Callers
2625 * mem-break.h (clone_all_breakpoints): Update declaration.
2627 2016-07-21 Yao Qi <yao.qi@linaro.org>
2629 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2630 <command_list, handler>: Remove.
2631 (struct gdb_breakpoint): New.
2632 (struct other_breakpoint): New.
2633 (struct reinsert_breakpoint): New.
2634 (is_gdb_breakpoint): New function.
2635 (any_persistent_commands): Update command_list if
2636 is_gdb_breakpoint returns true.
2637 (set_breakpoint): Create breakpoints according to their types.
2638 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2639 (set_gdb_breakpoint_1): Likewise.
2640 (set_gdb_breakpoint): Likewise.
2641 (clear_breakpoint_conditions): Change parameter type to
2642 'struct gdb_breakpoint *'.
2643 (clear_breakpoint_commands): Likewise.
2644 (clear_breakpoint_conditions_and_commands): Likewise.
2645 (add_condition_to_breakpoint): Likewise.
2646 (add_breakpoint_condition): Likewise.
2647 (add_commands_to_breakpoint): Likewise.
2648 (check_breakpoints): Check other_breakpoint.
2649 (clone_one_breakpoint): Clone breakpopint according to its type.
2650 * mem-break.h (struct gdb_breakpoint): Declare.
2651 (set_gdb_breakpoint): Update declaration.
2652 (clear_breakpoint_conditions_and_commands): Likewise.
2653 (add_breakpoint_condition): Likewise.
2654 (add_breakpoint_commands): Likewise.
2655 * server.c (process_point_options): Change parameter type to
2656 'struct gdb_breakpoint *'.
2658 2016-07-21 Yao Qi <yao.qi@linaro.org>
2660 * mem-break.c (set_breakpoint_at): Rename it to ...
2661 (set_breakpoint_type_at): ... it.
2662 (set_breakpoint_at): Call set_breakpoint_type_at.
2663 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2664 * mem-break.h (set_breakpoint_at): Update comments.
2666 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2668 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2670 (nios2_store_gregset): Likewise.
2672 2016-07-01 Pedro Alves <palves@redhat.com>
2673 Antoine Tremblay <antoine.tremblay@ericsson.com>
2675 * linux-low.c: Change interface to take the target lwp_info
2676 pointer directly and return void. Handle detaching from a zombie
2678 (linux_detach_lwp_callback): New function.
2679 (linux_detach): Detach from the leader thread after detaching from
2682 2016-06-28 Yao Qi <yao.qi@linaro.org>
2684 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2685 for variable new_offset.
2686 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2687 (aarch64_ftrace_insn_reloc_cb): Likewise.
2688 (aarch64_ftrace_insn_reloc_tb): Likewise.
2689 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2690 PRIx64 instead of PRIx32.
2692 2016-06-28 Yao Qi <yao.qi@linaro.org>
2694 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2695 (the_low_target): Install arm_get_syscall_trapinfo.
2697 2016-06-28 Yao Qi <yao.qi@linaro.org>
2699 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2701 (the_low_target): Install aarch64_get_syscall_trapinfo.
2703 2016-06-28 Yao Qi <yao.qi@linaro.org>
2705 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2707 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2708 Remove parameter sysno.
2709 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2712 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2714 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2715 (s390_emit_ne_goto): Likewise.
2716 (s390_emit_lt_goto): Likewise.
2717 (s390_emit_le_goto): Likewise.
2718 (s390_emit_gt_goto): Likewise.
2719 (s390_emit_ge_goto): Likewise.
2720 (s390x_emit_eq_goto): Likewise.
2721 (s390x_emit_ne_goto): Likewise.
2722 (s390x_emit_lt_goto): Likewise.
2723 (s390x_emit_le_goto): Likewise.
2724 (s390x_emit_gt_goto): Likewise.
2725 (s390x_emit_ge_goto): Likewise.
2726 (s390_emit_ops_impl): Mark variable static.
2727 (s390x_emit_ops): Likewise.
2729 2016-06-17 Yao Qi <yao.qi@linaro.org>
2731 * linux-low.c (handle_extended_wait): Call
2732 uninsert_reinsert_breakpoints for the parent process. Remove
2733 reinsert breakpoints from the child process. Reinsert them to
2734 the parent process when vfork is done.
2735 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2736 (reinsert_reinsert_breakpoints): New function.
2737 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2738 (reinsert_reinsert_breakpoints): Declare.
2740 2016-06-17 Yao Qi <yao.qi@linaro.org>
2742 * linux-low.c (handle_extended_wait): If the parent is doing
2743 step-over, remove the reinsert breakpoints from the forked child.
2745 2016-06-17 Yao Qi <yao.qi@linaro.org>
2747 * linux-low.c (unsuspend_all_lwps): Declare.
2748 (linux_low_filter_event): If thread exited, call finish_step_over.
2749 If step-over is finished, unsuspend other threads.
2751 2016-06-17 Yao Qi <yao.qi@linaro.org>
2753 * linux-low.c (linux_resume_one_lwp_throw): Assert
2754 has_reinsert_breakpoints returns false.
2755 * mem-break.c (delete_disabled_breakpoints): Assert
2756 bp type isn't reinsert_breakpoint.
2758 2016-06-17 Yao Qi <yao.qi@linaro.org>
2760 * linux-low.c (maybe_hw_step): New function.
2761 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2762 (finish_step_over): Switch current_thread to lwp temporarily,
2763 and assert has_reinsert_breakpoints returns true.
2764 (proceed_one_lwp): Call maybe_hw_step.
2765 * mem-break.c (has_reinsert_breakpoints): New function.
2766 * mem-break.h (has_reinsert_breakpoints): Declare.
2768 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2770 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2772 2016-05-17 Yao Qi <yao.qi@linaro.org>
2774 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2775 instead of find_inferior.
2777 2016-05-05 Yao Qi <yao.qi@linaro.org>
2779 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2780 Initialize res to zero.
2782 2016-05-05 Yao Qi <yao.qi@linaro.org>
2784 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2787 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2789 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2790 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2791 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2793 2016-04-28 Par Olsson <par.olsson@windriver.com>
2794 Simon Marchi <simon.marchi@ericsson.com>
2796 * tracepoint.c (write_inferior_int8): New function.
2797 (cmd_qtenable_disable): Write enable flag using
2798 write_inferior_int8.
2800 2016-04-25 Yao Qi <yao.qi@linaro.org>
2802 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2803 (need_step_over_p): Return zero if the LWP has pending signals
2804 can be delivered on software single step target.
2806 2016-04-25 Yao Qi <yao.qi@linaro.org>
2808 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2809 return instead of error.
2811 2016-04-22 Yao Qi <yao.qi@linaro.org>
2813 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2816 2016-04-22 Yao Qi <yao.qi@linaro.org>
2818 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2819 signal when stepping over breakpoint with software single
2822 2016-04-21 Pedro Alves <palves@redhat.com>
2824 * linux-s390-low.c (s390_collect_ptrace_register)
2825 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2827 (s390_check_regset): Use void * instead of gdb_byte *.
2829 2016-04-20 Pedro Alves <palves@redhat.com>
2831 * configure: Renegerate.
2833 2016-04-20 Yao Qi <yao.qi@linaro.org>
2835 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2836 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2838 (arm_store_gregset): Likewise.
2840 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2842 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2843 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2844 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2845 (amd64-avx-mpx-linux.c): New rules.
2846 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2847 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2848 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2849 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2850 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2851 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2852 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2853 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2854 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2855 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2856 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2857 * linux-x86-low.c (x86_linux_read_description): Add case for
2858 X86_XSTATE_AVX_MPX_MASK.
2859 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2860 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2861 init_registers_i386_avx_mpx_linux.
2862 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2863 (initialize_low_tracepoint): Call
2864 init_registers_i386_avx_mpx_linux.
2865 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2866 (initialize_low_tracepoint): Call
2867 init_registers_amd64_avx_mpx_linux.
2868 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2869 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2870 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2873 2016-04-18 Pedro Alves <palves@redhat.com>
2875 * configure: Regenerate.
2877 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2879 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2880 (aarch64_emit_sub): Likewise.
2882 2016-04-12 Pedro Alves <palves@redhat.com>
2884 * utils.c (prepare_to_throw_exception): Delete.
2886 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2888 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2890 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2892 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2894 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2896 * linux-aarch64-ipa.c: Add <elf.h> include.
2897 * linux-ppc-ipa.c: Add <elf.h> include.
2898 * linux-s390-ipa.c: Add <elf.h> include.
2900 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2902 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2903 (get_raw_reg_ptr): Likewise.
2904 (get_trace_state_variable_value_ptr): Likewise.
2905 (set_trace_state_variable_value_ptr): Likewise.
2906 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2909 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2910 Marcin Kościelnicki <koriakin@0x04.net>
2913 * linux-ppc-low.c (emit_insns): New function.
2914 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2915 (ppc_emit_prologue): New function.
2916 (ppc_emit_epilogue): New function.
2917 (ppc_emit_add): New function.
2918 (ppc_emit_sub): New function.
2919 (ppc_emit_mul): New function.
2920 (ppc_emit_lsh): New function.
2921 (ppc_emit_rsh_signed): New function.
2922 (ppc_emit_rsh_unsigned): New function.
2923 (ppc_emit_ext): New function.
2924 (ppc_emit_zero_ext): New function.
2925 (ppc_emit_log_not): New function.
2926 (ppc_emit_bit_and): New function.
2927 (ppc_emit_bit_or): New function.
2928 (ppc_emit_bit_xor): New function.
2929 (ppc_emit_bit_not): New function.
2930 (ppc_emit_equal): New function.
2931 (ppc_emit_less_signed): New function.
2932 (ppc_emit_less_unsigned): New function.
2933 (ppc_emit_ref): New function.
2934 (ppc_emit_const): New function.
2935 (ppc_emit_reg): New function.
2936 (ppc_emit_pop): New function.
2937 (ppc_emit_stack_flush): New function.
2938 (ppc_emit_swap): New function.
2939 (ppc_emit_stack_adjust): New function.
2940 (ppc_emit_call): New function.
2941 (ppc_emit_int_call_1): New function.
2942 (ppc_emit_void_call_2): New function.
2943 (ppc_emit_if_goto): New function.
2944 (ppc_emit_goto): New function.
2945 (ppc_emit_eq_goto): New function.
2946 (ppc_emit_ne_goto): New function.
2947 (ppc_emit_lt_goto): New function.
2948 (ppc_emit_le_goto): New function.
2949 (ppc_emit_gt_goto): New function.
2950 (ppc_emit_ge_goto): New function.
2951 (ppc_write_goto_address): New function.
2952 (ppc_emit_ops_impl): New static variable.
2953 (ppc64v1_emit_prologue): New function.
2954 (ppc64v2_emit_prologue): New function.
2955 (ppc64_emit_epilogue): New function.
2956 (ppc64_emit_add): New function.
2957 (ppc64_emit_sub): New function.
2958 (ppc64_emit_mul): New function.
2959 (ppc64_emit_lsh): New function.
2960 (ppc64_emit_rsh_signed): New function.
2961 (ppc64_emit_rsh_unsigned): New function.
2962 (ppc64_emit_ext): New function.
2963 (ppc64_emit_zero_ext): New function.
2964 (ppc64_emit_log_not): New function.
2965 (ppc64_emit_bit_and): New function.
2966 (ppc64_emit_bit_or): New function.
2967 (ppc64_emit_bit_xor): New function.
2968 (ppc64_emit_bit_not): New function.
2969 (ppc64_emit_equal): New function.
2970 (ppc64_emit_less_signed): New function.
2971 (ppc64_emit_less_unsigned): New function.
2972 (ppc64_emit_ref): New function.
2973 (ppc64_emit_const): New function.
2974 (ppc64v1_emit_reg): New function.
2975 (ppc64v2_emit_reg): New function.
2976 (ppc64_emit_pop): New function.
2977 (ppc64_emit_stack_flush): New function.
2978 (ppc64_emit_swap): New function.
2979 (ppc64v1_emit_call): New function.
2980 (ppc64v2_emit_call): New function.
2981 (ppc64v1_emit_int_call_1): New function.
2982 (ppc64v2_emit_int_call_1): New function.
2983 (ppc64v1_emit_void_call_2): New function.
2984 (ppc64v2_emit_void_call_2): New function.
2985 (ppc64_emit_if_goto): New function.
2986 (ppc64_emit_eq_goto): New function.
2987 (ppc64_emit_ne_goto): New function.
2988 (ppc64_emit_lt_goto): New function.
2989 (ppc64_emit_le_goto): New function.
2990 (ppc64_emit_gt_goto): New function.
2991 (ppc64_emit_ge_goto): New function.
2992 (ppc64v1_emit_ops_impl): New static variable.
2993 (ppc64v2_emit_ops_impl): New static variable.
2994 (ppc_emit_ops): New function.
2995 (linux_low_target): Wire in ppc_emit_ops.
2997 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2998 Marcin Kościelnicki <koriakin@0x04.net>
3001 * Makefile.in: Add powerpc-*-ipa.o
3002 * configure.srv: Add ipa_obj for powerpc*-linux.
3003 * linux-ppc-ipa.c: New file.
3004 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3006 (PPC_FIELD): New macro.
3007 (PPC_SEXT): New macro.
3008 (PPC_OP6): New macro.
3009 (PPC_BO): New macro.
3010 (PPC_LI): New macro.
3011 (PPC_BD): New macro.
3012 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3013 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3014 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3015 (ppc_get_thread_area): New function.
3016 (is_elfv2_inferior): New function.
3017 (gen_ds_form): New function.
3018 (GEN_STD): New macro.
3019 (GEN_STDU): New macro.
3020 (GEN_LD): New macro.
3021 (GEN_LDU): New macro.
3022 (gen_d_form): New function.
3023 (GEN_ADDI): New macro.
3024 (GEN_ADDIS): New macro.
3025 (GEN_LI): New macro.
3026 (GEN_LIS): New macro.
3027 (GEN_ORI): New macro.
3028 (GEN_ORIS): New macro.
3029 (GEN_LWZ): New macro.
3030 (GEN_STW): New macro.
3031 (GEN_STWU): New macro.
3032 (gen_xfx_form): New function.
3033 (GEN_MFSPR): New macro.
3034 (GEN_MTSPR): New macro.
3035 (GEN_MFCR): New macro.
3036 (GEN_MTCR): New macro.
3037 (GEN_SYNC): New macro.
3038 (GEN_LWSYNC): New macro.
3039 (gen_x_form): New function.
3040 (GEN_OR): New macro.
3041 (GEN_MR): New macro.
3042 (GEN_LWARX): New macro.
3043 (GEN_STWCX): New macro.
3044 (GEN_CMPW): New macro.
3045 (gen_md_form): New function.
3046 (GEN_RLDICL): New macro.
3047 (GEN_RLDICR): New macro.
3048 (gen_i_form): New function.
3050 (GEN_BL): New macro.
3051 (gen_b_form): New function.
3052 (GEN_BNE): New macro.
3053 (GEN_LOAD): New macro.
3054 (GEN_STORE): New macro.
3055 (gen_limm): New function.
3056 (gen_atomic_xchg): New function.
3057 (gen_call): New function.
3058 (ppc_relocate_instruction): New function.
3059 (ppc_install_fast_tracepoint_jump_pad): New function.
3060 (ppc_get_min_fast_tracepoint_insn_len): New function.
3061 (ppc_get_ipa_tdesc_idx): New function.
3062 (the_low_target): Wire in the new functions.
3063 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3065 * linux-ppc-tdesc.h: New file.
3067 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3069 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3070 (alloc_jump_pad_buffer): New function.
3071 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3072 (alloc_jump_pad_buffer): New function.
3073 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3074 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3075 (alloc_jump_pad_buffer): New function.
3076 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3077 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3078 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3079 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3081 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3083 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3084 * linux-amd64-ipa.c: Likewise.
3085 * linux-i386-ipa.c: Likewise.
3086 * linux-s390-ipa.c: Likewise.
3087 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3088 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3089 set_trace_state_variable_value_ptr.
3090 (struct ipa_sym_addresses): Likewise.
3091 (symbol_list): Likewise.
3092 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3093 accessing gdb_collect directly.
3094 (gdb_collect_ptr_type): New typedef.
3095 (get_raw_reg_ptr_type): New typedef.
3096 (get_trace_state_variable_value_ptr_type): New typedef.
3097 (set_trace_state_variable_value_ptr_type): New typedef.
3098 (gdb_collect_ptr): New global.
3099 (get_raw_reg_ptr): New global.
3100 (get_trace_state_variable_value_ptr): New global.
3101 (set_trace_state_variable_value_ptr): New global.
3102 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3103 accessing get_raw_reg directly.
3104 (get_get_tsv_func_addr): Likewise for
3105 get_trace_state_variable_value_ptr.
3106 (get_set_tsv_func_addr): Likewise for
3107 set_trace_state_variable_value_ptr.
3108 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3110 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3112 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3114 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3116 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3118 (relocate_instruction): Remove own_buf.
3119 * server.c (own_buf): Make global.
3120 (handle_v_requests): Make global.
3121 * server.h (own_buf): New declaration.
3122 (handle_v_requests): New prototype.
3124 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3127 * linux-s390-low.c (add_insns): New function.
3128 (s390_emit_prologue): New function.
3129 (s390_emit_epilogue): New function.
3130 (s390_emit_add): New function.
3131 (s390_emit_sub): New function.
3132 (s390_emit_mul): New function.
3133 (s390_emit_lsh): New function.
3134 (s390_emit_rsh_signed): New function.
3135 (s390_emit_rsh_unsigned): New function.
3136 (s390_emit_ext): New function.
3137 (s390_emit_log_not): New function.
3138 (s390_emit_bit_and): New function.
3139 (s390_emit_bit_or): New function.
3140 (s390_emit_bit_xor): New function.
3141 (s390_emit_bit_not): New function.
3142 (s390_emit_equal): New function.
3143 (s390_emit_less_signed): New function.
3144 (s390_emit_less_unsigned): New function.
3145 (s390_emit_ref): New function.
3146 (s390_emit_if_goto): New function.
3147 (s390_emit_goto): New function.
3148 (s390_write_goto_address): New function.
3149 (s390_emit_litpool): New function.
3150 (s390_emit_const): New function.
3151 (s390_emit_call): New function.
3152 (s390_emit_reg): New function.
3153 (s390_emit_pop): New function.
3154 (s390_emit_stack_flush): New function.
3155 (s390_emit_zero_ext): New function.
3156 (s390_emit_swap): New function.
3157 (s390_emit_stack_adjust): New function.
3158 (s390_emit_set_r2): New function.
3159 (s390_emit_int_call_1): New function.
3160 (s390_emit_void_call_2): New function.
3161 (s390_emit_eq_goto): New function.
3162 (s390_emit_ne_goto): New function.
3163 (s390_emit_lt_goto): New function.
3164 (s390_emit_le_goto): New function.
3165 (s390_emit_gt_goto): New function.
3166 (s390_emit_ge_goto): New function.
3167 (s390x_emit_prologue): New function.
3168 (s390x_emit_epilogue): New function.
3169 (s390x_emit_add): New function.
3170 (s390x_emit_sub): New function.
3171 (s390x_emit_mul): New function.
3172 (s390x_emit_lsh): New function.
3173 (s390x_emit_rsh_signed): New function.
3174 (s390x_emit_rsh_unsigned): New function.
3175 (s390x_emit_ext): New function.
3176 (s390x_emit_log_not): New function.
3177 (s390x_emit_bit_and): New function.
3178 (s390x_emit_bit_or): New function.
3179 (s390x_emit_bit_xor): New function.
3180 (s390x_emit_bit_not): New function.
3181 (s390x_emit_equal): New function.
3182 (s390x_emit_less_signed): New function.
3183 (s390x_emit_less_unsigned): New function.
3184 (s390x_emit_ref): New function.
3185 (s390x_emit_if_goto): New function.
3186 (s390x_emit_const): New function.
3187 (s390x_emit_call): New function.
3188 (s390x_emit_reg): New function.
3189 (s390x_emit_pop): New function.
3190 (s390x_emit_stack_flush): New function.
3191 (s390x_emit_zero_ext): New function.
3192 (s390x_emit_swap): New function.
3193 (s390x_emit_stack_adjust): New function.
3194 (s390x_emit_int_call_1): New function.
3195 (s390x_emit_void_call_2): New function.
3196 (s390x_emit_eq_goto): New function.
3197 (s390x_emit_ne_goto): New function.
3198 (s390x_emit_lt_goto): New function.
3199 (s390x_emit_le_goto): New function.
3200 (s390x_emit_gt_goto): New function.
3201 (s390x_emit_ge_goto): New function.
3202 (s390_emit_ops): New function.
3203 (struct linux_target_ops): Fill in emit_ops hook.
3205 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3208 * Makefile.in: Add s390 IPA files.
3209 * configure.srv: Build IPA for s390.
3210 * linux-s390-ipa.c: New file.
3211 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3212 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3213 (tdesc_s390_linux32): Likewise.
3214 (init_registers_s390_linux32v1): Likewise.
3215 (tdesc_s390_linux32v1): Likewise.
3216 (init_registers_s390_linux32v2): Likewise.
3217 (tdesc_s390_linux32v2): Likewise.
3218 (init_registers_s390_linux64): Likewise.
3219 (tdesc_s390_linux64): Likewise.
3220 (init_registers_s390_linux64v1): Likewise.
3221 (tdesc_s390_linux64v1): Likewise.
3222 (init_registers_s390_linux64v2): Likewise.
3223 (tdesc_s390_linux64v2): Likewise.
3224 (init_registers_s390_te_linux64): Likewise.
3225 (tdesc_s390_te_linux64): Likewise.
3226 (init_registers_s390_vx_linux64): Likewise.
3227 (tdesc_s390_vx_linux64): Likewise.
3228 (init_registers_s390_tevx_linux64): Likewise.
3229 (tdesc_s390_tevx_linux64): Likewise.
3230 (init_registers_s390x_linux64): Likewise.
3231 (tdesc_s390x_linux64): Likewise.
3232 (init_registers_s390x_linux64v1): Likewise.
3233 (tdesc_s390x_linux64v1): Likewise.
3234 (init_registers_s390x_linux64v2): Likewise.
3235 (tdesc_s390x_linux64v2): Likewise.
3236 (init_registers_s390x_te_linux64): Likewise.
3237 (tdesc_s390x_te_linux64): Likewise.
3238 (init_registers_s390x_vx_linux64): Likewise.
3239 (tdesc_s390x_vx_linux64): Likewise.
3240 (init_registers_s390x_tevx_linux64): Likewise.
3241 (tdesc_s390x_tevx_linux64): Likewise.
3242 (have_hwcap_s390_vx): New static variable.
3243 (s390_arch_setup): Fill have_hwcap_s390_vx.
3244 (s390_get_thread_area): New function.
3245 (s390_ft_entry_gpr_esa): New const.
3246 (s390_ft_entry_gpr_zarch): New const.
3247 (s390_ft_entry_misc): New const.
3248 (s390_ft_entry_fr): New const.
3249 (s390_ft_entry_vr): New const.
3250 (s390_ft_main_31): New const.
3251 (s390_ft_main_64): New const.
3252 (s390_ft_exit_fr): New const.
3253 (s390_ft_exit_vr): New const.
3254 (s390_ft_exit_misc): New const.
3255 (s390_ft_exit_gpr_esa): New const.
3256 (s390_ft_exit_gpr_zarch): New const.
3257 (append_insns): New function.
3258 (s390_relocate_instruction): New function.
3259 (s390_install_fast_tracepoint_jump_pad): New function.
3260 (s390_get_min_fast_tracepoint_insn_len): New function.
3261 (s390_get_ipa_tdesc_idx): New function.
3262 (struct linux_target_ops): Wire in the above functions.
3263 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3264 * linux-s390-tdesc.h: New file.
3266 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3268 * linux-s390-low.c (s390_supports_tracepoints): New function.
3269 (struct linux_target_ops): Fill supports_tracepoints hook.
3271 2016-03-18 Yao Qi <yao.qi@linaro.org>
3273 * linux-low.c (lwp_signal_can_be_delivered): New function.
3274 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3276 2016-03-18 Yao Qi <yao.qi@linaro.org>
3278 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3279 0 if signal is enqueued. Remove 'signal' from one debugging
3280 message. Move one debugging message to some lines below.
3281 Remove code setting 'signal' to 0.
3283 2016-03-18 Yao Qi <yao.qi@linaro.org>
3285 * linux-low.c (linux_low_filter_event): Remove redundant
3286 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3288 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3290 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3291 (struct linux_target_ops): Wire in the above.
3293 2016-03-03 Yao Qi <yao.qi@linaro.org>
3295 * linux-low.c: Update comments to start_step_over.
3297 2016-03-03 Yao Qi <yao.qi@linaro.org>
3300 * linux-low.c (handle_extended_wait): Set child suspended
3301 if event_lwp->bp_reinsert isn't zero.
3303 2016-03-02 Yao Qi <yao.qi@linaro.org>
3305 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3306 enqueue_pending_signal.
3308 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3310 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3313 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3315 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3316 (s390_regmap_3264) [!__s390x__]: New global.
3317 (s390_collect_ptrace_register): Skip map entries containing -1.
3318 (s390_supply_ptrace_register): Ditto.
3319 (s390_fill_gprs_high): New function.
3320 (s390_store_gprs_high): New function.
3321 (s390_regsets): Add NT_S390_HIGH_GPRS.
3322 (s390_get_hwcap): Enable on 31-bit.
3323 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3324 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3325 Detect NT_S390_HIGH_GPRS.
3326 (s390_usrregs_info_3264): Enable on 31-bit.
3327 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3328 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3330 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3333 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3334 * configure.srv: Ditto.
3335 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3336 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3337 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3338 (init_registers_amd64_linux): Remove prototype.
3339 (tdesc_amd64_linux): Remove declaration.
3340 (get_ipa_tdesc): New function.
3341 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3342 initialize remaining tdescs.
3343 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3344 (init_registers_i386_linux): Remove prototype.
3345 (tdesc_i386_linux): Remove declaration.
3346 (get_ipa_tdesc): New function.
3347 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3348 initialize remaining tdescs.
3349 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3350 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3351 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3352 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3353 (x86_get_ipa_tdesc_idx): New function.
3354 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3355 * linux-x86-tdesc.h: New file.
3356 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3357 (target_get_ipa_tdesc_idx): New macro.
3358 * tracepoint.c (ipa_tdesc_idx): New macro.
3359 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3360 (symbol_list): Add ipa_tdesc_idx.
3361 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3362 (ipa_tdesc): Remove.
3363 (ipa_tdesc_idx): New variable.
3364 (get_context_regcache): Use get_ipa_tdesc.
3365 (gdb_collect): Ditto.
3367 * tracepoint.h (get_ipa_tdesc): New prototype.
3368 (ipa_tdesc): Remove.
3370 2016-02-24 Pedro Alves <palves@redhat.com>
3372 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3373 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3374 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3375 Factor out common code between the USE_SIGTRAP_SIGINFO and
3376 !USE_SIGTRAP_SIGINFO blocks.
3377 (linux_low_filter_event): Call save_stop_reason instead of
3378 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3380 (linux_wait_1): Update comments.
3382 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3384 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3385 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3386 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3387 ppc_insert_point, ppc_remove_point.
3389 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3391 * linux-s390-low.c (s390_supports_z_point_type): New function.
3392 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3394 2016-02-16 Yao Qi <yao.qi@linaro.org>
3396 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3397 PC. Get pc from regcache_read_pc.
3399 2016-02-12 Yao Qi <yao.qi@linaro.org>
3401 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3402 or linux_get_pc_32bit.
3403 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3405 2016-02-12 Yao Qi <yao.qi@linaro.org>
3407 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3408 arm_linux_get_next_pcs_fixup.
3410 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3412 * tracepoint.c (x_tracepoint_action_download): Change
3413 write_inferior_data_ptr to write_inferior_data_pointer.
3414 (cmd_qtstart): Likewise.
3415 (write_inferior_data_ptr): Remove.
3416 (download_agent_expr): Change write_inferior_data_ptr to
3417 write_inferior_data_pointer.
3418 (download_tracepoint_1): Likewise.
3419 (download_tracepoint): Likewise.
3420 (download_trace_state_variables): Likewise.
3422 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3423 Marcin Kościelnicki <koriakin@0x04.net>
3425 * tracepoint.c (struct tracepoint_action_ops): Remove.
3426 (struct tracepoint_action): Remove ops.
3427 (m_tracepoint_action_download, r_tracepoint_action_download)
3428 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3429 size and offset accordingly.
3430 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3431 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3432 (tracepoint_action_send, tracepoint_action_download): New functions.
3433 Helpers for trace action handlers.
3434 (add_tracepoint_action): Remove setup actions ops.
3435 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3437 2016-02-10 Yao Qi <yao.qi@linaro.org>
3439 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3441 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3443 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3445 * configure: Regenerate.
3447 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3449 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3450 void * to gdb_byte *.
3451 * linux-low.c (siginfo_fixup): Likewise.
3452 (linux_xfer_siginfo): Likewise.
3453 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3455 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3457 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3459 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3461 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3463 * linux-x86-low.c [__x86_64__]: Include
3464 "nat/amd64-linux-siginfo.h".
3465 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3466 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3467 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3468 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3469 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3470 (cpt_si_fd, si_timerid, si_overrun): Move from
3471 nat/amd64-linux-siginfo.c.
3472 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3474 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3476 * server.c (skip_to_semicolon): Remove.
3477 (process_point_options): Use strchrnul instead of
3480 2016-01-26 Yao Qi <yao.qi@linaro.org>
3482 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3483 * linux-low.c (install_software_single_step_breakpoints): Don't
3484 call regcache_read_pc.
3485 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3488 2016-01-26 Yao Qi <yao.qi@linaro.org>
3490 * linux-low.c (install_software_single_step_breakpoints): Call
3491 regcache_read_pc instead of get_pc.
3493 2016-01-26 Yao Qi <yao.qi@linaro.org>
3495 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3496 (unblock_async_io): Rename to ...
3497 (block_unblock_async_io): ... it. New function.
3498 (enable_async_io): Don't install SIGIO handler. Unblock it
3500 (disable_async_io): Don't ignore SIGIO. Block it instead.
3501 (initialize_async_io): Install SIGIO handler. Don't call
3504 2016-01-26 Yao Qi <yao.qi@linaro.org>
3506 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3507 first character is '\003', call *the_target->request_interrupt.
3509 2016-01-25 Yao Qi <yao.qi@linaro.org>
3511 * remote-utils.c (new_thread_notify): Remove.
3512 (dead_thread_notify): Likewise.
3513 * remote-utils.h (new_thread_notify): Remove declaration.
3514 (dead_thread_notify): Likewise.
3516 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3518 * gdb.trace/pending.exp: Fix expected message on continue.
3520 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3522 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3523 it works properly on big-endian machines where sizeof (CORE_ADDR)
3526 2016-01-21 Pedro Alves <palves@redhat.com>
3528 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3529 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3530 * configure: Regenerate.
3532 2016-01-21 Yao Qi <yao.qi@linaro.org>
3534 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3535 is_thumb and set it according to CPSR saved on the stack.
3536 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3537 arm_sigreturn_next_pc.
3539 2016-01-18 Yao Qi <yao.qi@linaro.org>
3541 * linux-low.c (linux_set_pc_64bit): New function.
3542 (linux_get_pc_64bit): New function.
3543 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3545 * linux-sparc-low.c (debug_threads): Remove declaration.
3546 (sparc_get_pc): Remove.
3547 (the_low_target): Use linux_get_pc_64bit instead of
3549 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3550 (the_low_target): Use linux_get_pc_64bit and
3553 2016-01-18 Yao Qi <yao.qi@linaro.org>
3555 * linux-arm-low.c (debug_threads): Remove declaration.
3556 (arm_get_pc, arm_set_pc): Remove.
3557 (the_low_target): Use linux_get_pc_32bit and
3559 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3560 (the_low_target): Use linux_get_pc_32bit and
3562 * linux-cris-low.c (debug_threads): Remove declaration.
3563 (cris_get_pc, cris_set_pc,): Remove.
3564 (the_low_target): Use linux_get_pc_32bit and
3566 * linux-crisv32-low.c (debug_threads): Remove declaration.
3567 (cris_get_pc, cris_set_pc): Remove.
3568 (the_low_target): Use linux_get_pc_32bit and
3570 * linux-low.c: Include inttypes.h.
3571 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3572 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3573 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3574 (the_low_target): Use linux_get_pc_32bit and
3576 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3577 (the_low_target): Use linux_get_pc_32bit and
3579 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3580 (the_low_target): Use linux_get_pc_32bit and
3582 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3583 (the_low_target): Use linux_get_pc_32bit and
3585 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3586 (the_low_target): Use linux_get_pc_32bit and
3589 2016-01-18 Gary Benson <gbenson@redhat.com>
3591 * configure.ac (AC_FUNC_FORK): New check.
3592 * config.in: Regenerate.
3593 * configure: Likewise.
3595 2016-01-14 Yao Qi <yao.qi@linaro.org>
3597 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3598 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3599 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3600 arm_get_next_pcs_ctor.
3602 2016-01-12 Josh Stone <jistone@redhat.com>
3603 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3605 * inferiors.h: Include "gdb_vecs.h".
3606 (struct process_info): Add syscalls_to_catch.
3607 * inferiors.c (remove_process): Free syscalls_to_catch.
3608 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3609 syscall_return stops.
3610 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3611 * server.c (handle_general_set): Handle QCatchSyscalls.
3612 (handle_query): Report support for QCatchSyscalls.
3613 * target.h (struct target_ops): Add supports_catch_syscall.
3614 (target_supports_catch_syscall): New macro.
3615 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3616 (struct lwp_info): Add syscall_state.
3617 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3618 Maintain syscall_state and syscalls_to_catch across exec.
3619 (get_syscall_trapinfo): New function, proxy to the_low_target.
3620 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3621 (linux_low_filter_event): Toggle syscall_state entry/return for
3622 syscall traps, and set it ignored for all others.
3623 (gdb_catching_syscalls_p): New function.
3624 (gdb_catch_this_syscall_p): New function.
3625 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3626 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3627 (linux_supports_catch_syscall): New function.
3628 (linux_target_ops): Install it.
3629 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3630 (the_low_target): Install it.
3632 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3634 * acinclude.m4: Include new ../warning.m4 file.
3635 * configure: Regenerated.
3636 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3638 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3640 * ax.c (is_goto_target): Mark static.
3641 * linux-low.c (register_addr): Likewise.
3642 (linux_fetch_registers, linux_store_registers): Likewise.
3643 * mem-break.c (any_persistent_commands): Fix old prototype.
3644 (add_commands_to_breakpoint): Mark static.
3645 * regcache.c (find_register_by_name): Delete unused func.
3646 * remote-utils.c (hex_or_minus_one): Mark static.
3647 * server.c (monitor_show_help): Mark static.
3648 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3649 handle_v_requests): Likewise.
3651 2016-01-12 Pedro Alves <palves@redhat.com>
3653 Remove use of the registered trademark symbol throughout.
3655 2016-01-08 Yao Qi <yao.qi@linaro.org>
3657 * remote-utils.c (getpkt): If c is '\003', call target hook
3660 2016-01-06 Yao Qi <yao.qi@linaro.org>
3662 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3663 linux-aarch32-low.c.
3664 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3665 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3666 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3667 (thumb2_breakpoint): Declare.
3668 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3669 linux-aarch32-low.h.
3670 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3671 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3672 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3674 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3676 * gdbreplay.c (gdbreplay_version): Change copyright year in
3678 * server.c (gdbserver_version): Likewise.
3680 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3682 * server.c (crc32_table): Delete.
3683 (crc32): Use libiberty's xcrc32 function.
3685 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3687 * lynx-low.c (lynx_delete_thread_callback): New function.
3688 (lynx_mourn): Properly delete our process and all of its
3689 threads. Remove call to clear_inferiors.
3691 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3693 * target.c (thread_search_callback): Add check that
3694 the thread_stopped target callback is not NULL before
3697 2015-12-21 Yao Qi <yao.qi@linaro.org>
3699 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3702 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3704 * server.c (handle_query): Call target_supports_software_single_step.
3706 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3708 * linux-low.c (single_step): New function.
3709 (linux_resume_one_lwp_throw): Call single_step.
3710 (start_step_over): Likewise.
3712 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3714 * Makefile.in (SFILES): Append arch/arm-linux.c,
3715 arch/arm-get-next-pcs.c.
3716 (arm-linux.o): New rule.
3717 (arm-get-next-pcs.o): New rule.
3718 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3720 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3721 to linux-aarch32-low.c.
3722 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3723 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3724 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3725 (thumb2_breakpoint_len): Likewise.
3726 (arm_is_thumb_mode): Make non-static.
3727 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3728 from linux-aarch32-low.c.
3729 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3730 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3731 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3732 (thumb2_breakpoint_len): Likewise.
3733 (arm_is_thumb_mode): New declaration.
3734 * linux-arm-low.c: Include arch/arm-linux.h
3735 aarch/arm-get-next-pcs.h, sys/syscall.h.
3736 (get_next_pcs_ops): New struct.
3737 (get_next_pcs_addr_bits_remove): New function.
3738 (get_next_pcs_is_thumb): New function.
3739 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3740 (arm_sigreturn_next_pc): Likewise.
3741 (get_next_pcs_syscall_next_pc): Likewise.
3742 (arm_gdbserver_get_next_pcs): Likewise.
3743 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3745 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3746 * server.h: Include gdb_vecs.h.
3748 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3750 * Makefile.in (SFILES): Append common/common-regcache.c.
3751 (OBS): Append common-regcache.o.
3752 (common-regcache.o): New rule.
3753 * regcache.c (init_register_cache): Initialize cache to
3755 (regcache_raw_read_unsigned): New function.
3756 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3757 register_status enum.
3759 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3761 * linux-aarch64-low.c (the_low_targets): Rename
3762 breakpoint_reinsert_addr to get_next_pcs.
3763 * linux-arm-low.c (the_low_targets): Likewise.
3764 * linux-bfin-low.c (the_low_targets): Likewise.
3765 * linux-cris-low.c (the_low_targets): Likewise.
3766 * linux-crisv32-low.c (the_low_targets): Likewise.
3767 * linux-low.c (can_software_single_step): Likewise.
3768 (install_software_single_step_breakpoints): New function.
3769 (start_step_over): Use install_software_single_step_breakpoints.
3770 * linux-low.h: New CORE_ADDR vector.
3771 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3773 * linux-mips-low.c (the_low_targets): Likewise.
3774 * linux-nios2-low.c (the_low_targets): Likewise.
3775 * linux-sparc-low.c (the_low_targets): Likewise.
3777 2015-12-17 Pedro Alves <palves@redhat.com>
3779 * linux-low.c (linux_kill_one_lwp): Remove references to
3781 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3783 (linux_init_signals): Delete.
3784 (initialize_low): Adjust.
3785 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3787 2015-12-16 Pedro Alves <palves@redhat.com>
3789 * configure.ac (compiler warning flags): When testing a
3790 -Wno-foo option, check whether -Wfoo works instead.
3791 * configure: Regenerate.
3793 2015-12-11 Don Breazeal <donb@codesourcery.com>
3795 * server.c (process_serial_event): Don't exit from gdbserver
3796 in remote mode if there are still active inferiors.
3798 2015-12-11 Yao Qi <yao.qi@linaro.org>
3800 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3801 arm_breakpoint_at if the process is 32-bit.
3803 2015-12-11 Yao Qi <yao.qi@linaro.org>
3805 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3808 2015-12-07 Yao Qi <yao.qi@linaro.org>
3810 * configure.srv: Append arm.o to srv_tgtobj for
3811 aarch64*-*-linux* target.
3812 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3813 from linux-arm-low.c.
3814 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3815 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3816 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3817 (thumb2_breakpoint_len): Likewise.
3818 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3819 (arm_breakpoint_kinds): Likewise.
3820 (arm_breakpoint_kind_from_pc): Likewise.
3821 (arm_sw_breakpoint_from_kind): Likewise.
3822 (arm_breakpoint_kind_from_current_state): Likewise.
3823 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3824 (arm_sw_breakpoint_from_kind): Declare.
3825 (arm_breakpoint_kind_from_current_state): Declare.
3826 (arm_breakpoint_at): Declare.
3827 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3828 arm_sw_breakpoint_from_kind if process is 32-bit.
3829 (aarch64_breakpoint_kind_from_pc): New function.
3830 (aarch64_breakpoint_kind_from_current_state): New function.
3831 (the_low_target): Initialize fields breakpoint_kind_from_pc
3832 and breakpoint_kind_from_current_state.
3833 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3834 linux-aarch32-low.c.
3835 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3836 (arm_breakpoint, arm_breakpoint_len): Likewise.
3837 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3838 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3839 (arm_is_thumb_mode): Likewise.
3840 (arm_breakpoint_at): Likewise.
3841 (arm_breakpoint_kind_from_pc): Likewise.
3842 (arm_sw_breakpoint_from_kind): Likewise.
3843 (arm_breakpoint_kind_from_current_state): Likewise.
3846 2015-08-04 Yao Qi <yao.qi@linaro.org>
3848 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3849 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3850 * server.c (extended_protocol): Remove "static".
3851 * server.h (extended_protocol): Declare it.
3853 2015-12-04 Josh Stone <jistone@redhat.com>
3855 * target.h (struct target_ops) <arch_setup>: Rename to ...
3856 (struct target_ops) <post_create_inferior>: ... this.
3857 (target_arch_setup): Rename to ...
3858 (target_post_create_inferior): ... this, calling post_create_inferior.
3859 * server.c (start_inferior): Update target_arch_setup calls to
3860 target_post_create_inferior.
3861 * linux-low.c (linux_low_ptrace_options): Forward declare.
3862 (linux_arch_setup): Update its comment for general use.
3863 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3864 (struct linux_target_ops): Use linux_post_create_inferior.
3865 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3866 to post_create_inferior.
3867 * nto-low.c (struct nto_target_ops): Likewise.
3868 * spu-low.c (struct spu_target_ops): Likewise.
3869 * win32-low.c (struct win32_target_ops): Likewise.
3871 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3873 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3875 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3877 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3878 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3879 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3880 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3881 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3882 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3883 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3884 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3885 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3886 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3887 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3888 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3890 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3892 * linux-low.c (linux_look_up_symbols): Don't call
3893 linux_supports_traceclone.
3894 * linux-low.h (thread_db_init): Remove use_events argument.
3895 * thread-db.c (thread_db_use_event): Remove global variable.
3896 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3897 (struct thread_db) <td_create_bp>: Remove field.
3898 (thread_db_create_event): Remove function.
3899 (thread_db_enable_reporting): Likewise.
3900 (find_one_thread): Don't check for thread_db_use_events.
3901 (attach_thread): Likewise.
3902 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3903 (try_thread_db_load_1): Don't check for thread_db_use_events.
3904 (thread_db_init): Remove use_events argument and thread events
3906 (remove_thread_event_breakpoints): Remove function.
3907 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3909 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3911 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3913 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3914 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3915 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3916 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3917 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3919 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3921 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3922 * linux-low.c (can_hardware_single_step): Use
3923 supports_hardware_single_step.
3924 (can_software_single_step): New function.
3925 (start_step_over): Call can_software_single_step.
3926 (linux_supports_hardware_single_step): New function.
3927 (struct target_ops) <supports_software_single_step>: Initialize.
3928 * linux-low.h (struct linux_target_ops)
3929 <supports_hardware_single_step>: Initialize.
3930 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3931 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3932 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3933 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3934 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3935 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3936 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3937 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3938 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3939 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3941 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3942 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3944 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3945 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3946 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3948 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3949 * target.h (struct target_ops): <supports_software_single_step>:
3951 (target_supports_software_single_step): New macro.
3953 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3955 * linux-low.c (linux_wait_1): Fix pc advance condition.
3956 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3957 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3959 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3961 * linux-arm-low.c (arm_is_thumb_mode): New function.
3962 (arm_breakpoint_at): Use arm_is_thumb_mode.
3963 (arm_breakpoint_kind_from_current_state): New function.
3964 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3966 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3967 (linux_breakpoint_kind_from_current_state): New function.
3968 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3969 * linux-low.h (struct linux_target_ops)
3970 <breakpoint_kind_from_current_state>: New field.
3971 * target.h (struct target_ops): Likewise.
3972 (target_breakpoint_kind_from_current_state): New macro.
3974 2015-11-30 Pedro Alves <palves@redhat.com>
3976 * linux-low.c (linux_resume): Wake up the event loop before
3979 2015-11-30 Pedro Alves <palves@redhat.com>
3981 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3983 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3985 * target.c (struct thread_search): New structure.
3986 (thread_search_callback): New function.
3987 (prev_general_thread): New global.
3988 (prepare_to_access_memory, done_accessing_memory): New functions.
3989 * target.h (prepare_to_access_memory, done_accessing_memory):
3990 Replace macros with function declarations.
3992 2015-11-30 Pedro Alves <palves@redhat.com>
3995 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3996 report TARGET_WAITKIND_NO_RESUMED.
3997 * remote-utils.c (prepare_resume_reply): Handle
3998 TARGET_WAITKIND_NO_RESUMED.
3999 * server.c (report_no_resumed): New global.
4000 (handle_query) <qSupported>: Handle "no-resumed+". Report
4001 "no-resumed+" support.
4002 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4003 return error if the client doesn't support no-resumed events.
4004 (push_stop_notification): New function.
4005 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4006 events if the client supports them.
4008 2015-11-30 Pedro Alves <palves@redhat.com>
4010 * linux-low.c (thread_still_has_status_pending_p): Don't check
4012 (lwp_resumed): New function.
4013 (status_pending_p_callback): Return early if the LWP is not
4014 supposed to be resumed.
4016 2015-11-30 Pedro Alves <palves@redhat.com>
4018 * linux-low.c (handle_extended_wait): Assert that the LWP's
4019 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4020 thread create events, leave the new child's status pending.
4021 (linux_low_filter_event): If GDB wants to hear about thread exit
4022 events, leave the LWP marked dead and don't delete it.
4023 (linux_wait_for_event_filtered): Don't check for thread exit.
4024 (filter_exit_event): New function.
4025 (linux_wait_1): Use it, when returning an exit event.
4026 (linux_resume_one_lwp_throw): Assert that the LWP's
4027 waitstatus is TARGET_WAITKIND_IGNORE.
4028 * remote-utils.c (prepare_resume_reply): Handle
4029 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4030 * server.c (report_thread_events): New global.
4031 (handle_general_set): Handle QThreadEvents.
4032 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4033 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4034 TARGET_WAITKIND_THREAD_EXITED.
4035 * server.h (report_thread_events): Declare.
4037 2015-11-30 Pedro Alves <palves@redhat.com>
4039 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4040 the thread's last_resume_kind was resume_stop.
4042 2015-11-30 Pedro Alves <palves@redhat.com>
4044 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4047 2015-11-30 Pedro Alves <palves@redhat.com>
4049 * server.c (handle_v_requests): Handle vCtrlC.
4051 2015-11-30 Pedro Alves <palves@redhat.com>
4053 * gdbthread.h (find_any_thread_of_pid): Declare.
4054 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4056 * server.c (handle_query): If current_thread is NULL, look for
4057 another thread of the selected process.
4059 2015-11-26 Daniel Colascione <dancol@dancol.org>
4060 Simon Marchi <simon.marchi@ericsson.com>
4062 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4063 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4065 * target.h (struct target_ops) <thread_name>: New field.
4066 (target_thread_name): New macro.
4068 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4070 * regcache.h (regcache_invalidate_pid): Add declaration.
4071 * regcache.c (regcache_invalidate_pid): New function, extracted
4072 from regcache_invalidate.
4073 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4074 Add trivial documentation comment.
4075 * lynx-low.c: Use regcache_invalidate_pid instead of
4076 regcache_invalidate.
4078 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4080 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4081 and Elf64_auxv_t if the target is Android.
4083 2015-11-22 Doug Evans <xdje42@gmail.com>
4085 * target.h: #include <sys/types.h>.
4087 2015-11-19 Pedro Alves <palves@redhat.com>
4089 * linux-low.c (linux_process_qsupported): Change prototype.
4091 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4093 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4094 and adjust to loop over all features.
4095 * server.c (handle_query) <qSupported>: Adjust to call
4096 target_process_qsupported once, passing it a vector of unprocessed
4098 * target.h (struct target_ops) <process_qsupported>: Change
4100 (target_process_qsupported): Adjust.
4102 2015-11-19 Pedro Alves <palves@redhat.com>
4104 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4106 * configure: Regenerate.
4108 2015-11-19 Pedro Alves <palves@redhat.com>
4110 * configure: Regenerate.
4112 2015-11-19 Yao Qi <yao.qi@linaro.org>
4114 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4117 2015-11-19 Yao Qi <yao.qi@linaro.org>
4119 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4120 (struct aarch64_operand): Move enum out.
4122 2015-11-19 Yao Qi <yao.qi@linaro.org>
4124 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4125 struct user_fpsimd_state *.
4126 (aarch64_store_fpregset): Likewise.
4128 2015-11-19 Yao Qi <yao.qi@linaro.org>
4130 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4131 struct user_pt_regs *.
4132 (aarch64_store_gregset): Likewise.
4134 2015-11-18 Pedro Alves <palves@redhat.com>
4136 * Makefile.in (all_object_files): Add $IPA_OBJS.
4138 2015-11-17 Pedro Alves <palves@redhat.com>
4140 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4141 GDB_SIGNAL_0 and gdb_signal_to_string.
4143 2015-11-17 Pedro Alves <palves@redhat.com>
4145 * win32-low.c (handle_output_debug_string): Remove parameter.
4146 (win32_kill): Remove our_status local and adjust call to
4147 handle_output_debug_string.
4148 (get_child_debug_event): Adjust call to
4149 handle_output_debug_string.
4151 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4153 * linux-mips-low.c (mips_fill_gregset): Add cast.
4154 (mips_store_gregset): Likewise.
4155 (mips_fill_fpregset): Likewise.
4156 (mips_store_fpregset): Likewise.
4158 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4160 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4163 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4165 * linux-mips-low.c (mips_linux_new_thread): Change type of
4166 watch_type to enum target_hw_bp_type.
4168 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4170 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4171 Change return type to arm_hwbp_type.
4173 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4175 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4176 (arm_store_gregset): Likewise.
4177 * linux-arm-low.c (arm_get_hwcap): Likewise.
4178 (arm_read_description): Likewise.
4180 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4182 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4184 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4186 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4187 (ppc_fill_vsxregset): Likewise.
4188 (ppc_store_vsxregset): Likewise.
4189 (ppc_fill_vrregset): Likewise.
4190 (ppc_store_vrregset): Likewise.
4191 (ppc_fill_evrregset): Likewise.
4192 (ppc_store_evrregset): Likewise.
4194 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4196 * linux-ppc-low.c (ppc_usrregs_info): Remove
4197 forward-declaration.
4198 (ppc_arch_setup): Move lower in file.
4200 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4202 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4203 (ps_pdwrite): Likewise.
4205 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4207 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4208 to after assert checks.
4210 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4212 * proc-service.c (ps_pdread): Add/adjust casts.
4213 (ps_pdwrite): Add/adjust casts.
4215 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4217 * server.c (handle_search_memory_1): Cast return value of
4220 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4222 * server.c (write_qxfer_response): Change type of data to
4225 2015-10-29 Pedro Alves <palves@redhat.com>
4227 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4229 2015-10-29 Pedro Alves <palves@redhat.com>
4231 * tracepoint.c (clear_installed_tracepoints): Add casts.
4233 2015-10-29 Pedro Alves <palves@redhat.com>
4235 * server.c (handle_v_cont, process_serial_event): Add enum
4236 gdb_signal casts to signal parsing code.
4238 2015-10-29 Pedro Alves <palves@redhat.com>
4240 * linux-low.h (NULL_REGSET): Define.
4241 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4242 * linux-arm-low.c (arm_regsets): Likewise.
4243 * linux-crisv32-low.c (cris_regsets): Likewise.
4244 * linux-m68k-low.c (m68k_regsets): Likewise.
4245 * linux-mips-low.c (mips_regsets): Likewise.
4246 * linux-nios2-low.c (nios2_regsets): Likewise.
4247 * linux-ppc-low.c (ppc_regsets): Likewise.
4248 * linux-s390-low.c (s390_regsets): Likewise.
4249 * linux-sh-low.c (sh_regsets): Likewise.
4250 * linux-sparc-low.c (sparc_regsets): Likewise.
4251 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4252 * linux-tile-low.c (tile_regsets): Likewise.
4253 * linux-x86-low.c (x86_regsets): Likewise.
4254 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4256 2015-10-29 Pedro Alves <palves@redhat.com>
4258 * linux-low.h (NULL_REGSET): Define.
4259 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4260 * linux-arm-low.c (arm_regsets): Likewise.
4261 * linux-crisv32-low.c (cris_regsets): Likewise.
4262 * linux-m68k-low.c (m68k_regsets): Likewise.
4263 * linux-mips-low.c (mips_regsets): Likewise.
4264 * linux-nios2-low.c (nios2_regsets): Likewise.
4265 * linux-ppc-low.c (ppc_regsets): Likewise.
4266 * linux-s390-low.c (s390_regsets): Likewise.
4267 * linux-sh-low.c (sh_regsets): Likewise.
4268 * linux-sparc-low.c (sparc_regsets): Likewise.
4269 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4270 * linux-tile-low.c (tile_regsets): Likewise.
4271 * linux-x86-low.c (x86_regsets): Likewise.
4272 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4274 2015-10-26 Doug Evans <dje@google.com>
4276 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4278 2015-10-26 Doug Evans <dje@google.com>
4280 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4282 2015-10-26 Doug Evans <dje@google.com>
4284 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4286 (attach_thread, find_new_threads_callback): Ditto.
4288 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4290 * mem-break.h (set_breakpoint_data): Remove.
4292 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4294 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4295 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4296 (initialize_low): Remove set_breakpoint_data call.
4297 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4298 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4299 (initialize_low): Remove set_breakpoint_data call.
4300 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4301 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4302 (initialize_low): Remove set_breakpoint_data call.
4304 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4306 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4307 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4308 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4309 * target.h (target_breakpoint_kind_from_pc): New macro.
4311 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4313 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4314 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4315 the default breakpoint kind.
4317 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4319 * linux-arm-low.c (arm_supports_z_point_type): Add software
4322 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4324 * linux-arm-low.c: Refactor breakpoint definitions.
4325 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4326 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4328 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4330 * Makefile.in: Add arm.c/o.
4331 * configure.srv: Likewise.
4332 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4333 (arm_breakpoint_kind_from_pc): New function.
4334 (arm_sw_breakpoint_from_kind): Return proper kind.
4335 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4337 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4339 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4341 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4342 (struct raw_breakpoint) <size>: Remove.
4343 (struct raw_breakpoint) <kind>: Add.
4344 (bp_size): New function.
4345 (bp_opcode): Likewise.
4346 (find_raw_breakpoint_at): Adjust for kind.
4347 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4348 (remove_memory_breakpoint): Adjust for kind call bp_size.
4349 (set_raw_breakpoint_at): Adjust for kind.
4350 (set_breakpoint): Likewise.
4351 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4352 (delete_raw_breakpoint): Adjust for kind.
4353 (delete_breakpoint): Likewise.
4354 (find_gdb_breakpoint): Likewise.
4355 (set_gdb_breakpoint_1): Likewise.
4356 (set_gdb_breakpoint): Likewise.
4357 (delete_gdb_breakpoint_1): Likewise.
4358 (delete_gdb_breakpoint): Likewise.
4359 (uninsert_raw_breakpoint): Likewise.
4360 (reinsert_raw_breakpoint): Likewise.
4361 (set_breakpoint_data): Remove.
4362 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4363 (check_mem_read): Adjust for kind call bp_size.
4364 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4365 (clone_one_breakpoint): Adjust for kind.
4366 * mem-break.h (set_gdb_breakpoint): Likewise.
4367 (delete_gdb_breakpoint): Likewise.
4368 * server.c (process_serial_event): Likewise.
4370 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4372 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4373 (struct linux_target_ops) <breakpoint>: Remove.
4374 (struct linux_target_ops) <breakpoint_len>: Remove.
4375 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4376 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4377 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4378 (arm_sw_breakpoint_from_kind): New function.
4379 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4380 (struct linux_target_ops) <breakpoint>: Remove.
4381 (struct linux_target_ops) <breakpoint_len>: Remove.
4382 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4383 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4384 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4385 (struct linux_target_ops) <breakpoint>: Remove.
4386 (struct linux_target_ops) <breakpoint_len>: Remove.
4387 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4388 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4389 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4390 (struct linux_target_ops) <breakpoint>: Remove.
4391 (struct linux_target_ops) <breakpoint_len>: Remove.
4392 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4393 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4394 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4395 and sw_breakpoint_from_kind to increment the pc.
4396 (linux_breakpoint_kind_from_pc): New function.
4397 (linux_sw_breakpoint_from_kind): New function.
4398 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4399 (initialize_low): Call breakpoint_kind_from_pc and
4400 sw_breakpoint_from_kind to replace breakpoint_data/len.
4401 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4403 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4404 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4405 (struct linux_target_ops) <breakpoint>: Remove.
4406 (struct linux_target_ops) <breakpoint_len>: Remove.
4407 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4408 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4409 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4410 (struct linux_target_ops) <breakpoint>: Remove.
4411 (struct linux_target_ops) <breakpoint_len>: Remove.
4412 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4413 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4414 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4415 (struct linux_target_ops) <breakpoint>: Remove.
4416 (struct linux_target_ops) <breakpoint_len>: Remove.
4417 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4418 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4419 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4420 (struct linux_target_ops) <breakpoint>: Remove.
4421 (struct linux_target_ops) <breakpoint_len>: Remove.
4422 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4423 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4424 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4425 (struct linux_target_ops) <breakpoint>: Remove.
4426 (struct linux_target_ops) <breakpoint_len>: Remove.
4427 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4428 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4429 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4430 (struct linux_target_ops) <breakpoint>: Remove.
4431 (struct linux_target_ops) <breakpoint_len>: Remove.
4432 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4433 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4434 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4435 (struct linux_target_ops) <breakpoint>: Remove.
4436 (struct linux_target_ops) <breakpoint_len>: Remove.
4437 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4438 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4439 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4440 (struct linux_target_ops) <breakpoint>: Remove.
4441 (struct linux_target_ops) <breakpoint_len>: Remove.
4442 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4443 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4444 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4445 (struct linux_target_ops) <breakpoint>: Remove.
4446 (struct linux_target_ops) <breakpoint_len>: Remove.
4447 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4448 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4449 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4450 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4451 (struct linux_target_ops) <breakpoint>: Remove.
4452 (struct linux_target_ops) <breakpoint_len>: Remove.
4453 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4454 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4455 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4456 (struct linux_target_ops) <breakpoint>: Remove.
4457 (struct linux_target_ops) <breakpoint_len>: Remove.
4458 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4459 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4461 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4463 * linux-cris-low.c (cris_get_pc): Remove void arg.
4465 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4467 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4470 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4472 * inferiors.c (thread_pid_matches_callback): New function.
4473 (find_thread_process): New function.
4474 (remove_thread): Reset current_thread.
4475 (remove_process): Assert threads have been removed first.
4477 2015-10-15 Yao Qi <yao.qi@linaro.org>
4479 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4481 (aarch64_remove_point): Likewise.
4482 * regcache.c (regcache_register_size): New function.
4484 2015-10-12 Yao Qi <yao.qi@linaro.org>
4486 * linux-aarch64-low.c: Update all callers as emit_load_store
4487 is renamed to aarch64_emit_load_store.
4489 2015-10-12 Yao Qi <yao.qi@linaro.org>
4491 * linux-aarch64-low.c: Update all callers of function renaming
4492 from emit_insn to aarch64_emit_insn.
4494 2015-10-12 Yao Qi <yao.qi@linaro.org>
4496 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4497 arch/aarch64-insn.h.
4498 (struct aarch64_memory_operand): Likewise.
4500 (emit_insn): Move to arch/aarch64-insn.c.
4501 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4502 (emit_load_store): Move to arch/aarch64-insn.c.
4503 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4504 (can_encode_int32): Remove.
4506 2015-10-12 Yao Qi <yao.qi@linaro.org>
4508 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4509 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4510 (aarch64_relocate_instruction): Likewise.
4511 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4512 (struct aarch64_insn_visitor): Likewise.
4514 2015-10-12 Yao Qi <yao.qi@linaro.org>
4516 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4517 (struct aarch64_insn_visitor): New.
4518 (struct aarch64_insn_relocation_data): New.
4519 (aarch64_ftrace_insn_reloc_b): New function.
4520 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4521 (aarch64_ftrace_insn_reloc_cb): Likewise.
4522 (aarch64_ftrace_insn_reloc_tb): Likewise.
4523 (aarch64_ftrace_insn_reloc_adr): Likewise.
4524 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4525 (aarch64_ftrace_insn_reloc_others): Likewise.
4527 (aarch64_relocate_instruction): Use visitor.
4529 2015-10-12 Yao Qi <yao.qi@linaro.org>
4531 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4532 int. Add argument buf.
4533 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4534 aarch64_relocate_instruction.
4536 2015-10-12 Yao Qi <yao.qi@linaro.org>
4538 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4539 argument insn. Remove local variable insn. Don't call
4541 (aarch64_install_fast_tracepoint_jump_pad): Call
4544 2015-09-30 Yao Qi <yao.qi@linaro.org>
4546 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4547 (emit_load_store_pair): Likewise.
4549 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4551 * dll.c (match_dll): Add cast(s).
4552 (unloaded_dll): Likewise.
4553 * linux-low.c (second_thread_of_pid_p): Likewise.
4554 (delete_lwp_callback): Likewise.
4555 (count_events_callback): Likewise.
4556 (select_event_lwp_callback): Likewise.
4557 (linux_set_resume_request): Likewise.
4558 * server.c (accumulate_file_name_length): Likewise.
4559 (emit_dll_description): Likewise.
4560 (handle_qxfer_threads_worker): Likewise.
4561 (visit_actioned_threads): Likewise.
4562 * thread-db.c (any_thread_of): Likewise.
4563 * tracepoint.c (same_process_p): Likewise.
4564 (match_blocktype): Likewise.
4565 (build_traceframe_info_xml): Likewise.
4567 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4569 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4571 (gdb_unparse_agent_expr): Likewise.
4572 * hostio.c (require_data): Likewise.
4573 (handle_pread): Likewise.
4574 * linux-low.c (disable_regset): Likewise.
4575 (fetch_register): Likewise.
4576 (store_register): Likewise.
4577 (get_dynamic): Likewise.
4578 (linux_qxfer_libraries_svr4): Likewise.
4579 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4580 (set_fast_tracepoint_jump): Likewise.
4581 (uninsert_fast_tracepoint_jumps_at): Likewise.
4582 (reinsert_fast_tracepoint_jumps_at): Likewise.
4583 (validate_inserted_breakpoint): Likewise.
4584 (clone_agent_expr): Likewise.
4585 * regcache.c (init_register_cache): Likewise.
4586 * remote-utils.c (putpkt_binary_1): Likewise.
4587 (decode_M_packet): Likewise.
4588 (decode_X_packet): Likewise.
4589 (look_up_one_symbol): Likewise.
4590 (relocate_instruction): Likewise.
4591 (monitor_output): Likewise.
4592 * server.c (handle_search_memory): Likewise.
4593 (handle_qxfer_exec_file): Likewise.
4594 (handle_qxfer_libraries): Likewise.
4595 (handle_qxfer): Likewise.
4596 (handle_query): Likewise.
4597 (handle_v_cont): Likewise.
4598 (handle_v_run): Likewise.
4599 (captured_main): Likewise.
4600 * target.c (write_inferior_memory): Likewise.
4601 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4602 * tracepoint.c (init_trace_buffer): Likewise.
4603 (add_tracepoint_action): Likewise.
4604 (add_traceframe): Likewise.
4605 (add_traceframe_block): Likewise.
4606 (cmd_qtdpsrc): Likewise.
4607 (cmd_qtdv): Likewise.
4608 (cmd_qtstatus): Likewise.
4609 (response_source): Likewise.
4610 (response_tsv): Likewise.
4611 (cmd_qtnotes): Likewise.
4612 (gdb_collect): Likewise.
4613 (initialize_tracepoint): Likewise.
4615 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4617 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4618 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4619 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4621 (enum aarch64_condition_codes): New enum.
4622 (w0): New static global.
4625 (struct aarch64_memory_operand) <type>: New
4626 MEMORY_OPERAND_POSTINDEX type.
4627 (postindex_memory_operand): New helper function.
4628 (emit_ret): New function.
4629 (emit_load_store_pair): New function, factored out of emit_stp
4630 with support for MEMORY_OPERAND_POSTINDEX.
4631 (emit_stp): Rewrite using emit_load_store_pair.
4632 (emit_ldp): New function.
4633 (emit_load_store): Likewise.
4634 (emit_ldr): Mention post-index instruction in comment.
4635 (emit_ldrh): New function.
4636 (emit_ldrb): New function.
4637 (emit_ldrsw): Mention post-index instruction in comment.
4638 (emit_str): Likewise.
4639 (emit_subs): New function.
4640 (emit_cmp): Likewise.
4641 (emit_and): Likewise.
4642 (emit_orr): Likewise.
4643 (emit_orn): Likewise.
4644 (emit_eor): Likewise.
4645 (emit_mvn): Likewise.
4646 (emit_lslv): Likewise.
4647 (emit_lsrv): Likewise.
4648 (emit_asrv): Likewise.
4649 (emit_mul): Likewise.
4650 (emit_sbfm): Likewise.
4651 (emit_sbfx): Likewise.
4652 (emit_ubfm): Likewise.
4653 (emit_ubfx): Likewise.
4654 (emit_csinc): Likewise.
4655 (emit_cset): Likewise.
4656 (emit_nop): Likewise.
4657 (emit_ops_insns): New helper function.
4658 (emit_pop): Likewise.
4659 (emit_push): Likewise.
4660 (aarch64_emit_prologue): New function.
4661 (aarch64_emit_epilogue): Likewise.
4662 (aarch64_emit_add): Likewise.
4663 (aarch64_emit_sub): Likewise.
4664 (aarch64_emit_mul): Likewise.
4665 (aarch64_emit_lsh): Likewise.
4666 (aarch64_emit_rsh_signed): Likewise.
4667 (aarch64_emit_rsh_unsigned): Likewise.
4668 (aarch64_emit_ext): Likewise.
4669 (aarch64_emit_log_not): Likewise.
4670 (aarch64_emit_bit_and): Likewise.
4671 (aarch64_emit_bit_or): Likewise.
4672 (aarch64_emit_bit_xor): Likewise.
4673 (aarch64_emit_bit_not): Likewise.
4674 (aarch64_emit_equal): Likewise.
4675 (aarch64_emit_less_signed): Likewise.
4676 (aarch64_emit_less_unsigned): Likewise.
4677 (aarch64_emit_ref): Likewise.
4678 (aarch64_emit_if_goto): Likewise.
4679 (aarch64_emit_goto): Likewise.
4680 (aarch64_write_goto_address): Likewise.
4681 (aarch64_emit_const): Likewise.
4682 (aarch64_emit_call): Likewise.
4683 (aarch64_emit_reg): Likewise.
4684 (aarch64_emit_pop): Likewise.
4685 (aarch64_emit_stack_flush): Likewise.
4686 (aarch64_emit_zero_ext): Likewise.
4687 (aarch64_emit_swap): Likewise.
4688 (aarch64_emit_stack_adjust): Likewise.
4689 (aarch64_emit_int_call_1): Likewise.
4690 (aarch64_emit_void_call_2): Likewise.
4691 (aarch64_emit_eq_goto): Likewise.
4692 (aarch64_emit_ne_goto): Likewise.
4693 (aarch64_emit_lt_goto): Likewise.
4694 (aarch64_emit_le_goto): Likewise.
4695 (aarch64_emit_gt_goto): Likewise.
4696 (aarch64_emit_ge_got): Likewise.
4697 (aarch64_emit_ops_impl): New static global variable.
4698 (aarch64_emit_ops): New target function, return
4699 &aarch64_emit_ops_impl.
4700 (struct linux_target_ops): Install it.
4702 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4704 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4705 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4707 * linux-aarch64-ipa.c: New file.
4708 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4710 (aarch64_get_thread_area): New target method.
4711 (extract_signed_bitfield): New helper function.
4712 (aarch64_decode_ldr_literal): New function.
4713 (enum aarch64_opcodes): New enum.
4714 (struct aarch64_register): New struct.
4715 (struct aarch64_operand): New struct.
4716 (x0): New static global.
4725 (aarch64_register): New helper function.
4726 (register_operand): Likewise.
4727 (immediate_operand): Likewise.
4728 (struct aarch64_memory_operand): New struct.
4729 (offset_memory_operand): New helper function.
4730 (preindex_memory_operand): Likewise.
4731 (enum aarch64_system_control_registers): New enum.
4732 (ENCODE): New macro.
4733 (emit_insn): New helper function.
4734 (emit_b): New function.
4735 (emit_bcond): Likewise.
4736 (emit_cb): Likewise.
4737 (emit_tb): Likewise.
4738 (emit_blr): Likewise.
4739 (emit_stp): Likewise.
4740 (emit_ldp_q_offset): Likewise.
4741 (emit_stp_q_offset): Likewise.
4742 (emit_load_store): Likewise.
4743 (emit_ldr): Likewise.
4744 (emit_ldrsw): Likewise.
4745 (emit_str): Likewise.
4746 (emit_ldaxr): Likewise.
4747 (emit_stxr): Likewise.
4748 (emit_stlr): Likewise.
4749 (emit_data_processing_reg): Likewise.
4750 (emit_data_processing): Likewise.
4751 (emit_add): Likewise.
4752 (emit_sub): Likewise.
4753 (emit_mov): Likewise.
4754 (emit_movk): Likewise.
4755 (emit_mov_addr): Likewise.
4756 (emit_mrs): Likewise.
4757 (emit_msr): Likewise.
4758 (emit_sevl): Likewise.
4759 (emit_wfe): Likewise.
4760 (append_insns): Likewise.
4761 (can_encode_int32_in): New helper function.
4762 (aarch64_relocate_instruction): New function.
4763 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4764 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4765 (struct linux_target_ops): Install aarch64_get_thread_area,
4766 aarch64_install_fast_tracepoint_jump_pad and
4767 aarch64_get_min_fast_tracepoint_insn_len.
4769 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4771 * Makefile.in (aarch64-insn.o): New rule.
4772 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4774 2015-09-21 Yao Qi <yao.qi@linaro.org>
4776 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4778 2015-09-21 Yao Qi <yao.qi@linaro.org>
4780 * tracepoint.c (max_jump_pad_size): Remove.
4782 2015-09-18 Yao Qi <yao.qi@linaro.org>
4784 * linux-aarch64-low.c: Don't include sys/uio.h.
4785 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4787 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4789 * tracepoint.c (eval_result_type): Change prototype.
4790 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4792 2015-09-15 Pedro Alves <palves@redhat.com>
4794 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4795 Check whether to report exec events instead of checking whether
4796 multiprocess is enabled.
4798 2015-09-15 Pedro Alves <palves@redhat.com>
4801 * remote-utils.c (prepare_resume_reply): Merge
4802 TARGET_WAITKIND_VFORK_DONE switch case with the
4803 TARGET_WAITKIND_FORKED case.
4805 2015-09-15 Yao Qi <yao.qi@linaro.org>
4807 * server.c (handle_query): Check string comparison using
4808 "else if" instead of "if".
4810 2015-09-15 Yao Qi <yao.qi@linaro.org>
4812 * server.c (vCont_supported): New global variable.
4813 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4814 matches. Append ";vContSupported+" to own_buf.
4815 (handle_v_requests): Append ";s;S" to own_buf if target supports
4816 hardware single step or vCont_supported is false.
4817 (capture_main): Set vCont_supported to zero.
4819 2015-09-15 Yao Qi <yao.qi@linaro.org>
4821 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4823 (linux_supports_hardware_single_step): ... New function.
4824 (linux_target_ops): Update.
4825 * lynx-low.c (lynx_target_ops): Set field
4826 supports_hardware_single_step to target_can_do_hardware_single_step.
4827 * nto-low.c (nto_target_ops): Likewise.
4828 * spu-low.c (spu_target_ops): Likewise.
4829 * win32-low.c (win32_target_ops): Likewise.
4830 * target.c (target_can_do_hardware_single_step): New function.
4831 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4832 Remove. <supports_hardware_single_step>: New field.
4833 (target_supports_conditional_breakpoints): Remove.
4834 (target_supports_hardware_single_step): New macro.
4835 (target_can_do_hardware_single_step): Declare.
4836 * server.c (handle_query): Use target_supports_hardware_single_step
4837 instead of target_supports_conditional_breakpoints.
4839 2015-09-15 Yao Qi <yao.qi@linaro.org>
4841 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4843 (struct linux_target_ops the_low_target): Install
4844 aarch64_linux_siginfo_fixup.
4846 2015-09-11 Don Breazeal <donb@codesourcery.com>
4847 Luis Machado <lgustavo@codesourcery.com>
4849 * linux-low.c (linux_mourn): Static declaration.
4850 (linux_arch_setup): Move in front of
4851 handle_extended_wait.
4852 (linux_arch_setup_thread): New function.
4853 (handle_extended_wait): Handle exec events. Call
4854 linux_arch_setup_thread. Make event_lwp argument a
4855 pointer-to-a-pointer.
4856 (check_zombie_leaders): Do not check stopped threads.
4857 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4858 (linux_low_filter_event): Add lwp and thread for exec'ing
4859 non-leader thread if leader thread has been deleted.
4860 Refactor code into linux_arch_setup_thread and call it.
4861 Pass child lwp pointer by reference to handle_extended_wait.
4862 (linux_wait_for_event_filtered): Update comment.
4863 (linux_wait_1): Prevent clobbering exec event status.
4864 (linux_supports_exec_events): New function.
4865 (linux_target_ops) <supports_exec_events>: Initialize new member.
4866 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4868 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4869 * server.c (report_exec_events): New global variable.
4870 (handle_query): Handle qSupported query for exec-events feature.
4871 (captured_main): Initialize report_exec_events.
4872 * server.h (report_exec_events): Declare new global variable.
4873 * target.h (struct target_ops) <supports_exec_events>: New
4875 (target_supports_exec_events): New macro.
4876 * win32-low.c (win32_target_ops) <supports_exec_events>:
4877 Initialize new member.
4879 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4881 * linux-low.c (linux_low_enable_btrace): Remove.
4882 (linux_target_ops): Replace linux_low_enable_btrace with
4883 linux_enable_btrace.
4885 2015-09-03 Yao Qi <yao.qi@linaro.org>
4887 * linux-aarch64-low.c (aarch64_insert_point): Call
4888 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4891 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4893 * linux-low.c (check_stopped_by_breakpoint): Use
4894 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4896 2015-08-27 Pedro Alves <palves@redhat.com>
4898 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4900 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4902 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4903 the XNEW-family equivalent.
4904 (compile_bytecodes): Likewise.
4905 * dll.c (loaded_dll): Likewise.
4906 * event-loop.c (append_callback_event): Likewise.
4907 (create_file_handler): Likewise.
4908 (create_file_event): Likewise.
4909 * hostio.c (handle_open): Likewise.
4910 * inferiors.c (add_thread): Likewise.
4911 (add_process): Likewise.
4912 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4913 * linux-arm-low.c (arm_new_process): Likewise.
4914 (arm_new_thread): Likewise.
4915 * linux-low.c (add_to_pid_list): Likewise.
4916 (linux_add_process): Likewise.
4917 (handle_extended_wait): Likewise.
4918 (add_lwp): Likewise.
4919 (enqueue_one_deferred_signal): Likewise.
4920 (enqueue_pending_signal): Likewise.
4921 (linux_resume_one_lwp_throw): Likewise.
4922 (linux_resume_one_thread): Likewise.
4923 (linux_read_memory): Likewise.
4924 (linux_write_memory): Likewise.
4925 * linux-mips-low.c (mips_linux_new_process): Likewise.
4926 (mips_linux_new_thread): Likewise.
4927 (mips_add_watchpoint): Likewise.
4928 * linux-x86-low.c (initialize_low_arch): Likewise.
4929 * lynx-low.c (lynx_add_process): Likewise.
4930 * mem-break.c (set_raw_breakpoint_at): Likewise.
4931 (set_breakpoint): Likewise.
4932 (add_condition_to_breakpoint): Likewise.
4933 (add_commands_to_breakpoint): Likewise.
4934 (clone_agent_expr): Likewise.
4935 (clone_one_breakpoint): Likewise.
4936 * regcache.c (new_register_cache): Likewise.
4937 * remote-utils.c (look_up_one_symbol): Likewise.
4938 * server.c (queue_stop_reply): Likewise.
4939 (start_inferior): Likewise.
4940 (queue_stop_reply_callback): Likewise.
4941 (handle_target_event): Likewise.
4942 * spu-low.c (fetch_ppc_memory): Likewise.
4943 (store_ppc_memory): Likewise.
4944 * target.c (set_target_ops): Likewise.
4945 * thread-db.c (thread_db_load_search): Likewise.
4946 (try_thread_db_load_1): Likewise.
4947 * tracepoint.c (add_tracepoint): Likewise.
4948 (add_tracepoint_action): Likewise.
4949 (create_trace_state_variable): Likewise.
4950 (cmd_qtdpsrc): Likewise.
4951 (cmd_qtro): Likewise.
4952 (add_while_stepping_state): Likewise.
4953 * win32-low.c (child_add_thread): Likewise.
4954 (get_image_name): Likewise.
4956 2015-08-25 Yao Qi <yao.qi@linaro.org>
4958 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4960 2015-08-25 Yao Qi <yao.qi@linaro.org>
4962 * Makefile.in (aarch64-linux.o): New rule.
4963 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4965 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4966 (aarch64_init_debug_reg_state): Make it extern.
4967 (aarch64_linux_prepare_to_resume): Remove.
4969 2015-08-25 Yao Qi <yao.qi@linaro.org>
4971 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4972 lwp_arch_private_info and ptid_of_lwp.
4974 2015-08-25 Yao Qi <yao.qi@linaro.org>
4976 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4977 Find proc_info by find_process_pid. All callers updated.
4979 2015-08-25 Yao Qi <yao.qi@linaro.org>
4981 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4983 (debug_reg_change_callback): Remove.
4984 (aarch64_notify_debug_reg_change): Remove.
4986 2015-08-25 Yao Qi <yao.qi@linaro.org>
4988 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4989 Call current_lwp_ptid.
4991 2015-08-25 Yao Qi <yao.qi@linaro.org>
4993 * linux-aarch64-low.c (debug_reg_change_callback): Use
4996 2015-08-25 Yao Qi <yao.qi@linaro.org>
4998 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5000 2015-08-25 Yao Qi <yao.qi@linaro.org>
5002 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5004 2015-08-25 Yao Qi <yao.qi@linaro.org>
5006 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5009 2015-08-25 Yao Qi <yao.qi@linaro.org>
5011 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5013 (debug_reg_change_callback): Remove argument entry and add argument
5014 lwp. Remove local variable thread. Don't print thread id in the
5015 debugging output. Don't check whether pid of thread equals to pid.
5016 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5017 iterate_over_lwps instead find_inferior.
5019 2015-08-24 Pedro Alves <palves@redhat.com>
5021 * inferiors.c (get_first_process): New function.
5022 * inferiors.h (get_first_process): New declaration.
5023 * remote-utils.c (read_ptid): Default to the first process in the
5024 list, instead of to the current thread's process.
5026 2015-08-24 Pedro Alves <palves@redhat.com>
5028 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5029 * event-loop.c: Likewise.
5030 * remote-utils.c: Likewise.
5031 * tracepoint.c: Likewise.
5033 2015-08-24 Pedro Alves <palves@redhat.com>
5035 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5038 2015-08-21 Pedro Alves <palves@redhat.com>
5040 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5041 instead of literal 1.
5043 2015-08-21 Pedro Alves <palves@redhat.com>
5045 * tdesc.c (default_description): Explicitly zero-initialize.
5047 2015-08-21 Pedro Alves <palves@redhat.com>
5050 * inferiors.c (remove_thread): Discard any pending stop reply for
5052 * server.c (remove_all_on_match_pid): Rename to ...
5053 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5055 (discard_queued_stop_replies): Change parameter to a ptid. Now
5057 (handle_v_kill, kill_inferior_callback, captured_main)
5058 (process_serial_event): Adjust.
5059 * server.h (discard_queued_stop_replies): Declare.
5061 2015-08-21 Pedro Alves <palves@redhat.com>
5063 * linux-low.c (wait_for_sigstop): Always switch to no thread
5064 selected if the previously current thread dies.
5065 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5066 process instead of the current thread's.
5067 * remote-utils.c (input_interrupt): Don't check if there's no
5069 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5070 current thread to the general thread fails, error out.
5071 (handle_qxfer_auxv, handle_qxfer_libraries)
5072 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5073 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5074 (handle_query): Check if there's a thread selected instead of
5075 checking whether there's any thread in the thread list.
5076 (handle_qxfer_threads, handle_qxfer_btrace)
5077 (handle_qxfer_btrace_conf): Don't error out early if there's no
5078 thread in the thread list.
5079 (handle_v_cont, myresume): Don't set the current thread to the
5081 (process_serial_event) <Hg handling>: Also set thread_id if the
5082 previous general thread is still alive.
5083 (process_serial_event) <g/G handling>: If setting the current
5084 thread to the general thread fails, error out.
5085 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5086 thread's lwp instead of the current thread's.
5087 * target.c (set_desired_thread): If the desired thread was not
5088 found, leave the current thread pointing to NULL. Return an int
5089 (boolean) indicating success.
5090 * target.h (set_desired_thread): Change return type to int.
5092 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5094 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5095 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5097 (ps_get_thread_area): New function.
5099 2015-08-19 Gary Benson <gbenson@redhat.com>
5101 * hostio.c (handle_pread): Do not attempt to read more data
5102 than hostio_reply_with_data can fit in a packet.
5104 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5106 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5108 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5110 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5112 2015-08-06 Pedro Alves <palves@redhat.com>
5114 * tracepoint.c (expr_eval_result): Now an int.
5116 2015-08-06 Pedro Alves <palves@redhat.com>
5118 * gdbthread.h (struct regcache): Forward declare.
5119 (struct thread_info) <regcache_data>: Now a struct regcache
5121 * inferiors.c (inferior_regcache_data)
5122 (set_inferior_regcache_data): Now work with struct regcache
5124 * inferiors.h (struct regcache): Forward declare.
5125 (inferior_regcache_data, set_inferior_regcache_data): Now work
5126 with struct regcache pointers.
5127 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5128 (free_register_cache_thread): Remove struct regcache pointer
5131 2015-08-06 Pedro Alves <palves@redhat.com>
5133 * server.c (captured_main): On error, print the exception message
5134 to stderr, and if run_once is set, throw a quit.
5136 2015-08-06 Pedro Alves <palves@redhat.com>
5138 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5141 2015-08-06 Pedro Alves <palves@redhat.com>
5143 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5144 reading beyond the passed in buffer length.
5146 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5148 * tracepoint.c (symbol_list) <required>: Remove.
5150 2015-08-06 Pedro Alves <palves@redhat.com>
5152 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5153 count if stopping and suspending threads.
5154 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5155 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5156 (linux_detach): Complete an ongoing step-over.
5157 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5159 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5160 (linux_wait_1): If passing a signal to the inferior after
5161 finishing a step-over, unsuspend and re-resume all lwps. If we
5162 see a single-step event but the thread should be continuing, don't
5163 pass the trap to gdb.
5164 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5165 internal_error instead of gdb_assert.
5166 (enqueue_pending_signal): New function.
5167 (check_ptrace_stopped_lwp_gone): Add debug output.
5168 (start_step_over): Use internal_error instead of gdb_assert.
5169 (complete_ongoing_step_over): New function.
5170 (linux_resume_one_thread): Don't resume a suspended thread.
5171 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5174 2015-08-06 Pedro Alves <palves@redhat.com>
5176 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5177 (linux_thread_alive): Use lwp_is_marked_dead.
5178 (extended_event_reported): Delete.
5179 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5180 instead of extended_event_reported.
5181 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5183 (lwp_is_marked_dead): New function.
5184 (lwp_running): Use lwp_is_marked_dead.
5185 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5188 2015-08-06 Pedro Alves <palves@redhat.com>
5190 * linux-low.c (linux_wait_1): Move fork event output out of the
5191 !report_to_gdb check. Pass event_child->waitstatus to
5192 target_waitstatus_to_string instead of ourstatus.
5194 2015-08-04 Yao Qi <yao.qi@linaro.org>
5196 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5197 if current_thread is 32 bit.
5199 2015-08-04 Yao Qi <yao.qi@linaro.org>
5201 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5202 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5203 * server.c (extended_protocol): Remove "static".
5204 * server.h (extended_protocol): Declare it.
5206 2015-08-04 Yao Qi <yao.qi@linaro.org>
5208 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5209 both aarch64 and aarch32.
5210 (aarch64_set_pc): Likewise.
5212 2015-08-04 Yao Qi <yao.qi@linaro.org>
5214 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5215 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5216 arm-with-neon.xml to srv_xmlfiles.
5217 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5218 (is_64bit_tdesc): New function.
5219 (aarch64_linux_read_description): New function.
5220 (aarch64_arch_setup): Call aarch64_linux_read_description.
5221 (regs_info): Rename to regs_info_aarch64.
5222 (aarch64_regs_info): Return right regs_info.
5223 (initialize_low_arch): Call initialize_low_arch_aarch32.
5225 2015-08-04 Yao Qi <yao.qi@linaro.org>
5227 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5228 * linux-aarch32-low.c: New file.
5229 * linux-aarch32-low.h: New file.
5230 * linux-arm-low.c (arm_fill_gregset): Move it to
5231 linux-aarch32-low.c.
5232 (arm_store_gregset): Likewise.
5233 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5234 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5235 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5236 (regs_info): Rename to regs_info_arm.
5237 (arm_regs_info): Return regs_info_aarch32 if
5238 have_ptrace_getregset is 1 and target description is
5239 arm_with_neon or arm_with_vfpv3.
5240 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5241 Call initialize_low_arch_aarch32 instead.
5243 2015-08-04 Yao Qi <yao.qi@linaro.org>
5245 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5246 * linux-low.c: ... here.
5247 * linux-low.h (have_ptrace_getregset): Declare it.
5249 2015-08-04 Pedro Alves <palves@redhat.com>
5251 * thread-db.c (struct thread_db): Use new typedefs.
5252 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5254 (disable_thread_event_reporting): Cast result of dlsym to
5255 destination function pointer type.
5256 (thread_db_mourn): Use td_ta_delete_ftype.
5258 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5260 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5262 (CDX_BREAKPOINT): Define for R2.
5263 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5264 (the_low_target): Add comments.
5266 2015-07-30 Yao Qi <yao.qi@linaro.org>
5268 * linux-arm-low.c (arm_hwcap): Remove it.
5269 (arm_read_description): New local variable arm_hwcap. Don't
5270 set arm_hwcap to zero.
5272 2015-07-30 Yao Qi <yao.qi@linaro.org>
5274 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5275 Use regcache->tdesc instead.
5276 (arm_store_wmmxregset): Likewise.
5277 (arm_fill_vfpregset): Likewise.
5278 (arm_store_vfpregset): Likewise.
5280 2015-07-30 Yao Qi <yao.qi@linaro.org>
5282 * linux-arm-low.c: Include arch/arm.h.
5283 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5284 (arm_store_gregset): Likewise.
5286 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5288 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5289 ptrace's 4th parameter.
5291 2015-07-27 Yao Qi <yao.qi@linaro.org>
5293 * configure.srv (case aarch64*-*-linux*): Don't set
5296 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5298 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5300 * linux-arm-low.c: Likewise.
5301 * linux-cris-low.c: Likewise.
5302 * linux-crisv32-low.c: Likewise.
5303 * linux-low.c: Likewise.
5304 * linux-m68k-low.c: Likewise.
5305 * linux-mips-low.c: Likewise.
5306 * linux-nios2-low.c: Likewise.
5307 * linux-s390-low.c: Likewise.
5308 * linux-sparc-low.c: Likewise.
5309 * linux-tic6x-low.c: Likewise.
5310 * linux-tile-low.c: Likewise.
5311 * linux-x86-low.c: Likewise.
5313 2015-07-24 Pedro Alves <palves@redhat.com>
5315 * config.in: Regenerate.
5316 * configure: Regenerate.
5318 2015-07-24 Pedro Alves <palves@redhat.com>
5320 * acinclude.m4: Include ../ptrace.m4.
5321 * configure.ac: Call GDB_AC_PTRACE.
5322 * config.in, configure: Regenerate.
5324 2015-07-24 Yao Qi <yao.qi@linaro.org>
5326 * linux-low.c (linux_create_inferior): Remove setting to
5327 proc->priv->new_inferior.
5328 (linux_attach): Likewise.
5329 (linux_low_filter_event): Likewise.
5330 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5332 2015-07-24 Yao Qi <yao.qi@linaro.org>
5334 * linux-low.c (linux_arch_setup): New function.
5335 (linux_low_filter_event): If proc->tdesc is NULL and
5336 proc->attached is true, call the_low_target.arch_setup.
5337 Otherwise, keep status pending, and return.
5338 (linux_resume_one_lwp_throw): Don't call get_pc if
5339 thread->while_stepping isn't NULL. Don't call
5340 get_thread_regcache if proc->tdesc is NULL.
5341 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5342 (linux_target_ops): Install arch_setup.
5343 * server.c (start_inferior): Call the_target->arch_setup.
5344 * target.h (struct target_ops) <arch_setup>: New field.
5345 (target_arch_setup): New marco.
5346 * lynx-low.c (lynx_target_ops): Update.
5347 * nto-low.c (nto_target_ops): Update.
5348 * spu-low.c (spu_target_ops): Update.
5349 * win32-low.c (win32_target_ops): Update.
5351 2015-07-24 Yao Qi <yao.qi@linaro.org>
5353 * linux-low.c (linux_add_process): Don't set
5354 proc->priv->new_inferior.
5355 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5356 (linux_attach): Likewise.
5358 2015-07-24 Yao Qi <yao.qi@linaro.org>
5360 * server.c (start_inferior): Code refactor.
5362 2015-07-24 Yao Qi <yao.qi@linaro.org>
5364 * server.c (process_serial_event): Set general_thread.
5366 2015-07-21 Yao Qi <yao.qi@linaro.org>
5368 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5369 aarch64_linux_get_debug_reg_capacity.
5371 2015-07-17 Yao Qi <yao.qi@linaro.org>
5373 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5374 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5375 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5376 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5377 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5378 (AARCH64_HWP_ALIGNMENT): Likewise.
5379 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5380 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5381 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5382 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5383 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5384 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5385 (struct aarch64_debug_reg_state): Likewise.
5386 (struct arch_lwp_info): Likewise.
5387 (aarch64_align_watchpoint): Likewise.
5388 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5389 (aarch64_watchpoint_length): Likewise.
5390 (aarch64_point_encode_ctrl_reg): Likewise
5391 (aarch64_point_is_aligned): Likewise.
5392 (aarch64_align_watchpoint): Likewise.
5393 (aarch64_linux_set_debug_regs):
5394 (aarch64_dr_state_insert_one_point): Likewise.
5395 (aarch64_dr_state_remove_one_point): Likewise.
5396 (aarch64_handle_breakpoint): Likewise.
5397 (aarch64_handle_aligned_watchpoint): Likewise.
5398 (aarch64_handle_unaligned_watchpoint): Likewise.
5399 (aarch64_handle_watchpoint): Likewise.
5401 2015-07-17 Yao Qi <yao.qi@linaro.org>
5403 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5404 and don't aarch64_get_debug_reg_state. All callers update.
5405 (aarch64_handle_aligned_watchpoint): Likewise.
5406 (aarch64_handle_unaligned_watchpoint): Likewise.
5407 (aarch64_handle_watchpoint): Likewise.
5408 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5409 (aarch64_remove_point): Likewise.
5411 2015-07-17 Yao Qi <yao.qi@linaro.org>
5413 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5415 (aarch64_handle_unaligned_watchpoint): Likewise.
5417 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5419 Revert the previous 3 commits:
5420 Move gdb_regex* to common/
5421 Move linux_find_memory_regions_full & co.
5422 gdbserver build-id attribute generator
5424 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5425 Jan Kratochvil <jan.kratochvil@redhat.com>
5427 gdbserver build-id attribute generator.
5428 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5429 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5430 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5432 (get_dynamic): Use find_pdhr to traverse program headers.
5433 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5434 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5435 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5436 (get_hex_build_id): New.
5437 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5438 to reply XML document.
5440 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5441 Jan Kratochvil <jan.kratochvil@redhat.com>
5443 * target.c: Include target/target-utils.h and fcntl.h.
5444 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5445 (target_fileio_read_stralloc): New functions.
5447 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5449 * Makefile.in (OBS): Add gdb_regex.o.
5451 * config.in: Rebuilt.
5452 * configure: Rebuilt.
5454 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5455 Jan Kratochvil <jan.kratochvil@redhat.com>
5457 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5458 * Makefile.in (OBS): Add target-utils.o.
5459 (linux-maps.o, target-utils.o): New.
5460 * configure.srv (srv_linux_obj): Add linux-maps.o.
5462 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5464 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5466 (the_low_target): Install it.
5468 2015-07-14 Pedro Alves <palves@redhat.com>
5470 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5471 Instead, ignore ECHILD, and throw an error for other errnos.
5473 2015-07-10 Pedro Alves <palves@redhat.com>
5475 * event-loop.c (struct callback_event) <data>: Change type to
5476 gdb_client_data instance instead of gdb_client_data pointer.
5477 (append_callback_event): Adjust.
5479 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5481 * linux-aarch64-low.c: Add comments for each linux_target_ops
5482 method. Remove comments already covered in target_ops and
5483 linux_target_ops definitions.
5484 (the_low_target): Add comments for each unimplemented method.
5486 2015-07-09 Yao Qi <yao.qi@linaro.org>
5488 * linux-aarch64-low.c (aarch64_regmap): Remove.
5489 (aarch64_usrregs_info): Remove.
5490 (regs_info): Set field usrregs to NULL.
5492 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5494 * linux-low.c: Include "rsp-low.h"
5495 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5496 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5497 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5498 (handle_btrace_enable_pt): New.
5499 (handle_btrace_general_set): Support "pt".
5500 (handle_btrace_conf_general_set): Support "pt:size".
5502 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5504 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5507 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5509 * linux-aarch64-low.c: Remove comment about endianness.
5510 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5511 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5514 2015-06-24 Gary Benson <gbenson@redhat.com>
5516 * linux-i386-ipa.c (stdint.h): Do not include.
5517 * lynx-i386-low.c (stdint.h): Likewise.
5518 * lynx-ppc-low.c (stdint.h): Likewise.
5519 * mem-break.c (stdint.h): Likewise.
5520 * thread-db.c (stdint.h): Likewise.
5521 * tracepoint.c (stdint.h): Likewise.
5522 * win32-low.c (stdint.h): Likewise.
5524 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5526 * server.c (write_qxfer_response): Update call to
5527 remote_escape_output.
5529 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5530 Jan Kratochvil <jan.kratochvil@redhat.com>
5532 Merge multiple hex conversions.
5533 * gdbreplay.c (tohex): Rename to 'fromhex'.
5534 (logchar): Use fromhex.
5536 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5538 * server.c (handle_qxfer_libraries): Set `version' attribute for
5541 2015-06-10 Gary Benson <gbenson@redhat.com>
5543 * target.h (struct target_ops) <multifs_open>: New field.
5544 <multifs_unlink>: Likewise.
5545 <multifs_readlink>: Likewise.
5546 * linux-low.c (nat/linux-namespaces.h): New include.
5547 (linux_target_ops): Initialize the_target->multifs_open,
5548 the_target->multifs_unlink and the_target->multifs_readlink.
5549 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5550 * hostio.c (hostio_fs_pid): New static variable.
5551 (hostio_handle_new_gdb_connection): New function.
5552 (handle_setfs): Likewise.
5553 (handle_open): Use the_target->multifs_open as appropriate.
5554 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5555 (handle_readlink): Use the_target->multifs_readlink as
5557 (handle_vFile): Handle vFile:setfs packets.
5558 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5559 after target_handle_new_gdb_connection.
5561 2015-06-10 Gary Benson <gbenson@redhat.com>
5563 * configure.ac (AC_CHECK_FUNCS): Add setns.
5564 * config.in: Regenerate.
5565 * configure: Likewise.
5566 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5567 (linux-namespaces.o): New rule.
5568 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5570 2015-06-09 Gary Benson <gbenson@redhat.com>
5572 * hostio.c (handle_open): Process mode argument with
5573 fileio_to_host_mode.
5575 2015-06-01 Yao Qi <yao.qi@linaro.org>
5577 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5578 * linux-x86-low.c: Likewise.
5580 2015-05-28 Don Breazeal <donb@codesourcery.com>
5582 * linux-low.c (handle_extended_wait): Initialize
5583 thread_info.last_resume_kind for new fork children.
5585 2015-05-15 Pedro Alves <palves@redhat.com>
5587 * target.h (target_handle_new_gdb_connection): Rewrite using if
5588 wrapped in do/while.
5590 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5592 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5593 * configure, config.in: Regenerate.
5594 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5597 2015-05-12 Don Breazeal <donb@codesourcery.com>
5599 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5600 PTRACE_EVENT_VFORK_DONE.
5601 (linux_low_ptrace_options, extended_event_reported): Add vfork
5603 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5604 and "vforkdone" for RSP 'T' Stop Reply Packet.
5605 * server.h (report_vfork_events): Declare
5608 2015-05-12 Don Breazeal <donb@codesourcery.com>
5610 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5611 (the_low_target) <new_fork>: Initialize new member.
5612 * linux-arm-low.c (arm_new_fork): New function.
5613 (the_low_target) <new_fork>: Initialize new member.
5614 * linux-low.c (handle_extended_wait): Call new target function
5616 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5617 * linux-mips-low.c (mips_add_watchpoint): New function
5618 extracted from mips_insert_point.
5619 (the_low_target) <new_fork>: Initialize new member.
5620 (mips_linux_new_fork): New function.
5621 (mips_insert_point): Call mips_add_watchpoint.
5622 * linux-x86-low.c (x86_linux_new_fork): New function.
5623 (the_low_target) <new_fork>: Initialize new member.
5625 2015-05-12 Don Breazeal <donb@codesourcery.com>
5627 * linux-low.c (handle_extended_wait): Implement return value,
5628 rename argument 'event_child' to 'event_lwp', handle
5629 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5630 (linux_low_ptrace_options): New function.
5631 (linux_low_filter_event): Call linux_low_ptrace_options,
5632 use different argument fo linux_enable_event_reporting,
5633 use return value from handle_extended_wait.
5634 (extended_event_reported): New function.
5635 (linux_wait_1): Call extended_event_reported and set
5636 status to report fork events.
5637 (linux_write_memory): Add pid to debug message.
5638 (reset_lwp_ptrace_options_callback): New function.
5639 (linux_handle_new_gdb_connection): New function.
5640 (linux_target_ops): Initialize new structure member.
5641 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5642 * lynx-low.c: Initialize new structure member.
5643 * remote-utils.c (prepare_resume_reply): Implement stop reason
5644 "fork" for "T" stop message.
5645 * server.c (handle_query): Call handle_new_gdb_connection.
5646 * server.h (report_fork_events): Declare global flag.
5647 * target.h (struct target_ops) <handle_new_gdb_connection>:
5649 (target_handle_new_gdb_connection): New macro.
5650 * win32-low.c: Initialize new structure member.
5652 2015-05-12 Don Breazeal <donb@codesourcery.com>
5654 * mem-break.c (APPEND_TO_LIST): Define macro.
5655 (clone_agent_expr): New function.
5656 (clone_one_breakpoint): New function.
5657 (clone_all_breakpoints): New function.
5658 * mem-break.h: Declare new functions.
5660 2015-05-12 Don Breazeal <donb@codesourcery.com>
5662 * linux-low.c (linux_supports_fork_events): New function.
5663 (linux_supports_vfork_events): New function.
5664 (linux_target_ops): Initialize new structure members.
5665 (initialize_low): Call linux_check_ptrace_features.
5666 * lynx-low.c (lynx_target_ops): Initialize new structure
5668 * server.c (report_fork_events, report_vfork_events):
5670 (handle_query): Add new features to qSupported packet and
5672 (captured_main): Initialize new global variables.
5673 * target.h (struct target_ops) <supports_fork_events>:
5675 <supports_vfork_events>: New member.
5676 (target_supports_fork_events): New macro.
5677 (target_supports_vfork_events): New macro.
5678 * win32-low.c (win32_target_ops): Initialize new structure
5681 2015-05-12 Gary Benson <gbenson@redhat.com>
5683 * server.c (handle_qxfer_exec_file): Use current process
5686 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5688 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5689 Remove HAVE_PTRACE_GETREGS conditionals.
5690 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5691 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5693 2015-05-08 Yao Qi <yao.qi@linaro.org>
5695 * linux-low.c (linux_supports_conditional_breakpoints): New
5697 (linux_target_ops): Install new target method.
5698 * lynx-low.c (lynx_target_ops): Install NULL hook for
5699 supports_conditional_breakpoints.
5700 * nto-low.c (nto_target_ops): Likewise.
5701 * spu-low.c (spu_target_ops): Likewise.
5702 * win32-low.c (win32_target_ops): Likewise.
5703 * server.c (handle_query): Check
5704 target_supports_conditional_breakpoints.
5705 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5707 (target_supports_conditional_breakpoints): New macro.
5709 2015-05-06 Pedro Alves <palves@redhat.com>
5712 * server.c (start_inferior): If the process exits, mourn it.
5714 2015-04-21 Gary Benson <gbenson@redhat.com>
5716 * hostio.c (fileio_open_flags_to_host): Factored out to
5717 fileio_to_host_openflags in common/fileio.c. Single use
5720 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5722 * linux-xtensa-low.c (xtensa_fill_gregset)
5723 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5726 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5728 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5729 (regs_info): Replace usrregs pointer with NULL.
5731 2015-04-17 Gary Benson <gbenson@redhat.com>
5733 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5734 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5735 * server.c (handle_qxfer_exec_file): New function.
5736 (qxfer_packets): Add exec-file entry.
5737 (handle_query): Report qXfer:exec-file:read as supported packet.
5739 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5741 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5743 2015-04-09 Gary Benson <gbenson@redhat.com>
5745 * hostio-errno.c (errno_to_fileio_error): Remove function.
5746 Update caller to use remote_fileio_to_fio_error.
5748 2015-04-09 Yao Qi <yao.qi@linaro.org>
5750 * linux-low.c (linux_insert_point): Call
5751 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5752 (linux_remove_point): Call remove_memory_breakpoint if type is
5754 * linux-x86-low.c (x86_insert_point): Don't call
5755 insert_memory_breakpoint.
5756 (x86_remove_point): Don't call remove_memory_breakpoint.
5758 2015-04-01 Pedro Alves <palves@redhat.com>
5759 Cleber Rosa <crosa@redhat.com>
5761 * server.c (gdbserver_usage): Reorganize and extend the usage
5764 2015-03-24 Pedro Alves <palves@redhat.com>
5766 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5767 output. Also dump TRAP_TRACE.
5768 (linux_low_filter_event): In debug output, distinguish a
5769 resume_stop SIGSTOP from a delayed SIGSTOP.
5771 2015-03-24 Gary Benson <gbenson@redhat.com>
5773 * linux-x86-low.c (x86_linux_new_thread): Moved to
5775 (x86_linux_prepare_to_resume): Likewise.
5777 2015-03-24 Gary Benson <gbenson@redhat.com>
5779 * Makefile.in (x86-linux-dregs.o): New rule.
5780 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5781 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5782 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5783 (x86_linux_dr_get): Likewise.
5784 (x86_linux_dr_set): Likewise.
5785 (update_debug_registers_callback): Likewise.
5786 (x86_linux_dr_set_addr): Likewise.
5787 (x86_linux_dr_get_addr): Likewise.
5788 (x86_linux_dr_set_control): Likewise.
5789 (x86_linux_dr_get_control): Likewise.
5790 (x86_linux_dr_get_status): Likewise.
5791 (x86_linux_update_debug_registers): Likewise.
5793 2015-03-24 Gary Benson <gbenson@redhat.com>
5795 * linux-x86-low.c (x86_linux_update_debug_registers):
5796 New function, factored out from...
5797 (x86_linux_prepare_to_resume): ...this.
5799 2015-03-24 Gary Benson <gbenson@redhat.com>
5801 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5802 (x86_linux_dr_set): Likewise.
5803 (update_debug_registers_callback): Likewise.
5804 (x86_linux_dr_set_addr): Likewise.
5805 (x86_linux_dr_get_addr): Likewise.
5806 (x86_linux_dr_set_control): Likewise.
5807 (x86_linux_dr_get_control): Likewise.
5808 (x86_linux_dr_get_status): Likewise.
5809 (x86_linux_prepare_to_resume): Likewise.
5811 2015-03-24 Gary Benson <gbenson@redhat.com>
5813 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5814 Use perror_with_name. Pass string through gettext.
5815 (x86_linux_dr_set): Likewise.
5817 2015-03-24 Gary Benson <gbenson@redhat.com>
5819 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5820 (x86_linux_dr_set_addr): ...this.
5821 (x86_dr_low_get_addr): Rename to...
5822 (x86_linux_dr_get_addr): ...this.
5823 (x86_dr_low_set_control): Rename to...
5824 (x86_linux_dr_set_control): ...this.
5825 (x86_dr_low_get_control): Rename to...
5826 (x86_linux_dr_get_control): ...this.
5827 (x86_dr_low_get_status): Rename to...
5828 (x86_linux_dr_get_status): ...this.
5829 (x86_dr_low): Update with new function names.
5831 2015-03-24 Gary Benson <gbenson@redhat.com>
5833 * Makefile.in (x86-linux.o): New rule.
5834 * configure.srv: Add x86-linux.o to relevant targets.
5835 * linux-low.c (lwp_set_arch_private_info): New function.
5836 (lwp_arch_private_info): Likewise.
5837 * linux-x86-low.c: Include nat/x86-linux.h.
5838 (arch_lwp_info): Removed structure.
5839 (update_debug_registers_callback):
5840 Use lwp_set_debug_registers_changed.
5841 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5842 and lwp_set_debug_registers_changed.
5843 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5845 2015-03-24 Gary Benson <gbenson@redhat.com>
5847 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5848 * linux-arm-low.c (arm_new_thread): Likewise.
5849 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5850 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5851 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5852 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5854 2015-03-24 Gary Benson <gbenson@redhat.com>
5856 * linux-low.c (ptid_of_lwp): New function.
5857 (lwp_is_stopped): Likewise.
5858 (lwp_stop_reason): Likewise.
5859 * linux-x86-low.c (update_debug_registers_callback):
5861 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5864 2015-03-24 Gary Benson <gbenson@redhat.com>
5866 * linux-low.h (linux_stop_lwp): Remove declaration.
5868 2015-03-24 Gary Benson <gbenson@redhat.com>
5870 * linux-low.h: Include nat/linux-nat.h.
5871 * linux-low.c (iterate_over_lwps_args): New structure.
5872 (iterate_over_lwps_filter): New function.
5873 (iterate_over_lwps): Likewise.
5874 * linux-x86-low.c (update_debug_registers_callback):
5875 Update signature to what iterate_over_lwps expects.
5876 Remove PID check that iterate_over_lwps now performs.
5877 (x86_dr_low_set_addr): Use iterate_over_lwps.
5878 (x86_dr_low_set_control): Likewise.
5880 2015-03-24 Gary Benson <gbenson@redhat.com>
5882 * linux-x86-low.c (x86_debug_reg_state): New function.
5883 (x86_linux_prepare_to_resume): Use the above.
5885 2015-03-24 Gary Benson <gbenson@redhat.com>
5887 * linux-low.c (current_lwp_ptid): New function.
5888 * linux-x86-low.c: Include nat/linux-nat.h.
5889 (x86_dr_low_get_addr): Use current_lwp_ptid.
5890 (x86_dr_low_get_control): Likewise.
5891 (x86_dr_low_get_status): Likewise.
5893 2015-03-20 Pedro Alves <palves@redhat.com>
5895 * tracepoint.c (cmd_qtstatus): Make "str" const.
5897 2015-03-20 Pedro Alves <palves@redhat.com>
5899 * server.c (handle_general_set): Make "req_str" const.
5901 2015-03-19 Pedro Alves <palves@redhat.com>
5903 * linux-low.c (linux_resume_one_lwp): Rename to ...
5904 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5905 instead call perror_with_name.
5906 (check_ptrace_stopped_lwp_gone): New function.
5907 (linux_resume_one_lwp): Reimplement as wrapper around
5908 linux_resume_one_lwp_throw that swallows errors if the LWP is
5911 2015-03-19 Pedro Alves <palves@redhat.com>
5913 * linux-low.c (count_events_callback, select_event_lwp_callback):
5914 No longer check whether the thread has resume_stop as last resume
5917 2015-03-19 Pedro Alves <palves@redhat.com>
5919 * linux-low.c (count_events_callback, select_event_lwp_callback):
5920 Use the lwp's status_pending_p field, not the thread's.
5922 2015-03-19 Pedro Alves <palves@redhat.com>
5924 * linux-low.c (select_event_lwp_callback): Update comments to
5925 no longer mention SIGTRAP.
5927 2015-03-18 Gary Benson <gbenson@redhat.com>
5929 * server.c (handle_query): Do not report vFile:fstat as supported.
5931 2015-03-11 Gary Benson <gbenson@redhat.com>
5933 * hostio.c (sys/types.h): New include.
5934 (sys/stat.h): Likewise.
5935 (common-remote-fileio.h): Likewise.
5936 (handle_fstat): New function.
5937 (handle_vFile): Handle vFile:fstat packets.
5939 2015-03-11 Gary Benson <gbenson@redhat.com>
5941 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5942 struct stat.st_blocks and struct stat.st_blksize.
5943 * configure: Regenerate.
5944 * config.in: Likewise.
5945 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5946 (OBS): Add common-remote-fileio.o.
5947 (common-remote-fileio.o): New rule.
5949 2015-03-09 Pedro Alves <palves@redhat.com>
5951 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5952 'struct sockaddr' pointer in 'accept' call.
5954 2015-03-09 Pedro Alves <palves@redhat.com>
5957 2015-03-07 Pedro Alves <palves@redhat.com>
5958 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5959 or <winsock2.h> here. Instead include "gdb_socket.h".
5960 (remote_open): Use union gdb_sockaddr_u.
5961 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5962 or <winsock2.h> here. Instead include "gdb_socket.h".
5963 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5964 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5966 (init_named_socket, gdb_agent_helper_thread): Use union
5969 2015-03-07 Pedro Alves <palves@redhat.com>
5971 * configure.ac (build_warnings): Move
5972 -Wdeclaration-after-statement to the C-specific set.
5973 * configure: Regenerate.
5975 2015-03-07 Pedro Alves <palves@redhat.com>
5977 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5978 or <winsock2.h> here. Instead include "gdb_socket.h".
5979 (remote_open): Use union gdb_sockaddr_u.
5980 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5981 or <winsock2.h> here. Instead include "gdb_socket.h".
5982 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5983 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5985 (init_named_socket, gdb_agent_helper_thread): Use union
5988 2015-03-07 Pedro Alves <palves@redhat.com>
5990 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5993 2015-03-06 Yao Qi <yao.qi@linaro.org>
5995 * linux-aarch64-low.c (aarch64_insert_point): Use
5996 show_debug_regs as a boolean.
5997 (aarch64_remove_point): Likewise.
5999 2015-03-05 Pedro Alves <palves@redhat.com>
6001 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6002 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6003 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6004 * nto-low.c (nto_target_ops): Likewise.
6005 * spu-low.c (spu_target_ops): Likewise.
6006 * win32-low.c (win32_target_ops): Likewise.
6008 2015-03-04 Pedro Alves <palves@redhat.com>
6010 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6011 Decide whether a breakpoint triggered based on the SIGTRAP's
6013 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6014 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6015 (linux_low_filter_event): Check for breakpoints before checking
6017 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6019 (linux_stopped_by_sw_breakpoint)
6020 (linux_supports_stopped_by_sw_breakpoint)
6021 (linux_stopped_by_hw_breakpoint)
6022 (linux_supports_stopped_by_hw_breakpoint): New functions.
6023 (linux_target_ops): Install new target methods.
6025 2015-03-04 Pedro Alves <palves@redhat.com>
6027 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6028 * server.c (swbreak_feature, hwbreak_feature): New globals.
6029 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6030 (captured_main): Clear swbreak_feature and hwbreak_feature.
6031 * server.h (swbreak_feature, hwbreak_feature): Declare.
6032 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6033 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6034 supports_stopped_by_hw_breakpoint>: New fields.
6035 (target_supports_stopped_by_sw_breakpoint)
6036 (target_stopped_by_sw_breakpoint)
6037 (target_supports_stopped_by_hw_breakpoint)
6038 (target_stopped_by_hw_breakpoint): Declare.
6040 2015-03-04 Pedro Alves <palves@redhat.com>
6042 enum lwp_stop_reason -> enum target_stop_reason
6043 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6044 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6045 (linux_wait_1, stuck_in_jump_pad_callback)
6046 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6047 (linux_stopped_by_watchpoint):
6048 * linux-low.h (enum lwp_stop_reason): Delete.
6049 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6050 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6052 2015-03-04 Yao Qi <yao.qi@linaro.org>
6054 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6056 2015-03-03 Gary Benson <gbenson@redhat.com>
6058 * hostio.c (handle_vFile): Fix prefix lengths.
6060 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6062 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6065 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6067 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6068 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6069 (clean): Add "rm -f" for above C files.
6070 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6071 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6072 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6073 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6074 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6075 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6076 (init_registers_s390x_vx_linux64)
6077 (init_registers_s390x_tevx_linux64)
6078 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6079 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6081 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6082 (s390_store_vxrs_high): New functions.
6083 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6085 (s390_arch_setup): Add logic for selecting one of the new target
6086 descriptions. Activate the new vector regsets if applicable.
6087 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6088 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6089 and init_registers_s390x_tevx_linux64.
6091 2015-03-01 Pedro Alves <palves@redhat.com>
6093 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6096 2015-02-27 Pedro Alves <palves@redhat.com>
6098 * linux-x86-low.c (u_debugreg_offset): New function.
6099 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6101 2015-02-27 Pedro Alves <palves@redhat.com>
6103 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6104 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6105 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6106 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6107 (ps_lsetfpregs, ps_getpid)
6108 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6109 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6110 (ps_lsetxregs, ps_plog): Declare.
6112 2015-02-27 Pedro Alves <palves@redhat.com>
6114 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6115 IP_AGENT_EXPORT_FUNC.
6116 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6117 IP_AGENT_EXPORT_FUNC.
6118 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6119 (IP_AGENT_EXPORT): Delete.
6120 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6121 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6122 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6123 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6124 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6125 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6126 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6127 (traceframe_read_count, traceframe_write_count)
6128 (traceframes_created, trace_state_variables, get_raw_reg)
6129 (get_trace_state_variable_value, set_trace_state_variable_value)
6130 (ust_loaded, helper_thread_id, cmd_buf): Use
6131 IPA_SYM_EXPORTED_NAME.
6132 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6133 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6134 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6135 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6136 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6137 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6138 EXTERN_C_PUSH/EXTERN_C_POP.
6139 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6140 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6141 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6142 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6143 (traceframe_write_count, traceframe_read_count)
6144 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6145 (about_to_request_buffer_space, get_trace_state_variable_value)
6146 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6147 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6148 EXTERN_C_PUSH/EXTERN_C_POP.
6149 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6150 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6151 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6152 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6153 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6154 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6155 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6156 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6158 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6159 (IP_AGENT_EXPORT_VAR_DECL): Define.
6161 (gdb_agent_get_raw_reg): Declare.
6163 2015-02-27 Tom Tromey <tromey@redhat.com>
6164 Pedro Alves <palves@redhat.com>
6166 Rename symbols whose names are reserved C++ keywords throughout.
6168 2015-02-27 Pedro Alves <palves@redhat.com>
6170 * Makefile.in (COMPILER): New, get it from autoconf.
6171 (CXX): Get from autoconf instead.
6172 (COMPILE.pre): Use COMPILER.
6173 (CC-LD): Rename to ...
6174 (CC_LD): ... this. Use COMPILER.
6175 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6176 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6177 * acinclude.m4: Include build-with-cxx.m4.
6178 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6179 Disable -Werror by default if building in C++ mode.
6180 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6181 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6182 the C++ compiler. Save/restore CXXFLAGS too.
6183 * configure: Regenerate.
6185 2015-02-27 Pedro Alves <palves@redhat.com>
6187 * acinclude.m4: Include libiberty.m4.
6188 * configure.ac: Call libiberty_INIT.
6189 * config.in, configure: Regenerate.
6191 2015-02-26 Pedro Alves <palves@redhat.com>
6193 * linux-low.c (linux_wait_1): When incrementing the PC past a
6194 program breakpoint always use the_low_target.breakpoint_len as
6195 increment, rather than the maximum between that and
6196 the_low_target.decr_pc_after_break.
6198 2015-02-23 Pedro Alves <palves@redhat.com>
6200 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6201 thread was doing a step-over; always adjust the PC if
6202 we stepped over a permanent breakpoint.
6203 (linux_wait_1): If we stepped over breakpoint that was on top of a
6204 permanent breakpoint, manually advance the PC past it.
6206 2015-02-23 Pedro Alves <palves@redhat.com>
6208 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6210 (x86_fill_gregset, x86_store_gregset): Use it when handling
6213 2015-02-20 Pedro Alves <palves@redhat.com>
6215 * thread-db.c: Include "nat/linux-procfs.h".
6216 (thread_db_init): Skip listing new threads if the kernel supports
6217 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6219 2015-02-20 Pedro Alves <palves@redhat.com>
6221 * linux-low.c (status_pending_p_callback): Use ptid_match.
6223 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6225 PR breakpoints/16812
6226 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6227 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6228 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6230 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6232 PR breakpoints/15956
6233 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6235 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6237 * linux-low.c (linux_low_btrace_conf): Print size.
6238 * server.c (handle_btrace_conf_general_set): New.
6239 (hanle_general_set): Call handle_btrace_conf_general_set.
6240 (handle_query): Report Qbtrace-conf:bts:size as supported.
6242 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6244 * linux-low.c (linux_low_enable_btrace): Update parameters.
6245 (linux_low_btrace_conf): New.
6246 (linux_target_ops)<to_btrace_conf>: Initialize.
6247 * server.c (current_btrace_conf): New.
6248 (handle_btrace_enable): Rename to ...
6249 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
6250 to target_enable_btrace. Update comment. Update users.
6251 (handle_qxfer_btrace_conf): New.
6252 (qxfer_packets): Add btrace-conf entry.
6253 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6254 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6255 (target_ops)<read_btrace_conf>: New.
6256 (target_enable_btrace): Update parameters.
6257 (target_read_btrace_conf): New.
6259 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6261 * server.c (handle_btrace_general_set): Remove call to
6262 target_supports_btrace.
6263 (supported_btrace_packets): New.
6264 (handle_query): Call supported_btrace_packets.
6265 * target.h: include btrace-common.h.
6266 (btrace_target_info): Removed.
6267 (supports_btrace, target_supports_btrace): Update parameters.
6269 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6271 * Makefile.in (SFILES): Add common/btrace-common.c.
6272 (OBS): Add common/btrace-common.o.
6273 (btrace-common.o): Add build rules.
6274 * linux-low: Include btrace-common.h.
6275 (linux_low_read_btrace): Use struct btrace_data. Call
6276 btrace_data_init and btrace_data_fini.
6278 2015-02-06 Pedro Alves <palves@redhat.com>
6280 * thread-db.c (find_new_threads_callback): Add debug output.
6282 2015-02-04 Pedro Alves <palves@redhat.com>
6284 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6285 (resume_stopped_resumed_lwps): New function.
6286 (linux_wait_for_event_filtered): Use it.
6288 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6290 * Makefile.in (SFILES): Add linux-personality.c.
6291 (linux-personality.o): New rule.
6292 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6293 list of objects to be built.
6294 * linux-low.c: Include nat/linux-personality.h.
6295 (linux_create_inferior): Remove code to disable address space
6296 randomization (moved to ../nat/linux-personality.c). Create
6297 cleanup to disable address space randomization.
6299 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6301 * Makefile.in (posix-strerror.o): New rule.
6302 (mingw-strerror.o): Likewise.
6303 * configure: Regenerated.
6304 * configure.ac: Source file ../common/common.host. Initialize new
6305 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6307 2015-01-14 Yao Qi <yao@codesourcery.com>
6309 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6310 (ppc-linux.o): New rule.
6311 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6312 * configure.ac: AC_CHECK_FUNCS(getauxval).
6313 * config.in: Re-generated.
6314 * configure: Re-generated.
6315 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6316 ppc64_64bit_inferior_p
6318 2015-01-14 Yao Qi <yao@codesourcery.com>
6320 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6321 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6322 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6323 (PT_ORIG_R3, PT_TRAP): Likewise.
6324 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6325 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6326 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6328 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6330 * i387-fp.c (i387_cache_to_xsave): In look over
6331 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6332 zmmh_low_space field by use of zmmh_high_space.
6334 2015-01-09 Pedro Alves <palves@redhat.com>
6336 * linux-low.c (step_over_bkpt): Move higher up in the file.
6337 (handle_extended_wait): Don't store the stop_pc here.
6338 (get_stop_pc): Adjust comments and rename to ...
6339 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6340 stopped for a software breakpoint or hardware breakpoint.
6341 (thread_still_has_status_pending_p): New function.
6342 (status_pending_p_callback): Use
6343 thread_still_has_status_pending_p. If the event is no longer
6344 interesting, resume the LWP.
6345 (handle_tracepoints): Add assert.
6346 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6347 (wstatus_maybe_breakpoint): New function.
6348 (cancel_breakpoint): Delete function.
6349 (check_stopped_by_watchpoint): New function, factored out from
6350 linux_low_filter_event.
6351 (lp_status_maybe_breakpoint): Delete function.
6352 (linux_low_filter_event): Remove filter_ptid argument.
6353 Leave thread group exits pending here. Store the LWP's stop PC.
6354 Always leave events pending.
6355 (linux_wait_for_event_filtered): Pull all events out of the
6356 kernel, and leave them all pending.
6357 (count_events_callback, select_event_lwp_callback): Consider all
6359 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6360 (select_event_lwp): Only give preference to the stepping LWP in
6361 all-stop mode. Adjust comments.
6362 (ignore_event): New function.
6363 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6364 references to cancel_breakpoints. Adjust to renames. Also give
6365 equal priority to all LWPs that have had events in non-stop mode.
6366 If reporting a software breakpoint event, unadjust the LWP's PC.
6367 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6368 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6370 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6371 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6372 (linux_stopped_by_watchpoint): Adjust.
6373 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6374 * linux-low.h (enum lwp_stop_reason): New.
6375 (struct lwp_info) <stop_pc>: Adjust comment.
6376 <stopped_by_watchpoint>: Delete field.
6377 <stop_reason>: New field.
6378 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6379 * mem-break.c (software_breakpoint_inserted_here)
6380 (hardware_breakpoint_inserted_here): New function.
6381 * mem-break.h (software_breakpoint_inserted_here)
6382 (hardware_breakpoint_inserted_here): Declare.
6383 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6384 (cancel_breakpoints): Delete.
6385 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6386 (upload_fast_traceframes): Remove references to
6389 2015-01-09 Pedro Alves <palves@redhat.com>
6391 * thread-db.c (find_new_threads_callback): Ignore thread if the
6392 kernel thread ID is -1.
6394 2015-01-09 Pedro Alves <palves@redhat.com>
6396 * linux-low.c (linux_attach_fail_reason_string): Move to
6397 nat/linux-ptrace.c, and rename.
6398 (linux_attach_lwp): Update comment.
6399 (attach_proc_task_lwp_callback): New function.
6400 (linux_attach): Adjust to rename and use
6401 linux_proc_attach_tgid_threads.
6402 (linux_attach_fail_reason_string): Delete declaration.
6404 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6406 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6407 * server.c (gdbserver_version): Likewise.
6409 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6411 * remote-utils.c: Include ctype.h.
6412 (input_interrupt): Explicitly handle the case when the char
6413 received is the NUL byte. Improve the printing of non-ASCII
6416 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6418 * linux-low.c (linux_low_filter_event): Update call to
6419 linux_enable_event_reporting following the addition of
6420 a new parameter to that function.
6422 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6425 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6426 (AARCH64_FPCR_REGNO): Likewise.
6427 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6428 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6429 (aarch64_store_fpregset): Likewise.
6431 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6433 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6434 Remove FIXME comment about assumption about N.
6436 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6438 * configure.ac: If large-file support is disabled in GDBserver,
6439 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6440 * configure: Regenerate.
6442 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6444 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6445 warning upon ENODATA from ptrace.
6446 * linux-s390-low.c (s390_store_tdb): New.
6447 (s390_regsets): Add regset for NT_S390_TDB.
6449 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6451 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6452 without a fill_function.
6453 * linux-s390-low.c (s390_fill_last_break): Remove.
6454 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6455 (s390_arch_setup): Use regset's size instead of fill_function for
6458 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6460 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6461 the regset's store function when ptrace returned an error.
6462 * regcache.c (get_thread_regcache): Invalidate register cache
6463 before fetching inferior's registers.
6465 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6467 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6468 while-loop as for-loop.
6469 (regsets_store_inferior_registers): Likewise.
6471 2014-11-28 Yao Qi <yao@codesourcery.com>
6473 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6474 * config.in, configure: Re-generate.
6475 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6478 2014-11-21 Yao Qi <yao@codesourcery.com>
6480 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6481 (AC_CHECK_HEADERS): Remove malloc.h.
6482 * configure: Re-generated.
6483 * config.in: Re-generated.
6484 * server.h: Don't include alloca.h and malloc.h.
6485 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6486 Don't include malloc.h.
6488 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6490 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6491 corresponding ERRNO check in same block.
6493 2014-11-12 Pedro Alves <palves@redhat.com>
6495 * server.c (cont_thread): Update comment.
6496 (start_inferior, attach_inferior): No longer clear cont_thread.
6497 (handle_v_cont): No longer set cont_thread.
6498 (captured_main): Clear cont_thread each time a GDB connects.
6500 2014-11-12 Pedro Alves <palves@redhat.com>
6502 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6503 thread, and don't resume all threads if the Hc thread has exited.
6505 2014-11-12 Pedro Alves <palves@redhat.com>
6507 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6508 the process group instead of to a specific LWP.
6510 2014-10-15 Pedro Alves <palves@redhat.com>
6513 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6515 (arm_set_thread_context): Delete.
6516 (the_low_target): Adjust.
6517 * win32-i386-low.c (debug_registers_changed)
6518 (debug_registers_used): Delete.
6519 (update_debug_registers_callback): New function.
6520 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6521 needing to update their debug registers.
6522 (win32_get_current_dr): New function.
6523 (x86_dr_low_get_addr, x86_dr_low_get_control)
6524 (x86_dr_low_get_status): Fetch the debug register from the thread
6526 (i386_initial_stuff): Adjust.
6527 (i386_get_thread_context): Remove current_event parameter. Don't
6528 clear debug_registers_changed nor copy DR values to
6530 (i386_set_thread_context): Delete.
6531 (i386_prepare_to_resume): New function.
6532 (i386_thread_added): Mark the thread as needing to update irs
6534 (the_low_target): Remove i386_set_thread_context and install
6535 i386_prepare_to_resume.
6536 * win32-low.c (win32_get_thread_context): Adjust.
6537 (win32_set_thread_context): Use SetThreadContext
6539 (win32_prepare_to_resume): New function.
6540 (win32_require_context): New function, factored out from ...
6541 (thread_rec): ... this.
6542 (continue_one_thread): Call win32_prepare_to_resume on each thread
6543 we're about to continue.
6544 (win32_resume): Call win32_prepare_to_resume on the event thread.
6545 * win32-low.h (struct win32_thread_info)
6546 <debug_registers_changed>: New field.
6547 (struct win32_target_ops): Change prototype of set_thread_context,
6548 delete set_thread_context and add prepare_to_resume.
6549 (win32_require_context): New declaration.
6551 2014-10-08 Gary Benson <gbenson@redhat.com>
6553 * server.h: Do not include common-exceptions.h.
6555 2014-10-08 Gary Benson <gbenson@redhat.com>
6557 * server.h: Do not include cleanups.h.
6559 2014-09-30 James Hogan <james.hogan@imgtec.com>
6561 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6564 2014-09-23 Yao Qi <yao@codesourcery.com>
6566 * linux-low.c (lp_status_maybe_breakpoint): New function.
6567 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6568 (count_events_callback): Likewise.
6569 (select_event_lwp_callback): Likewise.
6570 (cancel_breakpoints_callback): Likewise.
6572 2014-09-19 Don Breazeal <donb@codesourcery.com>
6574 * linux-low.c (handle_extended_wait): Call
6575 linux_ptrace_get_extended_event.
6576 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6577 linux_is_extended_waitstatus.
6579 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6581 * Makefile.in (CPPFLAGS): Define.
6582 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6583 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6585 2014-09-16 Gary Benson <gbenson@redhat.com>
6587 * inferiors.h (current_inferior): Renamed as...
6588 (current_thread): New variable. All uses updated.
6589 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6590 (maybe_move_out_of_jump_pad): Likewise.
6591 (cancel_breakpoint): Likewise.
6592 (linux_low_filter_event): Likewise.
6593 (wait_for_sigstop): Likewise.
6594 (linux_resume_one_lwp): Likewise.
6595 (need_step_over_p): Likewise.
6596 (start_step_over): Likewise.
6597 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6598 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6599 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6600 and save_inferior as saved_thread.
6601 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6603 (regcache_invalidate_thread): Likewise.
6604 * remote-utils.c (prepare_resume_reply): Likewise.
6605 * thread-db.c (thread_db_get_tls_address): Likewise.
6606 (disable_thread_event_reporting): Likewise.
6607 (remove_thread_event_breakpoints): Likewise.
6608 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6610 * target.h (set_desired_inferior): Renamed as...
6611 (set_desired_thread): New declaration. All uses updated.
6612 * server.c (myresume): Updated comment to reference thread instead
6614 (handle_serial_event): Likewise.
6615 (handle_target_event): Likewise.
6617 2014-09-12 Tom Tromey <tromey@redhat.com>
6618 Gary Benson <gbenson@redhat.com>
6620 * regcache.h: Include common-regcache.h.
6621 (regcache_read_pc): Don't declare.
6622 * regcache.c (get_thread_regcache_for_ptid): New function.
6624 2014-09-11 Tom Tromey <tromey@redhat.com>
6625 Gary Benson <gbenson@redhat.com>
6627 * symbol.c: New file.
6628 * Makefile.in (SFILES): Add symbol.c.
6629 (OBS): Add symbol.o.
6631 2014-09-11 Gary Benson <gbenson@redhat.com>
6633 * target.c (target_stop_ptid, target_continue_ptid): New
6636 2014-09-11 Tom Tromey <tromey@redhat.com>
6637 Gary Benson <gbenson@redhat.com>
6639 * target.h: Include target/target.h.
6640 * target.c (target_read_memory, target_read_uint32)
6641 (target_write_memory): New functions.
6643 2014-09-11 Gary Benson <gbenson@redhat.com>
6645 * server.h (debug_hw_points): Don't declare.
6646 * server.c (debug_hw_points): Don't define. Replace all uses
6647 with show_debug_regs.
6648 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6649 all uses with show_debug_regs.
6651 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6653 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6654 endianness into account.
6655 (ppc_supply_ptrace_register): Likewise.
6657 2014-09-03 James Hogan <james.hogan@imgtec.com>
6659 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6660 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6662 2014-09-03 Gary Benson <gbenson@redhat.com>
6664 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6665 ALL_DEBUG_ADDRESS_REGISTERS.
6667 2014-09-02 Gary Benson <gbenson@redhat.com>
6669 * i386-low.h: Renamed as...
6670 * x86-low.h: New file. All type, function and variable name
6671 prefixes changed from "i386_" to "x86_". All references updated.
6672 * i386-low.c: Renamed as...
6673 * x86-low.c: New file. All type, function and variable name
6674 prefixes changed from "i386_" to "x86_". All references updated.
6676 2014-09-02 Gary Benson <gbenson@redhat.com>
6678 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6679 (x86_linux_new_thread): Likewise.
6681 2014-08-29 Gary Benson <gbenson@redhat.com>
6683 * server.h (setjmp.h): Do not include.
6684 (toplevel): Do not declare.
6685 (common-exceptions.h): Include.
6686 (cleanups.h): Likewise.
6687 * server.c (toplevel): Do not define.
6688 (exit_code): New static global.
6689 (detach_or_kill_for_exit_cleanup): New function.
6690 (main): New function. Original main renamed to...
6691 (captured_main): New function.
6692 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6694 2014-08-29 Gary Benson <gbenson@redhat.com>
6696 * Makefile.in (SFILES): Add common/common-exceptions.c.
6697 (OBS): Add common-exceptions.o.
6698 (common-exceptions.o): New rule.
6699 * utils.c (prepare_to_throw_exception): New function.
6701 2014-08-29 Gary Benson <gbenson@redhat.com>
6703 * config.in: Regenerate.
6704 * configure: Likewise.
6706 2014-08-29 Gary Benson <gbenson@redhat.com>
6708 * Makefile.in (SFILES): Add common/cleanups.c.
6710 (cleanups.o): New rule.
6712 2014-08-29 Gary Benson <gbenson@redhat.com>
6714 * utils.c (internal_vwarning): New function.
6716 2014-08-28 Gary Benson <gbenson@redhat.com>
6718 * utils.h (fatal): Remove declaration.
6719 * utils.c (fatal): Remove function.
6721 2014-08-28 Gary Benson <gbenson@redhat.com>
6723 * tracepoint.c (gdb_agent_init): Replace fatal with
6725 (initialize_tracepoint): Likewise.
6727 2014-08-28 Gary Benson <gbenson@redhat.com>
6729 * remote-utils.c (remote_prepare): Replace fatal with error.
6731 2014-08-28 Gary Benson <gbenson@redhat.com>
6733 * linux-low.c (linux_async): Replace fatal with warning.
6735 (linux_start_non_stop): Return -1 if linux_async failed.
6737 2014-08-28 Gary Benson <gbenson@redhat.com>
6739 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6741 (i386_dr_low_get_addr): Remove vague comment.
6742 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6745 2014-08-28 Gary Benson <gbenson@redhat.com>
6747 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6748 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6750 (linux_resume_one_lwp): Likewise.
6751 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6753 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6754 with internal_error.
6755 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6756 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6757 (find_register_by_name): Replace fatal with internal_error.
6758 (find_regno): Likewise.
6759 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6760 * thread-db.c (thread_db_create_event): Likewise.
6761 (thread_db_load_search): Likewise.
6762 (try_thread_db_load_1): Likewise.
6763 * tracepoint.c (get_jump_space_head): Replace fatal with
6765 (claim_trampoline_space): Likewise.
6766 (have_fast_tracepoint_trampoline_buffer): Likewise.
6767 (cmd_qtstart): Likewise.
6768 (stop_tracing): Likewise.
6769 (fast_tracepoint_collecting): Likewise.
6770 (target_malloc): Likewise.
6771 (download_tracepoint): Likewise.
6772 (download_trace_state_variables): Replace check with gdb_assert.
6773 (upload_fast_traceframes): Replace fatal with internal_error.
6775 2014-08-19 Tom Tromey <tromey@redhat.com>
6776 Gary Benson <gbenson@redhat.com>
6778 * Makefile.in (SFILES): Add common/common-debug.c.
6779 (OBS): Add common-debug.o.
6780 (common-debug.o): New rule.
6781 * debug.h (debug_printf): Don't declare.
6782 * debug.c (debug_printf): Renamed and rewritten as...
6783 (debug_vprintf): New function.
6785 2014-08-19 Gary Benson <gbenson@redhat.com>
6787 * utils.h: Do not include print-utils.h.
6789 2014-08-19 Tom Tromey <tromey@redhat.com>
6790 Gary Benson <gbenson@redhat.com>
6792 * server.h: Add static assertion.
6793 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6795 2014-08-19 Tom Tromey <tromey@redhat.com>
6796 Gary Benson <gbenson@redhat.com>
6798 * Makefile.in (SFILES): Add common/errors.c.
6799 (OBS): Add errors.o.
6800 (IPA_OBS): Add errors-ipa.o.
6801 (errors.o): New rule.
6802 (errors-ipa.o): Likewise.
6803 * utils.h (perror_with_name, error, warning): Don't declare.
6804 * utils.c (warning): Renamed and rewritten as...
6805 (vwarning): New function.
6806 (error): Renamed and rewritten as...
6807 (verror): New function.
6808 (internal_error): Renamed and rewritten as...
6809 (internal_verror): New function.
6811 2014-08-07 Gary Benson <gbenson@redhat.com>
6813 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6814 * configure: Regenerate.
6815 * config.in: Likewise.
6816 * server.h: Do not include errno.h.
6817 * event-loop.c: Likewise.
6818 * hostio-errno.c: Likewise.
6819 * linux-low.c: Likewise.
6820 * remote-utils.c: Likewise.
6821 * spu-low.c: Likewise.
6822 * utils.c: Likewise.
6823 * gdbreplay.c: Unconditionally include errno.h.
6825 2014-08-07 Gary Benson <gbenson@redhat.com>
6827 * server.h: Do not include string.h.
6828 * event-loop.c: Likewise.
6829 * linux-low.c: Likewise.
6830 * regcache.c: Likewise.
6831 * remote-utils.c: Likewise.
6832 * spu-low.c: Likewise.
6833 * utils.c: Likewise.
6835 2014-08-07 Gary Benson <gbenson@redhat.com>
6837 * server.h: Do not include gdb_assert.h.
6839 2014-08-07 Gary Benson <gbenson@redhat.com>
6841 * server.h: Do not include common-utils.h.
6843 2014-08-07 Gary Benson <gbenson@redhat.com>
6845 * server.h: Do not include ptid.h.
6846 * notif.h: Likewise.
6848 2014-08-07 Gary Benson <gbenson@redhat.com>
6850 * server.h: Do not include gdb_locale.h.
6852 2014-08-07 Gary Benson <gbenson@redhat.com>
6854 * server.h: Do not include gdb/signals.h.
6855 * win32-low.c: Likewise.
6857 2014-08-07 Gary Benson <gbenson@redhat.com>
6859 * server.h: Do not include pathmax.h.
6861 2014-08-07 Gary Benson <gbenson@redhat.com>
6863 * server.h: Do not include libiberty.h.
6864 * linux-bfin-low.c: Likewise.
6866 2014-08-07 Gary Benson <gbenson@redhat.com>
6868 * server.h: Do not include ansidecl.h.
6870 2014-08-07 Gary Benson <gbenson@redhat.com>
6872 * linux-x86-low.c: Do not include stddef.h.
6873 * lynx-ppc-low.c: Likewise.
6874 * tracepoint.c: Likewise.
6876 2014-08-07 Gary Benson <gbenson@redhat.com>
6878 * server.h: Do not include stdarg.h.
6879 * nto-low.c: Likewise.
6881 2014-08-07 Gary Benson <gbenson@redhat.com>
6883 * server.h: Do not include stdlib.h.
6884 * inferiors.c: Likewise.
6885 * linux-low.c: Likewise.
6886 * regcache.c: Likewise.
6887 * spu-low.c: Likewise.
6888 * tracepoint.c: Likewise.
6889 * utils.c: Likewise.
6891 2014-08-07 Gary Benson <gbenson@redhat.com>
6893 * server.h: Do not include stdio.h.
6894 * linux-low.c: Likewise.
6895 * remote-utils.c: Likewise.
6896 * spu-low.c: Likewise.
6897 * utils.c: Likewise.
6898 * wincecompat.c: Likewise.
6900 2014-08-06 Gary Benson <gbenson@redhat.com>
6902 * regcache.c (init_register_cache): Move conditionals inside if.
6904 2014-08-06 Gary Benson <gbenson@redhat.com>
6906 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6908 2014-07-31 Gary Benson <gbenson@redhat.com>
6910 * ax.h: Do not include server.h.
6911 * gdbthread.h: Likewise.
6912 * lynx-low.h: Likewise.
6913 * notif.h: Likewise.
6915 2014-07-30 Gary Benson <gbenson@redhat.com>
6917 * server.h: Include common-defs.h.
6918 Do not include config.h or build-gnulib-gdbserver/config.h.
6920 2014-07-30 Gary Benson <gbenson@redhat.com>
6922 * hostio-errno.c: Move server.h to top of includes list.
6923 * inferiors.c: Likewise.
6924 * linux-x86-low.c: Likewise.
6925 * notif.c: Include server.h.
6927 2014-07-24 Tom Tromey <tromey@redhat.com>
6928 Gary Benson <gbenson@redhat.com>
6930 * server.h (CORE_ADDR): Now unsigned.
6932 2014-07-16 Pedro Alves <palves@redhat.com>
6934 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6936 2014-07-15 Pedro Alves <palves@redhat.com>
6938 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6941 2014-07-11 Pedro Alves <palves@redhat.com>
6943 * linux-low.c (kill_wait_lwp): New function, based on
6944 kill_one_lwp_callback, but use my_waitpid directly.
6945 (kill_one_lwp_callback, linux_kill): Use it.
6947 2014-06-23 Pedro Alves <palves@redhat.com>
6949 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6950 before setting DR0..DR3.
6952 2014-06-20 Gary Benson <gbenson@redhat.com>
6954 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6955 * configure: Regenerated.
6956 * config.in: Likewise.
6958 2014-06-20 Gary Benson <gbenson@redhat.com>
6960 * Makefile.in (SFILES): Update locations for files moved
6962 (object file files): Reordered.
6964 2014-06-20 Gary Benson <gbenson@redhat.com>
6966 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6967 (i386_dr_low_set_addr): Likewise.
6968 (i386_dr_low_get_addr): Likewise.
6969 (i386_dr_low_can_set_control): Likewise.
6970 (i386_dr_low_set_control): Likewise.
6971 (i386_dr_low_get_control): Likewise.
6972 (i386_dr_low_get_status): Likewise.
6973 (i386_get_debug_register_length): Likewise.
6974 * linux-x86-low.c (i386_dr_low_set_addr):
6975 Changed signature. Made static.
6976 (i386_dr_low_get_addr): Likewise.
6977 (i386_dr_low_set_control): Likewise.
6978 (i386_dr_low_get_control): Likewise.
6979 (i386_dr_low_get_status): Likewise.
6980 (i386_dr_low): New global variable.
6981 * win32-i386-low.c (i386_dr_low_set_addr):
6982 Changed signature. Made static.
6983 (i386_dr_low_get_addr): Likewise.
6984 (i386_dr_low_set_control): Likewise.
6985 (i386_dr_low_get_control): Likewise.
6986 (i386_dr_low_get_status): Likewise.
6987 (i386_dr_low): New global variable.
6989 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6991 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6992 * Makefile.in (AR, AR_FLAGS): Define.
6993 * configure: Regenerate.
6995 2014-06-19 Gary Benson <gbenson@redhat.com>
6997 * Makefile.in (i386-dregs.o): New rule.
6998 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6999 * i386-low.c (target.h): Remove include.
7000 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7001 (DR_CONTROL_SHIFT): Likewise.
7002 (DR_CONTROL_SIZE): Likewise.
7003 (DR_RW_EXECUTE): Likewise.
7004 (DR_RW_WRITE): Likewise.
7005 (DR_RW_READ): Likewise.
7006 (DR_RW_IORW): Likewise.
7007 (DR_LEN_1): Likewise.
7008 (DR_LEN_2): Likewise.
7009 (DR_LEN_4): Likewise.
7010 (DR_LEN_8): Likewise.
7011 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7012 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7013 (DR_ENABLE_SIZE): Likewise.
7014 (DR_LOCAL_SLOWDOWN): Likewise.
7015 (DR_GLOBAL_SLOWDOWN): Likewise.
7016 (DR_CONTROL_RESERVED): Likewise.
7017 (I386_DR_CONTROL_MASK): Likewise.
7018 (I386_DR_VACANT): Likewise.
7019 (I386_DR_LOCAL_ENABLE): Likewise.
7020 (I386_DR_GLOBAL_ENABLE): Likewise.
7021 (I386_DR_DISABLE): Likewise.
7022 (I386_DR_SET_RW_LEN): Likewise.
7023 (I386_DR_GET_RW_LEN): Likewise.
7024 (I386_DR_WATCH_HIT): Likewise.
7025 (i386_wp_op_t): Likewise.
7026 (i386_show_dr): Likewise.
7027 (i386_length_and_rw_bits): Likewise.
7028 (i386_insert_aligned_watchpoint): Likewise.
7029 (i386_remove_aligned_watchpoint): Likewise.
7030 (i386_handle_nonaligned_watchpoint): Likewise.
7031 i386_update_inferior_debug_regs(): Likewise.
7032 (i386_dr_insert_watchpoint): Likewise.
7033 (i386_dr_remove_watchpoint): Likewise.
7034 (i386_dr_region_ok_for_watchpoint): Likewise.
7035 (i386_dr_stopped_data_address): Likewise.
7036 (i386_dr_stopped_by_watchpoint): Likewise.
7038 2014-06-19 Gary Benson <gbenson@redhat.com>
7040 * i386-low.c (i386_dr_show): Renamed to
7041 i386_show_dr and made static. All uses updated.
7042 (i386_dr_length_and_rw_bits): Renamed to
7043 i386_length_and_rw_bits and made static.
7045 (i386_dr_insert_aligned_watchpoint): Renamed to
7046 i386_insert_aligned_watchpoint and made static.
7048 (i386_dr_remove_aligned_watchpoint): Renamed to
7049 i386_remove_aligned_watchpoint and made static.
7051 (i386_dr_update_inferior_debug_regs): Renamed to
7052 i386_update_inferior_debug_regs and made static.
7055 2014-06-18 Gary Benson <gbenson@redhat.com>
7057 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7058 (i386_dr_low_can_set_control): Likewise.
7059 (i386_get_debug_register_length): Likewise.
7060 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7061 (i386_dr_low_can_set_control): Likewise.
7062 (i386_get_debug_register_length): Likewise.
7064 2014-06-17 Gary Benson <gbenson@redhat.com>
7066 * i386-low.h (i386-dregs.h): New include.
7067 (DR_FIRSTADDR): Now in i386-dregs.h.
7068 (DR_LASTADDR): Likewise.
7069 (DR_NADDR): Likewise.
7070 (DR_STATUS): Likewise.
7071 (DR_CONTROL): Likewise.
7072 (i386_debug_reg_state): Likewise.
7073 (i386_dr_insert_watchpoint): Likewise.
7074 (i386_dr_remove_watchpoint): Likewise.
7075 (i386_dr_region_ok_for_watchpoint): Likewise.
7076 (i386_dr_stopped_data_address): Likewise.
7077 (i386_dr_stopped_by_watchpoint): Likewise.
7078 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7080 2014-06-18 Gary Benson <gbenson@redhat.com>
7082 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7083 i386_dr_insert_watchpoint.
7084 (i386_low_remove_watchpoint): Renamed to
7085 i386_dr_remove_watchpoint.
7086 (i386_low_region_ok_for_watchpoint): Renamed to
7087 i386_dr_region_ok_for_watchpoint.
7088 (i386_low_stopped_data_address): Renamed to
7089 i386_dr_stopped_data_address.
7090 (i386_low_stopped_by_watchpoint): Renamed to
7091 i386_dr_stopped_by_watchpoint.
7092 * i386-low.c (i386_show_dr): Renamed to
7093 i386_dr_show and made nonstatic. All uses updated.
7094 (i386_length_and_rw_bits): Renamed to
7095 i386_dr_length_and_rw_bits and made nonstatic.
7097 (i386_insert_aligned_watchpoint): Renamed to
7098 i386_dr_insert_aligned_watchpoint and made nonstatic.
7100 (i386_remove_aligned_watchpoint): Renamed to
7101 i386_dr_remove_aligned_watchpoint and made nonstatic.
7103 (i386_update_inferior_debug_regs): Renamed to
7104 i386_dr_update_inferior_debug_regs and made nonstatic.
7106 (i386_low_insert_watchpoint): Renamed to
7107 i386_dr_insert_watchpoint. All uses updated.
7108 (i386_low_remove_watchpoint): Renamed to
7109 i386_dr_remove_watchpoint. All uses updated.
7110 (i386_low_region_ok_for_watchpoint): Renamed to
7111 i386_dr_region_ok_for_watchpoint. All uses updated.
7112 (i386_low_stopped_data_address): Renamed to
7113 i386_dr_stopped_data_address. All uses updated.
7114 (i386_low_stopped_by_watchpoint): Renamed to
7115 i386_dr_stopped_by_watchpoint. All uses updated.
7117 2014-06-18 Gary Benson <gbenson@redhat.com>
7119 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7120 (i386_dr_low_can_set_control): Likewise.
7121 (i386_insert_aligned_watchpoint): New check.
7123 2014-06-18 Gary Benson <gbenson@redhat.com>
7125 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7128 2014-06-18 Gary Benson <gbenson@redhat.com>
7130 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7131 instead of fatal and error.
7132 (i386_handle_nonaligned_watchpoint): Likewise.
7134 2014-06-18 Gary Benson <gbenson@redhat.com>
7136 * i386-low.c (i386_get_debug_register_length): New macro.
7137 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7138 (i386_show_dr): Use debug_printf instead of fprintf. Use
7139 phex to format values.
7141 2014-06-18 Gary Benson <gbenson@redhat.com>
7143 * i386-low.h: Comment changes.
7144 * i386-low.c: Likewise.
7146 2014-06-18 Gary Benson <gbenson@redhat.com>
7148 * i386-low.c: Whitespace changes.
7150 2014-06-12 Tom Tromey <tromey@redhat.com>
7152 * utils.c (freeargv): Remove.
7154 2014-06-12 Tom Tromey <tromey@redhat.com>
7156 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7157 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7158 (parse_debug_format_options): Likewise.
7159 (gdbserver_usage): Likewise.
7160 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7161 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7162 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7164 ($(LIBGNU)): Depend on libiberty.
7165 (all-lib): Recurse into all subdirs.
7166 (install-only): Invoke "install" target in subdirs.
7167 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7169 * configure: Rebuild.
7170 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7171 for vasprintf, vsnprintf, or gettimeofday.
7172 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7175 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7177 * development.sh: Delete.
7178 * Makefile.in (config.status): Adjust dependency on development.sh.
7179 * configure.ac: Adjust development.sh source call.
7180 * configure: Regenerate.
7182 2014-06-02 Pedro Alves <palves@redhat.com>
7184 * ax.c (gdb_free_agent_expr): New function.
7185 * ax.h (gdb_free_agent_expr): New declaration.
7186 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7188 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7190 (clear_breakpoint_conditions_and_commands): New function.
7191 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7192 (clear_breakpoint_conditions_and_commands): New declaration.
7194 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7196 * linux-aarch64-low.c (asm/ptrace.h): Include.
7198 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7200 Fix TLS access for -static -pthread.
7201 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7202 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7203 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7205 2014-05-20 Pedro Alves <palves@redhat.com>
7207 * linux-aarch64-low.c (aarch64_insert_point)
7208 (aarch64_remove_point): No longer check whether the type is
7209 supported here. Adjust to new interface.
7210 (the_low_target): Install aarch64_supports_z_point_type as
7211 supports_z_point_type method.
7212 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7213 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7214 instead of a Z packet char. Adjust.
7215 (arm_supports_z_point_type): New function.
7216 (arm_insert_point, arm_remove_point): Adjust to new interface.
7217 (the_low_target): Install arm_supports_z_point_type.
7218 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7219 (cris_insert_point, cris_remove_point): Adjust to new interface.
7220 Don't check whether the type is supported here.
7221 (the_low_target): Install cris_supports_z_point_type.
7222 * linux-low.c (linux_supports_z_point_type): New function.
7223 (linux_insert_point, linux_remove_point): Adjust to new interface.
7224 * linux-low.h (struct linux_target_ops) <insert_point,
7225 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7226 raw_breakpoint pointer parameter.
7227 <supports_z_point_type>: New method.
7228 * linux-mips-low.c (mips_supports_z_point_type): New function.
7229 (mips_insert_point, mips_remove_point): Adjust to new interface.
7230 Use mips_supports_z_point_type.
7231 (the_low_target): Install mips_supports_z_point_type.
7232 * linux-ppc-low.c (the_low_target): Install NULL as
7233 supports_z_point_type method.
7234 * linux-s390-low.c (the_low_target): Install NULL as
7235 supports_z_point_type method.
7236 * linux-sparc-low.c (the_low_target): Install NULL as
7237 supports_z_point_type method.
7238 * linux-x86-low.c (x86_supports_z_point_type): New function.
7239 (x86_insert_point): Adjust to new insert_point interface. Use
7240 insert_memory_breakpoint. Adjust to new
7241 i386_low_insert_watchpoint interface.
7242 (x86_remove_point): Adjust to remove_point interface. Use
7243 remove_memory_breakpoint. Adjust to new
7244 i386_low_remove_watchpoint interface.
7245 (the_low_target): Install x86_supports_z_point_type.
7246 * lynx-low.c (lynx_target_ops): Install NULL as
7247 supports_z_point_type callback.
7248 * nto-low.c (nto_supports_z_point_type): New.
7249 (nto_insert_point, nto_remove_point): Adjust to new interface.
7250 (nto_target_ops): Install nto_supports_z_point_type.
7251 * mem-break.c: Adjust intro comment.
7252 (struct raw_breakpoint) <raw_type, size>: New fields.
7253 <inserted>: Update comment.
7254 <shlib_disabled>: Delete field.
7255 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7256 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7257 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7258 (raw_bkpt_type_to_target_hw_bp_type): New function.
7259 (find_enabled_raw_code_breakpoint_at): New function.
7260 (find_raw_breakpoint_at): New type and size parameters. Use them.
7261 (insert_memory_breakpoint): New function, based off
7262 set_raw_breakpoint_at.
7263 (remove_memory_breakpoint): New function.
7264 (set_raw_breakpoint_at): Reimplement.
7265 (set_breakpoint): New, based on set_breakpoint_at.
7266 (set_breakpoint_at): Reimplement.
7267 (delete_raw_breakpoint): Go through the_target->remove_point
7268 instead of assuming memory breakpoints.
7269 (find_gdb_breakpoint_at): Delete.
7270 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7271 (find_gdb_breakpoint): New function.
7272 (set_gdb_breakpoint_at): Delete.
7273 (z_type_supported): New function.
7274 (set_gdb_breakpoint_1): New function, loosely based off
7275 set_gdb_breakpoint_at.
7276 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7277 (delete_gdb_breakpoint_at): Delete.
7278 (delete_gdb_breakpoint_1): New function, loosely based off
7279 delete_gdb_breakpoint_at.
7280 (delete_gdb_breakpoint): New function.
7281 (clear_gdb_breakpoint_conditions): Rename to ...
7282 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7284 (add_condition_to_breakpoint): Make static.
7285 (add_breakpoint_condition): Take a struct breakpoint pointer
7286 instead of an address. Adjust.
7287 (gdb_condition_true_at_breakpoint): Rename to ...
7288 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7290 (gdb_condition_true_at_breakpoint): Reimplement.
7291 (add_breakpoint_commands): Take a struct breakpoint pointer
7292 instead of an address. Adjust.
7293 (gdb_no_commands_at_breakpoint): Rename to ...
7294 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7295 parameter. Return true if no breakpoint was found. Change debug
7297 (gdb_no_commands_at_breakpoint): Reimplement.
7298 (run_breakpoint_commands): Rename to ...
7299 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7300 and change return type to boolean.
7301 (run_breakpoint_commands): New function.
7302 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7303 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7304 breakpoint. Go through the_target->remove_point instead of
7305 assuming memory breakpoint.
7306 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7307 software and hardware breakpoints.
7308 (reinsert_raw_breakpoint): Go through the_target->insert_point
7309 instead of assuming memory breakpoint.
7310 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7311 software and hardware breakpoints.
7312 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7313 Check both software and hardware breakpoints.
7314 (validate_inserted_breakpoint): Assert the breakpoint is a
7315 software breakpoint. Set the inserted flag to -1 instead of
7316 setting shlib_disabled.
7317 (delete_disabled_breakpoints): Adjust.
7318 (validate_breakpoints): Only validate software breakpoints.
7319 Adjust to inserted flag change.
7320 (check_mem_read, check_mem_write): Skip breakpoint types other
7321 than software breakpoints. Adjust to inserted flag change.
7322 * mem-break.h (enum raw_bkpt_type): New enum.
7323 (raw_breakpoint, struct process_info): Forward declare.
7324 (Z_packet_to_target_hw_bp_type): Delete declaration.
7325 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7326 (set_gdb_breakpoint, delete_gdb_breakpoint)
7327 (clear_breakpoint_conditions): New declarations.
7328 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7329 (breakpoint_inserted_here): Update comment.
7330 (add_breakpoint_condition, add_breakpoint_commands): Replace
7331 address parameter with a breakpoint pointer parameter.
7332 (gdb_breakpoint_here): Update comment.
7333 (delete_gdb_breakpoint_at): Delete.
7334 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7335 * server.c (process_point_options): Take a struct breakpoint
7336 pointer instead of an address. Adjust.
7337 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7338 delete_gdb_breakpoint.
7339 * spu-low.c (spu_target_ops): Install NULL as
7340 supports_z_point_type method.
7341 * target.h: Include mem-break.h.
7342 (struct target_ops) <prepare_to_access_memory>: Update comment.
7343 <supports_z_point_type>: New field.
7344 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7345 instead of a char. Also take a raw breakpoint pointer.
7346 * win32-arm-low.c (the_low_target): Install NULL as
7347 supports_z_point_type.
7348 * win32-i386-low.c (i386_supports_z_point_type): New function.
7349 (i386_insert_point, i386_remove_point): Adjust to new interface.
7350 (the_low_target): Install i386_supports_z_point_type.
7351 * win32-low.c (win32_supports_z_point_type): New function.
7352 (win32_insert_point, win32_remove_point): Adjust to new interface.
7353 (win32_target_ops): Install win32_supports_z_point_type.
7354 * win32-low.h (struct win32_target_ops):
7355 <supports_z_point_type>: New method.
7356 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7357 instead of a char. Also take a raw breakpoint pointer.
7359 2014-05-20 Pedro Alves <palves@redhat.com>
7361 * mem-break.h: Include break-common.h.
7362 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7363 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7364 (Z_packet_to_target_hw_bp_type): New declaration.
7365 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7366 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7367 (Z_PACKET_ACCESS_WP): Delete macros.
7368 (Z_packet_to_hw_type): Delete function.
7369 * i386-low.h: Don't include break-common.h here.
7370 (Z_packet_to_hw_type): Delete declaration.
7371 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7372 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7373 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7374 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7375 * linux-aarch64-low.c: Don't include break-common.h here.
7376 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7377 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7378 (Z_packet_to_target_hw_bp_type): Delete function.
7379 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7381 (mips_insert_point, mips_remove_point): Use
7382 Z_packet_to_target_hw_bp_type.
7384 2014-05-20 Pedro Alves <palves@redhat.com>
7386 * linux-aarch64-low.c: Include break-common.h.
7387 (enum target_point_type): Delete.
7388 (Z_packet_to_point_type): Rename to ...
7389 (Z_packet_to_target_hw_bp_type): ... this, and return a
7390 target_hw_bp_type instead.
7391 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7392 instead of an enum target_point_type.
7393 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7395 (aarch64_dr_state_insert_one_point)
7396 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7397 (aarch64_handle_aligned_watchpoint)
7398 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7399 Take an enum target_hw_bp_type instead of an enum
7401 (aarch64_supports_z_point_type): New function.
7402 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7403 use Z_packet_to_target_hw_bp_type.
7405 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7407 * configure.ac: Only use -Werror by default when DEVELOPMENT
7409 * configure: Regenerate.
7411 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7413 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7414 * linux-x86-low.c (X86_64_USER_REGS): New.
7415 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7417 2014-04-28 Yao Qi <yao@codesourcery.com>
7419 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7422 2014-04-25 Pedro Alves <palves@redhat.com>
7425 * linux-low.c (linux_attach_fail_reason_string): New function.
7426 (linux_attach_lwp): Delete.
7427 (linux_attach_lwp_1): Rename to ...
7428 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7429 argument. Remove "initial" parameter. Return int instead of
7430 void. Don't error or warn here.
7431 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7432 failure to attach to the tgid. Call warning when failing to
7434 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7435 argument. Remove "initial" parameter. Return int instead of
7436 void. Don't error or warn here.
7437 (linux_attach_fail_reason_string): New declaration.
7438 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7439 interface change. Use linux_attach_fail_reason_string.
7441 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7442 Walfred Tedeschi <walfred.tedeschi@intel.com>
7444 * Makefile.in: Added rules to handle new files
7445 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7446 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7447 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7448 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7449 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7450 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7452 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7453 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7454 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7455 i386/x32-avx512.xml.
7456 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7457 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7458 i386/x32-avx512-linux.xml.
7459 * i387-fp.c (num_avx512_k_registers): New constant for number
7461 (num_avx512_zmmh_low_registers): New constant for number of
7462 lower ZMM registers (0-15).
7463 (num_avx512_zmmh_high_registers): New constant for number of
7464 higher ZMM registers (16-31).
7465 (num_avx512_ymmh_registers): New contant for number of higher
7466 YMM registers (ymm16-31 added by avx521 on x86_64).
7467 (num_avx512_xmm_registers): New constant for number of higher
7468 XMM registers (xmm16-31 added by AVX512 on x86_64).
7469 (struct i387_xsave): Add space for AVX512 registers.
7470 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7471 Add code to handle AVX512 registers.
7472 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7473 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7474 prototypei from generated file.
7475 (tdesc_amd64_avx512_linux): Likewise.
7476 (init_registers_x32_avx512_linux): Likewise.
7477 (tdesc_x32_avx512_linux): Likewise.
7478 (init_registers_i386_avx512_linux): Likewise.
7479 (tdesc_i386_avx512_linux): Likewise.
7480 (x86_64_regmap): Add AVX512 registers.
7481 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7483 (initialize_low_arch): Add code to initialize AVX512 registers.
7485 2014-04-23 Pedro Alves <palves@redhat.com>
7487 * mem-break.c (find_gdb_breakpoint_at): Make static.
7488 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7490 2014-04-23 Pedro Alves <palves@redhat.com>
7492 * i386-low.c: Don't include break-common.h here.
7493 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7494 prototype to take target_hw_bp_type as argument instead of a Z
7496 * i386-low.h: Include break-common.h here.
7497 (Z_packet_to_hw_type): Declare.
7498 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7500 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7501 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7502 (x86_remove_point): Convert the packet number to a
7503 target_hw_bp_type before calling i386_low_remove_watchpoint.
7504 * win32-i386-low.c (i386_insert_point): Convert the packet number
7505 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7506 (i386_remove_point): Convert the packet number to a
7507 target_hw_bp_type before calling i386_low_remove_watchpoint.
7509 2014-04-23 Pedro Alves <palves@redhat.com>
7511 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7513 2014-04-10 Pedro Alves <palves@redhat.com>
7515 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7516 Check if the condition or command is NULL before checking if the
7517 breakpoint is known. On success, return true.
7518 * mem-break.h (add_breakpoint_condition): Document return.
7519 (add_breakpoint_commands): Add describing comment.
7520 * server.c (skip_to_semicolon): New function.
7521 (process_point_options): Use it.
7523 2014-04-09 Pedro Alves <palves@redhat.com>
7525 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7528 2014-02-27 Pedro Alves <palves@redhat.com>
7531 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7533 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7535 (last_thread_of_process_p): Take a PID argument instead of a
7537 (linux_wait_for_lwp): Delete.
7538 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7540 (linux_low_filter_event): New function, party factored out from
7541 linux_wait_for_event.
7542 (linux_wait_for_event): Rename to ...
7543 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7544 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7545 sigsuspend. Check for zombie leaders.
7546 (linux_wait_for_event): Reimplement as wrapper around
7547 linux_wait_for_event_filtered.
7548 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7549 a normal or signal exit is seen, it's the whole process exiting.
7550 (wait_for_sigstop): No longer a for_each_inferior callback.
7551 Rewrite on top of linux_wait_for_event_filtered.
7552 (stop_all_lwps): Call wait_for_sigstop directly.
7553 * server.c (resume, handle_target_event): Handle
7554 TARGET_WAITKIND_NO_RESUMED.
7556 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7558 * win32-low.c (psapi_get_dll_name,
7559 * win32_CreateToolhelp32Snapshot): Delete.
7560 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7561 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7563 (handle_load_dll): Add function description.
7564 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7566 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7568 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7570 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7571 base address when calling win32_add_one_solib.
7572 (handle_load_dll): Delete local variable load_addr.
7573 Remove 0x1000 offset applied to DLL base address when calling
7574 win32_add_one_solib.
7575 (handle_unload_dll): Add comment.
7577 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7579 * win32-low.c (win32_add_all_dlls): Renames
7580 win32_ensure_ntdll_loaded. Rewrite function documentation.
7581 Adjust implementation to always load all DLLs.
7582 Add 0x1000 offset to DLL base address when calling
7583 win32_add_one_solib.
7584 (child_initialization_done): New static global.
7585 (do_initial_child_stuff): Set child_initialization_done to
7586 zero during child initialization, and 1 after. Replace call
7587 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7589 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7590 (handle_unload_dll): Add function documentation.
7591 (get_child_debug_event): Ignore load and unload DLL events
7592 during child initialization.
7594 2014-02-20 Doug Evans <dje@google.com>
7596 Remove global all_lwps.
7597 * inferiors.h (ptid_of): Move here from linux-low.h.
7598 (pid_of, lwpid_of): Ditto.
7599 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7600 parameter is a struct thread_info * now.
7601 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7602 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7603 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7605 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7606 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7607 * linux-arm-low.c (update_registers_callback): Update, "entry"
7608 parameter is a struct thread_info * now.
7609 Fetch lwpid from current_inferior directly.
7610 (arm_insert_point): Pass &all_threads to find_inferior instead of
7612 (arm_remove_point): Ditto.
7613 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7614 (arm_prepare_to_resume): Fetch pid from thread.
7615 (arm_read_description): Fetch lwpid from current_inferior directly.
7616 * linux-low.c (all_lwps): Delete.
7617 (delete_lwp): Delete call to remove_inferior.
7618 (handle_extended_wait): Fetch lwpid from thread.
7619 (add_lwp): Don't set lwp->entry.id. Remove call to
7620 add_inferior_to_list.
7621 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7622 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7623 (kill_one_lwp_callback): Ditto.
7624 (linux_kill): Don't dereference NULL pointer.
7625 Fetch ptid,lwpid from thread.
7626 (get_detach_signal): Fetch ptid from thread.
7627 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7628 Simplify call to regcache_invalidate_thread.
7629 (delete_lwp_callback): Update, "entry" parameter is a
7630 struct thread_info * now. Fetch pid from thread.
7631 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7632 (status_pending_p_callback): Update, "entry" parameter is a
7633 struct thread_info * now. Fetch ptid from thread.
7634 (find_lwp_pid): Update, "entry" parameter is a
7635 struct thread_info * now.
7636 (linux_wait_for_lwp): Fetch pid from thread.
7637 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7638 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7639 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7640 (dequeue_one_deferred_signal): Ditto.
7641 (cancel_breakpoint): Fetch ptid from current_inferior.
7642 (linux_wait_for_event): Pass &all_threads to find_inferior,
7643 not &all_lwps. Fetch ptid, lwpid from thread.
7644 (count_events_callback): Update, "entry" parameter is a
7645 struct thread_info * now.
7646 (select_singlestep_lwp_callback): Ditto.
7647 (select_event_lwp_callback): Ditto.
7648 (cancel_breakpoints_callback): Ditto.
7649 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7651 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7652 (unsuspend_one_lwp): Update, "entry" parameter is a
7653 struct thread_info * now.
7654 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7656 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7657 Fetch lwpid from thread, not lwp.
7658 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7659 Pass &all_threads to find_inferior, not &all_lwps.
7660 (send_sigstop): Fetch lwpid from thread, not lwp.
7661 (send_sigstop_callback): Update, "entry" parameter is a
7662 struct thread_info * now.
7663 (suspend_and_send_sigstop_callback): Ditto.
7664 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7665 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7666 struct thread_info * now.
7667 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7669 (lwp_running): Update, "entry" parameter is a
7670 struct thread_info * now.
7671 (stop_all_lwps): Fetch ptid from thread.
7672 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7673 (linux_resume_one_lwp): Fetch lwpid from thread.
7674 (linux_set_resume_request): Update, "entry" parameter is a
7675 struct thread_info * now. Fetch pid, lwpid from thread.
7676 (resume_status_pending_p): Update, "entry" parameter is a
7677 struct thread_info * now.
7678 (need_step_over_p): Ditto. Fetch lwpid from thread.
7679 (start_step_over): Fetch lwpid from thread.
7680 (linux_resume_one_thread): Update, "entry" parameter is a
7681 struct thread_info * now. Fetch lwpid from thread.
7682 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7683 (proceed_one_lwp): Update, "entry" parameter is a
7684 struct thread_info * now. Fetch lwpid from thread.
7685 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7686 struct thread_info * now.
7687 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7688 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7689 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7691 (regsets_store_inferior_registers): Ditto.
7692 (fetch_register, store_register): Ditto.
7693 (linux_read_memory, linux_write_memory): Ditto.
7694 (linux_request_interrupt): Ditto.
7695 (linux_read_auxv): Ditto.
7696 (linux_xfer_siginfo): Ditto.
7697 (linux_qxfer_spu): Ditto.
7698 (linux_qxfer_libraries_svr4): Ditto.
7699 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7700 moved to inferiors.h.
7702 (get_thread_lwp): Update.
7703 (struct lwp_info): Delete member "entry". Simplify comment for
7706 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7707 current_inferior directly.
7708 (update_watch_registers_callback): Update, "entry" parameter is a
7709 struct thread_info * now. Fetch pid from thread.
7710 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7711 (mips_insert_point): Fetch lwpid from current_inferior.
7712 Pass &all_threads to find_inferior, not &all_lwps.
7713 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7714 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7716 (mips_stopped_data_address): Ditto.
7717 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7719 * linux-tile-low.c (tile_arch_setup): Ditto.
7720 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7721 (update_debug_registers_callback): Update, "entry" parameter is a
7722 struct thread_info * now. Fetch pid from thread.
7723 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7724 Pass &all_threads to find_inferior, not &all_lwps.
7725 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7726 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7727 Pass &all_threads to find_inferior, not &all_lwps.
7728 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7729 (i386_dr_low_get_status): Ditto.
7730 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7731 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7732 (x86_linux_read_description): Ditto.
7733 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7735 2014-02-20 Doug Evans <dje@google.com>
7737 * inferiors.c (get_first_inferior): Fix buglet.
7739 2014-02-19 Doug Evans <dje@google.com>
7741 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7742 * inferiors.c (add_thread): Change result type to struct thread_info *.
7743 All callers updated.
7744 (add_lwp): Call add_thread here instead of in callers.
7745 All callers updated.
7746 * linux-low.h (get_lwp_thread): Rewrite.
7747 (struct lwp_info): New member "thread".
7749 2014-02-19 Doug Evans <dje@google.com>
7751 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7752 All callers updated.
7754 2014-02-19 Doug Evans <dje@google.com>
7756 * inferiors.c (add_thread): Fix whitespace.
7758 2014-02-19 Doug Evans <dje@google.com>
7760 * dll.c (clear_dlls): Replace accessing list implemention details
7762 * gdbthread.h (get_first_thread): Declare.
7763 * inferiors.c (for_each_inferior_with_data): New function.
7764 (get_first_thread): New function.
7765 (find_thread_ptid): Simplify.
7766 (get_first_inferior): New function.
7767 (clear_list): Delete.
7768 (one_inferior_p): New function.
7769 (clear_inferior_list): New function.
7770 (clear_inferiors): Update.
7771 * inferiors.h (for_each_inferior_with_data): Declare.
7772 (clear_inferior_list): Declare.
7773 (one_inferior_p): Declare.
7774 (get_first_inferior): Declare.
7775 * linux-low.c (linux_wait_for_event): Replace accessing list
7776 implemention details with API function.
7777 * server.c (target_running): Ditto.
7778 (accumulate_file_name_length): New function.
7779 (emit_dll_description): New function.
7780 (handle_qxfer_libraries): Replace accessing list implemention
7781 details with API function.
7782 (handle_qxfer_threads_worker): New function.
7783 (handle_qxfer_threads_proper): Replace accessing list implemention
7784 details with API function.
7785 (handle_query): Ditto.
7786 (visit_actioned_threads_callback_ftype): New typedef.
7787 (visit_actioned_threads_data): New struct.
7788 (visit_actioned_threads): Rewrite to be find_inferior callback.
7789 (resume): Call find_inferior.
7790 (handle_status): Replace accessing list implemention
7791 details with API function.
7792 (process_serial_event): Replace accessing list implemention details
7794 * target.c (set_desired_inferior): Replace accessing list implemention
7795 details with API function.
7796 * tracepoint.c (same_process_p): New function.
7797 (gdb_agent_about_to_close): Replace accessing list implemention
7798 details with API function.
7799 * win32-low.c (child_delete_thread): Replace accessing list
7800 implemention details with API function.
7801 (match_dll_by_basename): New function.
7802 (dll_is_loaded_by_basename): New function.
7803 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7804 details call to dll_is_loaded_by_basename.
7806 2014-02-19 Doug Evans <dje@google.com>
7808 * dll.h (struct dll_info): Add comment.
7809 * gdbthread.h (struct thread_info): Add comment.
7810 (current_ptid): Simplify.
7811 * inferiors.c (add_process): Update.
7812 (remove_process): Update.
7813 * inferiors.h (struct process_info): Rename member "head" to "entry".
7814 * linux-low.c (delete_lwp): Update.
7816 (last_thread_of_process_p): Update.
7817 (kill_one_lwp_callback, linux_kill): Update.
7818 (status_pending_p_callback): Update.
7819 (wait_for_sigstop): Update. Simplify read of ptid.
7820 (start_step_over): Update.
7821 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7822 (get_lwp_thread): Update.
7823 (struct lwp_info): Rename member "head" to "entry".
7824 * regcache.h (inferior_list_entry): Delete.
7825 * server.c (kill_inferior_callback): Update.
7826 (detach_or_kill_inferior_callback): Update.
7827 (print_started_pid): Update.
7828 (print_attached_pid): Update.
7829 (process_serial_event): Simplify read of ptid.
7830 * thread-db.c (thread_db_create_event): Update.
7831 (thread_db_get_tls_address): Update.
7832 * win32-low.c (current_inferior_ptid): Simplify.
7834 2014-02-19 Tom Tromey <tromey@redhat.com>
7836 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7838 (target_supports_btrace): Update.
7840 2014-02-14 Yao Qi <yao@codesourcery.com>
7842 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7843 (rsp-low-ipa.o): New target.
7845 2014-02-12 Tom Tromey <tromey@redhat.com>
7847 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7848 convert_ascii_to_int.
7849 * regcache.c (registers_to_string): Likewise.
7850 * remote-utils.c (decode_M_packet): Likewise.
7851 * server.c (process_serial_event): Likewise.
7853 2014-02-12 Tom Tromey <tromey@redhat.com>
7855 * server.c (handle_query, handle_v_run): Use hex2bin, not
7857 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7859 2014-02-12 Tom Tromey <tromey@redhat.com>
7861 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7862 convert_int_to_ascii.
7863 * regcache.c (registers_to_string, collect_register_as_string):
7865 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7867 * server.c (process_serial_event): Likewise.
7868 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7869 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7871 2014-02-12 Tom Tromey <tromey@redhat.com>
7873 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7874 bin2hex, not hexify.
7875 * tracepoint.c (cmd_qtstatus): Likewise.
7877 2014-02-12 Tom Tromey <tromey@redhat.com>
7879 * remote-utils.c (monitor_output): Pass explicit length to
7882 2014-02-12 Tom Tromey <tromey@redhat.com>
7884 * tracepoint.c: Include rsp-low.h.
7885 * server.c: Include rsp-low.h.
7886 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7887 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7889 * remote-utils.c: Include rsp-low.h.
7890 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7891 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7892 (convert_int_to_ascii, convert_ascii_to_int): Move to
7894 * regcache.c: Include rsp-low.h.
7895 * ax.c: Include rsp-low.h.
7896 * Makefile.in (SFILES): Add common/rsp-low.c.
7897 (OBS): Add rsp-low.o.
7898 (rsp-low.o): New target.
7900 2014-02-12 Tom Tromey <tromey@redhat.com>
7902 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7903 Include print-utils.h.
7904 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7905 (plongest, thirty_two, phex_nz): Remove.
7906 * Makefile.in (SFILES): Add common/print-utils.c.
7907 (OBS): Add print-utils.o.
7908 (print-utils-ipa.o): New target.
7909 (print-utils.o): New target.
7910 (IPA_OBJS): Add print-utils-ipa.o.
7912 2014-02-06 Tom Tromey <tromey@redhat.com>
7914 * Makefile.in (SFILES): Fix indentation.
7916 2014-02-05 Doug Evans <dje@google.com>
7918 * linux-low.c (linux_wait_for_event): Improve comment.
7919 (linux_wait_1): Keep current_inferior in sync with event_child.
7921 2014-01-22 Doug Evans <dje@google.com>
7923 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7925 2014-01-22 Doug Evans <dje@google.com>
7927 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7928 * configure: Regenerate.
7929 * config.in: Regenerate.
7930 * Makefile.in (SFILES): Add debug.c.
7932 * debug.c: New file.
7933 * debug.h: New file.
7934 * linux-aarch64-low.c (*): Update all debugging printfs to use
7935 debug_printf instead of fprintf.
7936 * linux-arm-low.c (*): Ditto.
7937 * linux-cris-low.c (*): Ditto.
7938 * linux-crisv32-low.c (*): Ditto.
7939 * linux-m32r-low.c (*): Ditto.
7940 * linux-sparc-low.c (*): Ditto.
7941 * linux-x86.c (*): Ditto.
7942 * linux-low.c (*): Ditto.
7943 (linux_wait_1): Add calls to debug_enter, debug_exit.
7944 (linux_wait): Remove redundant debugging printf.
7945 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7946 (linux_resume, unstop_all_lwps): Ditto.
7947 * mem-break.c (*): Update all debugging printfs to use
7948 debug_printf instead of fprintf.
7949 * remote-utils.c (*): Ditto.
7950 * thread-db.c (*): Ditto.
7951 * server.c #include <ctype.h>, "gdb_vecs.h".
7952 (debug_threads): Moved to debug.c.
7953 (*): Update all debugging printfs to use debug_printf instead of
7955 (start_inferior): Replace call to fflush with call to debug_flush.
7956 (monitor_show_help): Mention set debug-format.
7957 (parse_debug_format_options): New function.
7958 (handle_monitor_command): Handle "monitor set debug-format".
7959 (gdbserver_usage): Mention --debug-format.
7960 (main): Parse --debug-format.
7961 * server.h (debug_threads): Declaration moved to debug.h.
7963 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7964 trace_debug_1 that uses debug_printf.
7965 (tracepoint_look_up_symbols): Update all debugging printfs to use
7966 debug_printf instead of fprintf.
7968 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7970 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7973 2014-01-17 Pedro Alves <palves@redhat.com>
7976 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7977 defined after including gdb_proc_service.h.
7979 2014-01-16 Doug Evans <dje@google.com>
7981 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7982 (match_dll): Use it.
7984 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7986 * target.h (target_ops) <read_btrace>: Change parameters and
7987 return type to allow error reporting.
7988 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7989 trace reading errors on.
7990 * linux-low.c (linux_low_read_btrace): Pass trace reading
7992 (linux_low_disable_btrace): New.
7994 2014-01-15 Doug Evans <dje@google.com>
7996 * inferiors.c (thread_id_to_gdb_id): Delete.
7997 * inferiors.h (thread_id_to_gdb_id): Delete.
7999 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8001 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8002 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8005 2014-01-08 Pedro Alves <palves@redhat.com>
8007 * server.c (handle_status): Don't discard previous queued stop
8008 replies or thread's pending status here.
8009 (main) <disconnection>: Do it here instead.
8011 2014-01-08 Pedro Alves <palves@redhat.com>
8013 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8014 * server.c (visit_actioned_threads, handle_pending_status): New
8016 (handle_v_cont): Factor out parts to ...
8017 (resume): ... this new function. If in all-stop, and a thread
8018 being resumed has a pending status, report it without actually
8020 (myresume): Adjust to use the new 'resume' function.
8021 (clear_pending_status_callback, set_pending_status_callback)
8022 (find_status_pending_thread_callback): New functions.
8023 (handle_status): Handle the case of multiple threads having
8024 interesting statuses to report. Report threads' real last signal
8025 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8026 with an interesting thread to report the status for, instead of
8027 always reporting the status of the first thread.
8029 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8031 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8032 * gdbreplay.c (gdbreplay_version): Likewise.
8034 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8036 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8037 iov.iov_len with the real length in use.
8039 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8041 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8042 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8043 for all targets that use win32-low.c.
8044 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8045 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8047 2013-12-13 Pedro Alves <palves@redhat.com>
8049 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8050 if equal to TARGET_WAITKIND_LOADED.
8051 * win32-low.c (cached_status): New static global.
8052 (win32_wait): Add declaration.
8053 (do_initial_child_stuff): Flush all initial pending debug events
8054 up to the initial breakpoint.
8055 (win32_wait): If CACHED_STATUS was set, return that instead
8056 of doing a real wait. Remove the code resuming the execution
8057 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8058 during the initial phase. Also remove the code changing
8059 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8060 TARGET_WAITKIND_STOPPED.
8062 2013-12-11 Yao Qi <yao@codesourcery.com>
8064 * notif.c (handle_notif_ack): Return 0 if no notification
8067 2013-11-20 Doug Evans <dje@google.com>
8069 * linux-low.c (linux_set_resume_request): Fix comment.
8071 2013-11-20 Doug Evans <dje@google.com>
8073 * linux-low.c (resume_status_pending_p): Tweak comment.
8075 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8077 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8078 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8079 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8080 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8081 (srv_amd64_regobj): Add amd64-mpx.o.
8082 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8083 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8084 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8085 * i387-fp.c (num_pl_bnd_register) Added constant.
8086 (num_pl_bnd_cfg_registers) Added constant.
8087 (struct i387_xsave) Added reserved area and MPX fields.
8088 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8089 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8091 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8092 (init_registers_amd64_mpx_linux): Declare new function.
8093 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8094 (x86_64_regmap): Add MPX registers.
8095 (x86_linux_read_description): Add MPX case.
8096 (initialize_low_arch): Initialize MPX targets.
8098 2013-11-18 Tom Tromey <tromey@redhat.com>
8100 * configure: Rebuild.
8101 * configure.ac: Don't check for stdlib.h.
8102 * gdbreplay.c: Unconditionally include stdlib.h.
8104 2013-11-18 Tom Tromey <tromey@redhat.com>
8106 * config.in: Rebuild.
8107 * configure: Rebuild.
8108 * configure.ac: Don't use AC_HEADER_DIRENT.
8110 2013-11-18 Tom Tromey <tromey@redhat.com>
8112 * server.h: Don't check HAVE_STRING_H.
8113 * gdbreplay.c: Don't check HAVE_STRING_H.
8114 * configure: Rebuild.
8116 2013-11-18 Tom Tromey <tromey@redhat.com>
8118 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8121 2013-11-08 Tom Tromey <tromey@redhat.com>
8123 * configure, config.in: Rebuild.
8124 * configure.ac: Remove unused configury.
8126 2013-11-08 Tom Tromey <tromey@redhat.com>
8128 * acinclude.m4: Include common.m4, codeset.m4.
8129 * configure, config.in: Rebuild.
8130 * configure.ac: Use GDB_AC_COMMON.
8132 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8134 * linux-s390-low.c (HWCAP_S390_TE): New define.
8135 (s390_arch_setup): Consider the TE field in the HWCAP for
8136 determining 'have_regset_tdb'.
8138 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8141 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8144 2013-10-02 Pedro Alves <palves@redhat.com>
8146 * server.c (process_serial_event): Don't output "GDBserver
8147 exiting" if GDB is connected through stdio.
8148 * target.c (mywait): Likewise, be silent if GDB is connected
8151 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8153 * lynx-low.c (lynx_add_threads_after_attach): New function.
8154 (lynx_attach): Remove call to add_thread. Add call to
8155 lynx_add_threads_after_attach instead.
8157 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8159 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8160 * config.in, configure: Regenerated.
8162 2013-09-18 Yao Qi <yao@codesourcery.com>
8165 * server.c (start_inferior): Clear 'resume_info'.
8167 2013-09-16 Jiong Wang <jiwang@tilera.com>
8169 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8172 2013-09-16 Jiong Wang <jiwang@tilera.com>
8174 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8175 linux-tile-low.o to srv_tgtobj.
8177 2013-09-16 Will Newton <will.newton@linaro.org>
8179 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8182 2013-09-06 Pedro Alves <palves@redhat.com>
8184 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8185 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8186 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8187 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8188 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8189 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8191 2013-09-06 Pedro Alves <palves@redhat.com>
8193 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8194 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8196 2013-09-06 Pedro Alves <palves@redhat.com>
8198 * linux-amd64-ipa.c: Include tracepoint.h.
8199 * linux-i386-ipa.c: Include tracepoint.h.
8201 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8203 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8204 (ps_get_thread_area): New function.
8206 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8208 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8209 (initialize_low_arch): Call init_registers_crisv32 rather than
8210 init_register_crisv32.
8212 2013-09-05 Pedro Alves <palves@redhat.com>
8214 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8216 * hostio.h: ... this new file.
8217 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8218 win32-low.c: Include hostio.h.
8220 2013-09-05 Pedro Alves <palves@redhat.com>
8222 * server.h (gdb_client_data, handler_func, callback_handler_func)
8223 (delete_file_handler, add_file_handler, append_callback_event)
8224 (delete_callback_event, start_event_loop, initialize_event_loop):
8225 Move to event-loop.h and include it.
8226 * event-loop.h: New file.
8228 2013-09-05 Pedro Alves <palves@redhat.com>
8230 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8231 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8232 (loaded_dll, unloaded_dll): Move to ...
8233 * dll.h: ... this new file.
8234 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8236 2013-09-05 Pedro Alves <palves@redhat.com>
8238 * server.h (current_process, get_thread_process, all_processes)
8239 (add_inferior_to_list, for_each_inferior, current_inferior)
8240 (remove_inferior, add_process, remove_process, find_process_pid)
8241 (have_started_inferiors_p, have_attached_inferiors_p)
8242 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8243 (clear_inferiors, find_inferior, find_inferior_id)
8244 (inferior_target_data, set_inferior_target_data)
8245 (inferior_regcache_data, set_inferior_regcache_data): Move to
8246 inferiors.h, and include it.
8247 * inferiors.h: New file.
8249 2013-09-05 Pedro Alves <palves@redhat.com>
8251 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8255 2013-09-05 Pedro Alves <palves@redhat.com>
8257 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8259 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8260 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8261 (handle_tracepoint_general_set, handle_tracepoint_query)
8262 (tracepoint_finished_step, tracepoint_was_hit)
8263 (release_while_stepping_state_list, current_traceframe)
8264 (in_readonly_region, traceframe_read_mem)
8265 (fetch_traceframe_registers, traceframe_read_sdata)
8266 (traceframe_read_info, struct fast_tpoint_collect_status)
8267 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8268 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8269 (supply_fast_tracepoint_registers)
8270 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8271 (ipa_tdesc, claim_trampoline_space)
8272 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8273 (agent_mem_read, agent_get_trace_state_variable_value)
8274 (agent_set_trace_state_variable_value, agent_tsv_read)
8275 (agent_mem_read_string, get_raw_reg_func_addr)
8276 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8277 * tracepoint.h: ... this new file.
8279 2013-09-05 Pedro Alves <palves@redhat.com>
8281 * server.h (perror_with_name, error, fatal, warning, paddress)
8282 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8284 * utils.h: New file.
8286 2013-09-05 Pedro Alves <palves@redhat.com>
8288 * server.h (remote_debug, noack_mode, transport_is_reliable)
8289 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8290 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8291 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8292 (write_enn, initialize_async_io, enable_async_io)
8293 (disable_async_io, check_remote_input_interrupt_request)
8294 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8295 (dead_thread_notify, prepare_resume_reply)
8296 (decode_address_to_semicolon, decode_address, decode_m_packet)
8297 (decode_M_packet, decode_X_packet, decode_xfer_write)
8298 (decode_search_memory_packet, unhexify, hexify)
8299 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8300 (look_up_one_symbol, relocate_instruction)
8301 (monitor_output): Move to remote-utils.h, and include it.
8302 * remote-utils.h: New file.
8304 2013-09-05 Pedro Alves <palves@redhat.com>
8306 * server.h (_): Delete.
8308 2013-09-02 Pedro Alves <palves@redhat.com>
8310 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8311 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8313 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8315 2013-09-02 Pierre Muller <muller@sourceware.org>
8317 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8318 or WriteProcessMemory complete successfully and handle
8319 ERROR_PARTIAL_COPY error.
8321 2013-09-02 Pedro Alves <palves@redhat.com>
8323 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8324 error instead of EIO.
8326 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8329 * linux-low.c: Include filestuff.h.
8330 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8331 * lynx-low.c: Include filestuff.h.
8332 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8333 * server.c: Include filestuff.h.
8334 (main): Call notice_open_fds.
8335 * spu-low.c: Include filestuff.h.
8336 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8338 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8340 * Makefile.in: Explain why ../target and ../nat are not
8341 listed as include file search paths.
8342 (linux-waitpid.o): New object file rule.
8343 * configure.srv (srv_native_linux_obj): New variable.
8344 Replace all occurrences of linux native object files with
8345 $srv_native_linux_obj.
8346 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8347 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8348 (linux_enable_event_reporting): Remove declaration.
8349 (my_waitpid): Moved to common/linux-waitpid.c.
8350 (linux_wait_for_event): Pass ptid when calling
8351 linux_enable_event_reporting.
8352 (linux_supports_tracefork_flag): Remove.
8353 (linux_enable_event_reporting): Likewise.
8354 (linux_tracefork_grandchild): Remove.
8355 (STACK_SIZE): Moved to common/linux-ptrace.c.
8356 (linux_tracefork_child): Remove.
8357 (linux_test_for_tracefork): Remove.
8358 (linux_look_up_symbols): Call linux_supports_traceclone.
8359 (initialize_low): Remove call to linux_test_for_tracefork.
8360 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8361 common/linux-ptrace.h.
8362 (PTRACE_TYPE_ARG4): Likewise.
8363 Include linux-ptrace.h.
8365 2013-08-21 Pedro Alves <palves@redhat.com>
8367 * config.in: Renegerate.
8369 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8371 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8372 (SFILES): Remove $(srcdir)/common/target-common.c and
8373 add $(srcdir)/target/waitstatus.c.
8374 (OBS): Remove target-common.o and add waitstatus.o.
8375 (server_h): Remove $(srcdir)/../common/target-common.h and
8376 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8377 and $(srcdir)/../target/waitstatus.h.
8378 (target-common.o): Remove.
8379 (waitstatus.o): New target object file.
8380 * target.h: Do not include target-common.h and
8381 include target/resume.h, target/wait.h and
8382 target/waitstatus.h.
8384 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8386 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8387 to PTRACE_TYPE_ARG3.
8388 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8389 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8391 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8392 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8394 2013-07-27 Jie Zhang <jie@codesourcery.com>
8395 Daniel Jacobowitz <dan@codesourcery.com>
8396 Yao Qi <yao@codesourcery.com>
8398 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8399 (mips-linux-watch.o): New rule.
8400 (mips_linux_watch_h): New variable.
8401 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8403 * linux-mips-low.c: Include mips-linux-watch.h.
8404 (struct arch_process_info, struct arch_lwp_info): New.
8405 (update_watch_registers_callback): New function.
8406 (mips_linux_new_process, mips_linux_new_thread) New functions.
8407 (mips_linux_prepare_to_resume, mips_insert_point): New
8409 (mips_remove_point, mips_stopped_by_watchpoint): New
8411 (rsp_bp_type_to_target_hw_bp_type): New function.
8412 (mips_stopped_data_address): New function.
8413 (the_low_target): Add watchpoint support functions.
8415 2013-07-27 Yao Qi <yao@codesourcery.com>
8417 * i386-low.c: Include break-common.h.
8418 (enum target_hw_bp_type): Remove.
8420 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8422 * Makefile.in (SFILES): /common/target-common.c.
8423 (OBS): Add target-common.o.
8424 (server_h): Add $(srcdir)/../common/target-common.h.
8425 (target-common.o): New target.
8426 * server.c (queue_stop_reply_callback): Free
8427 status string after use.
8428 * target.c (target_waitstatus_to_string): Remove.
8429 * target.h: Include target-common.h.
8430 (resume_kind): Likewise.
8431 (target_waitkind): Likewise.
8432 (target_waitstatus): Likewise.
8433 (TARGET_WNOHANG): Likewise.
8435 2013-07-04 Yao Qi <yao@codesourcery.com>
8437 * Makefile.in (host_alias): Use @host_noncanonical@.
8438 (target_alias): Use @target_noncanonical@.
8439 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8440 ACX_NONCANONICAL_HOST.
8441 * configure: Regenerated.
8444 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8446 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8447 * configure: Rebuild.
8448 * Makefile.in (version_host, version_target): Get from configure.
8449 (version.c): Use $(version_host) and $(version_target).
8451 2013-07-03 Pedro Alves <palves@redhat.com>
8453 * Makefile.in (config.status): Depend on development.sh.
8454 * acinclude.m4: Include libmcheck.m4.
8455 * configure: Regenerate.
8457 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8459 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8460 attribute inside the parentheses.
8461 (winapi_DebugSetProcessKillOnExit): Ditto.
8462 (winapi_DebugBreakProcess): Ditto.
8463 (winapi_GenerateConsoleCtrlEvent): Ditto.
8465 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8467 * notif.h (notif_event): Add a dummy member to avoid compiler
8470 2013-07-01 Pedro Alves <palves@redhat.com>
8472 * hostio.c (HOSTIO_PATH_MAX): Define.
8473 (require_filename, handle_open, handle_unlink, handle_readlink):
8476 2013-07-01 Pedro Alves <palves@redhat.com>
8478 * server.h: Include "pathmax.h".
8479 * linux-low.c: Don't include sys/param.h.
8480 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8482 * win32-low.c: Don't include sys/param.h.
8483 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8485 2013-07-01 Pedro Alves <palves@redhat.com>
8487 * event-loop.c: Don't check HAVE_UNISTD_H before including
8489 * gdbreplay.c: Likewise.
8490 * remote-utils.c: Likewise.
8491 * server.c: Likewise.
8492 * configure.ac: Don't check for unistd.h.
8493 * configure: Regenerate.
8495 2013-06-28 Tom Tromey <tromey@redhat.com>
8497 * Makefile.in (version.c): Use version.in, not
8500 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8502 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8503 * configure: Rebuild.
8504 * Makefile.in (version_host, version_target): Get from configure.
8505 (version.c): Use $(version_host) and $(version_target).
8507 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8509 Fix trace-status to output user name without trailing colon.
8510 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8512 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8514 Fix trace-status to output proper start-time and stop-time.
8515 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8516 output start time and stop time in hex as gdb expects.
8518 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8520 * tracepoint.c (build_traceframe_info_xml): Output trace state
8521 variables present in the trace buffer.
8523 2013-06-24 Tom Tromey <tromey@redhat.com>
8525 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8527 (version.o): Remove.
8528 * gdbreplay.c: Include version.h.
8529 (version, host_name): Don't declare.
8530 * server.h: Include version.h.
8531 (version, host_name): Don't declare.
8533 2013-06-12 Pedro Alves <palves@redhat.com>
8535 * linux-x86-low.c (linux_is_elf64): Delete global.
8536 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8537 with local linux_pid_exe_is_elf_64_file use.
8539 2013-06-11 Pedro Alves <palves@redhat.com>
8541 * linux-low.c (regset_disabled, disable_regset): New functions.
8542 (regsets_fetch_inferior_registers)
8543 (regsets_store_inferior_registers): Use them.
8544 (initialize_regsets_info); Don't allocate the disabled_regsets
8546 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8549 2013-06-11 Pedro Alves <palves@redhat.com>
8551 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8554 2013-06-11 Pedro Alves <palves@redhat.com>
8556 * linux-x86-low.c (initialize_low_arch): Call
8557 init_registers_x32_avx_linux.
8559 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8561 Fix compatibility with Android Bionic.
8562 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8565 2013-06-07 Pedro Alves <palves@redhat.com>
8568 * Makefile.in (OBS): Add tdesc.o.
8569 (IPA_OBJS): Add tdesc-ipa.o.
8570 (tdesc-ipa.o): New rule.
8571 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8573 * linux-low.c (new_inferior): Delete.
8574 (disabled_regsets, num_regsets): Delete.
8575 (linux_add_process): Adjust to set the new per-process
8577 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8578 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8579 was a stop. When calling arch_setup, switch the current inferior
8580 to the thread that got an event.
8581 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8582 (regsets_fetch_inferior_registers)
8583 (regsets_store_inferior_registers): New regsets_info parameter.
8585 (linux_register_in_regsets): New regs_info parameter. Adjust to
8587 (register_addr, fetch_register, store_register): New usrregs_info
8588 parameter. Adjust to use it.
8589 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8590 parameter regs_info. Adjust to use it.
8591 (linux_fetch_registers): Get the current inferior's regs_info, and
8593 (linux_store_registers): Ditto.
8594 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8595 (initialize_low): Don't initialize the target_regsets here. Call
8596 initialize_low_arch.
8597 * linux-low.h (target_regsets): Delete declaration.
8598 (struct regsets_info): New.
8599 (struct usrregs_info): New.
8600 (struct regs_info): New.
8601 (struct process_info_private) <new_inferior>: New field.
8602 (struct linux_target_ops): Delete the num_regs, regmap, and
8603 regset_bitmap fields. New field regs_info.
8604 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8605 * i387-fp.c (num_xmm_registers): Delete.
8606 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8607 calls to new interface.
8608 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8609 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8610 Infer the number of xmm registers from the regcache's target
8612 * i387-fp.h (num_xmm_registers): Delete.
8613 * inferiors.c (add_thread): Don't install the thread's regcache
8615 * proc-service.c (gregset_info): Fetch the current inferior's
8616 regs_info. Adjust to use it.
8617 * regcache.c: Include tdesc.h.
8618 (register_bytes, reg_defs, num_registers)
8619 (gdbserver_expedite_regs): Delete.
8620 (get_thread_regcache): If the thread doesn't have a regcache yet,
8621 create one, instead of aborting gdbserver.
8622 (regcache_invalidate_one): Rename to ...
8623 (regcache_invalidate_thread): ... this.
8624 (regcache_invalidate_one): New.
8625 (regcache_invalidate): Only invalidate registers of the current
8627 (init_register_cache): Add target_desc parameter, and use it.
8628 (new_register_cache): Ditto. Assert the target description has a
8629 non zero registers_size.
8630 (regcache_cpy): Add assertions. Adjust.
8631 (realloc_register_cache, set_register_cache): Delete.
8632 (registers_to_string, registers_from_string): Adjust.
8633 (find_register_by_name, find_regno, find_register_by_number)
8634 (register_cache_size): Add target_desc parameter, and use it.
8635 (free_register_cache_thread, free_register_cache_thread_one)
8636 (regcache_release, register_cache_size): New.
8637 (register_size): Add target_desc parameter, and use it.
8638 (register_data, supply_register, supply_register_zeroed)
8639 (supply_regblock, supply_register_by_name, collect_register)
8640 (collect_register_as_string, collect_register_by_name): Adjust.
8641 * regcache.h (struct target_desc): Forward declare.
8642 (struct regcache) <tdesc>: New field.
8643 (init_register_cache, new_register_cache): Add target_desc
8645 (regcache_invalidate_thread): Declare.
8646 (regcache_invalidate_one): Delete declaration.
8647 (regcache_release): Declare.
8648 (find_register_by_number, register_cache_size, register_size)
8649 (find_regno): Add target_desc parameter.
8650 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8652 * remote-utils.c: Include tdesc.h.
8653 (outreg, prepare_resume_reply): Adjust.
8654 * server.c: Include tdesc.h.
8655 (gdbserver_xmltarget): Delete declaration.
8656 (get_features_xml, process_serial_event): Adjust.
8657 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8659 (struct process_info) <tdesc>: New field.
8660 (ipa_tdesc): Declare.
8661 * tdesc.c: New file.
8662 * tdesc.h: New file.
8663 * tracepoint.c: Include tdesc.h.
8664 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8665 (get_context_regcache): Adjust to pass ipa_tdesc down.
8666 (do_action_at_tracepoint): Adjust to get the register cache size
8667 from the context regcache's description.
8668 (traceframe_walk_blocks): Adjust to get the register cache size
8669 from the current trace frame's description.
8670 (traceframe_get_pc): Adjust to get current trace frame's
8671 description and pass it down.
8672 (gdb_collect): Adjust to get the register cache size from the
8674 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8675 (gdbserver_xmltarget): Delete.
8676 (initialize_low_tracepoint): Set the ipa's target description.
8677 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8678 (initialize_low_tracepoint): Set the ipa's target description.
8679 * linux-x86-low.c: Include tdesc.h.
8680 [__x86_64__] (is_64bit_tdesc): New.
8681 (ps_get_thread_area, x86_get_thread_area): Use it.
8682 (i386_cannot_store_register): Rename to ...
8683 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8684 (i386_cannot_fetch_register): Rename to ...
8685 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8686 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8688 (target_regsets): Rename to ...
8689 (x86_regsets): ... this.
8690 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8692 (x86_siginfo_fixup): Use is_64bit_tdesc.
8693 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8694 (tdesc_x32_avx_linux, tdesc_x32_linux)
8695 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8697 (x86_linux_update_xmltarget): Delete.
8698 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8699 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8700 (AMD64_LINUX_USER64_CS): New.
8701 (x86_linux_read_description): New, based on
8702 x86_linux_update_xmltarget.
8703 (same_process_callback): New.
8704 (x86_arch_setup_process_callback): New.
8705 (x86_linux_update_xmltarget): New.
8706 (x86_regsets_info): New.
8707 (amd64_linux_regs_info): New.
8708 (i386_linux_usrregs_info): New.
8709 (i386_linux_regs_info): New.
8710 (x86_linux_regs_info): New.
8711 (x86_arch_setup): Reimplement.
8712 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8713 (x86_emit_ops): Ditto.
8714 (the_low_target): Adjust. Install x86_linux_regs_info,
8715 x86_cannot_fetch_register, and x86_cannot_store_register.
8716 (initialize_low_arch): New.
8717 * linux-ia64-low.c (tdesc_ia64): Declare.
8718 (ia64_fetch_register): Adjust.
8719 (ia64_usrregs_info, regs_info): New globals.
8720 (ia64_regs_info): New function.
8721 (the_low_target): Adjust.
8722 (initialize_low_arch): New function.
8723 * linux-sparc-low.c (tdesc_sparc64): Declare.
8724 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8726 (sparc_arch_setup): New function.
8727 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8728 (the_low_target): Adjust.
8729 (initialize_low_arch): New function.
8730 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8731 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8732 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8733 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8734 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8735 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8736 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8737 (tdesc_powerpc_isa205_vsx64l): Declare.
8738 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8739 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8740 (ppc_set_pc, ppc_get_hwcap): Adjust.
8741 (ppc_usrregs_info): Forward declare.
8742 (!__powerpc64__) ppc_regmap_adjusted: New global.
8743 (ppc_arch_setup): Adjust to the current process'es target
8745 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8746 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8747 (ppc_store_evrregset): Adjust.
8748 (target_regsets): Rename to ...
8749 (ppc_regsets): ... this, and make static.
8750 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8751 (ppc_regs_info): New function.
8752 (the_low_target): Adjust.
8753 (initialize_low_arch): New function.
8754 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8755 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8756 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8757 (tdesc_s390x_linux64v2): Declare.
8758 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8759 (s390_fill_gregset, s390_store_last_break): Adjust.
8760 (target_regsets): Rename to ...
8761 (s390_regsets): ... this, and make static.
8762 (s390_get_pc, s390_set_pc): Adjust.
8763 (s390_get_hwcap): New target_desc parameter, and use it.
8764 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8765 (s390_arch_setup): Adjust to set the current process'es target
8766 description. Don't adjust the regmap.
8767 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8768 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8769 (regs_info_3264): New globals.
8770 (s390_regs_info): New function.
8771 (the_low_target): Adjust.
8772 (initialize_low_arch): New function.
8773 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8774 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8775 [__mips64] (init_registers_mips_linux)
8776 (init_registers_mips_dsp_linux): Delete defines.
8777 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8778 (have_dsp): New global.
8779 (mips_read_description): New, based on mips_arch_setup.
8780 (mips_arch_setup): Reimplement.
8781 (get_usrregs_info): New function.
8782 (mips_cannot_fetch_register, mips_cannot_store_register)
8783 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8784 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8785 (target_regsets): Rename to ...
8786 (mips_regsets): ... this, and make static.
8787 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8788 (dsp_regs_info, regs_info): New globals.
8789 (mips_regs_info): New function.
8790 (the_low_target): Adjust.
8791 (initialize_low_arch): New function.
8792 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8793 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8795 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8796 (arm_read_description): New, with bits factored from
8798 (arm_arch_setup): Reimplement.
8799 (target_regsets): Rename to ...
8800 (arm_regsets): ... this, and make static.
8801 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8802 (arm_regs_info): New function.
8803 (the_low_target): Adjust.
8804 (initialize_low_arch): New function.
8805 * linux-m68k-low.c (tdesc_m68k): Declare.
8806 (target_regsets): Rename to ...
8807 (m68k_regsets): ... this, and make static.
8808 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8809 (m68k_regs_info): New function.
8810 (m68k_arch_setup): New function.
8811 (the_low_target): Adjust.
8812 (initialize_low_arch): New function.
8813 * linux-sh-low.c (tdesc_sharch): Declare.
8814 (target_regsets): Rename to ...
8815 (sh_regsets): ... this, and make static.
8816 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8817 (sh_regs_info, sh_arch_setup): New functions.
8818 (the_low_target): Adjust.
8819 (initialize_low_arch): New function.
8820 * linux-bfin-low.c (tdesc_bfin): Declare.
8821 (bfin_arch_setup): New function.
8822 (bfin_usrregs_info, regs_info): New globals.
8823 (bfin_regs_info): New function.
8824 (the_low_target): Adjust.
8825 (initialize_low_arch): New function.
8826 * linux-cris-low.c (tdesc_cris): Declare.
8827 (cris_arch_setup): New function.
8828 (cris_usrregs_info, regs_info): New globals.
8829 (cris_regs_info): New function.
8830 (the_low_target): Adjust.
8831 (initialize_low_arch): New function.
8832 * linux-cris-low.c (tdesc_crisv32): Declare.
8833 (cris_arch_setup): New function.
8834 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8835 (cris_regs_info): New function.
8836 (the_low_target): Adjust.
8837 (initialize_low_arch): New function.
8838 * linux-m32r-low.c (tdesc_m32r): Declare.
8839 (m32r_arch_setup): New function.
8840 (m32r_usrregs_info, regs_info): New globals.
8841 (m32r_regs_info): Adjust.
8842 (initialize_low_arch): New function.
8843 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8844 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8845 (tic6x_usrregs_info): Forward declare.
8846 (tic6x_read_description): New function, based on ...
8847 (tic6x_arch_setup): ... this. Reimplement.
8848 (target_regsets): Rename to ...
8849 (tic6x_regsets): ... this, and make static.
8850 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8851 (tic6x_regs_info): New function.
8852 (the_low_target): Adjust.
8853 (initialize_low_arch): New function.
8854 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8855 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8856 (target_regsets): Rename to ...
8857 (xtensa_regsets): ... this, and make static.
8858 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8860 (xtensa_arch_setup, xtensa_regs_info): New functions.
8861 (the_low_target): Adjust.
8862 (initialize_low_arch): New function.
8863 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8864 (nios2_arch_setup): Set the current process'es tdesc.
8865 (target_regsets): Rename to ...
8866 (nios2_regsets): ... this.
8867 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8868 (nios2_regs_info): New function.
8869 (the_low_target): Adjust.
8870 (initialize_low_arch): New function.
8871 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8872 (aarch64_arch_setup): Set the current process'es tdesc.
8873 (target_regsets): Rename to ...
8874 (aarch64_regsets): ... this.
8875 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8876 (aarch64_regs_info): New function.
8877 (the_low_target): Adjust.
8878 (initialize_low_arch): New function.
8879 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8881 (target_regsets): Rename to ...
8882 (tile_regsets): ... this.
8883 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8884 (tile_regs_info): New function.
8885 (tile_arch_setup): Set the current process'es tdesc.
8886 (the_low_target): Adjust.
8887 (initialize_low_arch): New function.
8888 * spu-low.c (tdesc_spu): Declare.
8889 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8890 * win32-arm-low.c (tdesc_arm): Declare.
8891 (arm_arch_setup): New function.
8892 (the_low_target): Install arm_arch_setup instead of
8894 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8895 (init_windows_x86): Rename to ...
8896 (i386_arch_setup): ... this. Set `win32_tdesc'.
8897 (the_low_target): Adjust.
8898 * win32-low.c (win32_tdesc): New global.
8899 (child_add_thread): Don't create the thread cache here.
8900 (do_initial_child_stuff): Set the new process'es tdesc.
8901 * win32-low.h (struct target_desc): Forward declare.
8902 (win32_tdesc): Declare.
8903 * lynx-i386-low.c (tdesc_i386): Declare global.
8904 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8905 * lynx-low.c (lynx_tdesc): New global.
8906 (lynx_add_process): Set the new process'es tdesc.
8907 * lynx-low.h (struct target_desc): Forward declare.
8908 (lynx_tdesc): Declare global.
8909 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8910 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8911 * nto-low.c (nto_tdesc): New global.
8912 (do_attach): Set the new process'es tdesc.
8913 * nto-low.h (struct target_desc): Forward declare.
8914 (nto_tdesc): Declare.
8915 * nto-x86-low.c (tdesc_i386): Declare.
8916 (nto_x86_arch_setup): Set `nto_tdesc'.
8918 2013-06-04 Gary Benson <gbenson@redhat.com>
8920 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8921 to qSupported response when appropriate.
8922 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8923 with nonzero-length annex.
8924 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8925 arguments supplied in annex.
8927 2013-05-31 Doug Evans <dje@google.com>
8930 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8931 64 bits in 64-cross-32 environment.
8933 2013-05-28 Pedro Alves <palves@redhat.com>
8935 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8936 (aarch64-without-fpu.c): Delete rule.
8937 * configure.srv (aarch64*-*-linux*): Remove references to
8938 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8939 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8942 2013-05-24 Pedro Alves <palves@redhat.com>
8944 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8945 instead of strchr/decode_address. Error if the range isn't split
8946 with a ','. Don't assume there's be a ':' in the action.
8948 2013-05-23 Yao Qi <yao@codesourcery.com>
8949 Pedro Alves <palves@redhat.com>
8951 * linux-low.c (lwp_in_step_range): New function.
8952 (linux_wait_1): If the thread was range stepping and stopped
8953 outside the stepping range, report the stop to GDB. Otherwise,
8954 continue stepping. Add range stepping debug output.
8955 (linux_set_resume_request): Copy the step range from the resume
8957 (linux_supports_range_stepping): New.
8958 (linux_target_ops) <supports_range_stepping>: Set to
8959 linux_supports_range_stepping.
8960 * linux-low.h (struct linux_target_ops)
8961 <supports_range_stepping>: New field.
8962 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8963 * linux-x86-low.c (x86_supports_range_stepping): New.
8964 (the_low_target) <supports_range_stepping>: Set to
8965 x86_supports_range_stepping.
8966 * server.c (handle_v_cont): Handle 'r' action.
8967 (handle_v_requests): Append ";r" if the target supports range
8969 * target.h (struct thread_resume) <step_range_start,
8970 step_range_end>: New fields.
8971 (struct target_ops) <supports_range_stepping>:
8973 (target_supports_range_stepping): New macro.
8975 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8977 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8978 confusion in comment.
8980 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8982 * lynx-low.c (struct process_info_private): New type.
8983 (lynx_add_process): New function.
8984 (lynx_create_inferior, lynx_attach): Replace calls to
8985 add_process by calls to lynx_add_process.
8986 (lynx_resume): If PTID is null, then try using
8987 current_process()->private->last_wait_event_ptid.
8989 (lynx_clear_inferiors): Delete. The contents of that function
8990 has been inlined in lynx_mourn;
8991 (lynx_wait_1): Save the ptid in the process's private data.
8992 (lynx_mourn): Free the process' private data. Replace call
8993 to lynx_clear_inferiors by call to clear_inferiors.
8995 2013-05-17 Yao Qi <yao@codesourcery.com>
8997 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9000 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9002 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9003 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9004 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9005 PT_TEXT_END_ADDR guards. Update comments.
9006 (linux_target_op) <read_offsets>: Conditionally define to
9007 linux_read_offsets if the target is UCLIBC and if it defines
9008 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9010 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9011 Andrew Jenner <andrew@codesourcery.com>
9013 * Makefile.in (SFILES): Add linux-nios2-low.c.
9014 (clean): Add action to delete nios2-linux.c.
9015 (nios2-linux.c): New rule.
9016 * configure.srv: Add nios2*-*-linux*.
9017 * linux-nios2-low.c: New.
9019 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9021 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9023 2013-04-25 Hui Zhu <hui@codesourcery.com>
9026 * ax.c (ax_printf): Add fflush.
9028 2013-04-22 Tom Tromey <tromey@redhat.com>
9030 * Makefile.in (SFILES): Add filestuff.c.
9031 (OBS): Add filestuff.o.
9032 (filestuff.o): New target.
9033 * config.in, configure: Rebuild.
9034 * configure.ac: Check for fdwalk, pipe2.
9036 2013-04-17 Pedro Alves <palves@redhat.com>
9038 * configure.ac (USE_THREAD_DB): Delete variable.
9039 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9040 Don't AC_SUBST USE_THREAD_DB.
9041 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9042 * config.in, configure: Regenerate.
9044 2013-04-16 Pedro Alves <palves@redhat.com>
9046 * linux-low.h (struct lwp_info) <thread_known>: Move under
9047 the USE_THREAD_DB #ifdef.
9049 2013-04-16 Pedro Alves <palves@redhat.com>
9051 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9052 (linux-low.o): Delete rule.
9053 * linux-low.h: Always include "gdb_thread_db.h" instead of
9054 conditionally including thread_db.h.
9055 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9058 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9060 * Makefile.in (install-only): Fix make install regression.
9062 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9064 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9065 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9067 * gdbserver.1: Remove.
9069 2013-03-22 Pedro Alves <palves@redhat.com>
9071 * linux-low.c (handle_extended_wait): Don't call
9072 linux_enable_event_reporting.
9074 2013-03-15 Tony Theodore <tonyt@logyst.com>
9077 * Makefile.in (SHELL): Use @SHELL@.
9079 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9081 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9084 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9086 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9087 Remove extraneous NULL element.
9089 2013-03-13 Yao Qi <yao@codesourcery.com>
9091 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9092 'V' block in trace frame.
9094 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9096 * target.h (struct target_ops): Add btrace ops.
9097 (target_supports_btrace): New macro.
9098 (target_enable_btrace): New macro.
9099 (target_disable_btrace): New macro.
9100 (target_read_btrace): New macro.
9101 * gdbthread.h (struct thread_info): Add btrace field.
9102 * server.c: Include btrace-common.h.
9103 (handle_btrace_general_set): New function.
9104 (handle_btrace_enable): New function.
9105 (handle_btrace_disable): New function.
9106 (handle_general_set): Call handle_btrace_general_set.
9107 (handle_qxfer_btrace): New function.
9108 (struct qxfer qxfer_packets[]): Add btrace entry.
9109 * inferiors.c (remove_thread): Disable btrace.
9110 * linux-low: Include linux-btrace.h.
9111 (linux_low_enable_btrace): New function.
9112 (linux_low_read_btrace): New function.
9113 (linux_target_ops): Add btrace ops.
9114 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9115 Add srv_linux_btrace=yes.
9116 (x86_64-*-linux*): Add linux-btrace.o.
9117 Add srv_linux_btrace=yes.
9118 * configure.ac: Define HAVE_LINUX_BTRACE.
9119 * config.in: Regenerated.
9120 * configure: Regenerated.
9122 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9124 * server.c (handle_qxfer): Preserve error message if -3 is
9126 (qxfer): Document the -3 return value.
9128 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9130 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9131 (linux_btrace_h): New variable.
9132 (linux-btrace.o): New rule.
9134 2013-03-08 Stan Shebs <stan@codesourcery.com>
9135 Hafiz Abid Qadeer <abidh@codesourcery.com>
9137 * tracepoint.c (trace_buffer_size): New global.
9138 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9139 (init_trace_buffer): Change to one-argument function. Allocate
9140 trace buffer memory.
9141 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9142 handle QTBuffer:size packet.
9143 (cmd_bigqtbuffer_size): New function.
9144 (initialize_tracepoint): Call init_trace_buffer with
9145 DEFAULT_TRACE_BUFFER_SIZE.
9146 * server.c (handle_query): Add QTBuffer:size in the
9149 2013-03-07 Yao Qi <yao@codesourcery.com>
9151 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9152 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9154 (cmd_qtsp): Adjust condition. Do post increment.
9155 Set cur_action and cur_step_action back to 0.
9157 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9160 * linux-low.c (linux_write_memory): Return early success if LEN is
9163 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9165 * configure.srv: Add x86_64-*-cygwin* as target.
9167 2013-02-28 Tom Tromey <tromey@redhat.com>
9169 * configure.ac: Invoke AC_SYS_LARGEFILE.
9170 * configure, config.in: Rebuild.
9172 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9174 * win32-low.c: Throughout, fix format strings and casts of
9175 printf-like functions to avoid type related warnings on all
9177 (get_child_debug_event): Print dwDebugEventCode as hex since
9178 that's how it's usually documented.
9180 2013-02-28 Yao Qi <yao@codesourcery.com>
9182 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9185 2013-02-27 Jiong Wang <jiwang@tilera.com>
9187 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9188 (reg-tilegx32.c): New rule.
9189 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9190 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9191 different register info initializer according to elf class.
9192 (init_registers_tilgx32): New function. The tilegx32 register info
9194 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9195 (tile_store_gregset): Likewise.
9197 2013-02-27 Yao Qi <yao@codesourcery.com>
9199 * server.c (process_point_options): Print debug message when
9200 debug_threads is true.
9202 2013-02-26 Yao Qi <yao@codesourcery.com>
9204 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9206 2013-02-19 Pedro Alves <palves@redhat.com>
9207 Kai Tietz <ktietz@redhat.com>
9211 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9212 instead of strtoul to extract address from packet.
9213 (process_serial_event) <'z'>: Likewise.
9215 2013-02-18 Yao Qi <yao@codesourcery.com>
9217 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9219 2013-02-14 Pedro Alves <palves@redhat.com>
9223 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9224 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9226 2013-02-14 Pedro Alves <palves@redhat.com>
9228 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9230 2013-02-14 Pedro Alves <palves@redhat.com>
9232 * tracepoint.c (save_string): Delete.
9233 (add_tracepoint_action): Use savestring instead of save_string.
9235 2013-02-12 Pedro Alves <palves@redhat.com>
9237 * linux-xtensa-low.c: Ditto.
9238 * xtensa-xtregs.c: Ditto.
9240 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9242 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9245 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9247 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9248 aarch64_num_wp_regs and aarch64_num_bp_regs to
9249 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9251 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9253 * linux-aarch64-low.c (ps_get_thread_area): Replace
9254 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9256 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9257 Marcus Shawcroft <marcus.shawcroft@arm.com>
9258 Nigel Stephens <nigel.stephens@arm.com>
9259 Yufeng Zhang <yufeng.zhang@arm.com>
9261 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9262 (aarch64.c, aarch64-without-fpu.c): New targets.
9263 * configure.srv (aarch64*-*-linux*): New.
9264 * linux-aarch64-low.c: New file.
9266 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9268 * linux-low.c (handle_extended_wait, linux_create_inferior)
9269 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9270 (dequeue_one_deferred_signal, linux_resume_one_thread)
9271 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9272 (linux_tracefork_grandchild, linux_test_for_tracefork)
9273 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9274 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9275 where the argument is 0.
9277 2013-01-25 Yao Qi <yao@codesourcery.com>
9279 * event-loop.c: Include "queue.h".
9280 (gdb_event_p): New typedef.
9281 (struct gdb_event) <next_event>: Remove.
9282 (event_queue): Change to QUEUE(gdb_event_p).
9283 (async_queue_event): Remove.
9284 (gdb_event_xfree): New.
9285 (initialize_event_loop): New.
9286 (process_event): Use API from QUEUE.
9287 (wait_for_event): Likewise.
9288 * server.c (main): Call initialize_event_loop.
9289 * server.h (initialize_event_loop): Declare.
9291 2013-01-18 Yao Qi <yao@codesourcery.com>
9293 * ax.h (struct eval_agent_expr_context): New.
9294 (gdb_eval_agent_expr): Update declaration.
9295 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9296 TFRAME. Add new argument CTX.
9297 * server.h (struct eval_agent_expr_context): Declare.
9298 (agent_mem_read, agent_tsv_read): Update declaration.
9299 (agent_mem_read_string): Likewise.
9300 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9301 (add_traceframe_block): Add new argument TPOINT.
9302 Increase TPOINT->traceframe_usage.
9303 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9304 eval_tracepoint_agent_expr.
9305 (condition_true_at_tracepoint): Likewise.
9306 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9307 (agent_mem_read_string, agent_tsv_read): Likewise.
9309 2013-01-16 Yao Qi <yao@codesourcery.com>
9311 * linux-low.c (linux_resume_one_lwp): Don't check
9312 'lwp->bp_reinsert != 0'.
9314 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9315 Pedro Alves <palves@redhat.com>
9317 * lynx-low.c (ptrace_request_to_str): Define a temporary
9318 macro and use it to simplify this function's implementation.
9320 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9322 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9325 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9327 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9329 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9331 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9333 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9335 * lynx-low.c (lynx_resume): Use the resume_info parameter
9336 to determine the ptid for the lynx_ptrace call, unless
9337 it is equal to minus_one_ptid, in which case we use the
9338 ptid of the current_inferior.
9339 (lynx_wait_1): After having received a thread create/exit
9340 event, resume the inferior's execution using the signaling
9341 thread's ptid, rather than the old ptid.
9343 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9345 * lynx-low.c (lynx_resume): Delete variable ret.
9347 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9349 * gdbreplay.c (gdbreplay_version): Update copyright year.
9350 * server.c (gdbserver_version): Likewise.
9352 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9354 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9357 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9359 * lynx-low.c (ptrace_request_to_str): Add handling for
9362 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9364 * lynx-low.c (lynx_attach): Delete variable new_process.
9366 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9368 * lynx-low.c (lynx_create_inferior): Delete variable
9371 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9373 * lynx-low.c (ptrace_request_to_str): Do not handle
9374 PTRACE_GETTHREADLIST if this macro does not exist.
9376 2012-12-15 Yao Qi <yao@codesourcery.com>
9378 * Makefile.in (OBS): Add notif.o.
9379 * notif.c, notif.h: New.
9380 * server.c: Include "notif.h".
9381 (struct vstop_notif) <next>: Remove.
9383 (queue_stop_reply): Update.
9384 (push_event, send_next_stop_reply): Remove.
9385 (discard_queued_stop_replies): Update.
9386 (notif_stop): New variable.
9387 (handle_v_stopped): Remove.
9388 (handle_v_requests): Don't call handle_v_stopped. Call
9389 handle_ack_notif instead.
9390 (queue_stop_reply_callback): Call notif_event_enque instead
9391 of queue_stop_reply.
9392 (handle_status): Don't call send_next_stop_reply, call
9393 notif_write_event instead.
9394 (kill_inferior_callback): Likewise.
9395 (detach_or_kill_inferior_callback): Likewise.
9396 (main): Call initialize_notif.
9397 (process_serial_event): Call QUEUE_is_empty.
9398 (handle_target_event): Call notif_push instead of push event.
9399 * server.h (push_event): Remove declaration.
9401 2012-12-10 Tom Tromey <tromey@redhat.com>
9403 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9404 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9407 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9408 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9409 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9410 (amd64-linux-ipa.o, ax.o): Rewrite.
9411 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9412 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9413 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9414 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9415 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9416 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9417 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9418 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9419 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9420 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9421 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9422 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9423 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9424 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9425 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9426 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9427 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9428 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9429 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9430 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9431 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9432 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9433 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9434 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9435 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9436 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9437 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9438 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9439 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9440 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9441 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9442 (reg-tilegx.o): Remove.
9443 (all_object_files): New macro.
9444 Include .deps files.
9445 * aclocal.m4, configure: Rebuild.
9446 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9447 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9448 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9450 2012-12-05 Tom Tromey <tromey@redhat.com>
9453 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9455 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9457 * configure.ac: Check for linux/perf_event.h.
9458 * config.in: Regenerated.
9459 * configure: Regenerated.
9461 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9463 * hostio.c (handle_readlink): Decrease buffer size
9464 parameter passed to readlink by one byte.
9466 2012-11-26 Yao Qi <yao@codesourcery.com>
9468 * configure.ac (build_warnings): Append '-Wempty-body'.
9469 * configure: Regenerated.
9470 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9473 2012-11-15 Pierre Muller <muller@sourceware.org>
9475 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9476 * config.in: Regenerate.
9477 * configure: Regenerate.
9478 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9479 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9480 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9481 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9483 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9484 instead of <sys/wait.h> header.
9485 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9487 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9489 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9490 (various make rules): Remove -DGDBSERVER
9492 2012-11-09 Yao Qi <yao@codesourcery.com>
9494 * spu-low.c (current_ptid): Move it to ..
9495 * gdbthread.h: ... here. New.
9496 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9497 * server.c (myresume, process_serial_event): Likewise.
9498 * thread-db.c (thread_db_find_new_threads): Likewise.
9499 * tracepoint.c (run_inferior_command): Likewise.
9501 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9503 * server.c (handle_search_memory_1): Include access length in
9506 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9508 * linux-crisv32-low.c: Fix compile errors.
9510 2012-09-04 Yao Qi <yao@codesourcery.com>
9512 * tracepoint.c (cmd_qtsv): Adjust debug message.
9513 Don't check CUR_TPOINT.
9515 2012-08-28 Yao Qi <yao@codesourcery.com>
9517 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9518 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9519 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9520 Remove declarations of xmalloc, xreallloc, xstrdup and
9522 * Makefile.in (libiberty_h): New.
9523 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9524 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9526 2012-08-23 Yao Qi <yao@codesourcery.com>
9528 * server.h: Remove declaration of 'xsnprintf'.
9530 2012-08-22 Keith Seitz <keiths@redhat.com>
9532 * server.h: Include build-gnulib-gbserver/config.h.
9533 * gdbreplay.c: Likewise.
9535 2012-08-08 Doug Evans <dje@google.com>
9537 * Makefile.in (SFILES): Add gdb_vecs.c.
9538 (OBS): Add gdb_vecs.o.
9539 (gdb_vecs_h, host_defs_h): New variables.
9540 (thread-db.o): Add $(gdb_vecs_h) dependency.
9541 (gdb_vecs.o): New rule.
9542 * thread-db.c: #include "gdb_vecs.h".
9543 (thread_db_load_search): Use a vector to iterate over path elements.
9544 Handle text appearing after "$pdir".
9546 * configure.ac: Add check for strstr.
9547 * config.in: Regenerate.
9548 * configure: Regenerate.
9550 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9552 * hostio.c (handle_pread): If pread fails, fall back to attempting
9554 (handle_pwrite): Likewise for pwrite.
9556 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9558 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9559 between unsupported TYPE and unimplementable ADDR/LEN combination.
9560 (arm_insert_point): Act on new return value.
9562 2012-07-31 Pedro Alves <palves@redhat.com>
9564 * server.c (process_point_options): Only skip tokens if we find
9565 one that is unrecognized. Don't treat 'X' specially while
9566 skipping unrecognized tokens.
9568 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9570 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9571 to 4-byte-align HW breakpoint addresses for Thumb.
9573 2012-07-27 Yao Qi <yao@codesourcery.com>
9577 * server.h: Declare gdb_agent_about_to_close.
9578 * target.c (kill_inferior): Include "agent.h".
9579 New. Send command 'kill'.
9580 * target.h (kill_inferior): Removed macro.
9581 * tracepoint.c (gdb_agent_about_to_close): New.
9582 (gdb_agent_helper_thread): Handle command 'close'.
9583 Wait endlessly until the inferior stops.
9584 Install gdb_agent_remove_socket to atexit hook.
9585 (agent_socket_name): New static variable.
9586 (gdb_agent_socket_init): Replace local variable 'name' with
9587 'agent_socket_name'.
9588 (gdb_agent_remove_socket): New.
9590 2012-07-27 Yao Qi <yao@codesourcery.com>
9592 * server.c (process_point_options): Stop at 'X' when parsing.
9594 2012-07-19 Michael Eager <eager@eagercon.com>
9596 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9598 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9599 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9600 hardware breakpoint.
9602 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9604 * gdbserver/linux-low.c (initialize_low): Call
9605 linux_ptrace_init_warnings.
9607 2012-07-02 Doug Evans <dje@google.com>
9609 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9612 2012-07-02 Stan Shebs <stan@codesourcery.com>
9614 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9615 (ax.o): Add it to build rule.
9617 (OBS): Add format.o.
9618 (IPA_OBS): Add format.o.
9619 * server.c (handle_query): Claim support for breakpoint commands.
9620 (process_point_options): Add command case.
9621 (process_serial_event): Leave running if there are printfs in
9623 * mem-break.h (any_persistent_commands): Declare.
9624 (add_breakpoint_commands): Declare.
9625 (gdb_no_commands_at_breakpoint): Declare.
9626 (run_breakpoint_commands): Declare.
9627 * mem-break.c (struct point_command_list): New struct.
9628 (struct breakpoint): New field command_list.
9629 (any_persistent_commands): New function.
9630 (add_commands_to_breakpoint): New function.
9631 (add_breakpoint_commands): New function.
9632 (gdb_no_commands_at_breakpoint): New function.
9633 (run_breakpoint_commands): New function.
9634 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9636 * ax.c: Include format.h.
9637 (ax_printf): New function.
9638 (gdb_eval_agent_expr): Add printf opcode.
9640 2012-06-13 Yao Qi <yao@codesourcery.com>
9642 * server.c (start_inferior): Remove duplicated writes to fields
9643 'last_resume_kind' and 'last_status' of 'current_inferior'.
9645 2012-06-12 Yao Qi <yao@codesourcery.com>
9646 Pedro Alves <palves@redhat.com>
9648 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9650 * server.c (handle_v_cont): Extend comment.
9652 2012-06-11 Yao Qi <yao@codesourcery.com>
9654 * linux-low.c (linux_attach): Add 'static'.
9656 2012-06-06 Yao Qi <yao@codesourcery.com>
9658 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9660 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9662 Fix gcc -flto compilation warning.
9663 * server.c (main): Make variable multi_mode and attach volatile.
9665 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9667 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9668 if the platform doesn't know about it.
9670 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9672 * Makefile.in (SFILES): Add linux-tile-low.c.
9673 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9674 * configure.srv: Handle tilegx-*-linux*.
9675 * linux-tile-low.c: New file.
9677 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9679 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9681 2012-05-24 Pedro Alves <palves@redhat.com>
9685 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9687 2012-05-24 Pedro Alves <palves@redhat.com>
9691 Replace target_signal with gdb_signal throughout.
9693 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9695 * linux-low.c (linux_store_registers): Avoid the copying sequence
9696 when no data has been retrieved by ptrace.
9698 2012-05-22 Will Deacon <will.deacon@arm.com>
9700 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9701 Include asm/ptrace.h.
9702 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9705 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9707 * linux-low.c (linux_store_registers): Don't re-retrieve data
9708 with ptrace that has already been obtained from /proc. Always
9709 copy any data retrieved with ptrace to the buffer supplied.
9711 2012-05-11 Yao Qi <yao@codesourcery.com>
9712 Pedro Alves <palves@redhat.com>
9714 * linux-low.c (enum stopping_threads_kind): New.
9715 (stopping_threads): Change type to `enum stopping_threads_kind'.
9716 (handle_extended_wait): If stopping and suspending threads, leave
9717 the new_lwp suspended too.
9718 (linux_wait_for_event): Adjust.
9719 (stop_all_lwps): Set `stopping_threads' to
9720 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9721 whether we're suspending threads or just stopping them. Assert no
9724 2012-04-29 Yao Qi <yao@codesourcery.com>
9726 * server.h: Move some code to ...
9727 * gdbthread.h: ... here. New.
9728 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9729 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9730 (nto-low.o, win32-low.o): Likewise.
9731 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9732 * regcache.c, remote-utils.c, server.c: Likewise.
9733 * target.c, tracepoint.c, win32-low.c: Likewise.
9735 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9737 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9738 (PTRACE_ARG4_TYPE): Likewise.
9739 (PTRACE_XFER_TYPE): Likewise.
9740 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9741 ptrace to PTRACE_ARG3_TYPE.
9742 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9743 (PTRACE_ARG4_TYPE): Likewise.
9744 (PTRACE_XFER_TYPE): Likewise.
9745 (linux_detach_one_lwp): Cast fourth argument of
9746 ptrace to long then PTRACE_ARG4_TYPE.
9747 (regsets_fetch_inferior_registers): Cast third argument of
9748 ptrace to long then PTRACE_ARG3_TYPE.
9749 (regsets_store_inferior_registers): Likewise.
9751 2012-04-20 Pedro Alves <palves@redhat.com>
9753 * configure: Regenerate.
9755 2012-04-19 Pedro Alves <palves@redhat.com>
9757 * Makefile.in (GNULIB_BUILDDIR): New.
9758 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9759 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9760 (all, install-only, uninstall, clean-info, all-lib, clean): No
9761 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9762 (maintainer-clean realclean distclean): Use subdir_do.
9764 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9765 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9766 * acinclude.m4: Include acx_configure_dir.m4.
9767 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9768 calls. Call AC_PROG_RANLIB. Configure gnulib using
9771 (GNULIB_STDINT_H): Adjust.
9772 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9773 * gdbreplay.c: Include build-gnulib/config.h.
9774 * server.h: Likewise.
9775 * aclocal.m4: Regenerate.
9776 * config.in: Regenerate.
9777 * configure: Regenerate.
9779 2012-04-19 Pedro Alves <palves@redhat.com>
9781 * Makefile.in (LIBGNU, INCGNU): Adjust.
9782 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9783 (all, install-only, uninstall, clean-info, all-lib, clean)
9784 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9785 * configure.ac: Adjust AC_OUTPUT output.
9786 * aclocal.m4: Regenerate.
9787 * configure: Regenerate.
9789 2012-04-19 Pedro Alves <palves@redhat.com>
9791 * Makefile.in (generated_files): New.
9792 (server_h): Remove the explicit dependency on config.h, and depend
9793 on $generated_files.
9795 2012-04-19 Pedro Alves <palves@redhat.com>
9797 * Makefile.in (INCGNU): Add -Ignulib.
9799 2012-04-19 Pedro Alves <palves@redhat.com>
9801 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9802 (INCGNU): ... this, and spell out -I here.
9803 (GNULIB_LIB): Rename to ...
9805 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9807 2012-04-19 Pedro Alves <palves@redhat.com>
9809 * config.in: Regenerate.
9811 2012-04-19 Pedro Alves <palves@redhat.com>
9813 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9814 * server.h (memmem): Remove declaration.
9815 * config.in: Regenerate.
9816 * configure: Regenerate.
9818 2012-04-19 Yao Qi <yao@codesourcery.com>
9820 * Makefile.in (SFILES): Add common/vec.c.
9824 2012-04-19 Yao Qi <yao@codesourcery.com>
9826 * remote-utils.c (prepare_resume_reply): Replace with macro
9827 target_core_of_thread.
9828 * server.c (handle_qxfer_threads_proper): Likewise.
9829 * target.h (traget_core_of_thread): New macro.
9831 2012-04-18 Pedro Alves <palves@redhat.com>
9833 * aclocal.m4: Regenerate.
9834 * configure: Regenerate.
9836 2012-04-16 Yao Qi <yao@codesourcery.com>
9838 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9839 duplicated on address.
9841 2012-04-16 Yao Qi <yao@codesourcery.com>
9843 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9844 (struct tracepoint_action_ops) <send>: New field.
9845 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9846 (agent_expr_send, x_tracepoint_action_send): New.
9847 (l_tracepoint_action_send): New.
9848 (cmd_qtdp): Download and install tracepoint
9849 according to `use_agent'.
9850 (run_inferior_command): Add one more parameter `len'.
9852 (tracepoint_send_agent): New.
9853 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9855 2012-04-16 Yao Qi <yao@codesourcery.com>
9857 * tracepoint.c (download_tracepoints): Moved to ...
9858 (cmd_qtstart): ... here.
9860 2012-04-14 Yao Qi <yao@codesourcery.com>
9862 * tracepoint.c: Include inttypes.h.
9863 (struct collect_memory_action): Use sized types.
9864 (struct tracepoint): Likewise.
9865 (cmd_qtdp, stop_tracing): Update print specifiers.
9866 (cmd_qtp, response_tracepoint): Likewise.
9867 (collect_data_at_tracepoint): Likewise.
9868 (collect_data_at_step): Likewise.
9870 2012-04-14 Yao Qi <yao@codesourcery.com>
9872 Import gnulib module inttypes.
9873 * aclocal.m4, config.in, configure: Regenerated.
9875 2012-04-14 Yao Qi <yao@codesourcery.com>
9877 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9878 Makefile and config.status at last.
9880 2012-04-13 Yao Qi <yao@codesourcery.com>
9882 * tracepoint.c: Include stdint.h unconditionally.
9884 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9886 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9887 on BFD_HAVE_SYS_PROCFS_TYPE.
9888 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9889 * configure: Regenerate.
9890 * config.in: Likewise.
9892 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9894 * Makefile.in (clean): Also remove x32.c x32-linux.c
9895 x32-avx.c x32-avx-linux.c.
9896 (x32.o): New target.
9898 (x32-linux.o): Likewise.
9899 (x32-linux.c): Likewise.
9900 (x32-avx.o): Likewise.
9901 (x32-avx.c): Likewise.
9902 (x32-avx-linux.o): Likewise.
9903 (x32-avx-linux.c): Likewise.
9905 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9906 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9907 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9908 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9909 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9910 i386/x32-avx-linux.xml.
9912 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9913 (init_registers_x32_avx_linux): Likwise.
9914 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9915 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9917 2012-04-13 Pedro Alves <palves@redhat.com>
9919 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9920 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9921 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9922 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9925 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9927 * linux-x86-low.c (compat_x32_clock_t): New.
9928 (compat_x32_siginfo_t): Likewise.
9929 (compat_x32_siginfo_from_siginfo): Likewise.
9930 (siginfo_from_compat_x32_siginfo): Likewise.
9931 (linux_is_elf64): Likewise.
9932 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9933 and siginfo_from_compat_x32_siginfo for x32.
9934 (x86_arch_setup): Set linux_is_elf64.
9936 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9939 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9941 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9942 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9943 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9944 compatible with process.
9946 2012-04-12 Yao Qi <yao@codesourcery.com>
9948 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9949 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9950 (install-only, install-info, clean): Handle sub dir gnulib.
9951 (all-lib, am--refresh): New targets.
9952 (memmem.o): Remove target.
9953 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9954 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9955 (AC_REPLACE_FUNCS): Remove memmem.
9956 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9957 (AC_OUTPUT): Generate Makefile in gnulib/.
9958 * aclocal.m4, config.in, configure: Regenerated.
9960 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9962 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9964 2012-04-05 Pedro Alves <palves@redhat.com>
9966 -Werror=strict-aliasing
9968 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9971 2012-04-04 Pedro Alves <palves@redhat.com>
9973 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9974 (sparc_store_gregset_from_stack, sparc_store_gregset)
9975 (sparc_breakpoint_at): Fix formatting.
9977 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9979 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9981 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9982 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9983 * config.in: Regenerate.
9984 * configure: Likewise.
9986 2012-03-29 Pedro Alves <palves@redhat.com>
9988 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9989 Correct ptrace arguments.
9991 2012-03-28 Pedro Alves <palves@redhat.com>
9993 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9994 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9995 (IA64_FR1_REGNUM): New defines.
9996 (ia64_fetch_register): New.
9997 (the_low_target): Install it.
9998 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10000 * linux-low.c (linux_fetch_registers): Try the
10001 the_low_target.fetch_register hook first.
10003 * linux-arm-low.c (the_low_target): Adjust.
10004 * linux-bfin-low.c (the_low_target): Adjust.
10005 * linux-cris-low.c (the_low_target): Adjust.
10006 * linux-crisv32-low.c (the_low_target): Adjust.
10007 * linux-m32r-low.c (the_low_target): Adjust.
10008 * linux-m68k-low.c (the_low_target): Adjust.
10009 * linux-mips-low.c (the_low_target): Adjust.
10010 * linux-ppc-low.c (the_low_target): Adjust.
10011 * linux-s390-low.c (the_low_target): Adjust.
10012 * linux-sh-low.c (the_low_target): Adjust.
10013 * linux-sparc-low.c (the_low_target): Adjust.
10014 * linux-tic6x-low.c (the_low_target): Adjust.
10015 * linux-x86-low.c (the_low_target): Adjust.
10016 * linux-xtensa-low.c (the_low_target): Adjust.
10018 2012-03-26 Pedro Alves <palves@redhat.com>
10020 * server.c (handle_qxfer_libraries): Don't bail early if
10021 the_target->qxfer_libraries_svr4 is not NULL.
10023 2012-03-26 Pedro Alves <palves@redhat.com>
10025 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10027 2012-03-23 Pedro Alves <palves@redhat.com>
10029 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10030 "library-list-svr4" element's start tag when the the DSO list is
10033 2012-03-23 Pedro Alves <palves@redhat.com>
10035 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10036 a variable whose type size is the same as the inferior's pointer
10039 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10041 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10043 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10044 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10045 * linux-low.h: Include <signal.h>.
10046 (struct siginfo): Remove forward declaration.
10047 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10050 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10052 * .gitignore: Ignore more files.
10054 2012-03-19 Pedro Alves <palves@redhat.com>
10055 Jan Kratochvil <jan.kratochvil@redhat.com>
10057 * server.c (cont_thread, general_thread): Add describing comments.
10058 (start_inferior): Clear `cont_thread'.
10059 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10062 2012-03-15 Yao Qi <yao@codesourcery.com>
10064 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10066 (cmd_qtdp): ... here.
10068 2012-03-15 Yao Qi <yao@codesourcery.com>
10070 * tracepoint.c (struct tracepoint_action_ops): New.
10071 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10072 (m_tracepoint_action_download): New.
10073 (r_tracepoint_action_download): New.
10074 (x_tracepoint_action_download): New.
10075 (l_tracepoint_action_download): New.
10076 (add_tracepoint_action): Install `action->ops' according type.
10077 (download_tracepoint_1): Move code `download' function pointer
10078 of various tracepoint_action_ops.
10080 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10082 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10083 linux_ptrace_attach_warnings.
10085 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10087 * Makefile.in (linux-ptrace.o): New.
10088 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10089 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10090 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10091 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10092 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10094 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10096 2012-03-08 Yao Qi <yao@codesourcery.com>
10097 Pedro Alves <palves@redhat.com>
10099 Fix PR server/13392.
10100 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10101 offset of JMP insn.
10102 * tracepoint.c (remove_tracepoint): New.
10103 (cmd_qtdp): Call remove_tracepoint when failed to install.
10105 2012-03-07 Pedro Alves <palves@redhat.com>
10107 * linux-low.c (get_detach_signal): New.
10108 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10109 Pass on pending signals to PTRACE_DETACH. Check the result of the
10111 * server.c (program_signals, program_signals_p): New.
10112 (handle_general_set): Handle QProgramSignals.
10113 * server.h (program_signals, program_signals_p): Declare.
10115 2012-03-05 Pedro Alves <palves@redhat.com>
10116 Jan Kratochvil <jan.kratochvil@redhat.com>
10118 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10121 2012-03-03 Yao Qi <yao@codesourcery.com>
10123 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10124 agent_look_up_symbols.
10126 2012-03-03 Yao Qi <yao@codesourcery.com>
10128 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10129 (linux-x86-low.o): Likewise.
10130 * server.h: Remove in_process_agent_loaded.
10131 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10135 2012-03-03 Yao Qi <yao@codesourcery.com>
10137 * tracepoint.c (gdb_agent_capability): New global.
10138 (in_process_agent_loaded_ust): Renamed to
10139 `in_process_agent_supports_ust'.
10141 (in_process_agent_supports_ust): Call agent_capability_check.
10142 (clear_installed_tracepoints): Assert that agent supports
10145 2012-03-03 Yao Qi <yao@codesourcery.com>
10147 * linux-low.c (linux_supports_agent): New.
10148 (linux_target_ops): Initialize field `supports_agent' with
10149 linux_supports_agent.
10150 * target.h (struct target_ops) <supports_agent>: New.
10151 (target_supports_agent): New macro.
10152 * server.c (handle_general_set): Handle packet 'QAgent'.
10153 (handle_query): Send `QAgent+'.
10154 * Makefile.in (server.o): Depends on agent.h.
10156 2012-03-03 Yao Qi <yao@codesourcery.com>
10158 * Makefile.in (OBS): Add agent.o.
10159 Add new rule for agent.o.
10160 Track dependence of tracepoint.c on agent.h.
10161 * tracepoint.c (run_inferior_command_1):
10162 (run_inferior_command): Call agent_run_command.
10163 (gdb_ust_connect_sync_socket): Deleted. Move it to
10165 (resume_thread, stop_thread): Likewise.
10166 (gdb_ust_socket_init): Renamed to ...
10167 (gdb_agent_socket_init): ... New.
10168 (gdb_ust_thread): Renamed to ...
10169 (gdb_agent_helper_thread): ... New.
10170 (gdb_ust_init): Move some code to ...
10171 (gdb_agent_init): ... here. New.
10172 [HAVE_UST]: Call gdb_ust_init.
10173 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10174 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10175 * config.in, configure: Regenerated.
10177 2012-03-02 Pedro Alves <palves@redhat.com>
10179 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10180 * linux-low.c (struct simple_pid_list): New.
10181 (stopped_pids): New a struct simple_pid_list pointer.
10182 (add_to_pid_list, pull_pid_from_list): New.
10183 (handle_extended_wait): Don't assume the first signal new children
10184 report is SIGSTOP. Adjust call to pull_pid_from_list.
10185 (linux_wait_for_lwp): Adjust.
10187 2012-03-02 Yao Qi <yao@codesourcery.com>
10189 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10192 2012-03-02 Yao Qi <yao@codesourcery.com>
10194 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10195 `stop_pc' and `tpoint'. Update caller.
10197 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10199 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10200 * linux-low.c (use_linux_regsets): New macro.
10201 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10202 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10203 (linux_register_in_regsets): New function.
10204 (usr_fetch_inferior_registers): Skip registers covered by
10206 (usr_store_inferior_registers): Likewise.
10207 (usr_fetch_inferior_registers): New macro.
10208 (usr_store_inferior_registers): Likewise.
10209 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10210 (linux_store_registers): Likewise.
10211 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10213 (init_registers_mips64_dsp_linux): Likewise.
10214 (init_registers_mips_linux): New macro.
10215 (init_registers_mips_dsp_linux): Likewise.
10216 (mips_dsp_num_regs): Likewise.
10217 (DSP_BASE, DSP_CONTROL): New fallback macros.
10218 (mips_base_regs): New macro.
10219 (mips_regmap): Use it. Fix the size.
10220 (mips_dsp_regmap): New variable.
10221 (mips_dsp_regset_bitmap): Likewise.
10222 (mips_arch_setup): New function.
10223 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10225 (mips_cannot_store_register): Likewise.
10226 (the_low_target): Update .arch_setup, .num_regs and .regmap
10227 initializers. Add .regset_bitmap initializer.
10228 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10230 * linux-bfin-low.c (the_low_target): Likewise.
10231 * linux-cris-low.c (the_low_target): Likewise.
10232 * linux-crisv32-low.c (the_low_target): Likewise.
10233 * linux-ia64-low.c (the_low_target): Likewise.
10234 * linux-m32r-low.c (the_low_target): Likewise.
10235 * linux-m68k-low.c (the_low_target): Likewise.
10236 * linux-ppc-low.c (the_low_target): Likewise.
10237 * linux-s390-low.c (the_low_target): Likewise.
10238 * linux-sh-low.c (the_low_target): Likewise.
10239 * linux-sparc-low.c (the_low_target): Likewise.
10240 * linux-tic6x-low.c (the_low_target): Likewise.
10241 * linux-x86-low.c (the_low_target): Likewise.
10242 * linux-xtensa-low.c (the_low_target): Likewise.
10243 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10244 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10245 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10247 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10248 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10250 2012-02-29 Yao Qi <yao@codesourcery.com>
10251 Pedro Alves <palves@redhat.com>
10253 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10254 `step_over_finished' is true.
10256 2012-02-27 Pedro Alves <palves@redhat.com>
10258 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10259 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10261 2012-02-27 Pedro Alves <palves@redhat.com>
10264 * linux-low.c (pid_is_stopped): New.
10265 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10267 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10269 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10272 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10274 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10276 2012-02-24 Luis Machado <lgustavo@codesourcery>
10278 * server.c (handle_query): Advertise support for target-side
10279 breakpoint condition evaluation.
10280 (process_point_options): New function.
10281 (process_serial_event): When inserting a breakpoint, check for
10282 a target-side condition that should be evaluated.
10284 * mem-break.c: Include regcache.h and ax.h.
10285 (point_cond_list_t): New data structure.
10286 (breakpoint) <cond_list>: New field.
10287 (find_gdb_breakpoint_at): Make non-static.
10288 (delete_gdb_breakpoint_at): Clear any target-side
10290 (clear_gdb_breakpoint_conditions): New function.
10291 (add_condition_to_breakpoint): Likewise.
10292 (add_breakpoint_condition): Likewise.
10293 (gdb_condition_true_at_breakpoint): Likewise.
10294 (gdb_breakpoint_here): Return result directly instead
10295 of going through a local variable.
10297 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10298 (clear_gdb_breakpoint_conditions): Likewise.
10299 (add_breakpoint_condition): Likewise.
10300 (gdb_condition_true_at_breakpoint): Likewise.
10302 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10303 (need_step_over_p): Take target-side breakpoint condition into
10306 2012-02-24 Luis Machado <lgustavo@codesourcery>
10308 * server.h: Include tracepoint.h.
10309 (agent_mem_read, agent_get_trace_state_variable_value,
10310 agent_set_trace_state_variable_value,
10311 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10312 get_set_tsv_func_addr): New prototypes.
10314 * ax.h: New include file.
10315 * ax.c: New source file.
10317 * tracepoint.c: Include ax.h.
10318 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10319 agent_expr, eval_result_type): Move to ax.h.
10320 (parse_agent_expr): Rename to ...
10321 (gdb_parse_agent_expr): ... this, make it non-static and move
10323 (unparse_agent_expr) Rename to ...
10324 (gdb_unparse_agent_expr): ... this, make it non-static and move
10326 (eval_agent_expr): Rename to ...
10327 (eval_tracepoint_agent_expr): ... this.
10328 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10329 forward declarations.
10330 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10331 (agent_get_trace_state_variable_value): New function.
10332 (agent_set_trace_state_variable_value): New function.
10333 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10334 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10335 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10336 (condition_true_at_tracepoint): Likewise.
10337 (parse_agent_expr): Rename to ...
10338 (gdb_parse_agent_expr): ... this and move to ax.c.
10339 (unparse_agent_expr): Rename to ...
10340 (gdb_unparse_agent_expr): ... this and move to ax.c.
10341 (gdb_agent_op_name): Move to ax.c.
10342 (eval_agent_expr): Rename to ...
10343 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10345 (eval_tracepoint_agent_expr): New function.
10346 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10348 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10350 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10351 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10352 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10353 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10354 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10355 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10356 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10357 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10358 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10359 (compile_bytecodes): Remove forward declaration.
10360 (is_goto_target): Move to ax.c.
10361 (compile_bytecodes): Move to ax.c and call
10362 agent_get_trace_state_variable_value (...) and
10363 agent_set_trace_state_variable_value (...).
10365 * Makefile.in: Update ax.c and IPA dependencies.
10367 2012-02-24 Pedro Alves <palves@redhat.com>
10369 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10370 (cmd_bigqtbuffer_circular): ... this. Only handle
10371 'QTBuffer:circular:'.
10372 (handle_tracepoint_general_set): Adjust.
10374 2012-02-16 Yao Qi <yao@codesourcery.com>
10376 * inferiors.c: Move code to ...
10377 * dll.c: .... here. New.
10378 * server.h: Declare clear_dlls.
10379 * Makefile.in (SFILES): Add dll.c.
10383 2012-02-11 Yao Qi <yao@codesourcery.com>
10385 * server.c: (handle_monitor_command): Add a new parameter
10387 (handle_query): Update caller.
10389 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10391 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10392 * configure, config.in: Regenerate.
10393 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10396 2012-02-02 Pedro Alves <palves@redhat.com>
10398 Try SIGKILL first, then PTRACE_KILL.
10399 * linux-low.c (linux_kill_one_lwp): New.
10400 (linux_kill_one_lwp): Rename to ...
10401 (kill_one_lwp_callback): ... this. Use the new
10402 linux_kill_one_lwp.
10404 2012-02-02 Pedro Alves <palves@redhat.com>
10406 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10409 2012-01-27 Pedro Alves <palves@redhat.com>
10411 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10412 (elf_64_file_p): Make static.
10413 (linux_pid_exe_is_elf_64_file): New.
10414 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10415 Delete declarations.
10416 (linux_pid_exe_is_elf_64_file): Declare.
10417 * linux-x86-low.c (x86_arch_setup): Use
10418 linux_pid_exe_is_elf_64_file.
10420 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10422 * linux-low.c (linux_wait_for_event_1): Rename to ...
10423 (linux_wait_for_event): ... here and merge it with former
10424 linux_wait_for_event - new variable wait_ptid, use it.
10425 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10427 2012-01-23 Pedro Alves <palves@redhat.com>
10429 * server.c (main): Avoid yet another case of infinite loop while
10430 detaching/killing after a longjmp.
10432 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10435 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10437 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10439 * hostio.c (handle_readlink): New function.
10440 (handle_vFile): Call it to handle "vFile:readlink" packets.
10442 2012-01-20 Pedro Alves <palves@redhat.com>
10443 Ulrich Weigand <ulrich.weigand@linaro.org>
10445 * server.c (handle_v_requests): Only support vAttach and vRun to
10446 start multiple processes when in extended protocol mode.
10448 2012-01-17 Pedro Alves <palves@redhat.com>
10450 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10451 memalign plus mprotect to allocate the scratch buffer.
10453 2012-01-13 Pedro Alves <palves@redhat.com>
10455 * server.c (attach_inferior): Clear `cont_thread'.
10457 2012-01-13 Pedro Alves <palves@redhat.com>
10459 * server.c (main): Avoid infinite loop while detaching/killing
10462 2012-01-09 Doug Evans <dje@google.com>
10464 * server.c (start_inferior): Set last_ptid in --wrapper case.
10466 2012-01-06 Yao Qi <yao@codesourcery.com>
10468 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10470 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10472 2012-01-04 Yao Qi <yao@codesourcery.com>
10474 * tracepoint.c (cmd_qtdp): Print debug message
10475 for static tracepoint.
10477 2012-01-04 Yao Qi <yao@codesourcery.com>
10479 * tracepoint.c (trace_vdebug): Differentiate debug message
10480 between gdbserver and IPA.
10482 2012-01-03 Yao Qi <yao@codesourcery.com>
10484 * tracepoint.c (tracepoint_was_hit): Don't collect for
10487 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10489 * terminal.h: Reformat copyright header.
10491 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10493 * server.c (gdbserver_version): Update copyright year.
10494 * gdbreplay.c (gdbreplay_version): Likewise.
10496 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10498 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10501 2011-12-18 Hui Zhu <teawater@gmail.com>
10502 * linux-low.c (linux_create_inferior): Save return value to ret.
10504 2011-12-18 Hui Zhu <teawater@gmail.com>
10506 * linux-low.c (linux_create_inferior): Save return value to ret.
10508 2011-12-16 Doug Evans <dje@google.com>
10510 * linux-low.c (linux_create_inferior): If stdio connection,
10511 redirect stdin from /dev/null, stdout to stderr.
10512 * remote-utils.c (remote_is_stdio): New static global.
10513 (remote_connection_is_stdio): New function.
10514 (remote_prepare): Handle stdio connection.
10515 (remote_open): Ditto.
10516 (remote_close): Don't close stdin for stdio connections.
10517 (read_prim,write_prim): New functions. Replace all calls to
10518 read/write to these.
10519 * server.c (main): Watch for "-" argument. Move call to
10520 remote_prepare before start_inferior.
10521 * server.h (STDIO_CONNECTION_NAME): New macro.
10522 (remote_connection_is_stdio): Declare.
10524 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10525 in debugging output.
10527 2011-12-15 Yao Qi <yao@codesourcery.com>
10529 * tracepoint.c: Include sys/syscall.h.
10530 (gdb_ust_thread): Remove preprocessor conditional.
10532 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10534 * linux-low.c (linux_detach_one_lwp): Call
10535 the_low_target.prepare_to_resume before detaching.
10537 2011-12-14 Yao Qi <yao@codesourcery.com>
10539 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10542 2011-12-14 Yao Qi <yao@codesourcery.com>
10544 * i386-low.c (i386_low_stopped_data_address): Initialize local
10545 variable `control'.
10547 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10551 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10552 DR_CONTROL unless necessary. Extend comments.
10553 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10554 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10556 2011-12-13 Yao Qi <yao@codesourcery.com>
10558 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10560 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10562 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10564 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10565 Print new debug message for such case.
10567 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10569 Fix overlapping memcpy.
10570 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10571 the read_inferior_memory transfer.
10572 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10573 write_inferior_memory transfer.
10574 (set_fast_tracepoint_jump): New variable buf. Use it for the
10575 read_inferior_memory and write_inferior_memory transfers.
10576 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10577 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10578 Use it for the write_inferior_memory transfer.
10579 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10582 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10584 * linux-low.c (fetch_register, store_register): Make code
10585 consistent, fix formatting.
10587 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10589 * linux-low.c (usr_store_inferior_registers): Factor out code
10590 to handle individual registers into...
10591 (store_register): ... this new function.
10593 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10595 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10596 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10597 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10598 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10599 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10600 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10601 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10602 (srv_xmlfiles): Add new XML files.
10604 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10606 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10607 (init_registers_s390_linux32v1): Add prototype.
10608 (init_registers_s390_linux32v2): Likewise.
10609 (init_registers_s390_linux64v1): Likewise.
10610 (init_registers_s390_linux64v2): Likewise.
10611 (init_registers_s390x_linux64v1): Likewise.
10612 (init_registers_s390x_linux64v2): Likewise.
10613 (s390_num_regs): Increment to 52.
10614 (s390_regmap): Add orig_r2 register.
10615 (s390_num_regs_3264): Increment to 68.
10616 (s390_regmap_3264): Add orig_r2 register.
10617 (s390_collect_ptrace_register): Handle orig_r2 register.
10618 (s390_supply_ptrace_register): Likewise.
10619 (s390_fill_last_break): New function.
10620 (s390_store_last_break): Likewise.
10621 (s390_fill_system_call): New function.
10622 (s390_store_system_call): Likewise.
10623 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10625 (s390_check_regset): New function.
10626 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10627 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10628 Update target_regsets for available register sets.
10630 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10631 Jan Kratochvil <jan.kratochvil@redhat.com>
10633 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10634 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10636 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10637 * linux-low.h (struct process_info_private): New member r_debug.
10638 * server.c (handle_qxfer_libraries): Call
10639 the_target->qxfer_libraries_svr4.
10640 (handle_qxfer_libraries_svr4): New function.
10641 (qxfer_packets): New entry "libraries-svr4".
10642 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10643 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10644 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10645 PACKET_qXfer_libraries_svr4.
10647 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10649 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10650 PSW address/mask between 8-byte and 16-byte formats.
10651 (s390_supply_ptrace_register): Likewise.
10652 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10653 basic addressing mode bit.
10655 2011-11-24 Stan Shebs <stan@codesourcery.com>
10657 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10659 2011-11-17 Stan Shebs <stan@codesourcery.com>
10661 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10662 (tracing_start_time): New global.
10663 (tracing_stop_time): New global.
10664 (tracing_user_name): New global.
10665 (tracing_notes): New global.
10666 (tracing_stop_note): New global.
10667 (cmd_qtstart): Set traceframe_usage, start_time.
10668 (stop_tracing): Set stop_time.
10669 (cmd_qtstatus): Report additional status.
10670 (cmd_qtp): New function.
10671 (handle_tracepoint_query): Call it.
10672 (cmd_qtnotes): New function.
10673 (handle_tracepoint_general_set): Call it.
10674 (get_timestamp): Rename from tsv_get_timestamp.
10676 2011-11-14 Stan Shebs <stan@codesourcery.com>
10677 Kwok Cheung Yeung <kcy@codesourcery.com>
10679 * linux-x86-low.c (small_jump_insn): New.
10680 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10681 trampoline and error message, build a trampoline and issue a small
10682 jump instruction to it.
10683 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10684 trampoline and error message.
10685 (x86_get_min_fast_tracepoint_insn_len): New.
10686 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10687 * linux-low.h (struct linux_target_ops): Add arguments to
10688 install_fast_tracepoint_jump_pad operation, add new operation.
10689 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10691 (linux_get_min_fast_tracepoint_insn_len): New function.
10692 (linux_target_op): Add new operation.
10693 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10694 (gdb_trampoline_buffer_end): Ditto.
10695 (gdb_trampoline_buffer_error): Ditto.
10696 (struct ipa_sym_addresses): Add fields for new IPA variables.
10697 (symbol_list): Add entries for new IPA variables.
10698 (struct tracepoint): Add fields to hold the address range of the
10699 trampoline used by the tracepoint.
10700 (trampoline_buffer_head): New static variable.
10701 (trampoline_buffer_tail): Ditto.
10702 (claim_trampoline_space): New function.
10703 (have_fast_tracepoint_trampoline_buffer): New function.
10704 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10706 (install_fast_tracepoint): Ditto, also add error buffer argument.
10707 (cmd_qtminftpilen): New function.
10708 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10709 (fast_tracepoint_from_trampoline_address): New function.
10710 (fast_tracepoint_collecting): Handle trampoline as part of jump
10712 (set_trampoline_buffer_space): New function.
10713 (initialize_tracepoint): Initialize new IPA variables.
10714 * target.h (struct target_ops): Add arguments to
10715 install_fast_tracepoint_jump_pad operation, add new
10716 get_min_fast_tracepoint_insn_len operation.
10717 (target_get_min_fast_tracepoint_insn_len): New.
10718 (install_fast_tracepoint_jump_pad): Add arguments.
10719 * server.h (IPA_BUFSIZ): Define.
10720 * linux-i386-ipa.c: Include extra header files.
10721 (initialize_fast_tracepoint_trampoline_buffer): New function.
10722 (initialize_low_tracepoint): Call it.
10723 * server.h (set_trampoline_buffer_space): Declare.
10724 (claim_trampoline_space): Ditto.
10725 (have_fast_tracepoint_trampoline_buffer): Ditto.
10727 2011-11-14 Yao Qi <yao@codesourcery.com>
10729 * server.c (handle_query): Handle InstallInTrace for qSupported.
10730 * tracepoint.c (add_tracepoint): Sort list.
10731 (install_tracepoint, download_tracepoint): New.
10732 (cmd_qtdp): Call them to install and download tracepoints.
10733 (sort_tracepoints): Removed.
10734 (cmd_qtstart): Update.
10736 2011-11-14 Yao Qi <yao@codesourcery.com>
10738 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10739 * mem-break.h: Declare.
10740 * tracepoint.c (cmd_qtstart): Move some code to ...
10741 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10743 (download_tracepoints): Move some code to ...
10744 (download_tracepoint_1): ... here. New.
10746 2011-11-08 Yao Qi <yao@codesourcery.com>
10748 * remote-utils.c (relocate_instruction): A comment fix.
10750 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10752 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10753 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10754 dr_status_mirror and dr_control_mirror from debug_reg_state.
10755 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10756 (i386_initial_stuff): Remove use of deleted globals.
10757 (i386_get_thread_context, i386_set_thread_context,
10758 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10759 from debug_reg_state.
10761 2011-11-05 Yao Qi <yao@codesourcery.com>
10763 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10764 address as TPOINT's.
10766 2011-11-02 Stan Shebs <stan@codesourcery.com>
10768 * tracepoint.c (agent_mem_read_string): New function.
10769 (eval_agent_expr): Call it for tracenz.
10770 * server.c (handle_query): Report support for tracenz.
10772 2011-11-02 Yao Qi <yao@codesourcery.com>
10774 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10776 2011-11-02 Yao Qi <yao@codesourcery.com>
10778 * target.h: Fix a typo in comment.
10780 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10782 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10783 clobber the breakpoints' shadows with fast tracepoint jumps.
10784 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10785 * target.c (write_inferior_memory): Also pass MYADDR down to
10788 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10790 * configure.ac: Check support for personality routine.
10791 * configure: Regenerate.
10792 * config.in: Likewise.
10793 * linux-low.c: Include <sys/personality.h>.
10794 Define ADDR_NO_RANDOMIZE if necessary.
10795 (linux_create_inferior): Disable address space randomization when
10796 forking inferior, if requested.
10797 (linux_supports_disable_randomization): New function.
10798 (linux_target_ops): Install it.
10799 * server.h (disable_randomization): Declare.
10800 * server.c (disable_randomization): New global variable.
10801 (handle_general_set): Handle QDisableRandomization.
10802 (handle_query): Likewise for qSupported.
10803 (main): Support --disable-randomization and --no-disable-randomization
10804 command line arguments.
10805 * target.h (struct target_ops): Add supports_disable_randomization.
10806 (target_supports_disable_randomization): New macro.
10808 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10810 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10812 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10813 [!PT_GETDSBT] (target_loadmap): New definition.
10814 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10815 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10816 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10817 and PT_GETDSBT to LINUX_LOADMAP.
10818 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10819 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10821 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10823 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10824 (arm_linux_hwbp_cap): New static variable.
10825 (arm_linux_get_hwbp_cap): Replace by ...
10826 (arm_linux_init_hwbp_cap): ... this new function.
10827 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10828 (arm_linux_get_hw_watchpoint_count): Likewise.
10829 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10830 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10831 (arm_prepare_to_resume): Use perror_with_name instead of error.
10833 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10835 * linux-arm-low.c: Include <signal.h>.
10836 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10837 (struct arm_linux_hwbp_cap): New data type.
10838 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10839 (struct arm_linux_hw_breakpoint): New data type.
10840 (MAX_BPTS, MAX_WPTS): Define.
10841 (struct arch_process_info, struct arch_lwp_info): New data types.
10842 (arm_linux_get_hwbp_cap): New function.
10843 (arm_linux_get_hw_breakpoint_count): Likewise.
10844 (arm_linux_get_hw_watchpoint_count): Likewise.
10845 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10846 (arm_hwbp_control_initialize): Likewise.
10847 (arm_hwbp_control_is_enabled): Likewise.
10848 (arm_hwbp_control_is_initialized): Likewise.
10849 (arm_hwbp_control_disable): Likewise.
10850 (arm_linux_hw_breakpoint_equal): Likewise.
10851 (arm_linux_hw_point_initialize): Likewise.
10852 (struct update_registers_data): New data structure.
10853 (update_registers_callback: New function.
10854 (arm_insert_point): Likewise.
10855 (arm_remove_point): Likewise.
10856 (arm_stopped_by_watchpoint): Likewise.
10857 (arm_stopped_data_address): Likewise.
10858 (arm_new_process): Likewise.
10859 (arm_new_thread): Likewise.
10860 (arm_prepare_to_resume): Likewise.
10861 (the_low_target): Register arm_insert_point, arm_remove_point,
10862 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10863 arm_new_thread, and arm_prepare_to_resume.
10865 2011-09-15 Stan Shebs <stan@codesourcery.com>
10867 * server.h (struct emit_ops): Add compare-goto fields.
10868 * tracepoint.c (gdb_agent_op_sizes): New table.
10869 (emit_eq_goto): New function.
10870 (emit_ne_goto): New function.
10871 (emit_lt_goto): New function.
10872 (emit_le_goto): New function.
10873 (emit_gt_goto): New function.
10874 (emit_ge_goto): New function.
10875 (is_goto_target): New function.
10876 (compile_bytecodes): Recognize special cases of compare-goto
10877 combinations and call specialized emitters for them.
10878 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10879 (amd64_emit_ne_goto): New function.
10880 (amd64_emit_lt_goto): New function.
10881 (amd64_emit_le_goto): New function.
10882 (amd64_emit_gt_goto): New function.
10883 (amd64_emit_ge_goto): New function.
10884 (amd64_emit_ops): Add the new functions.
10885 (i386_emit_eq_goto): New function.
10886 (i386_emit_ne_goto): New function.
10887 (i386_emit_lt_goto): New function.
10888 (i386_emit_le_goto): New function.
10889 (i386_emit_gt_goto): New function.
10890 (i386_emit_ge_goto): New function.
10891 (i386_emit_ops): Add the new functions.
10893 2011-09-08 Stan Shebs <stan@codesourcery.com>
10895 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10896 (i386_emit_epilogue): Restore %ebx.
10898 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10900 * server.c (step_thread): Remove definition.
10901 (process_serial_event): Don't handle Hs.
10902 * server.h (step_thread): Remove declaration.
10903 * target.c (set_desired_inferior): Remove use of step_thread.
10905 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10907 * linux-low.c: Include linux-procfs.h.
10908 (linux_attach_lwp_1): Update comments.
10909 (linux_attach): Scan for existing threads when attaching to a
10910 process that is the tgid.
10911 * Makefile.in: Update dependencies.
10913 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10915 * configure.srv: Add linux-procfs.o dependencies.
10917 2011-08-14 Yao Qi <yao@codesourcery.com>
10919 * target.h (struct target_ops): Fix indent.
10920 * win32-low.c (win32_target_ops): Fix comment.
10922 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10923 Yao Qi <yao@codesourcery.com>
10925 * Makefile.in (clean): Remove tic6x-*.c files.
10926 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10927 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10928 (tic6x-c64xp-linux.c): Likewise.
10929 * configure.srv: Add support for tic6x-*-uclinux.
10930 * linux-tic6x-low.c: New.
10931 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10933 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10934 Yao Qi <yao@codesourcery.com>
10936 * target.h (struct target_ops): Add read_loadmap.
10937 * linux-low.c (struct target_loadseg): New type.
10938 (struct target_loadmap): New type.
10939 (linux_read_loadmap): New function.
10940 (linux_target_ops): Add linux_read_loadmap.
10941 * server.c (handle_query): Support qXfer:fdpic:read packet.
10942 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10945 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10947 * win32-low.c: Include <stdint.h>.
10949 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10951 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10952 to the inferior here.
10953 (i386_remove_aligned_watchpoint): Ditto.
10954 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10955 fit part of the watchpoint in the debug registers.
10956 (i386_update_inferior_debug_regs): New.
10957 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10958 registers, and only update the inferior on success.
10959 (i386_low_remove_watchpoint): Ditto.
10961 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10963 * linux-low.c (compare_ints, unique, list_threads, show_process,
10964 linux_core_of_thread): Delete.
10965 (linux_target_ops): Change linux_core_of_thread to
10966 linux_common_core_of_thread.
10967 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10968 * utils.c (malloc_failure): Change type of argument.
10969 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10970 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10971 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10972 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10973 (IPA_OBJS): Add common-utils-ipa.o.
10974 (ptid_h, linux_osdata_h): New macros.
10975 (server_h): Add common/common-utils.h, common/xml-utils.h,
10976 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10978 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10979 ptid.o, buffer.o): New rules.
10980 (linux-low.o): Add common/linux-osdata.h as a dependency.
10981 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10982 * configure.ac: Add AC_HEADER_DIRENT check.
10983 * config.in: Regenerate.
10984 * configure: Regenerate.
10985 * remote-utils.c (xml_escape_text): Delete.
10986 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10987 buffer_xml_printf): Move to common/buffer.c.
10988 * server.c (main): Remove call to initialize_inferiors.
10989 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10990 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10991 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10992 internal_error, gdb_assert, gdb_assert_fail): Delete.
10993 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10994 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10996 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10997 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10998 initialize_inferiors): Delete.
11000 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11002 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11005 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11007 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11009 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11011 2011-05-26 Yao Qi <yao@codesourcery.com>
11013 * Makefile.in (thread-db.o): Track dependence to
11014 common/gdb_thread_db.h.
11015 * thread-db.c: include gdb_thread_db.h from right place.
11017 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11019 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11020 __FILE__ and __LINE__ to internal_error.
11022 2011-05-13 Doug Evans <dje@google.com>
11024 * thread-db.c (try_thread_db_load_from_sdir): New function.
11025 (try_thread_db_load_from_dir): New function.
11026 (thread_db_load_search): Handle $sdir, ignore $pdir.
11027 Remove trying of system directories if search of
11028 libthread-db-search-path fails, that is now done via $sdir.
11030 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11032 * server.c (handle_query): Add EnableDisableTracepoints to the list
11033 of supported features.
11034 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11036 (cmd_qtenable_disable): New.
11037 (cmd_qtstart): Install tracepoints even if disabled.
11038 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11039 receiving a QTEnable or QTDisable packet.
11040 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11041 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11043 (gdb_probe): Skip data collection if static tracepoint is disabled.
11045 2011-05-10 Doug Evans <dje@google.com>
11047 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11049 2011-05-04 Doug Evans <dje@google.com>
11051 * linux-low.c (linux_join): Skip process lookup.
11052 * spu-low.c (spu_join): Ditto.
11053 * server.c (join_inferiors_callback): Delete.
11054 (process_serial_event): For 'D' packet (detach) call join_inferior
11057 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11059 * README: Don't mention xscale*-*-linux*.
11060 * configure.srv (xscale*-*-linux*): Don't handle target.
11062 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11064 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11066 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11067 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11068 (i386_emit_void_call_2): Likewise.
11070 2011-04-26 Yao Qi <yao@codesourcery.com>
11072 * linux-low.c: Move common macros to linux-ptrace.h.
11073 Include linux-ptrace.h.
11074 * Makefile.in (linux_ptrace_h): New.
11075 (linux-low.o): Depends on linux-ptrace.h.
11077 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11079 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11080 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11081 (remote_prepare): New function with most of the TCP code from ...
11082 (remote_open): ... here. Detect PORT here unconditionally. Move also
11083 setting transport_is_reliable.
11084 * server.c (run_once): New variable.
11085 (gdbserver_usage): Document it.
11086 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11087 the first run if RUN_ONCE.
11088 * server.h (run_once, remote_prepare): New declarations.
11090 2011-04-19 Tom Tromey <tromey@redhat.com>
11092 * win32-low.c (handle_load_dll): Remove duplicate "the".
11094 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11096 Remove support for old Cygwin 1.5 versions.
11097 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11098 function to avoid warning.
11099 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11102 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11104 * gdbserver/server.h (Macro _): Define it if not available.
11106 2011-03-14 Michael Snyder <msnyder@vmware.com>
11108 * hostio.c (handle_close): Remove unnecessary null test.
11110 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11112 * Makefile.in (maintainer-clean realclean distclean): Remove
11113 "make ... subdir_do" command.
11115 2011-03-10 Michael Snyder <msnyder@vmware.com>
11117 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11119 * server.c (handle_v_run): Free alloced buffer on early return.
11121 2011-03-09 Yao Qi <yao@codesourcery.com>
11124 2011-03-04 Yao Qi <yao@codesourcery.com>
11126 * Makefile.in: Remove GNU make feature --directory.
11128 2011-03-05 Yao Qi <yao@codesourcery.com>
11130 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11131 (subdir_do): New make target. Copied from gdb/Makefile.
11132 (maintainer-clean, realclean, distclean, clean): Call corresponding
11133 make targets in common/Makefile.
11135 2011-02-11 Yao Qi <yao@codesourcery.com>
11137 * configure.ac: Call AC_PROG_RANLIB.
11138 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11139 * configure: Regenerate.
11141 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11143 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11145 2011-03-06 Yao Qi <yao@codesourcery.com>
11147 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11149 2011-03-05 Yao Qi <yao@codesourcery.com>
11151 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11152 (subdir_do): New make target. Copied from gdb/Makefile.
11153 (maintainer-clean, realclean, distclean, clean): Call corresponding
11154 make targets in common/Makefile.
11156 2011-03-04 Yao Qi <yao@codesourcery.com>
11158 * Makefile.in: Remove GNU make feature --directory.
11160 2011-03-04 Michael Snyder <msnyder@vmware.com>
11162 * server.c (queue_stop_reply): Call xmalloc not malloc.
11164 2011-03-02 Michael Snyder <msnyder@vmware.com>
11166 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11168 2011-02-28 Michael Snyder <msnyder@vmware.com>
11170 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11171 (cmd_qtframe): Ditto.
11172 (cmd_qtbuffer): Ditto.
11173 (cmd_bigqtbuffer): Ditto.
11175 * utils.c (decimal2str): Initialize 'width' to nine, then
11176 don't mess with it.
11178 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11180 * hostio.c (require_data): Free *data, not data.
11182 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11184 * hostio.c (require_data): Use free, not xfree.
11186 2011-02-27 Michael Snyder <msnyder@vmware.com>
11188 * server.c (handle_query): Discard unused value.
11190 * hostio.c (require_data): Free malloc memory before returning
11193 2011-02-26 Michael Snyder <msnyder@vmware.com>
11195 * linux-low.c (list_threads): Call closedir for dirent.
11197 2011-02-27 Michael Snyder <msnyder@vmware.com>
11199 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11200 a case statement falls through.
11202 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11204 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11207 2011-02-26 Michael Snyder <msnyder@vmware.com>
11209 * utils.c (decimal2str): Eliminate dead code and dead param.
11210 (pulongest): Drop dead param from call to decimal2str.
11213 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11215 Revert the following patch (not approved yet):
11216 2011-02-21 Hui Zhu <teawater@gmail.com>
11217 * tracepoint.c (tp_printf): New function.
11218 (eval_agent_expr): Handle gdb_agent_op_printf.
11220 2011-02-21 Hui Zhu <teawater@gmail.com>
11222 * tracepoint.c (tp_printf): New function.
11223 (eval_agent_expr): Handle gdb_agent_op_printf.
11225 2011-02-18 Tom Tromey <tromey@redhat.com>
11227 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11228 (tracepoint.o): Likewise.
11229 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11230 (gdb_agent_op_names): Likewise.
11232 2011-02-18 Tom Tromey <tromey@redhat.com>
11234 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11235 gdb_agent_op_rot>: New constants.
11236 (gdb_agent_op_names): Add pick and roll.
11237 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11240 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11242 * aclocal.m4: Regenerated with aclocal-1.11.1.
11244 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11246 * server.c (handle_qxfer_traceframe_info): New.
11247 (qxfer_packets): Register "traceframe-info".
11248 (handle_query): Report support for qXfer:traceframe-info:read+.
11249 * tracepoint.c (match_blocktype): New.
11250 (traceframe_find_block_type): Rename to ...
11251 (traceframe_walk_blocks): ... this. Add callback filter argument,
11253 (traceframe_find_block_type): New, reimplemented on top of
11254 traceframe_walk_blocks.
11255 (build_traceframe_info_xml): New.
11256 (traceframe_read_info): New.
11257 * server.h (traceframe_read_info): Declare.
11259 2011-02-11 Yao Qi <yao@codesourcery.com>
11261 * configure.ac: Call AC_PROG_RANLIB.
11262 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11263 * configure: Regenerate.
11265 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11267 * server.c (gdb_read_memory): Change return semantics to allow
11269 (handle_search_memory_1): Adjust.
11270 (process_serial_event) <'m' packet>: Handle partial transfers.
11271 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11273 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11275 * regcache.c (init_register_cache): Initialize
11276 regcache->register_status.
11277 (free_register_cache): Release regcache->register_status.
11278 (regcache_cpy): Copy register_status.
11279 (registers_to_string): Print 'x's for unavailable registers.
11280 (supply_register): Mark the register's status valid or
11281 unavailable, depending on whether a buffer was passed in or not.
11282 (supply_register_zeroed): New.
11283 (supply_regblock): Mark the registers' status valid or
11284 unavailable, depending on whether a buffer was passed in or not.
11285 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11286 (struct regcache): New `register_status' field.
11287 (supply_register_zeroed): Declare.
11288 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11289 supply_register_zeroed, rather than passing a NULL buffer to
11291 * tracepoint.c (fetch_traceframe_registers): Update comment.
11293 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11295 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11298 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11300 * server.h (decode_xfer_write): Change prototype.
11301 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11302 and don't extract the annex here.
11303 * server.c (decode_xfer_read): Remove `annex' parameter,
11304 and don't extract the annex here.
11305 (decode_xfer): New.
11306 (struct qxfer): New.
11307 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11308 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11309 (handle_qxfer_statictrace): New functions, abstracted out from
11310 handle_query, and made to use the struct qxfer interface.
11311 (handle_threads_qxfer_proper): Rename to ...
11312 (handle_qxfer_threads_proper): ... this.
11313 (handle_threads_qxfer): Rename to ...
11314 (handle_qxfer_threads): ... this. Adjust.
11315 (qxfer_packets): New array.
11316 (handle_qxfer): New function.
11317 (handle_query): Use handle_qxfer.
11319 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11321 * gdbreplay.c: Shorten lines of >= 80 columns.
11322 * linux-low.c: Ditto.
11323 * linux-ppc-low.c: Ditto.
11324 * linux-s390-low.c: Ditto.
11325 * linux-sparc-low.c: Ditto.
11326 * linux-x86-low.c: Ditto.
11327 * linux-xtensa-low.c: Ditto.
11328 * mem-break.c: Ditto.
11329 * nto-low.c: Ditto.
11330 * regcache.h: Ditto.
11331 * remote-utils.c: Ditto.
11334 * thread-db.c: Ditto.
11335 * tracepoint.c: Ditto.
11337 * win32-low.h: Ditto.
11339 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11341 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11344 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11346 * server.c (gdbserver_version): Update copyright year in version
11348 * gdbreplay.c (gdbreplay_version): Ditto.
11350 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11352 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11353 * linux-bfin-low.c: New file.
11354 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11355 PT_DATA_ADDR for BFIN targets.
11356 * Makefile.in (SFILES): Add linux-bfin-low.c.
11357 (clean): Remove reg-bfin.c.
11358 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11359 * README: Mention supported Blackfin targets.
11361 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11363 * .gitignore: New file.
11365 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11367 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11369 2010-10-22 Jie Zhang <jie@codesourcery.com>
11371 * Makefile.in: Add FLAGS_TO_PASS variable.
11372 (install): Remove dependency of install-only and recursively
11373 invoke make for install-only.
11375 2010-10-04 Doug Evans <dje@google.com>
11377 * Makefile.in (uninstall): Use $(DESTDIR).
11379 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11383 * linux-x86-low.c (compat_siginfo_from_siginfo)
11384 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11385 si_code is < 0. Check for si_code == SI_TIMER before checking for
11388 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11390 * lynx-i386-low.c: New file.
11391 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11393 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11395 * lynx-low.c (ptrace_request_to_str): Remove handling for
11396 request values that have been removed in LynxOS 5.x.
11398 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11400 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11403 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11405 * configure.ac: Add --enable-inprocess-agent option.
11406 * configure: Rebuilt.
11408 2010-09-06 Yao Qi <yao@codesourcery.com>
11410 * linux-low.c (linux_kill): Remove unused variable.
11411 (linux_stabilize_threads): Likewise.
11412 * server.c (start_inferior): Likewise.
11413 (queue_stop_reply_callback): Likewise.
11414 * tracepoint.c (do_action_at_tracepoint): Likewise.
11416 2010-09-06 Yao Qi <yao@codesourcery.com>
11418 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11421 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11423 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11425 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11427 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11430 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11432 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11433 gdbserver/lynx-ppc-low.c: New files.
11434 * Makefile.in (lynx_low_h): New variable.
11435 (lynx-low.o, lynx-ppc-low.o): New rules.
11436 * configure.ac: On LynxOS, link with -lnetinet.
11437 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11438 * configure: regenerate.
11440 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11442 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11443 * configure.ac: Add check for vasprintf and vsnprintf.
11444 * configure, config.in: Regenerate.
11445 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11447 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11449 * gdbreplay.c: Move include of alloca.h up, next to include of
11451 * server.h: Add include of malloc.h.
11452 * mem-break.c: Remove include of malloc.h.
11453 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11455 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11457 * Makefile.in (memmem.o): Build with -Wno-error.
11459 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11461 * utils.c (xsnprintf): Make non-static.
11462 * server.h: Add xsnprintf declaration.
11463 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11464 replace calls to snprintf by calls to xsnprintf throughout.
11466 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11468 * configure.ac: Add configure check for alloca.
11469 * configure, config.in: Regenerate.
11470 * server.h: Include alloca.h if it exists.
11471 * gdbreplay.c: Include alloca.h if it exists.
11473 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11475 * linux-low.c (__SIGRTMIN): Define if not already defined.
11476 (linux_create_inferior): Check for __ANDROID__ rather than
11478 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11479 are already deferred.
11480 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11481 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11482 stopped and already has a pending signal to report.
11483 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11484 a pending signal to report or is moving out of a jump pad.
11485 (linux_init_signals): Check for __ANDROID__ rather than
11488 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11490 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11491 debug_threads check. Avoid a linear search when not doing debug
11494 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11496 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11497 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11498 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11499 (process_event): Change local fd's type to gdb_fildes_t.
11500 (create_file_handler): Adjust prototype.
11501 (delete_file_handler): Adjust prototype.
11502 (handle_file_event): Adjust prototype. Use pfildes.
11503 (create_file_event): Adjsut prototype.
11504 * remote-utils.c (remote_desc, listen_desc): Change type to
11506 * server.h: New gdb_fildes_t typedef.
11507 [USE_WIN32API]: Include winsock2.h.
11508 (delete_file_handler, add_file_handler): Adjust prototypes.
11509 (pfildes): Declare.
11510 * utils.c (pfildes): New.
11512 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11514 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11515 * configure: Regenerate.
11517 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11519 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11520 (linux_done_accessing_memory): ... this.
11521 (linux_target_ops): Adjust.
11522 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11523 * nto-low.c (nto_target_ops): Adjust comment.
11524 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11525 * spu-low.c (spu_target_ops): Adjust comment.
11526 * target.h (target_ops): Rename unprepare_to_access_memory field
11527 to done_accessing_memory.
11528 (unprepare_to_access_memory): Rename to ...
11529 (done_accessing_memory): ... this.
11531 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11533 * linux-low.c (linux_prepare_to_access_memory): New.
11534 (linux_unprepare_to_access_memory): New.
11535 (linux_target_ops): Install them.
11536 * server.c (read_memory): Rename to ...
11537 (gdb_read_memory): ... this. Use
11538 prepare_to_access_memory/prepare_to_access_memory.
11539 (write_memory): Rename to ...
11540 (gdb_write_memory): ... this. Use
11541 prepare_to_access_memory/prepare_to_access_memory.
11542 (handle_search_memory_1): Adjust.
11543 (process_serial_event): Adjust.
11544 * target.h (struct target_ops): New fields
11545 prepare_to_access_memory and unprepare_to_access_memory.
11546 (prepare_to_access_memory, unprepare_to_access_memory): New.
11547 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11548 prepare_to_access_memory/prepare_to_access_memory.
11549 * nto-low.c (nto_target_ops): Adjust.
11550 * spu-low.c (spu_target_ops): Adjust.
11551 * win32-low.c (win32_target_ops): Adjust.
11553 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11555 * Makefile.in (WARN_CFLAGS): Get it from configure.
11556 (WERROR_CFLAGS): New.
11557 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11558 * configure.ac: Introduce --enable-werror, which adds -Werror to
11559 the compiler command line. Enabled by default. Disable with
11560 --disable-werror. Add -Wdeclaration-after-statement
11561 Wpointer-arith and -Wformat-nonliteral to warning flags.
11562 * configure: Regenerate.
11564 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11566 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11568 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11570 * gdbreplay.c (remote_error): New.
11572 (expect): Use gdbchar. Check for error reading from GDB.
11573 Clarify sync error output.
11574 (play): Check for errors writing to GDB.
11575 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11576 * remote-utils.c (getpkt): Check for errors writing to the remote
11579 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11581 * linux-low.c (linux_wait_1): Move non-debugging code out of
11582 `debug_threads' control.
11584 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11586 * linux-low.c (linux_wait_1): Don't set last_status here.
11587 * server.c (push_event, queue_stop_reply_callback): Assert we're
11588 not pushing a TARGET_WAITKIND_IGNORE event.
11589 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11590 (myresume, handle_target_event): Set the thread's last_resume_kind
11591 and last_status from the target returned status.
11593 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11597 * linux-x86-low.c (update_debug_registers_callback): New.
11598 (i386_dr_low_set_addr): Use it.
11599 (i386_dr_low_get_addr): New.
11600 (i386_dr_low_set_control): Use update_debug_registers_callback.
11601 (i386_dr_low_get_control): New.
11602 (i386_dr_low_get_status): Adjust.
11603 * linux-low.c (linux_stop_lwp): New.
11604 * linux-low.h (linux_stop_lwp): Declare.
11606 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11607 argument instead of a i386_debug_reg_state.
11608 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11609 a i386_debug_reg_state.
11610 (i386_insert_aligned_watchpoint): Adjust.
11611 (i386_remove_aligned_watchpoint): Adjust.
11612 (i386_low_stopped_data_address): Read the debug registers from the
11613 inferior instead of from the mirrors.
11614 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11615 (i386_dr_low_get_addr): Declare.
11616 (i386_dr_low_get_control): Declare.
11617 (i386_dr_low_get_status): Change prototype.
11619 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11620 (i386_dr_low_get_addr): New.
11621 (i386_dr_low_get_control): New.
11622 (i386_dr_low_get_status): Adjust prototype. Return
11624 (i386_initial_stuff): Clear dr_status_mirror and
11626 (i386_get_thread_context): Adjust.
11627 (i386_set_thread_context): Adjust.
11628 (i386_thread_added): Adjust.
11630 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11632 * linux-low.h (linux_thread_area): Delete declaration.
11634 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11636 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11637 after its termination.
11639 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11641 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11642 (gdb_wants_all_stopped): Delete.
11643 (linux_wait_1): Don't call them.
11644 * server.c (handle_v_cont): Tag all threads as want-stopped.
11645 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11646 stopped as "client-wants-stopped".
11648 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11650 * Makefile.in (signals_h): New.
11651 (server_h): Depend on it.
11652 (server.o): Don't depend on $(signals_def).
11653 (signals.o): Depend on $(signals_def).
11655 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11657 * Makefile.in (signals_def): New.
11658 (server_h): Append include/gdb/signals.h and signals_def.
11659 (server.o): Append signals_def.
11661 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11663 * server.c (handle_target_event): Use target_signal_to_host for
11664 resume_info.sig initialization.
11665 * target.h (struct thread_resume) <sig>: New comment.
11667 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11669 * server.c (handle_query): strcpy() the returned string from paddress()
11670 instead of sprintf().
11671 * utils.c (paddress): Return phex_nz().
11673 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11675 * server.c (handle_v_cont): Call mourn_inferior if process
11677 (myresume): Likewise.
11679 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11681 Static tracepoints, and integration with UST.
11683 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11684 * mem-break.c (uninsert_all_breakpoints)
11685 (reinsert_all_breakpoints): New.
11686 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11687 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11688 (gdb_agent_ust_loaded, helper_thread_id)
11689 (gdb_agent_helper_thread_id): New macros.
11690 (struct ipa_sym_addresses): Add addr_ust_loaded,
11691 addr_helper_thread_id, addr_cmd_buf.
11692 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11693 (in_process_agent_loaded_ust): New.
11694 (write_e_ust_not_loaded): New.
11695 (maybe_write_ipa_ust_not_loaded): New.
11696 (struct collect_static_trace_data_action): New.
11697 (enum tracepoint_type) <static_tracepoint>: New.
11698 (struct tracepoint) <handle>: Mention static tracepoints.
11699 (struct static_tracepoint_ctx): New.
11700 (CMD_BUF_SIZE): New.
11701 (add_tracepoint_action): Handle static tracepoint actions.
11702 (unprobe_marker_at): New.
11703 (clear_installed_tracepoints): Handle static tracepoints.
11704 (cmd_qtdp): Handle static tracepoints.
11705 (probe_marker_at): New.
11706 (cmd_qtstart): Handle static tracepoints.
11707 (response_tracepoint): Handle static tracepoints.
11708 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11709 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11710 (get_context_regcache): Handle static tracepoints.
11711 (do_action_at_tracepoint): Handle static tracepoint actions.
11712 (traceframe_find_block_type): Handle static trace data blocks.
11713 (traceframe_read_sdata): New.
11714 (download_tracepoints): Download static tracepoint actions.
11715 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11716 (GDB_PROBE_NAME): New.
11718 (GET_UST_SYM): New.
11721 (ust_marker_to_static_tracepoint): New.
11723 (collect_ust_data_at_tracepoint): New.
11724 (gdb_ust_probe): New.
11725 (UNIX_PATH_MAX, SOCK_DIR): New.
11726 (gdb_ust_connect_sync_socket): New.
11727 (resume_thread, stop_thread): New.
11728 (run_inferior_command): New.
11729 (init_named_socket): New.
11730 (gdb_ust_socket_init): New.
11731 (cstr_to_hexstr): New.
11733 (first_marker, next_marker): New.
11734 (response_ust_marker): New.
11735 (cmd_qtfstm, cmd_qtsstm): New.
11736 (unprobe_marker_at, probe_marker_at): New.
11737 (cmd_qtstmat, gdb_ust_thread): New.
11738 (gdb_ust_init): New.
11739 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11740 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11741 (ST_REGENTRY): New.
11742 (x86_64_st_collect_regmap): New.
11743 (X86_64_NUM_ST_COLLECT_GREGS): New.
11744 (AMD64_RIP_REGNUM): New.
11745 (supply_static_tracepoint_registers): New.
11746 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11747 (ST_REGENTRY): New.
11748 (i386_st_collect_regmap): New.
11749 (i386_NUM_ST_COLLECT_GREGS): New.
11750 (supply_static_tracepoint_registers): New.
11751 * server.c (handle_query): Handle qXfer:statictrace:read.
11752 <qSupported>: Report support for StaticTracepoints, and
11753 qXfer:statictrace:read features.
11754 * server.h (traceframe_read_sdata)
11755 (supply_static_tracepoint_registers): Declare.
11756 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11757 (unpack_varlen_hex): Include in IPA build.
11758 * Makefile.in (ustlibs, ustinc): New.
11759 (IPA_OBJS): Add remote-utils-ipa.o.
11760 ($(IPA_LIB)): Link -ldl and -lpthread.
11762 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11763 * config.in, configure: Regenerate.
11765 2010-06-20 Ian Lance Taylor <iant@google.com>
11766 Pedro Alves <pedro@codesourcery.com>
11768 * linux-x86-low.c (always_true): Delete.
11769 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11770 trying to fool the compiler with always_true.
11772 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11774 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11775 conditions in gdbserver.
11777 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11779 * spu-low.c (spu_read_memory): Wrap around local store limit.
11780 (spu_write_memory): Likewise.
11782 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11784 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11785 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11787 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11789 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11790 uses with LONGEST uses.
11792 2010-06-14 Stan Shebs <stan@codesourcery.com>
11793 Pedro Alves <pedro@codesourcery.com>
11797 * linux-x86-low.c: Include limits.h.
11799 (always_true): New.
11802 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11803 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11804 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11805 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11806 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11807 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11808 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11809 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11810 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11811 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11812 (amd64_emit_void_call_2): New.
11813 (amd64_emit_ops): New.
11814 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11815 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11816 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11817 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11818 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11819 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11820 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11821 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11822 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11823 (i386_emit_stack_adjust, i386_emit_int_call_1)
11824 (i386_emit_void_call_2): New.
11825 (i386_emit_ops): New.
11826 (x86_emit_ops): New.
11827 (the_low_target): Install x86_emit_ops.
11828 * server.h (struct emit_ops): New.
11829 (get_raw_reg_func_addr): Declare.
11830 (current_insn_ptr, emit_error): Declare.
11831 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11832 (set_trace_state_variable_value): New defines.
11833 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11834 addr_get_trace_state_variable_value and
11835 addr_set_trace_state_variable_value.
11836 (symbol_list): New fields for get_raw_reg,
11837 get_trace_state_variable_value and set_trace_state_variable_value.
11838 (condfn): New typedef.
11839 (struct tracepoint): New field `compiled_cond'.
11840 (do_action_at_tracepoint): Clear compiled_cond.
11841 (get_trace_state_variable_value, set_trace_state_variable_value):
11843 (condition_true_at_tracepoint): If there's a compiled condition,
11845 (current_insn_ptr, emit_error): New globals.
11846 (struct bytecode_address): New.
11847 (get_raw_reg_func_addr): New.
11848 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11849 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11850 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11851 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11852 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11853 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11854 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11855 (compile_tracepoint_condition, compile_bytecodes): New.
11856 * target.h (emit_ops): Forward declare.
11857 (struct target_ops): New field emit_ops.
11858 (target_emit_ops): New.
11859 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11860 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11861 * linux-low.c (linux_emit_ops): New.
11862 (linux_target_ops): Install it.
11863 * linux-low.h (struct linux_target_ops): New field emit_ops.
11865 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11867 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11868 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11870 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11871 Stan Shebs <stan@codesourcery.com>
11873 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11874 (all): Depend on $(extra_libraries).
11875 (install-only): Install the IPA.
11876 (IPA_OBJS, IPA_LIB): New.
11877 (clean): Remove the IPA lib.
11878 (IPAGENT_CFLAGS): New.
11879 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11880 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11881 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11882 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11883 * configure.ac: Check for atomic builtins support in the compiler.
11884 (IPA_DEPFILES, extra_libraries): Define.
11885 * configure.srv (ipa_obj): Add description.
11886 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11887 (i[34567]86-*-linux*): Set ipa_obj.
11888 (x86_64-*-linux*): Set ipa_obj.
11889 * linux-low.c (stabilizing_threads): New.
11890 (supports_fast_tracepoints): New.
11891 (linux_detach): Stabilize threads before detaching.
11892 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11893 the lwp is either not stabilizing, or is moving out of a jump pad.
11894 (linux_fast_tracepoint_collecting): New.
11895 (maybe_move_out_of_jump_pad): New.
11896 (enqueue_one_deferred_signal): New.
11897 (dequeue_one_deferred_signal): New.
11898 (linux_wait_for_event_1): If moving out of a jump pad, defer
11899 pending signals to later.
11900 (linux_stabilize_threads): New.
11901 (linux_wait_1): Check if threads need moving out of jump pads, and
11903 (stuck_in_jump_pad_callback): New.
11904 (move_out_of_jump_pad_callback): New.
11905 (lwp_running): New.
11906 (linux_resume_one_lwp): Handle moving out of jump pads.
11907 (linux_set_resume_request): Dequeue deferred signals.
11908 (need_step_over_p): Also step over fast tracepoint jumps.
11909 (start_step_over): Also uninsert fast tracepoint jumps.
11910 (finish_step_over): Also reinsert fast tracepoint jumps.
11911 (linux_install_fast_tracepoint_jump): New.
11912 (linux_target_ops): Install linux_stabilize_threads and
11913 linux_install_fast_tracepoint_jump_pad.
11914 * linux-low.h (linux_target_ops) <get_thread_area,
11915 install_fast_tracepoint_jump_pad>: New fields.
11916 (struct lwp_info) <collecting_fast_tracepoint,
11917 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11918 (linux_get_thread_area): Declare.
11919 * linux-x86-low.c (jump_insn): New.
11920 (x86_get_thread_area): New.
11921 (append_insns): New.
11922 (push_opcode): New.
11923 (amd64_install_fast_tracepoint_jump_pad): New.
11924 (i386_install_fast_tracepoint_jump_pad): New.
11925 (x86_install_fast_tracepoint_jump_pad): New.
11926 (the_low_target): Install x86_get_thread_area and
11927 x86_install_fast_tracepoint_jump_pad.
11928 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11929 (struct fast_tracepoint_jump): New.
11930 (fast_tracepoint_jump_insn): New.
11931 (fast_tracepoint_jump_shadow): New.
11932 (find_fast_tracepoint_jump_at): New.
11933 (fast_tracepoint_jump_here): New.
11934 (delete_fast_tracepoint_jump): New.
11935 (set_fast_tracepoint_jump): New.
11936 (uninsert_fast_tracepoint_jumps_at): New.
11937 (reinsert_fast_tracepoint_jumps_at): New.
11938 (set_breakpoint_at): Use write_inferior_memory.
11939 (uninsert_raw_breakpoint): Use write_inferior_memory.
11940 (check_mem_read): Mask out fast tracepoint jumps.
11941 (check_mem_write): Mask out fast tracepoint jumps.
11942 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11943 (set_fast_tracepoint_jump): Declare.
11944 (delete_fast_tracepoint_jump)
11945 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11946 (reinsert_fast_tracepoint_jumps_at): Declare.
11947 * regcache.c: Don't compile many functions when building the
11948 in-process agent library.
11949 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11950 the register buffer in the heap.
11951 (free_register_cache): If the register buffer isn't owned by the
11952 regcache, don't free it.
11953 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11954 pre-existing register caches.
11955 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11957 (convert_ascii_to_int): : Constify `from' parameter type.
11958 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11959 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11960 the needed buffer in-place.
11961 (relocate_instruction): New.
11962 * server.c (handle_query) <qSymbols>: If the target supports
11963 tracepoints, give it a chance of looking up symbols. Report
11964 support for fast tracepoints.
11965 (handle_status): Stabilize threads.
11966 (process_serial_event): Adjust.
11967 * server.h (struct fast_tracepoint_jump): Forward declare.
11968 (struct process_info) <fast_tracepoint_jumps>: New field.
11969 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11970 (decode_X_packet, decode_M_packet): Adjust.
11971 (relocate_instruction): Declare.
11972 (in_process_agent_loaded): Declare.
11973 (tracepoint_look_up_symbols): Declare.
11974 (struct fast_tpoint_collect_status): Declare.
11975 (fast_tracepoint_collecting): Declare.
11976 (force_unlock_trace_buffer): Declare.
11977 (handle_tracepoint_bkpts): Declare.
11978 (initialize_low_tracepoint)
11979 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11980 * target.h (struct target_ops) <stabilize_threads,
11981 install_fast_tracepoint_jump_pad>: New fields.
11982 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11983 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11984 [HAVE_STDINT_H]: Include stdint.h.
11985 (trace_debug_1): Rename to ...
11986 (trace_vdebug): ... this.
11987 (trace_debug): Rename to ...
11988 (trace_debug_1): ... this. Add `level' parameter.
11989 (trace_debug): New.
11990 (ATTR_USED, ATTR_NOINLINE): New.
11991 (IP_AGENT_EXPORT): New.
11992 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11993 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11994 (about_to_request_buffer_space, trace_buffer_is_full)
11995 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11996 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11997 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11998 (traceframe_write_count, traceframes_created)
11999 (trace_state_variables)
12000 New renaming defines.
12001 (struct ipa_sym_addresses): New.
12002 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12003 (symbol_list): New.
12004 (ipa_sym_addrs): New.
12005 (all_tracepoint_symbols_looked_up): New.
12006 (in_process_agent_loaded): New.
12007 (write_e_ipa_not_loaded): New.
12008 (maybe_write_ipa_not_loaded): New.
12009 (tracepoint_look_up_symbols): New.
12010 (debug_threads) [IN_PROCESS_AGENT]: New.
12011 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12012 (UNKNOWN_SIDE_EFFECTS): New.
12013 (stop_tracing): New.
12014 (flush_trace_buffer): New.
12015 (stop_tracing_bkpt): New.
12016 (flush_trace_buffer_bkpt): New.
12017 (read_inferior_integer): New.
12018 (read_inferior_uinteger): New.
12019 (read_inferior_data_pointer): New.
12020 (write_inferior_data_pointer): New.
12021 (write_inferior_integer): New.
12022 (write_inferior_uinteger): New.
12023 (struct collect_static_trace_data_action): Delete.
12024 (enum tracepoint_type): New.
12025 (struct tracepoint) <type>: New field `type'.
12026 <actions_str, step_actions, step_actions_str>: Only include in
12028 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12029 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12030 (tracepoints): Use IP_AGENT_EXPORT.
12031 (last_tracepoint): Don't include in the IPA.
12032 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12033 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12034 (alloced_trace_state_variables): New.
12035 (trace_state_variables): Use IP_AGENT_EXPORT.
12036 (traceframe_t): Delete unused variable.
12037 (circular_trace_buffer): Don't include in the IPA.
12038 (trace_buffer_start): Delete.
12039 (struct trace_buffer_control): New.
12040 (trace_buffer_free): Delete.
12041 (struct ipa_trace_buffer_control): New.
12042 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12043 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12045 (trace_buffer_ctrl): New.
12046 (TRACE_BUFFER_CTRL_CURR): New.
12047 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12048 Reimplement as macros.
12049 (trace_buffer_wrap): Delete.
12050 (traceframe_write_count, traceframe_read_count)
12051 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12052 (struct tracepoint_hit_ctx) <type>: New field.
12053 (struct fast_tracepoint_ctx): New.
12054 (memory_barrier): New.
12056 (record_tracepoint_error): Update atomically in the IPA.
12057 (clear_inferior_trace_buffer): New.
12058 (about_to_request_buffer_space): New.
12059 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12060 updating the same buffer.
12061 (add_tracepoint): Default the tracepoint's type to trap
12062 tracepoint, and orig_size to -1.
12063 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12064 internal variables.
12065 (create_trace_state_variable): New parameter `gdb'. Handle it.
12066 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12067 (cmd_qtdp): Handle fast tracepoints.
12068 (cmd_qtdv): Adjust.
12069 (max_jump_pad_size): New.
12070 (gdb_jump_pad_head): New.
12071 (get_jump_space_head): New.
12072 (claim_jump_space): New.
12073 (sort_tracepoints): New.
12074 (MAX_JUMP_SIZE): New.
12075 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12077 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12078 support. Upload fast traceframes, and delete internal IPA
12080 (stop_tracing_handler): New.
12081 (flush_trace_buffer_handler): New.
12082 (cmd_qtstop): Upload fast tracepoints.
12083 (response_tracepoint): Handle fast tracepoints.
12084 (tracepoint_finished_step): Upload fast traceframes. Set the
12085 tracepoint hit context's tracepoint type.
12086 (handle_tracepoint_bkpts): New.
12087 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12088 type. Add comment about fast tracepoints.
12089 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12090 non-existing action_str field.
12091 (get_context_regcache): Handle fast tracepoints.
12092 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12094 (fast_tracepoint_from_jump_pad_address): New.
12095 (fast_tracepoint_from_ipa_tpoint_address): New.
12096 (collecting_t): New.
12097 (force_unlock_trace_buffer): New.
12098 (fast_tracepoint_collecting): New.
12100 (gdb_collect): New.
12101 (write_inferior_data_ptr): New.
12102 (target_tp_heap): New.
12103 (target_malloc): New.
12104 (download_agent_expr): New.
12106 (download_tracepoints): New.
12107 (download_trace_state_variables): New.
12108 (upload_fast_traceframes): New.
12109 (IPA_FIRST_TRACEFRAME): New.
12110 (IPA_NEXT_TRACEFRAME_1): New.
12111 (IPA_NEXT_TRACEFRAME): New.
12112 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12113 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12114 (gdb_jump_pad_buffer_end): New.
12115 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12116 (initialize_tracepoint): Adjust.
12117 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12118 buffer. Initialize the low module.
12119 * utils.c (PREFIX, TOOLNAME): New.
12120 (malloc_failure): Use PREFIX.
12121 (error): In the IPA, an error causes an exit.
12122 (fatal, warning): Use PREFIX.
12123 (internal_error): Use TOOLNAME.
12124 (NUMCELLS): Increase to 10.
12125 * configure, config.in: Regenerate.
12127 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12129 * server.c (handle_query) <qSupported>: Do two passes over the
12130 qSupported string to avoid nesting strtok.
12132 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12134 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12136 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12137 -Wl,--dynamic-list.
12138 * configure: Regenerate.
12139 * proc-service.list: New.
12141 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12143 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12146 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12148 * gdbreplay.c (remote_open): Check error return from socket() call by
12149 its equality to -1 not by it being negative.
12150 * remote-utils.c (remote_open): Likewise.
12152 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12154 * config.h: Regenerate.
12156 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12158 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12159 doesn't provide PTRACE_GET_THREAD_AREA.
12161 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12163 * linux-m68k-low.c: Include <asm/ptrace.h>
12164 (ps_get_thread_area): Implement.
12166 2010-05-03 Doug Evans <dje@google.com>
12168 * event-loop.c (struct callback_event): New struct.
12169 (callback_list): New global.
12170 (append_callback_event, delete_callback_event): New functions.
12171 (process_callback): New function.
12172 (start_event_loop): Call it.
12173 * remote-utils.c (NOT_SCHEDULED): Define.
12174 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12175 moved out of readchar.
12176 (readchar): Rewrite. Call reschedule before returning.
12177 (reset_readchar): New function.
12178 (remote_close): Call it.
12179 (process_remaining, reschedule): New functions.
12180 * server.h (callback_handler_func): New typedef.
12181 (append_callback_event, delete_callback_event): Declare.
12183 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12185 * proc-service.c (ps_pglobal_lookup): Use
12186 thread_db_look_up_one_symbol.
12187 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12188 parameter. Use it instead of all_symbols_looked_up.
12189 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12191 (all_symbols_looked_up): Don't declare.
12192 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12193 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12195 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12196 Set all_symbols_looked_up here.
12197 (thread_db_look_up_one_symbol): New.
12198 (thread_db_get_tls_address): Adjust.
12199 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12200 thread_db object on the heap, and tentatively set it in the
12202 (thread_db_init): Don't set all_symbols_looked_up here.
12203 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12205 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12207 * linux-low.c (linux_kill, linux_detach): Adjust.
12208 (status_pending_p_callback): Remove redundant statement. Check
12209 for !TARGET_WAITIKIND_IGNORE, instead of
12210 TARGET_WAITKIND_STOPPED.
12211 (handle_tracepoints): Make sure LWP is locked. Adjust.
12212 (linux_wait_for_event_1): Adjust.
12213 (linux_cancel_breakpoints): New.
12214 (unsuspend_one_lwp): New.
12215 (unsuspend_all_lwps): New.
12216 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12217 (send_sigstop_callback): Change return type to int, add new
12218 `except' parameter and handle it.
12219 (suspend_and_send_sigstop_callback): New.
12220 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12221 pass them down. If SUSPEND, also increment the lwp's suspend
12223 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12224 (need_step_over_p): Don't consider suspended LWPs.
12225 (start_step_over): Adjust.
12226 (proceed_one_lwp): Change return type to int, add new `except'
12227 parameter and handle it.
12228 (unsuspend_and_proceed_one_lwp): New.
12229 (proceed_all_lwps): Use find_inferior instead of
12231 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12232 also decrement the suspend count of LWPs. Pass `except' down,
12233 instead of hacking its suspend count.
12234 (linux_pause_all): Add `freeze' parameter. Adjust.
12235 (linux_unpause_all): New.
12236 (linux_target_ops): Install linux_unpause_all.
12237 * server.c (handle_status): Adjust.
12238 * target.h (struct target_ops): New fields `unpause_all' and
12239 `cancel_breakpoints'. Add new parameter to `pause_all'.
12240 (pause_all): Add new `freeze' parameter.
12241 (unpause_all): New.
12242 (cancel_breakpoints): New.
12243 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12244 cancel breakpoints.
12245 (cmd_qtstart): Pause threads.
12246 (stop_tracing): Pause threads, and cancel breakpoints.
12247 * win32-low.c (win32_target_ops): Adjust.
12249 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12251 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12252 the inferior right away from here...
12253 (linux_wait_1): ... to here, and adjust to check the thread's
12254 last_resume_kind instead of the lwp's step or stop_expected flags.
12256 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12258 * README: Use consistent `GDB' and `GDBserver' spellings.
12260 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12262 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12263 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12264 (linux_detach_one_lwp): Assume the lwp is stopped.
12265 (any_thread_of): Delete.
12266 (linux_detach): Stop all lwps here. Don't blindly delete all
12268 (delete_lwp_callback): New.
12269 (linux_mourn): Delete all lwps of the process that is gone.
12270 (linux_wait_1): Don't delete the last lwp of the process here.
12271 * mem-break.h (mark_breakpoints_out): Declare.
12272 * mem-break.c (mark_breakpoints_out): New.
12273 (free_all_breakpoints): Use it.
12274 * server.c (handle_target_event): If the process is gone, mark
12276 * thread-db.c (struct thread_db) <create_bp>: New field.
12277 (thread_db_enable_reporting): Fix prototype. Store a thread event
12278 breakpoint reference in the thread_db struct.
12279 (thread_db_load_search): Clear the thread_db object.
12280 (try_thread_db_load_1): Ditto.
12281 (switch_to_process): New.
12282 (disable_thread_event_reporting): Use it.
12283 (remove_thread_event_breakpoints): New.
12284 (thread_db_detach, thread_db_mourn): Use it.
12286 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12288 * linux-low.c (linux_enable_event_reporting): New.
12289 (linux_wait_for_event_1, handle_extended_wait): Use it.
12291 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12293 * linux-low.c (linux_kill_one_lwp, linux_kill)
12294 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12295 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12296 SIGSTOP even if the LWP is stopped.
12297 (send_sigstop_callback): New.
12298 (stop_all_lwps): Use send_sigstop_callback instead.
12299 (linux_resume_one_thread): Adjust.
12300 (proceed_one_lwp): Still proceed an LWP that the client has
12301 requested to stop, if we haven't reported it as stopped yet. Make
12302 sure that LWPs the client want stopped, have a pending SIGSTOP.
12304 2010-04-26 Doug Evans <dje@google.com>
12306 * server.c (handle_general_set): Make static.
12308 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12309 Print received char after testing for error/eof instead of before.
12310 (input_interrupt): Tweak comment.
12312 2010-04-23 Doug Evans <dje@google.com>
12314 * server.c (start_inferior): Print inferior argv if --debug.
12316 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12318 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12319 * nto-x86-low.c: Include server.h
12321 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12323 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12324 be consistent with other sources of this directory.
12325 (init_registers_amd64): Correct name of source file of this function
12328 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12330 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12331 64-bit executables.
12333 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12335 * win32-i386-low.c: Add 64-bit support.
12336 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12337 (init_registers_amd64): Declare.
12338 (mappings): Add 64-bit version of array.
12339 (init_windows_x86): New function.
12340 (the_low_target): Change init_arch field to init_windows_x86.
12342 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12344 * win32-low.c: Adapt to support also 64-bit architecture.
12345 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12346 (get_image_name): Use SIZE_T type for local variable `done'.
12347 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12348 (toolhelp_get_dll_name): Idem.
12349 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12350 Use uintptr_t typecast to avoid warning.
12351 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12352 (handle_exception): Use phex_nz to avoid warning.
12353 (win32_wait): Remove unused local variable `process'.
12355 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12357 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12360 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12362 * configure.ac: Use `ws2_32' library for srv_mingw.
12363 * configure: Regenerate.
12364 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12365 * remote-utils.c: Likewise.
12367 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12369 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12370 if __x86_64__ is defined.
12372 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12374 * configure: Regenerate.
12376 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12378 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12379 * target.h (target_ops): New get_tib_address field.
12380 * win32-low.h (win32_thread_info): Add thread_local_base field.
12381 * win32-low.c (child_add_thread): Add tlb argument.
12382 Set thread_local_base field to TLB.
12383 (get_child_debug_event): Adapt to child_add_thread change.
12384 (win32_get_tib_address): New function.
12385 (win32_target_ops): Set get_tib_address field to
12386 win32_get_tib_address.
12387 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12389 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12391 * linux-low.c (linux_mourn): Also remove the process.
12392 * server.c (handle_target_event): Don't remove the process here.
12393 * nto-low.c (nto_mourn): New.
12394 (nto_target_ops): Install it.
12395 * spu-low.c (spu_mourn): New.
12396 (spu_target_ops): Install it.
12397 * win32-low.c (win32_mourn): New.
12398 (win32_target_ops): Install it.
12400 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12402 * server.h (buffer_xml_printf): Remove redundant `;'.
12404 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12406 * regcache.c (set_register_cache): Invalidate regcaches before
12407 changing the register cache layout.
12408 (regcache_invalidate_one): Allow a NULL regcache.
12409 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12410 regcaches before changing the register cache layout or the target
12413 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12415 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12416 variable warning on Linux/x86-64.
12418 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12420 GDBserver disconnected tracing support.
12422 * linux-low.c (linux_remove_process): Delete.
12423 (add_lwp): Don't set last_resume_kind here.
12424 (linux_kill): Use `mourn'.
12425 (linux_detach): Use `thread_db_detach', and `mourn'.
12426 (linux_mourn): New.
12427 (linux_attach_lwp_1): Adjust comment.
12428 (linux_attach): last_resume_kind moved the thread_info; adjust.
12429 (status_pending_p_callback): Adjust.
12430 (linux_wait_for_event_1): Adjust.
12431 (count_events_callback, select_singlestep_lwp_callback)
12432 (select_event_lwp_callback, cancel_breakpoints_callback)
12433 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12434 (proceed_one_lwp): Adjust.
12435 (linux_async): Add debug output.
12436 (linux_thread_stopped): New.
12437 (linux_pause_all): New.
12438 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12440 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12441 (thread_db_free): Delete declaration.
12442 (thread_db_detach, thread_db_mourn): Declare.
12443 * thread-db.c (thread_db_init): Use thread_db_mourn.
12444 (thread_db_free): Delete, split in two.
12445 (disable_thread_event_reporting): New.
12446 (thread_db_detach): New.
12447 (thread_db_mourn): New.
12449 * server.h (struct thread_info) <last_resume_kind>: New field.
12450 <attached>: Add comment.
12451 <gdb_detached>: New field.
12452 (handler_func): Change return type to int.
12453 (handle_serial_event, handle_target_event): Ditto.
12454 (gdb_connected): Declare.
12456 (disconnected_tracing): Declare.
12457 (stop_tracing): Declare.
12459 * server.c (handle_query) <qSupported>: Report support for
12460 disconnected tracing.
12461 (queue_stop_reply_callback): Account for running threads.
12462 (gdb_wants_thread_stopped): New.
12463 (gdb_wants_all_threads_stopped): New.
12464 (gdb_reattached_process): New.
12465 (handle_status): Clear the `gdb_detached' flag of all processes.
12466 In all-stop, stop all threads.
12467 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12468 (process_serial_event): If the remote connection breaks, or if an
12469 exit was forced with "monitor exit", force an event loop exit.
12470 Handle disconnected tracing on detach.
12471 (handle_serial_event): Adjust.
12472 (handle_target_event): If GDB isn't connected, forward events back
12473 to the inferior, unless the last process exited, in which case,
12474 exit gdbserver. Adjust interface.
12476 * remote-utils.c (remote_open): Don't block in accept. Instead
12477 register an event loop source on the listen socket file
12478 descriptor. Refactor bits into ...
12479 (listen_desc): ... this new global.
12480 (gdb_connected): ... this new function.
12481 (enable_async_notification): ... this new function.
12482 (handle_accept_event): ... this new function.
12483 (remote_close): Clear remote_desc.
12485 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12487 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12489 (mourn_inferior): Define.
12490 (target_process_qsupported): Avoid the dangling else problem.
12491 (thread_stopped): Define.
12492 (pause_all): Define.
12493 (target_waitstatus_to_string): Declare.
12494 * target.c (target_waitstatus_to_string): New.
12496 * tracepoint.c (tracing): Make extern.
12497 (disconnected_tracing): New.
12498 (stop_tracing): Make extern. Handle tracing stops due to GDB
12500 (cmd_qtdisconnected): New.
12501 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12502 (handle_tracepoint_general_set): Handle QTDisconnected.
12504 * event-loop.c (event_handler_func): Change return type to int.
12505 (process_event): Bail out if the event handler wants the event
12507 (handle_file_event): Ditto.
12508 (start_event_loop): Bail out if the event handler wants the event
12511 * nto-low.c (nto_target_ops): Adjust.
12512 * spu-low.c (spu_wait): Don't remove the process here.
12513 (spu_target_ops): Adjust.
12514 * win32-low.c (win32_wait): Don't remove the process here.
12515 (win32_target_ops): Adjust.
12517 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12519 * regcache.c (realloc_register_cache): Invalidate inferior's
12520 regcache before recreating it.
12522 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12524 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12526 2010-04-09 Stan Shebs <stan@codesourcery.com>
12527 Pedro Alves <pedro@codesourcery.com>
12529 * server.h (LONGEST): New.
12530 (struct thread_info) <while_stepping>: New field.
12531 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12533 (initialize_tracepoint, handle_tracepoint_general_set)
12534 (handle_tracepoint_query, tracepoint_finished_step)
12535 (tracepoint_was_hit, release_while_stepping_state_list):
12536 (current_traceframe): Declare.
12537 * server.c (handle_general_set): Handle tracepoint packets.
12538 (read_memory): New.
12539 (write_memory): New.
12540 (handle_search_memory_1): Use read_memory.
12541 (handle_query): Report support for conditional tracepoints, trace
12542 state variables, and tracepoint sources. Handle tracepoint
12544 (main): Initialize the tracepoints module.
12545 (process_serial_event): Handle traceframe reads/writes.
12547 * linux-low.c (handle_tracepoints): New.
12548 (linux_wait_1): Call it.
12549 (linux_resume_one_lwp): Handle while-stepping.
12550 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12551 (linux_target_ops): Install them.
12552 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12554 * linux-x86-low.c (x86_supports_tracepoints): New.
12555 (the_low_target). Install it.
12557 * mem-break.h (delete_breakpoint): Declare.
12558 * mem-break.c (delete_breakpoint): Make external.
12560 * target.h (struct target_ops): Add `supports_tracepoints',
12561 `read_pc', and `write_pc' fields.
12562 (target_supports_tracepoints): Define.
12563 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12566 * regcache.h (struct regcache) <registers_owned>: New field.
12567 (init_register_cache, regcache_cpy): Declare.
12568 (regcache_read_pc, regcache_write_pc): Declare.
12569 (register_cache_size): Declare.
12570 (supply_regblock): Declare.
12571 * regcache.c (init_register_cache): New.
12572 (new_register_cache): Use it.
12573 (regcache_cpy): New.
12574 (register_cache_size): New.
12575 (supply_regblock): New.
12576 (regcache_read_pc, regcache_write_pc): New.
12578 * tracepoint.c: New.
12580 * Makefile.in (OBS): Add tracepoint.o.
12581 (tracepoint.o): New rule.
12583 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12585 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12587 (i386-mmx.c): Likewise.
12588 (i386-mmx-linux.o): Likewise.
12589 (i386-mmx-linux.c): Likewise.
12591 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12592 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12593 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12594 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12596 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12597 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12598 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12600 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12602 * Makefile.in (clean): Updated.
12604 (i386-avx.c): Likewise.
12605 (i386-avx-linux.o): Likewise.
12606 (i386-avx-linux.c): Likewise.
12607 (amd64-avx.o): Likewise.
12608 (amd64-avx.c): Likewise.
12609 (amd64-avx-linux.o): Likewise.
12610 (amd64-avx-linux.c): Likewise.
12612 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12613 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12614 (srv_amd64_regobj): Add amd64-avx.o.
12615 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12616 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12617 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12618 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12619 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12620 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12621 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12623 * i387-fp.c: Include "i386-xstate.h".
12625 (i387_cache_to_xsave): Likewise.
12626 (i387_xsave_to_cache): Likewise.
12627 (x86_xcr0): Likewise.
12629 * i387-fp.h (i387_cache_to_xsave): Likewise.
12630 (i387_xsave_to_cache): Likewise.
12631 (x86_xcr0): Likewise.
12633 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12634 * linux-crisv32-low.c (target_regsets): Likewise.
12635 * linux-m68k-low.c (target_regsets): Likewise.
12636 * linux-mips-low.c (target_regsets): Likewise.
12637 * linux-ppc-low.c (target_regsets): Likewise.
12638 * linux-s390-low.c (target_regsets): Likewise.
12639 * linux-sh-low.c (target_regsets): Likewise.
12640 * linux-sparc-low.c (target_regsets): Likewise.
12641 * linux-xtensa-low.c (target_regsets): Likewise.
12643 * linux-low.c: Include <sys/uio.h>.
12644 (regsets_fetch_inferior_registers): Support nt_type.
12645 (regsets_store_inferior_registers): Likewise.
12646 (linux_process_qsupported): New.
12647 (linux_target_ops): Add linux_process_qsupported.
12649 * linux-low.h (regset_info): Add nt_type.
12650 (linux_target_ops): Add process_qsupported.
12652 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12654 (init_registers_i386_avx_linux): New.
12655 (init_registers_amd64_avx_linux): Likewise.
12656 (xmltarget_i386_linux_no_xml): Likewise.
12657 (xmltarget_amd64_linux_no_xml): Likewise.
12658 (PTRACE_GETREGSET): Likewise.
12659 (PTRACE_SETREGSET): Likewise.
12660 (x86_fill_xstateregset): Likewise.
12661 (x86_store_xstateregset): Likewise.
12662 (use_xml): Likewise.
12663 (x86_linux_update_xmltarget): Likewise.
12664 (x86_linux_process_qsupported): Likewise.
12665 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12666 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12667 init_registers_i386_linux here. Call
12668 x86_linux_update_xmltarget.
12669 (the_low_target): Add x86_linux_process_qsupported.
12671 * server.c (handle_query): Call target_process_qsupported.
12673 * target.h (target_ops): Add process_qsupported.
12674 (target_process_qsupported): New.
12676 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12678 * inferiors.c (add_thread): Set last_status kind to
12679 TARGET_WAITKIND_IGNORE.
12680 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12681 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12682 (linux_wait_1): Move `thread' local definition to block that uses
12683 it. Don't NULL initialize `event_child'.
12684 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12685 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12686 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12688 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12690 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12691 an extended waitstatus, or by a watchpoint.
12692 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12693 thread was stepping or has been stopped by a watchpoint.
12695 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12697 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12698 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12699 of another, then delete the previous, and validate all
12701 (validate_inserted_breakpoint): New.
12702 (delete_disabled_breakpoints): New.
12703 (validate_breakpoints): New.
12704 (check_mem_read): Validate breakpoints before trusting their
12705 shadow. Delete disabled breakpoints.
12706 (check_mem_write): Validate breakpoints before trusting they
12707 should be inserted. Delete disabled breakpoints.
12708 * mem-break.h (validate_breakpoints):
12709 * server.c (handle_query): Validate breakpoints when we see a
12712 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12714 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12715 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12716 if we could tell there's a GDB breakpoint at stop_pc.
12717 (need_step_over_p): Don't do a step over if we find a GDB
12718 breakpoint at the resume PC.
12720 * mem-break.c (struct raw_breakpoint): New.
12721 (enum bkpt_type): New type `gdb_breakpoint'.
12722 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12723 fields. New field `raw'.
12724 (find_raw_breakpoint_at): New.
12725 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12726 breakpoint instead.
12727 (set_breakpoint_at): Adjust.
12728 (delete_raw_breakpoint): New.
12729 (release_breakpoint): New.
12730 (delete_breakpoint): Rename to...
12731 (delete_breakpoint_1): ... this. Add proc parameter. Use
12732 release_breakpoint. Return ENOENT.
12733 (delete_breakpoint): Reimplement.
12734 (find_breakpoint_at): Delete.
12735 (find_gdb_breakpoint_at): New.
12736 (delete_breakpoint_at): Delete.
12737 (set_gdb_breakpoint_at): New.
12738 (delete_gdb_breakpoint_at): New.
12739 (gdb_breakpoint_here): New.
12740 (set_reinsert_breakpoint): Use release_breakpoint.
12741 (uninsert_breakpoint): Rename to ...
12742 (uninsert_raw_breakpoint): ... this.
12743 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12744 (reinsert_raw_breakpoint): Change parameter type to
12746 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12748 (check_breakpoints): Adjust. Use release_breakpoint.
12749 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12750 (breakpoint_inserted_here): Ditto.
12751 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12752 Don't trust the breakpoint's shadow if it is not inserted.
12753 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12754 (delete_all_breakpoints): Adjust.
12755 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12756 use delete_breakpoint_1.
12758 * mem-break.h (breakpoints_supported): Delete declaration.
12759 (set_gdb_breakpoint_at): Declare.
12760 (gdb_breakpoint_here): Declare.
12761 (delete_breakpoint_at): Delete.
12762 (delete_gdb_breakpoint_at): Declare.
12764 * server.h (struct raw_breakpoint): Forward declare.
12765 (struct process_info): New field `raw_breakpoints'.
12767 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12770 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12772 * linux-low.c (status_pending_p_callback): Fix comment.
12773 (linux_wait_for_event_1): Move most of the internal breakpoint
12774 handling from here...
12775 (linux_wait_1): ... to here.
12776 (count_events_callback): New.
12777 (select_singlestep_lwp_callback): New.
12778 (select_event_lwp_callback): New.
12779 (cancel_breakpoints_callback): New.
12780 (select_event_lwp): New.
12781 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12782 priority to all LWPs that have had events that should be reported
12783 to the client. Cancel breakpoints when about to reporting the
12784 event to the client, not while stopping lwps. No longer cancel
12785 finished single-steps here.
12786 (cancel_finished_single_step): Delete.
12787 (cancel_finished_single_steps): Delete.
12789 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12791 * mem-break.c (enum bkpt_type): New.
12792 (struct breakpoint): New field `type'.
12793 (set_breakpoint_at): Change return type to struct breakpoint
12794 pointer. Set type to `other_breakpoint' by default.
12795 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12796 in the breakpoint list.
12797 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12798 (reinsert_breakpoint): Rename to ...
12799 (reinsert_raw_breakpoint): ... this.
12800 (reinsert_breakpoints_at): Adjust.
12801 * mem-break.h (struct breakpoint): Declare.
12802 (set_breakpoint_at): Change return type to struct breakpoint
12805 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12807 * server.c (handle_query): Assign, not compare.
12809 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12811 Teach linux gdbserver to step-over-breakpoints.
12813 * linux-low.c (can_hardware_single_step): New.
12814 (supports_breakpoints): New.
12815 (handle_extended_wait): If stopping threads, read the stop pc of
12816 the new cloned LWP.
12818 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12819 low target doesn't support retrieving the PC.
12820 (add_lwp): Set last_resume_kind to resume_continue.
12821 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12822 (linux_attach): Don't clear stop_expected. Set the lwp's
12823 last_resume_kind to resume_stop.
12824 (linux_detach_one_lwp): Don't check for removed breakpoints.
12825 (check_removed_breakpoint): Delete.
12826 (status_pending_p): Rename to ...
12827 (status_pending_p_callback): ... this. Don't check for removed
12828 breakpoints. Don't consider threads that are stopped from GDB's
12830 (linux_wait_for_lwp): Always read the stop_pc here.
12831 (cancel_breakpoint): New.
12832 (step_over_bkpt): New global.
12833 (linux_wait_for_event_1): Implement stepping over breakpoints.
12834 (gdb_wants_lwp_stopped): New.
12835 (gdb_wants_all_stopped): New.
12836 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12837 single-step traps here. Store the thread's last reported target
12839 (send_sigstop): Don't clear stop_expected. Always set it,
12841 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12842 (cancel_finished_single_step): New.
12843 (cancel_finished_single_steps): New.
12844 (wait_for_sigstop): Don't cancel finished single-step traps here.
12845 (linux_resume_one_lwp): Don't check for removed breakpoints.
12846 Don't set `step' on non-hardware step archs.
12847 (linux_set_resume_request): Ignore resume_stop requests if already
12848 stopping or stopped. Set the lwp's last_resume_kind.
12849 (resume_status_pending_p): Don't check for removed breakpoints.
12850 (need_step_over_p): New.
12851 (start_step_over): New.
12852 (finish_step_over): New.
12853 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12854 requests. Clear the thread's last reported target waitstatus.
12855 Don't use the `suspended' flag. Don't consider pending breakpoints.
12856 (linux_resume): Start a step-over if necessary.
12857 (proceed_one_lwp): New.
12858 (proceed_all_lwps): New.
12859 (unstop_all_lwps): New.
12860 * linux-low.h (struct lwp_info): Rewrite comment for the
12861 `suspended' flag. Add the `stop_pc' field. Delete the
12862 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12863 Add `'last_resume_kind' and `need_step_over' fields.
12864 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12865 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12866 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12867 (set_raw_breakpoint_at): New.
12868 (set_breakpoint_at): Rewrite to use it.
12869 (reinsert_breakpoint_handler): Delete.
12870 (set_reinsert_breakpoint): New.
12871 (reinsert_breakpoint_by_bp): Delete.
12872 (delete_reinsert_breakpoints): New.
12873 (uninsert_breakpoint): Rewrite.
12874 (uninsert_breakpoints_at): New.
12875 (reinsert_breakpoint): Rewrite.
12876 (reinsert_breakpoints_at): New.
12877 (check_breakpoints): Rewrite.
12878 (breakpoint_here): New.
12879 (breakpoint_inserted_here): New.
12880 (check_mem_read): Adjust.
12881 * mem-break.h (breakpoints_supported, breakpoint_here)
12882 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12883 (reinsert_breakpoint_by_bp): Delete declaration.
12884 (delete_reinsert_breakpoints): Declare.
12885 (reinsert_breakpoint): Delete declaration.
12886 (reinsert_breakpoints_at): Declare.
12887 (uninsert_breakpoint): Delete declaration.
12888 (uninsert_breakpoints_at): Declare.
12889 (check_breakpoints): Adjust prototype.
12890 * server.h: Adjust include order.
12891 (struct thread_info): Declare here. Add a `last_status' field.
12893 2010-03-23 Michael Snyder <msnyder@vmware.com>
12895 * server.c (crc32): New function.
12896 (handle_query): Add handling for 'qCRC:' request.
12898 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12900 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12901 lwp had been stopped by a watchpoint.
12903 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12905 * server.h (internal_error): Declare.
12906 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12907 * utils.c (internal_error): New function.
12909 2010-03-15 Andreas Schwab <schwab@redhat.com>
12911 * configure.srv: Fix typo setting srv_regobj.
12913 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12915 * linux-low.c (fetch_register): Avoid passing a non string literal
12917 (usr_store_inferior_registers): Ditto.
12919 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12921 * linux-low.c (linux_write_memory): Bail out early if peeking
12924 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12926 * linux-low.h (struct lwp_info): New fields
12927 `stopped_by_watchpoint' and `stopped_data_address'.
12928 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12929 here, and cache them in the lwp object.
12930 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12932 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12934 (linux_stopped_by_watchpoint): Rewrite.
12935 (linux_stopped_data_address): Rewrite.
12937 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12939 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12940 switching the current inferior, not before.
12942 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12944 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12945 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12946 i386-linux.c and amd64-linux.c.
12947 (reg-i386.o): Removed.
12948 (reg-i386.c): Likewise.
12949 (reg-i386-linux.o): Likewise.
12950 (reg-i386-linux.c): Likewise.
12951 (reg-x86-64.o): Likewise.
12952 (reg-x86-64.c): Likewise.
12953 (reg-x86-64-linux.o): Likewise.
12954 (reg-x86-64-linux.c): Likewise.
12956 (i386.c): Likewise.
12957 (i386-linux.o): Likewise.
12958 (i386-linux.c): Likewise.
12959 (amd64.o): Likewise.
12960 (amd64.c): Likewise.
12961 (amd64-linux.o): Likewise.
12962 (amd64-linux.c): Likewise.
12964 * configure.srv (srv_i386_regobj): New.
12965 (srv_i386_linux_regobj): Likewise.
12966 (srv_amd64_regobj): Likewise.
12967 (srv_amd64_linux_regobj): Likewise.
12968 (srv_i386_32bit_xmlfiles): Likewise.
12969 (srv_i386_64bit_xmlfiles): Likewise.
12970 (srv_i386_xmlfiles): Likewise.
12971 (srv_amd64_xmlfiles): Likewise.
12972 (srv_i386_linux_xmlfiles): Likewise.
12973 (srv_amd64_linux_xmlfiles): Likewise.
12974 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12975 srv_xmlfiles to $srv_i386_xmlfiles.
12976 (i[34567]86-*-mingw32ce*): Likewise.
12977 (i[34567]86-*-mingw*): Likewise.
12978 (i[34567]86-*-nto*): Likewise.
12979 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12980 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12981 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12982 (x86_64-*-linux*): Likewise.
12984 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12985 (init_registers_amd64_linux): New.
12986 (x86_arch_setup): Replace init_registers_x86_64_linux with
12987 init_registers_amd64_linux.
12989 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12991 * configure.ac: Check for libdl. If it is not available link against
12992 static libthread_db.
12993 * configure: Regenerate.
12995 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12999 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13000 handing a read watchpoint.
13001 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13003 2010-02-12 Doug Evans <dje@google.com>
13005 * linux-low.c (linux_supports_tracefork_flag): Document.
13006 (linux_look_up_symbols): Add comment.
13008 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13010 * regcache.c (supply_register): Clear regcache if buf is NULL.
13012 2010-02-02 Nicolas Roche <roche@sourceware.org>
13013 Joel Brobecker <brobecker@adacore.com>
13015 * inferiors.c (find_inferior): Add function documentation.
13016 (unloaded_dll): Handle the case where the unloaded dll has not
13017 been previously registered in the dll list.
13019 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13021 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13022 (thumb2_breakpoint): New.
13023 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13025 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13027 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13028 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13031 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13033 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13035 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13037 * linux-s390-low.c (s390_collect_ptrace_register)
13038 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13040 2010-01-21 Doug Evans <dje@google.com>
13042 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13043 (PTRACE_ARG4_TYPE): New macro.
13044 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13045 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13046 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13047 (usr_store_inferior_registers): Ditto.
13048 (linux_read_memory, linux_write_memory): Ditto.
13049 (linux_test_for_tracefork): Ditto.
13051 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13052 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13054 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13056 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13059 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13061 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13062 prototype to take a regcache. Adjust.
13064 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13066 * regcache.h (struct thread_info): Forward declare.
13067 (struct regcache): New.
13068 (new_register_cache): Adjust prototype.
13069 (get_thread_regcache): Declare.
13070 (free_register_cache): Adjust prototype.
13071 (registers_to_string, registers_from_string): Ditto.
13072 (supply_register, supply_register_by_name, collect_register)
13073 (collect_register_as_string, collect_register_by_name): Ditto.
13074 * regcache.c (struct inferior_regcache_data): Delete.
13075 (get_regcache): Rename to ...
13076 (get_thread_regcache): ... this. Adjust. Switch inferior before
13077 fetching registers.
13078 (regcache_invalidate_one): Adjust.
13079 (regcache_invalidate): Fix prototype.
13080 (new_register_cache): Return the new register cache.
13081 (free_register_cache): Change prototype.
13082 (realloc_register_cache): Adjust.
13083 (registers_to_string): Change prototype to take a regcache. Adjust.
13084 (registers_from_string): Ditto.
13085 (register_data): Ditto.
13086 (supply_register): Ditto.
13087 (supply_register_by_name): Ditto.
13088 (collect_register): Ditto.
13089 (collect_register_as_string): Ditto.
13090 (collect_register_by_name): Ditto.
13091 * server.c (process_serial_event): Adjust.
13092 * linux-low.h (regset_fill_func, regset_store_func): Change
13094 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13096 * linux-low.c (get_stop_pc): Adjust.
13097 (check_removed_breakpoint): Adjust.
13098 (linux_wait_for_event): Adjust.
13099 (linux_resume_one_lwp): Adjust.
13100 (fetch_register): Add regcache parameter. Adjust.
13101 (usr_store_inferior_registers): Ditto.
13102 (regsets_fetch_inferior_registers): Ditto.
13103 (regsets_store_inferior_registers): Ditto.
13104 (linux_fetch_registers, linux_store_registers): Ditto.
13105 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13107 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13109 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13110 prototype to take a regcache.
13111 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13112 * remote-utils.c (convert_ascii_to_int, outreg)
13113 (prepare_resume_reply): Change prototype to take a regcache.
13115 * target.h (struct target_ops) <fetch_registers, store_registers>:
13116 Change prototype to take a regcache.
13117 (fetch_inferior_registers, store_inferior_registers): Change
13118 prototype to take a regcache. Adjust.
13119 * proc-service.c (ps_lgetregs): Adjust.
13120 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13121 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13122 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13123 take a regcache. Adjust.
13124 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13125 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13126 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13127 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13128 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13129 (cris_cannot_fetch_register):
13130 (cris_breakpoint_at): Change prototype to take a regcache.
13132 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13133 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13134 to take a regcache. Adjust.
13135 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13137 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13138 take a regcache. Adjust.
13139 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13140 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13141 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13142 * linux-mips-low.c (mips_get_pc):
13143 (mips_set_pc): Change prototype to take a regcache. Adjust.
13144 (mips_reinsert_addr): Adjust.
13145 (mips_collect_register): Change prototype to take a regcache.
13147 (mips_supply_register):
13148 (mips_collect_register_32bit, mips_supply_register_32bit)
13149 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13150 (mips_store_fpregset): Ditto.
13151 * linux-ppc-low.c (ppc_supply_ptrace_register)
13152 (ppc_supply_ptrace_register): Ditto.
13153 (parse_spufs_run): Adjust.
13154 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13155 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13156 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13157 take a regcache. Adjust.
13158 * linux-s390-low.c (s390_collect_ptrace_register)
13159 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13160 (s390_set_pc): Change prototype to take a regcache. Adjust.
13161 (s390_arch_setup): Adjust.
13162 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13163 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13164 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13165 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13166 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13168 (sparc_breakpoint_at): Adjust.
13169 * linux-xtensa-low.c (xtensa_fill_gregset):
13170 (xtensa_store_gregset):
13171 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13172 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13173 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13174 prototype to take a regcache. Adjust.
13175 * win32-arm-low.c (arm_fetch_inferior_register)
13176 (arm_store_inferior_register): Change prototype to take a
13178 * win32-i386-low.c (i386_fetch_inferior_register)
13179 (i386_store_inferior_register): Change prototype to take a
13181 * win32-low.c (child_fetch_inferior_registers)
13182 (child_store_inferior_registers): Change prototype to take a
13184 (win32_wait): Adjust.
13185 (win32_fetch_inferior_registers): Change prototype to take a
13187 (win32_store_inferior_registers): Adjust.
13188 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13189 store_inferior_register>: Change prototype to take a regcache.
13191 2010-01-20 Doug Evans <dje@google.com>
13193 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13195 (linux_wait_for_event1, linux_init_signals): Ditto.
13196 (W_STOPCODE): Provide definition if missing.
13198 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13200 * linux-low.c (linux_core_of_thread): New.
13201 (compare_ints, show_process, list_threads): New.
13202 (linux_qxfer_osdata): Report threads and cores.
13203 (linux_target_op): Register linux_core_of_thread.
13204 * remote-utils.c (prepare_resume_reply): Report the core.
13205 (buffer_xml_printf): Support %d specifier.
13206 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13208 (handle_query): Handle qXfer:threads. Announce availability
13210 * target.h (struct target_ops): New field core_of_thread.
13212 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13214 * Makefile.in (clean): Remove new generated files.
13215 (reg-s390.o, reg-s390.c): Remove rules.
13216 (reg-s390x.o, reg-s390x.c): Likewise.
13217 (s390-linux32.o, s390-linux32.c): Add rules.
13218 (s390-linux64.o, s390-linux64.c): Likewise.
13219 (s390x-linux64.o, s390x-linux64.c): Likewise.
13220 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13221 * linux-s390-low.c: Include <elf.h>.
13222 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13223 (init_registers_s390): Remove prototype.
13224 (init_registers_s390x): Likewise.
13225 (init_registers_s390_linux32): Add prototype.
13226 (init_registers_s390_linux64): Likewise.
13227 (init_registers_s390x_linux64): Likewise.
13228 (s390_num_regs_3264): New define.
13229 (s390_regmap_3264): New global variable.
13230 (s390_cannot_fetch_register): Remove obsolete check.
13231 (s390_cannot_store_register): Likewise.
13232 (s390_collect_ptrace_register): Handle upper/lower register halves.
13233 (s390_supply_ptrace_register): Likewise.
13234 (s390_fill_gregset): Update to register number changes.
13235 (s390_get_hwcap): New routine.
13236 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13237 Install appropriate regmap and register set.
13239 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13241 * server.c (gdbserver_version): Update copyright year to 2010.
13242 * gdbreplay.c (gdbreplay_version): Likewise.
13244 2009-12-28 Doug Evans <dje@google.com>
13246 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13247 elf/external.h. Include <elf.h> instead but only if necessary.
13249 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13251 * linux-low.c (linux_remove_process): Remove `detaching'
13252 parameter. Don't release/detach from thread_db here.
13253 (linux_kill): Release/detach from thread_db here, ...
13254 (linux_detach): ... and here, before actually detaching.
13255 (linux_wait_1): ... and here, when a process exits.
13256 * thread-db.c (any_thread_of): New.
13257 (thread_db_free): Switch the current inferior to a thread of the
13260 2009-12-21 Doug Evans <dje@google.com>
13262 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13264 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13265 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13266 warning ifndef __NR_tkill. Move setting of errno there too.
13267 Delete unnecessary resetting of errno after syscall.
13268 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13270 * configure.ac: Check for dladdr.
13271 * config.in: Regenerate.
13272 * configure: Regenerate.
13273 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13274 (try_thread_db_load): Update.
13276 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13278 2009-12-18 Doug Evans <dje@google.com>
13280 * event-loop.c: Include unistd.h if it exists.
13282 * linux-low.c (my_waitpid): Move definition away from being in
13283 between linux_tracefork_child/linux_test_for_tracefork.
13285 * gdb_proc_service.h (psaddr_t): Fix type.
13286 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13287 signature to match glibc.
13289 2009-12-16 Doug Evans <dje@google.com>
13291 * linux-low.c (linux_read_memory): Fix argument to read.
13293 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13295 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13296 events, don't leave current_inferior pointing at null.
13298 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13300 * win32-low.c (LOG): Delete.
13301 (OUTMSG): Output to stderr.
13302 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13303 on compile time LOG macro.
13304 (win32_wait): Fix debug output.
13306 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13308 * win32-low.c (win32_add_one_solib): If the dll name is
13309 "ntdll.dll", prepend the system directory to the dll path.
13311 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13313 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13315 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13316 Vladimir Prus <vladimir@codesourcery.com>
13318 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13319 * configure.ac: Check for __mcoldfire__ and set
13320 gdb_cv_m68k_is_coldfire.
13321 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13322 reg-cf.o and reg-m68k.o.
13323 * configure: Regenerated.
13325 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13327 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13328 Pass it to thread_db_free.
13329 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13330 proper `detaching' argument to linux_remove_process.
13331 * linux-low.h (thread_db_free): Add `detaching' parameter.
13332 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13334 (thread_db_free): Add `detaching' parameter. Only
13335 call td_ta_clear_event if detaching from process.
13337 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13339 * thread-db.c (thread_db_free): Fix typo.
13341 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13344 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13346 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13348 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13349 with an i686 compiler.
13350 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13352 * configure: Rebuilt.
13354 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13358 * server.c (handle_search_memory_1): Correct read_addr initialization
13359 in loop for searching subsequent chunks.
13361 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13363 * configure.ac: New --with-libthread-db option.
13364 * thread-db.c: Allow direct dependence on libthread_db.
13365 (thread_db_free): Adjust.
13366 * config.in: Regenerate.
13367 * configure: Likewise.
13369 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13372 * thread-db.c (attach_thread): New function.
13373 (maybe_attach_thread): Return success/failure.
13374 (find_new_threads_callback): Adjust.
13375 (thread_db_find_new_threads): Loop until no new threads.
13377 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13379 * proc-service.c (ps_lgetregs): Formatting.
13381 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13383 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13384 * configure.ac: Adjust.
13385 * linux-low.h (struct process_info_private): Move members to struct
13387 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13388 * linux-low.c (linux_remove_process): Adjust.
13389 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13390 * server.c (handle_query): Move code ...
13391 (handle_monitor_command): ... here. New function.
13392 * target.h (struct target_ops): New member.
13393 * thread-db.c (struct thread_db): New.
13394 (libthread_db_search_path): New variable.
13395 (thread_db_create_event, thread_db_enable_reporting)
13396 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13397 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13398 (try_thread_db_load_1, dladdr_to_soname): New functions.
13399 (try_thread_db_load, thread_db_load_search): New functions.
13400 (thread_db_init): Search for libthread_db.
13401 (thread_db_free): New function.
13402 (thread_db_handle_monitor_command): Likewise.
13403 * config.in: Regenerate.
13404 * configure: Regenerate.
13406 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13408 * spu-low.c (spu_kill): Wait for inferior to terminate.
13409 Call clear_inferiors.
13410 (spu_detach): Call clear_inferiors.
13412 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13414 * aclocal.m4: Regenerate.
13415 * config.in: Likewise.
13416 * configure: Likewise.
13418 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13420 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13421 (parse_spufs_run): New function.
13422 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13423 (ppc_breakpoint_at): Handle SPU breakpoints.
13425 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13427 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13428 (SPUFS_MAGIC): Define.
13429 (spu_enumerate_spu_ids): New function.
13430 (linux_qxfer_spu): New function.
13431 (linux_target_ops): Install linux_qxfer_spu.
13433 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13435 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13436 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13437 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13438 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13439 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13440 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13441 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13442 (init_registers_powerpc_cell32l): Add prototype.
13443 (init_registers_powerpc_cell64l): Likewise.
13444 (ppc_arch_setup): Detect Cell/B.E. architecture.
13446 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13448 * Makefile.in (datarootdir): New variable.
13450 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13452 * linux-low.c (linux_write_memory): Update debugging output.
13453 * Makefile.in (clean): Add new descriptions.
13454 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13455 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13456 * configure.srv: Add new files for arm*-*-linux*.
13457 * linux-arm-low.c: Add new declarations.
13458 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13459 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13460 (HWCAP_VFPv3D16): New.
13461 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13462 instead of __IWMMXT__.
13463 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13464 (arm_arch_setup): New.
13465 (target_regsets): Remove #ifdef. Add VFP regset.
13466 (the_low_target): Use arm_arch_setup.
13468 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13470 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13471 the main thread again.
13473 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13475 Adding Neutrino gdbserver.
13476 * configure: Regenerated.
13477 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13478 * configure.srv (i[34567]86-*-nto*): New target.
13479 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13480 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13481 (nto_comctrl) [__QNX__]: New function.
13482 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13484 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13486 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13489 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13490 Pedro Alves <pedro@codesourcery.com>
13492 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13493 don't support CONTEXT_EXTENDED_REGISTERS.
13494 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13495 (the_low_target): Install them.
13496 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13497 failing with ERROR_PIPE_NOT_CONNECTED.
13499 2009-06-30 Doug Evans <dje@google.com>
13500 Pierre Muller <muller@ics.u-strasbg.fr>
13502 Add h/w watchpoint support to x86-linux, win32-i386.
13503 * Makefile.in (SFILES): Add i386-low.c
13504 (i386_low_h): Define.
13505 (i386-low.o): Add dependencies.
13506 (linux-x86-low.o): Add i386-low.h dependency.
13507 (win32-i386-low.o): Ditto.
13508 * i386-low.c: New file.
13509 * i386-low.h: New file.
13510 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13511 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13512 * linux-low.c (linux_add_process): Initialize arch_private.
13513 (linux_remove_process): Free arch_private.
13514 (add_lwp): Initialize arch_private.
13515 (delete_lwp): Free arch_private.
13516 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13518 * linux-low.h (process_info_private): New member arch_private.
13519 (lwp_info): New member arch_private.
13520 (linux_target_ops): New members new_process, new_thread,
13522 (ptid_of): New macro.
13523 * linux-x86-low.c: Include stddef.h, i386-low.h.
13524 (arch_process_info): New struct.
13525 (arch_lwp_info): New struct.
13526 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13527 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13528 (i386_dr_low_get_status): New function.
13529 (x86_insert_point, x86_remove_point): New functions.
13530 (x86_stopped_by_watchpoint): New function.
13531 (x86_stopped_data_address): New function.
13532 (x86_linux_new_process, x86_linux_new_thread): New functions.
13533 (x86_linux_prepare_to_resume): New function.
13534 (the_low_target): Add entries for insert_point, remove_point,
13535 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13537 * server.c (debug_hw_points): New global.
13538 (monitor_show_help): Document set debug-hw-points.
13539 (handle_query): Process "set debug-hw-points".
13540 * server.h (debug_hw_points): Declare.
13541 (paddress): Declare.
13542 * utils.c (NUMCELLS, CELLSIZE): New macros.
13543 (get_sell, xsnprintf, paddress): New functions.
13544 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13545 remove_point, stopped_by_watchpoint, stopped_data_address.
13546 * win32-i386-low.c: Include i386-low.h.
13547 (debug_reg_state): Replaces dr.
13548 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13549 (i386_dr_low_get_status): New function.
13550 (i386_insert_point, i386_remove_point): New functions.
13551 (i386_stopped_by_watchpoint): New function.
13552 (i386_stopped_data_address): New function.
13553 (i386_initial_stuff): Update.
13554 (get_thread_context,set_thread_context,i386_thread_added): Update.
13555 (the_low_target): Add entries for insert_point,
13556 remove_point, stopped_by_watchpoint, stopped_data_address.
13557 * win32-low.c (win32_insert_watchpoint): New function.
13558 (win32_remove_watchpoint): New function.
13559 (win32_stopped_by_watchpoint): New function.
13560 (win32_stopped_data_address): New function.
13561 (win32_target_ops): Add entries for insert_watchpoint,
13562 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13563 * win32-low.h (win32_target_ops): New members insert_point,
13564 remove_point, stopped_by_watchpoint, stopped_data_address.
13566 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13568 * server.c (process_serial_event): Re-return unsupported, not
13569 error, if the type isn't recognized. Re-allow supporting only
13570 insert or remove packets. Also call require_running for
13571 breakpoints. Add missing break statement to default case. Tidy.
13572 * target.h (struct target_ops): Rename insert_watchpoint to
13573 insert_point, and remove_watchpoint to remove_point.
13575 * linux-low.h (struct linux_target_ops): Likewise.
13576 * linux-low.c (linux_insert_watchpoint): Rename to ...
13577 (linux_insert_point): ... this. Adjust.
13578 (linux_remove_watchpoint): Rename to ...
13579 (linux_remove_point): ... this. Adjust.
13580 (linux_target_ops): Adjust.
13581 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13582 (cris_insert_point): ... this.
13583 (cris_remove_watchpoint): Rename to ...
13584 (cris_remove_point): ... this.
13585 (the_low_target): Adjust.
13587 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13589 * server.c (handle_v_kill): Pass signal_pid to
13590 kill_inferior if multi_process is zero.
13592 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13594 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13595 * target.h (target_ops): Comment for *_watchpoint to make it clear
13596 the functions can get types '0' and '1'.
13598 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13600 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13601 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13602 * regcache.c (get_regcache): Likewise.
13603 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13604 * win32-low.c (child_fetch_inferior_registers): Remove check for
13607 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13608 Pedro Alves <pedro@codesourcery.com>
13610 * target.h (struct target_ops) <supports_multi_process>: New
13612 (target_supports_multi_process): New.
13613 * server.c (handle_query): Even if GDB reports support, only
13614 enable multi-process if the target also supports it. Report
13615 multi-process support only if the target backend supports it.
13616 * linux-low.c (linux_supports_multi_process): New function.
13617 (linux_target_ops): Install it as target_supports_multi_process
13620 2009-05-24 Doug Evans <dje@google.com>
13622 Global renaming of find_thread_pid to find_thread_ptid.
13623 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13624 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13625 All callers updated.
13627 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13628 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13631 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13632 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13633 (linux_resume_one_lwp): Ditto.
13635 2009-05-23 Doug Evans <dje@google.com>
13637 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13638 from struct inferior_list_entry * to struct lwp_info *.
13639 All callers updated.
13641 2009-05-13 Doug Evans <dje@google.com>
13643 * linux-x86-low.c: Don't include assert.h.
13644 (x86_siginfo_fixup): Use fatal, not assert.
13645 (x86_arch_setup): Fix comment.
13647 2009-05-12 Doug Evans <dje@google.com>
13649 Biarch support for i386/amd64 gdbserver.
13650 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13651 Add linux-x86-low.c.
13652 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13653 (linux-x86-low.o): Add.
13654 * linux-x86-64-low.c: Delete.
13655 * linux-i386-low.c: Delete.
13656 * linux-x86-low.c: New file.
13657 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13659 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13661 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13662 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13663 (linux_child_pid_to_exec_file): New function.
13664 (elf_64_header_p, elf_64_file_p): New functions.
13665 (siginfo_fixup): New function.
13666 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13667 give target a chance to convert layout.
13668 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13669 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13671 2009-05-07 Doug Evans <dje@google.com>
13673 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13674 (regsets_store_inferior_registers): Ditto.
13676 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13680 * linux-low.c (must_set_ptrace_flags): Delete.
13681 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13683 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13684 `lwp->must_set_ptrace_flags' instead.
13685 (linux_wait_for_event_1): Set ptrace options here.
13686 (linux_wait_1): ... not here.
13688 2009-04-30 Doug Evans <dje@google.com>
13690 * inferiors.c (started_inferior_callback): New function.
13691 (attached_inferior_callback): New function.
13692 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13693 * server.c (print_started_pid, print_attached_pid): New functions.
13694 (detach_or_kill_for_exit): New function.
13695 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13696 * server.h (have_started_inferiors_p): Declare.
13697 (have_attached_inferiors_p): Declare.
13699 * inferiors.c (remove_process): Fix memory leak, free process.
13700 * linux-low.c (linux_remove_process): New function.
13701 (linux_kill): Call it instead of remove_process.
13702 (linux_detach, linux_wait_1): Ditto.
13704 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13706 * configure.srv: Add x86 Windows CE target.
13708 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13710 * inferiors.c (get_thread_process): Make global.
13711 * server.h (get_thread_process): Add prototype.
13712 * thread-db.c (find_one_thread): Use get_thread_process
13713 instead of current_process.
13714 (thread_db_get_tls_address): Do not crash if called when
13715 thread layer is not yet initialized.
13717 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13719 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13720 * spu-low.c (current_tid): Rename to ...
13721 (current_ptid): ... this.
13722 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13723 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13724 ptid_get_lwp (current_ptid) instead of current_tid.
13725 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13726 instead of current_tid. Use find_process_pid to verify pid
13727 argument is valid. Pass proper argument to remove_process.
13728 (spu_thread_alive): Compare current_ptid instead of current_tid.
13729 (spu_resume): Likewise.
13731 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13733 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13736 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13738 Implement the multiprocess extensions, and add linux multiprocess
13741 * server.h (ULONGEST): Declare.
13742 (struct ptid, ptid_t): New.
13743 (minus_one_ptid, null_ptid): Declare.
13744 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13745 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13746 (struct inferior_list_entry): Change `id' type from unsigned from
13748 (struct sym_cache, struct breakpoint, struct
13749 process_info_private): Forward declare.
13750 (struct process_info): Declare.
13751 (current_process): Declare.
13752 (all_processes): Declare.
13753 (initialize_inferiors): Declare.
13754 (add_thread): Adjust to use ptid_t.
13755 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13756 (add_process, remove_process, find_thread_pid): Declare.
13757 (find_inferior_id): Adjust to use ptid_t.
13758 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13759 (multi_process): Declare.
13760 (push_event): Adjust to use ptid_t.
13761 (read_ptid, write_ptid): Declare.
13762 (prepare_resume_reply): Adjust to use ptid_t.
13763 (clear_symbol_cache): Declare.
13764 * inferiors.c (all_processes): New.
13765 (null_ptid, minus_one_ptid): New.
13766 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13767 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13768 (add_thread): Change unsigned long to ptid. Remove gdb_id
13770 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13771 (gdb_id_to_thread): Rename to ...
13772 (find_thread_pid): ... this. Change unsigned long to ptid.
13773 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13774 (loaded_dll, pull_pid_from_list): Adjust.
13775 (add_process, remove_process, find_process_pid)
13776 (get_thread_process, current_process, initialize_inferiors): New.
13777 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13778 (struct target_waitstatus) <related_pid>: Ditto.
13779 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13780 return type to int.
13781 (struct target_ops) <join>: Add `pid' argument.
13782 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13783 (struct target_ops) <wait>: Add `ptid' field. Change return type
13785 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13786 (mywait): Add `ptid' argument. Change return type to ptid_t.
13787 (target_pid_to_str): Declare.
13788 * target.c (set_desired_inferior): Adjust to use ptids.
13789 (mywait): Add new `ptid' argument. Adjust.
13790 (target_pid_to_str): New.
13791 * mem-break.h (free_all_breakpoints): Declare.
13792 * mem-break.c (breakpoints): Delelete.
13793 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13794 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13795 to use per-process breakpoint list.
13796 (free_all_breakpoints): New.
13797 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13798 (symbol_cache, all_symbols_looked_up): Delete.
13800 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13802 (prepare_resume_reply): Change ptid argument's type from unsigned
13803 long to ptid_t. Adjust. Implement W;process and X;process.
13804 (free_sym_cache, clear_symbol_cache): New.
13805 (look_up_one_symbol): Adjust to per-process symbol cache. *
13806 * server.c (cont_thread, general_thread, step_thread): Change type
13808 (attached): Delete.
13809 (multi_process): New.
13810 (last_ptid): Change type to ptid_t.
13811 (struct vstop_notif) <ptid>: Change type to ptid_t.
13812 (queue_stop_reply, push_event): Change `ptid' argument's type to
13814 (discard_queued_stop_replies): Add `pid' argument.
13815 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13816 changes. Don't reference the `attached' global.
13817 (attach_inferior): Adjust to mywait interface changes.
13818 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13819 features. Handle and report "multiprocess+". Handle
13821 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13823 (handle_v_kill): New.
13824 (handle_v_stopped): Adjust to use target_pid_to_str.
13825 (handle_v_requests): Allow multiple attaches and runs when
13826 multiprocess extensions are in effect. Handle "vKill".
13827 (myresume): Adjust to use ptids.
13828 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13829 (handle_status): Adjust to discard_queued_stop_replies interface
13831 (first_thread_of, kill_inferior_callback)
13832 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13833 (main): Call initialize_inferiors. Adjust to use ptids, killing
13834 and detaching from all inferiors. Handle multiprocess packet
13836 * linux-low.h: Include gdb_proc_service.h.
13837 (struct process_info_private): New.
13838 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13839 <lwpid_of>: Use ptid_get_lwp.
13840 (get_lwp_thread): Adjust.
13841 (struct lwp_info): Add `dead' member.
13842 (find_lwp_pid): Declare.
13843 * linux-low.c (thread_db_active): Delete.
13844 (new_inferior): Adjust comment.
13845 (inferior_pid): Delete.
13846 (linux_add_process): New.
13847 (handle_extended_wait): Adjust.
13848 (add_lwp): Change unsigned long to ptid.
13849 (linux_create_inferior): Add process to processes table. Adjust
13850 to use ptids. Don't set new_inferior here.
13851 (linux_attach_lwp): Rename to ...
13852 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13853 it. Adjust to use ptids.
13854 (linux_attach_lwp): New.
13855 (linux_attach): Add process to processes table. Don't set
13857 (struct counter): New.
13858 (second_thread_of_pid_p, last_thread_of_process_p): New.
13859 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13860 multiple processes.
13861 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13862 processes. Remove process from process table.
13863 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13864 to multiple processes.
13865 (any_thread_of): New.
13866 (linux_detach): Add `pid' argument, and handle it. Remove process
13867 from processes table.
13868 (linux_join): Add `pid' argument. Handle it.
13869 (linux_thread_alive): Change unsighed long argument to ptid_t.
13870 Consider dead lwps as not being alive.
13871 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13872 threads we're not interested in.
13873 (same_lwp, find_lwp_pid): New.
13874 (linux_wait_for_lwp): Change `pid' argument's type from int to
13876 (linux_wait_for_event): Rename to ...
13877 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13878 from int to ptid_t. Adjust.
13879 (linux_wait_for_event): New.
13880 (linux_wait_1): Add `ptid' argument. Change return type to
13881 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13882 that exit from the process table.
13883 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13885 (mark_lwp_dead): New.
13886 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13887 stopping all threads, mark its main lwp as dead.
13888 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13890 (fetch_register, usr_store_inferior_registers)
13891 (regsets_fetch_inferior_registers)
13892 (regsets_store_inferior_registers, linux_read_memory)
13893 (linux_write_memory): Inline `inferior_pid'.
13894 (linux_look_up_symbols): Adjust to use per-process
13895 `thread_db_active'.
13896 (linux_request_interrupt): Adjust to use ptids.
13897 (linux_read_auxv): Inline `inferior_pid'.
13898 (initialize_low): Don't reference thread_db_active.
13899 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13900 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13901 (ps_getpid): Return the pid of the current inferior.
13902 * thread-db.c (proc_handle, thread_agent): Delete.
13903 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13905 (find_one_thread): Change argument type to ptid_t. Adjust to
13907 (maybe_attach_thread): Adjust to per-process data and ptids.
13908 (thread_db_find_new_threads): Ditto.
13909 (thread_db_init): Ditto.
13910 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13911 processes table. Adjust to use ptids.
13912 (spu_kill, spu_detach): Adjust interface. Remove process from
13914 (spu_join, spu_thread_alive): Adjust interface.
13915 (spu_wait): Adjust interface. Remove process from processes
13916 table. Adjust to use ptids.
13917 * win32-low.c (current_inferior_tid): Delete.
13918 (current_inferior_ptid): New.
13919 (debug_event_ptid): New.
13920 (thread_rec): Take a ptid. Adjust.
13921 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13922 (child_delete_thread): Ditto.
13923 (do_initial_child_stuff): Add `attached' argument. Add process to
13925 (child_fetch_inferior_registers, child_store_inferior_registers):
13927 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13928 (win32_attach): Pass 1 to do_initial_child_stuff.
13929 (win32_kill): Adjust interface. Remove process from processes
13931 (win32_detach): Ditto.
13932 (win32_join): Adjust interface.
13933 (win32_thread_alive): Take a ptid.
13934 (win32_resume): Adjust to use ptids.
13935 (get_child_debug_event): Ditto.
13936 (win32_wait): Adjust interface. Remove exiting process from
13939 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13941 Non-stop mode support.
13943 * server.h (non_stop): Declare.
13944 (gdb_client_data, handler_func): Declare.
13945 (delete_file_handler, add_file_handler, start_event_loop):
13947 (handle_serial_event, handle_target_event, push_event)
13948 (putpkt_notif): Declare.
13949 * target.h (enum resume_kind): New.
13950 (struct thread_resume): Replace `step' field by `kind' field.
13951 (TARGET_WNOHANG): Define.
13952 (struct target_ops) <wait>: Add `options' argument.
13953 <supports_non_stop, async, start_non_stop>: New fields.
13954 (target_supports_non_stop, target_async): New.
13955 (start_non_stop): Declare.
13956 (mywait): Add `options' argument.
13957 * target.c (mywait): Add `options' argument. Print child exit
13958 notifications here.
13959 (start_non_stop): New.
13960 * server.c (non_stop, own_buf, mem_buf): New globals.
13961 (struct vstop_notif): New.
13962 (notif_queue): New global.
13963 (queue_stop_reply, push_event, discard_queued_stop_replies)
13964 (send_next_stop_reply): New.
13965 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13967 (attach_inferior): In non-stop mode, don't wait for the target
13969 (handle_general_set): Handle QNonStop.
13970 (handle_query): When handling qC, return the current general
13971 thread, instead of the first thread of the list.
13972 (handle_query): If the backend supports non-stop mode, include
13973 QNonStop+ in the qSupported query response.
13974 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13976 (handle_v_attach, handle_v_run): Handle non-stop mode.
13977 (handle_v_stopped): New.
13978 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13979 (myresume): Adjust to use resume_kind. Handle non-stop.
13980 (queue_stop_reply_callback): New.
13981 (handle_status): Handle non-stop mode.
13982 (main): Clear non_stop flag on reconnection. Use the event-loop.
13983 Refactor serial protocol handling from here ...
13984 (process_serial_event): ... to this new function. When GDB
13985 selects any thread, select one here. In non-stop mode, wait until
13986 GDB acks all pending events before exiting.
13987 (handle_serial_event, handle_target_event): New.
13988 * remote-utils.c (remote_open): Install remote_desc in the event
13990 (remote_close): Remove remote_desc from the event loop.
13991 (putpkt_binary): Rename to...
13992 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13993 (putpkt_binary): New as wrapper around putpkt_binary_1.
13994 (putpkt_notif): New.
13995 (prepare_resume_reply): In non-stop mode, don't change the
13997 * event-loop.c: New.
13998 * Makefile.in (OBJ): Add event-loop.o.
13999 (event-loop.o): New rule.
14001 * linux-low.h (pid_of): Moved here.
14003 (get_lwp_thread): Use lwpid_of.
14004 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14005 * linux-low.c (pid_of): Delete.
14006 (inferior_pid): Use lwpid_of.
14007 (linux_event_pipe): New.
14008 (target_is_async_p): New.
14010 (handle_extended_wait): Use lwpid_of.
14011 (add_lwp): Don't set lwpid field.
14012 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14013 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14014 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14015 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14016 first. Adjust to linux_wait_for_event interface changes. Use
14018 (linux_detach): Don't delete the main lwp here.
14019 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14020 (status_pending_p): Don't consider explicitly suspended lwps.
14021 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14022 pointer. Add OPTIONS argument. Change return type to int. Use
14023 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14024 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14025 pointer. Add status pointer argument. Return a pid instead of a
14026 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14027 changes. In non-stop mode, don't switch to a random thread.
14028 (linux_wait): Rename to...
14029 (linux_wait_1): ... this. Add target_options argument, and handle
14030 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14031 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14032 clean exit and signal exit code. Don't stop all threads in
14033 non-stop mode. In all-stop mode, only stop all threads when
14034 reporting a stop to GDB. Handle explicit thread stop requests.
14035 (async_file_flush, async_file_mark): New.
14037 (send_sigstop): Use lwpid_of.
14038 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14039 interface changes. In non-stop mode, don't switch to a random
14041 (linux_resume_one_lwp): Use lwpid_of.
14042 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14043 (linux_resume_one_thread): ... this. Handle resume_stop. In
14044 non-stop mode, don't look for pending flag in all threads.
14045 (resume_status_pending_p): Don't consider explicitly suspended
14047 (my_waitpid): Reimplement. Emulate __WALL.
14048 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14050 (sigchld_handler, linux_supports_non_stop, linux_async)
14051 (linux_start_non_stop): New.
14052 (linux_target_ops): Register linux_supports_non_stop, linux_async
14053 and linux_start_non_stop.
14054 (initialize_low): Install SIGCHLD handler.
14055 * thread-db.c (thread_db_create_event, find_one_thread)
14056 (thread_db_get_tls_address): Use lwpid_of.
14057 * win32-low.c (win32_detach): Adjust to use resume_kind.
14058 (win32_wait): Add `options' argument.
14059 * spu-low.c (spu_resume): Adjust to use resume_kind.
14060 (spu_wait): Add `options' argument.
14062 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14064 Decouple target code from remote protocol.
14066 * target.h (enum target_waitkind): New.
14067 (struct target_waitstatus): New.
14068 (struct target_ops) <wait>: Return an unsigned long. Take a
14069 target_waitstatus pointer instead of a char pointer.
14070 (mywait): Likewise.
14071 * target.c (mywait): Change prototype to return an unsigned long.
14072 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14073 * server.h (thread_from_wait, old_thread_from_wait): Delete
14075 (prepare_resume_reply): Change prototype to take a
14077 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14078 (last_status, last_ptid): New.
14079 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14080 pid instead of a signal.
14081 (attach_inferior): Remove "status" and "signal" parameters.
14083 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14085 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14086 (handle_v_requests, myresume): Remove "status" and "signal"
14087 parameters. Adjust.
14088 (handle_status): New.
14089 (main): Delete local `status'. Adjust.
14090 * remote-utils.c: Include target.h.
14091 (prepare_resume_reply): Change prototype to take a
14092 target_waitstatus. Adjust.
14094 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14096 * spu-low.c (spu_wait): Adjust.
14097 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14099 (win32_wait): Adjust.
14101 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14103 * target.h (struct thread_resume): Delete leave_stopped member.
14104 (struct target_ops): Add a `n' argument to the `resume' callback.
14105 * server.c (start_inferior): Adjust.
14106 (handle_v_cont, myresume): Adjust.
14107 * linux-low.c (check_removed_breakpoint): Adjust to resume
14108 interface change, and to removed leave_stopped field.
14109 (resume_ptr): Delete.
14110 (struct thread_resume_array): New.
14111 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14112 resume interface change.
14113 (linux_continue_one_thread, linux_queue_one_thread)
14114 (resume_status_pending_p): Check if the resume field is NULL
14115 instead of checking the leave_stopped member.
14116 (linux_resume): Adjust to the target resume interface change.
14117 * spu-low.c (spu_resume): Adjust to the target resume interface
14119 * win32-low.c (win32_detach, win32_resume): Ditto.
14121 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14123 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14125 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14127 (linux_continue_one_thread): Only preserve the stepping flag if
14128 there's a pending breakpoint.
14130 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14132 * server.c (main): After the inferior having exited, call
14133 remote_close before exiting gdbserver.
14135 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14137 Fix size of FPSCR in Power 7 processors.
14138 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14139 (PPC_FEATURE_HAS_DFP): New #define.
14140 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14143 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14145 * server.c (handle_query) Whitespace and formatting.
14147 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14149 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14150 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14151 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14152 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14153 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14154 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14155 Makefile.in, configure.ac: Fix whitespace throughout.
14156 * configure: Regenerate.
14158 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14160 * inferiors.c (find_inferior): Make it safe for the callback
14161 function to delete the currently iterated inferior.
14163 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14165 * Makefile.in (linuw_low_h): Move higher.
14166 (thread-db.o): Depend on $(linux_low_h).
14168 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14170 Rename "process" to "lwp" throughout.
14172 * linux-low.c (all_processes): Rename to...
14173 (all_lwps): ... this.
14174 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14175 (add_process): Rename to ...
14176 (add_lwp): ... this. Adjust.
14177 (linux_create_inferior): Adjust.
14178 (linux_attach_lwp): Adjust.
14179 (linux_attach): Adjust.
14180 (linux_kill_one_process): Rename to ...
14181 (linux_kill_one_lwp): ... this. Adjust.
14182 (linux_kill): Adjust.
14183 (linux_detach_one_process): Rename to ...
14184 (linux_detach_one_lwp): ... this. Adjust.
14185 (linux_detach): Adjust.
14186 (check_removed_breakpoint): Adjust.
14187 (status_pending_p): Adjust.
14188 (linux_wait_for_process): Rename to ...
14189 (linux_wait_for_lwp): ... this. Adjust.
14190 (linux_wait_for_event): Adjust.
14191 (send_sigstop): Adjust.
14192 (wait_for_sigstop): Adjust.
14193 (stop_all_processes): Rename to ...
14194 (stop_all_lwps): ... this.
14195 (linux_resume_one_process): Rename to ...
14196 (linux_resume_one_lwp): ... this. Adjust.
14197 (linux_set_resume_request, linux_continue_one_thread)
14198 (linux_queue_one_thread, resume_status_pending_p)
14199 (usr_store_inferior_registers, regsets_store_inferior_registers)
14200 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14202 * linux-low.h (get_process): Rename to ...
14203 (get_lwp): ... this. Adjust.
14204 (get_thread_process): Rename to ...
14205 (get_thread_lwp): ... this. Adjust.
14206 (get_process_thread): Rename to ...
14207 (get_lwp_thread): ... this. Adjust.
14208 (struct process_info): Rename to ...
14209 (struct lwp_info): ... this.
14210 (all_processes): Rename to ...
14211 (all_lwps): ... this.
14212 * proc-service.c (ps_lgetregs): Adjust.
14213 * thread-db.c (thread_db_create_event, find_one_thread)
14214 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14216 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14218 * server.c (handle_query): Handle "qAttached".
14220 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14222 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14223 GPLv3, update license URL.
14225 2009-03-01 Doug Evans <dje@google.com>
14227 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14228 (server_h): Add gdb_signals.h.
14229 (signals.o): Update.
14230 * server.h (target_signal_from_host,target_signal_to_host_p)
14231 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14233 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14235 * remote-utils.c (getpkt): Also generate remote-debug
14236 information if noack_mode is set.
14238 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14240 * server.c (handle_query): Report qXfer:siginfo:read and
14241 qXfer:siginfo:write as supported and handle them.
14242 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14243 * linux-low.c (linux_xfer_siginfo): New.
14244 (linux_target_ops): Set it.
14246 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14248 * server.c (gdbserver_usage): Mention --remote-debug.
14249 (main): Accept '--remote-debug' switch.
14251 2009-01-18 Doug Evans <dje@google.com>
14253 * regcache.c (new_register_cache): No need to check result of xcalloc.
14254 * server.c (handle_search_memory): Back out calls to xmalloc,
14255 result is checked and error is returned to user upon failure.
14256 (handle_query): Ditto. Add more checks for result of malloc.
14257 (handle_v_cont): Check result of malloc, report error back to
14259 (handle_v_run): Ditto. Call freeargv.
14260 * server.h (freeargv): Declare.
14261 * utils.c (freeargv): New fn.
14263 2009-01-15 Doug Evans <dje@google.com>
14265 * gdbreplay.c (perror_with_name): Make arg const char *.
14266 * server.h (target_signal_to_name): Make return type const char *.
14267 * thread-db.c (thread_db_err_str): Make return type const char *.
14268 * utils.c (perror_with_name): Make arg const char *.
14270 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14272 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14273 when handling a EXIT_PROCESS_DEBUG_EVENT.
14275 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14277 * gdbreplay.c (gdbreplay_version): Update copyright year.
14278 * server.c (gdbserver_version): Likewise.
14280 2009-01-05 Doug Evans <dje@google.com>
14282 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14283 (handle_extended_wait): Improve comment.
14285 2008-12-13 Doug Evans <dje@google.com>
14287 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14288 * server.h (ATTR_MALLOC): New macro.
14289 (xmalloc,xcalloc,xstrdup): Declare.
14290 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14291 * inferiors.c: Ditto.
14292 * linux-low.c: Ditto.
14293 * mem-break.c: Ditto.
14294 * regcache.c: Ditto.
14295 * remote-utils.c: Ditto.
14298 * win32-low.c: Ditto.
14300 2008-12-12 Doug Evans <dje@google.com>
14302 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14303 in debugging printf.
14305 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14307 2008-12-09 Doug Evans <dje@google.com>
14309 * linux-low.h (struct process_info): Delete member tid, unused.
14310 * thread-db.c (find_one_thread): Update.
14311 (maybe_attach_thread): Update.
14313 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14315 * target.h (struct target_ops): Add qxfer_osdata member.
14316 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14318 (linux_qxfer_osdata): New functions.
14319 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14321 * server.c (handle_query): Handle "qXfer:osdata:read:".
14322 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14323 (buffer_xml_printf): New functions.
14324 * server.h (struct buffer): New.
14325 (buffer_grow_str, buffer_grow_str0): New macros.
14326 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14327 (buffer_xml_printf): Declare.
14329 2008-11-24 Doug Evans <dje@google.com>
14331 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14333 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14335 * server.c (handle_v_run): Always use the supplied argument list.
14337 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14339 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14340 (xtensa_regmap_table): Add entry for scompare1.
14342 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14344 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14345 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14346 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14347 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14348 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14349 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14350 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14351 XML target descriptions.
14352 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14353 when inferior is running on an ISA 2.05 or later processor. Add
14354 special case to return offset for full 64-bit slot of FPSCR when
14357 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14359 * Makefile.in (SFILES, clean): Added sparc64 files.
14360 (reg-sparc64.o, reg-sparc64.c): New.
14361 * configure.srv (sparc*-*-linux*): New configuration.
14362 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14363 syscall arguments for SPARC.
14364 (regsets_store_inferior_registers): Likewise.
14365 * linux-sparc-low.c: New file.
14367 2008-10-21 Doug Evans <dje@google.com>
14369 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14370 (READLINE_DIR,READLINE_DEP): Delete.
14371 (INTERNAL_CFLAGS): Update.
14372 (LINTFLAGS): Update.
14374 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14376 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14377 whole argv from the last run, not just argv[0].
14379 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14381 * regcache.c (new_register_cache): Return NULL if the register
14382 cache size isn't known yet.
14383 (free_register_cache): Avoid dereferencing a NULL regcache.
14385 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14387 * configure.srv: Merge MIPS and MIPS64.
14389 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14391 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14393 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14395 * Makefile.in: Add required vsx dependencies.
14397 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14398 Declare init_registers_powerpc_vsx32l.
14399 Declare init_registers_powerpc_vsx64l.
14400 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14401 (ppc_arch_setup): Check for VSX in hwcap.
14402 (ppc_fill_vsxregset): New function.
14403 (ppc_store_vsxregset): New function.
14404 Add new VSX entry in regset_info target_regsets.
14406 * configure.srv: Add new VSX dependencies.
14408 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14410 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14411 (remote_open): Set or clear transport_is_reliable.
14412 (putpkt_binary): Don't expect acks in noack mode.
14413 (getpkt): Don't send ack/nac in noack mode.
14414 * server.c (handle_general_set): Handle QStartNoAckMode.
14415 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14417 (main): Reset noack_mode on every connection.
14418 * server.h (noack_mode): Declare.
14420 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14422 * Makefile.in (GDBREPLAY_OBS): New variable.
14423 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14425 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14426 Daniel Jacobowitz <dan@codesourcery.com>
14428 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14429 (usr_store_inferior_registers): Likewise.
14430 (regsets_store_inferior_registers): Likewise.
14432 2008-07-31 Rolf Jansen <rj@surtec.com>
14433 Pedro Alves <pedro@codesourcery.com>
14435 * configure.ac: Check for memmem declaration.
14436 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14437 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14438 (disable_packet_qfThreadInfo): Unconditionally compile.
14439 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14440 * configure, config.in: Regenerate.
14442 2008-07-28 Doug Kwan <dougkwan@google.com>
14444 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14445 (linux_write_memory): Remove declaration of errno.
14447 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14449 * linux-low.c (handle_extended_wait): Do not use "status"
14450 variable uninitialized.
14452 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14454 * server.c (handle_v_attach): Inhibit reporting dll changes.
14456 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14458 * remote-utils.c (prepare_resume_reply): If requested, don't
14459 output "thread:TID" in the T stop reply.
14461 * server.c (disable_packet_vCont, disable_packet_Tthread)
14462 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14463 (handle_query): If requested, disable support for qC, qfThreadInfo
14465 (handle_v_requests): If requested, disable support for vCont.
14466 (gdbserver_show_disableable): New.
14467 (main): Handle --disable-packet and --disable-packet=LIST.
14469 * server.h (disable_packet_vCont, disable_packet_Tthread)
14470 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14472 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14474 * server.c (gdbserver_usage): Mention --version.
14476 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14478 * Makefile.in (gdbreplay.o): New rule.
14480 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14482 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14483 message, not gdbserver.
14485 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14486 Nathan Sidwell <nathan@codesourcery.com>
14487 Joseph Myers <joseph@codesourcery.com>
14489 * acinclude.m4: Include ../../config/acx.m4.
14490 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14491 * configure, config.in: Regenerate.
14492 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14493 * server.c (gdbserver_version): Print PKGVERSION.
14494 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14495 (main): Adjust gdbserver_usage calls.
14496 * gdbreplay.c (version, host_name): Add declarations.
14497 (gdbreplay_version, gdbreplay_usage): New.
14498 (main): Accept --version and --help options.
14500 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14502 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14503 (arm_breakpoint_at): Handle Thumb.
14504 (the_low_target): Add comment.
14506 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14508 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14510 2008-05-09 Doug Evans <dje@google.com>
14512 * server.h (decode_search_memory_packet): Declare.
14513 * remote-utils.c (decode_search_memory_packet): New fn.
14514 * server.c (handle_search_memory_1): New fn.
14515 (handle_search_memory): New fn.
14516 (handle_query): Process qSearch:memory packets.
14518 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14520 * regcache.c (registers_length): Remove.
14521 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14522 full register packet.
14523 * regcache.h (registers_length): Remove prototype.
14524 * server.h (PBUFSIZ): Define to 16384.
14526 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14528 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14529 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14530 powerpc-64l.o, and powerpc-altivec64l.o.
14531 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14532 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14533 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14534 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14535 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14538 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14539 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14540 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14541 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14542 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14543 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14544 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14545 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14546 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14547 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14550 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14551 (init_registers_powerpc_32l): ... this new prototype.
14552 (init_registers_powerpc_32): Remove, replace by ...
14553 (init_registers_powerpc_altivec32l): ... this new prototype.
14554 (init_registers_powerpc_e500): Remove, replace by ...
14555 (init_registers_powerpc_e500l): ... this new prototype.
14556 (init_registers_ppc64): Remove, replace by ...
14557 (init_registers_powerpc_64l): ... this new prototype.
14558 (init_registers_powerpc_64): Remove, replace by ...
14559 (init_registers_powerpc_altivec64l): ... this new prototype.
14560 (ppc_num_regs): Set to 73.
14561 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14562 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14563 (ppc_cannot_store_register): Handle orig_r3 and trap.
14564 (ppc_arch_setup): Update init_registers_... calls.
14565 (ppc_fill_gregset): Handle orig_r3 and trap.
14567 * inferiors.c (clear_inferiors): Reset current_inferior.
14569 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14571 * acinclude.m4: Add override.m4.
14572 * configure: Regenerate.
14574 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14576 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14577 initial call to init_register_ppc64.
14579 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14581 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14582 single powerpc*-*-linux* case.
14583 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14585 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14587 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14588 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14590 * linux-ppc-low.c: Include <elf.h>.
14591 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14592 (ppc_hwcap): New global variable.
14593 (ppc_regmap): Remove __SPE__ #ifdef sections.
14594 (ppc_regmap_e500): New global variable.
14595 (ppc_cannot_store_register): Update __SPE__ special case.
14596 (ppc_get_hwcap): New function.
14597 (ppc_arch_setup): Use it to determine whether inferior supports
14598 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14599 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14600 Do not access registers if target does not support AltiVec.
14601 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14602 Do not access registers if target does not support SPE.
14603 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14605 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14607 * linux-low.c (disabled_regsets, num_regsets): New.
14608 (use_regsets_p): Delete.
14609 (linux_wait_for_process): Clear disabled_regsets.
14610 (regsets_fetch_inferior_registers): Check and set it.
14611 (regsets_store_inferior_registers): Likewise.
14612 (linux_fetch_registers, linux_store_registers): Do not use
14614 (initialize_low): Allocate disabled_regsets.
14616 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14618 * Makefile.in (LIBOBJS): New.
14619 (OBS): Use LIBOBJS.
14620 (memmem.o): New rule.
14621 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14622 * configure: Regenerated.
14624 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14626 * server.c (handle_query): Never return "unsupported" for
14627 qXfer:features:read queries.
14629 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14631 * server.c (get_features_xml): Fix inverted condition.
14632 (handle_query): Always support qXfer:feature:read.
14634 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14636 * server.c (wrapper_argv): New.
14637 (start_inferior): Handle wrapper_argv. If set, expect an extra
14639 (gdbserver_usage): Document --wrapper.
14640 (main): Parse --wrapper.
14642 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14644 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14645 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14646 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14647 (ppc_set_pc): Likewise.
14648 (ppc_arch_setup): New function.
14649 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14650 of collect_register.
14651 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14653 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14655 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14656 instead of linux-ppc64-low.o.
14657 * linux-ppc64-low.c: Remove file.
14658 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14659 (linux-ppc64-low.o): Remove rule.
14661 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14662 (init_registers_powerpc_64): Likewise.
14663 (ppc_regmap): Conditionally define depending on __powerpc64__.
14664 (ppc_cannot_store_register): Do not special-case "fpscr" when
14665 compiled on __powerpc64__.
14666 (ppc_collect_ptrace_register): New function.
14667 (ppc_supply_ptrace_register): New function.
14668 (ppc_breakpoint): Change type to "unsigned int".
14669 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14670 (the_low_target): Conditionally provide initializers for the
14671 arch_setup member depending on __powerpc64__. Install
14672 collect_ptrace_register and supply_ptrace_register members.
14674 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14676 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14677 * server.c (gdbserver_xmltarget): Define.
14678 (get_features_xml): Use it to replace "target.xml" and arch_string.
14680 * configure.srv: Remove srv_xmltarget. Add XML files that were
14681 mentioned there to srv_xmlfiles instead. Remove conditional tests
14682 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14683 srv_xmlfiles and srv_regobj to include all possible choices.
14684 * configure.ac (srv_xmltarget): Remove.
14685 (srv_xmlfiles): Do not add "target.xml".
14686 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14687 checks for supplementary target information.
14688 * configure: Regenerate.
14689 * Makefile.in (XML_TARGET): Remove.
14690 (target.xml): Remove rule.
14691 (clean): Do not clean up target.xml.
14692 (.PRECIOUS): Do not mention target.xml.
14694 * target.h (struct target_ops): Remove arch_string member.
14695 * linux-low.c (linux_arch_string): Remove.
14696 (linux_target_ops): Remove arch_string initializer.
14697 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14698 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14699 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14700 * spu-low.c (spu_arch_string): Remove.
14701 (spu_target_ops): Remove arch_string initializer.
14702 * win32-low.c (win32_arch_string): Remove.
14703 (win32_target_ops): Remove arch_string initializer.
14704 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14705 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14706 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14708 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14710 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14711 by collect_ptrace_register and supply_ptrace_register hooks.
14712 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14713 instead of checking for the_low_target.left_pad_xfer.
14714 (usr_store_inferior_registers): Use collect_ptrace_register callback
14715 instead of checking for the_low_target.left_pad_xfer.
14717 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14718 (s390_supply_ptrace_register): Likewise.
14719 (s390_fill_gregset): Call s390_collect_ptrace_register.
14720 (the_low_target): Update.
14722 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14723 (ppc_supply_ptrace_register): Likewise.
14724 (the_low_target): Update.
14726 * linux-i386-low.c (the_low_target): Update.
14727 * linux-x86-64-low.c (the_low_target): Update.
14729 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14731 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14732 reg-s390.o and reg-s390x.o.
14734 * linux-low.c (new_inferior): New global variable.
14735 (linux_create_inferior, linux_attach): Set it.
14736 (linux_wait_for_process): Call the_low_target.arch_setup after the
14737 target has stopped for the first time.
14738 (initialize_low): Do not call the_low_target.arch_setup.
14740 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14741 (s390_set_pc): Likewise.
14742 (s390_arch_setup): New function.
14743 (the_low_target): Use s390_arch_setup as arch_setup routine.
14745 * regcache.c (realloc_register_cache): New function.
14746 (set_register_cache): Call it for each existing regcache.
14748 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14750 * server.h (init_registers): Remove prototype.
14752 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14753 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14754 instead of init_registers ().
14755 * linux-arm-low.c (init_registers_arm): Add prototype.
14756 (init_registers_arm_with_iwmmxt): Likewise.
14757 (the_low_target): Add initializer for arch_setup field.
14758 * linux-cris-low.c (init_registers_cris): Add prototype.
14759 (the_low_target): Add initializer for arch_setup field.
14760 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14761 (the_low_target): Add initializer for arch_setup field.
14762 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14763 (the_low_target): Add initializer for arch_setup field.
14764 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14765 (the_low_target): Add initializer for arch_setup field.
14766 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14767 (the_low_target): Add initializer for arch_setup field.
14768 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14769 (the_low_target): Add initializer for arch_setup field.
14770 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14771 (init_registers_mips64_linux): Likewise.
14772 (the_low_target): Add initializer for arch_setup field.
14773 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14774 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14775 (the_low_target): Add initializer for arch_setup field.
14776 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14777 (init_registers_powerpc_64): Likewise.
14778 (the_low_target): Add initializer for arch_setup field.
14779 * linux-s390-low.c (init_registers_s390): Add prototype.
14780 (init_registers_s390x): Likewise.
14781 (the_low_target): Add initializer for arch_setup field.
14782 * linux-sh-low.c (init_registers_sh): Add prototype.
14783 (the_low_target): Add initializer for arch_setup field.
14784 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14785 (the_low_target): Add initializer for arch_setup field.
14786 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14787 (the_low_target): Add initializer for arch_setup field.
14789 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14790 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14791 instead of init_registers ().
14792 * win32-arm-low.c (init_registers_arm): Add prototype.
14793 (the_low_target): Add initializer for arch_setup field.
14794 * win32-i386-low.c (init_registers_i386): Add prototype.
14795 (the_low_target): Add initializer for arch_setup field.
14797 * spu-low.c (init_registers_spu): Add prototype.
14798 (initialize_low): Call initialie_registers_spu () instead of
14799 initialize_registers ().
14801 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14803 * server.c (handle_v_requests): When handling the vRun and vAttach
14804 packets, if already debugging a process, don't kill it. Return an
14807 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14809 * server.c (handle_query): Correct length check.
14811 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14813 * win32-low.c (do_initial_child_stuff): Add process handle
14814 parameter. Set current_process_handle and current_process_id from the
14815 parameters. Clear globals.
14816 (win32_create_inferior): Don't set current_process_handle and
14817 current_process_id here. Instead pass them on the call to
14818 do_initial_child_stuff.
14819 (win32_attach): Likewise.
14820 (win32_clear_inferiors): New.
14821 (win32_kill): Don't close the current process handle or the
14822 current thread handle here. Instead call win32_clear_inferiors.
14823 (win32_detach): Don't open a new handle to the process. Call
14824 win32_clear_inferiors.
14825 (win32_join): Don't rely on current_process_handle; open a new
14826 handle using the process id.
14827 (win32_wait): Call win32_clear_inferiors when the inferior process
14830 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14832 * server.c (monitor_show_help): Add "exit".
14834 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14836 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14837 (clean): Add reg-xtensa.c.
14838 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14839 * configure.srv (xtensa*-*-linux*) New target.
14840 * linux-xtensa-low.c: New.
14841 * xtensa-xtregs.c: New.
14843 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14845 * hostio.c: Don't include errno.h.
14846 (errno_to_fileio_errno): Move to hostio-errno.
14847 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14848 error number outputting to the target->hostio_last_error callback.
14849 (hostio_packet_error): Use FILEIO_EINVAL directly.
14850 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14851 calls to hostio_error.
14852 * hostio-errno.c: New.
14853 * server.h (hostio_last_error_from_errno): Declare.
14854 * target.h (target_ops): Add hostio_last_error member.
14855 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14856 as hostio_last_error handler.
14857 * spu-low.c (spu_target_ops): Likewise.
14858 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14859 (wince_hostio_last_error): New functions.
14860 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14861 as hostio_last_error handler.
14862 (win32_target_ops) [!_WIN32_WCE]: Register
14863 hostio_last_error_from_errno as hostio_last_error handler.
14864 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14865 (hostio-errno.o): New rule.
14866 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14867 * configure.srv (srv_hostio_err_objs): New variable. Default to
14869 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14870 * configure: Regenerate.
14872 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14874 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14875 (linux_kill, linux_detach): Clean up the process list.
14876 * remote-utils.c (remote_open): Improve port number parsing.
14877 (putpkt_binary, input_interrupt): Only send interrupts if the target
14879 * server.c (extended_protocol): Make static.
14880 (attached): Define earlier.
14881 (exit_requested, response_needed, program_argv): New variables.
14882 (target_running): New.
14883 (start_inferior): Clear attached here.
14884 (attach_inferior): Set attached here.
14885 (require_running): Define.
14886 (handle_query): Use require_running and target_running. Implement
14888 (handle_v_attach, handle_v_run): New.
14889 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14890 (gdbserver_usage): Update.
14891 (main): Redo argument parsing. Handle --debug and --multi. Handle
14892 --attach along with other options or after the port. Save
14893 program_argv. Support no initial program. Resynchronize
14894 communication with GDB after an error. Handle "monitor exit".
14895 Use require_running and target_running. Always allow the extended
14896 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14897 restart in extended mode.
14898 * README: Refer to the GDB manual. Update --attach usage.
14900 2007-12-20 Andreas Schwab <schwab@suse.de>
14902 * linux-low.c (STACK_SIZE): Define.
14903 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14904 (linux_test_for_tracefork): Likewise.
14906 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14908 * linux-low.c (linux_wait_for_event): Update messages. Do not
14909 reinsert auto-delete breakpoints.
14910 * mem-break.c (struct breakpoint): Change return type of handler to
14912 (set_breakpoint_at): Update handler type.
14913 (reinsert_breakpoint_handler): Return 1 instead of calling
14915 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14917 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14918 * mem-break.h (set_breakpoint_at): Update handler type.
14919 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14920 * win32-low.c (auto_delete_breakpoint): New.
14921 (get_child_debug_event): Use it.
14923 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14925 * configure.ac: Check for pread and pwrite.
14926 * hostio.c (handle_pread): Fall back to lseek and read.
14927 (handle_pwrite): Fall back to lseek and write.
14928 * config.in, configure: Regenerated.
14930 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14932 * server.c (myresume): Add own_buf argument.
14933 (main): Update calls.
14935 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14937 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14938 * remote-utils.c (remote_open): Do not call disable_async_io.
14939 (block_async_io): Delete.
14940 (unblock_async_io): Make static.
14941 (initialize_async_io): New.
14942 * server.c (handle_v_cont): Handle async I/O here.
14943 (myresume): Likewise. Move other common resume tasks here...
14944 (main): ... from here. Call initialize_async_io. Disable async
14945 I/O before the main loop.
14946 * server.h (initialize_async_io): Declare.
14947 (block_async_io, unblock_async_io): Delete prototypes.
14948 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14950 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14952 * remote-utils.c (readchar): Allow binary data in received messages.
14954 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14956 * win32-low.c (attaching): New global.
14957 (win32_create_inferior): Clear the `attaching' global.
14958 (win32_attach): Set the `attaching' global.
14959 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14960 attaching. Only set a breakpoint at the entry point if not
14963 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14965 * server.c (main): Don't report dll events on the initial
14966 connection on attaches.
14968 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14970 * server.c (main): Relax numerical bases supported for the pid of
14971 the --attach command line argument.
14973 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14975 * win32-low.c (win32_attach): Call OpenProcess before
14976 DebugActiveProcess, not after. Add last error output to error
14979 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14981 * win32-low.c (win32_get_thread_context)
14982 (win32_set_thread_context): New functions.
14983 (thread_rec): Use win32_get_thread_context.
14984 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14985 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14988 2007-12-03 Leo Zayas
14989 Pedro Alves <pedro_alves@portugalmail.pt>
14991 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14993 (child_add_thread): Minor cleanup.
14994 (child_continue): Resume artificially suspended threads before
14995 calling ContinueDebugEvent.
14996 (suspend_one_thread): New.
14997 (fake_breakpoint_event): New.
14998 (get_child_debug_event): Change return type to int. Check here if
14999 gdb sent an interrupt request. If a soft interrupt was requested,
15000 fake a breakpoint event. Return 0 if there is no event to handle,
15002 (win32_wait): Don't check here if gdb sent an interrupt request.
15003 Ensure there is a valid event to handle.
15004 (win32_request_interrupt): Add soft interruption method as last
15007 2007-12-03 Leo Zayas
15008 Pedro Alves <pedro_alves@portugalmail.pt>
15010 * win32-low.h (win32_thread_info): Add descriptions to the
15011 structure members. Replace `suspend_count' counter by a
15013 * win32-low.c (thread_rec): Update condition of when to get the
15014 context from the inferior. Rely on ContextFlags being set if it
15015 has already been retrieved. Only suspend the inferior thread if
15016 we haven't already. Warn if that fails.
15017 (continue_one_thread): s/suspend_count/suspended/. Only call
15018 ResumeThread once. Warn if that fails.
15020 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15022 * win32-low.c (win32_wait): Don't read from the inferior when it
15023 has already exited.
15025 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15027 * Makefile.in (win32_low_h): New variable.
15028 (win32-low.o): Add dependency on $(win32_low_h).
15029 (win32-arm-low.o, win32-i386-low.o): New rules.
15031 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15033 * hostio.c: Correct copyright year.
15035 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15037 * Makefile.in (OBS): Add hostio.o.
15038 (hostio.o): New rule.
15039 * server.h (handle_vFile): Declare.
15040 * hostio.c: New file.
15041 * server.c (handle_v_requests): Take packet_len and new_packet_len
15042 for binary packets. Call handle_vFile.
15043 (main): Update call to handle_v_requests.
15045 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15047 * linux-low.c: Include <sched.h>.
15049 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15051 * linux-low.c (linux_tracefork_grandchild): New.
15052 (linux_tracefork_child): Use clone.
15053 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15055 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15057 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15059 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15061 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15063 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15065 * inferiors.c (change_inferior_id): Delete.
15066 (add_pid_to_list, pull_pid_from_list): New.
15067 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15068 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15069 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15070 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15071 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15072 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15073 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15074 (using_threads): Always set to 1.
15075 (handle_extended_wait): New.
15076 (add_process): Do not set TID.
15077 (linux_create_inferior): Set must_set_ptrace_flags.
15078 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15079 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15080 (linux_thread_alive): Rename TID argument to LWPID.
15081 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15082 (linux_wait_for_event): Do not use TID or check using_threads. Update
15083 call to dead_thread_notify. Call handle_extended_wait.
15084 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15085 (send_sigstop): Delete sigstop_sent.
15086 (wait_for_sigstop): Avoid TID.
15087 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15088 (linux_test_for_tracefork): New.
15089 (linux_lookup_signals): Use thread_db_active and
15090 linux_supports_tracefork_flag.
15091 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15092 * linux-low.h (get_process_thread): Avoid TID.
15093 (struct process_ifo): Move thread_known and tid to the end. Remove
15095 (linux_attach_lwp, thread_db_init): Update prototypes.
15096 * server.h (change_inferior_id): Delete prototype.
15097 (add_pid_to_list, pull_pid_from_list): New prototypes.
15098 * thread-db.c (thread_db_use_events): New.
15099 (find_first_thread): Rename to...
15100 (find_one_thread): ...this. Update callers and messages. Do not
15101 call fatal. Check thread_db_use_events. Do not call
15102 change_inferior_id or new_thread_notify.
15103 (maybe_attach_thread): Update. Do not call new_thread_notify.
15104 (thread_db_init): Set thread_db_use_events. Check use_events.
15105 * utils.c (fatal, warning): Correct message prefix.
15107 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15109 * Makefile.in (clean): Remove new files.
15110 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15111 (powerpc-64.o, powerpc-64.c): New rules.
15112 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15113 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15115 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15117 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15118 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15119 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15120 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15121 (target_regsets): Add AltiVec and SPE register sets.
15122 * configure.ac: Check for AltiVec and SPE.
15123 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15124 (ppc_fill_vrregset, ppc_store_vrregset): New.
15125 (target_regsets): Add AltiVec register set.
15126 * configure: Regenerated.
15128 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15130 * linux-low.c (O_LARGEFILE): Define.
15131 (linux_read_memory): Use /proc/PID/mem.
15132 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15133 * configure, config.in: Regenerated.
15135 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15137 * linux-low.c (linux_wait_for_event): Do not pass signals while
15140 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15142 * win32-low.c (create_process): New.
15143 (win32_create_inferior): Use create_process instead of
15144 CreateProcess. If create_process failed retry appending an ".exe"
15145 suffix. Store the GetLastError result immediatelly after
15146 create_process calls and use it on the call to error.
15148 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15150 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15152 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15154 * configure.ac: Switch license to GPLv3.
15156 2007-08-01 Michael Snyder <msnyder@access-company.com>
15158 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15160 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15162 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15164 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15165 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15166 CloseToolhelp32Snapshot.
15167 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15168 CloseToolhelp32Snapshot.
15170 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15172 * server.c (main): Check for inferior exit before main loop.
15174 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15176 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15177 instead of on tmp_desc.
15179 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15180 Daniel Jacobowitz <dan@codesourcery.com>
15182 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15183 (add_thread): Minor cleanups.
15184 (clear_inferiors): Move lower in the file. Clear the DLL
15186 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15187 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15188 (xml_escape_text): New.
15189 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15191 (handle_v_cont): Report errors.
15192 (gdbserver_version): Update.
15193 (main): Correct size of own_buf. Do not report initial DLL events.
15194 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15195 (unloaded_dll, xml_escape_text): New.
15196 * win32-low.c (enum target_waitkind): Update comments.
15197 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15198 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15199 (win32_EnumProcessModules, win32_GetModuleInformation)
15200 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15201 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15202 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15203 (win32_Module32First, win32_Module32Next, load_toolhelp)
15204 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15205 (get_child_debug_event): Handle DLL events.
15206 (win32_wait): Likewise.
15208 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15210 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15211 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15213 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15215 * win32-low.c (handle_output_debug_string): Ignore event if not
15218 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15220 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15222 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15224 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15226 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15228 * inferiors.c (change_inferior_id): Add comment.
15229 * linux-low.c (check_removed_breakpoint): Add an early
15230 prototype. Improve debug output.
15231 (linux_attach): Doc update.
15232 (linux_detach_one_process, linux_detach): Clean up before releasing
15234 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15235 * linux-low.h (struct process_info): Doc improvement.
15236 * mem-break.c (delete_all_breakpoints): New.
15237 * mem-break.h (delete_all_breakpoints): New prototype.
15238 * thread-db.c (find_first_thread): New.
15239 (thread_db_create_event): Call it instead of
15240 thread_db_find_new_threads. Clean up unused variables.
15241 (maybe_attach_thread): Remove first thread handling.
15242 (thread_db_find_new_threads): Use find_first_thread.
15243 (thread_db_get_tls_address): Likewise.
15245 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15247 * thread-db.c (thread_db_find_new_threads): Add prototype.
15248 (thread_db_create_event): Check for the main thread before adding
15250 (maybe_attach_thread): Only enable event reporting if TID == 0.
15251 (thread_db_get_tls_address): Check for new threads.
15253 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15255 * linux-low.c (linux_create_inferior): Try execv before execvp.
15256 * spu-low.c (spu_create_inferior): Likewise.
15258 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15260 * linux-low.c (linux_create_inferior): Change execv to execvp.
15261 * spu-low.c (spu_create_inferior): Likewies.
15263 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15265 * Makefile.in (clean): Clean new files instead of deleted ones.
15266 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15267 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15269 * configure.srv: Specify XML files and new regformats for MIPS and
15271 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15272 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15273 an entry for the restart register.
15274 (mips_cannot_fetch_register, mips_cannot_store_register)
15275 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15276 register names to match the XML descriptions.
15277 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15278 restart register instead of $0.
15280 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15281 Markus Deuling <deuling@de.ibm.com>
15283 * remote-utils.c (decode_xfer_write): New function.
15284 * server.h (decode_xfer_write): Add prototype.
15285 * server.c (handle_query): Add PACKET_LEN argument. Support
15286 qXfer:spu:read and qXfer:spu:write packets.
15287 (main): Pass packet_len to handle_query.
15288 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15289 * target.h (target_ops): Add qxfer_spu.
15291 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15293 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15294 accessing non-seekable spufs files.
15296 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15298 * server.c (handle_query): Add reply for qC packet.
15300 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15301 Leo Zayas <lerele@champenstudios@com>
15303 * server.h (check_remote_input_interrupt_request): New function.
15304 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15305 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15306 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15307 (check_remote_input_interrupt_request): New function.
15308 * server.h (check_remote_input_interrupt_request): Declare.
15309 * win32-low.c (winapi_DebugBreakProcess,
15310 winapi_GenerateConsoleCtrlEvent): New typedefs.
15311 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15313 (win32_wait): Check for remote interrupt request
15314 with check_remote_input_interrupt_request.
15315 (win32_request_interrupt): New function.
15316 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15318 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15320 * win32-low.c (debug_registers_changed,
15321 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15322 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15323 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15324 (thread_rec): Get context using the low target.
15325 (child_add_thread): Call thread_added on the low target,
15326 which does the same thing.
15328 (do_initial_child_stuff): Remove debug registers references.
15329 Set context using the low target. Resume threads after
15330 setting the contexts.
15331 (child_continue): Remove dead variable. Remove debug
15332 registers references.
15333 (child_fetch_inferior_registers): Go through the low target.
15334 (do_child_store_inferior_registers): Remove.
15335 (child_store_inferior_registers): Go through the low target.
15336 (win32_resume): Remove debug registers references.
15337 Set context using the low target.
15338 (handle_exception): Change return type to void. Don't record
15339 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15340 first chance exception.
15341 (get_child_debug_event): Change return type to void. Remove
15342 goto loop. Always return after waiting for debug event.
15343 (win32_wait): Convert to switch statement. Handle spurious
15346 * win32-i386-low.c (debug_registers_changed,
15347 debug_registers_used): New.
15348 (initial_stuff): Rename to ...
15349 (i386_initial_stuff): ... this. Clear debug registers
15351 (store_debug_registers): Delete.
15352 (i386_get_thread_context): New.
15353 (load_debug_registers): Delete.
15354 (i386_set_thread_context): New.
15355 (i386_thread_added): New.
15356 (single_step): Rename to ...
15357 (i386_single_step): ... this.
15358 (do_fetch_inferior_registers): Rename to ...
15359 (i386_fetch_inferior_register): ... this.
15360 (i386_store_inferior_register): New.
15361 (the_low_target): Adapt to new interface.
15363 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15364 (arm_get_thread_context): New.
15365 (arm_set_thread_context): New.
15367 (do_fetch_inferior_registers): Rename to ...
15368 (arm_fetch_inferior_register): ... this.
15369 (arm_store_inferior_register): New.
15370 (arm_wince_breakpoint): Reimplement as unsigned long.
15371 (arm_wince_breakpoint_len): Define.
15372 (the_low_target): Adapt to new interface.
15374 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15375 load_debug_registers. Add get_thread_context, set_thread_context,
15376 thread_added and store_inferior_register. Rename
15377 fetch_inferior_registers to fetch_inferior_register.
15378 (regptr): Remove declaration.
15380 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15382 * linux-low.c (linux_detach): Change return type to int. Return 0.
15383 * spu-low.c (spu_detach): Likewise.
15385 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15387 * target.h (target_ops): Change return type of detach to int.
15389 (join_inferior): New.
15390 * server.c (main): Don't skip detach support on mingw32.
15391 If the inferior doesn't support detaching return error.
15392 Call join_inferior instead of using waitpid.
15393 * linux-low.c (linux_join): New.
15394 (linux_target_op): Add linux_join.
15395 * spu-low.c (spu_join): New.
15396 (spu_target_ops): Add spu_join.
15397 * win32-low.c (win32_detach): Adapt to new interface.
15398 Reopen current_process_handle before detaching. Issue a child
15399 resume before detaching.
15401 (win32_target_op): Add win32_join.
15403 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15405 * win32-low.c (win32-attach): Fix return value.
15406 * target.h (target_ops): Describe ATTACH return values.
15408 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15410 * win32-low.c (GETPROCADDRESS): Define.
15411 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15412 (winapi_DebugSetProcessKillOnExit): Likewise.
15413 (win32_create_inferior): Force usage of ansi CreateProcessA.
15414 (win32_attach): Use GETPROCADDRESS.
15415 (win32_detach): Likewise.
15417 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15419 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15421 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15423 * win32-low.c: Commit leftover changes from 2007-03-29.
15425 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15427 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15428 fields short instead of int. Add explicit padding.
15429 (i387_cache_to_fsave): Remove unnecessary casts.
15430 (i387_fsave_to_cache): Doc fix.
15431 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15433 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15435 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15436 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15438 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15440 * configure.srv (arm*-*-mingw32ce*): Move near the other
15443 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15445 * configure.ac: Add errno checking.
15446 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15447 sys/file.h and malloc.h.
15448 (AC_CHECK_DECLS): Add perror.
15449 (srv_mingwce): Handle.
15450 * configure.srv (i[34567]86-*-cygwin*): Add
15451 win32-i386-low.o to srv_tgtobj.
15452 (i[34567]86-*-mingw*): Likewise.
15453 (arm*-*-mingw32ce*): Add case.
15454 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15455 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15456 [__MINGW32CE__] (strerror): New function.
15457 [__MINGW32CE__] (errno): Define to GetLastError.
15458 [__MINGW32CE__] (COUNTOF): New macro.
15459 (remote_open): Remove extra close call.
15460 * mem-break.c (delete_breakpoint_at): New function.
15461 * mem-break.h (delete_breakpoint_at): Declare.
15462 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15463 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15464 [USE_WIN32API] (read, write): Add char* casts.
15465 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15466 * server.h: Include wincecompat.h on Windows CE.
15467 [HAVE_ERRNO_H]: Check.
15468 (perror): Declare if not declared.
15469 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15470 (perror_with_name): Remove errno declaration.
15471 * wincecompat.h: New.
15472 * wincecompat.c: New.
15473 * win32-low.h: New.
15474 * win32-arm-low.c: New.
15475 * win32-i386-low.c: New.
15476 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15477 (OUTMSG2): Make it safe.
15479 (COUNTOF): New macro.
15480 (NUM_REGS): Get it from the low target.
15481 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15482 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15483 (thread_rec): Let low target handle debug registers.
15484 (child_add_thread): Likewise.
15485 (child_init_thread_list): Likewise.
15486 (continue_one_thread): Likewise.
15488 (do_child_fetch_inferior_registers): Move to ...
15489 * win32-i386-low.c: ... here, and rename to ...
15490 (do_fetch_inferior_registers): ... this.
15491 * win32-low.c (child_fetch_inferior_registers):
15492 Go through the low target.
15493 (do_child_store_inferior_registers): Use regptr.
15494 (strwinerror): New function.
15495 (win32_create_inferior): Handle Windows CE.
15496 Use strwinerror instead of strerror on Windows error
15497 codes. Add program to the error output.
15498 Don't close the main thread handle on Windows CE.
15499 (win32_attach): Use coredll.dll on Windows CE.
15500 (win32_kill): Close current process and current
15502 (win32_detach): Use coredll.dll on Windows CE.
15503 (win32_resume): Let low target handle debug registers, and
15505 (handle_exception): Add/Remove initial breakpoint. Avoid
15506 non-existant WSTOPSIG on Windows CE.
15507 (win32_read_inferior_memory): Cast to remove warning.
15508 (win32_arch_string): Go through the low target.
15509 (initialize_low): Call set_breakpoint_data with the low
15510 target's breakpoint.
15511 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15512 FOP_REGNUM, mappings): Move to ...
15513 * win32-i386-low.c: ... here.
15514 * win32-low.c (win32_thread_info): Move to ...
15515 * win32-low.h: ... here.
15516 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15517 win32-arm-low.c and wincecompat.c.
15518 (all:): Add $EXEEXT.
15519 (install-only:): Likewise.
15520 (gdbserver:): Likewise.
15521 (gdbreplay:): Likewise.
15522 * config.in: Regenerate.
15523 * configure: Regenerate.
15525 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15527 * win32-low.c: Rename typedef thread_info to
15528 win32_thread_info throughout.
15530 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15532 * win32-i386-low.c: Rename to ...
15533 * win32-low.c: ... this.
15534 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15535 * Makefile.in: Likewise.
15537 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15539 * remote-utils.c (monitor_output): Constify msg parameter.
15540 * server.h (monitor_output): Likewise.
15541 * win32-i386-low.c (handle_output_debug_string): New.
15542 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15543 handle_output_debug_string.
15544 (get_child_debug_event): Likewise.
15546 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15548 * server.c (main): Correct strtoul check.
15550 2007-03-27 Jon Ringle <jon@ringle.org>
15552 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15554 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15556 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15558 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15560 * terminal.h: Check HAVE_SGTTY_H.
15562 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15564 * remote-utils.c (remote_open): Print out the assigned port number.
15566 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15568 * remote-utils.c (monitor_output): New function.
15569 * server.c (debug_threads): Define here.
15570 (monitor_show_help): New function.
15571 (handle_query): Handle qRcmd.
15572 (main): Do not handle 'd' packet.
15573 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15574 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15577 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15579 * Makefile.in (EXEEXT): New.
15580 (clean): Use $(EXEEXT).
15582 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15584 * target.h (target_ops): Rename send_signal to request_interrupt,
15585 and remove enum target_signal parameter.
15586 * linux-low.c (linux_request_interrupt): Rename from
15587 linux_send_signal, and always send SIGINT.
15588 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15589 and always send SIGINT.
15590 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15592 (input_interrupt): Likewise.
15594 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15596 * server.c (get_features_xml): Check if target implemented
15598 * win32-i386-low.c (win32_arch_string): New.
15599 (win32_target_ops): Add win32_arch_string as arch_string member.
15601 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15603 * spu-low.c (spu_arch_string): New.
15604 (spu_target_ops): Add spu_arch_string.
15606 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15608 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15609 * configure.ac: Do not check for terminal.h.
15610 * configure, config.in: Regenerated.
15612 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15614 * Makefile.in (OBS): Add $(XML_BUILTIN).
15615 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15617 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15618 (arm-with-iwmmxt.c): New.
15619 * config.in, configure: Regenerate.
15620 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15621 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15622 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15623 (arm*-*-linux*): Add iWMMXt and regset support.
15624 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15625 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15626 (arm_store_wmmxregset, target_regsets): New.
15627 * server.c (get_features_xml): Take annex argument. Check builtin
15629 (handle_query): Handle multiple annexes.
15631 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15633 * remote-utils.c [USE_WIN32API] (read, write): Define.
15634 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15637 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15639 * linux-i386-low.c (the_low_target): Set arch_string.
15640 * linux-x86-64-low.c (the_low_target): Likewise.
15641 * linux-low.c (linux_arch_string): New.
15642 (linux_target_ops): Add it.
15643 * linux-low.h (struct linux_target_ops): Add arch_string.
15644 * server.c (write_qxfer_response): Use const void * for DATA.
15645 (get_features_xml): New.
15646 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15647 * target.h (struct target_ops): Add arch_string method.
15649 2007-01-03 Denis Pilat <denis.pilat@st.com>
15650 Daniel Jacobowitz <dan@codesourcery.com>
15652 * linux-low.c (linux_kill): Handle being called with no threads.
15653 * win32-i386-low.c (win32_kill): Likewise.
15654 (get_child_debug_event): Clear current_process_handle.
15656 2006-12-30 Denis PILAT <denis.pilat@st.com>
15657 Daniel Jacobowitz <dan@codesourcery.com>
15659 * remote-utils.c (remote_open): Check the type of specified
15660 serial port devices before opening them.
15661 * server.c (main): Kill the inferior if an error occurs during
15662 the first remote_open.
15664 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15666 * README: Update supported targets.
15668 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15670 * Makefile.in (clean): Remove reg-mips64.c.
15671 (reg-mips64.c, reg-mips64.o): New rules.
15672 * configure.srv: Handle mips64. Include regset support for mips.
15673 * linux-mips-low.c (union mips_register): New.
15674 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15675 (mips_breakpoint, mips_breakpoint_at): Use int.
15676 (mips_collect_register, mips_supply_register)
15677 (mips_collect_register_32bit, mips_supply_register_32bit)
15678 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15679 (mips_store_fpregset, target_regsets): New.
15680 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15682 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15684 * configure.srv: Add target "spu*-*-*".
15685 * Makefile.in (clean): Remove reg-spu.c.
15686 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15687 * spu-low.c: New file.
15689 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15691 * configure.ac: Correct td_thr_tls_get_addr test.
15692 * configure: Regenerated.
15694 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15696 * linux-low.c (linux_wait_for_event): Reformat. Use the
15697 pass_signals array.
15698 * remote-utils.c (decode_address_to_semicolon): New.
15699 * server.c (pass_signals, handle_general_set): New.
15700 (handle_query): Mention QPassSignals for qSupported.
15701 (main): Call handle_general_set.
15702 * server.h (pass_signals, decode_address_to_semicolon): New.
15704 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15706 * server.c (handle_query): Correct error handling for read_auxv.
15708 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15710 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15711 and srv_linux_thread_db to yes.
15712 * linux-s390-low.c (s390_fill_gregset): New function.
15713 (target_regsets): Define data structure.
15715 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15717 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15718 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15719 * config.in, configure: Regenerated.
15720 * inferiors.c (gdb_id_to_thread): New function.
15721 (gdb_id_to_thread_id): Use it.
15722 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15723 * linux-low.h (struct process_info): Add th member.
15724 (thread_db_get_tls_address): New prototype.
15725 * remote-utils.c (decode_address): Make non-static.
15726 * server.c (handle_query): Handle qGetTLSAddr.
15727 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15728 * target.h (struct target_ops): Add get_tls_address.
15729 * thread-db.c (maybe_attach_thread): Save the thread handle.
15730 (thread_db_get_tls_address): New.
15732 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15734 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15735 (linux_resume_one_process): Take a siginfo_t *. Update all
15736 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15737 (struct pending_signals): Add a siginfo_t.
15738 (linux_wait_for_process): Always set last_status.
15739 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15740 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15741 * linux-low.h (struct process_info): Add last_status.
15743 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15745 * remote-utils.c (try_rle): New function.
15746 (putpkt_binary): Use it.
15748 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15750 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15751 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15752 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15753 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15754 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15757 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15759 * server.c (terminal_fd): New variable.
15760 (old_foreground_pgrp): Likewise.
15761 (restore_old_foreground_pgrp): New function.
15762 (start_inferior): Record the terminal file descriptor in terminal_fd
15763 and its original foreground group in old_foreground_pgrp. Register
15764 restore_old_foreground_pgrp with atexit().
15766 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15768 * server.c (handle_query): Correct qPart to qXfer.
15770 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15772 * configure.ac: Check for more headers which are missing on
15773 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15774 * configure.srv: Add Cygwin and mingw32.
15775 * remote-utils.c: Don't include headers unconditionally which
15776 are missing on mingw32. Include <winsock.h> for mingw32.
15777 (remote_open): Adjust for mingw32 support. Flush
15778 standard error after writing to it.
15779 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15780 (unblock_async_io, enable_async_io, disable_async_io)
15781 (readchar, getpkt): Update for Winsock support.
15782 (prepare_resume_reply): Expect a protocol signal number.
15783 * server.c: Disable <sys/wait.h> on mingw32.
15784 (start_inferior): Adjust for mingw32 support. Flush
15785 standard error after writing to it.
15786 (attach_inferior): Likewise. Use protocol signal
15788 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15790 * win32-i386-low.c: New file.
15791 * Makefile.in (XM_CLIBS): Set.
15792 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15793 (win32-i386-low.o): New dependency rule.
15794 * linux-low.c (linux_wait): Use target signal numbers.
15795 * target.h (struct target_ops): Doc fix.
15796 * server.h (target_signal_to_name): New prototype.
15797 * gdbreplay.c: Don't include headers unconditionally which
15798 are missing on mingw32. Include <winsock.h> for mingw32.
15799 (remote_close, remote_open): Adjust for Winsock support.
15800 * configure, config.in: Regenerated.
15802 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15804 * server.c (decode_xfer_read, write_qxfer_response): New.
15805 (handle_query): Take a packet length argument. Handle
15806 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15807 the qSupported response.
15808 (main): Update call to handle_query.
15810 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15812 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15813 (putpkt_binary): Renamed from putpkt and adjusted for binary
15815 (putpkt): New wrapper for putpkt_binary.
15816 (readchar): Don't mask off the high bit.
15817 (decode_X_packet): New function.
15818 * server.c (main): Call putpkt_binary if a handler sets the packet
15819 length. Save the length of the incoming packet. Handle 'X'.
15820 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15822 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15824 * server.c (handle_query): Handle qSupported.
15826 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15828 * remote-utils.c (all_symbols_looked_up): New variable.
15829 (look_up_one_symbol): Check it.
15830 * server.h (look_up_one_symbol): New declaration.
15831 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15833 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15835 * Makefile.in (linux-arm-low.o): Update dependencies.
15836 * linux-arm-low.c: Include "gdb_proc_service.h".
15837 (PTRACE_GET_THREAD_AREA): Define.
15838 (ps_get_thread_area): New function.
15840 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15842 * configure.srv (m68k*-*-uclinux*): New target.
15843 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15844 (linux_resume_one_process): Remove extraneous cast.
15845 (linux_read_offsets): New.
15846 (linux_target_op): Add linux_read_offsets on mmuless systems.
15847 * server.c (handle_query): Add qOffsets logic.
15848 * target.h (struct target_ops): Add read_offsets.
15850 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15852 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15853 (PTRACE_GET_THREAD_AREA): Define.
15854 (ps_get_thread_area): New function.
15855 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15856 (linux-x86-64-low.o): Update.
15858 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15860 * configure.ac: Remove checks for prfpregset_t.
15861 * gdb_proc_service.h: New file.
15862 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15863 new "gdb_proc_service.h".
15864 * proc-service.c: Likewise.
15865 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15866 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15867 * Makefile.in (gdb_proc_service_h): Updated.
15868 * configure, config.in: Regenerated.
15870 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15872 * remote-utils.c (prepare_resume_reply): Move declaration
15873 of gdb_id_from_wait to the top of the block.
15875 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15877 * linux-low.c (regsets_store_inferior_registers): Read the regset
15878 from the target before filling it.
15880 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15882 * server.c (attach_inferior): Return SIGTRAP for a successful
15885 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15887 * Makefile.in (OBS): Add version.o.
15888 (STAGESTUFF): Delete.
15889 (version.o): Add dependencies.
15890 (version.c): Replace rule.
15891 (clean): Remove version.c.
15892 * server.c (gdbserver_version): New.
15893 (gdbserver_usage): Use printf.
15894 (main): Handle --version and --help.
15895 * server.h (version, host_name): Add declarations.
15897 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15909 * linux-x86-64-low.c:
15911 * linux-s390-low.c:
15912 * linux-ppc64-low.c:
15914 * linux-mips-low.c:
15915 * linux-m68k-low.c:
15916 * linux-m32r-low.c:
15919 * linux-ia64-low.c:
15920 * linux-i386-low.c:
15921 * linux-crisv32-low.c:
15933 * gdbserver.1: Add (C) after Copyright. Update the FSF
15936 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15938 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15939 (arm_breakpoint_at): Recognize both breakpoints.
15940 (the_low_target): Use the correct breakpoint instruction.
15942 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15944 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15945 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15946 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15947 (the_low_target): Update.
15949 2005-10-25 Andreas Schwab <schwab@suse.de>
15951 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15953 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15954 (ia64_num_regs): Reduce to 462.
15956 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15958 * acinclude.m4: Correct quoting.
15959 * aclocal.m4: Regenerated.
15961 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15962 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15963 (thread_db_init): Call thread_db_err_str.
15964 * configure.ac: Check for TD_VERSION.
15965 * config.in, configure: Regenerated.
15967 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15969 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15971 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15973 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15974 is not available. Define HAVE_PTRACE_GETREGS if it is.
15975 * config.in, configure: Regenerated.
15976 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15977 * linux-i386-low.c, linux-m68k-low.c: Update to use
15978 HAVE_PTRACE_GETREGS.
15979 * linux-low.c (regsets_fetch_inferior_registers)
15980 (regsets_store_inferior_registers): Only return 0 if we processed
15982 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15983 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15985 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15987 * inferiors.c (struct thread_info): Add gdb_id.
15988 (add_thread): Add gdb_id argument.
15989 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15990 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15991 calls to add_thread.
15992 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15993 * server.c (handle_query): Use thread_to_gdb_id.
15994 (handle_v_cont, main): Use gdb_id_to_thread_id.
15995 * server.h (add_thread): Update prototype.
15996 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15999 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16001 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16002 left-padded registers.
16003 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16004 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16006 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16008 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16009 * configure: Regenerate.
16010 * config.in: Regenerate.
16011 * server.h (NEED_DECLARATION_STRERROR):
16012 Replace with !HAVE_DECL_STRERROR.
16014 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16016 * linux-low.c (linux_wait, linux_send_signal): Don't test
16017 an unsigned long variable for > 0 if it could be MAX_ULONG.
16018 * server.c (myresume): Likewise.
16019 * target.c (set_desired_inferior): Likewise.
16021 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16023 * configure.ac: Simplify and improve check for socklen_t.
16024 * configure, config.in: Regenerate.
16026 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16028 * acconfig.h: Remove.
16029 * configure.ac: Add a test for socklen_t. Use three-argument
16030 AC_DEFINE throughout.
16031 * config.in: Regenerated using autoheader 2.59.
16032 * configure: Regenerated.
16034 * gdbreplay.c (socklen_t): Provide a default.
16035 (remote_open): Use socklen_t.
16036 * remote-utils.c (socklen_t): Provide a default.
16037 (remote_open): Use socklen_t.
16038 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16041 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16043 * linux-low.c (linux_read_memory, linux_write_memory)
16044 (linux_read_auxv): Likewise.
16045 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16046 (check_mem_write): Likewise.
16047 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16049 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16050 (registers_from_string, register_data): Likewise.
16051 * server.c (handle_query, main): Likewise.
16052 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16053 (decode_M_packet): Likewise.
16054 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16055 * target.h (struct target_ops): Update read_memory, write_memory,
16057 (read_inferior_memory, write_inferior_memory): Update.
16058 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16059 to unsigned char *.
16060 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16061 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16062 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16063 linux-s390-low.c, linux-sh-low.c: Update for changes in
16064 read_inferior_memory and the_low_target->breakpoint.
16066 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16068 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16069 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16070 * configure.srv: Add powerpc64-*-linux*.
16071 * linux-ppc64-low.c: New file.
16073 2005-05-23 Orjan Friberg <orjanf@axis.com>
16075 * linux-cris-low.c: New file with support for CRIS.
16076 * linux-crisv32-low.c: Ditto for CRISv32.
16077 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16078 (clean): Add reg-cris.c and reg-crisv32.c.
16079 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16080 reg-crisv32.o, and reg-crisv32.c to make rules.
16081 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16082 recognized targets.
16084 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16086 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16087 of sizeof (PTRACE_XFER_TYPE).
16088 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16090 2005-05-12 Orjan Friberg <orjanf@axis.com>
16092 * target.h (struct target_ops): Add insert_watchpoint,
16093 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16094 pointers for hardware watchpoint support.
16095 * linux-low.h (struct linux_target_ops): Ditto.
16096 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16097 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16098 to linux_target_ops.
16099 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16101 * server.c (main): Recognize 'Z' and 'z' packets.
16103 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16105 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16106 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16107 (the_low_target): Add new members.
16109 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16111 * proc-service.c (ps_lgetregs): Search all_processes instead of
16114 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16116 * server.c (start_inferior): Change return type to int.
16117 (attach_inferior): Change sigptr to int *.
16118 (handle_v_cont, handle_v_requests): Change signal to int *.
16119 (main): Change signal to int.
16121 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16123 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16124 * configure.srv: Add m32r*-*-linux*.
16125 * linux-m32r-low.c: New file.
16127 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16129 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16131 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16133 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16134 Take unsigned long arguments for PIDs.
16135 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16136 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16137 (wait_for_sigstop, linux_resume_one_process)
16138 (regsets_fetch_inferior_registers, linux_send_signal)
16139 (linux_read_auxv): Likewise. Update the types of variables holding
16140 PIDs. Update format string specifiers.
16141 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16142 * remote-utils.c (prepare_resume_reply): Likewise.
16143 * server.c (cont_thread, general_thread, step_thread)
16144 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16146 (handle_query): Update format specifiers.
16147 (handle_v_cont, main): Use strtoul for thread IDs.
16148 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16149 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16150 (general_thread, step_thread, thread_from_wait)
16151 (old_thread_from_wait): Update.
16152 * target.h (struct thread_resume): Use unsigned long for THREAD.
16153 (struct target_ops): Use unsigned long for arguments to attach and
16156 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16158 * acinclude.m4: Include bfd/bfd.m4 directly.
16159 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16160 <agriffis@toolchain.org>.
16161 * aclocal.m4, configure: Regenerated.
16163 2005-01-07 Andrew Cagney <cagney@gnu.org>
16165 * configure.ac: Rename configure.in, require autoconf 2.59.
16166 * configure: Re-generate.
16168 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16170 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16171 LIBS when finished.
16172 * aclocal.m4: Regenerated.
16173 * configure: Regenerated.
16175 2004-11-21 Andreas Schwab <schwab@suse.de>
16177 * linux-m68k-low.c (m68k_num_gregs): Define.
16178 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16179 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16180 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16181 (m68k_breakpoint_at): New. Add to the_low_target.
16183 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16184 srv_linux_thread_db to yes.
16186 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16188 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16189 (ARCH_SET_FS): Likewise.
16190 (ARCH_GET_FS): Likewise.
16191 (ARCH_GET_GS): Likewise.
16193 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16195 * linux-i386-low.c (ps_get_thread_area): New.
16196 * linux-x86-64-low.c (ps_get_thread_area): New.
16197 * linux-low.c: Include <sys/syscall.h>.
16198 (linux_kill_one_process): Don't kill the first thread here.
16199 (linux_kill): Kill the first thread here.
16200 (kill_lwp): New function.
16201 (send_sigstop, linux_send_signal): Use it.
16202 * proc-service.c: Clean up #ifdefs.
16203 (fpregset_info): Delete.
16204 (ps_lgetregs): Update and enable implementation.
16205 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16207 * remote-utils.c (struct sym_cache, symbol_cache): New.
16208 (input_interrupt): Print a clearer message.
16209 (async_io_enabled): New variable.
16210 (enable_async_io, disable_async_io): Use it. Update comments.
16211 (look_up_one_symbol): Use the symbol cache.
16212 * thread-db.c (thread_db_look_up_symbols): New function.
16213 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16215 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16217 * configure.in: Test for -rdynamic.
16218 * configure: Regenerated.
16219 * Makefile (INTERNAL_LDFLAGS): New.
16220 (gdbserver, gdbreplay): Use it.
16222 2004-09-02 Andrew Cagney <cagney@gnu.org>
16224 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16226 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16228 * linux-low.c (linux_wait): Clear all_processes list also.
16230 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16232 * linux-low.c: Include <errno.h>. Remove extern declaration of
16235 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16237 * gdbreplay.c, server.h, utils.c: Update copyright years.
16239 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16241 * server.c (main): Print child status or termination signal from
16242 variable 'signal', not 'sig'.
16244 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16246 * linux-low.c (linux_read_memory): Change return type to
16247 int. Check for and return error from ptrace().
16248 * target.c (read_inferior_memory): Change return type to int. Pass
16249 back return status from the_target->read_memory().
16250 * target.h (struct target_ops): Adapt *read_memory() prototype.
16252 (read_inferior_memory): Adapt prototype.
16253 * server.c (main): Return an error packet if
16254 read_inferior_memory() returns an error.
16256 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16258 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16259 Unify with other clean targets.
16261 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16263 * server.c (handle_v_cont): Call set_desired_inferior.
16265 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16267 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16269 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16271 * linux-low.c (linux_wait): Unblock async I/O.
16272 (linux_resume): Block and enable async I/O.
16273 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16274 * server.h (block_async_io, unblock_async_io): Add prototypes.
16276 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16278 * remote-utils.c (remote_open): Print a status notice after
16279 opening a TCP port.
16280 * server.c (attach_inferior): Print a status notice after
16283 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16285 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16287 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16289 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16291 * server.c, target.h: Update copyright years.
16293 2004-02-25 Roland McGrath <roland@redhat.com>
16295 * target.h (struct target_ops): New member `read_auxv'.
16296 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16297 * linux-low.c (linux_read_auxv): New function.
16298 (linux_target_ops): Initialize `read_auxv' member to that.
16300 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16302 Committed by Jim Blandy <jimb@redhat.com>.
16304 * linux-s390-low.c (s390_num_regs): Update.
16305 (s390_regmap): Remove control registers. Use __s390x__ predefine
16306 instead of GPR_SIZE to distiguish s390 and s390x targets.
16308 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16310 * linux-low.c: Update copyright year.
16311 (check_removed_breakpoint): Clear pending_is_breakpoint.
16312 (linux_set_resume_request, linux_queue_one_thread)
16313 (resume_status_pending_p): New functions.
16314 (linux_continue_one_thread): Use process->resume.
16315 (linux_resume): Only resume threads if there are no pending events.
16316 * linux-low.h (struct process_info): Add resume request
16319 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16321 * regcache.c (new_register_cache): Clear the allocated register
16322 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16324 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16326 * linux-low.c (linux_resume): Take a struct thread_resume *
16328 (linux_wait): Update call.
16329 (resume_ptr): New static variable.
16330 (linux_continue_one_thread): Renamed from
16331 linux_continue_one_process. Use resume_ptr.
16332 (linux_resume): Use linux_continue_one_thread.
16333 * server.c (handle_v_cont, handle_v_requests): New functions.
16334 (myresume): New function.
16335 (main): Handle 'v' case.
16336 * target.h (struct thread_resume): New type.
16337 (struct target_ops): Change argument of "resume" to struct
16339 (myresume): Delete macro.
16341 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16343 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16344 (uninstall): Support DESTDIR.
16346 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16348 * configure.srv: Add xscale*linux copy of arm*linux entry.
16350 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16352 * linux-arm-low.c (arm_reinsert_addr): New function.
16353 (the_low_target): Add arm_reinsert_addr.
16355 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16357 * mem-break.c: Remove whitespace at end of file.
16359 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16361 * configure.in: Check whether we need to prototype strerror.
16362 * server.h: Optionally prototype strerror.
16363 * gdbreplay.c (perror_with_name): Use strerror.
16364 * linux-low.c (linux_attach_lwp): Use strerror.
16365 * utils.c (perror_with_name): Use strerror.
16366 * config.in, configure: Regenerated.
16368 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16370 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16371 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16373 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16375 * Makefile.in (SFILES): Update.
16376 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16377 low-sun3.c: Remove files.
16379 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16381 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16382 (linux_detach_one_process, linux_detach): New functions.
16383 (linux_target_ops): Add linux_detach.
16384 * server.c (main): Handle 'D' packet.
16385 * target.h (struct target_ops): Add "detach" member.
16386 (detach_inferior): Define.
16388 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16390 From Kelley Cook <kelleycook@wideopenwest.com>:
16391 * configure.srv: Accept i[34567]86 variants.
16393 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16395 * linux-low.c (linux_wait_for_event): Correct comment typos.
16396 (linux_resume_one_process): Call check_removed_breakpoint.
16397 (linux_send_signal): New function.
16398 (linux_target_ops): Add linux_send_signal.
16399 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16401 * target.h (struct target_ops): Add send_signal.
16403 2003-05-29 Jim Blandy <jimb@redhat.com>
16405 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16406 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16407 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16408 away part of the register's value.
16410 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16412 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16413 (linux_wait_for_event, linux_init_signals): Likewise.
16415 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16417 * configure.in: Check for stdlib.h.
16418 * configure: Regenerated.
16419 * config.in: Regenerated.
16421 2003-01-04 Andreas Schwab <schwab@suse.de>
16423 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16425 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16427 * Makefile.in: Remove obsolete code.
16429 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16431 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16432 defined(PT_FPR0_HI).
16434 2002-11-17 Stuart Hughes <seh@zee2.com>
16436 * linux-arm-low.c (arm_num_regs): Increase.
16437 (arm_regmap): Include status register.
16439 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16441 * linux-low.c (register_addr): Remove incorrect -1 check.
16443 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16445 * linux-low.c (linux_create_inferior): Call setpgid. Return
16447 (unstopped_p, linux_signal_pid): Remove.
16448 (linux_target_ops): Remove linux_signal_pid.
16449 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16450 global instead of target method.
16451 * target.h (struct target_ops): Remove signal_pid. Update comment
16452 for create_inferior.
16453 * server.c (signal_pid): New variable.
16454 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16455 gdbserver. Set the child to be the foreground process group.
16456 (attach_inferior): Set signal_pid.
16458 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16460 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16462 2002-08-20 Jim Blandy <jimb@redhat.com>
16464 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16467 2002-08-01 Andrew Cagney <cagney@redhat.com>
16469 * Makefile.in: Make chill references obsolete.
16471 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16473 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16474 * configure: Regenerate.
16475 * config.in: Regenerate.
16477 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16479 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16480 (perror_with_name, remote_close, remote_open, expect, play): Static.
16482 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16484 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16485 byte offsets instead of an array of indexes.
16486 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16488 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16490 * regcache.c: Add comment.
16492 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16494 * thread-db.c: New file.
16495 * proc-service.c: New file.
16496 * acinclude.m4: New file.
16497 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16498 proc-service.o, and thread-db.o.
16499 (linux-low.o): Add USE_THREAD_DB.
16500 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16501 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16502 * aclocal.m4: Regenerated.
16503 * config.in: Regenerated.
16504 * configure: Regenerated.
16505 * configure.in: Check for proc_service.h, sys/procfs.h,
16506 thread_db.h, and linux/elf.h headrs.
16507 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16508 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16509 Check for -lthread_db and thread support.
16510 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16511 PowerPC, and SuperH.
16512 * i387-fp.c: Constify arguments.
16513 * i387-fp.h: Likewise.
16514 * inferiors.c: (struct thread_info): Renamed from
16515 `struct inferior_info'. Remove PID member. Use generic inferior
16516 list header. All uses updated.
16517 (inferiors, signal_pid): Removed.
16518 (all_threads): New variable.
16519 (get_thread): Define.
16520 (add_inferior_to_list): New function.
16521 (for_each_inferior): New function.
16522 (change_inferior_id): New function.
16523 (add_inferior): Removed.
16524 (remove_inferior): New function.
16525 (add_thread): New function.
16526 (free_one_thread): New function.
16527 (remove_thread): New function.
16528 (clear_inferiors): Use for_each_inferior and free_one_thread.
16529 (find_inferior): New function.
16530 (find_inferior_id): New function.
16531 (inferior_target_data): Update argument type.
16532 (set_inferior_target_data): Likewise.
16533 (inferior_regcache_data): Likewise.
16534 (set_inferior_regcache_data): Likewise.
16535 * linux-low.c (linux_bp_reinsert): Remove.
16536 (all_processes, stopping_threads, using_thrads)
16537 (struct pending_signals, debug_threads, pid_of): New.
16538 (inferior_pid): Replace with macro.
16539 (struct inferior_linux_data): Remove.
16540 (get_stop_pc, add_process): New functions.
16541 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16542 Use add_process and add_thread.
16543 (linux_attach_lwp): New function, based on old linux_attach. Use
16544 add_process and add_thread. Set stop_expected for new threads.
16545 (linux_attach): New function.
16546 (linux_kill_one_process): New function.
16547 (linux_kill): Kill all LWPs.
16548 (linux_thread_alive): Use find_inferior_id.
16549 (check_removed_breakpoints, status_pending_p): New functions.
16550 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16551 Update. Use WNOHANG. Wait for cloned processes also. Update process
16552 struct for the found process.
16553 (linux_wait_for_event): New function.
16554 (linux_wait): Use it. Support LWPs.
16555 (send_sigstop, wait_for_sigstop, stop_all_processes)
16556 (linux_resume_one_process, linux_continue_one_process): New functions.
16557 (linux_resume): Support LWPs.
16558 (REGISTER_RAW_SIZE): Remove.
16559 (fetch_register): Use register_size instead. Call supply_register.
16560 (usr_store_inferior_registers): Likewise. Call collect_register.
16561 Fix recursive case.
16562 (regsets_fetch_inferior_registers): Improve error message.
16563 (regsets_store_inferior_registers): Add debugging.
16564 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16565 (unstopped_p, linux_signal_pid): New functions.
16566 (linux_target_ops): Add linux_signal_pid.
16567 (linux_init_signals): New function.
16568 (initialize_low): Call it. Initialize using_threads.
16569 * regcache.c (inferior_regcache_data): Add valid
16571 (get_regcache): Fetch registers lazily. Add fetch argument
16572 and update all callers.
16573 (regcache_invalidate_one, regcache_invalidate): New
16575 (new_register_cache): Renamed from create_register_cache.
16576 Return the new regcache.
16577 (free_register_cache): Change argument to a void *.
16578 (registers_to_string, registers_from_string): Call get_regcache
16579 with fetch flag set.
16580 (register_data): Make static. Pass fetch flag to get_regcache.
16581 (supply_register): Call get_regcache with fetch flag clear.
16582 (collect_register): Call get_regcache with fetch flag set.
16583 (collect_register_as_string): New function.
16584 * regcache.h: Update.
16585 * remote-utils.c (putpkt): Flush after debug output and use
16587 Handle input interrupts while waiting for an ACK.
16588 (input_interrupt): Use signal_pid method.
16589 (getpkt): Flush after debug output and use stderr.
16590 (outreg): Use collect_register_as_string.
16591 (new_thread_notify, dead_thread_notify): New functions.
16592 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16593 and general_thread.
16594 (look_up_one_symbol): Flush after debug output.
16595 * server.c (step_thread, server_waiting): New variables.
16596 (start_inferior): Don't use signal_pid. Update call to mywait.
16597 (attach_inferior): Update call to mywait.
16598 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16599 (main): Don't fetch/store registers explicitly. Use
16600 set_desired_inferior. Support proposed ``Hs'' packet. Update
16602 * server.h: Update.
16603 (struct inferior_list, struct_inferior_list_entry): New.
16604 * target.c (set_desired_inferior): New.
16605 (write_inferior_memory): Constify.
16606 (mywait): New function.
16607 * target.h: Update.
16608 (struct target_ops): New signal_pid method.
16609 (mywait): Removed macro, added prototype.
16611 * linux-low.h (regset_func): Removed.
16612 (regset_fill_func, regset_store_func): New.
16613 (enum regset_type): New.
16614 (struct regset_info): Add type field. Use new operation types.
16615 (struct linux_target_ops): stop_pc renamed to get_pc.
16616 Add decr_pc_after_break and breakpoint_at.
16617 (get_process, get_thread_proess, get_process_thread)
16618 (strut process_info, all_processes, linux_attach_lwp)
16619 (thread_db_init): New.
16621 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16622 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16623 (the_low_target): Add new members.
16624 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16625 (i386_store_fpxregset): Constify.
16626 (target_regsets): Add new kind identifier.
16627 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16628 (i386_set_pc): Add debugging.
16629 (i386_breakpoint_at): New function.
16630 (the_low_target): Add new members.
16631 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16632 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16633 (mips_breakpoint_at): New.
16634 (the_low_target): Add new members.
16635 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16636 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16637 (the_low_target): Add new members.
16638 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16639 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16640 (the_low_target): Add new members.
16641 * linux-x86-64-low.c (target_regsets): Add new kind
16644 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16646 From Martin Pool <mbp@samba.org>:
16647 * server.c (gdbserver_usage): New function.
16650 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16652 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16653 stop_at -> stop_pc.
16655 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16657 * Makefile.in: Remove obsolete code.
16659 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16661 * linux-low.c (regsets_fetch_inferior_registers),
16662 (regsets_store_inferior_registers): Removed cast to int from
16664 * regcache.h: Added declaration of struct inferior_info.
16666 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16668 * inferiors.c (struct inferior_info): Add regcache_data.
16669 (add_inferior): Call create_register_cache.
16670 (clear_inferiors): Call free_register_cache.
16671 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16672 * regcache.c (struct inferior_regcache_data): New.
16673 (registers): Remove.
16674 (get_regcache): New function.
16675 (create_register_cache, free_register_cache): New functions.
16676 (set_register_cache): Don't initialize the register cache here.
16677 (registers_to_string, registers_from_string, register_data): Call
16679 * regcache.h: Add prototypes.
16680 * server.h: Likewise.
16682 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16684 * mem-break.c: New file.
16685 * mem-break.h: New file.
16686 * Makefile.in: Add mem-break.o rule; update server.h
16688 * inferiors.c (struct inferior_info): Add target_data
16690 (clear_inferiors): Free target_data member if set.
16691 (inferior_target_data, set_inferior_target_data): New functions.
16692 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16693 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16694 * linux-low.c (linux_bp_reinsert): New variable.
16695 (struct inferior_linux_data): New.
16696 (linux_create_inferior): Use set_inferior_target_data.
16697 (linux_attach): Likewise. Call add_inferior.
16698 (linux_wait_for_one_inferior): New function.
16699 (linux_wait): Call it.
16700 (linux_write_memory): Add const.
16701 (initialize_low): Call set_breakpoint_data.
16702 * linux-low.h (struct linux_target_ops): Add breakpoint
16704 * server.c (attach_inferior): Remove extra add_inferior
16706 * server.h: Include mem-break.h. Update inferior.c
16708 * target.c (read_inferior_memory)
16709 (write_inferior_memory): New functions.
16710 * target.h (read_inferior_memory)
16711 (write_inferior_memory): Change macros to prototypes.
16712 (struct target_ops): Update comments. Add const to write_memory
16715 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16717 * linux-low.c (usr_store_inferior_registers): Support
16718 registers which are allowed to fail to store.
16719 * linux-low.h (linux_target_ops): Likewise.
16720 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16721 (ppc_cannot_store_register): FPSCR may not be storable.
16723 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16725 * server.h: Include <string.h> if HAVE_STRING_H.
16726 * ChangeLog: Correct paths in last ChangeLog entry.
16728 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16730 * linux-low.h: Remove obsolete prototypes.
16731 (struct linux_target_ops): New.
16732 (extern the_low_target): New.
16733 * linux-low.c (num_regs, regmap): Remove declarations.
16734 (register_addr): Use the_low_target explicitly.
16735 (fetch_register): Likewise.
16736 (usr_fetch_inferior_registers): Likewise.
16737 (usr_store_inferior_registers): Likewise.
16738 * linux-arm-low.c (num_regs): Remove.
16739 (arm_num_regs): Define.
16740 (arm_regmap): Renamed from regmap, made static.
16741 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16743 (arm_cannot_store_register): Renamed from cannot_store_register,
16745 (the_low_target): New.
16746 * linux-i386-low.c (num_regs): Remove.
16747 (i386_num_regs): Define.
16748 (i386_regmap): Renamed from regmap, made static.
16749 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16751 (i386_cannot_store_register): Renamed from cannot_store_register,
16753 (the_low_target): New.
16754 * linux-ia64-low.c (num_regs): Remove.
16755 (ia64_num_regs): Define.
16756 (ia64_regmap): Renamed from regmap, made static.
16757 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16759 (ia64_cannot_store_register): Renamed from cannot_store_register,
16761 (the_low_target): New.
16762 * linux-m68k-low.c (num_regs): Remove.
16763 (m68k_num_regs): Define.
16764 (m68k_regmap): Renamed from regmap, made static.
16765 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16767 (m68k_cannot_store_register): Renamed from cannot_store_register,
16769 (the_low_target): New.
16770 * linux-mips-low.c (num_regs): Remove.
16771 (mips_num_regs): Define.
16772 (mips_regmap): Renamed from regmap, made static.
16773 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16775 (mips_cannot_store_register): Renamed from cannot_store_register,
16777 (the_low_target): New.
16778 * linux-ppc-low.c (num_regs): Remove.
16779 (ppc_num_regs): Define.
16780 (ppc_regmap): Renamed from regmap, made static.
16781 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16783 (ppc_cannot_store_register): Renamed from cannot_store_register,
16785 (the_low_target): New.
16786 * linux-s390-low.c (num_regs): Remove.
16787 (s390_num_regs): Define.
16788 (s390_regmap): Renamed from regmap, made static.
16789 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16791 (s390_cannot_store_register): Renamed from cannot_store_register,
16793 (the_low_target): New.
16794 * linux-sh-low.c (num_regs): Remove.
16795 (sh_num_regs): Define.
16796 (sh_regmap): Renamed from regmap, made static.
16797 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16799 (sh_cannot_store_register): Renamed from cannot_store_register,
16801 (the_low_target): New.
16802 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16803 (the_low_target): New.
16805 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16807 * Makefile.in: Add stamp-h target.
16808 * configure.in: Create stamp-h.
16809 * configure: Regenerated.
16811 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16813 * inferiors.c: New file.
16814 * target.c: New file.
16815 * target.h: New file.
16816 * Makefile.in: Add target.o and inferiors.o. Update
16818 * linux-low.c (inferior_pid): New static variable,
16819 moved from server.c.
16820 (linux_create_inferior): Renamed from create_inferior.
16821 Call add_inferior. Return 0 on success instead of a PID.
16822 (linux_attach): Renamed from myattach.
16823 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16824 (linux_thread_alive): Renamed from mythread_alive.
16825 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16827 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16828 (regsets_store_inferior_registers): Correct error message.
16829 Add missing ``return 0''.
16830 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16831 (linux_store_registers): Renamed from store_inferior_registers.
16832 (linux_read_memory): Renamed from read_inferior_memory.
16833 (linux_write_memory): Renamed from write_inferior_memory.
16834 (linux_target_ops): New structure.
16835 (initialize_low): Call set_target_ops ().
16836 * remote-utils.c (unhexify): New function.
16837 (hexify): New function.
16838 (input_interrupt): Send signals to ``signal_pid''.
16839 * server.c (inferior_pid): Remove.
16840 (start_inferior): Update create_inferior call.
16841 (attach_inferior): Call add_inferior.
16842 (handle_query): New function.
16843 (main): Call handle_query for `q' packets.
16844 * server.h: Include "target.h". Remove obsolete prototypes.
16845 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16847 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16849 * Makefile.in: Add WARN_CFLAGS. Update configury
16851 * configure.in: Check for <string.h>
16852 * configure: Regenerate.
16853 * config.in: Regenerate.
16854 * gdbreplay.c: Include needed system headers.
16855 (remote_open): Remove strchr prototype.
16856 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16857 * regcache.c (supply_register): Change buf argument to const void *.
16858 (supply_register_by_name): Likewise.
16859 (collect_register): Change buf argument to void *.
16860 (collect_register_by_name): Likewise.
16861 * regcache.h: Add missing prototypes.
16862 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16863 * server.c (handle_query): New function.
16864 (attached): New static variable, moved out of main.
16865 (main): Quiet longjmp clobber warnings.
16866 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16867 * utils.c (error): Remove NORETURN.