1 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3 * configure.srv (ipa_ppc_linux_regobj): Add
4 powerpc-isa207-htm-vsx32l-ipa.o and
5 powerpc-isa207-htm-vsx64l-ipa.o.
6 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
7 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
8 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
9 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
10 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
11 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
12 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
13 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
14 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
15 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
16 (init_registers_powerpc_isa207_htm_vsx32l)
17 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
18 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
19 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
20 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
21 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
22 (ppc_store_tm_ctarregset): New functions.
23 (ppc_regsets): Add entries for HTM regsets.
24 (ppc_arch_setup): Set htm in features struct when needed. Set
25 sizes for the HTM regsets.
26 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
27 (initialize_low_arch): Call
28 init_registers_powerpc_isa207_htm_vsx32l and
29 init_registers_powerpc_isa207_htm_vsx64l.
30 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
31 PPC_TDESC_ISA207_HTM_VSX.
32 (initialize_low_tracepoint): Call
33 init_registers_powerpc_isa207_htm_vsx32l and
34 init_registers_powerpc_isa207_htm_vsx64l.
36 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
38 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
39 rs6000/power-linux-pmu.xml to srv_xmlfiles.
40 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
41 (ppc_store_pmuregset): New functions.
42 (ppc_regsets): Add entries for ebb and pmu regsets.
43 (ppc_arch_setup): Set isa207 in features struct if the ebb and
44 pmu regsets are available. Set sizes for these regsets.
46 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
48 * configure.srv (ipa_ppc_linux_regobj): Add
49 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
50 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
51 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
52 rs6000/powerpc-isa207-vsx32l.xml, and
53 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
54 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
55 <PPC_TDESC_ISA207_VSX>: New enum value.
56 (init_registers_powerpc_isa207_vsx32l): Declare.
57 (init_registers_powerpc_isa207_vsx64l): Declare.
58 * linux-ppc-low.c (ppc_fill_tarregset): New function.
59 (ppc_store_tarregset): New function.
60 (ppc_regsets): Add entry for the TAR regset.
61 (ppc_arch_setup): Set isa207 in features struct when needed. Set
62 size for the TAR regsets.
63 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
64 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
65 and init_registers_powerpc_isa207_vsx64l.
66 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
67 (initialize_low_tracepoint): Call
68 init_registers_powerpc_isa207_vsx32l and
69 init_registers_powerpc_isa207_vsx64l.
71 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
72 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
74 * configure.srv (ipa_ppc_linux_regobj): Add
75 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
76 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
77 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
78 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
79 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
80 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
81 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
82 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
83 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
84 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
85 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
86 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
87 (ppc_hwcap): Add comment.
88 (ppc_hwcap2): New global.
89 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
90 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
91 (ppc_regsets): Add entries for the DSCR and PPR regsets.
92 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
93 when needed. Set sizes for the the DSCR and PPR regsets.
94 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
95 (initialize_low_arch): Call
96 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
97 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
98 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
99 PPC_TDESC_ISA205_PPR_DSCR_VSX.
100 (initialize_low_tracepoint): Call
101 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
102 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
104 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
106 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
108 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
109 Simon Marchi <simark@simark.ca>
111 * acinclude.m4: Include "../selftest.m4".
112 * configure: Regenerate.
113 * configure.ac: Use "GDB_AC_SELFTEST".
114 * configure.srv: Use "$enable_unittests" instead of
115 "$development" when checking whether unit tests have been
117 * server.c (captured_main): Update message informing that
118 selftests have been disabled.
120 2018-10-04 Tom Tromey <tom@tromey.com>
122 * configure: Rebuild.
124 2018-10-04 Tom Tromey <tom@tromey.com>
126 * server.c (handle_status): Rename inner "thread".
127 (process_serial_event): Declare "res" in 'm' case.
128 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
129 (iterate_over_lwps): Rename inner "thread".
130 (linux_qxfer_libraries_svr4): Rename inner "len".
131 * gdbthread.h (find_thread_in_random): Rename inner "thread".
133 2018-10-01 Gary Benson <gbenson@redhat.com>
135 * gdb_proc_service.h: Moved common code to
136 common/gdb_proc_service.h.
138 2018-10-01 Gary Benson <gbenson@redhat.com>
140 * gdb_proc_service.h: Synchronize comments and whitespace with
141 GDB's version of this file.
143 2018-09-25 Tom Tromey <tom@tromey.com>
145 * configure: Rebuild.
146 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
148 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
150 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
151 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
152 ($(IPA_LIB)): Sort IPA_OBJS.
154 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
156 * Makefile.in: Remove references to $(ADD_DEPS).
158 2018-09-16 Tom Tromey <tom@tromey.com>
160 * remote-utils.c (remote_open): Use GNU style for metasyntactic
162 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
165 2018-09-05 Tom Tromey <tom@tromey.com>
167 * configure: Rebuild.
169 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
172 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
174 2018-08-27 Tom Tromey <tom@tromey.com>
177 * configure: Rebuild.
179 2018-08-27 Tom Tromey <tom@tromey.com>
181 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
182 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
183 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
184 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
185 (s390x_emit_stack_adjust): Add casts to unsigned char.
187 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
191 * server.h (struct client_state) <disable_randomization>:
194 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
196 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
198 (mips_supply_ptrace_register): Likewise.
200 2018-07-22 Tom Tromey <tom@tromey.com>
202 * configure: Rebuild.
204 2018-07-22 Tom Tromey <tom@tromey.com>
206 * win32-low.c (win32_create_inferior): Remove unused variables.
207 * gdbreplay.c (remote_open): Remove unused variable.
208 * remote-utils.c (remote_prepare): Remove unused variable.
209 * x86-tdesc.h (X86_TDESC_H): Define.
210 (amd64_expedite_regs): Define conditionally.
211 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
212 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
213 * remote-utils.c (readchar): Remove unused variable.
215 2018-07-13 Pedro Alves <palves@redhat.com>
217 * linux-low.c (linux_kill): Change parameter to process_info
218 pointer instead of pid. Adjust.
219 * lynx-low.c (lynx_kill): Likewise.
220 * nto-low.c (nto_kill): Likewise.
221 * spu-low.c (spu_kill): Likewise.
222 * win32-low.c (win32_kill): Likewise.
223 * server.c (handle_v_kill, kill_inferior_callback)
224 (detach_or_kill_for_exit): Adjust.
225 * target.c (kill_inferior): Change parameter to process_info
226 pointer instead of pid. Adjust.
227 * target.h (struct target_ops) <kill>: Change parameter to
228 process_info pointer instead of pid. Adjust all implementations
230 (kill_inferior): Likewise.
232 2018-07-13 Pedro Alves <palves@redhat.com>
234 * linux-low.c (linux_detach, linux_join): Change parameter to
235 process_info pointer instead of pid. Adjust.
236 * lynx-low.c (lynx_detach, lynx_join): Likewise.
237 * nto-low.c (nto_detach): Likewise.
238 * spu-low.c (spu_detach, spu_join): Likewise.
239 * win32-low.c (win32_detach, win32_join): Likewise.
240 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
241 * target.h (struct target_ops) <detach, join>: Change parameter to
242 process_info pointer instead of pid. Adjust all implementations
244 (detach_inferior, join_inferior): Rename 'pid' parameter to
247 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
248 Jan Kratochvil <jan.kratochvil@redhat.com>
249 Paul Fertser <fercerpav@gmail.com>
250 Tsutomu Seki <sekiriki@gmail.com>
252 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
253 (OBS): Add 'common/netstuff.o'.
254 (GDBREPLAY_OBS): Likewise.
255 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
256 (remote_open): Implement support for IPv6
258 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
260 (handle_accept_event): Accept connections from IPv6 sources.
261 (remote_prepare): Handle IPv6-style hostnames; implement
262 support for IPv6 connections.
263 (remote_open): Implement support for printing connections from
266 2018-07-11 Pedro Alves <palves@redhat.com>
269 * mem-break.c (any_persistent_commands): Add process_info
270 parameter and use it instead of relying on the current process.
271 Change return type to bool.
272 * mem-break.h (any_persistent_commands): Add process_info
273 parameter and change return type to bool.
274 * server.c (handle_detach): Remove require_running_or_return call.
275 Look up the process_info for the process we're about to detach.
276 If not found, return back error to GDB. Adjust
277 any_persistent_commands call to pass down a process pointer.
279 2018-07-11 Pedro Alves <palves@redhat.com>
281 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
282 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
283 instead of collect_register_by_name.
284 * regcache.c (regcache_raw_get_unsigned_by_name): New.
285 * regcache.h (regcache_raw_get_unsigned_by_name): New.
287 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
288 Pedro Alves <palves@redhat.com>
290 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
292 2018-07-03 Tom Tromey <tom@tromey.com>
294 * linux-low.c: Update.
295 * lynx-low.c: Update.
296 * mem-break.c: Update.
298 * remote-utils.c: Update.
302 * win32-low.c: Update.
304 2018-07-03 Tom Tromey <tom@tromey.com>
308 2018-07-03 Tom Tromey <tom@tromey.com>
310 * linux-low.c: Update.
312 2018-07-03 Tom Tromey <tom@tromey.com>
316 2018-07-03 Tom Tromey <tom@tromey.com>
318 * linux-low.c: Update.
319 * linux-mips-low.c: Update.
320 * lynx-low.c: Update.
322 * remote-utils.c: Update.
326 * thread-db.c: Update.
328 2018-07-03 Tom Tromey <tom@tromey.com>
330 * linux-low.c: Update.
331 * linux-mips-low.c: Update.
332 * lynx-low.c: Update.
333 * mem-break.c: Update.
335 * remote-utils.c: Update.
339 * tracepoint.c: Update.
341 2018-07-03 Tom Tromey <tom@tromey.com>
343 * linux-low.c: Update.
344 * linux-ppc-low.c: Update.
345 * linux-x86-low.c: Update.
346 * proc-service.c: Update.
349 * thread-db.c: Update.
350 * win32-low.c: Update.
352 2018-07-03 Tom Tromey <tom@tromey.com>
354 * linux-low.c: Update.
355 * lynx-low.c: Update.
357 * remote-utils.c: Update.
359 * thread-db.c: Update.
360 * win32-low.c: Update.
362 2018-06-29 Joel Brobecker <brobecker@adacore.com>
364 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
365 parameter in call to 'amd64_create_target_description'.
367 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
369 * x86-tdesc.h: Remove executable permission flag.
371 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
373 * configure.ac: Remove AC_PREREQ, add missing quoting.
374 * configure: Re-generate.
375 * config.in: Re-generate.
376 * aclocal.m4: Re-generate.
378 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
380 * tracepoint.h (current_traceframe): Remove declaration.
382 2018-06-18 Alan Hayward <alan.hayward@arm.com>
384 * linux-aarch64-low.c (is_sve_tdesc): New function.
385 (aarch64_sve_regs_copy_to_regcache): Likewise.
386 (aarch64_sve_regs_copy_from_regcache): Likewise.
387 (aarch64_regs_info): Add SVE checks.
388 (initialize_low_arch): Initialize SVE.
390 2018-06-18 Alan Hayward <alan.hayward@arm.com>
392 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
394 2018-06-11 Alan Hayward <alan.hayward@arm.com>
396 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
397 (initialize_low_tracepoint): Likewise
398 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
399 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
401 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
403 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
405 2018-06-11 Alan Hayward <alan.hayward@arm.com>
407 * server.h (PBUFSIZ): Increase size
409 2018-06-11 Alan Hayward <alan.hayward@arm.com>
411 * regcache.c (regcache::raw_compare): New function.
412 * regcache.h (regcache::raw_compare): New declaration.
414 2018-06-11 Alan Hayward <alan.hayward@arm.com>
416 * regcache.c (new_register_cache): Use new.
417 (free_register_cache): Use delete.
418 (register_data): Use const.
419 (supply_register): Move body inside regcache.
420 (regcache::raw_supply): New override function.
421 (collect_register): Move body inside regcache.
422 (regcache::raw_collect): New override function.
423 (regcache::get_register_status): New override function.
424 * regcache.h (struct regcache): Inherit from reg_buffer_common.
426 2018-06-09 Tom Tromey <tom@tromey.com>
428 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
430 (event_queue): Use std::queue.
431 (gdb_event_xfree): Remove.
432 (initialize_event_loop, process_event, wait_for_event): Update.
434 2018-06-08 Stan Cox <scox@redhat.com>
436 * win32-low.c (win32_create_inferior): last_ptid and last_status
437 moved to client_state.
439 2018-06-08 Pedro Alves <palves@redhat.com>
441 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
442 common/common-exceptions.o, common/common-utils.o,
443 common/errors.o, common/print-utils.o and utils.o.
444 * gdbreplay.c: Include "common-defs.h" instead of the two
445 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
446 string.h or alloca.h.
447 (perror_with_name): Delete.
448 (remote_open): Use xstrdup instead of strdup.
449 (main): Rename to ...
450 (captured_main): ... this.
453 2018-06-08 Tom Tromey <tom@tromey.com>
455 * linux-low.c (linux_low_read_btrace): Update.
457 2018-06-04 Stan Cox <scox@redhat.com>
459 * server.h (struct client_state): New.
460 * server.c (cont_thread, general_thread, multi_process)
461 (report_fork_events, report_vfork_events, report_exec_events)
462 (report_thread_events, swbreak_feature, hwbreak_feature)
463 (vCont_supported, disable_randomization, pass_signals)
464 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
465 Moved to client_state.
466 * remote-utils.c (remote_debug, noack_mode)
467 (transport_is_reliable): Moved to client_state.
468 * tracepoint.c (current_traceframe): Moved to client_state.
471 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
472 linux-low.c, remote-utils.h, target.c: Use client_state.
474 2018-05-31 Alan Hayward <alan.hayward@arm.com>
476 * configure.srv: Add new c/h file.
478 2018-05-31 Alan Hayward <alan.hayward@arm.com>
480 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
483 2018-05-25 Maciej W. Rozycki <macro@mips.com>
485 * gdb.arch/mips-fpregset-core.exp: New test.
486 * gdb.arch/mips-fpregset-core.c: New test source.
488 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
491 * hostio.c (require_int): Do not report overflow for integers
492 between 0xfffffff and 0x7fffffff.
494 2018-05-22 Maciej W. Rozycki <macro@mips.com>
496 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
497 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
498 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
500 (the_low_target): Wire them.
502 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
504 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
505 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
506 mode. Call collect_register_by_name with vscr using
507 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
508 (ppc_store_vrregset): Add and set vscr_offset variable as in
509 ppc_fill_vrregset. Call supply_register_by_name with vscr using
512 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
514 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
515 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
516 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
518 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
520 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
521 (ppc_store_vsxregset): Likewise.
522 (ppc_fill_vrregset): Likewise.
523 (ppc_store_vrregset): Likewise.
524 (ppc_fill_evrregset): Likewise.
525 (ppc_store_evrregset): Likewise.
526 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
527 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
530 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
532 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
533 wordsize of the inferior. Call ppc_linux_target_wordsize.
535 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
537 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
538 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
539 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
540 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
541 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
542 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
543 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
544 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
545 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
546 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
547 (tdesc_powerpc_e500l): Remove.
548 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
549 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
550 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
551 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
553 (ppc_arch_setup): Remove target description matching code. Fill a
554 ppc_linux_features struct and call ppc_linux_match_description
557 2018-05-22 Maciej W. Rozycki <macro@mips.com>
559 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
560 width of the requested register exceeds the width of the
562 (mips_cannot_store_register): Likewise.
564 2018-05-21 Maciej W. Rozycki <macro@mips.com>
566 * linux-mips-low.c (mips_fetch_register): New function. Update
568 (mips_store_gregset): Supply 0 rather than $restart for $zero.
569 (the_low_target): Wire `mips_fetch_register'.
571 2018-05-10 Joel Brobecker <brobecker@adacore.com>
573 * lynx-i386-low.c (LYNXOS_178): New macro.
574 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
575 the layout on LynxOS-178.
576 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
577 handle floating point registers that are not supported by
580 2018-05-10 Tom Tromey <tom@tromey.com>
582 * configure: Rebuild.
584 2018-05-10 Joel Brobecker <brobecker@adacore.com>
587 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
588 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
589 Use it to set the expedite_regs field in the given tdesc.
590 * x86-tdesc.h: New file.
591 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
592 Adjust following the addition of the new expedite_regs parameter
594 * linux-tic6x-low.c (tic6x_read_description): Likewise.
595 * linux-x86-tdesc.c: #include "x86-tdesc.h".
596 (i386_linux_read_description, amd64_linux_read_description):
597 Adjust following the addition of the new expedite_regs parameter
599 * lynx-i386-low.c: #include "x86-tdesc.h".
600 (lynx_i386_arch_setup): Adjust following the addition of the new
601 expedite_regs parameter to init_target_desc.
602 * nto-x86-low.c: #include "x86-tdesc.h".
603 (nto_x86_arch_setup): Adjust following the addition of the new
604 expedite_regs parameter to init_target_desc.
605 * win32-i386-low.c: #include "x86-tdesc.h".
606 (i386_arch_setup): Adjust following the addition of the new
607 expedite_regs parameter to init_target_desc.
609 2018-05-10 Joel Brobecker <brobecker@adacore.com>
612 * win32-low.c (win32_create_inferior): Add call to my_wait
613 setting last_status global.
615 2018-05-10 Joel Brobecker <brobecker@adacore.com>
618 * win32-low.c (create_process): Only call gdb_tilde_expand if
619 inferior_cwd is not NULL.
621 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
623 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
624 registers to the cache if their values have changed.
625 (i387_xsave_to_cache): Provide default values for x87 control
626 registers when these features are available, but disabled.
627 * regcache.c (supply_register_by_name_zeroed): New function.
628 * regcache.h (supply_register_by_name_zeroed): Declare new
631 2018-05-07 Tom Tromey <tom@tromey.com>
633 * configure: Rebuild.
635 2018-05-04 Tom Tromey <tom@tromey.com>
637 * configure: Rebuild.
639 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
640 Pedro Alves <palves@redhat.com>
642 * linux-aarch64-low.c (aarch64_stopped_data_address):
645 2018-04-27 Tom Tromey <tom@tromey.com>
647 * configure: Rebuild.
649 2018-04-23 Tom Tromey <tom@tromey.com>
651 * configure: Rebuild.
653 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
655 * Makefile.in (depcomp): Add "..".
656 (all_deps_files): New and use it.
658 2018-04-18 Alan Hayward <alan.hayward@arm.com>
660 * configure.srv (aarch64*-*-linux*): Don't include xml.
661 (i[34567]86-*-cygwin*): Likewise.
662 (i[34567]86-*-linux*): Likewise.
663 (i[34567]86-*-lynxos*): Likewise.
664 (i[34567]86-*-mingw32ce*): Likewise.
665 (i[34567]86-*-mingw*): Likewise.
666 (i[34567]86-*-nto*): Likewise.
667 (tic6x-*-uclinux): Likewise.
668 (x86_64-*-linux*): Likewise.
669 (x86_64-*-mingw*): Likewise.
670 (x86_64-*-cygwin*): Likewise.
672 2018-04-18 Alan Hayward <alan.hayward@arm.com>
674 * tdesc.c: Remove xml parameter.
676 2018-04-18 Alan Hayward <alan.hayward@arm.com>
678 * server.c (get_features_xml): Remove cast.
679 * tdesc.c (void target_desc::accept): Fill in function.
680 (tdesc_get_features_xml): Remove old xml creation.
681 (print_xml_feature::visit_pre): Add xml vistor.
682 * tdesc.h (struct target_desc): Make xmltarget mutable.
683 (tdesc_get_features_xml): Remove declaration.
685 2018-04-18 Alan Hayward <alan.hayward@arm.com>
687 * tdesc.c (tdesc_architecture_name): Add new function.
688 (tdesc_osabi_name): Likewise.
689 (tdesc_get_features_xml): Use new functions.
691 2018-04-18 Alan Hayward <alan.hayward@arm.com>
693 * tdesc.c (tdesc_create_flags): Remove.
694 (tdesc_add_flag): Likewise.
695 (tdesc_named_type): Likewise.
696 (tdesc_create_union): Likewise.
697 (tdesc_create_struct): Likewise.
698 (tdesc_create_vector): Likewise.
699 (tdesc_add_bitfield): Likewise.
700 (tdesc_add_field): Likewise.
701 (tdesc_set_struct_size): Likewise.
703 2018-04-18 Alan Hayward <alan.hayward@arm.com>
705 * tdesc.c (~target_desc): Remove implictly deleted items.
706 (init_target_desc): Iterate all features.
707 (tdesc_get_features_xml): Use vector.
708 (tdesc_create_feature): Create feature.
709 * tdesc.h (tdesc_feature) Remove
710 (target_desc): Add features.
712 2018-04-18 Alan Hayward <alan.hayward@arm.com>
714 * Makefile.in: Add common/tdesc.c
715 * tdesc.c (init_target_desc): init all reg_defs from register
717 (tdesc_create_reg): Create tdesc_reg.
718 * tdesc.h (tdesc_feature): Add register vector.
720 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
722 * tdesc.h (struct target_desc) <features>: Change type to
723 std::vector<std::string>.
724 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
726 (tdesc_get_features_xml): Likewise.
727 (tdesc_create_feature): Likewise.
729 2018-03-26 Alan Hayward <alan.hayward@arm.com>
731 * regcache.c (find_register_by_number): Return a ref.
732 (find_regno): Use references.
733 (register_size): Likewise.
734 (register_data): Likewise.
735 * tdesc.c (target_desc::~target_desc): Remove free calls.
736 (target_desc::operator==): Use std::vector compare.
737 (init_target_desc): Use reference.
738 (tdesc_create_reg): Use reg constructors.
739 * tdesc.h (struct target_desc): Replace pointer with object.
741 2018-03-23 Alan Hayward <alan.hayward@arm.com>
743 * regcache.c (find_register_by_number): Make static.
744 (find_regno): Use find_register_by_number
745 * regcache.h (struct reg): Remove declaration.
747 2018-03-23 Alan Hayward <alan.hayward@arm.com>
749 * tdesc.c (target_desc::~target_desc): Move to here.
750 (target_desc::operator==): Likewise.
751 * tdesc.h (target_desc::~target_desc): Move from here.
752 (target_desc::operator==): Likewise.
754 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
756 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
758 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
760 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
762 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
763 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
764 and init_registers_s390_gs_linux64.
766 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
768 * linux-s390-low.c (s390_fill_gs): Remove function.
769 (s390_fill_gsbc): Remove function.
770 (s390_regsets): Set fill functions for the guarded storage regsets
773 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
775 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
776 the word size. Add comment.
777 (s390_get_wordsize): New function.
778 (s390_arch_setup): No longer select a temporary tdesc to fetch the
779 pswm with it. Instead, use s390_get_wordsize to determine the
780 word size first and derive the correct tdesc from that directly.
782 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
784 * Makefile.in: Include silent-rules.mk.
785 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
786 (COMPILE): Add ECHO_CXX.
787 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
788 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
789 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
790 (version-generated.c): Add ECHO_GEN.
791 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
792 (IPAGENT_COMPILE): Add ECHO_CXX.
793 (%-generated.c): Add ECHO_REGDAT.
795 2018-03-14 Tom Tromey <tom@tromey.com>
798 * ax.c (ax_printf): Special case for NULL.
800 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
802 * linux-low.c (linux_qxfer_libraries_svr4): Use
803 xml_escape_text_append.
805 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
807 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
809 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
811 * server.c (handle_general_set): Remove unnecessary xstrdup.
813 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
815 * server.c (parse_debug_format_options): Adjust to
816 delim_string_to_char_ptr_vec changes.
817 * thread-db.c (thread_db_load_search): Adjust to
818 dirnames_to_char_ptr_vec changes.
820 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
822 * target.h (target_enable_btrace, target_disable_btrace)
823 (target_read_btrace, target_read_btrace_conf): Turn macro into
824 inline function. Throw error if target method is not defined.
825 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
826 check for btrace target method. Be prepared to handle exceptions
827 from btrace target methods.
829 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
831 * server.c (captured_main): Change order of error message printed
832 when the current working directory cannot be found.
834 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
836 * server.c: Include "filenames.h" and "pathstuff.h".
837 (program_name): Delete variable.
838 (program_path): New anonymous class.
839 (get_exec_wrapper): Use "program_path" instead of
841 (handle_v_run): Likewise.
842 (captured_main): Likewise.
843 (process_serial_event): Likewise.
845 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
847 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
848 (OBJS): Add "pathstuff.o".
849 * server.c (current_directory): New global variable.
850 (captured_main): Initialize "current_directory".
852 2018-02-26 Alan Hayward <alan.hayward@arm.com>
854 * tdesc.c: Use common/tdesc.h.
857 2018-02-20 Alan Hayward <alan.hayward@arm.com>
858 Simon Marchi <simon.marchi@ericsson.com>
860 * Makefile.in: Switch order of make rules.
862 2018-02-19 Alan Hayward <alan.hayward@arm.com>
864 * Makefile.in: Add common directory in build.
865 * configure.ac: Add common reference.
866 * configure: Regenerate.
868 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
870 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
871 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
872 * spu-low.c (spu_target_ops): Likewise.
873 * win32-low.c (win32_target_ops): Likewise.
874 * server.c (supported_btrace_packets): Report packets unconditionally.
875 * target.h (target_ops) <supports_btrace>: Remove.
876 (target_supports_btrace): Remove.
878 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
880 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
881 (handle_btrace_disable): Change return type to void. Use exceptions
883 (handle_btrace_general_set): Catch exception and copy message to
886 2018-02-08 Tom Tromey <tom@tromey.com>
888 * linux-low.c (install_software_single_step_breakpoints): Use
890 * inferiors.c (make_cleanup_restore_current_thread): Remove.
891 (do_restore_current_thread_cleanup): Remove.
892 * gdbthread.h (make_cleanup_restore_current_thread): Don't
895 2018-02-08 Tom Tromey <tom@tromey.com>
897 * mem-break.c (set_raw_breakpoint_at): Use
898 gdb::unique_xmalloc_ptr.
900 2018-01-30 Pedro Alves <palves@redhat.com>
903 * target.c (target_terminal::terminal_state): Rename to ...
904 (target_terminal::m_terminal_state): ... this.
906 2018-01-19 James Clarke <jrtc27@jrtc27.com>
908 * linux-low.c (handle_extended_wait): Surround call to
909 thread_db_notice_clone with #ifdef USE_THREAD_DB.
911 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
913 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
914 linux_ptrace_attach_fail_reason_string now returning an
916 (linux_attach): Likewise.
917 * thread-db.c (attach_thread): Likewise.
919 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
922 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
923 checking for fs_base/gs_base fields in struct user_regs_struct.
924 * configure: Regenerate.
926 2018-01-16 Yao Qi <yao.qi@linaro.org>
929 * linux-low.c (fetch_register): Call supply_register instead of
932 2018-01-08 Yao Qi <yao.qi@linaro.org>
933 Simon Marchi <simon.marchi@ericsson.com>
935 * Makefile.in (OBS): Remove selftest.o.
936 * configure.ac: Set srv_selftest_objs if $development is true.
937 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
938 * configure: Re-generated.
939 * server.c (captured_main): Wrap variable selftest_filter with
942 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
944 * server.c (parse_debug_format_options): Return std::string.
945 (handle_monitor_command, captured_main): Adjust.
947 2018-01-05 Pedro Alves <palves@redhat.com>
950 * server.c (captured_main): Pass quiet=false to
951 save_original_signals_state.
953 2018-01-01 Joel Brobecker <brobecker@adacore.com>
955 * gdbreplay.c (gdbreplay_version): Update copyright year in
957 * server.c (gdbserver_version): Likewise.
959 2017-12-08 Tom Tromey <tom@tromey.com>
961 * ax.c (ax_printf): Update.
963 2017-12-07 Yao Qi <yao.qi@linaro.org>
965 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
966 aarch64_linux_read_description.
967 * linux-amd64-ipa.c (idx2mask): New array.
968 (get_ipa_tdesc): Move idx2mask out.
969 (initialize_low_tracepoint): Initialize target descriptions.
970 * linux-i386-ipa.c (idx2mask): New array.
971 (get_ipa_tdesc): Move idx2mask out.
972 (initialize_low_tracepoint): Initialize target descriptions.
974 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
976 * tdesc.c (struct tdesc_type): Change return type.
977 (tdesc_add_flag): Change parameter type.
978 (tdesc_add_bitfield): Likewise.
979 (tdesc_add_field): Likewise.
980 (tdesc_set_struct_size): Likewise.
982 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
984 * regcache.c (registers_to_string): Remove unused variable.
986 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
988 * inferiors.c (for_each_inferior_with_data): Remove.
989 * inferiors.h (for_each_inferior_with_data): Remove.
990 * server.c (handle_qxfer_threads_worker): Change parameter type.
991 (handle_qxfer_threads_proper): Use for_each_thread.
993 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
995 * inferiors.c (for_each_inferior): Remove.
996 (clear_inferiors): Use for_each_thread.
997 * inferiors.h (for_each_inferior): Remove.
998 * linux-low.c (linux_wait_for_event_filtered): Use
1000 (linux_stabilize_threads): Likewise.
1001 * regcache.c (regcache_release): Likewise.
1002 * server.c (gdb_wants_all_threads_stopped): Likewise.
1003 (clear_pending_status_callback): Remove.
1004 (handle_status): Use for_each_thread.
1005 (captured_main): Likewise.
1006 * win32-low.c (child_init_thread_list): Likewise.
1007 (win32_clear_inferiors): Likewise.
1008 (fake_breakpoint_event): Likewise.
1010 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1012 * inferiors.h (find_inferior): Remove.
1013 * inferiors.c (find_inferior): Remove.
1015 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1017 * linux-low.c (resume_status_pending_p): Update comment.
1018 (need_step_over_p): Update comment.
1020 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1022 * linux-low.c (proceed_one_lwp): Return void, change parameter
1024 (unsuspend_and_proceed_one_lwp): Likewise.
1025 (proceed_all_lwps): Use for_each_thread.
1026 (unstop_all_lwps): Likewise.
1028 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1030 * linux-low.c (linux_resume_one_thread): Return void, take
1032 (linux_resume): Use for_each_thread.
1034 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1036 * linux-low.c (send_sigstop_callback): Return void, change
1037 parameter type. Rename to...
1038 (send_sigstop): ... this.
1039 (suspend_and_send_sigstop_callback): Return void, change parameter
1041 (suspend_and_send_sigstop): ... this.
1042 (stop_all_lwps): Use for_each_thread.
1044 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1046 * linux-low.c (lwp_running): Return bool, remove unused
1048 (linux_stabilize_threads): Use find_thread.
1050 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1052 * linux-low.c (select_singlestep_lwp_callback): Remove.
1053 (count_events_callback): Remove.
1054 (select_event_lwp_callback): Remove.
1055 (select_event_lwp): Use find_thread/for_each_thread.
1057 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1059 * linux-low.c (not_stopped_callback): Return bool, take filter
1061 (linux_wait_for_event_filtered): Use find_thread.
1062 (linux_wait_1): Likewise.
1064 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1066 * linux-low.c (same_lwp): Remove.
1067 (find_lwp_pid): Use find_thread.
1069 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1071 * linux-low.c (delete_lwp_callback): Remove.
1072 (linux_mourn): Use for_each_thread.
1074 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1076 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1077 args parameter, don't check for pid.
1078 (linux_detach): Use for_each_thread.
1080 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1082 * linux-low.c (struct counter): Remove.
1083 (second_thread_of_pid_p): Remove.
1084 (last_thread_of_process_p): Use find_thread.
1086 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1088 * inferiors.c (find_inferior_in_random): Remove.
1089 * inferiors.h (find_inferior_in_random): Remove.
1090 * linux-low.c (status_pending_p_callback): Return bool, accept
1091 parameter ptid directly.
1092 (linux_wait_for_event_filtered): Use find_thread_in_random.
1093 (linux_wait_1): Likewise.
1095 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1097 * inferiors.c (find_inferior_id): Remove.
1098 (find_thread_ptid): Move implemention from find_inferior_id to
1100 * inferiors.h (find_inferior_id): Remove.
1101 * server.c (handle_status): Use find_thread_ptid.
1102 (process_serial_event): Likewise.
1103 * thread-db.c (find_one_thread): Likewise.
1104 (thread_db_thread_handle): Likewise.
1105 * win32-low.c (thread_rec): Likewise.
1106 (child_delete_thread): Likewise.
1107 (win32_thread_alive): Likewise.
1108 (get_child_debug_event): Likewise.
1110 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1112 * linux-mips-low.c (update_watch_registers_callback): Return
1113 void, remove pid_p parameter, don't check for pid.
1114 (mips_insert_point, mips_remove_point): Use for_each_thread.
1116 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1118 * lynx.low (lynx_delete_thread_callback): Remove.
1119 (lynx_mourn): Use for_each_thread.
1121 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1123 * regcache.c (regcache_invalidate_one): Remove.
1124 (regcache_invalidate_pid): use for_each_thread.
1126 2017-11-26 Tom Tromey <tom@tromey.com>
1128 * linux-low.c (linux_create_inferior): Update.
1130 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1132 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1134 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1136 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1137 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1138 * linux-aarch64-tdesc-selftest.c: New file.
1139 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1141 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1143 * configure.srv: Add new file.
1144 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1145 * linux-aarch64-tdesc-selftest.c: New file.
1146 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1148 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1150 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1151 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1152 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1154 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1156 * configure.srv: Add new files.
1157 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1158 aarch64_linux_read_description.
1159 * linux-aarch64-low.c (aarch64_linux_read_description):
1160 Merge with aarch64_arch_setup.
1161 (aarch64_arch_setup): Call aarch64_linux_read_description.
1162 * linux-aarch64-tdesc.c: New file.
1163 * linux-aarch64-tdesc.h: New file.
1165 2017-11-24 Yao Qi <yao.qi@linaro.org>
1167 * configure.srv: Set $srv_regobj for tic6x-linux.
1168 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1169 (tic6x_read_description): Move some code to tic6x_arch_setup.
1170 (tic6x_tdesc_test): New function.
1171 (initialize_low_arch): Call selftests::register_test.
1173 2017-11-22 Yao Qi <yao.qi@linaro.org>
1175 * remote-utils.c (prepare_resume_reply): Use memcpy.
1177 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1179 * linux-low.c (kill_one_lwp_callback): Return void, take
1180 argument directly, don't filter on pid.
1181 (linux_kill): Use for_each_thread.
1183 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1185 * linux-low.c (need_step_over_p): Return bool, remove dummy
1187 (linux_resume, proceed_all_lwps): Use find_thread.
1189 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1191 * linux-low.c (resume_status_pending_p): Return bool, remove
1193 (linux_resume): Use find_thread.
1195 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1197 * linux-low.c (struct thread_resume_array): Remove.
1198 (linux_set_resume_request): Return void, take arguments
1200 (linux_resume): Use for_each_thread.
1202 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1204 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1205 return bool, remove data argument.
1206 (linux_stabilize_threads): Use find_thread.
1208 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1210 * linux-low.c (unsuspend_one_lwp): Remove.
1211 (unsuspend_all_lwps): Use for_each_thread, inline code from
1214 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1216 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1217 * linux-low.c (struct iterate_over_lwps_args): Remove.
1218 (iterate_over_lwps_filter): Remove.
1219 (iterate_over_lwps): Use find_thread.
1221 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1223 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1224 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1225 code from reset_lwp_ptrace_options_callback.
1227 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1229 * linux-arm-low.c (struct update_registers_data): Remove.
1230 (update_registers_callback): Return void, take arguments
1231 directly, don't check thread's pid.
1232 (arm_insert_point, arm_remove_point): Use for_each_thread.
1234 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1236 * win32-low.c (continue_one_thread): Return void, take argument
1238 (child_continue): Use for_each_thread.
1240 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1242 * win32-i386-low.c (update_debug_registers_callback): Rename
1244 (update_debug_registers): ... this, return void, remove pid_p arg.
1245 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1247 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1249 * inferiors.h (struct process_info): Add constructor, initialize
1251 <syscalls_to_catch>: Change type to std::vector<int>.
1252 * inferiors.c (add_process): Allocate process_info with new.
1253 (remove_process): Free process_info with delete.
1254 * linux-low.c (handle_extended_wait): Adjust.
1255 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1256 * server.c (handle_general_set): Adjust.
1258 2017-11-16 Pedro Alves <palves@redhat.com>
1260 * remote-utils.c (remote_close): Block SIGIO signals instead of
1261 uninstalling the SIGIO handler.
1263 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1265 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1267 2017-11-16 Yao Qi <yao.qi@linaro.org>
1269 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1270 (tic6x_store_gregset): Likewise.
1271 (tic6x_usrregs_info): Move it up.
1273 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1275 * Makefile.in: Update arch rules.
1276 * configure.srv: Explicitly mark arch/ files.
1278 2017-11-13 Andreas Schwab <schwab@suse.de>
1280 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1282 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1284 2017-11-06 Pedro Alves <palves@redhat.com>
1286 * config.in, configure: Regenerate.
1288 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1290 * target.c (struct thread_search): Remove.
1291 (thread_search_callback): Remove.
1292 (prepare_to_access_memory): Use for_each_thread instead of
1293 find_inferior. Inline code from thread_search_callback.
1295 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1297 * server.c (struct visit_actioned_threads_data): Remove.
1298 (visit_actioned_threads): Change prototype to take arguments
1300 (resume): Use find_thread instead of find_inferior.
1302 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1304 * server.c (queue_stop_reply_callback): Change prototype, return
1306 (find_status_pending_thread_callback): Remove.
1307 (handle_status): Replace find_inferior with find_thread and
1310 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1312 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1314 (aarch64_store_gregset): Likewise.
1315 (aarch64_fill_fpregset): Likewise.
1316 (aarch64_store_fpregset): Likewise.
1318 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1320 * gdbthread.h (find_thread, for_each_thread): New functions.
1321 * inferiors.c (thread_of_pid): Remove.
1322 (find_any_thread_of_pid): Use find_thread.
1323 * linux-low.c (num_lwps): Use for_each_thread.
1325 2017-10-17 Yao Qi <yao.qi@linaro.org>
1327 * Makefile.in: Remove one rule.
1328 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1330 2017-10-17 Yao Qi <yao.qi@linaro.org>
1332 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1333 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1335 2017-10-17 Yao Qi <yao.qi@linaro.org>
1337 * configure.srv: Rename arm.o with arch/arm.o.
1339 2017-10-17 Yao Qi <yao.qi@linaro.org>
1341 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1342 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1343 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1344 (arch-i386.o, arch-amd64.o): Remove rules.
1345 (arch/%.o): New rule.
1346 Update POSTCOMPILE and COMPILE.pre.
1347 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1348 * configure: Re-generated.
1349 * configure.srv: Replace arch-i386.o with arch/i386.o.
1350 Replace arch-amd64.o with arch/amd64.o.
1352 2017-10-16 Yao Qi <yao.qi@linaro.org>
1354 * configure: Regenerated.
1356 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1358 * inferiors.h: (struct inferior_list): Remove.
1359 (struct inferior_list_entry); Remove.
1360 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1361 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1362 get_first_inferior): Remove.
1363 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1364 find_inferior_id, find_inferior_in_random): Change signature.
1365 * inferiors.c (all_threads): Change type to
1366 std::list<thread_info *>.
1367 (get_thread): Remove macro.
1368 (find_inferior, find_inferior_id): Change signature, implement
1370 (find_inferior_in_random): Change signature, implement using
1371 find_thread_in_random.
1372 (for_each_inferior, for_each_inferior_with_data): Change
1373 signature, implement using for_each_thread.
1374 (add_inferior_to_list, remove_inferior): Remove.
1375 (add_thread, get_first_thread, thread_of_pid,
1376 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1377 (get_first_inferior, one_inferior_p, clear_inferior_list):
1379 (clear_inferiors, get_thread_process): Update.
1380 * gdbthread.h: Include <list>.
1381 (struct thread_info) <entry>: Remove field.
1383 (all_threads): Change type to std::list<thread_info *>.
1384 (get_first_inferior): Add doc.
1385 (find_thread, for_each_thread, find_thread_in_random): New
1387 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1388 * linux-arm-low.c (update_registers_callback): Update.
1389 * linux-low.c (second_thread_of_pid_p): Update.
1390 (kill_one_lwp_callback, linux_detach_lwp_callback,
1391 delete_lwp_callback, status_pending_p_callback, same_lwp,
1392 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1393 iterate_over_lwps, not_stopped_callback,
1394 resume_stopped_resumed_lwps, count_events_callback,
1395 select_singlestep_lwp_callback, select_event_lwp_callback,
1396 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1397 suspend_and_send_sigstop_callback, wait_for_sigstop,
1398 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1399 lwp_running, linux_set_resume_request, resume_status_pending_p,
1400 need_step_over_p, start_step_over, linux_resume_one_thread,
1401 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1402 reset_lwp_ptrace_options_callback): Update.
1403 * linux-mips-low.c (update_watch_registers_callback): Update.
1404 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1406 (free_register_cache_thread_one): Remove.
1407 (regcache_release): Update.
1408 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1409 handle_qxfer_threads_worker): Update.
1410 (handle_query): Update, use list iterator.
1411 (visit_actioned_threads, handle_pending_status,
1412 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1413 clear_pending_status_callback, set_pending_status_callback,
1414 find_status_pending_thread_callback, handle_status,
1415 process_serial_event): Update.
1416 * target.c (thread_search_callback): Update.
1417 * thread-db.c (thread_db_get_tls_address): Update.
1418 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1420 * win32-i386-low.c (update_debug_registers_callback): Update.
1421 * win32-low.c (delete_thread_info, child_delete_thread,
1422 continue_one_thread, suspend_one_thread,
1423 get_child_debug_event): Adjust.
1425 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1427 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1428 * inferiors.h: Include <list>.
1429 (struct process_info) <entry>: Remove field.
1431 (pid_of): Change macro to function.
1432 (ptid_of, lwpid_of): Remove macro.
1433 (all_processes): Change type to std::list<process_info *>.
1434 (ALL_PROCESSES): Remove macro.
1435 (for_each_process, find_process): New function.
1436 * inferiors.c (all_processes): Change type to
1437 std::list<process_info *>.
1438 (find_thread_process): Adjust.
1439 (add_process): Likewise.
1440 (remove_process): Likewise.
1441 (find_process_pid): Likewise.
1442 (get_first_process): Likewise.
1443 (started_inferior_callback): Remove.
1444 (have_started_inferiors_p): Adjust.
1445 (attached_inferior_callback): Remove.
1446 (have_attached_inferiors_p): Adjust.
1447 * linux-low.c (check_zombie_leaders): Likewise.
1448 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1449 (x86_linux_update_xmltarget): Adjust.
1450 * server.c (handle_query): Likewise.
1451 (gdb_reattached_process): Remove.
1452 (handle_status): Adjust.
1453 (kill_inferior_callback): Likewise.
1454 (detach_or_kill_inferior): Remove.
1455 (print_started_pid): Likewise.
1456 (print_attached_pid): Likewise.
1457 (detach_or_kill_for_exit): Update.
1458 (process_serial_event): Likewise.
1459 * linux-arm-low.c (arm_new_fork): Likewise.
1461 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1463 * dll.h: Include <list>.
1464 (struct dll_info): Add constructor.
1465 <entry>: Remove field.
1466 (all_dlls): Change type to std::list<dll_info>.
1467 * dll.c: Include <algorithm>.
1468 (get_dll): Remove macro.
1469 (all_dlls): Change type to std::list<dll_info *>.
1470 (free_one_dll): Remove.
1471 (match_dll): Likewise.
1472 (loaded_dll): Adjust.
1473 (unloaded_dll): Adjust to all_dlls type change, use
1474 std::find_if. Inline code from match_dll.
1475 (clear_dlls): Adjust to all_dlls type change.
1476 * server.c (emit_dll_description): Remove.
1477 (handle_qxfer_libraries): Adjust to all_dlls type change,
1478 integrate emit_dll_description's functionality.
1480 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1482 * linux-low.h (struct linux_target_ops) <delete_process>: New
1484 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1485 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1486 (struct linux_target_ops): Add delete_process callback.
1487 * linux-arm-low.c (arm_delete_process): New.
1488 (struct linux_target_ops): Add delete_process callback.
1489 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1490 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1491 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1492 * linux-mips-low.c (mips_linux_delete_process): New.
1493 (struct linux_target_ops): Add delete_process callback.
1494 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1495 * linux-s390-low.c (struct linux_target_ops): Likewise.
1496 * linux-sh-low.c (struct linux_target_ops): Likewise.
1497 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1498 * linux-tile-low.c (struct linux_target_ops): Likewise.
1499 * linux-x86-low.c (x86_linux_delete_process): New.
1500 (struct linux_target_ops): Add delete_process callback.
1501 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1503 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1505 * linux-aarch64-low.c (the_low_target): Add thread delete
1507 * linux-arm-low.c (arm_delete_thread): New function.
1508 (the_low_target): Add thread delete callback.
1509 * linux-bfin-low.c (the_low_target): Likewise.
1510 * linux-crisv32-low.c (the_low_target): Likewise.
1511 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1513 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1515 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1516 * linux-mips-low.c (mips_linux_delete_thread): New function.
1517 (the_low_target): Add thread delete callback.
1518 * linux-ppc-low.c (the_low_target): Likewise.
1519 * linux-s390-low.c (the_low_target): Likewise.
1520 * linux-sh-low.c (the_low_target): Likewise.
1521 * linux-tic6x-low.c (the_low_target): Likewise.
1522 * linux-tile-low.c (the_low_target): Likewise.
1523 * linux-x86-low.c (the_low_target): Likewise.
1524 * linux-xtensa-low.c (the_low_target): Likewise.
1526 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1528 * win32-low.c: Include "common-inferior.h".
1530 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1532 * inferiors.c (set_inferior_cwd): New function.
1533 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1534 (handle_query): Inform that QSetWorkingDir is supported.
1535 * win32-low.c (create_process): Pass the inferior's cwd to
1538 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1540 * inferiors.c (current_inferior_cwd): New global variable.
1541 (get_inferior_cwd): New function.
1542 * inferiors.h (struct process_info) <cwd>: New field.
1544 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1546 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1547 (OBS): Add gdb_tilde_expand.o.
1549 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1551 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1552 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1554 2017-09-29 Pedro Alves <palves@redhat.com>
1556 * ax.c (gdb_parse_agent_expr): Constify.
1557 * ax.h (gdb_parse_agent_expr): Constify.
1558 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1560 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1561 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1562 * remote-utils.h (read_ptid): Constify.
1563 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1564 (process_point_options, process_serial_event): Constify.
1565 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1566 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1567 (cmd_qtbuffer): Constify.
1569 2017-09-29 Pedro Alves <palves@redhat.com>
1571 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1574 2017-09-29 Pedro Alves <palves@redhat.com>
1576 * linux-low.c (handle_extended_wait): Pass parent thread instead
1577 of process to thread_db_notice_clone.
1578 * linux-low.h (thread_db_notice_clone): Replace parent process
1579 parameter with parent thread parameter.
1580 * thread-db.c (find_one_thread): Add comment.
1581 (thread_db_notice_clone): Replace parent process parameter with
1582 parent thread parameter. Temporarily switch to the parent thread.
1584 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1586 * gdbthread.h: Include "common-gdbthread.h".
1587 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1588 "if" when validating the ptid.
1589 * remote-utils.c: Include "gdbthread.h".
1590 (prepare_resume_reply): Use "switch_to_thread".
1591 * target.c (done_accessing_memory): Likewise.
1593 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1595 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1596 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1597 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1598 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1599 s390x-gs-linux64-ipa.o to ipa_obj.
1600 * linux-s390-low.c (HWCAP_S390_GS): New define.
1601 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1603 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1604 (s390_arch_setup): Check for guarded-storage support and choose
1606 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1607 init_registers_s390x_gs_linux64.
1608 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1610 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1611 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1613 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1615 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1617 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1619 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1620 (thread_db_thread_handle): Declare.
1621 * linux-low.c (linux_target_ops): Initialize thread_handle.
1622 * server.c (handle_qxfer_threads_worker): Add support for
1624 * target.h (struct target_ops): Add new function pointer,
1626 (target_thread_handle): Define.
1627 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1629 (thread_db_thread_handle): New function.
1631 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1633 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1634 * linux-low.h (thread_db_notice_clone): Declare.
1635 * thread-db.c (thread_db_notice_clone): New function.
1637 2017-09-21 Pedro Alves <palves@redhat.com>
1639 * server.c (gdb_read_memory, handle_status, process_serial_event)
1640 (handle_serial_event, handle_target_event): Adjust to
1641 set_desired_thread prototype change.
1642 * target.c (set_desired_thread): Remove 'use_general' parameter
1644 * target.h (set_desired_thread): Remove 'use_general' parameter.
1646 2017-09-20 Tom Tromey <tom@tromey.com>
1648 * target.c (target_terminal::terminal_state): Define.
1649 (target_terminal::init): Rename from target_terminal_init.
1650 (target_terminal::inferior): Rename from
1651 target_terminal_inferior.
1652 (target_terminal::ours): Rename from target_terminal_ours.
1653 (target_terminal::ours_for_output, target_terminal::info): New.
1655 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1657 * server.c (accumulate_file_name_length): Remove.
1658 (emit_dll_description): Adjust to std::string change.
1659 (handle_qxfer_libraries): Use std::string to hold document.
1661 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1663 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1664 return type of xml_escape_text.
1665 * server.c (emit_dll_description): Likewise.
1667 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1669 * server.c (captured_main): Accept argument for --selftest.
1670 Update run_tests call.
1671 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1672 when registering selftests.
1674 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1676 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1677 instead of "VEC" for "target_desc.reg_defs".
1678 (regcache_cpy): Likewise.
1679 (registers_to_string): Likewise.
1680 (registers_from_string): Likewise.
1681 (find_regno): Likewise.
1682 (supply_regblock): Likewise.
1683 (regcache_raw_read_unsigned): Likewise.
1684 * tdesc.c (init_target_desc): Likewise.
1685 (tdesc_create_reg): Likewise.
1686 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1687 (struct target_desc) <reg_defs>: Convert to "std::vector".
1688 (target_desc): Do not initialize "reg_defs".
1689 (~target_desc): Update code to use "std::vector" instead of "VEC"
1690 for "target_desc.reg_defs".
1691 (operator==): Likewise.
1693 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1695 * inferiors.h (thread_to_gdb_id): Remove.
1696 * inferiors.c (thread_to_gdb_id): Remove.
1697 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1698 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1699 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1701 * nto-low.c (nto_fetch_registers, nto_store_registers,
1702 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1704 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1706 * inferiors.h (gdb_id_to_thread_id): Remove.
1707 * inferiors.c (gdb_id_to_thread_id): Remove.
1708 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1709 removal. Move pid declaration closer to where it's used.
1711 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1713 * server.c (handle_detach): New function.
1714 (process_serial_event): Move code out, call handle_detach.
1716 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1718 * server.c (require_running): Rename to ...
1719 (require_running_or_return): ... this ...
1720 (require_running_or_break): ... and this.
1721 (handle_query, process_serial_event): Adjust.
1723 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1725 * linux-low.c (linux_set_resume_request): Remove unused
1728 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1730 * server.c (first_thread_of): Remove.
1731 (process_serial_event): Replace usage of first_thread_of with
1732 find_any_thread_of_pid.
1733 * tracepoint.c (same_process_p): Remove.
1734 (gdb_agent_about_to_close): Replace usage of same_process_p with
1735 find_any_thread_of_pid.
1736 * linux-x86-low.c (same_process_callback): Remove.
1737 (x86_arch_setup_process_callback): Replace usage of
1738 same_process_callback with find_any_thread_of_pid.
1739 * thread-db.c (any_thread_of): Remove.
1740 (switch_to_process): Replace usage of any_thread_of with
1741 find_any_thread_of_pid.
1742 * inferiors.c (thread_pid_matches_callback): Remove.
1743 (find_thread_process): Adjust to use find_any_thread_of_pid.
1745 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1747 * regcache.c (get_thread_regcache): Guard calls to "memset"
1750 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1752 * linux-low.c (handle_extended_wait): Use
1753 "allocate_target_description" instead of "XNEW".
1754 * linux-x86-low.c (initialize_low_arch): Likewise.
1756 2017-09-05 Yao Qi <yao.qi@linaro.org>
1758 * configure.srv (srv_i386_regobj): Remove.
1759 (srv_amd64_regobj): Remove.
1760 (srv_regobj): Set it to "" for x86 non-linux targets.
1761 * linux-x86-tdesc.c (i386_linux_read_description):
1762 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1763 (init_registers_i386): Remove the declaration.
1764 (tdesc_i386): Remove the declaration.
1765 (lynx_i386_arch_setup): Call i386_create_target_description.
1766 * nto-x86-low.c: Likewise.
1767 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1768 [!__x86_64__]: include arch/i386.h.
1769 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1771 2017-09-05 Yao Qi <yao.qi@linaro.org>
1773 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1774 i386/amd64-XXX-linux from it.
1776 2017-09-05 Yao Qi <yao.qi@linaro.org>
1778 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1780 (ipa_amd64_linux_regobj): Remove.
1781 (ipa_x32_linux_regobj): Remove.
1783 2017-09-05 Yao Qi <yao.qi@linaro.org>
1785 * Makefile.in (arch-amd64.o): New rule.
1786 * configure.srv: Append arch-amd64.o.
1787 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1788 (get_ipa_tdesc): Call amd64_linux_read_description.
1789 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1790 and init_registers_amd64_XXX.
1791 * linux-x86-low.c (x86_linux_read_description): Call
1792 amd64_linux_read_description.
1793 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1794 (initialize_low_arch): Don't call init_registers_x32_XXX and
1795 init_registers_amd64_XXX.
1796 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1797 and tdesc_amd64_XXX.
1798 [__x86_64__] (amd64_tdesc_test): New function.
1799 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1800 and init_registers_amd64_XXX.
1801 * linux-x86-tdesc.c: Include arch/amd64.h.
1802 (xcr0_to_tdesc_idx): New function.
1803 (i386_linux_read_description): New function.
1804 (amd64_get_ipa_tdesc_idx): New function.
1805 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1806 (amd64_get_ipa_tdesc): Declare.
1808 2017-09-05 Yao Qi <yao.qi@linaro.org>
1810 * configure.srv (srv_i386_linux_xmlfiles): Remove
1811 i386/i386-XXX-linux.xml from it.
1813 2017-09-05 Yao Qi <yao.qi@linaro.org>
1815 * configure.srv: Set srv_i386_linux_regobj empty if $development
1817 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1818 initialize_low_tdesc.
1819 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1820 with #if initialize_low_tdesc.
1821 * linux-x86-tdesc-selftest.c: New file.
1822 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1824 2017-09-05 Yao Qi <yao.qi@linaro.org>
1826 * Makefile.in (arch-i386.o): New rule.
1827 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1828 (x86_64-*-linux*): Likewise.
1829 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1830 include arch/i386.h.
1831 (i386_linux_read_description): Remove code and call
1832 i386_create_target_description.
1833 * tdesc.c (allocate_target_description): New function.
1834 * tdesc.h (set_tdesc_architecture): Remove declaration.
1835 (set_tdesc_osabi): Likewise.
1837 2017-09-05 Yao Qi <yao.qi@linaro.org>
1839 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1840 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1841 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1843 * server.c (get_features_xml): Call tdesc_get_features_xml.
1844 * tdesc.c (set_tdesc_architecture): New function.
1845 (set_tdesc_osabi): New function.
1846 (tdesc_get_features_xml): New function.
1847 (tdesc_create_feature): Add an argument.
1848 * tdesc.h (struct target_desc) <features>: New field.
1849 <arch, osabi>: New field.
1850 (~target_desc): xfree features, arch, and osabi.
1851 (target_desc::oerator==): Don't compare .xmltarget.
1852 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1853 (set_tdesc_osabi): Likewise.
1854 (tdesc_get_features_xml): Likewise.
1856 2017-09-05 Yao Qi <yao.qi@linaro.org>
1858 * linux-x86-tdesc.c: Include selftest.h.
1859 (i386_tdesc_test): New function.
1860 (initialize_low_tdesc): Call selftests::register_test.
1861 * tdesc.h: Include regdef.h.
1862 (target_desc): Override operator == and !=.
1864 2017-09-05 Yao Qi <yao.qi@linaro.org>
1866 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1867 (ipa_obj): Likewise.
1868 * linux-i386-ipa.c: Include common/x86-xstate.h
1869 (get_ipa_tdesc): Call i386_linux_read_description.
1870 (initialize_low_tracepoint): Don't call init_registers_XXX
1871 functions, call initialize_low_tdesc instead.
1872 * linux-x86-low.c (x86_linux_read_description): Call
1873 i386_linux_read_description.
1874 (initialize_low_arch): Don't call init_registers_i386_XXX
1875 functions, call initialize_low_tdesc.
1876 * linux-x86-tdesc.c: New file.
1877 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1878 (i386_get_ipa_tdesc_idx): Declare.
1879 (i386_get_ipa_tdesc): Declare.
1880 (initialize_low_tdesc): Declare.
1882 2017-09-05 Yao Qi <yao.qi@linaro.org>
1884 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1887 2017-09-05 Yao Qi <yao.qi@linaro.org>
1889 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1890 * regcache.c (get_thread_regcache): Use VEC_length.
1891 (init_register_cache): Likewise.
1892 (regcache_cpy): Likewise.
1893 (registers_to_string): Iterate reg_defs via VEC_iterate.
1894 (find_regno): Likewise.
1895 (find_register_by_number): Use VEC_index.
1896 (register_size): Call find_register_by_number.
1897 (register_data): Call find_register_by_number.
1898 (supply_regblock): Use VEC_length.
1899 (regcache_raw_read_unsigned): Likewise.
1900 * tdesc.c (init_target_desc): Iterate reg_defs via
1902 (default_description): Update initializer.
1903 (copy_target_description): Don't update field num_registers.
1904 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1905 <num_registers>: Remove.
1907 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1909 * Makefile.in (.SECONDARY): Define target.
1911 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1913 * linux-low.c (linux_wait_1): Adjust.
1914 * server.c (queue_stop_reply_callback): Adjust.
1916 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1918 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1919 QEnvironmentUnset and QEnvironmentReset packets.
1920 (handle_query): Inform remote that QEnvironmentHexEncoded,
1921 QEnvironmentUnset and QEnvironmentReset are supported.
1923 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1925 * inferiors.h (inferior_target_data): Rename to ...
1926 (thread_target_data): ... this.
1927 (inferior_regcache_data): Rename to ...
1928 (thread_regcache_data): ... this.
1929 (set_inferior_regcache_data): Rename to ...
1930 (set_thread_regcache_data): ... this.
1931 * inferiors.c (inferior_target_data): Rename to ...
1932 (thread_target_data): ... this.
1933 (inferior_regcache_data): Rename to ...
1934 (thread_regcache_data): ... this.
1935 (set_inferior_regcache_data): Rename to ...
1936 (set_thread_regcache_data): ... this.
1937 (free_one_thread): Update.
1938 * linux-low.h (get_thread_lwp): Update.
1939 * regcache.c (get_thread_regcache): Update.
1940 (regcache_invalidate_thread): Update.
1941 (free_register_cache_thread): Update.
1942 * win32-i386-low.c (update_debug_registers_callback): Update.
1943 (win32_get_current_dr): Update.
1944 * win32-low.c (thread_rec): Update.
1945 (delete_thread_info): Update.
1946 (continue_one_thread): Update.
1947 (suspend_one_thread): Update.
1949 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1951 * inferiors.c (set_inferior_target_data): Remove.
1952 * inferiors.h (set_inferior_target_data): Remove.
1954 2017-08-18 Yao Qi <yao.qi@linaro.org>
1956 * Makefile.in (OBS): Add selftest.o.
1957 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1958 * configure, config.in: Re-generated.
1959 * server.c: Include common/sefltest.h.
1960 (captured_main): Handle option --selftest.
1962 2017-08-09 Yao Qi <yao.qi@linaro.org>
1964 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1965 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1966 i386-avx-mpx.o and i386-mmx.o.
1967 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1968 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1969 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1970 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1971 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1972 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1973 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1974 i386/amd64-avx-mpx.xml.
1976 2017-08-09 Yao Qi <yao.qi@linaro.org>
1978 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1979 and x32-avx-avx512.o.
1980 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1981 i386/x32-avx-avx512.xml.
1983 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1985 * tracepoint.h (enum class fast_tpoint_collect_result): New
1987 (fast_tracepoint_collecting): Change return type to
1988 fast_tpoint_collect_result.
1989 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1990 * linux-low.h: Include tracepoint.h.
1991 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1992 fast_tpoint_collect_result.
1993 * linux-low.c (handle_tracepoints): Adjust.
1994 (linux_fast_tracepoint_collecting): Change return type to
1995 fast_tpoint_collect_result.
1996 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1997 linux_wait_1, stuck_in_jump_pad_callback,
1998 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1999 proceed_one_lwp): Adjust to type change.
2001 2017-07-10 Yao Qi <yao.qi@linaro.org>
2003 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2005 2017-06-29 Yao Qi <yao.qi@linaro.org>
2007 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2009 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2011 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2013 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2015 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2017 * linux-low.c (linux_create_inferior): Adjust code to access the
2018 environment information via 'gdb_environ' class.
2019 * lynx-low.c (lynx_create_inferior): Likewise.
2020 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2021 (get_environ): Return a pointer to 'our_environ'.
2022 (captured_main): Initialize 'our_environ'.
2023 * server.h (get_environ): Adjust prototype.
2024 * spu-low.c (spu_create_inferior): Adjust code to access the
2025 environment information via 'gdb_environ' class.
2027 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2029 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2030 usage of "register" keyword.
2032 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2034 * configure: Re-generate.
2036 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2038 * configure: Re-generate.
2040 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2042 * Makefile.in (COMPILE.pre): Add "-x c++".
2044 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2046 * fork-child.c: Conditionally include <signal.h>.
2048 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2050 * server.c (handle_general_set): Handle new packet
2051 "QStartupWithShell".
2052 (handle_query): Add "QStartupWithShell" to the list of supported
2054 (gdbserver_usage): Add help text explaining the
2055 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2057 (captured_main): Recognize and act upon the presence of the new
2060 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2061 Pedro Alves <palves@redhat.com>
2063 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2064 * configure: Regenerate.
2065 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2067 (i[34567]86-*-lynxos*): Likewise.
2068 (spu*-*-*): Likewise.
2069 * fork-child.c: New file.
2070 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2072 (linux_ptrace_fun): New function.
2073 (linux_create_inferior): Adjust function prototype to reflect
2074 change on "target.h". Adjust function code to use
2076 (linux_request_interrupt): Delete "signal_pid".
2077 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2078 (lynx_ptrace_fun): New function.
2079 (lynx_create_inferior): Adjust function prototype to reflect
2080 change on "target.h". Adjust function code to use
2082 * nto-low.c (nto_create_inferior): Adjust function prototype and
2083 code to reflect change on "target.h". Update comments.
2084 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2085 "common-terminal.h" and "environ.h".
2086 (terminal_fd): Moved to fork-child.c.
2087 (old_foreground_pgrp): Likewise.
2088 (restore_old_foreground_pgrp): Likewise.
2089 (last_status): Make it global.
2090 (last_ptid): Likewise.
2091 (our_environ): New variable.
2092 (startup_with_shell): Likewise.
2093 (program_name): Likewise.
2094 (program_argv): Rename to...
2095 (program_args): ...this.
2096 (wrapper_argv): New variable.
2097 (start_inferior): Delete function.
2098 (get_exec_wrapper): New function.
2099 (get_exec_file): Likewise.
2100 (get_environ): Likewise.
2101 (prefork_hook): Likewise.
2102 (post_fork_inferior): Likewise.
2103 (postfork_hook): Likewise.
2104 (postfork_child_hook): Likewise.
2105 (handle_v_run): Update code to deal with arguments coming from the
2106 remote host. Update calls from "start_inferior" to
2108 (captured_main): Likewise. Initialize environment variable. Call
2110 * server.h (post_fork_inferior): New prototype.
2111 (get_environ): Likewise.
2112 (last_status): Declare.
2113 (last_ptid): Likewise.
2114 (signal_pid): Likewise.
2115 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2116 (spu_ptrace_fun): New function.
2117 (spu_create_inferior): Adjust function prototype to reflect change
2118 on "target.h". Adjust function code to use "fork_inferior".
2119 * target.c (target_terminal_init): New function.
2120 (target_terminal_inferior): Likewise.
2121 (target_terminal_ours): Likewise.
2122 * target.h: Include <vector>.
2123 (struct target_ops) <create_inferior>: Update prototype.
2124 (create_inferior): Update macro.
2125 * utils.c (gdb_flush_out_err): New function.
2126 * win32-low.c (win32_create_inferior): Adjust function prototype
2127 and code to reflect change on "target.h".
2129 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2131 * inferiors.c (switch_to_thread): New function.
2133 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2135 * Makefile.in (SFILE): Add "common/job-control.c".
2136 (OBS): Add "job-control.o".
2138 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2140 * Makefile: Remove "@host_makefile_frag@".
2142 2017-05-05 Pedro Alves <palves@redhat.com>
2144 * configure: Regenerate.
2146 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2148 * configure: Regenerate.
2150 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2152 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2153 software_single_step change of return type to
2154 std::vector<CORE_ADDR>.
2155 * linux-low.c (install_software_single_step_breakpoints):
2157 * linux-low.h (install_software_single_step_breakpoints):
2160 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2162 * remote-utils.c: Include "gdb_termios.h" instead of
2164 * terminal.h: Delete file.
2166 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2168 * server.c: Include <vector>.
2169 <program_argv, wrapper_argv>: Convert to std::vector.
2170 (start_inferior): Rewrite function to use C++.
2171 (handle_v_run): Likewise. Update code that calculates the argv
2172 based on the vRun packet; use C++.
2173 (captured_main): Likewise.
2175 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2177 * server.c (handle_v_cont): Initialize thread_resume::thread
2180 2017-04-05 Pedro Alves <palves@redhat.com>
2182 * configure: Regenerate.
2184 2017-04-05 Pedro Alves <palves@redhat.com>
2186 * gdbreplay.c (sync_error): Constify.
2187 * linux-x86-low.c (push_opcode): Constify.
2189 2017-04-05 Pedro Alves <palves@redhat.com>
2191 * win32-low.c (get_child_debug_event)
2192 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2193 Report TARGET_WAITKIND_SPURIOUS instead.
2195 2017-04-05 Pedro Alves <palves@redhat.com>
2197 * remote-utils.c (remote_prepare, remote_open): Constify.
2198 * remote-utils.h (remote_prepare, remote_open): Constify.
2199 * server.c (captured_main): Constify 'port' handling.
2201 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2203 * Makefile.in (clean): Clear .deps.
2205 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2207 * .gitignore: Remove generated files, replace with wildcard.
2208 * (clean): Replace removal of generated files with wildcard.
2209 (version.c): Replace with...
2210 (version-generated.c): ...this.
2211 (xml-builtin.c): Replace with...
2212 (xml-builtin-generated.c): ...this.
2213 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2214 (%.c: *regformats*): Replace with...
2215 (%-generated.c: *regformats*): ...this.
2217 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2219 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2220 (xtensa_fill_gregset): Call collect_register_by_name for
2222 (xtensa_store_gregset): Call supply_register_by_name for
2225 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2227 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2228 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2229 (xtensa_store_gregset): Call supply_register for all registers in
2230 a0_regnum..a0_regnum + C0_NREGS range.
2232 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2234 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2235 (ax-ipa.o: ax.c): Remove.
2236 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2237 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2238 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2239 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2240 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2242 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2244 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2245 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2246 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2247 (errors-ipa.o: ../common/errors.c): Remove.
2248 (format-ipa.o: ../common/format.c): Remove.
2249 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2251 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2253 * Makefile.in (%-ipa.o: %.c): New rule.
2254 (tracepoint-ipa.o: tracepoint.c): Remove.
2255 (utils-ipa.o: utils.c): Remove.
2256 (remote-utils-ipa.o: remote-utils.c): Remove.
2257 (regcache-ipa.o: regcache.c): Remove.
2258 (i386-linux-ipa.o: i386-linux.c): Remove.
2259 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2260 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2261 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2262 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2263 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2264 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2265 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2266 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2267 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2268 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2269 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2270 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2271 (aarch64-ipa.o: aarch64.c): Remove.
2272 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2273 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2274 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2275 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2276 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2277 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2278 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2279 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2280 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2281 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2282 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2283 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2284 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2285 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2286 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2287 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2288 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2289 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2290 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2291 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2292 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2293 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2294 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2295 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2296 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2297 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2298 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2299 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2300 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2301 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2302 (tdesc-ipa.o: tdesc.c): Remove.
2303 (x32-linux-ipa.o: x32-linux.c): Remove.
2304 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2305 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2307 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2309 * Makefile.in (%.o: ../arch/%.c): New rule.
2310 (arm.o: ../arch/arm.c): Remove.
2311 (arm-linux.o: ../arch/arm-linux.c): Remove.
2312 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2313 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2315 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2317 * Makefile.in (%.o: ../nat/%.c): New rule.
2318 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2319 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2320 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2321 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2322 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2323 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2324 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2325 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2326 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2327 (linux-personality.o: ../nat/linux-personality.c): Remove.
2328 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2329 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2330 (x86-linux.o: ../nat/x86-linux.c): Remove.
2331 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2332 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2334 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2336 * Makefile.in (%.o: ../common/%.c): New rule.
2337 (signals.o: ../common/signals.c): Remove.
2338 (print-utils.o: ../common/print-utils.c): Remove.
2339 (rsp-low.o: ../common/rsp-low.c): Remove.
2340 (common-utils.o: ../common/common-utils.c): Remove.
2341 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2342 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2343 (vec.o: ../common/vec.c): Remove.
2344 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2345 (xml-utils.o: ../common/xml-utils.c): Remove.
2346 (ptid.o: ../common/ptid.c): Remove.
2347 (buffer.o: ../common/buffer.c): Remove.
2348 (format.o: ../common/format.c): Remove.
2349 (filestuff.o: ../common/filestuff.c): Remove.
2350 (agent.o: ../common/agent.c): Remove.
2351 (errors.o: ../common/errors.c): Remove.
2352 (environ.o: ../common/environ.c): Remove.
2353 (common-debug.o: ../common/common-debug.c): Remove.
2354 (cleanups.o: ../common/cleanups.c): Remove.
2355 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2356 (fileio.o: ../common/fileio.c): Remove.
2357 (common-regcache.o: ../common/common-regcache.c): Remove.
2358 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2359 (new-op.o: ../common/new-op.c): Remove.
2360 (btrace-common.o: ../common/btrace-common.c): Remove.
2362 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2364 * Makefile.in (%.o: ../target/%.c): New rule.
2365 (waitstatus.o: ../target/waitstatus.c): Remove.
2367 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2370 (%.c: ../regformats/%.dat,
2371 (%.c: ../regformats/arm/%.dat,
2372 (%.c: ../regformats/i386/%.dat,
2373 (%.c: ../regformats/rs6000/%.dat): New rules.
2374 (aarch64.c): Remove.
2375 (reg-arm.c): Remove.
2376 (arm-with-iwmmxt.c): Remove.
2377 (arm-with-vfpv2.c): Remove.
2378 (arm-with-vfpv3.c): Remove.
2379 (arm-with-neon.c): Remove.
2380 (reg-bfin.c): Remove.
2381 (reg-cris.c): Remove.
2382 (reg-crisv32.c): Remove.
2384 (i386-linux.c): Remove.
2385 (i386-avx.c): Remove.
2386 (i386-avx-linux.c): Remove.
2387 (i386-avx-avx512.c): Remove.
2388 (i386-avx-avx512-linux.c): Remove.
2389 (i386-mpx.c): Remove.
2390 (i386-mpx-linux.c): Remove.
2391 (i386-avx-mpx-avx512-pku.c): Remove.
2392 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2393 (i386-avx-mpx.c): Remove.
2394 (i386-avx-mpx-linux.c): Remove.
2395 (i386-mmx.c): Remove.
2396 (i386-mmx-linux.c): Remove.
2397 (reg-ia64.c): Remove.
2398 (reg-m32r.c): Remove.
2399 (reg-m68k.c): Remove.
2401 (mips-linux.c): Remove.
2402 (mips-dsp-linux.c): Remove.
2403 (mips64-linux.c): Remove.
2404 (mips64-dsp-linux.c): Remove.
2405 (nios2-linux.c): Remove.
2406 (powerpc-32.c): Remove.
2407 (powerpc-32l.c): Remove.
2408 (powerpc-altivec32l.c): Remove.
2409 (powerpc-cell32l.c): Remove.
2410 (powerpc-vsx32l.c): Remove.
2411 (powerpc-isa205-32l.c): Remove.
2412 (powerpc-isa205-altivec32l.c): Remove.
2413 (powerpc-isa205-vsx32l.c): Remove.
2414 (powerpc-e500l.c): Remove.
2415 (powerpc-64l.c): Remove.
2416 (powerpc-altivec64l.c): Remove.
2417 (powerpc-cell64l.c): Remove.
2418 (powerpc-vsx64l.c): Remove.
2419 (powerpc-isa205-64l.c): Remove.
2420 (powerpc-isa205-altivec64l.c): Remove.
2421 (powerpc-isa205-vsx64l.c): Remove.
2422 (s390-linux32.c): Remove.
2423 (s390-linux32v1.c): Remove.
2424 (s390-linux32v2.c): Remove.
2425 (s390-linux64.c): Remove.
2426 (s390-linux64v1.c): Remove.
2427 (s390-linux64v2.c): Remove.
2428 (s390-te-linux64.c): Remove.
2429 (s390-vx-linux64.c): Remove.
2430 (s390-tevx-linux64.c): Remove.
2431 (s390x-linux64.c): Remove.
2432 (s390x-linux64v1.c): Remove.
2433 (s390x-linux64v2.c): Remove.
2434 (s390x-te-linux64.c): Remove.
2435 (s390x-vx-linux64.c): Remove.
2436 (s390x-tevx-linux64.c): Remove.
2437 (tic6x-c64xp-linux.c): Remove.
2438 (tic6x-c64x-linux.c): Remove.
2439 (tic6x-c62x-linux.c): Remove.
2441 (reg-sparc64.c): Remove.
2442 (reg-spu.c): Remove.
2444 (amd64-linux.c): Remove.
2445 (amd64-avx.c): Remove.
2446 (amd64-avx-linux.c): Remove.
2447 (amd64-avx-avx512.c): Remove.
2448 (amd64-avx-avx512-linux.c): Remove.
2449 (amd64-mpx.c): Remove.
2450 (amd64-mpx-linux.c): Remove.
2451 (amd64-avx-mpx-avx512-pku.c): Remove.
2452 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2453 (amd64-avx-mpx.c): Remove.
2454 (amd64-avx-mpx-linux.c): Remove.
2456 (x32-linux.c): Remove.
2457 (x32-avx.c): Remove.
2458 (x32-avx-linux.c): Remove.
2459 (x32-avx-avx512.c): Remove.
2460 (x32-avx-avx512-linux.c): Remove.
2461 (reg-xtensa.c): Remove.
2462 (reg-tilegx.c): Remove.
2463 (reg-tilegx32.c): Remove.
2465 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2467 * Makefile.in (SFILES): Add "common/environ.c".
2468 (OBJS): Add "common/environ.h".
2470 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2472 * configure.ac: Check if the fs_base and gs_base members of
2473 `struct user_regs_struct' exist.
2474 * config.in: Regenerated.
2475 * configure: Likewise.
2477 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2479 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2481 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2482 (get_next_pcs_syscall_next_pc): Likewise.
2484 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2486 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2487 * nto-x86-low.c: Likewise.
2489 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2491 * Makefile.in: Include disable-implicit-rules.mk.
2493 2016-11-23 Pedro Alves <palves@redhat.com>
2495 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2496 (debug_vprintf): Use std::chrono::steady_clock instead of
2497 gettimeofday. Use '.' instead of ':'.
2498 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2499 (get_timestamp): Use std::chrono::steady_clock instead of
2502 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2504 * Makefile.in: Fix whitespace formatting.
2506 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2508 * Makefile.in (SFILES, OBS): Flatten list and order
2511 2016-11-23 Pedro Alves <palves@redhat.com>
2513 * event-loop.c (handle_file_event): Use warning.
2514 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2515 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2518 2016-11-23 Pedro Alves <palves@redhat.com>
2520 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2522 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2523 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2524 debug_printf and debug_flush for debug output.
2525 * server.c (handle_general_set): Likewise.
2526 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2529 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2531 * Makefile.in (.c.o): Replace rule with ...
2532 (%.o: %.c): ... this one.
2534 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2536 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2537 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2539 * configure.ac: Remove checks for the make program.
2540 * configure: Re-generate.
2542 2016-10-28 Pedro Alves <palves@redhat.com>
2544 * Makefile.in (CXX_DIALECT): Get from configure.
2545 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2546 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2547 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2548 * config.in: Regenerate.
2549 * configure: Regenerate.
2551 2016-10-27 Yao Qi <yao.qi@linaro.org>
2553 * linux-low.c (linux_supports_range_stepping): Return true if
2554 can_software_single_step return true.
2556 2016-10-27 Yao Qi <yao.qi@linaro.org>
2558 * inferiors.c (find_inferior_in_random): New function.
2559 * inferiors.h (find_inferior_in_random): Declare.
2560 * linux-low.c (linux_wait_for_event_filtered): Call
2561 find_inferior_in_random instead of find_inferior.
2563 2016-10-27 Yao Qi <yao.qi@linaro.org>
2565 * linux-low.c (linux_wait_1): If single-step breakpoints are
2566 inserted, remove them.
2568 2016-10-26 Pedro Alves <palves@redhat.com>
2570 * linux-low.c (handle_extended_wait): Link parent/child fork
2572 (linux_wait_1): Unlink them.
2573 (linux_set_resume_request): Ignore resume requests for
2574 already-resumed and unhandled fork child threads.
2575 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2576 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2578 (handle_v_requests) <vCont>: Don't call require_running.
2579 * server.h (in_queued_stop_replies): New declaration.
2581 2016-10-24 Yao Qi <yao.qi@linaro.org>
2584 * linux-aarch64-low.c (append_insns): Cast the return value to
2587 2016-10-10 Yao Qi <yao.qi@linaro.org>
2589 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2591 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2593 * target.c (target_supports_multi_process): New function, moved
2595 * target.h (target_supports_multi_process): ... here. Remove
2598 2016-10-05 Tom Tromey <tom@tromey.com>
2601 * tracepoint.c (handle_tracepoint_bkpts): Check
2602 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2604 2016-10-05 Yao Qi <yao.qi@linaro.org>
2606 * configure.srv: Update the path of arm-*.xml files.
2608 2016-10-05 Terry Guo <terry.guo@arm.com>
2609 Yao Qi <yao.qi@linaro.org>
2611 * Makefile.in: Adjust the path of rules.
2612 * configure.srv: Update the path of xml files.
2613 * regformats/arm-with-iwmmxt.dat: Regenerated.
2614 * regformats/arm-with-neon.dat: Likewise.
2615 * regformats/arm-with-vfpv2.dat: Likewise.
2616 * regformats/arm-with-vfpv3.dat Likewise.
2618 2016-09-30 Yao Qi <yao.qi@linaro.org>
2621 * target.c (target_stop_and_wait): Don't call
2622 target_continue_no_signal, use resume_stop instead.
2624 2016-09-26 Yao Qi <yao.qi@linaro.org>
2626 * linux-low.c (linux_wait_1): Call debug_exit.
2628 2016-09-23 Pedro Alves <palves@redhat.com>
2630 * Makefile.in (SFILES): Add common/new-op.c.
2631 (OBS): Add common/new-op.o.
2632 (new-op.o): New rule.
2634 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2636 * .gitinore: Ignore more files.
2638 2016-09-21 Yao Qi <yao.qi@linaro.org>
2640 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2643 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2645 * server.c (start_inferior): Call target_mourn_inferior instead of
2646 mourn_inferior; pass ptid_t argument to it.
2648 (handle_target_event): Likewise.
2649 * target.c (target_mourn_inferior): New function.
2650 * target.h (mourn_inferior): Delete macro.
2652 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2654 * linux-low.c (lwp_is_stepping): New function.
2656 2016-09-06 Carl Love <cel@us.ibm.com>
2658 * server.c (start_inferior): Fixed comment, requested comment change
2659 didn't get updated correctly. Removed reference to ptrace () call as
2660 it is only true on Linux systems.
2662 2016-09-06 Carl Love <cel@us.ibm.com>
2664 * server.c (start_inferior): Do not call
2665 function target_post_create_inferior () if the
2666 inferior process has already exited.
2668 2016-09-05 Pedro Alves <palves@redhat.com>
2670 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2671 (COMPILE.pre, CC_LD): Use CXX directly.
2672 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2673 * acinclude.m4: Don't include build-with-cxx.m4.
2674 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2675 * configure: Regenerate.
2677 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2680 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2681 call writing data to own_buf.
2683 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2685 * target.c (mywait): Call target_wait instead of
2687 (target_wait): New function.
2689 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2691 * server.c (start_inferior): New variable 'ptid'. Replace calls
2692 to the_target->resume by target_continue{,_no_signal}, depending
2694 * target.c (target_stop_and_wait): Call target_continue_no_signal
2695 instead of the_target->resume.
2696 (target_continue): New function.
2698 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2700 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2702 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2705 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2707 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2708 * linux-arm-low.c (ps_get_thread_area): Likewise.
2709 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2710 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2711 * linux-mips-low.c (ps_get_thread_area): Likewise.
2712 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2713 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2714 * linux-x86-low.c (ps_get_thread_area): Likewise.
2715 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2717 2016-08-19 Pedro Alves <palves@redhat.com>
2719 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2721 2016-08-19 Pedro Alves <palves@redhat.com>
2723 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2724 comment. Use memcpy instead of casting through unsigned long.
2726 2016-08-19 Pedro Alves <palves@redhat.com>
2728 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2729 allocating around 0x80000000.
2731 2016-08-19 Pedro Alves <palves@redhat.com>
2734 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2735 (x32-avx512-linux-ipa.o): New rules.
2736 * configure.ac (x86_64-*-linux*): New x32 check.
2737 * configure.srv (ipa_x32_linux_regobj): New.
2738 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2739 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2741 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2743 * configure: Regenerate.
2745 2016-08-09 Pedro Alves <palves@redhat.com>
2748 * Makefile.in (OBS): Add signals-state-save-restore.o.
2749 (signals-state-save-restore.o): New rule.
2750 * config.in: Regenerate.
2751 * configure: Regenerate.
2752 * linux-low.c: Include "signals-state-save-restore.h".
2753 (linux_create_inferior): Call
2754 restore_original_signals_state.
2755 * server.c: Include "dispositions-save-restore.h".
2756 (captured_main): Call save_original_signals_state.
2758 2016-08-05 Pedro Alves <palves@redhat.com>
2760 * configure: Regenerate.
2762 2016-08-04 Yao Qi <yao.qi@linaro.org>
2764 * linux-low.c (regsets_fetch_inferior_registers): Check
2765 errno is ESRCH or not.
2767 2016-08-02 Yao Qi <yao.qi@linaro.org>
2769 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2770 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2771 (thread_db_load_search): Update.
2772 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2773 td_ta_set_event and td_ta_event_getmsg.
2775 2016-07-26 Pedro Alves <palves@redhat.com>
2778 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2779 of unsigned long for 64-bit registers and use uint32_t instead of
2780 unsigned int for 32-bit registers.
2782 2016-07-26 Pedro Alves <palves@redhat.com>
2784 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2787 2016-07-21 Tom Tromey <tom@tromey.com>
2789 * configure: Rebuild.
2791 2016-07-21 Yao Qi <yao.qi@linaro.org>
2793 * mem-break.c (find_gdb_breakpoint): Cast bp to
2794 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2796 2016-07-21 Yao Qi <yao.qi@linaro.org>
2798 * server.c (handle_v_requests): Support s and S actions
2799 if target_supports_software_single_step return true.
2801 2016-07-21 Yao Qi <yao.qi@linaro.org>
2803 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2804 is resume_step, call maybe_hw_step.
2805 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2807 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2809 (proceed_one_lwp): If resume request is resume_step, install
2810 reinsert breakpoints and call maybe_hw_step.
2812 2016-07-21 Yao Qi <yao.qi@linaro.org>
2814 * linux-low.c (proceed_one_lwp): Declare.
2815 (linux_resume_one_thread): Remove local variable 'step'.
2816 Lift code enqueue signal. Call proceed_one_lwp instead of
2817 linux_resume_one_lwp.
2819 2016-07-21 Yao Qi <yao.qi@linaro.org>
2821 * linux-low.c (linux_resume_one_thread): Call
2822 enqueue_pending_signal.
2824 2016-07-21 Yao Qi <yao.qi@linaro.org>
2826 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2827 * inferiors.c (do_restore_current_thread_cleanup): New function.
2828 (make_cleanup_restore_current_thread): Likewise.
2829 * linux-low.c (install_software_single_step_breakpoints): Call
2830 make_cleanup_restore_current_thread. Switch current_thread to
2833 2016-07-21 Yao Qi <yao.qi@linaro.org>
2835 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2836 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2837 (clone_one_breakpoint): Likewise.
2838 (delete_reinsert_breakpoints): Change parameter to thread.
2840 (has_reinsert_breakpoints): Likewise.
2841 (uninsert_reinsert_breakpoints): Likewise.
2842 (reinsert_reinsert_breakpoints): Likewise.
2843 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2844 (delete_reinsert_breakpoints): Likewise.
2845 (reinsert_reinsert_breakpoints): Likewise.
2846 (uninsert_reinsert_breakpoints): Likewise.
2847 (has_reinsert_breakpoints): Likewise.
2849 2016-07-21 Yao Qi <yao.qi@linaro.org>
2851 * inferiors.c (get_thread_process): Make parameter const.
2852 * inferiors.h (get_thread_process): Update declaration.
2853 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2854 Add new parameters child_thread and parent_thread. Callers
2856 * mem-break.h (clone_all_breakpoints): Update declaration.
2858 2016-07-21 Yao Qi <yao.qi@linaro.org>
2860 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2861 <command_list, handler>: Remove.
2862 (struct gdb_breakpoint): New.
2863 (struct other_breakpoint): New.
2864 (struct reinsert_breakpoint): New.
2865 (is_gdb_breakpoint): New function.
2866 (any_persistent_commands): Update command_list if
2867 is_gdb_breakpoint returns true.
2868 (set_breakpoint): Create breakpoints according to their types.
2869 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2870 (set_gdb_breakpoint_1): Likewise.
2871 (set_gdb_breakpoint): Likewise.
2872 (clear_breakpoint_conditions): Change parameter type to
2873 'struct gdb_breakpoint *'.
2874 (clear_breakpoint_commands): Likewise.
2875 (clear_breakpoint_conditions_and_commands): Likewise.
2876 (add_condition_to_breakpoint): Likewise.
2877 (add_breakpoint_condition): Likewise.
2878 (add_commands_to_breakpoint): Likewise.
2879 (check_breakpoints): Check other_breakpoint.
2880 (clone_one_breakpoint): Clone breakpopint according to its type.
2881 * mem-break.h (struct gdb_breakpoint): Declare.
2882 (set_gdb_breakpoint): Update declaration.
2883 (clear_breakpoint_conditions_and_commands): Likewise.
2884 (add_breakpoint_condition): Likewise.
2885 (add_breakpoint_commands): Likewise.
2886 * server.c (process_point_options): Change parameter type to
2887 'struct gdb_breakpoint *'.
2889 2016-07-21 Yao Qi <yao.qi@linaro.org>
2891 * mem-break.c (set_breakpoint_at): Rename it to ...
2892 (set_breakpoint_type_at): ... it.
2893 (set_breakpoint_at): Call set_breakpoint_type_at.
2894 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2895 * mem-break.h (set_breakpoint_at): Update comments.
2897 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2899 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2901 (nios2_store_gregset): Likewise.
2903 2016-07-01 Pedro Alves <palves@redhat.com>
2904 Antoine Tremblay <antoine.tremblay@ericsson.com>
2906 * linux-low.c: Change interface to take the target lwp_info
2907 pointer directly and return void. Handle detaching from a zombie
2909 (linux_detach_lwp_callback): New function.
2910 (linux_detach): Detach from the leader thread after detaching from
2913 2016-06-28 Yao Qi <yao.qi@linaro.org>
2915 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2916 for variable new_offset.
2917 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2918 (aarch64_ftrace_insn_reloc_cb): Likewise.
2919 (aarch64_ftrace_insn_reloc_tb): Likewise.
2920 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2921 PRIx64 instead of PRIx32.
2923 2016-06-28 Yao Qi <yao.qi@linaro.org>
2925 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2926 (the_low_target): Install arm_get_syscall_trapinfo.
2928 2016-06-28 Yao Qi <yao.qi@linaro.org>
2930 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2932 (the_low_target): Install aarch64_get_syscall_trapinfo.
2934 2016-06-28 Yao Qi <yao.qi@linaro.org>
2936 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2938 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2939 Remove parameter sysno.
2940 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2943 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2945 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2946 (s390_emit_ne_goto): Likewise.
2947 (s390_emit_lt_goto): Likewise.
2948 (s390_emit_le_goto): Likewise.
2949 (s390_emit_gt_goto): Likewise.
2950 (s390_emit_ge_goto): Likewise.
2951 (s390x_emit_eq_goto): Likewise.
2952 (s390x_emit_ne_goto): Likewise.
2953 (s390x_emit_lt_goto): Likewise.
2954 (s390x_emit_le_goto): Likewise.
2955 (s390x_emit_gt_goto): Likewise.
2956 (s390x_emit_ge_goto): Likewise.
2957 (s390_emit_ops_impl): Mark variable static.
2958 (s390x_emit_ops): Likewise.
2960 2016-06-17 Yao Qi <yao.qi@linaro.org>
2962 * linux-low.c (handle_extended_wait): Call
2963 uninsert_reinsert_breakpoints for the parent process. Remove
2964 reinsert breakpoints from the child process. Reinsert them to
2965 the parent process when vfork is done.
2966 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2967 (reinsert_reinsert_breakpoints): New function.
2968 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2969 (reinsert_reinsert_breakpoints): Declare.
2971 2016-06-17 Yao Qi <yao.qi@linaro.org>
2973 * linux-low.c (handle_extended_wait): If the parent is doing
2974 step-over, remove the reinsert breakpoints from the forked child.
2976 2016-06-17 Yao Qi <yao.qi@linaro.org>
2978 * linux-low.c (unsuspend_all_lwps): Declare.
2979 (linux_low_filter_event): If thread exited, call finish_step_over.
2980 If step-over is finished, unsuspend other threads.
2982 2016-06-17 Yao Qi <yao.qi@linaro.org>
2984 * linux-low.c (linux_resume_one_lwp_throw): Assert
2985 has_reinsert_breakpoints returns false.
2986 * mem-break.c (delete_disabled_breakpoints): Assert
2987 bp type isn't reinsert_breakpoint.
2989 2016-06-17 Yao Qi <yao.qi@linaro.org>
2991 * linux-low.c (maybe_hw_step): New function.
2992 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2993 (finish_step_over): Switch current_thread to lwp temporarily,
2994 and assert has_reinsert_breakpoints returns true.
2995 (proceed_one_lwp): Call maybe_hw_step.
2996 * mem-break.c (has_reinsert_breakpoints): New function.
2997 * mem-break.h (has_reinsert_breakpoints): Declare.
2999 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3001 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3003 2016-05-17 Yao Qi <yao.qi@linaro.org>
3005 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3006 instead of find_inferior.
3008 2016-05-05 Yao Qi <yao.qi@linaro.org>
3010 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3011 Initialize res to zero.
3013 2016-05-05 Yao Qi <yao.qi@linaro.org>
3015 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3018 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3020 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3021 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3022 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3024 2016-04-28 Par Olsson <par.olsson@windriver.com>
3025 Simon Marchi <simon.marchi@ericsson.com>
3027 * tracepoint.c (write_inferior_int8): New function.
3028 (cmd_qtenable_disable): Write enable flag using
3029 write_inferior_int8.
3031 2016-04-25 Yao Qi <yao.qi@linaro.org>
3033 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3034 (need_step_over_p): Return zero if the LWP has pending signals
3035 can be delivered on software single step target.
3037 2016-04-25 Yao Qi <yao.qi@linaro.org>
3039 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3040 return instead of error.
3042 2016-04-22 Yao Qi <yao.qi@linaro.org>
3044 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3047 2016-04-22 Yao Qi <yao.qi@linaro.org>
3049 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3050 signal when stepping over breakpoint with software single
3053 2016-04-21 Pedro Alves <palves@redhat.com>
3055 * linux-s390-low.c (s390_collect_ptrace_register)
3056 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3058 (s390_check_regset): Use void * instead of gdb_byte *.
3060 2016-04-20 Pedro Alves <palves@redhat.com>
3062 * configure: Renegerate.
3064 2016-04-20 Yao Qi <yao.qi@linaro.org>
3066 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3067 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3069 (arm_store_gregset): Likewise.
3071 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3073 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3074 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3075 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3076 (amd64-avx-mpx-linux.c): New rules.
3077 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3078 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3079 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3080 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3081 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3082 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3083 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3084 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3085 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3086 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3087 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3088 * linux-x86-low.c (x86_linux_read_description): Add case for
3089 X86_XSTATE_AVX_MPX_MASK.
3090 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3091 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3092 init_registers_i386_avx_mpx_linux.
3093 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3094 (initialize_low_tracepoint): Call
3095 init_registers_i386_avx_mpx_linux.
3096 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3097 (initialize_low_tracepoint): Call
3098 init_registers_amd64_avx_mpx_linux.
3099 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3100 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3101 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3104 2016-04-18 Pedro Alves <palves@redhat.com>
3106 * configure: Regenerate.
3108 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3110 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3111 (aarch64_emit_sub): Likewise.
3113 2016-04-12 Pedro Alves <palves@redhat.com>
3115 * utils.c (prepare_to_throw_exception): Delete.
3117 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3119 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3121 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3123 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3125 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3127 * linux-aarch64-ipa.c: Add <elf.h> include.
3128 * linux-ppc-ipa.c: Add <elf.h> include.
3129 * linux-s390-ipa.c: Add <elf.h> include.
3131 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3133 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3134 (get_raw_reg_ptr): Likewise.
3135 (get_trace_state_variable_value_ptr): Likewise.
3136 (set_trace_state_variable_value_ptr): Likewise.
3137 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3140 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3141 Marcin Kościelnicki <koriakin@0x04.net>
3144 * linux-ppc-low.c (emit_insns): New function.
3145 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3146 (ppc_emit_prologue): New function.
3147 (ppc_emit_epilogue): New function.
3148 (ppc_emit_add): New function.
3149 (ppc_emit_sub): New function.
3150 (ppc_emit_mul): New function.
3151 (ppc_emit_lsh): New function.
3152 (ppc_emit_rsh_signed): New function.
3153 (ppc_emit_rsh_unsigned): New function.
3154 (ppc_emit_ext): New function.
3155 (ppc_emit_zero_ext): New function.
3156 (ppc_emit_log_not): New function.
3157 (ppc_emit_bit_and): New function.
3158 (ppc_emit_bit_or): New function.
3159 (ppc_emit_bit_xor): New function.
3160 (ppc_emit_bit_not): New function.
3161 (ppc_emit_equal): New function.
3162 (ppc_emit_less_signed): New function.
3163 (ppc_emit_less_unsigned): New function.
3164 (ppc_emit_ref): New function.
3165 (ppc_emit_const): New function.
3166 (ppc_emit_reg): New function.
3167 (ppc_emit_pop): New function.
3168 (ppc_emit_stack_flush): New function.
3169 (ppc_emit_swap): New function.
3170 (ppc_emit_stack_adjust): New function.
3171 (ppc_emit_call): New function.
3172 (ppc_emit_int_call_1): New function.
3173 (ppc_emit_void_call_2): New function.
3174 (ppc_emit_if_goto): New function.
3175 (ppc_emit_goto): New function.
3176 (ppc_emit_eq_goto): New function.
3177 (ppc_emit_ne_goto): New function.
3178 (ppc_emit_lt_goto): New function.
3179 (ppc_emit_le_goto): New function.
3180 (ppc_emit_gt_goto): New function.
3181 (ppc_emit_ge_goto): New function.
3182 (ppc_write_goto_address): New function.
3183 (ppc_emit_ops_impl): New static variable.
3184 (ppc64v1_emit_prologue): New function.
3185 (ppc64v2_emit_prologue): New function.
3186 (ppc64_emit_epilogue): New function.
3187 (ppc64_emit_add): New function.
3188 (ppc64_emit_sub): New function.
3189 (ppc64_emit_mul): New function.
3190 (ppc64_emit_lsh): New function.
3191 (ppc64_emit_rsh_signed): New function.
3192 (ppc64_emit_rsh_unsigned): New function.
3193 (ppc64_emit_ext): New function.
3194 (ppc64_emit_zero_ext): New function.
3195 (ppc64_emit_log_not): New function.
3196 (ppc64_emit_bit_and): New function.
3197 (ppc64_emit_bit_or): New function.
3198 (ppc64_emit_bit_xor): New function.
3199 (ppc64_emit_bit_not): New function.
3200 (ppc64_emit_equal): New function.
3201 (ppc64_emit_less_signed): New function.
3202 (ppc64_emit_less_unsigned): New function.
3203 (ppc64_emit_ref): New function.
3204 (ppc64_emit_const): New function.
3205 (ppc64v1_emit_reg): New function.
3206 (ppc64v2_emit_reg): New function.
3207 (ppc64_emit_pop): New function.
3208 (ppc64_emit_stack_flush): New function.
3209 (ppc64_emit_swap): New function.
3210 (ppc64v1_emit_call): New function.
3211 (ppc64v2_emit_call): New function.
3212 (ppc64v1_emit_int_call_1): New function.
3213 (ppc64v2_emit_int_call_1): New function.
3214 (ppc64v1_emit_void_call_2): New function.
3215 (ppc64v2_emit_void_call_2): New function.
3216 (ppc64_emit_if_goto): New function.
3217 (ppc64_emit_eq_goto): New function.
3218 (ppc64_emit_ne_goto): New function.
3219 (ppc64_emit_lt_goto): New function.
3220 (ppc64_emit_le_goto): New function.
3221 (ppc64_emit_gt_goto): New function.
3222 (ppc64_emit_ge_goto): New function.
3223 (ppc64v1_emit_ops_impl): New static variable.
3224 (ppc64v2_emit_ops_impl): New static variable.
3225 (ppc_emit_ops): New function.
3226 (linux_low_target): Wire in ppc_emit_ops.
3228 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3229 Marcin Kościelnicki <koriakin@0x04.net>
3232 * Makefile.in: Add powerpc-*-ipa.o
3233 * configure.srv: Add ipa_obj for powerpc*-linux.
3234 * linux-ppc-ipa.c: New file.
3235 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3237 (PPC_FIELD): New macro.
3238 (PPC_SEXT): New macro.
3239 (PPC_OP6): New macro.
3240 (PPC_BO): New macro.
3241 (PPC_LI): New macro.
3242 (PPC_BD): New macro.
3243 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3244 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3245 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3246 (ppc_get_thread_area): New function.
3247 (is_elfv2_inferior): New function.
3248 (gen_ds_form): New function.
3249 (GEN_STD): New macro.
3250 (GEN_STDU): New macro.
3251 (GEN_LD): New macro.
3252 (GEN_LDU): New macro.
3253 (gen_d_form): New function.
3254 (GEN_ADDI): New macro.
3255 (GEN_ADDIS): New macro.
3256 (GEN_LI): New macro.
3257 (GEN_LIS): New macro.
3258 (GEN_ORI): New macro.
3259 (GEN_ORIS): New macro.
3260 (GEN_LWZ): New macro.
3261 (GEN_STW): New macro.
3262 (GEN_STWU): New macro.
3263 (gen_xfx_form): New function.
3264 (GEN_MFSPR): New macro.
3265 (GEN_MTSPR): New macro.
3266 (GEN_MFCR): New macro.
3267 (GEN_MTCR): New macro.
3268 (GEN_SYNC): New macro.
3269 (GEN_LWSYNC): New macro.
3270 (gen_x_form): New function.
3271 (GEN_OR): New macro.
3272 (GEN_MR): New macro.
3273 (GEN_LWARX): New macro.
3274 (GEN_STWCX): New macro.
3275 (GEN_CMPW): New macro.
3276 (gen_md_form): New function.
3277 (GEN_RLDICL): New macro.
3278 (GEN_RLDICR): New macro.
3279 (gen_i_form): New function.
3281 (GEN_BL): New macro.
3282 (gen_b_form): New function.
3283 (GEN_BNE): New macro.
3284 (GEN_LOAD): New macro.
3285 (GEN_STORE): New macro.
3286 (gen_limm): New function.
3287 (gen_atomic_xchg): New function.
3288 (gen_call): New function.
3289 (ppc_relocate_instruction): New function.
3290 (ppc_install_fast_tracepoint_jump_pad): New function.
3291 (ppc_get_min_fast_tracepoint_insn_len): New function.
3292 (ppc_get_ipa_tdesc_idx): New function.
3293 (the_low_target): Wire in the new functions.
3294 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3296 * linux-ppc-tdesc.h: New file.
3298 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3300 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3301 (alloc_jump_pad_buffer): New function.
3302 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3303 (alloc_jump_pad_buffer): New function.
3304 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3305 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3306 (alloc_jump_pad_buffer): New function.
3307 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3308 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3309 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3310 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3312 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3314 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3315 * linux-amd64-ipa.c: Likewise.
3316 * linux-i386-ipa.c: Likewise.
3317 * linux-s390-ipa.c: Likewise.
3318 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3319 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3320 set_trace_state_variable_value_ptr.
3321 (struct ipa_sym_addresses): Likewise.
3322 (symbol_list): Likewise.
3323 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3324 accessing gdb_collect directly.
3325 (gdb_collect_ptr_type): New typedef.
3326 (get_raw_reg_ptr_type): New typedef.
3327 (get_trace_state_variable_value_ptr_type): New typedef.
3328 (set_trace_state_variable_value_ptr_type): New typedef.
3329 (gdb_collect_ptr): New global.
3330 (get_raw_reg_ptr): New global.
3331 (get_trace_state_variable_value_ptr): New global.
3332 (set_trace_state_variable_value_ptr): New global.
3333 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3334 accessing get_raw_reg directly.
3335 (get_get_tsv_func_addr): Likewise for
3336 get_trace_state_variable_value_ptr.
3337 (get_set_tsv_func_addr): Likewise for
3338 set_trace_state_variable_value_ptr.
3339 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3341 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3343 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3345 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3347 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3349 (relocate_instruction): Remove own_buf.
3350 * server.c (own_buf): Make global.
3351 (handle_v_requests): Make global.
3352 * server.h (own_buf): New declaration.
3353 (handle_v_requests): New prototype.
3355 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3358 * linux-s390-low.c (add_insns): New function.
3359 (s390_emit_prologue): New function.
3360 (s390_emit_epilogue): New function.
3361 (s390_emit_add): New function.
3362 (s390_emit_sub): New function.
3363 (s390_emit_mul): New function.
3364 (s390_emit_lsh): New function.
3365 (s390_emit_rsh_signed): New function.
3366 (s390_emit_rsh_unsigned): New function.
3367 (s390_emit_ext): New function.
3368 (s390_emit_log_not): New function.
3369 (s390_emit_bit_and): New function.
3370 (s390_emit_bit_or): New function.
3371 (s390_emit_bit_xor): New function.
3372 (s390_emit_bit_not): New function.
3373 (s390_emit_equal): New function.
3374 (s390_emit_less_signed): New function.
3375 (s390_emit_less_unsigned): New function.
3376 (s390_emit_ref): New function.
3377 (s390_emit_if_goto): New function.
3378 (s390_emit_goto): New function.
3379 (s390_write_goto_address): New function.
3380 (s390_emit_litpool): New function.
3381 (s390_emit_const): New function.
3382 (s390_emit_call): New function.
3383 (s390_emit_reg): New function.
3384 (s390_emit_pop): New function.
3385 (s390_emit_stack_flush): New function.
3386 (s390_emit_zero_ext): New function.
3387 (s390_emit_swap): New function.
3388 (s390_emit_stack_adjust): New function.
3389 (s390_emit_set_r2): New function.
3390 (s390_emit_int_call_1): New function.
3391 (s390_emit_void_call_2): New function.
3392 (s390_emit_eq_goto): New function.
3393 (s390_emit_ne_goto): New function.
3394 (s390_emit_lt_goto): New function.
3395 (s390_emit_le_goto): New function.
3396 (s390_emit_gt_goto): New function.
3397 (s390_emit_ge_goto): New function.
3398 (s390x_emit_prologue): New function.
3399 (s390x_emit_epilogue): New function.
3400 (s390x_emit_add): New function.
3401 (s390x_emit_sub): New function.
3402 (s390x_emit_mul): New function.
3403 (s390x_emit_lsh): New function.
3404 (s390x_emit_rsh_signed): New function.
3405 (s390x_emit_rsh_unsigned): New function.
3406 (s390x_emit_ext): New function.
3407 (s390x_emit_log_not): New function.
3408 (s390x_emit_bit_and): New function.
3409 (s390x_emit_bit_or): New function.
3410 (s390x_emit_bit_xor): New function.
3411 (s390x_emit_bit_not): New function.
3412 (s390x_emit_equal): New function.
3413 (s390x_emit_less_signed): New function.
3414 (s390x_emit_less_unsigned): New function.
3415 (s390x_emit_ref): New function.
3416 (s390x_emit_if_goto): New function.
3417 (s390x_emit_const): New function.
3418 (s390x_emit_call): New function.
3419 (s390x_emit_reg): New function.
3420 (s390x_emit_pop): New function.
3421 (s390x_emit_stack_flush): New function.
3422 (s390x_emit_zero_ext): New function.
3423 (s390x_emit_swap): New function.
3424 (s390x_emit_stack_adjust): New function.
3425 (s390x_emit_int_call_1): New function.
3426 (s390x_emit_void_call_2): New function.
3427 (s390x_emit_eq_goto): New function.
3428 (s390x_emit_ne_goto): New function.
3429 (s390x_emit_lt_goto): New function.
3430 (s390x_emit_le_goto): New function.
3431 (s390x_emit_gt_goto): New function.
3432 (s390x_emit_ge_goto): New function.
3433 (s390_emit_ops): New function.
3434 (struct linux_target_ops): Fill in emit_ops hook.
3436 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3439 * Makefile.in: Add s390 IPA files.
3440 * configure.srv: Build IPA for s390.
3441 * linux-s390-ipa.c: New file.
3442 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3443 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3444 (tdesc_s390_linux32): Likewise.
3445 (init_registers_s390_linux32v1): Likewise.
3446 (tdesc_s390_linux32v1): Likewise.
3447 (init_registers_s390_linux32v2): Likewise.
3448 (tdesc_s390_linux32v2): Likewise.
3449 (init_registers_s390_linux64): Likewise.
3450 (tdesc_s390_linux64): Likewise.
3451 (init_registers_s390_linux64v1): Likewise.
3452 (tdesc_s390_linux64v1): Likewise.
3453 (init_registers_s390_linux64v2): Likewise.
3454 (tdesc_s390_linux64v2): Likewise.
3455 (init_registers_s390_te_linux64): Likewise.
3456 (tdesc_s390_te_linux64): Likewise.
3457 (init_registers_s390_vx_linux64): Likewise.
3458 (tdesc_s390_vx_linux64): Likewise.
3459 (init_registers_s390_tevx_linux64): Likewise.
3460 (tdesc_s390_tevx_linux64): Likewise.
3461 (init_registers_s390x_linux64): Likewise.
3462 (tdesc_s390x_linux64): Likewise.
3463 (init_registers_s390x_linux64v1): Likewise.
3464 (tdesc_s390x_linux64v1): Likewise.
3465 (init_registers_s390x_linux64v2): Likewise.
3466 (tdesc_s390x_linux64v2): Likewise.
3467 (init_registers_s390x_te_linux64): Likewise.
3468 (tdesc_s390x_te_linux64): Likewise.
3469 (init_registers_s390x_vx_linux64): Likewise.
3470 (tdesc_s390x_vx_linux64): Likewise.
3471 (init_registers_s390x_tevx_linux64): Likewise.
3472 (tdesc_s390x_tevx_linux64): Likewise.
3473 (have_hwcap_s390_vx): New static variable.
3474 (s390_arch_setup): Fill have_hwcap_s390_vx.
3475 (s390_get_thread_area): New function.
3476 (s390_ft_entry_gpr_esa): New const.
3477 (s390_ft_entry_gpr_zarch): New const.
3478 (s390_ft_entry_misc): New const.
3479 (s390_ft_entry_fr): New const.
3480 (s390_ft_entry_vr): New const.
3481 (s390_ft_main_31): New const.
3482 (s390_ft_main_64): New const.
3483 (s390_ft_exit_fr): New const.
3484 (s390_ft_exit_vr): New const.
3485 (s390_ft_exit_misc): New const.
3486 (s390_ft_exit_gpr_esa): New const.
3487 (s390_ft_exit_gpr_zarch): New const.
3488 (append_insns): New function.
3489 (s390_relocate_instruction): New function.
3490 (s390_install_fast_tracepoint_jump_pad): New function.
3491 (s390_get_min_fast_tracepoint_insn_len): New function.
3492 (s390_get_ipa_tdesc_idx): New function.
3493 (struct linux_target_ops): Wire in the above functions.
3494 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3495 * linux-s390-tdesc.h: New file.
3497 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3499 * linux-s390-low.c (s390_supports_tracepoints): New function.
3500 (struct linux_target_ops): Fill supports_tracepoints hook.
3502 2016-03-18 Yao Qi <yao.qi@linaro.org>
3504 * linux-low.c (lwp_signal_can_be_delivered): New function.
3505 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3507 2016-03-18 Yao Qi <yao.qi@linaro.org>
3509 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3510 0 if signal is enqueued. Remove 'signal' from one debugging
3511 message. Move one debugging message to some lines below.
3512 Remove code setting 'signal' to 0.
3514 2016-03-18 Yao Qi <yao.qi@linaro.org>
3516 * linux-low.c (linux_low_filter_event): Remove redundant
3517 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3519 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3521 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3522 (struct linux_target_ops): Wire in the above.
3524 2016-03-03 Yao Qi <yao.qi@linaro.org>
3526 * linux-low.c: Update comments to start_step_over.
3528 2016-03-03 Yao Qi <yao.qi@linaro.org>
3531 * linux-low.c (handle_extended_wait): Set child suspended
3532 if event_lwp->bp_reinsert isn't zero.
3534 2016-03-02 Yao Qi <yao.qi@linaro.org>
3536 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3537 enqueue_pending_signal.
3539 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3541 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3544 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3546 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3547 (s390_regmap_3264) [!__s390x__]: New global.
3548 (s390_collect_ptrace_register): Skip map entries containing -1.
3549 (s390_supply_ptrace_register): Ditto.
3550 (s390_fill_gprs_high): New function.
3551 (s390_store_gprs_high): New function.
3552 (s390_regsets): Add NT_S390_HIGH_GPRS.
3553 (s390_get_hwcap): Enable on 31-bit.
3554 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3555 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3556 Detect NT_S390_HIGH_GPRS.
3557 (s390_usrregs_info_3264): Enable on 31-bit.
3558 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3559 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3561 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3564 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3565 * configure.srv: Ditto.
3566 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3567 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3568 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3569 (init_registers_amd64_linux): Remove prototype.
3570 (tdesc_amd64_linux): Remove declaration.
3571 (get_ipa_tdesc): New function.
3572 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3573 initialize remaining tdescs.
3574 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3575 (init_registers_i386_linux): Remove prototype.
3576 (tdesc_i386_linux): Remove declaration.
3577 (get_ipa_tdesc): New function.
3578 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3579 initialize remaining tdescs.
3580 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3581 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3582 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3583 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3584 (x86_get_ipa_tdesc_idx): New function.
3585 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3586 * linux-x86-tdesc.h: New file.
3587 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3588 (target_get_ipa_tdesc_idx): New macro.
3589 * tracepoint.c (ipa_tdesc_idx): New macro.
3590 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3591 (symbol_list): Add ipa_tdesc_idx.
3592 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3593 (ipa_tdesc): Remove.
3594 (ipa_tdesc_idx): New variable.
3595 (get_context_regcache): Use get_ipa_tdesc.
3596 (gdb_collect): Ditto.
3598 * tracepoint.h (get_ipa_tdesc): New prototype.
3599 (ipa_tdesc): Remove.
3601 2016-02-24 Pedro Alves <palves@redhat.com>
3603 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3604 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3605 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3606 Factor out common code between the USE_SIGTRAP_SIGINFO and
3607 !USE_SIGTRAP_SIGINFO blocks.
3608 (linux_low_filter_event): Call save_stop_reason instead of
3609 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3611 (linux_wait_1): Update comments.
3613 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3615 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3616 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3617 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3618 ppc_insert_point, ppc_remove_point.
3620 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3622 * linux-s390-low.c (s390_supports_z_point_type): New function.
3623 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3625 2016-02-16 Yao Qi <yao.qi@linaro.org>
3627 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3628 PC. Get pc from regcache_read_pc.
3630 2016-02-12 Yao Qi <yao.qi@linaro.org>
3632 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3633 or linux_get_pc_32bit.
3634 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3636 2016-02-12 Yao Qi <yao.qi@linaro.org>
3638 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3639 arm_linux_get_next_pcs_fixup.
3641 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3643 * tracepoint.c (x_tracepoint_action_download): Change
3644 write_inferior_data_ptr to write_inferior_data_pointer.
3645 (cmd_qtstart): Likewise.
3646 (write_inferior_data_ptr): Remove.
3647 (download_agent_expr): Change write_inferior_data_ptr to
3648 write_inferior_data_pointer.
3649 (download_tracepoint_1): Likewise.
3650 (download_tracepoint): Likewise.
3651 (download_trace_state_variables): Likewise.
3653 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3654 Marcin Kościelnicki <koriakin@0x04.net>
3656 * tracepoint.c (struct tracepoint_action_ops): Remove.
3657 (struct tracepoint_action): Remove ops.
3658 (m_tracepoint_action_download, r_tracepoint_action_download)
3659 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3660 size and offset accordingly.
3661 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3662 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3663 (tracepoint_action_send, tracepoint_action_download): New functions.
3664 Helpers for trace action handlers.
3665 (add_tracepoint_action): Remove setup actions ops.
3666 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3668 2016-02-10 Yao Qi <yao.qi@linaro.org>
3670 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3672 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3674 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3676 * configure: Regenerate.
3678 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3680 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3681 void * to gdb_byte *.
3682 * linux-low.c (siginfo_fixup): Likewise.
3683 (linux_xfer_siginfo): Likewise.
3684 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3686 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3688 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3690 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3692 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3694 * linux-x86-low.c [__x86_64__]: Include
3695 "nat/amd64-linux-siginfo.h".
3696 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3697 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3698 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3699 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3700 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3701 (cpt_si_fd, si_timerid, si_overrun): Move from
3702 nat/amd64-linux-siginfo.c.
3703 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3705 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3707 * server.c (skip_to_semicolon): Remove.
3708 (process_point_options): Use strchrnul instead of
3711 2016-01-26 Yao Qi <yao.qi@linaro.org>
3713 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3714 * linux-low.c (install_software_single_step_breakpoints): Don't
3715 call regcache_read_pc.
3716 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3719 2016-01-26 Yao Qi <yao.qi@linaro.org>
3721 * linux-low.c (install_software_single_step_breakpoints): Call
3722 regcache_read_pc instead of get_pc.
3724 2016-01-26 Yao Qi <yao.qi@linaro.org>
3726 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3727 (unblock_async_io): Rename to ...
3728 (block_unblock_async_io): ... it. New function.
3729 (enable_async_io): Don't install SIGIO handler. Unblock it
3731 (disable_async_io): Don't ignore SIGIO. Block it instead.
3732 (initialize_async_io): Install SIGIO handler. Don't call
3735 2016-01-26 Yao Qi <yao.qi@linaro.org>
3737 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3738 first character is '\003', call *the_target->request_interrupt.
3740 2016-01-25 Yao Qi <yao.qi@linaro.org>
3742 * remote-utils.c (new_thread_notify): Remove.
3743 (dead_thread_notify): Likewise.
3744 * remote-utils.h (new_thread_notify): Remove declaration.
3745 (dead_thread_notify): Likewise.
3747 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3749 * gdb.trace/pending.exp: Fix expected message on continue.
3751 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3753 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3754 it works properly on big-endian machines where sizeof (CORE_ADDR)
3757 2016-01-21 Pedro Alves <palves@redhat.com>
3759 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3760 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3761 * configure: Regenerate.
3763 2016-01-21 Yao Qi <yao.qi@linaro.org>
3765 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3766 is_thumb and set it according to CPSR saved on the stack.
3767 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3768 arm_sigreturn_next_pc.
3770 2016-01-18 Yao Qi <yao.qi@linaro.org>
3772 * linux-low.c (linux_set_pc_64bit): New function.
3773 (linux_get_pc_64bit): New function.
3774 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3776 * linux-sparc-low.c (debug_threads): Remove declaration.
3777 (sparc_get_pc): Remove.
3778 (the_low_target): Use linux_get_pc_64bit instead of
3780 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3781 (the_low_target): Use linux_get_pc_64bit and
3784 2016-01-18 Yao Qi <yao.qi@linaro.org>
3786 * linux-arm-low.c (debug_threads): Remove declaration.
3787 (arm_get_pc, arm_set_pc): Remove.
3788 (the_low_target): Use linux_get_pc_32bit and
3790 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3791 (the_low_target): Use linux_get_pc_32bit and
3793 * linux-cris-low.c (debug_threads): Remove declaration.
3794 (cris_get_pc, cris_set_pc,): Remove.
3795 (the_low_target): Use linux_get_pc_32bit and
3797 * linux-crisv32-low.c (debug_threads): Remove declaration.
3798 (cris_get_pc, cris_set_pc): Remove.
3799 (the_low_target): Use linux_get_pc_32bit and
3801 * linux-low.c: Include inttypes.h.
3802 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3803 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3804 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3805 (the_low_target): Use linux_get_pc_32bit and
3807 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3808 (the_low_target): Use linux_get_pc_32bit and
3810 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3811 (the_low_target): Use linux_get_pc_32bit and
3813 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3814 (the_low_target): Use linux_get_pc_32bit and
3816 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3817 (the_low_target): Use linux_get_pc_32bit and
3820 2016-01-18 Gary Benson <gbenson@redhat.com>
3822 * configure.ac (AC_FUNC_FORK): New check.
3823 * config.in: Regenerate.
3824 * configure: Likewise.
3826 2016-01-14 Yao Qi <yao.qi@linaro.org>
3828 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3829 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3830 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3831 arm_get_next_pcs_ctor.
3833 2016-01-12 Josh Stone <jistone@redhat.com>
3834 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3836 * inferiors.h: Include "gdb_vecs.h".
3837 (struct process_info): Add syscalls_to_catch.
3838 * inferiors.c (remove_process): Free syscalls_to_catch.
3839 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3840 syscall_return stops.
3841 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3842 * server.c (handle_general_set): Handle QCatchSyscalls.
3843 (handle_query): Report support for QCatchSyscalls.
3844 * target.h (struct target_ops): Add supports_catch_syscall.
3845 (target_supports_catch_syscall): New macro.
3846 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3847 (struct lwp_info): Add syscall_state.
3848 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3849 Maintain syscall_state and syscalls_to_catch across exec.
3850 (get_syscall_trapinfo): New function, proxy to the_low_target.
3851 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3852 (linux_low_filter_event): Toggle syscall_state entry/return for
3853 syscall traps, and set it ignored for all others.
3854 (gdb_catching_syscalls_p): New function.
3855 (gdb_catch_this_syscall_p): New function.
3856 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3857 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3858 (linux_supports_catch_syscall): New function.
3859 (linux_target_ops): Install it.
3860 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3861 (the_low_target): Install it.
3863 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3865 * acinclude.m4: Include new ../warning.m4 file.
3866 * configure: Regenerated.
3867 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3869 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3871 * ax.c (is_goto_target): Mark static.
3872 * linux-low.c (register_addr): Likewise.
3873 (linux_fetch_registers, linux_store_registers): Likewise.
3874 * mem-break.c (any_persistent_commands): Fix old prototype.
3875 (add_commands_to_breakpoint): Mark static.
3876 * regcache.c (find_register_by_name): Delete unused func.
3877 * remote-utils.c (hex_or_minus_one): Mark static.
3878 * server.c (monitor_show_help): Mark static.
3879 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3880 handle_v_requests): Likewise.
3882 2016-01-12 Pedro Alves <palves@redhat.com>
3884 Remove use of the registered trademark symbol throughout.
3886 2016-01-08 Yao Qi <yao.qi@linaro.org>
3888 * remote-utils.c (getpkt): If c is '\003', call target hook
3891 2016-01-06 Yao Qi <yao.qi@linaro.org>
3893 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3894 linux-aarch32-low.c.
3895 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3896 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3897 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3898 (thumb2_breakpoint): Declare.
3899 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3900 linux-aarch32-low.h.
3901 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3902 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3903 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3905 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3907 * gdbreplay.c (gdbreplay_version): Change copyright year in
3909 * server.c (gdbserver_version): Likewise.
3911 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3913 * server.c (crc32_table): Delete.
3914 (crc32): Use libiberty's xcrc32 function.
3916 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3918 * lynx-low.c (lynx_delete_thread_callback): New function.
3919 (lynx_mourn): Properly delete our process and all of its
3920 threads. Remove call to clear_inferiors.
3922 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3924 * target.c (thread_search_callback): Add check that
3925 the thread_stopped target callback is not NULL before
3928 2015-12-21 Yao Qi <yao.qi@linaro.org>
3930 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3933 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3935 * server.c (handle_query): Call target_supports_software_single_step.
3937 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3939 * linux-low.c (single_step): New function.
3940 (linux_resume_one_lwp_throw): Call single_step.
3941 (start_step_over): Likewise.
3943 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3945 * Makefile.in (SFILES): Append arch/arm-linux.c,
3946 arch/arm-get-next-pcs.c.
3947 (arm-linux.o): New rule.
3948 (arm-get-next-pcs.o): New rule.
3949 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3951 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3952 to linux-aarch32-low.c.
3953 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3954 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3955 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3956 (thumb2_breakpoint_len): Likewise.
3957 (arm_is_thumb_mode): Make non-static.
3958 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3959 from linux-aarch32-low.c.
3960 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3961 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3962 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3963 (thumb2_breakpoint_len): Likewise.
3964 (arm_is_thumb_mode): New declaration.
3965 * linux-arm-low.c: Include arch/arm-linux.h
3966 aarch/arm-get-next-pcs.h, sys/syscall.h.
3967 (get_next_pcs_ops): New struct.
3968 (get_next_pcs_addr_bits_remove): New function.
3969 (get_next_pcs_is_thumb): New function.
3970 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3971 (arm_sigreturn_next_pc): Likewise.
3972 (get_next_pcs_syscall_next_pc): Likewise.
3973 (arm_gdbserver_get_next_pcs): Likewise.
3974 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3976 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3977 * server.h: Include gdb_vecs.h.
3979 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3981 * Makefile.in (SFILES): Append common/common-regcache.c.
3982 (OBS): Append common-regcache.o.
3983 (common-regcache.o): New rule.
3984 * regcache.c (init_register_cache): Initialize cache to
3986 (regcache_raw_read_unsigned): New function.
3987 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3988 register_status enum.
3990 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3992 * linux-aarch64-low.c (the_low_targets): Rename
3993 breakpoint_reinsert_addr to get_next_pcs.
3994 * linux-arm-low.c (the_low_targets): Likewise.
3995 * linux-bfin-low.c (the_low_targets): Likewise.
3996 * linux-cris-low.c (the_low_targets): Likewise.
3997 * linux-crisv32-low.c (the_low_targets): Likewise.
3998 * linux-low.c (can_software_single_step): Likewise.
3999 (install_software_single_step_breakpoints): New function.
4000 (start_step_over): Use install_software_single_step_breakpoints.
4001 * linux-low.h: New CORE_ADDR vector.
4002 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4004 * linux-mips-low.c (the_low_targets): Likewise.
4005 * linux-nios2-low.c (the_low_targets): Likewise.
4006 * linux-sparc-low.c (the_low_targets): Likewise.
4008 2015-12-17 Pedro Alves <palves@redhat.com>
4010 * linux-low.c (linux_kill_one_lwp): Remove references to
4012 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4014 (linux_init_signals): Delete.
4015 (initialize_low): Adjust.
4016 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4018 2015-12-16 Pedro Alves <palves@redhat.com>
4020 * configure.ac (compiler warning flags): When testing a
4021 -Wno-foo option, check whether -Wfoo works instead.
4022 * configure: Regenerate.
4024 2015-12-11 Don Breazeal <donb@codesourcery.com>
4026 * server.c (process_serial_event): Don't exit from gdbserver
4027 in remote mode if there are still active inferiors.
4029 2015-12-11 Yao Qi <yao.qi@linaro.org>
4031 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4032 arm_breakpoint_at if the process is 32-bit.
4034 2015-12-11 Yao Qi <yao.qi@linaro.org>
4036 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4039 2015-12-07 Yao Qi <yao.qi@linaro.org>
4041 * configure.srv: Append arm.o to srv_tgtobj for
4042 aarch64*-*-linux* target.
4043 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4044 from linux-arm-low.c.
4045 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4046 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4047 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4048 (thumb2_breakpoint_len): Likewise.
4049 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4050 (arm_breakpoint_kinds): Likewise.
4051 (arm_breakpoint_kind_from_pc): Likewise.
4052 (arm_sw_breakpoint_from_kind): Likewise.
4053 (arm_breakpoint_kind_from_current_state): Likewise.
4054 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4055 (arm_sw_breakpoint_from_kind): Declare.
4056 (arm_breakpoint_kind_from_current_state): Declare.
4057 (arm_breakpoint_at): Declare.
4058 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4059 arm_sw_breakpoint_from_kind if process is 32-bit.
4060 (aarch64_breakpoint_kind_from_pc): New function.
4061 (aarch64_breakpoint_kind_from_current_state): New function.
4062 (the_low_target): Initialize fields breakpoint_kind_from_pc
4063 and breakpoint_kind_from_current_state.
4064 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4065 linux-aarch32-low.c.
4066 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4067 (arm_breakpoint, arm_breakpoint_len): Likewise.
4068 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4069 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4070 (arm_is_thumb_mode): Likewise.
4071 (arm_breakpoint_at): Likewise.
4072 (arm_breakpoint_kind_from_pc): Likewise.
4073 (arm_sw_breakpoint_from_kind): Likewise.
4074 (arm_breakpoint_kind_from_current_state): Likewise.
4077 2015-08-04 Yao Qi <yao.qi@linaro.org>
4079 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4080 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4081 * server.c (extended_protocol): Remove "static".
4082 * server.h (extended_protocol): Declare it.
4084 2015-12-04 Josh Stone <jistone@redhat.com>
4086 * target.h (struct target_ops) <arch_setup>: Rename to ...
4087 (struct target_ops) <post_create_inferior>: ... this.
4088 (target_arch_setup): Rename to ...
4089 (target_post_create_inferior): ... this, calling post_create_inferior.
4090 * server.c (start_inferior): Update target_arch_setup calls to
4091 target_post_create_inferior.
4092 * linux-low.c (linux_low_ptrace_options): Forward declare.
4093 (linux_arch_setup): Update its comment for general use.
4094 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4095 (struct linux_target_ops): Use linux_post_create_inferior.
4096 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4097 to post_create_inferior.
4098 * nto-low.c (struct nto_target_ops): Likewise.
4099 * spu-low.c (struct spu_target_ops): Likewise.
4100 * win32-low.c (struct win32_target_ops): Likewise.
4102 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4104 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4106 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4108 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4109 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4110 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4111 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4112 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4113 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4114 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4115 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4116 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4117 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4118 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4119 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4121 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4123 * linux-low.c (linux_look_up_symbols): Don't call
4124 linux_supports_traceclone.
4125 * linux-low.h (thread_db_init): Remove use_events argument.
4126 * thread-db.c (thread_db_use_event): Remove global variable.
4127 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4128 (struct thread_db) <td_create_bp>: Remove field.
4129 (thread_db_create_event): Remove function.
4130 (thread_db_enable_reporting): Likewise.
4131 (find_one_thread): Don't check for thread_db_use_events.
4132 (attach_thread): Likewise.
4133 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4134 (try_thread_db_load_1): Don't check for thread_db_use_events.
4135 (thread_db_init): Remove use_events argument and thread events
4137 (remove_thread_event_breakpoints): Remove function.
4138 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4140 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4142 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4144 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4145 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4146 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4147 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4148 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4150 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4152 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4153 * linux-low.c (can_hardware_single_step): Use
4154 supports_hardware_single_step.
4155 (can_software_single_step): New function.
4156 (start_step_over): Call can_software_single_step.
4157 (linux_supports_hardware_single_step): New function.
4158 (struct target_ops) <supports_software_single_step>: Initialize.
4159 * linux-low.h (struct linux_target_ops)
4160 <supports_hardware_single_step>: Initialize.
4161 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4162 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4163 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4164 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4165 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4166 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4167 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4168 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4169 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4170 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4172 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4173 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4175 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4176 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4177 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4179 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4180 * target.h (struct target_ops): <supports_software_single_step>:
4182 (target_supports_software_single_step): New macro.
4184 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4186 * linux-low.c (linux_wait_1): Fix pc advance condition.
4187 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4188 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4190 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4192 * linux-arm-low.c (arm_is_thumb_mode): New function.
4193 (arm_breakpoint_at): Use arm_is_thumb_mode.
4194 (arm_breakpoint_kind_from_current_state): New function.
4195 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4197 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4198 (linux_breakpoint_kind_from_current_state): New function.
4199 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4200 * linux-low.h (struct linux_target_ops)
4201 <breakpoint_kind_from_current_state>: New field.
4202 * target.h (struct target_ops): Likewise.
4203 (target_breakpoint_kind_from_current_state): New macro.
4205 2015-11-30 Pedro Alves <palves@redhat.com>
4207 * linux-low.c (linux_resume): Wake up the event loop before
4210 2015-11-30 Pedro Alves <palves@redhat.com>
4212 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4214 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4216 * target.c (struct thread_search): New structure.
4217 (thread_search_callback): New function.
4218 (prev_general_thread): New global.
4219 (prepare_to_access_memory, done_accessing_memory): New functions.
4220 * target.h (prepare_to_access_memory, done_accessing_memory):
4221 Replace macros with function declarations.
4223 2015-11-30 Pedro Alves <palves@redhat.com>
4226 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4227 report TARGET_WAITKIND_NO_RESUMED.
4228 * remote-utils.c (prepare_resume_reply): Handle
4229 TARGET_WAITKIND_NO_RESUMED.
4230 * server.c (report_no_resumed): New global.
4231 (handle_query) <qSupported>: Handle "no-resumed+". Report
4232 "no-resumed+" support.
4233 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4234 return error if the client doesn't support no-resumed events.
4235 (push_stop_notification): New function.
4236 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4237 events if the client supports them.
4239 2015-11-30 Pedro Alves <palves@redhat.com>
4241 * linux-low.c (thread_still_has_status_pending_p): Don't check
4243 (lwp_resumed): New function.
4244 (status_pending_p_callback): Return early if the LWP is not
4245 supposed to be resumed.
4247 2015-11-30 Pedro Alves <palves@redhat.com>
4249 * linux-low.c (handle_extended_wait): Assert that the LWP's
4250 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4251 thread create events, leave the new child's status pending.
4252 (linux_low_filter_event): If GDB wants to hear about thread exit
4253 events, leave the LWP marked dead and don't delete it.
4254 (linux_wait_for_event_filtered): Don't check for thread exit.
4255 (filter_exit_event): New function.
4256 (linux_wait_1): Use it, when returning an exit event.
4257 (linux_resume_one_lwp_throw): Assert that the LWP's
4258 waitstatus is TARGET_WAITKIND_IGNORE.
4259 * remote-utils.c (prepare_resume_reply): Handle
4260 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4261 * server.c (report_thread_events): New global.
4262 (handle_general_set): Handle QThreadEvents.
4263 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4264 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4265 TARGET_WAITKIND_THREAD_EXITED.
4266 * server.h (report_thread_events): Declare.
4268 2015-11-30 Pedro Alves <palves@redhat.com>
4270 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4271 the thread's last_resume_kind was resume_stop.
4273 2015-11-30 Pedro Alves <palves@redhat.com>
4275 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4278 2015-11-30 Pedro Alves <palves@redhat.com>
4280 * server.c (handle_v_requests): Handle vCtrlC.
4282 2015-11-30 Pedro Alves <palves@redhat.com>
4284 * gdbthread.h (find_any_thread_of_pid): Declare.
4285 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4287 * server.c (handle_query): If current_thread is NULL, look for
4288 another thread of the selected process.
4290 2015-11-26 Daniel Colascione <dancol@dancol.org>
4291 Simon Marchi <simon.marchi@ericsson.com>
4293 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4294 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4296 * target.h (struct target_ops) <thread_name>: New field.
4297 (target_thread_name): New macro.
4299 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4301 * regcache.h (regcache_invalidate_pid): Add declaration.
4302 * regcache.c (regcache_invalidate_pid): New function, extracted
4303 from regcache_invalidate.
4304 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4305 Add trivial documentation comment.
4306 * lynx-low.c: Use regcache_invalidate_pid instead of
4307 regcache_invalidate.
4309 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4311 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4312 and Elf64_auxv_t if the target is Android.
4314 2015-11-22 Doug Evans <xdje42@gmail.com>
4316 * target.h: #include <sys/types.h>.
4318 2015-11-19 Pedro Alves <palves@redhat.com>
4320 * linux-low.c (linux_process_qsupported): Change prototype.
4322 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4324 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4325 and adjust to loop over all features.
4326 * server.c (handle_query) <qSupported>: Adjust to call
4327 target_process_qsupported once, passing it a vector of unprocessed
4329 * target.h (struct target_ops) <process_qsupported>: Change
4331 (target_process_qsupported): Adjust.
4333 2015-11-19 Pedro Alves <palves@redhat.com>
4335 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4337 * configure: Regenerate.
4339 2015-11-19 Pedro Alves <palves@redhat.com>
4341 * configure: Regenerate.
4343 2015-11-19 Yao Qi <yao.qi@linaro.org>
4345 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4348 2015-11-19 Yao Qi <yao.qi@linaro.org>
4350 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4351 (struct aarch64_operand): Move enum out.
4353 2015-11-19 Yao Qi <yao.qi@linaro.org>
4355 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4356 struct user_fpsimd_state *.
4357 (aarch64_store_fpregset): Likewise.
4359 2015-11-19 Yao Qi <yao.qi@linaro.org>
4361 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4362 struct user_pt_regs *.
4363 (aarch64_store_gregset): Likewise.
4365 2015-11-18 Pedro Alves <palves@redhat.com>
4367 * Makefile.in (all_object_files): Add $IPA_OBJS.
4369 2015-11-17 Pedro Alves <palves@redhat.com>
4371 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4372 GDB_SIGNAL_0 and gdb_signal_to_string.
4374 2015-11-17 Pedro Alves <palves@redhat.com>
4376 * win32-low.c (handle_output_debug_string): Remove parameter.
4377 (win32_kill): Remove our_status local and adjust call to
4378 handle_output_debug_string.
4379 (get_child_debug_event): Adjust call to
4380 handle_output_debug_string.
4382 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4384 * linux-mips-low.c (mips_fill_gregset): Add cast.
4385 (mips_store_gregset): Likewise.
4386 (mips_fill_fpregset): Likewise.
4387 (mips_store_fpregset): Likewise.
4389 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4391 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4394 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4396 * linux-mips-low.c (mips_linux_new_thread): Change type of
4397 watch_type to enum target_hw_bp_type.
4399 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4401 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4402 Change return type to arm_hwbp_type.
4404 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4406 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4407 (arm_store_gregset): Likewise.
4408 * linux-arm-low.c (arm_get_hwcap): Likewise.
4409 (arm_read_description): Likewise.
4411 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4413 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4415 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4417 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4418 (ppc_fill_vsxregset): Likewise.
4419 (ppc_store_vsxregset): Likewise.
4420 (ppc_fill_vrregset): Likewise.
4421 (ppc_store_vrregset): Likewise.
4422 (ppc_fill_evrregset): Likewise.
4423 (ppc_store_evrregset): Likewise.
4425 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4427 * linux-ppc-low.c (ppc_usrregs_info): Remove
4428 forward-declaration.
4429 (ppc_arch_setup): Move lower in file.
4431 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4433 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4434 (ps_pdwrite): Likewise.
4436 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4438 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4439 to after assert checks.
4441 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4443 * proc-service.c (ps_pdread): Add/adjust casts.
4444 (ps_pdwrite): Add/adjust casts.
4446 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4448 * server.c (handle_search_memory_1): Cast return value of
4451 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4453 * server.c (write_qxfer_response): Change type of data to
4456 2015-10-29 Pedro Alves <palves@redhat.com>
4458 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4460 2015-10-29 Pedro Alves <palves@redhat.com>
4462 * tracepoint.c (clear_installed_tracepoints): Add casts.
4464 2015-10-29 Pedro Alves <palves@redhat.com>
4466 * server.c (handle_v_cont, process_serial_event): Add enum
4467 gdb_signal casts to signal parsing code.
4469 2015-10-29 Pedro Alves <palves@redhat.com>
4471 * linux-low.h (NULL_REGSET): Define.
4472 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4473 * linux-arm-low.c (arm_regsets): Likewise.
4474 * linux-crisv32-low.c (cris_regsets): Likewise.
4475 * linux-m68k-low.c (m68k_regsets): Likewise.
4476 * linux-mips-low.c (mips_regsets): Likewise.
4477 * linux-nios2-low.c (nios2_regsets): Likewise.
4478 * linux-ppc-low.c (ppc_regsets): Likewise.
4479 * linux-s390-low.c (s390_regsets): Likewise.
4480 * linux-sh-low.c (sh_regsets): Likewise.
4481 * linux-sparc-low.c (sparc_regsets): Likewise.
4482 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4483 * linux-tile-low.c (tile_regsets): Likewise.
4484 * linux-x86-low.c (x86_regsets): Likewise.
4485 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4487 2015-10-29 Pedro Alves <palves@redhat.com>
4489 * linux-low.h (NULL_REGSET): Define.
4490 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4491 * linux-arm-low.c (arm_regsets): Likewise.
4492 * linux-crisv32-low.c (cris_regsets): Likewise.
4493 * linux-m68k-low.c (m68k_regsets): Likewise.
4494 * linux-mips-low.c (mips_regsets): Likewise.
4495 * linux-nios2-low.c (nios2_regsets): Likewise.
4496 * linux-ppc-low.c (ppc_regsets): Likewise.
4497 * linux-s390-low.c (s390_regsets): Likewise.
4498 * linux-sh-low.c (sh_regsets): Likewise.
4499 * linux-sparc-low.c (sparc_regsets): Likewise.
4500 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4501 * linux-tile-low.c (tile_regsets): Likewise.
4502 * linux-x86-low.c (x86_regsets): Likewise.
4503 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4505 2015-10-26 Doug Evans <dje@google.com>
4507 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4509 2015-10-26 Doug Evans <dje@google.com>
4511 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4513 2015-10-26 Doug Evans <dje@google.com>
4515 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4517 (attach_thread, find_new_threads_callback): Ditto.
4519 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4521 * mem-break.h (set_breakpoint_data): Remove.
4523 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4525 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4526 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4527 (initialize_low): Remove set_breakpoint_data call.
4528 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4529 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4530 (initialize_low): Remove set_breakpoint_data call.
4531 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4532 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4533 (initialize_low): Remove set_breakpoint_data call.
4535 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4537 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4538 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4539 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4540 * target.h (target_breakpoint_kind_from_pc): New macro.
4542 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4544 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4545 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4546 the default breakpoint kind.
4548 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4550 * linux-arm-low.c (arm_supports_z_point_type): Add software
4553 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4555 * linux-arm-low.c: Refactor breakpoint definitions.
4556 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4557 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4559 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4561 * Makefile.in: Add arm.c/o.
4562 * configure.srv: Likewise.
4563 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4564 (arm_breakpoint_kind_from_pc): New function.
4565 (arm_sw_breakpoint_from_kind): Return proper kind.
4566 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4568 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4570 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4572 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4573 (struct raw_breakpoint) <size>: Remove.
4574 (struct raw_breakpoint) <kind>: Add.
4575 (bp_size): New function.
4576 (bp_opcode): Likewise.
4577 (find_raw_breakpoint_at): Adjust for kind.
4578 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4579 (remove_memory_breakpoint): Adjust for kind call bp_size.
4580 (set_raw_breakpoint_at): Adjust for kind.
4581 (set_breakpoint): Likewise.
4582 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4583 (delete_raw_breakpoint): Adjust for kind.
4584 (delete_breakpoint): Likewise.
4585 (find_gdb_breakpoint): Likewise.
4586 (set_gdb_breakpoint_1): Likewise.
4587 (set_gdb_breakpoint): Likewise.
4588 (delete_gdb_breakpoint_1): Likewise.
4589 (delete_gdb_breakpoint): Likewise.
4590 (uninsert_raw_breakpoint): Likewise.
4591 (reinsert_raw_breakpoint): Likewise.
4592 (set_breakpoint_data): Remove.
4593 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4594 (check_mem_read): Adjust for kind call bp_size.
4595 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4596 (clone_one_breakpoint): Adjust for kind.
4597 * mem-break.h (set_gdb_breakpoint): Likewise.
4598 (delete_gdb_breakpoint): Likewise.
4599 * server.c (process_serial_event): Likewise.
4601 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4603 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4604 (struct linux_target_ops) <breakpoint>: Remove.
4605 (struct linux_target_ops) <breakpoint_len>: Remove.
4606 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4607 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4608 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4609 (arm_sw_breakpoint_from_kind): New function.
4610 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4611 (struct linux_target_ops) <breakpoint>: Remove.
4612 (struct linux_target_ops) <breakpoint_len>: Remove.
4613 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4614 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4615 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4616 (struct linux_target_ops) <breakpoint>: Remove.
4617 (struct linux_target_ops) <breakpoint_len>: Remove.
4618 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4619 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4620 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4621 (struct linux_target_ops) <breakpoint>: Remove.
4622 (struct linux_target_ops) <breakpoint_len>: Remove.
4623 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4624 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4625 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4626 and sw_breakpoint_from_kind to increment the pc.
4627 (linux_breakpoint_kind_from_pc): New function.
4628 (linux_sw_breakpoint_from_kind): New function.
4629 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4630 (initialize_low): Call breakpoint_kind_from_pc and
4631 sw_breakpoint_from_kind to replace breakpoint_data/len.
4632 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4634 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4635 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4636 (struct linux_target_ops) <breakpoint>: Remove.
4637 (struct linux_target_ops) <breakpoint_len>: Remove.
4638 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4639 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4640 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4641 (struct linux_target_ops) <breakpoint>: Remove.
4642 (struct linux_target_ops) <breakpoint_len>: Remove.
4643 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4644 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4645 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4646 (struct linux_target_ops) <breakpoint>: Remove.
4647 (struct linux_target_ops) <breakpoint_len>: Remove.
4648 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4649 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4650 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4651 (struct linux_target_ops) <breakpoint>: Remove.
4652 (struct linux_target_ops) <breakpoint_len>: Remove.
4653 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4654 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4655 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4656 (struct linux_target_ops) <breakpoint>: Remove.
4657 (struct linux_target_ops) <breakpoint_len>: Remove.
4658 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4659 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4660 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4661 (struct linux_target_ops) <breakpoint>: Remove.
4662 (struct linux_target_ops) <breakpoint_len>: Remove.
4663 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4664 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4665 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4666 (struct linux_target_ops) <breakpoint>: Remove.
4667 (struct linux_target_ops) <breakpoint_len>: Remove.
4668 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4669 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4670 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4671 (struct linux_target_ops) <breakpoint>: Remove.
4672 (struct linux_target_ops) <breakpoint_len>: Remove.
4673 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4674 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4675 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4676 (struct linux_target_ops) <breakpoint>: Remove.
4677 (struct linux_target_ops) <breakpoint_len>: Remove.
4678 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4679 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4680 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4681 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4682 (struct linux_target_ops) <breakpoint>: Remove.
4683 (struct linux_target_ops) <breakpoint_len>: Remove.
4684 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4685 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4686 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4687 (struct linux_target_ops) <breakpoint>: Remove.
4688 (struct linux_target_ops) <breakpoint_len>: Remove.
4689 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4690 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4692 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4694 * linux-cris-low.c (cris_get_pc): Remove void arg.
4696 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4698 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4701 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4703 * inferiors.c (thread_pid_matches_callback): New function.
4704 (find_thread_process): New function.
4705 (remove_thread): Reset current_thread.
4706 (remove_process): Assert threads have been removed first.
4708 2015-10-15 Yao Qi <yao.qi@linaro.org>
4710 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4712 (aarch64_remove_point): Likewise.
4713 * regcache.c (regcache_register_size): New function.
4715 2015-10-12 Yao Qi <yao.qi@linaro.org>
4717 * linux-aarch64-low.c: Update all callers as emit_load_store
4718 is renamed to aarch64_emit_load_store.
4720 2015-10-12 Yao Qi <yao.qi@linaro.org>
4722 * linux-aarch64-low.c: Update all callers of function renaming
4723 from emit_insn to aarch64_emit_insn.
4725 2015-10-12 Yao Qi <yao.qi@linaro.org>
4727 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4728 arch/aarch64-insn.h.
4729 (struct aarch64_memory_operand): Likewise.
4731 (emit_insn): Move to arch/aarch64-insn.c.
4732 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4733 (emit_load_store): Move to arch/aarch64-insn.c.
4734 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4735 (can_encode_int32): Remove.
4737 2015-10-12 Yao Qi <yao.qi@linaro.org>
4739 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4740 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4741 (aarch64_relocate_instruction): Likewise.
4742 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4743 (struct aarch64_insn_visitor): Likewise.
4745 2015-10-12 Yao Qi <yao.qi@linaro.org>
4747 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4748 (struct aarch64_insn_visitor): New.
4749 (struct aarch64_insn_relocation_data): New.
4750 (aarch64_ftrace_insn_reloc_b): New function.
4751 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4752 (aarch64_ftrace_insn_reloc_cb): Likewise.
4753 (aarch64_ftrace_insn_reloc_tb): Likewise.
4754 (aarch64_ftrace_insn_reloc_adr): Likewise.
4755 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4756 (aarch64_ftrace_insn_reloc_others): Likewise.
4758 (aarch64_relocate_instruction): Use visitor.
4760 2015-10-12 Yao Qi <yao.qi@linaro.org>
4762 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4763 int. Add argument buf.
4764 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4765 aarch64_relocate_instruction.
4767 2015-10-12 Yao Qi <yao.qi@linaro.org>
4769 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4770 argument insn. Remove local variable insn. Don't call
4772 (aarch64_install_fast_tracepoint_jump_pad): Call
4775 2015-09-30 Yao Qi <yao.qi@linaro.org>
4777 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4778 (emit_load_store_pair): Likewise.
4780 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4782 * dll.c (match_dll): Add cast(s).
4783 (unloaded_dll): Likewise.
4784 * linux-low.c (second_thread_of_pid_p): Likewise.
4785 (delete_lwp_callback): Likewise.
4786 (count_events_callback): Likewise.
4787 (select_event_lwp_callback): Likewise.
4788 (linux_set_resume_request): Likewise.
4789 * server.c (accumulate_file_name_length): Likewise.
4790 (emit_dll_description): Likewise.
4791 (handle_qxfer_threads_worker): Likewise.
4792 (visit_actioned_threads): Likewise.
4793 * thread-db.c (any_thread_of): Likewise.
4794 * tracepoint.c (same_process_p): Likewise.
4795 (match_blocktype): Likewise.
4796 (build_traceframe_info_xml): Likewise.
4798 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4800 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4802 (gdb_unparse_agent_expr): Likewise.
4803 * hostio.c (require_data): Likewise.
4804 (handle_pread): Likewise.
4805 * linux-low.c (disable_regset): Likewise.
4806 (fetch_register): Likewise.
4807 (store_register): Likewise.
4808 (get_dynamic): Likewise.
4809 (linux_qxfer_libraries_svr4): Likewise.
4810 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4811 (set_fast_tracepoint_jump): Likewise.
4812 (uninsert_fast_tracepoint_jumps_at): Likewise.
4813 (reinsert_fast_tracepoint_jumps_at): Likewise.
4814 (validate_inserted_breakpoint): Likewise.
4815 (clone_agent_expr): Likewise.
4816 * regcache.c (init_register_cache): Likewise.
4817 * remote-utils.c (putpkt_binary_1): Likewise.
4818 (decode_M_packet): Likewise.
4819 (decode_X_packet): Likewise.
4820 (look_up_one_symbol): Likewise.
4821 (relocate_instruction): Likewise.
4822 (monitor_output): Likewise.
4823 * server.c (handle_search_memory): Likewise.
4824 (handle_qxfer_exec_file): Likewise.
4825 (handle_qxfer_libraries): Likewise.
4826 (handle_qxfer): Likewise.
4827 (handle_query): Likewise.
4828 (handle_v_cont): Likewise.
4829 (handle_v_run): Likewise.
4830 (captured_main): Likewise.
4831 * target.c (write_inferior_memory): Likewise.
4832 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4833 * tracepoint.c (init_trace_buffer): Likewise.
4834 (add_tracepoint_action): Likewise.
4835 (add_traceframe): Likewise.
4836 (add_traceframe_block): Likewise.
4837 (cmd_qtdpsrc): Likewise.
4838 (cmd_qtdv): Likewise.
4839 (cmd_qtstatus): Likewise.
4840 (response_source): Likewise.
4841 (response_tsv): Likewise.
4842 (cmd_qtnotes): Likewise.
4843 (gdb_collect): Likewise.
4844 (initialize_tracepoint): Likewise.
4846 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4848 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4849 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4850 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4852 (enum aarch64_condition_codes): New enum.
4853 (w0): New static global.
4856 (struct aarch64_memory_operand) <type>: New
4857 MEMORY_OPERAND_POSTINDEX type.
4858 (postindex_memory_operand): New helper function.
4859 (emit_ret): New function.
4860 (emit_load_store_pair): New function, factored out of emit_stp
4861 with support for MEMORY_OPERAND_POSTINDEX.
4862 (emit_stp): Rewrite using emit_load_store_pair.
4863 (emit_ldp): New function.
4864 (emit_load_store): Likewise.
4865 (emit_ldr): Mention post-index instruction in comment.
4866 (emit_ldrh): New function.
4867 (emit_ldrb): New function.
4868 (emit_ldrsw): Mention post-index instruction in comment.
4869 (emit_str): Likewise.
4870 (emit_subs): New function.
4871 (emit_cmp): Likewise.
4872 (emit_and): Likewise.
4873 (emit_orr): Likewise.
4874 (emit_orn): Likewise.
4875 (emit_eor): Likewise.
4876 (emit_mvn): Likewise.
4877 (emit_lslv): Likewise.
4878 (emit_lsrv): Likewise.
4879 (emit_asrv): Likewise.
4880 (emit_mul): Likewise.
4881 (emit_sbfm): Likewise.
4882 (emit_sbfx): Likewise.
4883 (emit_ubfm): Likewise.
4884 (emit_ubfx): Likewise.
4885 (emit_csinc): Likewise.
4886 (emit_cset): Likewise.
4887 (emit_nop): Likewise.
4888 (emit_ops_insns): New helper function.
4889 (emit_pop): Likewise.
4890 (emit_push): Likewise.
4891 (aarch64_emit_prologue): New function.
4892 (aarch64_emit_epilogue): Likewise.
4893 (aarch64_emit_add): Likewise.
4894 (aarch64_emit_sub): Likewise.
4895 (aarch64_emit_mul): Likewise.
4896 (aarch64_emit_lsh): Likewise.
4897 (aarch64_emit_rsh_signed): Likewise.
4898 (aarch64_emit_rsh_unsigned): Likewise.
4899 (aarch64_emit_ext): Likewise.
4900 (aarch64_emit_log_not): Likewise.
4901 (aarch64_emit_bit_and): Likewise.
4902 (aarch64_emit_bit_or): Likewise.
4903 (aarch64_emit_bit_xor): Likewise.
4904 (aarch64_emit_bit_not): Likewise.
4905 (aarch64_emit_equal): Likewise.
4906 (aarch64_emit_less_signed): Likewise.
4907 (aarch64_emit_less_unsigned): Likewise.
4908 (aarch64_emit_ref): Likewise.
4909 (aarch64_emit_if_goto): Likewise.
4910 (aarch64_emit_goto): Likewise.
4911 (aarch64_write_goto_address): Likewise.
4912 (aarch64_emit_const): Likewise.
4913 (aarch64_emit_call): Likewise.
4914 (aarch64_emit_reg): Likewise.
4915 (aarch64_emit_pop): Likewise.
4916 (aarch64_emit_stack_flush): Likewise.
4917 (aarch64_emit_zero_ext): Likewise.
4918 (aarch64_emit_swap): Likewise.
4919 (aarch64_emit_stack_adjust): Likewise.
4920 (aarch64_emit_int_call_1): Likewise.
4921 (aarch64_emit_void_call_2): Likewise.
4922 (aarch64_emit_eq_goto): Likewise.
4923 (aarch64_emit_ne_goto): Likewise.
4924 (aarch64_emit_lt_goto): Likewise.
4925 (aarch64_emit_le_goto): Likewise.
4926 (aarch64_emit_gt_goto): Likewise.
4927 (aarch64_emit_ge_got): Likewise.
4928 (aarch64_emit_ops_impl): New static global variable.
4929 (aarch64_emit_ops): New target function, return
4930 &aarch64_emit_ops_impl.
4931 (struct linux_target_ops): Install it.
4933 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4935 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4936 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4938 * linux-aarch64-ipa.c: New file.
4939 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4941 (aarch64_get_thread_area): New target method.
4942 (extract_signed_bitfield): New helper function.
4943 (aarch64_decode_ldr_literal): New function.
4944 (enum aarch64_opcodes): New enum.
4945 (struct aarch64_register): New struct.
4946 (struct aarch64_operand): New struct.
4947 (x0): New static global.
4956 (aarch64_register): New helper function.
4957 (register_operand): Likewise.
4958 (immediate_operand): Likewise.
4959 (struct aarch64_memory_operand): New struct.
4960 (offset_memory_operand): New helper function.
4961 (preindex_memory_operand): Likewise.
4962 (enum aarch64_system_control_registers): New enum.
4963 (ENCODE): New macro.
4964 (emit_insn): New helper function.
4965 (emit_b): New function.
4966 (emit_bcond): Likewise.
4967 (emit_cb): Likewise.
4968 (emit_tb): Likewise.
4969 (emit_blr): Likewise.
4970 (emit_stp): Likewise.
4971 (emit_ldp_q_offset): Likewise.
4972 (emit_stp_q_offset): Likewise.
4973 (emit_load_store): Likewise.
4974 (emit_ldr): Likewise.
4975 (emit_ldrsw): Likewise.
4976 (emit_str): Likewise.
4977 (emit_ldaxr): Likewise.
4978 (emit_stxr): Likewise.
4979 (emit_stlr): Likewise.
4980 (emit_data_processing_reg): Likewise.
4981 (emit_data_processing): Likewise.
4982 (emit_add): Likewise.
4983 (emit_sub): Likewise.
4984 (emit_mov): Likewise.
4985 (emit_movk): Likewise.
4986 (emit_mov_addr): Likewise.
4987 (emit_mrs): Likewise.
4988 (emit_msr): Likewise.
4989 (emit_sevl): Likewise.
4990 (emit_wfe): Likewise.
4991 (append_insns): Likewise.
4992 (can_encode_int32_in): New helper function.
4993 (aarch64_relocate_instruction): New function.
4994 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4995 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4996 (struct linux_target_ops): Install aarch64_get_thread_area,
4997 aarch64_install_fast_tracepoint_jump_pad and
4998 aarch64_get_min_fast_tracepoint_insn_len.
5000 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5002 * Makefile.in (aarch64-insn.o): New rule.
5003 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5005 2015-09-21 Yao Qi <yao.qi@linaro.org>
5007 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5009 2015-09-21 Yao Qi <yao.qi@linaro.org>
5011 * tracepoint.c (max_jump_pad_size): Remove.
5013 2015-09-18 Yao Qi <yao.qi@linaro.org>
5015 * linux-aarch64-low.c: Don't include sys/uio.h.
5016 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5018 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5020 * tracepoint.c (eval_result_type): Change prototype.
5021 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5023 2015-09-15 Pedro Alves <palves@redhat.com>
5025 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5026 Check whether to report exec events instead of checking whether
5027 multiprocess is enabled.
5029 2015-09-15 Pedro Alves <palves@redhat.com>
5032 * remote-utils.c (prepare_resume_reply): Merge
5033 TARGET_WAITKIND_VFORK_DONE switch case with the
5034 TARGET_WAITKIND_FORKED case.
5036 2015-09-15 Yao Qi <yao.qi@linaro.org>
5038 * server.c (handle_query): Check string comparison using
5039 "else if" instead of "if".
5041 2015-09-15 Yao Qi <yao.qi@linaro.org>
5043 * server.c (vCont_supported): New global variable.
5044 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5045 matches. Append ";vContSupported+" to own_buf.
5046 (handle_v_requests): Append ";s;S" to own_buf if target supports
5047 hardware single step or vCont_supported is false.
5048 (capture_main): Set vCont_supported to zero.
5050 2015-09-15 Yao Qi <yao.qi@linaro.org>
5052 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5054 (linux_supports_hardware_single_step): ... New function.
5055 (linux_target_ops): Update.
5056 * lynx-low.c (lynx_target_ops): Set field
5057 supports_hardware_single_step to target_can_do_hardware_single_step.
5058 * nto-low.c (nto_target_ops): Likewise.
5059 * spu-low.c (spu_target_ops): Likewise.
5060 * win32-low.c (win32_target_ops): Likewise.
5061 * target.c (target_can_do_hardware_single_step): New function.
5062 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5063 Remove. <supports_hardware_single_step>: New field.
5064 (target_supports_conditional_breakpoints): Remove.
5065 (target_supports_hardware_single_step): New macro.
5066 (target_can_do_hardware_single_step): Declare.
5067 * server.c (handle_query): Use target_supports_hardware_single_step
5068 instead of target_supports_conditional_breakpoints.
5070 2015-09-15 Yao Qi <yao.qi@linaro.org>
5072 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5074 (struct linux_target_ops the_low_target): Install
5075 aarch64_linux_siginfo_fixup.
5077 2015-09-11 Don Breazeal <donb@codesourcery.com>
5078 Luis Machado <lgustavo@codesourcery.com>
5080 * linux-low.c (linux_mourn): Static declaration.
5081 (linux_arch_setup): Move in front of
5082 handle_extended_wait.
5083 (linux_arch_setup_thread): New function.
5084 (handle_extended_wait): Handle exec events. Call
5085 linux_arch_setup_thread. Make event_lwp argument a
5086 pointer-to-a-pointer.
5087 (check_zombie_leaders): Do not check stopped threads.
5088 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5089 (linux_low_filter_event): Add lwp and thread for exec'ing
5090 non-leader thread if leader thread has been deleted.
5091 Refactor code into linux_arch_setup_thread and call it.
5092 Pass child lwp pointer by reference to handle_extended_wait.
5093 (linux_wait_for_event_filtered): Update comment.
5094 (linux_wait_1): Prevent clobbering exec event status.
5095 (linux_supports_exec_events): New function.
5096 (linux_target_ops) <supports_exec_events>: Initialize new member.
5097 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5099 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5100 * server.c (report_exec_events): New global variable.
5101 (handle_query): Handle qSupported query for exec-events feature.
5102 (captured_main): Initialize report_exec_events.
5103 * server.h (report_exec_events): Declare new global variable.
5104 * target.h (struct target_ops) <supports_exec_events>: New
5106 (target_supports_exec_events): New macro.
5107 * win32-low.c (win32_target_ops) <supports_exec_events>:
5108 Initialize new member.
5110 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5112 * linux-low.c (linux_low_enable_btrace): Remove.
5113 (linux_target_ops): Replace linux_low_enable_btrace with
5114 linux_enable_btrace.
5116 2015-09-03 Yao Qi <yao.qi@linaro.org>
5118 * linux-aarch64-low.c (aarch64_insert_point): Call
5119 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5122 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5124 * linux-low.c (check_stopped_by_breakpoint): Use
5125 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5127 2015-08-27 Pedro Alves <palves@redhat.com>
5129 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5131 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5133 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5134 the XNEW-family equivalent.
5135 (compile_bytecodes): Likewise.
5136 * dll.c (loaded_dll): Likewise.
5137 * event-loop.c (append_callback_event): Likewise.
5138 (create_file_handler): Likewise.
5139 (create_file_event): Likewise.
5140 * hostio.c (handle_open): Likewise.
5141 * inferiors.c (add_thread): Likewise.
5142 (add_process): Likewise.
5143 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5144 * linux-arm-low.c (arm_new_process): Likewise.
5145 (arm_new_thread): Likewise.
5146 * linux-low.c (add_to_pid_list): Likewise.
5147 (linux_add_process): Likewise.
5148 (handle_extended_wait): Likewise.
5149 (add_lwp): Likewise.
5150 (enqueue_one_deferred_signal): Likewise.
5151 (enqueue_pending_signal): Likewise.
5152 (linux_resume_one_lwp_throw): Likewise.
5153 (linux_resume_one_thread): Likewise.
5154 (linux_read_memory): Likewise.
5155 (linux_write_memory): Likewise.
5156 * linux-mips-low.c (mips_linux_new_process): Likewise.
5157 (mips_linux_new_thread): Likewise.
5158 (mips_add_watchpoint): Likewise.
5159 * linux-x86-low.c (initialize_low_arch): Likewise.
5160 * lynx-low.c (lynx_add_process): Likewise.
5161 * mem-break.c (set_raw_breakpoint_at): Likewise.
5162 (set_breakpoint): Likewise.
5163 (add_condition_to_breakpoint): Likewise.
5164 (add_commands_to_breakpoint): Likewise.
5165 (clone_agent_expr): Likewise.
5166 (clone_one_breakpoint): Likewise.
5167 * regcache.c (new_register_cache): Likewise.
5168 * remote-utils.c (look_up_one_symbol): Likewise.
5169 * server.c (queue_stop_reply): Likewise.
5170 (start_inferior): Likewise.
5171 (queue_stop_reply_callback): Likewise.
5172 (handle_target_event): Likewise.
5173 * spu-low.c (fetch_ppc_memory): Likewise.
5174 (store_ppc_memory): Likewise.
5175 * target.c (set_target_ops): Likewise.
5176 * thread-db.c (thread_db_load_search): Likewise.
5177 (try_thread_db_load_1): Likewise.
5178 * tracepoint.c (add_tracepoint): Likewise.
5179 (add_tracepoint_action): Likewise.
5180 (create_trace_state_variable): Likewise.
5181 (cmd_qtdpsrc): Likewise.
5182 (cmd_qtro): Likewise.
5183 (add_while_stepping_state): Likewise.
5184 * win32-low.c (child_add_thread): Likewise.
5185 (get_image_name): Likewise.
5187 2015-08-25 Yao Qi <yao.qi@linaro.org>
5189 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5191 2015-08-25 Yao Qi <yao.qi@linaro.org>
5193 * Makefile.in (aarch64-linux.o): New rule.
5194 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5196 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5197 (aarch64_init_debug_reg_state): Make it extern.
5198 (aarch64_linux_prepare_to_resume): Remove.
5200 2015-08-25 Yao Qi <yao.qi@linaro.org>
5202 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5203 lwp_arch_private_info and ptid_of_lwp.
5205 2015-08-25 Yao Qi <yao.qi@linaro.org>
5207 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5208 Find proc_info by find_process_pid. All callers updated.
5210 2015-08-25 Yao Qi <yao.qi@linaro.org>
5212 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5214 (debug_reg_change_callback): Remove.
5215 (aarch64_notify_debug_reg_change): Remove.
5217 2015-08-25 Yao Qi <yao.qi@linaro.org>
5219 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5220 Call current_lwp_ptid.
5222 2015-08-25 Yao Qi <yao.qi@linaro.org>
5224 * linux-aarch64-low.c (debug_reg_change_callback): Use
5227 2015-08-25 Yao Qi <yao.qi@linaro.org>
5229 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5231 2015-08-25 Yao Qi <yao.qi@linaro.org>
5233 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5235 2015-08-25 Yao Qi <yao.qi@linaro.org>
5237 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5240 2015-08-25 Yao Qi <yao.qi@linaro.org>
5242 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5244 (debug_reg_change_callback): Remove argument entry and add argument
5245 lwp. Remove local variable thread. Don't print thread id in the
5246 debugging output. Don't check whether pid of thread equals to pid.
5247 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5248 iterate_over_lwps instead find_inferior.
5250 2015-08-24 Pedro Alves <palves@redhat.com>
5252 * inferiors.c (get_first_process): New function.
5253 * inferiors.h (get_first_process): New declaration.
5254 * remote-utils.c (read_ptid): Default to the first process in the
5255 list, instead of to the current thread's process.
5257 2015-08-24 Pedro Alves <palves@redhat.com>
5259 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5260 * event-loop.c: Likewise.
5261 * remote-utils.c: Likewise.
5262 * tracepoint.c: Likewise.
5264 2015-08-24 Pedro Alves <palves@redhat.com>
5266 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5269 2015-08-21 Pedro Alves <palves@redhat.com>
5271 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5272 instead of literal 1.
5274 2015-08-21 Pedro Alves <palves@redhat.com>
5276 * tdesc.c (default_description): Explicitly zero-initialize.
5278 2015-08-21 Pedro Alves <palves@redhat.com>
5281 * inferiors.c (remove_thread): Discard any pending stop reply for
5283 * server.c (remove_all_on_match_pid): Rename to ...
5284 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5286 (discard_queued_stop_replies): Change parameter to a ptid. Now
5288 (handle_v_kill, kill_inferior_callback, captured_main)
5289 (process_serial_event): Adjust.
5290 * server.h (discard_queued_stop_replies): Declare.
5292 2015-08-21 Pedro Alves <palves@redhat.com>
5294 * linux-low.c (wait_for_sigstop): Always switch to no thread
5295 selected if the previously current thread dies.
5296 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5297 process instead of the current thread's.
5298 * remote-utils.c (input_interrupt): Don't check if there's no
5300 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5301 current thread to the general thread fails, error out.
5302 (handle_qxfer_auxv, handle_qxfer_libraries)
5303 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5304 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5305 (handle_query): Check if there's a thread selected instead of
5306 checking whether there's any thread in the thread list.
5307 (handle_qxfer_threads, handle_qxfer_btrace)
5308 (handle_qxfer_btrace_conf): Don't error out early if there's no
5309 thread in the thread list.
5310 (handle_v_cont, myresume): Don't set the current thread to the
5312 (process_serial_event) <Hg handling>: Also set thread_id if the
5313 previous general thread is still alive.
5314 (process_serial_event) <g/G handling>: If setting the current
5315 thread to the general thread fails, error out.
5316 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5317 thread's lwp instead of the current thread's.
5318 * target.c (set_desired_thread): If the desired thread was not
5319 found, leave the current thread pointing to NULL. Return an int
5320 (boolean) indicating success.
5321 * target.h (set_desired_thread): Change return type to int.
5323 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5325 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5326 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5328 (ps_get_thread_area): New function.
5330 2015-08-19 Gary Benson <gbenson@redhat.com>
5332 * hostio.c (handle_pread): Do not attempt to read more data
5333 than hostio_reply_with_data can fit in a packet.
5335 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5337 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5339 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5341 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5343 2015-08-06 Pedro Alves <palves@redhat.com>
5345 * tracepoint.c (expr_eval_result): Now an int.
5347 2015-08-06 Pedro Alves <palves@redhat.com>
5349 * gdbthread.h (struct regcache): Forward declare.
5350 (struct thread_info) <regcache_data>: Now a struct regcache
5352 * inferiors.c (inferior_regcache_data)
5353 (set_inferior_regcache_data): Now work with struct regcache
5355 * inferiors.h (struct regcache): Forward declare.
5356 (inferior_regcache_data, set_inferior_regcache_data): Now work
5357 with struct regcache pointers.
5358 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5359 (free_register_cache_thread): Remove struct regcache pointer
5362 2015-08-06 Pedro Alves <palves@redhat.com>
5364 * server.c (captured_main): On error, print the exception message
5365 to stderr, and if run_once is set, throw a quit.
5367 2015-08-06 Pedro Alves <palves@redhat.com>
5369 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5372 2015-08-06 Pedro Alves <palves@redhat.com>
5374 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5375 reading beyond the passed in buffer length.
5377 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5379 * tracepoint.c (symbol_list) <required>: Remove.
5381 2015-08-06 Pedro Alves <palves@redhat.com>
5383 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5384 count if stopping and suspending threads.
5385 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5386 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5387 (linux_detach): Complete an ongoing step-over.
5388 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5390 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5391 (linux_wait_1): If passing a signal to the inferior after
5392 finishing a step-over, unsuspend and re-resume all lwps. If we
5393 see a single-step event but the thread should be continuing, don't
5394 pass the trap to gdb.
5395 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5396 internal_error instead of gdb_assert.
5397 (enqueue_pending_signal): New function.
5398 (check_ptrace_stopped_lwp_gone): Add debug output.
5399 (start_step_over): Use internal_error instead of gdb_assert.
5400 (complete_ongoing_step_over): New function.
5401 (linux_resume_one_thread): Don't resume a suspended thread.
5402 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5405 2015-08-06 Pedro Alves <palves@redhat.com>
5407 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5408 (linux_thread_alive): Use lwp_is_marked_dead.
5409 (extended_event_reported): Delete.
5410 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5411 instead of extended_event_reported.
5412 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5414 (lwp_is_marked_dead): New function.
5415 (lwp_running): Use lwp_is_marked_dead.
5416 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5419 2015-08-06 Pedro Alves <palves@redhat.com>
5421 * linux-low.c (linux_wait_1): Move fork event output out of the
5422 !report_to_gdb check. Pass event_child->waitstatus to
5423 target_waitstatus_to_string instead of ourstatus.
5425 2015-08-04 Yao Qi <yao.qi@linaro.org>
5427 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5428 if current_thread is 32 bit.
5430 2015-08-04 Yao Qi <yao.qi@linaro.org>
5432 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5433 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5434 * server.c (extended_protocol): Remove "static".
5435 * server.h (extended_protocol): Declare it.
5437 2015-08-04 Yao Qi <yao.qi@linaro.org>
5439 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5440 both aarch64 and aarch32.
5441 (aarch64_set_pc): Likewise.
5443 2015-08-04 Yao Qi <yao.qi@linaro.org>
5445 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5446 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5447 arm-with-neon.xml to srv_xmlfiles.
5448 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5449 (is_64bit_tdesc): New function.
5450 (aarch64_linux_read_description): New function.
5451 (aarch64_arch_setup): Call aarch64_linux_read_description.
5452 (regs_info): Rename to regs_info_aarch64.
5453 (aarch64_regs_info): Return right regs_info.
5454 (initialize_low_arch): Call initialize_low_arch_aarch32.
5456 2015-08-04 Yao Qi <yao.qi@linaro.org>
5458 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5459 * linux-aarch32-low.c: New file.
5460 * linux-aarch32-low.h: New file.
5461 * linux-arm-low.c (arm_fill_gregset): Move it to
5462 linux-aarch32-low.c.
5463 (arm_store_gregset): Likewise.
5464 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5465 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5466 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5467 (regs_info): Rename to regs_info_arm.
5468 (arm_regs_info): Return regs_info_aarch32 if
5469 have_ptrace_getregset is 1 and target description is
5470 arm_with_neon or arm_with_vfpv3.
5471 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5472 Call initialize_low_arch_aarch32 instead.
5474 2015-08-04 Yao Qi <yao.qi@linaro.org>
5476 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5477 * linux-low.c: ... here.
5478 * linux-low.h (have_ptrace_getregset): Declare it.
5480 2015-08-04 Pedro Alves <palves@redhat.com>
5482 * thread-db.c (struct thread_db): Use new typedefs.
5483 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5485 (disable_thread_event_reporting): Cast result of dlsym to
5486 destination function pointer type.
5487 (thread_db_mourn): Use td_ta_delete_ftype.
5489 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5491 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5493 (CDX_BREAKPOINT): Define for R2.
5494 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5495 (the_low_target): Add comments.
5497 2015-07-30 Yao Qi <yao.qi@linaro.org>
5499 * linux-arm-low.c (arm_hwcap): Remove it.
5500 (arm_read_description): New local variable arm_hwcap. Don't
5501 set arm_hwcap to zero.
5503 2015-07-30 Yao Qi <yao.qi@linaro.org>
5505 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5506 Use regcache->tdesc instead.
5507 (arm_store_wmmxregset): Likewise.
5508 (arm_fill_vfpregset): Likewise.
5509 (arm_store_vfpregset): Likewise.
5511 2015-07-30 Yao Qi <yao.qi@linaro.org>
5513 * linux-arm-low.c: Include arch/arm.h.
5514 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5515 (arm_store_gregset): Likewise.
5517 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5519 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5520 ptrace's 4th parameter.
5522 2015-07-27 Yao Qi <yao.qi@linaro.org>
5524 * configure.srv (case aarch64*-*-linux*): Don't set
5527 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5529 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5531 * linux-arm-low.c: Likewise.
5532 * linux-cris-low.c: Likewise.
5533 * linux-crisv32-low.c: Likewise.
5534 * linux-low.c: Likewise.
5535 * linux-m68k-low.c: Likewise.
5536 * linux-mips-low.c: Likewise.
5537 * linux-nios2-low.c: Likewise.
5538 * linux-s390-low.c: Likewise.
5539 * linux-sparc-low.c: Likewise.
5540 * linux-tic6x-low.c: Likewise.
5541 * linux-tile-low.c: Likewise.
5542 * linux-x86-low.c: Likewise.
5544 2015-07-24 Pedro Alves <palves@redhat.com>
5546 * config.in: Regenerate.
5547 * configure: Regenerate.
5549 2015-07-24 Pedro Alves <palves@redhat.com>
5551 * acinclude.m4: Include ../ptrace.m4.
5552 * configure.ac: Call GDB_AC_PTRACE.
5553 * config.in, configure: Regenerate.
5555 2015-07-24 Yao Qi <yao.qi@linaro.org>
5557 * linux-low.c (linux_create_inferior): Remove setting to
5558 proc->priv->new_inferior.
5559 (linux_attach): Likewise.
5560 (linux_low_filter_event): Likewise.
5561 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5563 2015-07-24 Yao Qi <yao.qi@linaro.org>
5565 * linux-low.c (linux_arch_setup): New function.
5566 (linux_low_filter_event): If proc->tdesc is NULL and
5567 proc->attached is true, call the_low_target.arch_setup.
5568 Otherwise, keep status pending, and return.
5569 (linux_resume_one_lwp_throw): Don't call get_pc if
5570 thread->while_stepping isn't NULL. Don't call
5571 get_thread_regcache if proc->tdesc is NULL.
5572 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5573 (linux_target_ops): Install arch_setup.
5574 * server.c (start_inferior): Call the_target->arch_setup.
5575 * target.h (struct target_ops) <arch_setup>: New field.
5576 (target_arch_setup): New marco.
5577 * lynx-low.c (lynx_target_ops): Update.
5578 * nto-low.c (nto_target_ops): Update.
5579 * spu-low.c (spu_target_ops): Update.
5580 * win32-low.c (win32_target_ops): Update.
5582 2015-07-24 Yao Qi <yao.qi@linaro.org>
5584 * linux-low.c (linux_add_process): Don't set
5585 proc->priv->new_inferior.
5586 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5587 (linux_attach): Likewise.
5589 2015-07-24 Yao Qi <yao.qi@linaro.org>
5591 * server.c (start_inferior): Code refactor.
5593 2015-07-24 Yao Qi <yao.qi@linaro.org>
5595 * server.c (process_serial_event): Set general_thread.
5597 2015-07-21 Yao Qi <yao.qi@linaro.org>
5599 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5600 aarch64_linux_get_debug_reg_capacity.
5602 2015-07-17 Yao Qi <yao.qi@linaro.org>
5604 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5605 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5606 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5607 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5608 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5609 (AARCH64_HWP_ALIGNMENT): Likewise.
5610 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5611 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5612 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5613 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5614 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5615 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5616 (struct aarch64_debug_reg_state): Likewise.
5617 (struct arch_lwp_info): Likewise.
5618 (aarch64_align_watchpoint): Likewise.
5619 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5620 (aarch64_watchpoint_length): Likewise.
5621 (aarch64_point_encode_ctrl_reg): Likewise
5622 (aarch64_point_is_aligned): Likewise.
5623 (aarch64_align_watchpoint): Likewise.
5624 (aarch64_linux_set_debug_regs):
5625 (aarch64_dr_state_insert_one_point): Likewise.
5626 (aarch64_dr_state_remove_one_point): Likewise.
5627 (aarch64_handle_breakpoint): Likewise.
5628 (aarch64_handle_aligned_watchpoint): Likewise.
5629 (aarch64_handle_unaligned_watchpoint): Likewise.
5630 (aarch64_handle_watchpoint): Likewise.
5632 2015-07-17 Yao Qi <yao.qi@linaro.org>
5634 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5635 and don't aarch64_get_debug_reg_state. All callers update.
5636 (aarch64_handle_aligned_watchpoint): Likewise.
5637 (aarch64_handle_unaligned_watchpoint): Likewise.
5638 (aarch64_handle_watchpoint): Likewise.
5639 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5640 (aarch64_remove_point): Likewise.
5642 2015-07-17 Yao Qi <yao.qi@linaro.org>
5644 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5646 (aarch64_handle_unaligned_watchpoint): Likewise.
5648 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5650 Revert the previous 3 commits:
5651 Move gdb_regex* to common/
5652 Move linux_find_memory_regions_full & co.
5653 gdbserver build-id attribute generator
5655 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5656 Jan Kratochvil <jan.kratochvil@redhat.com>
5658 gdbserver build-id attribute generator.
5659 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5660 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5661 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5663 (get_dynamic): Use find_pdhr to traverse program headers.
5664 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5665 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5666 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5667 (get_hex_build_id): New.
5668 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5669 to reply XML document.
5671 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5672 Jan Kratochvil <jan.kratochvil@redhat.com>
5674 * target.c: Include target/target-utils.h and fcntl.h.
5675 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5676 (target_fileio_read_stralloc): New functions.
5678 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5680 * Makefile.in (OBS): Add gdb_regex.o.
5682 * config.in: Rebuilt.
5683 * configure: Rebuilt.
5685 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5686 Jan Kratochvil <jan.kratochvil@redhat.com>
5688 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5689 * Makefile.in (OBS): Add target-utils.o.
5690 (linux-maps.o, target-utils.o): New.
5691 * configure.srv (srv_linux_obj): Add linux-maps.o.
5693 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5695 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5697 (the_low_target): Install it.
5699 2015-07-14 Pedro Alves <palves@redhat.com>
5701 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5702 Instead, ignore ECHILD, and throw an error for other errnos.
5704 2015-07-10 Pedro Alves <palves@redhat.com>
5706 * event-loop.c (struct callback_event) <data>: Change type to
5707 gdb_client_data instance instead of gdb_client_data pointer.
5708 (append_callback_event): Adjust.
5710 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5712 * linux-aarch64-low.c: Add comments for each linux_target_ops
5713 method. Remove comments already covered in target_ops and
5714 linux_target_ops definitions.
5715 (the_low_target): Add comments for each unimplemented method.
5717 2015-07-09 Yao Qi <yao.qi@linaro.org>
5719 * linux-aarch64-low.c (aarch64_regmap): Remove.
5720 (aarch64_usrregs_info): Remove.
5721 (regs_info): Set field usrregs to NULL.
5723 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5725 * linux-low.c: Include "rsp-low.h"
5726 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5727 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5728 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5729 (handle_btrace_enable_pt): New.
5730 (handle_btrace_general_set): Support "pt".
5731 (handle_btrace_conf_general_set): Support "pt:size".
5733 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5735 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5738 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5740 * linux-aarch64-low.c: Remove comment about endianness.
5741 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5742 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5745 2015-06-24 Gary Benson <gbenson@redhat.com>
5747 * linux-i386-ipa.c (stdint.h): Do not include.
5748 * lynx-i386-low.c (stdint.h): Likewise.
5749 * lynx-ppc-low.c (stdint.h): Likewise.
5750 * mem-break.c (stdint.h): Likewise.
5751 * thread-db.c (stdint.h): Likewise.
5752 * tracepoint.c (stdint.h): Likewise.
5753 * win32-low.c (stdint.h): Likewise.
5755 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5757 * server.c (write_qxfer_response): Update call to
5758 remote_escape_output.
5760 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5761 Jan Kratochvil <jan.kratochvil@redhat.com>
5763 Merge multiple hex conversions.
5764 * gdbreplay.c (tohex): Rename to 'fromhex'.
5765 (logchar): Use fromhex.
5767 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5769 * server.c (handle_qxfer_libraries): Set `version' attribute for
5772 2015-06-10 Gary Benson <gbenson@redhat.com>
5774 * target.h (struct target_ops) <multifs_open>: New field.
5775 <multifs_unlink>: Likewise.
5776 <multifs_readlink>: Likewise.
5777 * linux-low.c (nat/linux-namespaces.h): New include.
5778 (linux_target_ops): Initialize the_target->multifs_open,
5779 the_target->multifs_unlink and the_target->multifs_readlink.
5780 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5781 * hostio.c (hostio_fs_pid): New static variable.
5782 (hostio_handle_new_gdb_connection): New function.
5783 (handle_setfs): Likewise.
5784 (handle_open): Use the_target->multifs_open as appropriate.
5785 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5786 (handle_readlink): Use the_target->multifs_readlink as
5788 (handle_vFile): Handle vFile:setfs packets.
5789 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5790 after target_handle_new_gdb_connection.
5792 2015-06-10 Gary Benson <gbenson@redhat.com>
5794 * configure.ac (AC_CHECK_FUNCS): Add setns.
5795 * config.in: Regenerate.
5796 * configure: Likewise.
5797 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5798 (linux-namespaces.o): New rule.
5799 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5801 2015-06-09 Gary Benson <gbenson@redhat.com>
5803 * hostio.c (handle_open): Process mode argument with
5804 fileio_to_host_mode.
5806 2015-06-01 Yao Qi <yao.qi@linaro.org>
5808 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5809 * linux-x86-low.c: Likewise.
5811 2015-05-28 Don Breazeal <donb@codesourcery.com>
5813 * linux-low.c (handle_extended_wait): Initialize
5814 thread_info.last_resume_kind for new fork children.
5816 2015-05-15 Pedro Alves <palves@redhat.com>
5818 * target.h (target_handle_new_gdb_connection): Rewrite using if
5819 wrapped in do/while.
5821 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5823 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5824 * configure, config.in: Regenerate.
5825 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5828 2015-05-12 Don Breazeal <donb@codesourcery.com>
5830 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5831 PTRACE_EVENT_VFORK_DONE.
5832 (linux_low_ptrace_options, extended_event_reported): Add vfork
5834 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5835 and "vforkdone" for RSP 'T' Stop Reply Packet.
5836 * server.h (report_vfork_events): Declare
5839 2015-05-12 Don Breazeal <donb@codesourcery.com>
5841 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5842 (the_low_target) <new_fork>: Initialize new member.
5843 * linux-arm-low.c (arm_new_fork): New function.
5844 (the_low_target) <new_fork>: Initialize new member.
5845 * linux-low.c (handle_extended_wait): Call new target function
5847 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5848 * linux-mips-low.c (mips_add_watchpoint): New function
5849 extracted from mips_insert_point.
5850 (the_low_target) <new_fork>: Initialize new member.
5851 (mips_linux_new_fork): New function.
5852 (mips_insert_point): Call mips_add_watchpoint.
5853 * linux-x86-low.c (x86_linux_new_fork): New function.
5854 (the_low_target) <new_fork>: Initialize new member.
5856 2015-05-12 Don Breazeal <donb@codesourcery.com>
5858 * linux-low.c (handle_extended_wait): Implement return value,
5859 rename argument 'event_child' to 'event_lwp', handle
5860 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5861 (linux_low_ptrace_options): New function.
5862 (linux_low_filter_event): Call linux_low_ptrace_options,
5863 use different argument fo linux_enable_event_reporting,
5864 use return value from handle_extended_wait.
5865 (extended_event_reported): New function.
5866 (linux_wait_1): Call extended_event_reported and set
5867 status to report fork events.
5868 (linux_write_memory): Add pid to debug message.
5869 (reset_lwp_ptrace_options_callback): New function.
5870 (linux_handle_new_gdb_connection): New function.
5871 (linux_target_ops): Initialize new structure member.
5872 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5873 * lynx-low.c: Initialize new structure member.
5874 * remote-utils.c (prepare_resume_reply): Implement stop reason
5875 "fork" for "T" stop message.
5876 * server.c (handle_query): Call handle_new_gdb_connection.
5877 * server.h (report_fork_events): Declare global flag.
5878 * target.h (struct target_ops) <handle_new_gdb_connection>:
5880 (target_handle_new_gdb_connection): New macro.
5881 * win32-low.c: Initialize new structure member.
5883 2015-05-12 Don Breazeal <donb@codesourcery.com>
5885 * mem-break.c (APPEND_TO_LIST): Define macro.
5886 (clone_agent_expr): New function.
5887 (clone_one_breakpoint): New function.
5888 (clone_all_breakpoints): New function.
5889 * mem-break.h: Declare new functions.
5891 2015-05-12 Don Breazeal <donb@codesourcery.com>
5893 * linux-low.c (linux_supports_fork_events): New function.
5894 (linux_supports_vfork_events): New function.
5895 (linux_target_ops): Initialize new structure members.
5896 (initialize_low): Call linux_check_ptrace_features.
5897 * lynx-low.c (lynx_target_ops): Initialize new structure
5899 * server.c (report_fork_events, report_vfork_events):
5901 (handle_query): Add new features to qSupported packet and
5903 (captured_main): Initialize new global variables.
5904 * target.h (struct target_ops) <supports_fork_events>:
5906 <supports_vfork_events>: New member.
5907 (target_supports_fork_events): New macro.
5908 (target_supports_vfork_events): New macro.
5909 * win32-low.c (win32_target_ops): Initialize new structure
5912 2015-05-12 Gary Benson <gbenson@redhat.com>
5914 * server.c (handle_qxfer_exec_file): Use current process
5917 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5919 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5920 Remove HAVE_PTRACE_GETREGS conditionals.
5921 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5922 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5924 2015-05-08 Yao Qi <yao.qi@linaro.org>
5926 * linux-low.c (linux_supports_conditional_breakpoints): New
5928 (linux_target_ops): Install new target method.
5929 * lynx-low.c (lynx_target_ops): Install NULL hook for
5930 supports_conditional_breakpoints.
5931 * nto-low.c (nto_target_ops): Likewise.
5932 * spu-low.c (spu_target_ops): Likewise.
5933 * win32-low.c (win32_target_ops): Likewise.
5934 * server.c (handle_query): Check
5935 target_supports_conditional_breakpoints.
5936 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5938 (target_supports_conditional_breakpoints): New macro.
5940 2015-05-06 Pedro Alves <palves@redhat.com>
5943 * server.c (start_inferior): If the process exits, mourn it.
5945 2015-04-21 Gary Benson <gbenson@redhat.com>
5947 * hostio.c (fileio_open_flags_to_host): Factored out to
5948 fileio_to_host_openflags in common/fileio.c. Single use
5951 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5953 * linux-xtensa-low.c (xtensa_fill_gregset)
5954 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5957 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5959 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5960 (regs_info): Replace usrregs pointer with NULL.
5962 2015-04-17 Gary Benson <gbenson@redhat.com>
5964 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5965 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5966 * server.c (handle_qxfer_exec_file): New function.
5967 (qxfer_packets): Add exec-file entry.
5968 (handle_query): Report qXfer:exec-file:read as supported packet.
5970 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5972 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5974 2015-04-09 Gary Benson <gbenson@redhat.com>
5976 * hostio-errno.c (errno_to_fileio_error): Remove function.
5977 Update caller to use remote_fileio_to_fio_error.
5979 2015-04-09 Yao Qi <yao.qi@linaro.org>
5981 * linux-low.c (linux_insert_point): Call
5982 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5983 (linux_remove_point): Call remove_memory_breakpoint if type is
5985 * linux-x86-low.c (x86_insert_point): Don't call
5986 insert_memory_breakpoint.
5987 (x86_remove_point): Don't call remove_memory_breakpoint.
5989 2015-04-01 Pedro Alves <palves@redhat.com>
5990 Cleber Rosa <crosa@redhat.com>
5992 * server.c (gdbserver_usage): Reorganize and extend the usage
5995 2015-03-24 Pedro Alves <palves@redhat.com>
5997 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5998 output. Also dump TRAP_TRACE.
5999 (linux_low_filter_event): In debug output, distinguish a
6000 resume_stop SIGSTOP from a delayed SIGSTOP.
6002 2015-03-24 Gary Benson <gbenson@redhat.com>
6004 * linux-x86-low.c (x86_linux_new_thread): Moved to
6006 (x86_linux_prepare_to_resume): Likewise.
6008 2015-03-24 Gary Benson <gbenson@redhat.com>
6010 * Makefile.in (x86-linux-dregs.o): New rule.
6011 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6012 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6013 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6014 (x86_linux_dr_get): Likewise.
6015 (x86_linux_dr_set): Likewise.
6016 (update_debug_registers_callback): Likewise.
6017 (x86_linux_dr_set_addr): Likewise.
6018 (x86_linux_dr_get_addr): Likewise.
6019 (x86_linux_dr_set_control): Likewise.
6020 (x86_linux_dr_get_control): Likewise.
6021 (x86_linux_dr_get_status): Likewise.
6022 (x86_linux_update_debug_registers): Likewise.
6024 2015-03-24 Gary Benson <gbenson@redhat.com>
6026 * linux-x86-low.c (x86_linux_update_debug_registers):
6027 New function, factored out from...
6028 (x86_linux_prepare_to_resume): ...this.
6030 2015-03-24 Gary Benson <gbenson@redhat.com>
6032 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6033 (x86_linux_dr_set): Likewise.
6034 (update_debug_registers_callback): Likewise.
6035 (x86_linux_dr_set_addr): Likewise.
6036 (x86_linux_dr_get_addr): Likewise.
6037 (x86_linux_dr_set_control): Likewise.
6038 (x86_linux_dr_get_control): Likewise.
6039 (x86_linux_dr_get_status): Likewise.
6040 (x86_linux_prepare_to_resume): Likewise.
6042 2015-03-24 Gary Benson <gbenson@redhat.com>
6044 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6045 Use perror_with_name. Pass string through gettext.
6046 (x86_linux_dr_set): Likewise.
6048 2015-03-24 Gary Benson <gbenson@redhat.com>
6050 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6051 (x86_linux_dr_set_addr): ...this.
6052 (x86_dr_low_get_addr): Rename to...
6053 (x86_linux_dr_get_addr): ...this.
6054 (x86_dr_low_set_control): Rename to...
6055 (x86_linux_dr_set_control): ...this.
6056 (x86_dr_low_get_control): Rename to...
6057 (x86_linux_dr_get_control): ...this.
6058 (x86_dr_low_get_status): Rename to...
6059 (x86_linux_dr_get_status): ...this.
6060 (x86_dr_low): Update with new function names.
6062 2015-03-24 Gary Benson <gbenson@redhat.com>
6064 * Makefile.in (x86-linux.o): New rule.
6065 * configure.srv: Add x86-linux.o to relevant targets.
6066 * linux-low.c (lwp_set_arch_private_info): New function.
6067 (lwp_arch_private_info): Likewise.
6068 * linux-x86-low.c: Include nat/x86-linux.h.
6069 (arch_lwp_info): Removed structure.
6070 (update_debug_registers_callback):
6071 Use lwp_set_debug_registers_changed.
6072 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6073 and lwp_set_debug_registers_changed.
6074 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6076 2015-03-24 Gary Benson <gbenson@redhat.com>
6078 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6079 * linux-arm-low.c (arm_new_thread): Likewise.
6080 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6081 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6082 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6083 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6085 2015-03-24 Gary Benson <gbenson@redhat.com>
6087 * linux-low.c (ptid_of_lwp): New function.
6088 (lwp_is_stopped): Likewise.
6089 (lwp_stop_reason): Likewise.
6090 * linux-x86-low.c (update_debug_registers_callback):
6092 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6095 2015-03-24 Gary Benson <gbenson@redhat.com>
6097 * linux-low.h (linux_stop_lwp): Remove declaration.
6099 2015-03-24 Gary Benson <gbenson@redhat.com>
6101 * linux-low.h: Include nat/linux-nat.h.
6102 * linux-low.c (iterate_over_lwps_args): New structure.
6103 (iterate_over_lwps_filter): New function.
6104 (iterate_over_lwps): Likewise.
6105 * linux-x86-low.c (update_debug_registers_callback):
6106 Update signature to what iterate_over_lwps expects.
6107 Remove PID check that iterate_over_lwps now performs.
6108 (x86_dr_low_set_addr): Use iterate_over_lwps.
6109 (x86_dr_low_set_control): Likewise.
6111 2015-03-24 Gary Benson <gbenson@redhat.com>
6113 * linux-x86-low.c (x86_debug_reg_state): New function.
6114 (x86_linux_prepare_to_resume): Use the above.
6116 2015-03-24 Gary Benson <gbenson@redhat.com>
6118 * linux-low.c (current_lwp_ptid): New function.
6119 * linux-x86-low.c: Include nat/linux-nat.h.
6120 (x86_dr_low_get_addr): Use current_lwp_ptid.
6121 (x86_dr_low_get_control): Likewise.
6122 (x86_dr_low_get_status): Likewise.
6124 2015-03-20 Pedro Alves <palves@redhat.com>
6126 * tracepoint.c (cmd_qtstatus): Make "str" const.
6128 2015-03-20 Pedro Alves <palves@redhat.com>
6130 * server.c (handle_general_set): Make "req_str" const.
6132 2015-03-19 Pedro Alves <palves@redhat.com>
6134 * linux-low.c (linux_resume_one_lwp): Rename to ...
6135 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6136 instead call perror_with_name.
6137 (check_ptrace_stopped_lwp_gone): New function.
6138 (linux_resume_one_lwp): Reimplement as wrapper around
6139 linux_resume_one_lwp_throw that swallows errors if the LWP is
6142 2015-03-19 Pedro Alves <palves@redhat.com>
6144 * linux-low.c (count_events_callback, select_event_lwp_callback):
6145 No longer check whether the thread has resume_stop as last resume
6148 2015-03-19 Pedro Alves <palves@redhat.com>
6150 * linux-low.c (count_events_callback, select_event_lwp_callback):
6151 Use the lwp's status_pending_p field, not the thread's.
6153 2015-03-19 Pedro Alves <palves@redhat.com>
6155 * linux-low.c (select_event_lwp_callback): Update comments to
6156 no longer mention SIGTRAP.
6158 2015-03-18 Gary Benson <gbenson@redhat.com>
6160 * server.c (handle_query): Do not report vFile:fstat as supported.
6162 2015-03-11 Gary Benson <gbenson@redhat.com>
6164 * hostio.c (sys/types.h): New include.
6165 (sys/stat.h): Likewise.
6166 (common-remote-fileio.h): Likewise.
6167 (handle_fstat): New function.
6168 (handle_vFile): Handle vFile:fstat packets.
6170 2015-03-11 Gary Benson <gbenson@redhat.com>
6172 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6173 struct stat.st_blocks and struct stat.st_blksize.
6174 * configure: Regenerate.
6175 * config.in: Likewise.
6176 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6177 (OBS): Add common-remote-fileio.o.
6178 (common-remote-fileio.o): New rule.
6180 2015-03-09 Pedro Alves <palves@redhat.com>
6182 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6183 'struct sockaddr' pointer in 'accept' call.
6185 2015-03-09 Pedro Alves <palves@redhat.com>
6188 2015-03-07 Pedro Alves <palves@redhat.com>
6189 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6190 or <winsock2.h> here. Instead include "gdb_socket.h".
6191 (remote_open): Use union gdb_sockaddr_u.
6192 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6193 or <winsock2.h> here. Instead include "gdb_socket.h".
6194 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6195 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6197 (init_named_socket, gdb_agent_helper_thread): Use union
6200 2015-03-07 Pedro Alves <palves@redhat.com>
6202 * configure.ac (build_warnings): Move
6203 -Wdeclaration-after-statement to the C-specific set.
6204 * configure: Regenerate.
6206 2015-03-07 Pedro Alves <palves@redhat.com>
6208 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6209 or <winsock2.h> here. Instead include "gdb_socket.h".
6210 (remote_open): Use union gdb_sockaddr_u.
6211 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6212 or <winsock2.h> here. Instead include "gdb_socket.h".
6213 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6214 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6216 (init_named_socket, gdb_agent_helper_thread): Use union
6219 2015-03-07 Pedro Alves <palves@redhat.com>
6221 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6224 2015-03-06 Yao Qi <yao.qi@linaro.org>
6226 * linux-aarch64-low.c (aarch64_insert_point): Use
6227 show_debug_regs as a boolean.
6228 (aarch64_remove_point): Likewise.
6230 2015-03-05 Pedro Alves <palves@redhat.com>
6232 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6233 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6234 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6235 * nto-low.c (nto_target_ops): Likewise.
6236 * spu-low.c (spu_target_ops): Likewise.
6237 * win32-low.c (win32_target_ops): Likewise.
6239 2015-03-04 Pedro Alves <palves@redhat.com>
6241 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6242 Decide whether a breakpoint triggered based on the SIGTRAP's
6244 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6245 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6246 (linux_low_filter_event): Check for breakpoints before checking
6248 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6250 (linux_stopped_by_sw_breakpoint)
6251 (linux_supports_stopped_by_sw_breakpoint)
6252 (linux_stopped_by_hw_breakpoint)
6253 (linux_supports_stopped_by_hw_breakpoint): New functions.
6254 (linux_target_ops): Install new target methods.
6256 2015-03-04 Pedro Alves <palves@redhat.com>
6258 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6259 * server.c (swbreak_feature, hwbreak_feature): New globals.
6260 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6261 (captured_main): Clear swbreak_feature and hwbreak_feature.
6262 * server.h (swbreak_feature, hwbreak_feature): Declare.
6263 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6264 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6265 supports_stopped_by_hw_breakpoint>: New fields.
6266 (target_supports_stopped_by_sw_breakpoint)
6267 (target_stopped_by_sw_breakpoint)
6268 (target_supports_stopped_by_hw_breakpoint)
6269 (target_stopped_by_hw_breakpoint): Declare.
6271 2015-03-04 Pedro Alves <palves@redhat.com>
6273 enum lwp_stop_reason -> enum target_stop_reason
6274 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6275 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6276 (linux_wait_1, stuck_in_jump_pad_callback)
6277 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6278 (linux_stopped_by_watchpoint):
6279 * linux-low.h (enum lwp_stop_reason): Delete.
6280 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6281 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6283 2015-03-04 Yao Qi <yao.qi@linaro.org>
6285 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6287 2015-03-03 Gary Benson <gbenson@redhat.com>
6289 * hostio.c (handle_vFile): Fix prefix lengths.
6291 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6293 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6296 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6298 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6299 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6300 (clean): Add "rm -f" for above C files.
6301 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6302 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6303 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6304 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6305 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6306 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6307 (init_registers_s390x_vx_linux64)
6308 (init_registers_s390x_tevx_linux64)
6309 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6310 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6312 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6313 (s390_store_vxrs_high): New functions.
6314 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6316 (s390_arch_setup): Add logic for selecting one of the new target
6317 descriptions. Activate the new vector regsets if applicable.
6318 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6319 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6320 and init_registers_s390x_tevx_linux64.
6322 2015-03-01 Pedro Alves <palves@redhat.com>
6324 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6327 2015-02-27 Pedro Alves <palves@redhat.com>
6329 * linux-x86-low.c (u_debugreg_offset): New function.
6330 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6332 2015-02-27 Pedro Alves <palves@redhat.com>
6334 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6335 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6336 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6337 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6338 (ps_lsetfpregs, ps_getpid)
6339 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6340 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6341 (ps_lsetxregs, ps_plog): Declare.
6343 2015-02-27 Pedro Alves <palves@redhat.com>
6345 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6346 IP_AGENT_EXPORT_FUNC.
6347 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6348 IP_AGENT_EXPORT_FUNC.
6349 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6350 (IP_AGENT_EXPORT): Delete.
6351 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6352 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6353 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6354 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6355 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6356 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6357 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6358 (traceframe_read_count, traceframe_write_count)
6359 (traceframes_created, trace_state_variables, get_raw_reg)
6360 (get_trace_state_variable_value, set_trace_state_variable_value)
6361 (ust_loaded, helper_thread_id, cmd_buf): Use
6362 IPA_SYM_EXPORTED_NAME.
6363 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6364 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6365 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6366 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6367 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6368 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6369 EXTERN_C_PUSH/EXTERN_C_POP.
6370 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6371 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6372 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6373 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6374 (traceframe_write_count, traceframe_read_count)
6375 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6376 (about_to_request_buffer_space, get_trace_state_variable_value)
6377 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6378 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6379 EXTERN_C_PUSH/EXTERN_C_POP.
6380 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6381 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6382 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6383 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6384 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6385 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6386 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6387 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6389 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6390 (IP_AGENT_EXPORT_VAR_DECL): Define.
6392 (gdb_agent_get_raw_reg): Declare.
6394 2015-02-27 Tom Tromey <tromey@redhat.com>
6395 Pedro Alves <palves@redhat.com>
6397 Rename symbols whose names are reserved C++ keywords throughout.
6399 2015-02-27 Pedro Alves <palves@redhat.com>
6401 * Makefile.in (COMPILER): New, get it from autoconf.
6402 (CXX): Get from autoconf instead.
6403 (COMPILE.pre): Use COMPILER.
6404 (CC-LD): Rename to ...
6405 (CC_LD): ... this. Use COMPILER.
6406 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6407 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6408 * acinclude.m4: Include build-with-cxx.m4.
6409 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6410 Disable -Werror by default if building in C++ mode.
6411 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6412 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6413 the C++ compiler. Save/restore CXXFLAGS too.
6414 * configure: Regenerate.
6416 2015-02-27 Pedro Alves <palves@redhat.com>
6418 * acinclude.m4: Include libiberty.m4.
6419 * configure.ac: Call libiberty_INIT.
6420 * config.in, configure: Regenerate.
6422 2015-02-26 Pedro Alves <palves@redhat.com>
6424 * linux-low.c (linux_wait_1): When incrementing the PC past a
6425 program breakpoint always use the_low_target.breakpoint_len as
6426 increment, rather than the maximum between that and
6427 the_low_target.decr_pc_after_break.
6429 2015-02-23 Pedro Alves <palves@redhat.com>
6431 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6432 thread was doing a step-over; always adjust the PC if
6433 we stepped over a permanent breakpoint.
6434 (linux_wait_1): If we stepped over breakpoint that was on top of a
6435 permanent breakpoint, manually advance the PC past it.
6437 2015-02-23 Pedro Alves <palves@redhat.com>
6439 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6441 (x86_fill_gregset, x86_store_gregset): Use it when handling
6444 2015-02-20 Pedro Alves <palves@redhat.com>
6446 * thread-db.c: Include "nat/linux-procfs.h".
6447 (thread_db_init): Skip listing new threads if the kernel supports
6448 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6450 2015-02-20 Pedro Alves <palves@redhat.com>
6452 * linux-low.c (status_pending_p_callback): Use ptid_match.
6454 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6456 PR breakpoints/16812
6457 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6458 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6459 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6461 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6463 PR breakpoints/15956
6464 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6466 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6468 * linux-low.c (linux_low_btrace_conf): Print size.
6469 * server.c (handle_btrace_conf_general_set): New.
6470 (hanle_general_set): Call handle_btrace_conf_general_set.
6471 (handle_query): Report Qbtrace-conf:bts:size as supported.
6473 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6475 * linux-low.c (linux_low_enable_btrace): Update parameters.
6476 (linux_low_btrace_conf): New.
6477 (linux_target_ops)<to_btrace_conf>: Initialize.
6478 * server.c (current_btrace_conf): New.
6479 (handle_btrace_enable): Rename to ...
6480 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
6481 to target_enable_btrace. Update comment. Update users.
6482 (handle_qxfer_btrace_conf): New.
6483 (qxfer_packets): Add btrace-conf entry.
6484 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6485 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6486 (target_ops)<read_btrace_conf>: New.
6487 (target_enable_btrace): Update parameters.
6488 (target_read_btrace_conf): New.
6490 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6492 * server.c (handle_btrace_general_set): Remove call to
6493 target_supports_btrace.
6494 (supported_btrace_packets): New.
6495 (handle_query): Call supported_btrace_packets.
6496 * target.h: include btrace-common.h.
6497 (btrace_target_info): Removed.
6498 (supports_btrace, target_supports_btrace): Update parameters.
6500 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6502 * Makefile.in (SFILES): Add common/btrace-common.c.
6503 (OBS): Add common/btrace-common.o.
6504 (btrace-common.o): Add build rules.
6505 * linux-low: Include btrace-common.h.
6506 (linux_low_read_btrace): Use struct btrace_data. Call
6507 btrace_data_init and btrace_data_fini.
6509 2015-02-06 Pedro Alves <palves@redhat.com>
6511 * thread-db.c (find_new_threads_callback): Add debug output.
6513 2015-02-04 Pedro Alves <palves@redhat.com>
6515 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6516 (resume_stopped_resumed_lwps): New function.
6517 (linux_wait_for_event_filtered): Use it.
6519 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6521 * Makefile.in (SFILES): Add linux-personality.c.
6522 (linux-personality.o): New rule.
6523 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6524 list of objects to be built.
6525 * linux-low.c: Include nat/linux-personality.h.
6526 (linux_create_inferior): Remove code to disable address space
6527 randomization (moved to ../nat/linux-personality.c). Create
6528 cleanup to disable address space randomization.
6530 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6532 * Makefile.in (posix-strerror.o): New rule.
6533 (mingw-strerror.o): Likewise.
6534 * configure: Regenerated.
6535 * configure.ac: Source file ../common/common.host. Initialize new
6536 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6538 2015-01-14 Yao Qi <yao@codesourcery.com>
6540 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6541 (ppc-linux.o): New rule.
6542 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6543 * configure.ac: AC_CHECK_FUNCS(getauxval).
6544 * config.in: Re-generated.
6545 * configure: Re-generated.
6546 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6547 ppc64_64bit_inferior_p
6549 2015-01-14 Yao Qi <yao@codesourcery.com>
6551 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6552 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6553 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6554 (PT_ORIG_R3, PT_TRAP): Likewise.
6555 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6556 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6557 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6559 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6561 * i387-fp.c (i387_cache_to_xsave): In look over
6562 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6563 zmmh_low_space field by use of zmmh_high_space.
6565 2015-01-09 Pedro Alves <palves@redhat.com>
6567 * linux-low.c (step_over_bkpt): Move higher up in the file.
6568 (handle_extended_wait): Don't store the stop_pc here.
6569 (get_stop_pc): Adjust comments and rename to ...
6570 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6571 stopped for a software breakpoint or hardware breakpoint.
6572 (thread_still_has_status_pending_p): New function.
6573 (status_pending_p_callback): Use
6574 thread_still_has_status_pending_p. If the event is no longer
6575 interesting, resume the LWP.
6576 (handle_tracepoints): Add assert.
6577 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6578 (wstatus_maybe_breakpoint): New function.
6579 (cancel_breakpoint): Delete function.
6580 (check_stopped_by_watchpoint): New function, factored out from
6581 linux_low_filter_event.
6582 (lp_status_maybe_breakpoint): Delete function.
6583 (linux_low_filter_event): Remove filter_ptid argument.
6584 Leave thread group exits pending here. Store the LWP's stop PC.
6585 Always leave events pending.
6586 (linux_wait_for_event_filtered): Pull all events out of the
6587 kernel, and leave them all pending.
6588 (count_events_callback, select_event_lwp_callback): Consider all
6590 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6591 (select_event_lwp): Only give preference to the stepping LWP in
6592 all-stop mode. Adjust comments.
6593 (ignore_event): New function.
6594 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6595 references to cancel_breakpoints. Adjust to renames. Also give
6596 equal priority to all LWPs that have had events in non-stop mode.
6597 If reporting a software breakpoint event, unadjust the LWP's PC.
6598 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6599 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6601 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6602 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6603 (linux_stopped_by_watchpoint): Adjust.
6604 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6605 * linux-low.h (enum lwp_stop_reason): New.
6606 (struct lwp_info) <stop_pc>: Adjust comment.
6607 <stopped_by_watchpoint>: Delete field.
6608 <stop_reason>: New field.
6609 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6610 * mem-break.c (software_breakpoint_inserted_here)
6611 (hardware_breakpoint_inserted_here): New function.
6612 * mem-break.h (software_breakpoint_inserted_here)
6613 (hardware_breakpoint_inserted_here): Declare.
6614 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6615 (cancel_breakpoints): Delete.
6616 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6617 (upload_fast_traceframes): Remove references to
6620 2015-01-09 Pedro Alves <palves@redhat.com>
6622 * thread-db.c (find_new_threads_callback): Ignore thread if the
6623 kernel thread ID is -1.
6625 2015-01-09 Pedro Alves <palves@redhat.com>
6627 * linux-low.c (linux_attach_fail_reason_string): Move to
6628 nat/linux-ptrace.c, and rename.
6629 (linux_attach_lwp): Update comment.
6630 (attach_proc_task_lwp_callback): New function.
6631 (linux_attach): Adjust to rename and use
6632 linux_proc_attach_tgid_threads.
6633 (linux_attach_fail_reason_string): Delete declaration.
6635 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6637 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6638 * server.c (gdbserver_version): Likewise.
6640 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6642 * remote-utils.c: Include ctype.h.
6643 (input_interrupt): Explicitly handle the case when the char
6644 received is the NUL byte. Improve the printing of non-ASCII
6647 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6649 * linux-low.c (linux_low_filter_event): Update call to
6650 linux_enable_event_reporting following the addition of
6651 a new parameter to that function.
6653 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6656 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6657 (AARCH64_FPCR_REGNO): Likewise.
6658 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6659 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6660 (aarch64_store_fpregset): Likewise.
6662 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6664 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6665 Remove FIXME comment about assumption about N.
6667 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6669 * configure.ac: If large-file support is disabled in GDBserver,
6670 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6671 * configure: Regenerate.
6673 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6675 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6676 warning upon ENODATA from ptrace.
6677 * linux-s390-low.c (s390_store_tdb): New.
6678 (s390_regsets): Add regset for NT_S390_TDB.
6680 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6682 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6683 without a fill_function.
6684 * linux-s390-low.c (s390_fill_last_break): Remove.
6685 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6686 (s390_arch_setup): Use regset's size instead of fill_function for
6689 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6691 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6692 the regset's store function when ptrace returned an error.
6693 * regcache.c (get_thread_regcache): Invalidate register cache
6694 before fetching inferior's registers.
6696 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6698 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6699 while-loop as for-loop.
6700 (regsets_store_inferior_registers): Likewise.
6702 2014-11-28 Yao Qi <yao@codesourcery.com>
6704 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6705 * config.in, configure: Re-generate.
6706 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6709 2014-11-21 Yao Qi <yao@codesourcery.com>
6711 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6712 (AC_CHECK_HEADERS): Remove malloc.h.
6713 * configure: Re-generated.
6714 * config.in: Re-generated.
6715 * server.h: Don't include alloca.h and malloc.h.
6716 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6717 Don't include malloc.h.
6719 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6721 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6722 corresponding ERRNO check in same block.
6724 2014-11-12 Pedro Alves <palves@redhat.com>
6726 * server.c (cont_thread): Update comment.
6727 (start_inferior, attach_inferior): No longer clear cont_thread.
6728 (handle_v_cont): No longer set cont_thread.
6729 (captured_main): Clear cont_thread each time a GDB connects.
6731 2014-11-12 Pedro Alves <palves@redhat.com>
6733 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6734 thread, and don't resume all threads if the Hc thread has exited.
6736 2014-11-12 Pedro Alves <palves@redhat.com>
6738 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6739 the process group instead of to a specific LWP.
6741 2014-10-15 Pedro Alves <palves@redhat.com>
6744 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6746 (arm_set_thread_context): Delete.
6747 (the_low_target): Adjust.
6748 * win32-i386-low.c (debug_registers_changed)
6749 (debug_registers_used): Delete.
6750 (update_debug_registers_callback): New function.
6751 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6752 needing to update their debug registers.
6753 (win32_get_current_dr): New function.
6754 (x86_dr_low_get_addr, x86_dr_low_get_control)
6755 (x86_dr_low_get_status): Fetch the debug register from the thread
6757 (i386_initial_stuff): Adjust.
6758 (i386_get_thread_context): Remove current_event parameter. Don't
6759 clear debug_registers_changed nor copy DR values to
6761 (i386_set_thread_context): Delete.
6762 (i386_prepare_to_resume): New function.
6763 (i386_thread_added): Mark the thread as needing to update irs
6765 (the_low_target): Remove i386_set_thread_context and install
6766 i386_prepare_to_resume.
6767 * win32-low.c (win32_get_thread_context): Adjust.
6768 (win32_set_thread_context): Use SetThreadContext
6770 (win32_prepare_to_resume): New function.
6771 (win32_require_context): New function, factored out from ...
6772 (thread_rec): ... this.
6773 (continue_one_thread): Call win32_prepare_to_resume on each thread
6774 we're about to continue.
6775 (win32_resume): Call win32_prepare_to_resume on the event thread.
6776 * win32-low.h (struct win32_thread_info)
6777 <debug_registers_changed>: New field.
6778 (struct win32_target_ops): Change prototype of set_thread_context,
6779 delete set_thread_context and add prepare_to_resume.
6780 (win32_require_context): New declaration.
6782 2014-10-08 Gary Benson <gbenson@redhat.com>
6784 * server.h: Do not include common-exceptions.h.
6786 2014-10-08 Gary Benson <gbenson@redhat.com>
6788 * server.h: Do not include cleanups.h.
6790 2014-09-30 James Hogan <james.hogan@imgtec.com>
6792 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6795 2014-09-23 Yao Qi <yao@codesourcery.com>
6797 * linux-low.c (lp_status_maybe_breakpoint): New function.
6798 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6799 (count_events_callback): Likewise.
6800 (select_event_lwp_callback): Likewise.
6801 (cancel_breakpoints_callback): Likewise.
6803 2014-09-19 Don Breazeal <donb@codesourcery.com>
6805 * linux-low.c (handle_extended_wait): Call
6806 linux_ptrace_get_extended_event.
6807 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6808 linux_is_extended_waitstatus.
6810 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6812 * Makefile.in (CPPFLAGS): Define.
6813 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6814 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6816 2014-09-16 Gary Benson <gbenson@redhat.com>
6818 * inferiors.h (current_inferior): Renamed as...
6819 (current_thread): New variable. All uses updated.
6820 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6821 (maybe_move_out_of_jump_pad): Likewise.
6822 (cancel_breakpoint): Likewise.
6823 (linux_low_filter_event): Likewise.
6824 (wait_for_sigstop): Likewise.
6825 (linux_resume_one_lwp): Likewise.
6826 (need_step_over_p): Likewise.
6827 (start_step_over): Likewise.
6828 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6829 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6830 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6831 and save_inferior as saved_thread.
6832 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6834 (regcache_invalidate_thread): Likewise.
6835 * remote-utils.c (prepare_resume_reply): Likewise.
6836 * thread-db.c (thread_db_get_tls_address): Likewise.
6837 (disable_thread_event_reporting): Likewise.
6838 (remove_thread_event_breakpoints): Likewise.
6839 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6841 * target.h (set_desired_inferior): Renamed as...
6842 (set_desired_thread): New declaration. All uses updated.
6843 * server.c (myresume): Updated comment to reference thread instead
6845 (handle_serial_event): Likewise.
6846 (handle_target_event): Likewise.
6848 2014-09-12 Tom Tromey <tromey@redhat.com>
6849 Gary Benson <gbenson@redhat.com>
6851 * regcache.h: Include common-regcache.h.
6852 (regcache_read_pc): Don't declare.
6853 * regcache.c (get_thread_regcache_for_ptid): New function.
6855 2014-09-11 Tom Tromey <tromey@redhat.com>
6856 Gary Benson <gbenson@redhat.com>
6858 * symbol.c: New file.
6859 * Makefile.in (SFILES): Add symbol.c.
6860 (OBS): Add symbol.o.
6862 2014-09-11 Gary Benson <gbenson@redhat.com>
6864 * target.c (target_stop_ptid, target_continue_ptid): New
6867 2014-09-11 Tom Tromey <tromey@redhat.com>
6868 Gary Benson <gbenson@redhat.com>
6870 * target.h: Include target/target.h.
6871 * target.c (target_read_memory, target_read_uint32)
6872 (target_write_memory): New functions.
6874 2014-09-11 Gary Benson <gbenson@redhat.com>
6876 * server.h (debug_hw_points): Don't declare.
6877 * server.c (debug_hw_points): Don't define. Replace all uses
6878 with show_debug_regs.
6879 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6880 all uses with show_debug_regs.
6882 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6884 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6885 endianness into account.
6886 (ppc_supply_ptrace_register): Likewise.
6888 2014-09-03 James Hogan <james.hogan@imgtec.com>
6890 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6891 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6893 2014-09-03 Gary Benson <gbenson@redhat.com>
6895 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6896 ALL_DEBUG_ADDRESS_REGISTERS.
6898 2014-09-02 Gary Benson <gbenson@redhat.com>
6900 * i386-low.h: Renamed as...
6901 * x86-low.h: New file. All type, function and variable name
6902 prefixes changed from "i386_" to "x86_". All references updated.
6903 * i386-low.c: Renamed as...
6904 * x86-low.c: New file. All type, function and variable name
6905 prefixes changed from "i386_" to "x86_". All references updated.
6907 2014-09-02 Gary Benson <gbenson@redhat.com>
6909 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6910 (x86_linux_new_thread): Likewise.
6912 2014-08-29 Gary Benson <gbenson@redhat.com>
6914 * server.h (setjmp.h): Do not include.
6915 (toplevel): Do not declare.
6916 (common-exceptions.h): Include.
6917 (cleanups.h): Likewise.
6918 * server.c (toplevel): Do not define.
6919 (exit_code): New static global.
6920 (detach_or_kill_for_exit_cleanup): New function.
6921 (main): New function. Original main renamed to...
6922 (captured_main): New function.
6923 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6925 2014-08-29 Gary Benson <gbenson@redhat.com>
6927 * Makefile.in (SFILES): Add common/common-exceptions.c.
6928 (OBS): Add common-exceptions.o.
6929 (common-exceptions.o): New rule.
6930 * utils.c (prepare_to_throw_exception): New function.
6932 2014-08-29 Gary Benson <gbenson@redhat.com>
6934 * config.in: Regenerate.
6935 * configure: Likewise.
6937 2014-08-29 Gary Benson <gbenson@redhat.com>
6939 * Makefile.in (SFILES): Add common/cleanups.c.
6941 (cleanups.o): New rule.
6943 2014-08-29 Gary Benson <gbenson@redhat.com>
6945 * utils.c (internal_vwarning): New function.
6947 2014-08-28 Gary Benson <gbenson@redhat.com>
6949 * utils.h (fatal): Remove declaration.
6950 * utils.c (fatal): Remove function.
6952 2014-08-28 Gary Benson <gbenson@redhat.com>
6954 * tracepoint.c (gdb_agent_init): Replace fatal with
6956 (initialize_tracepoint): Likewise.
6958 2014-08-28 Gary Benson <gbenson@redhat.com>
6960 * remote-utils.c (remote_prepare): Replace fatal with error.
6962 2014-08-28 Gary Benson <gbenson@redhat.com>
6964 * linux-low.c (linux_async): Replace fatal with warning.
6966 (linux_start_non_stop): Return -1 if linux_async failed.
6968 2014-08-28 Gary Benson <gbenson@redhat.com>
6970 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6972 (i386_dr_low_get_addr): Remove vague comment.
6973 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6976 2014-08-28 Gary Benson <gbenson@redhat.com>
6978 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6979 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6981 (linux_resume_one_lwp): Likewise.
6982 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6984 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6985 with internal_error.
6986 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6987 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6988 (find_register_by_name): Replace fatal with internal_error.
6989 (find_regno): Likewise.
6990 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6991 * thread-db.c (thread_db_create_event): Likewise.
6992 (thread_db_load_search): Likewise.
6993 (try_thread_db_load_1): Likewise.
6994 * tracepoint.c (get_jump_space_head): Replace fatal with
6996 (claim_trampoline_space): Likewise.
6997 (have_fast_tracepoint_trampoline_buffer): Likewise.
6998 (cmd_qtstart): Likewise.
6999 (stop_tracing): Likewise.
7000 (fast_tracepoint_collecting): Likewise.
7001 (target_malloc): Likewise.
7002 (download_tracepoint): Likewise.
7003 (download_trace_state_variables): Replace check with gdb_assert.
7004 (upload_fast_traceframes): Replace fatal with internal_error.
7006 2014-08-19 Tom Tromey <tromey@redhat.com>
7007 Gary Benson <gbenson@redhat.com>
7009 * Makefile.in (SFILES): Add common/common-debug.c.
7010 (OBS): Add common-debug.o.
7011 (common-debug.o): New rule.
7012 * debug.h (debug_printf): Don't declare.
7013 * debug.c (debug_printf): Renamed and rewritten as...
7014 (debug_vprintf): New function.
7016 2014-08-19 Gary Benson <gbenson@redhat.com>
7018 * utils.h: Do not include print-utils.h.
7020 2014-08-19 Tom Tromey <tromey@redhat.com>
7021 Gary Benson <gbenson@redhat.com>
7023 * server.h: Add static assertion.
7024 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7026 2014-08-19 Tom Tromey <tromey@redhat.com>
7027 Gary Benson <gbenson@redhat.com>
7029 * Makefile.in (SFILES): Add common/errors.c.
7030 (OBS): Add errors.o.
7031 (IPA_OBS): Add errors-ipa.o.
7032 (errors.o): New rule.
7033 (errors-ipa.o): Likewise.
7034 * utils.h (perror_with_name, error, warning): Don't declare.
7035 * utils.c (warning): Renamed and rewritten as...
7036 (vwarning): New function.
7037 (error): Renamed and rewritten as...
7038 (verror): New function.
7039 (internal_error): Renamed and rewritten as...
7040 (internal_verror): New function.
7042 2014-08-07 Gary Benson <gbenson@redhat.com>
7044 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7045 * configure: Regenerate.
7046 * config.in: Likewise.
7047 * server.h: Do not include errno.h.
7048 * event-loop.c: Likewise.
7049 * hostio-errno.c: Likewise.
7050 * linux-low.c: Likewise.
7051 * remote-utils.c: Likewise.
7052 * spu-low.c: Likewise.
7053 * utils.c: Likewise.
7054 * gdbreplay.c: Unconditionally include errno.h.
7056 2014-08-07 Gary Benson <gbenson@redhat.com>
7058 * server.h: Do not include string.h.
7059 * event-loop.c: Likewise.
7060 * linux-low.c: Likewise.
7061 * regcache.c: Likewise.
7062 * remote-utils.c: Likewise.
7063 * spu-low.c: Likewise.
7064 * utils.c: Likewise.
7066 2014-08-07 Gary Benson <gbenson@redhat.com>
7068 * server.h: Do not include gdb_assert.h.
7070 2014-08-07 Gary Benson <gbenson@redhat.com>
7072 * server.h: Do not include common-utils.h.
7074 2014-08-07 Gary Benson <gbenson@redhat.com>
7076 * server.h: Do not include ptid.h.
7077 * notif.h: Likewise.
7079 2014-08-07 Gary Benson <gbenson@redhat.com>
7081 * server.h: Do not include gdb_locale.h.
7083 2014-08-07 Gary Benson <gbenson@redhat.com>
7085 * server.h: Do not include gdb/signals.h.
7086 * win32-low.c: Likewise.
7088 2014-08-07 Gary Benson <gbenson@redhat.com>
7090 * server.h: Do not include pathmax.h.
7092 2014-08-07 Gary Benson <gbenson@redhat.com>
7094 * server.h: Do not include libiberty.h.
7095 * linux-bfin-low.c: Likewise.
7097 2014-08-07 Gary Benson <gbenson@redhat.com>
7099 * server.h: Do not include ansidecl.h.
7101 2014-08-07 Gary Benson <gbenson@redhat.com>
7103 * linux-x86-low.c: Do not include stddef.h.
7104 * lynx-ppc-low.c: Likewise.
7105 * tracepoint.c: Likewise.
7107 2014-08-07 Gary Benson <gbenson@redhat.com>
7109 * server.h: Do not include stdarg.h.
7110 * nto-low.c: Likewise.
7112 2014-08-07 Gary Benson <gbenson@redhat.com>
7114 * server.h: Do not include stdlib.h.
7115 * inferiors.c: Likewise.
7116 * linux-low.c: Likewise.
7117 * regcache.c: Likewise.
7118 * spu-low.c: Likewise.
7119 * tracepoint.c: Likewise.
7120 * utils.c: Likewise.
7122 2014-08-07 Gary Benson <gbenson@redhat.com>
7124 * server.h: Do not include stdio.h.
7125 * linux-low.c: Likewise.
7126 * remote-utils.c: Likewise.
7127 * spu-low.c: Likewise.
7128 * utils.c: Likewise.
7129 * wincecompat.c: Likewise.
7131 2014-08-06 Gary Benson <gbenson@redhat.com>
7133 * regcache.c (init_register_cache): Move conditionals inside if.
7135 2014-08-06 Gary Benson <gbenson@redhat.com>
7137 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7139 2014-07-31 Gary Benson <gbenson@redhat.com>
7141 * ax.h: Do not include server.h.
7142 * gdbthread.h: Likewise.
7143 * lynx-low.h: Likewise.
7144 * notif.h: Likewise.
7146 2014-07-30 Gary Benson <gbenson@redhat.com>
7148 * server.h: Include common-defs.h.
7149 Do not include config.h or build-gnulib-gdbserver/config.h.
7151 2014-07-30 Gary Benson <gbenson@redhat.com>
7153 * hostio-errno.c: Move server.h to top of includes list.
7154 * inferiors.c: Likewise.
7155 * linux-x86-low.c: Likewise.
7156 * notif.c: Include server.h.
7158 2014-07-24 Tom Tromey <tromey@redhat.com>
7159 Gary Benson <gbenson@redhat.com>
7161 * server.h (CORE_ADDR): Now unsigned.
7163 2014-07-16 Pedro Alves <palves@redhat.com>
7165 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7167 2014-07-15 Pedro Alves <palves@redhat.com>
7169 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7172 2014-07-11 Pedro Alves <palves@redhat.com>
7174 * linux-low.c (kill_wait_lwp): New function, based on
7175 kill_one_lwp_callback, but use my_waitpid directly.
7176 (kill_one_lwp_callback, linux_kill): Use it.
7178 2014-06-23 Pedro Alves <palves@redhat.com>
7180 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7181 before setting DR0..DR3.
7183 2014-06-20 Gary Benson <gbenson@redhat.com>
7185 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7186 * configure: Regenerated.
7187 * config.in: Likewise.
7189 2014-06-20 Gary Benson <gbenson@redhat.com>
7191 * Makefile.in (SFILES): Update locations for files moved
7193 (object file files): Reordered.
7195 2014-06-20 Gary Benson <gbenson@redhat.com>
7197 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7198 (i386_dr_low_set_addr): Likewise.
7199 (i386_dr_low_get_addr): Likewise.
7200 (i386_dr_low_can_set_control): Likewise.
7201 (i386_dr_low_set_control): Likewise.
7202 (i386_dr_low_get_control): Likewise.
7203 (i386_dr_low_get_status): Likewise.
7204 (i386_get_debug_register_length): Likewise.
7205 * linux-x86-low.c (i386_dr_low_set_addr):
7206 Changed signature. Made static.
7207 (i386_dr_low_get_addr): Likewise.
7208 (i386_dr_low_set_control): Likewise.
7209 (i386_dr_low_get_control): Likewise.
7210 (i386_dr_low_get_status): Likewise.
7211 (i386_dr_low): New global variable.
7212 * win32-i386-low.c (i386_dr_low_set_addr):
7213 Changed signature. Made static.
7214 (i386_dr_low_get_addr): Likewise.
7215 (i386_dr_low_set_control): Likewise.
7216 (i386_dr_low_get_control): Likewise.
7217 (i386_dr_low_get_status): Likewise.
7218 (i386_dr_low): New global variable.
7220 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7222 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7223 * Makefile.in (AR, AR_FLAGS): Define.
7224 * configure: Regenerate.
7226 2014-06-19 Gary Benson <gbenson@redhat.com>
7228 * Makefile.in (i386-dregs.o): New rule.
7229 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7230 * i386-low.c (target.h): Remove include.
7231 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7232 (DR_CONTROL_SHIFT): Likewise.
7233 (DR_CONTROL_SIZE): Likewise.
7234 (DR_RW_EXECUTE): Likewise.
7235 (DR_RW_WRITE): Likewise.
7236 (DR_RW_READ): Likewise.
7237 (DR_RW_IORW): Likewise.
7238 (DR_LEN_1): Likewise.
7239 (DR_LEN_2): Likewise.
7240 (DR_LEN_4): Likewise.
7241 (DR_LEN_8): Likewise.
7242 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7243 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7244 (DR_ENABLE_SIZE): Likewise.
7245 (DR_LOCAL_SLOWDOWN): Likewise.
7246 (DR_GLOBAL_SLOWDOWN): Likewise.
7247 (DR_CONTROL_RESERVED): Likewise.
7248 (I386_DR_CONTROL_MASK): Likewise.
7249 (I386_DR_VACANT): Likewise.
7250 (I386_DR_LOCAL_ENABLE): Likewise.
7251 (I386_DR_GLOBAL_ENABLE): Likewise.
7252 (I386_DR_DISABLE): Likewise.
7253 (I386_DR_SET_RW_LEN): Likewise.
7254 (I386_DR_GET_RW_LEN): Likewise.
7255 (I386_DR_WATCH_HIT): Likewise.
7256 (i386_wp_op_t): Likewise.
7257 (i386_show_dr): Likewise.
7258 (i386_length_and_rw_bits): Likewise.
7259 (i386_insert_aligned_watchpoint): Likewise.
7260 (i386_remove_aligned_watchpoint): Likewise.
7261 (i386_handle_nonaligned_watchpoint): Likewise.
7262 i386_update_inferior_debug_regs(): Likewise.
7263 (i386_dr_insert_watchpoint): Likewise.
7264 (i386_dr_remove_watchpoint): Likewise.
7265 (i386_dr_region_ok_for_watchpoint): Likewise.
7266 (i386_dr_stopped_data_address): Likewise.
7267 (i386_dr_stopped_by_watchpoint): Likewise.
7269 2014-06-19 Gary Benson <gbenson@redhat.com>
7271 * i386-low.c (i386_dr_show): Renamed to
7272 i386_show_dr and made static. All uses updated.
7273 (i386_dr_length_and_rw_bits): Renamed to
7274 i386_length_and_rw_bits and made static.
7276 (i386_dr_insert_aligned_watchpoint): Renamed to
7277 i386_insert_aligned_watchpoint and made static.
7279 (i386_dr_remove_aligned_watchpoint): Renamed to
7280 i386_remove_aligned_watchpoint and made static.
7282 (i386_dr_update_inferior_debug_regs): Renamed to
7283 i386_update_inferior_debug_regs and made static.
7286 2014-06-18 Gary Benson <gbenson@redhat.com>
7288 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7289 (i386_dr_low_can_set_control): Likewise.
7290 (i386_get_debug_register_length): Likewise.
7291 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7292 (i386_dr_low_can_set_control): Likewise.
7293 (i386_get_debug_register_length): Likewise.
7295 2014-06-17 Gary Benson <gbenson@redhat.com>
7297 * i386-low.h (i386-dregs.h): New include.
7298 (DR_FIRSTADDR): Now in i386-dregs.h.
7299 (DR_LASTADDR): Likewise.
7300 (DR_NADDR): Likewise.
7301 (DR_STATUS): Likewise.
7302 (DR_CONTROL): Likewise.
7303 (i386_debug_reg_state): Likewise.
7304 (i386_dr_insert_watchpoint): Likewise.
7305 (i386_dr_remove_watchpoint): Likewise.
7306 (i386_dr_region_ok_for_watchpoint): Likewise.
7307 (i386_dr_stopped_data_address): Likewise.
7308 (i386_dr_stopped_by_watchpoint): Likewise.
7309 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7311 2014-06-18 Gary Benson <gbenson@redhat.com>
7313 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7314 i386_dr_insert_watchpoint.
7315 (i386_low_remove_watchpoint): Renamed to
7316 i386_dr_remove_watchpoint.
7317 (i386_low_region_ok_for_watchpoint): Renamed to
7318 i386_dr_region_ok_for_watchpoint.
7319 (i386_low_stopped_data_address): Renamed to
7320 i386_dr_stopped_data_address.
7321 (i386_low_stopped_by_watchpoint): Renamed to
7322 i386_dr_stopped_by_watchpoint.
7323 * i386-low.c (i386_show_dr): Renamed to
7324 i386_dr_show and made nonstatic. All uses updated.
7325 (i386_length_and_rw_bits): Renamed to
7326 i386_dr_length_and_rw_bits and made nonstatic.
7328 (i386_insert_aligned_watchpoint): Renamed to
7329 i386_dr_insert_aligned_watchpoint and made nonstatic.
7331 (i386_remove_aligned_watchpoint): Renamed to
7332 i386_dr_remove_aligned_watchpoint and made nonstatic.
7334 (i386_update_inferior_debug_regs): Renamed to
7335 i386_dr_update_inferior_debug_regs and made nonstatic.
7337 (i386_low_insert_watchpoint): Renamed to
7338 i386_dr_insert_watchpoint. All uses updated.
7339 (i386_low_remove_watchpoint): Renamed to
7340 i386_dr_remove_watchpoint. All uses updated.
7341 (i386_low_region_ok_for_watchpoint): Renamed to
7342 i386_dr_region_ok_for_watchpoint. All uses updated.
7343 (i386_low_stopped_data_address): Renamed to
7344 i386_dr_stopped_data_address. All uses updated.
7345 (i386_low_stopped_by_watchpoint): Renamed to
7346 i386_dr_stopped_by_watchpoint. All uses updated.
7348 2014-06-18 Gary Benson <gbenson@redhat.com>
7350 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7351 (i386_dr_low_can_set_control): Likewise.
7352 (i386_insert_aligned_watchpoint): New check.
7354 2014-06-18 Gary Benson <gbenson@redhat.com>
7356 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7359 2014-06-18 Gary Benson <gbenson@redhat.com>
7361 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7362 instead of fatal and error.
7363 (i386_handle_nonaligned_watchpoint): Likewise.
7365 2014-06-18 Gary Benson <gbenson@redhat.com>
7367 * i386-low.c (i386_get_debug_register_length): New macro.
7368 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7369 (i386_show_dr): Use debug_printf instead of fprintf. Use
7370 phex to format values.
7372 2014-06-18 Gary Benson <gbenson@redhat.com>
7374 * i386-low.h: Comment changes.
7375 * i386-low.c: Likewise.
7377 2014-06-18 Gary Benson <gbenson@redhat.com>
7379 * i386-low.c: Whitespace changes.
7381 2014-06-12 Tom Tromey <tromey@redhat.com>
7383 * utils.c (freeargv): Remove.
7385 2014-06-12 Tom Tromey <tromey@redhat.com>
7387 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7388 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7389 (parse_debug_format_options): Likewise.
7390 (gdbserver_usage): Likewise.
7391 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7392 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7393 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7395 ($(LIBGNU)): Depend on libiberty.
7396 (all-lib): Recurse into all subdirs.
7397 (install-only): Invoke "install" target in subdirs.
7398 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7400 * configure: Rebuild.
7401 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7402 for vasprintf, vsnprintf, or gettimeofday.
7403 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7406 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7408 * development.sh: Delete.
7409 * Makefile.in (config.status): Adjust dependency on development.sh.
7410 * configure.ac: Adjust development.sh source call.
7411 * configure: Regenerate.
7413 2014-06-02 Pedro Alves <palves@redhat.com>
7415 * ax.c (gdb_free_agent_expr): New function.
7416 * ax.h (gdb_free_agent_expr): New declaration.
7417 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7419 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7421 (clear_breakpoint_conditions_and_commands): New function.
7422 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7423 (clear_breakpoint_conditions_and_commands): New declaration.
7425 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7427 * linux-aarch64-low.c (asm/ptrace.h): Include.
7429 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7431 Fix TLS access for -static -pthread.
7432 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7433 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7434 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7436 2014-05-20 Pedro Alves <palves@redhat.com>
7438 * linux-aarch64-low.c (aarch64_insert_point)
7439 (aarch64_remove_point): No longer check whether the type is
7440 supported here. Adjust to new interface.
7441 (the_low_target): Install aarch64_supports_z_point_type as
7442 supports_z_point_type method.
7443 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7444 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7445 instead of a Z packet char. Adjust.
7446 (arm_supports_z_point_type): New function.
7447 (arm_insert_point, arm_remove_point): Adjust to new interface.
7448 (the_low_target): Install arm_supports_z_point_type.
7449 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7450 (cris_insert_point, cris_remove_point): Adjust to new interface.
7451 Don't check whether the type is supported here.
7452 (the_low_target): Install cris_supports_z_point_type.
7453 * linux-low.c (linux_supports_z_point_type): New function.
7454 (linux_insert_point, linux_remove_point): Adjust to new interface.
7455 * linux-low.h (struct linux_target_ops) <insert_point,
7456 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7457 raw_breakpoint pointer parameter.
7458 <supports_z_point_type>: New method.
7459 * linux-mips-low.c (mips_supports_z_point_type): New function.
7460 (mips_insert_point, mips_remove_point): Adjust to new interface.
7461 Use mips_supports_z_point_type.
7462 (the_low_target): Install mips_supports_z_point_type.
7463 * linux-ppc-low.c (the_low_target): Install NULL as
7464 supports_z_point_type method.
7465 * linux-s390-low.c (the_low_target): Install NULL as
7466 supports_z_point_type method.
7467 * linux-sparc-low.c (the_low_target): Install NULL as
7468 supports_z_point_type method.
7469 * linux-x86-low.c (x86_supports_z_point_type): New function.
7470 (x86_insert_point): Adjust to new insert_point interface. Use
7471 insert_memory_breakpoint. Adjust to new
7472 i386_low_insert_watchpoint interface.
7473 (x86_remove_point): Adjust to remove_point interface. Use
7474 remove_memory_breakpoint. Adjust to new
7475 i386_low_remove_watchpoint interface.
7476 (the_low_target): Install x86_supports_z_point_type.
7477 * lynx-low.c (lynx_target_ops): Install NULL as
7478 supports_z_point_type callback.
7479 * nto-low.c (nto_supports_z_point_type): New.
7480 (nto_insert_point, nto_remove_point): Adjust to new interface.
7481 (nto_target_ops): Install nto_supports_z_point_type.
7482 * mem-break.c: Adjust intro comment.
7483 (struct raw_breakpoint) <raw_type, size>: New fields.
7484 <inserted>: Update comment.
7485 <shlib_disabled>: Delete field.
7486 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7487 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7488 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7489 (raw_bkpt_type_to_target_hw_bp_type): New function.
7490 (find_enabled_raw_code_breakpoint_at): New function.
7491 (find_raw_breakpoint_at): New type and size parameters. Use them.
7492 (insert_memory_breakpoint): New function, based off
7493 set_raw_breakpoint_at.
7494 (remove_memory_breakpoint): New function.
7495 (set_raw_breakpoint_at): Reimplement.
7496 (set_breakpoint): New, based on set_breakpoint_at.
7497 (set_breakpoint_at): Reimplement.
7498 (delete_raw_breakpoint): Go through the_target->remove_point
7499 instead of assuming memory breakpoints.
7500 (find_gdb_breakpoint_at): Delete.
7501 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7502 (find_gdb_breakpoint): New function.
7503 (set_gdb_breakpoint_at): Delete.
7504 (z_type_supported): New function.
7505 (set_gdb_breakpoint_1): New function, loosely based off
7506 set_gdb_breakpoint_at.
7507 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7508 (delete_gdb_breakpoint_at): Delete.
7509 (delete_gdb_breakpoint_1): New function, loosely based off
7510 delete_gdb_breakpoint_at.
7511 (delete_gdb_breakpoint): New function.
7512 (clear_gdb_breakpoint_conditions): Rename to ...
7513 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7515 (add_condition_to_breakpoint): Make static.
7516 (add_breakpoint_condition): Take a struct breakpoint pointer
7517 instead of an address. Adjust.
7518 (gdb_condition_true_at_breakpoint): Rename to ...
7519 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7521 (gdb_condition_true_at_breakpoint): Reimplement.
7522 (add_breakpoint_commands): Take a struct breakpoint pointer
7523 instead of an address. Adjust.
7524 (gdb_no_commands_at_breakpoint): Rename to ...
7525 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7526 parameter. Return true if no breakpoint was found. Change debug
7528 (gdb_no_commands_at_breakpoint): Reimplement.
7529 (run_breakpoint_commands): Rename to ...
7530 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7531 and change return type to boolean.
7532 (run_breakpoint_commands): New function.
7533 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7534 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7535 breakpoint. Go through the_target->remove_point instead of
7536 assuming memory breakpoint.
7537 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7538 software and hardware breakpoints.
7539 (reinsert_raw_breakpoint): Go through the_target->insert_point
7540 instead of assuming memory breakpoint.
7541 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7542 software and hardware breakpoints.
7543 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7544 Check both software and hardware breakpoints.
7545 (validate_inserted_breakpoint): Assert the breakpoint is a
7546 software breakpoint. Set the inserted flag to -1 instead of
7547 setting shlib_disabled.
7548 (delete_disabled_breakpoints): Adjust.
7549 (validate_breakpoints): Only validate software breakpoints.
7550 Adjust to inserted flag change.
7551 (check_mem_read, check_mem_write): Skip breakpoint types other
7552 than software breakpoints. Adjust to inserted flag change.
7553 * mem-break.h (enum raw_bkpt_type): New enum.
7554 (raw_breakpoint, struct process_info): Forward declare.
7555 (Z_packet_to_target_hw_bp_type): Delete declaration.
7556 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7557 (set_gdb_breakpoint, delete_gdb_breakpoint)
7558 (clear_breakpoint_conditions): New declarations.
7559 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7560 (breakpoint_inserted_here): Update comment.
7561 (add_breakpoint_condition, add_breakpoint_commands): Replace
7562 address parameter with a breakpoint pointer parameter.
7563 (gdb_breakpoint_here): Update comment.
7564 (delete_gdb_breakpoint_at): Delete.
7565 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7566 * server.c (process_point_options): Take a struct breakpoint
7567 pointer instead of an address. Adjust.
7568 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7569 delete_gdb_breakpoint.
7570 * spu-low.c (spu_target_ops): Install NULL as
7571 supports_z_point_type method.
7572 * target.h: Include mem-break.h.
7573 (struct target_ops) <prepare_to_access_memory>: Update comment.
7574 <supports_z_point_type>: New field.
7575 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7576 instead of a char. Also take a raw breakpoint pointer.
7577 * win32-arm-low.c (the_low_target): Install NULL as
7578 supports_z_point_type.
7579 * win32-i386-low.c (i386_supports_z_point_type): New function.
7580 (i386_insert_point, i386_remove_point): Adjust to new interface.
7581 (the_low_target): Install i386_supports_z_point_type.
7582 * win32-low.c (win32_supports_z_point_type): New function.
7583 (win32_insert_point, win32_remove_point): Adjust to new interface.
7584 (win32_target_ops): Install win32_supports_z_point_type.
7585 * win32-low.h (struct win32_target_ops):
7586 <supports_z_point_type>: New method.
7587 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7588 instead of a char. Also take a raw breakpoint pointer.
7590 2014-05-20 Pedro Alves <palves@redhat.com>
7592 * mem-break.h: Include break-common.h.
7593 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7594 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7595 (Z_packet_to_target_hw_bp_type): New declaration.
7596 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7597 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7598 (Z_PACKET_ACCESS_WP): Delete macros.
7599 (Z_packet_to_hw_type): Delete function.
7600 * i386-low.h: Don't include break-common.h here.
7601 (Z_packet_to_hw_type): Delete declaration.
7602 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7603 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7604 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7605 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7606 * linux-aarch64-low.c: Don't include break-common.h here.
7607 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7608 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7609 (Z_packet_to_target_hw_bp_type): Delete function.
7610 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7612 (mips_insert_point, mips_remove_point): Use
7613 Z_packet_to_target_hw_bp_type.
7615 2014-05-20 Pedro Alves <palves@redhat.com>
7617 * linux-aarch64-low.c: Include break-common.h.
7618 (enum target_point_type): Delete.
7619 (Z_packet_to_point_type): Rename to ...
7620 (Z_packet_to_target_hw_bp_type): ... this, and return a
7621 target_hw_bp_type instead.
7622 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7623 instead of an enum target_point_type.
7624 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7626 (aarch64_dr_state_insert_one_point)
7627 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7628 (aarch64_handle_aligned_watchpoint)
7629 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7630 Take an enum target_hw_bp_type instead of an enum
7632 (aarch64_supports_z_point_type): New function.
7633 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7634 use Z_packet_to_target_hw_bp_type.
7636 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7638 * configure.ac: Only use -Werror by default when DEVELOPMENT
7640 * configure: Regenerate.
7642 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7644 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7645 * linux-x86-low.c (X86_64_USER_REGS): New.
7646 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7648 2014-04-28 Yao Qi <yao@codesourcery.com>
7650 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7653 2014-04-25 Pedro Alves <palves@redhat.com>
7656 * linux-low.c (linux_attach_fail_reason_string): New function.
7657 (linux_attach_lwp): Delete.
7658 (linux_attach_lwp_1): Rename to ...
7659 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7660 argument. Remove "initial" parameter. Return int instead of
7661 void. Don't error or warn here.
7662 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7663 failure to attach to the tgid. Call warning when failing to
7665 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7666 argument. Remove "initial" parameter. Return int instead of
7667 void. Don't error or warn here.
7668 (linux_attach_fail_reason_string): New declaration.
7669 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7670 interface change. Use linux_attach_fail_reason_string.
7672 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7673 Walfred Tedeschi <walfred.tedeschi@intel.com>
7675 * Makefile.in: Added rules to handle new files
7676 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7677 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7678 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7679 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7680 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7681 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7683 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7684 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7685 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7686 i386/x32-avx512.xml.
7687 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7688 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7689 i386/x32-avx512-linux.xml.
7690 * i387-fp.c (num_avx512_k_registers): New constant for number
7692 (num_avx512_zmmh_low_registers): New constant for number of
7693 lower ZMM registers (0-15).
7694 (num_avx512_zmmh_high_registers): New constant for number of
7695 higher ZMM registers (16-31).
7696 (num_avx512_ymmh_registers): New contant for number of higher
7697 YMM registers (ymm16-31 added by avx521 on x86_64).
7698 (num_avx512_xmm_registers): New constant for number of higher
7699 XMM registers (xmm16-31 added by AVX512 on x86_64).
7700 (struct i387_xsave): Add space for AVX512 registers.
7701 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7702 Add code to handle AVX512 registers.
7703 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7704 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7705 prototypei from generated file.
7706 (tdesc_amd64_avx512_linux): Likewise.
7707 (init_registers_x32_avx512_linux): Likewise.
7708 (tdesc_x32_avx512_linux): Likewise.
7709 (init_registers_i386_avx512_linux): Likewise.
7710 (tdesc_i386_avx512_linux): Likewise.
7711 (x86_64_regmap): Add AVX512 registers.
7712 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7714 (initialize_low_arch): Add code to initialize AVX512 registers.
7716 2014-04-23 Pedro Alves <palves@redhat.com>
7718 * mem-break.c (find_gdb_breakpoint_at): Make static.
7719 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7721 2014-04-23 Pedro Alves <palves@redhat.com>
7723 * i386-low.c: Don't include break-common.h here.
7724 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7725 prototype to take target_hw_bp_type as argument instead of a Z
7727 * i386-low.h: Include break-common.h here.
7728 (Z_packet_to_hw_type): Declare.
7729 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7731 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7732 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7733 (x86_remove_point): Convert the packet number to a
7734 target_hw_bp_type before calling i386_low_remove_watchpoint.
7735 * win32-i386-low.c (i386_insert_point): Convert the packet number
7736 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7737 (i386_remove_point): Convert the packet number to a
7738 target_hw_bp_type before calling i386_low_remove_watchpoint.
7740 2014-04-23 Pedro Alves <palves@redhat.com>
7742 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7744 2014-04-10 Pedro Alves <palves@redhat.com>
7746 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7747 Check if the condition or command is NULL before checking if the
7748 breakpoint is known. On success, return true.
7749 * mem-break.h (add_breakpoint_condition): Document return.
7750 (add_breakpoint_commands): Add describing comment.
7751 * server.c (skip_to_semicolon): New function.
7752 (process_point_options): Use it.
7754 2014-04-09 Pedro Alves <palves@redhat.com>
7756 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7759 2014-02-27 Pedro Alves <palves@redhat.com>
7762 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7764 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7766 (last_thread_of_process_p): Take a PID argument instead of a
7768 (linux_wait_for_lwp): Delete.
7769 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7771 (linux_low_filter_event): New function, party factored out from
7772 linux_wait_for_event.
7773 (linux_wait_for_event): Rename to ...
7774 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7775 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7776 sigsuspend. Check for zombie leaders.
7777 (linux_wait_for_event): Reimplement as wrapper around
7778 linux_wait_for_event_filtered.
7779 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7780 a normal or signal exit is seen, it's the whole process exiting.
7781 (wait_for_sigstop): No longer a for_each_inferior callback.
7782 Rewrite on top of linux_wait_for_event_filtered.
7783 (stop_all_lwps): Call wait_for_sigstop directly.
7784 * server.c (resume, handle_target_event): Handle
7785 TARGET_WAITKIND_NO_RESUMED.
7787 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7789 * win32-low.c (psapi_get_dll_name,
7790 * win32_CreateToolhelp32Snapshot): Delete.
7791 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7792 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7794 (handle_load_dll): Add function description.
7795 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7797 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7799 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7801 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7802 base address when calling win32_add_one_solib.
7803 (handle_load_dll): Delete local variable load_addr.
7804 Remove 0x1000 offset applied to DLL base address when calling
7805 win32_add_one_solib.
7806 (handle_unload_dll): Add comment.
7808 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7810 * win32-low.c (win32_add_all_dlls): Renames
7811 win32_ensure_ntdll_loaded. Rewrite function documentation.
7812 Adjust implementation to always load all DLLs.
7813 Add 0x1000 offset to DLL base address when calling
7814 win32_add_one_solib.
7815 (child_initialization_done): New static global.
7816 (do_initial_child_stuff): Set child_initialization_done to
7817 zero during child initialization, and 1 after. Replace call
7818 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7820 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7821 (handle_unload_dll): Add function documentation.
7822 (get_child_debug_event): Ignore load and unload DLL events
7823 during child initialization.
7825 2014-02-20 Doug Evans <dje@google.com>
7827 Remove global all_lwps.
7828 * inferiors.h (ptid_of): Move here from linux-low.h.
7829 (pid_of, lwpid_of): Ditto.
7830 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7831 parameter is a struct thread_info * now.
7832 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7833 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7834 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7836 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7837 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7838 * linux-arm-low.c (update_registers_callback): Update, "entry"
7839 parameter is a struct thread_info * now.
7840 Fetch lwpid from current_inferior directly.
7841 (arm_insert_point): Pass &all_threads to find_inferior instead of
7843 (arm_remove_point): Ditto.
7844 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7845 (arm_prepare_to_resume): Fetch pid from thread.
7846 (arm_read_description): Fetch lwpid from current_inferior directly.
7847 * linux-low.c (all_lwps): Delete.
7848 (delete_lwp): Delete call to remove_inferior.
7849 (handle_extended_wait): Fetch lwpid from thread.
7850 (add_lwp): Don't set lwp->entry.id. Remove call to
7851 add_inferior_to_list.
7852 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7853 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7854 (kill_one_lwp_callback): Ditto.
7855 (linux_kill): Don't dereference NULL pointer.
7856 Fetch ptid,lwpid from thread.
7857 (get_detach_signal): Fetch ptid from thread.
7858 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7859 Simplify call to regcache_invalidate_thread.
7860 (delete_lwp_callback): Update, "entry" parameter is a
7861 struct thread_info * now. Fetch pid from thread.
7862 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7863 (status_pending_p_callback): Update, "entry" parameter is a
7864 struct thread_info * now. Fetch ptid from thread.
7865 (find_lwp_pid): Update, "entry" parameter is a
7866 struct thread_info * now.
7867 (linux_wait_for_lwp): Fetch pid from thread.
7868 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7869 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7870 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7871 (dequeue_one_deferred_signal): Ditto.
7872 (cancel_breakpoint): Fetch ptid from current_inferior.
7873 (linux_wait_for_event): Pass &all_threads to find_inferior,
7874 not &all_lwps. Fetch ptid, lwpid from thread.
7875 (count_events_callback): Update, "entry" parameter is a
7876 struct thread_info * now.
7877 (select_singlestep_lwp_callback): Ditto.
7878 (select_event_lwp_callback): Ditto.
7879 (cancel_breakpoints_callback): Ditto.
7880 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7882 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7883 (unsuspend_one_lwp): Update, "entry" parameter is a
7884 struct thread_info * now.
7885 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7887 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7888 Fetch lwpid from thread, not lwp.
7889 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7890 Pass &all_threads to find_inferior, not &all_lwps.
7891 (send_sigstop): Fetch lwpid from thread, not lwp.
7892 (send_sigstop_callback): Update, "entry" parameter is a
7893 struct thread_info * now.
7894 (suspend_and_send_sigstop_callback): Ditto.
7895 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7896 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7897 struct thread_info * now.
7898 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7900 (lwp_running): Update, "entry" parameter is a
7901 struct thread_info * now.
7902 (stop_all_lwps): Fetch ptid from thread.
7903 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7904 (linux_resume_one_lwp): Fetch lwpid from thread.
7905 (linux_set_resume_request): Update, "entry" parameter is a
7906 struct thread_info * now. Fetch pid, lwpid from thread.
7907 (resume_status_pending_p): Update, "entry" parameter is a
7908 struct thread_info * now.
7909 (need_step_over_p): Ditto. Fetch lwpid from thread.
7910 (start_step_over): Fetch lwpid from thread.
7911 (linux_resume_one_thread): Update, "entry" parameter is a
7912 struct thread_info * now. Fetch lwpid from thread.
7913 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7914 (proceed_one_lwp): Update, "entry" parameter is a
7915 struct thread_info * now. Fetch lwpid from thread.
7916 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7917 struct thread_info * now.
7918 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7919 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7920 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7922 (regsets_store_inferior_registers): Ditto.
7923 (fetch_register, store_register): Ditto.
7924 (linux_read_memory, linux_write_memory): Ditto.
7925 (linux_request_interrupt): Ditto.
7926 (linux_read_auxv): Ditto.
7927 (linux_xfer_siginfo): Ditto.
7928 (linux_qxfer_spu): Ditto.
7929 (linux_qxfer_libraries_svr4): Ditto.
7930 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7931 moved to inferiors.h.
7933 (get_thread_lwp): Update.
7934 (struct lwp_info): Delete member "entry". Simplify comment for
7937 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7938 current_inferior directly.
7939 (update_watch_registers_callback): Update, "entry" parameter is a
7940 struct thread_info * now. Fetch pid from thread.
7941 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7942 (mips_insert_point): Fetch lwpid from current_inferior.
7943 Pass &all_threads to find_inferior, not &all_lwps.
7944 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7945 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7947 (mips_stopped_data_address): Ditto.
7948 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7950 * linux-tile-low.c (tile_arch_setup): Ditto.
7951 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7952 (update_debug_registers_callback): Update, "entry" parameter is a
7953 struct thread_info * now. Fetch pid from thread.
7954 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7955 Pass &all_threads to find_inferior, not &all_lwps.
7956 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7957 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7958 Pass &all_threads to find_inferior, not &all_lwps.
7959 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7960 (i386_dr_low_get_status): Ditto.
7961 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7962 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7963 (x86_linux_read_description): Ditto.
7964 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7966 2014-02-20 Doug Evans <dje@google.com>
7968 * inferiors.c (get_first_inferior): Fix buglet.
7970 2014-02-19 Doug Evans <dje@google.com>
7972 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7973 * inferiors.c (add_thread): Change result type to struct thread_info *.
7974 All callers updated.
7975 (add_lwp): Call add_thread here instead of in callers.
7976 All callers updated.
7977 * linux-low.h (get_lwp_thread): Rewrite.
7978 (struct lwp_info): New member "thread".
7980 2014-02-19 Doug Evans <dje@google.com>
7982 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7983 All callers updated.
7985 2014-02-19 Doug Evans <dje@google.com>
7987 * inferiors.c (add_thread): Fix whitespace.
7989 2014-02-19 Doug Evans <dje@google.com>
7991 * dll.c (clear_dlls): Replace accessing list implemention details
7993 * gdbthread.h (get_first_thread): Declare.
7994 * inferiors.c (for_each_inferior_with_data): New function.
7995 (get_first_thread): New function.
7996 (find_thread_ptid): Simplify.
7997 (get_first_inferior): New function.
7998 (clear_list): Delete.
7999 (one_inferior_p): New function.
8000 (clear_inferior_list): New function.
8001 (clear_inferiors): Update.
8002 * inferiors.h (for_each_inferior_with_data): Declare.
8003 (clear_inferior_list): Declare.
8004 (one_inferior_p): Declare.
8005 (get_first_inferior): Declare.
8006 * linux-low.c (linux_wait_for_event): Replace accessing list
8007 implemention details with API function.
8008 * server.c (target_running): Ditto.
8009 (accumulate_file_name_length): New function.
8010 (emit_dll_description): New function.
8011 (handle_qxfer_libraries): Replace accessing list implemention
8012 details with API function.
8013 (handle_qxfer_threads_worker): New function.
8014 (handle_qxfer_threads_proper): Replace accessing list implemention
8015 details with API function.
8016 (handle_query): Ditto.
8017 (visit_actioned_threads_callback_ftype): New typedef.
8018 (visit_actioned_threads_data): New struct.
8019 (visit_actioned_threads): Rewrite to be find_inferior callback.
8020 (resume): Call find_inferior.
8021 (handle_status): Replace accessing list implemention
8022 details with API function.
8023 (process_serial_event): Replace accessing list implemention details
8025 * target.c (set_desired_inferior): Replace accessing list implemention
8026 details with API function.
8027 * tracepoint.c (same_process_p): New function.
8028 (gdb_agent_about_to_close): Replace accessing list implemention
8029 details with API function.
8030 * win32-low.c (child_delete_thread): Replace accessing list
8031 implemention details with API function.
8032 (match_dll_by_basename): New function.
8033 (dll_is_loaded_by_basename): New function.
8034 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8035 details call to dll_is_loaded_by_basename.
8037 2014-02-19 Doug Evans <dje@google.com>
8039 * dll.h (struct dll_info): Add comment.
8040 * gdbthread.h (struct thread_info): Add comment.
8041 (current_ptid): Simplify.
8042 * inferiors.c (add_process): Update.
8043 (remove_process): Update.
8044 * inferiors.h (struct process_info): Rename member "head" to "entry".
8045 * linux-low.c (delete_lwp): Update.
8047 (last_thread_of_process_p): Update.
8048 (kill_one_lwp_callback, linux_kill): Update.
8049 (status_pending_p_callback): Update.
8050 (wait_for_sigstop): Update. Simplify read of ptid.
8051 (start_step_over): Update.
8052 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8053 (get_lwp_thread): Update.
8054 (struct lwp_info): Rename member "head" to "entry".
8055 * regcache.h (inferior_list_entry): Delete.
8056 * server.c (kill_inferior_callback): Update.
8057 (detach_or_kill_inferior_callback): Update.
8058 (print_started_pid): Update.
8059 (print_attached_pid): Update.
8060 (process_serial_event): Simplify read of ptid.
8061 * thread-db.c (thread_db_create_event): Update.
8062 (thread_db_get_tls_address): Update.
8063 * win32-low.c (current_inferior_ptid): Simplify.
8065 2014-02-19 Tom Tromey <tromey@redhat.com>
8067 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8069 (target_supports_btrace): Update.
8071 2014-02-14 Yao Qi <yao@codesourcery.com>
8073 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8074 (rsp-low-ipa.o): New target.
8076 2014-02-12 Tom Tromey <tromey@redhat.com>
8078 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8079 convert_ascii_to_int.
8080 * regcache.c (registers_to_string): Likewise.
8081 * remote-utils.c (decode_M_packet): Likewise.
8082 * server.c (process_serial_event): Likewise.
8084 2014-02-12 Tom Tromey <tromey@redhat.com>
8086 * server.c (handle_query, handle_v_run): Use hex2bin, not
8088 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8090 2014-02-12 Tom Tromey <tromey@redhat.com>
8092 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8093 convert_int_to_ascii.
8094 * regcache.c (registers_to_string, collect_register_as_string):
8096 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8098 * server.c (process_serial_event): Likewise.
8099 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8100 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8102 2014-02-12 Tom Tromey <tromey@redhat.com>
8104 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8105 bin2hex, not hexify.
8106 * tracepoint.c (cmd_qtstatus): Likewise.
8108 2014-02-12 Tom Tromey <tromey@redhat.com>
8110 * remote-utils.c (monitor_output): Pass explicit length to
8113 2014-02-12 Tom Tromey <tromey@redhat.com>
8115 * tracepoint.c: Include rsp-low.h.
8116 * server.c: Include rsp-low.h.
8117 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8118 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8120 * remote-utils.c: Include rsp-low.h.
8121 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8122 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8123 (convert_int_to_ascii, convert_ascii_to_int): Move to
8125 * regcache.c: Include rsp-low.h.
8126 * ax.c: Include rsp-low.h.
8127 * Makefile.in (SFILES): Add common/rsp-low.c.
8128 (OBS): Add rsp-low.o.
8129 (rsp-low.o): New target.
8131 2014-02-12 Tom Tromey <tromey@redhat.com>
8133 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8134 Include print-utils.h.
8135 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8136 (plongest, thirty_two, phex_nz): Remove.
8137 * Makefile.in (SFILES): Add common/print-utils.c.
8138 (OBS): Add print-utils.o.
8139 (print-utils-ipa.o): New target.
8140 (print-utils.o): New target.
8141 (IPA_OBJS): Add print-utils-ipa.o.
8143 2014-02-06 Tom Tromey <tromey@redhat.com>
8145 * Makefile.in (SFILES): Fix indentation.
8147 2014-02-05 Doug Evans <dje@google.com>
8149 * linux-low.c (linux_wait_for_event): Improve comment.
8150 (linux_wait_1): Keep current_inferior in sync with event_child.
8152 2014-01-22 Doug Evans <dje@google.com>
8154 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8156 2014-01-22 Doug Evans <dje@google.com>
8158 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8159 * configure: Regenerate.
8160 * config.in: Regenerate.
8161 * Makefile.in (SFILES): Add debug.c.
8163 * debug.c: New file.
8164 * debug.h: New file.
8165 * linux-aarch64-low.c (*): Update all debugging printfs to use
8166 debug_printf instead of fprintf.
8167 * linux-arm-low.c (*): Ditto.
8168 * linux-cris-low.c (*): Ditto.
8169 * linux-crisv32-low.c (*): Ditto.
8170 * linux-m32r-low.c (*): Ditto.
8171 * linux-sparc-low.c (*): Ditto.
8172 * linux-x86.c (*): Ditto.
8173 * linux-low.c (*): Ditto.
8174 (linux_wait_1): Add calls to debug_enter, debug_exit.
8175 (linux_wait): Remove redundant debugging printf.
8176 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8177 (linux_resume, unstop_all_lwps): Ditto.
8178 * mem-break.c (*): Update all debugging printfs to use
8179 debug_printf instead of fprintf.
8180 * remote-utils.c (*): Ditto.
8181 * thread-db.c (*): Ditto.
8182 * server.c #include <ctype.h>, "gdb_vecs.h".
8183 (debug_threads): Moved to debug.c.
8184 (*): Update all debugging printfs to use debug_printf instead of
8186 (start_inferior): Replace call to fflush with call to debug_flush.
8187 (monitor_show_help): Mention set debug-format.
8188 (parse_debug_format_options): New function.
8189 (handle_monitor_command): Handle "monitor set debug-format".
8190 (gdbserver_usage): Mention --debug-format.
8191 (main): Parse --debug-format.
8192 * server.h (debug_threads): Declaration moved to debug.h.
8194 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8195 trace_debug_1 that uses debug_printf.
8196 (tracepoint_look_up_symbols): Update all debugging printfs to use
8197 debug_printf instead of fprintf.
8199 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8201 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8204 2014-01-17 Pedro Alves <palves@redhat.com>
8207 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8208 defined after including gdb_proc_service.h.
8210 2014-01-16 Doug Evans <dje@google.com>
8212 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8213 (match_dll): Use it.
8215 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8217 * target.h (target_ops) <read_btrace>: Change parameters and
8218 return type to allow error reporting.
8219 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8220 trace reading errors on.
8221 * linux-low.c (linux_low_read_btrace): Pass trace reading
8223 (linux_low_disable_btrace): New.
8225 2014-01-15 Doug Evans <dje@google.com>
8227 * inferiors.c (thread_id_to_gdb_id): Delete.
8228 * inferiors.h (thread_id_to_gdb_id): Delete.
8230 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8232 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8233 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8236 2014-01-08 Pedro Alves <palves@redhat.com>
8238 * server.c (handle_status): Don't discard previous queued stop
8239 replies or thread's pending status here.
8240 (main) <disconnection>: Do it here instead.
8242 2014-01-08 Pedro Alves <palves@redhat.com>
8244 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8245 * server.c (visit_actioned_threads, handle_pending_status): New
8247 (handle_v_cont): Factor out parts to ...
8248 (resume): ... this new function. If in all-stop, and a thread
8249 being resumed has a pending status, report it without actually
8251 (myresume): Adjust to use the new 'resume' function.
8252 (clear_pending_status_callback, set_pending_status_callback)
8253 (find_status_pending_thread_callback): New functions.
8254 (handle_status): Handle the case of multiple threads having
8255 interesting statuses to report. Report threads' real last signal
8256 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8257 with an interesting thread to report the status for, instead of
8258 always reporting the status of the first thread.
8260 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8262 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8263 * gdbreplay.c (gdbreplay_version): Likewise.
8265 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8267 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8268 iov.iov_len with the real length in use.
8270 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8272 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8273 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8274 for all targets that use win32-low.c.
8275 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8276 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8278 2013-12-13 Pedro Alves <palves@redhat.com>
8280 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8281 if equal to TARGET_WAITKIND_LOADED.
8282 * win32-low.c (cached_status): New static global.
8283 (win32_wait): Add declaration.
8284 (do_initial_child_stuff): Flush all initial pending debug events
8285 up to the initial breakpoint.
8286 (win32_wait): If CACHED_STATUS was set, return that instead
8287 of doing a real wait. Remove the code resuming the execution
8288 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8289 during the initial phase. Also remove the code changing
8290 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8291 TARGET_WAITKIND_STOPPED.
8293 2013-12-11 Yao Qi <yao@codesourcery.com>
8295 * notif.c (handle_notif_ack): Return 0 if no notification
8298 2013-11-20 Doug Evans <dje@google.com>
8300 * linux-low.c (linux_set_resume_request): Fix comment.
8302 2013-11-20 Doug Evans <dje@google.com>
8304 * linux-low.c (resume_status_pending_p): Tweak comment.
8306 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8308 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8309 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8310 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8311 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8312 (srv_amd64_regobj): Add amd64-mpx.o.
8313 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8314 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8315 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8316 * i387-fp.c (num_pl_bnd_register) Added constant.
8317 (num_pl_bnd_cfg_registers) Added constant.
8318 (struct i387_xsave) Added reserved area and MPX fields.
8319 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8320 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8322 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8323 (init_registers_amd64_mpx_linux): Declare new function.
8324 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8325 (x86_64_regmap): Add MPX registers.
8326 (x86_linux_read_description): Add MPX case.
8327 (initialize_low_arch): Initialize MPX targets.
8329 2013-11-18 Tom Tromey <tromey@redhat.com>
8331 * configure: Rebuild.
8332 * configure.ac: Don't check for stdlib.h.
8333 * gdbreplay.c: Unconditionally include stdlib.h.
8335 2013-11-18 Tom Tromey <tromey@redhat.com>
8337 * config.in: Rebuild.
8338 * configure: Rebuild.
8339 * configure.ac: Don't use AC_HEADER_DIRENT.
8341 2013-11-18 Tom Tromey <tromey@redhat.com>
8343 * server.h: Don't check HAVE_STRING_H.
8344 * gdbreplay.c: Don't check HAVE_STRING_H.
8345 * configure: Rebuild.
8347 2013-11-18 Tom Tromey <tromey@redhat.com>
8349 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8352 2013-11-08 Tom Tromey <tromey@redhat.com>
8354 * configure, config.in: Rebuild.
8355 * configure.ac: Remove unused configury.
8357 2013-11-08 Tom Tromey <tromey@redhat.com>
8359 * acinclude.m4: Include common.m4, codeset.m4.
8360 * configure, config.in: Rebuild.
8361 * configure.ac: Use GDB_AC_COMMON.
8363 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8365 * linux-s390-low.c (HWCAP_S390_TE): New define.
8366 (s390_arch_setup): Consider the TE field in the HWCAP for
8367 determining 'have_regset_tdb'.
8369 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8372 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8375 2013-10-02 Pedro Alves <palves@redhat.com>
8377 * server.c (process_serial_event): Don't output "GDBserver
8378 exiting" if GDB is connected through stdio.
8379 * target.c (mywait): Likewise, be silent if GDB is connected
8382 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8384 * lynx-low.c (lynx_add_threads_after_attach): New function.
8385 (lynx_attach): Remove call to add_thread. Add call to
8386 lynx_add_threads_after_attach instead.
8388 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8390 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8391 * config.in, configure: Regenerated.
8393 2013-09-18 Yao Qi <yao@codesourcery.com>
8396 * server.c (start_inferior): Clear 'resume_info'.
8398 2013-09-16 Jiong Wang <jiwang@tilera.com>
8400 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8403 2013-09-16 Jiong Wang <jiwang@tilera.com>
8405 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8406 linux-tile-low.o to srv_tgtobj.
8408 2013-09-16 Will Newton <will.newton@linaro.org>
8410 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8413 2013-09-06 Pedro Alves <palves@redhat.com>
8415 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8416 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8417 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8418 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8419 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8420 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8422 2013-09-06 Pedro Alves <palves@redhat.com>
8424 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8425 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8427 2013-09-06 Pedro Alves <palves@redhat.com>
8429 * linux-amd64-ipa.c: Include tracepoint.h.
8430 * linux-i386-ipa.c: Include tracepoint.h.
8432 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8434 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8435 (ps_get_thread_area): New function.
8437 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8439 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8440 (initialize_low_arch): Call init_registers_crisv32 rather than
8441 init_register_crisv32.
8443 2013-09-05 Pedro Alves <palves@redhat.com>
8445 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8447 * hostio.h: ... this new file.
8448 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8449 win32-low.c: Include hostio.h.
8451 2013-09-05 Pedro Alves <palves@redhat.com>
8453 * server.h (gdb_client_data, handler_func, callback_handler_func)
8454 (delete_file_handler, add_file_handler, append_callback_event)
8455 (delete_callback_event, start_event_loop, initialize_event_loop):
8456 Move to event-loop.h and include it.
8457 * event-loop.h: New file.
8459 2013-09-05 Pedro Alves <palves@redhat.com>
8461 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8462 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8463 (loaded_dll, unloaded_dll): Move to ...
8464 * dll.h: ... this new file.
8465 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8467 2013-09-05 Pedro Alves <palves@redhat.com>
8469 * server.h (current_process, get_thread_process, all_processes)
8470 (add_inferior_to_list, for_each_inferior, current_inferior)
8471 (remove_inferior, add_process, remove_process, find_process_pid)
8472 (have_started_inferiors_p, have_attached_inferiors_p)
8473 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8474 (clear_inferiors, find_inferior, find_inferior_id)
8475 (inferior_target_data, set_inferior_target_data)
8476 (inferior_regcache_data, set_inferior_regcache_data): Move to
8477 inferiors.h, and include it.
8478 * inferiors.h: New file.
8480 2013-09-05 Pedro Alves <palves@redhat.com>
8482 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8486 2013-09-05 Pedro Alves <palves@redhat.com>
8488 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8490 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8491 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8492 (handle_tracepoint_general_set, handle_tracepoint_query)
8493 (tracepoint_finished_step, tracepoint_was_hit)
8494 (release_while_stepping_state_list, current_traceframe)
8495 (in_readonly_region, traceframe_read_mem)
8496 (fetch_traceframe_registers, traceframe_read_sdata)
8497 (traceframe_read_info, struct fast_tpoint_collect_status)
8498 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8499 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8500 (supply_fast_tracepoint_registers)
8501 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8502 (ipa_tdesc, claim_trampoline_space)
8503 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8504 (agent_mem_read, agent_get_trace_state_variable_value)
8505 (agent_set_trace_state_variable_value, agent_tsv_read)
8506 (agent_mem_read_string, get_raw_reg_func_addr)
8507 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8508 * tracepoint.h: ... this new file.
8510 2013-09-05 Pedro Alves <palves@redhat.com>
8512 * server.h (perror_with_name, error, fatal, warning, paddress)
8513 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8515 * utils.h: New file.
8517 2013-09-05 Pedro Alves <palves@redhat.com>
8519 * server.h (remote_debug, noack_mode, transport_is_reliable)
8520 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8521 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8522 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8523 (write_enn, initialize_async_io, enable_async_io)
8524 (disable_async_io, check_remote_input_interrupt_request)
8525 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8526 (dead_thread_notify, prepare_resume_reply)
8527 (decode_address_to_semicolon, decode_address, decode_m_packet)
8528 (decode_M_packet, decode_X_packet, decode_xfer_write)
8529 (decode_search_memory_packet, unhexify, hexify)
8530 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8531 (look_up_one_symbol, relocate_instruction)
8532 (monitor_output): Move to remote-utils.h, and include it.
8533 * remote-utils.h: New file.
8535 2013-09-05 Pedro Alves <palves@redhat.com>
8537 * server.h (_): Delete.
8539 2013-09-02 Pedro Alves <palves@redhat.com>
8541 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8542 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8544 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8546 2013-09-02 Pierre Muller <muller@sourceware.org>
8548 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8549 or WriteProcessMemory complete successfully and handle
8550 ERROR_PARTIAL_COPY error.
8552 2013-09-02 Pedro Alves <palves@redhat.com>
8554 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8555 error instead of EIO.
8557 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8560 * linux-low.c: Include filestuff.h.
8561 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8562 * lynx-low.c: Include filestuff.h.
8563 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8564 * server.c: Include filestuff.h.
8565 (main): Call notice_open_fds.
8566 * spu-low.c: Include filestuff.h.
8567 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8569 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8571 * Makefile.in: Explain why ../target and ../nat are not
8572 listed as include file search paths.
8573 (linux-waitpid.o): New object file rule.
8574 * configure.srv (srv_native_linux_obj): New variable.
8575 Replace all occurrences of linux native object files with
8576 $srv_native_linux_obj.
8577 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8578 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8579 (linux_enable_event_reporting): Remove declaration.
8580 (my_waitpid): Moved to common/linux-waitpid.c.
8581 (linux_wait_for_event): Pass ptid when calling
8582 linux_enable_event_reporting.
8583 (linux_supports_tracefork_flag): Remove.
8584 (linux_enable_event_reporting): Likewise.
8585 (linux_tracefork_grandchild): Remove.
8586 (STACK_SIZE): Moved to common/linux-ptrace.c.
8587 (linux_tracefork_child): Remove.
8588 (linux_test_for_tracefork): Remove.
8589 (linux_look_up_symbols): Call linux_supports_traceclone.
8590 (initialize_low): Remove call to linux_test_for_tracefork.
8591 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8592 common/linux-ptrace.h.
8593 (PTRACE_TYPE_ARG4): Likewise.
8594 Include linux-ptrace.h.
8596 2013-08-21 Pedro Alves <palves@redhat.com>
8598 * config.in: Renegerate.
8600 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8602 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8603 (SFILES): Remove $(srcdir)/common/target-common.c and
8604 add $(srcdir)/target/waitstatus.c.
8605 (OBS): Remove target-common.o and add waitstatus.o.
8606 (server_h): Remove $(srcdir)/../common/target-common.h and
8607 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8608 and $(srcdir)/../target/waitstatus.h.
8609 (target-common.o): Remove.
8610 (waitstatus.o): New target object file.
8611 * target.h: Do not include target-common.h and
8612 include target/resume.h, target/wait.h and
8613 target/waitstatus.h.
8615 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8617 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8618 to PTRACE_TYPE_ARG3.
8619 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8620 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8622 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8623 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8625 2013-07-27 Jie Zhang <jie@codesourcery.com>
8626 Daniel Jacobowitz <dan@codesourcery.com>
8627 Yao Qi <yao@codesourcery.com>
8629 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8630 (mips-linux-watch.o): New rule.
8631 (mips_linux_watch_h): New variable.
8632 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8634 * linux-mips-low.c: Include mips-linux-watch.h.
8635 (struct arch_process_info, struct arch_lwp_info): New.
8636 (update_watch_registers_callback): New function.
8637 (mips_linux_new_process, mips_linux_new_thread) New functions.
8638 (mips_linux_prepare_to_resume, mips_insert_point): New
8640 (mips_remove_point, mips_stopped_by_watchpoint): New
8642 (rsp_bp_type_to_target_hw_bp_type): New function.
8643 (mips_stopped_data_address): New function.
8644 (the_low_target): Add watchpoint support functions.
8646 2013-07-27 Yao Qi <yao@codesourcery.com>
8648 * i386-low.c: Include break-common.h.
8649 (enum target_hw_bp_type): Remove.
8651 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8653 * Makefile.in (SFILES): /common/target-common.c.
8654 (OBS): Add target-common.o.
8655 (server_h): Add $(srcdir)/../common/target-common.h.
8656 (target-common.o): New target.
8657 * server.c (queue_stop_reply_callback): Free
8658 status string after use.
8659 * target.c (target_waitstatus_to_string): Remove.
8660 * target.h: Include target-common.h.
8661 (resume_kind): Likewise.
8662 (target_waitkind): Likewise.
8663 (target_waitstatus): Likewise.
8664 (TARGET_WNOHANG): Likewise.
8666 2013-07-04 Yao Qi <yao@codesourcery.com>
8668 * Makefile.in (host_alias): Use @host_noncanonical@.
8669 (target_alias): Use @target_noncanonical@.
8670 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8671 ACX_NONCANONICAL_HOST.
8672 * configure: Regenerated.
8675 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8677 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8678 * configure: Rebuild.
8679 * Makefile.in (version_host, version_target): Get from configure.
8680 (version.c): Use $(version_host) and $(version_target).
8682 2013-07-03 Pedro Alves <palves@redhat.com>
8684 * Makefile.in (config.status): Depend on development.sh.
8685 * acinclude.m4: Include libmcheck.m4.
8686 * configure: Regenerate.
8688 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8690 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8691 attribute inside the parentheses.
8692 (winapi_DebugSetProcessKillOnExit): Ditto.
8693 (winapi_DebugBreakProcess): Ditto.
8694 (winapi_GenerateConsoleCtrlEvent): Ditto.
8696 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8698 * notif.h (notif_event): Add a dummy member to avoid compiler
8701 2013-07-01 Pedro Alves <palves@redhat.com>
8703 * hostio.c (HOSTIO_PATH_MAX): Define.
8704 (require_filename, handle_open, handle_unlink, handle_readlink):
8707 2013-07-01 Pedro Alves <palves@redhat.com>
8709 * server.h: Include "pathmax.h".
8710 * linux-low.c: Don't include sys/param.h.
8711 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8713 * win32-low.c: Don't include sys/param.h.
8714 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8716 2013-07-01 Pedro Alves <palves@redhat.com>
8718 * event-loop.c: Don't check HAVE_UNISTD_H before including
8720 * gdbreplay.c: Likewise.
8721 * remote-utils.c: Likewise.
8722 * server.c: Likewise.
8723 * configure.ac: Don't check for unistd.h.
8724 * configure: Regenerate.
8726 2013-06-28 Tom Tromey <tromey@redhat.com>
8728 * Makefile.in (version.c): Use version.in, not
8731 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8733 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8734 * configure: Rebuild.
8735 * Makefile.in (version_host, version_target): Get from configure.
8736 (version.c): Use $(version_host) and $(version_target).
8738 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8740 Fix trace-status to output user name without trailing colon.
8741 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8743 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8745 Fix trace-status to output proper start-time and stop-time.
8746 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8747 output start time and stop time in hex as gdb expects.
8749 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8751 * tracepoint.c (build_traceframe_info_xml): Output trace state
8752 variables present in the trace buffer.
8754 2013-06-24 Tom Tromey <tromey@redhat.com>
8756 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8758 (version.o): Remove.
8759 * gdbreplay.c: Include version.h.
8760 (version, host_name): Don't declare.
8761 * server.h: Include version.h.
8762 (version, host_name): Don't declare.
8764 2013-06-12 Pedro Alves <palves@redhat.com>
8766 * linux-x86-low.c (linux_is_elf64): Delete global.
8767 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8768 with local linux_pid_exe_is_elf_64_file use.
8770 2013-06-11 Pedro Alves <palves@redhat.com>
8772 * linux-low.c (regset_disabled, disable_regset): New functions.
8773 (regsets_fetch_inferior_registers)
8774 (regsets_store_inferior_registers): Use them.
8775 (initialize_regsets_info); Don't allocate the disabled_regsets
8777 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8780 2013-06-11 Pedro Alves <palves@redhat.com>
8782 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8785 2013-06-11 Pedro Alves <palves@redhat.com>
8787 * linux-x86-low.c (initialize_low_arch): Call
8788 init_registers_x32_avx_linux.
8790 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8792 Fix compatibility with Android Bionic.
8793 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8796 2013-06-07 Pedro Alves <palves@redhat.com>
8799 * Makefile.in (OBS): Add tdesc.o.
8800 (IPA_OBJS): Add tdesc-ipa.o.
8801 (tdesc-ipa.o): New rule.
8802 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8804 * linux-low.c (new_inferior): Delete.
8805 (disabled_regsets, num_regsets): Delete.
8806 (linux_add_process): Adjust to set the new per-process
8808 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8809 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8810 was a stop. When calling arch_setup, switch the current inferior
8811 to the thread that got an event.
8812 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8813 (regsets_fetch_inferior_registers)
8814 (regsets_store_inferior_registers): New regsets_info parameter.
8816 (linux_register_in_regsets): New regs_info parameter. Adjust to
8818 (register_addr, fetch_register, store_register): New usrregs_info
8819 parameter. Adjust to use it.
8820 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8821 parameter regs_info. Adjust to use it.
8822 (linux_fetch_registers): Get the current inferior's regs_info, and
8824 (linux_store_registers): Ditto.
8825 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8826 (initialize_low): Don't initialize the target_regsets here. Call
8827 initialize_low_arch.
8828 * linux-low.h (target_regsets): Delete declaration.
8829 (struct regsets_info): New.
8830 (struct usrregs_info): New.
8831 (struct regs_info): New.
8832 (struct process_info_private) <new_inferior>: New field.
8833 (struct linux_target_ops): Delete the num_regs, regmap, and
8834 regset_bitmap fields. New field regs_info.
8835 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8836 * i387-fp.c (num_xmm_registers): Delete.
8837 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8838 calls to new interface.
8839 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8840 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8841 Infer the number of xmm registers from the regcache's target
8843 * i387-fp.h (num_xmm_registers): Delete.
8844 * inferiors.c (add_thread): Don't install the thread's regcache
8846 * proc-service.c (gregset_info): Fetch the current inferior's
8847 regs_info. Adjust to use it.
8848 * regcache.c: Include tdesc.h.
8849 (register_bytes, reg_defs, num_registers)
8850 (gdbserver_expedite_regs): Delete.
8851 (get_thread_regcache): If the thread doesn't have a regcache yet,
8852 create one, instead of aborting gdbserver.
8853 (regcache_invalidate_one): Rename to ...
8854 (regcache_invalidate_thread): ... this.
8855 (regcache_invalidate_one): New.
8856 (regcache_invalidate): Only invalidate registers of the current
8858 (init_register_cache): Add target_desc parameter, and use it.
8859 (new_register_cache): Ditto. Assert the target description has a
8860 non zero registers_size.
8861 (regcache_cpy): Add assertions. Adjust.
8862 (realloc_register_cache, set_register_cache): Delete.
8863 (registers_to_string, registers_from_string): Adjust.
8864 (find_register_by_name, find_regno, find_register_by_number)
8865 (register_cache_size): Add target_desc parameter, and use it.
8866 (free_register_cache_thread, free_register_cache_thread_one)
8867 (regcache_release, register_cache_size): New.
8868 (register_size): Add target_desc parameter, and use it.
8869 (register_data, supply_register, supply_register_zeroed)
8870 (supply_regblock, supply_register_by_name, collect_register)
8871 (collect_register_as_string, collect_register_by_name): Adjust.
8872 * regcache.h (struct target_desc): Forward declare.
8873 (struct regcache) <tdesc>: New field.
8874 (init_register_cache, new_register_cache): Add target_desc
8876 (regcache_invalidate_thread): Declare.
8877 (regcache_invalidate_one): Delete declaration.
8878 (regcache_release): Declare.
8879 (find_register_by_number, register_cache_size, register_size)
8880 (find_regno): Add target_desc parameter.
8881 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8883 * remote-utils.c: Include tdesc.h.
8884 (outreg, prepare_resume_reply): Adjust.
8885 * server.c: Include tdesc.h.
8886 (gdbserver_xmltarget): Delete declaration.
8887 (get_features_xml, process_serial_event): Adjust.
8888 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8890 (struct process_info) <tdesc>: New field.
8891 (ipa_tdesc): Declare.
8892 * tdesc.c: New file.
8893 * tdesc.h: New file.
8894 * tracepoint.c: Include tdesc.h.
8895 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8896 (get_context_regcache): Adjust to pass ipa_tdesc down.
8897 (do_action_at_tracepoint): Adjust to get the register cache size
8898 from the context regcache's description.
8899 (traceframe_walk_blocks): Adjust to get the register cache size
8900 from the current trace frame's description.
8901 (traceframe_get_pc): Adjust to get current trace frame's
8902 description and pass it down.
8903 (gdb_collect): Adjust to get the register cache size from the
8905 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8906 (gdbserver_xmltarget): Delete.
8907 (initialize_low_tracepoint): Set the ipa's target description.
8908 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8909 (initialize_low_tracepoint): Set the ipa's target description.
8910 * linux-x86-low.c: Include tdesc.h.
8911 [__x86_64__] (is_64bit_tdesc): New.
8912 (ps_get_thread_area, x86_get_thread_area): Use it.
8913 (i386_cannot_store_register): Rename to ...
8914 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8915 (i386_cannot_fetch_register): Rename to ...
8916 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8917 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8919 (target_regsets): Rename to ...
8920 (x86_regsets): ... this.
8921 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8923 (x86_siginfo_fixup): Use is_64bit_tdesc.
8924 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8925 (tdesc_x32_avx_linux, tdesc_x32_linux)
8926 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8928 (x86_linux_update_xmltarget): Delete.
8929 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8930 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8931 (AMD64_LINUX_USER64_CS): New.
8932 (x86_linux_read_description): New, based on
8933 x86_linux_update_xmltarget.
8934 (same_process_callback): New.
8935 (x86_arch_setup_process_callback): New.
8936 (x86_linux_update_xmltarget): New.
8937 (x86_regsets_info): New.
8938 (amd64_linux_regs_info): New.
8939 (i386_linux_usrregs_info): New.
8940 (i386_linux_regs_info): New.
8941 (x86_linux_regs_info): New.
8942 (x86_arch_setup): Reimplement.
8943 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8944 (x86_emit_ops): Ditto.
8945 (the_low_target): Adjust. Install x86_linux_regs_info,
8946 x86_cannot_fetch_register, and x86_cannot_store_register.
8947 (initialize_low_arch): New.
8948 * linux-ia64-low.c (tdesc_ia64): Declare.
8949 (ia64_fetch_register): Adjust.
8950 (ia64_usrregs_info, regs_info): New globals.
8951 (ia64_regs_info): New function.
8952 (the_low_target): Adjust.
8953 (initialize_low_arch): New function.
8954 * linux-sparc-low.c (tdesc_sparc64): Declare.
8955 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8957 (sparc_arch_setup): New function.
8958 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8959 (the_low_target): Adjust.
8960 (initialize_low_arch): New function.
8961 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8962 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8963 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8964 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8965 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8966 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8967 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8968 (tdesc_powerpc_isa205_vsx64l): Declare.
8969 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8970 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8971 (ppc_set_pc, ppc_get_hwcap): Adjust.
8972 (ppc_usrregs_info): Forward declare.
8973 (!__powerpc64__) ppc_regmap_adjusted: New global.
8974 (ppc_arch_setup): Adjust to the current process'es target
8976 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8977 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8978 (ppc_store_evrregset): Adjust.
8979 (target_regsets): Rename to ...
8980 (ppc_regsets): ... this, and make static.
8981 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8982 (ppc_regs_info): New function.
8983 (the_low_target): Adjust.
8984 (initialize_low_arch): New function.
8985 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8986 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8987 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8988 (tdesc_s390x_linux64v2): Declare.
8989 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8990 (s390_fill_gregset, s390_store_last_break): Adjust.
8991 (target_regsets): Rename to ...
8992 (s390_regsets): ... this, and make static.
8993 (s390_get_pc, s390_set_pc): Adjust.
8994 (s390_get_hwcap): New target_desc parameter, and use it.
8995 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8996 (s390_arch_setup): Adjust to set the current process'es target
8997 description. Don't adjust the regmap.
8998 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8999 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9000 (regs_info_3264): New globals.
9001 (s390_regs_info): New function.
9002 (the_low_target): Adjust.
9003 (initialize_low_arch): New function.
9004 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9005 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9006 [__mips64] (init_registers_mips_linux)
9007 (init_registers_mips_dsp_linux): Delete defines.
9008 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9009 (have_dsp): New global.
9010 (mips_read_description): New, based on mips_arch_setup.
9011 (mips_arch_setup): Reimplement.
9012 (get_usrregs_info): New function.
9013 (mips_cannot_fetch_register, mips_cannot_store_register)
9014 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9015 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9016 (target_regsets): Rename to ...
9017 (mips_regsets): ... this, and make static.
9018 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9019 (dsp_regs_info, regs_info): New globals.
9020 (mips_regs_info): New function.
9021 (the_low_target): Adjust.
9022 (initialize_low_arch): New function.
9023 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9024 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9026 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9027 (arm_read_description): New, with bits factored from
9029 (arm_arch_setup): Reimplement.
9030 (target_regsets): Rename to ...
9031 (arm_regsets): ... this, and make static.
9032 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9033 (arm_regs_info): New function.
9034 (the_low_target): Adjust.
9035 (initialize_low_arch): New function.
9036 * linux-m68k-low.c (tdesc_m68k): Declare.
9037 (target_regsets): Rename to ...
9038 (m68k_regsets): ... this, and make static.
9039 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9040 (m68k_regs_info): New function.
9041 (m68k_arch_setup): New function.
9042 (the_low_target): Adjust.
9043 (initialize_low_arch): New function.
9044 * linux-sh-low.c (tdesc_sharch): Declare.
9045 (target_regsets): Rename to ...
9046 (sh_regsets): ... this, and make static.
9047 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9048 (sh_regs_info, sh_arch_setup): New functions.
9049 (the_low_target): Adjust.
9050 (initialize_low_arch): New function.
9051 * linux-bfin-low.c (tdesc_bfin): Declare.
9052 (bfin_arch_setup): New function.
9053 (bfin_usrregs_info, regs_info): New globals.
9054 (bfin_regs_info): New function.
9055 (the_low_target): Adjust.
9056 (initialize_low_arch): New function.
9057 * linux-cris-low.c (tdesc_cris): Declare.
9058 (cris_arch_setup): New function.
9059 (cris_usrregs_info, regs_info): New globals.
9060 (cris_regs_info): New function.
9061 (the_low_target): Adjust.
9062 (initialize_low_arch): New function.
9063 * linux-cris-low.c (tdesc_crisv32): Declare.
9064 (cris_arch_setup): New function.
9065 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9066 (cris_regs_info): New function.
9067 (the_low_target): Adjust.
9068 (initialize_low_arch): New function.
9069 * linux-m32r-low.c (tdesc_m32r): Declare.
9070 (m32r_arch_setup): New function.
9071 (m32r_usrregs_info, regs_info): New globals.
9072 (m32r_regs_info): Adjust.
9073 (initialize_low_arch): New function.
9074 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9075 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9076 (tic6x_usrregs_info): Forward declare.
9077 (tic6x_read_description): New function, based on ...
9078 (tic6x_arch_setup): ... this. Reimplement.
9079 (target_regsets): Rename to ...
9080 (tic6x_regsets): ... this, and make static.
9081 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9082 (tic6x_regs_info): New function.
9083 (the_low_target): Adjust.
9084 (initialize_low_arch): New function.
9085 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9086 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9087 (target_regsets): Rename to ...
9088 (xtensa_regsets): ... this, and make static.
9089 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9091 (xtensa_arch_setup, xtensa_regs_info): New functions.
9092 (the_low_target): Adjust.
9093 (initialize_low_arch): New function.
9094 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9095 (nios2_arch_setup): Set the current process'es tdesc.
9096 (target_regsets): Rename to ...
9097 (nios2_regsets): ... this.
9098 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9099 (nios2_regs_info): New function.
9100 (the_low_target): Adjust.
9101 (initialize_low_arch): New function.
9102 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9103 (aarch64_arch_setup): Set the current process'es tdesc.
9104 (target_regsets): Rename to ...
9105 (aarch64_regsets): ... this.
9106 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9107 (aarch64_regs_info): New function.
9108 (the_low_target): Adjust.
9109 (initialize_low_arch): New function.
9110 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9112 (target_regsets): Rename to ...
9113 (tile_regsets): ... this.
9114 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9115 (tile_regs_info): New function.
9116 (tile_arch_setup): Set the current process'es tdesc.
9117 (the_low_target): Adjust.
9118 (initialize_low_arch): New function.
9119 * spu-low.c (tdesc_spu): Declare.
9120 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9121 * win32-arm-low.c (tdesc_arm): Declare.
9122 (arm_arch_setup): New function.
9123 (the_low_target): Install arm_arch_setup instead of
9125 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9126 (init_windows_x86): Rename to ...
9127 (i386_arch_setup): ... this. Set `win32_tdesc'.
9128 (the_low_target): Adjust.
9129 * win32-low.c (win32_tdesc): New global.
9130 (child_add_thread): Don't create the thread cache here.
9131 (do_initial_child_stuff): Set the new process'es tdesc.
9132 * win32-low.h (struct target_desc): Forward declare.
9133 (win32_tdesc): Declare.
9134 * lynx-i386-low.c (tdesc_i386): Declare global.
9135 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9136 * lynx-low.c (lynx_tdesc): New global.
9137 (lynx_add_process): Set the new process'es tdesc.
9138 * lynx-low.h (struct target_desc): Forward declare.
9139 (lynx_tdesc): Declare global.
9140 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9141 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9142 * nto-low.c (nto_tdesc): New global.
9143 (do_attach): Set the new process'es tdesc.
9144 * nto-low.h (struct target_desc): Forward declare.
9145 (nto_tdesc): Declare.
9146 * nto-x86-low.c (tdesc_i386): Declare.
9147 (nto_x86_arch_setup): Set `nto_tdesc'.
9149 2013-06-04 Gary Benson <gbenson@redhat.com>
9151 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9152 to qSupported response when appropriate.
9153 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9154 with nonzero-length annex.
9155 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9156 arguments supplied in annex.
9158 2013-05-31 Doug Evans <dje@google.com>
9161 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9162 64 bits in 64-cross-32 environment.
9164 2013-05-28 Pedro Alves <palves@redhat.com>
9166 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9167 (aarch64-without-fpu.c): Delete rule.
9168 * configure.srv (aarch64*-*-linux*): Remove references to
9169 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9170 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9173 2013-05-24 Pedro Alves <palves@redhat.com>
9175 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9176 instead of strchr/decode_address. Error if the range isn't split
9177 with a ','. Don't assume there's be a ':' in the action.
9179 2013-05-23 Yao Qi <yao@codesourcery.com>
9180 Pedro Alves <palves@redhat.com>
9182 * linux-low.c (lwp_in_step_range): New function.
9183 (linux_wait_1): If the thread was range stepping and stopped
9184 outside the stepping range, report the stop to GDB. Otherwise,
9185 continue stepping. Add range stepping debug output.
9186 (linux_set_resume_request): Copy the step range from the resume
9188 (linux_supports_range_stepping): New.
9189 (linux_target_ops) <supports_range_stepping>: Set to
9190 linux_supports_range_stepping.
9191 * linux-low.h (struct linux_target_ops)
9192 <supports_range_stepping>: New field.
9193 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9194 * linux-x86-low.c (x86_supports_range_stepping): New.
9195 (the_low_target) <supports_range_stepping>: Set to
9196 x86_supports_range_stepping.
9197 * server.c (handle_v_cont): Handle 'r' action.
9198 (handle_v_requests): Append ";r" if the target supports range
9200 * target.h (struct thread_resume) <step_range_start,
9201 step_range_end>: New fields.
9202 (struct target_ops) <supports_range_stepping>:
9204 (target_supports_range_stepping): New macro.
9206 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9208 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9209 confusion in comment.
9211 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9213 * lynx-low.c (struct process_info_private): New type.
9214 (lynx_add_process): New function.
9215 (lynx_create_inferior, lynx_attach): Replace calls to
9216 add_process by calls to lynx_add_process.
9217 (lynx_resume): If PTID is null, then try using
9218 current_process()->private->last_wait_event_ptid.
9220 (lynx_clear_inferiors): Delete. The contents of that function
9221 has been inlined in lynx_mourn;
9222 (lynx_wait_1): Save the ptid in the process's private data.
9223 (lynx_mourn): Free the process' private data. Replace call
9224 to lynx_clear_inferiors by call to clear_inferiors.
9226 2013-05-17 Yao Qi <yao@codesourcery.com>
9228 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9231 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9233 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9234 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9235 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9236 PT_TEXT_END_ADDR guards. Update comments.
9237 (linux_target_op) <read_offsets>: Conditionally define to
9238 linux_read_offsets if the target is UCLIBC and if it defines
9239 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9241 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9242 Andrew Jenner <andrew@codesourcery.com>
9244 * Makefile.in (SFILES): Add linux-nios2-low.c.
9245 (clean): Add action to delete nios2-linux.c.
9246 (nios2-linux.c): New rule.
9247 * configure.srv: Add nios2*-*-linux*.
9248 * linux-nios2-low.c: New.
9250 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9252 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9254 2013-04-25 Hui Zhu <hui@codesourcery.com>
9257 * ax.c (ax_printf): Add fflush.
9259 2013-04-22 Tom Tromey <tromey@redhat.com>
9261 * Makefile.in (SFILES): Add filestuff.c.
9262 (OBS): Add filestuff.o.
9263 (filestuff.o): New target.
9264 * config.in, configure: Rebuild.
9265 * configure.ac: Check for fdwalk, pipe2.
9267 2013-04-17 Pedro Alves <palves@redhat.com>
9269 * configure.ac (USE_THREAD_DB): Delete variable.
9270 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9271 Don't AC_SUBST USE_THREAD_DB.
9272 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9273 * config.in, configure: Regenerate.
9275 2013-04-16 Pedro Alves <palves@redhat.com>
9277 * linux-low.h (struct lwp_info) <thread_known>: Move under
9278 the USE_THREAD_DB #ifdef.
9280 2013-04-16 Pedro Alves <palves@redhat.com>
9282 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9283 (linux-low.o): Delete rule.
9284 * linux-low.h: Always include "gdb_thread_db.h" instead of
9285 conditionally including thread_db.h.
9286 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9289 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9291 * Makefile.in (install-only): Fix make install regression.
9293 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9295 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9296 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9298 * gdbserver.1: Remove.
9300 2013-03-22 Pedro Alves <palves@redhat.com>
9302 * linux-low.c (handle_extended_wait): Don't call
9303 linux_enable_event_reporting.
9305 2013-03-15 Tony Theodore <tonyt@logyst.com>
9308 * Makefile.in (SHELL): Use @SHELL@.
9310 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9312 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9315 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9317 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9318 Remove extraneous NULL element.
9320 2013-03-13 Yao Qi <yao@codesourcery.com>
9322 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9323 'V' block in trace frame.
9325 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9327 * target.h (struct target_ops): Add btrace ops.
9328 (target_supports_btrace): New macro.
9329 (target_enable_btrace): New macro.
9330 (target_disable_btrace): New macro.
9331 (target_read_btrace): New macro.
9332 * gdbthread.h (struct thread_info): Add btrace field.
9333 * server.c: Include btrace-common.h.
9334 (handle_btrace_general_set): New function.
9335 (handle_btrace_enable): New function.
9336 (handle_btrace_disable): New function.
9337 (handle_general_set): Call handle_btrace_general_set.
9338 (handle_qxfer_btrace): New function.
9339 (struct qxfer qxfer_packets[]): Add btrace entry.
9340 * inferiors.c (remove_thread): Disable btrace.
9341 * linux-low: Include linux-btrace.h.
9342 (linux_low_enable_btrace): New function.
9343 (linux_low_read_btrace): New function.
9344 (linux_target_ops): Add btrace ops.
9345 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9346 Add srv_linux_btrace=yes.
9347 (x86_64-*-linux*): Add linux-btrace.o.
9348 Add srv_linux_btrace=yes.
9349 * configure.ac: Define HAVE_LINUX_BTRACE.
9350 * config.in: Regenerated.
9351 * configure: Regenerated.
9353 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9355 * server.c (handle_qxfer): Preserve error message if -3 is
9357 (qxfer): Document the -3 return value.
9359 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9361 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9362 (linux_btrace_h): New variable.
9363 (linux-btrace.o): New rule.
9365 2013-03-08 Stan Shebs <stan@codesourcery.com>
9366 Hafiz Abid Qadeer <abidh@codesourcery.com>
9368 * tracepoint.c (trace_buffer_size): New global.
9369 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9370 (init_trace_buffer): Change to one-argument function. Allocate
9371 trace buffer memory.
9372 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9373 handle QTBuffer:size packet.
9374 (cmd_bigqtbuffer_size): New function.
9375 (initialize_tracepoint): Call init_trace_buffer with
9376 DEFAULT_TRACE_BUFFER_SIZE.
9377 * server.c (handle_query): Add QTBuffer:size in the
9380 2013-03-07 Yao Qi <yao@codesourcery.com>
9382 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9383 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9385 (cmd_qtsp): Adjust condition. Do post increment.
9386 Set cur_action and cur_step_action back to 0.
9388 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9391 * linux-low.c (linux_write_memory): Return early success if LEN is
9394 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9396 * configure.srv: Add x86_64-*-cygwin* as target.
9398 2013-02-28 Tom Tromey <tromey@redhat.com>
9400 * configure.ac: Invoke AC_SYS_LARGEFILE.
9401 * configure, config.in: Rebuild.
9403 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9405 * win32-low.c: Throughout, fix format strings and casts of
9406 printf-like functions to avoid type related warnings on all
9408 (get_child_debug_event): Print dwDebugEventCode as hex since
9409 that's how it's usually documented.
9411 2013-02-28 Yao Qi <yao@codesourcery.com>
9413 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9416 2013-02-27 Jiong Wang <jiwang@tilera.com>
9418 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9419 (reg-tilegx32.c): New rule.
9420 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9421 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9422 different register info initializer according to elf class.
9423 (init_registers_tilgx32): New function. The tilegx32 register info
9425 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9426 (tile_store_gregset): Likewise.
9428 2013-02-27 Yao Qi <yao@codesourcery.com>
9430 * server.c (process_point_options): Print debug message when
9431 debug_threads is true.
9433 2013-02-26 Yao Qi <yao@codesourcery.com>
9435 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9437 2013-02-19 Pedro Alves <palves@redhat.com>
9438 Kai Tietz <ktietz@redhat.com>
9442 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9443 instead of strtoul to extract address from packet.
9444 (process_serial_event) <'z'>: Likewise.
9446 2013-02-18 Yao Qi <yao@codesourcery.com>
9448 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9450 2013-02-14 Pedro Alves <palves@redhat.com>
9454 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9455 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9457 2013-02-14 Pedro Alves <palves@redhat.com>
9459 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9461 2013-02-14 Pedro Alves <palves@redhat.com>
9463 * tracepoint.c (save_string): Delete.
9464 (add_tracepoint_action): Use savestring instead of save_string.
9466 2013-02-12 Pedro Alves <palves@redhat.com>
9468 * linux-xtensa-low.c: Ditto.
9469 * xtensa-xtregs.c: Ditto.
9471 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9473 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9476 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9478 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9479 aarch64_num_wp_regs and aarch64_num_bp_regs to
9480 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9482 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9484 * linux-aarch64-low.c (ps_get_thread_area): Replace
9485 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9487 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9488 Marcus Shawcroft <marcus.shawcroft@arm.com>
9489 Nigel Stephens <nigel.stephens@arm.com>
9490 Yufeng Zhang <yufeng.zhang@arm.com>
9492 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9493 (aarch64.c, aarch64-without-fpu.c): New targets.
9494 * configure.srv (aarch64*-*-linux*): New.
9495 * linux-aarch64-low.c: New file.
9497 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9499 * linux-low.c (handle_extended_wait, linux_create_inferior)
9500 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9501 (dequeue_one_deferred_signal, linux_resume_one_thread)
9502 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9503 (linux_tracefork_grandchild, linux_test_for_tracefork)
9504 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9505 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9506 where the argument is 0.
9508 2013-01-25 Yao Qi <yao@codesourcery.com>
9510 * event-loop.c: Include "queue.h".
9511 (gdb_event_p): New typedef.
9512 (struct gdb_event) <next_event>: Remove.
9513 (event_queue): Change to QUEUE(gdb_event_p).
9514 (async_queue_event): Remove.
9515 (gdb_event_xfree): New.
9516 (initialize_event_loop): New.
9517 (process_event): Use API from QUEUE.
9518 (wait_for_event): Likewise.
9519 * server.c (main): Call initialize_event_loop.
9520 * server.h (initialize_event_loop): Declare.
9522 2013-01-18 Yao Qi <yao@codesourcery.com>
9524 * ax.h (struct eval_agent_expr_context): New.
9525 (gdb_eval_agent_expr): Update declaration.
9526 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9527 TFRAME. Add new argument CTX.
9528 * server.h (struct eval_agent_expr_context): Declare.
9529 (agent_mem_read, agent_tsv_read): Update declaration.
9530 (agent_mem_read_string): Likewise.
9531 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9532 (add_traceframe_block): Add new argument TPOINT.
9533 Increase TPOINT->traceframe_usage.
9534 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9535 eval_tracepoint_agent_expr.
9536 (condition_true_at_tracepoint): Likewise.
9537 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9538 (agent_mem_read_string, agent_tsv_read): Likewise.
9540 2013-01-16 Yao Qi <yao@codesourcery.com>
9542 * linux-low.c (linux_resume_one_lwp): Don't check
9543 'lwp->bp_reinsert != 0'.
9545 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9546 Pedro Alves <palves@redhat.com>
9548 * lynx-low.c (ptrace_request_to_str): Define a temporary
9549 macro and use it to simplify this function's implementation.
9551 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9553 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9556 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9558 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9560 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9562 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9564 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9566 * lynx-low.c (lynx_resume): Use the resume_info parameter
9567 to determine the ptid for the lynx_ptrace call, unless
9568 it is equal to minus_one_ptid, in which case we use the
9569 ptid of the current_inferior.
9570 (lynx_wait_1): After having received a thread create/exit
9571 event, resume the inferior's execution using the signaling
9572 thread's ptid, rather than the old ptid.
9574 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9576 * lynx-low.c (lynx_resume): Delete variable ret.
9578 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9580 * gdbreplay.c (gdbreplay_version): Update copyright year.
9581 * server.c (gdbserver_version): Likewise.
9583 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9585 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9588 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9590 * lynx-low.c (ptrace_request_to_str): Add handling for
9593 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9595 * lynx-low.c (lynx_attach): Delete variable new_process.
9597 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9599 * lynx-low.c (lynx_create_inferior): Delete variable
9602 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9604 * lynx-low.c (ptrace_request_to_str): Do not handle
9605 PTRACE_GETTHREADLIST if this macro does not exist.
9607 2012-12-15 Yao Qi <yao@codesourcery.com>
9609 * Makefile.in (OBS): Add notif.o.
9610 * notif.c, notif.h: New.
9611 * server.c: Include "notif.h".
9612 (struct vstop_notif) <next>: Remove.
9614 (queue_stop_reply): Update.
9615 (push_event, send_next_stop_reply): Remove.
9616 (discard_queued_stop_replies): Update.
9617 (notif_stop): New variable.
9618 (handle_v_stopped): Remove.
9619 (handle_v_requests): Don't call handle_v_stopped. Call
9620 handle_ack_notif instead.
9621 (queue_stop_reply_callback): Call notif_event_enque instead
9622 of queue_stop_reply.
9623 (handle_status): Don't call send_next_stop_reply, call
9624 notif_write_event instead.
9625 (kill_inferior_callback): Likewise.
9626 (detach_or_kill_inferior_callback): Likewise.
9627 (main): Call initialize_notif.
9628 (process_serial_event): Call QUEUE_is_empty.
9629 (handle_target_event): Call notif_push instead of push event.
9630 * server.h (push_event): Remove declaration.
9632 2012-12-10 Tom Tromey <tromey@redhat.com>
9634 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9635 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9638 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9639 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9640 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9641 (amd64-linux-ipa.o, ax.o): Rewrite.
9642 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9643 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9644 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9645 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9646 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9647 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9648 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9649 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9650 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9651 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9652 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9653 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9654 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9655 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9656 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9657 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9658 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9659 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9660 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9661 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9662 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9663 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9664 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9665 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9666 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9667 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9668 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9669 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9670 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9671 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9672 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9673 (reg-tilegx.o): Remove.
9674 (all_object_files): New macro.
9675 Include .deps files.
9676 * aclocal.m4, configure: Rebuild.
9677 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9678 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9679 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9681 2012-12-05 Tom Tromey <tromey@redhat.com>
9684 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9686 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9688 * configure.ac: Check for linux/perf_event.h.
9689 * config.in: Regenerated.
9690 * configure: Regenerated.
9692 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9694 * hostio.c (handle_readlink): Decrease buffer size
9695 parameter passed to readlink by one byte.
9697 2012-11-26 Yao Qi <yao@codesourcery.com>
9699 * configure.ac (build_warnings): Append '-Wempty-body'.
9700 * configure: Regenerated.
9701 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9704 2012-11-15 Pierre Muller <muller@sourceware.org>
9706 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9707 * config.in: Regenerate.
9708 * configure: Regenerate.
9709 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9710 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9711 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9712 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9714 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9715 instead of <sys/wait.h> header.
9716 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9718 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9720 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9721 (various make rules): Remove -DGDBSERVER
9723 2012-11-09 Yao Qi <yao@codesourcery.com>
9725 * spu-low.c (current_ptid): Move it to ..
9726 * gdbthread.h: ... here. New.
9727 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9728 * server.c (myresume, process_serial_event): Likewise.
9729 * thread-db.c (thread_db_find_new_threads): Likewise.
9730 * tracepoint.c (run_inferior_command): Likewise.
9732 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9734 * server.c (handle_search_memory_1): Include access length in
9737 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9739 * linux-crisv32-low.c: Fix compile errors.
9741 2012-09-04 Yao Qi <yao@codesourcery.com>
9743 * tracepoint.c (cmd_qtsv): Adjust debug message.
9744 Don't check CUR_TPOINT.
9746 2012-08-28 Yao Qi <yao@codesourcery.com>
9748 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9749 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9750 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9751 Remove declarations of xmalloc, xreallloc, xstrdup and
9753 * Makefile.in (libiberty_h): New.
9754 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9755 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9757 2012-08-23 Yao Qi <yao@codesourcery.com>
9759 * server.h: Remove declaration of 'xsnprintf'.
9761 2012-08-22 Keith Seitz <keiths@redhat.com>
9763 * server.h: Include build-gnulib-gbserver/config.h.
9764 * gdbreplay.c: Likewise.
9766 2012-08-08 Doug Evans <dje@google.com>
9768 * Makefile.in (SFILES): Add gdb_vecs.c.
9769 (OBS): Add gdb_vecs.o.
9770 (gdb_vecs_h, host_defs_h): New variables.
9771 (thread-db.o): Add $(gdb_vecs_h) dependency.
9772 (gdb_vecs.o): New rule.
9773 * thread-db.c: #include "gdb_vecs.h".
9774 (thread_db_load_search): Use a vector to iterate over path elements.
9775 Handle text appearing after "$pdir".
9777 * configure.ac: Add check for strstr.
9778 * config.in: Regenerate.
9779 * configure: Regenerate.
9781 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9783 * hostio.c (handle_pread): If pread fails, fall back to attempting
9785 (handle_pwrite): Likewise for pwrite.
9787 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9789 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9790 between unsupported TYPE and unimplementable ADDR/LEN combination.
9791 (arm_insert_point): Act on new return value.
9793 2012-07-31 Pedro Alves <palves@redhat.com>
9795 * server.c (process_point_options): Only skip tokens if we find
9796 one that is unrecognized. Don't treat 'X' specially while
9797 skipping unrecognized tokens.
9799 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9801 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9802 to 4-byte-align HW breakpoint addresses for Thumb.
9804 2012-07-27 Yao Qi <yao@codesourcery.com>
9808 * server.h: Declare gdb_agent_about_to_close.
9809 * target.c (kill_inferior): Include "agent.h".
9810 New. Send command 'kill'.
9811 * target.h (kill_inferior): Removed macro.
9812 * tracepoint.c (gdb_agent_about_to_close): New.
9813 (gdb_agent_helper_thread): Handle command 'close'.
9814 Wait endlessly until the inferior stops.
9815 Install gdb_agent_remove_socket to atexit hook.
9816 (agent_socket_name): New static variable.
9817 (gdb_agent_socket_init): Replace local variable 'name' with
9818 'agent_socket_name'.
9819 (gdb_agent_remove_socket): New.
9821 2012-07-27 Yao Qi <yao@codesourcery.com>
9823 * server.c (process_point_options): Stop at 'X' when parsing.
9825 2012-07-19 Michael Eager <eager@eagercon.com>
9827 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9829 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9830 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9831 hardware breakpoint.
9833 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9835 * gdbserver/linux-low.c (initialize_low): Call
9836 linux_ptrace_init_warnings.
9838 2012-07-02 Doug Evans <dje@google.com>
9840 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9843 2012-07-02 Stan Shebs <stan@codesourcery.com>
9845 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9846 (ax.o): Add it to build rule.
9848 (OBS): Add format.o.
9849 (IPA_OBS): Add format.o.
9850 * server.c (handle_query): Claim support for breakpoint commands.
9851 (process_point_options): Add command case.
9852 (process_serial_event): Leave running if there are printfs in
9854 * mem-break.h (any_persistent_commands): Declare.
9855 (add_breakpoint_commands): Declare.
9856 (gdb_no_commands_at_breakpoint): Declare.
9857 (run_breakpoint_commands): Declare.
9858 * mem-break.c (struct point_command_list): New struct.
9859 (struct breakpoint): New field command_list.
9860 (any_persistent_commands): New function.
9861 (add_commands_to_breakpoint): New function.
9862 (add_breakpoint_commands): New function.
9863 (gdb_no_commands_at_breakpoint): New function.
9864 (run_breakpoint_commands): New function.
9865 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9867 * ax.c: Include format.h.
9868 (ax_printf): New function.
9869 (gdb_eval_agent_expr): Add printf opcode.
9871 2012-06-13 Yao Qi <yao@codesourcery.com>
9873 * server.c (start_inferior): Remove duplicated writes to fields
9874 'last_resume_kind' and 'last_status' of 'current_inferior'.
9876 2012-06-12 Yao Qi <yao@codesourcery.com>
9877 Pedro Alves <palves@redhat.com>
9879 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9881 * server.c (handle_v_cont): Extend comment.
9883 2012-06-11 Yao Qi <yao@codesourcery.com>
9885 * linux-low.c (linux_attach): Add 'static'.
9887 2012-06-06 Yao Qi <yao@codesourcery.com>
9889 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9891 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9893 Fix gcc -flto compilation warning.
9894 * server.c (main): Make variable multi_mode and attach volatile.
9896 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9898 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9899 if the platform doesn't know about it.
9901 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9903 * Makefile.in (SFILES): Add linux-tile-low.c.
9904 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9905 * configure.srv: Handle tilegx-*-linux*.
9906 * linux-tile-low.c: New file.
9908 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9910 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9912 2012-05-24 Pedro Alves <palves@redhat.com>
9916 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9918 2012-05-24 Pedro Alves <palves@redhat.com>
9922 Replace target_signal with gdb_signal throughout.
9924 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9926 * linux-low.c (linux_store_registers): Avoid the copying sequence
9927 when no data has been retrieved by ptrace.
9929 2012-05-22 Will Deacon <will.deacon@arm.com>
9931 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9932 Include asm/ptrace.h.
9933 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9936 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9938 * linux-low.c (linux_store_registers): Don't re-retrieve data
9939 with ptrace that has already been obtained from /proc. Always
9940 copy any data retrieved with ptrace to the buffer supplied.
9942 2012-05-11 Yao Qi <yao@codesourcery.com>
9943 Pedro Alves <palves@redhat.com>
9945 * linux-low.c (enum stopping_threads_kind): New.
9946 (stopping_threads): Change type to `enum stopping_threads_kind'.
9947 (handle_extended_wait): If stopping and suspending threads, leave
9948 the new_lwp suspended too.
9949 (linux_wait_for_event): Adjust.
9950 (stop_all_lwps): Set `stopping_threads' to
9951 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9952 whether we're suspending threads or just stopping them. Assert no
9955 2012-04-29 Yao Qi <yao@codesourcery.com>
9957 * server.h: Move some code to ...
9958 * gdbthread.h: ... here. New.
9959 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9960 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9961 (nto-low.o, win32-low.o): Likewise.
9962 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9963 * regcache.c, remote-utils.c, server.c: Likewise.
9964 * target.c, tracepoint.c, win32-low.c: Likewise.
9966 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9968 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9969 (PTRACE_ARG4_TYPE): Likewise.
9970 (PTRACE_XFER_TYPE): Likewise.
9971 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9972 ptrace to PTRACE_ARG3_TYPE.
9973 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9974 (PTRACE_ARG4_TYPE): Likewise.
9975 (PTRACE_XFER_TYPE): Likewise.
9976 (linux_detach_one_lwp): Cast fourth argument of
9977 ptrace to long then PTRACE_ARG4_TYPE.
9978 (regsets_fetch_inferior_registers): Cast third argument of
9979 ptrace to long then PTRACE_ARG3_TYPE.
9980 (regsets_store_inferior_registers): Likewise.
9982 2012-04-20 Pedro Alves <palves@redhat.com>
9984 * configure: Regenerate.
9986 2012-04-19 Pedro Alves <palves@redhat.com>
9988 * Makefile.in (GNULIB_BUILDDIR): New.
9989 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9990 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9991 (all, install-only, uninstall, clean-info, all-lib, clean): No
9992 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9993 (maintainer-clean realclean distclean): Use subdir_do.
9995 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9996 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9997 * acinclude.m4: Include acx_configure_dir.m4.
9998 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9999 calls. Call AC_PROG_RANLIB. Configure gnulib using
10002 (GNULIB_STDINT_H): Adjust.
10003 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10004 * gdbreplay.c: Include build-gnulib/config.h.
10005 * server.h: Likewise.
10006 * aclocal.m4: Regenerate.
10007 * config.in: Regenerate.
10008 * configure: Regenerate.
10010 2012-04-19 Pedro Alves <palves@redhat.com>
10012 * Makefile.in (LIBGNU, INCGNU): Adjust.
10013 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10014 (all, install-only, uninstall, clean-info, all-lib, clean)
10015 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10016 * configure.ac: Adjust AC_OUTPUT output.
10017 * aclocal.m4: Regenerate.
10018 * configure: Regenerate.
10020 2012-04-19 Pedro Alves <palves@redhat.com>
10022 * Makefile.in (generated_files): New.
10023 (server_h): Remove the explicit dependency on config.h, and depend
10024 on $generated_files.
10026 2012-04-19 Pedro Alves <palves@redhat.com>
10028 * Makefile.in (INCGNU): Add -Ignulib.
10030 2012-04-19 Pedro Alves <palves@redhat.com>
10032 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10033 (INCGNU): ... this, and spell out -I here.
10034 (GNULIB_LIB): Rename to ...
10035 (LIBGNU): ... this.
10036 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10038 2012-04-19 Pedro Alves <palves@redhat.com>
10040 * config.in: Regenerate.
10042 2012-04-19 Pedro Alves <palves@redhat.com>
10044 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10045 * server.h (memmem): Remove declaration.
10046 * config.in: Regenerate.
10047 * configure: Regenerate.
10049 2012-04-19 Yao Qi <yao@codesourcery.com>
10051 * Makefile.in (SFILES): Add common/vec.c.
10055 2012-04-19 Yao Qi <yao@codesourcery.com>
10057 * remote-utils.c (prepare_resume_reply): Replace with macro
10058 target_core_of_thread.
10059 * server.c (handle_qxfer_threads_proper): Likewise.
10060 * target.h (traget_core_of_thread): New macro.
10062 2012-04-18 Pedro Alves <palves@redhat.com>
10064 * aclocal.m4: Regenerate.
10065 * configure: Regenerate.
10067 2012-04-16 Yao Qi <yao@codesourcery.com>
10069 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10070 duplicated on address.
10072 2012-04-16 Yao Qi <yao@codesourcery.com>
10074 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10075 (struct tracepoint_action_ops) <send>: New field.
10076 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10077 (agent_expr_send, x_tracepoint_action_send): New.
10078 (l_tracepoint_action_send): New.
10079 (cmd_qtdp): Download and install tracepoint
10080 according to `use_agent'.
10081 (run_inferior_command): Add one more parameter `len'.
10083 (tracepoint_send_agent): New.
10084 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10086 2012-04-16 Yao Qi <yao@codesourcery.com>
10088 * tracepoint.c (download_tracepoints): Moved to ...
10089 (cmd_qtstart): ... here.
10091 2012-04-14 Yao Qi <yao@codesourcery.com>
10093 * tracepoint.c: Include inttypes.h.
10094 (struct collect_memory_action): Use sized types.
10095 (struct tracepoint): Likewise.
10096 (cmd_qtdp, stop_tracing): Update print specifiers.
10097 (cmd_qtp, response_tracepoint): Likewise.
10098 (collect_data_at_tracepoint): Likewise.
10099 (collect_data_at_step): Likewise.
10101 2012-04-14 Yao Qi <yao@codesourcery.com>
10103 Import gnulib module inttypes.
10104 * aclocal.m4, config.in, configure: Regenerated.
10106 2012-04-14 Yao Qi <yao@codesourcery.com>
10108 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10109 Makefile and config.status at last.
10111 2012-04-13 Yao Qi <yao@codesourcery.com>
10113 * tracepoint.c: Include stdint.h unconditionally.
10115 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10117 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10118 on BFD_HAVE_SYS_PROCFS_TYPE.
10119 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10120 * configure: Regenerate.
10121 * config.in: Likewise.
10123 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10125 * Makefile.in (clean): Also remove x32.c x32-linux.c
10126 x32-avx.c x32-avx-linux.c.
10127 (x32.o): New target.
10129 (x32-linux.o): Likewise.
10130 (x32-linux.c): Likewise.
10131 (x32-avx.o): Likewise.
10132 (x32-avx.c): Likewise.
10133 (x32-avx-linux.o): Likewise.
10134 (x32-avx-linux.c): Likewise.
10136 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10137 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10138 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10139 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10140 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10141 i386/x32-avx-linux.xml.
10143 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10144 (init_registers_x32_avx_linux): Likwise.
10145 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10146 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10148 2012-04-13 Pedro Alves <palves@redhat.com>
10150 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10151 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10152 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10153 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10156 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10158 * linux-x86-low.c (compat_x32_clock_t): New.
10159 (compat_x32_siginfo_t): Likewise.
10160 (compat_x32_siginfo_from_siginfo): Likewise.
10161 (siginfo_from_compat_x32_siginfo): Likewise.
10162 (linux_is_elf64): Likewise.
10163 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10164 and siginfo_from_compat_x32_siginfo for x32.
10165 (x86_arch_setup): Set linux_is_elf64.
10167 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10170 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10172 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10173 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10174 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10175 compatible with process.
10177 2012-04-12 Yao Qi <yao@codesourcery.com>
10179 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10180 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10181 (install-only, install-info, clean): Handle sub dir gnulib.
10182 (all-lib, am--refresh): New targets.
10183 (memmem.o): Remove target.
10184 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10185 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10186 (AC_REPLACE_FUNCS): Remove memmem.
10187 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10188 (AC_OUTPUT): Generate Makefile in gnulib/.
10189 * aclocal.m4, config.in, configure: Regenerated.
10191 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10193 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10195 2012-04-05 Pedro Alves <palves@redhat.com>
10197 -Werror=strict-aliasing
10199 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10202 2012-04-04 Pedro Alves <palves@redhat.com>
10204 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10205 (sparc_store_gregset_from_stack, sparc_store_gregset)
10206 (sparc_breakpoint_at): Fix formatting.
10208 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10210 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10212 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10213 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10214 * config.in: Regenerate.
10215 * configure: Likewise.
10217 2012-03-29 Pedro Alves <palves@redhat.com>
10219 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10220 Correct ptrace arguments.
10222 2012-03-28 Pedro Alves <palves@redhat.com>
10224 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10225 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10226 (IA64_FR1_REGNUM): New defines.
10227 (ia64_fetch_register): New.
10228 (the_low_target): Install it.
10229 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10231 * linux-low.c (linux_fetch_registers): Try the
10232 the_low_target.fetch_register hook first.
10234 * linux-arm-low.c (the_low_target): Adjust.
10235 * linux-bfin-low.c (the_low_target): Adjust.
10236 * linux-cris-low.c (the_low_target): Adjust.
10237 * linux-crisv32-low.c (the_low_target): Adjust.
10238 * linux-m32r-low.c (the_low_target): Adjust.
10239 * linux-m68k-low.c (the_low_target): Adjust.
10240 * linux-mips-low.c (the_low_target): Adjust.
10241 * linux-ppc-low.c (the_low_target): Adjust.
10242 * linux-s390-low.c (the_low_target): Adjust.
10243 * linux-sh-low.c (the_low_target): Adjust.
10244 * linux-sparc-low.c (the_low_target): Adjust.
10245 * linux-tic6x-low.c (the_low_target): Adjust.
10246 * linux-x86-low.c (the_low_target): Adjust.
10247 * linux-xtensa-low.c (the_low_target): Adjust.
10249 2012-03-26 Pedro Alves <palves@redhat.com>
10251 * server.c (handle_qxfer_libraries): Don't bail early if
10252 the_target->qxfer_libraries_svr4 is not NULL.
10254 2012-03-26 Pedro Alves <palves@redhat.com>
10256 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10258 2012-03-23 Pedro Alves <palves@redhat.com>
10260 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10261 "library-list-svr4" element's start tag when the the DSO list is
10264 2012-03-23 Pedro Alves <palves@redhat.com>
10266 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10267 a variable whose type size is the same as the inferior's pointer
10270 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10272 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10274 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10275 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10276 * linux-low.h: Include <signal.h>.
10277 (struct siginfo): Remove forward declaration.
10278 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10281 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10283 * .gitignore: Ignore more files.
10285 2012-03-19 Pedro Alves <palves@redhat.com>
10286 Jan Kratochvil <jan.kratochvil@redhat.com>
10288 * server.c (cont_thread, general_thread): Add describing comments.
10289 (start_inferior): Clear `cont_thread'.
10290 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10293 2012-03-15 Yao Qi <yao@codesourcery.com>
10295 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10297 (cmd_qtdp): ... here.
10299 2012-03-15 Yao Qi <yao@codesourcery.com>
10301 * tracepoint.c (struct tracepoint_action_ops): New.
10302 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10303 (m_tracepoint_action_download): New.
10304 (r_tracepoint_action_download): New.
10305 (x_tracepoint_action_download): New.
10306 (l_tracepoint_action_download): New.
10307 (add_tracepoint_action): Install `action->ops' according type.
10308 (download_tracepoint_1): Move code `download' function pointer
10309 of various tracepoint_action_ops.
10311 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10313 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10314 linux_ptrace_attach_warnings.
10316 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10318 * Makefile.in (linux-ptrace.o): New.
10319 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10320 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10321 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10322 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10323 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10325 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10327 2012-03-08 Yao Qi <yao@codesourcery.com>
10328 Pedro Alves <palves@redhat.com>
10330 Fix PR server/13392.
10331 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10332 offset of JMP insn.
10333 * tracepoint.c (remove_tracepoint): New.
10334 (cmd_qtdp): Call remove_tracepoint when failed to install.
10336 2012-03-07 Pedro Alves <palves@redhat.com>
10338 * linux-low.c (get_detach_signal): New.
10339 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10340 Pass on pending signals to PTRACE_DETACH. Check the result of the
10342 * server.c (program_signals, program_signals_p): New.
10343 (handle_general_set): Handle QProgramSignals.
10344 * server.h (program_signals, program_signals_p): Declare.
10346 2012-03-05 Pedro Alves <palves@redhat.com>
10347 Jan Kratochvil <jan.kratochvil@redhat.com>
10349 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10352 2012-03-03 Yao Qi <yao@codesourcery.com>
10354 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10355 agent_look_up_symbols.
10357 2012-03-03 Yao Qi <yao@codesourcery.com>
10359 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10360 (linux-x86-low.o): Likewise.
10361 * server.h: Remove in_process_agent_loaded.
10362 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10366 2012-03-03 Yao Qi <yao@codesourcery.com>
10368 * tracepoint.c (gdb_agent_capability): New global.
10369 (in_process_agent_loaded_ust): Renamed to
10370 `in_process_agent_supports_ust'.
10372 (in_process_agent_supports_ust): Call agent_capability_check.
10373 (clear_installed_tracepoints): Assert that agent supports
10376 2012-03-03 Yao Qi <yao@codesourcery.com>
10378 * linux-low.c (linux_supports_agent): New.
10379 (linux_target_ops): Initialize field `supports_agent' with
10380 linux_supports_agent.
10381 * target.h (struct target_ops) <supports_agent>: New.
10382 (target_supports_agent): New macro.
10383 * server.c (handle_general_set): Handle packet 'QAgent'.
10384 (handle_query): Send `QAgent+'.
10385 * Makefile.in (server.o): Depends on agent.h.
10387 2012-03-03 Yao Qi <yao@codesourcery.com>
10389 * Makefile.in (OBS): Add agent.o.
10390 Add new rule for agent.o.
10391 Track dependence of tracepoint.c on agent.h.
10392 * tracepoint.c (run_inferior_command_1):
10393 (run_inferior_command): Call agent_run_command.
10394 (gdb_ust_connect_sync_socket): Deleted. Move it to
10396 (resume_thread, stop_thread): Likewise.
10397 (gdb_ust_socket_init): Renamed to ...
10398 (gdb_agent_socket_init): ... New.
10399 (gdb_ust_thread): Renamed to ...
10400 (gdb_agent_helper_thread): ... New.
10401 (gdb_ust_init): Move some code to ...
10402 (gdb_agent_init): ... here. New.
10403 [HAVE_UST]: Call gdb_ust_init.
10404 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10405 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10406 * config.in, configure: Regenerated.
10408 2012-03-02 Pedro Alves <palves@redhat.com>
10410 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10411 * linux-low.c (struct simple_pid_list): New.
10412 (stopped_pids): New a struct simple_pid_list pointer.
10413 (add_to_pid_list, pull_pid_from_list): New.
10414 (handle_extended_wait): Don't assume the first signal new children
10415 report is SIGSTOP. Adjust call to pull_pid_from_list.
10416 (linux_wait_for_lwp): Adjust.
10418 2012-03-02 Yao Qi <yao@codesourcery.com>
10420 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10423 2012-03-02 Yao Qi <yao@codesourcery.com>
10425 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10426 `stop_pc' and `tpoint'. Update caller.
10428 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10430 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10431 * linux-low.c (use_linux_regsets): New macro.
10432 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10433 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10434 (linux_register_in_regsets): New function.
10435 (usr_fetch_inferior_registers): Skip registers covered by
10437 (usr_store_inferior_registers): Likewise.
10438 (usr_fetch_inferior_registers): New macro.
10439 (usr_store_inferior_registers): Likewise.
10440 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10441 (linux_store_registers): Likewise.
10442 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10444 (init_registers_mips64_dsp_linux): Likewise.
10445 (init_registers_mips_linux): New macro.
10446 (init_registers_mips_dsp_linux): Likewise.
10447 (mips_dsp_num_regs): Likewise.
10448 (DSP_BASE, DSP_CONTROL): New fallback macros.
10449 (mips_base_regs): New macro.
10450 (mips_regmap): Use it. Fix the size.
10451 (mips_dsp_regmap): New variable.
10452 (mips_dsp_regset_bitmap): Likewise.
10453 (mips_arch_setup): New function.
10454 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10456 (mips_cannot_store_register): Likewise.
10457 (the_low_target): Update .arch_setup, .num_regs and .regmap
10458 initializers. Add .regset_bitmap initializer.
10459 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10461 * linux-bfin-low.c (the_low_target): Likewise.
10462 * linux-cris-low.c (the_low_target): Likewise.
10463 * linux-crisv32-low.c (the_low_target): Likewise.
10464 * linux-ia64-low.c (the_low_target): Likewise.
10465 * linux-m32r-low.c (the_low_target): Likewise.
10466 * linux-m68k-low.c (the_low_target): Likewise.
10467 * linux-ppc-low.c (the_low_target): Likewise.
10468 * linux-s390-low.c (the_low_target): Likewise.
10469 * linux-sh-low.c (the_low_target): Likewise.
10470 * linux-sparc-low.c (the_low_target): Likewise.
10471 * linux-tic6x-low.c (the_low_target): Likewise.
10472 * linux-x86-low.c (the_low_target): Likewise.
10473 * linux-xtensa-low.c (the_low_target): Likewise.
10474 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10475 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10476 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10478 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10479 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10481 2012-02-29 Yao Qi <yao@codesourcery.com>
10482 Pedro Alves <palves@redhat.com>
10484 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10485 `step_over_finished' is true.
10487 2012-02-27 Pedro Alves <palves@redhat.com>
10489 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10490 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10492 2012-02-27 Pedro Alves <palves@redhat.com>
10495 * linux-low.c (pid_is_stopped): New.
10496 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10498 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10500 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10503 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10505 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10507 2012-02-24 Luis Machado <lgustavo@codesourcery>
10509 * server.c (handle_query): Advertise support for target-side
10510 breakpoint condition evaluation.
10511 (process_point_options): New function.
10512 (process_serial_event): When inserting a breakpoint, check for
10513 a target-side condition that should be evaluated.
10515 * mem-break.c: Include regcache.h and ax.h.
10516 (point_cond_list_t): New data structure.
10517 (breakpoint) <cond_list>: New field.
10518 (find_gdb_breakpoint_at): Make non-static.
10519 (delete_gdb_breakpoint_at): Clear any target-side
10521 (clear_gdb_breakpoint_conditions): New function.
10522 (add_condition_to_breakpoint): Likewise.
10523 (add_breakpoint_condition): Likewise.
10524 (gdb_condition_true_at_breakpoint): Likewise.
10525 (gdb_breakpoint_here): Return result directly instead
10526 of going through a local variable.
10528 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10529 (clear_gdb_breakpoint_conditions): Likewise.
10530 (add_breakpoint_condition): Likewise.
10531 (gdb_condition_true_at_breakpoint): Likewise.
10533 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10534 (need_step_over_p): Take target-side breakpoint condition into
10537 2012-02-24 Luis Machado <lgustavo@codesourcery>
10539 * server.h: Include tracepoint.h.
10540 (agent_mem_read, agent_get_trace_state_variable_value,
10541 agent_set_trace_state_variable_value,
10542 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10543 get_set_tsv_func_addr): New prototypes.
10545 * ax.h: New include file.
10546 * ax.c: New source file.
10548 * tracepoint.c: Include ax.h.
10549 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10550 agent_expr, eval_result_type): Move to ax.h.
10551 (parse_agent_expr): Rename to ...
10552 (gdb_parse_agent_expr): ... this, make it non-static and move
10554 (unparse_agent_expr) Rename to ...
10555 (gdb_unparse_agent_expr): ... this, make it non-static and move
10557 (eval_agent_expr): Rename to ...
10558 (eval_tracepoint_agent_expr): ... this.
10559 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10560 forward declarations.
10561 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10562 (agent_get_trace_state_variable_value): New function.
10563 (agent_set_trace_state_variable_value): New function.
10564 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10565 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10566 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10567 (condition_true_at_tracepoint): Likewise.
10568 (parse_agent_expr): Rename to ...
10569 (gdb_parse_agent_expr): ... this and move to ax.c.
10570 (unparse_agent_expr): Rename to ...
10571 (gdb_unparse_agent_expr): ... this and move to ax.c.
10572 (gdb_agent_op_name): Move to ax.c.
10573 (eval_agent_expr): Rename to ...
10574 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10576 (eval_tracepoint_agent_expr): New function.
10577 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10579 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10581 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10582 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10583 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10584 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10585 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10586 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10587 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10588 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10589 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10590 (compile_bytecodes): Remove forward declaration.
10591 (is_goto_target): Move to ax.c.
10592 (compile_bytecodes): Move to ax.c and call
10593 agent_get_trace_state_variable_value (...) and
10594 agent_set_trace_state_variable_value (...).
10596 * Makefile.in: Update ax.c and IPA dependencies.
10598 2012-02-24 Pedro Alves <palves@redhat.com>
10600 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10601 (cmd_bigqtbuffer_circular): ... this. Only handle
10602 'QTBuffer:circular:'.
10603 (handle_tracepoint_general_set): Adjust.
10605 2012-02-16 Yao Qi <yao@codesourcery.com>
10607 * inferiors.c: Move code to ...
10608 * dll.c: .... here. New.
10609 * server.h: Declare clear_dlls.
10610 * Makefile.in (SFILES): Add dll.c.
10614 2012-02-11 Yao Qi <yao@codesourcery.com>
10616 * server.c: (handle_monitor_command): Add a new parameter
10618 (handle_query): Update caller.
10620 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10622 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10623 * configure, config.in: Regenerate.
10624 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10627 2012-02-02 Pedro Alves <palves@redhat.com>
10629 Try SIGKILL first, then PTRACE_KILL.
10630 * linux-low.c (linux_kill_one_lwp): New.
10631 (linux_kill_one_lwp): Rename to ...
10632 (kill_one_lwp_callback): ... this. Use the new
10633 linux_kill_one_lwp.
10635 2012-02-02 Pedro Alves <palves@redhat.com>
10637 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10640 2012-01-27 Pedro Alves <palves@redhat.com>
10642 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10643 (elf_64_file_p): Make static.
10644 (linux_pid_exe_is_elf_64_file): New.
10645 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10646 Delete declarations.
10647 (linux_pid_exe_is_elf_64_file): Declare.
10648 * linux-x86-low.c (x86_arch_setup): Use
10649 linux_pid_exe_is_elf_64_file.
10651 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10653 * linux-low.c (linux_wait_for_event_1): Rename to ...
10654 (linux_wait_for_event): ... here and merge it with former
10655 linux_wait_for_event - new variable wait_ptid, use it.
10656 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10658 2012-01-23 Pedro Alves <palves@redhat.com>
10660 * server.c (main): Avoid yet another case of infinite loop while
10661 detaching/killing after a longjmp.
10663 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10666 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10668 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10670 * hostio.c (handle_readlink): New function.
10671 (handle_vFile): Call it to handle "vFile:readlink" packets.
10673 2012-01-20 Pedro Alves <palves@redhat.com>
10674 Ulrich Weigand <ulrich.weigand@linaro.org>
10676 * server.c (handle_v_requests): Only support vAttach and vRun to
10677 start multiple processes when in extended protocol mode.
10679 2012-01-17 Pedro Alves <palves@redhat.com>
10681 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10682 memalign plus mprotect to allocate the scratch buffer.
10684 2012-01-13 Pedro Alves <palves@redhat.com>
10686 * server.c (attach_inferior): Clear `cont_thread'.
10688 2012-01-13 Pedro Alves <palves@redhat.com>
10690 * server.c (main): Avoid infinite loop while detaching/killing
10693 2012-01-09 Doug Evans <dje@google.com>
10695 * server.c (start_inferior): Set last_ptid in --wrapper case.
10697 2012-01-06 Yao Qi <yao@codesourcery.com>
10699 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10701 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10703 2012-01-04 Yao Qi <yao@codesourcery.com>
10705 * tracepoint.c (cmd_qtdp): Print debug message
10706 for static tracepoint.
10708 2012-01-04 Yao Qi <yao@codesourcery.com>
10710 * tracepoint.c (trace_vdebug): Differentiate debug message
10711 between gdbserver and IPA.
10713 2012-01-03 Yao Qi <yao@codesourcery.com>
10715 * tracepoint.c (tracepoint_was_hit): Don't collect for
10718 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10720 * terminal.h: Reformat copyright header.
10722 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10724 * server.c (gdbserver_version): Update copyright year.
10725 * gdbreplay.c (gdbreplay_version): Likewise.
10727 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10729 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10732 2011-12-18 Hui Zhu <teawater@gmail.com>
10733 * linux-low.c (linux_create_inferior): Save return value to ret.
10735 2011-12-18 Hui Zhu <teawater@gmail.com>
10737 * linux-low.c (linux_create_inferior): Save return value to ret.
10739 2011-12-16 Doug Evans <dje@google.com>
10741 * linux-low.c (linux_create_inferior): If stdio connection,
10742 redirect stdin from /dev/null, stdout to stderr.
10743 * remote-utils.c (remote_is_stdio): New static global.
10744 (remote_connection_is_stdio): New function.
10745 (remote_prepare): Handle stdio connection.
10746 (remote_open): Ditto.
10747 (remote_close): Don't close stdin for stdio connections.
10748 (read_prim,write_prim): New functions. Replace all calls to
10749 read/write to these.
10750 * server.c (main): Watch for "-" argument. Move call to
10751 remote_prepare before start_inferior.
10752 * server.h (STDIO_CONNECTION_NAME): New macro.
10753 (remote_connection_is_stdio): Declare.
10755 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10756 in debugging output.
10758 2011-12-15 Yao Qi <yao@codesourcery.com>
10760 * tracepoint.c: Include sys/syscall.h.
10761 (gdb_ust_thread): Remove preprocessor conditional.
10763 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10765 * linux-low.c (linux_detach_one_lwp): Call
10766 the_low_target.prepare_to_resume before detaching.
10768 2011-12-14 Yao Qi <yao@codesourcery.com>
10770 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10773 2011-12-14 Yao Qi <yao@codesourcery.com>
10775 * i386-low.c (i386_low_stopped_data_address): Initialize local
10776 variable `control'.
10778 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10782 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10783 DR_CONTROL unless necessary. Extend comments.
10784 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10785 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10787 2011-12-13 Yao Qi <yao@codesourcery.com>
10789 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10791 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10793 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10795 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10796 Print new debug message for such case.
10798 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10800 Fix overlapping memcpy.
10801 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10802 the read_inferior_memory transfer.
10803 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10804 write_inferior_memory transfer.
10805 (set_fast_tracepoint_jump): New variable buf. Use it for the
10806 read_inferior_memory and write_inferior_memory transfers.
10807 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10808 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10809 Use it for the write_inferior_memory transfer.
10810 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10813 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10815 * linux-low.c (fetch_register, store_register): Make code
10816 consistent, fix formatting.
10818 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10820 * linux-low.c (usr_store_inferior_registers): Factor out code
10821 to handle individual registers into...
10822 (store_register): ... this new function.
10824 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10826 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10827 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10828 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10829 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10830 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10831 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10832 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10833 (srv_xmlfiles): Add new XML files.
10835 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10837 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10838 (init_registers_s390_linux32v1): Add prototype.
10839 (init_registers_s390_linux32v2): Likewise.
10840 (init_registers_s390_linux64v1): Likewise.
10841 (init_registers_s390_linux64v2): Likewise.
10842 (init_registers_s390x_linux64v1): Likewise.
10843 (init_registers_s390x_linux64v2): Likewise.
10844 (s390_num_regs): Increment to 52.
10845 (s390_regmap): Add orig_r2 register.
10846 (s390_num_regs_3264): Increment to 68.
10847 (s390_regmap_3264): Add orig_r2 register.
10848 (s390_collect_ptrace_register): Handle orig_r2 register.
10849 (s390_supply_ptrace_register): Likewise.
10850 (s390_fill_last_break): New function.
10851 (s390_store_last_break): Likewise.
10852 (s390_fill_system_call): New function.
10853 (s390_store_system_call): Likewise.
10854 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10856 (s390_check_regset): New function.
10857 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10858 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10859 Update target_regsets for available register sets.
10861 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10862 Jan Kratochvil <jan.kratochvil@redhat.com>
10864 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10865 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10867 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10868 * linux-low.h (struct process_info_private): New member r_debug.
10869 * server.c (handle_qxfer_libraries): Call
10870 the_target->qxfer_libraries_svr4.
10871 (handle_qxfer_libraries_svr4): New function.
10872 (qxfer_packets): New entry "libraries-svr4".
10873 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10874 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10875 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10876 PACKET_qXfer_libraries_svr4.
10878 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10880 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10881 PSW address/mask between 8-byte and 16-byte formats.
10882 (s390_supply_ptrace_register): Likewise.
10883 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10884 basic addressing mode bit.
10886 2011-11-24 Stan Shebs <stan@codesourcery.com>
10888 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10890 2011-11-17 Stan Shebs <stan@codesourcery.com>
10892 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10893 (tracing_start_time): New global.
10894 (tracing_stop_time): New global.
10895 (tracing_user_name): New global.
10896 (tracing_notes): New global.
10897 (tracing_stop_note): New global.
10898 (cmd_qtstart): Set traceframe_usage, start_time.
10899 (stop_tracing): Set stop_time.
10900 (cmd_qtstatus): Report additional status.
10901 (cmd_qtp): New function.
10902 (handle_tracepoint_query): Call it.
10903 (cmd_qtnotes): New function.
10904 (handle_tracepoint_general_set): Call it.
10905 (get_timestamp): Rename from tsv_get_timestamp.
10907 2011-11-14 Stan Shebs <stan@codesourcery.com>
10908 Kwok Cheung Yeung <kcy@codesourcery.com>
10910 * linux-x86-low.c (small_jump_insn): New.
10911 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10912 trampoline and error message, build a trampoline and issue a small
10913 jump instruction to it.
10914 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10915 trampoline and error message.
10916 (x86_get_min_fast_tracepoint_insn_len): New.
10917 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10918 * linux-low.h (struct linux_target_ops): Add arguments to
10919 install_fast_tracepoint_jump_pad operation, add new operation.
10920 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10922 (linux_get_min_fast_tracepoint_insn_len): New function.
10923 (linux_target_op): Add new operation.
10924 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10925 (gdb_trampoline_buffer_end): Ditto.
10926 (gdb_trampoline_buffer_error): Ditto.
10927 (struct ipa_sym_addresses): Add fields for new IPA variables.
10928 (symbol_list): Add entries for new IPA variables.
10929 (struct tracepoint): Add fields to hold the address range of the
10930 trampoline used by the tracepoint.
10931 (trampoline_buffer_head): New static variable.
10932 (trampoline_buffer_tail): Ditto.
10933 (claim_trampoline_space): New function.
10934 (have_fast_tracepoint_trampoline_buffer): New function.
10935 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10937 (install_fast_tracepoint): Ditto, also add error buffer argument.
10938 (cmd_qtminftpilen): New function.
10939 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10940 (fast_tracepoint_from_trampoline_address): New function.
10941 (fast_tracepoint_collecting): Handle trampoline as part of jump
10943 (set_trampoline_buffer_space): New function.
10944 (initialize_tracepoint): Initialize new IPA variables.
10945 * target.h (struct target_ops): Add arguments to
10946 install_fast_tracepoint_jump_pad operation, add new
10947 get_min_fast_tracepoint_insn_len operation.
10948 (target_get_min_fast_tracepoint_insn_len): New.
10949 (install_fast_tracepoint_jump_pad): Add arguments.
10950 * server.h (IPA_BUFSIZ): Define.
10951 * linux-i386-ipa.c: Include extra header files.
10952 (initialize_fast_tracepoint_trampoline_buffer): New function.
10953 (initialize_low_tracepoint): Call it.
10954 * server.h (set_trampoline_buffer_space): Declare.
10955 (claim_trampoline_space): Ditto.
10956 (have_fast_tracepoint_trampoline_buffer): Ditto.
10958 2011-11-14 Yao Qi <yao@codesourcery.com>
10960 * server.c (handle_query): Handle InstallInTrace for qSupported.
10961 * tracepoint.c (add_tracepoint): Sort list.
10962 (install_tracepoint, download_tracepoint): New.
10963 (cmd_qtdp): Call them to install and download tracepoints.
10964 (sort_tracepoints): Removed.
10965 (cmd_qtstart): Update.
10967 2011-11-14 Yao Qi <yao@codesourcery.com>
10969 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10970 * mem-break.h: Declare.
10971 * tracepoint.c (cmd_qtstart): Move some code to ...
10972 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10974 (download_tracepoints): Move some code to ...
10975 (download_tracepoint_1): ... here. New.
10977 2011-11-08 Yao Qi <yao@codesourcery.com>
10979 * remote-utils.c (relocate_instruction): A comment fix.
10981 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10983 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10984 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10985 dr_status_mirror and dr_control_mirror from debug_reg_state.
10986 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10987 (i386_initial_stuff): Remove use of deleted globals.
10988 (i386_get_thread_context, i386_set_thread_context,
10989 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10990 from debug_reg_state.
10992 2011-11-05 Yao Qi <yao@codesourcery.com>
10994 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10995 address as TPOINT's.
10997 2011-11-02 Stan Shebs <stan@codesourcery.com>
10999 * tracepoint.c (agent_mem_read_string): New function.
11000 (eval_agent_expr): Call it for tracenz.
11001 * server.c (handle_query): Report support for tracenz.
11003 2011-11-02 Yao Qi <yao@codesourcery.com>
11005 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11007 2011-11-02 Yao Qi <yao@codesourcery.com>
11009 * target.h: Fix a typo in comment.
11011 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11013 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11014 clobber the breakpoints' shadows with fast tracepoint jumps.
11015 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11016 * target.c (write_inferior_memory): Also pass MYADDR down to
11019 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11021 * configure.ac: Check support for personality routine.
11022 * configure: Regenerate.
11023 * config.in: Likewise.
11024 * linux-low.c: Include <sys/personality.h>.
11025 Define ADDR_NO_RANDOMIZE if necessary.
11026 (linux_create_inferior): Disable address space randomization when
11027 forking inferior, if requested.
11028 (linux_supports_disable_randomization): New function.
11029 (linux_target_ops): Install it.
11030 * server.h (disable_randomization): Declare.
11031 * server.c (disable_randomization): New global variable.
11032 (handle_general_set): Handle QDisableRandomization.
11033 (handle_query): Likewise for qSupported.
11034 (main): Support --disable-randomization and --no-disable-randomization
11035 command line arguments.
11036 * target.h (struct target_ops): Add supports_disable_randomization.
11037 (target_supports_disable_randomization): New macro.
11039 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11041 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11043 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11044 [!PT_GETDSBT] (target_loadmap): New definition.
11045 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11046 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11047 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11048 and PT_GETDSBT to LINUX_LOADMAP.
11049 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11050 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11052 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11054 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11055 (arm_linux_hwbp_cap): New static variable.
11056 (arm_linux_get_hwbp_cap): Replace by ...
11057 (arm_linux_init_hwbp_cap): ... this new function.
11058 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11059 (arm_linux_get_hw_watchpoint_count): Likewise.
11060 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11061 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11062 (arm_prepare_to_resume): Use perror_with_name instead of error.
11064 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11066 * linux-arm-low.c: Include <signal.h>.
11067 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11068 (struct arm_linux_hwbp_cap): New data type.
11069 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11070 (struct arm_linux_hw_breakpoint): New data type.
11071 (MAX_BPTS, MAX_WPTS): Define.
11072 (struct arch_process_info, struct arch_lwp_info): New data types.
11073 (arm_linux_get_hwbp_cap): New function.
11074 (arm_linux_get_hw_breakpoint_count): Likewise.
11075 (arm_linux_get_hw_watchpoint_count): Likewise.
11076 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11077 (arm_hwbp_control_initialize): Likewise.
11078 (arm_hwbp_control_is_enabled): Likewise.
11079 (arm_hwbp_control_is_initialized): Likewise.
11080 (arm_hwbp_control_disable): Likewise.
11081 (arm_linux_hw_breakpoint_equal): Likewise.
11082 (arm_linux_hw_point_initialize): Likewise.
11083 (struct update_registers_data): New data structure.
11084 (update_registers_callback: New function.
11085 (arm_insert_point): Likewise.
11086 (arm_remove_point): Likewise.
11087 (arm_stopped_by_watchpoint): Likewise.
11088 (arm_stopped_data_address): Likewise.
11089 (arm_new_process): Likewise.
11090 (arm_new_thread): Likewise.
11091 (arm_prepare_to_resume): Likewise.
11092 (the_low_target): Register arm_insert_point, arm_remove_point,
11093 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11094 arm_new_thread, and arm_prepare_to_resume.
11096 2011-09-15 Stan Shebs <stan@codesourcery.com>
11098 * server.h (struct emit_ops): Add compare-goto fields.
11099 * tracepoint.c (gdb_agent_op_sizes): New table.
11100 (emit_eq_goto): New function.
11101 (emit_ne_goto): New function.
11102 (emit_lt_goto): New function.
11103 (emit_le_goto): New function.
11104 (emit_gt_goto): New function.
11105 (emit_ge_goto): New function.
11106 (is_goto_target): New function.
11107 (compile_bytecodes): Recognize special cases of compare-goto
11108 combinations and call specialized emitters for them.
11109 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11110 (amd64_emit_ne_goto): New function.
11111 (amd64_emit_lt_goto): New function.
11112 (amd64_emit_le_goto): New function.
11113 (amd64_emit_gt_goto): New function.
11114 (amd64_emit_ge_goto): New function.
11115 (amd64_emit_ops): Add the new functions.
11116 (i386_emit_eq_goto): New function.
11117 (i386_emit_ne_goto): New function.
11118 (i386_emit_lt_goto): New function.
11119 (i386_emit_le_goto): New function.
11120 (i386_emit_gt_goto): New function.
11121 (i386_emit_ge_goto): New function.
11122 (i386_emit_ops): Add the new functions.
11124 2011-09-08 Stan Shebs <stan@codesourcery.com>
11126 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11127 (i386_emit_epilogue): Restore %ebx.
11129 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11131 * server.c (step_thread): Remove definition.
11132 (process_serial_event): Don't handle Hs.
11133 * server.h (step_thread): Remove declaration.
11134 * target.c (set_desired_inferior): Remove use of step_thread.
11136 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11138 * linux-low.c: Include linux-procfs.h.
11139 (linux_attach_lwp_1): Update comments.
11140 (linux_attach): Scan for existing threads when attaching to a
11141 process that is the tgid.
11142 * Makefile.in: Update dependencies.
11144 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11146 * configure.srv: Add linux-procfs.o dependencies.
11148 2011-08-14 Yao Qi <yao@codesourcery.com>
11150 * target.h (struct target_ops): Fix indent.
11151 * win32-low.c (win32_target_ops): Fix comment.
11153 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11154 Yao Qi <yao@codesourcery.com>
11156 * Makefile.in (clean): Remove tic6x-*.c files.
11157 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11158 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11159 (tic6x-c64xp-linux.c): Likewise.
11160 * configure.srv: Add support for tic6x-*-uclinux.
11161 * linux-tic6x-low.c: New.
11162 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11164 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11165 Yao Qi <yao@codesourcery.com>
11167 * target.h (struct target_ops): Add read_loadmap.
11168 * linux-low.c (struct target_loadseg): New type.
11169 (struct target_loadmap): New type.
11170 (linux_read_loadmap): New function.
11171 (linux_target_ops): Add linux_read_loadmap.
11172 * server.c (handle_query): Support qXfer:fdpic:read packet.
11173 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11176 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11178 * win32-low.c: Include <stdint.h>.
11180 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11182 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11183 to the inferior here.
11184 (i386_remove_aligned_watchpoint): Ditto.
11185 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11186 fit part of the watchpoint in the debug registers.
11187 (i386_update_inferior_debug_regs): New.
11188 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11189 registers, and only update the inferior on success.
11190 (i386_low_remove_watchpoint): Ditto.
11192 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11194 * linux-low.c (compare_ints, unique, list_threads, show_process,
11195 linux_core_of_thread): Delete.
11196 (linux_target_ops): Change linux_core_of_thread to
11197 linux_common_core_of_thread.
11198 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11199 * utils.c (malloc_failure): Change type of argument.
11200 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11201 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11202 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11203 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11204 (IPA_OBJS): Add common-utils-ipa.o.
11205 (ptid_h, linux_osdata_h): New macros.
11206 (server_h): Add common/common-utils.h, common/xml-utils.h,
11207 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11209 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11210 ptid.o, buffer.o): New rules.
11211 (linux-low.o): Add common/linux-osdata.h as a dependency.
11212 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11213 * configure.ac: Add AC_HEADER_DIRENT check.
11214 * config.in: Regenerate.
11215 * configure: Regenerate.
11216 * remote-utils.c (xml_escape_text): Delete.
11217 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11218 buffer_xml_printf): Move to common/buffer.c.
11219 * server.c (main): Remove call to initialize_inferiors.
11220 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11221 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11222 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11223 internal_error, gdb_assert, gdb_assert_fail): Delete.
11224 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11225 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11227 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11228 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11229 initialize_inferiors): Delete.
11231 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11233 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11236 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11238 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11240 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11242 2011-05-26 Yao Qi <yao@codesourcery.com>
11244 * Makefile.in (thread-db.o): Track dependence to
11245 common/gdb_thread_db.h.
11246 * thread-db.c: include gdb_thread_db.h from right place.
11248 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11250 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11251 __FILE__ and __LINE__ to internal_error.
11253 2011-05-13 Doug Evans <dje@google.com>
11255 * thread-db.c (try_thread_db_load_from_sdir): New function.
11256 (try_thread_db_load_from_dir): New function.
11257 (thread_db_load_search): Handle $sdir, ignore $pdir.
11258 Remove trying of system directories if search of
11259 libthread-db-search-path fails, that is now done via $sdir.
11261 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11263 * server.c (handle_query): Add EnableDisableTracepoints to the list
11264 of supported features.
11265 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11267 (cmd_qtenable_disable): New.
11268 (cmd_qtstart): Install tracepoints even if disabled.
11269 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11270 receiving a QTEnable or QTDisable packet.
11271 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11272 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11274 (gdb_probe): Skip data collection if static tracepoint is disabled.
11276 2011-05-10 Doug Evans <dje@google.com>
11278 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11280 2011-05-04 Doug Evans <dje@google.com>
11282 * linux-low.c (linux_join): Skip process lookup.
11283 * spu-low.c (spu_join): Ditto.
11284 * server.c (join_inferiors_callback): Delete.
11285 (process_serial_event): For 'D' packet (detach) call join_inferior
11288 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11290 * README: Don't mention xscale*-*-linux*.
11291 * configure.srv (xscale*-*-linux*): Don't handle target.
11293 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11295 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11297 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11298 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11299 (i386_emit_void_call_2): Likewise.
11301 2011-04-26 Yao Qi <yao@codesourcery.com>
11303 * linux-low.c: Move common macros to linux-ptrace.h.
11304 Include linux-ptrace.h.
11305 * Makefile.in (linux_ptrace_h): New.
11306 (linux-low.o): Depends on linux-ptrace.h.
11308 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11310 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11311 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11312 (remote_prepare): New function with most of the TCP code from ...
11313 (remote_open): ... here. Detect PORT here unconditionally. Move also
11314 setting transport_is_reliable.
11315 * server.c (run_once): New variable.
11316 (gdbserver_usage): Document it.
11317 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11318 the first run if RUN_ONCE.
11319 * server.h (run_once, remote_prepare): New declarations.
11321 2011-04-19 Tom Tromey <tromey@redhat.com>
11323 * win32-low.c (handle_load_dll): Remove duplicate "the".
11325 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11327 Remove support for old Cygwin 1.5 versions.
11328 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11329 function to avoid warning.
11330 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11333 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11335 * gdbserver/server.h (Macro _): Define it if not available.
11337 2011-03-14 Michael Snyder <msnyder@vmware.com>
11339 * hostio.c (handle_close): Remove unnecessary null test.
11341 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11343 * Makefile.in (maintainer-clean realclean distclean): Remove
11344 "make ... subdir_do" command.
11346 2011-03-10 Michael Snyder <msnyder@vmware.com>
11348 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11350 * server.c (handle_v_run): Free alloced buffer on early return.
11352 2011-03-09 Yao Qi <yao@codesourcery.com>
11355 2011-03-04 Yao Qi <yao@codesourcery.com>
11357 * Makefile.in: Remove GNU make feature --directory.
11359 2011-03-05 Yao Qi <yao@codesourcery.com>
11361 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11362 (subdir_do): New make target. Copied from gdb/Makefile.
11363 (maintainer-clean, realclean, distclean, clean): Call corresponding
11364 make targets in common/Makefile.
11366 2011-02-11 Yao Qi <yao@codesourcery.com>
11368 * configure.ac: Call AC_PROG_RANLIB.
11369 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11370 * configure: Regenerate.
11372 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11374 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11376 2011-03-06 Yao Qi <yao@codesourcery.com>
11378 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11380 2011-03-05 Yao Qi <yao@codesourcery.com>
11382 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11383 (subdir_do): New make target. Copied from gdb/Makefile.
11384 (maintainer-clean, realclean, distclean, clean): Call corresponding
11385 make targets in common/Makefile.
11387 2011-03-04 Yao Qi <yao@codesourcery.com>
11389 * Makefile.in: Remove GNU make feature --directory.
11391 2011-03-04 Michael Snyder <msnyder@vmware.com>
11393 * server.c (queue_stop_reply): Call xmalloc not malloc.
11395 2011-03-02 Michael Snyder <msnyder@vmware.com>
11397 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11399 2011-02-28 Michael Snyder <msnyder@vmware.com>
11401 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11402 (cmd_qtframe): Ditto.
11403 (cmd_qtbuffer): Ditto.
11404 (cmd_bigqtbuffer): Ditto.
11406 * utils.c (decimal2str): Initialize 'width' to nine, then
11407 don't mess with it.
11409 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11411 * hostio.c (require_data): Free *data, not data.
11413 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11415 * hostio.c (require_data): Use free, not xfree.
11417 2011-02-27 Michael Snyder <msnyder@vmware.com>
11419 * server.c (handle_query): Discard unused value.
11421 * hostio.c (require_data): Free malloc memory before returning
11424 2011-02-26 Michael Snyder <msnyder@vmware.com>
11426 * linux-low.c (list_threads): Call closedir for dirent.
11428 2011-02-27 Michael Snyder <msnyder@vmware.com>
11430 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11431 a case statement falls through.
11433 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11435 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11438 2011-02-26 Michael Snyder <msnyder@vmware.com>
11440 * utils.c (decimal2str): Eliminate dead code and dead param.
11441 (pulongest): Drop dead param from call to decimal2str.
11444 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11446 Revert the following patch (not approved yet):
11447 2011-02-21 Hui Zhu <teawater@gmail.com>
11448 * tracepoint.c (tp_printf): New function.
11449 (eval_agent_expr): Handle gdb_agent_op_printf.
11451 2011-02-21 Hui Zhu <teawater@gmail.com>
11453 * tracepoint.c (tp_printf): New function.
11454 (eval_agent_expr): Handle gdb_agent_op_printf.
11456 2011-02-18 Tom Tromey <tromey@redhat.com>
11458 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11459 (tracepoint.o): Likewise.
11460 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11461 (gdb_agent_op_names): Likewise.
11463 2011-02-18 Tom Tromey <tromey@redhat.com>
11465 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11466 gdb_agent_op_rot>: New constants.
11467 (gdb_agent_op_names): Add pick and roll.
11468 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11471 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11473 * aclocal.m4: Regenerated with aclocal-1.11.1.
11475 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11477 * server.c (handle_qxfer_traceframe_info): New.
11478 (qxfer_packets): Register "traceframe-info".
11479 (handle_query): Report support for qXfer:traceframe-info:read+.
11480 * tracepoint.c (match_blocktype): New.
11481 (traceframe_find_block_type): Rename to ...
11482 (traceframe_walk_blocks): ... this. Add callback filter argument,
11484 (traceframe_find_block_type): New, reimplemented on top of
11485 traceframe_walk_blocks.
11486 (build_traceframe_info_xml): New.
11487 (traceframe_read_info): New.
11488 * server.h (traceframe_read_info): Declare.
11490 2011-02-11 Yao Qi <yao@codesourcery.com>
11492 * configure.ac: Call AC_PROG_RANLIB.
11493 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11494 * configure: Regenerate.
11496 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11498 * server.c (gdb_read_memory): Change return semantics to allow
11500 (handle_search_memory_1): Adjust.
11501 (process_serial_event) <'m' packet>: Handle partial transfers.
11502 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11504 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11506 * regcache.c (init_register_cache): Initialize
11507 regcache->register_status.
11508 (free_register_cache): Release regcache->register_status.
11509 (regcache_cpy): Copy register_status.
11510 (registers_to_string): Print 'x's for unavailable registers.
11511 (supply_register): Mark the register's status valid or
11512 unavailable, depending on whether a buffer was passed in or not.
11513 (supply_register_zeroed): New.
11514 (supply_regblock): Mark the registers' status valid or
11515 unavailable, depending on whether a buffer was passed in or not.
11516 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11517 (struct regcache): New `register_status' field.
11518 (supply_register_zeroed): Declare.
11519 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11520 supply_register_zeroed, rather than passing a NULL buffer to
11522 * tracepoint.c (fetch_traceframe_registers): Update comment.
11524 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11526 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11529 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11531 * server.h (decode_xfer_write): Change prototype.
11532 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11533 and don't extract the annex here.
11534 * server.c (decode_xfer_read): Remove `annex' parameter,
11535 and don't extract the annex here.
11536 (decode_xfer): New.
11537 (struct qxfer): New.
11538 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11539 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11540 (handle_qxfer_statictrace): New functions, abstracted out from
11541 handle_query, and made to use the struct qxfer interface.
11542 (handle_threads_qxfer_proper): Rename to ...
11543 (handle_qxfer_threads_proper): ... this.
11544 (handle_threads_qxfer): Rename to ...
11545 (handle_qxfer_threads): ... this. Adjust.
11546 (qxfer_packets): New array.
11547 (handle_qxfer): New function.
11548 (handle_query): Use handle_qxfer.
11550 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11552 * gdbreplay.c: Shorten lines of >= 80 columns.
11553 * linux-low.c: Ditto.
11554 * linux-ppc-low.c: Ditto.
11555 * linux-s390-low.c: Ditto.
11556 * linux-sparc-low.c: Ditto.
11557 * linux-x86-low.c: Ditto.
11558 * linux-xtensa-low.c: Ditto.
11559 * mem-break.c: Ditto.
11560 * nto-low.c: Ditto.
11561 * regcache.h: Ditto.
11562 * remote-utils.c: Ditto.
11565 * thread-db.c: Ditto.
11566 * tracepoint.c: Ditto.
11568 * win32-low.h: Ditto.
11570 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11572 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11575 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11577 * server.c (gdbserver_version): Update copyright year in version
11579 * gdbreplay.c (gdbreplay_version): Ditto.
11581 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11583 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11584 * linux-bfin-low.c: New file.
11585 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11586 PT_DATA_ADDR for BFIN targets.
11587 * Makefile.in (SFILES): Add linux-bfin-low.c.
11588 (clean): Remove reg-bfin.c.
11589 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11590 * README: Mention supported Blackfin targets.
11592 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11594 * .gitignore: New file.
11596 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11598 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11600 2010-10-22 Jie Zhang <jie@codesourcery.com>
11602 * Makefile.in: Add FLAGS_TO_PASS variable.
11603 (install): Remove dependency of install-only and recursively
11604 invoke make for install-only.
11606 2010-10-04 Doug Evans <dje@google.com>
11608 * Makefile.in (uninstall): Use $(DESTDIR).
11610 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11614 * linux-x86-low.c (compat_siginfo_from_siginfo)
11615 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11616 si_code is < 0. Check for si_code == SI_TIMER before checking for
11619 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11621 * lynx-i386-low.c: New file.
11622 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11624 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11626 * lynx-low.c (ptrace_request_to_str): Remove handling for
11627 request values that have been removed in LynxOS 5.x.
11629 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11631 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11634 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11636 * configure.ac: Add --enable-inprocess-agent option.
11637 * configure: Rebuilt.
11639 2010-09-06 Yao Qi <yao@codesourcery.com>
11641 * linux-low.c (linux_kill): Remove unused variable.
11642 (linux_stabilize_threads): Likewise.
11643 * server.c (start_inferior): Likewise.
11644 (queue_stop_reply_callback): Likewise.
11645 * tracepoint.c (do_action_at_tracepoint): Likewise.
11647 2010-09-06 Yao Qi <yao@codesourcery.com>
11649 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11652 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11654 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11656 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11658 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11661 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11663 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11664 gdbserver/lynx-ppc-low.c: New files.
11665 * Makefile.in (lynx_low_h): New variable.
11666 (lynx-low.o, lynx-ppc-low.o): New rules.
11667 * configure.ac: On LynxOS, link with -lnetinet.
11668 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11669 * configure: regenerate.
11671 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11673 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11674 * configure.ac: Add check for vasprintf and vsnprintf.
11675 * configure, config.in: Regenerate.
11676 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11678 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11680 * gdbreplay.c: Move include of alloca.h up, next to include of
11682 * server.h: Add include of malloc.h.
11683 * mem-break.c: Remove include of malloc.h.
11684 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11686 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11688 * Makefile.in (memmem.o): Build with -Wno-error.
11690 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11692 * utils.c (xsnprintf): Make non-static.
11693 * server.h: Add xsnprintf declaration.
11694 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11695 replace calls to snprintf by calls to xsnprintf throughout.
11697 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11699 * configure.ac: Add configure check for alloca.
11700 * configure, config.in: Regenerate.
11701 * server.h: Include alloca.h if it exists.
11702 * gdbreplay.c: Include alloca.h if it exists.
11704 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11706 * linux-low.c (__SIGRTMIN): Define if not already defined.
11707 (linux_create_inferior): Check for __ANDROID__ rather than
11709 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11710 are already deferred.
11711 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11712 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11713 stopped and already has a pending signal to report.
11714 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11715 a pending signal to report or is moving out of a jump pad.
11716 (linux_init_signals): Check for __ANDROID__ rather than
11719 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11721 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11722 debug_threads check. Avoid a linear search when not doing debug
11725 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11727 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11728 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11729 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11730 (process_event): Change local fd's type to gdb_fildes_t.
11731 (create_file_handler): Adjust prototype.
11732 (delete_file_handler): Adjust prototype.
11733 (handle_file_event): Adjust prototype. Use pfildes.
11734 (create_file_event): Adjsut prototype.
11735 * remote-utils.c (remote_desc, listen_desc): Change type to
11737 * server.h: New gdb_fildes_t typedef.
11738 [USE_WIN32API]: Include winsock2.h.
11739 (delete_file_handler, add_file_handler): Adjust prototypes.
11740 (pfildes): Declare.
11741 * utils.c (pfildes): New.
11743 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11745 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11746 * configure: Regenerate.
11748 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11750 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11751 (linux_done_accessing_memory): ... this.
11752 (linux_target_ops): Adjust.
11753 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11754 * nto-low.c (nto_target_ops): Adjust comment.
11755 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11756 * spu-low.c (spu_target_ops): Adjust comment.
11757 * target.h (target_ops): Rename unprepare_to_access_memory field
11758 to done_accessing_memory.
11759 (unprepare_to_access_memory): Rename to ...
11760 (done_accessing_memory): ... this.
11762 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11764 * linux-low.c (linux_prepare_to_access_memory): New.
11765 (linux_unprepare_to_access_memory): New.
11766 (linux_target_ops): Install them.
11767 * server.c (read_memory): Rename to ...
11768 (gdb_read_memory): ... this. Use
11769 prepare_to_access_memory/prepare_to_access_memory.
11770 (write_memory): Rename to ...
11771 (gdb_write_memory): ... this. Use
11772 prepare_to_access_memory/prepare_to_access_memory.
11773 (handle_search_memory_1): Adjust.
11774 (process_serial_event): Adjust.
11775 * target.h (struct target_ops): New fields
11776 prepare_to_access_memory and unprepare_to_access_memory.
11777 (prepare_to_access_memory, unprepare_to_access_memory): New.
11778 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11779 prepare_to_access_memory/prepare_to_access_memory.
11780 * nto-low.c (nto_target_ops): Adjust.
11781 * spu-low.c (spu_target_ops): Adjust.
11782 * win32-low.c (win32_target_ops): Adjust.
11784 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11786 * Makefile.in (WARN_CFLAGS): Get it from configure.
11787 (WERROR_CFLAGS): New.
11788 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11789 * configure.ac: Introduce --enable-werror, which adds -Werror to
11790 the compiler command line. Enabled by default. Disable with
11791 --disable-werror. Add -Wdeclaration-after-statement
11792 Wpointer-arith and -Wformat-nonliteral to warning flags.
11793 * configure: Regenerate.
11795 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11797 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11799 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11801 * gdbreplay.c (remote_error): New.
11803 (expect): Use gdbchar. Check for error reading from GDB.
11804 Clarify sync error output.
11805 (play): Check for errors writing to GDB.
11806 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11807 * remote-utils.c (getpkt): Check for errors writing to the remote
11810 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11812 * linux-low.c (linux_wait_1): Move non-debugging code out of
11813 `debug_threads' control.
11815 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11817 * linux-low.c (linux_wait_1): Don't set last_status here.
11818 * server.c (push_event, queue_stop_reply_callback): Assert we're
11819 not pushing a TARGET_WAITKIND_IGNORE event.
11820 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11821 (myresume, handle_target_event): Set the thread's last_resume_kind
11822 and last_status from the target returned status.
11824 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11828 * linux-x86-low.c (update_debug_registers_callback): New.
11829 (i386_dr_low_set_addr): Use it.
11830 (i386_dr_low_get_addr): New.
11831 (i386_dr_low_set_control): Use update_debug_registers_callback.
11832 (i386_dr_low_get_control): New.
11833 (i386_dr_low_get_status): Adjust.
11834 * linux-low.c (linux_stop_lwp): New.
11835 * linux-low.h (linux_stop_lwp): Declare.
11837 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11838 argument instead of a i386_debug_reg_state.
11839 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11840 a i386_debug_reg_state.
11841 (i386_insert_aligned_watchpoint): Adjust.
11842 (i386_remove_aligned_watchpoint): Adjust.
11843 (i386_low_stopped_data_address): Read the debug registers from the
11844 inferior instead of from the mirrors.
11845 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11846 (i386_dr_low_get_addr): Declare.
11847 (i386_dr_low_get_control): Declare.
11848 (i386_dr_low_get_status): Change prototype.
11850 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11851 (i386_dr_low_get_addr): New.
11852 (i386_dr_low_get_control): New.
11853 (i386_dr_low_get_status): Adjust prototype. Return
11855 (i386_initial_stuff): Clear dr_status_mirror and
11857 (i386_get_thread_context): Adjust.
11858 (i386_set_thread_context): Adjust.
11859 (i386_thread_added): Adjust.
11861 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11863 * linux-low.h (linux_thread_area): Delete declaration.
11865 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11867 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11868 after its termination.
11870 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11872 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11873 (gdb_wants_all_stopped): Delete.
11874 (linux_wait_1): Don't call them.
11875 * server.c (handle_v_cont): Tag all threads as want-stopped.
11876 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11877 stopped as "client-wants-stopped".
11879 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11881 * Makefile.in (signals_h): New.
11882 (server_h): Depend on it.
11883 (server.o): Don't depend on $(signals_def).
11884 (signals.o): Depend on $(signals_def).
11886 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11888 * Makefile.in (signals_def): New.
11889 (server_h): Append include/gdb/signals.h and signals_def.
11890 (server.o): Append signals_def.
11892 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11894 * server.c (handle_target_event): Use target_signal_to_host for
11895 resume_info.sig initialization.
11896 * target.h (struct thread_resume) <sig>: New comment.
11898 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11900 * server.c (handle_query): strcpy() the returned string from paddress()
11901 instead of sprintf().
11902 * utils.c (paddress): Return phex_nz().
11904 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11906 * server.c (handle_v_cont): Call mourn_inferior if process
11908 (myresume): Likewise.
11910 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11912 Static tracepoints, and integration with UST.
11914 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11915 * mem-break.c (uninsert_all_breakpoints)
11916 (reinsert_all_breakpoints): New.
11917 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11918 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11919 (gdb_agent_ust_loaded, helper_thread_id)
11920 (gdb_agent_helper_thread_id): New macros.
11921 (struct ipa_sym_addresses): Add addr_ust_loaded,
11922 addr_helper_thread_id, addr_cmd_buf.
11923 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11924 (in_process_agent_loaded_ust): New.
11925 (write_e_ust_not_loaded): New.
11926 (maybe_write_ipa_ust_not_loaded): New.
11927 (struct collect_static_trace_data_action): New.
11928 (enum tracepoint_type) <static_tracepoint>: New.
11929 (struct tracepoint) <handle>: Mention static tracepoints.
11930 (struct static_tracepoint_ctx): New.
11931 (CMD_BUF_SIZE): New.
11932 (add_tracepoint_action): Handle static tracepoint actions.
11933 (unprobe_marker_at): New.
11934 (clear_installed_tracepoints): Handle static tracepoints.
11935 (cmd_qtdp): Handle static tracepoints.
11936 (probe_marker_at): New.
11937 (cmd_qtstart): Handle static tracepoints.
11938 (response_tracepoint): Handle static tracepoints.
11939 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11940 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11941 (get_context_regcache): Handle static tracepoints.
11942 (do_action_at_tracepoint): Handle static tracepoint actions.
11943 (traceframe_find_block_type): Handle static trace data blocks.
11944 (traceframe_read_sdata): New.
11945 (download_tracepoints): Download static tracepoint actions.
11946 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11947 (GDB_PROBE_NAME): New.
11949 (GET_UST_SYM): New.
11952 (ust_marker_to_static_tracepoint): New.
11954 (collect_ust_data_at_tracepoint): New.
11955 (gdb_ust_probe): New.
11956 (UNIX_PATH_MAX, SOCK_DIR): New.
11957 (gdb_ust_connect_sync_socket): New.
11958 (resume_thread, stop_thread): New.
11959 (run_inferior_command): New.
11960 (init_named_socket): New.
11961 (gdb_ust_socket_init): New.
11962 (cstr_to_hexstr): New.
11964 (first_marker, next_marker): New.
11965 (response_ust_marker): New.
11966 (cmd_qtfstm, cmd_qtsstm): New.
11967 (unprobe_marker_at, probe_marker_at): New.
11968 (cmd_qtstmat, gdb_ust_thread): New.
11969 (gdb_ust_init): New.
11970 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11971 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11972 (ST_REGENTRY): New.
11973 (x86_64_st_collect_regmap): New.
11974 (X86_64_NUM_ST_COLLECT_GREGS): New.
11975 (AMD64_RIP_REGNUM): New.
11976 (supply_static_tracepoint_registers): New.
11977 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11978 (ST_REGENTRY): New.
11979 (i386_st_collect_regmap): New.
11980 (i386_NUM_ST_COLLECT_GREGS): New.
11981 (supply_static_tracepoint_registers): New.
11982 * server.c (handle_query): Handle qXfer:statictrace:read.
11983 <qSupported>: Report support for StaticTracepoints, and
11984 qXfer:statictrace:read features.
11985 * server.h (traceframe_read_sdata)
11986 (supply_static_tracepoint_registers): Declare.
11987 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11988 (unpack_varlen_hex): Include in IPA build.
11989 * Makefile.in (ustlibs, ustinc): New.
11990 (IPA_OBJS): Add remote-utils-ipa.o.
11991 ($(IPA_LIB)): Link -ldl and -lpthread.
11993 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11994 * config.in, configure: Regenerate.
11996 2010-06-20 Ian Lance Taylor <iant@google.com>
11997 Pedro Alves <pedro@codesourcery.com>
11999 * linux-x86-low.c (always_true): Delete.
12000 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12001 trying to fool the compiler with always_true.
12003 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12005 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12006 conditions in gdbserver.
12008 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12010 * spu-low.c (spu_read_memory): Wrap around local store limit.
12011 (spu_write_memory): Likewise.
12013 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12015 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12016 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12018 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12020 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12021 uses with LONGEST uses.
12023 2010-06-14 Stan Shebs <stan@codesourcery.com>
12024 Pedro Alves <pedro@codesourcery.com>
12028 * linux-x86-low.c: Include limits.h.
12030 (always_true): New.
12033 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12034 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12035 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12036 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12037 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12038 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12039 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12040 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12041 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12042 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12043 (amd64_emit_void_call_2): New.
12044 (amd64_emit_ops): New.
12045 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12046 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12047 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12048 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12049 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12050 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12051 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12052 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12053 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12054 (i386_emit_stack_adjust, i386_emit_int_call_1)
12055 (i386_emit_void_call_2): New.
12056 (i386_emit_ops): New.
12057 (x86_emit_ops): New.
12058 (the_low_target): Install x86_emit_ops.
12059 * server.h (struct emit_ops): New.
12060 (get_raw_reg_func_addr): Declare.
12061 (current_insn_ptr, emit_error): Declare.
12062 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12063 (set_trace_state_variable_value): New defines.
12064 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12065 addr_get_trace_state_variable_value and
12066 addr_set_trace_state_variable_value.
12067 (symbol_list): New fields for get_raw_reg,
12068 get_trace_state_variable_value and set_trace_state_variable_value.
12069 (condfn): New typedef.
12070 (struct tracepoint): New field `compiled_cond'.
12071 (do_action_at_tracepoint): Clear compiled_cond.
12072 (get_trace_state_variable_value, set_trace_state_variable_value):
12074 (condition_true_at_tracepoint): If there's a compiled condition,
12076 (current_insn_ptr, emit_error): New globals.
12077 (struct bytecode_address): New.
12078 (get_raw_reg_func_addr): New.
12079 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12080 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12081 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12082 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12083 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12084 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12085 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12086 (compile_tracepoint_condition, compile_bytecodes): New.
12087 * target.h (emit_ops): Forward declare.
12088 (struct target_ops): New field emit_ops.
12089 (target_emit_ops): New.
12090 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12091 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12092 * linux-low.c (linux_emit_ops): New.
12093 (linux_target_ops): Install it.
12094 * linux-low.h (struct linux_target_ops): New field emit_ops.
12096 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12098 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12099 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12101 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12102 Stan Shebs <stan@codesourcery.com>
12104 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12105 (all): Depend on $(extra_libraries).
12106 (install-only): Install the IPA.
12107 (IPA_OBJS, IPA_LIB): New.
12108 (clean): Remove the IPA lib.
12109 (IPAGENT_CFLAGS): New.
12110 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12111 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12112 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12113 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12114 * configure.ac: Check for atomic builtins support in the compiler.
12115 (IPA_DEPFILES, extra_libraries): Define.
12116 * configure.srv (ipa_obj): Add description.
12117 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12118 (i[34567]86-*-linux*): Set ipa_obj.
12119 (x86_64-*-linux*): Set ipa_obj.
12120 * linux-low.c (stabilizing_threads): New.
12121 (supports_fast_tracepoints): New.
12122 (linux_detach): Stabilize threads before detaching.
12123 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12124 the lwp is either not stabilizing, or is moving out of a jump pad.
12125 (linux_fast_tracepoint_collecting): New.
12126 (maybe_move_out_of_jump_pad): New.
12127 (enqueue_one_deferred_signal): New.
12128 (dequeue_one_deferred_signal): New.
12129 (linux_wait_for_event_1): If moving out of a jump pad, defer
12130 pending signals to later.
12131 (linux_stabilize_threads): New.
12132 (linux_wait_1): Check if threads need moving out of jump pads, and
12134 (stuck_in_jump_pad_callback): New.
12135 (move_out_of_jump_pad_callback): New.
12136 (lwp_running): New.
12137 (linux_resume_one_lwp): Handle moving out of jump pads.
12138 (linux_set_resume_request): Dequeue deferred signals.
12139 (need_step_over_p): Also step over fast tracepoint jumps.
12140 (start_step_over): Also uninsert fast tracepoint jumps.
12141 (finish_step_over): Also reinsert fast tracepoint jumps.
12142 (linux_install_fast_tracepoint_jump): New.
12143 (linux_target_ops): Install linux_stabilize_threads and
12144 linux_install_fast_tracepoint_jump_pad.
12145 * linux-low.h (linux_target_ops) <get_thread_area,
12146 install_fast_tracepoint_jump_pad>: New fields.
12147 (struct lwp_info) <collecting_fast_tracepoint,
12148 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12149 (linux_get_thread_area): Declare.
12150 * linux-x86-low.c (jump_insn): New.
12151 (x86_get_thread_area): New.
12152 (append_insns): New.
12153 (push_opcode): New.
12154 (amd64_install_fast_tracepoint_jump_pad): New.
12155 (i386_install_fast_tracepoint_jump_pad): New.
12156 (x86_install_fast_tracepoint_jump_pad): New.
12157 (the_low_target): Install x86_get_thread_area and
12158 x86_install_fast_tracepoint_jump_pad.
12159 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12160 (struct fast_tracepoint_jump): New.
12161 (fast_tracepoint_jump_insn): New.
12162 (fast_tracepoint_jump_shadow): New.
12163 (find_fast_tracepoint_jump_at): New.
12164 (fast_tracepoint_jump_here): New.
12165 (delete_fast_tracepoint_jump): New.
12166 (set_fast_tracepoint_jump): New.
12167 (uninsert_fast_tracepoint_jumps_at): New.
12168 (reinsert_fast_tracepoint_jumps_at): New.
12169 (set_breakpoint_at): Use write_inferior_memory.
12170 (uninsert_raw_breakpoint): Use write_inferior_memory.
12171 (check_mem_read): Mask out fast tracepoint jumps.
12172 (check_mem_write): Mask out fast tracepoint jumps.
12173 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12174 (set_fast_tracepoint_jump): Declare.
12175 (delete_fast_tracepoint_jump)
12176 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12177 (reinsert_fast_tracepoint_jumps_at): Declare.
12178 * regcache.c: Don't compile many functions when building the
12179 in-process agent library.
12180 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12181 the register buffer in the heap.
12182 (free_register_cache): If the register buffer isn't owned by the
12183 regcache, don't free it.
12184 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12185 pre-existing register caches.
12186 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12188 (convert_ascii_to_int): : Constify `from' parameter type.
12189 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12190 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12191 the needed buffer in-place.
12192 (relocate_instruction): New.
12193 * server.c (handle_query) <qSymbols>: If the target supports
12194 tracepoints, give it a chance of looking up symbols. Report
12195 support for fast tracepoints.
12196 (handle_status): Stabilize threads.
12197 (process_serial_event): Adjust.
12198 * server.h (struct fast_tracepoint_jump): Forward declare.
12199 (struct process_info) <fast_tracepoint_jumps>: New field.
12200 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12201 (decode_X_packet, decode_M_packet): Adjust.
12202 (relocate_instruction): Declare.
12203 (in_process_agent_loaded): Declare.
12204 (tracepoint_look_up_symbols): Declare.
12205 (struct fast_tpoint_collect_status): Declare.
12206 (fast_tracepoint_collecting): Declare.
12207 (force_unlock_trace_buffer): Declare.
12208 (handle_tracepoint_bkpts): Declare.
12209 (initialize_low_tracepoint)
12210 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12211 * target.h (struct target_ops) <stabilize_threads,
12212 install_fast_tracepoint_jump_pad>: New fields.
12213 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12214 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12215 [HAVE_STDINT_H]: Include stdint.h.
12216 (trace_debug_1): Rename to ...
12217 (trace_vdebug): ... this.
12218 (trace_debug): Rename to ...
12219 (trace_debug_1): ... this. Add `level' parameter.
12220 (trace_debug): New.
12221 (ATTR_USED, ATTR_NOINLINE): New.
12222 (IP_AGENT_EXPORT): New.
12223 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12224 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12225 (about_to_request_buffer_space, trace_buffer_is_full)
12226 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12227 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12228 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12229 (traceframe_write_count, traceframes_created)
12230 (trace_state_variables)
12231 New renaming defines.
12232 (struct ipa_sym_addresses): New.
12233 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12234 (symbol_list): New.
12235 (ipa_sym_addrs): New.
12236 (all_tracepoint_symbols_looked_up): New.
12237 (in_process_agent_loaded): New.
12238 (write_e_ipa_not_loaded): New.
12239 (maybe_write_ipa_not_loaded): New.
12240 (tracepoint_look_up_symbols): New.
12241 (debug_threads) [IN_PROCESS_AGENT]: New.
12242 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12243 (UNKNOWN_SIDE_EFFECTS): New.
12244 (stop_tracing): New.
12245 (flush_trace_buffer): New.
12246 (stop_tracing_bkpt): New.
12247 (flush_trace_buffer_bkpt): New.
12248 (read_inferior_integer): New.
12249 (read_inferior_uinteger): New.
12250 (read_inferior_data_pointer): New.
12251 (write_inferior_data_pointer): New.
12252 (write_inferior_integer): New.
12253 (write_inferior_uinteger): New.
12254 (struct collect_static_trace_data_action): Delete.
12255 (enum tracepoint_type): New.
12256 (struct tracepoint) <type>: New field `type'.
12257 <actions_str, step_actions, step_actions_str>: Only include in
12259 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12260 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12261 (tracepoints): Use IP_AGENT_EXPORT.
12262 (last_tracepoint): Don't include in the IPA.
12263 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12264 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12265 (alloced_trace_state_variables): New.
12266 (trace_state_variables): Use IP_AGENT_EXPORT.
12267 (traceframe_t): Delete unused variable.
12268 (circular_trace_buffer): Don't include in the IPA.
12269 (trace_buffer_start): Delete.
12270 (struct trace_buffer_control): New.
12271 (trace_buffer_free): Delete.
12272 (struct ipa_trace_buffer_control): New.
12273 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12274 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12276 (trace_buffer_ctrl): New.
12277 (TRACE_BUFFER_CTRL_CURR): New.
12278 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12279 Reimplement as macros.
12280 (trace_buffer_wrap): Delete.
12281 (traceframe_write_count, traceframe_read_count)
12282 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12283 (struct tracepoint_hit_ctx) <type>: New field.
12284 (struct fast_tracepoint_ctx): New.
12285 (memory_barrier): New.
12287 (record_tracepoint_error): Update atomically in the IPA.
12288 (clear_inferior_trace_buffer): New.
12289 (about_to_request_buffer_space): New.
12290 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12291 updating the same buffer.
12292 (add_tracepoint): Default the tracepoint's type to trap
12293 tracepoint, and orig_size to -1.
12294 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12295 internal variables.
12296 (create_trace_state_variable): New parameter `gdb'. Handle it.
12297 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12298 (cmd_qtdp): Handle fast tracepoints.
12299 (cmd_qtdv): Adjust.
12300 (max_jump_pad_size): New.
12301 (gdb_jump_pad_head): New.
12302 (get_jump_space_head): New.
12303 (claim_jump_space): New.
12304 (sort_tracepoints): New.
12305 (MAX_JUMP_SIZE): New.
12306 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12308 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12309 support. Upload fast traceframes, and delete internal IPA
12311 (stop_tracing_handler): New.
12312 (flush_trace_buffer_handler): New.
12313 (cmd_qtstop): Upload fast tracepoints.
12314 (response_tracepoint): Handle fast tracepoints.
12315 (tracepoint_finished_step): Upload fast traceframes. Set the
12316 tracepoint hit context's tracepoint type.
12317 (handle_tracepoint_bkpts): New.
12318 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12319 type. Add comment about fast tracepoints.
12320 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12321 non-existing action_str field.
12322 (get_context_regcache): Handle fast tracepoints.
12323 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12325 (fast_tracepoint_from_jump_pad_address): New.
12326 (fast_tracepoint_from_ipa_tpoint_address): New.
12327 (collecting_t): New.
12328 (force_unlock_trace_buffer): New.
12329 (fast_tracepoint_collecting): New.
12331 (gdb_collect): New.
12332 (write_inferior_data_ptr): New.
12333 (target_tp_heap): New.
12334 (target_malloc): New.
12335 (download_agent_expr): New.
12337 (download_tracepoints): New.
12338 (download_trace_state_variables): New.
12339 (upload_fast_traceframes): New.
12340 (IPA_FIRST_TRACEFRAME): New.
12341 (IPA_NEXT_TRACEFRAME_1): New.
12342 (IPA_NEXT_TRACEFRAME): New.
12343 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12344 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12345 (gdb_jump_pad_buffer_end): New.
12346 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12347 (initialize_tracepoint): Adjust.
12348 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12349 buffer. Initialize the low module.
12350 * utils.c (PREFIX, TOOLNAME): New.
12351 (malloc_failure): Use PREFIX.
12352 (error): In the IPA, an error causes an exit.
12353 (fatal, warning): Use PREFIX.
12354 (internal_error): Use TOOLNAME.
12355 (NUMCELLS): Increase to 10.
12356 * configure, config.in: Regenerate.
12358 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12360 * server.c (handle_query) <qSupported>: Do two passes over the
12361 qSupported string to avoid nesting strtok.
12363 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12365 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12367 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12368 -Wl,--dynamic-list.
12369 * configure: Regenerate.
12370 * proc-service.list: New.
12372 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12374 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12377 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12379 * gdbreplay.c (remote_open): Check error return from socket() call by
12380 its equality to -1 not by it being negative.
12381 * remote-utils.c (remote_open): Likewise.
12383 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12385 * config.h: Regenerate.
12387 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12389 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12390 doesn't provide PTRACE_GET_THREAD_AREA.
12392 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12394 * linux-m68k-low.c: Include <asm/ptrace.h>
12395 (ps_get_thread_area): Implement.
12397 2010-05-03 Doug Evans <dje@google.com>
12399 * event-loop.c (struct callback_event): New struct.
12400 (callback_list): New global.
12401 (append_callback_event, delete_callback_event): New functions.
12402 (process_callback): New function.
12403 (start_event_loop): Call it.
12404 * remote-utils.c (NOT_SCHEDULED): Define.
12405 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12406 moved out of readchar.
12407 (readchar): Rewrite. Call reschedule before returning.
12408 (reset_readchar): New function.
12409 (remote_close): Call it.
12410 (process_remaining, reschedule): New functions.
12411 * server.h (callback_handler_func): New typedef.
12412 (append_callback_event, delete_callback_event): Declare.
12414 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12416 * proc-service.c (ps_pglobal_lookup): Use
12417 thread_db_look_up_one_symbol.
12418 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12419 parameter. Use it instead of all_symbols_looked_up.
12420 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12422 (all_symbols_looked_up): Don't declare.
12423 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12424 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12426 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12427 Set all_symbols_looked_up here.
12428 (thread_db_look_up_one_symbol): New.
12429 (thread_db_get_tls_address): Adjust.
12430 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12431 thread_db object on the heap, and tentatively set it in the
12433 (thread_db_init): Don't set all_symbols_looked_up here.
12434 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12436 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12438 * linux-low.c (linux_kill, linux_detach): Adjust.
12439 (status_pending_p_callback): Remove redundant statement. Check
12440 for !TARGET_WAITIKIND_IGNORE, instead of
12441 TARGET_WAITKIND_STOPPED.
12442 (handle_tracepoints): Make sure LWP is locked. Adjust.
12443 (linux_wait_for_event_1): Adjust.
12444 (linux_cancel_breakpoints): New.
12445 (unsuspend_one_lwp): New.
12446 (unsuspend_all_lwps): New.
12447 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12448 (send_sigstop_callback): Change return type to int, add new
12449 `except' parameter and handle it.
12450 (suspend_and_send_sigstop_callback): New.
12451 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12452 pass them down. If SUSPEND, also increment the lwp's suspend
12454 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12455 (need_step_over_p): Don't consider suspended LWPs.
12456 (start_step_over): Adjust.
12457 (proceed_one_lwp): Change return type to int, add new `except'
12458 parameter and handle it.
12459 (unsuspend_and_proceed_one_lwp): New.
12460 (proceed_all_lwps): Use find_inferior instead of
12462 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12463 also decrement the suspend count of LWPs. Pass `except' down,
12464 instead of hacking its suspend count.
12465 (linux_pause_all): Add `freeze' parameter. Adjust.
12466 (linux_unpause_all): New.
12467 (linux_target_ops): Install linux_unpause_all.
12468 * server.c (handle_status): Adjust.
12469 * target.h (struct target_ops): New fields `unpause_all' and
12470 `cancel_breakpoints'. Add new parameter to `pause_all'.
12471 (pause_all): Add new `freeze' parameter.
12472 (unpause_all): New.
12473 (cancel_breakpoints): New.
12474 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12475 cancel breakpoints.
12476 (cmd_qtstart): Pause threads.
12477 (stop_tracing): Pause threads, and cancel breakpoints.
12478 * win32-low.c (win32_target_ops): Adjust.
12480 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12482 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12483 the inferior right away from here...
12484 (linux_wait_1): ... to here, and adjust to check the thread's
12485 last_resume_kind instead of the lwp's step or stop_expected flags.
12487 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12489 * README: Use consistent `GDB' and `GDBserver' spellings.
12491 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12493 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12494 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12495 (linux_detach_one_lwp): Assume the lwp is stopped.
12496 (any_thread_of): Delete.
12497 (linux_detach): Stop all lwps here. Don't blindly delete all
12499 (delete_lwp_callback): New.
12500 (linux_mourn): Delete all lwps of the process that is gone.
12501 (linux_wait_1): Don't delete the last lwp of the process here.
12502 * mem-break.h (mark_breakpoints_out): Declare.
12503 * mem-break.c (mark_breakpoints_out): New.
12504 (free_all_breakpoints): Use it.
12505 * server.c (handle_target_event): If the process is gone, mark
12507 * thread-db.c (struct thread_db) <create_bp>: New field.
12508 (thread_db_enable_reporting): Fix prototype. Store a thread event
12509 breakpoint reference in the thread_db struct.
12510 (thread_db_load_search): Clear the thread_db object.
12511 (try_thread_db_load_1): Ditto.
12512 (switch_to_process): New.
12513 (disable_thread_event_reporting): Use it.
12514 (remove_thread_event_breakpoints): New.
12515 (thread_db_detach, thread_db_mourn): Use it.
12517 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12519 * linux-low.c (linux_enable_event_reporting): New.
12520 (linux_wait_for_event_1, handle_extended_wait): Use it.
12522 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12524 * linux-low.c (linux_kill_one_lwp, linux_kill)
12525 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12526 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12527 SIGSTOP even if the LWP is stopped.
12528 (send_sigstop_callback): New.
12529 (stop_all_lwps): Use send_sigstop_callback instead.
12530 (linux_resume_one_thread): Adjust.
12531 (proceed_one_lwp): Still proceed an LWP that the client has
12532 requested to stop, if we haven't reported it as stopped yet. Make
12533 sure that LWPs the client want stopped, have a pending SIGSTOP.
12535 2010-04-26 Doug Evans <dje@google.com>
12537 * server.c (handle_general_set): Make static.
12539 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12540 Print received char after testing for error/eof instead of before.
12541 (input_interrupt): Tweak comment.
12543 2010-04-23 Doug Evans <dje@google.com>
12545 * server.c (start_inferior): Print inferior argv if --debug.
12547 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12549 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12550 * nto-x86-low.c: Include server.h
12552 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12554 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12555 be consistent with other sources of this directory.
12556 (init_registers_amd64): Correct name of source file of this function
12559 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12561 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12562 64-bit executables.
12564 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12566 * win32-i386-low.c: Add 64-bit support.
12567 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12568 (init_registers_amd64): Declare.
12569 (mappings): Add 64-bit version of array.
12570 (init_windows_x86): New function.
12571 (the_low_target): Change init_arch field to init_windows_x86.
12573 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12575 * win32-low.c: Adapt to support also 64-bit architecture.
12576 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12577 (get_image_name): Use SIZE_T type for local variable `done'.
12578 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12579 (toolhelp_get_dll_name): Idem.
12580 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12581 Use uintptr_t typecast to avoid warning.
12582 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12583 (handle_exception): Use phex_nz to avoid warning.
12584 (win32_wait): Remove unused local variable `process'.
12586 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12588 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12591 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12593 * configure.ac: Use `ws2_32' library for srv_mingw.
12594 * configure: Regenerate.
12595 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12596 * remote-utils.c: Likewise.
12598 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12600 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12601 if __x86_64__ is defined.
12603 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12605 * configure: Regenerate.
12607 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12609 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12610 * target.h (target_ops): New get_tib_address field.
12611 * win32-low.h (win32_thread_info): Add thread_local_base field.
12612 * win32-low.c (child_add_thread): Add tlb argument.
12613 Set thread_local_base field to TLB.
12614 (get_child_debug_event): Adapt to child_add_thread change.
12615 (win32_get_tib_address): New function.
12616 (win32_target_ops): Set get_tib_address field to
12617 win32_get_tib_address.
12618 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12620 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12622 * linux-low.c (linux_mourn): Also remove the process.
12623 * server.c (handle_target_event): Don't remove the process here.
12624 * nto-low.c (nto_mourn): New.
12625 (nto_target_ops): Install it.
12626 * spu-low.c (spu_mourn): New.
12627 (spu_target_ops): Install it.
12628 * win32-low.c (win32_mourn): New.
12629 (win32_target_ops): Install it.
12631 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12633 * server.h (buffer_xml_printf): Remove redundant `;'.
12635 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12637 * regcache.c (set_register_cache): Invalidate regcaches before
12638 changing the register cache layout.
12639 (regcache_invalidate_one): Allow a NULL regcache.
12640 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12641 regcaches before changing the register cache layout or the target
12644 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12646 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12647 variable warning on Linux/x86-64.
12649 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12651 GDBserver disconnected tracing support.
12653 * linux-low.c (linux_remove_process): Delete.
12654 (add_lwp): Don't set last_resume_kind here.
12655 (linux_kill): Use `mourn'.
12656 (linux_detach): Use `thread_db_detach', and `mourn'.
12657 (linux_mourn): New.
12658 (linux_attach_lwp_1): Adjust comment.
12659 (linux_attach): last_resume_kind moved the thread_info; adjust.
12660 (status_pending_p_callback): Adjust.
12661 (linux_wait_for_event_1): Adjust.
12662 (count_events_callback, select_singlestep_lwp_callback)
12663 (select_event_lwp_callback, cancel_breakpoints_callback)
12664 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12665 (proceed_one_lwp): Adjust.
12666 (linux_async): Add debug output.
12667 (linux_thread_stopped): New.
12668 (linux_pause_all): New.
12669 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12671 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12672 (thread_db_free): Delete declaration.
12673 (thread_db_detach, thread_db_mourn): Declare.
12674 * thread-db.c (thread_db_init): Use thread_db_mourn.
12675 (thread_db_free): Delete, split in two.
12676 (disable_thread_event_reporting): New.
12677 (thread_db_detach): New.
12678 (thread_db_mourn): New.
12680 * server.h (struct thread_info) <last_resume_kind>: New field.
12681 <attached>: Add comment.
12682 <gdb_detached>: New field.
12683 (handler_func): Change return type to int.
12684 (handle_serial_event, handle_target_event): Ditto.
12685 (gdb_connected): Declare.
12687 (disconnected_tracing): Declare.
12688 (stop_tracing): Declare.
12690 * server.c (handle_query) <qSupported>: Report support for
12691 disconnected tracing.
12692 (queue_stop_reply_callback): Account for running threads.
12693 (gdb_wants_thread_stopped): New.
12694 (gdb_wants_all_threads_stopped): New.
12695 (gdb_reattached_process): New.
12696 (handle_status): Clear the `gdb_detached' flag of all processes.
12697 In all-stop, stop all threads.
12698 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12699 (process_serial_event): If the remote connection breaks, or if an
12700 exit was forced with "monitor exit", force an event loop exit.
12701 Handle disconnected tracing on detach.
12702 (handle_serial_event): Adjust.
12703 (handle_target_event): If GDB isn't connected, forward events back
12704 to the inferior, unless the last process exited, in which case,
12705 exit gdbserver. Adjust interface.
12707 * remote-utils.c (remote_open): Don't block in accept. Instead
12708 register an event loop source on the listen socket file
12709 descriptor. Refactor bits into ...
12710 (listen_desc): ... this new global.
12711 (gdb_connected): ... this new function.
12712 (enable_async_notification): ... this new function.
12713 (handle_accept_event): ... this new function.
12714 (remote_close): Clear remote_desc.
12716 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12718 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12720 (mourn_inferior): Define.
12721 (target_process_qsupported): Avoid the dangling else problem.
12722 (thread_stopped): Define.
12723 (pause_all): Define.
12724 (target_waitstatus_to_string): Declare.
12725 * target.c (target_waitstatus_to_string): New.
12727 * tracepoint.c (tracing): Make extern.
12728 (disconnected_tracing): New.
12729 (stop_tracing): Make extern. Handle tracing stops due to GDB
12731 (cmd_qtdisconnected): New.
12732 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12733 (handle_tracepoint_general_set): Handle QTDisconnected.
12735 * event-loop.c (event_handler_func): Change return type to int.
12736 (process_event): Bail out if the event handler wants the event
12738 (handle_file_event): Ditto.
12739 (start_event_loop): Bail out if the event handler wants the event
12742 * nto-low.c (nto_target_ops): Adjust.
12743 * spu-low.c (spu_wait): Don't remove the process here.
12744 (spu_target_ops): Adjust.
12745 * win32-low.c (win32_wait): Don't remove the process here.
12746 (win32_target_ops): Adjust.
12748 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12750 * regcache.c (realloc_register_cache): Invalidate inferior's
12751 regcache before recreating it.
12753 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12755 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12757 2010-04-09 Stan Shebs <stan@codesourcery.com>
12758 Pedro Alves <pedro@codesourcery.com>
12760 * server.h (LONGEST): New.
12761 (struct thread_info) <while_stepping>: New field.
12762 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12764 (initialize_tracepoint, handle_tracepoint_general_set)
12765 (handle_tracepoint_query, tracepoint_finished_step)
12766 (tracepoint_was_hit, release_while_stepping_state_list):
12767 (current_traceframe): Declare.
12768 * server.c (handle_general_set): Handle tracepoint packets.
12769 (read_memory): New.
12770 (write_memory): New.
12771 (handle_search_memory_1): Use read_memory.
12772 (handle_query): Report support for conditional tracepoints, trace
12773 state variables, and tracepoint sources. Handle tracepoint
12775 (main): Initialize the tracepoints module.
12776 (process_serial_event): Handle traceframe reads/writes.
12778 * linux-low.c (handle_tracepoints): New.
12779 (linux_wait_1): Call it.
12780 (linux_resume_one_lwp): Handle while-stepping.
12781 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12782 (linux_target_ops): Install them.
12783 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12785 * linux-x86-low.c (x86_supports_tracepoints): New.
12786 (the_low_target). Install it.
12788 * mem-break.h (delete_breakpoint): Declare.
12789 * mem-break.c (delete_breakpoint): Make external.
12791 * target.h (struct target_ops): Add `supports_tracepoints',
12792 `read_pc', and `write_pc' fields.
12793 (target_supports_tracepoints): Define.
12794 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12797 * regcache.h (struct regcache) <registers_owned>: New field.
12798 (init_register_cache, regcache_cpy): Declare.
12799 (regcache_read_pc, regcache_write_pc): Declare.
12800 (register_cache_size): Declare.
12801 (supply_regblock): Declare.
12802 * regcache.c (init_register_cache): New.
12803 (new_register_cache): Use it.
12804 (regcache_cpy): New.
12805 (register_cache_size): New.
12806 (supply_regblock): New.
12807 (regcache_read_pc, regcache_write_pc): New.
12809 * tracepoint.c: New.
12811 * Makefile.in (OBS): Add tracepoint.o.
12812 (tracepoint.o): New rule.
12814 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12816 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12818 (i386-mmx.c): Likewise.
12819 (i386-mmx-linux.o): Likewise.
12820 (i386-mmx-linux.c): Likewise.
12822 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12823 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12824 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12825 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12827 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12828 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12829 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12831 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12833 * Makefile.in (clean): Updated.
12835 (i386-avx.c): Likewise.
12836 (i386-avx-linux.o): Likewise.
12837 (i386-avx-linux.c): Likewise.
12838 (amd64-avx.o): Likewise.
12839 (amd64-avx.c): Likewise.
12840 (amd64-avx-linux.o): Likewise.
12841 (amd64-avx-linux.c): Likewise.
12843 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12844 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12845 (srv_amd64_regobj): Add amd64-avx.o.
12846 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12847 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12848 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12849 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12850 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12851 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12852 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12854 * i387-fp.c: Include "i386-xstate.h".
12856 (i387_cache_to_xsave): Likewise.
12857 (i387_xsave_to_cache): Likewise.
12858 (x86_xcr0): Likewise.
12860 * i387-fp.h (i387_cache_to_xsave): Likewise.
12861 (i387_xsave_to_cache): Likewise.
12862 (x86_xcr0): Likewise.
12864 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12865 * linux-crisv32-low.c (target_regsets): Likewise.
12866 * linux-m68k-low.c (target_regsets): Likewise.
12867 * linux-mips-low.c (target_regsets): Likewise.
12868 * linux-ppc-low.c (target_regsets): Likewise.
12869 * linux-s390-low.c (target_regsets): Likewise.
12870 * linux-sh-low.c (target_regsets): Likewise.
12871 * linux-sparc-low.c (target_regsets): Likewise.
12872 * linux-xtensa-low.c (target_regsets): Likewise.
12874 * linux-low.c: Include <sys/uio.h>.
12875 (regsets_fetch_inferior_registers): Support nt_type.
12876 (regsets_store_inferior_registers): Likewise.
12877 (linux_process_qsupported): New.
12878 (linux_target_ops): Add linux_process_qsupported.
12880 * linux-low.h (regset_info): Add nt_type.
12881 (linux_target_ops): Add process_qsupported.
12883 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12885 (init_registers_i386_avx_linux): New.
12886 (init_registers_amd64_avx_linux): Likewise.
12887 (xmltarget_i386_linux_no_xml): Likewise.
12888 (xmltarget_amd64_linux_no_xml): Likewise.
12889 (PTRACE_GETREGSET): Likewise.
12890 (PTRACE_SETREGSET): Likewise.
12891 (x86_fill_xstateregset): Likewise.
12892 (x86_store_xstateregset): Likewise.
12893 (use_xml): Likewise.
12894 (x86_linux_update_xmltarget): Likewise.
12895 (x86_linux_process_qsupported): Likewise.
12896 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12897 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12898 init_registers_i386_linux here. Call
12899 x86_linux_update_xmltarget.
12900 (the_low_target): Add x86_linux_process_qsupported.
12902 * server.c (handle_query): Call target_process_qsupported.
12904 * target.h (target_ops): Add process_qsupported.
12905 (target_process_qsupported): New.
12907 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12909 * inferiors.c (add_thread): Set last_status kind to
12910 TARGET_WAITKIND_IGNORE.
12911 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12912 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12913 (linux_wait_1): Move `thread' local definition to block that uses
12914 it. Don't NULL initialize `event_child'.
12915 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12916 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12917 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12919 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12921 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12922 an extended waitstatus, or by a watchpoint.
12923 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12924 thread was stepping or has been stopped by a watchpoint.
12926 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12928 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12929 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12930 of another, then delete the previous, and validate all
12932 (validate_inserted_breakpoint): New.
12933 (delete_disabled_breakpoints): New.
12934 (validate_breakpoints): New.
12935 (check_mem_read): Validate breakpoints before trusting their
12936 shadow. Delete disabled breakpoints.
12937 (check_mem_write): Validate breakpoints before trusting they
12938 should be inserted. Delete disabled breakpoints.
12939 * mem-break.h (validate_breakpoints):
12940 * server.c (handle_query): Validate breakpoints when we see a
12943 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12945 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12946 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12947 if we could tell there's a GDB breakpoint at stop_pc.
12948 (need_step_over_p): Don't do a step over if we find a GDB
12949 breakpoint at the resume PC.
12951 * mem-break.c (struct raw_breakpoint): New.
12952 (enum bkpt_type): New type `gdb_breakpoint'.
12953 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12954 fields. New field `raw'.
12955 (find_raw_breakpoint_at): New.
12956 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12957 breakpoint instead.
12958 (set_breakpoint_at): Adjust.
12959 (delete_raw_breakpoint): New.
12960 (release_breakpoint): New.
12961 (delete_breakpoint): Rename to...
12962 (delete_breakpoint_1): ... this. Add proc parameter. Use
12963 release_breakpoint. Return ENOENT.
12964 (delete_breakpoint): Reimplement.
12965 (find_breakpoint_at): Delete.
12966 (find_gdb_breakpoint_at): New.
12967 (delete_breakpoint_at): Delete.
12968 (set_gdb_breakpoint_at): New.
12969 (delete_gdb_breakpoint_at): New.
12970 (gdb_breakpoint_here): New.
12971 (set_reinsert_breakpoint): Use release_breakpoint.
12972 (uninsert_breakpoint): Rename to ...
12973 (uninsert_raw_breakpoint): ... this.
12974 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12975 (reinsert_raw_breakpoint): Change parameter type to
12977 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12979 (check_breakpoints): Adjust. Use release_breakpoint.
12980 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12981 (breakpoint_inserted_here): Ditto.
12982 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12983 Don't trust the breakpoint's shadow if it is not inserted.
12984 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12985 (delete_all_breakpoints): Adjust.
12986 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12987 use delete_breakpoint_1.
12989 * mem-break.h (breakpoints_supported): Delete declaration.
12990 (set_gdb_breakpoint_at): Declare.
12991 (gdb_breakpoint_here): Declare.
12992 (delete_breakpoint_at): Delete.
12993 (delete_gdb_breakpoint_at): Declare.
12995 * server.h (struct raw_breakpoint): Forward declare.
12996 (struct process_info): New field `raw_breakpoints'.
12998 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13001 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13003 * linux-low.c (status_pending_p_callback): Fix comment.
13004 (linux_wait_for_event_1): Move most of the internal breakpoint
13005 handling from here...
13006 (linux_wait_1): ... to here.
13007 (count_events_callback): New.
13008 (select_singlestep_lwp_callback): New.
13009 (select_event_lwp_callback): New.
13010 (cancel_breakpoints_callback): New.
13011 (select_event_lwp): New.
13012 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13013 priority to all LWPs that have had events that should be reported
13014 to the client. Cancel breakpoints when about to reporting the
13015 event to the client, not while stopping lwps. No longer cancel
13016 finished single-steps here.
13017 (cancel_finished_single_step): Delete.
13018 (cancel_finished_single_steps): Delete.
13020 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13022 * mem-break.c (enum bkpt_type): New.
13023 (struct breakpoint): New field `type'.
13024 (set_breakpoint_at): Change return type to struct breakpoint
13025 pointer. Set type to `other_breakpoint' by default.
13026 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13027 in the breakpoint list.
13028 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13029 (reinsert_breakpoint): Rename to ...
13030 (reinsert_raw_breakpoint): ... this.
13031 (reinsert_breakpoints_at): Adjust.
13032 * mem-break.h (struct breakpoint): Declare.
13033 (set_breakpoint_at): Change return type to struct breakpoint
13036 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13038 * server.c (handle_query): Assign, not compare.
13040 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13042 Teach linux gdbserver to step-over-breakpoints.
13044 * linux-low.c (can_hardware_single_step): New.
13045 (supports_breakpoints): New.
13046 (handle_extended_wait): If stopping threads, read the stop pc of
13047 the new cloned LWP.
13049 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13050 low target doesn't support retrieving the PC.
13051 (add_lwp): Set last_resume_kind to resume_continue.
13052 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13053 (linux_attach): Don't clear stop_expected. Set the lwp's
13054 last_resume_kind to resume_stop.
13055 (linux_detach_one_lwp): Don't check for removed breakpoints.
13056 (check_removed_breakpoint): Delete.
13057 (status_pending_p): Rename to ...
13058 (status_pending_p_callback): ... this. Don't check for removed
13059 breakpoints. Don't consider threads that are stopped from GDB's
13061 (linux_wait_for_lwp): Always read the stop_pc here.
13062 (cancel_breakpoint): New.
13063 (step_over_bkpt): New global.
13064 (linux_wait_for_event_1): Implement stepping over breakpoints.
13065 (gdb_wants_lwp_stopped): New.
13066 (gdb_wants_all_stopped): New.
13067 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13068 single-step traps here. Store the thread's last reported target
13070 (send_sigstop): Don't clear stop_expected. Always set it,
13072 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13073 (cancel_finished_single_step): New.
13074 (cancel_finished_single_steps): New.
13075 (wait_for_sigstop): Don't cancel finished single-step traps here.
13076 (linux_resume_one_lwp): Don't check for removed breakpoints.
13077 Don't set `step' on non-hardware step archs.
13078 (linux_set_resume_request): Ignore resume_stop requests if already
13079 stopping or stopped. Set the lwp's last_resume_kind.
13080 (resume_status_pending_p): Don't check for removed breakpoints.
13081 (need_step_over_p): New.
13082 (start_step_over): New.
13083 (finish_step_over): New.
13084 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13085 requests. Clear the thread's last reported target waitstatus.
13086 Don't use the `suspended' flag. Don't consider pending breakpoints.
13087 (linux_resume): Start a step-over if necessary.
13088 (proceed_one_lwp): New.
13089 (proceed_all_lwps): New.
13090 (unstop_all_lwps): New.
13091 * linux-low.h (struct lwp_info): Rewrite comment for the
13092 `suspended' flag. Add the `stop_pc' field. Delete the
13093 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13094 Add `'last_resume_kind' and `need_step_over' fields.
13095 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13096 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13097 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13098 (set_raw_breakpoint_at): New.
13099 (set_breakpoint_at): Rewrite to use it.
13100 (reinsert_breakpoint_handler): Delete.
13101 (set_reinsert_breakpoint): New.
13102 (reinsert_breakpoint_by_bp): Delete.
13103 (delete_reinsert_breakpoints): New.
13104 (uninsert_breakpoint): Rewrite.
13105 (uninsert_breakpoints_at): New.
13106 (reinsert_breakpoint): Rewrite.
13107 (reinsert_breakpoints_at): New.
13108 (check_breakpoints): Rewrite.
13109 (breakpoint_here): New.
13110 (breakpoint_inserted_here): New.
13111 (check_mem_read): Adjust.
13112 * mem-break.h (breakpoints_supported, breakpoint_here)
13113 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13114 (reinsert_breakpoint_by_bp): Delete declaration.
13115 (delete_reinsert_breakpoints): Declare.
13116 (reinsert_breakpoint): Delete declaration.
13117 (reinsert_breakpoints_at): Declare.
13118 (uninsert_breakpoint): Delete declaration.
13119 (uninsert_breakpoints_at): Declare.
13120 (check_breakpoints): Adjust prototype.
13121 * server.h: Adjust include order.
13122 (struct thread_info): Declare here. Add a `last_status' field.
13124 2010-03-23 Michael Snyder <msnyder@vmware.com>
13126 * server.c (crc32): New function.
13127 (handle_query): Add handling for 'qCRC:' request.
13129 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13131 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13132 lwp had been stopped by a watchpoint.
13134 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13136 * server.h (internal_error): Declare.
13137 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13138 * utils.c (internal_error): New function.
13140 2010-03-15 Andreas Schwab <schwab@redhat.com>
13142 * configure.srv: Fix typo setting srv_regobj.
13144 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13146 * linux-low.c (fetch_register): Avoid passing a non string literal
13148 (usr_store_inferior_registers): Ditto.
13150 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13152 * linux-low.c (linux_write_memory): Bail out early if peeking
13155 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13157 * linux-low.h (struct lwp_info): New fields
13158 `stopped_by_watchpoint' and `stopped_data_address'.
13159 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13160 here, and cache them in the lwp object.
13161 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13163 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13165 (linux_stopped_by_watchpoint): Rewrite.
13166 (linux_stopped_data_address): Rewrite.
13168 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13170 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13171 switching the current inferior, not before.
13173 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13175 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13176 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13177 i386-linux.c and amd64-linux.c.
13178 (reg-i386.o): Removed.
13179 (reg-i386.c): Likewise.
13180 (reg-i386-linux.o): Likewise.
13181 (reg-i386-linux.c): Likewise.
13182 (reg-x86-64.o): Likewise.
13183 (reg-x86-64.c): Likewise.
13184 (reg-x86-64-linux.o): Likewise.
13185 (reg-x86-64-linux.c): Likewise.
13187 (i386.c): Likewise.
13188 (i386-linux.o): Likewise.
13189 (i386-linux.c): Likewise.
13190 (amd64.o): Likewise.
13191 (amd64.c): Likewise.
13192 (amd64-linux.o): Likewise.
13193 (amd64-linux.c): Likewise.
13195 * configure.srv (srv_i386_regobj): New.
13196 (srv_i386_linux_regobj): Likewise.
13197 (srv_amd64_regobj): Likewise.
13198 (srv_amd64_linux_regobj): Likewise.
13199 (srv_i386_32bit_xmlfiles): Likewise.
13200 (srv_i386_64bit_xmlfiles): Likewise.
13201 (srv_i386_xmlfiles): Likewise.
13202 (srv_amd64_xmlfiles): Likewise.
13203 (srv_i386_linux_xmlfiles): Likewise.
13204 (srv_amd64_linux_xmlfiles): Likewise.
13205 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13206 srv_xmlfiles to $srv_i386_xmlfiles.
13207 (i[34567]86-*-mingw32ce*): Likewise.
13208 (i[34567]86-*-mingw*): Likewise.
13209 (i[34567]86-*-nto*): Likewise.
13210 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13211 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13212 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13213 (x86_64-*-linux*): Likewise.
13215 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13216 (init_registers_amd64_linux): New.
13217 (x86_arch_setup): Replace init_registers_x86_64_linux with
13218 init_registers_amd64_linux.
13220 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13222 * configure.ac: Check for libdl. If it is not available link against
13223 static libthread_db.
13224 * configure: Regenerate.
13226 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13230 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13231 handing a read watchpoint.
13232 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13234 2010-02-12 Doug Evans <dje@google.com>
13236 * linux-low.c (linux_supports_tracefork_flag): Document.
13237 (linux_look_up_symbols): Add comment.
13239 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13241 * regcache.c (supply_register): Clear regcache if buf is NULL.
13243 2010-02-02 Nicolas Roche <roche@sourceware.org>
13244 Joel Brobecker <brobecker@adacore.com>
13246 * inferiors.c (find_inferior): Add function documentation.
13247 (unloaded_dll): Handle the case where the unloaded dll has not
13248 been previously registered in the dll list.
13250 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13252 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13253 (thumb2_breakpoint): New.
13254 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13256 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13258 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13259 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13262 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13264 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13266 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13268 * linux-s390-low.c (s390_collect_ptrace_register)
13269 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13271 2010-01-21 Doug Evans <dje@google.com>
13273 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13274 (PTRACE_ARG4_TYPE): New macro.
13275 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13276 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13277 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13278 (usr_store_inferior_registers): Ditto.
13279 (linux_read_memory, linux_write_memory): Ditto.
13280 (linux_test_for_tracefork): Ditto.
13282 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13283 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13285 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13287 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13290 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13292 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13293 prototype to take a regcache. Adjust.
13295 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13297 * regcache.h (struct thread_info): Forward declare.
13298 (struct regcache): New.
13299 (new_register_cache): Adjust prototype.
13300 (get_thread_regcache): Declare.
13301 (free_register_cache): Adjust prototype.
13302 (registers_to_string, registers_from_string): Ditto.
13303 (supply_register, supply_register_by_name, collect_register)
13304 (collect_register_as_string, collect_register_by_name): Ditto.
13305 * regcache.c (struct inferior_regcache_data): Delete.
13306 (get_regcache): Rename to ...
13307 (get_thread_regcache): ... this. Adjust. Switch inferior before
13308 fetching registers.
13309 (regcache_invalidate_one): Adjust.
13310 (regcache_invalidate): Fix prototype.
13311 (new_register_cache): Return the new register cache.
13312 (free_register_cache): Change prototype.
13313 (realloc_register_cache): Adjust.
13314 (registers_to_string): Change prototype to take a regcache. Adjust.
13315 (registers_from_string): Ditto.
13316 (register_data): Ditto.
13317 (supply_register): Ditto.
13318 (supply_register_by_name): Ditto.
13319 (collect_register): Ditto.
13320 (collect_register_as_string): Ditto.
13321 (collect_register_by_name): Ditto.
13322 * server.c (process_serial_event): Adjust.
13323 * linux-low.h (regset_fill_func, regset_store_func): Change
13325 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13327 * linux-low.c (get_stop_pc): Adjust.
13328 (check_removed_breakpoint): Adjust.
13329 (linux_wait_for_event): Adjust.
13330 (linux_resume_one_lwp): Adjust.
13331 (fetch_register): Add regcache parameter. Adjust.
13332 (usr_store_inferior_registers): Ditto.
13333 (regsets_fetch_inferior_registers): Ditto.
13334 (regsets_store_inferior_registers): Ditto.
13335 (linux_fetch_registers, linux_store_registers): Ditto.
13336 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13338 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13340 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13341 prototype to take a regcache.
13342 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13343 * remote-utils.c (convert_ascii_to_int, outreg)
13344 (prepare_resume_reply): Change prototype to take a regcache.
13346 * target.h (struct target_ops) <fetch_registers, store_registers>:
13347 Change prototype to take a regcache.
13348 (fetch_inferior_registers, store_inferior_registers): Change
13349 prototype to take a regcache. Adjust.
13350 * proc-service.c (ps_lgetregs): Adjust.
13351 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13352 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13353 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13354 take a regcache. Adjust.
13355 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13356 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13357 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13358 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13359 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13360 (cris_cannot_fetch_register):
13361 (cris_breakpoint_at): Change prototype to take a regcache.
13363 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13364 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13365 to take a regcache. Adjust.
13366 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13368 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13369 take a regcache. Adjust.
13370 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13371 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13372 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13373 * linux-mips-low.c (mips_get_pc):
13374 (mips_set_pc): Change prototype to take a regcache. Adjust.
13375 (mips_reinsert_addr): Adjust.
13376 (mips_collect_register): Change prototype to take a regcache.
13378 (mips_supply_register):
13379 (mips_collect_register_32bit, mips_supply_register_32bit)
13380 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13381 (mips_store_fpregset): Ditto.
13382 * linux-ppc-low.c (ppc_supply_ptrace_register)
13383 (ppc_supply_ptrace_register): Ditto.
13384 (parse_spufs_run): Adjust.
13385 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13386 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13387 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13388 take a regcache. Adjust.
13389 * linux-s390-low.c (s390_collect_ptrace_register)
13390 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13391 (s390_set_pc): Change prototype to take a regcache. Adjust.
13392 (s390_arch_setup): Adjust.
13393 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13394 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13395 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13396 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13397 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13399 (sparc_breakpoint_at): Adjust.
13400 * linux-xtensa-low.c (xtensa_fill_gregset):
13401 (xtensa_store_gregset):
13402 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13403 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13404 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13405 prototype to take a regcache. Adjust.
13406 * win32-arm-low.c (arm_fetch_inferior_register)
13407 (arm_store_inferior_register): Change prototype to take a
13409 * win32-i386-low.c (i386_fetch_inferior_register)
13410 (i386_store_inferior_register): Change prototype to take a
13412 * win32-low.c (child_fetch_inferior_registers)
13413 (child_store_inferior_registers): Change prototype to take a
13415 (win32_wait): Adjust.
13416 (win32_fetch_inferior_registers): Change prototype to take a
13418 (win32_store_inferior_registers): Adjust.
13419 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13420 store_inferior_register>: Change prototype to take a regcache.
13422 2010-01-20 Doug Evans <dje@google.com>
13424 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13426 (linux_wait_for_event1, linux_init_signals): Ditto.
13427 (W_STOPCODE): Provide definition if missing.
13429 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13431 * linux-low.c (linux_core_of_thread): New.
13432 (compare_ints, show_process, list_threads): New.
13433 (linux_qxfer_osdata): Report threads and cores.
13434 (linux_target_op): Register linux_core_of_thread.
13435 * remote-utils.c (prepare_resume_reply): Report the core.
13436 (buffer_xml_printf): Support %d specifier.
13437 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13439 (handle_query): Handle qXfer:threads. Announce availability
13441 * target.h (struct target_ops): New field core_of_thread.
13443 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13445 * Makefile.in (clean): Remove new generated files.
13446 (reg-s390.o, reg-s390.c): Remove rules.
13447 (reg-s390x.o, reg-s390x.c): Likewise.
13448 (s390-linux32.o, s390-linux32.c): Add rules.
13449 (s390-linux64.o, s390-linux64.c): Likewise.
13450 (s390x-linux64.o, s390x-linux64.c): Likewise.
13451 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13452 * linux-s390-low.c: Include <elf.h>.
13453 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13454 (init_registers_s390): Remove prototype.
13455 (init_registers_s390x): Likewise.
13456 (init_registers_s390_linux32): Add prototype.
13457 (init_registers_s390_linux64): Likewise.
13458 (init_registers_s390x_linux64): Likewise.
13459 (s390_num_regs_3264): New define.
13460 (s390_regmap_3264): New global variable.
13461 (s390_cannot_fetch_register): Remove obsolete check.
13462 (s390_cannot_store_register): Likewise.
13463 (s390_collect_ptrace_register): Handle upper/lower register halves.
13464 (s390_supply_ptrace_register): Likewise.
13465 (s390_fill_gregset): Update to register number changes.
13466 (s390_get_hwcap): New routine.
13467 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13468 Install appropriate regmap and register set.
13470 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13472 * server.c (gdbserver_version): Update copyright year to 2010.
13473 * gdbreplay.c (gdbreplay_version): Likewise.
13475 2009-12-28 Doug Evans <dje@google.com>
13477 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13478 elf/external.h. Include <elf.h> instead but only if necessary.
13480 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13482 * linux-low.c (linux_remove_process): Remove `detaching'
13483 parameter. Don't release/detach from thread_db here.
13484 (linux_kill): Release/detach from thread_db here, ...
13485 (linux_detach): ... and here, before actually detaching.
13486 (linux_wait_1): ... and here, when a process exits.
13487 * thread-db.c (any_thread_of): New.
13488 (thread_db_free): Switch the current inferior to a thread of the
13491 2009-12-21 Doug Evans <dje@google.com>
13493 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13495 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13496 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13497 warning ifndef __NR_tkill. Move setting of errno there too.
13498 Delete unnecessary resetting of errno after syscall.
13499 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13501 * configure.ac: Check for dladdr.
13502 * config.in: Regenerate.
13503 * configure: Regenerate.
13504 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13505 (try_thread_db_load): Update.
13507 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13509 2009-12-18 Doug Evans <dje@google.com>
13511 * event-loop.c: Include unistd.h if it exists.
13513 * linux-low.c (my_waitpid): Move definition away from being in
13514 between linux_tracefork_child/linux_test_for_tracefork.
13516 * gdb_proc_service.h (psaddr_t): Fix type.
13517 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13518 signature to match glibc.
13520 2009-12-16 Doug Evans <dje@google.com>
13522 * linux-low.c (linux_read_memory): Fix argument to read.
13524 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13526 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13527 events, don't leave current_inferior pointing at null.
13529 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13531 * win32-low.c (LOG): Delete.
13532 (OUTMSG): Output to stderr.
13533 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13534 on compile time LOG macro.
13535 (win32_wait): Fix debug output.
13537 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13539 * win32-low.c (win32_add_one_solib): If the dll name is
13540 "ntdll.dll", prepend the system directory to the dll path.
13542 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13544 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13546 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13547 Vladimir Prus <vladimir@codesourcery.com>
13549 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13550 * configure.ac: Check for __mcoldfire__ and set
13551 gdb_cv_m68k_is_coldfire.
13552 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13553 reg-cf.o and reg-m68k.o.
13554 * configure: Regenerated.
13556 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13558 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13559 Pass it to thread_db_free.
13560 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13561 proper `detaching' argument to linux_remove_process.
13562 * linux-low.h (thread_db_free): Add `detaching' parameter.
13563 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13565 (thread_db_free): Add `detaching' parameter. Only
13566 call td_ta_clear_event if detaching from process.
13568 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13570 * thread-db.c (thread_db_free): Fix typo.
13572 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13575 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13577 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13579 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13580 with an i686 compiler.
13581 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13583 * configure: Rebuilt.
13585 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13589 * server.c (handle_search_memory_1): Correct read_addr initialization
13590 in loop for searching subsequent chunks.
13592 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13594 * configure.ac: New --with-libthread-db option.
13595 * thread-db.c: Allow direct dependence on libthread_db.
13596 (thread_db_free): Adjust.
13597 * config.in: Regenerate.
13598 * configure: Likewise.
13600 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13603 * thread-db.c (attach_thread): New function.
13604 (maybe_attach_thread): Return success/failure.
13605 (find_new_threads_callback): Adjust.
13606 (thread_db_find_new_threads): Loop until no new threads.
13608 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13610 * proc-service.c (ps_lgetregs): Formatting.
13612 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13614 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13615 * configure.ac: Adjust.
13616 * linux-low.h (struct process_info_private): Move members to struct
13618 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13619 * linux-low.c (linux_remove_process): Adjust.
13620 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13621 * server.c (handle_query): Move code ...
13622 (handle_monitor_command): ... here. New function.
13623 * target.h (struct target_ops): New member.
13624 * thread-db.c (struct thread_db): New.
13625 (libthread_db_search_path): New variable.
13626 (thread_db_create_event, thread_db_enable_reporting)
13627 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13628 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13629 (try_thread_db_load_1, dladdr_to_soname): New functions.
13630 (try_thread_db_load, thread_db_load_search): New functions.
13631 (thread_db_init): Search for libthread_db.
13632 (thread_db_free): New function.
13633 (thread_db_handle_monitor_command): Likewise.
13634 * config.in: Regenerate.
13635 * configure: Regenerate.
13637 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13639 * spu-low.c (spu_kill): Wait for inferior to terminate.
13640 Call clear_inferiors.
13641 (spu_detach): Call clear_inferiors.
13643 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13645 * aclocal.m4: Regenerate.
13646 * config.in: Likewise.
13647 * configure: Likewise.
13649 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13651 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13652 (parse_spufs_run): New function.
13653 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13654 (ppc_breakpoint_at): Handle SPU breakpoints.
13656 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13658 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13659 (SPUFS_MAGIC): Define.
13660 (spu_enumerate_spu_ids): New function.
13661 (linux_qxfer_spu): New function.
13662 (linux_target_ops): Install linux_qxfer_spu.
13664 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13666 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13667 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13668 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13669 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13670 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13671 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13672 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13673 (init_registers_powerpc_cell32l): Add prototype.
13674 (init_registers_powerpc_cell64l): Likewise.
13675 (ppc_arch_setup): Detect Cell/B.E. architecture.
13677 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13679 * Makefile.in (datarootdir): New variable.
13681 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13683 * linux-low.c (linux_write_memory): Update debugging output.
13684 * Makefile.in (clean): Add new descriptions.
13685 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13686 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13687 * configure.srv: Add new files for arm*-*-linux*.
13688 * linux-arm-low.c: Add new declarations.
13689 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13690 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13691 (HWCAP_VFPv3D16): New.
13692 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13693 instead of __IWMMXT__.
13694 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13695 (arm_arch_setup): New.
13696 (target_regsets): Remove #ifdef. Add VFP regset.
13697 (the_low_target): Use arm_arch_setup.
13699 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13701 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13702 the main thread again.
13704 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13706 Adding Neutrino gdbserver.
13707 * configure: Regenerated.
13708 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13709 * configure.srv (i[34567]86-*-nto*): New target.
13710 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13711 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13712 (nto_comctrl) [__QNX__]: New function.
13713 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13715 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13717 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13720 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13721 Pedro Alves <pedro@codesourcery.com>
13723 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13724 don't support CONTEXT_EXTENDED_REGISTERS.
13725 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13726 (the_low_target): Install them.
13727 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13728 failing with ERROR_PIPE_NOT_CONNECTED.
13730 2009-06-30 Doug Evans <dje@google.com>
13731 Pierre Muller <muller@ics.u-strasbg.fr>
13733 Add h/w watchpoint support to x86-linux, win32-i386.
13734 * Makefile.in (SFILES): Add i386-low.c
13735 (i386_low_h): Define.
13736 (i386-low.o): Add dependencies.
13737 (linux-x86-low.o): Add i386-low.h dependency.
13738 (win32-i386-low.o): Ditto.
13739 * i386-low.c: New file.
13740 * i386-low.h: New file.
13741 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13742 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13743 * linux-low.c (linux_add_process): Initialize arch_private.
13744 (linux_remove_process): Free arch_private.
13745 (add_lwp): Initialize arch_private.
13746 (delete_lwp): Free arch_private.
13747 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13749 * linux-low.h (process_info_private): New member arch_private.
13750 (lwp_info): New member arch_private.
13751 (linux_target_ops): New members new_process, new_thread,
13753 (ptid_of): New macro.
13754 * linux-x86-low.c: Include stddef.h, i386-low.h.
13755 (arch_process_info): New struct.
13756 (arch_lwp_info): New struct.
13757 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13758 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13759 (i386_dr_low_get_status): New function.
13760 (x86_insert_point, x86_remove_point): New functions.
13761 (x86_stopped_by_watchpoint): New function.
13762 (x86_stopped_data_address): New function.
13763 (x86_linux_new_process, x86_linux_new_thread): New functions.
13764 (x86_linux_prepare_to_resume): New function.
13765 (the_low_target): Add entries for insert_point, remove_point,
13766 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13768 * server.c (debug_hw_points): New global.
13769 (monitor_show_help): Document set debug-hw-points.
13770 (handle_query): Process "set debug-hw-points".
13771 * server.h (debug_hw_points): Declare.
13772 (paddress): Declare.
13773 * utils.c (NUMCELLS, CELLSIZE): New macros.
13774 (get_sell, xsnprintf, paddress): New functions.
13775 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13776 remove_point, stopped_by_watchpoint, stopped_data_address.
13777 * win32-i386-low.c: Include i386-low.h.
13778 (debug_reg_state): Replaces dr.
13779 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13780 (i386_dr_low_get_status): New function.
13781 (i386_insert_point, i386_remove_point): New functions.
13782 (i386_stopped_by_watchpoint): New function.
13783 (i386_stopped_data_address): New function.
13784 (i386_initial_stuff): Update.
13785 (get_thread_context,set_thread_context,i386_thread_added): Update.
13786 (the_low_target): Add entries for insert_point,
13787 remove_point, stopped_by_watchpoint, stopped_data_address.
13788 * win32-low.c (win32_insert_watchpoint): New function.
13789 (win32_remove_watchpoint): New function.
13790 (win32_stopped_by_watchpoint): New function.
13791 (win32_stopped_data_address): New function.
13792 (win32_target_ops): Add entries for insert_watchpoint,
13793 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13794 * win32-low.h (win32_target_ops): New members insert_point,
13795 remove_point, stopped_by_watchpoint, stopped_data_address.
13797 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13799 * server.c (process_serial_event): Re-return unsupported, not
13800 error, if the type isn't recognized. Re-allow supporting only
13801 insert or remove packets. Also call require_running for
13802 breakpoints. Add missing break statement to default case. Tidy.
13803 * target.h (struct target_ops): Rename insert_watchpoint to
13804 insert_point, and remove_watchpoint to remove_point.
13806 * linux-low.h (struct linux_target_ops): Likewise.
13807 * linux-low.c (linux_insert_watchpoint): Rename to ...
13808 (linux_insert_point): ... this. Adjust.
13809 (linux_remove_watchpoint): Rename to ...
13810 (linux_remove_point): ... this. Adjust.
13811 (linux_target_ops): Adjust.
13812 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13813 (cris_insert_point): ... this.
13814 (cris_remove_watchpoint): Rename to ...
13815 (cris_remove_point): ... this.
13816 (the_low_target): Adjust.
13818 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13820 * server.c (handle_v_kill): Pass signal_pid to
13821 kill_inferior if multi_process is zero.
13823 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13825 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13826 * target.h (target_ops): Comment for *_watchpoint to make it clear
13827 the functions can get types '0' and '1'.
13829 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13831 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13832 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13833 * regcache.c (get_regcache): Likewise.
13834 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13835 * win32-low.c (child_fetch_inferior_registers): Remove check for
13838 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13839 Pedro Alves <pedro@codesourcery.com>
13841 * target.h (struct target_ops) <supports_multi_process>: New
13843 (target_supports_multi_process): New.
13844 * server.c (handle_query): Even if GDB reports support, only
13845 enable multi-process if the target also supports it. Report
13846 multi-process support only if the target backend supports it.
13847 * linux-low.c (linux_supports_multi_process): New function.
13848 (linux_target_ops): Install it as target_supports_multi_process
13851 2009-05-24 Doug Evans <dje@google.com>
13853 Global renaming of find_thread_pid to find_thread_ptid.
13854 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13855 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13856 All callers updated.
13858 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13859 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13862 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13863 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13864 (linux_resume_one_lwp): Ditto.
13866 2009-05-23 Doug Evans <dje@google.com>
13868 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13869 from struct inferior_list_entry * to struct lwp_info *.
13870 All callers updated.
13872 2009-05-13 Doug Evans <dje@google.com>
13874 * linux-x86-low.c: Don't include assert.h.
13875 (x86_siginfo_fixup): Use fatal, not assert.
13876 (x86_arch_setup): Fix comment.
13878 2009-05-12 Doug Evans <dje@google.com>
13880 Biarch support for i386/amd64 gdbserver.
13881 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13882 Add linux-x86-low.c.
13883 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13884 (linux-x86-low.o): Add.
13885 * linux-x86-64-low.c: Delete.
13886 * linux-i386-low.c: Delete.
13887 * linux-x86-low.c: New file.
13888 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13890 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13892 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13893 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13894 (linux_child_pid_to_exec_file): New function.
13895 (elf_64_header_p, elf_64_file_p): New functions.
13896 (siginfo_fixup): New function.
13897 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13898 give target a chance to convert layout.
13899 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13900 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13902 2009-05-07 Doug Evans <dje@google.com>
13904 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13905 (regsets_store_inferior_registers): Ditto.
13907 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13911 * linux-low.c (must_set_ptrace_flags): Delete.
13912 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13914 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13915 `lwp->must_set_ptrace_flags' instead.
13916 (linux_wait_for_event_1): Set ptrace options here.
13917 (linux_wait_1): ... not here.
13919 2009-04-30 Doug Evans <dje@google.com>
13921 * inferiors.c (started_inferior_callback): New function.
13922 (attached_inferior_callback): New function.
13923 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13924 * server.c (print_started_pid, print_attached_pid): New functions.
13925 (detach_or_kill_for_exit): New function.
13926 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13927 * server.h (have_started_inferiors_p): Declare.
13928 (have_attached_inferiors_p): Declare.
13930 * inferiors.c (remove_process): Fix memory leak, free process.
13931 * linux-low.c (linux_remove_process): New function.
13932 (linux_kill): Call it instead of remove_process.
13933 (linux_detach, linux_wait_1): Ditto.
13935 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13937 * configure.srv: Add x86 Windows CE target.
13939 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13941 * inferiors.c (get_thread_process): Make global.
13942 * server.h (get_thread_process): Add prototype.
13943 * thread-db.c (find_one_thread): Use get_thread_process
13944 instead of current_process.
13945 (thread_db_get_tls_address): Do not crash if called when
13946 thread layer is not yet initialized.
13948 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13950 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13951 * spu-low.c (current_tid): Rename to ...
13952 (current_ptid): ... this.
13953 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13954 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13955 ptid_get_lwp (current_ptid) instead of current_tid.
13956 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13957 instead of current_tid. Use find_process_pid to verify pid
13958 argument is valid. Pass proper argument to remove_process.
13959 (spu_thread_alive): Compare current_ptid instead of current_tid.
13960 (spu_resume): Likewise.
13962 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13964 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13967 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13969 Implement the multiprocess extensions, and add linux multiprocess
13972 * server.h (ULONGEST): Declare.
13973 (struct ptid, ptid_t): New.
13974 (minus_one_ptid, null_ptid): Declare.
13975 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13976 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13977 (struct inferior_list_entry): Change `id' type from unsigned from
13979 (struct sym_cache, struct breakpoint, struct
13980 process_info_private): Forward declare.
13981 (struct process_info): Declare.
13982 (current_process): Declare.
13983 (all_processes): Declare.
13984 (initialize_inferiors): Declare.
13985 (add_thread): Adjust to use ptid_t.
13986 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13987 (add_process, remove_process, find_thread_pid): Declare.
13988 (find_inferior_id): Adjust to use ptid_t.
13989 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13990 (multi_process): Declare.
13991 (push_event): Adjust to use ptid_t.
13992 (read_ptid, write_ptid): Declare.
13993 (prepare_resume_reply): Adjust to use ptid_t.
13994 (clear_symbol_cache): Declare.
13995 * inferiors.c (all_processes): New.
13996 (null_ptid, minus_one_ptid): New.
13997 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13998 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13999 (add_thread): Change unsigned long to ptid. Remove gdb_id
14001 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14002 (gdb_id_to_thread): Rename to ...
14003 (find_thread_pid): ... this. Change unsigned long to ptid.
14004 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14005 (loaded_dll, pull_pid_from_list): Adjust.
14006 (add_process, remove_process, find_process_pid)
14007 (get_thread_process, current_process, initialize_inferiors): New.
14008 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14009 (struct target_waitstatus) <related_pid>: Ditto.
14010 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14011 return type to int.
14012 (struct target_ops) <join>: Add `pid' argument.
14013 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14014 (struct target_ops) <wait>: Add `ptid' field. Change return type
14016 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14017 (mywait): Add `ptid' argument. Change return type to ptid_t.
14018 (target_pid_to_str): Declare.
14019 * target.c (set_desired_inferior): Adjust to use ptids.
14020 (mywait): Add new `ptid' argument. Adjust.
14021 (target_pid_to_str): New.
14022 * mem-break.h (free_all_breakpoints): Declare.
14023 * mem-break.c (breakpoints): Delelete.
14024 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14025 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14026 to use per-process breakpoint list.
14027 (free_all_breakpoints): New.
14028 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14029 (symbol_cache, all_symbols_looked_up): Delete.
14031 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14033 (prepare_resume_reply): Change ptid argument's type from unsigned
14034 long to ptid_t. Adjust. Implement W;process and X;process.
14035 (free_sym_cache, clear_symbol_cache): New.
14036 (look_up_one_symbol): Adjust to per-process symbol cache. *
14037 * server.c (cont_thread, general_thread, step_thread): Change type
14039 (attached): Delete.
14040 (multi_process): New.
14041 (last_ptid): Change type to ptid_t.
14042 (struct vstop_notif) <ptid>: Change type to ptid_t.
14043 (queue_stop_reply, push_event): Change `ptid' argument's type to
14045 (discard_queued_stop_replies): Add `pid' argument.
14046 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14047 changes. Don't reference the `attached' global.
14048 (attach_inferior): Adjust to mywait interface changes.
14049 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14050 features. Handle and report "multiprocess+". Handle
14052 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14054 (handle_v_kill): New.
14055 (handle_v_stopped): Adjust to use target_pid_to_str.
14056 (handle_v_requests): Allow multiple attaches and runs when
14057 multiprocess extensions are in effect. Handle "vKill".
14058 (myresume): Adjust to use ptids.
14059 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14060 (handle_status): Adjust to discard_queued_stop_replies interface
14062 (first_thread_of, kill_inferior_callback)
14063 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14064 (main): Call initialize_inferiors. Adjust to use ptids, killing
14065 and detaching from all inferiors. Handle multiprocess packet
14067 * linux-low.h: Include gdb_proc_service.h.
14068 (struct process_info_private): New.
14069 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14070 <lwpid_of>: Use ptid_get_lwp.
14071 (get_lwp_thread): Adjust.
14072 (struct lwp_info): Add `dead' member.
14073 (find_lwp_pid): Declare.
14074 * linux-low.c (thread_db_active): Delete.
14075 (new_inferior): Adjust comment.
14076 (inferior_pid): Delete.
14077 (linux_add_process): New.
14078 (handle_extended_wait): Adjust.
14079 (add_lwp): Change unsigned long to ptid.
14080 (linux_create_inferior): Add process to processes table. Adjust
14081 to use ptids. Don't set new_inferior here.
14082 (linux_attach_lwp): Rename to ...
14083 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14084 it. Adjust to use ptids.
14085 (linux_attach_lwp): New.
14086 (linux_attach): Add process to processes table. Don't set
14088 (struct counter): New.
14089 (second_thread_of_pid_p, last_thread_of_process_p): New.
14090 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14091 multiple processes.
14092 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14093 processes. Remove process from process table.
14094 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14095 to multiple processes.
14096 (any_thread_of): New.
14097 (linux_detach): Add `pid' argument, and handle it. Remove process
14098 from processes table.
14099 (linux_join): Add `pid' argument. Handle it.
14100 (linux_thread_alive): Change unsighed long argument to ptid_t.
14101 Consider dead lwps as not being alive.
14102 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14103 threads we're not interested in.
14104 (same_lwp, find_lwp_pid): New.
14105 (linux_wait_for_lwp): Change `pid' argument's type from int to
14107 (linux_wait_for_event): Rename to ...
14108 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14109 from int to ptid_t. Adjust.
14110 (linux_wait_for_event): New.
14111 (linux_wait_1): Add `ptid' argument. Change return type to
14112 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14113 that exit from the process table.
14114 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14116 (mark_lwp_dead): New.
14117 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14118 stopping all threads, mark its main lwp as dead.
14119 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14121 (fetch_register, usr_store_inferior_registers)
14122 (regsets_fetch_inferior_registers)
14123 (regsets_store_inferior_registers, linux_read_memory)
14124 (linux_write_memory): Inline `inferior_pid'.
14125 (linux_look_up_symbols): Adjust to use per-process
14126 `thread_db_active'.
14127 (linux_request_interrupt): Adjust to use ptids.
14128 (linux_read_auxv): Inline `inferior_pid'.
14129 (initialize_low): Don't reference thread_db_active.
14130 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14131 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14132 (ps_getpid): Return the pid of the current inferior.
14133 * thread-db.c (proc_handle, thread_agent): Delete.
14134 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14136 (find_one_thread): Change argument type to ptid_t. Adjust to
14138 (maybe_attach_thread): Adjust to per-process data and ptids.
14139 (thread_db_find_new_threads): Ditto.
14140 (thread_db_init): Ditto.
14141 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14142 processes table. Adjust to use ptids.
14143 (spu_kill, spu_detach): Adjust interface. Remove process from
14145 (spu_join, spu_thread_alive): Adjust interface.
14146 (spu_wait): Adjust interface. Remove process from processes
14147 table. Adjust to use ptids.
14148 * win32-low.c (current_inferior_tid): Delete.
14149 (current_inferior_ptid): New.
14150 (debug_event_ptid): New.
14151 (thread_rec): Take a ptid. Adjust.
14152 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14153 (child_delete_thread): Ditto.
14154 (do_initial_child_stuff): Add `attached' argument. Add process to
14156 (child_fetch_inferior_registers, child_store_inferior_registers):
14158 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14159 (win32_attach): Pass 1 to do_initial_child_stuff.
14160 (win32_kill): Adjust interface. Remove process from processes
14162 (win32_detach): Ditto.
14163 (win32_join): Adjust interface.
14164 (win32_thread_alive): Take a ptid.
14165 (win32_resume): Adjust to use ptids.
14166 (get_child_debug_event): Ditto.
14167 (win32_wait): Adjust interface. Remove exiting process from
14170 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14172 Non-stop mode support.
14174 * server.h (non_stop): Declare.
14175 (gdb_client_data, handler_func): Declare.
14176 (delete_file_handler, add_file_handler, start_event_loop):
14178 (handle_serial_event, handle_target_event, push_event)
14179 (putpkt_notif): Declare.
14180 * target.h (enum resume_kind): New.
14181 (struct thread_resume): Replace `step' field by `kind' field.
14182 (TARGET_WNOHANG): Define.
14183 (struct target_ops) <wait>: Add `options' argument.
14184 <supports_non_stop, async, start_non_stop>: New fields.
14185 (target_supports_non_stop, target_async): New.
14186 (start_non_stop): Declare.
14187 (mywait): Add `options' argument.
14188 * target.c (mywait): Add `options' argument. Print child exit
14189 notifications here.
14190 (start_non_stop): New.
14191 * server.c (non_stop, own_buf, mem_buf): New globals.
14192 (struct vstop_notif): New.
14193 (notif_queue): New global.
14194 (queue_stop_reply, push_event, discard_queued_stop_replies)
14195 (send_next_stop_reply): New.
14196 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14198 (attach_inferior): In non-stop mode, don't wait for the target
14200 (handle_general_set): Handle QNonStop.
14201 (handle_query): When handling qC, return the current general
14202 thread, instead of the first thread of the list.
14203 (handle_query): If the backend supports non-stop mode, include
14204 QNonStop+ in the qSupported query response.
14205 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14207 (handle_v_attach, handle_v_run): Handle non-stop mode.
14208 (handle_v_stopped): New.
14209 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14210 (myresume): Adjust to use resume_kind. Handle non-stop.
14211 (queue_stop_reply_callback): New.
14212 (handle_status): Handle non-stop mode.
14213 (main): Clear non_stop flag on reconnection. Use the event-loop.
14214 Refactor serial protocol handling from here ...
14215 (process_serial_event): ... to this new function. When GDB
14216 selects any thread, select one here. In non-stop mode, wait until
14217 GDB acks all pending events before exiting.
14218 (handle_serial_event, handle_target_event): New.
14219 * remote-utils.c (remote_open): Install remote_desc in the event
14221 (remote_close): Remove remote_desc from the event loop.
14222 (putpkt_binary): Rename to...
14223 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14224 (putpkt_binary): New as wrapper around putpkt_binary_1.
14225 (putpkt_notif): New.
14226 (prepare_resume_reply): In non-stop mode, don't change the
14228 * event-loop.c: New.
14229 * Makefile.in (OBJ): Add event-loop.o.
14230 (event-loop.o): New rule.
14232 * linux-low.h (pid_of): Moved here.
14234 (get_lwp_thread): Use lwpid_of.
14235 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14236 * linux-low.c (pid_of): Delete.
14237 (inferior_pid): Use lwpid_of.
14238 (linux_event_pipe): New.
14239 (target_is_async_p): New.
14241 (handle_extended_wait): Use lwpid_of.
14242 (add_lwp): Don't set lwpid field.
14243 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14244 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14245 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14246 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14247 first. Adjust to linux_wait_for_event interface changes. Use
14249 (linux_detach): Don't delete the main lwp here.
14250 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14251 (status_pending_p): Don't consider explicitly suspended lwps.
14252 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14253 pointer. Add OPTIONS argument. Change return type to int. Use
14254 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14255 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14256 pointer. Add status pointer argument. Return a pid instead of a
14257 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14258 changes. In non-stop mode, don't switch to a random thread.
14259 (linux_wait): Rename to...
14260 (linux_wait_1): ... this. Add target_options argument, and handle
14261 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14262 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14263 clean exit and signal exit code. Don't stop all threads in
14264 non-stop mode. In all-stop mode, only stop all threads when
14265 reporting a stop to GDB. Handle explicit thread stop requests.
14266 (async_file_flush, async_file_mark): New.
14268 (send_sigstop): Use lwpid_of.
14269 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14270 interface changes. In non-stop mode, don't switch to a random
14272 (linux_resume_one_lwp): Use lwpid_of.
14273 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14274 (linux_resume_one_thread): ... this. Handle resume_stop. In
14275 non-stop mode, don't look for pending flag in all threads.
14276 (resume_status_pending_p): Don't consider explicitly suspended
14278 (my_waitpid): Reimplement. Emulate __WALL.
14279 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14281 (sigchld_handler, linux_supports_non_stop, linux_async)
14282 (linux_start_non_stop): New.
14283 (linux_target_ops): Register linux_supports_non_stop, linux_async
14284 and linux_start_non_stop.
14285 (initialize_low): Install SIGCHLD handler.
14286 * thread-db.c (thread_db_create_event, find_one_thread)
14287 (thread_db_get_tls_address): Use lwpid_of.
14288 * win32-low.c (win32_detach): Adjust to use resume_kind.
14289 (win32_wait): Add `options' argument.
14290 * spu-low.c (spu_resume): Adjust to use resume_kind.
14291 (spu_wait): Add `options' argument.
14293 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14295 Decouple target code from remote protocol.
14297 * target.h (enum target_waitkind): New.
14298 (struct target_waitstatus): New.
14299 (struct target_ops) <wait>: Return an unsigned long. Take a
14300 target_waitstatus pointer instead of a char pointer.
14301 (mywait): Likewise.
14302 * target.c (mywait): Change prototype to return an unsigned long.
14303 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14304 * server.h (thread_from_wait, old_thread_from_wait): Delete
14306 (prepare_resume_reply): Change prototype to take a
14308 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14309 (last_status, last_ptid): New.
14310 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14311 pid instead of a signal.
14312 (attach_inferior): Remove "status" and "signal" parameters.
14314 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14316 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14317 (handle_v_requests, myresume): Remove "status" and "signal"
14318 parameters. Adjust.
14319 (handle_status): New.
14320 (main): Delete local `status'. Adjust.
14321 * remote-utils.c: Include target.h.
14322 (prepare_resume_reply): Change prototype to take a
14323 target_waitstatus. Adjust.
14325 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14327 * spu-low.c (spu_wait): Adjust.
14328 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14330 (win32_wait): Adjust.
14332 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14334 * target.h (struct thread_resume): Delete leave_stopped member.
14335 (struct target_ops): Add a `n' argument to the `resume' callback.
14336 * server.c (start_inferior): Adjust.
14337 (handle_v_cont, myresume): Adjust.
14338 * linux-low.c (check_removed_breakpoint): Adjust to resume
14339 interface change, and to removed leave_stopped field.
14340 (resume_ptr): Delete.
14341 (struct thread_resume_array): New.
14342 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14343 resume interface change.
14344 (linux_continue_one_thread, linux_queue_one_thread)
14345 (resume_status_pending_p): Check if the resume field is NULL
14346 instead of checking the leave_stopped member.
14347 (linux_resume): Adjust to the target resume interface change.
14348 * spu-low.c (spu_resume): Adjust to the target resume interface
14350 * win32-low.c (win32_detach, win32_resume): Ditto.
14352 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14354 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14356 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14358 (linux_continue_one_thread): Only preserve the stepping flag if
14359 there's a pending breakpoint.
14361 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14363 * server.c (main): After the inferior having exited, call
14364 remote_close before exiting gdbserver.
14366 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14368 Fix size of FPSCR in Power 7 processors.
14369 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14370 (PPC_FEATURE_HAS_DFP): New #define.
14371 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14374 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14376 * server.c (handle_query) Whitespace and formatting.
14378 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14380 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14381 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14382 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14383 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14384 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14385 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14386 Makefile.in, configure.ac: Fix whitespace throughout.
14387 * configure: Regenerate.
14389 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14391 * inferiors.c (find_inferior): Make it safe for the callback
14392 function to delete the currently iterated inferior.
14394 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14396 * Makefile.in (linuw_low_h): Move higher.
14397 (thread-db.o): Depend on $(linux_low_h).
14399 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14401 Rename "process" to "lwp" throughout.
14403 * linux-low.c (all_processes): Rename to...
14404 (all_lwps): ... this.
14405 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14406 (add_process): Rename to ...
14407 (add_lwp): ... this. Adjust.
14408 (linux_create_inferior): Adjust.
14409 (linux_attach_lwp): Adjust.
14410 (linux_attach): Adjust.
14411 (linux_kill_one_process): Rename to ...
14412 (linux_kill_one_lwp): ... this. Adjust.
14413 (linux_kill): Adjust.
14414 (linux_detach_one_process): Rename to ...
14415 (linux_detach_one_lwp): ... this. Adjust.
14416 (linux_detach): Adjust.
14417 (check_removed_breakpoint): Adjust.
14418 (status_pending_p): Adjust.
14419 (linux_wait_for_process): Rename to ...
14420 (linux_wait_for_lwp): ... this. Adjust.
14421 (linux_wait_for_event): Adjust.
14422 (send_sigstop): Adjust.
14423 (wait_for_sigstop): Adjust.
14424 (stop_all_processes): Rename to ...
14425 (stop_all_lwps): ... this.
14426 (linux_resume_one_process): Rename to ...
14427 (linux_resume_one_lwp): ... this. Adjust.
14428 (linux_set_resume_request, linux_continue_one_thread)
14429 (linux_queue_one_thread, resume_status_pending_p)
14430 (usr_store_inferior_registers, regsets_store_inferior_registers)
14431 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14433 * linux-low.h (get_process): Rename to ...
14434 (get_lwp): ... this. Adjust.
14435 (get_thread_process): Rename to ...
14436 (get_thread_lwp): ... this. Adjust.
14437 (get_process_thread): Rename to ...
14438 (get_lwp_thread): ... this. Adjust.
14439 (struct process_info): Rename to ...
14440 (struct lwp_info): ... this.
14441 (all_processes): Rename to ...
14442 (all_lwps): ... this.
14443 * proc-service.c (ps_lgetregs): Adjust.
14444 * thread-db.c (thread_db_create_event, find_one_thread)
14445 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14447 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14449 * server.c (handle_query): Handle "qAttached".
14451 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14453 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14454 GPLv3, update license URL.
14456 2009-03-01 Doug Evans <dje@google.com>
14458 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14459 (server_h): Add gdb_signals.h.
14460 (signals.o): Update.
14461 * server.h (target_signal_from_host,target_signal_to_host_p)
14462 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14464 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14466 * remote-utils.c (getpkt): Also generate remote-debug
14467 information if noack_mode is set.
14469 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14471 * server.c (handle_query): Report qXfer:siginfo:read and
14472 qXfer:siginfo:write as supported and handle them.
14473 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14474 * linux-low.c (linux_xfer_siginfo): New.
14475 (linux_target_ops): Set it.
14477 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14479 * server.c (gdbserver_usage): Mention --remote-debug.
14480 (main): Accept '--remote-debug' switch.
14482 2009-01-18 Doug Evans <dje@google.com>
14484 * regcache.c (new_register_cache): No need to check result of xcalloc.
14485 * server.c (handle_search_memory): Back out calls to xmalloc,
14486 result is checked and error is returned to user upon failure.
14487 (handle_query): Ditto. Add more checks for result of malloc.
14488 (handle_v_cont): Check result of malloc, report error back to
14490 (handle_v_run): Ditto. Call freeargv.
14491 * server.h (freeargv): Declare.
14492 * utils.c (freeargv): New fn.
14494 2009-01-15 Doug Evans <dje@google.com>
14496 * gdbreplay.c (perror_with_name): Make arg const char *.
14497 * server.h (target_signal_to_name): Make return type const char *.
14498 * thread-db.c (thread_db_err_str): Make return type const char *.
14499 * utils.c (perror_with_name): Make arg const char *.
14501 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14503 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14504 when handling a EXIT_PROCESS_DEBUG_EVENT.
14506 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14508 * gdbreplay.c (gdbreplay_version): Update copyright year.
14509 * server.c (gdbserver_version): Likewise.
14511 2009-01-05 Doug Evans <dje@google.com>
14513 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14514 (handle_extended_wait): Improve comment.
14516 2008-12-13 Doug Evans <dje@google.com>
14518 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14519 * server.h (ATTR_MALLOC): New macro.
14520 (xmalloc,xcalloc,xstrdup): Declare.
14521 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14522 * inferiors.c: Ditto.
14523 * linux-low.c: Ditto.
14524 * mem-break.c: Ditto.
14525 * regcache.c: Ditto.
14526 * remote-utils.c: Ditto.
14529 * win32-low.c: Ditto.
14531 2008-12-12 Doug Evans <dje@google.com>
14533 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14534 in debugging printf.
14536 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14538 2008-12-09 Doug Evans <dje@google.com>
14540 * linux-low.h (struct process_info): Delete member tid, unused.
14541 * thread-db.c (find_one_thread): Update.
14542 (maybe_attach_thread): Update.
14544 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14546 * target.h (struct target_ops): Add qxfer_osdata member.
14547 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14549 (linux_qxfer_osdata): New functions.
14550 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14552 * server.c (handle_query): Handle "qXfer:osdata:read:".
14553 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14554 (buffer_xml_printf): New functions.
14555 * server.h (struct buffer): New.
14556 (buffer_grow_str, buffer_grow_str0): New macros.
14557 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14558 (buffer_xml_printf): Declare.
14560 2008-11-24 Doug Evans <dje@google.com>
14562 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14564 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14566 * server.c (handle_v_run): Always use the supplied argument list.
14568 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14570 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14571 (xtensa_regmap_table): Add entry for scompare1.
14573 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14575 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14576 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14577 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14578 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14579 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14580 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14581 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14582 XML target descriptions.
14583 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14584 when inferior is running on an ISA 2.05 or later processor. Add
14585 special case to return offset for full 64-bit slot of FPSCR when
14588 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14590 * Makefile.in (SFILES, clean): Added sparc64 files.
14591 (reg-sparc64.o, reg-sparc64.c): New.
14592 * configure.srv (sparc*-*-linux*): New configuration.
14593 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14594 syscall arguments for SPARC.
14595 (regsets_store_inferior_registers): Likewise.
14596 * linux-sparc-low.c: New file.
14598 2008-10-21 Doug Evans <dje@google.com>
14600 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14601 (READLINE_DIR,READLINE_DEP): Delete.
14602 (INTERNAL_CFLAGS): Update.
14603 (LINTFLAGS): Update.
14605 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14607 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14608 whole argv from the last run, not just argv[0].
14610 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14612 * regcache.c (new_register_cache): Return NULL if the register
14613 cache size isn't known yet.
14614 (free_register_cache): Avoid dereferencing a NULL regcache.
14616 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14618 * configure.srv: Merge MIPS and MIPS64.
14620 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14622 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14624 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14626 * Makefile.in: Add required vsx dependencies.
14628 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14629 Declare init_registers_powerpc_vsx32l.
14630 Declare init_registers_powerpc_vsx64l.
14631 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14632 (ppc_arch_setup): Check for VSX in hwcap.
14633 (ppc_fill_vsxregset): New function.
14634 (ppc_store_vsxregset): New function.
14635 Add new VSX entry in regset_info target_regsets.
14637 * configure.srv: Add new VSX dependencies.
14639 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14641 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14642 (remote_open): Set or clear transport_is_reliable.
14643 (putpkt_binary): Don't expect acks in noack mode.
14644 (getpkt): Don't send ack/nac in noack mode.
14645 * server.c (handle_general_set): Handle QStartNoAckMode.
14646 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14648 (main): Reset noack_mode on every connection.
14649 * server.h (noack_mode): Declare.
14651 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14653 * Makefile.in (GDBREPLAY_OBS): New variable.
14654 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14656 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14657 Daniel Jacobowitz <dan@codesourcery.com>
14659 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14660 (usr_store_inferior_registers): Likewise.
14661 (regsets_store_inferior_registers): Likewise.
14663 2008-07-31 Rolf Jansen <rj@surtec.com>
14664 Pedro Alves <pedro@codesourcery.com>
14666 * configure.ac: Check for memmem declaration.
14667 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14668 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14669 (disable_packet_qfThreadInfo): Unconditionally compile.
14670 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14671 * configure, config.in: Regenerate.
14673 2008-07-28 Doug Kwan <dougkwan@google.com>
14675 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14676 (linux_write_memory): Remove declaration of errno.
14678 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14680 * linux-low.c (handle_extended_wait): Do not use "status"
14681 variable uninitialized.
14683 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14685 * server.c (handle_v_attach): Inhibit reporting dll changes.
14687 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14689 * remote-utils.c (prepare_resume_reply): If requested, don't
14690 output "thread:TID" in the T stop reply.
14692 * server.c (disable_packet_vCont, disable_packet_Tthread)
14693 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14694 (handle_query): If requested, disable support for qC, qfThreadInfo
14696 (handle_v_requests): If requested, disable support for vCont.
14697 (gdbserver_show_disableable): New.
14698 (main): Handle --disable-packet and --disable-packet=LIST.
14700 * server.h (disable_packet_vCont, disable_packet_Tthread)
14701 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14703 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14705 * server.c (gdbserver_usage): Mention --version.
14707 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14709 * Makefile.in (gdbreplay.o): New rule.
14711 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14713 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14714 message, not gdbserver.
14716 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14717 Nathan Sidwell <nathan@codesourcery.com>
14718 Joseph Myers <joseph@codesourcery.com>
14720 * acinclude.m4: Include ../../config/acx.m4.
14721 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14722 * configure, config.in: Regenerate.
14723 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14724 * server.c (gdbserver_version): Print PKGVERSION.
14725 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14726 (main): Adjust gdbserver_usage calls.
14727 * gdbreplay.c (version, host_name): Add declarations.
14728 (gdbreplay_version, gdbreplay_usage): New.
14729 (main): Accept --version and --help options.
14731 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14733 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14734 (arm_breakpoint_at): Handle Thumb.
14735 (the_low_target): Add comment.
14737 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14739 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14741 2008-05-09 Doug Evans <dje@google.com>
14743 * server.h (decode_search_memory_packet): Declare.
14744 * remote-utils.c (decode_search_memory_packet): New fn.
14745 * server.c (handle_search_memory_1): New fn.
14746 (handle_search_memory): New fn.
14747 (handle_query): Process qSearch:memory packets.
14749 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14751 * regcache.c (registers_length): Remove.
14752 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14753 full register packet.
14754 * regcache.h (registers_length): Remove prototype.
14755 * server.h (PBUFSIZ): Define to 16384.
14757 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14759 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14760 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14761 powerpc-64l.o, and powerpc-altivec64l.o.
14762 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14763 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14764 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14765 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14766 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14769 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14770 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14771 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14772 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14773 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14774 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14775 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14776 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14777 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14778 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14781 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14782 (init_registers_powerpc_32l): ... this new prototype.
14783 (init_registers_powerpc_32): Remove, replace by ...
14784 (init_registers_powerpc_altivec32l): ... this new prototype.
14785 (init_registers_powerpc_e500): Remove, replace by ...
14786 (init_registers_powerpc_e500l): ... this new prototype.
14787 (init_registers_ppc64): Remove, replace by ...
14788 (init_registers_powerpc_64l): ... this new prototype.
14789 (init_registers_powerpc_64): Remove, replace by ...
14790 (init_registers_powerpc_altivec64l): ... this new prototype.
14791 (ppc_num_regs): Set to 73.
14792 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14793 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14794 (ppc_cannot_store_register): Handle orig_r3 and trap.
14795 (ppc_arch_setup): Update init_registers_... calls.
14796 (ppc_fill_gregset): Handle orig_r3 and trap.
14798 * inferiors.c (clear_inferiors): Reset current_inferior.
14800 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14802 * acinclude.m4: Add override.m4.
14803 * configure: Regenerate.
14805 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14807 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14808 initial call to init_register_ppc64.
14810 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14812 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14813 single powerpc*-*-linux* case.
14814 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14816 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14818 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14819 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14821 * linux-ppc-low.c: Include <elf.h>.
14822 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14823 (ppc_hwcap): New global variable.
14824 (ppc_regmap): Remove __SPE__ #ifdef sections.
14825 (ppc_regmap_e500): New global variable.
14826 (ppc_cannot_store_register): Update __SPE__ special case.
14827 (ppc_get_hwcap): New function.
14828 (ppc_arch_setup): Use it to determine whether inferior supports
14829 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14830 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14831 Do not access registers if target does not support AltiVec.
14832 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14833 Do not access registers if target does not support SPE.
14834 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14836 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14838 * linux-low.c (disabled_regsets, num_regsets): New.
14839 (use_regsets_p): Delete.
14840 (linux_wait_for_process): Clear disabled_regsets.
14841 (regsets_fetch_inferior_registers): Check and set it.
14842 (regsets_store_inferior_registers): Likewise.
14843 (linux_fetch_registers, linux_store_registers): Do not use
14845 (initialize_low): Allocate disabled_regsets.
14847 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14849 * Makefile.in (LIBOBJS): New.
14850 (OBS): Use LIBOBJS.
14851 (memmem.o): New rule.
14852 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14853 * configure: Regenerated.
14855 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14857 * server.c (handle_query): Never return "unsupported" for
14858 qXfer:features:read queries.
14860 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14862 * server.c (get_features_xml): Fix inverted condition.
14863 (handle_query): Always support qXfer:feature:read.
14865 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14867 * server.c (wrapper_argv): New.
14868 (start_inferior): Handle wrapper_argv. If set, expect an extra
14870 (gdbserver_usage): Document --wrapper.
14871 (main): Parse --wrapper.
14873 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14875 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14876 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14877 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14878 (ppc_set_pc): Likewise.
14879 (ppc_arch_setup): New function.
14880 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14881 of collect_register.
14882 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14884 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14886 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14887 instead of linux-ppc64-low.o.
14888 * linux-ppc64-low.c: Remove file.
14889 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14890 (linux-ppc64-low.o): Remove rule.
14892 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14893 (init_registers_powerpc_64): Likewise.
14894 (ppc_regmap): Conditionally define depending on __powerpc64__.
14895 (ppc_cannot_store_register): Do not special-case "fpscr" when
14896 compiled on __powerpc64__.
14897 (ppc_collect_ptrace_register): New function.
14898 (ppc_supply_ptrace_register): New function.
14899 (ppc_breakpoint): Change type to "unsigned int".
14900 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14901 (the_low_target): Conditionally provide initializers for the
14902 arch_setup member depending on __powerpc64__. Install
14903 collect_ptrace_register and supply_ptrace_register members.
14905 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14907 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14908 * server.c (gdbserver_xmltarget): Define.
14909 (get_features_xml): Use it to replace "target.xml" and arch_string.
14911 * configure.srv: Remove srv_xmltarget. Add XML files that were
14912 mentioned there to srv_xmlfiles instead. Remove conditional tests
14913 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14914 srv_xmlfiles and srv_regobj to include all possible choices.
14915 * configure.ac (srv_xmltarget): Remove.
14916 (srv_xmlfiles): Do not add "target.xml".
14917 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14918 checks for supplementary target information.
14919 * configure: Regenerate.
14920 * Makefile.in (XML_TARGET): Remove.
14921 (target.xml): Remove rule.
14922 (clean): Do not clean up target.xml.
14923 (.PRECIOUS): Do not mention target.xml.
14925 * target.h (struct target_ops): Remove arch_string member.
14926 * linux-low.c (linux_arch_string): Remove.
14927 (linux_target_ops): Remove arch_string initializer.
14928 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14929 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14930 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14931 * spu-low.c (spu_arch_string): Remove.
14932 (spu_target_ops): Remove arch_string initializer.
14933 * win32-low.c (win32_arch_string): Remove.
14934 (win32_target_ops): Remove arch_string initializer.
14935 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14936 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14937 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14939 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14941 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14942 by collect_ptrace_register and supply_ptrace_register hooks.
14943 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14944 instead of checking for the_low_target.left_pad_xfer.
14945 (usr_store_inferior_registers): Use collect_ptrace_register callback
14946 instead of checking for the_low_target.left_pad_xfer.
14948 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14949 (s390_supply_ptrace_register): Likewise.
14950 (s390_fill_gregset): Call s390_collect_ptrace_register.
14951 (the_low_target): Update.
14953 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14954 (ppc_supply_ptrace_register): Likewise.
14955 (the_low_target): Update.
14957 * linux-i386-low.c (the_low_target): Update.
14958 * linux-x86-64-low.c (the_low_target): Update.
14960 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14962 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14963 reg-s390.o and reg-s390x.o.
14965 * linux-low.c (new_inferior): New global variable.
14966 (linux_create_inferior, linux_attach): Set it.
14967 (linux_wait_for_process): Call the_low_target.arch_setup after the
14968 target has stopped for the first time.
14969 (initialize_low): Do not call the_low_target.arch_setup.
14971 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14972 (s390_set_pc): Likewise.
14973 (s390_arch_setup): New function.
14974 (the_low_target): Use s390_arch_setup as arch_setup routine.
14976 * regcache.c (realloc_register_cache): New function.
14977 (set_register_cache): Call it for each existing regcache.
14979 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14981 * server.h (init_registers): Remove prototype.
14983 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14984 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14985 instead of init_registers ().
14986 * linux-arm-low.c (init_registers_arm): Add prototype.
14987 (init_registers_arm_with_iwmmxt): Likewise.
14988 (the_low_target): Add initializer for arch_setup field.
14989 * linux-cris-low.c (init_registers_cris): Add prototype.
14990 (the_low_target): Add initializer for arch_setup field.
14991 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14992 (the_low_target): Add initializer for arch_setup field.
14993 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14994 (the_low_target): Add initializer for arch_setup field.
14995 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14996 (the_low_target): Add initializer for arch_setup field.
14997 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14998 (the_low_target): Add initializer for arch_setup field.
14999 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15000 (the_low_target): Add initializer for arch_setup field.
15001 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15002 (init_registers_mips64_linux): Likewise.
15003 (the_low_target): Add initializer for arch_setup field.
15004 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15005 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15006 (the_low_target): Add initializer for arch_setup field.
15007 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15008 (init_registers_powerpc_64): Likewise.
15009 (the_low_target): Add initializer for arch_setup field.
15010 * linux-s390-low.c (init_registers_s390): Add prototype.
15011 (init_registers_s390x): Likewise.
15012 (the_low_target): Add initializer for arch_setup field.
15013 * linux-sh-low.c (init_registers_sh): Add prototype.
15014 (the_low_target): Add initializer for arch_setup field.
15015 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15016 (the_low_target): Add initializer for arch_setup field.
15017 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15018 (the_low_target): Add initializer for arch_setup field.
15020 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15021 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15022 instead of init_registers ().
15023 * win32-arm-low.c (init_registers_arm): Add prototype.
15024 (the_low_target): Add initializer for arch_setup field.
15025 * win32-i386-low.c (init_registers_i386): Add prototype.
15026 (the_low_target): Add initializer for arch_setup field.
15028 * spu-low.c (init_registers_spu): Add prototype.
15029 (initialize_low): Call initialie_registers_spu () instead of
15030 initialize_registers ().
15032 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15034 * server.c (handle_v_requests): When handling the vRun and vAttach
15035 packets, if already debugging a process, don't kill it. Return an
15038 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15040 * server.c (handle_query): Correct length check.
15042 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15044 * win32-low.c (do_initial_child_stuff): Add process handle
15045 parameter. Set current_process_handle and current_process_id from the
15046 parameters. Clear globals.
15047 (win32_create_inferior): Don't set current_process_handle and
15048 current_process_id here. Instead pass them on the call to
15049 do_initial_child_stuff.
15050 (win32_attach): Likewise.
15051 (win32_clear_inferiors): New.
15052 (win32_kill): Don't close the current process handle or the
15053 current thread handle here. Instead call win32_clear_inferiors.
15054 (win32_detach): Don't open a new handle to the process. Call
15055 win32_clear_inferiors.
15056 (win32_join): Don't rely on current_process_handle; open a new
15057 handle using the process id.
15058 (win32_wait): Call win32_clear_inferiors when the inferior process
15061 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15063 * server.c (monitor_show_help): Add "exit".
15065 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15067 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15068 (clean): Add reg-xtensa.c.
15069 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15070 * configure.srv (xtensa*-*-linux*) New target.
15071 * linux-xtensa-low.c: New.
15072 * xtensa-xtregs.c: New.
15074 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15076 * hostio.c: Don't include errno.h.
15077 (errno_to_fileio_errno): Move to hostio-errno.
15078 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15079 error number outputting to the target->hostio_last_error callback.
15080 (hostio_packet_error): Use FILEIO_EINVAL directly.
15081 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15082 calls to hostio_error.
15083 * hostio-errno.c: New.
15084 * server.h (hostio_last_error_from_errno): Declare.
15085 * target.h (target_ops): Add hostio_last_error member.
15086 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15087 as hostio_last_error handler.
15088 * spu-low.c (spu_target_ops): Likewise.
15089 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15090 (wince_hostio_last_error): New functions.
15091 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15092 as hostio_last_error handler.
15093 (win32_target_ops) [!_WIN32_WCE]: Register
15094 hostio_last_error_from_errno as hostio_last_error handler.
15095 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15096 (hostio-errno.o): New rule.
15097 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15098 * configure.srv (srv_hostio_err_objs): New variable. Default to
15100 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15101 * configure: Regenerate.
15103 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15105 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15106 (linux_kill, linux_detach): Clean up the process list.
15107 * remote-utils.c (remote_open): Improve port number parsing.
15108 (putpkt_binary, input_interrupt): Only send interrupts if the target
15110 * server.c (extended_protocol): Make static.
15111 (attached): Define earlier.
15112 (exit_requested, response_needed, program_argv): New variables.
15113 (target_running): New.
15114 (start_inferior): Clear attached here.
15115 (attach_inferior): Set attached here.
15116 (require_running): Define.
15117 (handle_query): Use require_running and target_running. Implement
15119 (handle_v_attach, handle_v_run): New.
15120 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15121 (gdbserver_usage): Update.
15122 (main): Redo argument parsing. Handle --debug and --multi. Handle
15123 --attach along with other options or after the port. Save
15124 program_argv. Support no initial program. Resynchronize
15125 communication with GDB after an error. Handle "monitor exit".
15126 Use require_running and target_running. Always allow the extended
15127 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15128 restart in extended mode.
15129 * README: Refer to the GDB manual. Update --attach usage.
15131 2007-12-20 Andreas Schwab <schwab@suse.de>
15133 * linux-low.c (STACK_SIZE): Define.
15134 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15135 (linux_test_for_tracefork): Likewise.
15137 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15139 * linux-low.c (linux_wait_for_event): Update messages. Do not
15140 reinsert auto-delete breakpoints.
15141 * mem-break.c (struct breakpoint): Change return type of handler to
15143 (set_breakpoint_at): Update handler type.
15144 (reinsert_breakpoint_handler): Return 1 instead of calling
15146 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15148 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15149 * mem-break.h (set_breakpoint_at): Update handler type.
15150 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15151 * win32-low.c (auto_delete_breakpoint): New.
15152 (get_child_debug_event): Use it.
15154 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15156 * configure.ac: Check for pread and pwrite.
15157 * hostio.c (handle_pread): Fall back to lseek and read.
15158 (handle_pwrite): Fall back to lseek and write.
15159 * config.in, configure: Regenerated.
15161 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15163 * server.c (myresume): Add own_buf argument.
15164 (main): Update calls.
15166 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15168 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15169 * remote-utils.c (remote_open): Do not call disable_async_io.
15170 (block_async_io): Delete.
15171 (unblock_async_io): Make static.
15172 (initialize_async_io): New.
15173 * server.c (handle_v_cont): Handle async I/O here.
15174 (myresume): Likewise. Move other common resume tasks here...
15175 (main): ... from here. Call initialize_async_io. Disable async
15176 I/O before the main loop.
15177 * server.h (initialize_async_io): Declare.
15178 (block_async_io, unblock_async_io): Delete prototypes.
15179 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15181 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15183 * remote-utils.c (readchar): Allow binary data in received messages.
15185 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15187 * win32-low.c (attaching): New global.
15188 (win32_create_inferior): Clear the `attaching' global.
15189 (win32_attach): Set the `attaching' global.
15190 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15191 attaching. Only set a breakpoint at the entry point if not
15194 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15196 * server.c (main): Don't report dll events on the initial
15197 connection on attaches.
15199 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15201 * server.c (main): Relax numerical bases supported for the pid of
15202 the --attach command line argument.
15204 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15206 * win32-low.c (win32_attach): Call OpenProcess before
15207 DebugActiveProcess, not after. Add last error output to error
15210 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15212 * win32-low.c (win32_get_thread_context)
15213 (win32_set_thread_context): New functions.
15214 (thread_rec): Use win32_get_thread_context.
15215 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15216 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15219 2007-12-03 Leo Zayas
15220 Pedro Alves <pedro_alves@portugalmail.pt>
15222 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15224 (child_add_thread): Minor cleanup.
15225 (child_continue): Resume artificially suspended threads before
15226 calling ContinueDebugEvent.
15227 (suspend_one_thread): New.
15228 (fake_breakpoint_event): New.
15229 (get_child_debug_event): Change return type to int. Check here if
15230 gdb sent an interrupt request. If a soft interrupt was requested,
15231 fake a breakpoint event. Return 0 if there is no event to handle,
15233 (win32_wait): Don't check here if gdb sent an interrupt request.
15234 Ensure there is a valid event to handle.
15235 (win32_request_interrupt): Add soft interruption method as last
15238 2007-12-03 Leo Zayas
15239 Pedro Alves <pedro_alves@portugalmail.pt>
15241 * win32-low.h (win32_thread_info): Add descriptions to the
15242 structure members. Replace `suspend_count' counter by a
15244 * win32-low.c (thread_rec): Update condition of when to get the
15245 context from the inferior. Rely on ContextFlags being set if it
15246 has already been retrieved. Only suspend the inferior thread if
15247 we haven't already. Warn if that fails.
15248 (continue_one_thread): s/suspend_count/suspended/. Only call
15249 ResumeThread once. Warn if that fails.
15251 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15253 * win32-low.c (win32_wait): Don't read from the inferior when it
15254 has already exited.
15256 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15258 * Makefile.in (win32_low_h): New variable.
15259 (win32-low.o): Add dependency on $(win32_low_h).
15260 (win32-arm-low.o, win32-i386-low.o): New rules.
15262 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15264 * hostio.c: Correct copyright year.
15266 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15268 * Makefile.in (OBS): Add hostio.o.
15269 (hostio.o): New rule.
15270 * server.h (handle_vFile): Declare.
15271 * hostio.c: New file.
15272 * server.c (handle_v_requests): Take packet_len and new_packet_len
15273 for binary packets. Call handle_vFile.
15274 (main): Update call to handle_v_requests.
15276 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15278 * linux-low.c: Include <sched.h>.
15280 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15282 * linux-low.c (linux_tracefork_grandchild): New.
15283 (linux_tracefork_child): Use clone.
15284 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15286 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15288 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15290 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15292 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15294 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15296 * inferiors.c (change_inferior_id): Delete.
15297 (add_pid_to_list, pull_pid_from_list): New.
15298 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15299 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15300 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15301 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15302 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15303 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15304 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15305 (using_threads): Always set to 1.
15306 (handle_extended_wait): New.
15307 (add_process): Do not set TID.
15308 (linux_create_inferior): Set must_set_ptrace_flags.
15309 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15310 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15311 (linux_thread_alive): Rename TID argument to LWPID.
15312 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15313 (linux_wait_for_event): Do not use TID or check using_threads. Update
15314 call to dead_thread_notify. Call handle_extended_wait.
15315 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15316 (send_sigstop): Delete sigstop_sent.
15317 (wait_for_sigstop): Avoid TID.
15318 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15319 (linux_test_for_tracefork): New.
15320 (linux_lookup_signals): Use thread_db_active and
15321 linux_supports_tracefork_flag.
15322 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15323 * linux-low.h (get_process_thread): Avoid TID.
15324 (struct process_ifo): Move thread_known and tid to the end. Remove
15326 (linux_attach_lwp, thread_db_init): Update prototypes.
15327 * server.h (change_inferior_id): Delete prototype.
15328 (add_pid_to_list, pull_pid_from_list): New prototypes.
15329 * thread-db.c (thread_db_use_events): New.
15330 (find_first_thread): Rename to...
15331 (find_one_thread): ...this. Update callers and messages. Do not
15332 call fatal. Check thread_db_use_events. Do not call
15333 change_inferior_id or new_thread_notify.
15334 (maybe_attach_thread): Update. Do not call new_thread_notify.
15335 (thread_db_init): Set thread_db_use_events. Check use_events.
15336 * utils.c (fatal, warning): Correct message prefix.
15338 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15340 * Makefile.in (clean): Remove new files.
15341 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15342 (powerpc-64.o, powerpc-64.c): New rules.
15343 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15344 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15346 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15348 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15349 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15350 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15351 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15352 (target_regsets): Add AltiVec and SPE register sets.
15353 * configure.ac: Check for AltiVec and SPE.
15354 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15355 (ppc_fill_vrregset, ppc_store_vrregset): New.
15356 (target_regsets): Add AltiVec register set.
15357 * configure: Regenerated.
15359 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15361 * linux-low.c (O_LARGEFILE): Define.
15362 (linux_read_memory): Use /proc/PID/mem.
15363 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15364 * configure, config.in: Regenerated.
15366 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15368 * linux-low.c (linux_wait_for_event): Do not pass signals while
15371 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15373 * win32-low.c (create_process): New.
15374 (win32_create_inferior): Use create_process instead of
15375 CreateProcess. If create_process failed retry appending an ".exe"
15376 suffix. Store the GetLastError result immediatelly after
15377 create_process calls and use it on the call to error.
15379 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15381 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15383 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15385 * configure.ac: Switch license to GPLv3.
15387 2007-08-01 Michael Snyder <msnyder@access-company.com>
15389 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15391 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15393 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15395 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15396 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15397 CloseToolhelp32Snapshot.
15398 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15399 CloseToolhelp32Snapshot.
15401 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15403 * server.c (main): Check for inferior exit before main loop.
15405 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15407 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15408 instead of on tmp_desc.
15410 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15411 Daniel Jacobowitz <dan@codesourcery.com>
15413 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15414 (add_thread): Minor cleanups.
15415 (clear_inferiors): Move lower in the file. Clear the DLL
15417 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15418 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15419 (xml_escape_text): New.
15420 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15422 (handle_v_cont): Report errors.
15423 (gdbserver_version): Update.
15424 (main): Correct size of own_buf. Do not report initial DLL events.
15425 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15426 (unloaded_dll, xml_escape_text): New.
15427 * win32-low.c (enum target_waitkind): Update comments.
15428 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15429 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15430 (win32_EnumProcessModules, win32_GetModuleInformation)
15431 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15432 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15433 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15434 (win32_Module32First, win32_Module32Next, load_toolhelp)
15435 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15436 (get_child_debug_event): Handle DLL events.
15437 (win32_wait): Likewise.
15439 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15441 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15442 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15444 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15446 * win32-low.c (handle_output_debug_string): Ignore event if not
15449 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15451 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15453 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15455 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15457 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15459 * inferiors.c (change_inferior_id): Add comment.
15460 * linux-low.c (check_removed_breakpoint): Add an early
15461 prototype. Improve debug output.
15462 (linux_attach): Doc update.
15463 (linux_detach_one_process, linux_detach): Clean up before releasing
15465 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15466 * linux-low.h (struct process_info): Doc improvement.
15467 * mem-break.c (delete_all_breakpoints): New.
15468 * mem-break.h (delete_all_breakpoints): New prototype.
15469 * thread-db.c (find_first_thread): New.
15470 (thread_db_create_event): Call it instead of
15471 thread_db_find_new_threads. Clean up unused variables.
15472 (maybe_attach_thread): Remove first thread handling.
15473 (thread_db_find_new_threads): Use find_first_thread.
15474 (thread_db_get_tls_address): Likewise.
15476 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15478 * thread-db.c (thread_db_find_new_threads): Add prototype.
15479 (thread_db_create_event): Check for the main thread before adding
15481 (maybe_attach_thread): Only enable event reporting if TID == 0.
15482 (thread_db_get_tls_address): Check for new threads.
15484 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15486 * linux-low.c (linux_create_inferior): Try execv before execvp.
15487 * spu-low.c (spu_create_inferior): Likewise.
15489 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15491 * linux-low.c (linux_create_inferior): Change execv to execvp.
15492 * spu-low.c (spu_create_inferior): Likewies.
15494 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15496 * Makefile.in (clean): Clean new files instead of deleted ones.
15497 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15498 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15500 * configure.srv: Specify XML files and new regformats for MIPS and
15502 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15503 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15504 an entry for the restart register.
15505 (mips_cannot_fetch_register, mips_cannot_store_register)
15506 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15507 register names to match the XML descriptions.
15508 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15509 restart register instead of $0.
15511 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15512 Markus Deuling <deuling@de.ibm.com>
15514 * remote-utils.c (decode_xfer_write): New function.
15515 * server.h (decode_xfer_write): Add prototype.
15516 * server.c (handle_query): Add PACKET_LEN argument. Support
15517 qXfer:spu:read and qXfer:spu:write packets.
15518 (main): Pass packet_len to handle_query.
15519 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15520 * target.h (target_ops): Add qxfer_spu.
15522 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15524 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15525 accessing non-seekable spufs files.
15527 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15529 * server.c (handle_query): Add reply for qC packet.
15531 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15532 Leo Zayas <lerele@champenstudios@com>
15534 * server.h (check_remote_input_interrupt_request): New function.
15535 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15536 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15537 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15538 (check_remote_input_interrupt_request): New function.
15539 * server.h (check_remote_input_interrupt_request): Declare.
15540 * win32-low.c (winapi_DebugBreakProcess,
15541 winapi_GenerateConsoleCtrlEvent): New typedefs.
15542 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15544 (win32_wait): Check for remote interrupt request
15545 with check_remote_input_interrupt_request.
15546 (win32_request_interrupt): New function.
15547 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15549 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15551 * win32-low.c (debug_registers_changed,
15552 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15553 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15554 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15555 (thread_rec): Get context using the low target.
15556 (child_add_thread): Call thread_added on the low target,
15557 which does the same thing.
15559 (do_initial_child_stuff): Remove debug registers references.
15560 Set context using the low target. Resume threads after
15561 setting the contexts.
15562 (child_continue): Remove dead variable. Remove debug
15563 registers references.
15564 (child_fetch_inferior_registers): Go through the low target.
15565 (do_child_store_inferior_registers): Remove.
15566 (child_store_inferior_registers): Go through the low target.
15567 (win32_resume): Remove debug registers references.
15568 Set context using the low target.
15569 (handle_exception): Change return type to void. Don't record
15570 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15571 first chance exception.
15572 (get_child_debug_event): Change return type to void. Remove
15573 goto loop. Always return after waiting for debug event.
15574 (win32_wait): Convert to switch statement. Handle spurious
15577 * win32-i386-low.c (debug_registers_changed,
15578 debug_registers_used): New.
15579 (initial_stuff): Rename to ...
15580 (i386_initial_stuff): ... this. Clear debug registers
15582 (store_debug_registers): Delete.
15583 (i386_get_thread_context): New.
15584 (load_debug_registers): Delete.
15585 (i386_set_thread_context): New.
15586 (i386_thread_added): New.
15587 (single_step): Rename to ...
15588 (i386_single_step): ... this.
15589 (do_fetch_inferior_registers): Rename to ...
15590 (i386_fetch_inferior_register): ... this.
15591 (i386_store_inferior_register): New.
15592 (the_low_target): Adapt to new interface.
15594 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15595 (arm_get_thread_context): New.
15596 (arm_set_thread_context): New.
15598 (do_fetch_inferior_registers): Rename to ...
15599 (arm_fetch_inferior_register): ... this.
15600 (arm_store_inferior_register): New.
15601 (arm_wince_breakpoint): Reimplement as unsigned long.
15602 (arm_wince_breakpoint_len): Define.
15603 (the_low_target): Adapt to new interface.
15605 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15606 load_debug_registers. Add get_thread_context, set_thread_context,
15607 thread_added and store_inferior_register. Rename
15608 fetch_inferior_registers to fetch_inferior_register.
15609 (regptr): Remove declaration.
15611 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15613 * linux-low.c (linux_detach): Change return type to int. Return 0.
15614 * spu-low.c (spu_detach): Likewise.
15616 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15618 * target.h (target_ops): Change return type of detach to int.
15620 (join_inferior): New.
15621 * server.c (main): Don't skip detach support on mingw32.
15622 If the inferior doesn't support detaching return error.
15623 Call join_inferior instead of using waitpid.
15624 * linux-low.c (linux_join): New.
15625 (linux_target_op): Add linux_join.
15626 * spu-low.c (spu_join): New.
15627 (spu_target_ops): Add spu_join.
15628 * win32-low.c (win32_detach): Adapt to new interface.
15629 Reopen current_process_handle before detaching. Issue a child
15630 resume before detaching.
15632 (win32_target_op): Add win32_join.
15634 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15636 * win32-low.c (win32-attach): Fix return value.
15637 * target.h (target_ops): Describe ATTACH return values.
15639 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15641 * win32-low.c (GETPROCADDRESS): Define.
15642 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15643 (winapi_DebugSetProcessKillOnExit): Likewise.
15644 (win32_create_inferior): Force usage of ansi CreateProcessA.
15645 (win32_attach): Use GETPROCADDRESS.
15646 (win32_detach): Likewise.
15648 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15650 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15652 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15654 * win32-low.c: Commit leftover changes from 2007-03-29.
15656 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15658 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15659 fields short instead of int. Add explicit padding.
15660 (i387_cache_to_fsave): Remove unnecessary casts.
15661 (i387_fsave_to_cache): Doc fix.
15662 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15664 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15666 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15667 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15669 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15671 * configure.srv (arm*-*-mingw32ce*): Move near the other
15674 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15676 * configure.ac: Add errno checking.
15677 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15678 sys/file.h and malloc.h.
15679 (AC_CHECK_DECLS): Add perror.
15680 (srv_mingwce): Handle.
15681 * configure.srv (i[34567]86-*-cygwin*): Add
15682 win32-i386-low.o to srv_tgtobj.
15683 (i[34567]86-*-mingw*): Likewise.
15684 (arm*-*-mingw32ce*): Add case.
15685 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15686 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15687 [__MINGW32CE__] (strerror): New function.
15688 [__MINGW32CE__] (errno): Define to GetLastError.
15689 [__MINGW32CE__] (COUNTOF): New macro.
15690 (remote_open): Remove extra close call.
15691 * mem-break.c (delete_breakpoint_at): New function.
15692 * mem-break.h (delete_breakpoint_at): Declare.
15693 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15694 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15695 [USE_WIN32API] (read, write): Add char* casts.
15696 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15697 * server.h: Include wincecompat.h on Windows CE.
15698 [HAVE_ERRNO_H]: Check.
15699 (perror): Declare if not declared.
15700 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15701 (perror_with_name): Remove errno declaration.
15702 * wincecompat.h: New.
15703 * wincecompat.c: New.
15704 * win32-low.h: New.
15705 * win32-arm-low.c: New.
15706 * win32-i386-low.c: New.
15707 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15708 (OUTMSG2): Make it safe.
15710 (COUNTOF): New macro.
15711 (NUM_REGS): Get it from the low target.
15712 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15713 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15714 (thread_rec): Let low target handle debug registers.
15715 (child_add_thread): Likewise.
15716 (child_init_thread_list): Likewise.
15717 (continue_one_thread): Likewise.
15719 (do_child_fetch_inferior_registers): Move to ...
15720 * win32-i386-low.c: ... here, and rename to ...
15721 (do_fetch_inferior_registers): ... this.
15722 * win32-low.c (child_fetch_inferior_registers):
15723 Go through the low target.
15724 (do_child_store_inferior_registers): Use regptr.
15725 (strwinerror): New function.
15726 (win32_create_inferior): Handle Windows CE.
15727 Use strwinerror instead of strerror on Windows error
15728 codes. Add program to the error output.
15729 Don't close the main thread handle on Windows CE.
15730 (win32_attach): Use coredll.dll on Windows CE.
15731 (win32_kill): Close current process and current
15733 (win32_detach): Use coredll.dll on Windows CE.
15734 (win32_resume): Let low target handle debug registers, and
15736 (handle_exception): Add/Remove initial breakpoint. Avoid
15737 non-existant WSTOPSIG on Windows CE.
15738 (win32_read_inferior_memory): Cast to remove warning.
15739 (win32_arch_string): Go through the low target.
15740 (initialize_low): Call set_breakpoint_data with the low
15741 target's breakpoint.
15742 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15743 FOP_REGNUM, mappings): Move to ...
15744 * win32-i386-low.c: ... here.
15745 * win32-low.c (win32_thread_info): Move to ...
15746 * win32-low.h: ... here.
15747 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15748 win32-arm-low.c and wincecompat.c.
15749 (all:): Add $EXEEXT.
15750 (install-only:): Likewise.
15751 (gdbserver:): Likewise.
15752 (gdbreplay:): Likewise.
15753 * config.in: Regenerate.
15754 * configure: Regenerate.
15756 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15758 * win32-low.c: Rename typedef thread_info to
15759 win32_thread_info throughout.
15761 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15763 * win32-i386-low.c: Rename to ...
15764 * win32-low.c: ... this.
15765 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15766 * Makefile.in: Likewise.
15768 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15770 * remote-utils.c (monitor_output): Constify msg parameter.
15771 * server.h (monitor_output): Likewise.
15772 * win32-i386-low.c (handle_output_debug_string): New.
15773 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15774 handle_output_debug_string.
15775 (get_child_debug_event): Likewise.
15777 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15779 * server.c (main): Correct strtoul check.
15781 2007-03-27 Jon Ringle <jon@ringle.org>
15783 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15785 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15787 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15789 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15791 * terminal.h: Check HAVE_SGTTY_H.
15793 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15795 * remote-utils.c (remote_open): Print out the assigned port number.
15797 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15799 * remote-utils.c (monitor_output): New function.
15800 * server.c (debug_threads): Define here.
15801 (monitor_show_help): New function.
15802 (handle_query): Handle qRcmd.
15803 (main): Do not handle 'd' packet.
15804 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15805 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15808 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15810 * Makefile.in (EXEEXT): New.
15811 (clean): Use $(EXEEXT).
15813 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15815 * target.h (target_ops): Rename send_signal to request_interrupt,
15816 and remove enum target_signal parameter.
15817 * linux-low.c (linux_request_interrupt): Rename from
15818 linux_send_signal, and always send SIGINT.
15819 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15820 and always send SIGINT.
15821 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15823 (input_interrupt): Likewise.
15825 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15827 * server.c (get_features_xml): Check if target implemented
15829 * win32-i386-low.c (win32_arch_string): New.
15830 (win32_target_ops): Add win32_arch_string as arch_string member.
15832 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15834 * spu-low.c (spu_arch_string): New.
15835 (spu_target_ops): Add spu_arch_string.
15837 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15839 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15840 * configure.ac: Do not check for terminal.h.
15841 * configure, config.in: Regenerated.
15843 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15845 * Makefile.in (OBS): Add $(XML_BUILTIN).
15846 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15848 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15849 (arm-with-iwmmxt.c): New.
15850 * config.in, configure: Regenerate.
15851 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15852 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15853 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15854 (arm*-*-linux*): Add iWMMXt and regset support.
15855 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15856 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15857 (arm_store_wmmxregset, target_regsets): New.
15858 * server.c (get_features_xml): Take annex argument. Check builtin
15860 (handle_query): Handle multiple annexes.
15862 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15864 * remote-utils.c [USE_WIN32API] (read, write): Define.
15865 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15868 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15870 * linux-i386-low.c (the_low_target): Set arch_string.
15871 * linux-x86-64-low.c (the_low_target): Likewise.
15872 * linux-low.c (linux_arch_string): New.
15873 (linux_target_ops): Add it.
15874 * linux-low.h (struct linux_target_ops): Add arch_string.
15875 * server.c (write_qxfer_response): Use const void * for DATA.
15876 (get_features_xml): New.
15877 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15878 * target.h (struct target_ops): Add arch_string method.
15880 2007-01-03 Denis Pilat <denis.pilat@st.com>
15881 Daniel Jacobowitz <dan@codesourcery.com>
15883 * linux-low.c (linux_kill): Handle being called with no threads.
15884 * win32-i386-low.c (win32_kill): Likewise.
15885 (get_child_debug_event): Clear current_process_handle.
15887 2006-12-30 Denis PILAT <denis.pilat@st.com>
15888 Daniel Jacobowitz <dan@codesourcery.com>
15890 * remote-utils.c (remote_open): Check the type of specified
15891 serial port devices before opening them.
15892 * server.c (main): Kill the inferior if an error occurs during
15893 the first remote_open.
15895 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15897 * README: Update supported targets.
15899 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15901 * Makefile.in (clean): Remove reg-mips64.c.
15902 (reg-mips64.c, reg-mips64.o): New rules.
15903 * configure.srv: Handle mips64. Include regset support for mips.
15904 * linux-mips-low.c (union mips_register): New.
15905 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15906 (mips_breakpoint, mips_breakpoint_at): Use int.
15907 (mips_collect_register, mips_supply_register)
15908 (mips_collect_register_32bit, mips_supply_register_32bit)
15909 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15910 (mips_store_fpregset, target_regsets): New.
15911 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15913 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15915 * configure.srv: Add target "spu*-*-*".
15916 * Makefile.in (clean): Remove reg-spu.c.
15917 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15918 * spu-low.c: New file.
15920 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15922 * configure.ac: Correct td_thr_tls_get_addr test.
15923 * configure: Regenerated.
15925 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15927 * linux-low.c (linux_wait_for_event): Reformat. Use the
15928 pass_signals array.
15929 * remote-utils.c (decode_address_to_semicolon): New.
15930 * server.c (pass_signals, handle_general_set): New.
15931 (handle_query): Mention QPassSignals for qSupported.
15932 (main): Call handle_general_set.
15933 * server.h (pass_signals, decode_address_to_semicolon): New.
15935 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15937 * server.c (handle_query): Correct error handling for read_auxv.
15939 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15941 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15942 and srv_linux_thread_db to yes.
15943 * linux-s390-low.c (s390_fill_gregset): New function.
15944 (target_regsets): Define data structure.
15946 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15948 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15949 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15950 * config.in, configure: Regenerated.
15951 * inferiors.c (gdb_id_to_thread): New function.
15952 (gdb_id_to_thread_id): Use it.
15953 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15954 * linux-low.h (struct process_info): Add th member.
15955 (thread_db_get_tls_address): New prototype.
15956 * remote-utils.c (decode_address): Make non-static.
15957 * server.c (handle_query): Handle qGetTLSAddr.
15958 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15959 * target.h (struct target_ops): Add get_tls_address.
15960 * thread-db.c (maybe_attach_thread): Save the thread handle.
15961 (thread_db_get_tls_address): New.
15963 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15965 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15966 (linux_resume_one_process): Take a siginfo_t *. Update all
15967 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15968 (struct pending_signals): Add a siginfo_t.
15969 (linux_wait_for_process): Always set last_status.
15970 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15971 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15972 * linux-low.h (struct process_info): Add last_status.
15974 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15976 * remote-utils.c (try_rle): New function.
15977 (putpkt_binary): Use it.
15979 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15981 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15982 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15983 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15984 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15985 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15988 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15990 * server.c (terminal_fd): New variable.
15991 (old_foreground_pgrp): Likewise.
15992 (restore_old_foreground_pgrp): New function.
15993 (start_inferior): Record the terminal file descriptor in terminal_fd
15994 and its original foreground group in old_foreground_pgrp. Register
15995 restore_old_foreground_pgrp with atexit().
15997 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15999 * server.c (handle_query): Correct qPart to qXfer.
16001 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16003 * configure.ac: Check for more headers which are missing on
16004 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16005 * configure.srv: Add Cygwin and mingw32.
16006 * remote-utils.c: Don't include headers unconditionally which
16007 are missing on mingw32. Include <winsock.h> for mingw32.
16008 (remote_open): Adjust for mingw32 support. Flush
16009 standard error after writing to it.
16010 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16011 (unblock_async_io, enable_async_io, disable_async_io)
16012 (readchar, getpkt): Update for Winsock support.
16013 (prepare_resume_reply): Expect a protocol signal number.
16014 * server.c: Disable <sys/wait.h> on mingw32.
16015 (start_inferior): Adjust for mingw32 support. Flush
16016 standard error after writing to it.
16017 (attach_inferior): Likewise. Use protocol signal
16019 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16021 * win32-i386-low.c: New file.
16022 * Makefile.in (XM_CLIBS): Set.
16023 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16024 (win32-i386-low.o): New dependency rule.
16025 * linux-low.c (linux_wait): Use target signal numbers.
16026 * target.h (struct target_ops): Doc fix.
16027 * server.h (target_signal_to_name): New prototype.
16028 * gdbreplay.c: Don't include headers unconditionally which
16029 are missing on mingw32. Include <winsock.h> for mingw32.
16030 (remote_close, remote_open): Adjust for Winsock support.
16031 * configure, config.in: Regenerated.
16033 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16035 * server.c (decode_xfer_read, write_qxfer_response): New.
16036 (handle_query): Take a packet length argument. Handle
16037 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16038 the qSupported response.
16039 (main): Update call to handle_query.
16041 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16043 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16044 (putpkt_binary): Renamed from putpkt and adjusted for binary
16046 (putpkt): New wrapper for putpkt_binary.
16047 (readchar): Don't mask off the high bit.
16048 (decode_X_packet): New function.
16049 * server.c (main): Call putpkt_binary if a handler sets the packet
16050 length. Save the length of the incoming packet. Handle 'X'.
16051 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16053 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16055 * server.c (handle_query): Handle qSupported.
16057 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16059 * remote-utils.c (all_symbols_looked_up): New variable.
16060 (look_up_one_symbol): Check it.
16061 * server.h (look_up_one_symbol): New declaration.
16062 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16064 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16066 * Makefile.in (linux-arm-low.o): Update dependencies.
16067 * linux-arm-low.c: Include "gdb_proc_service.h".
16068 (PTRACE_GET_THREAD_AREA): Define.
16069 (ps_get_thread_area): New function.
16071 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16073 * configure.srv (m68k*-*-uclinux*): New target.
16074 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16075 (linux_resume_one_process): Remove extraneous cast.
16076 (linux_read_offsets): New.
16077 (linux_target_op): Add linux_read_offsets on mmuless systems.
16078 * server.c (handle_query): Add qOffsets logic.
16079 * target.h (struct target_ops): Add read_offsets.
16081 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16083 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16084 (PTRACE_GET_THREAD_AREA): Define.
16085 (ps_get_thread_area): New function.
16086 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16087 (linux-x86-64-low.o): Update.
16089 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16091 * configure.ac: Remove checks for prfpregset_t.
16092 * gdb_proc_service.h: New file.
16093 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16094 new "gdb_proc_service.h".
16095 * proc-service.c: Likewise.
16096 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16097 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16098 * Makefile.in (gdb_proc_service_h): Updated.
16099 * configure, config.in: Regenerated.
16101 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16103 * remote-utils.c (prepare_resume_reply): Move declaration
16104 of gdb_id_from_wait to the top of the block.
16106 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16108 * linux-low.c (regsets_store_inferior_registers): Read the regset
16109 from the target before filling it.
16111 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16113 * server.c (attach_inferior): Return SIGTRAP for a successful
16116 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16118 * Makefile.in (OBS): Add version.o.
16119 (STAGESTUFF): Delete.
16120 (version.o): Add dependencies.
16121 (version.c): Replace rule.
16122 (clean): Remove version.c.
16123 * server.c (gdbserver_version): New.
16124 (gdbserver_usage): Use printf.
16125 (main): Handle --version and --help.
16126 * server.h (version, host_name): Add declarations.
16128 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16140 * linux-x86-64-low.c:
16142 * linux-s390-low.c:
16143 * linux-ppc64-low.c:
16145 * linux-mips-low.c:
16146 * linux-m68k-low.c:
16147 * linux-m32r-low.c:
16150 * linux-ia64-low.c:
16151 * linux-i386-low.c:
16152 * linux-crisv32-low.c:
16164 * gdbserver.1: Add (C) after Copyright. Update the FSF
16167 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16169 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16170 (arm_breakpoint_at): Recognize both breakpoints.
16171 (the_low_target): Use the correct breakpoint instruction.
16173 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16175 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16176 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16177 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16178 (the_low_target): Update.
16180 2005-10-25 Andreas Schwab <schwab@suse.de>
16182 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16184 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16185 (ia64_num_regs): Reduce to 462.
16187 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16189 * acinclude.m4: Correct quoting.
16190 * aclocal.m4: Regenerated.
16192 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16193 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16194 (thread_db_init): Call thread_db_err_str.
16195 * configure.ac: Check for TD_VERSION.
16196 * config.in, configure: Regenerated.
16198 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16200 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16202 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16204 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16205 is not available. Define HAVE_PTRACE_GETREGS if it is.
16206 * config.in, configure: Regenerated.
16207 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16208 * linux-i386-low.c, linux-m68k-low.c: Update to use
16209 HAVE_PTRACE_GETREGS.
16210 * linux-low.c (regsets_fetch_inferior_registers)
16211 (regsets_store_inferior_registers): Only return 0 if we processed
16213 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16214 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16216 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16218 * inferiors.c (struct thread_info): Add gdb_id.
16219 (add_thread): Add gdb_id argument.
16220 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16221 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16222 calls to add_thread.
16223 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16224 * server.c (handle_query): Use thread_to_gdb_id.
16225 (handle_v_cont, main): Use gdb_id_to_thread_id.
16226 * server.h (add_thread): Update prototype.
16227 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16230 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16232 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16233 left-padded registers.
16234 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16235 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16237 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16239 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16240 * configure: Regenerate.
16241 * config.in: Regenerate.
16242 * server.h (NEED_DECLARATION_STRERROR):
16243 Replace with !HAVE_DECL_STRERROR.
16245 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16247 * linux-low.c (linux_wait, linux_send_signal): Don't test
16248 an unsigned long variable for > 0 if it could be MAX_ULONG.
16249 * server.c (myresume): Likewise.
16250 * target.c (set_desired_inferior): Likewise.
16252 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16254 * configure.ac: Simplify and improve check for socklen_t.
16255 * configure, config.in: Regenerate.
16257 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16259 * acconfig.h: Remove.
16260 * configure.ac: Add a test for socklen_t. Use three-argument
16261 AC_DEFINE throughout.
16262 * config.in: Regenerated using autoheader 2.59.
16263 * configure: Regenerated.
16265 * gdbreplay.c (socklen_t): Provide a default.
16266 (remote_open): Use socklen_t.
16267 * remote-utils.c (socklen_t): Provide a default.
16268 (remote_open): Use socklen_t.
16269 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16272 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16274 * linux-low.c (linux_read_memory, linux_write_memory)
16275 (linux_read_auxv): Likewise.
16276 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16277 (check_mem_write): Likewise.
16278 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16280 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16281 (registers_from_string, register_data): Likewise.
16282 * server.c (handle_query, main): Likewise.
16283 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16284 (decode_M_packet): Likewise.
16285 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16286 * target.h (struct target_ops): Update read_memory, write_memory,
16288 (read_inferior_memory, write_inferior_memory): Update.
16289 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16290 to unsigned char *.
16291 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16292 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16293 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16294 linux-s390-low.c, linux-sh-low.c: Update for changes in
16295 read_inferior_memory and the_low_target->breakpoint.
16297 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16299 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16300 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16301 * configure.srv: Add powerpc64-*-linux*.
16302 * linux-ppc64-low.c: New file.
16304 2005-05-23 Orjan Friberg <orjanf@axis.com>
16306 * linux-cris-low.c: New file with support for CRIS.
16307 * linux-crisv32-low.c: Ditto for CRISv32.
16308 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16309 (clean): Add reg-cris.c and reg-crisv32.c.
16310 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16311 reg-crisv32.o, and reg-crisv32.c to make rules.
16312 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16313 recognized targets.
16315 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16317 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16318 of sizeof (PTRACE_XFER_TYPE).
16319 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16321 2005-05-12 Orjan Friberg <orjanf@axis.com>
16323 * target.h (struct target_ops): Add insert_watchpoint,
16324 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16325 pointers for hardware watchpoint support.
16326 * linux-low.h (struct linux_target_ops): Ditto.
16327 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16328 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16329 to linux_target_ops.
16330 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16332 * server.c (main): Recognize 'Z' and 'z' packets.
16334 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16336 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16337 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16338 (the_low_target): Add new members.
16340 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16342 * proc-service.c (ps_lgetregs): Search all_processes instead of
16345 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16347 * server.c (start_inferior): Change return type to int.
16348 (attach_inferior): Change sigptr to int *.
16349 (handle_v_cont, handle_v_requests): Change signal to int *.
16350 (main): Change signal to int.
16352 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16354 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16355 * configure.srv: Add m32r*-*-linux*.
16356 * linux-m32r-low.c: New file.
16358 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16360 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16362 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16364 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16365 Take unsigned long arguments for PIDs.
16366 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16367 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16368 (wait_for_sigstop, linux_resume_one_process)
16369 (regsets_fetch_inferior_registers, linux_send_signal)
16370 (linux_read_auxv): Likewise. Update the types of variables holding
16371 PIDs. Update format string specifiers.
16372 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16373 * remote-utils.c (prepare_resume_reply): Likewise.
16374 * server.c (cont_thread, general_thread, step_thread)
16375 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16377 (handle_query): Update format specifiers.
16378 (handle_v_cont, main): Use strtoul for thread IDs.
16379 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16380 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16381 (general_thread, step_thread, thread_from_wait)
16382 (old_thread_from_wait): Update.
16383 * target.h (struct thread_resume): Use unsigned long for THREAD.
16384 (struct target_ops): Use unsigned long for arguments to attach and
16387 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16389 * acinclude.m4: Include bfd/bfd.m4 directly.
16390 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16391 <agriffis@toolchain.org>.
16392 * aclocal.m4, configure: Regenerated.
16394 2005-01-07 Andrew Cagney <cagney@gnu.org>
16396 * configure.ac: Rename configure.in, require autoconf 2.59.
16397 * configure: Re-generate.
16399 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16401 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16402 LIBS when finished.
16403 * aclocal.m4: Regenerated.
16404 * configure: Regenerated.
16406 2004-11-21 Andreas Schwab <schwab@suse.de>
16408 * linux-m68k-low.c (m68k_num_gregs): Define.
16409 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16410 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16411 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16412 (m68k_breakpoint_at): New. Add to the_low_target.
16414 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16415 srv_linux_thread_db to yes.
16417 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16419 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16420 (ARCH_SET_FS): Likewise.
16421 (ARCH_GET_FS): Likewise.
16422 (ARCH_GET_GS): Likewise.
16424 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16426 * linux-i386-low.c (ps_get_thread_area): New.
16427 * linux-x86-64-low.c (ps_get_thread_area): New.
16428 * linux-low.c: Include <sys/syscall.h>.
16429 (linux_kill_one_process): Don't kill the first thread here.
16430 (linux_kill): Kill the first thread here.
16431 (kill_lwp): New function.
16432 (send_sigstop, linux_send_signal): Use it.
16433 * proc-service.c: Clean up #ifdefs.
16434 (fpregset_info): Delete.
16435 (ps_lgetregs): Update and enable implementation.
16436 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16438 * remote-utils.c (struct sym_cache, symbol_cache): New.
16439 (input_interrupt): Print a clearer message.
16440 (async_io_enabled): New variable.
16441 (enable_async_io, disable_async_io): Use it. Update comments.
16442 (look_up_one_symbol): Use the symbol cache.
16443 * thread-db.c (thread_db_look_up_symbols): New function.
16444 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16446 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16448 * configure.in: Test for -rdynamic.
16449 * configure: Regenerated.
16450 * Makefile (INTERNAL_LDFLAGS): New.
16451 (gdbserver, gdbreplay): Use it.
16453 2004-09-02 Andrew Cagney <cagney@gnu.org>
16455 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16457 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16459 * linux-low.c (linux_wait): Clear all_processes list also.
16461 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16463 * linux-low.c: Include <errno.h>. Remove extern declaration of
16466 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16468 * gdbreplay.c, server.h, utils.c: Update copyright years.
16470 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16472 * server.c (main): Print child status or termination signal from
16473 variable 'signal', not 'sig'.
16475 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16477 * linux-low.c (linux_read_memory): Change return type to
16478 int. Check for and return error from ptrace().
16479 * target.c (read_inferior_memory): Change return type to int. Pass
16480 back return status from the_target->read_memory().
16481 * target.h (struct target_ops): Adapt *read_memory() prototype.
16483 (read_inferior_memory): Adapt prototype.
16484 * server.c (main): Return an error packet if
16485 read_inferior_memory() returns an error.
16487 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16489 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16490 Unify with other clean targets.
16492 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16494 * server.c (handle_v_cont): Call set_desired_inferior.
16496 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16498 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16500 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16502 * linux-low.c (linux_wait): Unblock async I/O.
16503 (linux_resume): Block and enable async I/O.
16504 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16505 * server.h (block_async_io, unblock_async_io): Add prototypes.
16507 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16509 * remote-utils.c (remote_open): Print a status notice after
16510 opening a TCP port.
16511 * server.c (attach_inferior): Print a status notice after
16514 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16516 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16518 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16520 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16522 * server.c, target.h: Update copyright years.
16524 2004-02-25 Roland McGrath <roland@redhat.com>
16526 * target.h (struct target_ops): New member `read_auxv'.
16527 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16528 * linux-low.c (linux_read_auxv): New function.
16529 (linux_target_ops): Initialize `read_auxv' member to that.
16531 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16533 Committed by Jim Blandy <jimb@redhat.com>.
16535 * linux-s390-low.c (s390_num_regs): Update.
16536 (s390_regmap): Remove control registers. Use __s390x__ predefine
16537 instead of GPR_SIZE to distiguish s390 and s390x targets.
16539 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16541 * linux-low.c: Update copyright year.
16542 (check_removed_breakpoint): Clear pending_is_breakpoint.
16543 (linux_set_resume_request, linux_queue_one_thread)
16544 (resume_status_pending_p): New functions.
16545 (linux_continue_one_thread): Use process->resume.
16546 (linux_resume): Only resume threads if there are no pending events.
16547 * linux-low.h (struct process_info): Add resume request
16550 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16552 * regcache.c (new_register_cache): Clear the allocated register
16553 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16555 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16557 * linux-low.c (linux_resume): Take a struct thread_resume *
16559 (linux_wait): Update call.
16560 (resume_ptr): New static variable.
16561 (linux_continue_one_thread): Renamed from
16562 linux_continue_one_process. Use resume_ptr.
16563 (linux_resume): Use linux_continue_one_thread.
16564 * server.c (handle_v_cont, handle_v_requests): New functions.
16565 (myresume): New function.
16566 (main): Handle 'v' case.
16567 * target.h (struct thread_resume): New type.
16568 (struct target_ops): Change argument of "resume" to struct
16570 (myresume): Delete macro.
16572 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16574 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16575 (uninstall): Support DESTDIR.
16577 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16579 * configure.srv: Add xscale*linux copy of arm*linux entry.
16581 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16583 * linux-arm-low.c (arm_reinsert_addr): New function.
16584 (the_low_target): Add arm_reinsert_addr.
16586 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16588 * mem-break.c: Remove whitespace at end of file.
16590 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16592 * configure.in: Check whether we need to prototype strerror.
16593 * server.h: Optionally prototype strerror.
16594 * gdbreplay.c (perror_with_name): Use strerror.
16595 * linux-low.c (linux_attach_lwp): Use strerror.
16596 * utils.c (perror_with_name): Use strerror.
16597 * config.in, configure: Regenerated.
16599 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16601 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16602 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16604 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16606 * Makefile.in (SFILES): Update.
16607 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16608 low-sun3.c: Remove files.
16610 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16612 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16613 (linux_detach_one_process, linux_detach): New functions.
16614 (linux_target_ops): Add linux_detach.
16615 * server.c (main): Handle 'D' packet.
16616 * target.h (struct target_ops): Add "detach" member.
16617 (detach_inferior): Define.
16619 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16621 From Kelley Cook <kelleycook@wideopenwest.com>:
16622 * configure.srv: Accept i[34567]86 variants.
16624 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16626 * linux-low.c (linux_wait_for_event): Correct comment typos.
16627 (linux_resume_one_process): Call check_removed_breakpoint.
16628 (linux_send_signal): New function.
16629 (linux_target_ops): Add linux_send_signal.
16630 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16632 * target.h (struct target_ops): Add send_signal.
16634 2003-05-29 Jim Blandy <jimb@redhat.com>
16636 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16637 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16638 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16639 away part of the register's value.
16641 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16643 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16644 (linux_wait_for_event, linux_init_signals): Likewise.
16646 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16648 * configure.in: Check for stdlib.h.
16649 * configure: Regenerated.
16650 * config.in: Regenerated.
16652 2003-01-04 Andreas Schwab <schwab@suse.de>
16654 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16656 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16658 * Makefile.in: Remove obsolete code.
16660 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16662 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16663 defined(PT_FPR0_HI).
16665 2002-11-17 Stuart Hughes <seh@zee2.com>
16667 * linux-arm-low.c (arm_num_regs): Increase.
16668 (arm_regmap): Include status register.
16670 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16672 * linux-low.c (register_addr): Remove incorrect -1 check.
16674 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16676 * linux-low.c (linux_create_inferior): Call setpgid. Return
16678 (unstopped_p, linux_signal_pid): Remove.
16679 (linux_target_ops): Remove linux_signal_pid.
16680 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16681 global instead of target method.
16682 * target.h (struct target_ops): Remove signal_pid. Update comment
16683 for create_inferior.
16684 * server.c (signal_pid): New variable.
16685 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16686 gdbserver. Set the child to be the foreground process group.
16687 (attach_inferior): Set signal_pid.
16689 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16691 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16693 2002-08-20 Jim Blandy <jimb@redhat.com>
16695 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16698 2002-08-01 Andrew Cagney <cagney@redhat.com>
16700 * Makefile.in: Make chill references obsolete.
16702 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16704 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16705 * configure: Regenerate.
16706 * config.in: Regenerate.
16708 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16710 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16711 (perror_with_name, remote_close, remote_open, expect, play): Static.
16713 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16715 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16716 byte offsets instead of an array of indexes.
16717 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16719 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16721 * regcache.c: Add comment.
16723 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16725 * thread-db.c: New file.
16726 * proc-service.c: New file.
16727 * acinclude.m4: New file.
16728 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16729 proc-service.o, and thread-db.o.
16730 (linux-low.o): Add USE_THREAD_DB.
16731 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16732 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16733 * aclocal.m4: Regenerated.
16734 * config.in: Regenerated.
16735 * configure: Regenerated.
16736 * configure.in: Check for proc_service.h, sys/procfs.h,
16737 thread_db.h, and linux/elf.h headrs.
16738 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16739 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16740 Check for -lthread_db and thread support.
16741 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16742 PowerPC, and SuperH.
16743 * i387-fp.c: Constify arguments.
16744 * i387-fp.h: Likewise.
16745 * inferiors.c: (struct thread_info): Renamed from
16746 `struct inferior_info'. Remove PID member. Use generic inferior
16747 list header. All uses updated.
16748 (inferiors, signal_pid): Removed.
16749 (all_threads): New variable.
16750 (get_thread): Define.
16751 (add_inferior_to_list): New function.
16752 (for_each_inferior): New function.
16753 (change_inferior_id): New function.
16754 (add_inferior): Removed.
16755 (remove_inferior): New function.
16756 (add_thread): New function.
16757 (free_one_thread): New function.
16758 (remove_thread): New function.
16759 (clear_inferiors): Use for_each_inferior and free_one_thread.
16760 (find_inferior): New function.
16761 (find_inferior_id): New function.
16762 (inferior_target_data): Update argument type.
16763 (set_inferior_target_data): Likewise.
16764 (inferior_regcache_data): Likewise.
16765 (set_inferior_regcache_data): Likewise.
16766 * linux-low.c (linux_bp_reinsert): Remove.
16767 (all_processes, stopping_threads, using_thrads)
16768 (struct pending_signals, debug_threads, pid_of): New.
16769 (inferior_pid): Replace with macro.
16770 (struct inferior_linux_data): Remove.
16771 (get_stop_pc, add_process): New functions.
16772 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16773 Use add_process and add_thread.
16774 (linux_attach_lwp): New function, based on old linux_attach. Use
16775 add_process and add_thread. Set stop_expected for new threads.
16776 (linux_attach): New function.
16777 (linux_kill_one_process): New function.
16778 (linux_kill): Kill all LWPs.
16779 (linux_thread_alive): Use find_inferior_id.
16780 (check_removed_breakpoints, status_pending_p): New functions.
16781 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16782 Update. Use WNOHANG. Wait for cloned processes also. Update process
16783 struct for the found process.
16784 (linux_wait_for_event): New function.
16785 (linux_wait): Use it. Support LWPs.
16786 (send_sigstop, wait_for_sigstop, stop_all_processes)
16787 (linux_resume_one_process, linux_continue_one_process): New functions.
16788 (linux_resume): Support LWPs.
16789 (REGISTER_RAW_SIZE): Remove.
16790 (fetch_register): Use register_size instead. Call supply_register.
16791 (usr_store_inferior_registers): Likewise. Call collect_register.
16792 Fix recursive case.
16793 (regsets_fetch_inferior_registers): Improve error message.
16794 (regsets_store_inferior_registers): Add debugging.
16795 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16796 (unstopped_p, linux_signal_pid): New functions.
16797 (linux_target_ops): Add linux_signal_pid.
16798 (linux_init_signals): New function.
16799 (initialize_low): Call it. Initialize using_threads.
16800 * regcache.c (inferior_regcache_data): Add valid
16802 (get_regcache): Fetch registers lazily. Add fetch argument
16803 and update all callers.
16804 (regcache_invalidate_one, regcache_invalidate): New
16806 (new_register_cache): Renamed from create_register_cache.
16807 Return the new regcache.
16808 (free_register_cache): Change argument to a void *.
16809 (registers_to_string, registers_from_string): Call get_regcache
16810 with fetch flag set.
16811 (register_data): Make static. Pass fetch flag to get_regcache.
16812 (supply_register): Call get_regcache with fetch flag clear.
16813 (collect_register): Call get_regcache with fetch flag set.
16814 (collect_register_as_string): New function.
16815 * regcache.h: Update.
16816 * remote-utils.c (putpkt): Flush after debug output and use
16818 Handle input interrupts while waiting for an ACK.
16819 (input_interrupt): Use signal_pid method.
16820 (getpkt): Flush after debug output and use stderr.
16821 (outreg): Use collect_register_as_string.
16822 (new_thread_notify, dead_thread_notify): New functions.
16823 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16824 and general_thread.
16825 (look_up_one_symbol): Flush after debug output.
16826 * server.c (step_thread, server_waiting): New variables.
16827 (start_inferior): Don't use signal_pid. Update call to mywait.
16828 (attach_inferior): Update call to mywait.
16829 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16830 (main): Don't fetch/store registers explicitly. Use
16831 set_desired_inferior. Support proposed ``Hs'' packet. Update
16833 * server.h: Update.
16834 (struct inferior_list, struct_inferior_list_entry): New.
16835 * target.c (set_desired_inferior): New.
16836 (write_inferior_memory): Constify.
16837 (mywait): New function.
16838 * target.h: Update.
16839 (struct target_ops): New signal_pid method.
16840 (mywait): Removed macro, added prototype.
16842 * linux-low.h (regset_func): Removed.
16843 (regset_fill_func, regset_store_func): New.
16844 (enum regset_type): New.
16845 (struct regset_info): Add type field. Use new operation types.
16846 (struct linux_target_ops): stop_pc renamed to get_pc.
16847 Add decr_pc_after_break and breakpoint_at.
16848 (get_process, get_thread_proess, get_process_thread)
16849 (strut process_info, all_processes, linux_attach_lwp)
16850 (thread_db_init): New.
16852 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16853 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16854 (the_low_target): Add new members.
16855 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16856 (i386_store_fpxregset): Constify.
16857 (target_regsets): Add new kind identifier.
16858 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16859 (i386_set_pc): Add debugging.
16860 (i386_breakpoint_at): New function.
16861 (the_low_target): Add new members.
16862 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16863 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16864 (mips_breakpoint_at): New.
16865 (the_low_target): Add new members.
16866 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16867 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16868 (the_low_target): Add new members.
16869 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16870 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16871 (the_low_target): Add new members.
16872 * linux-x86-64-low.c (target_regsets): Add new kind
16875 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16877 From Martin Pool <mbp@samba.org>:
16878 * server.c (gdbserver_usage): New function.
16881 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16883 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16884 stop_at -> stop_pc.
16886 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16888 * Makefile.in: Remove obsolete code.
16890 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16892 * linux-low.c (regsets_fetch_inferior_registers),
16893 (regsets_store_inferior_registers): Removed cast to int from
16895 * regcache.h: Added declaration of struct inferior_info.
16897 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16899 * inferiors.c (struct inferior_info): Add regcache_data.
16900 (add_inferior): Call create_register_cache.
16901 (clear_inferiors): Call free_register_cache.
16902 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16903 * regcache.c (struct inferior_regcache_data): New.
16904 (registers): Remove.
16905 (get_regcache): New function.
16906 (create_register_cache, free_register_cache): New functions.
16907 (set_register_cache): Don't initialize the register cache here.
16908 (registers_to_string, registers_from_string, register_data): Call
16910 * regcache.h: Add prototypes.
16911 * server.h: Likewise.
16913 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16915 * mem-break.c: New file.
16916 * mem-break.h: New file.
16917 * Makefile.in: Add mem-break.o rule; update server.h
16919 * inferiors.c (struct inferior_info): Add target_data
16921 (clear_inferiors): Free target_data member if set.
16922 (inferior_target_data, set_inferior_target_data): New functions.
16923 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16924 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16925 * linux-low.c (linux_bp_reinsert): New variable.
16926 (struct inferior_linux_data): New.
16927 (linux_create_inferior): Use set_inferior_target_data.
16928 (linux_attach): Likewise. Call add_inferior.
16929 (linux_wait_for_one_inferior): New function.
16930 (linux_wait): Call it.
16931 (linux_write_memory): Add const.
16932 (initialize_low): Call set_breakpoint_data.
16933 * linux-low.h (struct linux_target_ops): Add breakpoint
16935 * server.c (attach_inferior): Remove extra add_inferior
16937 * server.h: Include mem-break.h. Update inferior.c
16939 * target.c (read_inferior_memory)
16940 (write_inferior_memory): New functions.
16941 * target.h (read_inferior_memory)
16942 (write_inferior_memory): Change macros to prototypes.
16943 (struct target_ops): Update comments. Add const to write_memory
16946 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16948 * linux-low.c (usr_store_inferior_registers): Support
16949 registers which are allowed to fail to store.
16950 * linux-low.h (linux_target_ops): Likewise.
16951 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16952 (ppc_cannot_store_register): FPSCR may not be storable.
16954 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16956 * server.h: Include <string.h> if HAVE_STRING_H.
16957 * ChangeLog: Correct paths in last ChangeLog entry.
16959 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16961 * linux-low.h: Remove obsolete prototypes.
16962 (struct linux_target_ops): New.
16963 (extern the_low_target): New.
16964 * linux-low.c (num_regs, regmap): Remove declarations.
16965 (register_addr): Use the_low_target explicitly.
16966 (fetch_register): Likewise.
16967 (usr_fetch_inferior_registers): Likewise.
16968 (usr_store_inferior_registers): Likewise.
16969 * linux-arm-low.c (num_regs): Remove.
16970 (arm_num_regs): Define.
16971 (arm_regmap): Renamed from regmap, made static.
16972 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16974 (arm_cannot_store_register): Renamed from cannot_store_register,
16976 (the_low_target): New.
16977 * linux-i386-low.c (num_regs): Remove.
16978 (i386_num_regs): Define.
16979 (i386_regmap): Renamed from regmap, made static.
16980 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16982 (i386_cannot_store_register): Renamed from cannot_store_register,
16984 (the_low_target): New.
16985 * linux-ia64-low.c (num_regs): Remove.
16986 (ia64_num_regs): Define.
16987 (ia64_regmap): Renamed from regmap, made static.
16988 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16990 (ia64_cannot_store_register): Renamed from cannot_store_register,
16992 (the_low_target): New.
16993 * linux-m68k-low.c (num_regs): Remove.
16994 (m68k_num_regs): Define.
16995 (m68k_regmap): Renamed from regmap, made static.
16996 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16998 (m68k_cannot_store_register): Renamed from cannot_store_register,
17000 (the_low_target): New.
17001 * linux-mips-low.c (num_regs): Remove.
17002 (mips_num_regs): Define.
17003 (mips_regmap): Renamed from regmap, made static.
17004 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17006 (mips_cannot_store_register): Renamed from cannot_store_register,
17008 (the_low_target): New.
17009 * linux-ppc-low.c (num_regs): Remove.
17010 (ppc_num_regs): Define.
17011 (ppc_regmap): Renamed from regmap, made static.
17012 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17014 (ppc_cannot_store_register): Renamed from cannot_store_register,
17016 (the_low_target): New.
17017 * linux-s390-low.c (num_regs): Remove.
17018 (s390_num_regs): Define.
17019 (s390_regmap): Renamed from regmap, made static.
17020 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17022 (s390_cannot_store_register): Renamed from cannot_store_register,
17024 (the_low_target): New.
17025 * linux-sh-low.c (num_regs): Remove.
17026 (sh_num_regs): Define.
17027 (sh_regmap): Renamed from regmap, made static.
17028 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17030 (sh_cannot_store_register): Renamed from cannot_store_register,
17032 (the_low_target): New.
17033 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17034 (the_low_target): New.
17036 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17038 * Makefile.in: Add stamp-h target.
17039 * configure.in: Create stamp-h.
17040 * configure: Regenerated.
17042 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17044 * inferiors.c: New file.
17045 * target.c: New file.
17046 * target.h: New file.
17047 * Makefile.in: Add target.o and inferiors.o. Update
17049 * linux-low.c (inferior_pid): New static variable,
17050 moved from server.c.
17051 (linux_create_inferior): Renamed from create_inferior.
17052 Call add_inferior. Return 0 on success instead of a PID.
17053 (linux_attach): Renamed from myattach.
17054 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17055 (linux_thread_alive): Renamed from mythread_alive.
17056 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17058 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17059 (regsets_store_inferior_registers): Correct error message.
17060 Add missing ``return 0''.
17061 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17062 (linux_store_registers): Renamed from store_inferior_registers.
17063 (linux_read_memory): Renamed from read_inferior_memory.
17064 (linux_write_memory): Renamed from write_inferior_memory.
17065 (linux_target_ops): New structure.
17066 (initialize_low): Call set_target_ops ().
17067 * remote-utils.c (unhexify): New function.
17068 (hexify): New function.
17069 (input_interrupt): Send signals to ``signal_pid''.
17070 * server.c (inferior_pid): Remove.
17071 (start_inferior): Update create_inferior call.
17072 (attach_inferior): Call add_inferior.
17073 (handle_query): New function.
17074 (main): Call handle_query for `q' packets.
17075 * server.h: Include "target.h". Remove obsolete prototypes.
17076 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17078 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17080 * Makefile.in: Add WARN_CFLAGS. Update configury
17082 * configure.in: Check for <string.h>
17083 * configure: Regenerate.
17084 * config.in: Regenerate.
17085 * gdbreplay.c: Include needed system headers.
17086 (remote_open): Remove strchr prototype.
17087 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17088 * regcache.c (supply_register): Change buf argument to const void *.
17089 (supply_register_by_name): Likewise.
17090 (collect_register): Change buf argument to void *.
17091 (collect_register_by_name): Likewise.
17092 * regcache.h: Add missing prototypes.
17093 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17094 * server.c (handle_query): New function.
17095 (attached): New static variable, moved out of main.
17096 (main): Quiet longjmp clobber warnings.
17097 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17098 * utils.c (error): Remove NORETURN.