1 2018-07-22 Tom Tromey <tom@tromey.com>
3 * win32-low.c (win32_create_inferior): Remove unused variables.
4 * gdbreplay.c (remote_open): Remove unused variable.
5 * remote-utils.c (remote_prepare): Remove unused variable.
6 * x86-tdesc.h (X86_TDESC_H): Define.
7 (amd64_expedite_regs): Define conditionally.
8 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
9 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
10 * remote-utils.c (readchar): Remove unused variable.
12 2018-07-13 Pedro Alves <palves@redhat.com>
14 * linux-low.c (linux_kill): Change parameter to process_info
15 pointer instead of pid. Adjust.
16 * lynx-low.c (lynx_kill): Likewise.
17 * nto-low.c (nto_kill): Likewise.
18 * spu-low.c (spu_kill): Likewise.
19 * win32-low.c (win32_kill): Likewise.
20 * server.c (handle_v_kill, kill_inferior_callback)
21 (detach_or_kill_for_exit): Adjust.
22 * target.c (kill_inferior): Change parameter to process_info
23 pointer instead of pid. Adjust.
24 * target.h (struct target_ops) <kill>: Change parameter to
25 process_info pointer instead of pid. Adjust all implementations
27 (kill_inferior): Likewise.
29 2018-07-13 Pedro Alves <palves@redhat.com>
31 * linux-low.c (linux_detach, linux_join): Change parameter to
32 process_info pointer instead of pid. Adjust.
33 * lynx-low.c (lynx_detach, lynx_join): Likewise.
34 * nto-low.c (nto_detach): Likewise.
35 * spu-low.c (spu_detach, spu_join): Likewise.
36 * win32-low.c (win32_detach, win32_join): Likewise.
37 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
38 * target.h (struct target_ops) <detach, join>: Change parameter to
39 process_info pointer instead of pid. Adjust all implementations
41 (detach_inferior, join_inferior): Rename 'pid' parameter to
44 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
45 Jan Kratochvil <jan.kratochvil@redhat.com>
46 Paul Fertser <fercerpav@gmail.com>
47 Tsutomu Seki <sekiriki@gmail.com>
49 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
50 (OBS): Add 'common/netstuff.o'.
51 (GDBREPLAY_OBS): Likewise.
52 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
53 (remote_open): Implement support for IPv6
55 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
57 (handle_accept_event): Accept connections from IPv6 sources.
58 (remote_prepare): Handle IPv6-style hostnames; implement
59 support for IPv6 connections.
60 (remote_open): Implement support for printing connections from
63 2018-07-11 Pedro Alves <palves@redhat.com>
66 * mem-break.c (any_persistent_commands): Add process_info
67 parameter and use it instead of relying on the current process.
68 Change return type to bool.
69 * mem-break.h (any_persistent_commands): Add process_info
70 parameter and change return type to bool.
71 * server.c (handle_detach): Remove require_running_or_return call.
72 Look up the process_info for the process we're about to detach.
73 If not found, return back error to GDB. Adjust
74 any_persistent_commands call to pass down a process pointer.
76 2018-07-11 Pedro Alves <palves@redhat.com>
78 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
79 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
80 instead of collect_register_by_name.
81 * regcache.c (regcache_raw_get_unsigned_by_name): New.
82 * regcache.h (regcache_raw_get_unsigned_by_name): New.
84 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
85 Pedro Alves <palves@redhat.com>
87 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
89 2018-07-03 Tom Tromey <tom@tromey.com>
91 * linux-low.c: Update.
93 * mem-break.c: Update.
95 * remote-utils.c: Update.
99 * win32-low.c: Update.
101 2018-07-03 Tom Tromey <tom@tromey.com>
105 2018-07-03 Tom Tromey <tom@tromey.com>
107 * linux-low.c: Update.
109 2018-07-03 Tom Tromey <tom@tromey.com>
113 2018-07-03 Tom Tromey <tom@tromey.com>
115 * linux-low.c: Update.
116 * linux-mips-low.c: Update.
117 * lynx-low.c: Update.
119 * remote-utils.c: Update.
123 * thread-db.c: Update.
125 2018-07-03 Tom Tromey <tom@tromey.com>
127 * linux-low.c: Update.
128 * linux-mips-low.c: Update.
129 * lynx-low.c: Update.
130 * mem-break.c: Update.
132 * remote-utils.c: Update.
136 * tracepoint.c: Update.
138 2018-07-03 Tom Tromey <tom@tromey.com>
140 * linux-low.c: Update.
141 * linux-ppc-low.c: Update.
142 * linux-x86-low.c: Update.
143 * proc-service.c: Update.
146 * thread-db.c: Update.
147 * win32-low.c: Update.
149 2018-07-03 Tom Tromey <tom@tromey.com>
151 * linux-low.c: Update.
152 * lynx-low.c: Update.
154 * remote-utils.c: Update.
156 * thread-db.c: Update.
157 * win32-low.c: Update.
159 2018-06-29 Joel Brobecker <brobecker@adacore.com>
161 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
162 parameter in call to 'amd64_create_target_description'.
164 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
166 * x86-tdesc.h: Remove executable permission flag.
168 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
170 * configure.ac: Remove AC_PREREQ, add missing quoting.
171 * configure: Re-generate.
172 * config.in: Re-generate.
173 * aclocal.m4: Re-generate.
175 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
177 * tracepoint.h (current_traceframe): Remove declaration.
179 2018-06-18 Alan Hayward <alan.hayward@arm.com>
181 * linux-aarch64-low.c (is_sve_tdesc): New function.
182 (aarch64_sve_regs_copy_to_regcache): Likewise.
183 (aarch64_sve_regs_copy_from_regcache): Likewise.
184 (aarch64_regs_info): Add SVE checks.
185 (initialize_low_arch): Initialize SVE.
187 2018-06-18 Alan Hayward <alan.hayward@arm.com>
189 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
191 2018-06-11 Alan Hayward <alan.hayward@arm.com>
193 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
194 (initialize_low_tracepoint): Likewise
195 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
196 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
198 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
200 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
202 2018-06-11 Alan Hayward <alan.hayward@arm.com>
204 * server.h (PBUFSIZ): Increase size
206 2018-06-11 Alan Hayward <alan.hayward@arm.com>
208 * regcache.c (regcache::raw_compare): New function.
209 * regcache.h (regcache::raw_compare): New declaration.
211 2018-06-11 Alan Hayward <alan.hayward@arm.com>
213 * regcache.c (new_register_cache): Use new.
214 (free_register_cache): Use delete.
215 (register_data): Use const.
216 (supply_register): Move body inside regcache.
217 (regcache::raw_supply): New override function.
218 (collect_register): Move body inside regcache.
219 (regcache::raw_collect): New override function.
220 (regcache::get_register_status): New override function.
221 * regcache.h (struct regcache): Inherit from reg_buffer_common.
223 2018-06-09 Tom Tromey <tom@tromey.com>
225 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
227 (event_queue): Use std::queue.
228 (gdb_event_xfree): Remove.
229 (initialize_event_loop, process_event, wait_for_event): Update.
231 2018-06-08 Stan Cox <scox@redhat.com>
233 * win32-low.c (win32_create_inferior): last_ptid and last_status
234 moved to client_state.
236 2018-06-08 Pedro Alves <palves@redhat.com>
238 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
239 common/common-exceptions.o, common/common-utils.o,
240 common/errors.o, common/print-utils.o and utils.o.
241 * gdbreplay.c: Include "common-defs.h" instead of the two
242 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
243 string.h or alloca.h.
244 (perror_with_name): Delete.
245 (remote_open): Use xstrdup instead of strdup.
246 (main): Rename to ...
247 (captured_main): ... this.
250 2018-06-08 Tom Tromey <tom@tromey.com>
252 * linux-low.c (linux_low_read_btrace): Update.
254 2018-06-04 Stan Cox <scox@redhat.com>
256 * server.h (struct client_state): New.
257 * server.c (cont_thread, general_thread, multi_process)
258 (report_fork_events, report_vfork_events, report_exec_events)
259 (report_thread_events, swbreak_feature, hwbreak_feature)
260 (vCont_supported, disable_randomization, pass_signals)
261 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
262 Moved to client_state.
263 * remote-utils.c (remote_debug, noack_mode)
264 (transport_is_reliable): Moved to client_state.
265 * tracepoint.c (current_traceframe): Moved to client_state.
268 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
269 linux-low.c, remote-utils.h, target.c: Use client_state.
271 2018-05-31 Alan Hayward <alan.hayward@arm.com>
273 * configure.srv: Add new c/h file.
275 2018-05-31 Alan Hayward <alan.hayward@arm.com>
277 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
280 2018-05-25 Maciej W. Rozycki <macro@mips.com>
282 * gdb.arch/mips-fpregset-core.exp: New test.
283 * gdb.arch/mips-fpregset-core.c: New test source.
285 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
288 * hostio.c (require_int): Do not report overflow for integers
289 between 0xfffffff and 0x7fffffff.
291 2018-05-22 Maciej W. Rozycki <macro@mips.com>
293 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
294 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
295 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
297 (the_low_target): Wire them.
299 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
301 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
302 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
303 mode. Call collect_register_by_name with vscr using
304 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
305 (ppc_store_vrregset): Add and set vscr_offset variable as in
306 ppc_fill_vrregset. Call supply_register_by_name with vscr using
309 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
311 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
312 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
313 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
315 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
317 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
318 (ppc_store_vsxregset): Likewise.
319 (ppc_fill_vrregset): Likewise.
320 (ppc_store_vrregset): Likewise.
321 (ppc_fill_evrregset): Likewise.
322 (ppc_store_evrregset): Likewise.
323 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
324 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
327 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
329 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
330 wordsize of the inferior. Call ppc_linux_target_wordsize.
332 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
334 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
335 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
336 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
337 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
338 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
339 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
340 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
341 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
342 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
343 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
344 (tdesc_powerpc_e500l): Remove.
345 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
346 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
347 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
348 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
350 (ppc_arch_setup): Remove target description matching code. Fill a
351 ppc_linux_features struct and call ppc_linux_match_description
354 2018-05-22 Maciej W. Rozycki <macro@mips.com>
356 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
357 width of the requested register exceeds the width of the
359 (mips_cannot_store_register): Likewise.
361 2018-05-21 Maciej W. Rozycki <macro@mips.com>
363 * linux-mips-low.c (mips_fetch_register): New function. Update
365 (mips_store_gregset): Supply 0 rather than $restart for $zero.
366 (the_low_target): Wire `mips_fetch_register'.
368 2018-05-10 Joel Brobecker <brobecker@adacore.com>
370 * lynx-i386-low.c (LYNXOS_178): New macro.
371 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
372 the layout on LynxOS-178.
373 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
374 handle floating point registers that are not supported by
377 2018-05-10 Tom Tromey <tom@tromey.com>
379 * configure: Rebuild.
381 2018-05-10 Joel Brobecker <brobecker@adacore.com>
384 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
385 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
386 Use it to set the expedite_regs field in the given tdesc.
387 * x86-tdesc.h: New file.
388 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
389 Adjust following the addition of the new expedite_regs parameter
391 * linux-tic6x-low.c (tic6x_read_description): Likewise.
392 * linux-x86-tdesc.c: #include "x86-tdesc.h".
393 (i386_linux_read_description, amd64_linux_read_description):
394 Adjust following the addition of the new expedite_regs parameter
396 * lynx-i386-low.c: #include "x86-tdesc.h".
397 (lynx_i386_arch_setup): Adjust following the addition of the new
398 expedite_regs parameter to init_target_desc.
399 * nto-x86-low.c: #include "x86-tdesc.h".
400 (nto_x86_arch_setup): Adjust following the addition of the new
401 expedite_regs parameter to init_target_desc.
402 * win32-i386-low.c: #include "x86-tdesc.h".
403 (i386_arch_setup): Adjust following the addition of the new
404 expedite_regs parameter to init_target_desc.
406 2018-05-10 Joel Brobecker <brobecker@adacore.com>
409 * win32-low.c (win32_create_inferior): Add call to my_wait
410 setting last_status global.
412 2018-05-10 Joel Brobecker <brobecker@adacore.com>
415 * win32-low.c (create_process): Only call gdb_tilde_expand if
416 inferior_cwd is not NULL.
418 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
420 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
421 registers to the cache if their values have changed.
422 (i387_xsave_to_cache): Provide default values for x87 control
423 registers when these features are available, but disabled.
424 * regcache.c (supply_register_by_name_zeroed): New function.
425 * regcache.h (supply_register_by_name_zeroed): Declare new
428 2018-05-07 Tom Tromey <tom@tromey.com>
430 * configure: Rebuild.
432 2018-05-04 Tom Tromey <tom@tromey.com>
434 * configure: Rebuild.
436 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
437 Pedro Alves <palves@redhat.com>
439 * linux-aarch64-low.c (aarch64_stopped_data_address):
442 2018-04-27 Tom Tromey <tom@tromey.com>
444 * configure: Rebuild.
446 2018-04-23 Tom Tromey <tom@tromey.com>
448 * configure: Rebuild.
450 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
452 * Makefile.in (depcomp): Add "..".
453 (all_deps_files): New and use it.
455 2018-04-18 Alan Hayward <alan.hayward@arm.com>
457 * configure.srv (aarch64*-*-linux*): Don't include xml.
458 (i[34567]86-*-cygwin*): Likewise.
459 (i[34567]86-*-linux*): Likewise.
460 (i[34567]86-*-lynxos*): Likewise.
461 (i[34567]86-*-mingw32ce*): Likewise.
462 (i[34567]86-*-mingw*): Likewise.
463 (i[34567]86-*-nto*): Likewise.
464 (tic6x-*-uclinux): Likewise.
465 (x86_64-*-linux*): Likewise.
466 (x86_64-*-mingw*): Likewise.
467 (x86_64-*-cygwin*): Likewise.
469 2018-04-18 Alan Hayward <alan.hayward@arm.com>
471 * tdesc.c: Remove xml parameter.
473 2018-04-18 Alan Hayward <alan.hayward@arm.com>
475 * server.c (get_features_xml): Remove cast.
476 * tdesc.c (void target_desc::accept): Fill in function.
477 (tdesc_get_features_xml): Remove old xml creation.
478 (print_xml_feature::visit_pre): Add xml vistor.
479 * tdesc.h (struct target_desc): Make xmltarget mutable.
480 (tdesc_get_features_xml): Remove declaration.
482 2018-04-18 Alan Hayward <alan.hayward@arm.com>
484 * tdesc.c (tdesc_architecture_name): Add new function.
485 (tdesc_osabi_name): Likewise.
486 (tdesc_get_features_xml): Use new functions.
488 2018-04-18 Alan Hayward <alan.hayward@arm.com>
490 * tdesc.c (tdesc_create_flags): Remove.
491 (tdesc_add_flag): Likewise.
492 (tdesc_named_type): Likewise.
493 (tdesc_create_union): Likewise.
494 (tdesc_create_struct): Likewise.
495 (tdesc_create_vector): Likewise.
496 (tdesc_add_bitfield): Likewise.
497 (tdesc_add_field): Likewise.
498 (tdesc_set_struct_size): Likewise.
500 2018-04-18 Alan Hayward <alan.hayward@arm.com>
502 * tdesc.c (~target_desc): Remove implictly deleted items.
503 (init_target_desc): Iterate all features.
504 (tdesc_get_features_xml): Use vector.
505 (tdesc_create_feature): Create feature.
506 * tdesc.h (tdesc_feature) Remove
507 (target_desc): Add features.
509 2018-04-18 Alan Hayward <alan.hayward@arm.com>
511 * Makefile.in: Add common/tdesc.c
512 * tdesc.c (init_target_desc): init all reg_defs from register
514 (tdesc_create_reg): Create tdesc_reg.
515 * tdesc.h (tdesc_feature): Add register vector.
517 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
519 * tdesc.h (struct target_desc) <features>: Change type to
520 std::vector<std::string>.
521 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
523 (tdesc_get_features_xml): Likewise.
524 (tdesc_create_feature): Likewise.
526 2018-03-26 Alan Hayward <alan.hayward@arm.com>
528 * regcache.c (find_register_by_number): Return a ref.
529 (find_regno): Use references.
530 (register_size): Likewise.
531 (register_data): Likewise.
532 * tdesc.c (target_desc::~target_desc): Remove free calls.
533 (target_desc::operator==): Use std::vector compare.
534 (init_target_desc): Use reference.
535 (tdesc_create_reg): Use reg constructors.
536 * tdesc.h (struct target_desc): Replace pointer with object.
538 2018-03-23 Alan Hayward <alan.hayward@arm.com>
540 * regcache.c (find_register_by_number): Make static.
541 (find_regno): Use find_register_by_number
542 * regcache.h (struct reg): Remove declaration.
544 2018-03-23 Alan Hayward <alan.hayward@arm.com>
546 * tdesc.c (target_desc::~target_desc): Move to here.
547 (target_desc::operator==): Likewise.
548 * tdesc.h (target_desc::~target_desc): Move from here.
549 (target_desc::operator==): Likewise.
551 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
553 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
555 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
557 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
559 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
560 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
561 and init_registers_s390_gs_linux64.
563 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
565 * linux-s390-low.c (s390_fill_gs): Remove function.
566 (s390_fill_gsbc): Remove function.
567 (s390_regsets): Set fill functions for the guarded storage regsets
570 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
572 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
573 the word size. Add comment.
574 (s390_get_wordsize): New function.
575 (s390_arch_setup): No longer select a temporary tdesc to fetch the
576 pswm with it. Instead, use s390_get_wordsize to determine the
577 word size first and derive the correct tdesc from that directly.
579 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
581 * Makefile.in: Include silent-rules.mk.
582 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
583 (COMPILE): Add ECHO_CXX.
584 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
585 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
586 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
587 (version-generated.c): Add ECHO_GEN.
588 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
589 (IPAGENT_COMPILE): Add ECHO_CXX.
590 (%-generated.c): Add ECHO_REGDAT.
592 2018-03-14 Tom Tromey <tom@tromey.com>
595 * ax.c (ax_printf): Special case for NULL.
597 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
599 * linux-low.c (linux_qxfer_libraries_svr4): Use
600 xml_escape_text_append.
602 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
604 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
606 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
608 * server.c (handle_general_set): Remove unnecessary xstrdup.
610 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
612 * server.c (parse_debug_format_options): Adjust to
613 delim_string_to_char_ptr_vec changes.
614 * thread-db.c (thread_db_load_search): Adjust to
615 dirnames_to_char_ptr_vec changes.
617 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
619 * target.h (target_enable_btrace, target_disable_btrace)
620 (target_read_btrace, target_read_btrace_conf): Turn macro into
621 inline function. Throw error if target method is not defined.
622 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
623 check for btrace target method. Be prepared to handle exceptions
624 from btrace target methods.
626 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
628 * server.c (captured_main): Change order of error message printed
629 when the current working directory cannot be found.
631 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
633 * server.c: Include "filenames.h" and "pathstuff.h".
634 (program_name): Delete variable.
635 (program_path): New anonymous class.
636 (get_exec_wrapper): Use "program_path" instead of
638 (handle_v_run): Likewise.
639 (captured_main): Likewise.
640 (process_serial_event): Likewise.
642 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
644 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
645 (OBJS): Add "pathstuff.o".
646 * server.c (current_directory): New global variable.
647 (captured_main): Initialize "current_directory".
649 2018-02-26 Alan Hayward <alan.hayward@arm.com>
651 * tdesc.c: Use common/tdesc.h.
654 2018-02-20 Alan Hayward <alan.hayward@arm.com>
655 Simon Marchi <simon.marchi@ericsson.com>
657 * Makefile.in: Switch order of make rules.
659 2018-02-19 Alan Hayward <alan.hayward@arm.com>
661 * Makefile.in: Add common directory in build.
662 * configure.ac: Add common reference.
663 * configure: Regenerate.
665 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
667 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
668 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
669 * spu-low.c (spu_target_ops): Likewise.
670 * win32-low.c (win32_target_ops): Likewise.
671 * server.c (supported_btrace_packets): Report packets unconditionally.
672 * target.h (target_ops) <supports_btrace>: Remove.
673 (target_supports_btrace): Remove.
675 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
677 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
678 (handle_btrace_disable): Change return type to void. Use exceptions
680 (handle_btrace_general_set): Catch exception and copy message to
683 2018-02-08 Tom Tromey <tom@tromey.com>
685 * linux-low.c (install_software_single_step_breakpoints): Use
687 * inferiors.c (make_cleanup_restore_current_thread): Remove.
688 (do_restore_current_thread_cleanup): Remove.
689 * gdbthread.h (make_cleanup_restore_current_thread): Don't
692 2018-02-08 Tom Tromey <tom@tromey.com>
694 * mem-break.c (set_raw_breakpoint_at): Use
695 gdb::unique_xmalloc_ptr.
697 2018-01-30 Pedro Alves <palves@redhat.com>
700 * target.c (target_terminal::terminal_state): Rename to ...
701 (target_terminal::m_terminal_state): ... this.
703 2018-01-19 James Clarke <jrtc27@jrtc27.com>
705 * linux-low.c (handle_extended_wait): Surround call to
706 thread_db_notice_clone with #ifdef USE_THREAD_DB.
708 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
710 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
711 linux_ptrace_attach_fail_reason_string now returning an
713 (linux_attach): Likewise.
714 * thread-db.c (attach_thread): Likewise.
716 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
719 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
720 checking for fs_base/gs_base fields in struct user_regs_struct.
721 * configure: Regenerate.
723 2018-01-16 Yao Qi <yao.qi@linaro.org>
726 * linux-low.c (fetch_register): Call supply_register instead of
729 2018-01-08 Yao Qi <yao.qi@linaro.org>
730 Simon Marchi <simon.marchi@ericsson.com>
732 * Makefile.in (OBS): Remove selftest.o.
733 * configure.ac: Set srv_selftest_objs if $development is true.
734 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
735 * configure: Re-generated.
736 * server.c (captured_main): Wrap variable selftest_filter with
739 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
741 * server.c (parse_debug_format_options): Return std::string.
742 (handle_monitor_command, captured_main): Adjust.
744 2018-01-05 Pedro Alves <palves@redhat.com>
747 * server.c (captured_main): Pass quiet=false to
748 save_original_signals_state.
750 2018-01-01 Joel Brobecker <brobecker@adacore.com>
752 * gdbreplay.c (gdbreplay_version): Update copyright year in
754 * server.c (gdbserver_version): Likewise.
756 2017-12-08 Tom Tromey <tom@tromey.com>
758 * ax.c (ax_printf): Update.
760 2017-12-07 Yao Qi <yao.qi@linaro.org>
762 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
763 aarch64_linux_read_description.
764 * linux-amd64-ipa.c (idx2mask): New array.
765 (get_ipa_tdesc): Move idx2mask out.
766 (initialize_low_tracepoint): Initialize target descriptions.
767 * linux-i386-ipa.c (idx2mask): New array.
768 (get_ipa_tdesc): Move idx2mask out.
769 (initialize_low_tracepoint): Initialize target descriptions.
771 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
773 * tdesc.c (struct tdesc_type): Change return type.
774 (tdesc_add_flag): Change parameter type.
775 (tdesc_add_bitfield): Likewise.
776 (tdesc_add_field): Likewise.
777 (tdesc_set_struct_size): Likewise.
779 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
781 * regcache.c (registers_to_string): Remove unused variable.
783 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
785 * inferiors.c (for_each_inferior_with_data): Remove.
786 * inferiors.h (for_each_inferior_with_data): Remove.
787 * server.c (handle_qxfer_threads_worker): Change parameter type.
788 (handle_qxfer_threads_proper): Use for_each_thread.
790 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
792 * inferiors.c (for_each_inferior): Remove.
793 (clear_inferiors): Use for_each_thread.
794 * inferiors.h (for_each_inferior): Remove.
795 * linux-low.c (linux_wait_for_event_filtered): Use
797 (linux_stabilize_threads): Likewise.
798 * regcache.c (regcache_release): Likewise.
799 * server.c (gdb_wants_all_threads_stopped): Likewise.
800 (clear_pending_status_callback): Remove.
801 (handle_status): Use for_each_thread.
802 (captured_main): Likewise.
803 * win32-low.c (child_init_thread_list): Likewise.
804 (win32_clear_inferiors): Likewise.
805 (fake_breakpoint_event): Likewise.
807 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
809 * inferiors.h (find_inferior): Remove.
810 * inferiors.c (find_inferior): Remove.
812 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
814 * linux-low.c (resume_status_pending_p): Update comment.
815 (need_step_over_p): Update comment.
817 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
819 * linux-low.c (proceed_one_lwp): Return void, change parameter
821 (unsuspend_and_proceed_one_lwp): Likewise.
822 (proceed_all_lwps): Use for_each_thread.
823 (unstop_all_lwps): Likewise.
825 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
827 * linux-low.c (linux_resume_one_thread): Return void, take
829 (linux_resume): Use for_each_thread.
831 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
833 * linux-low.c (send_sigstop_callback): Return void, change
834 parameter type. Rename to...
835 (send_sigstop): ... this.
836 (suspend_and_send_sigstop_callback): Return void, change parameter
838 (suspend_and_send_sigstop): ... this.
839 (stop_all_lwps): Use for_each_thread.
841 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
843 * linux-low.c (lwp_running): Return bool, remove unused
845 (linux_stabilize_threads): Use find_thread.
847 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
849 * linux-low.c (select_singlestep_lwp_callback): Remove.
850 (count_events_callback): Remove.
851 (select_event_lwp_callback): Remove.
852 (select_event_lwp): Use find_thread/for_each_thread.
854 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
856 * linux-low.c (not_stopped_callback): Return bool, take filter
858 (linux_wait_for_event_filtered): Use find_thread.
859 (linux_wait_1): Likewise.
861 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
863 * linux-low.c (same_lwp): Remove.
864 (find_lwp_pid): Use find_thread.
866 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
868 * linux-low.c (delete_lwp_callback): Remove.
869 (linux_mourn): Use for_each_thread.
871 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
873 * linux-low.c (linux_detach_lwp_callback): Return void, remove
874 args parameter, don't check for pid.
875 (linux_detach): Use for_each_thread.
877 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
879 * linux-low.c (struct counter): Remove.
880 (second_thread_of_pid_p): Remove.
881 (last_thread_of_process_p): Use find_thread.
883 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
885 * inferiors.c (find_inferior_in_random): Remove.
886 * inferiors.h (find_inferior_in_random): Remove.
887 * linux-low.c (status_pending_p_callback): Return bool, accept
888 parameter ptid directly.
889 (linux_wait_for_event_filtered): Use find_thread_in_random.
890 (linux_wait_1): Likewise.
892 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
894 * inferiors.c (find_inferior_id): Remove.
895 (find_thread_ptid): Move implemention from find_inferior_id to
897 * inferiors.h (find_inferior_id): Remove.
898 * server.c (handle_status): Use find_thread_ptid.
899 (process_serial_event): Likewise.
900 * thread-db.c (find_one_thread): Likewise.
901 (thread_db_thread_handle): Likewise.
902 * win32-low.c (thread_rec): Likewise.
903 (child_delete_thread): Likewise.
904 (win32_thread_alive): Likewise.
905 (get_child_debug_event): Likewise.
907 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
909 * linux-mips-low.c (update_watch_registers_callback): Return
910 void, remove pid_p parameter, don't check for pid.
911 (mips_insert_point, mips_remove_point): Use for_each_thread.
913 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
915 * lynx.low (lynx_delete_thread_callback): Remove.
916 (lynx_mourn): Use for_each_thread.
918 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
920 * regcache.c (regcache_invalidate_one): Remove.
921 (regcache_invalidate_pid): use for_each_thread.
923 2017-11-26 Tom Tromey <tom@tromey.com>
925 * linux-low.c (linux_create_inferior): Update.
927 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
929 * spu-low.c (spu_create_inferior): Fix typo in argument name.
931 2017-11-24 Alan Hayward <alan.hayward@arm.com>
933 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
934 * linux-aarch64-low.c (initialize_low_arch): Call init func.
935 * linux-aarch64-tdesc-selftest.c: New file.
936 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
938 2017-11-24 Alan Hayward <alan.hayward@arm.com>
940 * configure.srv: Add new file.
941 * linux-aarch64-low.c (initialize_low_arch): Call init func.
942 * linux-aarch64-tdesc-selftest.c: New file.
943 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
945 2017-11-24 Alan Hayward <alan.hayward@arm.com>
947 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
948 * linux-aarch64-low.c (initialize_low_arch): Remove init.
949 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
951 2017-11-24 Alan Hayward <alan.hayward@arm.com>
953 * configure.srv: Add new files.
954 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
955 aarch64_linux_read_description.
956 * linux-aarch64-low.c (aarch64_linux_read_description):
957 Merge with aarch64_arch_setup.
958 (aarch64_arch_setup): Call aarch64_linux_read_description.
959 * linux-aarch64-tdesc.c: New file.
960 * linux-aarch64-tdesc.h: New file.
962 2017-11-24 Yao Qi <yao.qi@linaro.org>
964 * configure.srv: Set $srv_regobj for tic6x-linux.
965 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
966 (tic6x_read_description): Move some code to tic6x_arch_setup.
967 (tic6x_tdesc_test): New function.
968 (initialize_low_arch): Call selftests::register_test.
970 2017-11-22 Yao Qi <yao.qi@linaro.org>
972 * remote-utils.c (prepare_resume_reply): Use memcpy.
974 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
976 * linux-low.c (kill_one_lwp_callback): Return void, take
977 argument directly, don't filter on pid.
978 (linux_kill): Use for_each_thread.
980 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
982 * linux-low.c (need_step_over_p): Return bool, remove dummy
984 (linux_resume, proceed_all_lwps): Use find_thread.
986 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
988 * linux-low.c (resume_status_pending_p): Return bool, remove
990 (linux_resume): Use find_thread.
992 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
994 * linux-low.c (struct thread_resume_array): Remove.
995 (linux_set_resume_request): Return void, take arguments
997 (linux_resume): Use for_each_thread.
999 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1001 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1002 return bool, remove data argument.
1003 (linux_stabilize_threads): Use find_thread.
1005 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1007 * linux-low.c (unsuspend_one_lwp): Remove.
1008 (unsuspend_all_lwps): Use for_each_thread, inline code from
1011 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1013 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1014 * linux-low.c (struct iterate_over_lwps_args): Remove.
1015 (iterate_over_lwps_filter): Remove.
1016 (iterate_over_lwps): Use find_thread.
1018 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1020 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1021 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1022 code from reset_lwp_ptrace_options_callback.
1024 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1026 * linux-arm-low.c (struct update_registers_data): Remove.
1027 (update_registers_callback): Return void, take arguments
1028 directly, don't check thread's pid.
1029 (arm_insert_point, arm_remove_point): Use for_each_thread.
1031 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1033 * win32-low.c (continue_one_thread): Return void, take argument
1035 (child_continue): Use for_each_thread.
1037 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1039 * win32-i386-low.c (update_debug_registers_callback): Rename
1041 (update_debug_registers): ... this, return void, remove pid_p arg.
1042 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1044 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1046 * inferiors.h (struct process_info): Add constructor, initialize
1048 <syscalls_to_catch>: Change type to std::vector<int>.
1049 * inferiors.c (add_process): Allocate process_info with new.
1050 (remove_process): Free process_info with delete.
1051 * linux-low.c (handle_extended_wait): Adjust.
1052 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1053 * server.c (handle_general_set): Adjust.
1055 2017-11-16 Pedro Alves <palves@redhat.com>
1057 * remote-utils.c (remote_close): Block SIGIO signals instead of
1058 uninstalling the SIGIO handler.
1060 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1062 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1064 2017-11-16 Yao Qi <yao.qi@linaro.org>
1066 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1067 (tic6x_store_gregset): Likewise.
1068 (tic6x_usrregs_info): Move it up.
1070 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1072 * Makefile.in: Update arch rules.
1073 * configure.srv: Explicitly mark arch/ files.
1075 2017-11-13 Andreas Schwab <schwab@suse.de>
1077 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1079 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1081 2017-11-06 Pedro Alves <palves@redhat.com>
1083 * config.in, configure: Regenerate.
1085 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1087 * target.c (struct thread_search): Remove.
1088 (thread_search_callback): Remove.
1089 (prepare_to_access_memory): Use for_each_thread instead of
1090 find_inferior. Inline code from thread_search_callback.
1092 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1094 * server.c (struct visit_actioned_threads_data): Remove.
1095 (visit_actioned_threads): Change prototype to take arguments
1097 (resume): Use find_thread instead of find_inferior.
1099 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1101 * server.c (queue_stop_reply_callback): Change prototype, return
1103 (find_status_pending_thread_callback): Remove.
1104 (handle_status): Replace find_inferior with find_thread and
1107 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1109 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1111 (aarch64_store_gregset): Likewise.
1112 (aarch64_fill_fpregset): Likewise.
1113 (aarch64_store_fpregset): Likewise.
1115 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1117 * gdbthread.h (find_thread, for_each_thread): New functions.
1118 * inferiors.c (thread_of_pid): Remove.
1119 (find_any_thread_of_pid): Use find_thread.
1120 * linux-low.c (num_lwps): Use for_each_thread.
1122 2017-10-17 Yao Qi <yao.qi@linaro.org>
1124 * Makefile.in: Remove one rule.
1125 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1127 2017-10-17 Yao Qi <yao.qi@linaro.org>
1129 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1130 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1132 2017-10-17 Yao Qi <yao.qi@linaro.org>
1134 * configure.srv: Rename arm.o with arch/arm.o.
1136 2017-10-17 Yao Qi <yao.qi@linaro.org>
1138 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1139 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1140 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1141 (arch-i386.o, arch-amd64.o): Remove rules.
1142 (arch/%.o): New rule.
1143 Update POSTCOMPILE and COMPILE.pre.
1144 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1145 * configure: Re-generated.
1146 * configure.srv: Replace arch-i386.o with arch/i386.o.
1147 Replace arch-amd64.o with arch/amd64.o.
1149 2017-10-16 Yao Qi <yao.qi@linaro.org>
1151 * configure: Regenerated.
1153 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1155 * inferiors.h: (struct inferior_list): Remove.
1156 (struct inferior_list_entry); Remove.
1157 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1158 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1159 get_first_inferior): Remove.
1160 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1161 find_inferior_id, find_inferior_in_random): Change signature.
1162 * inferiors.c (all_threads): Change type to
1163 std::list<thread_info *>.
1164 (get_thread): Remove macro.
1165 (find_inferior, find_inferior_id): Change signature, implement
1167 (find_inferior_in_random): Change signature, implement using
1168 find_thread_in_random.
1169 (for_each_inferior, for_each_inferior_with_data): Change
1170 signature, implement using for_each_thread.
1171 (add_inferior_to_list, remove_inferior): Remove.
1172 (add_thread, get_first_thread, thread_of_pid,
1173 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1174 (get_first_inferior, one_inferior_p, clear_inferior_list):
1176 (clear_inferiors, get_thread_process): Update.
1177 * gdbthread.h: Include <list>.
1178 (struct thread_info) <entry>: Remove field.
1180 (all_threads): Change type to std::list<thread_info *>.
1181 (get_first_inferior): Add doc.
1182 (find_thread, for_each_thread, find_thread_in_random): New
1184 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1185 * linux-arm-low.c (update_registers_callback): Update.
1186 * linux-low.c (second_thread_of_pid_p): Update.
1187 (kill_one_lwp_callback, linux_detach_lwp_callback,
1188 delete_lwp_callback, status_pending_p_callback, same_lwp,
1189 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1190 iterate_over_lwps, not_stopped_callback,
1191 resume_stopped_resumed_lwps, count_events_callback,
1192 select_singlestep_lwp_callback, select_event_lwp_callback,
1193 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1194 suspend_and_send_sigstop_callback, wait_for_sigstop,
1195 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1196 lwp_running, linux_set_resume_request, resume_status_pending_p,
1197 need_step_over_p, start_step_over, linux_resume_one_thread,
1198 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1199 reset_lwp_ptrace_options_callback): Update.
1200 * linux-mips-low.c (update_watch_registers_callback): Update.
1201 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1203 (free_register_cache_thread_one): Remove.
1204 (regcache_release): Update.
1205 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1206 handle_qxfer_threads_worker): Update.
1207 (handle_query): Update, use list iterator.
1208 (visit_actioned_threads, handle_pending_status,
1209 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1210 clear_pending_status_callback, set_pending_status_callback,
1211 find_status_pending_thread_callback, handle_status,
1212 process_serial_event): Update.
1213 * target.c (thread_search_callback): Update.
1214 * thread-db.c (thread_db_get_tls_address): Update.
1215 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1217 * win32-i386-low.c (update_debug_registers_callback): Update.
1218 * win32-low.c (delete_thread_info, child_delete_thread,
1219 continue_one_thread, suspend_one_thread,
1220 get_child_debug_event): Adjust.
1222 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1224 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1225 * inferiors.h: Include <list>.
1226 (struct process_info) <entry>: Remove field.
1228 (pid_of): Change macro to function.
1229 (ptid_of, lwpid_of): Remove macro.
1230 (all_processes): Change type to std::list<process_info *>.
1231 (ALL_PROCESSES): Remove macro.
1232 (for_each_process, find_process): New function.
1233 * inferiors.c (all_processes): Change type to
1234 std::list<process_info *>.
1235 (find_thread_process): Adjust.
1236 (add_process): Likewise.
1237 (remove_process): Likewise.
1238 (find_process_pid): Likewise.
1239 (get_first_process): Likewise.
1240 (started_inferior_callback): Remove.
1241 (have_started_inferiors_p): Adjust.
1242 (attached_inferior_callback): Remove.
1243 (have_attached_inferiors_p): Adjust.
1244 * linux-low.c (check_zombie_leaders): Likewise.
1245 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1246 (x86_linux_update_xmltarget): Adjust.
1247 * server.c (handle_query): Likewise.
1248 (gdb_reattached_process): Remove.
1249 (handle_status): Adjust.
1250 (kill_inferior_callback): Likewise.
1251 (detach_or_kill_inferior): Remove.
1252 (print_started_pid): Likewise.
1253 (print_attached_pid): Likewise.
1254 (detach_or_kill_for_exit): Update.
1255 (process_serial_event): Likewise.
1256 * linux-arm-low.c (arm_new_fork): Likewise.
1258 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1260 * dll.h: Include <list>.
1261 (struct dll_info): Add constructor.
1262 <entry>: Remove field.
1263 (all_dlls): Change type to std::list<dll_info>.
1264 * dll.c: Include <algorithm>.
1265 (get_dll): Remove macro.
1266 (all_dlls): Change type to std::list<dll_info *>.
1267 (free_one_dll): Remove.
1268 (match_dll): Likewise.
1269 (loaded_dll): Adjust.
1270 (unloaded_dll): Adjust to all_dlls type change, use
1271 std::find_if. Inline code from match_dll.
1272 (clear_dlls): Adjust to all_dlls type change.
1273 * server.c (emit_dll_description): Remove.
1274 (handle_qxfer_libraries): Adjust to all_dlls type change,
1275 integrate emit_dll_description's functionality.
1277 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1279 * linux-low.h (struct linux_target_ops) <delete_process>: New
1281 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1282 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1283 (struct linux_target_ops): Add delete_process callback.
1284 * linux-arm-low.c (arm_delete_process): New.
1285 (struct linux_target_ops): Add delete_process callback.
1286 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1287 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1288 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1289 * linux-mips-low.c (mips_linux_delete_process): New.
1290 (struct linux_target_ops): Add delete_process callback.
1291 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1292 * linux-s390-low.c (struct linux_target_ops): Likewise.
1293 * linux-sh-low.c (struct linux_target_ops): Likewise.
1294 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1295 * linux-tile-low.c (struct linux_target_ops): Likewise.
1296 * linux-x86-low.c (x86_linux_delete_process): New.
1297 (struct linux_target_ops): Add delete_process callback.
1298 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1300 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1302 * linux-aarch64-low.c (the_low_target): Add thread delete
1304 * linux-arm-low.c (arm_delete_thread): New function.
1305 (the_low_target): Add thread delete callback.
1306 * linux-bfin-low.c (the_low_target): Likewise.
1307 * linux-crisv32-low.c (the_low_target): Likewise.
1308 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1310 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1312 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1313 * linux-mips-low.c (mips_linux_delete_thread): New function.
1314 (the_low_target): Add thread delete callback.
1315 * linux-ppc-low.c (the_low_target): Likewise.
1316 * linux-s390-low.c (the_low_target): Likewise.
1317 * linux-sh-low.c (the_low_target): Likewise.
1318 * linux-tic6x-low.c (the_low_target): Likewise.
1319 * linux-tile-low.c (the_low_target): Likewise.
1320 * linux-x86-low.c (the_low_target): Likewise.
1321 * linux-xtensa-low.c (the_low_target): Likewise.
1323 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1325 * win32-low.c: Include "common-inferior.h".
1327 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1329 * inferiors.c (set_inferior_cwd): New function.
1330 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1331 (handle_query): Inform that QSetWorkingDir is supported.
1332 * win32-low.c (create_process): Pass the inferior's cwd to
1335 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1337 * inferiors.c (current_inferior_cwd): New global variable.
1338 (get_inferior_cwd): New function.
1339 * inferiors.h (struct process_info) <cwd>: New field.
1341 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1343 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1344 (OBS): Add gdb_tilde_expand.o.
1346 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1348 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1349 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1351 2017-09-29 Pedro Alves <palves@redhat.com>
1353 * ax.c (gdb_parse_agent_expr): Constify.
1354 * ax.h (gdb_parse_agent_expr): Constify.
1355 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1357 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1358 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1359 * remote-utils.h (read_ptid): Constify.
1360 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1361 (process_point_options, process_serial_event): Constify.
1362 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1363 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1364 (cmd_qtbuffer): Constify.
1366 2017-09-29 Pedro Alves <palves@redhat.com>
1368 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1371 2017-09-29 Pedro Alves <palves@redhat.com>
1373 * linux-low.c (handle_extended_wait): Pass parent thread instead
1374 of process to thread_db_notice_clone.
1375 * linux-low.h (thread_db_notice_clone): Replace parent process
1376 parameter with parent thread parameter.
1377 * thread-db.c (find_one_thread): Add comment.
1378 (thread_db_notice_clone): Replace parent process parameter with
1379 parent thread parameter. Temporarily switch to the parent thread.
1381 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1383 * gdbthread.h: Include "common-gdbthread.h".
1384 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1385 "if" when validating the ptid.
1386 * remote-utils.c: Include "gdbthread.h".
1387 (prepare_resume_reply): Use "switch_to_thread".
1388 * target.c (done_accessing_memory): Likewise.
1390 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1392 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1393 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1394 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1395 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1396 s390x-gs-linux64-ipa.o to ipa_obj.
1397 * linux-s390-low.c (HWCAP_S390_GS): New define.
1398 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1400 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1401 (s390_arch_setup): Check for guarded-storage support and choose
1403 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1404 init_registers_s390x_gs_linux64.
1405 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1407 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1408 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1410 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1412 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1414 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1416 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1417 (thread_db_thread_handle): Declare.
1418 * linux-low.c (linux_target_ops): Initialize thread_handle.
1419 * server.c (handle_qxfer_threads_worker): Add support for
1421 * target.h (struct target_ops): Add new function pointer,
1423 (target_thread_handle): Define.
1424 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1426 (thread_db_thread_handle): New function.
1428 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1430 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1431 * linux-low.h (thread_db_notice_clone): Declare.
1432 * thread-db.c (thread_db_notice_clone): New function.
1434 2017-09-21 Pedro Alves <palves@redhat.com>
1436 * server.c (gdb_read_memory, handle_status, process_serial_event)
1437 (handle_serial_event, handle_target_event): Adjust to
1438 set_desired_thread prototype change.
1439 * target.c (set_desired_thread): Remove 'use_general' parameter
1441 * target.h (set_desired_thread): Remove 'use_general' parameter.
1443 2017-09-20 Tom Tromey <tom@tromey.com>
1445 * target.c (target_terminal::terminal_state): Define.
1446 (target_terminal::init): Rename from target_terminal_init.
1447 (target_terminal::inferior): Rename from
1448 target_terminal_inferior.
1449 (target_terminal::ours): Rename from target_terminal_ours.
1450 (target_terminal::ours_for_output, target_terminal::info): New.
1452 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1454 * server.c (accumulate_file_name_length): Remove.
1455 (emit_dll_description): Adjust to std::string change.
1456 (handle_qxfer_libraries): Use std::string to hold document.
1458 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1460 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1461 return type of xml_escape_text.
1462 * server.c (emit_dll_description): Likewise.
1464 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1466 * server.c (captured_main): Accept argument for --selftest.
1467 Update run_tests call.
1468 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1469 when registering selftests.
1471 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1473 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1474 instead of "VEC" for "target_desc.reg_defs".
1475 (regcache_cpy): Likewise.
1476 (registers_to_string): Likewise.
1477 (registers_from_string): Likewise.
1478 (find_regno): Likewise.
1479 (supply_regblock): Likewise.
1480 (regcache_raw_read_unsigned): Likewise.
1481 * tdesc.c (init_target_desc): Likewise.
1482 (tdesc_create_reg): Likewise.
1483 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1484 (struct target_desc) <reg_defs>: Convert to "std::vector".
1485 (target_desc): Do not initialize "reg_defs".
1486 (~target_desc): Update code to use "std::vector" instead of "VEC"
1487 for "target_desc.reg_defs".
1488 (operator==): Likewise.
1490 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1492 * inferiors.h (thread_to_gdb_id): Remove.
1493 * inferiors.c (thread_to_gdb_id): Remove.
1494 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1495 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1496 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1498 * nto-low.c (nto_fetch_registers, nto_store_registers,
1499 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1501 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1503 * inferiors.h (gdb_id_to_thread_id): Remove.
1504 * inferiors.c (gdb_id_to_thread_id): Remove.
1505 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1506 removal. Move pid declaration closer to where it's used.
1508 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1510 * server.c (handle_detach): New function.
1511 (process_serial_event): Move code out, call handle_detach.
1513 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1515 * server.c (require_running): Rename to ...
1516 (require_running_or_return): ... this ...
1517 (require_running_or_break): ... and this.
1518 (handle_query, process_serial_event): Adjust.
1520 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1522 * linux-low.c (linux_set_resume_request): Remove unused
1525 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1527 * server.c (first_thread_of): Remove.
1528 (process_serial_event): Replace usage of first_thread_of with
1529 find_any_thread_of_pid.
1530 * tracepoint.c (same_process_p): Remove.
1531 (gdb_agent_about_to_close): Replace usage of same_process_p with
1532 find_any_thread_of_pid.
1533 * linux-x86-low.c (same_process_callback): Remove.
1534 (x86_arch_setup_process_callback): Replace usage of
1535 same_process_callback with find_any_thread_of_pid.
1536 * thread-db.c (any_thread_of): Remove.
1537 (switch_to_process): Replace usage of any_thread_of with
1538 find_any_thread_of_pid.
1539 * inferiors.c (thread_pid_matches_callback): Remove.
1540 (find_thread_process): Adjust to use find_any_thread_of_pid.
1542 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1544 * regcache.c (get_thread_regcache): Guard calls to "memset"
1547 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1549 * linux-low.c (handle_extended_wait): Use
1550 "allocate_target_description" instead of "XNEW".
1551 * linux-x86-low.c (initialize_low_arch): Likewise.
1553 2017-09-05 Yao Qi <yao.qi@linaro.org>
1555 * configure.srv (srv_i386_regobj): Remove.
1556 (srv_amd64_regobj): Remove.
1557 (srv_regobj): Set it to "" for x86 non-linux targets.
1558 * linux-x86-tdesc.c (i386_linux_read_description):
1559 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1560 (init_registers_i386): Remove the declaration.
1561 (tdesc_i386): Remove the declaration.
1562 (lynx_i386_arch_setup): Call i386_create_target_description.
1563 * nto-x86-low.c: Likewise.
1564 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1565 [!__x86_64__]: include arch/i386.h.
1566 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1568 2017-09-05 Yao Qi <yao.qi@linaro.org>
1570 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1571 i386/amd64-XXX-linux from it.
1573 2017-09-05 Yao Qi <yao.qi@linaro.org>
1575 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1577 (ipa_amd64_linux_regobj): Remove.
1578 (ipa_x32_linux_regobj): Remove.
1580 2017-09-05 Yao Qi <yao.qi@linaro.org>
1582 * Makefile.in (arch-amd64.o): New rule.
1583 * configure.srv: Append arch-amd64.o.
1584 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1585 (get_ipa_tdesc): Call amd64_linux_read_description.
1586 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1587 and init_registers_amd64_XXX.
1588 * linux-x86-low.c (x86_linux_read_description): Call
1589 amd64_linux_read_description.
1590 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1591 (initialize_low_arch): Don't call init_registers_x32_XXX and
1592 init_registers_amd64_XXX.
1593 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1594 and tdesc_amd64_XXX.
1595 [__x86_64__] (amd64_tdesc_test): New function.
1596 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1597 and init_registers_amd64_XXX.
1598 * linux-x86-tdesc.c: Include arch/amd64.h.
1599 (xcr0_to_tdesc_idx): New function.
1600 (i386_linux_read_description): New function.
1601 (amd64_get_ipa_tdesc_idx): New function.
1602 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1603 (amd64_get_ipa_tdesc): Declare.
1605 2017-09-05 Yao Qi <yao.qi@linaro.org>
1607 * configure.srv (srv_i386_linux_xmlfiles): Remove
1608 i386/i386-XXX-linux.xml from it.
1610 2017-09-05 Yao Qi <yao.qi@linaro.org>
1612 * configure.srv: Set srv_i386_linux_regobj empty if $development
1614 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1615 initialize_low_tdesc.
1616 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1617 with #if initialize_low_tdesc.
1618 * linux-x86-tdesc-selftest.c: New file.
1619 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1621 2017-09-05 Yao Qi <yao.qi@linaro.org>
1623 * Makefile.in (arch-i386.o): New rule.
1624 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1625 (x86_64-*-linux*): Likewise.
1626 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1627 include arch/i386.h.
1628 (i386_linux_read_description): Remove code and call
1629 i386_create_target_description.
1630 * tdesc.c (allocate_target_description): New function.
1631 * tdesc.h (set_tdesc_architecture): Remove declaration.
1632 (set_tdesc_osabi): Likewise.
1634 2017-09-05 Yao Qi <yao.qi@linaro.org>
1636 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1637 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1638 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1640 * server.c (get_features_xml): Call tdesc_get_features_xml.
1641 * tdesc.c (set_tdesc_architecture): New function.
1642 (set_tdesc_osabi): New function.
1643 (tdesc_get_features_xml): New function.
1644 (tdesc_create_feature): Add an argument.
1645 * tdesc.h (struct target_desc) <features>: New field.
1646 <arch, osabi>: New field.
1647 (~target_desc): xfree features, arch, and osabi.
1648 (target_desc::oerator==): Don't compare .xmltarget.
1649 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1650 (set_tdesc_osabi): Likewise.
1651 (tdesc_get_features_xml): Likewise.
1653 2017-09-05 Yao Qi <yao.qi@linaro.org>
1655 * linux-x86-tdesc.c: Include selftest.h.
1656 (i386_tdesc_test): New function.
1657 (initialize_low_tdesc): Call selftests::register_test.
1658 * tdesc.h: Include regdef.h.
1659 (target_desc): Override operator == and !=.
1661 2017-09-05 Yao Qi <yao.qi@linaro.org>
1663 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1664 (ipa_obj): Likewise.
1665 * linux-i386-ipa.c: Include common/x86-xstate.h
1666 (get_ipa_tdesc): Call i386_linux_read_description.
1667 (initialize_low_tracepoint): Don't call init_registers_XXX
1668 functions, call initialize_low_tdesc instead.
1669 * linux-x86-low.c (x86_linux_read_description): Call
1670 i386_linux_read_description.
1671 (initialize_low_arch): Don't call init_registers_i386_XXX
1672 functions, call initialize_low_tdesc.
1673 * linux-x86-tdesc.c: New file.
1674 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1675 (i386_get_ipa_tdesc_idx): Declare.
1676 (i386_get_ipa_tdesc): Declare.
1677 (initialize_low_tdesc): Declare.
1679 2017-09-05 Yao Qi <yao.qi@linaro.org>
1681 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1684 2017-09-05 Yao Qi <yao.qi@linaro.org>
1686 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1687 * regcache.c (get_thread_regcache): Use VEC_length.
1688 (init_register_cache): Likewise.
1689 (regcache_cpy): Likewise.
1690 (registers_to_string): Iterate reg_defs via VEC_iterate.
1691 (find_regno): Likewise.
1692 (find_register_by_number): Use VEC_index.
1693 (register_size): Call find_register_by_number.
1694 (register_data): Call find_register_by_number.
1695 (supply_regblock): Use VEC_length.
1696 (regcache_raw_read_unsigned): Likewise.
1697 * tdesc.c (init_target_desc): Iterate reg_defs via
1699 (default_description): Update initializer.
1700 (copy_target_description): Don't update field num_registers.
1701 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1702 <num_registers>: Remove.
1704 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1706 * Makefile.in (.SECONDARY): Define target.
1708 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1710 * linux-low.c (linux_wait_1): Adjust.
1711 * server.c (queue_stop_reply_callback): Adjust.
1713 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1715 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1716 QEnvironmentUnset and QEnvironmentReset packets.
1717 (handle_query): Inform remote that QEnvironmentHexEncoded,
1718 QEnvironmentUnset and QEnvironmentReset are supported.
1720 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1722 * inferiors.h (inferior_target_data): Rename to ...
1723 (thread_target_data): ... this.
1724 (inferior_regcache_data): Rename to ...
1725 (thread_regcache_data): ... this.
1726 (set_inferior_regcache_data): Rename to ...
1727 (set_thread_regcache_data): ... this.
1728 * inferiors.c (inferior_target_data): Rename to ...
1729 (thread_target_data): ... this.
1730 (inferior_regcache_data): Rename to ...
1731 (thread_regcache_data): ... this.
1732 (set_inferior_regcache_data): Rename to ...
1733 (set_thread_regcache_data): ... this.
1734 (free_one_thread): Update.
1735 * linux-low.h (get_thread_lwp): Update.
1736 * regcache.c (get_thread_regcache): Update.
1737 (regcache_invalidate_thread): Update.
1738 (free_register_cache_thread): Update.
1739 * win32-i386-low.c (update_debug_registers_callback): Update.
1740 (win32_get_current_dr): Update.
1741 * win32-low.c (thread_rec): Update.
1742 (delete_thread_info): Update.
1743 (continue_one_thread): Update.
1744 (suspend_one_thread): Update.
1746 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1748 * inferiors.c (set_inferior_target_data): Remove.
1749 * inferiors.h (set_inferior_target_data): Remove.
1751 2017-08-18 Yao Qi <yao.qi@linaro.org>
1753 * Makefile.in (OBS): Add selftest.o.
1754 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1755 * configure, config.in: Re-generated.
1756 * server.c: Include common/sefltest.h.
1757 (captured_main): Handle option --selftest.
1759 2017-08-09 Yao Qi <yao.qi@linaro.org>
1761 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1762 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1763 i386-avx-mpx.o and i386-mmx.o.
1764 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1765 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1766 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1767 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1768 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1769 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1770 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1771 i386/amd64-avx-mpx.xml.
1773 2017-08-09 Yao Qi <yao.qi@linaro.org>
1775 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1776 and x32-avx-avx512.o.
1777 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1778 i386/x32-avx-avx512.xml.
1780 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1782 * tracepoint.h (enum class fast_tpoint_collect_result): New
1784 (fast_tracepoint_collecting): Change return type to
1785 fast_tpoint_collect_result.
1786 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1787 * linux-low.h: Include tracepoint.h.
1788 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1789 fast_tpoint_collect_result.
1790 * linux-low.c (handle_tracepoints): Adjust.
1791 (linux_fast_tracepoint_collecting): Change return type to
1792 fast_tpoint_collect_result.
1793 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1794 linux_wait_1, stuck_in_jump_pad_callback,
1795 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1796 proceed_one_lwp): Adjust to type change.
1798 2017-07-10 Yao Qi <yao.qi@linaro.org>
1800 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1802 2017-06-29 Yao Qi <yao.qi@linaro.org>
1804 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1806 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1808 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1810 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1812 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1814 * linux-low.c (linux_create_inferior): Adjust code to access the
1815 environment information via 'gdb_environ' class.
1816 * lynx-low.c (lynx_create_inferior): Likewise.
1817 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1818 (get_environ): Return a pointer to 'our_environ'.
1819 (captured_main): Initialize 'our_environ'.
1820 * server.h (get_environ): Adjust prototype.
1821 * spu-low.c (spu_create_inferior): Adjust code to access the
1822 environment information via 'gdb_environ' class.
1824 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1826 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1827 usage of "register" keyword.
1829 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1831 * configure: Re-generate.
1833 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1835 * configure: Re-generate.
1837 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1839 * Makefile.in (COMPILE.pre): Add "-x c++".
1841 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1843 * fork-child.c: Conditionally include <signal.h>.
1845 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1847 * server.c (handle_general_set): Handle new packet
1848 "QStartupWithShell".
1849 (handle_query): Add "QStartupWithShell" to the list of supported
1851 (gdbserver_usage): Add help text explaining the
1852 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1854 (captured_main): Recognize and act upon the presence of the new
1857 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1858 Pedro Alves <palves@redhat.com>
1860 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1861 * configure: Regenerate.
1862 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1864 (i[34567]86-*-lynxos*): Likewise.
1865 (spu*-*-*): Likewise.
1866 * fork-child.c: New file.
1867 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1869 (linux_ptrace_fun): New function.
1870 (linux_create_inferior): Adjust function prototype to reflect
1871 change on "target.h". Adjust function code to use
1873 (linux_request_interrupt): Delete "signal_pid".
1874 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1875 (lynx_ptrace_fun): New function.
1876 (lynx_create_inferior): Adjust function prototype to reflect
1877 change on "target.h". Adjust function code to use
1879 * nto-low.c (nto_create_inferior): Adjust function prototype and
1880 code to reflect change on "target.h". Update comments.
1881 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1882 "common-terminal.h" and "environ.h".
1883 (terminal_fd): Moved to fork-child.c.
1884 (old_foreground_pgrp): Likewise.
1885 (restore_old_foreground_pgrp): Likewise.
1886 (last_status): Make it global.
1887 (last_ptid): Likewise.
1888 (our_environ): New variable.
1889 (startup_with_shell): Likewise.
1890 (program_name): Likewise.
1891 (program_argv): Rename to...
1892 (program_args): ...this.
1893 (wrapper_argv): New variable.
1894 (start_inferior): Delete function.
1895 (get_exec_wrapper): New function.
1896 (get_exec_file): Likewise.
1897 (get_environ): Likewise.
1898 (prefork_hook): Likewise.
1899 (post_fork_inferior): Likewise.
1900 (postfork_hook): Likewise.
1901 (postfork_child_hook): Likewise.
1902 (handle_v_run): Update code to deal with arguments coming from the
1903 remote host. Update calls from "start_inferior" to
1905 (captured_main): Likewise. Initialize environment variable. Call
1907 * server.h (post_fork_inferior): New prototype.
1908 (get_environ): Likewise.
1909 (last_status): Declare.
1910 (last_ptid): Likewise.
1911 (signal_pid): Likewise.
1912 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1913 (spu_ptrace_fun): New function.
1914 (spu_create_inferior): Adjust function prototype to reflect change
1915 on "target.h". Adjust function code to use "fork_inferior".
1916 * target.c (target_terminal_init): New function.
1917 (target_terminal_inferior): Likewise.
1918 (target_terminal_ours): Likewise.
1919 * target.h: Include <vector>.
1920 (struct target_ops) <create_inferior>: Update prototype.
1921 (create_inferior): Update macro.
1922 * utils.c (gdb_flush_out_err): New function.
1923 * win32-low.c (win32_create_inferior): Adjust function prototype
1924 and code to reflect change on "target.h".
1926 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1928 * inferiors.c (switch_to_thread): New function.
1930 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1932 * Makefile.in (SFILE): Add "common/job-control.c".
1933 (OBS): Add "job-control.o".
1935 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1937 * Makefile: Remove "@host_makefile_frag@".
1939 2017-05-05 Pedro Alves <palves@redhat.com>
1941 * configure: Regenerate.
1943 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1945 * configure: Regenerate.
1947 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1949 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1950 software_single_step change of return type to
1951 std::vector<CORE_ADDR>.
1952 * linux-low.c (install_software_single_step_breakpoints):
1954 * linux-low.h (install_software_single_step_breakpoints):
1957 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1959 * remote-utils.c: Include "gdb_termios.h" instead of
1961 * terminal.h: Delete file.
1963 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1965 * server.c: Include <vector>.
1966 <program_argv, wrapper_argv>: Convert to std::vector.
1967 (start_inferior): Rewrite function to use C++.
1968 (handle_v_run): Likewise. Update code that calculates the argv
1969 based on the vRun packet; use C++.
1970 (captured_main): Likewise.
1972 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1974 * server.c (handle_v_cont): Initialize thread_resume::thread
1977 2017-04-05 Pedro Alves <palves@redhat.com>
1979 * configure: Regenerate.
1981 2017-04-05 Pedro Alves <palves@redhat.com>
1983 * gdbreplay.c (sync_error): Constify.
1984 * linux-x86-low.c (push_opcode): Constify.
1986 2017-04-05 Pedro Alves <palves@redhat.com>
1988 * win32-low.c (get_child_debug_event)
1989 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1990 Report TARGET_WAITKIND_SPURIOUS instead.
1992 2017-04-05 Pedro Alves <palves@redhat.com>
1994 * remote-utils.c (remote_prepare, remote_open): Constify.
1995 * remote-utils.h (remote_prepare, remote_open): Constify.
1996 * server.c (captured_main): Constify 'port' handling.
1998 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2000 * Makefile.in (clean): Clear .deps.
2002 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2004 * .gitignore: Remove generated files, replace with wildcard.
2005 * (clean): Replace removal of generated files with wildcard.
2006 (version.c): Replace with...
2007 (version-generated.c): ...this.
2008 (xml-builtin.c): Replace with...
2009 (xml-builtin-generated.c): ...this.
2010 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2011 (%.c: *regformats*): Replace with...
2012 (%-generated.c: *regformats*): ...this.
2014 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2016 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2017 (xtensa_fill_gregset): Call collect_register_by_name for
2019 (xtensa_store_gregset): Call supply_register_by_name for
2022 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2024 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2025 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2026 (xtensa_store_gregset): Call supply_register for all registers in
2027 a0_regnum..a0_regnum + C0_NREGS range.
2029 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2031 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2032 (ax-ipa.o: ax.c): Remove.
2033 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2034 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2035 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2036 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2037 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2039 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2041 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2042 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2043 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2044 (errors-ipa.o: ../common/errors.c): Remove.
2045 (format-ipa.o: ../common/format.c): Remove.
2046 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2048 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2050 * Makefile.in (%-ipa.o: %.c): New rule.
2051 (tracepoint-ipa.o: tracepoint.c): Remove.
2052 (utils-ipa.o: utils.c): Remove.
2053 (remote-utils-ipa.o: remote-utils.c): Remove.
2054 (regcache-ipa.o: regcache.c): Remove.
2055 (i386-linux-ipa.o: i386-linux.c): Remove.
2056 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2057 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2058 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2059 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2060 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2061 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2062 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2063 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2064 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2065 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2066 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2067 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2068 (aarch64-ipa.o: aarch64.c): Remove.
2069 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2070 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2071 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2072 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2073 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2074 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2075 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2076 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2077 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2078 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2079 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2080 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2081 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2082 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2083 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2084 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2085 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2086 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2087 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2088 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2089 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2090 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2091 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2092 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2093 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2094 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2095 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2096 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2097 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2098 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2099 (tdesc-ipa.o: tdesc.c): Remove.
2100 (x32-linux-ipa.o: x32-linux.c): Remove.
2101 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2102 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2104 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2106 * Makefile.in (%.o: ../arch/%.c): New rule.
2107 (arm.o: ../arch/arm.c): Remove.
2108 (arm-linux.o: ../arch/arm-linux.c): Remove.
2109 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2110 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2112 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2114 * Makefile.in (%.o: ../nat/%.c): New rule.
2115 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2116 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2117 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2118 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2119 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2120 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2121 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2122 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2123 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2124 (linux-personality.o: ../nat/linux-personality.c): Remove.
2125 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2126 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2127 (x86-linux.o: ../nat/x86-linux.c): Remove.
2128 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2129 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2131 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2133 * Makefile.in (%.o: ../common/%.c): New rule.
2134 (signals.o: ../common/signals.c): Remove.
2135 (print-utils.o: ../common/print-utils.c): Remove.
2136 (rsp-low.o: ../common/rsp-low.c): Remove.
2137 (common-utils.o: ../common/common-utils.c): Remove.
2138 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2139 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2140 (vec.o: ../common/vec.c): Remove.
2141 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2142 (xml-utils.o: ../common/xml-utils.c): Remove.
2143 (ptid.o: ../common/ptid.c): Remove.
2144 (buffer.o: ../common/buffer.c): Remove.
2145 (format.o: ../common/format.c): Remove.
2146 (filestuff.o: ../common/filestuff.c): Remove.
2147 (agent.o: ../common/agent.c): Remove.
2148 (errors.o: ../common/errors.c): Remove.
2149 (environ.o: ../common/environ.c): Remove.
2150 (common-debug.o: ../common/common-debug.c): Remove.
2151 (cleanups.o: ../common/cleanups.c): Remove.
2152 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2153 (fileio.o: ../common/fileio.c): Remove.
2154 (common-regcache.o: ../common/common-regcache.c): Remove.
2155 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2156 (new-op.o: ../common/new-op.c): Remove.
2157 (btrace-common.o: ../common/btrace-common.c): Remove.
2159 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2161 * Makefile.in (%.o: ../target/%.c): New rule.
2162 (waitstatus.o: ../target/waitstatus.c): Remove.
2164 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2167 (%.c: ../regformats/%.dat,
2168 (%.c: ../regformats/arm/%.dat,
2169 (%.c: ../regformats/i386/%.dat,
2170 (%.c: ../regformats/rs6000/%.dat): New rules.
2171 (aarch64.c): Remove.
2172 (reg-arm.c): Remove.
2173 (arm-with-iwmmxt.c): Remove.
2174 (arm-with-vfpv2.c): Remove.
2175 (arm-with-vfpv3.c): Remove.
2176 (arm-with-neon.c): Remove.
2177 (reg-bfin.c): Remove.
2178 (reg-cris.c): Remove.
2179 (reg-crisv32.c): Remove.
2181 (i386-linux.c): Remove.
2182 (i386-avx.c): Remove.
2183 (i386-avx-linux.c): Remove.
2184 (i386-avx-avx512.c): Remove.
2185 (i386-avx-avx512-linux.c): Remove.
2186 (i386-mpx.c): Remove.
2187 (i386-mpx-linux.c): Remove.
2188 (i386-avx-mpx-avx512-pku.c): Remove.
2189 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2190 (i386-avx-mpx.c): Remove.
2191 (i386-avx-mpx-linux.c): Remove.
2192 (i386-mmx.c): Remove.
2193 (i386-mmx-linux.c): Remove.
2194 (reg-ia64.c): Remove.
2195 (reg-m32r.c): Remove.
2196 (reg-m68k.c): Remove.
2198 (mips-linux.c): Remove.
2199 (mips-dsp-linux.c): Remove.
2200 (mips64-linux.c): Remove.
2201 (mips64-dsp-linux.c): Remove.
2202 (nios2-linux.c): Remove.
2203 (powerpc-32.c): Remove.
2204 (powerpc-32l.c): Remove.
2205 (powerpc-altivec32l.c): Remove.
2206 (powerpc-cell32l.c): Remove.
2207 (powerpc-vsx32l.c): Remove.
2208 (powerpc-isa205-32l.c): Remove.
2209 (powerpc-isa205-altivec32l.c): Remove.
2210 (powerpc-isa205-vsx32l.c): Remove.
2211 (powerpc-e500l.c): Remove.
2212 (powerpc-64l.c): Remove.
2213 (powerpc-altivec64l.c): Remove.
2214 (powerpc-cell64l.c): Remove.
2215 (powerpc-vsx64l.c): Remove.
2216 (powerpc-isa205-64l.c): Remove.
2217 (powerpc-isa205-altivec64l.c): Remove.
2218 (powerpc-isa205-vsx64l.c): Remove.
2219 (s390-linux32.c): Remove.
2220 (s390-linux32v1.c): Remove.
2221 (s390-linux32v2.c): Remove.
2222 (s390-linux64.c): Remove.
2223 (s390-linux64v1.c): Remove.
2224 (s390-linux64v2.c): Remove.
2225 (s390-te-linux64.c): Remove.
2226 (s390-vx-linux64.c): Remove.
2227 (s390-tevx-linux64.c): Remove.
2228 (s390x-linux64.c): Remove.
2229 (s390x-linux64v1.c): Remove.
2230 (s390x-linux64v2.c): Remove.
2231 (s390x-te-linux64.c): Remove.
2232 (s390x-vx-linux64.c): Remove.
2233 (s390x-tevx-linux64.c): Remove.
2234 (tic6x-c64xp-linux.c): Remove.
2235 (tic6x-c64x-linux.c): Remove.
2236 (tic6x-c62x-linux.c): Remove.
2238 (reg-sparc64.c): Remove.
2239 (reg-spu.c): Remove.
2241 (amd64-linux.c): Remove.
2242 (amd64-avx.c): Remove.
2243 (amd64-avx-linux.c): Remove.
2244 (amd64-avx-avx512.c): Remove.
2245 (amd64-avx-avx512-linux.c): Remove.
2246 (amd64-mpx.c): Remove.
2247 (amd64-mpx-linux.c): Remove.
2248 (amd64-avx-mpx-avx512-pku.c): Remove.
2249 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2250 (amd64-avx-mpx.c): Remove.
2251 (amd64-avx-mpx-linux.c): Remove.
2253 (x32-linux.c): Remove.
2254 (x32-avx.c): Remove.
2255 (x32-avx-linux.c): Remove.
2256 (x32-avx-avx512.c): Remove.
2257 (x32-avx-avx512-linux.c): Remove.
2258 (reg-xtensa.c): Remove.
2259 (reg-tilegx.c): Remove.
2260 (reg-tilegx32.c): Remove.
2262 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2264 * Makefile.in (SFILES): Add "common/environ.c".
2265 (OBJS): Add "common/environ.h".
2267 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2269 * configure.ac: Check if the fs_base and gs_base members of
2270 `struct user_regs_struct' exist.
2271 * config.in: Regenerated.
2272 * configure: Likewise.
2274 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2276 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2278 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2279 (get_next_pcs_syscall_next_pc): Likewise.
2281 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2283 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2284 * nto-x86-low.c: Likewise.
2286 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2288 * Makefile.in: Include disable-implicit-rules.mk.
2290 2016-11-23 Pedro Alves <palves@redhat.com>
2292 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2293 (debug_vprintf): Use std::chrono::steady_clock instead of
2294 gettimeofday. Use '.' instead of ':'.
2295 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2296 (get_timestamp): Use std::chrono::steady_clock instead of
2299 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2301 * Makefile.in: Fix whitespace formatting.
2303 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2305 * Makefile.in (SFILES, OBS): Flatten list and order
2308 2016-11-23 Pedro Alves <palves@redhat.com>
2310 * event-loop.c (handle_file_event): Use warning.
2311 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2312 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2315 2016-11-23 Pedro Alves <palves@redhat.com>
2317 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2319 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2320 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2321 debug_printf and debug_flush for debug output.
2322 * server.c (handle_general_set): Likewise.
2323 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2326 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2328 * Makefile.in (.c.o): Replace rule with ...
2329 (%.o: %.c): ... this one.
2331 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2333 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2334 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2336 * configure.ac: Remove checks for the make program.
2337 * configure: Re-generate.
2339 2016-10-28 Pedro Alves <palves@redhat.com>
2341 * Makefile.in (CXX_DIALECT): Get from configure.
2342 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2343 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2344 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2345 * config.in: Regenerate.
2346 * configure: Regenerate.
2348 2016-10-27 Yao Qi <yao.qi@linaro.org>
2350 * linux-low.c (linux_supports_range_stepping): Return true if
2351 can_software_single_step return true.
2353 2016-10-27 Yao Qi <yao.qi@linaro.org>
2355 * inferiors.c (find_inferior_in_random): New function.
2356 * inferiors.h (find_inferior_in_random): Declare.
2357 * linux-low.c (linux_wait_for_event_filtered): Call
2358 find_inferior_in_random instead of find_inferior.
2360 2016-10-27 Yao Qi <yao.qi@linaro.org>
2362 * linux-low.c (linux_wait_1): If single-step breakpoints are
2363 inserted, remove them.
2365 2016-10-26 Pedro Alves <palves@redhat.com>
2367 * linux-low.c (handle_extended_wait): Link parent/child fork
2369 (linux_wait_1): Unlink them.
2370 (linux_set_resume_request): Ignore resume requests for
2371 already-resumed and unhandled fork child threads.
2372 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2373 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2375 (handle_v_requests) <vCont>: Don't call require_running.
2376 * server.h (in_queued_stop_replies): New declaration.
2378 2016-10-24 Yao Qi <yao.qi@linaro.org>
2381 * linux-aarch64-low.c (append_insns): Cast the return value to
2384 2016-10-10 Yao Qi <yao.qi@linaro.org>
2386 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2388 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2390 * target.c (target_supports_multi_process): New function, moved
2392 * target.h (target_supports_multi_process): ... here. Remove
2395 2016-10-05 Tom Tromey <tom@tromey.com>
2398 * tracepoint.c (handle_tracepoint_bkpts): Check
2399 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2401 2016-10-05 Yao Qi <yao.qi@linaro.org>
2403 * configure.srv: Update the path of arm-*.xml files.
2405 2016-10-05 Terry Guo <terry.guo@arm.com>
2406 Yao Qi <yao.qi@linaro.org>
2408 * Makefile.in: Adjust the path of rules.
2409 * configure.srv: Update the path of xml files.
2410 * regformats/arm-with-iwmmxt.dat: Regenerated.
2411 * regformats/arm-with-neon.dat: Likewise.
2412 * regformats/arm-with-vfpv2.dat: Likewise.
2413 * regformats/arm-with-vfpv3.dat Likewise.
2415 2016-09-30 Yao Qi <yao.qi@linaro.org>
2418 * target.c (target_stop_and_wait): Don't call
2419 target_continue_no_signal, use resume_stop instead.
2421 2016-09-26 Yao Qi <yao.qi@linaro.org>
2423 * linux-low.c (linux_wait_1): Call debug_exit.
2425 2016-09-23 Pedro Alves <palves@redhat.com>
2427 * Makefile.in (SFILES): Add common/new-op.c.
2428 (OBS): Add common/new-op.o.
2429 (new-op.o): New rule.
2431 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2433 * .gitinore: Ignore more files.
2435 2016-09-21 Yao Qi <yao.qi@linaro.org>
2437 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2440 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2442 * server.c (start_inferior): Call target_mourn_inferior instead of
2443 mourn_inferior; pass ptid_t argument to it.
2445 (handle_target_event): Likewise.
2446 * target.c (target_mourn_inferior): New function.
2447 * target.h (mourn_inferior): Delete macro.
2449 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2451 * linux-low.c (lwp_is_stepping): New function.
2453 2016-09-06 Carl Love <cel@us.ibm.com>
2455 * server.c (start_inferior): Fixed comment, requested comment change
2456 didn't get updated correctly. Removed reference to ptrace () call as
2457 it is only true on Linux systems.
2459 2016-09-06 Carl Love <cel@us.ibm.com>
2461 * server.c (start_inferior): Do not call
2462 function target_post_create_inferior () if the
2463 inferior process has already exited.
2465 2016-09-05 Pedro Alves <palves@redhat.com>
2467 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2468 (COMPILE.pre, CC_LD): Use CXX directly.
2469 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2470 * acinclude.m4: Don't include build-with-cxx.m4.
2471 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2472 * configure: Regenerate.
2474 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2477 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2478 call writing data to own_buf.
2480 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2482 * target.c (mywait): Call target_wait instead of
2484 (target_wait): New function.
2486 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2488 * server.c (start_inferior): New variable 'ptid'. Replace calls
2489 to the_target->resume by target_continue{,_no_signal}, depending
2491 * target.c (target_stop_and_wait): Call target_continue_no_signal
2492 instead of the_target->resume.
2493 (target_continue): New function.
2495 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2497 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2499 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2502 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2504 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2505 * linux-arm-low.c (ps_get_thread_area): Likewise.
2506 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2507 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2508 * linux-mips-low.c (ps_get_thread_area): Likewise.
2509 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2510 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2511 * linux-x86-low.c (ps_get_thread_area): Likewise.
2512 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2514 2016-08-19 Pedro Alves <palves@redhat.com>
2516 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2518 2016-08-19 Pedro Alves <palves@redhat.com>
2520 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2521 comment. Use memcpy instead of casting through unsigned long.
2523 2016-08-19 Pedro Alves <palves@redhat.com>
2525 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2526 allocating around 0x80000000.
2528 2016-08-19 Pedro Alves <palves@redhat.com>
2531 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2532 (x32-avx512-linux-ipa.o): New rules.
2533 * configure.ac (x86_64-*-linux*): New x32 check.
2534 * configure.srv (ipa_x32_linux_regobj): New.
2535 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2536 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2538 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2540 * configure: Regenerate.
2542 2016-08-09 Pedro Alves <palves@redhat.com>
2545 * Makefile.in (OBS): Add signals-state-save-restore.o.
2546 (signals-state-save-restore.o): New rule.
2547 * config.in: Regenerate.
2548 * configure: Regenerate.
2549 * linux-low.c: Include "signals-state-save-restore.h".
2550 (linux_create_inferior): Call
2551 restore_original_signals_state.
2552 * server.c: Include "dispositions-save-restore.h".
2553 (captured_main): Call save_original_signals_state.
2555 2016-08-05 Pedro Alves <palves@redhat.com>
2557 * configure: Regenerate.
2559 2016-08-04 Yao Qi <yao.qi@linaro.org>
2561 * linux-low.c (regsets_fetch_inferior_registers): Check
2562 errno is ESRCH or not.
2564 2016-08-02 Yao Qi <yao.qi@linaro.org>
2566 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2567 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2568 (thread_db_load_search): Update.
2569 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2570 td_ta_set_event and td_ta_event_getmsg.
2572 2016-07-26 Pedro Alves <palves@redhat.com>
2575 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2576 of unsigned long for 64-bit registers and use uint32_t instead of
2577 unsigned int for 32-bit registers.
2579 2016-07-26 Pedro Alves <palves@redhat.com>
2581 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2584 2016-07-21 Tom Tromey <tom@tromey.com>
2586 * configure: Rebuild.
2588 2016-07-21 Yao Qi <yao.qi@linaro.org>
2590 * mem-break.c (find_gdb_breakpoint): Cast bp to
2591 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2593 2016-07-21 Yao Qi <yao.qi@linaro.org>
2595 * server.c (handle_v_requests): Support s and S actions
2596 if target_supports_software_single_step return true.
2598 2016-07-21 Yao Qi <yao.qi@linaro.org>
2600 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2601 is resume_step, call maybe_hw_step.
2602 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2604 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2606 (proceed_one_lwp): If resume request is resume_step, install
2607 reinsert breakpoints and call maybe_hw_step.
2609 2016-07-21 Yao Qi <yao.qi@linaro.org>
2611 * linux-low.c (proceed_one_lwp): Declare.
2612 (linux_resume_one_thread): Remove local variable 'step'.
2613 Lift code enqueue signal. Call proceed_one_lwp instead of
2614 linux_resume_one_lwp.
2616 2016-07-21 Yao Qi <yao.qi@linaro.org>
2618 * linux-low.c (linux_resume_one_thread): Call
2619 enqueue_pending_signal.
2621 2016-07-21 Yao Qi <yao.qi@linaro.org>
2623 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2624 * inferiors.c (do_restore_current_thread_cleanup): New function.
2625 (make_cleanup_restore_current_thread): Likewise.
2626 * linux-low.c (install_software_single_step_breakpoints): Call
2627 make_cleanup_restore_current_thread. Switch current_thread to
2630 2016-07-21 Yao Qi <yao.qi@linaro.org>
2632 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2633 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2634 (clone_one_breakpoint): Likewise.
2635 (delete_reinsert_breakpoints): Change parameter to thread.
2637 (has_reinsert_breakpoints): Likewise.
2638 (uninsert_reinsert_breakpoints): Likewise.
2639 (reinsert_reinsert_breakpoints): Likewise.
2640 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2641 (delete_reinsert_breakpoints): Likewise.
2642 (reinsert_reinsert_breakpoints): Likewise.
2643 (uninsert_reinsert_breakpoints): Likewise.
2644 (has_reinsert_breakpoints): Likewise.
2646 2016-07-21 Yao Qi <yao.qi@linaro.org>
2648 * inferiors.c (get_thread_process): Make parameter const.
2649 * inferiors.h (get_thread_process): Update declaration.
2650 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2651 Add new parameters child_thread and parent_thread. Callers
2653 * mem-break.h (clone_all_breakpoints): Update declaration.
2655 2016-07-21 Yao Qi <yao.qi@linaro.org>
2657 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2658 <command_list, handler>: Remove.
2659 (struct gdb_breakpoint): New.
2660 (struct other_breakpoint): New.
2661 (struct reinsert_breakpoint): New.
2662 (is_gdb_breakpoint): New function.
2663 (any_persistent_commands): Update command_list if
2664 is_gdb_breakpoint returns true.
2665 (set_breakpoint): Create breakpoints according to their types.
2666 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2667 (set_gdb_breakpoint_1): Likewise.
2668 (set_gdb_breakpoint): Likewise.
2669 (clear_breakpoint_conditions): Change parameter type to
2670 'struct gdb_breakpoint *'.
2671 (clear_breakpoint_commands): Likewise.
2672 (clear_breakpoint_conditions_and_commands): Likewise.
2673 (add_condition_to_breakpoint): Likewise.
2674 (add_breakpoint_condition): Likewise.
2675 (add_commands_to_breakpoint): Likewise.
2676 (check_breakpoints): Check other_breakpoint.
2677 (clone_one_breakpoint): Clone breakpopint according to its type.
2678 * mem-break.h (struct gdb_breakpoint): Declare.
2679 (set_gdb_breakpoint): Update declaration.
2680 (clear_breakpoint_conditions_and_commands): Likewise.
2681 (add_breakpoint_condition): Likewise.
2682 (add_breakpoint_commands): Likewise.
2683 * server.c (process_point_options): Change parameter type to
2684 'struct gdb_breakpoint *'.
2686 2016-07-21 Yao Qi <yao.qi@linaro.org>
2688 * mem-break.c (set_breakpoint_at): Rename it to ...
2689 (set_breakpoint_type_at): ... it.
2690 (set_breakpoint_at): Call set_breakpoint_type_at.
2691 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2692 * mem-break.h (set_breakpoint_at): Update comments.
2694 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2696 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2698 (nios2_store_gregset): Likewise.
2700 2016-07-01 Pedro Alves <palves@redhat.com>
2701 Antoine Tremblay <antoine.tremblay@ericsson.com>
2703 * linux-low.c: Change interface to take the target lwp_info
2704 pointer directly and return void. Handle detaching from a zombie
2706 (linux_detach_lwp_callback): New function.
2707 (linux_detach): Detach from the leader thread after detaching from
2710 2016-06-28 Yao Qi <yao.qi@linaro.org>
2712 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2713 for variable new_offset.
2714 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2715 (aarch64_ftrace_insn_reloc_cb): Likewise.
2716 (aarch64_ftrace_insn_reloc_tb): Likewise.
2717 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2718 PRIx64 instead of PRIx32.
2720 2016-06-28 Yao Qi <yao.qi@linaro.org>
2722 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2723 (the_low_target): Install arm_get_syscall_trapinfo.
2725 2016-06-28 Yao Qi <yao.qi@linaro.org>
2727 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2729 (the_low_target): Install aarch64_get_syscall_trapinfo.
2731 2016-06-28 Yao Qi <yao.qi@linaro.org>
2733 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2735 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2736 Remove parameter sysno.
2737 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2740 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2742 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2743 (s390_emit_ne_goto): Likewise.
2744 (s390_emit_lt_goto): Likewise.
2745 (s390_emit_le_goto): Likewise.
2746 (s390_emit_gt_goto): Likewise.
2747 (s390_emit_ge_goto): Likewise.
2748 (s390x_emit_eq_goto): Likewise.
2749 (s390x_emit_ne_goto): Likewise.
2750 (s390x_emit_lt_goto): Likewise.
2751 (s390x_emit_le_goto): Likewise.
2752 (s390x_emit_gt_goto): Likewise.
2753 (s390x_emit_ge_goto): Likewise.
2754 (s390_emit_ops_impl): Mark variable static.
2755 (s390x_emit_ops): Likewise.
2757 2016-06-17 Yao Qi <yao.qi@linaro.org>
2759 * linux-low.c (handle_extended_wait): Call
2760 uninsert_reinsert_breakpoints for the parent process. Remove
2761 reinsert breakpoints from the child process. Reinsert them to
2762 the parent process when vfork is done.
2763 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2764 (reinsert_reinsert_breakpoints): New function.
2765 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2766 (reinsert_reinsert_breakpoints): Declare.
2768 2016-06-17 Yao Qi <yao.qi@linaro.org>
2770 * linux-low.c (handle_extended_wait): If the parent is doing
2771 step-over, remove the reinsert breakpoints from the forked child.
2773 2016-06-17 Yao Qi <yao.qi@linaro.org>
2775 * linux-low.c (unsuspend_all_lwps): Declare.
2776 (linux_low_filter_event): If thread exited, call finish_step_over.
2777 If step-over is finished, unsuspend other threads.
2779 2016-06-17 Yao Qi <yao.qi@linaro.org>
2781 * linux-low.c (linux_resume_one_lwp_throw): Assert
2782 has_reinsert_breakpoints returns false.
2783 * mem-break.c (delete_disabled_breakpoints): Assert
2784 bp type isn't reinsert_breakpoint.
2786 2016-06-17 Yao Qi <yao.qi@linaro.org>
2788 * linux-low.c (maybe_hw_step): New function.
2789 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2790 (finish_step_over): Switch current_thread to lwp temporarily,
2791 and assert has_reinsert_breakpoints returns true.
2792 (proceed_one_lwp): Call maybe_hw_step.
2793 * mem-break.c (has_reinsert_breakpoints): New function.
2794 * mem-break.h (has_reinsert_breakpoints): Declare.
2796 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2798 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2800 2016-05-17 Yao Qi <yao.qi@linaro.org>
2802 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2803 instead of find_inferior.
2805 2016-05-05 Yao Qi <yao.qi@linaro.org>
2807 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2808 Initialize res to zero.
2810 2016-05-05 Yao Qi <yao.qi@linaro.org>
2812 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2815 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2817 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2818 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2819 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2821 2016-04-28 Par Olsson <par.olsson@windriver.com>
2822 Simon Marchi <simon.marchi@ericsson.com>
2824 * tracepoint.c (write_inferior_int8): New function.
2825 (cmd_qtenable_disable): Write enable flag using
2826 write_inferior_int8.
2828 2016-04-25 Yao Qi <yao.qi@linaro.org>
2830 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2831 (need_step_over_p): Return zero if the LWP has pending signals
2832 can be delivered on software single step target.
2834 2016-04-25 Yao Qi <yao.qi@linaro.org>
2836 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2837 return instead of error.
2839 2016-04-22 Yao Qi <yao.qi@linaro.org>
2841 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2844 2016-04-22 Yao Qi <yao.qi@linaro.org>
2846 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2847 signal when stepping over breakpoint with software single
2850 2016-04-21 Pedro Alves <palves@redhat.com>
2852 * linux-s390-low.c (s390_collect_ptrace_register)
2853 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2855 (s390_check_regset): Use void * instead of gdb_byte *.
2857 2016-04-20 Pedro Alves <palves@redhat.com>
2859 * configure: Renegerate.
2861 2016-04-20 Yao Qi <yao.qi@linaro.org>
2863 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2864 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2866 (arm_store_gregset): Likewise.
2868 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2870 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2871 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2872 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2873 (amd64-avx-mpx-linux.c): New rules.
2874 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2875 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2876 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2877 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2878 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2879 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2880 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2881 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2882 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2883 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2884 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2885 * linux-x86-low.c (x86_linux_read_description): Add case for
2886 X86_XSTATE_AVX_MPX_MASK.
2887 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2888 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2889 init_registers_i386_avx_mpx_linux.
2890 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2891 (initialize_low_tracepoint): Call
2892 init_registers_i386_avx_mpx_linux.
2893 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2894 (initialize_low_tracepoint): Call
2895 init_registers_amd64_avx_mpx_linux.
2896 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2897 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2898 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2901 2016-04-18 Pedro Alves <palves@redhat.com>
2903 * configure: Regenerate.
2905 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2907 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2908 (aarch64_emit_sub): Likewise.
2910 2016-04-12 Pedro Alves <palves@redhat.com>
2912 * utils.c (prepare_to_throw_exception): Delete.
2914 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2916 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2918 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2920 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2922 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2924 * linux-aarch64-ipa.c: Add <elf.h> include.
2925 * linux-ppc-ipa.c: Add <elf.h> include.
2926 * linux-s390-ipa.c: Add <elf.h> include.
2928 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2930 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2931 (get_raw_reg_ptr): Likewise.
2932 (get_trace_state_variable_value_ptr): Likewise.
2933 (set_trace_state_variable_value_ptr): Likewise.
2934 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2937 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2938 Marcin Kościelnicki <koriakin@0x04.net>
2941 * linux-ppc-low.c (emit_insns): New function.
2942 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2943 (ppc_emit_prologue): New function.
2944 (ppc_emit_epilogue): New function.
2945 (ppc_emit_add): New function.
2946 (ppc_emit_sub): New function.
2947 (ppc_emit_mul): New function.
2948 (ppc_emit_lsh): New function.
2949 (ppc_emit_rsh_signed): New function.
2950 (ppc_emit_rsh_unsigned): New function.
2951 (ppc_emit_ext): New function.
2952 (ppc_emit_zero_ext): New function.
2953 (ppc_emit_log_not): New function.
2954 (ppc_emit_bit_and): New function.
2955 (ppc_emit_bit_or): New function.
2956 (ppc_emit_bit_xor): New function.
2957 (ppc_emit_bit_not): New function.
2958 (ppc_emit_equal): New function.
2959 (ppc_emit_less_signed): New function.
2960 (ppc_emit_less_unsigned): New function.
2961 (ppc_emit_ref): New function.
2962 (ppc_emit_const): New function.
2963 (ppc_emit_reg): New function.
2964 (ppc_emit_pop): New function.
2965 (ppc_emit_stack_flush): New function.
2966 (ppc_emit_swap): New function.
2967 (ppc_emit_stack_adjust): New function.
2968 (ppc_emit_call): New function.
2969 (ppc_emit_int_call_1): New function.
2970 (ppc_emit_void_call_2): New function.
2971 (ppc_emit_if_goto): New function.
2972 (ppc_emit_goto): New function.
2973 (ppc_emit_eq_goto): New function.
2974 (ppc_emit_ne_goto): New function.
2975 (ppc_emit_lt_goto): New function.
2976 (ppc_emit_le_goto): New function.
2977 (ppc_emit_gt_goto): New function.
2978 (ppc_emit_ge_goto): New function.
2979 (ppc_write_goto_address): New function.
2980 (ppc_emit_ops_impl): New static variable.
2981 (ppc64v1_emit_prologue): New function.
2982 (ppc64v2_emit_prologue): New function.
2983 (ppc64_emit_epilogue): New function.
2984 (ppc64_emit_add): New function.
2985 (ppc64_emit_sub): New function.
2986 (ppc64_emit_mul): New function.
2987 (ppc64_emit_lsh): New function.
2988 (ppc64_emit_rsh_signed): New function.
2989 (ppc64_emit_rsh_unsigned): New function.
2990 (ppc64_emit_ext): New function.
2991 (ppc64_emit_zero_ext): New function.
2992 (ppc64_emit_log_not): New function.
2993 (ppc64_emit_bit_and): New function.
2994 (ppc64_emit_bit_or): New function.
2995 (ppc64_emit_bit_xor): New function.
2996 (ppc64_emit_bit_not): New function.
2997 (ppc64_emit_equal): New function.
2998 (ppc64_emit_less_signed): New function.
2999 (ppc64_emit_less_unsigned): New function.
3000 (ppc64_emit_ref): New function.
3001 (ppc64_emit_const): New function.
3002 (ppc64v1_emit_reg): New function.
3003 (ppc64v2_emit_reg): New function.
3004 (ppc64_emit_pop): New function.
3005 (ppc64_emit_stack_flush): New function.
3006 (ppc64_emit_swap): New function.
3007 (ppc64v1_emit_call): New function.
3008 (ppc64v2_emit_call): New function.
3009 (ppc64v1_emit_int_call_1): New function.
3010 (ppc64v2_emit_int_call_1): New function.
3011 (ppc64v1_emit_void_call_2): New function.
3012 (ppc64v2_emit_void_call_2): New function.
3013 (ppc64_emit_if_goto): New function.
3014 (ppc64_emit_eq_goto): New function.
3015 (ppc64_emit_ne_goto): New function.
3016 (ppc64_emit_lt_goto): New function.
3017 (ppc64_emit_le_goto): New function.
3018 (ppc64_emit_gt_goto): New function.
3019 (ppc64_emit_ge_goto): New function.
3020 (ppc64v1_emit_ops_impl): New static variable.
3021 (ppc64v2_emit_ops_impl): New static variable.
3022 (ppc_emit_ops): New function.
3023 (linux_low_target): Wire in ppc_emit_ops.
3025 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3026 Marcin Kościelnicki <koriakin@0x04.net>
3029 * Makefile.in: Add powerpc-*-ipa.o
3030 * configure.srv: Add ipa_obj for powerpc*-linux.
3031 * linux-ppc-ipa.c: New file.
3032 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3034 (PPC_FIELD): New macro.
3035 (PPC_SEXT): New macro.
3036 (PPC_OP6): New macro.
3037 (PPC_BO): New macro.
3038 (PPC_LI): New macro.
3039 (PPC_BD): New macro.
3040 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3041 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3042 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3043 (ppc_get_thread_area): New function.
3044 (is_elfv2_inferior): New function.
3045 (gen_ds_form): New function.
3046 (GEN_STD): New macro.
3047 (GEN_STDU): New macro.
3048 (GEN_LD): New macro.
3049 (GEN_LDU): New macro.
3050 (gen_d_form): New function.
3051 (GEN_ADDI): New macro.
3052 (GEN_ADDIS): New macro.
3053 (GEN_LI): New macro.
3054 (GEN_LIS): New macro.
3055 (GEN_ORI): New macro.
3056 (GEN_ORIS): New macro.
3057 (GEN_LWZ): New macro.
3058 (GEN_STW): New macro.
3059 (GEN_STWU): New macro.
3060 (gen_xfx_form): New function.
3061 (GEN_MFSPR): New macro.
3062 (GEN_MTSPR): New macro.
3063 (GEN_MFCR): New macro.
3064 (GEN_MTCR): New macro.
3065 (GEN_SYNC): New macro.
3066 (GEN_LWSYNC): New macro.
3067 (gen_x_form): New function.
3068 (GEN_OR): New macro.
3069 (GEN_MR): New macro.
3070 (GEN_LWARX): New macro.
3071 (GEN_STWCX): New macro.
3072 (GEN_CMPW): New macro.
3073 (gen_md_form): New function.
3074 (GEN_RLDICL): New macro.
3075 (GEN_RLDICR): New macro.
3076 (gen_i_form): New function.
3078 (GEN_BL): New macro.
3079 (gen_b_form): New function.
3080 (GEN_BNE): New macro.
3081 (GEN_LOAD): New macro.
3082 (GEN_STORE): New macro.
3083 (gen_limm): New function.
3084 (gen_atomic_xchg): New function.
3085 (gen_call): New function.
3086 (ppc_relocate_instruction): New function.
3087 (ppc_install_fast_tracepoint_jump_pad): New function.
3088 (ppc_get_min_fast_tracepoint_insn_len): New function.
3089 (ppc_get_ipa_tdesc_idx): New function.
3090 (the_low_target): Wire in the new functions.
3091 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3093 * linux-ppc-tdesc.h: New file.
3095 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3097 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3098 (alloc_jump_pad_buffer): New function.
3099 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3100 (alloc_jump_pad_buffer): New function.
3101 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3102 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3103 (alloc_jump_pad_buffer): New function.
3104 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3105 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3106 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3107 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3109 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3111 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3112 * linux-amd64-ipa.c: Likewise.
3113 * linux-i386-ipa.c: Likewise.
3114 * linux-s390-ipa.c: Likewise.
3115 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3116 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3117 set_trace_state_variable_value_ptr.
3118 (struct ipa_sym_addresses): Likewise.
3119 (symbol_list): Likewise.
3120 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3121 accessing gdb_collect directly.
3122 (gdb_collect_ptr_type): New typedef.
3123 (get_raw_reg_ptr_type): New typedef.
3124 (get_trace_state_variable_value_ptr_type): New typedef.
3125 (set_trace_state_variable_value_ptr_type): New typedef.
3126 (gdb_collect_ptr): New global.
3127 (get_raw_reg_ptr): New global.
3128 (get_trace_state_variable_value_ptr): New global.
3129 (set_trace_state_variable_value_ptr): New global.
3130 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3131 accessing get_raw_reg directly.
3132 (get_get_tsv_func_addr): Likewise for
3133 get_trace_state_variable_value_ptr.
3134 (get_set_tsv_func_addr): Likewise for
3135 set_trace_state_variable_value_ptr.
3136 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3138 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3140 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3142 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3144 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3146 (relocate_instruction): Remove own_buf.
3147 * server.c (own_buf): Make global.
3148 (handle_v_requests): Make global.
3149 * server.h (own_buf): New declaration.
3150 (handle_v_requests): New prototype.
3152 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3155 * linux-s390-low.c (add_insns): New function.
3156 (s390_emit_prologue): New function.
3157 (s390_emit_epilogue): New function.
3158 (s390_emit_add): New function.
3159 (s390_emit_sub): New function.
3160 (s390_emit_mul): New function.
3161 (s390_emit_lsh): New function.
3162 (s390_emit_rsh_signed): New function.
3163 (s390_emit_rsh_unsigned): New function.
3164 (s390_emit_ext): New function.
3165 (s390_emit_log_not): New function.
3166 (s390_emit_bit_and): New function.
3167 (s390_emit_bit_or): New function.
3168 (s390_emit_bit_xor): New function.
3169 (s390_emit_bit_not): New function.
3170 (s390_emit_equal): New function.
3171 (s390_emit_less_signed): New function.
3172 (s390_emit_less_unsigned): New function.
3173 (s390_emit_ref): New function.
3174 (s390_emit_if_goto): New function.
3175 (s390_emit_goto): New function.
3176 (s390_write_goto_address): New function.
3177 (s390_emit_litpool): New function.
3178 (s390_emit_const): New function.
3179 (s390_emit_call): New function.
3180 (s390_emit_reg): New function.
3181 (s390_emit_pop): New function.
3182 (s390_emit_stack_flush): New function.
3183 (s390_emit_zero_ext): New function.
3184 (s390_emit_swap): New function.
3185 (s390_emit_stack_adjust): New function.
3186 (s390_emit_set_r2): New function.
3187 (s390_emit_int_call_1): New function.
3188 (s390_emit_void_call_2): New function.
3189 (s390_emit_eq_goto): New function.
3190 (s390_emit_ne_goto): New function.
3191 (s390_emit_lt_goto): New function.
3192 (s390_emit_le_goto): New function.
3193 (s390_emit_gt_goto): New function.
3194 (s390_emit_ge_goto): New function.
3195 (s390x_emit_prologue): New function.
3196 (s390x_emit_epilogue): New function.
3197 (s390x_emit_add): New function.
3198 (s390x_emit_sub): New function.
3199 (s390x_emit_mul): New function.
3200 (s390x_emit_lsh): New function.
3201 (s390x_emit_rsh_signed): New function.
3202 (s390x_emit_rsh_unsigned): New function.
3203 (s390x_emit_ext): New function.
3204 (s390x_emit_log_not): New function.
3205 (s390x_emit_bit_and): New function.
3206 (s390x_emit_bit_or): New function.
3207 (s390x_emit_bit_xor): New function.
3208 (s390x_emit_bit_not): New function.
3209 (s390x_emit_equal): New function.
3210 (s390x_emit_less_signed): New function.
3211 (s390x_emit_less_unsigned): New function.
3212 (s390x_emit_ref): New function.
3213 (s390x_emit_if_goto): New function.
3214 (s390x_emit_const): New function.
3215 (s390x_emit_call): New function.
3216 (s390x_emit_reg): New function.
3217 (s390x_emit_pop): New function.
3218 (s390x_emit_stack_flush): New function.
3219 (s390x_emit_zero_ext): New function.
3220 (s390x_emit_swap): New function.
3221 (s390x_emit_stack_adjust): New function.
3222 (s390x_emit_int_call_1): New function.
3223 (s390x_emit_void_call_2): New function.
3224 (s390x_emit_eq_goto): New function.
3225 (s390x_emit_ne_goto): New function.
3226 (s390x_emit_lt_goto): New function.
3227 (s390x_emit_le_goto): New function.
3228 (s390x_emit_gt_goto): New function.
3229 (s390x_emit_ge_goto): New function.
3230 (s390_emit_ops): New function.
3231 (struct linux_target_ops): Fill in emit_ops hook.
3233 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3236 * Makefile.in: Add s390 IPA files.
3237 * configure.srv: Build IPA for s390.
3238 * linux-s390-ipa.c: New file.
3239 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3240 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3241 (tdesc_s390_linux32): Likewise.
3242 (init_registers_s390_linux32v1): Likewise.
3243 (tdesc_s390_linux32v1): Likewise.
3244 (init_registers_s390_linux32v2): Likewise.
3245 (tdesc_s390_linux32v2): Likewise.
3246 (init_registers_s390_linux64): Likewise.
3247 (tdesc_s390_linux64): Likewise.
3248 (init_registers_s390_linux64v1): Likewise.
3249 (tdesc_s390_linux64v1): Likewise.
3250 (init_registers_s390_linux64v2): Likewise.
3251 (tdesc_s390_linux64v2): Likewise.
3252 (init_registers_s390_te_linux64): Likewise.
3253 (tdesc_s390_te_linux64): Likewise.
3254 (init_registers_s390_vx_linux64): Likewise.
3255 (tdesc_s390_vx_linux64): Likewise.
3256 (init_registers_s390_tevx_linux64): Likewise.
3257 (tdesc_s390_tevx_linux64): Likewise.
3258 (init_registers_s390x_linux64): Likewise.
3259 (tdesc_s390x_linux64): Likewise.
3260 (init_registers_s390x_linux64v1): Likewise.
3261 (tdesc_s390x_linux64v1): Likewise.
3262 (init_registers_s390x_linux64v2): Likewise.
3263 (tdesc_s390x_linux64v2): Likewise.
3264 (init_registers_s390x_te_linux64): Likewise.
3265 (tdesc_s390x_te_linux64): Likewise.
3266 (init_registers_s390x_vx_linux64): Likewise.
3267 (tdesc_s390x_vx_linux64): Likewise.
3268 (init_registers_s390x_tevx_linux64): Likewise.
3269 (tdesc_s390x_tevx_linux64): Likewise.
3270 (have_hwcap_s390_vx): New static variable.
3271 (s390_arch_setup): Fill have_hwcap_s390_vx.
3272 (s390_get_thread_area): New function.
3273 (s390_ft_entry_gpr_esa): New const.
3274 (s390_ft_entry_gpr_zarch): New const.
3275 (s390_ft_entry_misc): New const.
3276 (s390_ft_entry_fr): New const.
3277 (s390_ft_entry_vr): New const.
3278 (s390_ft_main_31): New const.
3279 (s390_ft_main_64): New const.
3280 (s390_ft_exit_fr): New const.
3281 (s390_ft_exit_vr): New const.
3282 (s390_ft_exit_misc): New const.
3283 (s390_ft_exit_gpr_esa): New const.
3284 (s390_ft_exit_gpr_zarch): New const.
3285 (append_insns): New function.
3286 (s390_relocate_instruction): New function.
3287 (s390_install_fast_tracepoint_jump_pad): New function.
3288 (s390_get_min_fast_tracepoint_insn_len): New function.
3289 (s390_get_ipa_tdesc_idx): New function.
3290 (struct linux_target_ops): Wire in the above functions.
3291 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3292 * linux-s390-tdesc.h: New file.
3294 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3296 * linux-s390-low.c (s390_supports_tracepoints): New function.
3297 (struct linux_target_ops): Fill supports_tracepoints hook.
3299 2016-03-18 Yao Qi <yao.qi@linaro.org>
3301 * linux-low.c (lwp_signal_can_be_delivered): New function.
3302 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3304 2016-03-18 Yao Qi <yao.qi@linaro.org>
3306 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3307 0 if signal is enqueued. Remove 'signal' from one debugging
3308 message. Move one debugging message to some lines below.
3309 Remove code setting 'signal' to 0.
3311 2016-03-18 Yao Qi <yao.qi@linaro.org>
3313 * linux-low.c (linux_low_filter_event): Remove redundant
3314 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3316 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3318 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3319 (struct linux_target_ops): Wire in the above.
3321 2016-03-03 Yao Qi <yao.qi@linaro.org>
3323 * linux-low.c: Update comments to start_step_over.
3325 2016-03-03 Yao Qi <yao.qi@linaro.org>
3328 * linux-low.c (handle_extended_wait): Set child suspended
3329 if event_lwp->bp_reinsert isn't zero.
3331 2016-03-02 Yao Qi <yao.qi@linaro.org>
3333 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3334 enqueue_pending_signal.
3336 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3338 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3341 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3343 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3344 (s390_regmap_3264) [!__s390x__]: New global.
3345 (s390_collect_ptrace_register): Skip map entries containing -1.
3346 (s390_supply_ptrace_register): Ditto.
3347 (s390_fill_gprs_high): New function.
3348 (s390_store_gprs_high): New function.
3349 (s390_regsets): Add NT_S390_HIGH_GPRS.
3350 (s390_get_hwcap): Enable on 31-bit.
3351 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3352 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3353 Detect NT_S390_HIGH_GPRS.
3354 (s390_usrregs_info_3264): Enable on 31-bit.
3355 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3356 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3358 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3361 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3362 * configure.srv: Ditto.
3363 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3364 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3365 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3366 (init_registers_amd64_linux): Remove prototype.
3367 (tdesc_amd64_linux): Remove declaration.
3368 (get_ipa_tdesc): New function.
3369 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3370 initialize remaining tdescs.
3371 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3372 (init_registers_i386_linux): Remove prototype.
3373 (tdesc_i386_linux): Remove declaration.
3374 (get_ipa_tdesc): New function.
3375 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3376 initialize remaining tdescs.
3377 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3378 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3379 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3380 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3381 (x86_get_ipa_tdesc_idx): New function.
3382 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3383 * linux-x86-tdesc.h: New file.
3384 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3385 (target_get_ipa_tdesc_idx): New macro.
3386 * tracepoint.c (ipa_tdesc_idx): New macro.
3387 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3388 (symbol_list): Add ipa_tdesc_idx.
3389 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3390 (ipa_tdesc): Remove.
3391 (ipa_tdesc_idx): New variable.
3392 (get_context_regcache): Use get_ipa_tdesc.
3393 (gdb_collect): Ditto.
3395 * tracepoint.h (get_ipa_tdesc): New prototype.
3396 (ipa_tdesc): Remove.
3398 2016-02-24 Pedro Alves <palves@redhat.com>
3400 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3401 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3402 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3403 Factor out common code between the USE_SIGTRAP_SIGINFO and
3404 !USE_SIGTRAP_SIGINFO blocks.
3405 (linux_low_filter_event): Call save_stop_reason instead of
3406 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3408 (linux_wait_1): Update comments.
3410 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3412 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3413 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3414 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3415 ppc_insert_point, ppc_remove_point.
3417 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3419 * linux-s390-low.c (s390_supports_z_point_type): New function.
3420 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3422 2016-02-16 Yao Qi <yao.qi@linaro.org>
3424 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3425 PC. Get pc from regcache_read_pc.
3427 2016-02-12 Yao Qi <yao.qi@linaro.org>
3429 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3430 or linux_get_pc_32bit.
3431 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3433 2016-02-12 Yao Qi <yao.qi@linaro.org>
3435 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3436 arm_linux_get_next_pcs_fixup.
3438 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3440 * tracepoint.c (x_tracepoint_action_download): Change
3441 write_inferior_data_ptr to write_inferior_data_pointer.
3442 (cmd_qtstart): Likewise.
3443 (write_inferior_data_ptr): Remove.
3444 (download_agent_expr): Change write_inferior_data_ptr to
3445 write_inferior_data_pointer.
3446 (download_tracepoint_1): Likewise.
3447 (download_tracepoint): Likewise.
3448 (download_trace_state_variables): Likewise.
3450 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3451 Marcin Kościelnicki <koriakin@0x04.net>
3453 * tracepoint.c (struct tracepoint_action_ops): Remove.
3454 (struct tracepoint_action): Remove ops.
3455 (m_tracepoint_action_download, r_tracepoint_action_download)
3456 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3457 size and offset accordingly.
3458 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3459 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3460 (tracepoint_action_send, tracepoint_action_download): New functions.
3461 Helpers for trace action handlers.
3462 (add_tracepoint_action): Remove setup actions ops.
3463 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3465 2016-02-10 Yao Qi <yao.qi@linaro.org>
3467 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3469 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3471 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3473 * configure: Regenerate.
3475 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3477 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3478 void * to gdb_byte *.
3479 * linux-low.c (siginfo_fixup): Likewise.
3480 (linux_xfer_siginfo): Likewise.
3481 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3483 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3485 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3487 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3489 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3491 * linux-x86-low.c [__x86_64__]: Include
3492 "nat/amd64-linux-siginfo.h".
3493 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3494 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3495 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3496 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3497 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3498 (cpt_si_fd, si_timerid, si_overrun): Move from
3499 nat/amd64-linux-siginfo.c.
3500 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3502 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3504 * server.c (skip_to_semicolon): Remove.
3505 (process_point_options): Use strchrnul instead of
3508 2016-01-26 Yao Qi <yao.qi@linaro.org>
3510 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3511 * linux-low.c (install_software_single_step_breakpoints): Don't
3512 call regcache_read_pc.
3513 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3516 2016-01-26 Yao Qi <yao.qi@linaro.org>
3518 * linux-low.c (install_software_single_step_breakpoints): Call
3519 regcache_read_pc instead of get_pc.
3521 2016-01-26 Yao Qi <yao.qi@linaro.org>
3523 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3524 (unblock_async_io): Rename to ...
3525 (block_unblock_async_io): ... it. New function.
3526 (enable_async_io): Don't install SIGIO handler. Unblock it
3528 (disable_async_io): Don't ignore SIGIO. Block it instead.
3529 (initialize_async_io): Install SIGIO handler. Don't call
3532 2016-01-26 Yao Qi <yao.qi@linaro.org>
3534 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3535 first character is '\003', call *the_target->request_interrupt.
3537 2016-01-25 Yao Qi <yao.qi@linaro.org>
3539 * remote-utils.c (new_thread_notify): Remove.
3540 (dead_thread_notify): Likewise.
3541 * remote-utils.h (new_thread_notify): Remove declaration.
3542 (dead_thread_notify): Likewise.
3544 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3546 * gdb.trace/pending.exp: Fix expected message on continue.
3548 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3550 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3551 it works properly on big-endian machines where sizeof (CORE_ADDR)
3554 2016-01-21 Pedro Alves <palves@redhat.com>
3556 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3557 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3558 * configure: Regenerate.
3560 2016-01-21 Yao Qi <yao.qi@linaro.org>
3562 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3563 is_thumb and set it according to CPSR saved on the stack.
3564 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3565 arm_sigreturn_next_pc.
3567 2016-01-18 Yao Qi <yao.qi@linaro.org>
3569 * linux-low.c (linux_set_pc_64bit): New function.
3570 (linux_get_pc_64bit): New function.
3571 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3573 * linux-sparc-low.c (debug_threads): Remove declaration.
3574 (sparc_get_pc): Remove.
3575 (the_low_target): Use linux_get_pc_64bit instead of
3577 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3578 (the_low_target): Use linux_get_pc_64bit and
3581 2016-01-18 Yao Qi <yao.qi@linaro.org>
3583 * linux-arm-low.c (debug_threads): Remove declaration.
3584 (arm_get_pc, arm_set_pc): Remove.
3585 (the_low_target): Use linux_get_pc_32bit and
3587 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3588 (the_low_target): Use linux_get_pc_32bit and
3590 * linux-cris-low.c (debug_threads): Remove declaration.
3591 (cris_get_pc, cris_set_pc,): Remove.
3592 (the_low_target): Use linux_get_pc_32bit and
3594 * linux-crisv32-low.c (debug_threads): Remove declaration.
3595 (cris_get_pc, cris_set_pc): Remove.
3596 (the_low_target): Use linux_get_pc_32bit and
3598 * linux-low.c: Include inttypes.h.
3599 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3600 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3601 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3602 (the_low_target): Use linux_get_pc_32bit and
3604 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3605 (the_low_target): Use linux_get_pc_32bit and
3607 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3608 (the_low_target): Use linux_get_pc_32bit and
3610 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3611 (the_low_target): Use linux_get_pc_32bit and
3613 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3614 (the_low_target): Use linux_get_pc_32bit and
3617 2016-01-18 Gary Benson <gbenson@redhat.com>
3619 * configure.ac (AC_FUNC_FORK): New check.
3620 * config.in: Regenerate.
3621 * configure: Likewise.
3623 2016-01-14 Yao Qi <yao.qi@linaro.org>
3625 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3626 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3627 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3628 arm_get_next_pcs_ctor.
3630 2016-01-12 Josh Stone <jistone@redhat.com>
3631 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3633 * inferiors.h: Include "gdb_vecs.h".
3634 (struct process_info): Add syscalls_to_catch.
3635 * inferiors.c (remove_process): Free syscalls_to_catch.
3636 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3637 syscall_return stops.
3638 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3639 * server.c (handle_general_set): Handle QCatchSyscalls.
3640 (handle_query): Report support for QCatchSyscalls.
3641 * target.h (struct target_ops): Add supports_catch_syscall.
3642 (target_supports_catch_syscall): New macro.
3643 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3644 (struct lwp_info): Add syscall_state.
3645 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3646 Maintain syscall_state and syscalls_to_catch across exec.
3647 (get_syscall_trapinfo): New function, proxy to the_low_target.
3648 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3649 (linux_low_filter_event): Toggle syscall_state entry/return for
3650 syscall traps, and set it ignored for all others.
3651 (gdb_catching_syscalls_p): New function.
3652 (gdb_catch_this_syscall_p): New function.
3653 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3654 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3655 (linux_supports_catch_syscall): New function.
3656 (linux_target_ops): Install it.
3657 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3658 (the_low_target): Install it.
3660 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3662 * acinclude.m4: Include new ../warning.m4 file.
3663 * configure: Regenerated.
3664 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3666 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3668 * ax.c (is_goto_target): Mark static.
3669 * linux-low.c (register_addr): Likewise.
3670 (linux_fetch_registers, linux_store_registers): Likewise.
3671 * mem-break.c (any_persistent_commands): Fix old prototype.
3672 (add_commands_to_breakpoint): Mark static.
3673 * regcache.c (find_register_by_name): Delete unused func.
3674 * remote-utils.c (hex_or_minus_one): Mark static.
3675 * server.c (monitor_show_help): Mark static.
3676 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3677 handle_v_requests): Likewise.
3679 2016-01-12 Pedro Alves <palves@redhat.com>
3681 Remove use of the registered trademark symbol throughout.
3683 2016-01-08 Yao Qi <yao.qi@linaro.org>
3685 * remote-utils.c (getpkt): If c is '\003', call target hook
3688 2016-01-06 Yao Qi <yao.qi@linaro.org>
3690 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3691 linux-aarch32-low.c.
3692 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3693 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3694 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3695 (thumb2_breakpoint): Declare.
3696 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3697 linux-aarch32-low.h.
3698 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3699 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3700 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3702 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3704 * gdbreplay.c (gdbreplay_version): Change copyright year in
3706 * server.c (gdbserver_version): Likewise.
3708 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3710 * server.c (crc32_table): Delete.
3711 (crc32): Use libiberty's xcrc32 function.
3713 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3715 * lynx-low.c (lynx_delete_thread_callback): New function.
3716 (lynx_mourn): Properly delete our process and all of its
3717 threads. Remove call to clear_inferiors.
3719 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3721 * target.c (thread_search_callback): Add check that
3722 the thread_stopped target callback is not NULL before
3725 2015-12-21 Yao Qi <yao.qi@linaro.org>
3727 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3730 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3732 * server.c (handle_query): Call target_supports_software_single_step.
3734 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3736 * linux-low.c (single_step): New function.
3737 (linux_resume_one_lwp_throw): Call single_step.
3738 (start_step_over): Likewise.
3740 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3742 * Makefile.in (SFILES): Append arch/arm-linux.c,
3743 arch/arm-get-next-pcs.c.
3744 (arm-linux.o): New rule.
3745 (arm-get-next-pcs.o): New rule.
3746 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3748 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3749 to linux-aarch32-low.c.
3750 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3751 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3752 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3753 (thumb2_breakpoint_len): Likewise.
3754 (arm_is_thumb_mode): Make non-static.
3755 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3756 from linux-aarch32-low.c.
3757 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3758 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3759 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3760 (thumb2_breakpoint_len): Likewise.
3761 (arm_is_thumb_mode): New declaration.
3762 * linux-arm-low.c: Include arch/arm-linux.h
3763 aarch/arm-get-next-pcs.h, sys/syscall.h.
3764 (get_next_pcs_ops): New struct.
3765 (get_next_pcs_addr_bits_remove): New function.
3766 (get_next_pcs_is_thumb): New function.
3767 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3768 (arm_sigreturn_next_pc): Likewise.
3769 (get_next_pcs_syscall_next_pc): Likewise.
3770 (arm_gdbserver_get_next_pcs): Likewise.
3771 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3773 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3774 * server.h: Include gdb_vecs.h.
3776 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3778 * Makefile.in (SFILES): Append common/common-regcache.c.
3779 (OBS): Append common-regcache.o.
3780 (common-regcache.o): New rule.
3781 * regcache.c (init_register_cache): Initialize cache to
3783 (regcache_raw_read_unsigned): New function.
3784 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3785 register_status enum.
3787 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3789 * linux-aarch64-low.c (the_low_targets): Rename
3790 breakpoint_reinsert_addr to get_next_pcs.
3791 * linux-arm-low.c (the_low_targets): Likewise.
3792 * linux-bfin-low.c (the_low_targets): Likewise.
3793 * linux-cris-low.c (the_low_targets): Likewise.
3794 * linux-crisv32-low.c (the_low_targets): Likewise.
3795 * linux-low.c (can_software_single_step): Likewise.
3796 (install_software_single_step_breakpoints): New function.
3797 (start_step_over): Use install_software_single_step_breakpoints.
3798 * linux-low.h: New CORE_ADDR vector.
3799 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3801 * linux-mips-low.c (the_low_targets): Likewise.
3802 * linux-nios2-low.c (the_low_targets): Likewise.
3803 * linux-sparc-low.c (the_low_targets): Likewise.
3805 2015-12-17 Pedro Alves <palves@redhat.com>
3807 * linux-low.c (linux_kill_one_lwp): Remove references to
3809 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3811 (linux_init_signals): Delete.
3812 (initialize_low): Adjust.
3813 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3815 2015-12-16 Pedro Alves <palves@redhat.com>
3817 * configure.ac (compiler warning flags): When testing a
3818 -Wno-foo option, check whether -Wfoo works instead.
3819 * configure: Regenerate.
3821 2015-12-11 Don Breazeal <donb@codesourcery.com>
3823 * server.c (process_serial_event): Don't exit from gdbserver
3824 in remote mode if there are still active inferiors.
3826 2015-12-11 Yao Qi <yao.qi@linaro.org>
3828 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3829 arm_breakpoint_at if the process is 32-bit.
3831 2015-12-11 Yao Qi <yao.qi@linaro.org>
3833 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3836 2015-12-07 Yao Qi <yao.qi@linaro.org>
3838 * configure.srv: Append arm.o to srv_tgtobj for
3839 aarch64*-*-linux* target.
3840 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3841 from linux-arm-low.c.
3842 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3843 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3844 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3845 (thumb2_breakpoint_len): Likewise.
3846 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3847 (arm_breakpoint_kinds): Likewise.
3848 (arm_breakpoint_kind_from_pc): Likewise.
3849 (arm_sw_breakpoint_from_kind): Likewise.
3850 (arm_breakpoint_kind_from_current_state): Likewise.
3851 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3852 (arm_sw_breakpoint_from_kind): Declare.
3853 (arm_breakpoint_kind_from_current_state): Declare.
3854 (arm_breakpoint_at): Declare.
3855 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3856 arm_sw_breakpoint_from_kind if process is 32-bit.
3857 (aarch64_breakpoint_kind_from_pc): New function.
3858 (aarch64_breakpoint_kind_from_current_state): New function.
3859 (the_low_target): Initialize fields breakpoint_kind_from_pc
3860 and breakpoint_kind_from_current_state.
3861 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3862 linux-aarch32-low.c.
3863 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3864 (arm_breakpoint, arm_breakpoint_len): Likewise.
3865 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3866 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3867 (arm_is_thumb_mode): Likewise.
3868 (arm_breakpoint_at): Likewise.
3869 (arm_breakpoint_kind_from_pc): Likewise.
3870 (arm_sw_breakpoint_from_kind): Likewise.
3871 (arm_breakpoint_kind_from_current_state): Likewise.
3874 2015-08-04 Yao Qi <yao.qi@linaro.org>
3876 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3877 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3878 * server.c (extended_protocol): Remove "static".
3879 * server.h (extended_protocol): Declare it.
3881 2015-12-04 Josh Stone <jistone@redhat.com>
3883 * target.h (struct target_ops) <arch_setup>: Rename to ...
3884 (struct target_ops) <post_create_inferior>: ... this.
3885 (target_arch_setup): Rename to ...
3886 (target_post_create_inferior): ... this, calling post_create_inferior.
3887 * server.c (start_inferior): Update target_arch_setup calls to
3888 target_post_create_inferior.
3889 * linux-low.c (linux_low_ptrace_options): Forward declare.
3890 (linux_arch_setup): Update its comment for general use.
3891 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3892 (struct linux_target_ops): Use linux_post_create_inferior.
3893 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3894 to post_create_inferior.
3895 * nto-low.c (struct nto_target_ops): Likewise.
3896 * spu-low.c (struct spu_target_ops): Likewise.
3897 * win32-low.c (struct win32_target_ops): Likewise.
3899 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3901 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3903 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3905 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3906 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3907 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3908 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3909 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3910 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3911 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3912 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3913 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3914 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3915 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3916 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3918 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3920 * linux-low.c (linux_look_up_symbols): Don't call
3921 linux_supports_traceclone.
3922 * linux-low.h (thread_db_init): Remove use_events argument.
3923 * thread-db.c (thread_db_use_event): Remove global variable.
3924 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3925 (struct thread_db) <td_create_bp>: Remove field.
3926 (thread_db_create_event): Remove function.
3927 (thread_db_enable_reporting): Likewise.
3928 (find_one_thread): Don't check for thread_db_use_events.
3929 (attach_thread): Likewise.
3930 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3931 (try_thread_db_load_1): Don't check for thread_db_use_events.
3932 (thread_db_init): Remove use_events argument and thread events
3934 (remove_thread_event_breakpoints): Remove function.
3935 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3937 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3939 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3941 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3942 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3943 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3944 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3945 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3947 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3949 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3950 * linux-low.c (can_hardware_single_step): Use
3951 supports_hardware_single_step.
3952 (can_software_single_step): New function.
3953 (start_step_over): Call can_software_single_step.
3954 (linux_supports_hardware_single_step): New function.
3955 (struct target_ops) <supports_software_single_step>: Initialize.
3956 * linux-low.h (struct linux_target_ops)
3957 <supports_hardware_single_step>: Initialize.
3958 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3959 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3960 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3961 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3962 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3963 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3964 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3965 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3966 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3967 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3969 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3970 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3972 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3973 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3974 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3976 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3977 * target.h (struct target_ops): <supports_software_single_step>:
3979 (target_supports_software_single_step): New macro.
3981 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3983 * linux-low.c (linux_wait_1): Fix pc advance condition.
3984 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3985 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3987 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3989 * linux-arm-low.c (arm_is_thumb_mode): New function.
3990 (arm_breakpoint_at): Use arm_is_thumb_mode.
3991 (arm_breakpoint_kind_from_current_state): New function.
3992 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3994 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3995 (linux_breakpoint_kind_from_current_state): New function.
3996 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3997 * linux-low.h (struct linux_target_ops)
3998 <breakpoint_kind_from_current_state>: New field.
3999 * target.h (struct target_ops): Likewise.
4000 (target_breakpoint_kind_from_current_state): New macro.
4002 2015-11-30 Pedro Alves <palves@redhat.com>
4004 * linux-low.c (linux_resume): Wake up the event loop before
4007 2015-11-30 Pedro Alves <palves@redhat.com>
4009 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4011 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4013 * target.c (struct thread_search): New structure.
4014 (thread_search_callback): New function.
4015 (prev_general_thread): New global.
4016 (prepare_to_access_memory, done_accessing_memory): New functions.
4017 * target.h (prepare_to_access_memory, done_accessing_memory):
4018 Replace macros with function declarations.
4020 2015-11-30 Pedro Alves <palves@redhat.com>
4023 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4024 report TARGET_WAITKIND_NO_RESUMED.
4025 * remote-utils.c (prepare_resume_reply): Handle
4026 TARGET_WAITKIND_NO_RESUMED.
4027 * server.c (report_no_resumed): New global.
4028 (handle_query) <qSupported>: Handle "no-resumed+". Report
4029 "no-resumed+" support.
4030 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4031 return error if the client doesn't support no-resumed events.
4032 (push_stop_notification): New function.
4033 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4034 events if the client supports them.
4036 2015-11-30 Pedro Alves <palves@redhat.com>
4038 * linux-low.c (thread_still_has_status_pending_p): Don't check
4040 (lwp_resumed): New function.
4041 (status_pending_p_callback): Return early if the LWP is not
4042 supposed to be resumed.
4044 2015-11-30 Pedro Alves <palves@redhat.com>
4046 * linux-low.c (handle_extended_wait): Assert that the LWP's
4047 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4048 thread create events, leave the new child's status pending.
4049 (linux_low_filter_event): If GDB wants to hear about thread exit
4050 events, leave the LWP marked dead and don't delete it.
4051 (linux_wait_for_event_filtered): Don't check for thread exit.
4052 (filter_exit_event): New function.
4053 (linux_wait_1): Use it, when returning an exit event.
4054 (linux_resume_one_lwp_throw): Assert that the LWP's
4055 waitstatus is TARGET_WAITKIND_IGNORE.
4056 * remote-utils.c (prepare_resume_reply): Handle
4057 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4058 * server.c (report_thread_events): New global.
4059 (handle_general_set): Handle QThreadEvents.
4060 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4061 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4062 TARGET_WAITKIND_THREAD_EXITED.
4063 * server.h (report_thread_events): Declare.
4065 2015-11-30 Pedro Alves <palves@redhat.com>
4067 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4068 the thread's last_resume_kind was resume_stop.
4070 2015-11-30 Pedro Alves <palves@redhat.com>
4072 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4075 2015-11-30 Pedro Alves <palves@redhat.com>
4077 * server.c (handle_v_requests): Handle vCtrlC.
4079 2015-11-30 Pedro Alves <palves@redhat.com>
4081 * gdbthread.h (find_any_thread_of_pid): Declare.
4082 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4084 * server.c (handle_query): If current_thread is NULL, look for
4085 another thread of the selected process.
4087 2015-11-26 Daniel Colascione <dancol@dancol.org>
4088 Simon Marchi <simon.marchi@ericsson.com>
4090 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4091 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4093 * target.h (struct target_ops) <thread_name>: New field.
4094 (target_thread_name): New macro.
4096 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4098 * regcache.h (regcache_invalidate_pid): Add declaration.
4099 * regcache.c (regcache_invalidate_pid): New function, extracted
4100 from regcache_invalidate.
4101 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4102 Add trivial documentation comment.
4103 * lynx-low.c: Use regcache_invalidate_pid instead of
4104 regcache_invalidate.
4106 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4108 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4109 and Elf64_auxv_t if the target is Android.
4111 2015-11-22 Doug Evans <xdje42@gmail.com>
4113 * target.h: #include <sys/types.h>.
4115 2015-11-19 Pedro Alves <palves@redhat.com>
4117 * linux-low.c (linux_process_qsupported): Change prototype.
4119 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4121 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4122 and adjust to loop over all features.
4123 * server.c (handle_query) <qSupported>: Adjust to call
4124 target_process_qsupported once, passing it a vector of unprocessed
4126 * target.h (struct target_ops) <process_qsupported>: Change
4128 (target_process_qsupported): Adjust.
4130 2015-11-19 Pedro Alves <palves@redhat.com>
4132 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4134 * configure: Regenerate.
4136 2015-11-19 Pedro Alves <palves@redhat.com>
4138 * configure: Regenerate.
4140 2015-11-19 Yao Qi <yao.qi@linaro.org>
4142 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4145 2015-11-19 Yao Qi <yao.qi@linaro.org>
4147 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4148 (struct aarch64_operand): Move enum out.
4150 2015-11-19 Yao Qi <yao.qi@linaro.org>
4152 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4153 struct user_fpsimd_state *.
4154 (aarch64_store_fpregset): Likewise.
4156 2015-11-19 Yao Qi <yao.qi@linaro.org>
4158 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4159 struct user_pt_regs *.
4160 (aarch64_store_gregset): Likewise.
4162 2015-11-18 Pedro Alves <palves@redhat.com>
4164 * Makefile.in (all_object_files): Add $IPA_OBJS.
4166 2015-11-17 Pedro Alves <palves@redhat.com>
4168 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4169 GDB_SIGNAL_0 and gdb_signal_to_string.
4171 2015-11-17 Pedro Alves <palves@redhat.com>
4173 * win32-low.c (handle_output_debug_string): Remove parameter.
4174 (win32_kill): Remove our_status local and adjust call to
4175 handle_output_debug_string.
4176 (get_child_debug_event): Adjust call to
4177 handle_output_debug_string.
4179 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4181 * linux-mips-low.c (mips_fill_gregset): Add cast.
4182 (mips_store_gregset): Likewise.
4183 (mips_fill_fpregset): Likewise.
4184 (mips_store_fpregset): Likewise.
4186 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4188 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4191 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4193 * linux-mips-low.c (mips_linux_new_thread): Change type of
4194 watch_type to enum target_hw_bp_type.
4196 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4198 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4199 Change return type to arm_hwbp_type.
4201 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4203 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4204 (arm_store_gregset): Likewise.
4205 * linux-arm-low.c (arm_get_hwcap): Likewise.
4206 (arm_read_description): Likewise.
4208 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4210 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4212 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4214 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4215 (ppc_fill_vsxregset): Likewise.
4216 (ppc_store_vsxregset): Likewise.
4217 (ppc_fill_vrregset): Likewise.
4218 (ppc_store_vrregset): Likewise.
4219 (ppc_fill_evrregset): Likewise.
4220 (ppc_store_evrregset): Likewise.
4222 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4224 * linux-ppc-low.c (ppc_usrregs_info): Remove
4225 forward-declaration.
4226 (ppc_arch_setup): Move lower in file.
4228 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4230 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4231 (ps_pdwrite): Likewise.
4233 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4235 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4236 to after assert checks.
4238 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4240 * proc-service.c (ps_pdread): Add/adjust casts.
4241 (ps_pdwrite): Add/adjust casts.
4243 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4245 * server.c (handle_search_memory_1): Cast return value of
4248 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4250 * server.c (write_qxfer_response): Change type of data to
4253 2015-10-29 Pedro Alves <palves@redhat.com>
4255 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4257 2015-10-29 Pedro Alves <palves@redhat.com>
4259 * tracepoint.c (clear_installed_tracepoints): Add casts.
4261 2015-10-29 Pedro Alves <palves@redhat.com>
4263 * server.c (handle_v_cont, process_serial_event): Add enum
4264 gdb_signal casts to signal parsing code.
4266 2015-10-29 Pedro Alves <palves@redhat.com>
4268 * linux-low.h (NULL_REGSET): Define.
4269 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4270 * linux-arm-low.c (arm_regsets): Likewise.
4271 * linux-crisv32-low.c (cris_regsets): Likewise.
4272 * linux-m68k-low.c (m68k_regsets): Likewise.
4273 * linux-mips-low.c (mips_regsets): Likewise.
4274 * linux-nios2-low.c (nios2_regsets): Likewise.
4275 * linux-ppc-low.c (ppc_regsets): Likewise.
4276 * linux-s390-low.c (s390_regsets): Likewise.
4277 * linux-sh-low.c (sh_regsets): Likewise.
4278 * linux-sparc-low.c (sparc_regsets): Likewise.
4279 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4280 * linux-tile-low.c (tile_regsets): Likewise.
4281 * linux-x86-low.c (x86_regsets): Likewise.
4282 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4284 2015-10-29 Pedro Alves <palves@redhat.com>
4286 * linux-low.h (NULL_REGSET): Define.
4287 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4288 * linux-arm-low.c (arm_regsets): Likewise.
4289 * linux-crisv32-low.c (cris_regsets): Likewise.
4290 * linux-m68k-low.c (m68k_regsets): Likewise.
4291 * linux-mips-low.c (mips_regsets): Likewise.
4292 * linux-nios2-low.c (nios2_regsets): Likewise.
4293 * linux-ppc-low.c (ppc_regsets): Likewise.
4294 * linux-s390-low.c (s390_regsets): Likewise.
4295 * linux-sh-low.c (sh_regsets): Likewise.
4296 * linux-sparc-low.c (sparc_regsets): Likewise.
4297 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4298 * linux-tile-low.c (tile_regsets): Likewise.
4299 * linux-x86-low.c (x86_regsets): Likewise.
4300 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4302 2015-10-26 Doug Evans <dje@google.com>
4304 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4306 2015-10-26 Doug Evans <dje@google.com>
4308 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4310 2015-10-26 Doug Evans <dje@google.com>
4312 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4314 (attach_thread, find_new_threads_callback): Ditto.
4316 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4318 * mem-break.h (set_breakpoint_data): Remove.
4320 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4322 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4323 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4324 (initialize_low): Remove set_breakpoint_data call.
4325 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4326 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4327 (initialize_low): Remove set_breakpoint_data call.
4328 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4329 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4330 (initialize_low): Remove set_breakpoint_data call.
4332 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4334 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4335 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4336 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4337 * target.h (target_breakpoint_kind_from_pc): New macro.
4339 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4341 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4342 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4343 the default breakpoint kind.
4345 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4347 * linux-arm-low.c (arm_supports_z_point_type): Add software
4350 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4352 * linux-arm-low.c: Refactor breakpoint definitions.
4353 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4354 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4356 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4358 * Makefile.in: Add arm.c/o.
4359 * configure.srv: Likewise.
4360 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4361 (arm_breakpoint_kind_from_pc): New function.
4362 (arm_sw_breakpoint_from_kind): Return proper kind.
4363 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4365 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4367 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4369 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4370 (struct raw_breakpoint) <size>: Remove.
4371 (struct raw_breakpoint) <kind>: Add.
4372 (bp_size): New function.
4373 (bp_opcode): Likewise.
4374 (find_raw_breakpoint_at): Adjust for kind.
4375 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4376 (remove_memory_breakpoint): Adjust for kind call bp_size.
4377 (set_raw_breakpoint_at): Adjust for kind.
4378 (set_breakpoint): Likewise.
4379 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4380 (delete_raw_breakpoint): Adjust for kind.
4381 (delete_breakpoint): Likewise.
4382 (find_gdb_breakpoint): Likewise.
4383 (set_gdb_breakpoint_1): Likewise.
4384 (set_gdb_breakpoint): Likewise.
4385 (delete_gdb_breakpoint_1): Likewise.
4386 (delete_gdb_breakpoint): Likewise.
4387 (uninsert_raw_breakpoint): Likewise.
4388 (reinsert_raw_breakpoint): Likewise.
4389 (set_breakpoint_data): Remove.
4390 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4391 (check_mem_read): Adjust for kind call bp_size.
4392 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4393 (clone_one_breakpoint): Adjust for kind.
4394 * mem-break.h (set_gdb_breakpoint): Likewise.
4395 (delete_gdb_breakpoint): Likewise.
4396 * server.c (process_serial_event): Likewise.
4398 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4400 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4401 (struct linux_target_ops) <breakpoint>: Remove.
4402 (struct linux_target_ops) <breakpoint_len>: Remove.
4403 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4404 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4405 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4406 (arm_sw_breakpoint_from_kind): New function.
4407 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4408 (struct linux_target_ops) <breakpoint>: Remove.
4409 (struct linux_target_ops) <breakpoint_len>: Remove.
4410 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4411 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4412 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4413 (struct linux_target_ops) <breakpoint>: Remove.
4414 (struct linux_target_ops) <breakpoint_len>: Remove.
4415 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4416 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4417 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4418 (struct linux_target_ops) <breakpoint>: Remove.
4419 (struct linux_target_ops) <breakpoint_len>: Remove.
4420 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4421 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4422 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4423 and sw_breakpoint_from_kind to increment the pc.
4424 (linux_breakpoint_kind_from_pc): New function.
4425 (linux_sw_breakpoint_from_kind): New function.
4426 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4427 (initialize_low): Call breakpoint_kind_from_pc and
4428 sw_breakpoint_from_kind to replace breakpoint_data/len.
4429 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4431 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4432 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4433 (struct linux_target_ops) <breakpoint>: Remove.
4434 (struct linux_target_ops) <breakpoint_len>: Remove.
4435 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4436 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4437 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4438 (struct linux_target_ops) <breakpoint>: Remove.
4439 (struct linux_target_ops) <breakpoint_len>: Remove.
4440 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4441 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4442 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4443 (struct linux_target_ops) <breakpoint>: Remove.
4444 (struct linux_target_ops) <breakpoint_len>: Remove.
4445 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4446 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4447 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4448 (struct linux_target_ops) <breakpoint>: Remove.
4449 (struct linux_target_ops) <breakpoint_len>: Remove.
4450 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4451 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4452 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4453 (struct linux_target_ops) <breakpoint>: Remove.
4454 (struct linux_target_ops) <breakpoint_len>: Remove.
4455 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4456 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4457 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4458 (struct linux_target_ops) <breakpoint>: Remove.
4459 (struct linux_target_ops) <breakpoint_len>: Remove.
4460 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4461 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4462 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4463 (struct linux_target_ops) <breakpoint>: Remove.
4464 (struct linux_target_ops) <breakpoint_len>: Remove.
4465 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4466 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4467 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4468 (struct linux_target_ops) <breakpoint>: Remove.
4469 (struct linux_target_ops) <breakpoint_len>: Remove.
4470 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4471 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4472 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4473 (struct linux_target_ops) <breakpoint>: Remove.
4474 (struct linux_target_ops) <breakpoint_len>: Remove.
4475 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4476 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4477 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4478 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4479 (struct linux_target_ops) <breakpoint>: Remove.
4480 (struct linux_target_ops) <breakpoint_len>: Remove.
4481 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4482 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4483 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4484 (struct linux_target_ops) <breakpoint>: Remove.
4485 (struct linux_target_ops) <breakpoint_len>: Remove.
4486 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4487 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4489 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4491 * linux-cris-low.c (cris_get_pc): Remove void arg.
4493 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4495 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4498 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4500 * inferiors.c (thread_pid_matches_callback): New function.
4501 (find_thread_process): New function.
4502 (remove_thread): Reset current_thread.
4503 (remove_process): Assert threads have been removed first.
4505 2015-10-15 Yao Qi <yao.qi@linaro.org>
4507 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4509 (aarch64_remove_point): Likewise.
4510 * regcache.c (regcache_register_size): New function.
4512 2015-10-12 Yao Qi <yao.qi@linaro.org>
4514 * linux-aarch64-low.c: Update all callers as emit_load_store
4515 is renamed to aarch64_emit_load_store.
4517 2015-10-12 Yao Qi <yao.qi@linaro.org>
4519 * linux-aarch64-low.c: Update all callers of function renaming
4520 from emit_insn to aarch64_emit_insn.
4522 2015-10-12 Yao Qi <yao.qi@linaro.org>
4524 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4525 arch/aarch64-insn.h.
4526 (struct aarch64_memory_operand): Likewise.
4528 (emit_insn): Move to arch/aarch64-insn.c.
4529 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4530 (emit_load_store): Move to arch/aarch64-insn.c.
4531 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4532 (can_encode_int32): Remove.
4534 2015-10-12 Yao Qi <yao.qi@linaro.org>
4536 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4537 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4538 (aarch64_relocate_instruction): Likewise.
4539 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4540 (struct aarch64_insn_visitor): Likewise.
4542 2015-10-12 Yao Qi <yao.qi@linaro.org>
4544 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4545 (struct aarch64_insn_visitor): New.
4546 (struct aarch64_insn_relocation_data): New.
4547 (aarch64_ftrace_insn_reloc_b): New function.
4548 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4549 (aarch64_ftrace_insn_reloc_cb): Likewise.
4550 (aarch64_ftrace_insn_reloc_tb): Likewise.
4551 (aarch64_ftrace_insn_reloc_adr): Likewise.
4552 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4553 (aarch64_ftrace_insn_reloc_others): Likewise.
4555 (aarch64_relocate_instruction): Use visitor.
4557 2015-10-12 Yao Qi <yao.qi@linaro.org>
4559 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4560 int. Add argument buf.
4561 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4562 aarch64_relocate_instruction.
4564 2015-10-12 Yao Qi <yao.qi@linaro.org>
4566 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4567 argument insn. Remove local variable insn. Don't call
4569 (aarch64_install_fast_tracepoint_jump_pad): Call
4572 2015-09-30 Yao Qi <yao.qi@linaro.org>
4574 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4575 (emit_load_store_pair): Likewise.
4577 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4579 * dll.c (match_dll): Add cast(s).
4580 (unloaded_dll): Likewise.
4581 * linux-low.c (second_thread_of_pid_p): Likewise.
4582 (delete_lwp_callback): Likewise.
4583 (count_events_callback): Likewise.
4584 (select_event_lwp_callback): Likewise.
4585 (linux_set_resume_request): Likewise.
4586 * server.c (accumulate_file_name_length): Likewise.
4587 (emit_dll_description): Likewise.
4588 (handle_qxfer_threads_worker): Likewise.
4589 (visit_actioned_threads): Likewise.
4590 * thread-db.c (any_thread_of): Likewise.
4591 * tracepoint.c (same_process_p): Likewise.
4592 (match_blocktype): Likewise.
4593 (build_traceframe_info_xml): Likewise.
4595 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4597 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4599 (gdb_unparse_agent_expr): Likewise.
4600 * hostio.c (require_data): Likewise.
4601 (handle_pread): Likewise.
4602 * linux-low.c (disable_regset): Likewise.
4603 (fetch_register): Likewise.
4604 (store_register): Likewise.
4605 (get_dynamic): Likewise.
4606 (linux_qxfer_libraries_svr4): Likewise.
4607 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4608 (set_fast_tracepoint_jump): Likewise.
4609 (uninsert_fast_tracepoint_jumps_at): Likewise.
4610 (reinsert_fast_tracepoint_jumps_at): Likewise.
4611 (validate_inserted_breakpoint): Likewise.
4612 (clone_agent_expr): Likewise.
4613 * regcache.c (init_register_cache): Likewise.
4614 * remote-utils.c (putpkt_binary_1): Likewise.
4615 (decode_M_packet): Likewise.
4616 (decode_X_packet): Likewise.
4617 (look_up_one_symbol): Likewise.
4618 (relocate_instruction): Likewise.
4619 (monitor_output): Likewise.
4620 * server.c (handle_search_memory): Likewise.
4621 (handle_qxfer_exec_file): Likewise.
4622 (handle_qxfer_libraries): Likewise.
4623 (handle_qxfer): Likewise.
4624 (handle_query): Likewise.
4625 (handle_v_cont): Likewise.
4626 (handle_v_run): Likewise.
4627 (captured_main): Likewise.
4628 * target.c (write_inferior_memory): Likewise.
4629 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4630 * tracepoint.c (init_trace_buffer): Likewise.
4631 (add_tracepoint_action): Likewise.
4632 (add_traceframe): Likewise.
4633 (add_traceframe_block): Likewise.
4634 (cmd_qtdpsrc): Likewise.
4635 (cmd_qtdv): Likewise.
4636 (cmd_qtstatus): Likewise.
4637 (response_source): Likewise.
4638 (response_tsv): Likewise.
4639 (cmd_qtnotes): Likewise.
4640 (gdb_collect): Likewise.
4641 (initialize_tracepoint): Likewise.
4643 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4645 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4646 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4647 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4649 (enum aarch64_condition_codes): New enum.
4650 (w0): New static global.
4653 (struct aarch64_memory_operand) <type>: New
4654 MEMORY_OPERAND_POSTINDEX type.
4655 (postindex_memory_operand): New helper function.
4656 (emit_ret): New function.
4657 (emit_load_store_pair): New function, factored out of emit_stp
4658 with support for MEMORY_OPERAND_POSTINDEX.
4659 (emit_stp): Rewrite using emit_load_store_pair.
4660 (emit_ldp): New function.
4661 (emit_load_store): Likewise.
4662 (emit_ldr): Mention post-index instruction in comment.
4663 (emit_ldrh): New function.
4664 (emit_ldrb): New function.
4665 (emit_ldrsw): Mention post-index instruction in comment.
4666 (emit_str): Likewise.
4667 (emit_subs): New function.
4668 (emit_cmp): Likewise.
4669 (emit_and): Likewise.
4670 (emit_orr): Likewise.
4671 (emit_orn): Likewise.
4672 (emit_eor): Likewise.
4673 (emit_mvn): Likewise.
4674 (emit_lslv): Likewise.
4675 (emit_lsrv): Likewise.
4676 (emit_asrv): Likewise.
4677 (emit_mul): Likewise.
4678 (emit_sbfm): Likewise.
4679 (emit_sbfx): Likewise.
4680 (emit_ubfm): Likewise.
4681 (emit_ubfx): Likewise.
4682 (emit_csinc): Likewise.
4683 (emit_cset): Likewise.
4684 (emit_nop): Likewise.
4685 (emit_ops_insns): New helper function.
4686 (emit_pop): Likewise.
4687 (emit_push): Likewise.
4688 (aarch64_emit_prologue): New function.
4689 (aarch64_emit_epilogue): Likewise.
4690 (aarch64_emit_add): Likewise.
4691 (aarch64_emit_sub): Likewise.
4692 (aarch64_emit_mul): Likewise.
4693 (aarch64_emit_lsh): Likewise.
4694 (aarch64_emit_rsh_signed): Likewise.
4695 (aarch64_emit_rsh_unsigned): Likewise.
4696 (aarch64_emit_ext): Likewise.
4697 (aarch64_emit_log_not): Likewise.
4698 (aarch64_emit_bit_and): Likewise.
4699 (aarch64_emit_bit_or): Likewise.
4700 (aarch64_emit_bit_xor): Likewise.
4701 (aarch64_emit_bit_not): Likewise.
4702 (aarch64_emit_equal): Likewise.
4703 (aarch64_emit_less_signed): Likewise.
4704 (aarch64_emit_less_unsigned): Likewise.
4705 (aarch64_emit_ref): Likewise.
4706 (aarch64_emit_if_goto): Likewise.
4707 (aarch64_emit_goto): Likewise.
4708 (aarch64_write_goto_address): Likewise.
4709 (aarch64_emit_const): Likewise.
4710 (aarch64_emit_call): Likewise.
4711 (aarch64_emit_reg): Likewise.
4712 (aarch64_emit_pop): Likewise.
4713 (aarch64_emit_stack_flush): Likewise.
4714 (aarch64_emit_zero_ext): Likewise.
4715 (aarch64_emit_swap): Likewise.
4716 (aarch64_emit_stack_adjust): Likewise.
4717 (aarch64_emit_int_call_1): Likewise.
4718 (aarch64_emit_void_call_2): Likewise.
4719 (aarch64_emit_eq_goto): Likewise.
4720 (aarch64_emit_ne_goto): Likewise.
4721 (aarch64_emit_lt_goto): Likewise.
4722 (aarch64_emit_le_goto): Likewise.
4723 (aarch64_emit_gt_goto): Likewise.
4724 (aarch64_emit_ge_got): Likewise.
4725 (aarch64_emit_ops_impl): New static global variable.
4726 (aarch64_emit_ops): New target function, return
4727 &aarch64_emit_ops_impl.
4728 (struct linux_target_ops): Install it.
4730 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4732 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4733 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4735 * linux-aarch64-ipa.c: New file.
4736 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4738 (aarch64_get_thread_area): New target method.
4739 (extract_signed_bitfield): New helper function.
4740 (aarch64_decode_ldr_literal): New function.
4741 (enum aarch64_opcodes): New enum.
4742 (struct aarch64_register): New struct.
4743 (struct aarch64_operand): New struct.
4744 (x0): New static global.
4753 (aarch64_register): New helper function.
4754 (register_operand): Likewise.
4755 (immediate_operand): Likewise.
4756 (struct aarch64_memory_operand): New struct.
4757 (offset_memory_operand): New helper function.
4758 (preindex_memory_operand): Likewise.
4759 (enum aarch64_system_control_registers): New enum.
4760 (ENCODE): New macro.
4761 (emit_insn): New helper function.
4762 (emit_b): New function.
4763 (emit_bcond): Likewise.
4764 (emit_cb): Likewise.
4765 (emit_tb): Likewise.
4766 (emit_blr): Likewise.
4767 (emit_stp): Likewise.
4768 (emit_ldp_q_offset): Likewise.
4769 (emit_stp_q_offset): Likewise.
4770 (emit_load_store): Likewise.
4771 (emit_ldr): Likewise.
4772 (emit_ldrsw): Likewise.
4773 (emit_str): Likewise.
4774 (emit_ldaxr): Likewise.
4775 (emit_stxr): Likewise.
4776 (emit_stlr): Likewise.
4777 (emit_data_processing_reg): Likewise.
4778 (emit_data_processing): Likewise.
4779 (emit_add): Likewise.
4780 (emit_sub): Likewise.
4781 (emit_mov): Likewise.
4782 (emit_movk): Likewise.
4783 (emit_mov_addr): Likewise.
4784 (emit_mrs): Likewise.
4785 (emit_msr): Likewise.
4786 (emit_sevl): Likewise.
4787 (emit_wfe): Likewise.
4788 (append_insns): Likewise.
4789 (can_encode_int32_in): New helper function.
4790 (aarch64_relocate_instruction): New function.
4791 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4792 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4793 (struct linux_target_ops): Install aarch64_get_thread_area,
4794 aarch64_install_fast_tracepoint_jump_pad and
4795 aarch64_get_min_fast_tracepoint_insn_len.
4797 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4799 * Makefile.in (aarch64-insn.o): New rule.
4800 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4802 2015-09-21 Yao Qi <yao.qi@linaro.org>
4804 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4806 2015-09-21 Yao Qi <yao.qi@linaro.org>
4808 * tracepoint.c (max_jump_pad_size): Remove.
4810 2015-09-18 Yao Qi <yao.qi@linaro.org>
4812 * linux-aarch64-low.c: Don't include sys/uio.h.
4813 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4815 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4817 * tracepoint.c (eval_result_type): Change prototype.
4818 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4820 2015-09-15 Pedro Alves <palves@redhat.com>
4822 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4823 Check whether to report exec events instead of checking whether
4824 multiprocess is enabled.
4826 2015-09-15 Pedro Alves <palves@redhat.com>
4829 * remote-utils.c (prepare_resume_reply): Merge
4830 TARGET_WAITKIND_VFORK_DONE switch case with the
4831 TARGET_WAITKIND_FORKED case.
4833 2015-09-15 Yao Qi <yao.qi@linaro.org>
4835 * server.c (handle_query): Check string comparison using
4836 "else if" instead of "if".
4838 2015-09-15 Yao Qi <yao.qi@linaro.org>
4840 * server.c (vCont_supported): New global variable.
4841 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4842 matches. Append ";vContSupported+" to own_buf.
4843 (handle_v_requests): Append ";s;S" to own_buf if target supports
4844 hardware single step or vCont_supported is false.
4845 (capture_main): Set vCont_supported to zero.
4847 2015-09-15 Yao Qi <yao.qi@linaro.org>
4849 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4851 (linux_supports_hardware_single_step): ... New function.
4852 (linux_target_ops): Update.
4853 * lynx-low.c (lynx_target_ops): Set field
4854 supports_hardware_single_step to target_can_do_hardware_single_step.
4855 * nto-low.c (nto_target_ops): Likewise.
4856 * spu-low.c (spu_target_ops): Likewise.
4857 * win32-low.c (win32_target_ops): Likewise.
4858 * target.c (target_can_do_hardware_single_step): New function.
4859 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4860 Remove. <supports_hardware_single_step>: New field.
4861 (target_supports_conditional_breakpoints): Remove.
4862 (target_supports_hardware_single_step): New macro.
4863 (target_can_do_hardware_single_step): Declare.
4864 * server.c (handle_query): Use target_supports_hardware_single_step
4865 instead of target_supports_conditional_breakpoints.
4867 2015-09-15 Yao Qi <yao.qi@linaro.org>
4869 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4871 (struct linux_target_ops the_low_target): Install
4872 aarch64_linux_siginfo_fixup.
4874 2015-09-11 Don Breazeal <donb@codesourcery.com>
4875 Luis Machado <lgustavo@codesourcery.com>
4877 * linux-low.c (linux_mourn): Static declaration.
4878 (linux_arch_setup): Move in front of
4879 handle_extended_wait.
4880 (linux_arch_setup_thread): New function.
4881 (handle_extended_wait): Handle exec events. Call
4882 linux_arch_setup_thread. Make event_lwp argument a
4883 pointer-to-a-pointer.
4884 (check_zombie_leaders): Do not check stopped threads.
4885 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4886 (linux_low_filter_event): Add lwp and thread for exec'ing
4887 non-leader thread if leader thread has been deleted.
4888 Refactor code into linux_arch_setup_thread and call it.
4889 Pass child lwp pointer by reference to handle_extended_wait.
4890 (linux_wait_for_event_filtered): Update comment.
4891 (linux_wait_1): Prevent clobbering exec event status.
4892 (linux_supports_exec_events): New function.
4893 (linux_target_ops) <supports_exec_events>: Initialize new member.
4894 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4896 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4897 * server.c (report_exec_events): New global variable.
4898 (handle_query): Handle qSupported query for exec-events feature.
4899 (captured_main): Initialize report_exec_events.
4900 * server.h (report_exec_events): Declare new global variable.
4901 * target.h (struct target_ops) <supports_exec_events>: New
4903 (target_supports_exec_events): New macro.
4904 * win32-low.c (win32_target_ops) <supports_exec_events>:
4905 Initialize new member.
4907 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4909 * linux-low.c (linux_low_enable_btrace): Remove.
4910 (linux_target_ops): Replace linux_low_enable_btrace with
4911 linux_enable_btrace.
4913 2015-09-03 Yao Qi <yao.qi@linaro.org>
4915 * linux-aarch64-low.c (aarch64_insert_point): Call
4916 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4919 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4921 * linux-low.c (check_stopped_by_breakpoint): Use
4922 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4924 2015-08-27 Pedro Alves <palves@redhat.com>
4926 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4928 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4930 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4931 the XNEW-family equivalent.
4932 (compile_bytecodes): Likewise.
4933 * dll.c (loaded_dll): Likewise.
4934 * event-loop.c (append_callback_event): Likewise.
4935 (create_file_handler): Likewise.
4936 (create_file_event): Likewise.
4937 * hostio.c (handle_open): Likewise.
4938 * inferiors.c (add_thread): Likewise.
4939 (add_process): Likewise.
4940 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4941 * linux-arm-low.c (arm_new_process): Likewise.
4942 (arm_new_thread): Likewise.
4943 * linux-low.c (add_to_pid_list): Likewise.
4944 (linux_add_process): Likewise.
4945 (handle_extended_wait): Likewise.
4946 (add_lwp): Likewise.
4947 (enqueue_one_deferred_signal): Likewise.
4948 (enqueue_pending_signal): Likewise.
4949 (linux_resume_one_lwp_throw): Likewise.
4950 (linux_resume_one_thread): Likewise.
4951 (linux_read_memory): Likewise.
4952 (linux_write_memory): Likewise.
4953 * linux-mips-low.c (mips_linux_new_process): Likewise.
4954 (mips_linux_new_thread): Likewise.
4955 (mips_add_watchpoint): Likewise.
4956 * linux-x86-low.c (initialize_low_arch): Likewise.
4957 * lynx-low.c (lynx_add_process): Likewise.
4958 * mem-break.c (set_raw_breakpoint_at): Likewise.
4959 (set_breakpoint): Likewise.
4960 (add_condition_to_breakpoint): Likewise.
4961 (add_commands_to_breakpoint): Likewise.
4962 (clone_agent_expr): Likewise.
4963 (clone_one_breakpoint): Likewise.
4964 * regcache.c (new_register_cache): Likewise.
4965 * remote-utils.c (look_up_one_symbol): Likewise.
4966 * server.c (queue_stop_reply): Likewise.
4967 (start_inferior): Likewise.
4968 (queue_stop_reply_callback): Likewise.
4969 (handle_target_event): Likewise.
4970 * spu-low.c (fetch_ppc_memory): Likewise.
4971 (store_ppc_memory): Likewise.
4972 * target.c (set_target_ops): Likewise.
4973 * thread-db.c (thread_db_load_search): Likewise.
4974 (try_thread_db_load_1): Likewise.
4975 * tracepoint.c (add_tracepoint): Likewise.
4976 (add_tracepoint_action): Likewise.
4977 (create_trace_state_variable): Likewise.
4978 (cmd_qtdpsrc): Likewise.
4979 (cmd_qtro): Likewise.
4980 (add_while_stepping_state): Likewise.
4981 * win32-low.c (child_add_thread): Likewise.
4982 (get_image_name): Likewise.
4984 2015-08-25 Yao Qi <yao.qi@linaro.org>
4986 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4988 2015-08-25 Yao Qi <yao.qi@linaro.org>
4990 * Makefile.in (aarch64-linux.o): New rule.
4991 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4993 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4994 (aarch64_init_debug_reg_state): Make it extern.
4995 (aarch64_linux_prepare_to_resume): Remove.
4997 2015-08-25 Yao Qi <yao.qi@linaro.org>
4999 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5000 lwp_arch_private_info and ptid_of_lwp.
5002 2015-08-25 Yao Qi <yao.qi@linaro.org>
5004 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5005 Find proc_info by find_process_pid. All callers updated.
5007 2015-08-25 Yao Qi <yao.qi@linaro.org>
5009 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5011 (debug_reg_change_callback): Remove.
5012 (aarch64_notify_debug_reg_change): Remove.
5014 2015-08-25 Yao Qi <yao.qi@linaro.org>
5016 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5017 Call current_lwp_ptid.
5019 2015-08-25 Yao Qi <yao.qi@linaro.org>
5021 * linux-aarch64-low.c (debug_reg_change_callback): Use
5024 2015-08-25 Yao Qi <yao.qi@linaro.org>
5026 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5028 2015-08-25 Yao Qi <yao.qi@linaro.org>
5030 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5032 2015-08-25 Yao Qi <yao.qi@linaro.org>
5034 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5037 2015-08-25 Yao Qi <yao.qi@linaro.org>
5039 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5041 (debug_reg_change_callback): Remove argument entry and add argument
5042 lwp. Remove local variable thread. Don't print thread id in the
5043 debugging output. Don't check whether pid of thread equals to pid.
5044 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5045 iterate_over_lwps instead find_inferior.
5047 2015-08-24 Pedro Alves <palves@redhat.com>
5049 * inferiors.c (get_first_process): New function.
5050 * inferiors.h (get_first_process): New declaration.
5051 * remote-utils.c (read_ptid): Default to the first process in the
5052 list, instead of to the current thread's process.
5054 2015-08-24 Pedro Alves <palves@redhat.com>
5056 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5057 * event-loop.c: Likewise.
5058 * remote-utils.c: Likewise.
5059 * tracepoint.c: Likewise.
5061 2015-08-24 Pedro Alves <palves@redhat.com>
5063 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5066 2015-08-21 Pedro Alves <palves@redhat.com>
5068 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5069 instead of literal 1.
5071 2015-08-21 Pedro Alves <palves@redhat.com>
5073 * tdesc.c (default_description): Explicitly zero-initialize.
5075 2015-08-21 Pedro Alves <palves@redhat.com>
5078 * inferiors.c (remove_thread): Discard any pending stop reply for
5080 * server.c (remove_all_on_match_pid): Rename to ...
5081 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5083 (discard_queued_stop_replies): Change parameter to a ptid. Now
5085 (handle_v_kill, kill_inferior_callback, captured_main)
5086 (process_serial_event): Adjust.
5087 * server.h (discard_queued_stop_replies): Declare.
5089 2015-08-21 Pedro Alves <palves@redhat.com>
5091 * linux-low.c (wait_for_sigstop): Always switch to no thread
5092 selected if the previously current thread dies.
5093 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5094 process instead of the current thread's.
5095 * remote-utils.c (input_interrupt): Don't check if there's no
5097 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5098 current thread to the general thread fails, error out.
5099 (handle_qxfer_auxv, handle_qxfer_libraries)
5100 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5101 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5102 (handle_query): Check if there's a thread selected instead of
5103 checking whether there's any thread in the thread list.
5104 (handle_qxfer_threads, handle_qxfer_btrace)
5105 (handle_qxfer_btrace_conf): Don't error out early if there's no
5106 thread in the thread list.
5107 (handle_v_cont, myresume): Don't set the current thread to the
5109 (process_serial_event) <Hg handling>: Also set thread_id if the
5110 previous general thread is still alive.
5111 (process_serial_event) <g/G handling>: If setting the current
5112 thread to the general thread fails, error out.
5113 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5114 thread's lwp instead of the current thread's.
5115 * target.c (set_desired_thread): If the desired thread was not
5116 found, leave the current thread pointing to NULL. Return an int
5117 (boolean) indicating success.
5118 * target.h (set_desired_thread): Change return type to int.
5120 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5122 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5123 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5125 (ps_get_thread_area): New function.
5127 2015-08-19 Gary Benson <gbenson@redhat.com>
5129 * hostio.c (handle_pread): Do not attempt to read more data
5130 than hostio_reply_with_data can fit in a packet.
5132 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5134 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5136 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5138 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5140 2015-08-06 Pedro Alves <palves@redhat.com>
5142 * tracepoint.c (expr_eval_result): Now an int.
5144 2015-08-06 Pedro Alves <palves@redhat.com>
5146 * gdbthread.h (struct regcache): Forward declare.
5147 (struct thread_info) <regcache_data>: Now a struct regcache
5149 * inferiors.c (inferior_regcache_data)
5150 (set_inferior_regcache_data): Now work with struct regcache
5152 * inferiors.h (struct regcache): Forward declare.
5153 (inferior_regcache_data, set_inferior_regcache_data): Now work
5154 with struct regcache pointers.
5155 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5156 (free_register_cache_thread): Remove struct regcache pointer
5159 2015-08-06 Pedro Alves <palves@redhat.com>
5161 * server.c (captured_main): On error, print the exception message
5162 to stderr, and if run_once is set, throw a quit.
5164 2015-08-06 Pedro Alves <palves@redhat.com>
5166 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5169 2015-08-06 Pedro Alves <palves@redhat.com>
5171 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5172 reading beyond the passed in buffer length.
5174 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5176 * tracepoint.c (symbol_list) <required>: Remove.
5178 2015-08-06 Pedro Alves <palves@redhat.com>
5180 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5181 count if stopping and suspending threads.
5182 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5183 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5184 (linux_detach): Complete an ongoing step-over.
5185 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5187 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5188 (linux_wait_1): If passing a signal to the inferior after
5189 finishing a step-over, unsuspend and re-resume all lwps. If we
5190 see a single-step event but the thread should be continuing, don't
5191 pass the trap to gdb.
5192 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5193 internal_error instead of gdb_assert.
5194 (enqueue_pending_signal): New function.
5195 (check_ptrace_stopped_lwp_gone): Add debug output.
5196 (start_step_over): Use internal_error instead of gdb_assert.
5197 (complete_ongoing_step_over): New function.
5198 (linux_resume_one_thread): Don't resume a suspended thread.
5199 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5202 2015-08-06 Pedro Alves <palves@redhat.com>
5204 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5205 (linux_thread_alive): Use lwp_is_marked_dead.
5206 (extended_event_reported): Delete.
5207 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5208 instead of extended_event_reported.
5209 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5211 (lwp_is_marked_dead): New function.
5212 (lwp_running): Use lwp_is_marked_dead.
5213 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5216 2015-08-06 Pedro Alves <palves@redhat.com>
5218 * linux-low.c (linux_wait_1): Move fork event output out of the
5219 !report_to_gdb check. Pass event_child->waitstatus to
5220 target_waitstatus_to_string instead of ourstatus.
5222 2015-08-04 Yao Qi <yao.qi@linaro.org>
5224 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5225 if current_thread is 32 bit.
5227 2015-08-04 Yao Qi <yao.qi@linaro.org>
5229 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5230 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5231 * server.c (extended_protocol): Remove "static".
5232 * server.h (extended_protocol): Declare it.
5234 2015-08-04 Yao Qi <yao.qi@linaro.org>
5236 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5237 both aarch64 and aarch32.
5238 (aarch64_set_pc): Likewise.
5240 2015-08-04 Yao Qi <yao.qi@linaro.org>
5242 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5243 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5244 arm-with-neon.xml to srv_xmlfiles.
5245 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5246 (is_64bit_tdesc): New function.
5247 (aarch64_linux_read_description): New function.
5248 (aarch64_arch_setup): Call aarch64_linux_read_description.
5249 (regs_info): Rename to regs_info_aarch64.
5250 (aarch64_regs_info): Return right regs_info.
5251 (initialize_low_arch): Call initialize_low_arch_aarch32.
5253 2015-08-04 Yao Qi <yao.qi@linaro.org>
5255 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5256 * linux-aarch32-low.c: New file.
5257 * linux-aarch32-low.h: New file.
5258 * linux-arm-low.c (arm_fill_gregset): Move it to
5259 linux-aarch32-low.c.
5260 (arm_store_gregset): Likewise.
5261 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5262 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5263 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5264 (regs_info): Rename to regs_info_arm.
5265 (arm_regs_info): Return regs_info_aarch32 if
5266 have_ptrace_getregset is 1 and target description is
5267 arm_with_neon or arm_with_vfpv3.
5268 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5269 Call initialize_low_arch_aarch32 instead.
5271 2015-08-04 Yao Qi <yao.qi@linaro.org>
5273 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5274 * linux-low.c: ... here.
5275 * linux-low.h (have_ptrace_getregset): Declare it.
5277 2015-08-04 Pedro Alves <palves@redhat.com>
5279 * thread-db.c (struct thread_db): Use new typedefs.
5280 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5282 (disable_thread_event_reporting): Cast result of dlsym to
5283 destination function pointer type.
5284 (thread_db_mourn): Use td_ta_delete_ftype.
5286 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5288 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5290 (CDX_BREAKPOINT): Define for R2.
5291 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5292 (the_low_target): Add comments.
5294 2015-07-30 Yao Qi <yao.qi@linaro.org>
5296 * linux-arm-low.c (arm_hwcap): Remove it.
5297 (arm_read_description): New local variable arm_hwcap. Don't
5298 set arm_hwcap to zero.
5300 2015-07-30 Yao Qi <yao.qi@linaro.org>
5302 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5303 Use regcache->tdesc instead.
5304 (arm_store_wmmxregset): Likewise.
5305 (arm_fill_vfpregset): Likewise.
5306 (arm_store_vfpregset): Likewise.
5308 2015-07-30 Yao Qi <yao.qi@linaro.org>
5310 * linux-arm-low.c: Include arch/arm.h.
5311 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5312 (arm_store_gregset): Likewise.
5314 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5316 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5317 ptrace's 4th parameter.
5319 2015-07-27 Yao Qi <yao.qi@linaro.org>
5321 * configure.srv (case aarch64*-*-linux*): Don't set
5324 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5326 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5328 * linux-arm-low.c: Likewise.
5329 * linux-cris-low.c: Likewise.
5330 * linux-crisv32-low.c: Likewise.
5331 * linux-low.c: Likewise.
5332 * linux-m68k-low.c: Likewise.
5333 * linux-mips-low.c: Likewise.
5334 * linux-nios2-low.c: Likewise.
5335 * linux-s390-low.c: Likewise.
5336 * linux-sparc-low.c: Likewise.
5337 * linux-tic6x-low.c: Likewise.
5338 * linux-tile-low.c: Likewise.
5339 * linux-x86-low.c: Likewise.
5341 2015-07-24 Pedro Alves <palves@redhat.com>
5343 * config.in: Regenerate.
5344 * configure: Regenerate.
5346 2015-07-24 Pedro Alves <palves@redhat.com>
5348 * acinclude.m4: Include ../ptrace.m4.
5349 * configure.ac: Call GDB_AC_PTRACE.
5350 * config.in, configure: Regenerate.
5352 2015-07-24 Yao Qi <yao.qi@linaro.org>
5354 * linux-low.c (linux_create_inferior): Remove setting to
5355 proc->priv->new_inferior.
5356 (linux_attach): Likewise.
5357 (linux_low_filter_event): Likewise.
5358 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5360 2015-07-24 Yao Qi <yao.qi@linaro.org>
5362 * linux-low.c (linux_arch_setup): New function.
5363 (linux_low_filter_event): If proc->tdesc is NULL and
5364 proc->attached is true, call the_low_target.arch_setup.
5365 Otherwise, keep status pending, and return.
5366 (linux_resume_one_lwp_throw): Don't call get_pc if
5367 thread->while_stepping isn't NULL. Don't call
5368 get_thread_regcache if proc->tdesc is NULL.
5369 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5370 (linux_target_ops): Install arch_setup.
5371 * server.c (start_inferior): Call the_target->arch_setup.
5372 * target.h (struct target_ops) <arch_setup>: New field.
5373 (target_arch_setup): New marco.
5374 * lynx-low.c (lynx_target_ops): Update.
5375 * nto-low.c (nto_target_ops): Update.
5376 * spu-low.c (spu_target_ops): Update.
5377 * win32-low.c (win32_target_ops): Update.
5379 2015-07-24 Yao Qi <yao.qi@linaro.org>
5381 * linux-low.c (linux_add_process): Don't set
5382 proc->priv->new_inferior.
5383 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5384 (linux_attach): Likewise.
5386 2015-07-24 Yao Qi <yao.qi@linaro.org>
5388 * server.c (start_inferior): Code refactor.
5390 2015-07-24 Yao Qi <yao.qi@linaro.org>
5392 * server.c (process_serial_event): Set general_thread.
5394 2015-07-21 Yao Qi <yao.qi@linaro.org>
5396 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5397 aarch64_linux_get_debug_reg_capacity.
5399 2015-07-17 Yao Qi <yao.qi@linaro.org>
5401 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5402 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5403 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5404 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5405 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5406 (AARCH64_HWP_ALIGNMENT): Likewise.
5407 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5408 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5409 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5410 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5411 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5412 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5413 (struct aarch64_debug_reg_state): Likewise.
5414 (struct arch_lwp_info): Likewise.
5415 (aarch64_align_watchpoint): Likewise.
5416 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5417 (aarch64_watchpoint_length): Likewise.
5418 (aarch64_point_encode_ctrl_reg): Likewise
5419 (aarch64_point_is_aligned): Likewise.
5420 (aarch64_align_watchpoint): Likewise.
5421 (aarch64_linux_set_debug_regs):
5422 (aarch64_dr_state_insert_one_point): Likewise.
5423 (aarch64_dr_state_remove_one_point): Likewise.
5424 (aarch64_handle_breakpoint): Likewise.
5425 (aarch64_handle_aligned_watchpoint): Likewise.
5426 (aarch64_handle_unaligned_watchpoint): Likewise.
5427 (aarch64_handle_watchpoint): Likewise.
5429 2015-07-17 Yao Qi <yao.qi@linaro.org>
5431 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5432 and don't aarch64_get_debug_reg_state. All callers update.
5433 (aarch64_handle_aligned_watchpoint): Likewise.
5434 (aarch64_handle_unaligned_watchpoint): Likewise.
5435 (aarch64_handle_watchpoint): Likewise.
5436 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5437 (aarch64_remove_point): Likewise.
5439 2015-07-17 Yao Qi <yao.qi@linaro.org>
5441 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5443 (aarch64_handle_unaligned_watchpoint): Likewise.
5445 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5447 Revert the previous 3 commits:
5448 Move gdb_regex* to common/
5449 Move linux_find_memory_regions_full & co.
5450 gdbserver build-id attribute generator
5452 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5453 Jan Kratochvil <jan.kratochvil@redhat.com>
5455 gdbserver build-id attribute generator.
5456 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5457 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5458 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5460 (get_dynamic): Use find_pdhr to traverse program headers.
5461 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5462 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5463 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5464 (get_hex_build_id): New.
5465 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5466 to reply XML document.
5468 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5469 Jan Kratochvil <jan.kratochvil@redhat.com>
5471 * target.c: Include target/target-utils.h and fcntl.h.
5472 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5473 (target_fileio_read_stralloc): New functions.
5475 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5477 * Makefile.in (OBS): Add gdb_regex.o.
5479 * config.in: Rebuilt.
5480 * configure: Rebuilt.
5482 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5483 Jan Kratochvil <jan.kratochvil@redhat.com>
5485 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5486 * Makefile.in (OBS): Add target-utils.o.
5487 (linux-maps.o, target-utils.o): New.
5488 * configure.srv (srv_linux_obj): Add linux-maps.o.
5490 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5492 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5494 (the_low_target): Install it.
5496 2015-07-14 Pedro Alves <palves@redhat.com>
5498 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5499 Instead, ignore ECHILD, and throw an error for other errnos.
5501 2015-07-10 Pedro Alves <palves@redhat.com>
5503 * event-loop.c (struct callback_event) <data>: Change type to
5504 gdb_client_data instance instead of gdb_client_data pointer.
5505 (append_callback_event): Adjust.
5507 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5509 * linux-aarch64-low.c: Add comments for each linux_target_ops
5510 method. Remove comments already covered in target_ops and
5511 linux_target_ops definitions.
5512 (the_low_target): Add comments for each unimplemented method.
5514 2015-07-09 Yao Qi <yao.qi@linaro.org>
5516 * linux-aarch64-low.c (aarch64_regmap): Remove.
5517 (aarch64_usrregs_info): Remove.
5518 (regs_info): Set field usrregs to NULL.
5520 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5522 * linux-low.c: Include "rsp-low.h"
5523 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5524 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5525 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5526 (handle_btrace_enable_pt): New.
5527 (handle_btrace_general_set): Support "pt".
5528 (handle_btrace_conf_general_set): Support "pt:size".
5530 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5532 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5535 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5537 * linux-aarch64-low.c: Remove comment about endianness.
5538 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5539 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5542 2015-06-24 Gary Benson <gbenson@redhat.com>
5544 * linux-i386-ipa.c (stdint.h): Do not include.
5545 * lynx-i386-low.c (stdint.h): Likewise.
5546 * lynx-ppc-low.c (stdint.h): Likewise.
5547 * mem-break.c (stdint.h): Likewise.
5548 * thread-db.c (stdint.h): Likewise.
5549 * tracepoint.c (stdint.h): Likewise.
5550 * win32-low.c (stdint.h): Likewise.
5552 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5554 * server.c (write_qxfer_response): Update call to
5555 remote_escape_output.
5557 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5558 Jan Kratochvil <jan.kratochvil@redhat.com>
5560 Merge multiple hex conversions.
5561 * gdbreplay.c (tohex): Rename to 'fromhex'.
5562 (logchar): Use fromhex.
5564 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5566 * server.c (handle_qxfer_libraries): Set `version' attribute for
5569 2015-06-10 Gary Benson <gbenson@redhat.com>
5571 * target.h (struct target_ops) <multifs_open>: New field.
5572 <multifs_unlink>: Likewise.
5573 <multifs_readlink>: Likewise.
5574 * linux-low.c (nat/linux-namespaces.h): New include.
5575 (linux_target_ops): Initialize the_target->multifs_open,
5576 the_target->multifs_unlink and the_target->multifs_readlink.
5577 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5578 * hostio.c (hostio_fs_pid): New static variable.
5579 (hostio_handle_new_gdb_connection): New function.
5580 (handle_setfs): Likewise.
5581 (handle_open): Use the_target->multifs_open as appropriate.
5582 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5583 (handle_readlink): Use the_target->multifs_readlink as
5585 (handle_vFile): Handle vFile:setfs packets.
5586 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5587 after target_handle_new_gdb_connection.
5589 2015-06-10 Gary Benson <gbenson@redhat.com>
5591 * configure.ac (AC_CHECK_FUNCS): Add setns.
5592 * config.in: Regenerate.
5593 * configure: Likewise.
5594 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5595 (linux-namespaces.o): New rule.
5596 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5598 2015-06-09 Gary Benson <gbenson@redhat.com>
5600 * hostio.c (handle_open): Process mode argument with
5601 fileio_to_host_mode.
5603 2015-06-01 Yao Qi <yao.qi@linaro.org>
5605 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5606 * linux-x86-low.c: Likewise.
5608 2015-05-28 Don Breazeal <donb@codesourcery.com>
5610 * linux-low.c (handle_extended_wait): Initialize
5611 thread_info.last_resume_kind for new fork children.
5613 2015-05-15 Pedro Alves <palves@redhat.com>
5615 * target.h (target_handle_new_gdb_connection): Rewrite using if
5616 wrapped in do/while.
5618 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5620 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5621 * configure, config.in: Regenerate.
5622 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5625 2015-05-12 Don Breazeal <donb@codesourcery.com>
5627 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5628 PTRACE_EVENT_VFORK_DONE.
5629 (linux_low_ptrace_options, extended_event_reported): Add vfork
5631 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5632 and "vforkdone" for RSP 'T' Stop Reply Packet.
5633 * server.h (report_vfork_events): Declare
5636 2015-05-12 Don Breazeal <donb@codesourcery.com>
5638 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5639 (the_low_target) <new_fork>: Initialize new member.
5640 * linux-arm-low.c (arm_new_fork): New function.
5641 (the_low_target) <new_fork>: Initialize new member.
5642 * linux-low.c (handle_extended_wait): Call new target function
5644 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5645 * linux-mips-low.c (mips_add_watchpoint): New function
5646 extracted from mips_insert_point.
5647 (the_low_target) <new_fork>: Initialize new member.
5648 (mips_linux_new_fork): New function.
5649 (mips_insert_point): Call mips_add_watchpoint.
5650 * linux-x86-low.c (x86_linux_new_fork): New function.
5651 (the_low_target) <new_fork>: Initialize new member.
5653 2015-05-12 Don Breazeal <donb@codesourcery.com>
5655 * linux-low.c (handle_extended_wait): Implement return value,
5656 rename argument 'event_child' to 'event_lwp', handle
5657 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5658 (linux_low_ptrace_options): New function.
5659 (linux_low_filter_event): Call linux_low_ptrace_options,
5660 use different argument fo linux_enable_event_reporting,
5661 use return value from handle_extended_wait.
5662 (extended_event_reported): New function.
5663 (linux_wait_1): Call extended_event_reported and set
5664 status to report fork events.
5665 (linux_write_memory): Add pid to debug message.
5666 (reset_lwp_ptrace_options_callback): New function.
5667 (linux_handle_new_gdb_connection): New function.
5668 (linux_target_ops): Initialize new structure member.
5669 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5670 * lynx-low.c: Initialize new structure member.
5671 * remote-utils.c (prepare_resume_reply): Implement stop reason
5672 "fork" for "T" stop message.
5673 * server.c (handle_query): Call handle_new_gdb_connection.
5674 * server.h (report_fork_events): Declare global flag.
5675 * target.h (struct target_ops) <handle_new_gdb_connection>:
5677 (target_handle_new_gdb_connection): New macro.
5678 * win32-low.c: Initialize new structure member.
5680 2015-05-12 Don Breazeal <donb@codesourcery.com>
5682 * mem-break.c (APPEND_TO_LIST): Define macro.
5683 (clone_agent_expr): New function.
5684 (clone_one_breakpoint): New function.
5685 (clone_all_breakpoints): New function.
5686 * mem-break.h: Declare new functions.
5688 2015-05-12 Don Breazeal <donb@codesourcery.com>
5690 * linux-low.c (linux_supports_fork_events): New function.
5691 (linux_supports_vfork_events): New function.
5692 (linux_target_ops): Initialize new structure members.
5693 (initialize_low): Call linux_check_ptrace_features.
5694 * lynx-low.c (lynx_target_ops): Initialize new structure
5696 * server.c (report_fork_events, report_vfork_events):
5698 (handle_query): Add new features to qSupported packet and
5700 (captured_main): Initialize new global variables.
5701 * target.h (struct target_ops) <supports_fork_events>:
5703 <supports_vfork_events>: New member.
5704 (target_supports_fork_events): New macro.
5705 (target_supports_vfork_events): New macro.
5706 * win32-low.c (win32_target_ops): Initialize new structure
5709 2015-05-12 Gary Benson <gbenson@redhat.com>
5711 * server.c (handle_qxfer_exec_file): Use current process
5714 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5716 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5717 Remove HAVE_PTRACE_GETREGS conditionals.
5718 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5719 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5721 2015-05-08 Yao Qi <yao.qi@linaro.org>
5723 * linux-low.c (linux_supports_conditional_breakpoints): New
5725 (linux_target_ops): Install new target method.
5726 * lynx-low.c (lynx_target_ops): Install NULL hook for
5727 supports_conditional_breakpoints.
5728 * nto-low.c (nto_target_ops): Likewise.
5729 * spu-low.c (spu_target_ops): Likewise.
5730 * win32-low.c (win32_target_ops): Likewise.
5731 * server.c (handle_query): Check
5732 target_supports_conditional_breakpoints.
5733 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5735 (target_supports_conditional_breakpoints): New macro.
5737 2015-05-06 Pedro Alves <palves@redhat.com>
5740 * server.c (start_inferior): If the process exits, mourn it.
5742 2015-04-21 Gary Benson <gbenson@redhat.com>
5744 * hostio.c (fileio_open_flags_to_host): Factored out to
5745 fileio_to_host_openflags in common/fileio.c. Single use
5748 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5750 * linux-xtensa-low.c (xtensa_fill_gregset)
5751 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5754 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5756 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5757 (regs_info): Replace usrregs pointer with NULL.
5759 2015-04-17 Gary Benson <gbenson@redhat.com>
5761 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5762 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5763 * server.c (handle_qxfer_exec_file): New function.
5764 (qxfer_packets): Add exec-file entry.
5765 (handle_query): Report qXfer:exec-file:read as supported packet.
5767 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5769 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5771 2015-04-09 Gary Benson <gbenson@redhat.com>
5773 * hostio-errno.c (errno_to_fileio_error): Remove function.
5774 Update caller to use remote_fileio_to_fio_error.
5776 2015-04-09 Yao Qi <yao.qi@linaro.org>
5778 * linux-low.c (linux_insert_point): Call
5779 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5780 (linux_remove_point): Call remove_memory_breakpoint if type is
5782 * linux-x86-low.c (x86_insert_point): Don't call
5783 insert_memory_breakpoint.
5784 (x86_remove_point): Don't call remove_memory_breakpoint.
5786 2015-04-01 Pedro Alves <palves@redhat.com>
5787 Cleber Rosa <crosa@redhat.com>
5789 * server.c (gdbserver_usage): Reorganize and extend the usage
5792 2015-03-24 Pedro Alves <palves@redhat.com>
5794 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5795 output. Also dump TRAP_TRACE.
5796 (linux_low_filter_event): In debug output, distinguish a
5797 resume_stop SIGSTOP from a delayed SIGSTOP.
5799 2015-03-24 Gary Benson <gbenson@redhat.com>
5801 * linux-x86-low.c (x86_linux_new_thread): Moved to
5803 (x86_linux_prepare_to_resume): Likewise.
5805 2015-03-24 Gary Benson <gbenson@redhat.com>
5807 * Makefile.in (x86-linux-dregs.o): New rule.
5808 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5809 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5810 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5811 (x86_linux_dr_get): Likewise.
5812 (x86_linux_dr_set): Likewise.
5813 (update_debug_registers_callback): Likewise.
5814 (x86_linux_dr_set_addr): Likewise.
5815 (x86_linux_dr_get_addr): Likewise.
5816 (x86_linux_dr_set_control): Likewise.
5817 (x86_linux_dr_get_control): Likewise.
5818 (x86_linux_dr_get_status): Likewise.
5819 (x86_linux_update_debug_registers): Likewise.
5821 2015-03-24 Gary Benson <gbenson@redhat.com>
5823 * linux-x86-low.c (x86_linux_update_debug_registers):
5824 New function, factored out from...
5825 (x86_linux_prepare_to_resume): ...this.
5827 2015-03-24 Gary Benson <gbenson@redhat.com>
5829 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5830 (x86_linux_dr_set): Likewise.
5831 (update_debug_registers_callback): Likewise.
5832 (x86_linux_dr_set_addr): Likewise.
5833 (x86_linux_dr_get_addr): Likewise.
5834 (x86_linux_dr_set_control): Likewise.
5835 (x86_linux_dr_get_control): Likewise.
5836 (x86_linux_dr_get_status): Likewise.
5837 (x86_linux_prepare_to_resume): Likewise.
5839 2015-03-24 Gary Benson <gbenson@redhat.com>
5841 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5842 Use perror_with_name. Pass string through gettext.
5843 (x86_linux_dr_set): Likewise.
5845 2015-03-24 Gary Benson <gbenson@redhat.com>
5847 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5848 (x86_linux_dr_set_addr): ...this.
5849 (x86_dr_low_get_addr): Rename to...
5850 (x86_linux_dr_get_addr): ...this.
5851 (x86_dr_low_set_control): Rename to...
5852 (x86_linux_dr_set_control): ...this.
5853 (x86_dr_low_get_control): Rename to...
5854 (x86_linux_dr_get_control): ...this.
5855 (x86_dr_low_get_status): Rename to...
5856 (x86_linux_dr_get_status): ...this.
5857 (x86_dr_low): Update with new function names.
5859 2015-03-24 Gary Benson <gbenson@redhat.com>
5861 * Makefile.in (x86-linux.o): New rule.
5862 * configure.srv: Add x86-linux.o to relevant targets.
5863 * linux-low.c (lwp_set_arch_private_info): New function.
5864 (lwp_arch_private_info): Likewise.
5865 * linux-x86-low.c: Include nat/x86-linux.h.
5866 (arch_lwp_info): Removed structure.
5867 (update_debug_registers_callback):
5868 Use lwp_set_debug_registers_changed.
5869 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5870 and lwp_set_debug_registers_changed.
5871 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5873 2015-03-24 Gary Benson <gbenson@redhat.com>
5875 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5876 * linux-arm-low.c (arm_new_thread): Likewise.
5877 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5878 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5879 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5880 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5882 2015-03-24 Gary Benson <gbenson@redhat.com>
5884 * linux-low.c (ptid_of_lwp): New function.
5885 (lwp_is_stopped): Likewise.
5886 (lwp_stop_reason): Likewise.
5887 * linux-x86-low.c (update_debug_registers_callback):
5889 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5892 2015-03-24 Gary Benson <gbenson@redhat.com>
5894 * linux-low.h (linux_stop_lwp): Remove declaration.
5896 2015-03-24 Gary Benson <gbenson@redhat.com>
5898 * linux-low.h: Include nat/linux-nat.h.
5899 * linux-low.c (iterate_over_lwps_args): New structure.
5900 (iterate_over_lwps_filter): New function.
5901 (iterate_over_lwps): Likewise.
5902 * linux-x86-low.c (update_debug_registers_callback):
5903 Update signature to what iterate_over_lwps expects.
5904 Remove PID check that iterate_over_lwps now performs.
5905 (x86_dr_low_set_addr): Use iterate_over_lwps.
5906 (x86_dr_low_set_control): Likewise.
5908 2015-03-24 Gary Benson <gbenson@redhat.com>
5910 * linux-x86-low.c (x86_debug_reg_state): New function.
5911 (x86_linux_prepare_to_resume): Use the above.
5913 2015-03-24 Gary Benson <gbenson@redhat.com>
5915 * linux-low.c (current_lwp_ptid): New function.
5916 * linux-x86-low.c: Include nat/linux-nat.h.
5917 (x86_dr_low_get_addr): Use current_lwp_ptid.
5918 (x86_dr_low_get_control): Likewise.
5919 (x86_dr_low_get_status): Likewise.
5921 2015-03-20 Pedro Alves <palves@redhat.com>
5923 * tracepoint.c (cmd_qtstatus): Make "str" const.
5925 2015-03-20 Pedro Alves <palves@redhat.com>
5927 * server.c (handle_general_set): Make "req_str" const.
5929 2015-03-19 Pedro Alves <palves@redhat.com>
5931 * linux-low.c (linux_resume_one_lwp): Rename to ...
5932 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5933 instead call perror_with_name.
5934 (check_ptrace_stopped_lwp_gone): New function.
5935 (linux_resume_one_lwp): Reimplement as wrapper around
5936 linux_resume_one_lwp_throw that swallows errors if the LWP is
5939 2015-03-19 Pedro Alves <palves@redhat.com>
5941 * linux-low.c (count_events_callback, select_event_lwp_callback):
5942 No longer check whether the thread has resume_stop as last resume
5945 2015-03-19 Pedro Alves <palves@redhat.com>
5947 * linux-low.c (count_events_callback, select_event_lwp_callback):
5948 Use the lwp's status_pending_p field, not the thread's.
5950 2015-03-19 Pedro Alves <palves@redhat.com>
5952 * linux-low.c (select_event_lwp_callback): Update comments to
5953 no longer mention SIGTRAP.
5955 2015-03-18 Gary Benson <gbenson@redhat.com>
5957 * server.c (handle_query): Do not report vFile:fstat as supported.
5959 2015-03-11 Gary Benson <gbenson@redhat.com>
5961 * hostio.c (sys/types.h): New include.
5962 (sys/stat.h): Likewise.
5963 (common-remote-fileio.h): Likewise.
5964 (handle_fstat): New function.
5965 (handle_vFile): Handle vFile:fstat packets.
5967 2015-03-11 Gary Benson <gbenson@redhat.com>
5969 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5970 struct stat.st_blocks and struct stat.st_blksize.
5971 * configure: Regenerate.
5972 * config.in: Likewise.
5973 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5974 (OBS): Add common-remote-fileio.o.
5975 (common-remote-fileio.o): New rule.
5977 2015-03-09 Pedro Alves <palves@redhat.com>
5979 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5980 'struct sockaddr' pointer in 'accept' call.
5982 2015-03-09 Pedro Alves <palves@redhat.com>
5985 2015-03-07 Pedro Alves <palves@redhat.com>
5986 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5987 or <winsock2.h> here. Instead include "gdb_socket.h".
5988 (remote_open): Use union gdb_sockaddr_u.
5989 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5990 or <winsock2.h> here. Instead include "gdb_socket.h".
5991 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5992 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5994 (init_named_socket, gdb_agent_helper_thread): Use union
5997 2015-03-07 Pedro Alves <palves@redhat.com>
5999 * configure.ac (build_warnings): Move
6000 -Wdeclaration-after-statement to the C-specific set.
6001 * configure: Regenerate.
6003 2015-03-07 Pedro Alves <palves@redhat.com>
6005 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6006 or <winsock2.h> here. Instead include "gdb_socket.h".
6007 (remote_open): Use union gdb_sockaddr_u.
6008 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6009 or <winsock2.h> here. Instead include "gdb_socket.h".
6010 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6011 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6013 (init_named_socket, gdb_agent_helper_thread): Use union
6016 2015-03-07 Pedro Alves <palves@redhat.com>
6018 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6021 2015-03-06 Yao Qi <yao.qi@linaro.org>
6023 * linux-aarch64-low.c (aarch64_insert_point): Use
6024 show_debug_regs as a boolean.
6025 (aarch64_remove_point): Likewise.
6027 2015-03-05 Pedro Alves <palves@redhat.com>
6029 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6030 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6031 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6032 * nto-low.c (nto_target_ops): Likewise.
6033 * spu-low.c (spu_target_ops): Likewise.
6034 * win32-low.c (win32_target_ops): Likewise.
6036 2015-03-04 Pedro Alves <palves@redhat.com>
6038 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6039 Decide whether a breakpoint triggered based on the SIGTRAP's
6041 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6042 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6043 (linux_low_filter_event): Check for breakpoints before checking
6045 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6047 (linux_stopped_by_sw_breakpoint)
6048 (linux_supports_stopped_by_sw_breakpoint)
6049 (linux_stopped_by_hw_breakpoint)
6050 (linux_supports_stopped_by_hw_breakpoint): New functions.
6051 (linux_target_ops): Install new target methods.
6053 2015-03-04 Pedro Alves <palves@redhat.com>
6055 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6056 * server.c (swbreak_feature, hwbreak_feature): New globals.
6057 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6058 (captured_main): Clear swbreak_feature and hwbreak_feature.
6059 * server.h (swbreak_feature, hwbreak_feature): Declare.
6060 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6061 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6062 supports_stopped_by_hw_breakpoint>: New fields.
6063 (target_supports_stopped_by_sw_breakpoint)
6064 (target_stopped_by_sw_breakpoint)
6065 (target_supports_stopped_by_hw_breakpoint)
6066 (target_stopped_by_hw_breakpoint): Declare.
6068 2015-03-04 Pedro Alves <palves@redhat.com>
6070 enum lwp_stop_reason -> enum target_stop_reason
6071 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6072 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6073 (linux_wait_1, stuck_in_jump_pad_callback)
6074 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6075 (linux_stopped_by_watchpoint):
6076 * linux-low.h (enum lwp_stop_reason): Delete.
6077 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6078 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6080 2015-03-04 Yao Qi <yao.qi@linaro.org>
6082 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6084 2015-03-03 Gary Benson <gbenson@redhat.com>
6086 * hostio.c (handle_vFile): Fix prefix lengths.
6088 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6090 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6093 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6095 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6096 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6097 (clean): Add "rm -f" for above C files.
6098 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6099 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6100 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6101 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6102 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6103 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6104 (init_registers_s390x_vx_linux64)
6105 (init_registers_s390x_tevx_linux64)
6106 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6107 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6109 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6110 (s390_store_vxrs_high): New functions.
6111 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6113 (s390_arch_setup): Add logic for selecting one of the new target
6114 descriptions. Activate the new vector regsets if applicable.
6115 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6116 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6117 and init_registers_s390x_tevx_linux64.
6119 2015-03-01 Pedro Alves <palves@redhat.com>
6121 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6124 2015-02-27 Pedro Alves <palves@redhat.com>
6126 * linux-x86-low.c (u_debugreg_offset): New function.
6127 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6129 2015-02-27 Pedro Alves <palves@redhat.com>
6131 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6132 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6133 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6134 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6135 (ps_lsetfpregs, ps_getpid)
6136 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6137 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6138 (ps_lsetxregs, ps_plog): Declare.
6140 2015-02-27 Pedro Alves <palves@redhat.com>
6142 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6143 IP_AGENT_EXPORT_FUNC.
6144 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6145 IP_AGENT_EXPORT_FUNC.
6146 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6147 (IP_AGENT_EXPORT): Delete.
6148 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6149 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6150 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6151 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6152 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6153 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6154 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6155 (traceframe_read_count, traceframe_write_count)
6156 (traceframes_created, trace_state_variables, get_raw_reg)
6157 (get_trace_state_variable_value, set_trace_state_variable_value)
6158 (ust_loaded, helper_thread_id, cmd_buf): Use
6159 IPA_SYM_EXPORTED_NAME.
6160 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6161 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6162 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6163 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6164 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6165 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6166 EXTERN_C_PUSH/EXTERN_C_POP.
6167 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6168 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6169 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6170 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6171 (traceframe_write_count, traceframe_read_count)
6172 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6173 (about_to_request_buffer_space, get_trace_state_variable_value)
6174 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6175 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6176 EXTERN_C_PUSH/EXTERN_C_POP.
6177 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6178 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6179 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6180 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6181 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6182 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6183 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6184 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6186 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6187 (IP_AGENT_EXPORT_VAR_DECL): Define.
6189 (gdb_agent_get_raw_reg): Declare.
6191 2015-02-27 Tom Tromey <tromey@redhat.com>
6192 Pedro Alves <palves@redhat.com>
6194 Rename symbols whose names are reserved C++ keywords throughout.
6196 2015-02-27 Pedro Alves <palves@redhat.com>
6198 * Makefile.in (COMPILER): New, get it from autoconf.
6199 (CXX): Get from autoconf instead.
6200 (COMPILE.pre): Use COMPILER.
6201 (CC-LD): Rename to ...
6202 (CC_LD): ... this. Use COMPILER.
6203 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6204 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6205 * acinclude.m4: Include build-with-cxx.m4.
6206 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6207 Disable -Werror by default if building in C++ mode.
6208 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6209 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6210 the C++ compiler. Save/restore CXXFLAGS too.
6211 * configure: Regenerate.
6213 2015-02-27 Pedro Alves <palves@redhat.com>
6215 * acinclude.m4: Include libiberty.m4.
6216 * configure.ac: Call libiberty_INIT.
6217 * config.in, configure: Regenerate.
6219 2015-02-26 Pedro Alves <palves@redhat.com>
6221 * linux-low.c (linux_wait_1): When incrementing the PC past a
6222 program breakpoint always use the_low_target.breakpoint_len as
6223 increment, rather than the maximum between that and
6224 the_low_target.decr_pc_after_break.
6226 2015-02-23 Pedro Alves <palves@redhat.com>
6228 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6229 thread was doing a step-over; always adjust the PC if
6230 we stepped over a permanent breakpoint.
6231 (linux_wait_1): If we stepped over breakpoint that was on top of a
6232 permanent breakpoint, manually advance the PC past it.
6234 2015-02-23 Pedro Alves <palves@redhat.com>
6236 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6238 (x86_fill_gregset, x86_store_gregset): Use it when handling
6241 2015-02-20 Pedro Alves <palves@redhat.com>
6243 * thread-db.c: Include "nat/linux-procfs.h".
6244 (thread_db_init): Skip listing new threads if the kernel supports
6245 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6247 2015-02-20 Pedro Alves <palves@redhat.com>
6249 * linux-low.c (status_pending_p_callback): Use ptid_match.
6251 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6253 PR breakpoints/16812
6254 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6255 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6256 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6258 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6260 PR breakpoints/15956
6261 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6263 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6265 * linux-low.c (linux_low_btrace_conf): Print size.
6266 * server.c (handle_btrace_conf_general_set): New.
6267 (hanle_general_set): Call handle_btrace_conf_general_set.
6268 (handle_query): Report Qbtrace-conf:bts:size as supported.
6270 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6272 * linux-low.c (linux_low_enable_btrace): Update parameters.
6273 (linux_low_btrace_conf): New.
6274 (linux_target_ops)<to_btrace_conf>: Initialize.
6275 * server.c (current_btrace_conf): New.
6276 (handle_btrace_enable): Rename to ...
6277 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
6278 to target_enable_btrace. Update comment. Update users.
6279 (handle_qxfer_btrace_conf): New.
6280 (qxfer_packets): Add btrace-conf entry.
6281 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6282 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6283 (target_ops)<read_btrace_conf>: New.
6284 (target_enable_btrace): Update parameters.
6285 (target_read_btrace_conf): New.
6287 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6289 * server.c (handle_btrace_general_set): Remove call to
6290 target_supports_btrace.
6291 (supported_btrace_packets): New.
6292 (handle_query): Call supported_btrace_packets.
6293 * target.h: include btrace-common.h.
6294 (btrace_target_info): Removed.
6295 (supports_btrace, target_supports_btrace): Update parameters.
6297 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6299 * Makefile.in (SFILES): Add common/btrace-common.c.
6300 (OBS): Add common/btrace-common.o.
6301 (btrace-common.o): Add build rules.
6302 * linux-low: Include btrace-common.h.
6303 (linux_low_read_btrace): Use struct btrace_data. Call
6304 btrace_data_init and btrace_data_fini.
6306 2015-02-06 Pedro Alves <palves@redhat.com>
6308 * thread-db.c (find_new_threads_callback): Add debug output.
6310 2015-02-04 Pedro Alves <palves@redhat.com>
6312 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6313 (resume_stopped_resumed_lwps): New function.
6314 (linux_wait_for_event_filtered): Use it.
6316 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6318 * Makefile.in (SFILES): Add linux-personality.c.
6319 (linux-personality.o): New rule.
6320 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6321 list of objects to be built.
6322 * linux-low.c: Include nat/linux-personality.h.
6323 (linux_create_inferior): Remove code to disable address space
6324 randomization (moved to ../nat/linux-personality.c). Create
6325 cleanup to disable address space randomization.
6327 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6329 * Makefile.in (posix-strerror.o): New rule.
6330 (mingw-strerror.o): Likewise.
6331 * configure: Regenerated.
6332 * configure.ac: Source file ../common/common.host. Initialize new
6333 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6335 2015-01-14 Yao Qi <yao@codesourcery.com>
6337 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6338 (ppc-linux.o): New rule.
6339 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6340 * configure.ac: AC_CHECK_FUNCS(getauxval).
6341 * config.in: Re-generated.
6342 * configure: Re-generated.
6343 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6344 ppc64_64bit_inferior_p
6346 2015-01-14 Yao Qi <yao@codesourcery.com>
6348 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6349 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6350 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6351 (PT_ORIG_R3, PT_TRAP): Likewise.
6352 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6353 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6354 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6356 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6358 * i387-fp.c (i387_cache_to_xsave): In look over
6359 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6360 zmmh_low_space field by use of zmmh_high_space.
6362 2015-01-09 Pedro Alves <palves@redhat.com>
6364 * linux-low.c (step_over_bkpt): Move higher up in the file.
6365 (handle_extended_wait): Don't store the stop_pc here.
6366 (get_stop_pc): Adjust comments and rename to ...
6367 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6368 stopped for a software breakpoint or hardware breakpoint.
6369 (thread_still_has_status_pending_p): New function.
6370 (status_pending_p_callback): Use
6371 thread_still_has_status_pending_p. If the event is no longer
6372 interesting, resume the LWP.
6373 (handle_tracepoints): Add assert.
6374 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6375 (wstatus_maybe_breakpoint): New function.
6376 (cancel_breakpoint): Delete function.
6377 (check_stopped_by_watchpoint): New function, factored out from
6378 linux_low_filter_event.
6379 (lp_status_maybe_breakpoint): Delete function.
6380 (linux_low_filter_event): Remove filter_ptid argument.
6381 Leave thread group exits pending here. Store the LWP's stop PC.
6382 Always leave events pending.
6383 (linux_wait_for_event_filtered): Pull all events out of the
6384 kernel, and leave them all pending.
6385 (count_events_callback, select_event_lwp_callback): Consider all
6387 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6388 (select_event_lwp): Only give preference to the stepping LWP in
6389 all-stop mode. Adjust comments.
6390 (ignore_event): New function.
6391 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6392 references to cancel_breakpoints. Adjust to renames. Also give
6393 equal priority to all LWPs that have had events in non-stop mode.
6394 If reporting a software breakpoint event, unadjust the LWP's PC.
6395 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6396 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6398 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6399 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6400 (linux_stopped_by_watchpoint): Adjust.
6401 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6402 * linux-low.h (enum lwp_stop_reason): New.
6403 (struct lwp_info) <stop_pc>: Adjust comment.
6404 <stopped_by_watchpoint>: Delete field.
6405 <stop_reason>: New field.
6406 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6407 * mem-break.c (software_breakpoint_inserted_here)
6408 (hardware_breakpoint_inserted_here): New function.
6409 * mem-break.h (software_breakpoint_inserted_here)
6410 (hardware_breakpoint_inserted_here): Declare.
6411 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6412 (cancel_breakpoints): Delete.
6413 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6414 (upload_fast_traceframes): Remove references to
6417 2015-01-09 Pedro Alves <palves@redhat.com>
6419 * thread-db.c (find_new_threads_callback): Ignore thread if the
6420 kernel thread ID is -1.
6422 2015-01-09 Pedro Alves <palves@redhat.com>
6424 * linux-low.c (linux_attach_fail_reason_string): Move to
6425 nat/linux-ptrace.c, and rename.
6426 (linux_attach_lwp): Update comment.
6427 (attach_proc_task_lwp_callback): New function.
6428 (linux_attach): Adjust to rename and use
6429 linux_proc_attach_tgid_threads.
6430 (linux_attach_fail_reason_string): Delete declaration.
6432 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6434 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6435 * server.c (gdbserver_version): Likewise.
6437 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6439 * remote-utils.c: Include ctype.h.
6440 (input_interrupt): Explicitly handle the case when the char
6441 received is the NUL byte. Improve the printing of non-ASCII
6444 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6446 * linux-low.c (linux_low_filter_event): Update call to
6447 linux_enable_event_reporting following the addition of
6448 a new parameter to that function.
6450 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6453 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6454 (AARCH64_FPCR_REGNO): Likewise.
6455 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6456 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6457 (aarch64_store_fpregset): Likewise.
6459 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6461 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6462 Remove FIXME comment about assumption about N.
6464 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6466 * configure.ac: If large-file support is disabled in GDBserver,
6467 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6468 * configure: Regenerate.
6470 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6472 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6473 warning upon ENODATA from ptrace.
6474 * linux-s390-low.c (s390_store_tdb): New.
6475 (s390_regsets): Add regset for NT_S390_TDB.
6477 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6479 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6480 without a fill_function.
6481 * linux-s390-low.c (s390_fill_last_break): Remove.
6482 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6483 (s390_arch_setup): Use regset's size instead of fill_function for
6486 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6488 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6489 the regset's store function when ptrace returned an error.
6490 * regcache.c (get_thread_regcache): Invalidate register cache
6491 before fetching inferior's registers.
6493 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6495 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6496 while-loop as for-loop.
6497 (regsets_store_inferior_registers): Likewise.
6499 2014-11-28 Yao Qi <yao@codesourcery.com>
6501 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6502 * config.in, configure: Re-generate.
6503 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6506 2014-11-21 Yao Qi <yao@codesourcery.com>
6508 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6509 (AC_CHECK_HEADERS): Remove malloc.h.
6510 * configure: Re-generated.
6511 * config.in: Re-generated.
6512 * server.h: Don't include alloca.h and malloc.h.
6513 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6514 Don't include malloc.h.
6516 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6518 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6519 corresponding ERRNO check in same block.
6521 2014-11-12 Pedro Alves <palves@redhat.com>
6523 * server.c (cont_thread): Update comment.
6524 (start_inferior, attach_inferior): No longer clear cont_thread.
6525 (handle_v_cont): No longer set cont_thread.
6526 (captured_main): Clear cont_thread each time a GDB connects.
6528 2014-11-12 Pedro Alves <palves@redhat.com>
6530 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6531 thread, and don't resume all threads if the Hc thread has exited.
6533 2014-11-12 Pedro Alves <palves@redhat.com>
6535 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6536 the process group instead of to a specific LWP.
6538 2014-10-15 Pedro Alves <palves@redhat.com>
6541 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6543 (arm_set_thread_context): Delete.
6544 (the_low_target): Adjust.
6545 * win32-i386-low.c (debug_registers_changed)
6546 (debug_registers_used): Delete.
6547 (update_debug_registers_callback): New function.
6548 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6549 needing to update their debug registers.
6550 (win32_get_current_dr): New function.
6551 (x86_dr_low_get_addr, x86_dr_low_get_control)
6552 (x86_dr_low_get_status): Fetch the debug register from the thread
6554 (i386_initial_stuff): Adjust.
6555 (i386_get_thread_context): Remove current_event parameter. Don't
6556 clear debug_registers_changed nor copy DR values to
6558 (i386_set_thread_context): Delete.
6559 (i386_prepare_to_resume): New function.
6560 (i386_thread_added): Mark the thread as needing to update irs
6562 (the_low_target): Remove i386_set_thread_context and install
6563 i386_prepare_to_resume.
6564 * win32-low.c (win32_get_thread_context): Adjust.
6565 (win32_set_thread_context): Use SetThreadContext
6567 (win32_prepare_to_resume): New function.
6568 (win32_require_context): New function, factored out from ...
6569 (thread_rec): ... this.
6570 (continue_one_thread): Call win32_prepare_to_resume on each thread
6571 we're about to continue.
6572 (win32_resume): Call win32_prepare_to_resume on the event thread.
6573 * win32-low.h (struct win32_thread_info)
6574 <debug_registers_changed>: New field.
6575 (struct win32_target_ops): Change prototype of set_thread_context,
6576 delete set_thread_context and add prepare_to_resume.
6577 (win32_require_context): New declaration.
6579 2014-10-08 Gary Benson <gbenson@redhat.com>
6581 * server.h: Do not include common-exceptions.h.
6583 2014-10-08 Gary Benson <gbenson@redhat.com>
6585 * server.h: Do not include cleanups.h.
6587 2014-09-30 James Hogan <james.hogan@imgtec.com>
6589 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6592 2014-09-23 Yao Qi <yao@codesourcery.com>
6594 * linux-low.c (lp_status_maybe_breakpoint): New function.
6595 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6596 (count_events_callback): Likewise.
6597 (select_event_lwp_callback): Likewise.
6598 (cancel_breakpoints_callback): Likewise.
6600 2014-09-19 Don Breazeal <donb@codesourcery.com>
6602 * linux-low.c (handle_extended_wait): Call
6603 linux_ptrace_get_extended_event.
6604 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6605 linux_is_extended_waitstatus.
6607 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6609 * Makefile.in (CPPFLAGS): Define.
6610 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6611 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6613 2014-09-16 Gary Benson <gbenson@redhat.com>
6615 * inferiors.h (current_inferior): Renamed as...
6616 (current_thread): New variable. All uses updated.
6617 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6618 (maybe_move_out_of_jump_pad): Likewise.
6619 (cancel_breakpoint): Likewise.
6620 (linux_low_filter_event): Likewise.
6621 (wait_for_sigstop): Likewise.
6622 (linux_resume_one_lwp): Likewise.
6623 (need_step_over_p): Likewise.
6624 (start_step_over): Likewise.
6625 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6626 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6627 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6628 and save_inferior as saved_thread.
6629 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6631 (regcache_invalidate_thread): Likewise.
6632 * remote-utils.c (prepare_resume_reply): Likewise.
6633 * thread-db.c (thread_db_get_tls_address): Likewise.
6634 (disable_thread_event_reporting): Likewise.
6635 (remove_thread_event_breakpoints): Likewise.
6636 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6638 * target.h (set_desired_inferior): Renamed as...
6639 (set_desired_thread): New declaration. All uses updated.
6640 * server.c (myresume): Updated comment to reference thread instead
6642 (handle_serial_event): Likewise.
6643 (handle_target_event): Likewise.
6645 2014-09-12 Tom Tromey <tromey@redhat.com>
6646 Gary Benson <gbenson@redhat.com>
6648 * regcache.h: Include common-regcache.h.
6649 (regcache_read_pc): Don't declare.
6650 * regcache.c (get_thread_regcache_for_ptid): New function.
6652 2014-09-11 Tom Tromey <tromey@redhat.com>
6653 Gary Benson <gbenson@redhat.com>
6655 * symbol.c: New file.
6656 * Makefile.in (SFILES): Add symbol.c.
6657 (OBS): Add symbol.o.
6659 2014-09-11 Gary Benson <gbenson@redhat.com>
6661 * target.c (target_stop_ptid, target_continue_ptid): New
6664 2014-09-11 Tom Tromey <tromey@redhat.com>
6665 Gary Benson <gbenson@redhat.com>
6667 * target.h: Include target/target.h.
6668 * target.c (target_read_memory, target_read_uint32)
6669 (target_write_memory): New functions.
6671 2014-09-11 Gary Benson <gbenson@redhat.com>
6673 * server.h (debug_hw_points): Don't declare.
6674 * server.c (debug_hw_points): Don't define. Replace all uses
6675 with show_debug_regs.
6676 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6677 all uses with show_debug_regs.
6679 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6681 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6682 endianness into account.
6683 (ppc_supply_ptrace_register): Likewise.
6685 2014-09-03 James Hogan <james.hogan@imgtec.com>
6687 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6688 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6690 2014-09-03 Gary Benson <gbenson@redhat.com>
6692 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6693 ALL_DEBUG_ADDRESS_REGISTERS.
6695 2014-09-02 Gary Benson <gbenson@redhat.com>
6697 * i386-low.h: Renamed as...
6698 * x86-low.h: New file. All type, function and variable name
6699 prefixes changed from "i386_" to "x86_". All references updated.
6700 * i386-low.c: Renamed as...
6701 * x86-low.c: New file. All type, function and variable name
6702 prefixes changed from "i386_" to "x86_". All references updated.
6704 2014-09-02 Gary Benson <gbenson@redhat.com>
6706 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6707 (x86_linux_new_thread): Likewise.
6709 2014-08-29 Gary Benson <gbenson@redhat.com>
6711 * server.h (setjmp.h): Do not include.
6712 (toplevel): Do not declare.
6713 (common-exceptions.h): Include.
6714 (cleanups.h): Likewise.
6715 * server.c (toplevel): Do not define.
6716 (exit_code): New static global.
6717 (detach_or_kill_for_exit_cleanup): New function.
6718 (main): New function. Original main renamed to...
6719 (captured_main): New function.
6720 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6722 2014-08-29 Gary Benson <gbenson@redhat.com>
6724 * Makefile.in (SFILES): Add common/common-exceptions.c.
6725 (OBS): Add common-exceptions.o.
6726 (common-exceptions.o): New rule.
6727 * utils.c (prepare_to_throw_exception): New function.
6729 2014-08-29 Gary Benson <gbenson@redhat.com>
6731 * config.in: Regenerate.
6732 * configure: Likewise.
6734 2014-08-29 Gary Benson <gbenson@redhat.com>
6736 * Makefile.in (SFILES): Add common/cleanups.c.
6738 (cleanups.o): New rule.
6740 2014-08-29 Gary Benson <gbenson@redhat.com>
6742 * utils.c (internal_vwarning): New function.
6744 2014-08-28 Gary Benson <gbenson@redhat.com>
6746 * utils.h (fatal): Remove declaration.
6747 * utils.c (fatal): Remove function.
6749 2014-08-28 Gary Benson <gbenson@redhat.com>
6751 * tracepoint.c (gdb_agent_init): Replace fatal with
6753 (initialize_tracepoint): Likewise.
6755 2014-08-28 Gary Benson <gbenson@redhat.com>
6757 * remote-utils.c (remote_prepare): Replace fatal with error.
6759 2014-08-28 Gary Benson <gbenson@redhat.com>
6761 * linux-low.c (linux_async): Replace fatal with warning.
6763 (linux_start_non_stop): Return -1 if linux_async failed.
6765 2014-08-28 Gary Benson <gbenson@redhat.com>
6767 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6769 (i386_dr_low_get_addr): Remove vague comment.
6770 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6773 2014-08-28 Gary Benson <gbenson@redhat.com>
6775 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6776 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6778 (linux_resume_one_lwp): Likewise.
6779 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6781 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6782 with internal_error.
6783 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6784 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6785 (find_register_by_name): Replace fatal with internal_error.
6786 (find_regno): Likewise.
6787 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6788 * thread-db.c (thread_db_create_event): Likewise.
6789 (thread_db_load_search): Likewise.
6790 (try_thread_db_load_1): Likewise.
6791 * tracepoint.c (get_jump_space_head): Replace fatal with
6793 (claim_trampoline_space): Likewise.
6794 (have_fast_tracepoint_trampoline_buffer): Likewise.
6795 (cmd_qtstart): Likewise.
6796 (stop_tracing): Likewise.
6797 (fast_tracepoint_collecting): Likewise.
6798 (target_malloc): Likewise.
6799 (download_tracepoint): Likewise.
6800 (download_trace_state_variables): Replace check with gdb_assert.
6801 (upload_fast_traceframes): Replace fatal with internal_error.
6803 2014-08-19 Tom Tromey <tromey@redhat.com>
6804 Gary Benson <gbenson@redhat.com>
6806 * Makefile.in (SFILES): Add common/common-debug.c.
6807 (OBS): Add common-debug.o.
6808 (common-debug.o): New rule.
6809 * debug.h (debug_printf): Don't declare.
6810 * debug.c (debug_printf): Renamed and rewritten as...
6811 (debug_vprintf): New function.
6813 2014-08-19 Gary Benson <gbenson@redhat.com>
6815 * utils.h: Do not include print-utils.h.
6817 2014-08-19 Tom Tromey <tromey@redhat.com>
6818 Gary Benson <gbenson@redhat.com>
6820 * server.h: Add static assertion.
6821 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6823 2014-08-19 Tom Tromey <tromey@redhat.com>
6824 Gary Benson <gbenson@redhat.com>
6826 * Makefile.in (SFILES): Add common/errors.c.
6827 (OBS): Add errors.o.
6828 (IPA_OBS): Add errors-ipa.o.
6829 (errors.o): New rule.
6830 (errors-ipa.o): Likewise.
6831 * utils.h (perror_with_name, error, warning): Don't declare.
6832 * utils.c (warning): Renamed and rewritten as...
6833 (vwarning): New function.
6834 (error): Renamed and rewritten as...
6835 (verror): New function.
6836 (internal_error): Renamed and rewritten as...
6837 (internal_verror): New function.
6839 2014-08-07 Gary Benson <gbenson@redhat.com>
6841 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6842 * configure: Regenerate.
6843 * config.in: Likewise.
6844 * server.h: Do not include errno.h.
6845 * event-loop.c: Likewise.
6846 * hostio-errno.c: Likewise.
6847 * linux-low.c: Likewise.
6848 * remote-utils.c: Likewise.
6849 * spu-low.c: Likewise.
6850 * utils.c: Likewise.
6851 * gdbreplay.c: Unconditionally include errno.h.
6853 2014-08-07 Gary Benson <gbenson@redhat.com>
6855 * server.h: Do not include string.h.
6856 * event-loop.c: Likewise.
6857 * linux-low.c: Likewise.
6858 * regcache.c: Likewise.
6859 * remote-utils.c: Likewise.
6860 * spu-low.c: Likewise.
6861 * utils.c: Likewise.
6863 2014-08-07 Gary Benson <gbenson@redhat.com>
6865 * server.h: Do not include gdb_assert.h.
6867 2014-08-07 Gary Benson <gbenson@redhat.com>
6869 * server.h: Do not include common-utils.h.
6871 2014-08-07 Gary Benson <gbenson@redhat.com>
6873 * server.h: Do not include ptid.h.
6874 * notif.h: Likewise.
6876 2014-08-07 Gary Benson <gbenson@redhat.com>
6878 * server.h: Do not include gdb_locale.h.
6880 2014-08-07 Gary Benson <gbenson@redhat.com>
6882 * server.h: Do not include gdb/signals.h.
6883 * win32-low.c: Likewise.
6885 2014-08-07 Gary Benson <gbenson@redhat.com>
6887 * server.h: Do not include pathmax.h.
6889 2014-08-07 Gary Benson <gbenson@redhat.com>
6891 * server.h: Do not include libiberty.h.
6892 * linux-bfin-low.c: Likewise.
6894 2014-08-07 Gary Benson <gbenson@redhat.com>
6896 * server.h: Do not include ansidecl.h.
6898 2014-08-07 Gary Benson <gbenson@redhat.com>
6900 * linux-x86-low.c: Do not include stddef.h.
6901 * lynx-ppc-low.c: Likewise.
6902 * tracepoint.c: Likewise.
6904 2014-08-07 Gary Benson <gbenson@redhat.com>
6906 * server.h: Do not include stdarg.h.
6907 * nto-low.c: Likewise.
6909 2014-08-07 Gary Benson <gbenson@redhat.com>
6911 * server.h: Do not include stdlib.h.
6912 * inferiors.c: Likewise.
6913 * linux-low.c: Likewise.
6914 * regcache.c: Likewise.
6915 * spu-low.c: Likewise.
6916 * tracepoint.c: Likewise.
6917 * utils.c: Likewise.
6919 2014-08-07 Gary Benson <gbenson@redhat.com>
6921 * server.h: Do not include stdio.h.
6922 * linux-low.c: Likewise.
6923 * remote-utils.c: Likewise.
6924 * spu-low.c: Likewise.
6925 * utils.c: Likewise.
6926 * wincecompat.c: Likewise.
6928 2014-08-06 Gary Benson <gbenson@redhat.com>
6930 * regcache.c (init_register_cache): Move conditionals inside if.
6932 2014-08-06 Gary Benson <gbenson@redhat.com>
6934 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6936 2014-07-31 Gary Benson <gbenson@redhat.com>
6938 * ax.h: Do not include server.h.
6939 * gdbthread.h: Likewise.
6940 * lynx-low.h: Likewise.
6941 * notif.h: Likewise.
6943 2014-07-30 Gary Benson <gbenson@redhat.com>
6945 * server.h: Include common-defs.h.
6946 Do not include config.h or build-gnulib-gdbserver/config.h.
6948 2014-07-30 Gary Benson <gbenson@redhat.com>
6950 * hostio-errno.c: Move server.h to top of includes list.
6951 * inferiors.c: Likewise.
6952 * linux-x86-low.c: Likewise.
6953 * notif.c: Include server.h.
6955 2014-07-24 Tom Tromey <tromey@redhat.com>
6956 Gary Benson <gbenson@redhat.com>
6958 * server.h (CORE_ADDR): Now unsigned.
6960 2014-07-16 Pedro Alves <palves@redhat.com>
6962 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6964 2014-07-15 Pedro Alves <palves@redhat.com>
6966 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6969 2014-07-11 Pedro Alves <palves@redhat.com>
6971 * linux-low.c (kill_wait_lwp): New function, based on
6972 kill_one_lwp_callback, but use my_waitpid directly.
6973 (kill_one_lwp_callback, linux_kill): Use it.
6975 2014-06-23 Pedro Alves <palves@redhat.com>
6977 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6978 before setting DR0..DR3.
6980 2014-06-20 Gary Benson <gbenson@redhat.com>
6982 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6983 * configure: Regenerated.
6984 * config.in: Likewise.
6986 2014-06-20 Gary Benson <gbenson@redhat.com>
6988 * Makefile.in (SFILES): Update locations for files moved
6990 (object file files): Reordered.
6992 2014-06-20 Gary Benson <gbenson@redhat.com>
6994 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6995 (i386_dr_low_set_addr): Likewise.
6996 (i386_dr_low_get_addr): Likewise.
6997 (i386_dr_low_can_set_control): Likewise.
6998 (i386_dr_low_set_control): Likewise.
6999 (i386_dr_low_get_control): Likewise.
7000 (i386_dr_low_get_status): Likewise.
7001 (i386_get_debug_register_length): Likewise.
7002 * linux-x86-low.c (i386_dr_low_set_addr):
7003 Changed signature. Made static.
7004 (i386_dr_low_get_addr): Likewise.
7005 (i386_dr_low_set_control): Likewise.
7006 (i386_dr_low_get_control): Likewise.
7007 (i386_dr_low_get_status): Likewise.
7008 (i386_dr_low): New global variable.
7009 * win32-i386-low.c (i386_dr_low_set_addr):
7010 Changed signature. Made static.
7011 (i386_dr_low_get_addr): Likewise.
7012 (i386_dr_low_set_control): Likewise.
7013 (i386_dr_low_get_control): Likewise.
7014 (i386_dr_low_get_status): Likewise.
7015 (i386_dr_low): New global variable.
7017 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7019 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7020 * Makefile.in (AR, AR_FLAGS): Define.
7021 * configure: Regenerate.
7023 2014-06-19 Gary Benson <gbenson@redhat.com>
7025 * Makefile.in (i386-dregs.o): New rule.
7026 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7027 * i386-low.c (target.h): Remove include.
7028 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7029 (DR_CONTROL_SHIFT): Likewise.
7030 (DR_CONTROL_SIZE): Likewise.
7031 (DR_RW_EXECUTE): Likewise.
7032 (DR_RW_WRITE): Likewise.
7033 (DR_RW_READ): Likewise.
7034 (DR_RW_IORW): Likewise.
7035 (DR_LEN_1): Likewise.
7036 (DR_LEN_2): Likewise.
7037 (DR_LEN_4): Likewise.
7038 (DR_LEN_8): Likewise.
7039 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7040 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7041 (DR_ENABLE_SIZE): Likewise.
7042 (DR_LOCAL_SLOWDOWN): Likewise.
7043 (DR_GLOBAL_SLOWDOWN): Likewise.
7044 (DR_CONTROL_RESERVED): Likewise.
7045 (I386_DR_CONTROL_MASK): Likewise.
7046 (I386_DR_VACANT): Likewise.
7047 (I386_DR_LOCAL_ENABLE): Likewise.
7048 (I386_DR_GLOBAL_ENABLE): Likewise.
7049 (I386_DR_DISABLE): Likewise.
7050 (I386_DR_SET_RW_LEN): Likewise.
7051 (I386_DR_GET_RW_LEN): Likewise.
7052 (I386_DR_WATCH_HIT): Likewise.
7053 (i386_wp_op_t): Likewise.
7054 (i386_show_dr): Likewise.
7055 (i386_length_and_rw_bits): Likewise.
7056 (i386_insert_aligned_watchpoint): Likewise.
7057 (i386_remove_aligned_watchpoint): Likewise.
7058 (i386_handle_nonaligned_watchpoint): Likewise.
7059 i386_update_inferior_debug_regs(): Likewise.
7060 (i386_dr_insert_watchpoint): Likewise.
7061 (i386_dr_remove_watchpoint): Likewise.
7062 (i386_dr_region_ok_for_watchpoint): Likewise.
7063 (i386_dr_stopped_data_address): Likewise.
7064 (i386_dr_stopped_by_watchpoint): Likewise.
7066 2014-06-19 Gary Benson <gbenson@redhat.com>
7068 * i386-low.c (i386_dr_show): Renamed to
7069 i386_show_dr and made static. All uses updated.
7070 (i386_dr_length_and_rw_bits): Renamed to
7071 i386_length_and_rw_bits and made static.
7073 (i386_dr_insert_aligned_watchpoint): Renamed to
7074 i386_insert_aligned_watchpoint and made static.
7076 (i386_dr_remove_aligned_watchpoint): Renamed to
7077 i386_remove_aligned_watchpoint and made static.
7079 (i386_dr_update_inferior_debug_regs): Renamed to
7080 i386_update_inferior_debug_regs and made static.
7083 2014-06-18 Gary Benson <gbenson@redhat.com>
7085 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7086 (i386_dr_low_can_set_control): Likewise.
7087 (i386_get_debug_register_length): Likewise.
7088 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7089 (i386_dr_low_can_set_control): Likewise.
7090 (i386_get_debug_register_length): Likewise.
7092 2014-06-17 Gary Benson <gbenson@redhat.com>
7094 * i386-low.h (i386-dregs.h): New include.
7095 (DR_FIRSTADDR): Now in i386-dregs.h.
7096 (DR_LASTADDR): Likewise.
7097 (DR_NADDR): Likewise.
7098 (DR_STATUS): Likewise.
7099 (DR_CONTROL): Likewise.
7100 (i386_debug_reg_state): Likewise.
7101 (i386_dr_insert_watchpoint): Likewise.
7102 (i386_dr_remove_watchpoint): Likewise.
7103 (i386_dr_region_ok_for_watchpoint): Likewise.
7104 (i386_dr_stopped_data_address): Likewise.
7105 (i386_dr_stopped_by_watchpoint): Likewise.
7106 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7108 2014-06-18 Gary Benson <gbenson@redhat.com>
7110 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7111 i386_dr_insert_watchpoint.
7112 (i386_low_remove_watchpoint): Renamed to
7113 i386_dr_remove_watchpoint.
7114 (i386_low_region_ok_for_watchpoint): Renamed to
7115 i386_dr_region_ok_for_watchpoint.
7116 (i386_low_stopped_data_address): Renamed to
7117 i386_dr_stopped_data_address.
7118 (i386_low_stopped_by_watchpoint): Renamed to
7119 i386_dr_stopped_by_watchpoint.
7120 * i386-low.c (i386_show_dr): Renamed to
7121 i386_dr_show and made nonstatic. All uses updated.
7122 (i386_length_and_rw_bits): Renamed to
7123 i386_dr_length_and_rw_bits and made nonstatic.
7125 (i386_insert_aligned_watchpoint): Renamed to
7126 i386_dr_insert_aligned_watchpoint and made nonstatic.
7128 (i386_remove_aligned_watchpoint): Renamed to
7129 i386_dr_remove_aligned_watchpoint and made nonstatic.
7131 (i386_update_inferior_debug_regs): Renamed to
7132 i386_dr_update_inferior_debug_regs and made nonstatic.
7134 (i386_low_insert_watchpoint): Renamed to
7135 i386_dr_insert_watchpoint. All uses updated.
7136 (i386_low_remove_watchpoint): Renamed to
7137 i386_dr_remove_watchpoint. All uses updated.
7138 (i386_low_region_ok_for_watchpoint): Renamed to
7139 i386_dr_region_ok_for_watchpoint. All uses updated.
7140 (i386_low_stopped_data_address): Renamed to
7141 i386_dr_stopped_data_address. All uses updated.
7142 (i386_low_stopped_by_watchpoint): Renamed to
7143 i386_dr_stopped_by_watchpoint. All uses updated.
7145 2014-06-18 Gary Benson <gbenson@redhat.com>
7147 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7148 (i386_dr_low_can_set_control): Likewise.
7149 (i386_insert_aligned_watchpoint): New check.
7151 2014-06-18 Gary Benson <gbenson@redhat.com>
7153 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7156 2014-06-18 Gary Benson <gbenson@redhat.com>
7158 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7159 instead of fatal and error.
7160 (i386_handle_nonaligned_watchpoint): Likewise.
7162 2014-06-18 Gary Benson <gbenson@redhat.com>
7164 * i386-low.c (i386_get_debug_register_length): New macro.
7165 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7166 (i386_show_dr): Use debug_printf instead of fprintf. Use
7167 phex to format values.
7169 2014-06-18 Gary Benson <gbenson@redhat.com>
7171 * i386-low.h: Comment changes.
7172 * i386-low.c: Likewise.
7174 2014-06-18 Gary Benson <gbenson@redhat.com>
7176 * i386-low.c: Whitespace changes.
7178 2014-06-12 Tom Tromey <tromey@redhat.com>
7180 * utils.c (freeargv): Remove.
7182 2014-06-12 Tom Tromey <tromey@redhat.com>
7184 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7185 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7186 (parse_debug_format_options): Likewise.
7187 (gdbserver_usage): Likewise.
7188 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7189 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7190 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7192 ($(LIBGNU)): Depend on libiberty.
7193 (all-lib): Recurse into all subdirs.
7194 (install-only): Invoke "install" target in subdirs.
7195 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7197 * configure: Rebuild.
7198 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7199 for vasprintf, vsnprintf, or gettimeofday.
7200 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7203 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7205 * development.sh: Delete.
7206 * Makefile.in (config.status): Adjust dependency on development.sh.
7207 * configure.ac: Adjust development.sh source call.
7208 * configure: Regenerate.
7210 2014-06-02 Pedro Alves <palves@redhat.com>
7212 * ax.c (gdb_free_agent_expr): New function.
7213 * ax.h (gdb_free_agent_expr): New declaration.
7214 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7216 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7218 (clear_breakpoint_conditions_and_commands): New function.
7219 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7220 (clear_breakpoint_conditions_and_commands): New declaration.
7222 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7224 * linux-aarch64-low.c (asm/ptrace.h): Include.
7226 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7228 Fix TLS access for -static -pthread.
7229 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7230 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7231 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7233 2014-05-20 Pedro Alves <palves@redhat.com>
7235 * linux-aarch64-low.c (aarch64_insert_point)
7236 (aarch64_remove_point): No longer check whether the type is
7237 supported here. Adjust to new interface.
7238 (the_low_target): Install aarch64_supports_z_point_type as
7239 supports_z_point_type method.
7240 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7241 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7242 instead of a Z packet char. Adjust.
7243 (arm_supports_z_point_type): New function.
7244 (arm_insert_point, arm_remove_point): Adjust to new interface.
7245 (the_low_target): Install arm_supports_z_point_type.
7246 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7247 (cris_insert_point, cris_remove_point): Adjust to new interface.
7248 Don't check whether the type is supported here.
7249 (the_low_target): Install cris_supports_z_point_type.
7250 * linux-low.c (linux_supports_z_point_type): New function.
7251 (linux_insert_point, linux_remove_point): Adjust to new interface.
7252 * linux-low.h (struct linux_target_ops) <insert_point,
7253 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7254 raw_breakpoint pointer parameter.
7255 <supports_z_point_type>: New method.
7256 * linux-mips-low.c (mips_supports_z_point_type): New function.
7257 (mips_insert_point, mips_remove_point): Adjust to new interface.
7258 Use mips_supports_z_point_type.
7259 (the_low_target): Install mips_supports_z_point_type.
7260 * linux-ppc-low.c (the_low_target): Install NULL as
7261 supports_z_point_type method.
7262 * linux-s390-low.c (the_low_target): Install NULL as
7263 supports_z_point_type method.
7264 * linux-sparc-low.c (the_low_target): Install NULL as
7265 supports_z_point_type method.
7266 * linux-x86-low.c (x86_supports_z_point_type): New function.
7267 (x86_insert_point): Adjust to new insert_point interface. Use
7268 insert_memory_breakpoint. Adjust to new
7269 i386_low_insert_watchpoint interface.
7270 (x86_remove_point): Adjust to remove_point interface. Use
7271 remove_memory_breakpoint. Adjust to new
7272 i386_low_remove_watchpoint interface.
7273 (the_low_target): Install x86_supports_z_point_type.
7274 * lynx-low.c (lynx_target_ops): Install NULL as
7275 supports_z_point_type callback.
7276 * nto-low.c (nto_supports_z_point_type): New.
7277 (nto_insert_point, nto_remove_point): Adjust to new interface.
7278 (nto_target_ops): Install nto_supports_z_point_type.
7279 * mem-break.c: Adjust intro comment.
7280 (struct raw_breakpoint) <raw_type, size>: New fields.
7281 <inserted>: Update comment.
7282 <shlib_disabled>: Delete field.
7283 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7284 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7285 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7286 (raw_bkpt_type_to_target_hw_bp_type): New function.
7287 (find_enabled_raw_code_breakpoint_at): New function.
7288 (find_raw_breakpoint_at): New type and size parameters. Use them.
7289 (insert_memory_breakpoint): New function, based off
7290 set_raw_breakpoint_at.
7291 (remove_memory_breakpoint): New function.
7292 (set_raw_breakpoint_at): Reimplement.
7293 (set_breakpoint): New, based on set_breakpoint_at.
7294 (set_breakpoint_at): Reimplement.
7295 (delete_raw_breakpoint): Go through the_target->remove_point
7296 instead of assuming memory breakpoints.
7297 (find_gdb_breakpoint_at): Delete.
7298 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7299 (find_gdb_breakpoint): New function.
7300 (set_gdb_breakpoint_at): Delete.
7301 (z_type_supported): New function.
7302 (set_gdb_breakpoint_1): New function, loosely based off
7303 set_gdb_breakpoint_at.
7304 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7305 (delete_gdb_breakpoint_at): Delete.
7306 (delete_gdb_breakpoint_1): New function, loosely based off
7307 delete_gdb_breakpoint_at.
7308 (delete_gdb_breakpoint): New function.
7309 (clear_gdb_breakpoint_conditions): Rename to ...
7310 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7312 (add_condition_to_breakpoint): Make static.
7313 (add_breakpoint_condition): Take a struct breakpoint pointer
7314 instead of an address. Adjust.
7315 (gdb_condition_true_at_breakpoint): Rename to ...
7316 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7318 (gdb_condition_true_at_breakpoint): Reimplement.
7319 (add_breakpoint_commands): Take a struct breakpoint pointer
7320 instead of an address. Adjust.
7321 (gdb_no_commands_at_breakpoint): Rename to ...
7322 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7323 parameter. Return true if no breakpoint was found. Change debug
7325 (gdb_no_commands_at_breakpoint): Reimplement.
7326 (run_breakpoint_commands): Rename to ...
7327 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7328 and change return type to boolean.
7329 (run_breakpoint_commands): New function.
7330 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7331 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7332 breakpoint. Go through the_target->remove_point instead of
7333 assuming memory breakpoint.
7334 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7335 software and hardware breakpoints.
7336 (reinsert_raw_breakpoint): Go through the_target->insert_point
7337 instead of assuming memory breakpoint.
7338 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7339 software and hardware breakpoints.
7340 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7341 Check both software and hardware breakpoints.
7342 (validate_inserted_breakpoint): Assert the breakpoint is a
7343 software breakpoint. Set the inserted flag to -1 instead of
7344 setting shlib_disabled.
7345 (delete_disabled_breakpoints): Adjust.
7346 (validate_breakpoints): Only validate software breakpoints.
7347 Adjust to inserted flag change.
7348 (check_mem_read, check_mem_write): Skip breakpoint types other
7349 than software breakpoints. Adjust to inserted flag change.
7350 * mem-break.h (enum raw_bkpt_type): New enum.
7351 (raw_breakpoint, struct process_info): Forward declare.
7352 (Z_packet_to_target_hw_bp_type): Delete declaration.
7353 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7354 (set_gdb_breakpoint, delete_gdb_breakpoint)
7355 (clear_breakpoint_conditions): New declarations.
7356 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7357 (breakpoint_inserted_here): Update comment.
7358 (add_breakpoint_condition, add_breakpoint_commands): Replace
7359 address parameter with a breakpoint pointer parameter.
7360 (gdb_breakpoint_here): Update comment.
7361 (delete_gdb_breakpoint_at): Delete.
7362 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7363 * server.c (process_point_options): Take a struct breakpoint
7364 pointer instead of an address. Adjust.
7365 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7366 delete_gdb_breakpoint.
7367 * spu-low.c (spu_target_ops): Install NULL as
7368 supports_z_point_type method.
7369 * target.h: Include mem-break.h.
7370 (struct target_ops) <prepare_to_access_memory>: Update comment.
7371 <supports_z_point_type>: New field.
7372 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7373 instead of a char. Also take a raw breakpoint pointer.
7374 * win32-arm-low.c (the_low_target): Install NULL as
7375 supports_z_point_type.
7376 * win32-i386-low.c (i386_supports_z_point_type): New function.
7377 (i386_insert_point, i386_remove_point): Adjust to new interface.
7378 (the_low_target): Install i386_supports_z_point_type.
7379 * win32-low.c (win32_supports_z_point_type): New function.
7380 (win32_insert_point, win32_remove_point): Adjust to new interface.
7381 (win32_target_ops): Install win32_supports_z_point_type.
7382 * win32-low.h (struct win32_target_ops):
7383 <supports_z_point_type>: New method.
7384 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7385 instead of a char. Also take a raw breakpoint pointer.
7387 2014-05-20 Pedro Alves <palves@redhat.com>
7389 * mem-break.h: Include break-common.h.
7390 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7391 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7392 (Z_packet_to_target_hw_bp_type): New declaration.
7393 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7394 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7395 (Z_PACKET_ACCESS_WP): Delete macros.
7396 (Z_packet_to_hw_type): Delete function.
7397 * i386-low.h: Don't include break-common.h here.
7398 (Z_packet_to_hw_type): Delete declaration.
7399 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7400 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7401 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7402 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7403 * linux-aarch64-low.c: Don't include break-common.h here.
7404 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7405 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7406 (Z_packet_to_target_hw_bp_type): Delete function.
7407 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7409 (mips_insert_point, mips_remove_point): Use
7410 Z_packet_to_target_hw_bp_type.
7412 2014-05-20 Pedro Alves <palves@redhat.com>
7414 * linux-aarch64-low.c: Include break-common.h.
7415 (enum target_point_type): Delete.
7416 (Z_packet_to_point_type): Rename to ...
7417 (Z_packet_to_target_hw_bp_type): ... this, and return a
7418 target_hw_bp_type instead.
7419 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7420 instead of an enum target_point_type.
7421 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7423 (aarch64_dr_state_insert_one_point)
7424 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7425 (aarch64_handle_aligned_watchpoint)
7426 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7427 Take an enum target_hw_bp_type instead of an enum
7429 (aarch64_supports_z_point_type): New function.
7430 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7431 use Z_packet_to_target_hw_bp_type.
7433 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7435 * configure.ac: Only use -Werror by default when DEVELOPMENT
7437 * configure: Regenerate.
7439 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7441 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7442 * linux-x86-low.c (X86_64_USER_REGS): New.
7443 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7445 2014-04-28 Yao Qi <yao@codesourcery.com>
7447 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7450 2014-04-25 Pedro Alves <palves@redhat.com>
7453 * linux-low.c (linux_attach_fail_reason_string): New function.
7454 (linux_attach_lwp): Delete.
7455 (linux_attach_lwp_1): Rename to ...
7456 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7457 argument. Remove "initial" parameter. Return int instead of
7458 void. Don't error or warn here.
7459 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7460 failure to attach to the tgid. Call warning when failing to
7462 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7463 argument. Remove "initial" parameter. Return int instead of
7464 void. Don't error or warn here.
7465 (linux_attach_fail_reason_string): New declaration.
7466 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7467 interface change. Use linux_attach_fail_reason_string.
7469 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7470 Walfred Tedeschi <walfred.tedeschi@intel.com>
7472 * Makefile.in: Added rules to handle new files
7473 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7474 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7475 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7476 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7477 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7478 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7480 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7481 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7482 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7483 i386/x32-avx512.xml.
7484 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7485 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7486 i386/x32-avx512-linux.xml.
7487 * i387-fp.c (num_avx512_k_registers): New constant for number
7489 (num_avx512_zmmh_low_registers): New constant for number of
7490 lower ZMM registers (0-15).
7491 (num_avx512_zmmh_high_registers): New constant for number of
7492 higher ZMM registers (16-31).
7493 (num_avx512_ymmh_registers): New contant for number of higher
7494 YMM registers (ymm16-31 added by avx521 on x86_64).
7495 (num_avx512_xmm_registers): New constant for number of higher
7496 XMM registers (xmm16-31 added by AVX512 on x86_64).
7497 (struct i387_xsave): Add space for AVX512 registers.
7498 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7499 Add code to handle AVX512 registers.
7500 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7501 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7502 prototypei from generated file.
7503 (tdesc_amd64_avx512_linux): Likewise.
7504 (init_registers_x32_avx512_linux): Likewise.
7505 (tdesc_x32_avx512_linux): Likewise.
7506 (init_registers_i386_avx512_linux): Likewise.
7507 (tdesc_i386_avx512_linux): Likewise.
7508 (x86_64_regmap): Add AVX512 registers.
7509 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7511 (initialize_low_arch): Add code to initialize AVX512 registers.
7513 2014-04-23 Pedro Alves <palves@redhat.com>
7515 * mem-break.c (find_gdb_breakpoint_at): Make static.
7516 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7518 2014-04-23 Pedro Alves <palves@redhat.com>
7520 * i386-low.c: Don't include break-common.h here.
7521 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7522 prototype to take target_hw_bp_type as argument instead of a Z
7524 * i386-low.h: Include break-common.h here.
7525 (Z_packet_to_hw_type): Declare.
7526 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7528 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7529 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7530 (x86_remove_point): Convert the packet number to a
7531 target_hw_bp_type before calling i386_low_remove_watchpoint.
7532 * win32-i386-low.c (i386_insert_point): Convert the packet number
7533 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7534 (i386_remove_point): Convert the packet number to a
7535 target_hw_bp_type before calling i386_low_remove_watchpoint.
7537 2014-04-23 Pedro Alves <palves@redhat.com>
7539 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7541 2014-04-10 Pedro Alves <palves@redhat.com>
7543 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7544 Check if the condition or command is NULL before checking if the
7545 breakpoint is known. On success, return true.
7546 * mem-break.h (add_breakpoint_condition): Document return.
7547 (add_breakpoint_commands): Add describing comment.
7548 * server.c (skip_to_semicolon): New function.
7549 (process_point_options): Use it.
7551 2014-04-09 Pedro Alves <palves@redhat.com>
7553 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7556 2014-02-27 Pedro Alves <palves@redhat.com>
7559 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7561 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7563 (last_thread_of_process_p): Take a PID argument instead of a
7565 (linux_wait_for_lwp): Delete.
7566 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7568 (linux_low_filter_event): New function, party factored out from
7569 linux_wait_for_event.
7570 (linux_wait_for_event): Rename to ...
7571 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7572 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7573 sigsuspend. Check for zombie leaders.
7574 (linux_wait_for_event): Reimplement as wrapper around
7575 linux_wait_for_event_filtered.
7576 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7577 a normal or signal exit is seen, it's the whole process exiting.
7578 (wait_for_sigstop): No longer a for_each_inferior callback.
7579 Rewrite on top of linux_wait_for_event_filtered.
7580 (stop_all_lwps): Call wait_for_sigstop directly.
7581 * server.c (resume, handle_target_event): Handle
7582 TARGET_WAITKIND_NO_RESUMED.
7584 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7586 * win32-low.c (psapi_get_dll_name,
7587 * win32_CreateToolhelp32Snapshot): Delete.
7588 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7589 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7591 (handle_load_dll): Add function description.
7592 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7594 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7596 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7598 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7599 base address when calling win32_add_one_solib.
7600 (handle_load_dll): Delete local variable load_addr.
7601 Remove 0x1000 offset applied to DLL base address when calling
7602 win32_add_one_solib.
7603 (handle_unload_dll): Add comment.
7605 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7607 * win32-low.c (win32_add_all_dlls): Renames
7608 win32_ensure_ntdll_loaded. Rewrite function documentation.
7609 Adjust implementation to always load all DLLs.
7610 Add 0x1000 offset to DLL base address when calling
7611 win32_add_one_solib.
7612 (child_initialization_done): New static global.
7613 (do_initial_child_stuff): Set child_initialization_done to
7614 zero during child initialization, and 1 after. Replace call
7615 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7617 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7618 (handle_unload_dll): Add function documentation.
7619 (get_child_debug_event): Ignore load and unload DLL events
7620 during child initialization.
7622 2014-02-20 Doug Evans <dje@google.com>
7624 Remove global all_lwps.
7625 * inferiors.h (ptid_of): Move here from linux-low.h.
7626 (pid_of, lwpid_of): Ditto.
7627 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7628 parameter is a struct thread_info * now.
7629 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7630 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7631 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7633 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7634 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7635 * linux-arm-low.c (update_registers_callback): Update, "entry"
7636 parameter is a struct thread_info * now.
7637 Fetch lwpid from current_inferior directly.
7638 (arm_insert_point): Pass &all_threads to find_inferior instead of
7640 (arm_remove_point): Ditto.
7641 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7642 (arm_prepare_to_resume): Fetch pid from thread.
7643 (arm_read_description): Fetch lwpid from current_inferior directly.
7644 * linux-low.c (all_lwps): Delete.
7645 (delete_lwp): Delete call to remove_inferior.
7646 (handle_extended_wait): Fetch lwpid from thread.
7647 (add_lwp): Don't set lwp->entry.id. Remove call to
7648 add_inferior_to_list.
7649 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7650 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7651 (kill_one_lwp_callback): Ditto.
7652 (linux_kill): Don't dereference NULL pointer.
7653 Fetch ptid,lwpid from thread.
7654 (get_detach_signal): Fetch ptid from thread.
7655 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7656 Simplify call to regcache_invalidate_thread.
7657 (delete_lwp_callback): Update, "entry" parameter is a
7658 struct thread_info * now. Fetch pid from thread.
7659 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7660 (status_pending_p_callback): Update, "entry" parameter is a
7661 struct thread_info * now. Fetch ptid from thread.
7662 (find_lwp_pid): Update, "entry" parameter is a
7663 struct thread_info * now.
7664 (linux_wait_for_lwp): Fetch pid from thread.
7665 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7666 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7667 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7668 (dequeue_one_deferred_signal): Ditto.
7669 (cancel_breakpoint): Fetch ptid from current_inferior.
7670 (linux_wait_for_event): Pass &all_threads to find_inferior,
7671 not &all_lwps. Fetch ptid, lwpid from thread.
7672 (count_events_callback): Update, "entry" parameter is a
7673 struct thread_info * now.
7674 (select_singlestep_lwp_callback): Ditto.
7675 (select_event_lwp_callback): Ditto.
7676 (cancel_breakpoints_callback): Ditto.
7677 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7679 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7680 (unsuspend_one_lwp): Update, "entry" parameter is a
7681 struct thread_info * now.
7682 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7684 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7685 Fetch lwpid from thread, not lwp.
7686 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7687 Pass &all_threads to find_inferior, not &all_lwps.
7688 (send_sigstop): Fetch lwpid from thread, not lwp.
7689 (send_sigstop_callback): Update, "entry" parameter is a
7690 struct thread_info * now.
7691 (suspend_and_send_sigstop_callback): Ditto.
7692 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7693 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7694 struct thread_info * now.
7695 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7697 (lwp_running): Update, "entry" parameter is a
7698 struct thread_info * now.
7699 (stop_all_lwps): Fetch ptid from thread.
7700 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7701 (linux_resume_one_lwp): Fetch lwpid from thread.
7702 (linux_set_resume_request): Update, "entry" parameter is a
7703 struct thread_info * now. Fetch pid, lwpid from thread.
7704 (resume_status_pending_p): Update, "entry" parameter is a
7705 struct thread_info * now.
7706 (need_step_over_p): Ditto. Fetch lwpid from thread.
7707 (start_step_over): Fetch lwpid from thread.
7708 (linux_resume_one_thread): Update, "entry" parameter is a
7709 struct thread_info * now. Fetch lwpid from thread.
7710 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7711 (proceed_one_lwp): Update, "entry" parameter is a
7712 struct thread_info * now. Fetch lwpid from thread.
7713 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7714 struct thread_info * now.
7715 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7716 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7717 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7719 (regsets_store_inferior_registers): Ditto.
7720 (fetch_register, store_register): Ditto.
7721 (linux_read_memory, linux_write_memory): Ditto.
7722 (linux_request_interrupt): Ditto.
7723 (linux_read_auxv): Ditto.
7724 (linux_xfer_siginfo): Ditto.
7725 (linux_qxfer_spu): Ditto.
7726 (linux_qxfer_libraries_svr4): Ditto.
7727 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7728 moved to inferiors.h.
7730 (get_thread_lwp): Update.
7731 (struct lwp_info): Delete member "entry". Simplify comment for
7734 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7735 current_inferior directly.
7736 (update_watch_registers_callback): Update, "entry" parameter is a
7737 struct thread_info * now. Fetch pid from thread.
7738 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7739 (mips_insert_point): Fetch lwpid from current_inferior.
7740 Pass &all_threads to find_inferior, not &all_lwps.
7741 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7742 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7744 (mips_stopped_data_address): Ditto.
7745 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7747 * linux-tile-low.c (tile_arch_setup): Ditto.
7748 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7749 (update_debug_registers_callback): Update, "entry" parameter is a
7750 struct thread_info * now. Fetch pid from thread.
7751 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7752 Pass &all_threads to find_inferior, not &all_lwps.
7753 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7754 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7755 Pass &all_threads to find_inferior, not &all_lwps.
7756 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7757 (i386_dr_low_get_status): Ditto.
7758 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7759 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7760 (x86_linux_read_description): Ditto.
7761 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7763 2014-02-20 Doug Evans <dje@google.com>
7765 * inferiors.c (get_first_inferior): Fix buglet.
7767 2014-02-19 Doug Evans <dje@google.com>
7769 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7770 * inferiors.c (add_thread): Change result type to struct thread_info *.
7771 All callers updated.
7772 (add_lwp): Call add_thread here instead of in callers.
7773 All callers updated.
7774 * linux-low.h (get_lwp_thread): Rewrite.
7775 (struct lwp_info): New member "thread".
7777 2014-02-19 Doug Evans <dje@google.com>
7779 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7780 All callers updated.
7782 2014-02-19 Doug Evans <dje@google.com>
7784 * inferiors.c (add_thread): Fix whitespace.
7786 2014-02-19 Doug Evans <dje@google.com>
7788 * dll.c (clear_dlls): Replace accessing list implemention details
7790 * gdbthread.h (get_first_thread): Declare.
7791 * inferiors.c (for_each_inferior_with_data): New function.
7792 (get_first_thread): New function.
7793 (find_thread_ptid): Simplify.
7794 (get_first_inferior): New function.
7795 (clear_list): Delete.
7796 (one_inferior_p): New function.
7797 (clear_inferior_list): New function.
7798 (clear_inferiors): Update.
7799 * inferiors.h (for_each_inferior_with_data): Declare.
7800 (clear_inferior_list): Declare.
7801 (one_inferior_p): Declare.
7802 (get_first_inferior): Declare.
7803 * linux-low.c (linux_wait_for_event): Replace accessing list
7804 implemention details with API function.
7805 * server.c (target_running): Ditto.
7806 (accumulate_file_name_length): New function.
7807 (emit_dll_description): New function.
7808 (handle_qxfer_libraries): Replace accessing list implemention
7809 details with API function.
7810 (handle_qxfer_threads_worker): New function.
7811 (handle_qxfer_threads_proper): Replace accessing list implemention
7812 details with API function.
7813 (handle_query): Ditto.
7814 (visit_actioned_threads_callback_ftype): New typedef.
7815 (visit_actioned_threads_data): New struct.
7816 (visit_actioned_threads): Rewrite to be find_inferior callback.
7817 (resume): Call find_inferior.
7818 (handle_status): Replace accessing list implemention
7819 details with API function.
7820 (process_serial_event): Replace accessing list implemention details
7822 * target.c (set_desired_inferior): Replace accessing list implemention
7823 details with API function.
7824 * tracepoint.c (same_process_p): New function.
7825 (gdb_agent_about_to_close): Replace accessing list implemention
7826 details with API function.
7827 * win32-low.c (child_delete_thread): Replace accessing list
7828 implemention details with API function.
7829 (match_dll_by_basename): New function.
7830 (dll_is_loaded_by_basename): New function.
7831 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7832 details call to dll_is_loaded_by_basename.
7834 2014-02-19 Doug Evans <dje@google.com>
7836 * dll.h (struct dll_info): Add comment.
7837 * gdbthread.h (struct thread_info): Add comment.
7838 (current_ptid): Simplify.
7839 * inferiors.c (add_process): Update.
7840 (remove_process): Update.
7841 * inferiors.h (struct process_info): Rename member "head" to "entry".
7842 * linux-low.c (delete_lwp): Update.
7844 (last_thread_of_process_p): Update.
7845 (kill_one_lwp_callback, linux_kill): Update.
7846 (status_pending_p_callback): Update.
7847 (wait_for_sigstop): Update. Simplify read of ptid.
7848 (start_step_over): Update.
7849 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7850 (get_lwp_thread): Update.
7851 (struct lwp_info): Rename member "head" to "entry".
7852 * regcache.h (inferior_list_entry): Delete.
7853 * server.c (kill_inferior_callback): Update.
7854 (detach_or_kill_inferior_callback): Update.
7855 (print_started_pid): Update.
7856 (print_attached_pid): Update.
7857 (process_serial_event): Simplify read of ptid.
7858 * thread-db.c (thread_db_create_event): Update.
7859 (thread_db_get_tls_address): Update.
7860 * win32-low.c (current_inferior_ptid): Simplify.
7862 2014-02-19 Tom Tromey <tromey@redhat.com>
7864 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7866 (target_supports_btrace): Update.
7868 2014-02-14 Yao Qi <yao@codesourcery.com>
7870 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7871 (rsp-low-ipa.o): New target.
7873 2014-02-12 Tom Tromey <tromey@redhat.com>
7875 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7876 convert_ascii_to_int.
7877 * regcache.c (registers_to_string): Likewise.
7878 * remote-utils.c (decode_M_packet): Likewise.
7879 * server.c (process_serial_event): Likewise.
7881 2014-02-12 Tom Tromey <tromey@redhat.com>
7883 * server.c (handle_query, handle_v_run): Use hex2bin, not
7885 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7887 2014-02-12 Tom Tromey <tromey@redhat.com>
7889 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7890 convert_int_to_ascii.
7891 * regcache.c (registers_to_string, collect_register_as_string):
7893 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7895 * server.c (process_serial_event): Likewise.
7896 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7897 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7899 2014-02-12 Tom Tromey <tromey@redhat.com>
7901 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7902 bin2hex, not hexify.
7903 * tracepoint.c (cmd_qtstatus): Likewise.
7905 2014-02-12 Tom Tromey <tromey@redhat.com>
7907 * remote-utils.c (monitor_output): Pass explicit length to
7910 2014-02-12 Tom Tromey <tromey@redhat.com>
7912 * tracepoint.c: Include rsp-low.h.
7913 * server.c: Include rsp-low.h.
7914 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7915 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7917 * remote-utils.c: Include rsp-low.h.
7918 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7919 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7920 (convert_int_to_ascii, convert_ascii_to_int): Move to
7922 * regcache.c: Include rsp-low.h.
7923 * ax.c: Include rsp-low.h.
7924 * Makefile.in (SFILES): Add common/rsp-low.c.
7925 (OBS): Add rsp-low.o.
7926 (rsp-low.o): New target.
7928 2014-02-12 Tom Tromey <tromey@redhat.com>
7930 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7931 Include print-utils.h.
7932 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7933 (plongest, thirty_two, phex_nz): Remove.
7934 * Makefile.in (SFILES): Add common/print-utils.c.
7935 (OBS): Add print-utils.o.
7936 (print-utils-ipa.o): New target.
7937 (print-utils.o): New target.
7938 (IPA_OBJS): Add print-utils-ipa.o.
7940 2014-02-06 Tom Tromey <tromey@redhat.com>
7942 * Makefile.in (SFILES): Fix indentation.
7944 2014-02-05 Doug Evans <dje@google.com>
7946 * linux-low.c (linux_wait_for_event): Improve comment.
7947 (linux_wait_1): Keep current_inferior in sync with event_child.
7949 2014-01-22 Doug Evans <dje@google.com>
7951 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7953 2014-01-22 Doug Evans <dje@google.com>
7955 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7956 * configure: Regenerate.
7957 * config.in: Regenerate.
7958 * Makefile.in (SFILES): Add debug.c.
7960 * debug.c: New file.
7961 * debug.h: New file.
7962 * linux-aarch64-low.c (*): Update all debugging printfs to use
7963 debug_printf instead of fprintf.
7964 * linux-arm-low.c (*): Ditto.
7965 * linux-cris-low.c (*): Ditto.
7966 * linux-crisv32-low.c (*): Ditto.
7967 * linux-m32r-low.c (*): Ditto.
7968 * linux-sparc-low.c (*): Ditto.
7969 * linux-x86.c (*): Ditto.
7970 * linux-low.c (*): Ditto.
7971 (linux_wait_1): Add calls to debug_enter, debug_exit.
7972 (linux_wait): Remove redundant debugging printf.
7973 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7974 (linux_resume, unstop_all_lwps): Ditto.
7975 * mem-break.c (*): Update all debugging printfs to use
7976 debug_printf instead of fprintf.
7977 * remote-utils.c (*): Ditto.
7978 * thread-db.c (*): Ditto.
7979 * server.c #include <ctype.h>, "gdb_vecs.h".
7980 (debug_threads): Moved to debug.c.
7981 (*): Update all debugging printfs to use debug_printf instead of
7983 (start_inferior): Replace call to fflush with call to debug_flush.
7984 (monitor_show_help): Mention set debug-format.
7985 (parse_debug_format_options): New function.
7986 (handle_monitor_command): Handle "monitor set debug-format".
7987 (gdbserver_usage): Mention --debug-format.
7988 (main): Parse --debug-format.
7989 * server.h (debug_threads): Declaration moved to debug.h.
7991 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7992 trace_debug_1 that uses debug_printf.
7993 (tracepoint_look_up_symbols): Update all debugging printfs to use
7994 debug_printf instead of fprintf.
7996 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7998 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8001 2014-01-17 Pedro Alves <palves@redhat.com>
8004 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8005 defined after including gdb_proc_service.h.
8007 2014-01-16 Doug Evans <dje@google.com>
8009 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8010 (match_dll): Use it.
8012 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8014 * target.h (target_ops) <read_btrace>: Change parameters and
8015 return type to allow error reporting.
8016 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8017 trace reading errors on.
8018 * linux-low.c (linux_low_read_btrace): Pass trace reading
8020 (linux_low_disable_btrace): New.
8022 2014-01-15 Doug Evans <dje@google.com>
8024 * inferiors.c (thread_id_to_gdb_id): Delete.
8025 * inferiors.h (thread_id_to_gdb_id): Delete.
8027 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8029 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8030 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8033 2014-01-08 Pedro Alves <palves@redhat.com>
8035 * server.c (handle_status): Don't discard previous queued stop
8036 replies or thread's pending status here.
8037 (main) <disconnection>: Do it here instead.
8039 2014-01-08 Pedro Alves <palves@redhat.com>
8041 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8042 * server.c (visit_actioned_threads, handle_pending_status): New
8044 (handle_v_cont): Factor out parts to ...
8045 (resume): ... this new function. If in all-stop, and a thread
8046 being resumed has a pending status, report it without actually
8048 (myresume): Adjust to use the new 'resume' function.
8049 (clear_pending_status_callback, set_pending_status_callback)
8050 (find_status_pending_thread_callback): New functions.
8051 (handle_status): Handle the case of multiple threads having
8052 interesting statuses to report. Report threads' real last signal
8053 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8054 with an interesting thread to report the status for, instead of
8055 always reporting the status of the first thread.
8057 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8059 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8060 * gdbreplay.c (gdbreplay_version): Likewise.
8062 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8064 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8065 iov.iov_len with the real length in use.
8067 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8069 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8070 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8071 for all targets that use win32-low.c.
8072 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8073 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8075 2013-12-13 Pedro Alves <palves@redhat.com>
8077 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8078 if equal to TARGET_WAITKIND_LOADED.
8079 * win32-low.c (cached_status): New static global.
8080 (win32_wait): Add declaration.
8081 (do_initial_child_stuff): Flush all initial pending debug events
8082 up to the initial breakpoint.
8083 (win32_wait): If CACHED_STATUS was set, return that instead
8084 of doing a real wait. Remove the code resuming the execution
8085 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8086 during the initial phase. Also remove the code changing
8087 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8088 TARGET_WAITKIND_STOPPED.
8090 2013-12-11 Yao Qi <yao@codesourcery.com>
8092 * notif.c (handle_notif_ack): Return 0 if no notification
8095 2013-11-20 Doug Evans <dje@google.com>
8097 * linux-low.c (linux_set_resume_request): Fix comment.
8099 2013-11-20 Doug Evans <dje@google.com>
8101 * linux-low.c (resume_status_pending_p): Tweak comment.
8103 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8105 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8106 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8107 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8108 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8109 (srv_amd64_regobj): Add amd64-mpx.o.
8110 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8111 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8112 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8113 * i387-fp.c (num_pl_bnd_register) Added constant.
8114 (num_pl_bnd_cfg_registers) Added constant.
8115 (struct i387_xsave) Added reserved area and MPX fields.
8116 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8117 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8119 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8120 (init_registers_amd64_mpx_linux): Declare new function.
8121 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8122 (x86_64_regmap): Add MPX registers.
8123 (x86_linux_read_description): Add MPX case.
8124 (initialize_low_arch): Initialize MPX targets.
8126 2013-11-18 Tom Tromey <tromey@redhat.com>
8128 * configure: Rebuild.
8129 * configure.ac: Don't check for stdlib.h.
8130 * gdbreplay.c: Unconditionally include stdlib.h.
8132 2013-11-18 Tom Tromey <tromey@redhat.com>
8134 * config.in: Rebuild.
8135 * configure: Rebuild.
8136 * configure.ac: Don't use AC_HEADER_DIRENT.
8138 2013-11-18 Tom Tromey <tromey@redhat.com>
8140 * server.h: Don't check HAVE_STRING_H.
8141 * gdbreplay.c: Don't check HAVE_STRING_H.
8142 * configure: Rebuild.
8144 2013-11-18 Tom Tromey <tromey@redhat.com>
8146 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8149 2013-11-08 Tom Tromey <tromey@redhat.com>
8151 * configure, config.in: Rebuild.
8152 * configure.ac: Remove unused configury.
8154 2013-11-08 Tom Tromey <tromey@redhat.com>
8156 * acinclude.m4: Include common.m4, codeset.m4.
8157 * configure, config.in: Rebuild.
8158 * configure.ac: Use GDB_AC_COMMON.
8160 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8162 * linux-s390-low.c (HWCAP_S390_TE): New define.
8163 (s390_arch_setup): Consider the TE field in the HWCAP for
8164 determining 'have_regset_tdb'.
8166 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8169 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8172 2013-10-02 Pedro Alves <palves@redhat.com>
8174 * server.c (process_serial_event): Don't output "GDBserver
8175 exiting" if GDB is connected through stdio.
8176 * target.c (mywait): Likewise, be silent if GDB is connected
8179 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8181 * lynx-low.c (lynx_add_threads_after_attach): New function.
8182 (lynx_attach): Remove call to add_thread. Add call to
8183 lynx_add_threads_after_attach instead.
8185 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8187 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8188 * config.in, configure: Regenerated.
8190 2013-09-18 Yao Qi <yao@codesourcery.com>
8193 * server.c (start_inferior): Clear 'resume_info'.
8195 2013-09-16 Jiong Wang <jiwang@tilera.com>
8197 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8200 2013-09-16 Jiong Wang <jiwang@tilera.com>
8202 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8203 linux-tile-low.o to srv_tgtobj.
8205 2013-09-16 Will Newton <will.newton@linaro.org>
8207 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8210 2013-09-06 Pedro Alves <palves@redhat.com>
8212 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8213 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8214 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8215 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8216 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8217 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8219 2013-09-06 Pedro Alves <palves@redhat.com>
8221 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8222 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8224 2013-09-06 Pedro Alves <palves@redhat.com>
8226 * linux-amd64-ipa.c: Include tracepoint.h.
8227 * linux-i386-ipa.c: Include tracepoint.h.
8229 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8231 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8232 (ps_get_thread_area): New function.
8234 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8236 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8237 (initialize_low_arch): Call init_registers_crisv32 rather than
8238 init_register_crisv32.
8240 2013-09-05 Pedro Alves <palves@redhat.com>
8242 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8244 * hostio.h: ... this new file.
8245 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8246 win32-low.c: Include hostio.h.
8248 2013-09-05 Pedro Alves <palves@redhat.com>
8250 * server.h (gdb_client_data, handler_func, callback_handler_func)
8251 (delete_file_handler, add_file_handler, append_callback_event)
8252 (delete_callback_event, start_event_loop, initialize_event_loop):
8253 Move to event-loop.h and include it.
8254 * event-loop.h: New file.
8256 2013-09-05 Pedro Alves <palves@redhat.com>
8258 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8259 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8260 (loaded_dll, unloaded_dll): Move to ...
8261 * dll.h: ... this new file.
8262 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8264 2013-09-05 Pedro Alves <palves@redhat.com>
8266 * server.h (current_process, get_thread_process, all_processes)
8267 (add_inferior_to_list, for_each_inferior, current_inferior)
8268 (remove_inferior, add_process, remove_process, find_process_pid)
8269 (have_started_inferiors_p, have_attached_inferiors_p)
8270 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8271 (clear_inferiors, find_inferior, find_inferior_id)
8272 (inferior_target_data, set_inferior_target_data)
8273 (inferior_regcache_data, set_inferior_regcache_data): Move to
8274 inferiors.h, and include it.
8275 * inferiors.h: New file.
8277 2013-09-05 Pedro Alves <palves@redhat.com>
8279 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8283 2013-09-05 Pedro Alves <palves@redhat.com>
8285 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8287 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8288 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8289 (handle_tracepoint_general_set, handle_tracepoint_query)
8290 (tracepoint_finished_step, tracepoint_was_hit)
8291 (release_while_stepping_state_list, current_traceframe)
8292 (in_readonly_region, traceframe_read_mem)
8293 (fetch_traceframe_registers, traceframe_read_sdata)
8294 (traceframe_read_info, struct fast_tpoint_collect_status)
8295 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8296 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8297 (supply_fast_tracepoint_registers)
8298 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8299 (ipa_tdesc, claim_trampoline_space)
8300 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8301 (agent_mem_read, agent_get_trace_state_variable_value)
8302 (agent_set_trace_state_variable_value, agent_tsv_read)
8303 (agent_mem_read_string, get_raw_reg_func_addr)
8304 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8305 * tracepoint.h: ... this new file.
8307 2013-09-05 Pedro Alves <palves@redhat.com>
8309 * server.h (perror_with_name, error, fatal, warning, paddress)
8310 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8312 * utils.h: New file.
8314 2013-09-05 Pedro Alves <palves@redhat.com>
8316 * server.h (remote_debug, noack_mode, transport_is_reliable)
8317 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8318 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8319 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8320 (write_enn, initialize_async_io, enable_async_io)
8321 (disable_async_io, check_remote_input_interrupt_request)
8322 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8323 (dead_thread_notify, prepare_resume_reply)
8324 (decode_address_to_semicolon, decode_address, decode_m_packet)
8325 (decode_M_packet, decode_X_packet, decode_xfer_write)
8326 (decode_search_memory_packet, unhexify, hexify)
8327 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8328 (look_up_one_symbol, relocate_instruction)
8329 (monitor_output): Move to remote-utils.h, and include it.
8330 * remote-utils.h: New file.
8332 2013-09-05 Pedro Alves <palves@redhat.com>
8334 * server.h (_): Delete.
8336 2013-09-02 Pedro Alves <palves@redhat.com>
8338 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8339 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8341 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8343 2013-09-02 Pierre Muller <muller@sourceware.org>
8345 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8346 or WriteProcessMemory complete successfully and handle
8347 ERROR_PARTIAL_COPY error.
8349 2013-09-02 Pedro Alves <palves@redhat.com>
8351 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8352 error instead of EIO.
8354 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8357 * linux-low.c: Include filestuff.h.
8358 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8359 * lynx-low.c: Include filestuff.h.
8360 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8361 * server.c: Include filestuff.h.
8362 (main): Call notice_open_fds.
8363 * spu-low.c: Include filestuff.h.
8364 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8366 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8368 * Makefile.in: Explain why ../target and ../nat are not
8369 listed as include file search paths.
8370 (linux-waitpid.o): New object file rule.
8371 * configure.srv (srv_native_linux_obj): New variable.
8372 Replace all occurrences of linux native object files with
8373 $srv_native_linux_obj.
8374 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8375 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8376 (linux_enable_event_reporting): Remove declaration.
8377 (my_waitpid): Moved to common/linux-waitpid.c.
8378 (linux_wait_for_event): Pass ptid when calling
8379 linux_enable_event_reporting.
8380 (linux_supports_tracefork_flag): Remove.
8381 (linux_enable_event_reporting): Likewise.
8382 (linux_tracefork_grandchild): Remove.
8383 (STACK_SIZE): Moved to common/linux-ptrace.c.
8384 (linux_tracefork_child): Remove.
8385 (linux_test_for_tracefork): Remove.
8386 (linux_look_up_symbols): Call linux_supports_traceclone.
8387 (initialize_low): Remove call to linux_test_for_tracefork.
8388 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8389 common/linux-ptrace.h.
8390 (PTRACE_TYPE_ARG4): Likewise.
8391 Include linux-ptrace.h.
8393 2013-08-21 Pedro Alves <palves@redhat.com>
8395 * config.in: Renegerate.
8397 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8399 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8400 (SFILES): Remove $(srcdir)/common/target-common.c and
8401 add $(srcdir)/target/waitstatus.c.
8402 (OBS): Remove target-common.o and add waitstatus.o.
8403 (server_h): Remove $(srcdir)/../common/target-common.h and
8404 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8405 and $(srcdir)/../target/waitstatus.h.
8406 (target-common.o): Remove.
8407 (waitstatus.o): New target object file.
8408 * target.h: Do not include target-common.h and
8409 include target/resume.h, target/wait.h and
8410 target/waitstatus.h.
8412 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8414 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8415 to PTRACE_TYPE_ARG3.
8416 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8417 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8419 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8420 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8422 2013-07-27 Jie Zhang <jie@codesourcery.com>
8423 Daniel Jacobowitz <dan@codesourcery.com>
8424 Yao Qi <yao@codesourcery.com>
8426 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8427 (mips-linux-watch.o): New rule.
8428 (mips_linux_watch_h): New variable.
8429 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8431 * linux-mips-low.c: Include mips-linux-watch.h.
8432 (struct arch_process_info, struct arch_lwp_info): New.
8433 (update_watch_registers_callback): New function.
8434 (mips_linux_new_process, mips_linux_new_thread) New functions.
8435 (mips_linux_prepare_to_resume, mips_insert_point): New
8437 (mips_remove_point, mips_stopped_by_watchpoint): New
8439 (rsp_bp_type_to_target_hw_bp_type): New function.
8440 (mips_stopped_data_address): New function.
8441 (the_low_target): Add watchpoint support functions.
8443 2013-07-27 Yao Qi <yao@codesourcery.com>
8445 * i386-low.c: Include break-common.h.
8446 (enum target_hw_bp_type): Remove.
8448 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8450 * Makefile.in (SFILES): /common/target-common.c.
8451 (OBS): Add target-common.o.
8452 (server_h): Add $(srcdir)/../common/target-common.h.
8453 (target-common.o): New target.
8454 * server.c (queue_stop_reply_callback): Free
8455 status string after use.
8456 * target.c (target_waitstatus_to_string): Remove.
8457 * target.h: Include target-common.h.
8458 (resume_kind): Likewise.
8459 (target_waitkind): Likewise.
8460 (target_waitstatus): Likewise.
8461 (TARGET_WNOHANG): Likewise.
8463 2013-07-04 Yao Qi <yao@codesourcery.com>
8465 * Makefile.in (host_alias): Use @host_noncanonical@.
8466 (target_alias): Use @target_noncanonical@.
8467 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8468 ACX_NONCANONICAL_HOST.
8469 * configure: Regenerated.
8472 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8474 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8475 * configure: Rebuild.
8476 * Makefile.in (version_host, version_target): Get from configure.
8477 (version.c): Use $(version_host) and $(version_target).
8479 2013-07-03 Pedro Alves <palves@redhat.com>
8481 * Makefile.in (config.status): Depend on development.sh.
8482 * acinclude.m4: Include libmcheck.m4.
8483 * configure: Regenerate.
8485 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8487 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8488 attribute inside the parentheses.
8489 (winapi_DebugSetProcessKillOnExit): Ditto.
8490 (winapi_DebugBreakProcess): Ditto.
8491 (winapi_GenerateConsoleCtrlEvent): Ditto.
8493 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8495 * notif.h (notif_event): Add a dummy member to avoid compiler
8498 2013-07-01 Pedro Alves <palves@redhat.com>
8500 * hostio.c (HOSTIO_PATH_MAX): Define.
8501 (require_filename, handle_open, handle_unlink, handle_readlink):
8504 2013-07-01 Pedro Alves <palves@redhat.com>
8506 * server.h: Include "pathmax.h".
8507 * linux-low.c: Don't include sys/param.h.
8508 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8510 * win32-low.c: Don't include sys/param.h.
8511 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8513 2013-07-01 Pedro Alves <palves@redhat.com>
8515 * event-loop.c: Don't check HAVE_UNISTD_H before including
8517 * gdbreplay.c: Likewise.
8518 * remote-utils.c: Likewise.
8519 * server.c: Likewise.
8520 * configure.ac: Don't check for unistd.h.
8521 * configure: Regenerate.
8523 2013-06-28 Tom Tromey <tromey@redhat.com>
8525 * Makefile.in (version.c): Use version.in, not
8528 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8530 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8531 * configure: Rebuild.
8532 * Makefile.in (version_host, version_target): Get from configure.
8533 (version.c): Use $(version_host) and $(version_target).
8535 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8537 Fix trace-status to output user name without trailing colon.
8538 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8540 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8542 Fix trace-status to output proper start-time and stop-time.
8543 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8544 output start time and stop time in hex as gdb expects.
8546 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8548 * tracepoint.c (build_traceframe_info_xml): Output trace state
8549 variables present in the trace buffer.
8551 2013-06-24 Tom Tromey <tromey@redhat.com>
8553 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8555 (version.o): Remove.
8556 * gdbreplay.c: Include version.h.
8557 (version, host_name): Don't declare.
8558 * server.h: Include version.h.
8559 (version, host_name): Don't declare.
8561 2013-06-12 Pedro Alves <palves@redhat.com>
8563 * linux-x86-low.c (linux_is_elf64): Delete global.
8564 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8565 with local linux_pid_exe_is_elf_64_file use.
8567 2013-06-11 Pedro Alves <palves@redhat.com>
8569 * linux-low.c (regset_disabled, disable_regset): New functions.
8570 (regsets_fetch_inferior_registers)
8571 (regsets_store_inferior_registers): Use them.
8572 (initialize_regsets_info); Don't allocate the disabled_regsets
8574 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8577 2013-06-11 Pedro Alves <palves@redhat.com>
8579 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8582 2013-06-11 Pedro Alves <palves@redhat.com>
8584 * linux-x86-low.c (initialize_low_arch): Call
8585 init_registers_x32_avx_linux.
8587 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8589 Fix compatibility with Android Bionic.
8590 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8593 2013-06-07 Pedro Alves <palves@redhat.com>
8596 * Makefile.in (OBS): Add tdesc.o.
8597 (IPA_OBJS): Add tdesc-ipa.o.
8598 (tdesc-ipa.o): New rule.
8599 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8601 * linux-low.c (new_inferior): Delete.
8602 (disabled_regsets, num_regsets): Delete.
8603 (linux_add_process): Adjust to set the new per-process
8605 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8606 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8607 was a stop. When calling arch_setup, switch the current inferior
8608 to the thread that got an event.
8609 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8610 (regsets_fetch_inferior_registers)
8611 (regsets_store_inferior_registers): New regsets_info parameter.
8613 (linux_register_in_regsets): New regs_info parameter. Adjust to
8615 (register_addr, fetch_register, store_register): New usrregs_info
8616 parameter. Adjust to use it.
8617 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8618 parameter regs_info. Adjust to use it.
8619 (linux_fetch_registers): Get the current inferior's regs_info, and
8621 (linux_store_registers): Ditto.
8622 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8623 (initialize_low): Don't initialize the target_regsets here. Call
8624 initialize_low_arch.
8625 * linux-low.h (target_regsets): Delete declaration.
8626 (struct regsets_info): New.
8627 (struct usrregs_info): New.
8628 (struct regs_info): New.
8629 (struct process_info_private) <new_inferior>: New field.
8630 (struct linux_target_ops): Delete the num_regs, regmap, and
8631 regset_bitmap fields. New field regs_info.
8632 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8633 * i387-fp.c (num_xmm_registers): Delete.
8634 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8635 calls to new interface.
8636 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8637 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8638 Infer the number of xmm registers from the regcache's target
8640 * i387-fp.h (num_xmm_registers): Delete.
8641 * inferiors.c (add_thread): Don't install the thread's regcache
8643 * proc-service.c (gregset_info): Fetch the current inferior's
8644 regs_info. Adjust to use it.
8645 * regcache.c: Include tdesc.h.
8646 (register_bytes, reg_defs, num_registers)
8647 (gdbserver_expedite_regs): Delete.
8648 (get_thread_regcache): If the thread doesn't have a regcache yet,
8649 create one, instead of aborting gdbserver.
8650 (regcache_invalidate_one): Rename to ...
8651 (regcache_invalidate_thread): ... this.
8652 (regcache_invalidate_one): New.
8653 (regcache_invalidate): Only invalidate registers of the current
8655 (init_register_cache): Add target_desc parameter, and use it.
8656 (new_register_cache): Ditto. Assert the target description has a
8657 non zero registers_size.
8658 (regcache_cpy): Add assertions. Adjust.
8659 (realloc_register_cache, set_register_cache): Delete.
8660 (registers_to_string, registers_from_string): Adjust.
8661 (find_register_by_name, find_regno, find_register_by_number)
8662 (register_cache_size): Add target_desc parameter, and use it.
8663 (free_register_cache_thread, free_register_cache_thread_one)
8664 (regcache_release, register_cache_size): New.
8665 (register_size): Add target_desc parameter, and use it.
8666 (register_data, supply_register, supply_register_zeroed)
8667 (supply_regblock, supply_register_by_name, collect_register)
8668 (collect_register_as_string, collect_register_by_name): Adjust.
8669 * regcache.h (struct target_desc): Forward declare.
8670 (struct regcache) <tdesc>: New field.
8671 (init_register_cache, new_register_cache): Add target_desc
8673 (regcache_invalidate_thread): Declare.
8674 (regcache_invalidate_one): Delete declaration.
8675 (regcache_release): Declare.
8676 (find_register_by_number, register_cache_size, register_size)
8677 (find_regno): Add target_desc parameter.
8678 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8680 * remote-utils.c: Include tdesc.h.
8681 (outreg, prepare_resume_reply): Adjust.
8682 * server.c: Include tdesc.h.
8683 (gdbserver_xmltarget): Delete declaration.
8684 (get_features_xml, process_serial_event): Adjust.
8685 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8687 (struct process_info) <tdesc>: New field.
8688 (ipa_tdesc): Declare.
8689 * tdesc.c: New file.
8690 * tdesc.h: New file.
8691 * tracepoint.c: Include tdesc.h.
8692 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8693 (get_context_regcache): Adjust to pass ipa_tdesc down.
8694 (do_action_at_tracepoint): Adjust to get the register cache size
8695 from the context regcache's description.
8696 (traceframe_walk_blocks): Adjust to get the register cache size
8697 from the current trace frame's description.
8698 (traceframe_get_pc): Adjust to get current trace frame's
8699 description and pass it down.
8700 (gdb_collect): Adjust to get the register cache size from the
8702 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8703 (gdbserver_xmltarget): Delete.
8704 (initialize_low_tracepoint): Set the ipa's target description.
8705 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8706 (initialize_low_tracepoint): Set the ipa's target description.
8707 * linux-x86-low.c: Include tdesc.h.
8708 [__x86_64__] (is_64bit_tdesc): New.
8709 (ps_get_thread_area, x86_get_thread_area): Use it.
8710 (i386_cannot_store_register): Rename to ...
8711 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8712 (i386_cannot_fetch_register): Rename to ...
8713 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8714 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8716 (target_regsets): Rename to ...
8717 (x86_regsets): ... this.
8718 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8720 (x86_siginfo_fixup): Use is_64bit_tdesc.
8721 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8722 (tdesc_x32_avx_linux, tdesc_x32_linux)
8723 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8725 (x86_linux_update_xmltarget): Delete.
8726 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8727 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8728 (AMD64_LINUX_USER64_CS): New.
8729 (x86_linux_read_description): New, based on
8730 x86_linux_update_xmltarget.
8731 (same_process_callback): New.
8732 (x86_arch_setup_process_callback): New.
8733 (x86_linux_update_xmltarget): New.
8734 (x86_regsets_info): New.
8735 (amd64_linux_regs_info): New.
8736 (i386_linux_usrregs_info): New.
8737 (i386_linux_regs_info): New.
8738 (x86_linux_regs_info): New.
8739 (x86_arch_setup): Reimplement.
8740 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8741 (x86_emit_ops): Ditto.
8742 (the_low_target): Adjust. Install x86_linux_regs_info,
8743 x86_cannot_fetch_register, and x86_cannot_store_register.
8744 (initialize_low_arch): New.
8745 * linux-ia64-low.c (tdesc_ia64): Declare.
8746 (ia64_fetch_register): Adjust.
8747 (ia64_usrregs_info, regs_info): New globals.
8748 (ia64_regs_info): New function.
8749 (the_low_target): Adjust.
8750 (initialize_low_arch): New function.
8751 * linux-sparc-low.c (tdesc_sparc64): Declare.
8752 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8754 (sparc_arch_setup): New function.
8755 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8756 (the_low_target): Adjust.
8757 (initialize_low_arch): New function.
8758 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8759 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8760 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8761 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8762 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8763 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8764 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8765 (tdesc_powerpc_isa205_vsx64l): Declare.
8766 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8767 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8768 (ppc_set_pc, ppc_get_hwcap): Adjust.
8769 (ppc_usrregs_info): Forward declare.
8770 (!__powerpc64__) ppc_regmap_adjusted: New global.
8771 (ppc_arch_setup): Adjust to the current process'es target
8773 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8774 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8775 (ppc_store_evrregset): Adjust.
8776 (target_regsets): Rename to ...
8777 (ppc_regsets): ... this, and make static.
8778 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8779 (ppc_regs_info): New function.
8780 (the_low_target): Adjust.
8781 (initialize_low_arch): New function.
8782 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8783 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8784 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8785 (tdesc_s390x_linux64v2): Declare.
8786 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8787 (s390_fill_gregset, s390_store_last_break): Adjust.
8788 (target_regsets): Rename to ...
8789 (s390_regsets): ... this, and make static.
8790 (s390_get_pc, s390_set_pc): Adjust.
8791 (s390_get_hwcap): New target_desc parameter, and use it.
8792 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8793 (s390_arch_setup): Adjust to set the current process'es target
8794 description. Don't adjust the regmap.
8795 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8796 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8797 (regs_info_3264): New globals.
8798 (s390_regs_info): New function.
8799 (the_low_target): Adjust.
8800 (initialize_low_arch): New function.
8801 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8802 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8803 [__mips64] (init_registers_mips_linux)
8804 (init_registers_mips_dsp_linux): Delete defines.
8805 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8806 (have_dsp): New global.
8807 (mips_read_description): New, based on mips_arch_setup.
8808 (mips_arch_setup): Reimplement.
8809 (get_usrregs_info): New function.
8810 (mips_cannot_fetch_register, mips_cannot_store_register)
8811 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8812 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8813 (target_regsets): Rename to ...
8814 (mips_regsets): ... this, and make static.
8815 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8816 (dsp_regs_info, regs_info): New globals.
8817 (mips_regs_info): New function.
8818 (the_low_target): Adjust.
8819 (initialize_low_arch): New function.
8820 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8821 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8823 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8824 (arm_read_description): New, with bits factored from
8826 (arm_arch_setup): Reimplement.
8827 (target_regsets): Rename to ...
8828 (arm_regsets): ... this, and make static.
8829 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8830 (arm_regs_info): New function.
8831 (the_low_target): Adjust.
8832 (initialize_low_arch): New function.
8833 * linux-m68k-low.c (tdesc_m68k): Declare.
8834 (target_regsets): Rename to ...
8835 (m68k_regsets): ... this, and make static.
8836 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8837 (m68k_regs_info): New function.
8838 (m68k_arch_setup): New function.
8839 (the_low_target): Adjust.
8840 (initialize_low_arch): New function.
8841 * linux-sh-low.c (tdesc_sharch): Declare.
8842 (target_regsets): Rename to ...
8843 (sh_regsets): ... this, and make static.
8844 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8845 (sh_regs_info, sh_arch_setup): New functions.
8846 (the_low_target): Adjust.
8847 (initialize_low_arch): New function.
8848 * linux-bfin-low.c (tdesc_bfin): Declare.
8849 (bfin_arch_setup): New function.
8850 (bfin_usrregs_info, regs_info): New globals.
8851 (bfin_regs_info): New function.
8852 (the_low_target): Adjust.
8853 (initialize_low_arch): New function.
8854 * linux-cris-low.c (tdesc_cris): Declare.
8855 (cris_arch_setup): New function.
8856 (cris_usrregs_info, regs_info): New globals.
8857 (cris_regs_info): New function.
8858 (the_low_target): Adjust.
8859 (initialize_low_arch): New function.
8860 * linux-cris-low.c (tdesc_crisv32): Declare.
8861 (cris_arch_setup): New function.
8862 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8863 (cris_regs_info): New function.
8864 (the_low_target): Adjust.
8865 (initialize_low_arch): New function.
8866 * linux-m32r-low.c (tdesc_m32r): Declare.
8867 (m32r_arch_setup): New function.
8868 (m32r_usrregs_info, regs_info): New globals.
8869 (m32r_regs_info): Adjust.
8870 (initialize_low_arch): New function.
8871 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8872 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8873 (tic6x_usrregs_info): Forward declare.
8874 (tic6x_read_description): New function, based on ...
8875 (tic6x_arch_setup): ... this. Reimplement.
8876 (target_regsets): Rename to ...
8877 (tic6x_regsets): ... this, and make static.
8878 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8879 (tic6x_regs_info): New function.
8880 (the_low_target): Adjust.
8881 (initialize_low_arch): New function.
8882 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8883 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8884 (target_regsets): Rename to ...
8885 (xtensa_regsets): ... this, and make static.
8886 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8888 (xtensa_arch_setup, xtensa_regs_info): New functions.
8889 (the_low_target): Adjust.
8890 (initialize_low_arch): New function.
8891 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8892 (nios2_arch_setup): Set the current process'es tdesc.
8893 (target_regsets): Rename to ...
8894 (nios2_regsets): ... this.
8895 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8896 (nios2_regs_info): New function.
8897 (the_low_target): Adjust.
8898 (initialize_low_arch): New function.
8899 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8900 (aarch64_arch_setup): Set the current process'es tdesc.
8901 (target_regsets): Rename to ...
8902 (aarch64_regsets): ... this.
8903 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8904 (aarch64_regs_info): New function.
8905 (the_low_target): Adjust.
8906 (initialize_low_arch): New function.
8907 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8909 (target_regsets): Rename to ...
8910 (tile_regsets): ... this.
8911 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8912 (tile_regs_info): New function.
8913 (tile_arch_setup): Set the current process'es tdesc.
8914 (the_low_target): Adjust.
8915 (initialize_low_arch): New function.
8916 * spu-low.c (tdesc_spu): Declare.
8917 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8918 * win32-arm-low.c (tdesc_arm): Declare.
8919 (arm_arch_setup): New function.
8920 (the_low_target): Install arm_arch_setup instead of
8922 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8923 (init_windows_x86): Rename to ...
8924 (i386_arch_setup): ... this. Set `win32_tdesc'.
8925 (the_low_target): Adjust.
8926 * win32-low.c (win32_tdesc): New global.
8927 (child_add_thread): Don't create the thread cache here.
8928 (do_initial_child_stuff): Set the new process'es tdesc.
8929 * win32-low.h (struct target_desc): Forward declare.
8930 (win32_tdesc): Declare.
8931 * lynx-i386-low.c (tdesc_i386): Declare global.
8932 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8933 * lynx-low.c (lynx_tdesc): New global.
8934 (lynx_add_process): Set the new process'es tdesc.
8935 * lynx-low.h (struct target_desc): Forward declare.
8936 (lynx_tdesc): Declare global.
8937 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8938 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8939 * nto-low.c (nto_tdesc): New global.
8940 (do_attach): Set the new process'es tdesc.
8941 * nto-low.h (struct target_desc): Forward declare.
8942 (nto_tdesc): Declare.
8943 * nto-x86-low.c (tdesc_i386): Declare.
8944 (nto_x86_arch_setup): Set `nto_tdesc'.
8946 2013-06-04 Gary Benson <gbenson@redhat.com>
8948 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8949 to qSupported response when appropriate.
8950 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8951 with nonzero-length annex.
8952 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8953 arguments supplied in annex.
8955 2013-05-31 Doug Evans <dje@google.com>
8958 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8959 64 bits in 64-cross-32 environment.
8961 2013-05-28 Pedro Alves <palves@redhat.com>
8963 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8964 (aarch64-without-fpu.c): Delete rule.
8965 * configure.srv (aarch64*-*-linux*): Remove references to
8966 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8967 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8970 2013-05-24 Pedro Alves <palves@redhat.com>
8972 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8973 instead of strchr/decode_address. Error if the range isn't split
8974 with a ','. Don't assume there's be a ':' in the action.
8976 2013-05-23 Yao Qi <yao@codesourcery.com>
8977 Pedro Alves <palves@redhat.com>
8979 * linux-low.c (lwp_in_step_range): New function.
8980 (linux_wait_1): If the thread was range stepping and stopped
8981 outside the stepping range, report the stop to GDB. Otherwise,
8982 continue stepping. Add range stepping debug output.
8983 (linux_set_resume_request): Copy the step range from the resume
8985 (linux_supports_range_stepping): New.
8986 (linux_target_ops) <supports_range_stepping>: Set to
8987 linux_supports_range_stepping.
8988 * linux-low.h (struct linux_target_ops)
8989 <supports_range_stepping>: New field.
8990 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8991 * linux-x86-low.c (x86_supports_range_stepping): New.
8992 (the_low_target) <supports_range_stepping>: Set to
8993 x86_supports_range_stepping.
8994 * server.c (handle_v_cont): Handle 'r' action.
8995 (handle_v_requests): Append ";r" if the target supports range
8997 * target.h (struct thread_resume) <step_range_start,
8998 step_range_end>: New fields.
8999 (struct target_ops) <supports_range_stepping>:
9001 (target_supports_range_stepping): New macro.
9003 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9005 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9006 confusion in comment.
9008 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9010 * lynx-low.c (struct process_info_private): New type.
9011 (lynx_add_process): New function.
9012 (lynx_create_inferior, lynx_attach): Replace calls to
9013 add_process by calls to lynx_add_process.
9014 (lynx_resume): If PTID is null, then try using
9015 current_process()->private->last_wait_event_ptid.
9017 (lynx_clear_inferiors): Delete. The contents of that function
9018 has been inlined in lynx_mourn;
9019 (lynx_wait_1): Save the ptid in the process's private data.
9020 (lynx_mourn): Free the process' private data. Replace call
9021 to lynx_clear_inferiors by call to clear_inferiors.
9023 2013-05-17 Yao Qi <yao@codesourcery.com>
9025 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9028 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9030 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9031 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9032 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9033 PT_TEXT_END_ADDR guards. Update comments.
9034 (linux_target_op) <read_offsets>: Conditionally define to
9035 linux_read_offsets if the target is UCLIBC and if it defines
9036 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9038 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9039 Andrew Jenner <andrew@codesourcery.com>
9041 * Makefile.in (SFILES): Add linux-nios2-low.c.
9042 (clean): Add action to delete nios2-linux.c.
9043 (nios2-linux.c): New rule.
9044 * configure.srv: Add nios2*-*-linux*.
9045 * linux-nios2-low.c: New.
9047 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9049 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9051 2013-04-25 Hui Zhu <hui@codesourcery.com>
9054 * ax.c (ax_printf): Add fflush.
9056 2013-04-22 Tom Tromey <tromey@redhat.com>
9058 * Makefile.in (SFILES): Add filestuff.c.
9059 (OBS): Add filestuff.o.
9060 (filestuff.o): New target.
9061 * config.in, configure: Rebuild.
9062 * configure.ac: Check for fdwalk, pipe2.
9064 2013-04-17 Pedro Alves <palves@redhat.com>
9066 * configure.ac (USE_THREAD_DB): Delete variable.
9067 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9068 Don't AC_SUBST USE_THREAD_DB.
9069 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9070 * config.in, configure: Regenerate.
9072 2013-04-16 Pedro Alves <palves@redhat.com>
9074 * linux-low.h (struct lwp_info) <thread_known>: Move under
9075 the USE_THREAD_DB #ifdef.
9077 2013-04-16 Pedro Alves <palves@redhat.com>
9079 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9080 (linux-low.o): Delete rule.
9081 * linux-low.h: Always include "gdb_thread_db.h" instead of
9082 conditionally including thread_db.h.
9083 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9086 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9088 * Makefile.in (install-only): Fix make install regression.
9090 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9092 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9093 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9095 * gdbserver.1: Remove.
9097 2013-03-22 Pedro Alves <palves@redhat.com>
9099 * linux-low.c (handle_extended_wait): Don't call
9100 linux_enable_event_reporting.
9102 2013-03-15 Tony Theodore <tonyt@logyst.com>
9105 * Makefile.in (SHELL): Use @SHELL@.
9107 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9109 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9112 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9114 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9115 Remove extraneous NULL element.
9117 2013-03-13 Yao Qi <yao@codesourcery.com>
9119 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9120 'V' block in trace frame.
9122 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9124 * target.h (struct target_ops): Add btrace ops.
9125 (target_supports_btrace): New macro.
9126 (target_enable_btrace): New macro.
9127 (target_disable_btrace): New macro.
9128 (target_read_btrace): New macro.
9129 * gdbthread.h (struct thread_info): Add btrace field.
9130 * server.c: Include btrace-common.h.
9131 (handle_btrace_general_set): New function.
9132 (handle_btrace_enable): New function.
9133 (handle_btrace_disable): New function.
9134 (handle_general_set): Call handle_btrace_general_set.
9135 (handle_qxfer_btrace): New function.
9136 (struct qxfer qxfer_packets[]): Add btrace entry.
9137 * inferiors.c (remove_thread): Disable btrace.
9138 * linux-low: Include linux-btrace.h.
9139 (linux_low_enable_btrace): New function.
9140 (linux_low_read_btrace): New function.
9141 (linux_target_ops): Add btrace ops.
9142 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9143 Add srv_linux_btrace=yes.
9144 (x86_64-*-linux*): Add linux-btrace.o.
9145 Add srv_linux_btrace=yes.
9146 * configure.ac: Define HAVE_LINUX_BTRACE.
9147 * config.in: Regenerated.
9148 * configure: Regenerated.
9150 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9152 * server.c (handle_qxfer): Preserve error message if -3 is
9154 (qxfer): Document the -3 return value.
9156 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9158 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9159 (linux_btrace_h): New variable.
9160 (linux-btrace.o): New rule.
9162 2013-03-08 Stan Shebs <stan@codesourcery.com>
9163 Hafiz Abid Qadeer <abidh@codesourcery.com>
9165 * tracepoint.c (trace_buffer_size): New global.
9166 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9167 (init_trace_buffer): Change to one-argument function. Allocate
9168 trace buffer memory.
9169 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9170 handle QTBuffer:size packet.
9171 (cmd_bigqtbuffer_size): New function.
9172 (initialize_tracepoint): Call init_trace_buffer with
9173 DEFAULT_TRACE_BUFFER_SIZE.
9174 * server.c (handle_query): Add QTBuffer:size in the
9177 2013-03-07 Yao Qi <yao@codesourcery.com>
9179 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9180 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9182 (cmd_qtsp): Adjust condition. Do post increment.
9183 Set cur_action and cur_step_action back to 0.
9185 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9188 * linux-low.c (linux_write_memory): Return early success if LEN is
9191 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9193 * configure.srv: Add x86_64-*-cygwin* as target.
9195 2013-02-28 Tom Tromey <tromey@redhat.com>
9197 * configure.ac: Invoke AC_SYS_LARGEFILE.
9198 * configure, config.in: Rebuild.
9200 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9202 * win32-low.c: Throughout, fix format strings and casts of
9203 printf-like functions to avoid type related warnings on all
9205 (get_child_debug_event): Print dwDebugEventCode as hex since
9206 that's how it's usually documented.
9208 2013-02-28 Yao Qi <yao@codesourcery.com>
9210 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9213 2013-02-27 Jiong Wang <jiwang@tilera.com>
9215 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9216 (reg-tilegx32.c): New rule.
9217 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9218 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9219 different register info initializer according to elf class.
9220 (init_registers_tilgx32): New function. The tilegx32 register info
9222 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9223 (tile_store_gregset): Likewise.
9225 2013-02-27 Yao Qi <yao@codesourcery.com>
9227 * server.c (process_point_options): Print debug message when
9228 debug_threads is true.
9230 2013-02-26 Yao Qi <yao@codesourcery.com>
9232 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9234 2013-02-19 Pedro Alves <palves@redhat.com>
9235 Kai Tietz <ktietz@redhat.com>
9239 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9240 instead of strtoul to extract address from packet.
9241 (process_serial_event) <'z'>: Likewise.
9243 2013-02-18 Yao Qi <yao@codesourcery.com>
9245 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9247 2013-02-14 Pedro Alves <palves@redhat.com>
9251 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9252 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9254 2013-02-14 Pedro Alves <palves@redhat.com>
9256 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9258 2013-02-14 Pedro Alves <palves@redhat.com>
9260 * tracepoint.c (save_string): Delete.
9261 (add_tracepoint_action): Use savestring instead of save_string.
9263 2013-02-12 Pedro Alves <palves@redhat.com>
9265 * linux-xtensa-low.c: Ditto.
9266 * xtensa-xtregs.c: Ditto.
9268 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9270 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9273 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9275 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9276 aarch64_num_wp_regs and aarch64_num_bp_regs to
9277 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9279 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9281 * linux-aarch64-low.c (ps_get_thread_area): Replace
9282 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9284 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9285 Marcus Shawcroft <marcus.shawcroft@arm.com>
9286 Nigel Stephens <nigel.stephens@arm.com>
9287 Yufeng Zhang <yufeng.zhang@arm.com>
9289 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9290 (aarch64.c, aarch64-without-fpu.c): New targets.
9291 * configure.srv (aarch64*-*-linux*): New.
9292 * linux-aarch64-low.c: New file.
9294 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9296 * linux-low.c (handle_extended_wait, linux_create_inferior)
9297 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9298 (dequeue_one_deferred_signal, linux_resume_one_thread)
9299 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9300 (linux_tracefork_grandchild, linux_test_for_tracefork)
9301 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9302 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9303 where the argument is 0.
9305 2013-01-25 Yao Qi <yao@codesourcery.com>
9307 * event-loop.c: Include "queue.h".
9308 (gdb_event_p): New typedef.
9309 (struct gdb_event) <next_event>: Remove.
9310 (event_queue): Change to QUEUE(gdb_event_p).
9311 (async_queue_event): Remove.
9312 (gdb_event_xfree): New.
9313 (initialize_event_loop): New.
9314 (process_event): Use API from QUEUE.
9315 (wait_for_event): Likewise.
9316 * server.c (main): Call initialize_event_loop.
9317 * server.h (initialize_event_loop): Declare.
9319 2013-01-18 Yao Qi <yao@codesourcery.com>
9321 * ax.h (struct eval_agent_expr_context): New.
9322 (gdb_eval_agent_expr): Update declaration.
9323 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9324 TFRAME. Add new argument CTX.
9325 * server.h (struct eval_agent_expr_context): Declare.
9326 (agent_mem_read, agent_tsv_read): Update declaration.
9327 (agent_mem_read_string): Likewise.
9328 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9329 (add_traceframe_block): Add new argument TPOINT.
9330 Increase TPOINT->traceframe_usage.
9331 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9332 eval_tracepoint_agent_expr.
9333 (condition_true_at_tracepoint): Likewise.
9334 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9335 (agent_mem_read_string, agent_tsv_read): Likewise.
9337 2013-01-16 Yao Qi <yao@codesourcery.com>
9339 * linux-low.c (linux_resume_one_lwp): Don't check
9340 'lwp->bp_reinsert != 0'.
9342 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9343 Pedro Alves <palves@redhat.com>
9345 * lynx-low.c (ptrace_request_to_str): Define a temporary
9346 macro and use it to simplify this function's implementation.
9348 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9350 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9353 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9355 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9357 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9359 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9361 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9363 * lynx-low.c (lynx_resume): Use the resume_info parameter
9364 to determine the ptid for the lynx_ptrace call, unless
9365 it is equal to minus_one_ptid, in which case we use the
9366 ptid of the current_inferior.
9367 (lynx_wait_1): After having received a thread create/exit
9368 event, resume the inferior's execution using the signaling
9369 thread's ptid, rather than the old ptid.
9371 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9373 * lynx-low.c (lynx_resume): Delete variable ret.
9375 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9377 * gdbreplay.c (gdbreplay_version): Update copyright year.
9378 * server.c (gdbserver_version): Likewise.
9380 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9382 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9385 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9387 * lynx-low.c (ptrace_request_to_str): Add handling for
9390 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9392 * lynx-low.c (lynx_attach): Delete variable new_process.
9394 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9396 * lynx-low.c (lynx_create_inferior): Delete variable
9399 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9401 * lynx-low.c (ptrace_request_to_str): Do not handle
9402 PTRACE_GETTHREADLIST if this macro does not exist.
9404 2012-12-15 Yao Qi <yao@codesourcery.com>
9406 * Makefile.in (OBS): Add notif.o.
9407 * notif.c, notif.h: New.
9408 * server.c: Include "notif.h".
9409 (struct vstop_notif) <next>: Remove.
9411 (queue_stop_reply): Update.
9412 (push_event, send_next_stop_reply): Remove.
9413 (discard_queued_stop_replies): Update.
9414 (notif_stop): New variable.
9415 (handle_v_stopped): Remove.
9416 (handle_v_requests): Don't call handle_v_stopped. Call
9417 handle_ack_notif instead.
9418 (queue_stop_reply_callback): Call notif_event_enque instead
9419 of queue_stop_reply.
9420 (handle_status): Don't call send_next_stop_reply, call
9421 notif_write_event instead.
9422 (kill_inferior_callback): Likewise.
9423 (detach_or_kill_inferior_callback): Likewise.
9424 (main): Call initialize_notif.
9425 (process_serial_event): Call QUEUE_is_empty.
9426 (handle_target_event): Call notif_push instead of push event.
9427 * server.h (push_event): Remove declaration.
9429 2012-12-10 Tom Tromey <tromey@redhat.com>
9431 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9432 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9435 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9436 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9437 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9438 (amd64-linux-ipa.o, ax.o): Rewrite.
9439 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9440 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9441 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9442 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9443 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9444 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9445 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9446 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9447 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9448 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9449 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9450 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9451 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9452 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9453 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9454 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9455 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9456 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9457 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9458 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9459 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9460 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9461 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9462 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9463 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9464 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9465 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9466 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9467 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9468 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9469 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9470 (reg-tilegx.o): Remove.
9471 (all_object_files): New macro.
9472 Include .deps files.
9473 * aclocal.m4, configure: Rebuild.
9474 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9475 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9476 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9478 2012-12-05 Tom Tromey <tromey@redhat.com>
9481 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9483 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9485 * configure.ac: Check for linux/perf_event.h.
9486 * config.in: Regenerated.
9487 * configure: Regenerated.
9489 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9491 * hostio.c (handle_readlink): Decrease buffer size
9492 parameter passed to readlink by one byte.
9494 2012-11-26 Yao Qi <yao@codesourcery.com>
9496 * configure.ac (build_warnings): Append '-Wempty-body'.
9497 * configure: Regenerated.
9498 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9501 2012-11-15 Pierre Muller <muller@sourceware.org>
9503 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9504 * config.in: Regenerate.
9505 * configure: Regenerate.
9506 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9507 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9508 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9509 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9511 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9512 instead of <sys/wait.h> header.
9513 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9515 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9517 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9518 (various make rules): Remove -DGDBSERVER
9520 2012-11-09 Yao Qi <yao@codesourcery.com>
9522 * spu-low.c (current_ptid): Move it to ..
9523 * gdbthread.h: ... here. New.
9524 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9525 * server.c (myresume, process_serial_event): Likewise.
9526 * thread-db.c (thread_db_find_new_threads): Likewise.
9527 * tracepoint.c (run_inferior_command): Likewise.
9529 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9531 * server.c (handle_search_memory_1): Include access length in
9534 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9536 * linux-crisv32-low.c: Fix compile errors.
9538 2012-09-04 Yao Qi <yao@codesourcery.com>
9540 * tracepoint.c (cmd_qtsv): Adjust debug message.
9541 Don't check CUR_TPOINT.
9543 2012-08-28 Yao Qi <yao@codesourcery.com>
9545 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9546 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9547 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9548 Remove declarations of xmalloc, xreallloc, xstrdup and
9550 * Makefile.in (libiberty_h): New.
9551 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9552 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9554 2012-08-23 Yao Qi <yao@codesourcery.com>
9556 * server.h: Remove declaration of 'xsnprintf'.
9558 2012-08-22 Keith Seitz <keiths@redhat.com>
9560 * server.h: Include build-gnulib-gbserver/config.h.
9561 * gdbreplay.c: Likewise.
9563 2012-08-08 Doug Evans <dje@google.com>
9565 * Makefile.in (SFILES): Add gdb_vecs.c.
9566 (OBS): Add gdb_vecs.o.
9567 (gdb_vecs_h, host_defs_h): New variables.
9568 (thread-db.o): Add $(gdb_vecs_h) dependency.
9569 (gdb_vecs.o): New rule.
9570 * thread-db.c: #include "gdb_vecs.h".
9571 (thread_db_load_search): Use a vector to iterate over path elements.
9572 Handle text appearing after "$pdir".
9574 * configure.ac: Add check for strstr.
9575 * config.in: Regenerate.
9576 * configure: Regenerate.
9578 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9580 * hostio.c (handle_pread): If pread fails, fall back to attempting
9582 (handle_pwrite): Likewise for pwrite.
9584 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9586 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9587 between unsupported TYPE and unimplementable ADDR/LEN combination.
9588 (arm_insert_point): Act on new return value.
9590 2012-07-31 Pedro Alves <palves@redhat.com>
9592 * server.c (process_point_options): Only skip tokens if we find
9593 one that is unrecognized. Don't treat 'X' specially while
9594 skipping unrecognized tokens.
9596 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9598 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9599 to 4-byte-align HW breakpoint addresses for Thumb.
9601 2012-07-27 Yao Qi <yao@codesourcery.com>
9605 * server.h: Declare gdb_agent_about_to_close.
9606 * target.c (kill_inferior): Include "agent.h".
9607 New. Send command 'kill'.
9608 * target.h (kill_inferior): Removed macro.
9609 * tracepoint.c (gdb_agent_about_to_close): New.
9610 (gdb_agent_helper_thread): Handle command 'close'.
9611 Wait endlessly until the inferior stops.
9612 Install gdb_agent_remove_socket to atexit hook.
9613 (agent_socket_name): New static variable.
9614 (gdb_agent_socket_init): Replace local variable 'name' with
9615 'agent_socket_name'.
9616 (gdb_agent_remove_socket): New.
9618 2012-07-27 Yao Qi <yao@codesourcery.com>
9620 * server.c (process_point_options): Stop at 'X' when parsing.
9622 2012-07-19 Michael Eager <eager@eagercon.com>
9624 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9626 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9627 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9628 hardware breakpoint.
9630 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9632 * gdbserver/linux-low.c (initialize_low): Call
9633 linux_ptrace_init_warnings.
9635 2012-07-02 Doug Evans <dje@google.com>
9637 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9640 2012-07-02 Stan Shebs <stan@codesourcery.com>
9642 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9643 (ax.o): Add it to build rule.
9645 (OBS): Add format.o.
9646 (IPA_OBS): Add format.o.
9647 * server.c (handle_query): Claim support for breakpoint commands.
9648 (process_point_options): Add command case.
9649 (process_serial_event): Leave running if there are printfs in
9651 * mem-break.h (any_persistent_commands): Declare.
9652 (add_breakpoint_commands): Declare.
9653 (gdb_no_commands_at_breakpoint): Declare.
9654 (run_breakpoint_commands): Declare.
9655 * mem-break.c (struct point_command_list): New struct.
9656 (struct breakpoint): New field command_list.
9657 (any_persistent_commands): New function.
9658 (add_commands_to_breakpoint): New function.
9659 (add_breakpoint_commands): New function.
9660 (gdb_no_commands_at_breakpoint): New function.
9661 (run_breakpoint_commands): New function.
9662 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9664 * ax.c: Include format.h.
9665 (ax_printf): New function.
9666 (gdb_eval_agent_expr): Add printf opcode.
9668 2012-06-13 Yao Qi <yao@codesourcery.com>
9670 * server.c (start_inferior): Remove duplicated writes to fields
9671 'last_resume_kind' and 'last_status' of 'current_inferior'.
9673 2012-06-12 Yao Qi <yao@codesourcery.com>
9674 Pedro Alves <palves@redhat.com>
9676 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9678 * server.c (handle_v_cont): Extend comment.
9680 2012-06-11 Yao Qi <yao@codesourcery.com>
9682 * linux-low.c (linux_attach): Add 'static'.
9684 2012-06-06 Yao Qi <yao@codesourcery.com>
9686 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9688 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9690 Fix gcc -flto compilation warning.
9691 * server.c (main): Make variable multi_mode and attach volatile.
9693 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9695 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9696 if the platform doesn't know about it.
9698 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9700 * Makefile.in (SFILES): Add linux-tile-low.c.
9701 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9702 * configure.srv: Handle tilegx-*-linux*.
9703 * linux-tile-low.c: New file.
9705 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9707 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9709 2012-05-24 Pedro Alves <palves@redhat.com>
9713 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9715 2012-05-24 Pedro Alves <palves@redhat.com>
9719 Replace target_signal with gdb_signal throughout.
9721 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9723 * linux-low.c (linux_store_registers): Avoid the copying sequence
9724 when no data has been retrieved by ptrace.
9726 2012-05-22 Will Deacon <will.deacon@arm.com>
9728 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9729 Include asm/ptrace.h.
9730 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9733 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9735 * linux-low.c (linux_store_registers): Don't re-retrieve data
9736 with ptrace that has already been obtained from /proc. Always
9737 copy any data retrieved with ptrace to the buffer supplied.
9739 2012-05-11 Yao Qi <yao@codesourcery.com>
9740 Pedro Alves <palves@redhat.com>
9742 * linux-low.c (enum stopping_threads_kind): New.
9743 (stopping_threads): Change type to `enum stopping_threads_kind'.
9744 (handle_extended_wait): If stopping and suspending threads, leave
9745 the new_lwp suspended too.
9746 (linux_wait_for_event): Adjust.
9747 (stop_all_lwps): Set `stopping_threads' to
9748 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9749 whether we're suspending threads or just stopping them. Assert no
9752 2012-04-29 Yao Qi <yao@codesourcery.com>
9754 * server.h: Move some code to ...
9755 * gdbthread.h: ... here. New.
9756 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9757 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9758 (nto-low.o, win32-low.o): Likewise.
9759 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9760 * regcache.c, remote-utils.c, server.c: Likewise.
9761 * target.c, tracepoint.c, win32-low.c: Likewise.
9763 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9765 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9766 (PTRACE_ARG4_TYPE): Likewise.
9767 (PTRACE_XFER_TYPE): Likewise.
9768 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9769 ptrace to PTRACE_ARG3_TYPE.
9770 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9771 (PTRACE_ARG4_TYPE): Likewise.
9772 (PTRACE_XFER_TYPE): Likewise.
9773 (linux_detach_one_lwp): Cast fourth argument of
9774 ptrace to long then PTRACE_ARG4_TYPE.
9775 (regsets_fetch_inferior_registers): Cast third argument of
9776 ptrace to long then PTRACE_ARG3_TYPE.
9777 (regsets_store_inferior_registers): Likewise.
9779 2012-04-20 Pedro Alves <palves@redhat.com>
9781 * configure: Regenerate.
9783 2012-04-19 Pedro Alves <palves@redhat.com>
9785 * Makefile.in (GNULIB_BUILDDIR): New.
9786 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9787 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9788 (all, install-only, uninstall, clean-info, all-lib, clean): No
9789 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9790 (maintainer-clean realclean distclean): Use subdir_do.
9792 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9793 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9794 * acinclude.m4: Include acx_configure_dir.m4.
9795 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9796 calls. Call AC_PROG_RANLIB. Configure gnulib using
9799 (GNULIB_STDINT_H): Adjust.
9800 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9801 * gdbreplay.c: Include build-gnulib/config.h.
9802 * server.h: Likewise.
9803 * aclocal.m4: Regenerate.
9804 * config.in: Regenerate.
9805 * configure: Regenerate.
9807 2012-04-19 Pedro Alves <palves@redhat.com>
9809 * Makefile.in (LIBGNU, INCGNU): Adjust.
9810 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9811 (all, install-only, uninstall, clean-info, all-lib, clean)
9812 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9813 * configure.ac: Adjust AC_OUTPUT output.
9814 * aclocal.m4: Regenerate.
9815 * configure: Regenerate.
9817 2012-04-19 Pedro Alves <palves@redhat.com>
9819 * Makefile.in (generated_files): New.
9820 (server_h): Remove the explicit dependency on config.h, and depend
9821 on $generated_files.
9823 2012-04-19 Pedro Alves <palves@redhat.com>
9825 * Makefile.in (INCGNU): Add -Ignulib.
9827 2012-04-19 Pedro Alves <palves@redhat.com>
9829 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9830 (INCGNU): ... this, and spell out -I here.
9831 (GNULIB_LIB): Rename to ...
9833 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9835 2012-04-19 Pedro Alves <palves@redhat.com>
9837 * config.in: Regenerate.
9839 2012-04-19 Pedro Alves <palves@redhat.com>
9841 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9842 * server.h (memmem): Remove declaration.
9843 * config.in: Regenerate.
9844 * configure: Regenerate.
9846 2012-04-19 Yao Qi <yao@codesourcery.com>
9848 * Makefile.in (SFILES): Add common/vec.c.
9852 2012-04-19 Yao Qi <yao@codesourcery.com>
9854 * remote-utils.c (prepare_resume_reply): Replace with macro
9855 target_core_of_thread.
9856 * server.c (handle_qxfer_threads_proper): Likewise.
9857 * target.h (traget_core_of_thread): New macro.
9859 2012-04-18 Pedro Alves <palves@redhat.com>
9861 * aclocal.m4: Regenerate.
9862 * configure: Regenerate.
9864 2012-04-16 Yao Qi <yao@codesourcery.com>
9866 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9867 duplicated on address.
9869 2012-04-16 Yao Qi <yao@codesourcery.com>
9871 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9872 (struct tracepoint_action_ops) <send>: New field.
9873 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9874 (agent_expr_send, x_tracepoint_action_send): New.
9875 (l_tracepoint_action_send): New.
9876 (cmd_qtdp): Download and install tracepoint
9877 according to `use_agent'.
9878 (run_inferior_command): Add one more parameter `len'.
9880 (tracepoint_send_agent): New.
9881 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9883 2012-04-16 Yao Qi <yao@codesourcery.com>
9885 * tracepoint.c (download_tracepoints): Moved to ...
9886 (cmd_qtstart): ... here.
9888 2012-04-14 Yao Qi <yao@codesourcery.com>
9890 * tracepoint.c: Include inttypes.h.
9891 (struct collect_memory_action): Use sized types.
9892 (struct tracepoint): Likewise.
9893 (cmd_qtdp, stop_tracing): Update print specifiers.
9894 (cmd_qtp, response_tracepoint): Likewise.
9895 (collect_data_at_tracepoint): Likewise.
9896 (collect_data_at_step): Likewise.
9898 2012-04-14 Yao Qi <yao@codesourcery.com>
9900 Import gnulib module inttypes.
9901 * aclocal.m4, config.in, configure: Regenerated.
9903 2012-04-14 Yao Qi <yao@codesourcery.com>
9905 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9906 Makefile and config.status at last.
9908 2012-04-13 Yao Qi <yao@codesourcery.com>
9910 * tracepoint.c: Include stdint.h unconditionally.
9912 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9914 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9915 on BFD_HAVE_SYS_PROCFS_TYPE.
9916 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9917 * configure: Regenerate.
9918 * config.in: Likewise.
9920 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9922 * Makefile.in (clean): Also remove x32.c x32-linux.c
9923 x32-avx.c x32-avx-linux.c.
9924 (x32.o): New target.
9926 (x32-linux.o): Likewise.
9927 (x32-linux.c): Likewise.
9928 (x32-avx.o): Likewise.
9929 (x32-avx.c): Likewise.
9930 (x32-avx-linux.o): Likewise.
9931 (x32-avx-linux.c): Likewise.
9933 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9934 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9935 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9936 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9937 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9938 i386/x32-avx-linux.xml.
9940 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9941 (init_registers_x32_avx_linux): Likwise.
9942 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9943 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9945 2012-04-13 Pedro Alves <palves@redhat.com>
9947 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9948 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9949 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9950 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9953 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9955 * linux-x86-low.c (compat_x32_clock_t): New.
9956 (compat_x32_siginfo_t): Likewise.
9957 (compat_x32_siginfo_from_siginfo): Likewise.
9958 (siginfo_from_compat_x32_siginfo): Likewise.
9959 (linux_is_elf64): Likewise.
9960 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9961 and siginfo_from_compat_x32_siginfo for x32.
9962 (x86_arch_setup): Set linux_is_elf64.
9964 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9967 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9969 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9970 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9971 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9972 compatible with process.
9974 2012-04-12 Yao Qi <yao@codesourcery.com>
9976 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9977 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9978 (install-only, install-info, clean): Handle sub dir gnulib.
9979 (all-lib, am--refresh): New targets.
9980 (memmem.o): Remove target.
9981 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9982 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9983 (AC_REPLACE_FUNCS): Remove memmem.
9984 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9985 (AC_OUTPUT): Generate Makefile in gnulib/.
9986 * aclocal.m4, config.in, configure: Regenerated.
9988 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9990 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9992 2012-04-05 Pedro Alves <palves@redhat.com>
9994 -Werror=strict-aliasing
9996 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9999 2012-04-04 Pedro Alves <palves@redhat.com>
10001 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10002 (sparc_store_gregset_from_stack, sparc_store_gregset)
10003 (sparc_breakpoint_at): Fix formatting.
10005 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10007 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10009 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10010 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10011 * config.in: Regenerate.
10012 * configure: Likewise.
10014 2012-03-29 Pedro Alves <palves@redhat.com>
10016 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10017 Correct ptrace arguments.
10019 2012-03-28 Pedro Alves <palves@redhat.com>
10021 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10022 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10023 (IA64_FR1_REGNUM): New defines.
10024 (ia64_fetch_register): New.
10025 (the_low_target): Install it.
10026 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10028 * linux-low.c (linux_fetch_registers): Try the
10029 the_low_target.fetch_register hook first.
10031 * linux-arm-low.c (the_low_target): Adjust.
10032 * linux-bfin-low.c (the_low_target): Adjust.
10033 * linux-cris-low.c (the_low_target): Adjust.
10034 * linux-crisv32-low.c (the_low_target): Adjust.
10035 * linux-m32r-low.c (the_low_target): Adjust.
10036 * linux-m68k-low.c (the_low_target): Adjust.
10037 * linux-mips-low.c (the_low_target): Adjust.
10038 * linux-ppc-low.c (the_low_target): Adjust.
10039 * linux-s390-low.c (the_low_target): Adjust.
10040 * linux-sh-low.c (the_low_target): Adjust.
10041 * linux-sparc-low.c (the_low_target): Adjust.
10042 * linux-tic6x-low.c (the_low_target): Adjust.
10043 * linux-x86-low.c (the_low_target): Adjust.
10044 * linux-xtensa-low.c (the_low_target): Adjust.
10046 2012-03-26 Pedro Alves <palves@redhat.com>
10048 * server.c (handle_qxfer_libraries): Don't bail early if
10049 the_target->qxfer_libraries_svr4 is not NULL.
10051 2012-03-26 Pedro Alves <palves@redhat.com>
10053 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10055 2012-03-23 Pedro Alves <palves@redhat.com>
10057 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10058 "library-list-svr4" element's start tag when the the DSO list is
10061 2012-03-23 Pedro Alves <palves@redhat.com>
10063 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10064 a variable whose type size is the same as the inferior's pointer
10067 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10069 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10071 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10072 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10073 * linux-low.h: Include <signal.h>.
10074 (struct siginfo): Remove forward declaration.
10075 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10078 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10080 * .gitignore: Ignore more files.
10082 2012-03-19 Pedro Alves <palves@redhat.com>
10083 Jan Kratochvil <jan.kratochvil@redhat.com>
10085 * server.c (cont_thread, general_thread): Add describing comments.
10086 (start_inferior): Clear `cont_thread'.
10087 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10090 2012-03-15 Yao Qi <yao@codesourcery.com>
10092 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10094 (cmd_qtdp): ... here.
10096 2012-03-15 Yao Qi <yao@codesourcery.com>
10098 * tracepoint.c (struct tracepoint_action_ops): New.
10099 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10100 (m_tracepoint_action_download): New.
10101 (r_tracepoint_action_download): New.
10102 (x_tracepoint_action_download): New.
10103 (l_tracepoint_action_download): New.
10104 (add_tracepoint_action): Install `action->ops' according type.
10105 (download_tracepoint_1): Move code `download' function pointer
10106 of various tracepoint_action_ops.
10108 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10110 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10111 linux_ptrace_attach_warnings.
10113 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10115 * Makefile.in (linux-ptrace.o): New.
10116 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10117 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10118 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10119 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10120 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10122 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10124 2012-03-08 Yao Qi <yao@codesourcery.com>
10125 Pedro Alves <palves@redhat.com>
10127 Fix PR server/13392.
10128 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10129 offset of JMP insn.
10130 * tracepoint.c (remove_tracepoint): New.
10131 (cmd_qtdp): Call remove_tracepoint when failed to install.
10133 2012-03-07 Pedro Alves <palves@redhat.com>
10135 * linux-low.c (get_detach_signal): New.
10136 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10137 Pass on pending signals to PTRACE_DETACH. Check the result of the
10139 * server.c (program_signals, program_signals_p): New.
10140 (handle_general_set): Handle QProgramSignals.
10141 * server.h (program_signals, program_signals_p): Declare.
10143 2012-03-05 Pedro Alves <palves@redhat.com>
10144 Jan Kratochvil <jan.kratochvil@redhat.com>
10146 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10149 2012-03-03 Yao Qi <yao@codesourcery.com>
10151 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10152 agent_look_up_symbols.
10154 2012-03-03 Yao Qi <yao@codesourcery.com>
10156 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10157 (linux-x86-low.o): Likewise.
10158 * server.h: Remove in_process_agent_loaded.
10159 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10163 2012-03-03 Yao Qi <yao@codesourcery.com>
10165 * tracepoint.c (gdb_agent_capability): New global.
10166 (in_process_agent_loaded_ust): Renamed to
10167 `in_process_agent_supports_ust'.
10169 (in_process_agent_supports_ust): Call agent_capability_check.
10170 (clear_installed_tracepoints): Assert that agent supports
10173 2012-03-03 Yao Qi <yao@codesourcery.com>
10175 * linux-low.c (linux_supports_agent): New.
10176 (linux_target_ops): Initialize field `supports_agent' with
10177 linux_supports_agent.
10178 * target.h (struct target_ops) <supports_agent>: New.
10179 (target_supports_agent): New macro.
10180 * server.c (handle_general_set): Handle packet 'QAgent'.
10181 (handle_query): Send `QAgent+'.
10182 * Makefile.in (server.o): Depends on agent.h.
10184 2012-03-03 Yao Qi <yao@codesourcery.com>
10186 * Makefile.in (OBS): Add agent.o.
10187 Add new rule for agent.o.
10188 Track dependence of tracepoint.c on agent.h.
10189 * tracepoint.c (run_inferior_command_1):
10190 (run_inferior_command): Call agent_run_command.
10191 (gdb_ust_connect_sync_socket): Deleted. Move it to
10193 (resume_thread, stop_thread): Likewise.
10194 (gdb_ust_socket_init): Renamed to ...
10195 (gdb_agent_socket_init): ... New.
10196 (gdb_ust_thread): Renamed to ...
10197 (gdb_agent_helper_thread): ... New.
10198 (gdb_ust_init): Move some code to ...
10199 (gdb_agent_init): ... here. New.
10200 [HAVE_UST]: Call gdb_ust_init.
10201 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10202 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10203 * config.in, configure: Regenerated.
10205 2012-03-02 Pedro Alves <palves@redhat.com>
10207 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10208 * linux-low.c (struct simple_pid_list): New.
10209 (stopped_pids): New a struct simple_pid_list pointer.
10210 (add_to_pid_list, pull_pid_from_list): New.
10211 (handle_extended_wait): Don't assume the first signal new children
10212 report is SIGSTOP. Adjust call to pull_pid_from_list.
10213 (linux_wait_for_lwp): Adjust.
10215 2012-03-02 Yao Qi <yao@codesourcery.com>
10217 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10220 2012-03-02 Yao Qi <yao@codesourcery.com>
10222 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10223 `stop_pc' and `tpoint'. Update caller.
10225 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10227 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10228 * linux-low.c (use_linux_regsets): New macro.
10229 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10230 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10231 (linux_register_in_regsets): New function.
10232 (usr_fetch_inferior_registers): Skip registers covered by
10234 (usr_store_inferior_registers): Likewise.
10235 (usr_fetch_inferior_registers): New macro.
10236 (usr_store_inferior_registers): Likewise.
10237 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10238 (linux_store_registers): Likewise.
10239 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10241 (init_registers_mips64_dsp_linux): Likewise.
10242 (init_registers_mips_linux): New macro.
10243 (init_registers_mips_dsp_linux): Likewise.
10244 (mips_dsp_num_regs): Likewise.
10245 (DSP_BASE, DSP_CONTROL): New fallback macros.
10246 (mips_base_regs): New macro.
10247 (mips_regmap): Use it. Fix the size.
10248 (mips_dsp_regmap): New variable.
10249 (mips_dsp_regset_bitmap): Likewise.
10250 (mips_arch_setup): New function.
10251 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10253 (mips_cannot_store_register): Likewise.
10254 (the_low_target): Update .arch_setup, .num_regs and .regmap
10255 initializers. Add .regset_bitmap initializer.
10256 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10258 * linux-bfin-low.c (the_low_target): Likewise.
10259 * linux-cris-low.c (the_low_target): Likewise.
10260 * linux-crisv32-low.c (the_low_target): Likewise.
10261 * linux-ia64-low.c (the_low_target): Likewise.
10262 * linux-m32r-low.c (the_low_target): Likewise.
10263 * linux-m68k-low.c (the_low_target): Likewise.
10264 * linux-ppc-low.c (the_low_target): Likewise.
10265 * linux-s390-low.c (the_low_target): Likewise.
10266 * linux-sh-low.c (the_low_target): Likewise.
10267 * linux-sparc-low.c (the_low_target): Likewise.
10268 * linux-tic6x-low.c (the_low_target): Likewise.
10269 * linux-x86-low.c (the_low_target): Likewise.
10270 * linux-xtensa-low.c (the_low_target): Likewise.
10271 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10272 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10273 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10275 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10276 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10278 2012-02-29 Yao Qi <yao@codesourcery.com>
10279 Pedro Alves <palves@redhat.com>
10281 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10282 `step_over_finished' is true.
10284 2012-02-27 Pedro Alves <palves@redhat.com>
10286 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10287 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10289 2012-02-27 Pedro Alves <palves@redhat.com>
10292 * linux-low.c (pid_is_stopped): New.
10293 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10295 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10297 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10300 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10302 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10304 2012-02-24 Luis Machado <lgustavo@codesourcery>
10306 * server.c (handle_query): Advertise support for target-side
10307 breakpoint condition evaluation.
10308 (process_point_options): New function.
10309 (process_serial_event): When inserting a breakpoint, check for
10310 a target-side condition that should be evaluated.
10312 * mem-break.c: Include regcache.h and ax.h.
10313 (point_cond_list_t): New data structure.
10314 (breakpoint) <cond_list>: New field.
10315 (find_gdb_breakpoint_at): Make non-static.
10316 (delete_gdb_breakpoint_at): Clear any target-side
10318 (clear_gdb_breakpoint_conditions): New function.
10319 (add_condition_to_breakpoint): Likewise.
10320 (add_breakpoint_condition): Likewise.
10321 (gdb_condition_true_at_breakpoint): Likewise.
10322 (gdb_breakpoint_here): Return result directly instead
10323 of going through a local variable.
10325 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10326 (clear_gdb_breakpoint_conditions): Likewise.
10327 (add_breakpoint_condition): Likewise.
10328 (gdb_condition_true_at_breakpoint): Likewise.
10330 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10331 (need_step_over_p): Take target-side breakpoint condition into
10334 2012-02-24 Luis Machado <lgustavo@codesourcery>
10336 * server.h: Include tracepoint.h.
10337 (agent_mem_read, agent_get_trace_state_variable_value,
10338 agent_set_trace_state_variable_value,
10339 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10340 get_set_tsv_func_addr): New prototypes.
10342 * ax.h: New include file.
10343 * ax.c: New source file.
10345 * tracepoint.c: Include ax.h.
10346 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10347 agent_expr, eval_result_type): Move to ax.h.
10348 (parse_agent_expr): Rename to ...
10349 (gdb_parse_agent_expr): ... this, make it non-static and move
10351 (unparse_agent_expr) Rename to ...
10352 (gdb_unparse_agent_expr): ... this, make it non-static and move
10354 (eval_agent_expr): Rename to ...
10355 (eval_tracepoint_agent_expr): ... this.
10356 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10357 forward declarations.
10358 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10359 (agent_get_trace_state_variable_value): New function.
10360 (agent_set_trace_state_variable_value): New function.
10361 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10362 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10363 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10364 (condition_true_at_tracepoint): Likewise.
10365 (parse_agent_expr): Rename to ...
10366 (gdb_parse_agent_expr): ... this and move to ax.c.
10367 (unparse_agent_expr): Rename to ...
10368 (gdb_unparse_agent_expr): ... this and move to ax.c.
10369 (gdb_agent_op_name): Move to ax.c.
10370 (eval_agent_expr): Rename to ...
10371 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10373 (eval_tracepoint_agent_expr): New function.
10374 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10376 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10378 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10379 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10380 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10381 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10382 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10383 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10384 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10385 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10386 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10387 (compile_bytecodes): Remove forward declaration.
10388 (is_goto_target): Move to ax.c.
10389 (compile_bytecodes): Move to ax.c and call
10390 agent_get_trace_state_variable_value (...) and
10391 agent_set_trace_state_variable_value (...).
10393 * Makefile.in: Update ax.c and IPA dependencies.
10395 2012-02-24 Pedro Alves <palves@redhat.com>
10397 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10398 (cmd_bigqtbuffer_circular): ... this. Only handle
10399 'QTBuffer:circular:'.
10400 (handle_tracepoint_general_set): Adjust.
10402 2012-02-16 Yao Qi <yao@codesourcery.com>
10404 * inferiors.c: Move code to ...
10405 * dll.c: .... here. New.
10406 * server.h: Declare clear_dlls.
10407 * Makefile.in (SFILES): Add dll.c.
10411 2012-02-11 Yao Qi <yao@codesourcery.com>
10413 * server.c: (handle_monitor_command): Add a new parameter
10415 (handle_query): Update caller.
10417 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10419 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10420 * configure, config.in: Regenerate.
10421 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10424 2012-02-02 Pedro Alves <palves@redhat.com>
10426 Try SIGKILL first, then PTRACE_KILL.
10427 * linux-low.c (linux_kill_one_lwp): New.
10428 (linux_kill_one_lwp): Rename to ...
10429 (kill_one_lwp_callback): ... this. Use the new
10430 linux_kill_one_lwp.
10432 2012-02-02 Pedro Alves <palves@redhat.com>
10434 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10437 2012-01-27 Pedro Alves <palves@redhat.com>
10439 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10440 (elf_64_file_p): Make static.
10441 (linux_pid_exe_is_elf_64_file): New.
10442 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10443 Delete declarations.
10444 (linux_pid_exe_is_elf_64_file): Declare.
10445 * linux-x86-low.c (x86_arch_setup): Use
10446 linux_pid_exe_is_elf_64_file.
10448 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10450 * linux-low.c (linux_wait_for_event_1): Rename to ...
10451 (linux_wait_for_event): ... here and merge it with former
10452 linux_wait_for_event - new variable wait_ptid, use it.
10453 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10455 2012-01-23 Pedro Alves <palves@redhat.com>
10457 * server.c (main): Avoid yet another case of infinite loop while
10458 detaching/killing after a longjmp.
10460 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10463 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10465 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10467 * hostio.c (handle_readlink): New function.
10468 (handle_vFile): Call it to handle "vFile:readlink" packets.
10470 2012-01-20 Pedro Alves <palves@redhat.com>
10471 Ulrich Weigand <ulrich.weigand@linaro.org>
10473 * server.c (handle_v_requests): Only support vAttach and vRun to
10474 start multiple processes when in extended protocol mode.
10476 2012-01-17 Pedro Alves <palves@redhat.com>
10478 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10479 memalign plus mprotect to allocate the scratch buffer.
10481 2012-01-13 Pedro Alves <palves@redhat.com>
10483 * server.c (attach_inferior): Clear `cont_thread'.
10485 2012-01-13 Pedro Alves <palves@redhat.com>
10487 * server.c (main): Avoid infinite loop while detaching/killing
10490 2012-01-09 Doug Evans <dje@google.com>
10492 * server.c (start_inferior): Set last_ptid in --wrapper case.
10494 2012-01-06 Yao Qi <yao@codesourcery.com>
10496 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10498 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10500 2012-01-04 Yao Qi <yao@codesourcery.com>
10502 * tracepoint.c (cmd_qtdp): Print debug message
10503 for static tracepoint.
10505 2012-01-04 Yao Qi <yao@codesourcery.com>
10507 * tracepoint.c (trace_vdebug): Differentiate debug message
10508 between gdbserver and IPA.
10510 2012-01-03 Yao Qi <yao@codesourcery.com>
10512 * tracepoint.c (tracepoint_was_hit): Don't collect for
10515 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10517 * terminal.h: Reformat copyright header.
10519 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10521 * server.c (gdbserver_version): Update copyright year.
10522 * gdbreplay.c (gdbreplay_version): Likewise.
10524 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10526 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10529 2011-12-18 Hui Zhu <teawater@gmail.com>
10530 * linux-low.c (linux_create_inferior): Save return value to ret.
10532 2011-12-18 Hui Zhu <teawater@gmail.com>
10534 * linux-low.c (linux_create_inferior): Save return value to ret.
10536 2011-12-16 Doug Evans <dje@google.com>
10538 * linux-low.c (linux_create_inferior): If stdio connection,
10539 redirect stdin from /dev/null, stdout to stderr.
10540 * remote-utils.c (remote_is_stdio): New static global.
10541 (remote_connection_is_stdio): New function.
10542 (remote_prepare): Handle stdio connection.
10543 (remote_open): Ditto.
10544 (remote_close): Don't close stdin for stdio connections.
10545 (read_prim,write_prim): New functions. Replace all calls to
10546 read/write to these.
10547 * server.c (main): Watch for "-" argument. Move call to
10548 remote_prepare before start_inferior.
10549 * server.h (STDIO_CONNECTION_NAME): New macro.
10550 (remote_connection_is_stdio): Declare.
10552 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10553 in debugging output.
10555 2011-12-15 Yao Qi <yao@codesourcery.com>
10557 * tracepoint.c: Include sys/syscall.h.
10558 (gdb_ust_thread): Remove preprocessor conditional.
10560 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10562 * linux-low.c (linux_detach_one_lwp): Call
10563 the_low_target.prepare_to_resume before detaching.
10565 2011-12-14 Yao Qi <yao@codesourcery.com>
10567 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10570 2011-12-14 Yao Qi <yao@codesourcery.com>
10572 * i386-low.c (i386_low_stopped_data_address): Initialize local
10573 variable `control'.
10575 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10579 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10580 DR_CONTROL unless necessary. Extend comments.
10581 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10582 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10584 2011-12-13 Yao Qi <yao@codesourcery.com>
10586 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10588 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10590 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10592 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10593 Print new debug message for such case.
10595 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10597 Fix overlapping memcpy.
10598 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10599 the read_inferior_memory transfer.
10600 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10601 write_inferior_memory transfer.
10602 (set_fast_tracepoint_jump): New variable buf. Use it for the
10603 read_inferior_memory and write_inferior_memory transfers.
10604 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10605 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10606 Use it for the write_inferior_memory transfer.
10607 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10610 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10612 * linux-low.c (fetch_register, store_register): Make code
10613 consistent, fix formatting.
10615 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10617 * linux-low.c (usr_store_inferior_registers): Factor out code
10618 to handle individual registers into...
10619 (store_register): ... this new function.
10621 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10623 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10624 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10625 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10626 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10627 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10628 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10629 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10630 (srv_xmlfiles): Add new XML files.
10632 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10634 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10635 (init_registers_s390_linux32v1): Add prototype.
10636 (init_registers_s390_linux32v2): Likewise.
10637 (init_registers_s390_linux64v1): Likewise.
10638 (init_registers_s390_linux64v2): Likewise.
10639 (init_registers_s390x_linux64v1): Likewise.
10640 (init_registers_s390x_linux64v2): Likewise.
10641 (s390_num_regs): Increment to 52.
10642 (s390_regmap): Add orig_r2 register.
10643 (s390_num_regs_3264): Increment to 68.
10644 (s390_regmap_3264): Add orig_r2 register.
10645 (s390_collect_ptrace_register): Handle orig_r2 register.
10646 (s390_supply_ptrace_register): Likewise.
10647 (s390_fill_last_break): New function.
10648 (s390_store_last_break): Likewise.
10649 (s390_fill_system_call): New function.
10650 (s390_store_system_call): Likewise.
10651 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10653 (s390_check_regset): New function.
10654 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10655 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10656 Update target_regsets for available register sets.
10658 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10659 Jan Kratochvil <jan.kratochvil@redhat.com>
10661 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10662 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10664 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10665 * linux-low.h (struct process_info_private): New member r_debug.
10666 * server.c (handle_qxfer_libraries): Call
10667 the_target->qxfer_libraries_svr4.
10668 (handle_qxfer_libraries_svr4): New function.
10669 (qxfer_packets): New entry "libraries-svr4".
10670 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10671 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10672 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10673 PACKET_qXfer_libraries_svr4.
10675 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10677 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10678 PSW address/mask between 8-byte and 16-byte formats.
10679 (s390_supply_ptrace_register): Likewise.
10680 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10681 basic addressing mode bit.
10683 2011-11-24 Stan Shebs <stan@codesourcery.com>
10685 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10687 2011-11-17 Stan Shebs <stan@codesourcery.com>
10689 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10690 (tracing_start_time): New global.
10691 (tracing_stop_time): New global.
10692 (tracing_user_name): New global.
10693 (tracing_notes): New global.
10694 (tracing_stop_note): New global.
10695 (cmd_qtstart): Set traceframe_usage, start_time.
10696 (stop_tracing): Set stop_time.
10697 (cmd_qtstatus): Report additional status.
10698 (cmd_qtp): New function.
10699 (handle_tracepoint_query): Call it.
10700 (cmd_qtnotes): New function.
10701 (handle_tracepoint_general_set): Call it.
10702 (get_timestamp): Rename from tsv_get_timestamp.
10704 2011-11-14 Stan Shebs <stan@codesourcery.com>
10705 Kwok Cheung Yeung <kcy@codesourcery.com>
10707 * linux-x86-low.c (small_jump_insn): New.
10708 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10709 trampoline and error message, build a trampoline and issue a small
10710 jump instruction to it.
10711 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10712 trampoline and error message.
10713 (x86_get_min_fast_tracepoint_insn_len): New.
10714 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10715 * linux-low.h (struct linux_target_ops): Add arguments to
10716 install_fast_tracepoint_jump_pad operation, add new operation.
10717 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10719 (linux_get_min_fast_tracepoint_insn_len): New function.
10720 (linux_target_op): Add new operation.
10721 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10722 (gdb_trampoline_buffer_end): Ditto.
10723 (gdb_trampoline_buffer_error): Ditto.
10724 (struct ipa_sym_addresses): Add fields for new IPA variables.
10725 (symbol_list): Add entries for new IPA variables.
10726 (struct tracepoint): Add fields to hold the address range of the
10727 trampoline used by the tracepoint.
10728 (trampoline_buffer_head): New static variable.
10729 (trampoline_buffer_tail): Ditto.
10730 (claim_trampoline_space): New function.
10731 (have_fast_tracepoint_trampoline_buffer): New function.
10732 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10734 (install_fast_tracepoint): Ditto, also add error buffer argument.
10735 (cmd_qtminftpilen): New function.
10736 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10737 (fast_tracepoint_from_trampoline_address): New function.
10738 (fast_tracepoint_collecting): Handle trampoline as part of jump
10740 (set_trampoline_buffer_space): New function.
10741 (initialize_tracepoint): Initialize new IPA variables.
10742 * target.h (struct target_ops): Add arguments to
10743 install_fast_tracepoint_jump_pad operation, add new
10744 get_min_fast_tracepoint_insn_len operation.
10745 (target_get_min_fast_tracepoint_insn_len): New.
10746 (install_fast_tracepoint_jump_pad): Add arguments.
10747 * server.h (IPA_BUFSIZ): Define.
10748 * linux-i386-ipa.c: Include extra header files.
10749 (initialize_fast_tracepoint_trampoline_buffer): New function.
10750 (initialize_low_tracepoint): Call it.
10751 * server.h (set_trampoline_buffer_space): Declare.
10752 (claim_trampoline_space): Ditto.
10753 (have_fast_tracepoint_trampoline_buffer): Ditto.
10755 2011-11-14 Yao Qi <yao@codesourcery.com>
10757 * server.c (handle_query): Handle InstallInTrace for qSupported.
10758 * tracepoint.c (add_tracepoint): Sort list.
10759 (install_tracepoint, download_tracepoint): New.
10760 (cmd_qtdp): Call them to install and download tracepoints.
10761 (sort_tracepoints): Removed.
10762 (cmd_qtstart): Update.
10764 2011-11-14 Yao Qi <yao@codesourcery.com>
10766 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10767 * mem-break.h: Declare.
10768 * tracepoint.c (cmd_qtstart): Move some code to ...
10769 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10771 (download_tracepoints): Move some code to ...
10772 (download_tracepoint_1): ... here. New.
10774 2011-11-08 Yao Qi <yao@codesourcery.com>
10776 * remote-utils.c (relocate_instruction): A comment fix.
10778 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10780 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10781 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10782 dr_status_mirror and dr_control_mirror from debug_reg_state.
10783 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10784 (i386_initial_stuff): Remove use of deleted globals.
10785 (i386_get_thread_context, i386_set_thread_context,
10786 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10787 from debug_reg_state.
10789 2011-11-05 Yao Qi <yao@codesourcery.com>
10791 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10792 address as TPOINT's.
10794 2011-11-02 Stan Shebs <stan@codesourcery.com>
10796 * tracepoint.c (agent_mem_read_string): New function.
10797 (eval_agent_expr): Call it for tracenz.
10798 * server.c (handle_query): Report support for tracenz.
10800 2011-11-02 Yao Qi <yao@codesourcery.com>
10802 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10804 2011-11-02 Yao Qi <yao@codesourcery.com>
10806 * target.h: Fix a typo in comment.
10808 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10810 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10811 clobber the breakpoints' shadows with fast tracepoint jumps.
10812 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10813 * target.c (write_inferior_memory): Also pass MYADDR down to
10816 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10818 * configure.ac: Check support for personality routine.
10819 * configure: Regenerate.
10820 * config.in: Likewise.
10821 * linux-low.c: Include <sys/personality.h>.
10822 Define ADDR_NO_RANDOMIZE if necessary.
10823 (linux_create_inferior): Disable address space randomization when
10824 forking inferior, if requested.
10825 (linux_supports_disable_randomization): New function.
10826 (linux_target_ops): Install it.
10827 * server.h (disable_randomization): Declare.
10828 * server.c (disable_randomization): New global variable.
10829 (handle_general_set): Handle QDisableRandomization.
10830 (handle_query): Likewise for qSupported.
10831 (main): Support --disable-randomization and --no-disable-randomization
10832 command line arguments.
10833 * target.h (struct target_ops): Add supports_disable_randomization.
10834 (target_supports_disable_randomization): New macro.
10836 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10838 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10840 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10841 [!PT_GETDSBT] (target_loadmap): New definition.
10842 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10843 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10844 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10845 and PT_GETDSBT to LINUX_LOADMAP.
10846 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10847 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10849 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10851 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10852 (arm_linux_hwbp_cap): New static variable.
10853 (arm_linux_get_hwbp_cap): Replace by ...
10854 (arm_linux_init_hwbp_cap): ... this new function.
10855 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10856 (arm_linux_get_hw_watchpoint_count): Likewise.
10857 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10858 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10859 (arm_prepare_to_resume): Use perror_with_name instead of error.
10861 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10863 * linux-arm-low.c: Include <signal.h>.
10864 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10865 (struct arm_linux_hwbp_cap): New data type.
10866 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10867 (struct arm_linux_hw_breakpoint): New data type.
10868 (MAX_BPTS, MAX_WPTS): Define.
10869 (struct arch_process_info, struct arch_lwp_info): New data types.
10870 (arm_linux_get_hwbp_cap): New function.
10871 (arm_linux_get_hw_breakpoint_count): Likewise.
10872 (arm_linux_get_hw_watchpoint_count): Likewise.
10873 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10874 (arm_hwbp_control_initialize): Likewise.
10875 (arm_hwbp_control_is_enabled): Likewise.
10876 (arm_hwbp_control_is_initialized): Likewise.
10877 (arm_hwbp_control_disable): Likewise.
10878 (arm_linux_hw_breakpoint_equal): Likewise.
10879 (arm_linux_hw_point_initialize): Likewise.
10880 (struct update_registers_data): New data structure.
10881 (update_registers_callback: New function.
10882 (arm_insert_point): Likewise.
10883 (arm_remove_point): Likewise.
10884 (arm_stopped_by_watchpoint): Likewise.
10885 (arm_stopped_data_address): Likewise.
10886 (arm_new_process): Likewise.
10887 (arm_new_thread): Likewise.
10888 (arm_prepare_to_resume): Likewise.
10889 (the_low_target): Register arm_insert_point, arm_remove_point,
10890 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10891 arm_new_thread, and arm_prepare_to_resume.
10893 2011-09-15 Stan Shebs <stan@codesourcery.com>
10895 * server.h (struct emit_ops): Add compare-goto fields.
10896 * tracepoint.c (gdb_agent_op_sizes): New table.
10897 (emit_eq_goto): New function.
10898 (emit_ne_goto): New function.
10899 (emit_lt_goto): New function.
10900 (emit_le_goto): New function.
10901 (emit_gt_goto): New function.
10902 (emit_ge_goto): New function.
10903 (is_goto_target): New function.
10904 (compile_bytecodes): Recognize special cases of compare-goto
10905 combinations and call specialized emitters for them.
10906 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10907 (amd64_emit_ne_goto): New function.
10908 (amd64_emit_lt_goto): New function.
10909 (amd64_emit_le_goto): New function.
10910 (amd64_emit_gt_goto): New function.
10911 (amd64_emit_ge_goto): New function.
10912 (amd64_emit_ops): Add the new functions.
10913 (i386_emit_eq_goto): New function.
10914 (i386_emit_ne_goto): New function.
10915 (i386_emit_lt_goto): New function.
10916 (i386_emit_le_goto): New function.
10917 (i386_emit_gt_goto): New function.
10918 (i386_emit_ge_goto): New function.
10919 (i386_emit_ops): Add the new functions.
10921 2011-09-08 Stan Shebs <stan@codesourcery.com>
10923 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10924 (i386_emit_epilogue): Restore %ebx.
10926 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10928 * server.c (step_thread): Remove definition.
10929 (process_serial_event): Don't handle Hs.
10930 * server.h (step_thread): Remove declaration.
10931 * target.c (set_desired_inferior): Remove use of step_thread.
10933 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10935 * linux-low.c: Include linux-procfs.h.
10936 (linux_attach_lwp_1): Update comments.
10937 (linux_attach): Scan for existing threads when attaching to a
10938 process that is the tgid.
10939 * Makefile.in: Update dependencies.
10941 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10943 * configure.srv: Add linux-procfs.o dependencies.
10945 2011-08-14 Yao Qi <yao@codesourcery.com>
10947 * target.h (struct target_ops): Fix indent.
10948 * win32-low.c (win32_target_ops): Fix comment.
10950 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10951 Yao Qi <yao@codesourcery.com>
10953 * Makefile.in (clean): Remove tic6x-*.c files.
10954 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10955 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10956 (tic6x-c64xp-linux.c): Likewise.
10957 * configure.srv: Add support for tic6x-*-uclinux.
10958 * linux-tic6x-low.c: New.
10959 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10961 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10962 Yao Qi <yao@codesourcery.com>
10964 * target.h (struct target_ops): Add read_loadmap.
10965 * linux-low.c (struct target_loadseg): New type.
10966 (struct target_loadmap): New type.
10967 (linux_read_loadmap): New function.
10968 (linux_target_ops): Add linux_read_loadmap.
10969 * server.c (handle_query): Support qXfer:fdpic:read packet.
10970 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10973 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10975 * win32-low.c: Include <stdint.h>.
10977 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10979 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10980 to the inferior here.
10981 (i386_remove_aligned_watchpoint): Ditto.
10982 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10983 fit part of the watchpoint in the debug registers.
10984 (i386_update_inferior_debug_regs): New.
10985 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10986 registers, and only update the inferior on success.
10987 (i386_low_remove_watchpoint): Ditto.
10989 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10991 * linux-low.c (compare_ints, unique, list_threads, show_process,
10992 linux_core_of_thread): Delete.
10993 (linux_target_ops): Change linux_core_of_thread to
10994 linux_common_core_of_thread.
10995 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10996 * utils.c (malloc_failure): Change type of argument.
10997 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10998 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10999 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11000 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11001 (IPA_OBJS): Add common-utils-ipa.o.
11002 (ptid_h, linux_osdata_h): New macros.
11003 (server_h): Add common/common-utils.h, common/xml-utils.h,
11004 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11006 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11007 ptid.o, buffer.o): New rules.
11008 (linux-low.o): Add common/linux-osdata.h as a dependency.
11009 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11010 * configure.ac: Add AC_HEADER_DIRENT check.
11011 * config.in: Regenerate.
11012 * configure: Regenerate.
11013 * remote-utils.c (xml_escape_text): Delete.
11014 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11015 buffer_xml_printf): Move to common/buffer.c.
11016 * server.c (main): Remove call to initialize_inferiors.
11017 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11018 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11019 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11020 internal_error, gdb_assert, gdb_assert_fail): Delete.
11021 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11022 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11024 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11025 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11026 initialize_inferiors): Delete.
11028 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11030 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11033 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11035 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11037 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11039 2011-05-26 Yao Qi <yao@codesourcery.com>
11041 * Makefile.in (thread-db.o): Track dependence to
11042 common/gdb_thread_db.h.
11043 * thread-db.c: include gdb_thread_db.h from right place.
11045 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11047 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11048 __FILE__ and __LINE__ to internal_error.
11050 2011-05-13 Doug Evans <dje@google.com>
11052 * thread-db.c (try_thread_db_load_from_sdir): New function.
11053 (try_thread_db_load_from_dir): New function.
11054 (thread_db_load_search): Handle $sdir, ignore $pdir.
11055 Remove trying of system directories if search of
11056 libthread-db-search-path fails, that is now done via $sdir.
11058 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11060 * server.c (handle_query): Add EnableDisableTracepoints to the list
11061 of supported features.
11062 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11064 (cmd_qtenable_disable): New.
11065 (cmd_qtstart): Install tracepoints even if disabled.
11066 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11067 receiving a QTEnable or QTDisable packet.
11068 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11069 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11071 (gdb_probe): Skip data collection if static tracepoint is disabled.
11073 2011-05-10 Doug Evans <dje@google.com>
11075 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11077 2011-05-04 Doug Evans <dje@google.com>
11079 * linux-low.c (linux_join): Skip process lookup.
11080 * spu-low.c (spu_join): Ditto.
11081 * server.c (join_inferiors_callback): Delete.
11082 (process_serial_event): For 'D' packet (detach) call join_inferior
11085 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11087 * README: Don't mention xscale*-*-linux*.
11088 * configure.srv (xscale*-*-linux*): Don't handle target.
11090 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11092 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11094 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11095 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11096 (i386_emit_void_call_2): Likewise.
11098 2011-04-26 Yao Qi <yao@codesourcery.com>
11100 * linux-low.c: Move common macros to linux-ptrace.h.
11101 Include linux-ptrace.h.
11102 * Makefile.in (linux_ptrace_h): New.
11103 (linux-low.o): Depends on linux-ptrace.h.
11105 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11107 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11108 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11109 (remote_prepare): New function with most of the TCP code from ...
11110 (remote_open): ... here. Detect PORT here unconditionally. Move also
11111 setting transport_is_reliable.
11112 * server.c (run_once): New variable.
11113 (gdbserver_usage): Document it.
11114 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11115 the first run if RUN_ONCE.
11116 * server.h (run_once, remote_prepare): New declarations.
11118 2011-04-19 Tom Tromey <tromey@redhat.com>
11120 * win32-low.c (handle_load_dll): Remove duplicate "the".
11122 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11124 Remove support for old Cygwin 1.5 versions.
11125 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11126 function to avoid warning.
11127 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11130 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11132 * gdbserver/server.h (Macro _): Define it if not available.
11134 2011-03-14 Michael Snyder <msnyder@vmware.com>
11136 * hostio.c (handle_close): Remove unnecessary null test.
11138 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11140 * Makefile.in (maintainer-clean realclean distclean): Remove
11141 "make ... subdir_do" command.
11143 2011-03-10 Michael Snyder <msnyder@vmware.com>
11145 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11147 * server.c (handle_v_run): Free alloced buffer on early return.
11149 2011-03-09 Yao Qi <yao@codesourcery.com>
11152 2011-03-04 Yao Qi <yao@codesourcery.com>
11154 * Makefile.in: Remove GNU make feature --directory.
11156 2011-03-05 Yao Qi <yao@codesourcery.com>
11158 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11159 (subdir_do): New make target. Copied from gdb/Makefile.
11160 (maintainer-clean, realclean, distclean, clean): Call corresponding
11161 make targets in common/Makefile.
11163 2011-02-11 Yao Qi <yao@codesourcery.com>
11165 * configure.ac: Call AC_PROG_RANLIB.
11166 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11167 * configure: Regenerate.
11169 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11171 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11173 2011-03-06 Yao Qi <yao@codesourcery.com>
11175 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11177 2011-03-05 Yao Qi <yao@codesourcery.com>
11179 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11180 (subdir_do): New make target. Copied from gdb/Makefile.
11181 (maintainer-clean, realclean, distclean, clean): Call corresponding
11182 make targets in common/Makefile.
11184 2011-03-04 Yao Qi <yao@codesourcery.com>
11186 * Makefile.in: Remove GNU make feature --directory.
11188 2011-03-04 Michael Snyder <msnyder@vmware.com>
11190 * server.c (queue_stop_reply): Call xmalloc not malloc.
11192 2011-03-02 Michael Snyder <msnyder@vmware.com>
11194 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11196 2011-02-28 Michael Snyder <msnyder@vmware.com>
11198 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11199 (cmd_qtframe): Ditto.
11200 (cmd_qtbuffer): Ditto.
11201 (cmd_bigqtbuffer): Ditto.
11203 * utils.c (decimal2str): Initialize 'width' to nine, then
11204 don't mess with it.
11206 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11208 * hostio.c (require_data): Free *data, not data.
11210 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11212 * hostio.c (require_data): Use free, not xfree.
11214 2011-02-27 Michael Snyder <msnyder@vmware.com>
11216 * server.c (handle_query): Discard unused value.
11218 * hostio.c (require_data): Free malloc memory before returning
11221 2011-02-26 Michael Snyder <msnyder@vmware.com>
11223 * linux-low.c (list_threads): Call closedir for dirent.
11225 2011-02-27 Michael Snyder <msnyder@vmware.com>
11227 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11228 a case statement falls through.
11230 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11232 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11235 2011-02-26 Michael Snyder <msnyder@vmware.com>
11237 * utils.c (decimal2str): Eliminate dead code and dead param.
11238 (pulongest): Drop dead param from call to decimal2str.
11241 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11243 Revert the following patch (not approved yet):
11244 2011-02-21 Hui Zhu <teawater@gmail.com>
11245 * tracepoint.c (tp_printf): New function.
11246 (eval_agent_expr): Handle gdb_agent_op_printf.
11248 2011-02-21 Hui Zhu <teawater@gmail.com>
11250 * tracepoint.c (tp_printf): New function.
11251 (eval_agent_expr): Handle gdb_agent_op_printf.
11253 2011-02-18 Tom Tromey <tromey@redhat.com>
11255 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11256 (tracepoint.o): Likewise.
11257 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11258 (gdb_agent_op_names): Likewise.
11260 2011-02-18 Tom Tromey <tromey@redhat.com>
11262 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11263 gdb_agent_op_rot>: New constants.
11264 (gdb_agent_op_names): Add pick and roll.
11265 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11268 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11270 * aclocal.m4: Regenerated with aclocal-1.11.1.
11272 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11274 * server.c (handle_qxfer_traceframe_info): New.
11275 (qxfer_packets): Register "traceframe-info".
11276 (handle_query): Report support for qXfer:traceframe-info:read+.
11277 * tracepoint.c (match_blocktype): New.
11278 (traceframe_find_block_type): Rename to ...
11279 (traceframe_walk_blocks): ... this. Add callback filter argument,
11281 (traceframe_find_block_type): New, reimplemented on top of
11282 traceframe_walk_blocks.
11283 (build_traceframe_info_xml): New.
11284 (traceframe_read_info): New.
11285 * server.h (traceframe_read_info): Declare.
11287 2011-02-11 Yao Qi <yao@codesourcery.com>
11289 * configure.ac: Call AC_PROG_RANLIB.
11290 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11291 * configure: Regenerate.
11293 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11295 * server.c (gdb_read_memory): Change return semantics to allow
11297 (handle_search_memory_1): Adjust.
11298 (process_serial_event) <'m' packet>: Handle partial transfers.
11299 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11301 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11303 * regcache.c (init_register_cache): Initialize
11304 regcache->register_status.
11305 (free_register_cache): Release regcache->register_status.
11306 (regcache_cpy): Copy register_status.
11307 (registers_to_string): Print 'x's for unavailable registers.
11308 (supply_register): Mark the register's status valid or
11309 unavailable, depending on whether a buffer was passed in or not.
11310 (supply_register_zeroed): New.
11311 (supply_regblock): Mark the registers' status valid or
11312 unavailable, depending on whether a buffer was passed in or not.
11313 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11314 (struct regcache): New `register_status' field.
11315 (supply_register_zeroed): Declare.
11316 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11317 supply_register_zeroed, rather than passing a NULL buffer to
11319 * tracepoint.c (fetch_traceframe_registers): Update comment.
11321 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11323 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11326 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11328 * server.h (decode_xfer_write): Change prototype.
11329 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11330 and don't extract the annex here.
11331 * server.c (decode_xfer_read): Remove `annex' parameter,
11332 and don't extract the annex here.
11333 (decode_xfer): New.
11334 (struct qxfer): New.
11335 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11336 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11337 (handle_qxfer_statictrace): New functions, abstracted out from
11338 handle_query, and made to use the struct qxfer interface.
11339 (handle_threads_qxfer_proper): Rename to ...
11340 (handle_qxfer_threads_proper): ... this.
11341 (handle_threads_qxfer): Rename to ...
11342 (handle_qxfer_threads): ... this. Adjust.
11343 (qxfer_packets): New array.
11344 (handle_qxfer): New function.
11345 (handle_query): Use handle_qxfer.
11347 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11349 * gdbreplay.c: Shorten lines of >= 80 columns.
11350 * linux-low.c: Ditto.
11351 * linux-ppc-low.c: Ditto.
11352 * linux-s390-low.c: Ditto.
11353 * linux-sparc-low.c: Ditto.
11354 * linux-x86-low.c: Ditto.
11355 * linux-xtensa-low.c: Ditto.
11356 * mem-break.c: Ditto.
11357 * nto-low.c: Ditto.
11358 * regcache.h: Ditto.
11359 * remote-utils.c: Ditto.
11362 * thread-db.c: Ditto.
11363 * tracepoint.c: Ditto.
11365 * win32-low.h: Ditto.
11367 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11369 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11372 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11374 * server.c (gdbserver_version): Update copyright year in version
11376 * gdbreplay.c (gdbreplay_version): Ditto.
11378 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11380 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11381 * linux-bfin-low.c: New file.
11382 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11383 PT_DATA_ADDR for BFIN targets.
11384 * Makefile.in (SFILES): Add linux-bfin-low.c.
11385 (clean): Remove reg-bfin.c.
11386 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11387 * README: Mention supported Blackfin targets.
11389 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11391 * .gitignore: New file.
11393 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11395 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11397 2010-10-22 Jie Zhang <jie@codesourcery.com>
11399 * Makefile.in: Add FLAGS_TO_PASS variable.
11400 (install): Remove dependency of install-only and recursively
11401 invoke make for install-only.
11403 2010-10-04 Doug Evans <dje@google.com>
11405 * Makefile.in (uninstall): Use $(DESTDIR).
11407 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11411 * linux-x86-low.c (compat_siginfo_from_siginfo)
11412 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11413 si_code is < 0. Check for si_code == SI_TIMER before checking for
11416 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11418 * lynx-i386-low.c: New file.
11419 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11421 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11423 * lynx-low.c (ptrace_request_to_str): Remove handling for
11424 request values that have been removed in LynxOS 5.x.
11426 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11428 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11431 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11433 * configure.ac: Add --enable-inprocess-agent option.
11434 * configure: Rebuilt.
11436 2010-09-06 Yao Qi <yao@codesourcery.com>
11438 * linux-low.c (linux_kill): Remove unused variable.
11439 (linux_stabilize_threads): Likewise.
11440 * server.c (start_inferior): Likewise.
11441 (queue_stop_reply_callback): Likewise.
11442 * tracepoint.c (do_action_at_tracepoint): Likewise.
11444 2010-09-06 Yao Qi <yao@codesourcery.com>
11446 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11449 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11451 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11453 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11455 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11458 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11460 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11461 gdbserver/lynx-ppc-low.c: New files.
11462 * Makefile.in (lynx_low_h): New variable.
11463 (lynx-low.o, lynx-ppc-low.o): New rules.
11464 * configure.ac: On LynxOS, link with -lnetinet.
11465 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11466 * configure: regenerate.
11468 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11470 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11471 * configure.ac: Add check for vasprintf and vsnprintf.
11472 * configure, config.in: Regenerate.
11473 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11475 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11477 * gdbreplay.c: Move include of alloca.h up, next to include of
11479 * server.h: Add include of malloc.h.
11480 * mem-break.c: Remove include of malloc.h.
11481 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11483 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11485 * Makefile.in (memmem.o): Build with -Wno-error.
11487 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11489 * utils.c (xsnprintf): Make non-static.
11490 * server.h: Add xsnprintf declaration.
11491 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11492 replace calls to snprintf by calls to xsnprintf throughout.
11494 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11496 * configure.ac: Add configure check for alloca.
11497 * configure, config.in: Regenerate.
11498 * server.h: Include alloca.h if it exists.
11499 * gdbreplay.c: Include alloca.h if it exists.
11501 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11503 * linux-low.c (__SIGRTMIN): Define if not already defined.
11504 (linux_create_inferior): Check for __ANDROID__ rather than
11506 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11507 are already deferred.
11508 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11509 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11510 stopped and already has a pending signal to report.
11511 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11512 a pending signal to report or is moving out of a jump pad.
11513 (linux_init_signals): Check for __ANDROID__ rather than
11516 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11518 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11519 debug_threads check. Avoid a linear search when not doing debug
11522 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11524 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11525 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11526 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11527 (process_event): Change local fd's type to gdb_fildes_t.
11528 (create_file_handler): Adjust prototype.
11529 (delete_file_handler): Adjust prototype.
11530 (handle_file_event): Adjust prototype. Use pfildes.
11531 (create_file_event): Adjsut prototype.
11532 * remote-utils.c (remote_desc, listen_desc): Change type to
11534 * server.h: New gdb_fildes_t typedef.
11535 [USE_WIN32API]: Include winsock2.h.
11536 (delete_file_handler, add_file_handler): Adjust prototypes.
11537 (pfildes): Declare.
11538 * utils.c (pfildes): New.
11540 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11542 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11543 * configure: Regenerate.
11545 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11547 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11548 (linux_done_accessing_memory): ... this.
11549 (linux_target_ops): Adjust.
11550 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11551 * nto-low.c (nto_target_ops): Adjust comment.
11552 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11553 * spu-low.c (spu_target_ops): Adjust comment.
11554 * target.h (target_ops): Rename unprepare_to_access_memory field
11555 to done_accessing_memory.
11556 (unprepare_to_access_memory): Rename to ...
11557 (done_accessing_memory): ... this.
11559 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11561 * linux-low.c (linux_prepare_to_access_memory): New.
11562 (linux_unprepare_to_access_memory): New.
11563 (linux_target_ops): Install them.
11564 * server.c (read_memory): Rename to ...
11565 (gdb_read_memory): ... this. Use
11566 prepare_to_access_memory/prepare_to_access_memory.
11567 (write_memory): Rename to ...
11568 (gdb_write_memory): ... this. Use
11569 prepare_to_access_memory/prepare_to_access_memory.
11570 (handle_search_memory_1): Adjust.
11571 (process_serial_event): Adjust.
11572 * target.h (struct target_ops): New fields
11573 prepare_to_access_memory and unprepare_to_access_memory.
11574 (prepare_to_access_memory, unprepare_to_access_memory): New.
11575 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11576 prepare_to_access_memory/prepare_to_access_memory.
11577 * nto-low.c (nto_target_ops): Adjust.
11578 * spu-low.c (spu_target_ops): Adjust.
11579 * win32-low.c (win32_target_ops): Adjust.
11581 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11583 * Makefile.in (WARN_CFLAGS): Get it from configure.
11584 (WERROR_CFLAGS): New.
11585 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11586 * configure.ac: Introduce --enable-werror, which adds -Werror to
11587 the compiler command line. Enabled by default. Disable with
11588 --disable-werror. Add -Wdeclaration-after-statement
11589 Wpointer-arith and -Wformat-nonliteral to warning flags.
11590 * configure: Regenerate.
11592 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11594 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11596 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11598 * gdbreplay.c (remote_error): New.
11600 (expect): Use gdbchar. Check for error reading from GDB.
11601 Clarify sync error output.
11602 (play): Check for errors writing to GDB.
11603 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11604 * remote-utils.c (getpkt): Check for errors writing to the remote
11607 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11609 * linux-low.c (linux_wait_1): Move non-debugging code out of
11610 `debug_threads' control.
11612 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11614 * linux-low.c (linux_wait_1): Don't set last_status here.
11615 * server.c (push_event, queue_stop_reply_callback): Assert we're
11616 not pushing a TARGET_WAITKIND_IGNORE event.
11617 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11618 (myresume, handle_target_event): Set the thread's last_resume_kind
11619 and last_status from the target returned status.
11621 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11625 * linux-x86-low.c (update_debug_registers_callback): New.
11626 (i386_dr_low_set_addr): Use it.
11627 (i386_dr_low_get_addr): New.
11628 (i386_dr_low_set_control): Use update_debug_registers_callback.
11629 (i386_dr_low_get_control): New.
11630 (i386_dr_low_get_status): Adjust.
11631 * linux-low.c (linux_stop_lwp): New.
11632 * linux-low.h (linux_stop_lwp): Declare.
11634 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11635 argument instead of a i386_debug_reg_state.
11636 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11637 a i386_debug_reg_state.
11638 (i386_insert_aligned_watchpoint): Adjust.
11639 (i386_remove_aligned_watchpoint): Adjust.
11640 (i386_low_stopped_data_address): Read the debug registers from the
11641 inferior instead of from the mirrors.
11642 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11643 (i386_dr_low_get_addr): Declare.
11644 (i386_dr_low_get_control): Declare.
11645 (i386_dr_low_get_status): Change prototype.
11647 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11648 (i386_dr_low_get_addr): New.
11649 (i386_dr_low_get_control): New.
11650 (i386_dr_low_get_status): Adjust prototype. Return
11652 (i386_initial_stuff): Clear dr_status_mirror and
11654 (i386_get_thread_context): Adjust.
11655 (i386_set_thread_context): Adjust.
11656 (i386_thread_added): Adjust.
11658 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11660 * linux-low.h (linux_thread_area): Delete declaration.
11662 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11664 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11665 after its termination.
11667 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11669 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11670 (gdb_wants_all_stopped): Delete.
11671 (linux_wait_1): Don't call them.
11672 * server.c (handle_v_cont): Tag all threads as want-stopped.
11673 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11674 stopped as "client-wants-stopped".
11676 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11678 * Makefile.in (signals_h): New.
11679 (server_h): Depend on it.
11680 (server.o): Don't depend on $(signals_def).
11681 (signals.o): Depend on $(signals_def).
11683 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11685 * Makefile.in (signals_def): New.
11686 (server_h): Append include/gdb/signals.h and signals_def.
11687 (server.o): Append signals_def.
11689 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11691 * server.c (handle_target_event): Use target_signal_to_host for
11692 resume_info.sig initialization.
11693 * target.h (struct thread_resume) <sig>: New comment.
11695 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11697 * server.c (handle_query): strcpy() the returned string from paddress()
11698 instead of sprintf().
11699 * utils.c (paddress): Return phex_nz().
11701 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11703 * server.c (handle_v_cont): Call mourn_inferior if process
11705 (myresume): Likewise.
11707 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11709 Static tracepoints, and integration with UST.
11711 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11712 * mem-break.c (uninsert_all_breakpoints)
11713 (reinsert_all_breakpoints): New.
11714 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11715 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11716 (gdb_agent_ust_loaded, helper_thread_id)
11717 (gdb_agent_helper_thread_id): New macros.
11718 (struct ipa_sym_addresses): Add addr_ust_loaded,
11719 addr_helper_thread_id, addr_cmd_buf.
11720 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11721 (in_process_agent_loaded_ust): New.
11722 (write_e_ust_not_loaded): New.
11723 (maybe_write_ipa_ust_not_loaded): New.
11724 (struct collect_static_trace_data_action): New.
11725 (enum tracepoint_type) <static_tracepoint>: New.
11726 (struct tracepoint) <handle>: Mention static tracepoints.
11727 (struct static_tracepoint_ctx): New.
11728 (CMD_BUF_SIZE): New.
11729 (add_tracepoint_action): Handle static tracepoint actions.
11730 (unprobe_marker_at): New.
11731 (clear_installed_tracepoints): Handle static tracepoints.
11732 (cmd_qtdp): Handle static tracepoints.
11733 (probe_marker_at): New.
11734 (cmd_qtstart): Handle static tracepoints.
11735 (response_tracepoint): Handle static tracepoints.
11736 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11737 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11738 (get_context_regcache): Handle static tracepoints.
11739 (do_action_at_tracepoint): Handle static tracepoint actions.
11740 (traceframe_find_block_type): Handle static trace data blocks.
11741 (traceframe_read_sdata): New.
11742 (download_tracepoints): Download static tracepoint actions.
11743 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11744 (GDB_PROBE_NAME): New.
11746 (GET_UST_SYM): New.
11749 (ust_marker_to_static_tracepoint): New.
11751 (collect_ust_data_at_tracepoint): New.
11752 (gdb_ust_probe): New.
11753 (UNIX_PATH_MAX, SOCK_DIR): New.
11754 (gdb_ust_connect_sync_socket): New.
11755 (resume_thread, stop_thread): New.
11756 (run_inferior_command): New.
11757 (init_named_socket): New.
11758 (gdb_ust_socket_init): New.
11759 (cstr_to_hexstr): New.
11761 (first_marker, next_marker): New.
11762 (response_ust_marker): New.
11763 (cmd_qtfstm, cmd_qtsstm): New.
11764 (unprobe_marker_at, probe_marker_at): New.
11765 (cmd_qtstmat, gdb_ust_thread): New.
11766 (gdb_ust_init): New.
11767 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11768 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11769 (ST_REGENTRY): New.
11770 (x86_64_st_collect_regmap): New.
11771 (X86_64_NUM_ST_COLLECT_GREGS): New.
11772 (AMD64_RIP_REGNUM): New.
11773 (supply_static_tracepoint_registers): New.
11774 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11775 (ST_REGENTRY): New.
11776 (i386_st_collect_regmap): New.
11777 (i386_NUM_ST_COLLECT_GREGS): New.
11778 (supply_static_tracepoint_registers): New.
11779 * server.c (handle_query): Handle qXfer:statictrace:read.
11780 <qSupported>: Report support for StaticTracepoints, and
11781 qXfer:statictrace:read features.
11782 * server.h (traceframe_read_sdata)
11783 (supply_static_tracepoint_registers): Declare.
11784 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11785 (unpack_varlen_hex): Include in IPA build.
11786 * Makefile.in (ustlibs, ustinc): New.
11787 (IPA_OBJS): Add remote-utils-ipa.o.
11788 ($(IPA_LIB)): Link -ldl and -lpthread.
11790 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11791 * config.in, configure: Regenerate.
11793 2010-06-20 Ian Lance Taylor <iant@google.com>
11794 Pedro Alves <pedro@codesourcery.com>
11796 * linux-x86-low.c (always_true): Delete.
11797 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11798 trying to fool the compiler with always_true.
11800 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11802 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11803 conditions in gdbserver.
11805 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11807 * spu-low.c (spu_read_memory): Wrap around local store limit.
11808 (spu_write_memory): Likewise.
11810 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11812 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11813 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11815 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11817 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11818 uses with LONGEST uses.
11820 2010-06-14 Stan Shebs <stan@codesourcery.com>
11821 Pedro Alves <pedro@codesourcery.com>
11825 * linux-x86-low.c: Include limits.h.
11827 (always_true): New.
11830 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11831 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11832 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11833 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11834 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11835 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11836 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11837 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11838 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11839 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11840 (amd64_emit_void_call_2): New.
11841 (amd64_emit_ops): New.
11842 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11843 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11844 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11845 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11846 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11847 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11848 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11849 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11850 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11851 (i386_emit_stack_adjust, i386_emit_int_call_1)
11852 (i386_emit_void_call_2): New.
11853 (i386_emit_ops): New.
11854 (x86_emit_ops): New.
11855 (the_low_target): Install x86_emit_ops.
11856 * server.h (struct emit_ops): New.
11857 (get_raw_reg_func_addr): Declare.
11858 (current_insn_ptr, emit_error): Declare.
11859 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11860 (set_trace_state_variable_value): New defines.
11861 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11862 addr_get_trace_state_variable_value and
11863 addr_set_trace_state_variable_value.
11864 (symbol_list): New fields for get_raw_reg,
11865 get_trace_state_variable_value and set_trace_state_variable_value.
11866 (condfn): New typedef.
11867 (struct tracepoint): New field `compiled_cond'.
11868 (do_action_at_tracepoint): Clear compiled_cond.
11869 (get_trace_state_variable_value, set_trace_state_variable_value):
11871 (condition_true_at_tracepoint): If there's a compiled condition,
11873 (current_insn_ptr, emit_error): New globals.
11874 (struct bytecode_address): New.
11875 (get_raw_reg_func_addr): New.
11876 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11877 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11878 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11879 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11880 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11881 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11882 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11883 (compile_tracepoint_condition, compile_bytecodes): New.
11884 * target.h (emit_ops): Forward declare.
11885 (struct target_ops): New field emit_ops.
11886 (target_emit_ops): New.
11887 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11888 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11889 * linux-low.c (linux_emit_ops): New.
11890 (linux_target_ops): Install it.
11891 * linux-low.h (struct linux_target_ops): New field emit_ops.
11893 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11895 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11896 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11898 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11899 Stan Shebs <stan@codesourcery.com>
11901 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11902 (all): Depend on $(extra_libraries).
11903 (install-only): Install the IPA.
11904 (IPA_OBJS, IPA_LIB): New.
11905 (clean): Remove the IPA lib.
11906 (IPAGENT_CFLAGS): New.
11907 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11908 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11909 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11910 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11911 * configure.ac: Check for atomic builtins support in the compiler.
11912 (IPA_DEPFILES, extra_libraries): Define.
11913 * configure.srv (ipa_obj): Add description.
11914 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11915 (i[34567]86-*-linux*): Set ipa_obj.
11916 (x86_64-*-linux*): Set ipa_obj.
11917 * linux-low.c (stabilizing_threads): New.
11918 (supports_fast_tracepoints): New.
11919 (linux_detach): Stabilize threads before detaching.
11920 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11921 the lwp is either not stabilizing, or is moving out of a jump pad.
11922 (linux_fast_tracepoint_collecting): New.
11923 (maybe_move_out_of_jump_pad): New.
11924 (enqueue_one_deferred_signal): New.
11925 (dequeue_one_deferred_signal): New.
11926 (linux_wait_for_event_1): If moving out of a jump pad, defer
11927 pending signals to later.
11928 (linux_stabilize_threads): New.
11929 (linux_wait_1): Check if threads need moving out of jump pads, and
11931 (stuck_in_jump_pad_callback): New.
11932 (move_out_of_jump_pad_callback): New.
11933 (lwp_running): New.
11934 (linux_resume_one_lwp): Handle moving out of jump pads.
11935 (linux_set_resume_request): Dequeue deferred signals.
11936 (need_step_over_p): Also step over fast tracepoint jumps.
11937 (start_step_over): Also uninsert fast tracepoint jumps.
11938 (finish_step_over): Also reinsert fast tracepoint jumps.
11939 (linux_install_fast_tracepoint_jump): New.
11940 (linux_target_ops): Install linux_stabilize_threads and
11941 linux_install_fast_tracepoint_jump_pad.
11942 * linux-low.h (linux_target_ops) <get_thread_area,
11943 install_fast_tracepoint_jump_pad>: New fields.
11944 (struct lwp_info) <collecting_fast_tracepoint,
11945 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11946 (linux_get_thread_area): Declare.
11947 * linux-x86-low.c (jump_insn): New.
11948 (x86_get_thread_area): New.
11949 (append_insns): New.
11950 (push_opcode): New.
11951 (amd64_install_fast_tracepoint_jump_pad): New.
11952 (i386_install_fast_tracepoint_jump_pad): New.
11953 (x86_install_fast_tracepoint_jump_pad): New.
11954 (the_low_target): Install x86_get_thread_area and
11955 x86_install_fast_tracepoint_jump_pad.
11956 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11957 (struct fast_tracepoint_jump): New.
11958 (fast_tracepoint_jump_insn): New.
11959 (fast_tracepoint_jump_shadow): New.
11960 (find_fast_tracepoint_jump_at): New.
11961 (fast_tracepoint_jump_here): New.
11962 (delete_fast_tracepoint_jump): New.
11963 (set_fast_tracepoint_jump): New.
11964 (uninsert_fast_tracepoint_jumps_at): New.
11965 (reinsert_fast_tracepoint_jumps_at): New.
11966 (set_breakpoint_at): Use write_inferior_memory.
11967 (uninsert_raw_breakpoint): Use write_inferior_memory.
11968 (check_mem_read): Mask out fast tracepoint jumps.
11969 (check_mem_write): Mask out fast tracepoint jumps.
11970 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11971 (set_fast_tracepoint_jump): Declare.
11972 (delete_fast_tracepoint_jump)
11973 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11974 (reinsert_fast_tracepoint_jumps_at): Declare.
11975 * regcache.c: Don't compile many functions when building the
11976 in-process agent library.
11977 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11978 the register buffer in the heap.
11979 (free_register_cache): If the register buffer isn't owned by the
11980 regcache, don't free it.
11981 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11982 pre-existing register caches.
11983 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11985 (convert_ascii_to_int): : Constify `from' parameter type.
11986 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11987 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11988 the needed buffer in-place.
11989 (relocate_instruction): New.
11990 * server.c (handle_query) <qSymbols>: If the target supports
11991 tracepoints, give it a chance of looking up symbols. Report
11992 support for fast tracepoints.
11993 (handle_status): Stabilize threads.
11994 (process_serial_event): Adjust.
11995 * server.h (struct fast_tracepoint_jump): Forward declare.
11996 (struct process_info) <fast_tracepoint_jumps>: New field.
11997 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11998 (decode_X_packet, decode_M_packet): Adjust.
11999 (relocate_instruction): Declare.
12000 (in_process_agent_loaded): Declare.
12001 (tracepoint_look_up_symbols): Declare.
12002 (struct fast_tpoint_collect_status): Declare.
12003 (fast_tracepoint_collecting): Declare.
12004 (force_unlock_trace_buffer): Declare.
12005 (handle_tracepoint_bkpts): Declare.
12006 (initialize_low_tracepoint)
12007 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12008 * target.h (struct target_ops) <stabilize_threads,
12009 install_fast_tracepoint_jump_pad>: New fields.
12010 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12011 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12012 [HAVE_STDINT_H]: Include stdint.h.
12013 (trace_debug_1): Rename to ...
12014 (trace_vdebug): ... this.
12015 (trace_debug): Rename to ...
12016 (trace_debug_1): ... this. Add `level' parameter.
12017 (trace_debug): New.
12018 (ATTR_USED, ATTR_NOINLINE): New.
12019 (IP_AGENT_EXPORT): New.
12020 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12021 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12022 (about_to_request_buffer_space, trace_buffer_is_full)
12023 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12024 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12025 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12026 (traceframe_write_count, traceframes_created)
12027 (trace_state_variables)
12028 New renaming defines.
12029 (struct ipa_sym_addresses): New.
12030 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12031 (symbol_list): New.
12032 (ipa_sym_addrs): New.
12033 (all_tracepoint_symbols_looked_up): New.
12034 (in_process_agent_loaded): New.
12035 (write_e_ipa_not_loaded): New.
12036 (maybe_write_ipa_not_loaded): New.
12037 (tracepoint_look_up_symbols): New.
12038 (debug_threads) [IN_PROCESS_AGENT]: New.
12039 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12040 (UNKNOWN_SIDE_EFFECTS): New.
12041 (stop_tracing): New.
12042 (flush_trace_buffer): New.
12043 (stop_tracing_bkpt): New.
12044 (flush_trace_buffer_bkpt): New.
12045 (read_inferior_integer): New.
12046 (read_inferior_uinteger): New.
12047 (read_inferior_data_pointer): New.
12048 (write_inferior_data_pointer): New.
12049 (write_inferior_integer): New.
12050 (write_inferior_uinteger): New.
12051 (struct collect_static_trace_data_action): Delete.
12052 (enum tracepoint_type): New.
12053 (struct tracepoint) <type>: New field `type'.
12054 <actions_str, step_actions, step_actions_str>: Only include in
12056 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12057 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12058 (tracepoints): Use IP_AGENT_EXPORT.
12059 (last_tracepoint): Don't include in the IPA.
12060 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12061 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12062 (alloced_trace_state_variables): New.
12063 (trace_state_variables): Use IP_AGENT_EXPORT.
12064 (traceframe_t): Delete unused variable.
12065 (circular_trace_buffer): Don't include in the IPA.
12066 (trace_buffer_start): Delete.
12067 (struct trace_buffer_control): New.
12068 (trace_buffer_free): Delete.
12069 (struct ipa_trace_buffer_control): New.
12070 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12071 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12073 (trace_buffer_ctrl): New.
12074 (TRACE_BUFFER_CTRL_CURR): New.
12075 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12076 Reimplement as macros.
12077 (trace_buffer_wrap): Delete.
12078 (traceframe_write_count, traceframe_read_count)
12079 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12080 (struct tracepoint_hit_ctx) <type>: New field.
12081 (struct fast_tracepoint_ctx): New.
12082 (memory_barrier): New.
12084 (record_tracepoint_error): Update atomically in the IPA.
12085 (clear_inferior_trace_buffer): New.
12086 (about_to_request_buffer_space): New.
12087 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12088 updating the same buffer.
12089 (add_tracepoint): Default the tracepoint's type to trap
12090 tracepoint, and orig_size to -1.
12091 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12092 internal variables.
12093 (create_trace_state_variable): New parameter `gdb'. Handle it.
12094 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12095 (cmd_qtdp): Handle fast tracepoints.
12096 (cmd_qtdv): Adjust.
12097 (max_jump_pad_size): New.
12098 (gdb_jump_pad_head): New.
12099 (get_jump_space_head): New.
12100 (claim_jump_space): New.
12101 (sort_tracepoints): New.
12102 (MAX_JUMP_SIZE): New.
12103 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12105 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12106 support. Upload fast traceframes, and delete internal IPA
12108 (stop_tracing_handler): New.
12109 (flush_trace_buffer_handler): New.
12110 (cmd_qtstop): Upload fast tracepoints.
12111 (response_tracepoint): Handle fast tracepoints.
12112 (tracepoint_finished_step): Upload fast traceframes. Set the
12113 tracepoint hit context's tracepoint type.
12114 (handle_tracepoint_bkpts): New.
12115 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12116 type. Add comment about fast tracepoints.
12117 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12118 non-existing action_str field.
12119 (get_context_regcache): Handle fast tracepoints.
12120 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12122 (fast_tracepoint_from_jump_pad_address): New.
12123 (fast_tracepoint_from_ipa_tpoint_address): New.
12124 (collecting_t): New.
12125 (force_unlock_trace_buffer): New.
12126 (fast_tracepoint_collecting): New.
12128 (gdb_collect): New.
12129 (write_inferior_data_ptr): New.
12130 (target_tp_heap): New.
12131 (target_malloc): New.
12132 (download_agent_expr): New.
12134 (download_tracepoints): New.
12135 (download_trace_state_variables): New.
12136 (upload_fast_traceframes): New.
12137 (IPA_FIRST_TRACEFRAME): New.
12138 (IPA_NEXT_TRACEFRAME_1): New.
12139 (IPA_NEXT_TRACEFRAME): New.
12140 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12141 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12142 (gdb_jump_pad_buffer_end): New.
12143 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12144 (initialize_tracepoint): Adjust.
12145 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12146 buffer. Initialize the low module.
12147 * utils.c (PREFIX, TOOLNAME): New.
12148 (malloc_failure): Use PREFIX.
12149 (error): In the IPA, an error causes an exit.
12150 (fatal, warning): Use PREFIX.
12151 (internal_error): Use TOOLNAME.
12152 (NUMCELLS): Increase to 10.
12153 * configure, config.in: Regenerate.
12155 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12157 * server.c (handle_query) <qSupported>: Do two passes over the
12158 qSupported string to avoid nesting strtok.
12160 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12162 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12164 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12165 -Wl,--dynamic-list.
12166 * configure: Regenerate.
12167 * proc-service.list: New.
12169 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12171 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12174 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12176 * gdbreplay.c (remote_open): Check error return from socket() call by
12177 its equality to -1 not by it being negative.
12178 * remote-utils.c (remote_open): Likewise.
12180 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12182 * config.h: Regenerate.
12184 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12186 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12187 doesn't provide PTRACE_GET_THREAD_AREA.
12189 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12191 * linux-m68k-low.c: Include <asm/ptrace.h>
12192 (ps_get_thread_area): Implement.
12194 2010-05-03 Doug Evans <dje@google.com>
12196 * event-loop.c (struct callback_event): New struct.
12197 (callback_list): New global.
12198 (append_callback_event, delete_callback_event): New functions.
12199 (process_callback): New function.
12200 (start_event_loop): Call it.
12201 * remote-utils.c (NOT_SCHEDULED): Define.
12202 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12203 moved out of readchar.
12204 (readchar): Rewrite. Call reschedule before returning.
12205 (reset_readchar): New function.
12206 (remote_close): Call it.
12207 (process_remaining, reschedule): New functions.
12208 * server.h (callback_handler_func): New typedef.
12209 (append_callback_event, delete_callback_event): Declare.
12211 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12213 * proc-service.c (ps_pglobal_lookup): Use
12214 thread_db_look_up_one_symbol.
12215 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12216 parameter. Use it instead of all_symbols_looked_up.
12217 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12219 (all_symbols_looked_up): Don't declare.
12220 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12221 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12223 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12224 Set all_symbols_looked_up here.
12225 (thread_db_look_up_one_symbol): New.
12226 (thread_db_get_tls_address): Adjust.
12227 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12228 thread_db object on the heap, and tentatively set it in the
12230 (thread_db_init): Don't set all_symbols_looked_up here.
12231 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12233 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12235 * linux-low.c (linux_kill, linux_detach): Adjust.
12236 (status_pending_p_callback): Remove redundant statement. Check
12237 for !TARGET_WAITIKIND_IGNORE, instead of
12238 TARGET_WAITKIND_STOPPED.
12239 (handle_tracepoints): Make sure LWP is locked. Adjust.
12240 (linux_wait_for_event_1): Adjust.
12241 (linux_cancel_breakpoints): New.
12242 (unsuspend_one_lwp): New.
12243 (unsuspend_all_lwps): New.
12244 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12245 (send_sigstop_callback): Change return type to int, add new
12246 `except' parameter and handle it.
12247 (suspend_and_send_sigstop_callback): New.
12248 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12249 pass them down. If SUSPEND, also increment the lwp's suspend
12251 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12252 (need_step_over_p): Don't consider suspended LWPs.
12253 (start_step_over): Adjust.
12254 (proceed_one_lwp): Change return type to int, add new `except'
12255 parameter and handle it.
12256 (unsuspend_and_proceed_one_lwp): New.
12257 (proceed_all_lwps): Use find_inferior instead of
12259 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12260 also decrement the suspend count of LWPs. Pass `except' down,
12261 instead of hacking its suspend count.
12262 (linux_pause_all): Add `freeze' parameter. Adjust.
12263 (linux_unpause_all): New.
12264 (linux_target_ops): Install linux_unpause_all.
12265 * server.c (handle_status): Adjust.
12266 * target.h (struct target_ops): New fields `unpause_all' and
12267 `cancel_breakpoints'. Add new parameter to `pause_all'.
12268 (pause_all): Add new `freeze' parameter.
12269 (unpause_all): New.
12270 (cancel_breakpoints): New.
12271 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12272 cancel breakpoints.
12273 (cmd_qtstart): Pause threads.
12274 (stop_tracing): Pause threads, and cancel breakpoints.
12275 * win32-low.c (win32_target_ops): Adjust.
12277 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12279 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12280 the inferior right away from here...
12281 (linux_wait_1): ... to here, and adjust to check the thread's
12282 last_resume_kind instead of the lwp's step or stop_expected flags.
12284 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12286 * README: Use consistent `GDB' and `GDBserver' spellings.
12288 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12290 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12291 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12292 (linux_detach_one_lwp): Assume the lwp is stopped.
12293 (any_thread_of): Delete.
12294 (linux_detach): Stop all lwps here. Don't blindly delete all
12296 (delete_lwp_callback): New.
12297 (linux_mourn): Delete all lwps of the process that is gone.
12298 (linux_wait_1): Don't delete the last lwp of the process here.
12299 * mem-break.h (mark_breakpoints_out): Declare.
12300 * mem-break.c (mark_breakpoints_out): New.
12301 (free_all_breakpoints): Use it.
12302 * server.c (handle_target_event): If the process is gone, mark
12304 * thread-db.c (struct thread_db) <create_bp>: New field.
12305 (thread_db_enable_reporting): Fix prototype. Store a thread event
12306 breakpoint reference in the thread_db struct.
12307 (thread_db_load_search): Clear the thread_db object.
12308 (try_thread_db_load_1): Ditto.
12309 (switch_to_process): New.
12310 (disable_thread_event_reporting): Use it.
12311 (remove_thread_event_breakpoints): New.
12312 (thread_db_detach, thread_db_mourn): Use it.
12314 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12316 * linux-low.c (linux_enable_event_reporting): New.
12317 (linux_wait_for_event_1, handle_extended_wait): Use it.
12319 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12321 * linux-low.c (linux_kill_one_lwp, linux_kill)
12322 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12323 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12324 SIGSTOP even if the LWP is stopped.
12325 (send_sigstop_callback): New.
12326 (stop_all_lwps): Use send_sigstop_callback instead.
12327 (linux_resume_one_thread): Adjust.
12328 (proceed_one_lwp): Still proceed an LWP that the client has
12329 requested to stop, if we haven't reported it as stopped yet. Make
12330 sure that LWPs the client want stopped, have a pending SIGSTOP.
12332 2010-04-26 Doug Evans <dje@google.com>
12334 * server.c (handle_general_set): Make static.
12336 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12337 Print received char after testing for error/eof instead of before.
12338 (input_interrupt): Tweak comment.
12340 2010-04-23 Doug Evans <dje@google.com>
12342 * server.c (start_inferior): Print inferior argv if --debug.
12344 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12346 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12347 * nto-x86-low.c: Include server.h
12349 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12351 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12352 be consistent with other sources of this directory.
12353 (init_registers_amd64): Correct name of source file of this function
12356 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12358 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12359 64-bit executables.
12361 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12363 * win32-i386-low.c: Add 64-bit support.
12364 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12365 (init_registers_amd64): Declare.
12366 (mappings): Add 64-bit version of array.
12367 (init_windows_x86): New function.
12368 (the_low_target): Change init_arch field to init_windows_x86.
12370 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12372 * win32-low.c: Adapt to support also 64-bit architecture.
12373 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12374 (get_image_name): Use SIZE_T type for local variable `done'.
12375 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12376 (toolhelp_get_dll_name): Idem.
12377 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12378 Use uintptr_t typecast to avoid warning.
12379 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12380 (handle_exception): Use phex_nz to avoid warning.
12381 (win32_wait): Remove unused local variable `process'.
12383 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12385 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12388 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12390 * configure.ac: Use `ws2_32' library for srv_mingw.
12391 * configure: Regenerate.
12392 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12393 * remote-utils.c: Likewise.
12395 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12397 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12398 if __x86_64__ is defined.
12400 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12402 * configure: Regenerate.
12404 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12406 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12407 * target.h (target_ops): New get_tib_address field.
12408 * win32-low.h (win32_thread_info): Add thread_local_base field.
12409 * win32-low.c (child_add_thread): Add tlb argument.
12410 Set thread_local_base field to TLB.
12411 (get_child_debug_event): Adapt to child_add_thread change.
12412 (win32_get_tib_address): New function.
12413 (win32_target_ops): Set get_tib_address field to
12414 win32_get_tib_address.
12415 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12417 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12419 * linux-low.c (linux_mourn): Also remove the process.
12420 * server.c (handle_target_event): Don't remove the process here.
12421 * nto-low.c (nto_mourn): New.
12422 (nto_target_ops): Install it.
12423 * spu-low.c (spu_mourn): New.
12424 (spu_target_ops): Install it.
12425 * win32-low.c (win32_mourn): New.
12426 (win32_target_ops): Install it.
12428 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12430 * server.h (buffer_xml_printf): Remove redundant `;'.
12432 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12434 * regcache.c (set_register_cache): Invalidate regcaches before
12435 changing the register cache layout.
12436 (regcache_invalidate_one): Allow a NULL regcache.
12437 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12438 regcaches before changing the register cache layout or the target
12441 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12443 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12444 variable warning on Linux/x86-64.
12446 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12448 GDBserver disconnected tracing support.
12450 * linux-low.c (linux_remove_process): Delete.
12451 (add_lwp): Don't set last_resume_kind here.
12452 (linux_kill): Use `mourn'.
12453 (linux_detach): Use `thread_db_detach', and `mourn'.
12454 (linux_mourn): New.
12455 (linux_attach_lwp_1): Adjust comment.
12456 (linux_attach): last_resume_kind moved the thread_info; adjust.
12457 (status_pending_p_callback): Adjust.
12458 (linux_wait_for_event_1): Adjust.
12459 (count_events_callback, select_singlestep_lwp_callback)
12460 (select_event_lwp_callback, cancel_breakpoints_callback)
12461 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12462 (proceed_one_lwp): Adjust.
12463 (linux_async): Add debug output.
12464 (linux_thread_stopped): New.
12465 (linux_pause_all): New.
12466 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12468 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12469 (thread_db_free): Delete declaration.
12470 (thread_db_detach, thread_db_mourn): Declare.
12471 * thread-db.c (thread_db_init): Use thread_db_mourn.
12472 (thread_db_free): Delete, split in two.
12473 (disable_thread_event_reporting): New.
12474 (thread_db_detach): New.
12475 (thread_db_mourn): New.
12477 * server.h (struct thread_info) <last_resume_kind>: New field.
12478 <attached>: Add comment.
12479 <gdb_detached>: New field.
12480 (handler_func): Change return type to int.
12481 (handle_serial_event, handle_target_event): Ditto.
12482 (gdb_connected): Declare.
12484 (disconnected_tracing): Declare.
12485 (stop_tracing): Declare.
12487 * server.c (handle_query) <qSupported>: Report support for
12488 disconnected tracing.
12489 (queue_stop_reply_callback): Account for running threads.
12490 (gdb_wants_thread_stopped): New.
12491 (gdb_wants_all_threads_stopped): New.
12492 (gdb_reattached_process): New.
12493 (handle_status): Clear the `gdb_detached' flag of all processes.
12494 In all-stop, stop all threads.
12495 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12496 (process_serial_event): If the remote connection breaks, or if an
12497 exit was forced with "monitor exit", force an event loop exit.
12498 Handle disconnected tracing on detach.
12499 (handle_serial_event): Adjust.
12500 (handle_target_event): If GDB isn't connected, forward events back
12501 to the inferior, unless the last process exited, in which case,
12502 exit gdbserver. Adjust interface.
12504 * remote-utils.c (remote_open): Don't block in accept. Instead
12505 register an event loop source on the listen socket file
12506 descriptor. Refactor bits into ...
12507 (listen_desc): ... this new global.
12508 (gdb_connected): ... this new function.
12509 (enable_async_notification): ... this new function.
12510 (handle_accept_event): ... this new function.
12511 (remote_close): Clear remote_desc.
12513 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12515 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12517 (mourn_inferior): Define.
12518 (target_process_qsupported): Avoid the dangling else problem.
12519 (thread_stopped): Define.
12520 (pause_all): Define.
12521 (target_waitstatus_to_string): Declare.
12522 * target.c (target_waitstatus_to_string): New.
12524 * tracepoint.c (tracing): Make extern.
12525 (disconnected_tracing): New.
12526 (stop_tracing): Make extern. Handle tracing stops due to GDB
12528 (cmd_qtdisconnected): New.
12529 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12530 (handle_tracepoint_general_set): Handle QTDisconnected.
12532 * event-loop.c (event_handler_func): Change return type to int.
12533 (process_event): Bail out if the event handler wants the event
12535 (handle_file_event): Ditto.
12536 (start_event_loop): Bail out if the event handler wants the event
12539 * nto-low.c (nto_target_ops): Adjust.
12540 * spu-low.c (spu_wait): Don't remove the process here.
12541 (spu_target_ops): Adjust.
12542 * win32-low.c (win32_wait): Don't remove the process here.
12543 (win32_target_ops): Adjust.
12545 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12547 * regcache.c (realloc_register_cache): Invalidate inferior's
12548 regcache before recreating it.
12550 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12552 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12554 2010-04-09 Stan Shebs <stan@codesourcery.com>
12555 Pedro Alves <pedro@codesourcery.com>
12557 * server.h (LONGEST): New.
12558 (struct thread_info) <while_stepping>: New field.
12559 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12561 (initialize_tracepoint, handle_tracepoint_general_set)
12562 (handle_tracepoint_query, tracepoint_finished_step)
12563 (tracepoint_was_hit, release_while_stepping_state_list):
12564 (current_traceframe): Declare.
12565 * server.c (handle_general_set): Handle tracepoint packets.
12566 (read_memory): New.
12567 (write_memory): New.
12568 (handle_search_memory_1): Use read_memory.
12569 (handle_query): Report support for conditional tracepoints, trace
12570 state variables, and tracepoint sources. Handle tracepoint
12572 (main): Initialize the tracepoints module.
12573 (process_serial_event): Handle traceframe reads/writes.
12575 * linux-low.c (handle_tracepoints): New.
12576 (linux_wait_1): Call it.
12577 (linux_resume_one_lwp): Handle while-stepping.
12578 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12579 (linux_target_ops): Install them.
12580 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12582 * linux-x86-low.c (x86_supports_tracepoints): New.
12583 (the_low_target). Install it.
12585 * mem-break.h (delete_breakpoint): Declare.
12586 * mem-break.c (delete_breakpoint): Make external.
12588 * target.h (struct target_ops): Add `supports_tracepoints',
12589 `read_pc', and `write_pc' fields.
12590 (target_supports_tracepoints): Define.
12591 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12594 * regcache.h (struct regcache) <registers_owned>: New field.
12595 (init_register_cache, regcache_cpy): Declare.
12596 (regcache_read_pc, regcache_write_pc): Declare.
12597 (register_cache_size): Declare.
12598 (supply_regblock): Declare.
12599 * regcache.c (init_register_cache): New.
12600 (new_register_cache): Use it.
12601 (regcache_cpy): New.
12602 (register_cache_size): New.
12603 (supply_regblock): New.
12604 (regcache_read_pc, regcache_write_pc): New.
12606 * tracepoint.c: New.
12608 * Makefile.in (OBS): Add tracepoint.o.
12609 (tracepoint.o): New rule.
12611 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12613 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12615 (i386-mmx.c): Likewise.
12616 (i386-mmx-linux.o): Likewise.
12617 (i386-mmx-linux.c): Likewise.
12619 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12620 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12621 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12622 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12624 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12625 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12626 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12628 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12630 * Makefile.in (clean): Updated.
12632 (i386-avx.c): Likewise.
12633 (i386-avx-linux.o): Likewise.
12634 (i386-avx-linux.c): Likewise.
12635 (amd64-avx.o): Likewise.
12636 (amd64-avx.c): Likewise.
12637 (amd64-avx-linux.o): Likewise.
12638 (amd64-avx-linux.c): Likewise.
12640 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12641 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12642 (srv_amd64_regobj): Add amd64-avx.o.
12643 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12644 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12645 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12646 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12647 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12648 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12649 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12651 * i387-fp.c: Include "i386-xstate.h".
12653 (i387_cache_to_xsave): Likewise.
12654 (i387_xsave_to_cache): Likewise.
12655 (x86_xcr0): Likewise.
12657 * i387-fp.h (i387_cache_to_xsave): Likewise.
12658 (i387_xsave_to_cache): Likewise.
12659 (x86_xcr0): Likewise.
12661 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12662 * linux-crisv32-low.c (target_regsets): Likewise.
12663 * linux-m68k-low.c (target_regsets): Likewise.
12664 * linux-mips-low.c (target_regsets): Likewise.
12665 * linux-ppc-low.c (target_regsets): Likewise.
12666 * linux-s390-low.c (target_regsets): Likewise.
12667 * linux-sh-low.c (target_regsets): Likewise.
12668 * linux-sparc-low.c (target_regsets): Likewise.
12669 * linux-xtensa-low.c (target_regsets): Likewise.
12671 * linux-low.c: Include <sys/uio.h>.
12672 (regsets_fetch_inferior_registers): Support nt_type.
12673 (regsets_store_inferior_registers): Likewise.
12674 (linux_process_qsupported): New.
12675 (linux_target_ops): Add linux_process_qsupported.
12677 * linux-low.h (regset_info): Add nt_type.
12678 (linux_target_ops): Add process_qsupported.
12680 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12682 (init_registers_i386_avx_linux): New.
12683 (init_registers_amd64_avx_linux): Likewise.
12684 (xmltarget_i386_linux_no_xml): Likewise.
12685 (xmltarget_amd64_linux_no_xml): Likewise.
12686 (PTRACE_GETREGSET): Likewise.
12687 (PTRACE_SETREGSET): Likewise.
12688 (x86_fill_xstateregset): Likewise.
12689 (x86_store_xstateregset): Likewise.
12690 (use_xml): Likewise.
12691 (x86_linux_update_xmltarget): Likewise.
12692 (x86_linux_process_qsupported): Likewise.
12693 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12694 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12695 init_registers_i386_linux here. Call
12696 x86_linux_update_xmltarget.
12697 (the_low_target): Add x86_linux_process_qsupported.
12699 * server.c (handle_query): Call target_process_qsupported.
12701 * target.h (target_ops): Add process_qsupported.
12702 (target_process_qsupported): New.
12704 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12706 * inferiors.c (add_thread): Set last_status kind to
12707 TARGET_WAITKIND_IGNORE.
12708 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12709 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12710 (linux_wait_1): Move `thread' local definition to block that uses
12711 it. Don't NULL initialize `event_child'.
12712 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12713 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12714 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12716 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12718 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12719 an extended waitstatus, or by a watchpoint.
12720 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12721 thread was stepping or has been stopped by a watchpoint.
12723 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12725 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12726 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12727 of another, then delete the previous, and validate all
12729 (validate_inserted_breakpoint): New.
12730 (delete_disabled_breakpoints): New.
12731 (validate_breakpoints): New.
12732 (check_mem_read): Validate breakpoints before trusting their
12733 shadow. Delete disabled breakpoints.
12734 (check_mem_write): Validate breakpoints before trusting they
12735 should be inserted. Delete disabled breakpoints.
12736 * mem-break.h (validate_breakpoints):
12737 * server.c (handle_query): Validate breakpoints when we see a
12740 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12742 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12743 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12744 if we could tell there's a GDB breakpoint at stop_pc.
12745 (need_step_over_p): Don't do a step over if we find a GDB
12746 breakpoint at the resume PC.
12748 * mem-break.c (struct raw_breakpoint): New.
12749 (enum bkpt_type): New type `gdb_breakpoint'.
12750 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12751 fields. New field `raw'.
12752 (find_raw_breakpoint_at): New.
12753 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12754 breakpoint instead.
12755 (set_breakpoint_at): Adjust.
12756 (delete_raw_breakpoint): New.
12757 (release_breakpoint): New.
12758 (delete_breakpoint): Rename to...
12759 (delete_breakpoint_1): ... this. Add proc parameter. Use
12760 release_breakpoint. Return ENOENT.
12761 (delete_breakpoint): Reimplement.
12762 (find_breakpoint_at): Delete.
12763 (find_gdb_breakpoint_at): New.
12764 (delete_breakpoint_at): Delete.
12765 (set_gdb_breakpoint_at): New.
12766 (delete_gdb_breakpoint_at): New.
12767 (gdb_breakpoint_here): New.
12768 (set_reinsert_breakpoint): Use release_breakpoint.
12769 (uninsert_breakpoint): Rename to ...
12770 (uninsert_raw_breakpoint): ... this.
12771 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12772 (reinsert_raw_breakpoint): Change parameter type to
12774 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12776 (check_breakpoints): Adjust. Use release_breakpoint.
12777 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12778 (breakpoint_inserted_here): Ditto.
12779 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12780 Don't trust the breakpoint's shadow if it is not inserted.
12781 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12782 (delete_all_breakpoints): Adjust.
12783 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12784 use delete_breakpoint_1.
12786 * mem-break.h (breakpoints_supported): Delete declaration.
12787 (set_gdb_breakpoint_at): Declare.
12788 (gdb_breakpoint_here): Declare.
12789 (delete_breakpoint_at): Delete.
12790 (delete_gdb_breakpoint_at): Declare.
12792 * server.h (struct raw_breakpoint): Forward declare.
12793 (struct process_info): New field `raw_breakpoints'.
12795 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12798 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12800 * linux-low.c (status_pending_p_callback): Fix comment.
12801 (linux_wait_for_event_1): Move most of the internal breakpoint
12802 handling from here...
12803 (linux_wait_1): ... to here.
12804 (count_events_callback): New.
12805 (select_singlestep_lwp_callback): New.
12806 (select_event_lwp_callback): New.
12807 (cancel_breakpoints_callback): New.
12808 (select_event_lwp): New.
12809 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12810 priority to all LWPs that have had events that should be reported
12811 to the client. Cancel breakpoints when about to reporting the
12812 event to the client, not while stopping lwps. No longer cancel
12813 finished single-steps here.
12814 (cancel_finished_single_step): Delete.
12815 (cancel_finished_single_steps): Delete.
12817 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12819 * mem-break.c (enum bkpt_type): New.
12820 (struct breakpoint): New field `type'.
12821 (set_breakpoint_at): Change return type to struct breakpoint
12822 pointer. Set type to `other_breakpoint' by default.
12823 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12824 in the breakpoint list.
12825 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12826 (reinsert_breakpoint): Rename to ...
12827 (reinsert_raw_breakpoint): ... this.
12828 (reinsert_breakpoints_at): Adjust.
12829 * mem-break.h (struct breakpoint): Declare.
12830 (set_breakpoint_at): Change return type to struct breakpoint
12833 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12835 * server.c (handle_query): Assign, not compare.
12837 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12839 Teach linux gdbserver to step-over-breakpoints.
12841 * linux-low.c (can_hardware_single_step): New.
12842 (supports_breakpoints): New.
12843 (handle_extended_wait): If stopping threads, read the stop pc of
12844 the new cloned LWP.
12846 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12847 low target doesn't support retrieving the PC.
12848 (add_lwp): Set last_resume_kind to resume_continue.
12849 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12850 (linux_attach): Don't clear stop_expected. Set the lwp's
12851 last_resume_kind to resume_stop.
12852 (linux_detach_one_lwp): Don't check for removed breakpoints.
12853 (check_removed_breakpoint): Delete.
12854 (status_pending_p): Rename to ...
12855 (status_pending_p_callback): ... this. Don't check for removed
12856 breakpoints. Don't consider threads that are stopped from GDB's
12858 (linux_wait_for_lwp): Always read the stop_pc here.
12859 (cancel_breakpoint): New.
12860 (step_over_bkpt): New global.
12861 (linux_wait_for_event_1): Implement stepping over breakpoints.
12862 (gdb_wants_lwp_stopped): New.
12863 (gdb_wants_all_stopped): New.
12864 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12865 single-step traps here. Store the thread's last reported target
12867 (send_sigstop): Don't clear stop_expected. Always set it,
12869 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12870 (cancel_finished_single_step): New.
12871 (cancel_finished_single_steps): New.
12872 (wait_for_sigstop): Don't cancel finished single-step traps here.
12873 (linux_resume_one_lwp): Don't check for removed breakpoints.
12874 Don't set `step' on non-hardware step archs.
12875 (linux_set_resume_request): Ignore resume_stop requests if already
12876 stopping or stopped. Set the lwp's last_resume_kind.
12877 (resume_status_pending_p): Don't check for removed breakpoints.
12878 (need_step_over_p): New.
12879 (start_step_over): New.
12880 (finish_step_over): New.
12881 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12882 requests. Clear the thread's last reported target waitstatus.
12883 Don't use the `suspended' flag. Don't consider pending breakpoints.
12884 (linux_resume): Start a step-over if necessary.
12885 (proceed_one_lwp): New.
12886 (proceed_all_lwps): New.
12887 (unstop_all_lwps): New.
12888 * linux-low.h (struct lwp_info): Rewrite comment for the
12889 `suspended' flag. Add the `stop_pc' field. Delete the
12890 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12891 Add `'last_resume_kind' and `need_step_over' fields.
12892 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12893 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12894 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12895 (set_raw_breakpoint_at): New.
12896 (set_breakpoint_at): Rewrite to use it.
12897 (reinsert_breakpoint_handler): Delete.
12898 (set_reinsert_breakpoint): New.
12899 (reinsert_breakpoint_by_bp): Delete.
12900 (delete_reinsert_breakpoints): New.
12901 (uninsert_breakpoint): Rewrite.
12902 (uninsert_breakpoints_at): New.
12903 (reinsert_breakpoint): Rewrite.
12904 (reinsert_breakpoints_at): New.
12905 (check_breakpoints): Rewrite.
12906 (breakpoint_here): New.
12907 (breakpoint_inserted_here): New.
12908 (check_mem_read): Adjust.
12909 * mem-break.h (breakpoints_supported, breakpoint_here)
12910 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12911 (reinsert_breakpoint_by_bp): Delete declaration.
12912 (delete_reinsert_breakpoints): Declare.
12913 (reinsert_breakpoint): Delete declaration.
12914 (reinsert_breakpoints_at): Declare.
12915 (uninsert_breakpoint): Delete declaration.
12916 (uninsert_breakpoints_at): Declare.
12917 (check_breakpoints): Adjust prototype.
12918 * server.h: Adjust include order.
12919 (struct thread_info): Declare here. Add a `last_status' field.
12921 2010-03-23 Michael Snyder <msnyder@vmware.com>
12923 * server.c (crc32): New function.
12924 (handle_query): Add handling for 'qCRC:' request.
12926 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12928 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12929 lwp had been stopped by a watchpoint.
12931 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12933 * server.h (internal_error): Declare.
12934 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12935 * utils.c (internal_error): New function.
12937 2010-03-15 Andreas Schwab <schwab@redhat.com>
12939 * configure.srv: Fix typo setting srv_regobj.
12941 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12943 * linux-low.c (fetch_register): Avoid passing a non string literal
12945 (usr_store_inferior_registers): Ditto.
12947 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12949 * linux-low.c (linux_write_memory): Bail out early if peeking
12952 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12954 * linux-low.h (struct lwp_info): New fields
12955 `stopped_by_watchpoint' and `stopped_data_address'.
12956 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12957 here, and cache them in the lwp object.
12958 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12960 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12962 (linux_stopped_by_watchpoint): Rewrite.
12963 (linux_stopped_data_address): Rewrite.
12965 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12967 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12968 switching the current inferior, not before.
12970 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12972 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12973 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12974 i386-linux.c and amd64-linux.c.
12975 (reg-i386.o): Removed.
12976 (reg-i386.c): Likewise.
12977 (reg-i386-linux.o): Likewise.
12978 (reg-i386-linux.c): Likewise.
12979 (reg-x86-64.o): Likewise.
12980 (reg-x86-64.c): Likewise.
12981 (reg-x86-64-linux.o): Likewise.
12982 (reg-x86-64-linux.c): Likewise.
12984 (i386.c): Likewise.
12985 (i386-linux.o): Likewise.
12986 (i386-linux.c): Likewise.
12987 (amd64.o): Likewise.
12988 (amd64.c): Likewise.
12989 (amd64-linux.o): Likewise.
12990 (amd64-linux.c): Likewise.
12992 * configure.srv (srv_i386_regobj): New.
12993 (srv_i386_linux_regobj): Likewise.
12994 (srv_amd64_regobj): Likewise.
12995 (srv_amd64_linux_regobj): Likewise.
12996 (srv_i386_32bit_xmlfiles): Likewise.
12997 (srv_i386_64bit_xmlfiles): Likewise.
12998 (srv_i386_xmlfiles): Likewise.
12999 (srv_amd64_xmlfiles): Likewise.
13000 (srv_i386_linux_xmlfiles): Likewise.
13001 (srv_amd64_linux_xmlfiles): Likewise.
13002 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13003 srv_xmlfiles to $srv_i386_xmlfiles.
13004 (i[34567]86-*-mingw32ce*): Likewise.
13005 (i[34567]86-*-mingw*): Likewise.
13006 (i[34567]86-*-nto*): Likewise.
13007 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13008 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13009 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13010 (x86_64-*-linux*): Likewise.
13012 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13013 (init_registers_amd64_linux): New.
13014 (x86_arch_setup): Replace init_registers_x86_64_linux with
13015 init_registers_amd64_linux.
13017 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13019 * configure.ac: Check for libdl. If it is not available link against
13020 static libthread_db.
13021 * configure: Regenerate.
13023 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13027 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13028 handing a read watchpoint.
13029 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13031 2010-02-12 Doug Evans <dje@google.com>
13033 * linux-low.c (linux_supports_tracefork_flag): Document.
13034 (linux_look_up_symbols): Add comment.
13036 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13038 * regcache.c (supply_register): Clear regcache if buf is NULL.
13040 2010-02-02 Nicolas Roche <roche@sourceware.org>
13041 Joel Brobecker <brobecker@adacore.com>
13043 * inferiors.c (find_inferior): Add function documentation.
13044 (unloaded_dll): Handle the case where the unloaded dll has not
13045 been previously registered in the dll list.
13047 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13049 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13050 (thumb2_breakpoint): New.
13051 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13053 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13055 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13056 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13059 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13061 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13063 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13065 * linux-s390-low.c (s390_collect_ptrace_register)
13066 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13068 2010-01-21 Doug Evans <dje@google.com>
13070 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13071 (PTRACE_ARG4_TYPE): New macro.
13072 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13073 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13074 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13075 (usr_store_inferior_registers): Ditto.
13076 (linux_read_memory, linux_write_memory): Ditto.
13077 (linux_test_for_tracefork): Ditto.
13079 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13080 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13082 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13084 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13087 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13089 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13090 prototype to take a regcache. Adjust.
13092 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13094 * regcache.h (struct thread_info): Forward declare.
13095 (struct regcache): New.
13096 (new_register_cache): Adjust prototype.
13097 (get_thread_regcache): Declare.
13098 (free_register_cache): Adjust prototype.
13099 (registers_to_string, registers_from_string): Ditto.
13100 (supply_register, supply_register_by_name, collect_register)
13101 (collect_register_as_string, collect_register_by_name): Ditto.
13102 * regcache.c (struct inferior_regcache_data): Delete.
13103 (get_regcache): Rename to ...
13104 (get_thread_regcache): ... this. Adjust. Switch inferior before
13105 fetching registers.
13106 (regcache_invalidate_one): Adjust.
13107 (regcache_invalidate): Fix prototype.
13108 (new_register_cache): Return the new register cache.
13109 (free_register_cache): Change prototype.
13110 (realloc_register_cache): Adjust.
13111 (registers_to_string): Change prototype to take a regcache. Adjust.
13112 (registers_from_string): Ditto.
13113 (register_data): Ditto.
13114 (supply_register): Ditto.
13115 (supply_register_by_name): Ditto.
13116 (collect_register): Ditto.
13117 (collect_register_as_string): Ditto.
13118 (collect_register_by_name): Ditto.
13119 * server.c (process_serial_event): Adjust.
13120 * linux-low.h (regset_fill_func, regset_store_func): Change
13122 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13124 * linux-low.c (get_stop_pc): Adjust.
13125 (check_removed_breakpoint): Adjust.
13126 (linux_wait_for_event): Adjust.
13127 (linux_resume_one_lwp): Adjust.
13128 (fetch_register): Add regcache parameter. Adjust.
13129 (usr_store_inferior_registers): Ditto.
13130 (regsets_fetch_inferior_registers): Ditto.
13131 (regsets_store_inferior_registers): Ditto.
13132 (linux_fetch_registers, linux_store_registers): Ditto.
13133 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13135 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13137 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13138 prototype to take a regcache.
13139 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13140 * remote-utils.c (convert_ascii_to_int, outreg)
13141 (prepare_resume_reply): Change prototype to take a regcache.
13143 * target.h (struct target_ops) <fetch_registers, store_registers>:
13144 Change prototype to take a regcache.
13145 (fetch_inferior_registers, store_inferior_registers): Change
13146 prototype to take a regcache. Adjust.
13147 * proc-service.c (ps_lgetregs): Adjust.
13148 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13149 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13150 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13151 take a regcache. Adjust.
13152 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13153 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13154 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13155 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13156 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13157 (cris_cannot_fetch_register):
13158 (cris_breakpoint_at): Change prototype to take a regcache.
13160 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13161 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13162 to take a regcache. Adjust.
13163 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13165 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13166 take a regcache. Adjust.
13167 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13168 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13169 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13170 * linux-mips-low.c (mips_get_pc):
13171 (mips_set_pc): Change prototype to take a regcache. Adjust.
13172 (mips_reinsert_addr): Adjust.
13173 (mips_collect_register): Change prototype to take a regcache.
13175 (mips_supply_register):
13176 (mips_collect_register_32bit, mips_supply_register_32bit)
13177 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13178 (mips_store_fpregset): Ditto.
13179 * linux-ppc-low.c (ppc_supply_ptrace_register)
13180 (ppc_supply_ptrace_register): Ditto.
13181 (parse_spufs_run): Adjust.
13182 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13183 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13184 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13185 take a regcache. Adjust.
13186 * linux-s390-low.c (s390_collect_ptrace_register)
13187 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13188 (s390_set_pc): Change prototype to take a regcache. Adjust.
13189 (s390_arch_setup): Adjust.
13190 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13191 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13192 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13193 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13194 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13196 (sparc_breakpoint_at): Adjust.
13197 * linux-xtensa-low.c (xtensa_fill_gregset):
13198 (xtensa_store_gregset):
13199 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13200 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13201 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13202 prototype to take a regcache. Adjust.
13203 * win32-arm-low.c (arm_fetch_inferior_register)
13204 (arm_store_inferior_register): Change prototype to take a
13206 * win32-i386-low.c (i386_fetch_inferior_register)
13207 (i386_store_inferior_register): Change prototype to take a
13209 * win32-low.c (child_fetch_inferior_registers)
13210 (child_store_inferior_registers): Change prototype to take a
13212 (win32_wait): Adjust.
13213 (win32_fetch_inferior_registers): Change prototype to take a
13215 (win32_store_inferior_registers): Adjust.
13216 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13217 store_inferior_register>: Change prototype to take a regcache.
13219 2010-01-20 Doug Evans <dje@google.com>
13221 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13223 (linux_wait_for_event1, linux_init_signals): Ditto.
13224 (W_STOPCODE): Provide definition if missing.
13226 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13228 * linux-low.c (linux_core_of_thread): New.
13229 (compare_ints, show_process, list_threads): New.
13230 (linux_qxfer_osdata): Report threads and cores.
13231 (linux_target_op): Register linux_core_of_thread.
13232 * remote-utils.c (prepare_resume_reply): Report the core.
13233 (buffer_xml_printf): Support %d specifier.
13234 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13236 (handle_query): Handle qXfer:threads. Announce availability
13238 * target.h (struct target_ops): New field core_of_thread.
13240 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13242 * Makefile.in (clean): Remove new generated files.
13243 (reg-s390.o, reg-s390.c): Remove rules.
13244 (reg-s390x.o, reg-s390x.c): Likewise.
13245 (s390-linux32.o, s390-linux32.c): Add rules.
13246 (s390-linux64.o, s390-linux64.c): Likewise.
13247 (s390x-linux64.o, s390x-linux64.c): Likewise.
13248 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13249 * linux-s390-low.c: Include <elf.h>.
13250 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13251 (init_registers_s390): Remove prototype.
13252 (init_registers_s390x): Likewise.
13253 (init_registers_s390_linux32): Add prototype.
13254 (init_registers_s390_linux64): Likewise.
13255 (init_registers_s390x_linux64): Likewise.
13256 (s390_num_regs_3264): New define.
13257 (s390_regmap_3264): New global variable.
13258 (s390_cannot_fetch_register): Remove obsolete check.
13259 (s390_cannot_store_register): Likewise.
13260 (s390_collect_ptrace_register): Handle upper/lower register halves.
13261 (s390_supply_ptrace_register): Likewise.
13262 (s390_fill_gregset): Update to register number changes.
13263 (s390_get_hwcap): New routine.
13264 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13265 Install appropriate regmap and register set.
13267 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13269 * server.c (gdbserver_version): Update copyright year to 2010.
13270 * gdbreplay.c (gdbreplay_version): Likewise.
13272 2009-12-28 Doug Evans <dje@google.com>
13274 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13275 elf/external.h. Include <elf.h> instead but only if necessary.
13277 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13279 * linux-low.c (linux_remove_process): Remove `detaching'
13280 parameter. Don't release/detach from thread_db here.
13281 (linux_kill): Release/detach from thread_db here, ...
13282 (linux_detach): ... and here, before actually detaching.
13283 (linux_wait_1): ... and here, when a process exits.
13284 * thread-db.c (any_thread_of): New.
13285 (thread_db_free): Switch the current inferior to a thread of the
13288 2009-12-21 Doug Evans <dje@google.com>
13290 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13292 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13293 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13294 warning ifndef __NR_tkill. Move setting of errno there too.
13295 Delete unnecessary resetting of errno after syscall.
13296 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13298 * configure.ac: Check for dladdr.
13299 * config.in: Regenerate.
13300 * configure: Regenerate.
13301 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13302 (try_thread_db_load): Update.
13304 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13306 2009-12-18 Doug Evans <dje@google.com>
13308 * event-loop.c: Include unistd.h if it exists.
13310 * linux-low.c (my_waitpid): Move definition away from being in
13311 between linux_tracefork_child/linux_test_for_tracefork.
13313 * gdb_proc_service.h (psaddr_t): Fix type.
13314 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13315 signature to match glibc.
13317 2009-12-16 Doug Evans <dje@google.com>
13319 * linux-low.c (linux_read_memory): Fix argument to read.
13321 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13323 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13324 events, don't leave current_inferior pointing at null.
13326 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13328 * win32-low.c (LOG): Delete.
13329 (OUTMSG): Output to stderr.
13330 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13331 on compile time LOG macro.
13332 (win32_wait): Fix debug output.
13334 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13336 * win32-low.c (win32_add_one_solib): If the dll name is
13337 "ntdll.dll", prepend the system directory to the dll path.
13339 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13341 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13343 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13344 Vladimir Prus <vladimir@codesourcery.com>
13346 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13347 * configure.ac: Check for __mcoldfire__ and set
13348 gdb_cv_m68k_is_coldfire.
13349 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13350 reg-cf.o and reg-m68k.o.
13351 * configure: Regenerated.
13353 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13355 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13356 Pass it to thread_db_free.
13357 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13358 proper `detaching' argument to linux_remove_process.
13359 * linux-low.h (thread_db_free): Add `detaching' parameter.
13360 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13362 (thread_db_free): Add `detaching' parameter. Only
13363 call td_ta_clear_event if detaching from process.
13365 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13367 * thread-db.c (thread_db_free): Fix typo.
13369 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13372 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13374 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13376 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13377 with an i686 compiler.
13378 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13380 * configure: Rebuilt.
13382 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13386 * server.c (handle_search_memory_1): Correct read_addr initialization
13387 in loop for searching subsequent chunks.
13389 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13391 * configure.ac: New --with-libthread-db option.
13392 * thread-db.c: Allow direct dependence on libthread_db.
13393 (thread_db_free): Adjust.
13394 * config.in: Regenerate.
13395 * configure: Likewise.
13397 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13400 * thread-db.c (attach_thread): New function.
13401 (maybe_attach_thread): Return success/failure.
13402 (find_new_threads_callback): Adjust.
13403 (thread_db_find_new_threads): Loop until no new threads.
13405 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13407 * proc-service.c (ps_lgetregs): Formatting.
13409 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13411 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13412 * configure.ac: Adjust.
13413 * linux-low.h (struct process_info_private): Move members to struct
13415 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13416 * linux-low.c (linux_remove_process): Adjust.
13417 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13418 * server.c (handle_query): Move code ...
13419 (handle_monitor_command): ... here. New function.
13420 * target.h (struct target_ops): New member.
13421 * thread-db.c (struct thread_db): New.
13422 (libthread_db_search_path): New variable.
13423 (thread_db_create_event, thread_db_enable_reporting)
13424 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13425 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13426 (try_thread_db_load_1, dladdr_to_soname): New functions.
13427 (try_thread_db_load, thread_db_load_search): New functions.
13428 (thread_db_init): Search for libthread_db.
13429 (thread_db_free): New function.
13430 (thread_db_handle_monitor_command): Likewise.
13431 * config.in: Regenerate.
13432 * configure: Regenerate.
13434 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13436 * spu-low.c (spu_kill): Wait for inferior to terminate.
13437 Call clear_inferiors.
13438 (spu_detach): Call clear_inferiors.
13440 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13442 * aclocal.m4: Regenerate.
13443 * config.in: Likewise.
13444 * configure: Likewise.
13446 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13448 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13449 (parse_spufs_run): New function.
13450 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13451 (ppc_breakpoint_at): Handle SPU breakpoints.
13453 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13455 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13456 (SPUFS_MAGIC): Define.
13457 (spu_enumerate_spu_ids): New function.
13458 (linux_qxfer_spu): New function.
13459 (linux_target_ops): Install linux_qxfer_spu.
13461 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13463 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13464 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13465 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13466 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13467 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13468 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13469 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13470 (init_registers_powerpc_cell32l): Add prototype.
13471 (init_registers_powerpc_cell64l): Likewise.
13472 (ppc_arch_setup): Detect Cell/B.E. architecture.
13474 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13476 * Makefile.in (datarootdir): New variable.
13478 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13480 * linux-low.c (linux_write_memory): Update debugging output.
13481 * Makefile.in (clean): Add new descriptions.
13482 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13483 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13484 * configure.srv: Add new files for arm*-*-linux*.
13485 * linux-arm-low.c: Add new declarations.
13486 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13487 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13488 (HWCAP_VFPv3D16): New.
13489 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13490 instead of __IWMMXT__.
13491 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13492 (arm_arch_setup): New.
13493 (target_regsets): Remove #ifdef. Add VFP regset.
13494 (the_low_target): Use arm_arch_setup.
13496 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13498 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13499 the main thread again.
13501 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13503 Adding Neutrino gdbserver.
13504 * configure: Regenerated.
13505 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13506 * configure.srv (i[34567]86-*-nto*): New target.
13507 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13508 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13509 (nto_comctrl) [__QNX__]: New function.
13510 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13512 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13514 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13517 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13518 Pedro Alves <pedro@codesourcery.com>
13520 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13521 don't support CONTEXT_EXTENDED_REGISTERS.
13522 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13523 (the_low_target): Install them.
13524 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13525 failing with ERROR_PIPE_NOT_CONNECTED.
13527 2009-06-30 Doug Evans <dje@google.com>
13528 Pierre Muller <muller@ics.u-strasbg.fr>
13530 Add h/w watchpoint support to x86-linux, win32-i386.
13531 * Makefile.in (SFILES): Add i386-low.c
13532 (i386_low_h): Define.
13533 (i386-low.o): Add dependencies.
13534 (linux-x86-low.o): Add i386-low.h dependency.
13535 (win32-i386-low.o): Ditto.
13536 * i386-low.c: New file.
13537 * i386-low.h: New file.
13538 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13539 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13540 * linux-low.c (linux_add_process): Initialize arch_private.
13541 (linux_remove_process): Free arch_private.
13542 (add_lwp): Initialize arch_private.
13543 (delete_lwp): Free arch_private.
13544 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13546 * linux-low.h (process_info_private): New member arch_private.
13547 (lwp_info): New member arch_private.
13548 (linux_target_ops): New members new_process, new_thread,
13550 (ptid_of): New macro.
13551 * linux-x86-low.c: Include stddef.h, i386-low.h.
13552 (arch_process_info): New struct.
13553 (arch_lwp_info): New struct.
13554 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13555 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13556 (i386_dr_low_get_status): New function.
13557 (x86_insert_point, x86_remove_point): New functions.
13558 (x86_stopped_by_watchpoint): New function.
13559 (x86_stopped_data_address): New function.
13560 (x86_linux_new_process, x86_linux_new_thread): New functions.
13561 (x86_linux_prepare_to_resume): New function.
13562 (the_low_target): Add entries for insert_point, remove_point,
13563 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13565 * server.c (debug_hw_points): New global.
13566 (monitor_show_help): Document set debug-hw-points.
13567 (handle_query): Process "set debug-hw-points".
13568 * server.h (debug_hw_points): Declare.
13569 (paddress): Declare.
13570 * utils.c (NUMCELLS, CELLSIZE): New macros.
13571 (get_sell, xsnprintf, paddress): New functions.
13572 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13573 remove_point, stopped_by_watchpoint, stopped_data_address.
13574 * win32-i386-low.c: Include i386-low.h.
13575 (debug_reg_state): Replaces dr.
13576 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13577 (i386_dr_low_get_status): New function.
13578 (i386_insert_point, i386_remove_point): New functions.
13579 (i386_stopped_by_watchpoint): New function.
13580 (i386_stopped_data_address): New function.
13581 (i386_initial_stuff): Update.
13582 (get_thread_context,set_thread_context,i386_thread_added): Update.
13583 (the_low_target): Add entries for insert_point,
13584 remove_point, stopped_by_watchpoint, stopped_data_address.
13585 * win32-low.c (win32_insert_watchpoint): New function.
13586 (win32_remove_watchpoint): New function.
13587 (win32_stopped_by_watchpoint): New function.
13588 (win32_stopped_data_address): New function.
13589 (win32_target_ops): Add entries for insert_watchpoint,
13590 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13591 * win32-low.h (win32_target_ops): New members insert_point,
13592 remove_point, stopped_by_watchpoint, stopped_data_address.
13594 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13596 * server.c (process_serial_event): Re-return unsupported, not
13597 error, if the type isn't recognized. Re-allow supporting only
13598 insert or remove packets. Also call require_running for
13599 breakpoints. Add missing break statement to default case. Tidy.
13600 * target.h (struct target_ops): Rename insert_watchpoint to
13601 insert_point, and remove_watchpoint to remove_point.
13603 * linux-low.h (struct linux_target_ops): Likewise.
13604 * linux-low.c (linux_insert_watchpoint): Rename to ...
13605 (linux_insert_point): ... this. Adjust.
13606 (linux_remove_watchpoint): Rename to ...
13607 (linux_remove_point): ... this. Adjust.
13608 (linux_target_ops): Adjust.
13609 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13610 (cris_insert_point): ... this.
13611 (cris_remove_watchpoint): Rename to ...
13612 (cris_remove_point): ... this.
13613 (the_low_target): Adjust.
13615 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13617 * server.c (handle_v_kill): Pass signal_pid to
13618 kill_inferior if multi_process is zero.
13620 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13622 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13623 * target.h (target_ops): Comment for *_watchpoint to make it clear
13624 the functions can get types '0' and '1'.
13626 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13628 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13629 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13630 * regcache.c (get_regcache): Likewise.
13631 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13632 * win32-low.c (child_fetch_inferior_registers): Remove check for
13635 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13636 Pedro Alves <pedro@codesourcery.com>
13638 * target.h (struct target_ops) <supports_multi_process>: New
13640 (target_supports_multi_process): New.
13641 * server.c (handle_query): Even if GDB reports support, only
13642 enable multi-process if the target also supports it. Report
13643 multi-process support only if the target backend supports it.
13644 * linux-low.c (linux_supports_multi_process): New function.
13645 (linux_target_ops): Install it as target_supports_multi_process
13648 2009-05-24 Doug Evans <dje@google.com>
13650 Global renaming of find_thread_pid to find_thread_ptid.
13651 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13652 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13653 All callers updated.
13655 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13656 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13659 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13660 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13661 (linux_resume_one_lwp): Ditto.
13663 2009-05-23 Doug Evans <dje@google.com>
13665 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13666 from struct inferior_list_entry * to struct lwp_info *.
13667 All callers updated.
13669 2009-05-13 Doug Evans <dje@google.com>
13671 * linux-x86-low.c: Don't include assert.h.
13672 (x86_siginfo_fixup): Use fatal, not assert.
13673 (x86_arch_setup): Fix comment.
13675 2009-05-12 Doug Evans <dje@google.com>
13677 Biarch support for i386/amd64 gdbserver.
13678 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13679 Add linux-x86-low.c.
13680 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13681 (linux-x86-low.o): Add.
13682 * linux-x86-64-low.c: Delete.
13683 * linux-i386-low.c: Delete.
13684 * linux-x86-low.c: New file.
13685 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13687 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13689 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13690 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13691 (linux_child_pid_to_exec_file): New function.
13692 (elf_64_header_p, elf_64_file_p): New functions.
13693 (siginfo_fixup): New function.
13694 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13695 give target a chance to convert layout.
13696 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13697 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13699 2009-05-07 Doug Evans <dje@google.com>
13701 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13702 (regsets_store_inferior_registers): Ditto.
13704 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13708 * linux-low.c (must_set_ptrace_flags): Delete.
13709 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13711 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13712 `lwp->must_set_ptrace_flags' instead.
13713 (linux_wait_for_event_1): Set ptrace options here.
13714 (linux_wait_1): ... not here.
13716 2009-04-30 Doug Evans <dje@google.com>
13718 * inferiors.c (started_inferior_callback): New function.
13719 (attached_inferior_callback): New function.
13720 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13721 * server.c (print_started_pid, print_attached_pid): New functions.
13722 (detach_or_kill_for_exit): New function.
13723 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13724 * server.h (have_started_inferiors_p): Declare.
13725 (have_attached_inferiors_p): Declare.
13727 * inferiors.c (remove_process): Fix memory leak, free process.
13728 * linux-low.c (linux_remove_process): New function.
13729 (linux_kill): Call it instead of remove_process.
13730 (linux_detach, linux_wait_1): Ditto.
13732 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13734 * configure.srv: Add x86 Windows CE target.
13736 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13738 * inferiors.c (get_thread_process): Make global.
13739 * server.h (get_thread_process): Add prototype.
13740 * thread-db.c (find_one_thread): Use get_thread_process
13741 instead of current_process.
13742 (thread_db_get_tls_address): Do not crash if called when
13743 thread layer is not yet initialized.
13745 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13747 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13748 * spu-low.c (current_tid): Rename to ...
13749 (current_ptid): ... this.
13750 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13751 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13752 ptid_get_lwp (current_ptid) instead of current_tid.
13753 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13754 instead of current_tid. Use find_process_pid to verify pid
13755 argument is valid. Pass proper argument to remove_process.
13756 (spu_thread_alive): Compare current_ptid instead of current_tid.
13757 (spu_resume): Likewise.
13759 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13761 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13764 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13766 Implement the multiprocess extensions, and add linux multiprocess
13769 * server.h (ULONGEST): Declare.
13770 (struct ptid, ptid_t): New.
13771 (minus_one_ptid, null_ptid): Declare.
13772 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13773 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13774 (struct inferior_list_entry): Change `id' type from unsigned from
13776 (struct sym_cache, struct breakpoint, struct
13777 process_info_private): Forward declare.
13778 (struct process_info): Declare.
13779 (current_process): Declare.
13780 (all_processes): Declare.
13781 (initialize_inferiors): Declare.
13782 (add_thread): Adjust to use ptid_t.
13783 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13784 (add_process, remove_process, find_thread_pid): Declare.
13785 (find_inferior_id): Adjust to use ptid_t.
13786 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13787 (multi_process): Declare.
13788 (push_event): Adjust to use ptid_t.
13789 (read_ptid, write_ptid): Declare.
13790 (prepare_resume_reply): Adjust to use ptid_t.
13791 (clear_symbol_cache): Declare.
13792 * inferiors.c (all_processes): New.
13793 (null_ptid, minus_one_ptid): New.
13794 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13795 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13796 (add_thread): Change unsigned long to ptid. Remove gdb_id
13798 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13799 (gdb_id_to_thread): Rename to ...
13800 (find_thread_pid): ... this. Change unsigned long to ptid.
13801 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13802 (loaded_dll, pull_pid_from_list): Adjust.
13803 (add_process, remove_process, find_process_pid)
13804 (get_thread_process, current_process, initialize_inferiors): New.
13805 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13806 (struct target_waitstatus) <related_pid>: Ditto.
13807 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13808 return type to int.
13809 (struct target_ops) <join>: Add `pid' argument.
13810 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13811 (struct target_ops) <wait>: Add `ptid' field. Change return type
13813 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13814 (mywait): Add `ptid' argument. Change return type to ptid_t.
13815 (target_pid_to_str): Declare.
13816 * target.c (set_desired_inferior): Adjust to use ptids.
13817 (mywait): Add new `ptid' argument. Adjust.
13818 (target_pid_to_str): New.
13819 * mem-break.h (free_all_breakpoints): Declare.
13820 * mem-break.c (breakpoints): Delelete.
13821 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13822 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13823 to use per-process breakpoint list.
13824 (free_all_breakpoints): New.
13825 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13826 (symbol_cache, all_symbols_looked_up): Delete.
13828 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13830 (prepare_resume_reply): Change ptid argument's type from unsigned
13831 long to ptid_t. Adjust. Implement W;process and X;process.
13832 (free_sym_cache, clear_symbol_cache): New.
13833 (look_up_one_symbol): Adjust to per-process symbol cache. *
13834 * server.c (cont_thread, general_thread, step_thread): Change type
13836 (attached): Delete.
13837 (multi_process): New.
13838 (last_ptid): Change type to ptid_t.
13839 (struct vstop_notif) <ptid>: Change type to ptid_t.
13840 (queue_stop_reply, push_event): Change `ptid' argument's type to
13842 (discard_queued_stop_replies): Add `pid' argument.
13843 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13844 changes. Don't reference the `attached' global.
13845 (attach_inferior): Adjust to mywait interface changes.
13846 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13847 features. Handle and report "multiprocess+". Handle
13849 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13851 (handle_v_kill): New.
13852 (handle_v_stopped): Adjust to use target_pid_to_str.
13853 (handle_v_requests): Allow multiple attaches and runs when
13854 multiprocess extensions are in effect. Handle "vKill".
13855 (myresume): Adjust to use ptids.
13856 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13857 (handle_status): Adjust to discard_queued_stop_replies interface
13859 (first_thread_of, kill_inferior_callback)
13860 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13861 (main): Call initialize_inferiors. Adjust to use ptids, killing
13862 and detaching from all inferiors. Handle multiprocess packet
13864 * linux-low.h: Include gdb_proc_service.h.
13865 (struct process_info_private): New.
13866 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13867 <lwpid_of>: Use ptid_get_lwp.
13868 (get_lwp_thread): Adjust.
13869 (struct lwp_info): Add `dead' member.
13870 (find_lwp_pid): Declare.
13871 * linux-low.c (thread_db_active): Delete.
13872 (new_inferior): Adjust comment.
13873 (inferior_pid): Delete.
13874 (linux_add_process): New.
13875 (handle_extended_wait): Adjust.
13876 (add_lwp): Change unsigned long to ptid.
13877 (linux_create_inferior): Add process to processes table. Adjust
13878 to use ptids. Don't set new_inferior here.
13879 (linux_attach_lwp): Rename to ...
13880 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13881 it. Adjust to use ptids.
13882 (linux_attach_lwp): New.
13883 (linux_attach): Add process to processes table. Don't set
13885 (struct counter): New.
13886 (second_thread_of_pid_p, last_thread_of_process_p): New.
13887 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13888 multiple processes.
13889 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13890 processes. Remove process from process table.
13891 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13892 to multiple processes.
13893 (any_thread_of): New.
13894 (linux_detach): Add `pid' argument, and handle it. Remove process
13895 from processes table.
13896 (linux_join): Add `pid' argument. Handle it.
13897 (linux_thread_alive): Change unsighed long argument to ptid_t.
13898 Consider dead lwps as not being alive.
13899 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13900 threads we're not interested in.
13901 (same_lwp, find_lwp_pid): New.
13902 (linux_wait_for_lwp): Change `pid' argument's type from int to
13904 (linux_wait_for_event): Rename to ...
13905 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13906 from int to ptid_t. Adjust.
13907 (linux_wait_for_event): New.
13908 (linux_wait_1): Add `ptid' argument. Change return type to
13909 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13910 that exit from the process table.
13911 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13913 (mark_lwp_dead): New.
13914 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13915 stopping all threads, mark its main lwp as dead.
13916 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13918 (fetch_register, usr_store_inferior_registers)
13919 (regsets_fetch_inferior_registers)
13920 (regsets_store_inferior_registers, linux_read_memory)
13921 (linux_write_memory): Inline `inferior_pid'.
13922 (linux_look_up_symbols): Adjust to use per-process
13923 `thread_db_active'.
13924 (linux_request_interrupt): Adjust to use ptids.
13925 (linux_read_auxv): Inline `inferior_pid'.
13926 (initialize_low): Don't reference thread_db_active.
13927 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13928 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13929 (ps_getpid): Return the pid of the current inferior.
13930 * thread-db.c (proc_handle, thread_agent): Delete.
13931 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13933 (find_one_thread): Change argument type to ptid_t. Adjust to
13935 (maybe_attach_thread): Adjust to per-process data and ptids.
13936 (thread_db_find_new_threads): Ditto.
13937 (thread_db_init): Ditto.
13938 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13939 processes table. Adjust to use ptids.
13940 (spu_kill, spu_detach): Adjust interface. Remove process from
13942 (spu_join, spu_thread_alive): Adjust interface.
13943 (spu_wait): Adjust interface. Remove process from processes
13944 table. Adjust to use ptids.
13945 * win32-low.c (current_inferior_tid): Delete.
13946 (current_inferior_ptid): New.
13947 (debug_event_ptid): New.
13948 (thread_rec): Take a ptid. Adjust.
13949 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13950 (child_delete_thread): Ditto.
13951 (do_initial_child_stuff): Add `attached' argument. Add process to
13953 (child_fetch_inferior_registers, child_store_inferior_registers):
13955 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13956 (win32_attach): Pass 1 to do_initial_child_stuff.
13957 (win32_kill): Adjust interface. Remove process from processes
13959 (win32_detach): Ditto.
13960 (win32_join): Adjust interface.
13961 (win32_thread_alive): Take a ptid.
13962 (win32_resume): Adjust to use ptids.
13963 (get_child_debug_event): Ditto.
13964 (win32_wait): Adjust interface. Remove exiting process from
13967 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13969 Non-stop mode support.
13971 * server.h (non_stop): Declare.
13972 (gdb_client_data, handler_func): Declare.
13973 (delete_file_handler, add_file_handler, start_event_loop):
13975 (handle_serial_event, handle_target_event, push_event)
13976 (putpkt_notif): Declare.
13977 * target.h (enum resume_kind): New.
13978 (struct thread_resume): Replace `step' field by `kind' field.
13979 (TARGET_WNOHANG): Define.
13980 (struct target_ops) <wait>: Add `options' argument.
13981 <supports_non_stop, async, start_non_stop>: New fields.
13982 (target_supports_non_stop, target_async): New.
13983 (start_non_stop): Declare.
13984 (mywait): Add `options' argument.
13985 * target.c (mywait): Add `options' argument. Print child exit
13986 notifications here.
13987 (start_non_stop): New.
13988 * server.c (non_stop, own_buf, mem_buf): New globals.
13989 (struct vstop_notif): New.
13990 (notif_queue): New global.
13991 (queue_stop_reply, push_event, discard_queued_stop_replies)
13992 (send_next_stop_reply): New.
13993 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13995 (attach_inferior): In non-stop mode, don't wait for the target
13997 (handle_general_set): Handle QNonStop.
13998 (handle_query): When handling qC, return the current general
13999 thread, instead of the first thread of the list.
14000 (handle_query): If the backend supports non-stop mode, include
14001 QNonStop+ in the qSupported query response.
14002 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14004 (handle_v_attach, handle_v_run): Handle non-stop mode.
14005 (handle_v_stopped): New.
14006 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14007 (myresume): Adjust to use resume_kind. Handle non-stop.
14008 (queue_stop_reply_callback): New.
14009 (handle_status): Handle non-stop mode.
14010 (main): Clear non_stop flag on reconnection. Use the event-loop.
14011 Refactor serial protocol handling from here ...
14012 (process_serial_event): ... to this new function. When GDB
14013 selects any thread, select one here. In non-stop mode, wait until
14014 GDB acks all pending events before exiting.
14015 (handle_serial_event, handle_target_event): New.
14016 * remote-utils.c (remote_open): Install remote_desc in the event
14018 (remote_close): Remove remote_desc from the event loop.
14019 (putpkt_binary): Rename to...
14020 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14021 (putpkt_binary): New as wrapper around putpkt_binary_1.
14022 (putpkt_notif): New.
14023 (prepare_resume_reply): In non-stop mode, don't change the
14025 * event-loop.c: New.
14026 * Makefile.in (OBJ): Add event-loop.o.
14027 (event-loop.o): New rule.
14029 * linux-low.h (pid_of): Moved here.
14031 (get_lwp_thread): Use lwpid_of.
14032 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14033 * linux-low.c (pid_of): Delete.
14034 (inferior_pid): Use lwpid_of.
14035 (linux_event_pipe): New.
14036 (target_is_async_p): New.
14038 (handle_extended_wait): Use lwpid_of.
14039 (add_lwp): Don't set lwpid field.
14040 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14041 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14042 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14043 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14044 first. Adjust to linux_wait_for_event interface changes. Use
14046 (linux_detach): Don't delete the main lwp here.
14047 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14048 (status_pending_p): Don't consider explicitly suspended lwps.
14049 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14050 pointer. Add OPTIONS argument. Change return type to int. Use
14051 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14052 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14053 pointer. Add status pointer argument. Return a pid instead of a
14054 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14055 changes. In non-stop mode, don't switch to a random thread.
14056 (linux_wait): Rename to...
14057 (linux_wait_1): ... this. Add target_options argument, and handle
14058 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14059 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14060 clean exit and signal exit code. Don't stop all threads in
14061 non-stop mode. In all-stop mode, only stop all threads when
14062 reporting a stop to GDB. Handle explicit thread stop requests.
14063 (async_file_flush, async_file_mark): New.
14065 (send_sigstop): Use lwpid_of.
14066 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14067 interface changes. In non-stop mode, don't switch to a random
14069 (linux_resume_one_lwp): Use lwpid_of.
14070 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14071 (linux_resume_one_thread): ... this. Handle resume_stop. In
14072 non-stop mode, don't look for pending flag in all threads.
14073 (resume_status_pending_p): Don't consider explicitly suspended
14075 (my_waitpid): Reimplement. Emulate __WALL.
14076 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14078 (sigchld_handler, linux_supports_non_stop, linux_async)
14079 (linux_start_non_stop): New.
14080 (linux_target_ops): Register linux_supports_non_stop, linux_async
14081 and linux_start_non_stop.
14082 (initialize_low): Install SIGCHLD handler.
14083 * thread-db.c (thread_db_create_event, find_one_thread)
14084 (thread_db_get_tls_address): Use lwpid_of.
14085 * win32-low.c (win32_detach): Adjust to use resume_kind.
14086 (win32_wait): Add `options' argument.
14087 * spu-low.c (spu_resume): Adjust to use resume_kind.
14088 (spu_wait): Add `options' argument.
14090 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14092 Decouple target code from remote protocol.
14094 * target.h (enum target_waitkind): New.
14095 (struct target_waitstatus): New.
14096 (struct target_ops) <wait>: Return an unsigned long. Take a
14097 target_waitstatus pointer instead of a char pointer.
14098 (mywait): Likewise.
14099 * target.c (mywait): Change prototype to return an unsigned long.
14100 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14101 * server.h (thread_from_wait, old_thread_from_wait): Delete
14103 (prepare_resume_reply): Change prototype to take a
14105 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14106 (last_status, last_ptid): New.
14107 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14108 pid instead of a signal.
14109 (attach_inferior): Remove "status" and "signal" parameters.
14111 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14113 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14114 (handle_v_requests, myresume): Remove "status" and "signal"
14115 parameters. Adjust.
14116 (handle_status): New.
14117 (main): Delete local `status'. Adjust.
14118 * remote-utils.c: Include target.h.
14119 (prepare_resume_reply): Change prototype to take a
14120 target_waitstatus. Adjust.
14122 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14124 * spu-low.c (spu_wait): Adjust.
14125 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14127 (win32_wait): Adjust.
14129 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14131 * target.h (struct thread_resume): Delete leave_stopped member.
14132 (struct target_ops): Add a `n' argument to the `resume' callback.
14133 * server.c (start_inferior): Adjust.
14134 (handle_v_cont, myresume): Adjust.
14135 * linux-low.c (check_removed_breakpoint): Adjust to resume
14136 interface change, and to removed leave_stopped field.
14137 (resume_ptr): Delete.
14138 (struct thread_resume_array): New.
14139 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14140 resume interface change.
14141 (linux_continue_one_thread, linux_queue_one_thread)
14142 (resume_status_pending_p): Check if the resume field is NULL
14143 instead of checking the leave_stopped member.
14144 (linux_resume): Adjust to the target resume interface change.
14145 * spu-low.c (spu_resume): Adjust to the target resume interface
14147 * win32-low.c (win32_detach, win32_resume): Ditto.
14149 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14151 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14153 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14155 (linux_continue_one_thread): Only preserve the stepping flag if
14156 there's a pending breakpoint.
14158 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14160 * server.c (main): After the inferior having exited, call
14161 remote_close before exiting gdbserver.
14163 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14165 Fix size of FPSCR in Power 7 processors.
14166 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14167 (PPC_FEATURE_HAS_DFP): New #define.
14168 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14171 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14173 * server.c (handle_query) Whitespace and formatting.
14175 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14177 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14178 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14179 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14180 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14181 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14182 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14183 Makefile.in, configure.ac: Fix whitespace throughout.
14184 * configure: Regenerate.
14186 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14188 * inferiors.c (find_inferior): Make it safe for the callback
14189 function to delete the currently iterated inferior.
14191 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14193 * Makefile.in (linuw_low_h): Move higher.
14194 (thread-db.o): Depend on $(linux_low_h).
14196 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14198 Rename "process" to "lwp" throughout.
14200 * linux-low.c (all_processes): Rename to...
14201 (all_lwps): ... this.
14202 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14203 (add_process): Rename to ...
14204 (add_lwp): ... this. Adjust.
14205 (linux_create_inferior): Adjust.
14206 (linux_attach_lwp): Adjust.
14207 (linux_attach): Adjust.
14208 (linux_kill_one_process): Rename to ...
14209 (linux_kill_one_lwp): ... this. Adjust.
14210 (linux_kill): Adjust.
14211 (linux_detach_one_process): Rename to ...
14212 (linux_detach_one_lwp): ... this. Adjust.
14213 (linux_detach): Adjust.
14214 (check_removed_breakpoint): Adjust.
14215 (status_pending_p): Adjust.
14216 (linux_wait_for_process): Rename to ...
14217 (linux_wait_for_lwp): ... this. Adjust.
14218 (linux_wait_for_event): Adjust.
14219 (send_sigstop): Adjust.
14220 (wait_for_sigstop): Adjust.
14221 (stop_all_processes): Rename to ...
14222 (stop_all_lwps): ... this.
14223 (linux_resume_one_process): Rename to ...
14224 (linux_resume_one_lwp): ... this. Adjust.
14225 (linux_set_resume_request, linux_continue_one_thread)
14226 (linux_queue_one_thread, resume_status_pending_p)
14227 (usr_store_inferior_registers, regsets_store_inferior_registers)
14228 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14230 * linux-low.h (get_process): Rename to ...
14231 (get_lwp): ... this. Adjust.
14232 (get_thread_process): Rename to ...
14233 (get_thread_lwp): ... this. Adjust.
14234 (get_process_thread): Rename to ...
14235 (get_lwp_thread): ... this. Adjust.
14236 (struct process_info): Rename to ...
14237 (struct lwp_info): ... this.
14238 (all_processes): Rename to ...
14239 (all_lwps): ... this.
14240 * proc-service.c (ps_lgetregs): Adjust.
14241 * thread-db.c (thread_db_create_event, find_one_thread)
14242 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14244 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14246 * server.c (handle_query): Handle "qAttached".
14248 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14250 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14251 GPLv3, update license URL.
14253 2009-03-01 Doug Evans <dje@google.com>
14255 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14256 (server_h): Add gdb_signals.h.
14257 (signals.o): Update.
14258 * server.h (target_signal_from_host,target_signal_to_host_p)
14259 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14261 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14263 * remote-utils.c (getpkt): Also generate remote-debug
14264 information if noack_mode is set.
14266 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14268 * server.c (handle_query): Report qXfer:siginfo:read and
14269 qXfer:siginfo:write as supported and handle them.
14270 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14271 * linux-low.c (linux_xfer_siginfo): New.
14272 (linux_target_ops): Set it.
14274 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14276 * server.c (gdbserver_usage): Mention --remote-debug.
14277 (main): Accept '--remote-debug' switch.
14279 2009-01-18 Doug Evans <dje@google.com>
14281 * regcache.c (new_register_cache): No need to check result of xcalloc.
14282 * server.c (handle_search_memory): Back out calls to xmalloc,
14283 result is checked and error is returned to user upon failure.
14284 (handle_query): Ditto. Add more checks for result of malloc.
14285 (handle_v_cont): Check result of malloc, report error back to
14287 (handle_v_run): Ditto. Call freeargv.
14288 * server.h (freeargv): Declare.
14289 * utils.c (freeargv): New fn.
14291 2009-01-15 Doug Evans <dje@google.com>
14293 * gdbreplay.c (perror_with_name): Make arg const char *.
14294 * server.h (target_signal_to_name): Make return type const char *.
14295 * thread-db.c (thread_db_err_str): Make return type const char *.
14296 * utils.c (perror_with_name): Make arg const char *.
14298 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14300 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14301 when handling a EXIT_PROCESS_DEBUG_EVENT.
14303 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14305 * gdbreplay.c (gdbreplay_version): Update copyright year.
14306 * server.c (gdbserver_version): Likewise.
14308 2009-01-05 Doug Evans <dje@google.com>
14310 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14311 (handle_extended_wait): Improve comment.
14313 2008-12-13 Doug Evans <dje@google.com>
14315 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14316 * server.h (ATTR_MALLOC): New macro.
14317 (xmalloc,xcalloc,xstrdup): Declare.
14318 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14319 * inferiors.c: Ditto.
14320 * linux-low.c: Ditto.
14321 * mem-break.c: Ditto.
14322 * regcache.c: Ditto.
14323 * remote-utils.c: Ditto.
14326 * win32-low.c: Ditto.
14328 2008-12-12 Doug Evans <dje@google.com>
14330 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14331 in debugging printf.
14333 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14335 2008-12-09 Doug Evans <dje@google.com>
14337 * linux-low.h (struct process_info): Delete member tid, unused.
14338 * thread-db.c (find_one_thread): Update.
14339 (maybe_attach_thread): Update.
14341 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14343 * target.h (struct target_ops): Add qxfer_osdata member.
14344 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14346 (linux_qxfer_osdata): New functions.
14347 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14349 * server.c (handle_query): Handle "qXfer:osdata:read:".
14350 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14351 (buffer_xml_printf): New functions.
14352 * server.h (struct buffer): New.
14353 (buffer_grow_str, buffer_grow_str0): New macros.
14354 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14355 (buffer_xml_printf): Declare.
14357 2008-11-24 Doug Evans <dje@google.com>
14359 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14361 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14363 * server.c (handle_v_run): Always use the supplied argument list.
14365 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14367 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14368 (xtensa_regmap_table): Add entry for scompare1.
14370 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14372 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14373 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14374 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14375 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14376 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14377 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14378 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14379 XML target descriptions.
14380 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14381 when inferior is running on an ISA 2.05 or later processor. Add
14382 special case to return offset for full 64-bit slot of FPSCR when
14385 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14387 * Makefile.in (SFILES, clean): Added sparc64 files.
14388 (reg-sparc64.o, reg-sparc64.c): New.
14389 * configure.srv (sparc*-*-linux*): New configuration.
14390 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14391 syscall arguments for SPARC.
14392 (regsets_store_inferior_registers): Likewise.
14393 * linux-sparc-low.c: New file.
14395 2008-10-21 Doug Evans <dje@google.com>
14397 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14398 (READLINE_DIR,READLINE_DEP): Delete.
14399 (INTERNAL_CFLAGS): Update.
14400 (LINTFLAGS): Update.
14402 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14404 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14405 whole argv from the last run, not just argv[0].
14407 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14409 * regcache.c (new_register_cache): Return NULL if the register
14410 cache size isn't known yet.
14411 (free_register_cache): Avoid dereferencing a NULL regcache.
14413 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14415 * configure.srv: Merge MIPS and MIPS64.
14417 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14419 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14421 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14423 * Makefile.in: Add required vsx dependencies.
14425 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14426 Declare init_registers_powerpc_vsx32l.
14427 Declare init_registers_powerpc_vsx64l.
14428 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14429 (ppc_arch_setup): Check for VSX in hwcap.
14430 (ppc_fill_vsxregset): New function.
14431 (ppc_store_vsxregset): New function.
14432 Add new VSX entry in regset_info target_regsets.
14434 * configure.srv: Add new VSX dependencies.
14436 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14438 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14439 (remote_open): Set or clear transport_is_reliable.
14440 (putpkt_binary): Don't expect acks in noack mode.
14441 (getpkt): Don't send ack/nac in noack mode.
14442 * server.c (handle_general_set): Handle QStartNoAckMode.
14443 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14445 (main): Reset noack_mode on every connection.
14446 * server.h (noack_mode): Declare.
14448 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14450 * Makefile.in (GDBREPLAY_OBS): New variable.
14451 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14453 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14454 Daniel Jacobowitz <dan@codesourcery.com>
14456 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14457 (usr_store_inferior_registers): Likewise.
14458 (regsets_store_inferior_registers): Likewise.
14460 2008-07-31 Rolf Jansen <rj@surtec.com>
14461 Pedro Alves <pedro@codesourcery.com>
14463 * configure.ac: Check for memmem declaration.
14464 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14465 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14466 (disable_packet_qfThreadInfo): Unconditionally compile.
14467 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14468 * configure, config.in: Regenerate.
14470 2008-07-28 Doug Kwan <dougkwan@google.com>
14472 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14473 (linux_write_memory): Remove declaration of errno.
14475 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14477 * linux-low.c (handle_extended_wait): Do not use "status"
14478 variable uninitialized.
14480 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14482 * server.c (handle_v_attach): Inhibit reporting dll changes.
14484 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14486 * remote-utils.c (prepare_resume_reply): If requested, don't
14487 output "thread:TID" in the T stop reply.
14489 * server.c (disable_packet_vCont, disable_packet_Tthread)
14490 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14491 (handle_query): If requested, disable support for qC, qfThreadInfo
14493 (handle_v_requests): If requested, disable support for vCont.
14494 (gdbserver_show_disableable): New.
14495 (main): Handle --disable-packet and --disable-packet=LIST.
14497 * server.h (disable_packet_vCont, disable_packet_Tthread)
14498 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14500 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14502 * server.c (gdbserver_usage): Mention --version.
14504 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14506 * Makefile.in (gdbreplay.o): New rule.
14508 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14510 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14511 message, not gdbserver.
14513 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14514 Nathan Sidwell <nathan@codesourcery.com>
14515 Joseph Myers <joseph@codesourcery.com>
14517 * acinclude.m4: Include ../../config/acx.m4.
14518 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14519 * configure, config.in: Regenerate.
14520 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14521 * server.c (gdbserver_version): Print PKGVERSION.
14522 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14523 (main): Adjust gdbserver_usage calls.
14524 * gdbreplay.c (version, host_name): Add declarations.
14525 (gdbreplay_version, gdbreplay_usage): New.
14526 (main): Accept --version and --help options.
14528 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14530 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14531 (arm_breakpoint_at): Handle Thumb.
14532 (the_low_target): Add comment.
14534 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14536 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14538 2008-05-09 Doug Evans <dje@google.com>
14540 * server.h (decode_search_memory_packet): Declare.
14541 * remote-utils.c (decode_search_memory_packet): New fn.
14542 * server.c (handle_search_memory_1): New fn.
14543 (handle_search_memory): New fn.
14544 (handle_query): Process qSearch:memory packets.
14546 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14548 * regcache.c (registers_length): Remove.
14549 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14550 full register packet.
14551 * regcache.h (registers_length): Remove prototype.
14552 * server.h (PBUFSIZ): Define to 16384.
14554 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14556 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14557 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14558 powerpc-64l.o, and powerpc-altivec64l.o.
14559 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14560 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14561 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14562 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14563 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14566 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14567 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14568 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14569 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14570 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14571 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14572 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14573 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14574 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14575 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14578 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14579 (init_registers_powerpc_32l): ... this new prototype.
14580 (init_registers_powerpc_32): Remove, replace by ...
14581 (init_registers_powerpc_altivec32l): ... this new prototype.
14582 (init_registers_powerpc_e500): Remove, replace by ...
14583 (init_registers_powerpc_e500l): ... this new prototype.
14584 (init_registers_ppc64): Remove, replace by ...
14585 (init_registers_powerpc_64l): ... this new prototype.
14586 (init_registers_powerpc_64): Remove, replace by ...
14587 (init_registers_powerpc_altivec64l): ... this new prototype.
14588 (ppc_num_regs): Set to 73.
14589 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14590 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14591 (ppc_cannot_store_register): Handle orig_r3 and trap.
14592 (ppc_arch_setup): Update init_registers_... calls.
14593 (ppc_fill_gregset): Handle orig_r3 and trap.
14595 * inferiors.c (clear_inferiors): Reset current_inferior.
14597 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14599 * acinclude.m4: Add override.m4.
14600 * configure: Regenerate.
14602 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14604 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14605 initial call to init_register_ppc64.
14607 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14609 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14610 single powerpc*-*-linux* case.
14611 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14613 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14615 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14616 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14618 * linux-ppc-low.c: Include <elf.h>.
14619 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14620 (ppc_hwcap): New global variable.
14621 (ppc_regmap): Remove __SPE__ #ifdef sections.
14622 (ppc_regmap_e500): New global variable.
14623 (ppc_cannot_store_register): Update __SPE__ special case.
14624 (ppc_get_hwcap): New function.
14625 (ppc_arch_setup): Use it to determine whether inferior supports
14626 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14627 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14628 Do not access registers if target does not support AltiVec.
14629 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14630 Do not access registers if target does not support SPE.
14631 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14633 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14635 * linux-low.c (disabled_regsets, num_regsets): New.
14636 (use_regsets_p): Delete.
14637 (linux_wait_for_process): Clear disabled_regsets.
14638 (regsets_fetch_inferior_registers): Check and set it.
14639 (regsets_store_inferior_registers): Likewise.
14640 (linux_fetch_registers, linux_store_registers): Do not use
14642 (initialize_low): Allocate disabled_regsets.
14644 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14646 * Makefile.in (LIBOBJS): New.
14647 (OBS): Use LIBOBJS.
14648 (memmem.o): New rule.
14649 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14650 * configure: Regenerated.
14652 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14654 * server.c (handle_query): Never return "unsupported" for
14655 qXfer:features:read queries.
14657 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14659 * server.c (get_features_xml): Fix inverted condition.
14660 (handle_query): Always support qXfer:feature:read.
14662 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14664 * server.c (wrapper_argv): New.
14665 (start_inferior): Handle wrapper_argv. If set, expect an extra
14667 (gdbserver_usage): Document --wrapper.
14668 (main): Parse --wrapper.
14670 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14672 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14673 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14674 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14675 (ppc_set_pc): Likewise.
14676 (ppc_arch_setup): New function.
14677 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14678 of collect_register.
14679 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14681 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14683 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14684 instead of linux-ppc64-low.o.
14685 * linux-ppc64-low.c: Remove file.
14686 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14687 (linux-ppc64-low.o): Remove rule.
14689 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14690 (init_registers_powerpc_64): Likewise.
14691 (ppc_regmap): Conditionally define depending on __powerpc64__.
14692 (ppc_cannot_store_register): Do not special-case "fpscr" when
14693 compiled on __powerpc64__.
14694 (ppc_collect_ptrace_register): New function.
14695 (ppc_supply_ptrace_register): New function.
14696 (ppc_breakpoint): Change type to "unsigned int".
14697 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14698 (the_low_target): Conditionally provide initializers for the
14699 arch_setup member depending on __powerpc64__. Install
14700 collect_ptrace_register and supply_ptrace_register members.
14702 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14704 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14705 * server.c (gdbserver_xmltarget): Define.
14706 (get_features_xml): Use it to replace "target.xml" and arch_string.
14708 * configure.srv: Remove srv_xmltarget. Add XML files that were
14709 mentioned there to srv_xmlfiles instead. Remove conditional tests
14710 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14711 srv_xmlfiles and srv_regobj to include all possible choices.
14712 * configure.ac (srv_xmltarget): Remove.
14713 (srv_xmlfiles): Do not add "target.xml".
14714 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14715 checks for supplementary target information.
14716 * configure: Regenerate.
14717 * Makefile.in (XML_TARGET): Remove.
14718 (target.xml): Remove rule.
14719 (clean): Do not clean up target.xml.
14720 (.PRECIOUS): Do not mention target.xml.
14722 * target.h (struct target_ops): Remove arch_string member.
14723 * linux-low.c (linux_arch_string): Remove.
14724 (linux_target_ops): Remove arch_string initializer.
14725 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14726 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14727 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14728 * spu-low.c (spu_arch_string): Remove.
14729 (spu_target_ops): Remove arch_string initializer.
14730 * win32-low.c (win32_arch_string): Remove.
14731 (win32_target_ops): Remove arch_string initializer.
14732 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14733 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14734 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14736 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14738 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14739 by collect_ptrace_register and supply_ptrace_register hooks.
14740 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14741 instead of checking for the_low_target.left_pad_xfer.
14742 (usr_store_inferior_registers): Use collect_ptrace_register callback
14743 instead of checking for the_low_target.left_pad_xfer.
14745 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14746 (s390_supply_ptrace_register): Likewise.
14747 (s390_fill_gregset): Call s390_collect_ptrace_register.
14748 (the_low_target): Update.
14750 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14751 (ppc_supply_ptrace_register): Likewise.
14752 (the_low_target): Update.
14754 * linux-i386-low.c (the_low_target): Update.
14755 * linux-x86-64-low.c (the_low_target): Update.
14757 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14759 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14760 reg-s390.o and reg-s390x.o.
14762 * linux-low.c (new_inferior): New global variable.
14763 (linux_create_inferior, linux_attach): Set it.
14764 (linux_wait_for_process): Call the_low_target.arch_setup after the
14765 target has stopped for the first time.
14766 (initialize_low): Do not call the_low_target.arch_setup.
14768 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14769 (s390_set_pc): Likewise.
14770 (s390_arch_setup): New function.
14771 (the_low_target): Use s390_arch_setup as arch_setup routine.
14773 * regcache.c (realloc_register_cache): New function.
14774 (set_register_cache): Call it for each existing regcache.
14776 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14778 * server.h (init_registers): Remove prototype.
14780 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14781 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14782 instead of init_registers ().
14783 * linux-arm-low.c (init_registers_arm): Add prototype.
14784 (init_registers_arm_with_iwmmxt): Likewise.
14785 (the_low_target): Add initializer for arch_setup field.
14786 * linux-cris-low.c (init_registers_cris): Add prototype.
14787 (the_low_target): Add initializer for arch_setup field.
14788 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14789 (the_low_target): Add initializer for arch_setup field.
14790 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14791 (the_low_target): Add initializer for arch_setup field.
14792 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14793 (the_low_target): Add initializer for arch_setup field.
14794 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14795 (the_low_target): Add initializer for arch_setup field.
14796 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14797 (the_low_target): Add initializer for arch_setup field.
14798 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14799 (init_registers_mips64_linux): Likewise.
14800 (the_low_target): Add initializer for arch_setup field.
14801 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14802 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14803 (the_low_target): Add initializer for arch_setup field.
14804 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14805 (init_registers_powerpc_64): Likewise.
14806 (the_low_target): Add initializer for arch_setup field.
14807 * linux-s390-low.c (init_registers_s390): Add prototype.
14808 (init_registers_s390x): Likewise.
14809 (the_low_target): Add initializer for arch_setup field.
14810 * linux-sh-low.c (init_registers_sh): Add prototype.
14811 (the_low_target): Add initializer for arch_setup field.
14812 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14813 (the_low_target): Add initializer for arch_setup field.
14814 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14815 (the_low_target): Add initializer for arch_setup field.
14817 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14818 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14819 instead of init_registers ().
14820 * win32-arm-low.c (init_registers_arm): Add prototype.
14821 (the_low_target): Add initializer for arch_setup field.
14822 * win32-i386-low.c (init_registers_i386): Add prototype.
14823 (the_low_target): Add initializer for arch_setup field.
14825 * spu-low.c (init_registers_spu): Add prototype.
14826 (initialize_low): Call initialie_registers_spu () instead of
14827 initialize_registers ().
14829 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14831 * server.c (handle_v_requests): When handling the vRun and vAttach
14832 packets, if already debugging a process, don't kill it. Return an
14835 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14837 * server.c (handle_query): Correct length check.
14839 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14841 * win32-low.c (do_initial_child_stuff): Add process handle
14842 parameter. Set current_process_handle and current_process_id from the
14843 parameters. Clear globals.
14844 (win32_create_inferior): Don't set current_process_handle and
14845 current_process_id here. Instead pass them on the call to
14846 do_initial_child_stuff.
14847 (win32_attach): Likewise.
14848 (win32_clear_inferiors): New.
14849 (win32_kill): Don't close the current process handle or the
14850 current thread handle here. Instead call win32_clear_inferiors.
14851 (win32_detach): Don't open a new handle to the process. Call
14852 win32_clear_inferiors.
14853 (win32_join): Don't rely on current_process_handle; open a new
14854 handle using the process id.
14855 (win32_wait): Call win32_clear_inferiors when the inferior process
14858 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14860 * server.c (monitor_show_help): Add "exit".
14862 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14864 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14865 (clean): Add reg-xtensa.c.
14866 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14867 * configure.srv (xtensa*-*-linux*) New target.
14868 * linux-xtensa-low.c: New.
14869 * xtensa-xtregs.c: New.
14871 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14873 * hostio.c: Don't include errno.h.
14874 (errno_to_fileio_errno): Move to hostio-errno.
14875 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14876 error number outputting to the target->hostio_last_error callback.
14877 (hostio_packet_error): Use FILEIO_EINVAL directly.
14878 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14879 calls to hostio_error.
14880 * hostio-errno.c: New.
14881 * server.h (hostio_last_error_from_errno): Declare.
14882 * target.h (target_ops): Add hostio_last_error member.
14883 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14884 as hostio_last_error handler.
14885 * spu-low.c (spu_target_ops): Likewise.
14886 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14887 (wince_hostio_last_error): New functions.
14888 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14889 as hostio_last_error handler.
14890 (win32_target_ops) [!_WIN32_WCE]: Register
14891 hostio_last_error_from_errno as hostio_last_error handler.
14892 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14893 (hostio-errno.o): New rule.
14894 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14895 * configure.srv (srv_hostio_err_objs): New variable. Default to
14897 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14898 * configure: Regenerate.
14900 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14902 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14903 (linux_kill, linux_detach): Clean up the process list.
14904 * remote-utils.c (remote_open): Improve port number parsing.
14905 (putpkt_binary, input_interrupt): Only send interrupts if the target
14907 * server.c (extended_protocol): Make static.
14908 (attached): Define earlier.
14909 (exit_requested, response_needed, program_argv): New variables.
14910 (target_running): New.
14911 (start_inferior): Clear attached here.
14912 (attach_inferior): Set attached here.
14913 (require_running): Define.
14914 (handle_query): Use require_running and target_running. Implement
14916 (handle_v_attach, handle_v_run): New.
14917 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14918 (gdbserver_usage): Update.
14919 (main): Redo argument parsing. Handle --debug and --multi. Handle
14920 --attach along with other options or after the port. Save
14921 program_argv. Support no initial program. Resynchronize
14922 communication with GDB after an error. Handle "monitor exit".
14923 Use require_running and target_running. Always allow the extended
14924 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14925 restart in extended mode.
14926 * README: Refer to the GDB manual. Update --attach usage.
14928 2007-12-20 Andreas Schwab <schwab@suse.de>
14930 * linux-low.c (STACK_SIZE): Define.
14931 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14932 (linux_test_for_tracefork): Likewise.
14934 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14936 * linux-low.c (linux_wait_for_event): Update messages. Do not
14937 reinsert auto-delete breakpoints.
14938 * mem-break.c (struct breakpoint): Change return type of handler to
14940 (set_breakpoint_at): Update handler type.
14941 (reinsert_breakpoint_handler): Return 1 instead of calling
14943 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14945 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14946 * mem-break.h (set_breakpoint_at): Update handler type.
14947 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14948 * win32-low.c (auto_delete_breakpoint): New.
14949 (get_child_debug_event): Use it.
14951 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14953 * configure.ac: Check for pread and pwrite.
14954 * hostio.c (handle_pread): Fall back to lseek and read.
14955 (handle_pwrite): Fall back to lseek and write.
14956 * config.in, configure: Regenerated.
14958 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14960 * server.c (myresume): Add own_buf argument.
14961 (main): Update calls.
14963 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14965 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14966 * remote-utils.c (remote_open): Do not call disable_async_io.
14967 (block_async_io): Delete.
14968 (unblock_async_io): Make static.
14969 (initialize_async_io): New.
14970 * server.c (handle_v_cont): Handle async I/O here.
14971 (myresume): Likewise. Move other common resume tasks here...
14972 (main): ... from here. Call initialize_async_io. Disable async
14973 I/O before the main loop.
14974 * server.h (initialize_async_io): Declare.
14975 (block_async_io, unblock_async_io): Delete prototypes.
14976 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14978 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14980 * remote-utils.c (readchar): Allow binary data in received messages.
14982 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14984 * win32-low.c (attaching): New global.
14985 (win32_create_inferior): Clear the `attaching' global.
14986 (win32_attach): Set the `attaching' global.
14987 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14988 attaching. Only set a breakpoint at the entry point if not
14991 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14993 * server.c (main): Don't report dll events on the initial
14994 connection on attaches.
14996 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14998 * server.c (main): Relax numerical bases supported for the pid of
14999 the --attach command line argument.
15001 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15003 * win32-low.c (win32_attach): Call OpenProcess before
15004 DebugActiveProcess, not after. Add last error output to error
15007 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15009 * win32-low.c (win32_get_thread_context)
15010 (win32_set_thread_context): New functions.
15011 (thread_rec): Use win32_get_thread_context.
15012 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15013 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15016 2007-12-03 Leo Zayas
15017 Pedro Alves <pedro_alves@portugalmail.pt>
15019 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15021 (child_add_thread): Minor cleanup.
15022 (child_continue): Resume artificially suspended threads before
15023 calling ContinueDebugEvent.
15024 (suspend_one_thread): New.
15025 (fake_breakpoint_event): New.
15026 (get_child_debug_event): Change return type to int. Check here if
15027 gdb sent an interrupt request. If a soft interrupt was requested,
15028 fake a breakpoint event. Return 0 if there is no event to handle,
15030 (win32_wait): Don't check here if gdb sent an interrupt request.
15031 Ensure there is a valid event to handle.
15032 (win32_request_interrupt): Add soft interruption method as last
15035 2007-12-03 Leo Zayas
15036 Pedro Alves <pedro_alves@portugalmail.pt>
15038 * win32-low.h (win32_thread_info): Add descriptions to the
15039 structure members. Replace `suspend_count' counter by a
15041 * win32-low.c (thread_rec): Update condition of when to get the
15042 context from the inferior. Rely on ContextFlags being set if it
15043 has already been retrieved. Only suspend the inferior thread if
15044 we haven't already. Warn if that fails.
15045 (continue_one_thread): s/suspend_count/suspended/. Only call
15046 ResumeThread once. Warn if that fails.
15048 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15050 * win32-low.c (win32_wait): Don't read from the inferior when it
15051 has already exited.
15053 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15055 * Makefile.in (win32_low_h): New variable.
15056 (win32-low.o): Add dependency on $(win32_low_h).
15057 (win32-arm-low.o, win32-i386-low.o): New rules.
15059 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15061 * hostio.c: Correct copyright year.
15063 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15065 * Makefile.in (OBS): Add hostio.o.
15066 (hostio.o): New rule.
15067 * server.h (handle_vFile): Declare.
15068 * hostio.c: New file.
15069 * server.c (handle_v_requests): Take packet_len and new_packet_len
15070 for binary packets. Call handle_vFile.
15071 (main): Update call to handle_v_requests.
15073 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15075 * linux-low.c: Include <sched.h>.
15077 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15079 * linux-low.c (linux_tracefork_grandchild): New.
15080 (linux_tracefork_child): Use clone.
15081 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15083 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15085 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15087 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15089 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15091 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15093 * inferiors.c (change_inferior_id): Delete.
15094 (add_pid_to_list, pull_pid_from_list): New.
15095 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15096 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15097 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15098 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15099 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15100 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15101 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15102 (using_threads): Always set to 1.
15103 (handle_extended_wait): New.
15104 (add_process): Do not set TID.
15105 (linux_create_inferior): Set must_set_ptrace_flags.
15106 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15107 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15108 (linux_thread_alive): Rename TID argument to LWPID.
15109 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15110 (linux_wait_for_event): Do not use TID or check using_threads. Update
15111 call to dead_thread_notify. Call handle_extended_wait.
15112 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15113 (send_sigstop): Delete sigstop_sent.
15114 (wait_for_sigstop): Avoid TID.
15115 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15116 (linux_test_for_tracefork): New.
15117 (linux_lookup_signals): Use thread_db_active and
15118 linux_supports_tracefork_flag.
15119 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15120 * linux-low.h (get_process_thread): Avoid TID.
15121 (struct process_ifo): Move thread_known and tid to the end. Remove
15123 (linux_attach_lwp, thread_db_init): Update prototypes.
15124 * server.h (change_inferior_id): Delete prototype.
15125 (add_pid_to_list, pull_pid_from_list): New prototypes.
15126 * thread-db.c (thread_db_use_events): New.
15127 (find_first_thread): Rename to...
15128 (find_one_thread): ...this. Update callers and messages. Do not
15129 call fatal. Check thread_db_use_events. Do not call
15130 change_inferior_id or new_thread_notify.
15131 (maybe_attach_thread): Update. Do not call new_thread_notify.
15132 (thread_db_init): Set thread_db_use_events. Check use_events.
15133 * utils.c (fatal, warning): Correct message prefix.
15135 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15137 * Makefile.in (clean): Remove new files.
15138 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15139 (powerpc-64.o, powerpc-64.c): New rules.
15140 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15141 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15143 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15145 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15146 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15147 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15148 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15149 (target_regsets): Add AltiVec and SPE register sets.
15150 * configure.ac: Check for AltiVec and SPE.
15151 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15152 (ppc_fill_vrregset, ppc_store_vrregset): New.
15153 (target_regsets): Add AltiVec register set.
15154 * configure: Regenerated.
15156 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15158 * linux-low.c (O_LARGEFILE): Define.
15159 (linux_read_memory): Use /proc/PID/mem.
15160 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15161 * configure, config.in: Regenerated.
15163 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15165 * linux-low.c (linux_wait_for_event): Do not pass signals while
15168 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15170 * win32-low.c (create_process): New.
15171 (win32_create_inferior): Use create_process instead of
15172 CreateProcess. If create_process failed retry appending an ".exe"
15173 suffix. Store the GetLastError result immediatelly after
15174 create_process calls and use it on the call to error.
15176 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15178 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15180 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15182 * configure.ac: Switch license to GPLv3.
15184 2007-08-01 Michael Snyder <msnyder@access-company.com>
15186 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15188 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15190 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15192 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15193 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15194 CloseToolhelp32Snapshot.
15195 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15196 CloseToolhelp32Snapshot.
15198 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15200 * server.c (main): Check for inferior exit before main loop.
15202 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15204 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15205 instead of on tmp_desc.
15207 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15208 Daniel Jacobowitz <dan@codesourcery.com>
15210 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15211 (add_thread): Minor cleanups.
15212 (clear_inferiors): Move lower in the file. Clear the DLL
15214 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15215 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15216 (xml_escape_text): New.
15217 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15219 (handle_v_cont): Report errors.
15220 (gdbserver_version): Update.
15221 (main): Correct size of own_buf. Do not report initial DLL events.
15222 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15223 (unloaded_dll, xml_escape_text): New.
15224 * win32-low.c (enum target_waitkind): Update comments.
15225 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15226 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15227 (win32_EnumProcessModules, win32_GetModuleInformation)
15228 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15229 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15230 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15231 (win32_Module32First, win32_Module32Next, load_toolhelp)
15232 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15233 (get_child_debug_event): Handle DLL events.
15234 (win32_wait): Likewise.
15236 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15238 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15239 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15241 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15243 * win32-low.c (handle_output_debug_string): Ignore event if not
15246 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15248 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15250 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15252 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15254 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15256 * inferiors.c (change_inferior_id): Add comment.
15257 * linux-low.c (check_removed_breakpoint): Add an early
15258 prototype. Improve debug output.
15259 (linux_attach): Doc update.
15260 (linux_detach_one_process, linux_detach): Clean up before releasing
15262 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15263 * linux-low.h (struct process_info): Doc improvement.
15264 * mem-break.c (delete_all_breakpoints): New.
15265 * mem-break.h (delete_all_breakpoints): New prototype.
15266 * thread-db.c (find_first_thread): New.
15267 (thread_db_create_event): Call it instead of
15268 thread_db_find_new_threads. Clean up unused variables.
15269 (maybe_attach_thread): Remove first thread handling.
15270 (thread_db_find_new_threads): Use find_first_thread.
15271 (thread_db_get_tls_address): Likewise.
15273 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15275 * thread-db.c (thread_db_find_new_threads): Add prototype.
15276 (thread_db_create_event): Check for the main thread before adding
15278 (maybe_attach_thread): Only enable event reporting if TID == 0.
15279 (thread_db_get_tls_address): Check for new threads.
15281 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15283 * linux-low.c (linux_create_inferior): Try execv before execvp.
15284 * spu-low.c (spu_create_inferior): Likewise.
15286 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15288 * linux-low.c (linux_create_inferior): Change execv to execvp.
15289 * spu-low.c (spu_create_inferior): Likewies.
15291 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15293 * Makefile.in (clean): Clean new files instead of deleted ones.
15294 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15295 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15297 * configure.srv: Specify XML files and new regformats for MIPS and
15299 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15300 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15301 an entry for the restart register.
15302 (mips_cannot_fetch_register, mips_cannot_store_register)
15303 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15304 register names to match the XML descriptions.
15305 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15306 restart register instead of $0.
15308 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15309 Markus Deuling <deuling@de.ibm.com>
15311 * remote-utils.c (decode_xfer_write): New function.
15312 * server.h (decode_xfer_write): Add prototype.
15313 * server.c (handle_query): Add PACKET_LEN argument. Support
15314 qXfer:spu:read and qXfer:spu:write packets.
15315 (main): Pass packet_len to handle_query.
15316 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15317 * target.h (target_ops): Add qxfer_spu.
15319 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15321 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15322 accessing non-seekable spufs files.
15324 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15326 * server.c (handle_query): Add reply for qC packet.
15328 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15329 Leo Zayas <lerele@champenstudios@com>
15331 * server.h (check_remote_input_interrupt_request): New function.
15332 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15333 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15334 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15335 (check_remote_input_interrupt_request): New function.
15336 * server.h (check_remote_input_interrupt_request): Declare.
15337 * win32-low.c (winapi_DebugBreakProcess,
15338 winapi_GenerateConsoleCtrlEvent): New typedefs.
15339 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15341 (win32_wait): Check for remote interrupt request
15342 with check_remote_input_interrupt_request.
15343 (win32_request_interrupt): New function.
15344 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15346 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15348 * win32-low.c (debug_registers_changed,
15349 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15350 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15351 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15352 (thread_rec): Get context using the low target.
15353 (child_add_thread): Call thread_added on the low target,
15354 which does the same thing.
15356 (do_initial_child_stuff): Remove debug registers references.
15357 Set context using the low target. Resume threads after
15358 setting the contexts.
15359 (child_continue): Remove dead variable. Remove debug
15360 registers references.
15361 (child_fetch_inferior_registers): Go through the low target.
15362 (do_child_store_inferior_registers): Remove.
15363 (child_store_inferior_registers): Go through the low target.
15364 (win32_resume): Remove debug registers references.
15365 Set context using the low target.
15366 (handle_exception): Change return type to void. Don't record
15367 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15368 first chance exception.
15369 (get_child_debug_event): Change return type to void. Remove
15370 goto loop. Always return after waiting for debug event.
15371 (win32_wait): Convert to switch statement. Handle spurious
15374 * win32-i386-low.c (debug_registers_changed,
15375 debug_registers_used): New.
15376 (initial_stuff): Rename to ...
15377 (i386_initial_stuff): ... this. Clear debug registers
15379 (store_debug_registers): Delete.
15380 (i386_get_thread_context): New.
15381 (load_debug_registers): Delete.
15382 (i386_set_thread_context): New.
15383 (i386_thread_added): New.
15384 (single_step): Rename to ...
15385 (i386_single_step): ... this.
15386 (do_fetch_inferior_registers): Rename to ...
15387 (i386_fetch_inferior_register): ... this.
15388 (i386_store_inferior_register): New.
15389 (the_low_target): Adapt to new interface.
15391 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15392 (arm_get_thread_context): New.
15393 (arm_set_thread_context): New.
15395 (do_fetch_inferior_registers): Rename to ...
15396 (arm_fetch_inferior_register): ... this.
15397 (arm_store_inferior_register): New.
15398 (arm_wince_breakpoint): Reimplement as unsigned long.
15399 (arm_wince_breakpoint_len): Define.
15400 (the_low_target): Adapt to new interface.
15402 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15403 load_debug_registers. Add get_thread_context, set_thread_context,
15404 thread_added and store_inferior_register. Rename
15405 fetch_inferior_registers to fetch_inferior_register.
15406 (regptr): Remove declaration.
15408 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15410 * linux-low.c (linux_detach): Change return type to int. Return 0.
15411 * spu-low.c (spu_detach): Likewise.
15413 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15415 * target.h (target_ops): Change return type of detach to int.
15417 (join_inferior): New.
15418 * server.c (main): Don't skip detach support on mingw32.
15419 If the inferior doesn't support detaching return error.
15420 Call join_inferior instead of using waitpid.
15421 * linux-low.c (linux_join): New.
15422 (linux_target_op): Add linux_join.
15423 * spu-low.c (spu_join): New.
15424 (spu_target_ops): Add spu_join.
15425 * win32-low.c (win32_detach): Adapt to new interface.
15426 Reopen current_process_handle before detaching. Issue a child
15427 resume before detaching.
15429 (win32_target_op): Add win32_join.
15431 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15433 * win32-low.c (win32-attach): Fix return value.
15434 * target.h (target_ops): Describe ATTACH return values.
15436 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15438 * win32-low.c (GETPROCADDRESS): Define.
15439 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15440 (winapi_DebugSetProcessKillOnExit): Likewise.
15441 (win32_create_inferior): Force usage of ansi CreateProcessA.
15442 (win32_attach): Use GETPROCADDRESS.
15443 (win32_detach): Likewise.
15445 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15447 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15449 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15451 * win32-low.c: Commit leftover changes from 2007-03-29.
15453 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15455 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15456 fields short instead of int. Add explicit padding.
15457 (i387_cache_to_fsave): Remove unnecessary casts.
15458 (i387_fsave_to_cache): Doc fix.
15459 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15461 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15463 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15464 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15466 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15468 * configure.srv (arm*-*-mingw32ce*): Move near the other
15471 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15473 * configure.ac: Add errno checking.
15474 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15475 sys/file.h and malloc.h.
15476 (AC_CHECK_DECLS): Add perror.
15477 (srv_mingwce): Handle.
15478 * configure.srv (i[34567]86-*-cygwin*): Add
15479 win32-i386-low.o to srv_tgtobj.
15480 (i[34567]86-*-mingw*): Likewise.
15481 (arm*-*-mingw32ce*): Add case.
15482 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15483 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15484 [__MINGW32CE__] (strerror): New function.
15485 [__MINGW32CE__] (errno): Define to GetLastError.
15486 [__MINGW32CE__] (COUNTOF): New macro.
15487 (remote_open): Remove extra close call.
15488 * mem-break.c (delete_breakpoint_at): New function.
15489 * mem-break.h (delete_breakpoint_at): Declare.
15490 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15491 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15492 [USE_WIN32API] (read, write): Add char* casts.
15493 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15494 * server.h: Include wincecompat.h on Windows CE.
15495 [HAVE_ERRNO_H]: Check.
15496 (perror): Declare if not declared.
15497 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15498 (perror_with_name): Remove errno declaration.
15499 * wincecompat.h: New.
15500 * wincecompat.c: New.
15501 * win32-low.h: New.
15502 * win32-arm-low.c: New.
15503 * win32-i386-low.c: New.
15504 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15505 (OUTMSG2): Make it safe.
15507 (COUNTOF): New macro.
15508 (NUM_REGS): Get it from the low target.
15509 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15510 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15511 (thread_rec): Let low target handle debug registers.
15512 (child_add_thread): Likewise.
15513 (child_init_thread_list): Likewise.
15514 (continue_one_thread): Likewise.
15516 (do_child_fetch_inferior_registers): Move to ...
15517 * win32-i386-low.c: ... here, and rename to ...
15518 (do_fetch_inferior_registers): ... this.
15519 * win32-low.c (child_fetch_inferior_registers):
15520 Go through the low target.
15521 (do_child_store_inferior_registers): Use regptr.
15522 (strwinerror): New function.
15523 (win32_create_inferior): Handle Windows CE.
15524 Use strwinerror instead of strerror on Windows error
15525 codes. Add program to the error output.
15526 Don't close the main thread handle on Windows CE.
15527 (win32_attach): Use coredll.dll on Windows CE.
15528 (win32_kill): Close current process and current
15530 (win32_detach): Use coredll.dll on Windows CE.
15531 (win32_resume): Let low target handle debug registers, and
15533 (handle_exception): Add/Remove initial breakpoint. Avoid
15534 non-existant WSTOPSIG on Windows CE.
15535 (win32_read_inferior_memory): Cast to remove warning.
15536 (win32_arch_string): Go through the low target.
15537 (initialize_low): Call set_breakpoint_data with the low
15538 target's breakpoint.
15539 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15540 FOP_REGNUM, mappings): Move to ...
15541 * win32-i386-low.c: ... here.
15542 * win32-low.c (win32_thread_info): Move to ...
15543 * win32-low.h: ... here.
15544 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15545 win32-arm-low.c and wincecompat.c.
15546 (all:): Add $EXEEXT.
15547 (install-only:): Likewise.
15548 (gdbserver:): Likewise.
15549 (gdbreplay:): Likewise.
15550 * config.in: Regenerate.
15551 * configure: Regenerate.
15553 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15555 * win32-low.c: Rename typedef thread_info to
15556 win32_thread_info throughout.
15558 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15560 * win32-i386-low.c: Rename to ...
15561 * win32-low.c: ... this.
15562 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15563 * Makefile.in: Likewise.
15565 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15567 * remote-utils.c (monitor_output): Constify msg parameter.
15568 * server.h (monitor_output): Likewise.
15569 * win32-i386-low.c (handle_output_debug_string): New.
15570 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15571 handle_output_debug_string.
15572 (get_child_debug_event): Likewise.
15574 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15576 * server.c (main): Correct strtoul check.
15578 2007-03-27 Jon Ringle <jon@ringle.org>
15580 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15582 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15584 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15586 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15588 * terminal.h: Check HAVE_SGTTY_H.
15590 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15592 * remote-utils.c (remote_open): Print out the assigned port number.
15594 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15596 * remote-utils.c (monitor_output): New function.
15597 * server.c (debug_threads): Define here.
15598 (monitor_show_help): New function.
15599 (handle_query): Handle qRcmd.
15600 (main): Do not handle 'd' packet.
15601 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15602 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15605 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15607 * Makefile.in (EXEEXT): New.
15608 (clean): Use $(EXEEXT).
15610 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15612 * target.h (target_ops): Rename send_signal to request_interrupt,
15613 and remove enum target_signal parameter.
15614 * linux-low.c (linux_request_interrupt): Rename from
15615 linux_send_signal, and always send SIGINT.
15616 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15617 and always send SIGINT.
15618 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15620 (input_interrupt): Likewise.
15622 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15624 * server.c (get_features_xml): Check if target implemented
15626 * win32-i386-low.c (win32_arch_string): New.
15627 (win32_target_ops): Add win32_arch_string as arch_string member.
15629 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15631 * spu-low.c (spu_arch_string): New.
15632 (spu_target_ops): Add spu_arch_string.
15634 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15636 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15637 * configure.ac: Do not check for terminal.h.
15638 * configure, config.in: Regenerated.
15640 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15642 * Makefile.in (OBS): Add $(XML_BUILTIN).
15643 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15645 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15646 (arm-with-iwmmxt.c): New.
15647 * config.in, configure: Regenerate.
15648 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15649 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15650 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15651 (arm*-*-linux*): Add iWMMXt and regset support.
15652 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15653 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15654 (arm_store_wmmxregset, target_regsets): New.
15655 * server.c (get_features_xml): Take annex argument. Check builtin
15657 (handle_query): Handle multiple annexes.
15659 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15661 * remote-utils.c [USE_WIN32API] (read, write): Define.
15662 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15665 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15667 * linux-i386-low.c (the_low_target): Set arch_string.
15668 * linux-x86-64-low.c (the_low_target): Likewise.
15669 * linux-low.c (linux_arch_string): New.
15670 (linux_target_ops): Add it.
15671 * linux-low.h (struct linux_target_ops): Add arch_string.
15672 * server.c (write_qxfer_response): Use const void * for DATA.
15673 (get_features_xml): New.
15674 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15675 * target.h (struct target_ops): Add arch_string method.
15677 2007-01-03 Denis Pilat <denis.pilat@st.com>
15678 Daniel Jacobowitz <dan@codesourcery.com>
15680 * linux-low.c (linux_kill): Handle being called with no threads.
15681 * win32-i386-low.c (win32_kill): Likewise.
15682 (get_child_debug_event): Clear current_process_handle.
15684 2006-12-30 Denis PILAT <denis.pilat@st.com>
15685 Daniel Jacobowitz <dan@codesourcery.com>
15687 * remote-utils.c (remote_open): Check the type of specified
15688 serial port devices before opening them.
15689 * server.c (main): Kill the inferior if an error occurs during
15690 the first remote_open.
15692 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15694 * README: Update supported targets.
15696 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15698 * Makefile.in (clean): Remove reg-mips64.c.
15699 (reg-mips64.c, reg-mips64.o): New rules.
15700 * configure.srv: Handle mips64. Include regset support for mips.
15701 * linux-mips-low.c (union mips_register): New.
15702 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15703 (mips_breakpoint, mips_breakpoint_at): Use int.
15704 (mips_collect_register, mips_supply_register)
15705 (mips_collect_register_32bit, mips_supply_register_32bit)
15706 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15707 (mips_store_fpregset, target_regsets): New.
15708 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15710 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15712 * configure.srv: Add target "spu*-*-*".
15713 * Makefile.in (clean): Remove reg-spu.c.
15714 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15715 * spu-low.c: New file.
15717 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15719 * configure.ac: Correct td_thr_tls_get_addr test.
15720 * configure: Regenerated.
15722 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15724 * linux-low.c (linux_wait_for_event): Reformat. Use the
15725 pass_signals array.
15726 * remote-utils.c (decode_address_to_semicolon): New.
15727 * server.c (pass_signals, handle_general_set): New.
15728 (handle_query): Mention QPassSignals for qSupported.
15729 (main): Call handle_general_set.
15730 * server.h (pass_signals, decode_address_to_semicolon): New.
15732 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15734 * server.c (handle_query): Correct error handling for read_auxv.
15736 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15738 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15739 and srv_linux_thread_db to yes.
15740 * linux-s390-low.c (s390_fill_gregset): New function.
15741 (target_regsets): Define data structure.
15743 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15745 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15746 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15747 * config.in, configure: Regenerated.
15748 * inferiors.c (gdb_id_to_thread): New function.
15749 (gdb_id_to_thread_id): Use it.
15750 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15751 * linux-low.h (struct process_info): Add th member.
15752 (thread_db_get_tls_address): New prototype.
15753 * remote-utils.c (decode_address): Make non-static.
15754 * server.c (handle_query): Handle qGetTLSAddr.
15755 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15756 * target.h (struct target_ops): Add get_tls_address.
15757 * thread-db.c (maybe_attach_thread): Save the thread handle.
15758 (thread_db_get_tls_address): New.
15760 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15762 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15763 (linux_resume_one_process): Take a siginfo_t *. Update all
15764 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15765 (struct pending_signals): Add a siginfo_t.
15766 (linux_wait_for_process): Always set last_status.
15767 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15768 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15769 * linux-low.h (struct process_info): Add last_status.
15771 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15773 * remote-utils.c (try_rle): New function.
15774 (putpkt_binary): Use it.
15776 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15778 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15779 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15780 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15781 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15782 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15785 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15787 * server.c (terminal_fd): New variable.
15788 (old_foreground_pgrp): Likewise.
15789 (restore_old_foreground_pgrp): New function.
15790 (start_inferior): Record the terminal file descriptor in terminal_fd
15791 and its original foreground group in old_foreground_pgrp. Register
15792 restore_old_foreground_pgrp with atexit().
15794 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15796 * server.c (handle_query): Correct qPart to qXfer.
15798 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15800 * configure.ac: Check for more headers which are missing on
15801 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15802 * configure.srv: Add Cygwin and mingw32.
15803 * remote-utils.c: Don't include headers unconditionally which
15804 are missing on mingw32. Include <winsock.h> for mingw32.
15805 (remote_open): Adjust for mingw32 support. Flush
15806 standard error after writing to it.
15807 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15808 (unblock_async_io, enable_async_io, disable_async_io)
15809 (readchar, getpkt): Update for Winsock support.
15810 (prepare_resume_reply): Expect a protocol signal number.
15811 * server.c: Disable <sys/wait.h> on mingw32.
15812 (start_inferior): Adjust for mingw32 support. Flush
15813 standard error after writing to it.
15814 (attach_inferior): Likewise. Use protocol signal
15816 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15818 * win32-i386-low.c: New file.
15819 * Makefile.in (XM_CLIBS): Set.
15820 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15821 (win32-i386-low.o): New dependency rule.
15822 * linux-low.c (linux_wait): Use target signal numbers.
15823 * target.h (struct target_ops): Doc fix.
15824 * server.h (target_signal_to_name): New prototype.
15825 * gdbreplay.c: Don't include headers unconditionally which
15826 are missing on mingw32. Include <winsock.h> for mingw32.
15827 (remote_close, remote_open): Adjust for Winsock support.
15828 * configure, config.in: Regenerated.
15830 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15832 * server.c (decode_xfer_read, write_qxfer_response): New.
15833 (handle_query): Take a packet length argument. Handle
15834 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15835 the qSupported response.
15836 (main): Update call to handle_query.
15838 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15840 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15841 (putpkt_binary): Renamed from putpkt and adjusted for binary
15843 (putpkt): New wrapper for putpkt_binary.
15844 (readchar): Don't mask off the high bit.
15845 (decode_X_packet): New function.
15846 * server.c (main): Call putpkt_binary if a handler sets the packet
15847 length. Save the length of the incoming packet. Handle 'X'.
15848 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15850 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15852 * server.c (handle_query): Handle qSupported.
15854 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15856 * remote-utils.c (all_symbols_looked_up): New variable.
15857 (look_up_one_symbol): Check it.
15858 * server.h (look_up_one_symbol): New declaration.
15859 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15861 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15863 * Makefile.in (linux-arm-low.o): Update dependencies.
15864 * linux-arm-low.c: Include "gdb_proc_service.h".
15865 (PTRACE_GET_THREAD_AREA): Define.
15866 (ps_get_thread_area): New function.
15868 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15870 * configure.srv (m68k*-*-uclinux*): New target.
15871 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15872 (linux_resume_one_process): Remove extraneous cast.
15873 (linux_read_offsets): New.
15874 (linux_target_op): Add linux_read_offsets on mmuless systems.
15875 * server.c (handle_query): Add qOffsets logic.
15876 * target.h (struct target_ops): Add read_offsets.
15878 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15880 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15881 (PTRACE_GET_THREAD_AREA): Define.
15882 (ps_get_thread_area): New function.
15883 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15884 (linux-x86-64-low.o): Update.
15886 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15888 * configure.ac: Remove checks for prfpregset_t.
15889 * gdb_proc_service.h: New file.
15890 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15891 new "gdb_proc_service.h".
15892 * proc-service.c: Likewise.
15893 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15894 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15895 * Makefile.in (gdb_proc_service_h): Updated.
15896 * configure, config.in: Regenerated.
15898 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15900 * remote-utils.c (prepare_resume_reply): Move declaration
15901 of gdb_id_from_wait to the top of the block.
15903 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15905 * linux-low.c (regsets_store_inferior_registers): Read the regset
15906 from the target before filling it.
15908 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15910 * server.c (attach_inferior): Return SIGTRAP for a successful
15913 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15915 * Makefile.in (OBS): Add version.o.
15916 (STAGESTUFF): Delete.
15917 (version.o): Add dependencies.
15918 (version.c): Replace rule.
15919 (clean): Remove version.c.
15920 * server.c (gdbserver_version): New.
15921 (gdbserver_usage): Use printf.
15922 (main): Handle --version and --help.
15923 * server.h (version, host_name): Add declarations.
15925 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15937 * linux-x86-64-low.c:
15939 * linux-s390-low.c:
15940 * linux-ppc64-low.c:
15942 * linux-mips-low.c:
15943 * linux-m68k-low.c:
15944 * linux-m32r-low.c:
15947 * linux-ia64-low.c:
15948 * linux-i386-low.c:
15949 * linux-crisv32-low.c:
15961 * gdbserver.1: Add (C) after Copyright. Update the FSF
15964 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15966 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15967 (arm_breakpoint_at): Recognize both breakpoints.
15968 (the_low_target): Use the correct breakpoint instruction.
15970 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15972 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15973 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15974 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15975 (the_low_target): Update.
15977 2005-10-25 Andreas Schwab <schwab@suse.de>
15979 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15981 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15982 (ia64_num_regs): Reduce to 462.
15984 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15986 * acinclude.m4: Correct quoting.
15987 * aclocal.m4: Regenerated.
15989 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15990 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15991 (thread_db_init): Call thread_db_err_str.
15992 * configure.ac: Check for TD_VERSION.
15993 * config.in, configure: Regenerated.
15995 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15997 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15999 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16001 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16002 is not available. Define HAVE_PTRACE_GETREGS if it is.
16003 * config.in, configure: Regenerated.
16004 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16005 * linux-i386-low.c, linux-m68k-low.c: Update to use
16006 HAVE_PTRACE_GETREGS.
16007 * linux-low.c (regsets_fetch_inferior_registers)
16008 (regsets_store_inferior_registers): Only return 0 if we processed
16010 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16011 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16013 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16015 * inferiors.c (struct thread_info): Add gdb_id.
16016 (add_thread): Add gdb_id argument.
16017 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16018 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16019 calls to add_thread.
16020 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16021 * server.c (handle_query): Use thread_to_gdb_id.
16022 (handle_v_cont, main): Use gdb_id_to_thread_id.
16023 * server.h (add_thread): Update prototype.
16024 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16027 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16029 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16030 left-padded registers.
16031 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16032 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16034 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16036 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16037 * configure: Regenerate.
16038 * config.in: Regenerate.
16039 * server.h (NEED_DECLARATION_STRERROR):
16040 Replace with !HAVE_DECL_STRERROR.
16042 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16044 * linux-low.c (linux_wait, linux_send_signal): Don't test
16045 an unsigned long variable for > 0 if it could be MAX_ULONG.
16046 * server.c (myresume): Likewise.
16047 * target.c (set_desired_inferior): Likewise.
16049 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16051 * configure.ac: Simplify and improve check for socklen_t.
16052 * configure, config.in: Regenerate.
16054 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16056 * acconfig.h: Remove.
16057 * configure.ac: Add a test for socklen_t. Use three-argument
16058 AC_DEFINE throughout.
16059 * config.in: Regenerated using autoheader 2.59.
16060 * configure: Regenerated.
16062 * gdbreplay.c (socklen_t): Provide a default.
16063 (remote_open): Use socklen_t.
16064 * remote-utils.c (socklen_t): Provide a default.
16065 (remote_open): Use socklen_t.
16066 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16069 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16071 * linux-low.c (linux_read_memory, linux_write_memory)
16072 (linux_read_auxv): Likewise.
16073 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16074 (check_mem_write): Likewise.
16075 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16077 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16078 (registers_from_string, register_data): Likewise.
16079 * server.c (handle_query, main): Likewise.
16080 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16081 (decode_M_packet): Likewise.
16082 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16083 * target.h (struct target_ops): Update read_memory, write_memory,
16085 (read_inferior_memory, write_inferior_memory): Update.
16086 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16087 to unsigned char *.
16088 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16089 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16090 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16091 linux-s390-low.c, linux-sh-low.c: Update for changes in
16092 read_inferior_memory and the_low_target->breakpoint.
16094 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16096 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16097 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16098 * configure.srv: Add powerpc64-*-linux*.
16099 * linux-ppc64-low.c: New file.
16101 2005-05-23 Orjan Friberg <orjanf@axis.com>
16103 * linux-cris-low.c: New file with support for CRIS.
16104 * linux-crisv32-low.c: Ditto for CRISv32.
16105 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16106 (clean): Add reg-cris.c and reg-crisv32.c.
16107 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16108 reg-crisv32.o, and reg-crisv32.c to make rules.
16109 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16110 recognized targets.
16112 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16114 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16115 of sizeof (PTRACE_XFER_TYPE).
16116 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16118 2005-05-12 Orjan Friberg <orjanf@axis.com>
16120 * target.h (struct target_ops): Add insert_watchpoint,
16121 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16122 pointers for hardware watchpoint support.
16123 * linux-low.h (struct linux_target_ops): Ditto.
16124 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16125 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16126 to linux_target_ops.
16127 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16129 * server.c (main): Recognize 'Z' and 'z' packets.
16131 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16133 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16134 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16135 (the_low_target): Add new members.
16137 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16139 * proc-service.c (ps_lgetregs): Search all_processes instead of
16142 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16144 * server.c (start_inferior): Change return type to int.
16145 (attach_inferior): Change sigptr to int *.
16146 (handle_v_cont, handle_v_requests): Change signal to int *.
16147 (main): Change signal to int.
16149 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16151 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16152 * configure.srv: Add m32r*-*-linux*.
16153 * linux-m32r-low.c: New file.
16155 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16157 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16159 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16161 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16162 Take unsigned long arguments for PIDs.
16163 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16164 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16165 (wait_for_sigstop, linux_resume_one_process)
16166 (regsets_fetch_inferior_registers, linux_send_signal)
16167 (linux_read_auxv): Likewise. Update the types of variables holding
16168 PIDs. Update format string specifiers.
16169 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16170 * remote-utils.c (prepare_resume_reply): Likewise.
16171 * server.c (cont_thread, general_thread, step_thread)
16172 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16174 (handle_query): Update format specifiers.
16175 (handle_v_cont, main): Use strtoul for thread IDs.
16176 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16177 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16178 (general_thread, step_thread, thread_from_wait)
16179 (old_thread_from_wait): Update.
16180 * target.h (struct thread_resume): Use unsigned long for THREAD.
16181 (struct target_ops): Use unsigned long for arguments to attach and
16184 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16186 * acinclude.m4: Include bfd/bfd.m4 directly.
16187 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16188 <agriffis@toolchain.org>.
16189 * aclocal.m4, configure: Regenerated.
16191 2005-01-07 Andrew Cagney <cagney@gnu.org>
16193 * configure.ac: Rename configure.in, require autoconf 2.59.
16194 * configure: Re-generate.
16196 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16198 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16199 LIBS when finished.
16200 * aclocal.m4: Regenerated.
16201 * configure: Regenerated.
16203 2004-11-21 Andreas Schwab <schwab@suse.de>
16205 * linux-m68k-low.c (m68k_num_gregs): Define.
16206 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16207 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16208 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16209 (m68k_breakpoint_at): New. Add to the_low_target.
16211 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16212 srv_linux_thread_db to yes.
16214 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16216 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16217 (ARCH_SET_FS): Likewise.
16218 (ARCH_GET_FS): Likewise.
16219 (ARCH_GET_GS): Likewise.
16221 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16223 * linux-i386-low.c (ps_get_thread_area): New.
16224 * linux-x86-64-low.c (ps_get_thread_area): New.
16225 * linux-low.c: Include <sys/syscall.h>.
16226 (linux_kill_one_process): Don't kill the first thread here.
16227 (linux_kill): Kill the first thread here.
16228 (kill_lwp): New function.
16229 (send_sigstop, linux_send_signal): Use it.
16230 * proc-service.c: Clean up #ifdefs.
16231 (fpregset_info): Delete.
16232 (ps_lgetregs): Update and enable implementation.
16233 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16235 * remote-utils.c (struct sym_cache, symbol_cache): New.
16236 (input_interrupt): Print a clearer message.
16237 (async_io_enabled): New variable.
16238 (enable_async_io, disable_async_io): Use it. Update comments.
16239 (look_up_one_symbol): Use the symbol cache.
16240 * thread-db.c (thread_db_look_up_symbols): New function.
16241 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16243 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16245 * configure.in: Test for -rdynamic.
16246 * configure: Regenerated.
16247 * Makefile (INTERNAL_LDFLAGS): New.
16248 (gdbserver, gdbreplay): Use it.
16250 2004-09-02 Andrew Cagney <cagney@gnu.org>
16252 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16254 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16256 * linux-low.c (linux_wait): Clear all_processes list also.
16258 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16260 * linux-low.c: Include <errno.h>. Remove extern declaration of
16263 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16265 * gdbreplay.c, server.h, utils.c: Update copyright years.
16267 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16269 * server.c (main): Print child status or termination signal from
16270 variable 'signal', not 'sig'.
16272 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16274 * linux-low.c (linux_read_memory): Change return type to
16275 int. Check for and return error from ptrace().
16276 * target.c (read_inferior_memory): Change return type to int. Pass
16277 back return status from the_target->read_memory().
16278 * target.h (struct target_ops): Adapt *read_memory() prototype.
16280 (read_inferior_memory): Adapt prototype.
16281 * server.c (main): Return an error packet if
16282 read_inferior_memory() returns an error.
16284 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16286 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16287 Unify with other clean targets.
16289 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16291 * server.c (handle_v_cont): Call set_desired_inferior.
16293 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16295 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16297 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16299 * linux-low.c (linux_wait): Unblock async I/O.
16300 (linux_resume): Block and enable async I/O.
16301 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16302 * server.h (block_async_io, unblock_async_io): Add prototypes.
16304 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16306 * remote-utils.c (remote_open): Print a status notice after
16307 opening a TCP port.
16308 * server.c (attach_inferior): Print a status notice after
16311 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16313 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16315 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16317 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16319 * server.c, target.h: Update copyright years.
16321 2004-02-25 Roland McGrath <roland@redhat.com>
16323 * target.h (struct target_ops): New member `read_auxv'.
16324 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16325 * linux-low.c (linux_read_auxv): New function.
16326 (linux_target_ops): Initialize `read_auxv' member to that.
16328 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16330 Committed by Jim Blandy <jimb@redhat.com>.
16332 * linux-s390-low.c (s390_num_regs): Update.
16333 (s390_regmap): Remove control registers. Use __s390x__ predefine
16334 instead of GPR_SIZE to distiguish s390 and s390x targets.
16336 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16338 * linux-low.c: Update copyright year.
16339 (check_removed_breakpoint): Clear pending_is_breakpoint.
16340 (linux_set_resume_request, linux_queue_one_thread)
16341 (resume_status_pending_p): New functions.
16342 (linux_continue_one_thread): Use process->resume.
16343 (linux_resume): Only resume threads if there are no pending events.
16344 * linux-low.h (struct process_info): Add resume request
16347 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16349 * regcache.c (new_register_cache): Clear the allocated register
16350 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16352 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16354 * linux-low.c (linux_resume): Take a struct thread_resume *
16356 (linux_wait): Update call.
16357 (resume_ptr): New static variable.
16358 (linux_continue_one_thread): Renamed from
16359 linux_continue_one_process. Use resume_ptr.
16360 (linux_resume): Use linux_continue_one_thread.
16361 * server.c (handle_v_cont, handle_v_requests): New functions.
16362 (myresume): New function.
16363 (main): Handle 'v' case.
16364 * target.h (struct thread_resume): New type.
16365 (struct target_ops): Change argument of "resume" to struct
16367 (myresume): Delete macro.
16369 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16371 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16372 (uninstall): Support DESTDIR.
16374 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16376 * configure.srv: Add xscale*linux copy of arm*linux entry.
16378 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16380 * linux-arm-low.c (arm_reinsert_addr): New function.
16381 (the_low_target): Add arm_reinsert_addr.
16383 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16385 * mem-break.c: Remove whitespace at end of file.
16387 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16389 * configure.in: Check whether we need to prototype strerror.
16390 * server.h: Optionally prototype strerror.
16391 * gdbreplay.c (perror_with_name): Use strerror.
16392 * linux-low.c (linux_attach_lwp): Use strerror.
16393 * utils.c (perror_with_name): Use strerror.
16394 * config.in, configure: Regenerated.
16396 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16398 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16399 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16401 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16403 * Makefile.in (SFILES): Update.
16404 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16405 low-sun3.c: Remove files.
16407 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16409 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16410 (linux_detach_one_process, linux_detach): New functions.
16411 (linux_target_ops): Add linux_detach.
16412 * server.c (main): Handle 'D' packet.
16413 * target.h (struct target_ops): Add "detach" member.
16414 (detach_inferior): Define.
16416 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16418 From Kelley Cook <kelleycook@wideopenwest.com>:
16419 * configure.srv: Accept i[34567]86 variants.
16421 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16423 * linux-low.c (linux_wait_for_event): Correct comment typos.
16424 (linux_resume_one_process): Call check_removed_breakpoint.
16425 (linux_send_signal): New function.
16426 (linux_target_ops): Add linux_send_signal.
16427 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16429 * target.h (struct target_ops): Add send_signal.
16431 2003-05-29 Jim Blandy <jimb@redhat.com>
16433 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16434 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16435 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16436 away part of the register's value.
16438 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16440 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16441 (linux_wait_for_event, linux_init_signals): Likewise.
16443 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16445 * configure.in: Check for stdlib.h.
16446 * configure: Regenerated.
16447 * config.in: Regenerated.
16449 2003-01-04 Andreas Schwab <schwab@suse.de>
16451 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16453 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16455 * Makefile.in: Remove obsolete code.
16457 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16459 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16460 defined(PT_FPR0_HI).
16462 2002-11-17 Stuart Hughes <seh@zee2.com>
16464 * linux-arm-low.c (arm_num_regs): Increase.
16465 (arm_regmap): Include status register.
16467 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16469 * linux-low.c (register_addr): Remove incorrect -1 check.
16471 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16473 * linux-low.c (linux_create_inferior): Call setpgid. Return
16475 (unstopped_p, linux_signal_pid): Remove.
16476 (linux_target_ops): Remove linux_signal_pid.
16477 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16478 global instead of target method.
16479 * target.h (struct target_ops): Remove signal_pid. Update comment
16480 for create_inferior.
16481 * server.c (signal_pid): New variable.
16482 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16483 gdbserver. Set the child to be the foreground process group.
16484 (attach_inferior): Set signal_pid.
16486 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16488 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16490 2002-08-20 Jim Blandy <jimb@redhat.com>
16492 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16495 2002-08-01 Andrew Cagney <cagney@redhat.com>
16497 * Makefile.in: Make chill references obsolete.
16499 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16501 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16502 * configure: Regenerate.
16503 * config.in: Regenerate.
16505 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16507 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16508 (perror_with_name, remote_close, remote_open, expect, play): Static.
16510 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16512 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16513 byte offsets instead of an array of indexes.
16514 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16516 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16518 * regcache.c: Add comment.
16520 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16522 * thread-db.c: New file.
16523 * proc-service.c: New file.
16524 * acinclude.m4: New file.
16525 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16526 proc-service.o, and thread-db.o.
16527 (linux-low.o): Add USE_THREAD_DB.
16528 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16529 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16530 * aclocal.m4: Regenerated.
16531 * config.in: Regenerated.
16532 * configure: Regenerated.
16533 * configure.in: Check for proc_service.h, sys/procfs.h,
16534 thread_db.h, and linux/elf.h headrs.
16535 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16536 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16537 Check for -lthread_db and thread support.
16538 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16539 PowerPC, and SuperH.
16540 * i387-fp.c: Constify arguments.
16541 * i387-fp.h: Likewise.
16542 * inferiors.c: (struct thread_info): Renamed from
16543 `struct inferior_info'. Remove PID member. Use generic inferior
16544 list header. All uses updated.
16545 (inferiors, signal_pid): Removed.
16546 (all_threads): New variable.
16547 (get_thread): Define.
16548 (add_inferior_to_list): New function.
16549 (for_each_inferior): New function.
16550 (change_inferior_id): New function.
16551 (add_inferior): Removed.
16552 (remove_inferior): New function.
16553 (add_thread): New function.
16554 (free_one_thread): New function.
16555 (remove_thread): New function.
16556 (clear_inferiors): Use for_each_inferior and free_one_thread.
16557 (find_inferior): New function.
16558 (find_inferior_id): New function.
16559 (inferior_target_data): Update argument type.
16560 (set_inferior_target_data): Likewise.
16561 (inferior_regcache_data): Likewise.
16562 (set_inferior_regcache_data): Likewise.
16563 * linux-low.c (linux_bp_reinsert): Remove.
16564 (all_processes, stopping_threads, using_thrads)
16565 (struct pending_signals, debug_threads, pid_of): New.
16566 (inferior_pid): Replace with macro.
16567 (struct inferior_linux_data): Remove.
16568 (get_stop_pc, add_process): New functions.
16569 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16570 Use add_process and add_thread.
16571 (linux_attach_lwp): New function, based on old linux_attach. Use
16572 add_process and add_thread. Set stop_expected for new threads.
16573 (linux_attach): New function.
16574 (linux_kill_one_process): New function.
16575 (linux_kill): Kill all LWPs.
16576 (linux_thread_alive): Use find_inferior_id.
16577 (check_removed_breakpoints, status_pending_p): New functions.
16578 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16579 Update. Use WNOHANG. Wait for cloned processes also. Update process
16580 struct for the found process.
16581 (linux_wait_for_event): New function.
16582 (linux_wait): Use it. Support LWPs.
16583 (send_sigstop, wait_for_sigstop, stop_all_processes)
16584 (linux_resume_one_process, linux_continue_one_process): New functions.
16585 (linux_resume): Support LWPs.
16586 (REGISTER_RAW_SIZE): Remove.
16587 (fetch_register): Use register_size instead. Call supply_register.
16588 (usr_store_inferior_registers): Likewise. Call collect_register.
16589 Fix recursive case.
16590 (regsets_fetch_inferior_registers): Improve error message.
16591 (regsets_store_inferior_registers): Add debugging.
16592 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16593 (unstopped_p, linux_signal_pid): New functions.
16594 (linux_target_ops): Add linux_signal_pid.
16595 (linux_init_signals): New function.
16596 (initialize_low): Call it. Initialize using_threads.
16597 * regcache.c (inferior_regcache_data): Add valid
16599 (get_regcache): Fetch registers lazily. Add fetch argument
16600 and update all callers.
16601 (regcache_invalidate_one, regcache_invalidate): New
16603 (new_register_cache): Renamed from create_register_cache.
16604 Return the new regcache.
16605 (free_register_cache): Change argument to a void *.
16606 (registers_to_string, registers_from_string): Call get_regcache
16607 with fetch flag set.
16608 (register_data): Make static. Pass fetch flag to get_regcache.
16609 (supply_register): Call get_regcache with fetch flag clear.
16610 (collect_register): Call get_regcache with fetch flag set.
16611 (collect_register_as_string): New function.
16612 * regcache.h: Update.
16613 * remote-utils.c (putpkt): Flush after debug output and use
16615 Handle input interrupts while waiting for an ACK.
16616 (input_interrupt): Use signal_pid method.
16617 (getpkt): Flush after debug output and use stderr.
16618 (outreg): Use collect_register_as_string.
16619 (new_thread_notify, dead_thread_notify): New functions.
16620 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16621 and general_thread.
16622 (look_up_one_symbol): Flush after debug output.
16623 * server.c (step_thread, server_waiting): New variables.
16624 (start_inferior): Don't use signal_pid. Update call to mywait.
16625 (attach_inferior): Update call to mywait.
16626 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16627 (main): Don't fetch/store registers explicitly. Use
16628 set_desired_inferior. Support proposed ``Hs'' packet. Update
16630 * server.h: Update.
16631 (struct inferior_list, struct_inferior_list_entry): New.
16632 * target.c (set_desired_inferior): New.
16633 (write_inferior_memory): Constify.
16634 (mywait): New function.
16635 * target.h: Update.
16636 (struct target_ops): New signal_pid method.
16637 (mywait): Removed macro, added prototype.
16639 * linux-low.h (regset_func): Removed.
16640 (regset_fill_func, regset_store_func): New.
16641 (enum regset_type): New.
16642 (struct regset_info): Add type field. Use new operation types.
16643 (struct linux_target_ops): stop_pc renamed to get_pc.
16644 Add decr_pc_after_break and breakpoint_at.
16645 (get_process, get_thread_proess, get_process_thread)
16646 (strut process_info, all_processes, linux_attach_lwp)
16647 (thread_db_init): New.
16649 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16650 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16651 (the_low_target): Add new members.
16652 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16653 (i386_store_fpxregset): Constify.
16654 (target_regsets): Add new kind identifier.
16655 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16656 (i386_set_pc): Add debugging.
16657 (i386_breakpoint_at): New function.
16658 (the_low_target): Add new members.
16659 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16660 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16661 (mips_breakpoint_at): New.
16662 (the_low_target): Add new members.
16663 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16664 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16665 (the_low_target): Add new members.
16666 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16667 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16668 (the_low_target): Add new members.
16669 * linux-x86-64-low.c (target_regsets): Add new kind
16672 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16674 From Martin Pool <mbp@samba.org>:
16675 * server.c (gdbserver_usage): New function.
16678 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16680 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16681 stop_at -> stop_pc.
16683 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16685 * Makefile.in: Remove obsolete code.
16687 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16689 * linux-low.c (regsets_fetch_inferior_registers),
16690 (regsets_store_inferior_registers): Removed cast to int from
16692 * regcache.h: Added declaration of struct inferior_info.
16694 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16696 * inferiors.c (struct inferior_info): Add regcache_data.
16697 (add_inferior): Call create_register_cache.
16698 (clear_inferiors): Call free_register_cache.
16699 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16700 * regcache.c (struct inferior_regcache_data): New.
16701 (registers): Remove.
16702 (get_regcache): New function.
16703 (create_register_cache, free_register_cache): New functions.
16704 (set_register_cache): Don't initialize the register cache here.
16705 (registers_to_string, registers_from_string, register_data): Call
16707 * regcache.h: Add prototypes.
16708 * server.h: Likewise.
16710 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16712 * mem-break.c: New file.
16713 * mem-break.h: New file.
16714 * Makefile.in: Add mem-break.o rule; update server.h
16716 * inferiors.c (struct inferior_info): Add target_data
16718 (clear_inferiors): Free target_data member if set.
16719 (inferior_target_data, set_inferior_target_data): New functions.
16720 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16721 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16722 * linux-low.c (linux_bp_reinsert): New variable.
16723 (struct inferior_linux_data): New.
16724 (linux_create_inferior): Use set_inferior_target_data.
16725 (linux_attach): Likewise. Call add_inferior.
16726 (linux_wait_for_one_inferior): New function.
16727 (linux_wait): Call it.
16728 (linux_write_memory): Add const.
16729 (initialize_low): Call set_breakpoint_data.
16730 * linux-low.h (struct linux_target_ops): Add breakpoint
16732 * server.c (attach_inferior): Remove extra add_inferior
16734 * server.h: Include mem-break.h. Update inferior.c
16736 * target.c (read_inferior_memory)
16737 (write_inferior_memory): New functions.
16738 * target.h (read_inferior_memory)
16739 (write_inferior_memory): Change macros to prototypes.
16740 (struct target_ops): Update comments. Add const to write_memory
16743 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16745 * linux-low.c (usr_store_inferior_registers): Support
16746 registers which are allowed to fail to store.
16747 * linux-low.h (linux_target_ops): Likewise.
16748 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16749 (ppc_cannot_store_register): FPSCR may not be storable.
16751 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16753 * server.h: Include <string.h> if HAVE_STRING_H.
16754 * ChangeLog: Correct paths in last ChangeLog entry.
16756 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16758 * linux-low.h: Remove obsolete prototypes.
16759 (struct linux_target_ops): New.
16760 (extern the_low_target): New.
16761 * linux-low.c (num_regs, regmap): Remove declarations.
16762 (register_addr): Use the_low_target explicitly.
16763 (fetch_register): Likewise.
16764 (usr_fetch_inferior_registers): Likewise.
16765 (usr_store_inferior_registers): Likewise.
16766 * linux-arm-low.c (num_regs): Remove.
16767 (arm_num_regs): Define.
16768 (arm_regmap): Renamed from regmap, made static.
16769 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16771 (arm_cannot_store_register): Renamed from cannot_store_register,
16773 (the_low_target): New.
16774 * linux-i386-low.c (num_regs): Remove.
16775 (i386_num_regs): Define.
16776 (i386_regmap): Renamed from regmap, made static.
16777 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16779 (i386_cannot_store_register): Renamed from cannot_store_register,
16781 (the_low_target): New.
16782 * linux-ia64-low.c (num_regs): Remove.
16783 (ia64_num_regs): Define.
16784 (ia64_regmap): Renamed from regmap, made static.
16785 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16787 (ia64_cannot_store_register): Renamed from cannot_store_register,
16789 (the_low_target): New.
16790 * linux-m68k-low.c (num_regs): Remove.
16791 (m68k_num_regs): Define.
16792 (m68k_regmap): Renamed from regmap, made static.
16793 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16795 (m68k_cannot_store_register): Renamed from cannot_store_register,
16797 (the_low_target): New.
16798 * linux-mips-low.c (num_regs): Remove.
16799 (mips_num_regs): Define.
16800 (mips_regmap): Renamed from regmap, made static.
16801 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16803 (mips_cannot_store_register): Renamed from cannot_store_register,
16805 (the_low_target): New.
16806 * linux-ppc-low.c (num_regs): Remove.
16807 (ppc_num_regs): Define.
16808 (ppc_regmap): Renamed from regmap, made static.
16809 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16811 (ppc_cannot_store_register): Renamed from cannot_store_register,
16813 (the_low_target): New.
16814 * linux-s390-low.c (num_regs): Remove.
16815 (s390_num_regs): Define.
16816 (s390_regmap): Renamed from regmap, made static.
16817 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16819 (s390_cannot_store_register): Renamed from cannot_store_register,
16821 (the_low_target): New.
16822 * linux-sh-low.c (num_regs): Remove.
16823 (sh_num_regs): Define.
16824 (sh_regmap): Renamed from regmap, made static.
16825 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16827 (sh_cannot_store_register): Renamed from cannot_store_register,
16829 (the_low_target): New.
16830 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16831 (the_low_target): New.
16833 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16835 * Makefile.in: Add stamp-h target.
16836 * configure.in: Create stamp-h.
16837 * configure: Regenerated.
16839 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16841 * inferiors.c: New file.
16842 * target.c: New file.
16843 * target.h: New file.
16844 * Makefile.in: Add target.o and inferiors.o. Update
16846 * linux-low.c (inferior_pid): New static variable,
16847 moved from server.c.
16848 (linux_create_inferior): Renamed from create_inferior.
16849 Call add_inferior. Return 0 on success instead of a PID.
16850 (linux_attach): Renamed from myattach.
16851 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16852 (linux_thread_alive): Renamed from mythread_alive.
16853 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16855 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16856 (regsets_store_inferior_registers): Correct error message.
16857 Add missing ``return 0''.
16858 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16859 (linux_store_registers): Renamed from store_inferior_registers.
16860 (linux_read_memory): Renamed from read_inferior_memory.
16861 (linux_write_memory): Renamed from write_inferior_memory.
16862 (linux_target_ops): New structure.
16863 (initialize_low): Call set_target_ops ().
16864 * remote-utils.c (unhexify): New function.
16865 (hexify): New function.
16866 (input_interrupt): Send signals to ``signal_pid''.
16867 * server.c (inferior_pid): Remove.
16868 (start_inferior): Update create_inferior call.
16869 (attach_inferior): Call add_inferior.
16870 (handle_query): New function.
16871 (main): Call handle_query for `q' packets.
16872 * server.h: Include "target.h". Remove obsolete prototypes.
16873 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16875 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16877 * Makefile.in: Add WARN_CFLAGS. Update configury
16879 * configure.in: Check for <string.h>
16880 * configure: Regenerate.
16881 * config.in: Regenerate.
16882 * gdbreplay.c: Include needed system headers.
16883 (remote_open): Remove strchr prototype.
16884 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16885 * regcache.c (supply_register): Change buf argument to const void *.
16886 (supply_register_by_name): Likewise.
16887 (collect_register): Change buf argument to void *.
16888 (collect_register_by_name): Likewise.
16889 * regcache.h: Add missing prototypes.
16890 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16891 * server.c (handle_query): New function.
16892 (attached): New static variable, moved out of main.
16893 (main): Quiet longjmp clobber warnings.
16894 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16895 * utils.c (error): Remove NORETURN.