1 2018-11-23 Alan Hayward <alan.hayward@arm.com>
3 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
4 (aarch64_cannot_fetch_register): Likewise.
5 (struct linux_target_ops): Update references.
7 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
9 * linux-ppc-low.c: Include nat/linux-ptrace.h.
11 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
13 * configure.srv (ipa_ppc_linux_regobj): Add
14 powerpc-isa207-htm-vsx32l-ipa.o and
15 powerpc-isa207-htm-vsx64l-ipa.o.
16 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
17 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
18 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
19 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
20 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
21 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
22 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
23 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
24 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
25 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
26 (init_registers_powerpc_isa207_htm_vsx32l)
27 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
28 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
29 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
30 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
31 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
32 (ppc_store_tm_ctarregset): New functions.
33 (ppc_regsets): Add entries for HTM regsets.
34 (ppc_arch_setup): Set htm in features struct when needed. Set
35 sizes for the HTM regsets.
36 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
37 (initialize_low_arch): Call
38 init_registers_powerpc_isa207_htm_vsx32l and
39 init_registers_powerpc_isa207_htm_vsx64l.
40 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
41 PPC_TDESC_ISA207_HTM_VSX.
42 (initialize_low_tracepoint): Call
43 init_registers_powerpc_isa207_htm_vsx32l and
44 init_registers_powerpc_isa207_htm_vsx64l.
46 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
48 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
49 rs6000/power-linux-pmu.xml to srv_xmlfiles.
50 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
51 (ppc_store_pmuregset): New functions.
52 (ppc_regsets): Add entries for ebb and pmu regsets.
53 (ppc_arch_setup): Set isa207 in features struct if the ebb and
54 pmu regsets are available. Set sizes for these regsets.
56 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
58 * configure.srv (ipa_ppc_linux_regobj): Add
59 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
60 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
61 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
62 rs6000/powerpc-isa207-vsx32l.xml, and
63 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
64 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
65 <PPC_TDESC_ISA207_VSX>: New enum value.
66 (init_registers_powerpc_isa207_vsx32l): Declare.
67 (init_registers_powerpc_isa207_vsx64l): Declare.
68 * linux-ppc-low.c (ppc_fill_tarregset): New function.
69 (ppc_store_tarregset): New function.
70 (ppc_regsets): Add entry for the TAR regset.
71 (ppc_arch_setup): Set isa207 in features struct when needed. Set
72 size for the TAR regsets.
73 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
74 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
75 and init_registers_powerpc_isa207_vsx64l.
76 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
77 (initialize_low_tracepoint): Call
78 init_registers_powerpc_isa207_vsx32l and
79 init_registers_powerpc_isa207_vsx64l.
81 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
82 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
84 * configure.srv (ipa_ppc_linux_regobj): Add
85 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
86 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
87 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
88 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
89 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
90 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
91 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
92 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
93 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
94 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
95 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
96 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
97 (ppc_hwcap): Add comment.
98 (ppc_hwcap2): New global.
99 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
100 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
101 (ppc_regsets): Add entries for the DSCR and PPR regsets.
102 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
103 when needed. Set sizes for the the DSCR and PPR regsets.
104 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
105 (initialize_low_arch): Call
106 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
107 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
108 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
109 PPC_TDESC_ISA205_PPR_DSCR_VSX.
110 (initialize_low_tracepoint): Call
111 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
112 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
114 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
116 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
118 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
119 Simon Marchi <simark@simark.ca>
121 * acinclude.m4: Include "../selftest.m4".
122 * configure: Regenerate.
123 * configure.ac: Use "GDB_AC_SELFTEST".
124 * configure.srv: Use "$enable_unittests" instead of
125 "$development" when checking whether unit tests have been
127 * server.c (captured_main): Update message informing that
128 selftests have been disabled.
130 2018-10-04 Tom Tromey <tom@tromey.com>
132 * configure: Rebuild.
134 2018-10-04 Tom Tromey <tom@tromey.com>
136 * server.c (handle_status): Rename inner "thread".
137 (process_serial_event): Declare "res" in 'm' case.
138 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
139 (iterate_over_lwps): Rename inner "thread".
140 (linux_qxfer_libraries_svr4): Rename inner "len".
141 * gdbthread.h (find_thread_in_random): Rename inner "thread".
143 2018-10-01 Gary Benson <gbenson@redhat.com>
145 * gdb_proc_service.h: Moved common code to
146 common/gdb_proc_service.h.
148 2018-10-01 Gary Benson <gbenson@redhat.com>
150 * gdb_proc_service.h: Synchronize comments and whitespace with
151 GDB's version of this file.
153 2018-09-25 Tom Tromey <tom@tromey.com>
155 * configure: Rebuild.
156 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
158 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
160 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
161 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
162 ($(IPA_LIB)): Sort IPA_OBJS.
164 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
166 * Makefile.in: Remove references to $(ADD_DEPS).
168 2018-09-16 Tom Tromey <tom@tromey.com>
170 * remote-utils.c (remote_open): Use GNU style for metasyntactic
172 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
175 2018-09-05 Tom Tromey <tom@tromey.com>
177 * configure: Rebuild.
179 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
182 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
184 2018-08-27 Tom Tromey <tom@tromey.com>
187 * configure: Rebuild.
189 2018-08-27 Tom Tromey <tom@tromey.com>
191 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
192 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
193 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
194 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
195 (s390x_emit_stack_adjust): Add casts to unsigned char.
197 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
201 * server.h (struct client_state) <disable_randomization>:
204 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
206 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
208 (mips_supply_ptrace_register): Likewise.
210 2018-07-22 Tom Tromey <tom@tromey.com>
212 * configure: Rebuild.
214 2018-07-22 Tom Tromey <tom@tromey.com>
216 * win32-low.c (win32_create_inferior): Remove unused variables.
217 * gdbreplay.c (remote_open): Remove unused variable.
218 * remote-utils.c (remote_prepare): Remove unused variable.
219 * x86-tdesc.h (X86_TDESC_H): Define.
220 (amd64_expedite_regs): Define conditionally.
221 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
222 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
223 * remote-utils.c (readchar): Remove unused variable.
225 2018-07-13 Pedro Alves <palves@redhat.com>
227 * linux-low.c (linux_kill): Change parameter to process_info
228 pointer instead of pid. Adjust.
229 * lynx-low.c (lynx_kill): Likewise.
230 * nto-low.c (nto_kill): Likewise.
231 * spu-low.c (spu_kill): Likewise.
232 * win32-low.c (win32_kill): Likewise.
233 * server.c (handle_v_kill, kill_inferior_callback)
234 (detach_or_kill_for_exit): Adjust.
235 * target.c (kill_inferior): Change parameter to process_info
236 pointer instead of pid. Adjust.
237 * target.h (struct target_ops) <kill>: Change parameter to
238 process_info pointer instead of pid. Adjust all implementations
240 (kill_inferior): Likewise.
242 2018-07-13 Pedro Alves <palves@redhat.com>
244 * linux-low.c (linux_detach, linux_join): Change parameter to
245 process_info pointer instead of pid. Adjust.
246 * lynx-low.c (lynx_detach, lynx_join): Likewise.
247 * nto-low.c (nto_detach): Likewise.
248 * spu-low.c (spu_detach, spu_join): Likewise.
249 * win32-low.c (win32_detach, win32_join): Likewise.
250 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
251 * target.h (struct target_ops) <detach, join>: Change parameter to
252 process_info pointer instead of pid. Adjust all implementations
254 (detach_inferior, join_inferior): Rename 'pid' parameter to
257 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
258 Jan Kratochvil <jan.kratochvil@redhat.com>
259 Paul Fertser <fercerpav@gmail.com>
260 Tsutomu Seki <sekiriki@gmail.com>
262 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
263 (OBS): Add 'common/netstuff.o'.
264 (GDBREPLAY_OBS): Likewise.
265 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
266 (remote_open): Implement support for IPv6
268 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
270 (handle_accept_event): Accept connections from IPv6 sources.
271 (remote_prepare): Handle IPv6-style hostnames; implement
272 support for IPv6 connections.
273 (remote_open): Implement support for printing connections from
276 2018-07-11 Pedro Alves <palves@redhat.com>
279 * mem-break.c (any_persistent_commands): Add process_info
280 parameter and use it instead of relying on the current process.
281 Change return type to bool.
282 * mem-break.h (any_persistent_commands): Add process_info
283 parameter and change return type to bool.
284 * server.c (handle_detach): Remove require_running_or_return call.
285 Look up the process_info for the process we're about to detach.
286 If not found, return back error to GDB. Adjust
287 any_persistent_commands call to pass down a process pointer.
289 2018-07-11 Pedro Alves <palves@redhat.com>
291 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
292 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
293 instead of collect_register_by_name.
294 * regcache.c (regcache_raw_get_unsigned_by_name): New.
295 * regcache.h (regcache_raw_get_unsigned_by_name): New.
297 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
298 Pedro Alves <palves@redhat.com>
300 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
302 2018-07-03 Tom Tromey <tom@tromey.com>
304 * linux-low.c: Update.
305 * lynx-low.c: Update.
306 * mem-break.c: Update.
308 * remote-utils.c: Update.
312 * win32-low.c: Update.
314 2018-07-03 Tom Tromey <tom@tromey.com>
318 2018-07-03 Tom Tromey <tom@tromey.com>
320 * linux-low.c: Update.
322 2018-07-03 Tom Tromey <tom@tromey.com>
326 2018-07-03 Tom Tromey <tom@tromey.com>
328 * linux-low.c: Update.
329 * linux-mips-low.c: Update.
330 * lynx-low.c: Update.
332 * remote-utils.c: Update.
336 * thread-db.c: Update.
338 2018-07-03 Tom Tromey <tom@tromey.com>
340 * linux-low.c: Update.
341 * linux-mips-low.c: Update.
342 * lynx-low.c: Update.
343 * mem-break.c: Update.
345 * remote-utils.c: Update.
349 * tracepoint.c: Update.
351 2018-07-03 Tom Tromey <tom@tromey.com>
353 * linux-low.c: Update.
354 * linux-ppc-low.c: Update.
355 * linux-x86-low.c: Update.
356 * proc-service.c: Update.
359 * thread-db.c: Update.
360 * win32-low.c: Update.
362 2018-07-03 Tom Tromey <tom@tromey.com>
364 * linux-low.c: Update.
365 * lynx-low.c: Update.
367 * remote-utils.c: Update.
369 * thread-db.c: Update.
370 * win32-low.c: Update.
372 2018-06-29 Joel Brobecker <brobecker@adacore.com>
374 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
375 parameter in call to 'amd64_create_target_description'.
377 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
379 * x86-tdesc.h: Remove executable permission flag.
381 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
383 * configure.ac: Remove AC_PREREQ, add missing quoting.
384 * configure: Re-generate.
385 * config.in: Re-generate.
386 * aclocal.m4: Re-generate.
388 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
390 * tracepoint.h (current_traceframe): Remove declaration.
392 2018-06-18 Alan Hayward <alan.hayward@arm.com>
394 * linux-aarch64-low.c (is_sve_tdesc): New function.
395 (aarch64_sve_regs_copy_to_regcache): Likewise.
396 (aarch64_sve_regs_copy_from_regcache): Likewise.
397 (aarch64_regs_info): Add SVE checks.
398 (initialize_low_arch): Initialize SVE.
400 2018-06-18 Alan Hayward <alan.hayward@arm.com>
402 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
404 2018-06-11 Alan Hayward <alan.hayward@arm.com>
406 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
407 (initialize_low_tracepoint): Likewise
408 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
409 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
411 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
413 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
415 2018-06-11 Alan Hayward <alan.hayward@arm.com>
417 * server.h (PBUFSIZ): Increase size
419 2018-06-11 Alan Hayward <alan.hayward@arm.com>
421 * regcache.c (regcache::raw_compare): New function.
422 * regcache.h (regcache::raw_compare): New declaration.
424 2018-06-11 Alan Hayward <alan.hayward@arm.com>
426 * regcache.c (new_register_cache): Use new.
427 (free_register_cache): Use delete.
428 (register_data): Use const.
429 (supply_register): Move body inside regcache.
430 (regcache::raw_supply): New override function.
431 (collect_register): Move body inside regcache.
432 (regcache::raw_collect): New override function.
433 (regcache::get_register_status): New override function.
434 * regcache.h (struct regcache): Inherit from reg_buffer_common.
436 2018-06-09 Tom Tromey <tom@tromey.com>
438 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
440 (event_queue): Use std::queue.
441 (gdb_event_xfree): Remove.
442 (initialize_event_loop, process_event, wait_for_event): Update.
444 2018-06-08 Stan Cox <scox@redhat.com>
446 * win32-low.c (win32_create_inferior): last_ptid and last_status
447 moved to client_state.
449 2018-06-08 Pedro Alves <palves@redhat.com>
451 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
452 common/common-exceptions.o, common/common-utils.o,
453 common/errors.o, common/print-utils.o and utils.o.
454 * gdbreplay.c: Include "common-defs.h" instead of the two
455 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
456 string.h or alloca.h.
457 (perror_with_name): Delete.
458 (remote_open): Use xstrdup instead of strdup.
459 (main): Rename to ...
460 (captured_main): ... this.
463 2018-06-08 Tom Tromey <tom@tromey.com>
465 * linux-low.c (linux_low_read_btrace): Update.
467 2018-06-04 Stan Cox <scox@redhat.com>
469 * server.h (struct client_state): New.
470 * server.c (cont_thread, general_thread, multi_process)
471 (report_fork_events, report_vfork_events, report_exec_events)
472 (report_thread_events, swbreak_feature, hwbreak_feature)
473 (vCont_supported, disable_randomization, pass_signals)
474 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
475 Moved to client_state.
476 * remote-utils.c (remote_debug, noack_mode)
477 (transport_is_reliable): Moved to client_state.
478 * tracepoint.c (current_traceframe): Moved to client_state.
481 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
482 linux-low.c, remote-utils.h, target.c: Use client_state.
484 2018-05-31 Alan Hayward <alan.hayward@arm.com>
486 * configure.srv: Add new c/h file.
488 2018-05-31 Alan Hayward <alan.hayward@arm.com>
490 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
493 2018-05-25 Maciej W. Rozycki <macro@mips.com>
495 * gdb.arch/mips-fpregset-core.exp: New test.
496 * gdb.arch/mips-fpregset-core.c: New test source.
498 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
501 * hostio.c (require_int): Do not report overflow for integers
502 between 0xfffffff and 0x7fffffff.
504 2018-05-22 Maciej W. Rozycki <macro@mips.com>
506 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
507 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
508 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
510 (the_low_target): Wire them.
512 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
514 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
515 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
516 mode. Call collect_register_by_name with vscr using
517 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
518 (ppc_store_vrregset): Add and set vscr_offset variable as in
519 ppc_fill_vrregset. Call supply_register_by_name with vscr using
522 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
524 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
525 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
526 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
528 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
530 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
531 (ppc_store_vsxregset): Likewise.
532 (ppc_fill_vrregset): Likewise.
533 (ppc_store_vrregset): Likewise.
534 (ppc_fill_evrregset): Likewise.
535 (ppc_store_evrregset): Likewise.
536 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
537 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
540 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
542 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
543 wordsize of the inferior. Call ppc_linux_target_wordsize.
545 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
547 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
548 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
549 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
550 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
551 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
552 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
553 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
554 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
555 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
556 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
557 (tdesc_powerpc_e500l): Remove.
558 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
559 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
560 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
561 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
563 (ppc_arch_setup): Remove target description matching code. Fill a
564 ppc_linux_features struct and call ppc_linux_match_description
567 2018-05-22 Maciej W. Rozycki <macro@mips.com>
569 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
570 width of the requested register exceeds the width of the
572 (mips_cannot_store_register): Likewise.
574 2018-05-21 Maciej W. Rozycki <macro@mips.com>
576 * linux-mips-low.c (mips_fetch_register): New function. Update
578 (mips_store_gregset): Supply 0 rather than $restart for $zero.
579 (the_low_target): Wire `mips_fetch_register'.
581 2018-05-10 Joel Brobecker <brobecker@adacore.com>
583 * lynx-i386-low.c (LYNXOS_178): New macro.
584 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
585 the layout on LynxOS-178.
586 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
587 handle floating point registers that are not supported by
590 2018-05-10 Tom Tromey <tom@tromey.com>
592 * configure: Rebuild.
594 2018-05-10 Joel Brobecker <brobecker@adacore.com>
597 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
598 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
599 Use it to set the expedite_regs field in the given tdesc.
600 * x86-tdesc.h: New file.
601 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
602 Adjust following the addition of the new expedite_regs parameter
604 * linux-tic6x-low.c (tic6x_read_description): Likewise.
605 * linux-x86-tdesc.c: #include "x86-tdesc.h".
606 (i386_linux_read_description, amd64_linux_read_description):
607 Adjust following the addition of the new expedite_regs parameter
609 * lynx-i386-low.c: #include "x86-tdesc.h".
610 (lynx_i386_arch_setup): Adjust following the addition of the new
611 expedite_regs parameter to init_target_desc.
612 * nto-x86-low.c: #include "x86-tdesc.h".
613 (nto_x86_arch_setup): Adjust following the addition of the new
614 expedite_regs parameter to init_target_desc.
615 * win32-i386-low.c: #include "x86-tdesc.h".
616 (i386_arch_setup): Adjust following the addition of the new
617 expedite_regs parameter to init_target_desc.
619 2018-05-10 Joel Brobecker <brobecker@adacore.com>
622 * win32-low.c (win32_create_inferior): Add call to my_wait
623 setting last_status global.
625 2018-05-10 Joel Brobecker <brobecker@adacore.com>
628 * win32-low.c (create_process): Only call gdb_tilde_expand if
629 inferior_cwd is not NULL.
631 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
633 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
634 registers to the cache if their values have changed.
635 (i387_xsave_to_cache): Provide default values for x87 control
636 registers when these features are available, but disabled.
637 * regcache.c (supply_register_by_name_zeroed): New function.
638 * regcache.h (supply_register_by_name_zeroed): Declare new
641 2018-05-07 Tom Tromey <tom@tromey.com>
643 * configure: Rebuild.
645 2018-05-04 Tom Tromey <tom@tromey.com>
647 * configure: Rebuild.
649 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
650 Pedro Alves <palves@redhat.com>
652 * linux-aarch64-low.c (aarch64_stopped_data_address):
655 2018-04-27 Tom Tromey <tom@tromey.com>
657 * configure: Rebuild.
659 2018-04-23 Tom Tromey <tom@tromey.com>
661 * configure: Rebuild.
663 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
665 * Makefile.in (depcomp): Add "..".
666 (all_deps_files): New and use it.
668 2018-04-18 Alan Hayward <alan.hayward@arm.com>
670 * configure.srv (aarch64*-*-linux*): Don't include xml.
671 (i[34567]86-*-cygwin*): Likewise.
672 (i[34567]86-*-linux*): Likewise.
673 (i[34567]86-*-lynxos*): Likewise.
674 (i[34567]86-*-mingw32ce*): Likewise.
675 (i[34567]86-*-mingw*): Likewise.
676 (i[34567]86-*-nto*): Likewise.
677 (tic6x-*-uclinux): Likewise.
678 (x86_64-*-linux*): Likewise.
679 (x86_64-*-mingw*): Likewise.
680 (x86_64-*-cygwin*): Likewise.
682 2018-04-18 Alan Hayward <alan.hayward@arm.com>
684 * tdesc.c: Remove xml parameter.
686 2018-04-18 Alan Hayward <alan.hayward@arm.com>
688 * server.c (get_features_xml): Remove cast.
689 * tdesc.c (void target_desc::accept): Fill in function.
690 (tdesc_get_features_xml): Remove old xml creation.
691 (print_xml_feature::visit_pre): Add xml vistor.
692 * tdesc.h (struct target_desc): Make xmltarget mutable.
693 (tdesc_get_features_xml): Remove declaration.
695 2018-04-18 Alan Hayward <alan.hayward@arm.com>
697 * tdesc.c (tdesc_architecture_name): Add new function.
698 (tdesc_osabi_name): Likewise.
699 (tdesc_get_features_xml): Use new functions.
701 2018-04-18 Alan Hayward <alan.hayward@arm.com>
703 * tdesc.c (tdesc_create_flags): Remove.
704 (tdesc_add_flag): Likewise.
705 (tdesc_named_type): Likewise.
706 (tdesc_create_union): Likewise.
707 (tdesc_create_struct): Likewise.
708 (tdesc_create_vector): Likewise.
709 (tdesc_add_bitfield): Likewise.
710 (tdesc_add_field): Likewise.
711 (tdesc_set_struct_size): Likewise.
713 2018-04-18 Alan Hayward <alan.hayward@arm.com>
715 * tdesc.c (~target_desc): Remove implictly deleted items.
716 (init_target_desc): Iterate all features.
717 (tdesc_get_features_xml): Use vector.
718 (tdesc_create_feature): Create feature.
719 * tdesc.h (tdesc_feature) Remove
720 (target_desc): Add features.
722 2018-04-18 Alan Hayward <alan.hayward@arm.com>
724 * Makefile.in: Add common/tdesc.c
725 * tdesc.c (init_target_desc): init all reg_defs from register
727 (tdesc_create_reg): Create tdesc_reg.
728 * tdesc.h (tdesc_feature): Add register vector.
730 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
732 * tdesc.h (struct target_desc) <features>: Change type to
733 std::vector<std::string>.
734 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
736 (tdesc_get_features_xml): Likewise.
737 (tdesc_create_feature): Likewise.
739 2018-03-26 Alan Hayward <alan.hayward@arm.com>
741 * regcache.c (find_register_by_number): Return a ref.
742 (find_regno): Use references.
743 (register_size): Likewise.
744 (register_data): Likewise.
745 * tdesc.c (target_desc::~target_desc): Remove free calls.
746 (target_desc::operator==): Use std::vector compare.
747 (init_target_desc): Use reference.
748 (tdesc_create_reg): Use reg constructors.
749 * tdesc.h (struct target_desc): Replace pointer with object.
751 2018-03-23 Alan Hayward <alan.hayward@arm.com>
753 * regcache.c (find_register_by_number): Make static.
754 (find_regno): Use find_register_by_number
755 * regcache.h (struct reg): Remove declaration.
757 2018-03-23 Alan Hayward <alan.hayward@arm.com>
759 * tdesc.c (target_desc::~target_desc): Move to here.
760 (target_desc::operator==): Likewise.
761 * tdesc.h (target_desc::~target_desc): Move from here.
762 (target_desc::operator==): Likewise.
764 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
766 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
768 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
770 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
772 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
773 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
774 and init_registers_s390_gs_linux64.
776 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
778 * linux-s390-low.c (s390_fill_gs): Remove function.
779 (s390_fill_gsbc): Remove function.
780 (s390_regsets): Set fill functions for the guarded storage regsets
783 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
785 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
786 the word size. Add comment.
787 (s390_get_wordsize): New function.
788 (s390_arch_setup): No longer select a temporary tdesc to fetch the
789 pswm with it. Instead, use s390_get_wordsize to determine the
790 word size first and derive the correct tdesc from that directly.
792 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
794 * Makefile.in: Include silent-rules.mk.
795 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
796 (COMPILE): Add ECHO_CXX.
797 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
798 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
799 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
800 (version-generated.c): Add ECHO_GEN.
801 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
802 (IPAGENT_COMPILE): Add ECHO_CXX.
803 (%-generated.c): Add ECHO_REGDAT.
805 2018-03-14 Tom Tromey <tom@tromey.com>
808 * ax.c (ax_printf): Special case for NULL.
810 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
812 * linux-low.c (linux_qxfer_libraries_svr4): Use
813 xml_escape_text_append.
815 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
817 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
819 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
821 * server.c (handle_general_set): Remove unnecessary xstrdup.
823 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
825 * server.c (parse_debug_format_options): Adjust to
826 delim_string_to_char_ptr_vec changes.
827 * thread-db.c (thread_db_load_search): Adjust to
828 dirnames_to_char_ptr_vec changes.
830 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
832 * target.h (target_enable_btrace, target_disable_btrace)
833 (target_read_btrace, target_read_btrace_conf): Turn macro into
834 inline function. Throw error if target method is not defined.
835 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
836 check for btrace target method. Be prepared to handle exceptions
837 from btrace target methods.
839 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
841 * server.c (captured_main): Change order of error message printed
842 when the current working directory cannot be found.
844 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
846 * server.c: Include "filenames.h" and "pathstuff.h".
847 (program_name): Delete variable.
848 (program_path): New anonymous class.
849 (get_exec_wrapper): Use "program_path" instead of
851 (handle_v_run): Likewise.
852 (captured_main): Likewise.
853 (process_serial_event): Likewise.
855 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
857 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
858 (OBJS): Add "pathstuff.o".
859 * server.c (current_directory): New global variable.
860 (captured_main): Initialize "current_directory".
862 2018-02-26 Alan Hayward <alan.hayward@arm.com>
864 * tdesc.c: Use common/tdesc.h.
867 2018-02-20 Alan Hayward <alan.hayward@arm.com>
868 Simon Marchi <simon.marchi@ericsson.com>
870 * Makefile.in: Switch order of make rules.
872 2018-02-19 Alan Hayward <alan.hayward@arm.com>
874 * Makefile.in: Add common directory in build.
875 * configure.ac: Add common reference.
876 * configure: Regenerate.
878 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
880 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
881 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
882 * spu-low.c (spu_target_ops): Likewise.
883 * win32-low.c (win32_target_ops): Likewise.
884 * server.c (supported_btrace_packets): Report packets unconditionally.
885 * target.h (target_ops) <supports_btrace>: Remove.
886 (target_supports_btrace): Remove.
888 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
890 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
891 (handle_btrace_disable): Change return type to void. Use exceptions
893 (handle_btrace_general_set): Catch exception and copy message to
896 2018-02-08 Tom Tromey <tom@tromey.com>
898 * linux-low.c (install_software_single_step_breakpoints): Use
900 * inferiors.c (make_cleanup_restore_current_thread): Remove.
901 (do_restore_current_thread_cleanup): Remove.
902 * gdbthread.h (make_cleanup_restore_current_thread): Don't
905 2018-02-08 Tom Tromey <tom@tromey.com>
907 * mem-break.c (set_raw_breakpoint_at): Use
908 gdb::unique_xmalloc_ptr.
910 2018-01-30 Pedro Alves <palves@redhat.com>
913 * target.c (target_terminal::terminal_state): Rename to ...
914 (target_terminal::m_terminal_state): ... this.
916 2018-01-19 James Clarke <jrtc27@jrtc27.com>
918 * linux-low.c (handle_extended_wait): Surround call to
919 thread_db_notice_clone with #ifdef USE_THREAD_DB.
921 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
923 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
924 linux_ptrace_attach_fail_reason_string now returning an
926 (linux_attach): Likewise.
927 * thread-db.c (attach_thread): Likewise.
929 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
932 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
933 checking for fs_base/gs_base fields in struct user_regs_struct.
934 * configure: Regenerate.
936 2018-01-16 Yao Qi <yao.qi@linaro.org>
939 * linux-low.c (fetch_register): Call supply_register instead of
942 2018-01-08 Yao Qi <yao.qi@linaro.org>
943 Simon Marchi <simon.marchi@ericsson.com>
945 * Makefile.in (OBS): Remove selftest.o.
946 * configure.ac: Set srv_selftest_objs if $development is true.
947 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
948 * configure: Re-generated.
949 * server.c (captured_main): Wrap variable selftest_filter with
952 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
954 * server.c (parse_debug_format_options): Return std::string.
955 (handle_monitor_command, captured_main): Adjust.
957 2018-01-05 Pedro Alves <palves@redhat.com>
960 * server.c (captured_main): Pass quiet=false to
961 save_original_signals_state.
963 2018-01-01 Joel Brobecker <brobecker@adacore.com>
965 * gdbreplay.c (gdbreplay_version): Update copyright year in
967 * server.c (gdbserver_version): Likewise.
969 2017-12-08 Tom Tromey <tom@tromey.com>
971 * ax.c (ax_printf): Update.
973 2017-12-07 Yao Qi <yao.qi@linaro.org>
975 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
976 aarch64_linux_read_description.
977 * linux-amd64-ipa.c (idx2mask): New array.
978 (get_ipa_tdesc): Move idx2mask out.
979 (initialize_low_tracepoint): Initialize target descriptions.
980 * linux-i386-ipa.c (idx2mask): New array.
981 (get_ipa_tdesc): Move idx2mask out.
982 (initialize_low_tracepoint): Initialize target descriptions.
984 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
986 * tdesc.c (struct tdesc_type): Change return type.
987 (tdesc_add_flag): Change parameter type.
988 (tdesc_add_bitfield): Likewise.
989 (tdesc_add_field): Likewise.
990 (tdesc_set_struct_size): Likewise.
992 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
994 * regcache.c (registers_to_string): Remove unused variable.
996 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
998 * inferiors.c (for_each_inferior_with_data): Remove.
999 * inferiors.h (for_each_inferior_with_data): Remove.
1000 * server.c (handle_qxfer_threads_worker): Change parameter type.
1001 (handle_qxfer_threads_proper): Use for_each_thread.
1003 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1005 * inferiors.c (for_each_inferior): Remove.
1006 (clear_inferiors): Use for_each_thread.
1007 * inferiors.h (for_each_inferior): Remove.
1008 * linux-low.c (linux_wait_for_event_filtered): Use
1010 (linux_stabilize_threads): Likewise.
1011 * regcache.c (regcache_release): Likewise.
1012 * server.c (gdb_wants_all_threads_stopped): Likewise.
1013 (clear_pending_status_callback): Remove.
1014 (handle_status): Use for_each_thread.
1015 (captured_main): Likewise.
1016 * win32-low.c (child_init_thread_list): Likewise.
1017 (win32_clear_inferiors): Likewise.
1018 (fake_breakpoint_event): Likewise.
1020 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1022 * inferiors.h (find_inferior): Remove.
1023 * inferiors.c (find_inferior): Remove.
1025 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1027 * linux-low.c (resume_status_pending_p): Update comment.
1028 (need_step_over_p): Update comment.
1030 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1032 * linux-low.c (proceed_one_lwp): Return void, change parameter
1034 (unsuspend_and_proceed_one_lwp): Likewise.
1035 (proceed_all_lwps): Use for_each_thread.
1036 (unstop_all_lwps): Likewise.
1038 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1040 * linux-low.c (linux_resume_one_thread): Return void, take
1042 (linux_resume): Use for_each_thread.
1044 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1046 * linux-low.c (send_sigstop_callback): Return void, change
1047 parameter type. Rename to...
1048 (send_sigstop): ... this.
1049 (suspend_and_send_sigstop_callback): Return void, change parameter
1051 (suspend_and_send_sigstop): ... this.
1052 (stop_all_lwps): Use for_each_thread.
1054 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1056 * linux-low.c (lwp_running): Return bool, remove unused
1058 (linux_stabilize_threads): Use find_thread.
1060 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1062 * linux-low.c (select_singlestep_lwp_callback): Remove.
1063 (count_events_callback): Remove.
1064 (select_event_lwp_callback): Remove.
1065 (select_event_lwp): Use find_thread/for_each_thread.
1067 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1069 * linux-low.c (not_stopped_callback): Return bool, take filter
1071 (linux_wait_for_event_filtered): Use find_thread.
1072 (linux_wait_1): Likewise.
1074 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1076 * linux-low.c (same_lwp): Remove.
1077 (find_lwp_pid): Use find_thread.
1079 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1081 * linux-low.c (delete_lwp_callback): Remove.
1082 (linux_mourn): Use for_each_thread.
1084 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1086 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1087 args parameter, don't check for pid.
1088 (linux_detach): Use for_each_thread.
1090 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1092 * linux-low.c (struct counter): Remove.
1093 (second_thread_of_pid_p): Remove.
1094 (last_thread_of_process_p): Use find_thread.
1096 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1098 * inferiors.c (find_inferior_in_random): Remove.
1099 * inferiors.h (find_inferior_in_random): Remove.
1100 * linux-low.c (status_pending_p_callback): Return bool, accept
1101 parameter ptid directly.
1102 (linux_wait_for_event_filtered): Use find_thread_in_random.
1103 (linux_wait_1): Likewise.
1105 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1107 * inferiors.c (find_inferior_id): Remove.
1108 (find_thread_ptid): Move implemention from find_inferior_id to
1110 * inferiors.h (find_inferior_id): Remove.
1111 * server.c (handle_status): Use find_thread_ptid.
1112 (process_serial_event): Likewise.
1113 * thread-db.c (find_one_thread): Likewise.
1114 (thread_db_thread_handle): Likewise.
1115 * win32-low.c (thread_rec): Likewise.
1116 (child_delete_thread): Likewise.
1117 (win32_thread_alive): Likewise.
1118 (get_child_debug_event): Likewise.
1120 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1122 * linux-mips-low.c (update_watch_registers_callback): Return
1123 void, remove pid_p parameter, don't check for pid.
1124 (mips_insert_point, mips_remove_point): Use for_each_thread.
1126 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1128 * lynx.low (lynx_delete_thread_callback): Remove.
1129 (lynx_mourn): Use for_each_thread.
1131 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1133 * regcache.c (regcache_invalidate_one): Remove.
1134 (regcache_invalidate_pid): use for_each_thread.
1136 2017-11-26 Tom Tromey <tom@tromey.com>
1138 * linux-low.c (linux_create_inferior): Update.
1140 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1142 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1144 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1146 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1147 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1148 * linux-aarch64-tdesc-selftest.c: New file.
1149 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1151 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1153 * configure.srv: Add new file.
1154 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1155 * linux-aarch64-tdesc-selftest.c: New file.
1156 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1158 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1160 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1161 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1162 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1164 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1166 * configure.srv: Add new files.
1167 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1168 aarch64_linux_read_description.
1169 * linux-aarch64-low.c (aarch64_linux_read_description):
1170 Merge with aarch64_arch_setup.
1171 (aarch64_arch_setup): Call aarch64_linux_read_description.
1172 * linux-aarch64-tdesc.c: New file.
1173 * linux-aarch64-tdesc.h: New file.
1175 2017-11-24 Yao Qi <yao.qi@linaro.org>
1177 * configure.srv: Set $srv_regobj for tic6x-linux.
1178 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1179 (tic6x_read_description): Move some code to tic6x_arch_setup.
1180 (tic6x_tdesc_test): New function.
1181 (initialize_low_arch): Call selftests::register_test.
1183 2017-11-22 Yao Qi <yao.qi@linaro.org>
1185 * remote-utils.c (prepare_resume_reply): Use memcpy.
1187 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1189 * linux-low.c (kill_one_lwp_callback): Return void, take
1190 argument directly, don't filter on pid.
1191 (linux_kill): Use for_each_thread.
1193 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1195 * linux-low.c (need_step_over_p): Return bool, remove dummy
1197 (linux_resume, proceed_all_lwps): Use find_thread.
1199 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1201 * linux-low.c (resume_status_pending_p): Return bool, remove
1203 (linux_resume): Use find_thread.
1205 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1207 * linux-low.c (struct thread_resume_array): Remove.
1208 (linux_set_resume_request): Return void, take arguments
1210 (linux_resume): Use for_each_thread.
1212 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1214 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1215 return bool, remove data argument.
1216 (linux_stabilize_threads): Use find_thread.
1218 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1220 * linux-low.c (unsuspend_one_lwp): Remove.
1221 (unsuspend_all_lwps): Use for_each_thread, inline code from
1224 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1226 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1227 * linux-low.c (struct iterate_over_lwps_args): Remove.
1228 (iterate_over_lwps_filter): Remove.
1229 (iterate_over_lwps): Use find_thread.
1231 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1233 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1234 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1235 code from reset_lwp_ptrace_options_callback.
1237 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1239 * linux-arm-low.c (struct update_registers_data): Remove.
1240 (update_registers_callback): Return void, take arguments
1241 directly, don't check thread's pid.
1242 (arm_insert_point, arm_remove_point): Use for_each_thread.
1244 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1246 * win32-low.c (continue_one_thread): Return void, take argument
1248 (child_continue): Use for_each_thread.
1250 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1252 * win32-i386-low.c (update_debug_registers_callback): Rename
1254 (update_debug_registers): ... this, return void, remove pid_p arg.
1255 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1257 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1259 * inferiors.h (struct process_info): Add constructor, initialize
1261 <syscalls_to_catch>: Change type to std::vector<int>.
1262 * inferiors.c (add_process): Allocate process_info with new.
1263 (remove_process): Free process_info with delete.
1264 * linux-low.c (handle_extended_wait): Adjust.
1265 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1266 * server.c (handle_general_set): Adjust.
1268 2017-11-16 Pedro Alves <palves@redhat.com>
1270 * remote-utils.c (remote_close): Block SIGIO signals instead of
1271 uninstalling the SIGIO handler.
1273 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1275 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1277 2017-11-16 Yao Qi <yao.qi@linaro.org>
1279 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1280 (tic6x_store_gregset): Likewise.
1281 (tic6x_usrregs_info): Move it up.
1283 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1285 * Makefile.in: Update arch rules.
1286 * configure.srv: Explicitly mark arch/ files.
1288 2017-11-13 Andreas Schwab <schwab@suse.de>
1290 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1292 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1294 2017-11-06 Pedro Alves <palves@redhat.com>
1296 * config.in, configure: Regenerate.
1298 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1300 * target.c (struct thread_search): Remove.
1301 (thread_search_callback): Remove.
1302 (prepare_to_access_memory): Use for_each_thread instead of
1303 find_inferior. Inline code from thread_search_callback.
1305 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1307 * server.c (struct visit_actioned_threads_data): Remove.
1308 (visit_actioned_threads): Change prototype to take arguments
1310 (resume): Use find_thread instead of find_inferior.
1312 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1314 * server.c (queue_stop_reply_callback): Change prototype, return
1316 (find_status_pending_thread_callback): Remove.
1317 (handle_status): Replace find_inferior with find_thread and
1320 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1322 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1324 (aarch64_store_gregset): Likewise.
1325 (aarch64_fill_fpregset): Likewise.
1326 (aarch64_store_fpregset): Likewise.
1328 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1330 * gdbthread.h (find_thread, for_each_thread): New functions.
1331 * inferiors.c (thread_of_pid): Remove.
1332 (find_any_thread_of_pid): Use find_thread.
1333 * linux-low.c (num_lwps): Use for_each_thread.
1335 2017-10-17 Yao Qi <yao.qi@linaro.org>
1337 * Makefile.in: Remove one rule.
1338 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1340 2017-10-17 Yao Qi <yao.qi@linaro.org>
1342 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1343 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1345 2017-10-17 Yao Qi <yao.qi@linaro.org>
1347 * configure.srv: Rename arm.o with arch/arm.o.
1349 2017-10-17 Yao Qi <yao.qi@linaro.org>
1351 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1352 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1353 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1354 (arch-i386.o, arch-amd64.o): Remove rules.
1355 (arch/%.o): New rule.
1356 Update POSTCOMPILE and COMPILE.pre.
1357 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1358 * configure: Re-generated.
1359 * configure.srv: Replace arch-i386.o with arch/i386.o.
1360 Replace arch-amd64.o with arch/amd64.o.
1362 2017-10-16 Yao Qi <yao.qi@linaro.org>
1364 * configure: Regenerated.
1366 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1368 * inferiors.h: (struct inferior_list): Remove.
1369 (struct inferior_list_entry); Remove.
1370 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1371 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1372 get_first_inferior): Remove.
1373 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1374 find_inferior_id, find_inferior_in_random): Change signature.
1375 * inferiors.c (all_threads): Change type to
1376 std::list<thread_info *>.
1377 (get_thread): Remove macro.
1378 (find_inferior, find_inferior_id): Change signature, implement
1380 (find_inferior_in_random): Change signature, implement using
1381 find_thread_in_random.
1382 (for_each_inferior, for_each_inferior_with_data): Change
1383 signature, implement using for_each_thread.
1384 (add_inferior_to_list, remove_inferior): Remove.
1385 (add_thread, get_first_thread, thread_of_pid,
1386 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1387 (get_first_inferior, one_inferior_p, clear_inferior_list):
1389 (clear_inferiors, get_thread_process): Update.
1390 * gdbthread.h: Include <list>.
1391 (struct thread_info) <entry>: Remove field.
1393 (all_threads): Change type to std::list<thread_info *>.
1394 (get_first_inferior): Add doc.
1395 (find_thread, for_each_thread, find_thread_in_random): New
1397 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1398 * linux-arm-low.c (update_registers_callback): Update.
1399 * linux-low.c (second_thread_of_pid_p): Update.
1400 (kill_one_lwp_callback, linux_detach_lwp_callback,
1401 delete_lwp_callback, status_pending_p_callback, same_lwp,
1402 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1403 iterate_over_lwps, not_stopped_callback,
1404 resume_stopped_resumed_lwps, count_events_callback,
1405 select_singlestep_lwp_callback, select_event_lwp_callback,
1406 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1407 suspend_and_send_sigstop_callback, wait_for_sigstop,
1408 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1409 lwp_running, linux_set_resume_request, resume_status_pending_p,
1410 need_step_over_p, start_step_over, linux_resume_one_thread,
1411 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1412 reset_lwp_ptrace_options_callback): Update.
1413 * linux-mips-low.c (update_watch_registers_callback): Update.
1414 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1416 (free_register_cache_thread_one): Remove.
1417 (regcache_release): Update.
1418 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1419 handle_qxfer_threads_worker): Update.
1420 (handle_query): Update, use list iterator.
1421 (visit_actioned_threads, handle_pending_status,
1422 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1423 clear_pending_status_callback, set_pending_status_callback,
1424 find_status_pending_thread_callback, handle_status,
1425 process_serial_event): Update.
1426 * target.c (thread_search_callback): Update.
1427 * thread-db.c (thread_db_get_tls_address): Update.
1428 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1430 * win32-i386-low.c (update_debug_registers_callback): Update.
1431 * win32-low.c (delete_thread_info, child_delete_thread,
1432 continue_one_thread, suspend_one_thread,
1433 get_child_debug_event): Adjust.
1435 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1437 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1438 * inferiors.h: Include <list>.
1439 (struct process_info) <entry>: Remove field.
1441 (pid_of): Change macro to function.
1442 (ptid_of, lwpid_of): Remove macro.
1443 (all_processes): Change type to std::list<process_info *>.
1444 (ALL_PROCESSES): Remove macro.
1445 (for_each_process, find_process): New function.
1446 * inferiors.c (all_processes): Change type to
1447 std::list<process_info *>.
1448 (find_thread_process): Adjust.
1449 (add_process): Likewise.
1450 (remove_process): Likewise.
1451 (find_process_pid): Likewise.
1452 (get_first_process): Likewise.
1453 (started_inferior_callback): Remove.
1454 (have_started_inferiors_p): Adjust.
1455 (attached_inferior_callback): Remove.
1456 (have_attached_inferiors_p): Adjust.
1457 * linux-low.c (check_zombie_leaders): Likewise.
1458 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1459 (x86_linux_update_xmltarget): Adjust.
1460 * server.c (handle_query): Likewise.
1461 (gdb_reattached_process): Remove.
1462 (handle_status): Adjust.
1463 (kill_inferior_callback): Likewise.
1464 (detach_or_kill_inferior): Remove.
1465 (print_started_pid): Likewise.
1466 (print_attached_pid): Likewise.
1467 (detach_or_kill_for_exit): Update.
1468 (process_serial_event): Likewise.
1469 * linux-arm-low.c (arm_new_fork): Likewise.
1471 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1473 * dll.h: Include <list>.
1474 (struct dll_info): Add constructor.
1475 <entry>: Remove field.
1476 (all_dlls): Change type to std::list<dll_info>.
1477 * dll.c: Include <algorithm>.
1478 (get_dll): Remove macro.
1479 (all_dlls): Change type to std::list<dll_info *>.
1480 (free_one_dll): Remove.
1481 (match_dll): Likewise.
1482 (loaded_dll): Adjust.
1483 (unloaded_dll): Adjust to all_dlls type change, use
1484 std::find_if. Inline code from match_dll.
1485 (clear_dlls): Adjust to all_dlls type change.
1486 * server.c (emit_dll_description): Remove.
1487 (handle_qxfer_libraries): Adjust to all_dlls type change,
1488 integrate emit_dll_description's functionality.
1490 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1492 * linux-low.h (struct linux_target_ops) <delete_process>: New
1494 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1495 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1496 (struct linux_target_ops): Add delete_process callback.
1497 * linux-arm-low.c (arm_delete_process): New.
1498 (struct linux_target_ops): Add delete_process callback.
1499 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1500 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1501 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1502 * linux-mips-low.c (mips_linux_delete_process): New.
1503 (struct linux_target_ops): Add delete_process callback.
1504 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1505 * linux-s390-low.c (struct linux_target_ops): Likewise.
1506 * linux-sh-low.c (struct linux_target_ops): Likewise.
1507 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1508 * linux-tile-low.c (struct linux_target_ops): Likewise.
1509 * linux-x86-low.c (x86_linux_delete_process): New.
1510 (struct linux_target_ops): Add delete_process callback.
1511 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1513 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1515 * linux-aarch64-low.c (the_low_target): Add thread delete
1517 * linux-arm-low.c (arm_delete_thread): New function.
1518 (the_low_target): Add thread delete callback.
1519 * linux-bfin-low.c (the_low_target): Likewise.
1520 * linux-crisv32-low.c (the_low_target): Likewise.
1521 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1523 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1525 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1526 * linux-mips-low.c (mips_linux_delete_thread): New function.
1527 (the_low_target): Add thread delete callback.
1528 * linux-ppc-low.c (the_low_target): Likewise.
1529 * linux-s390-low.c (the_low_target): Likewise.
1530 * linux-sh-low.c (the_low_target): Likewise.
1531 * linux-tic6x-low.c (the_low_target): Likewise.
1532 * linux-tile-low.c (the_low_target): Likewise.
1533 * linux-x86-low.c (the_low_target): Likewise.
1534 * linux-xtensa-low.c (the_low_target): Likewise.
1536 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1538 * win32-low.c: Include "common-inferior.h".
1540 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1542 * inferiors.c (set_inferior_cwd): New function.
1543 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1544 (handle_query): Inform that QSetWorkingDir is supported.
1545 * win32-low.c (create_process): Pass the inferior's cwd to
1548 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1550 * inferiors.c (current_inferior_cwd): New global variable.
1551 (get_inferior_cwd): New function.
1552 * inferiors.h (struct process_info) <cwd>: New field.
1554 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1556 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1557 (OBS): Add gdb_tilde_expand.o.
1559 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1561 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1562 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1564 2017-09-29 Pedro Alves <palves@redhat.com>
1566 * ax.c (gdb_parse_agent_expr): Constify.
1567 * ax.h (gdb_parse_agent_expr): Constify.
1568 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1570 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1571 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1572 * remote-utils.h (read_ptid): Constify.
1573 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1574 (process_point_options, process_serial_event): Constify.
1575 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1576 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1577 (cmd_qtbuffer): Constify.
1579 2017-09-29 Pedro Alves <palves@redhat.com>
1581 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1584 2017-09-29 Pedro Alves <palves@redhat.com>
1586 * linux-low.c (handle_extended_wait): Pass parent thread instead
1587 of process to thread_db_notice_clone.
1588 * linux-low.h (thread_db_notice_clone): Replace parent process
1589 parameter with parent thread parameter.
1590 * thread-db.c (find_one_thread): Add comment.
1591 (thread_db_notice_clone): Replace parent process parameter with
1592 parent thread parameter. Temporarily switch to the parent thread.
1594 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1596 * gdbthread.h: Include "common-gdbthread.h".
1597 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1598 "if" when validating the ptid.
1599 * remote-utils.c: Include "gdbthread.h".
1600 (prepare_resume_reply): Use "switch_to_thread".
1601 * target.c (done_accessing_memory): Likewise.
1603 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1605 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1606 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1607 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1608 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1609 s390x-gs-linux64-ipa.o to ipa_obj.
1610 * linux-s390-low.c (HWCAP_S390_GS): New define.
1611 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1613 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1614 (s390_arch_setup): Check for guarded-storage support and choose
1616 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1617 init_registers_s390x_gs_linux64.
1618 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1620 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1621 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1623 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1625 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1627 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1629 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1630 (thread_db_thread_handle): Declare.
1631 * linux-low.c (linux_target_ops): Initialize thread_handle.
1632 * server.c (handle_qxfer_threads_worker): Add support for
1634 * target.h (struct target_ops): Add new function pointer,
1636 (target_thread_handle): Define.
1637 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1639 (thread_db_thread_handle): New function.
1641 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1643 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1644 * linux-low.h (thread_db_notice_clone): Declare.
1645 * thread-db.c (thread_db_notice_clone): New function.
1647 2017-09-21 Pedro Alves <palves@redhat.com>
1649 * server.c (gdb_read_memory, handle_status, process_serial_event)
1650 (handle_serial_event, handle_target_event): Adjust to
1651 set_desired_thread prototype change.
1652 * target.c (set_desired_thread): Remove 'use_general' parameter
1654 * target.h (set_desired_thread): Remove 'use_general' parameter.
1656 2017-09-20 Tom Tromey <tom@tromey.com>
1658 * target.c (target_terminal::terminal_state): Define.
1659 (target_terminal::init): Rename from target_terminal_init.
1660 (target_terminal::inferior): Rename from
1661 target_terminal_inferior.
1662 (target_terminal::ours): Rename from target_terminal_ours.
1663 (target_terminal::ours_for_output, target_terminal::info): New.
1665 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1667 * server.c (accumulate_file_name_length): Remove.
1668 (emit_dll_description): Adjust to std::string change.
1669 (handle_qxfer_libraries): Use std::string to hold document.
1671 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1673 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1674 return type of xml_escape_text.
1675 * server.c (emit_dll_description): Likewise.
1677 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1679 * server.c (captured_main): Accept argument for --selftest.
1680 Update run_tests call.
1681 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1682 when registering selftests.
1684 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1686 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1687 instead of "VEC" for "target_desc.reg_defs".
1688 (regcache_cpy): Likewise.
1689 (registers_to_string): Likewise.
1690 (registers_from_string): Likewise.
1691 (find_regno): Likewise.
1692 (supply_regblock): Likewise.
1693 (regcache_raw_read_unsigned): Likewise.
1694 * tdesc.c (init_target_desc): Likewise.
1695 (tdesc_create_reg): Likewise.
1696 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1697 (struct target_desc) <reg_defs>: Convert to "std::vector".
1698 (target_desc): Do not initialize "reg_defs".
1699 (~target_desc): Update code to use "std::vector" instead of "VEC"
1700 for "target_desc.reg_defs".
1701 (operator==): Likewise.
1703 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1705 * inferiors.h (thread_to_gdb_id): Remove.
1706 * inferiors.c (thread_to_gdb_id): Remove.
1707 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1708 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1709 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1711 * nto-low.c (nto_fetch_registers, nto_store_registers,
1712 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1714 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1716 * inferiors.h (gdb_id_to_thread_id): Remove.
1717 * inferiors.c (gdb_id_to_thread_id): Remove.
1718 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1719 removal. Move pid declaration closer to where it's used.
1721 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1723 * server.c (handle_detach): New function.
1724 (process_serial_event): Move code out, call handle_detach.
1726 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1728 * server.c (require_running): Rename to ...
1729 (require_running_or_return): ... this ...
1730 (require_running_or_break): ... and this.
1731 (handle_query, process_serial_event): Adjust.
1733 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1735 * linux-low.c (linux_set_resume_request): Remove unused
1738 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1740 * server.c (first_thread_of): Remove.
1741 (process_serial_event): Replace usage of first_thread_of with
1742 find_any_thread_of_pid.
1743 * tracepoint.c (same_process_p): Remove.
1744 (gdb_agent_about_to_close): Replace usage of same_process_p with
1745 find_any_thread_of_pid.
1746 * linux-x86-low.c (same_process_callback): Remove.
1747 (x86_arch_setup_process_callback): Replace usage of
1748 same_process_callback with find_any_thread_of_pid.
1749 * thread-db.c (any_thread_of): Remove.
1750 (switch_to_process): Replace usage of any_thread_of with
1751 find_any_thread_of_pid.
1752 * inferiors.c (thread_pid_matches_callback): Remove.
1753 (find_thread_process): Adjust to use find_any_thread_of_pid.
1755 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1757 * regcache.c (get_thread_regcache): Guard calls to "memset"
1760 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1762 * linux-low.c (handle_extended_wait): Use
1763 "allocate_target_description" instead of "XNEW".
1764 * linux-x86-low.c (initialize_low_arch): Likewise.
1766 2017-09-05 Yao Qi <yao.qi@linaro.org>
1768 * configure.srv (srv_i386_regobj): Remove.
1769 (srv_amd64_regobj): Remove.
1770 (srv_regobj): Set it to "" for x86 non-linux targets.
1771 * linux-x86-tdesc.c (i386_linux_read_description):
1772 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1773 (init_registers_i386): Remove the declaration.
1774 (tdesc_i386): Remove the declaration.
1775 (lynx_i386_arch_setup): Call i386_create_target_description.
1776 * nto-x86-low.c: Likewise.
1777 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1778 [!__x86_64__]: include arch/i386.h.
1779 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1781 2017-09-05 Yao Qi <yao.qi@linaro.org>
1783 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1784 i386/amd64-XXX-linux from it.
1786 2017-09-05 Yao Qi <yao.qi@linaro.org>
1788 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1790 (ipa_amd64_linux_regobj): Remove.
1791 (ipa_x32_linux_regobj): Remove.
1793 2017-09-05 Yao Qi <yao.qi@linaro.org>
1795 * Makefile.in (arch-amd64.o): New rule.
1796 * configure.srv: Append arch-amd64.o.
1797 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1798 (get_ipa_tdesc): Call amd64_linux_read_description.
1799 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1800 and init_registers_amd64_XXX.
1801 * linux-x86-low.c (x86_linux_read_description): Call
1802 amd64_linux_read_description.
1803 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1804 (initialize_low_arch): Don't call init_registers_x32_XXX and
1805 init_registers_amd64_XXX.
1806 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1807 and tdesc_amd64_XXX.
1808 [__x86_64__] (amd64_tdesc_test): New function.
1809 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1810 and init_registers_amd64_XXX.
1811 * linux-x86-tdesc.c: Include arch/amd64.h.
1812 (xcr0_to_tdesc_idx): New function.
1813 (i386_linux_read_description): New function.
1814 (amd64_get_ipa_tdesc_idx): New function.
1815 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1816 (amd64_get_ipa_tdesc): Declare.
1818 2017-09-05 Yao Qi <yao.qi@linaro.org>
1820 * configure.srv (srv_i386_linux_xmlfiles): Remove
1821 i386/i386-XXX-linux.xml from it.
1823 2017-09-05 Yao Qi <yao.qi@linaro.org>
1825 * configure.srv: Set srv_i386_linux_regobj empty if $development
1827 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1828 initialize_low_tdesc.
1829 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1830 with #if initialize_low_tdesc.
1831 * linux-x86-tdesc-selftest.c: New file.
1832 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1834 2017-09-05 Yao Qi <yao.qi@linaro.org>
1836 * Makefile.in (arch-i386.o): New rule.
1837 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1838 (x86_64-*-linux*): Likewise.
1839 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1840 include arch/i386.h.
1841 (i386_linux_read_description): Remove code and call
1842 i386_create_target_description.
1843 * tdesc.c (allocate_target_description): New function.
1844 * tdesc.h (set_tdesc_architecture): Remove declaration.
1845 (set_tdesc_osabi): Likewise.
1847 2017-09-05 Yao Qi <yao.qi@linaro.org>
1849 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1850 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1851 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1853 * server.c (get_features_xml): Call tdesc_get_features_xml.
1854 * tdesc.c (set_tdesc_architecture): New function.
1855 (set_tdesc_osabi): New function.
1856 (tdesc_get_features_xml): New function.
1857 (tdesc_create_feature): Add an argument.
1858 * tdesc.h (struct target_desc) <features>: New field.
1859 <arch, osabi>: New field.
1860 (~target_desc): xfree features, arch, and osabi.
1861 (target_desc::oerator==): Don't compare .xmltarget.
1862 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1863 (set_tdesc_osabi): Likewise.
1864 (tdesc_get_features_xml): Likewise.
1866 2017-09-05 Yao Qi <yao.qi@linaro.org>
1868 * linux-x86-tdesc.c: Include selftest.h.
1869 (i386_tdesc_test): New function.
1870 (initialize_low_tdesc): Call selftests::register_test.
1871 * tdesc.h: Include regdef.h.
1872 (target_desc): Override operator == and !=.
1874 2017-09-05 Yao Qi <yao.qi@linaro.org>
1876 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1877 (ipa_obj): Likewise.
1878 * linux-i386-ipa.c: Include common/x86-xstate.h
1879 (get_ipa_tdesc): Call i386_linux_read_description.
1880 (initialize_low_tracepoint): Don't call init_registers_XXX
1881 functions, call initialize_low_tdesc instead.
1882 * linux-x86-low.c (x86_linux_read_description): Call
1883 i386_linux_read_description.
1884 (initialize_low_arch): Don't call init_registers_i386_XXX
1885 functions, call initialize_low_tdesc.
1886 * linux-x86-tdesc.c: New file.
1887 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1888 (i386_get_ipa_tdesc_idx): Declare.
1889 (i386_get_ipa_tdesc): Declare.
1890 (initialize_low_tdesc): Declare.
1892 2017-09-05 Yao Qi <yao.qi@linaro.org>
1894 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1897 2017-09-05 Yao Qi <yao.qi@linaro.org>
1899 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1900 * regcache.c (get_thread_regcache): Use VEC_length.
1901 (init_register_cache): Likewise.
1902 (regcache_cpy): Likewise.
1903 (registers_to_string): Iterate reg_defs via VEC_iterate.
1904 (find_regno): Likewise.
1905 (find_register_by_number): Use VEC_index.
1906 (register_size): Call find_register_by_number.
1907 (register_data): Call find_register_by_number.
1908 (supply_regblock): Use VEC_length.
1909 (regcache_raw_read_unsigned): Likewise.
1910 * tdesc.c (init_target_desc): Iterate reg_defs via
1912 (default_description): Update initializer.
1913 (copy_target_description): Don't update field num_registers.
1914 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1915 <num_registers>: Remove.
1917 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1919 * Makefile.in (.SECONDARY): Define target.
1921 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1923 * linux-low.c (linux_wait_1): Adjust.
1924 * server.c (queue_stop_reply_callback): Adjust.
1926 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1928 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1929 QEnvironmentUnset and QEnvironmentReset packets.
1930 (handle_query): Inform remote that QEnvironmentHexEncoded,
1931 QEnvironmentUnset and QEnvironmentReset are supported.
1933 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1935 * inferiors.h (inferior_target_data): Rename to ...
1936 (thread_target_data): ... this.
1937 (inferior_regcache_data): Rename to ...
1938 (thread_regcache_data): ... this.
1939 (set_inferior_regcache_data): Rename to ...
1940 (set_thread_regcache_data): ... this.
1941 * inferiors.c (inferior_target_data): Rename to ...
1942 (thread_target_data): ... this.
1943 (inferior_regcache_data): Rename to ...
1944 (thread_regcache_data): ... this.
1945 (set_inferior_regcache_data): Rename to ...
1946 (set_thread_regcache_data): ... this.
1947 (free_one_thread): Update.
1948 * linux-low.h (get_thread_lwp): Update.
1949 * regcache.c (get_thread_regcache): Update.
1950 (regcache_invalidate_thread): Update.
1951 (free_register_cache_thread): Update.
1952 * win32-i386-low.c (update_debug_registers_callback): Update.
1953 (win32_get_current_dr): Update.
1954 * win32-low.c (thread_rec): Update.
1955 (delete_thread_info): Update.
1956 (continue_one_thread): Update.
1957 (suspend_one_thread): Update.
1959 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1961 * inferiors.c (set_inferior_target_data): Remove.
1962 * inferiors.h (set_inferior_target_data): Remove.
1964 2017-08-18 Yao Qi <yao.qi@linaro.org>
1966 * Makefile.in (OBS): Add selftest.o.
1967 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1968 * configure, config.in: Re-generated.
1969 * server.c: Include common/sefltest.h.
1970 (captured_main): Handle option --selftest.
1972 2017-08-09 Yao Qi <yao.qi@linaro.org>
1974 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1975 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1976 i386-avx-mpx.o and i386-mmx.o.
1977 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1978 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1979 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1980 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1981 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1982 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1983 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1984 i386/amd64-avx-mpx.xml.
1986 2017-08-09 Yao Qi <yao.qi@linaro.org>
1988 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1989 and x32-avx-avx512.o.
1990 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1991 i386/x32-avx-avx512.xml.
1993 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1995 * tracepoint.h (enum class fast_tpoint_collect_result): New
1997 (fast_tracepoint_collecting): Change return type to
1998 fast_tpoint_collect_result.
1999 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2000 * linux-low.h: Include tracepoint.h.
2001 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2002 fast_tpoint_collect_result.
2003 * linux-low.c (handle_tracepoints): Adjust.
2004 (linux_fast_tracepoint_collecting): Change return type to
2005 fast_tpoint_collect_result.
2006 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2007 linux_wait_1, stuck_in_jump_pad_callback,
2008 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2009 proceed_one_lwp): Adjust to type change.
2011 2017-07-10 Yao Qi <yao.qi@linaro.org>
2013 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2015 2017-06-29 Yao Qi <yao.qi@linaro.org>
2017 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2019 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2021 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2023 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2025 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2027 * linux-low.c (linux_create_inferior): Adjust code to access the
2028 environment information via 'gdb_environ' class.
2029 * lynx-low.c (lynx_create_inferior): Likewise.
2030 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2031 (get_environ): Return a pointer to 'our_environ'.
2032 (captured_main): Initialize 'our_environ'.
2033 * server.h (get_environ): Adjust prototype.
2034 * spu-low.c (spu_create_inferior): Adjust code to access the
2035 environment information via 'gdb_environ' class.
2037 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2039 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2040 usage of "register" keyword.
2042 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2044 * configure: Re-generate.
2046 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2048 * configure: Re-generate.
2050 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2052 * Makefile.in (COMPILE.pre): Add "-x c++".
2054 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2056 * fork-child.c: Conditionally include <signal.h>.
2058 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2060 * server.c (handle_general_set): Handle new packet
2061 "QStartupWithShell".
2062 (handle_query): Add "QStartupWithShell" to the list of supported
2064 (gdbserver_usage): Add help text explaining the
2065 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2067 (captured_main): Recognize and act upon the presence of the new
2070 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2071 Pedro Alves <palves@redhat.com>
2073 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2074 * configure: Regenerate.
2075 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2077 (i[34567]86-*-lynxos*): Likewise.
2078 (spu*-*-*): Likewise.
2079 * fork-child.c: New file.
2080 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2082 (linux_ptrace_fun): New function.
2083 (linux_create_inferior): Adjust function prototype to reflect
2084 change on "target.h". Adjust function code to use
2086 (linux_request_interrupt): Delete "signal_pid".
2087 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2088 (lynx_ptrace_fun): New function.
2089 (lynx_create_inferior): Adjust function prototype to reflect
2090 change on "target.h". Adjust function code to use
2092 * nto-low.c (nto_create_inferior): Adjust function prototype and
2093 code to reflect change on "target.h". Update comments.
2094 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2095 "common-terminal.h" and "environ.h".
2096 (terminal_fd): Moved to fork-child.c.
2097 (old_foreground_pgrp): Likewise.
2098 (restore_old_foreground_pgrp): Likewise.
2099 (last_status): Make it global.
2100 (last_ptid): Likewise.
2101 (our_environ): New variable.
2102 (startup_with_shell): Likewise.
2103 (program_name): Likewise.
2104 (program_argv): Rename to...
2105 (program_args): ...this.
2106 (wrapper_argv): New variable.
2107 (start_inferior): Delete function.
2108 (get_exec_wrapper): New function.
2109 (get_exec_file): Likewise.
2110 (get_environ): Likewise.
2111 (prefork_hook): Likewise.
2112 (post_fork_inferior): Likewise.
2113 (postfork_hook): Likewise.
2114 (postfork_child_hook): Likewise.
2115 (handle_v_run): Update code to deal with arguments coming from the
2116 remote host. Update calls from "start_inferior" to
2118 (captured_main): Likewise. Initialize environment variable. Call
2120 * server.h (post_fork_inferior): New prototype.
2121 (get_environ): Likewise.
2122 (last_status): Declare.
2123 (last_ptid): Likewise.
2124 (signal_pid): Likewise.
2125 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2126 (spu_ptrace_fun): New function.
2127 (spu_create_inferior): Adjust function prototype to reflect change
2128 on "target.h". Adjust function code to use "fork_inferior".
2129 * target.c (target_terminal_init): New function.
2130 (target_terminal_inferior): Likewise.
2131 (target_terminal_ours): Likewise.
2132 * target.h: Include <vector>.
2133 (struct target_ops) <create_inferior>: Update prototype.
2134 (create_inferior): Update macro.
2135 * utils.c (gdb_flush_out_err): New function.
2136 * win32-low.c (win32_create_inferior): Adjust function prototype
2137 and code to reflect change on "target.h".
2139 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2141 * inferiors.c (switch_to_thread): New function.
2143 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2145 * Makefile.in (SFILE): Add "common/job-control.c".
2146 (OBS): Add "job-control.o".
2148 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2150 * Makefile: Remove "@host_makefile_frag@".
2152 2017-05-05 Pedro Alves <palves@redhat.com>
2154 * configure: Regenerate.
2156 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2158 * configure: Regenerate.
2160 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2162 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2163 software_single_step change of return type to
2164 std::vector<CORE_ADDR>.
2165 * linux-low.c (install_software_single_step_breakpoints):
2167 * linux-low.h (install_software_single_step_breakpoints):
2170 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2172 * remote-utils.c: Include "gdb_termios.h" instead of
2174 * terminal.h: Delete file.
2176 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2178 * server.c: Include <vector>.
2179 <program_argv, wrapper_argv>: Convert to std::vector.
2180 (start_inferior): Rewrite function to use C++.
2181 (handle_v_run): Likewise. Update code that calculates the argv
2182 based on the vRun packet; use C++.
2183 (captured_main): Likewise.
2185 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2187 * server.c (handle_v_cont): Initialize thread_resume::thread
2190 2017-04-05 Pedro Alves <palves@redhat.com>
2192 * configure: Regenerate.
2194 2017-04-05 Pedro Alves <palves@redhat.com>
2196 * gdbreplay.c (sync_error): Constify.
2197 * linux-x86-low.c (push_opcode): Constify.
2199 2017-04-05 Pedro Alves <palves@redhat.com>
2201 * win32-low.c (get_child_debug_event)
2202 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2203 Report TARGET_WAITKIND_SPURIOUS instead.
2205 2017-04-05 Pedro Alves <palves@redhat.com>
2207 * remote-utils.c (remote_prepare, remote_open): Constify.
2208 * remote-utils.h (remote_prepare, remote_open): Constify.
2209 * server.c (captured_main): Constify 'port' handling.
2211 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2213 * Makefile.in (clean): Clear .deps.
2215 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2217 * .gitignore: Remove generated files, replace with wildcard.
2218 * (clean): Replace removal of generated files with wildcard.
2219 (version.c): Replace with...
2220 (version-generated.c): ...this.
2221 (xml-builtin.c): Replace with...
2222 (xml-builtin-generated.c): ...this.
2223 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2224 (%.c: *regformats*): Replace with...
2225 (%-generated.c: *regformats*): ...this.
2227 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2229 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2230 (xtensa_fill_gregset): Call collect_register_by_name for
2232 (xtensa_store_gregset): Call supply_register_by_name for
2235 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2237 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2238 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2239 (xtensa_store_gregset): Call supply_register for all registers in
2240 a0_regnum..a0_regnum + C0_NREGS range.
2242 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2244 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2245 (ax-ipa.o: ax.c): Remove.
2246 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2247 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2248 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2249 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2250 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2252 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2254 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2255 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2256 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2257 (errors-ipa.o: ../common/errors.c): Remove.
2258 (format-ipa.o: ../common/format.c): Remove.
2259 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2261 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2263 * Makefile.in (%-ipa.o: %.c): New rule.
2264 (tracepoint-ipa.o: tracepoint.c): Remove.
2265 (utils-ipa.o: utils.c): Remove.
2266 (remote-utils-ipa.o: remote-utils.c): Remove.
2267 (regcache-ipa.o: regcache.c): Remove.
2268 (i386-linux-ipa.o: i386-linux.c): Remove.
2269 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2270 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2271 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2272 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2273 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2274 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2275 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2276 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2277 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2278 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2279 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2280 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2281 (aarch64-ipa.o: aarch64.c): Remove.
2282 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2283 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2284 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2285 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2286 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2287 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2288 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2289 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2290 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2291 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2292 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2293 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2294 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2295 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2296 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2297 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2298 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2299 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2300 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2301 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2302 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2303 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2304 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2305 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2306 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2307 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2308 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2309 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2310 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2311 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2312 (tdesc-ipa.o: tdesc.c): Remove.
2313 (x32-linux-ipa.o: x32-linux.c): Remove.
2314 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2315 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2317 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2319 * Makefile.in (%.o: ../arch/%.c): New rule.
2320 (arm.o: ../arch/arm.c): Remove.
2321 (arm-linux.o: ../arch/arm-linux.c): Remove.
2322 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2323 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2325 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2327 * Makefile.in (%.o: ../nat/%.c): New rule.
2328 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2329 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2330 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2331 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2332 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2333 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2334 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2335 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2336 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2337 (linux-personality.o: ../nat/linux-personality.c): Remove.
2338 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2339 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2340 (x86-linux.o: ../nat/x86-linux.c): Remove.
2341 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2342 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2344 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2346 * Makefile.in (%.o: ../common/%.c): New rule.
2347 (signals.o: ../common/signals.c): Remove.
2348 (print-utils.o: ../common/print-utils.c): Remove.
2349 (rsp-low.o: ../common/rsp-low.c): Remove.
2350 (common-utils.o: ../common/common-utils.c): Remove.
2351 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2352 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2353 (vec.o: ../common/vec.c): Remove.
2354 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2355 (xml-utils.o: ../common/xml-utils.c): Remove.
2356 (ptid.o: ../common/ptid.c): Remove.
2357 (buffer.o: ../common/buffer.c): Remove.
2358 (format.o: ../common/format.c): Remove.
2359 (filestuff.o: ../common/filestuff.c): Remove.
2360 (agent.o: ../common/agent.c): Remove.
2361 (errors.o: ../common/errors.c): Remove.
2362 (environ.o: ../common/environ.c): Remove.
2363 (common-debug.o: ../common/common-debug.c): Remove.
2364 (cleanups.o: ../common/cleanups.c): Remove.
2365 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2366 (fileio.o: ../common/fileio.c): Remove.
2367 (common-regcache.o: ../common/common-regcache.c): Remove.
2368 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2369 (new-op.o: ../common/new-op.c): Remove.
2370 (btrace-common.o: ../common/btrace-common.c): Remove.
2372 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2374 * Makefile.in (%.o: ../target/%.c): New rule.
2375 (waitstatus.o: ../target/waitstatus.c): Remove.
2377 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2380 (%.c: ../regformats/%.dat,
2381 (%.c: ../regformats/arm/%.dat,
2382 (%.c: ../regformats/i386/%.dat,
2383 (%.c: ../regformats/rs6000/%.dat): New rules.
2384 (aarch64.c): Remove.
2385 (reg-arm.c): Remove.
2386 (arm-with-iwmmxt.c): Remove.
2387 (arm-with-vfpv2.c): Remove.
2388 (arm-with-vfpv3.c): Remove.
2389 (arm-with-neon.c): Remove.
2390 (reg-bfin.c): Remove.
2391 (reg-cris.c): Remove.
2392 (reg-crisv32.c): Remove.
2394 (i386-linux.c): Remove.
2395 (i386-avx.c): Remove.
2396 (i386-avx-linux.c): Remove.
2397 (i386-avx-avx512.c): Remove.
2398 (i386-avx-avx512-linux.c): Remove.
2399 (i386-mpx.c): Remove.
2400 (i386-mpx-linux.c): Remove.
2401 (i386-avx-mpx-avx512-pku.c): Remove.
2402 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2403 (i386-avx-mpx.c): Remove.
2404 (i386-avx-mpx-linux.c): Remove.
2405 (i386-mmx.c): Remove.
2406 (i386-mmx-linux.c): Remove.
2407 (reg-ia64.c): Remove.
2408 (reg-m32r.c): Remove.
2409 (reg-m68k.c): Remove.
2411 (mips-linux.c): Remove.
2412 (mips-dsp-linux.c): Remove.
2413 (mips64-linux.c): Remove.
2414 (mips64-dsp-linux.c): Remove.
2415 (nios2-linux.c): Remove.
2416 (powerpc-32.c): Remove.
2417 (powerpc-32l.c): Remove.
2418 (powerpc-altivec32l.c): Remove.
2419 (powerpc-cell32l.c): Remove.
2420 (powerpc-vsx32l.c): Remove.
2421 (powerpc-isa205-32l.c): Remove.
2422 (powerpc-isa205-altivec32l.c): Remove.
2423 (powerpc-isa205-vsx32l.c): Remove.
2424 (powerpc-e500l.c): Remove.
2425 (powerpc-64l.c): Remove.
2426 (powerpc-altivec64l.c): Remove.
2427 (powerpc-cell64l.c): Remove.
2428 (powerpc-vsx64l.c): Remove.
2429 (powerpc-isa205-64l.c): Remove.
2430 (powerpc-isa205-altivec64l.c): Remove.
2431 (powerpc-isa205-vsx64l.c): Remove.
2432 (s390-linux32.c): Remove.
2433 (s390-linux32v1.c): Remove.
2434 (s390-linux32v2.c): Remove.
2435 (s390-linux64.c): Remove.
2436 (s390-linux64v1.c): Remove.
2437 (s390-linux64v2.c): Remove.
2438 (s390-te-linux64.c): Remove.
2439 (s390-vx-linux64.c): Remove.
2440 (s390-tevx-linux64.c): Remove.
2441 (s390x-linux64.c): Remove.
2442 (s390x-linux64v1.c): Remove.
2443 (s390x-linux64v2.c): Remove.
2444 (s390x-te-linux64.c): Remove.
2445 (s390x-vx-linux64.c): Remove.
2446 (s390x-tevx-linux64.c): Remove.
2447 (tic6x-c64xp-linux.c): Remove.
2448 (tic6x-c64x-linux.c): Remove.
2449 (tic6x-c62x-linux.c): Remove.
2451 (reg-sparc64.c): Remove.
2452 (reg-spu.c): Remove.
2454 (amd64-linux.c): Remove.
2455 (amd64-avx.c): Remove.
2456 (amd64-avx-linux.c): Remove.
2457 (amd64-avx-avx512.c): Remove.
2458 (amd64-avx-avx512-linux.c): Remove.
2459 (amd64-mpx.c): Remove.
2460 (amd64-mpx-linux.c): Remove.
2461 (amd64-avx-mpx-avx512-pku.c): Remove.
2462 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2463 (amd64-avx-mpx.c): Remove.
2464 (amd64-avx-mpx-linux.c): Remove.
2466 (x32-linux.c): Remove.
2467 (x32-avx.c): Remove.
2468 (x32-avx-linux.c): Remove.
2469 (x32-avx-avx512.c): Remove.
2470 (x32-avx-avx512-linux.c): Remove.
2471 (reg-xtensa.c): Remove.
2472 (reg-tilegx.c): Remove.
2473 (reg-tilegx32.c): Remove.
2475 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2477 * Makefile.in (SFILES): Add "common/environ.c".
2478 (OBJS): Add "common/environ.h".
2480 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2482 * configure.ac: Check if the fs_base and gs_base members of
2483 `struct user_regs_struct' exist.
2484 * config.in: Regenerated.
2485 * configure: Likewise.
2487 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2489 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2491 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2492 (get_next_pcs_syscall_next_pc): Likewise.
2494 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2496 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2497 * nto-x86-low.c: Likewise.
2499 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2501 * Makefile.in: Include disable-implicit-rules.mk.
2503 2016-11-23 Pedro Alves <palves@redhat.com>
2505 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2506 (debug_vprintf): Use std::chrono::steady_clock instead of
2507 gettimeofday. Use '.' instead of ':'.
2508 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2509 (get_timestamp): Use std::chrono::steady_clock instead of
2512 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2514 * Makefile.in: Fix whitespace formatting.
2516 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2518 * Makefile.in (SFILES, OBS): Flatten list and order
2521 2016-11-23 Pedro Alves <palves@redhat.com>
2523 * event-loop.c (handle_file_event): Use warning.
2524 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2525 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2528 2016-11-23 Pedro Alves <palves@redhat.com>
2530 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2532 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2533 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2534 debug_printf and debug_flush for debug output.
2535 * server.c (handle_general_set): Likewise.
2536 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2539 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2541 * Makefile.in (.c.o): Replace rule with ...
2542 (%.o: %.c): ... this one.
2544 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2546 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2547 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2549 * configure.ac: Remove checks for the make program.
2550 * configure: Re-generate.
2552 2016-10-28 Pedro Alves <palves@redhat.com>
2554 * Makefile.in (CXX_DIALECT): Get from configure.
2555 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2556 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2557 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2558 * config.in: Regenerate.
2559 * configure: Regenerate.
2561 2016-10-27 Yao Qi <yao.qi@linaro.org>
2563 * linux-low.c (linux_supports_range_stepping): Return true if
2564 can_software_single_step return true.
2566 2016-10-27 Yao Qi <yao.qi@linaro.org>
2568 * inferiors.c (find_inferior_in_random): New function.
2569 * inferiors.h (find_inferior_in_random): Declare.
2570 * linux-low.c (linux_wait_for_event_filtered): Call
2571 find_inferior_in_random instead of find_inferior.
2573 2016-10-27 Yao Qi <yao.qi@linaro.org>
2575 * linux-low.c (linux_wait_1): If single-step breakpoints are
2576 inserted, remove them.
2578 2016-10-26 Pedro Alves <palves@redhat.com>
2580 * linux-low.c (handle_extended_wait): Link parent/child fork
2582 (linux_wait_1): Unlink them.
2583 (linux_set_resume_request): Ignore resume requests for
2584 already-resumed and unhandled fork child threads.
2585 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2586 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2588 (handle_v_requests) <vCont>: Don't call require_running.
2589 * server.h (in_queued_stop_replies): New declaration.
2591 2016-10-24 Yao Qi <yao.qi@linaro.org>
2594 * linux-aarch64-low.c (append_insns): Cast the return value to
2597 2016-10-10 Yao Qi <yao.qi@linaro.org>
2599 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2601 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2603 * target.c (target_supports_multi_process): New function, moved
2605 * target.h (target_supports_multi_process): ... here. Remove
2608 2016-10-05 Tom Tromey <tom@tromey.com>
2611 * tracepoint.c (handle_tracepoint_bkpts): Check
2612 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2614 2016-10-05 Yao Qi <yao.qi@linaro.org>
2616 * configure.srv: Update the path of arm-*.xml files.
2618 2016-10-05 Terry Guo <terry.guo@arm.com>
2619 Yao Qi <yao.qi@linaro.org>
2621 * Makefile.in: Adjust the path of rules.
2622 * configure.srv: Update the path of xml files.
2623 * regformats/arm-with-iwmmxt.dat: Regenerated.
2624 * regformats/arm-with-neon.dat: Likewise.
2625 * regformats/arm-with-vfpv2.dat: Likewise.
2626 * regformats/arm-with-vfpv3.dat Likewise.
2628 2016-09-30 Yao Qi <yao.qi@linaro.org>
2631 * target.c (target_stop_and_wait): Don't call
2632 target_continue_no_signal, use resume_stop instead.
2634 2016-09-26 Yao Qi <yao.qi@linaro.org>
2636 * linux-low.c (linux_wait_1): Call debug_exit.
2638 2016-09-23 Pedro Alves <palves@redhat.com>
2640 * Makefile.in (SFILES): Add common/new-op.c.
2641 (OBS): Add common/new-op.o.
2642 (new-op.o): New rule.
2644 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2646 * .gitinore: Ignore more files.
2648 2016-09-21 Yao Qi <yao.qi@linaro.org>
2650 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2653 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2655 * server.c (start_inferior): Call target_mourn_inferior instead of
2656 mourn_inferior; pass ptid_t argument to it.
2658 (handle_target_event): Likewise.
2659 * target.c (target_mourn_inferior): New function.
2660 * target.h (mourn_inferior): Delete macro.
2662 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2664 * linux-low.c (lwp_is_stepping): New function.
2666 2016-09-06 Carl Love <cel@us.ibm.com>
2668 * server.c (start_inferior): Fixed comment, requested comment change
2669 didn't get updated correctly. Removed reference to ptrace () call as
2670 it is only true on Linux systems.
2672 2016-09-06 Carl Love <cel@us.ibm.com>
2674 * server.c (start_inferior): Do not call
2675 function target_post_create_inferior () if the
2676 inferior process has already exited.
2678 2016-09-05 Pedro Alves <palves@redhat.com>
2680 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2681 (COMPILE.pre, CC_LD): Use CXX directly.
2682 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2683 * acinclude.m4: Don't include build-with-cxx.m4.
2684 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2685 * configure: Regenerate.
2687 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2690 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2691 call writing data to own_buf.
2693 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2695 * target.c (mywait): Call target_wait instead of
2697 (target_wait): New function.
2699 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2701 * server.c (start_inferior): New variable 'ptid'. Replace calls
2702 to the_target->resume by target_continue{,_no_signal}, depending
2704 * target.c (target_stop_and_wait): Call target_continue_no_signal
2705 instead of the_target->resume.
2706 (target_continue): New function.
2708 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2710 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2712 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2715 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2717 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2718 * linux-arm-low.c (ps_get_thread_area): Likewise.
2719 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2720 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2721 * linux-mips-low.c (ps_get_thread_area): Likewise.
2722 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2723 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2724 * linux-x86-low.c (ps_get_thread_area): Likewise.
2725 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2727 2016-08-19 Pedro Alves <palves@redhat.com>
2729 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2731 2016-08-19 Pedro Alves <palves@redhat.com>
2733 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2734 comment. Use memcpy instead of casting through unsigned long.
2736 2016-08-19 Pedro Alves <palves@redhat.com>
2738 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2739 allocating around 0x80000000.
2741 2016-08-19 Pedro Alves <palves@redhat.com>
2744 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2745 (x32-avx512-linux-ipa.o): New rules.
2746 * configure.ac (x86_64-*-linux*): New x32 check.
2747 * configure.srv (ipa_x32_linux_regobj): New.
2748 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2749 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2751 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2753 * configure: Regenerate.
2755 2016-08-09 Pedro Alves <palves@redhat.com>
2758 * Makefile.in (OBS): Add signals-state-save-restore.o.
2759 (signals-state-save-restore.o): New rule.
2760 * config.in: Regenerate.
2761 * configure: Regenerate.
2762 * linux-low.c: Include "signals-state-save-restore.h".
2763 (linux_create_inferior): Call
2764 restore_original_signals_state.
2765 * server.c: Include "dispositions-save-restore.h".
2766 (captured_main): Call save_original_signals_state.
2768 2016-08-05 Pedro Alves <palves@redhat.com>
2770 * configure: Regenerate.
2772 2016-08-04 Yao Qi <yao.qi@linaro.org>
2774 * linux-low.c (regsets_fetch_inferior_registers): Check
2775 errno is ESRCH or not.
2777 2016-08-02 Yao Qi <yao.qi@linaro.org>
2779 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2780 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2781 (thread_db_load_search): Update.
2782 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2783 td_ta_set_event and td_ta_event_getmsg.
2785 2016-07-26 Pedro Alves <palves@redhat.com>
2788 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2789 of unsigned long for 64-bit registers and use uint32_t instead of
2790 unsigned int for 32-bit registers.
2792 2016-07-26 Pedro Alves <palves@redhat.com>
2794 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2797 2016-07-21 Tom Tromey <tom@tromey.com>
2799 * configure: Rebuild.
2801 2016-07-21 Yao Qi <yao.qi@linaro.org>
2803 * mem-break.c (find_gdb_breakpoint): Cast bp to
2804 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2806 2016-07-21 Yao Qi <yao.qi@linaro.org>
2808 * server.c (handle_v_requests): Support s and S actions
2809 if target_supports_software_single_step return true.
2811 2016-07-21 Yao Qi <yao.qi@linaro.org>
2813 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2814 is resume_step, call maybe_hw_step.
2815 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2817 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2819 (proceed_one_lwp): If resume request is resume_step, install
2820 reinsert breakpoints and call maybe_hw_step.
2822 2016-07-21 Yao Qi <yao.qi@linaro.org>
2824 * linux-low.c (proceed_one_lwp): Declare.
2825 (linux_resume_one_thread): Remove local variable 'step'.
2826 Lift code enqueue signal. Call proceed_one_lwp instead of
2827 linux_resume_one_lwp.
2829 2016-07-21 Yao Qi <yao.qi@linaro.org>
2831 * linux-low.c (linux_resume_one_thread): Call
2832 enqueue_pending_signal.
2834 2016-07-21 Yao Qi <yao.qi@linaro.org>
2836 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2837 * inferiors.c (do_restore_current_thread_cleanup): New function.
2838 (make_cleanup_restore_current_thread): Likewise.
2839 * linux-low.c (install_software_single_step_breakpoints): Call
2840 make_cleanup_restore_current_thread. Switch current_thread to
2843 2016-07-21 Yao Qi <yao.qi@linaro.org>
2845 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2846 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2847 (clone_one_breakpoint): Likewise.
2848 (delete_reinsert_breakpoints): Change parameter to thread.
2850 (has_reinsert_breakpoints): Likewise.
2851 (uninsert_reinsert_breakpoints): Likewise.
2852 (reinsert_reinsert_breakpoints): Likewise.
2853 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2854 (delete_reinsert_breakpoints): Likewise.
2855 (reinsert_reinsert_breakpoints): Likewise.
2856 (uninsert_reinsert_breakpoints): Likewise.
2857 (has_reinsert_breakpoints): Likewise.
2859 2016-07-21 Yao Qi <yao.qi@linaro.org>
2861 * inferiors.c (get_thread_process): Make parameter const.
2862 * inferiors.h (get_thread_process): Update declaration.
2863 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2864 Add new parameters child_thread and parent_thread. Callers
2866 * mem-break.h (clone_all_breakpoints): Update declaration.
2868 2016-07-21 Yao Qi <yao.qi@linaro.org>
2870 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2871 <command_list, handler>: Remove.
2872 (struct gdb_breakpoint): New.
2873 (struct other_breakpoint): New.
2874 (struct reinsert_breakpoint): New.
2875 (is_gdb_breakpoint): New function.
2876 (any_persistent_commands): Update command_list if
2877 is_gdb_breakpoint returns true.
2878 (set_breakpoint): Create breakpoints according to their types.
2879 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2880 (set_gdb_breakpoint_1): Likewise.
2881 (set_gdb_breakpoint): Likewise.
2882 (clear_breakpoint_conditions): Change parameter type to
2883 'struct gdb_breakpoint *'.
2884 (clear_breakpoint_commands): Likewise.
2885 (clear_breakpoint_conditions_and_commands): Likewise.
2886 (add_condition_to_breakpoint): Likewise.
2887 (add_breakpoint_condition): Likewise.
2888 (add_commands_to_breakpoint): Likewise.
2889 (check_breakpoints): Check other_breakpoint.
2890 (clone_one_breakpoint): Clone breakpopint according to its type.
2891 * mem-break.h (struct gdb_breakpoint): Declare.
2892 (set_gdb_breakpoint): Update declaration.
2893 (clear_breakpoint_conditions_and_commands): Likewise.
2894 (add_breakpoint_condition): Likewise.
2895 (add_breakpoint_commands): Likewise.
2896 * server.c (process_point_options): Change parameter type to
2897 'struct gdb_breakpoint *'.
2899 2016-07-21 Yao Qi <yao.qi@linaro.org>
2901 * mem-break.c (set_breakpoint_at): Rename it to ...
2902 (set_breakpoint_type_at): ... it.
2903 (set_breakpoint_at): Call set_breakpoint_type_at.
2904 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2905 * mem-break.h (set_breakpoint_at): Update comments.
2907 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2909 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2911 (nios2_store_gregset): Likewise.
2913 2016-07-01 Pedro Alves <palves@redhat.com>
2914 Antoine Tremblay <antoine.tremblay@ericsson.com>
2916 * linux-low.c: Change interface to take the target lwp_info
2917 pointer directly and return void. Handle detaching from a zombie
2919 (linux_detach_lwp_callback): New function.
2920 (linux_detach): Detach from the leader thread after detaching from
2923 2016-06-28 Yao Qi <yao.qi@linaro.org>
2925 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2926 for variable new_offset.
2927 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2928 (aarch64_ftrace_insn_reloc_cb): Likewise.
2929 (aarch64_ftrace_insn_reloc_tb): Likewise.
2930 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2931 PRIx64 instead of PRIx32.
2933 2016-06-28 Yao Qi <yao.qi@linaro.org>
2935 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2936 (the_low_target): Install arm_get_syscall_trapinfo.
2938 2016-06-28 Yao Qi <yao.qi@linaro.org>
2940 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2942 (the_low_target): Install aarch64_get_syscall_trapinfo.
2944 2016-06-28 Yao Qi <yao.qi@linaro.org>
2946 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2948 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2949 Remove parameter sysno.
2950 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2953 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2955 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2956 (s390_emit_ne_goto): Likewise.
2957 (s390_emit_lt_goto): Likewise.
2958 (s390_emit_le_goto): Likewise.
2959 (s390_emit_gt_goto): Likewise.
2960 (s390_emit_ge_goto): Likewise.
2961 (s390x_emit_eq_goto): Likewise.
2962 (s390x_emit_ne_goto): Likewise.
2963 (s390x_emit_lt_goto): Likewise.
2964 (s390x_emit_le_goto): Likewise.
2965 (s390x_emit_gt_goto): Likewise.
2966 (s390x_emit_ge_goto): Likewise.
2967 (s390_emit_ops_impl): Mark variable static.
2968 (s390x_emit_ops): Likewise.
2970 2016-06-17 Yao Qi <yao.qi@linaro.org>
2972 * linux-low.c (handle_extended_wait): Call
2973 uninsert_reinsert_breakpoints for the parent process. Remove
2974 reinsert breakpoints from the child process. Reinsert them to
2975 the parent process when vfork is done.
2976 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2977 (reinsert_reinsert_breakpoints): New function.
2978 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2979 (reinsert_reinsert_breakpoints): Declare.
2981 2016-06-17 Yao Qi <yao.qi@linaro.org>
2983 * linux-low.c (handle_extended_wait): If the parent is doing
2984 step-over, remove the reinsert breakpoints from the forked child.
2986 2016-06-17 Yao Qi <yao.qi@linaro.org>
2988 * linux-low.c (unsuspend_all_lwps): Declare.
2989 (linux_low_filter_event): If thread exited, call finish_step_over.
2990 If step-over is finished, unsuspend other threads.
2992 2016-06-17 Yao Qi <yao.qi@linaro.org>
2994 * linux-low.c (linux_resume_one_lwp_throw): Assert
2995 has_reinsert_breakpoints returns false.
2996 * mem-break.c (delete_disabled_breakpoints): Assert
2997 bp type isn't reinsert_breakpoint.
2999 2016-06-17 Yao Qi <yao.qi@linaro.org>
3001 * linux-low.c (maybe_hw_step): New function.
3002 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3003 (finish_step_over): Switch current_thread to lwp temporarily,
3004 and assert has_reinsert_breakpoints returns true.
3005 (proceed_one_lwp): Call maybe_hw_step.
3006 * mem-break.c (has_reinsert_breakpoints): New function.
3007 * mem-break.h (has_reinsert_breakpoints): Declare.
3009 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3011 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3013 2016-05-17 Yao Qi <yao.qi@linaro.org>
3015 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3016 instead of find_inferior.
3018 2016-05-05 Yao Qi <yao.qi@linaro.org>
3020 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3021 Initialize res to zero.
3023 2016-05-05 Yao Qi <yao.qi@linaro.org>
3025 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3028 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3030 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3031 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3032 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3034 2016-04-28 Par Olsson <par.olsson@windriver.com>
3035 Simon Marchi <simon.marchi@ericsson.com>
3037 * tracepoint.c (write_inferior_int8): New function.
3038 (cmd_qtenable_disable): Write enable flag using
3039 write_inferior_int8.
3041 2016-04-25 Yao Qi <yao.qi@linaro.org>
3043 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3044 (need_step_over_p): Return zero if the LWP has pending signals
3045 can be delivered on software single step target.
3047 2016-04-25 Yao Qi <yao.qi@linaro.org>
3049 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3050 return instead of error.
3052 2016-04-22 Yao Qi <yao.qi@linaro.org>
3054 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3057 2016-04-22 Yao Qi <yao.qi@linaro.org>
3059 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3060 signal when stepping over breakpoint with software single
3063 2016-04-21 Pedro Alves <palves@redhat.com>
3065 * linux-s390-low.c (s390_collect_ptrace_register)
3066 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3068 (s390_check_regset): Use void * instead of gdb_byte *.
3070 2016-04-20 Pedro Alves <palves@redhat.com>
3072 * configure: Renegerate.
3074 2016-04-20 Yao Qi <yao.qi@linaro.org>
3076 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3077 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3079 (arm_store_gregset): Likewise.
3081 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3083 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3084 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3085 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3086 (amd64-avx-mpx-linux.c): New rules.
3087 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3088 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3089 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3090 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3091 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3092 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3093 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3094 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3095 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3096 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3097 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3098 * linux-x86-low.c (x86_linux_read_description): Add case for
3099 X86_XSTATE_AVX_MPX_MASK.
3100 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3101 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3102 init_registers_i386_avx_mpx_linux.
3103 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3104 (initialize_low_tracepoint): Call
3105 init_registers_i386_avx_mpx_linux.
3106 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3107 (initialize_low_tracepoint): Call
3108 init_registers_amd64_avx_mpx_linux.
3109 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3110 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3111 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3114 2016-04-18 Pedro Alves <palves@redhat.com>
3116 * configure: Regenerate.
3118 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3120 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3121 (aarch64_emit_sub): Likewise.
3123 2016-04-12 Pedro Alves <palves@redhat.com>
3125 * utils.c (prepare_to_throw_exception): Delete.
3127 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3129 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3131 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3133 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3135 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3137 * linux-aarch64-ipa.c: Add <elf.h> include.
3138 * linux-ppc-ipa.c: Add <elf.h> include.
3139 * linux-s390-ipa.c: Add <elf.h> include.
3141 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3143 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3144 (get_raw_reg_ptr): Likewise.
3145 (get_trace_state_variable_value_ptr): Likewise.
3146 (set_trace_state_variable_value_ptr): Likewise.
3147 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3150 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3151 Marcin Kościelnicki <koriakin@0x04.net>
3154 * linux-ppc-low.c (emit_insns): New function.
3155 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3156 (ppc_emit_prologue): New function.
3157 (ppc_emit_epilogue): New function.
3158 (ppc_emit_add): New function.
3159 (ppc_emit_sub): New function.
3160 (ppc_emit_mul): New function.
3161 (ppc_emit_lsh): New function.
3162 (ppc_emit_rsh_signed): New function.
3163 (ppc_emit_rsh_unsigned): New function.
3164 (ppc_emit_ext): New function.
3165 (ppc_emit_zero_ext): New function.
3166 (ppc_emit_log_not): New function.
3167 (ppc_emit_bit_and): New function.
3168 (ppc_emit_bit_or): New function.
3169 (ppc_emit_bit_xor): New function.
3170 (ppc_emit_bit_not): New function.
3171 (ppc_emit_equal): New function.
3172 (ppc_emit_less_signed): New function.
3173 (ppc_emit_less_unsigned): New function.
3174 (ppc_emit_ref): New function.
3175 (ppc_emit_const): New function.
3176 (ppc_emit_reg): New function.
3177 (ppc_emit_pop): New function.
3178 (ppc_emit_stack_flush): New function.
3179 (ppc_emit_swap): New function.
3180 (ppc_emit_stack_adjust): New function.
3181 (ppc_emit_call): New function.
3182 (ppc_emit_int_call_1): New function.
3183 (ppc_emit_void_call_2): New function.
3184 (ppc_emit_if_goto): New function.
3185 (ppc_emit_goto): New function.
3186 (ppc_emit_eq_goto): New function.
3187 (ppc_emit_ne_goto): New function.
3188 (ppc_emit_lt_goto): New function.
3189 (ppc_emit_le_goto): New function.
3190 (ppc_emit_gt_goto): New function.
3191 (ppc_emit_ge_goto): New function.
3192 (ppc_write_goto_address): New function.
3193 (ppc_emit_ops_impl): New static variable.
3194 (ppc64v1_emit_prologue): New function.
3195 (ppc64v2_emit_prologue): New function.
3196 (ppc64_emit_epilogue): New function.
3197 (ppc64_emit_add): New function.
3198 (ppc64_emit_sub): New function.
3199 (ppc64_emit_mul): New function.
3200 (ppc64_emit_lsh): New function.
3201 (ppc64_emit_rsh_signed): New function.
3202 (ppc64_emit_rsh_unsigned): New function.
3203 (ppc64_emit_ext): New function.
3204 (ppc64_emit_zero_ext): New function.
3205 (ppc64_emit_log_not): New function.
3206 (ppc64_emit_bit_and): New function.
3207 (ppc64_emit_bit_or): New function.
3208 (ppc64_emit_bit_xor): New function.
3209 (ppc64_emit_bit_not): New function.
3210 (ppc64_emit_equal): New function.
3211 (ppc64_emit_less_signed): New function.
3212 (ppc64_emit_less_unsigned): New function.
3213 (ppc64_emit_ref): New function.
3214 (ppc64_emit_const): New function.
3215 (ppc64v1_emit_reg): New function.
3216 (ppc64v2_emit_reg): New function.
3217 (ppc64_emit_pop): New function.
3218 (ppc64_emit_stack_flush): New function.
3219 (ppc64_emit_swap): New function.
3220 (ppc64v1_emit_call): New function.
3221 (ppc64v2_emit_call): New function.
3222 (ppc64v1_emit_int_call_1): New function.
3223 (ppc64v2_emit_int_call_1): New function.
3224 (ppc64v1_emit_void_call_2): New function.
3225 (ppc64v2_emit_void_call_2): New function.
3226 (ppc64_emit_if_goto): New function.
3227 (ppc64_emit_eq_goto): New function.
3228 (ppc64_emit_ne_goto): New function.
3229 (ppc64_emit_lt_goto): New function.
3230 (ppc64_emit_le_goto): New function.
3231 (ppc64_emit_gt_goto): New function.
3232 (ppc64_emit_ge_goto): New function.
3233 (ppc64v1_emit_ops_impl): New static variable.
3234 (ppc64v2_emit_ops_impl): New static variable.
3235 (ppc_emit_ops): New function.
3236 (linux_low_target): Wire in ppc_emit_ops.
3238 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3239 Marcin Kościelnicki <koriakin@0x04.net>
3242 * Makefile.in: Add powerpc-*-ipa.o
3243 * configure.srv: Add ipa_obj for powerpc*-linux.
3244 * linux-ppc-ipa.c: New file.
3245 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3247 (PPC_FIELD): New macro.
3248 (PPC_SEXT): New macro.
3249 (PPC_OP6): New macro.
3250 (PPC_BO): New macro.
3251 (PPC_LI): New macro.
3252 (PPC_BD): New macro.
3253 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3254 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3255 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3256 (ppc_get_thread_area): New function.
3257 (is_elfv2_inferior): New function.
3258 (gen_ds_form): New function.
3259 (GEN_STD): New macro.
3260 (GEN_STDU): New macro.
3261 (GEN_LD): New macro.
3262 (GEN_LDU): New macro.
3263 (gen_d_form): New function.
3264 (GEN_ADDI): New macro.
3265 (GEN_ADDIS): New macro.
3266 (GEN_LI): New macro.
3267 (GEN_LIS): New macro.
3268 (GEN_ORI): New macro.
3269 (GEN_ORIS): New macro.
3270 (GEN_LWZ): New macro.
3271 (GEN_STW): New macro.
3272 (GEN_STWU): New macro.
3273 (gen_xfx_form): New function.
3274 (GEN_MFSPR): New macro.
3275 (GEN_MTSPR): New macro.
3276 (GEN_MFCR): New macro.
3277 (GEN_MTCR): New macro.
3278 (GEN_SYNC): New macro.
3279 (GEN_LWSYNC): New macro.
3280 (gen_x_form): New function.
3281 (GEN_OR): New macro.
3282 (GEN_MR): New macro.
3283 (GEN_LWARX): New macro.
3284 (GEN_STWCX): New macro.
3285 (GEN_CMPW): New macro.
3286 (gen_md_form): New function.
3287 (GEN_RLDICL): New macro.
3288 (GEN_RLDICR): New macro.
3289 (gen_i_form): New function.
3291 (GEN_BL): New macro.
3292 (gen_b_form): New function.
3293 (GEN_BNE): New macro.
3294 (GEN_LOAD): New macro.
3295 (GEN_STORE): New macro.
3296 (gen_limm): New function.
3297 (gen_atomic_xchg): New function.
3298 (gen_call): New function.
3299 (ppc_relocate_instruction): New function.
3300 (ppc_install_fast_tracepoint_jump_pad): New function.
3301 (ppc_get_min_fast_tracepoint_insn_len): New function.
3302 (ppc_get_ipa_tdesc_idx): New function.
3303 (the_low_target): Wire in the new functions.
3304 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3306 * linux-ppc-tdesc.h: New file.
3308 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3310 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3311 (alloc_jump_pad_buffer): New function.
3312 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3313 (alloc_jump_pad_buffer): New function.
3314 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3315 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3316 (alloc_jump_pad_buffer): New function.
3317 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3318 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3319 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3320 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3322 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3324 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3325 * linux-amd64-ipa.c: Likewise.
3326 * linux-i386-ipa.c: Likewise.
3327 * linux-s390-ipa.c: Likewise.
3328 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3329 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3330 set_trace_state_variable_value_ptr.
3331 (struct ipa_sym_addresses): Likewise.
3332 (symbol_list): Likewise.
3333 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3334 accessing gdb_collect directly.
3335 (gdb_collect_ptr_type): New typedef.
3336 (get_raw_reg_ptr_type): New typedef.
3337 (get_trace_state_variable_value_ptr_type): New typedef.
3338 (set_trace_state_variable_value_ptr_type): New typedef.
3339 (gdb_collect_ptr): New global.
3340 (get_raw_reg_ptr): New global.
3341 (get_trace_state_variable_value_ptr): New global.
3342 (set_trace_state_variable_value_ptr): New global.
3343 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3344 accessing get_raw_reg directly.
3345 (get_get_tsv_func_addr): Likewise for
3346 get_trace_state_variable_value_ptr.
3347 (get_set_tsv_func_addr): Likewise for
3348 set_trace_state_variable_value_ptr.
3349 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3351 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3353 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3355 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3357 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3359 (relocate_instruction): Remove own_buf.
3360 * server.c (own_buf): Make global.
3361 (handle_v_requests): Make global.
3362 * server.h (own_buf): New declaration.
3363 (handle_v_requests): New prototype.
3365 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3368 * linux-s390-low.c (add_insns): New function.
3369 (s390_emit_prologue): New function.
3370 (s390_emit_epilogue): New function.
3371 (s390_emit_add): New function.
3372 (s390_emit_sub): New function.
3373 (s390_emit_mul): New function.
3374 (s390_emit_lsh): New function.
3375 (s390_emit_rsh_signed): New function.
3376 (s390_emit_rsh_unsigned): New function.
3377 (s390_emit_ext): New function.
3378 (s390_emit_log_not): New function.
3379 (s390_emit_bit_and): New function.
3380 (s390_emit_bit_or): New function.
3381 (s390_emit_bit_xor): New function.
3382 (s390_emit_bit_not): New function.
3383 (s390_emit_equal): New function.
3384 (s390_emit_less_signed): New function.
3385 (s390_emit_less_unsigned): New function.
3386 (s390_emit_ref): New function.
3387 (s390_emit_if_goto): New function.
3388 (s390_emit_goto): New function.
3389 (s390_write_goto_address): New function.
3390 (s390_emit_litpool): New function.
3391 (s390_emit_const): New function.
3392 (s390_emit_call): New function.
3393 (s390_emit_reg): New function.
3394 (s390_emit_pop): New function.
3395 (s390_emit_stack_flush): New function.
3396 (s390_emit_zero_ext): New function.
3397 (s390_emit_swap): New function.
3398 (s390_emit_stack_adjust): New function.
3399 (s390_emit_set_r2): New function.
3400 (s390_emit_int_call_1): New function.
3401 (s390_emit_void_call_2): New function.
3402 (s390_emit_eq_goto): New function.
3403 (s390_emit_ne_goto): New function.
3404 (s390_emit_lt_goto): New function.
3405 (s390_emit_le_goto): New function.
3406 (s390_emit_gt_goto): New function.
3407 (s390_emit_ge_goto): New function.
3408 (s390x_emit_prologue): New function.
3409 (s390x_emit_epilogue): New function.
3410 (s390x_emit_add): New function.
3411 (s390x_emit_sub): New function.
3412 (s390x_emit_mul): New function.
3413 (s390x_emit_lsh): New function.
3414 (s390x_emit_rsh_signed): New function.
3415 (s390x_emit_rsh_unsigned): New function.
3416 (s390x_emit_ext): New function.
3417 (s390x_emit_log_not): New function.
3418 (s390x_emit_bit_and): New function.
3419 (s390x_emit_bit_or): New function.
3420 (s390x_emit_bit_xor): New function.
3421 (s390x_emit_bit_not): New function.
3422 (s390x_emit_equal): New function.
3423 (s390x_emit_less_signed): New function.
3424 (s390x_emit_less_unsigned): New function.
3425 (s390x_emit_ref): New function.
3426 (s390x_emit_if_goto): New function.
3427 (s390x_emit_const): New function.
3428 (s390x_emit_call): New function.
3429 (s390x_emit_reg): New function.
3430 (s390x_emit_pop): New function.
3431 (s390x_emit_stack_flush): New function.
3432 (s390x_emit_zero_ext): New function.
3433 (s390x_emit_swap): New function.
3434 (s390x_emit_stack_adjust): New function.
3435 (s390x_emit_int_call_1): New function.
3436 (s390x_emit_void_call_2): New function.
3437 (s390x_emit_eq_goto): New function.
3438 (s390x_emit_ne_goto): New function.
3439 (s390x_emit_lt_goto): New function.
3440 (s390x_emit_le_goto): New function.
3441 (s390x_emit_gt_goto): New function.
3442 (s390x_emit_ge_goto): New function.
3443 (s390_emit_ops): New function.
3444 (struct linux_target_ops): Fill in emit_ops hook.
3446 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3449 * Makefile.in: Add s390 IPA files.
3450 * configure.srv: Build IPA for s390.
3451 * linux-s390-ipa.c: New file.
3452 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3453 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3454 (tdesc_s390_linux32): Likewise.
3455 (init_registers_s390_linux32v1): Likewise.
3456 (tdesc_s390_linux32v1): Likewise.
3457 (init_registers_s390_linux32v2): Likewise.
3458 (tdesc_s390_linux32v2): Likewise.
3459 (init_registers_s390_linux64): Likewise.
3460 (tdesc_s390_linux64): Likewise.
3461 (init_registers_s390_linux64v1): Likewise.
3462 (tdesc_s390_linux64v1): Likewise.
3463 (init_registers_s390_linux64v2): Likewise.
3464 (tdesc_s390_linux64v2): Likewise.
3465 (init_registers_s390_te_linux64): Likewise.
3466 (tdesc_s390_te_linux64): Likewise.
3467 (init_registers_s390_vx_linux64): Likewise.
3468 (tdesc_s390_vx_linux64): Likewise.
3469 (init_registers_s390_tevx_linux64): Likewise.
3470 (tdesc_s390_tevx_linux64): Likewise.
3471 (init_registers_s390x_linux64): Likewise.
3472 (tdesc_s390x_linux64): Likewise.
3473 (init_registers_s390x_linux64v1): Likewise.
3474 (tdesc_s390x_linux64v1): Likewise.
3475 (init_registers_s390x_linux64v2): Likewise.
3476 (tdesc_s390x_linux64v2): Likewise.
3477 (init_registers_s390x_te_linux64): Likewise.
3478 (tdesc_s390x_te_linux64): Likewise.
3479 (init_registers_s390x_vx_linux64): Likewise.
3480 (tdesc_s390x_vx_linux64): Likewise.
3481 (init_registers_s390x_tevx_linux64): Likewise.
3482 (tdesc_s390x_tevx_linux64): Likewise.
3483 (have_hwcap_s390_vx): New static variable.
3484 (s390_arch_setup): Fill have_hwcap_s390_vx.
3485 (s390_get_thread_area): New function.
3486 (s390_ft_entry_gpr_esa): New const.
3487 (s390_ft_entry_gpr_zarch): New const.
3488 (s390_ft_entry_misc): New const.
3489 (s390_ft_entry_fr): New const.
3490 (s390_ft_entry_vr): New const.
3491 (s390_ft_main_31): New const.
3492 (s390_ft_main_64): New const.
3493 (s390_ft_exit_fr): New const.
3494 (s390_ft_exit_vr): New const.
3495 (s390_ft_exit_misc): New const.
3496 (s390_ft_exit_gpr_esa): New const.
3497 (s390_ft_exit_gpr_zarch): New const.
3498 (append_insns): New function.
3499 (s390_relocate_instruction): New function.
3500 (s390_install_fast_tracepoint_jump_pad): New function.
3501 (s390_get_min_fast_tracepoint_insn_len): New function.
3502 (s390_get_ipa_tdesc_idx): New function.
3503 (struct linux_target_ops): Wire in the above functions.
3504 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3505 * linux-s390-tdesc.h: New file.
3507 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3509 * linux-s390-low.c (s390_supports_tracepoints): New function.
3510 (struct linux_target_ops): Fill supports_tracepoints hook.
3512 2016-03-18 Yao Qi <yao.qi@linaro.org>
3514 * linux-low.c (lwp_signal_can_be_delivered): New function.
3515 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3517 2016-03-18 Yao Qi <yao.qi@linaro.org>
3519 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3520 0 if signal is enqueued. Remove 'signal' from one debugging
3521 message. Move one debugging message to some lines below.
3522 Remove code setting 'signal' to 0.
3524 2016-03-18 Yao Qi <yao.qi@linaro.org>
3526 * linux-low.c (linux_low_filter_event): Remove redundant
3527 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3529 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3531 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3532 (struct linux_target_ops): Wire in the above.
3534 2016-03-03 Yao Qi <yao.qi@linaro.org>
3536 * linux-low.c: Update comments to start_step_over.
3538 2016-03-03 Yao Qi <yao.qi@linaro.org>
3541 * linux-low.c (handle_extended_wait): Set child suspended
3542 if event_lwp->bp_reinsert isn't zero.
3544 2016-03-02 Yao Qi <yao.qi@linaro.org>
3546 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3547 enqueue_pending_signal.
3549 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3551 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3554 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3556 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3557 (s390_regmap_3264) [!__s390x__]: New global.
3558 (s390_collect_ptrace_register): Skip map entries containing -1.
3559 (s390_supply_ptrace_register): Ditto.
3560 (s390_fill_gprs_high): New function.
3561 (s390_store_gprs_high): New function.
3562 (s390_regsets): Add NT_S390_HIGH_GPRS.
3563 (s390_get_hwcap): Enable on 31-bit.
3564 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3565 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3566 Detect NT_S390_HIGH_GPRS.
3567 (s390_usrregs_info_3264): Enable on 31-bit.
3568 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3569 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3571 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3574 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3575 * configure.srv: Ditto.
3576 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3577 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3578 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3579 (init_registers_amd64_linux): Remove prototype.
3580 (tdesc_amd64_linux): Remove declaration.
3581 (get_ipa_tdesc): New function.
3582 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3583 initialize remaining tdescs.
3584 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3585 (init_registers_i386_linux): Remove prototype.
3586 (tdesc_i386_linux): Remove declaration.
3587 (get_ipa_tdesc): New function.
3588 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3589 initialize remaining tdescs.
3590 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3591 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3592 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3593 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3594 (x86_get_ipa_tdesc_idx): New function.
3595 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3596 * linux-x86-tdesc.h: New file.
3597 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3598 (target_get_ipa_tdesc_idx): New macro.
3599 * tracepoint.c (ipa_tdesc_idx): New macro.
3600 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3601 (symbol_list): Add ipa_tdesc_idx.
3602 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3603 (ipa_tdesc): Remove.
3604 (ipa_tdesc_idx): New variable.
3605 (get_context_regcache): Use get_ipa_tdesc.
3606 (gdb_collect): Ditto.
3608 * tracepoint.h (get_ipa_tdesc): New prototype.
3609 (ipa_tdesc): Remove.
3611 2016-02-24 Pedro Alves <palves@redhat.com>
3613 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3614 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3615 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3616 Factor out common code between the USE_SIGTRAP_SIGINFO and
3617 !USE_SIGTRAP_SIGINFO blocks.
3618 (linux_low_filter_event): Call save_stop_reason instead of
3619 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3621 (linux_wait_1): Update comments.
3623 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3625 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3626 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3627 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3628 ppc_insert_point, ppc_remove_point.
3630 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3632 * linux-s390-low.c (s390_supports_z_point_type): New function.
3633 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3635 2016-02-16 Yao Qi <yao.qi@linaro.org>
3637 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3638 PC. Get pc from regcache_read_pc.
3640 2016-02-12 Yao Qi <yao.qi@linaro.org>
3642 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3643 or linux_get_pc_32bit.
3644 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3646 2016-02-12 Yao Qi <yao.qi@linaro.org>
3648 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3649 arm_linux_get_next_pcs_fixup.
3651 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3653 * tracepoint.c (x_tracepoint_action_download): Change
3654 write_inferior_data_ptr to write_inferior_data_pointer.
3655 (cmd_qtstart): Likewise.
3656 (write_inferior_data_ptr): Remove.
3657 (download_agent_expr): Change write_inferior_data_ptr to
3658 write_inferior_data_pointer.
3659 (download_tracepoint_1): Likewise.
3660 (download_tracepoint): Likewise.
3661 (download_trace_state_variables): Likewise.
3663 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3664 Marcin Kościelnicki <koriakin@0x04.net>
3666 * tracepoint.c (struct tracepoint_action_ops): Remove.
3667 (struct tracepoint_action): Remove ops.
3668 (m_tracepoint_action_download, r_tracepoint_action_download)
3669 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3670 size and offset accordingly.
3671 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3672 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3673 (tracepoint_action_send, tracepoint_action_download): New functions.
3674 Helpers for trace action handlers.
3675 (add_tracepoint_action): Remove setup actions ops.
3676 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3678 2016-02-10 Yao Qi <yao.qi@linaro.org>
3680 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3682 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3684 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3686 * configure: Regenerate.
3688 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3690 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3691 void * to gdb_byte *.
3692 * linux-low.c (siginfo_fixup): Likewise.
3693 (linux_xfer_siginfo): Likewise.
3694 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3696 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3698 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3700 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3702 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3704 * linux-x86-low.c [__x86_64__]: Include
3705 "nat/amd64-linux-siginfo.h".
3706 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3707 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3708 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3709 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3710 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3711 (cpt_si_fd, si_timerid, si_overrun): Move from
3712 nat/amd64-linux-siginfo.c.
3713 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3715 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3717 * server.c (skip_to_semicolon): Remove.
3718 (process_point_options): Use strchrnul instead of
3721 2016-01-26 Yao Qi <yao.qi@linaro.org>
3723 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3724 * linux-low.c (install_software_single_step_breakpoints): Don't
3725 call regcache_read_pc.
3726 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3729 2016-01-26 Yao Qi <yao.qi@linaro.org>
3731 * linux-low.c (install_software_single_step_breakpoints): Call
3732 regcache_read_pc instead of get_pc.
3734 2016-01-26 Yao Qi <yao.qi@linaro.org>
3736 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3737 (unblock_async_io): Rename to ...
3738 (block_unblock_async_io): ... it. New function.
3739 (enable_async_io): Don't install SIGIO handler. Unblock it
3741 (disable_async_io): Don't ignore SIGIO. Block it instead.
3742 (initialize_async_io): Install SIGIO handler. Don't call
3745 2016-01-26 Yao Qi <yao.qi@linaro.org>
3747 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3748 first character is '\003', call *the_target->request_interrupt.
3750 2016-01-25 Yao Qi <yao.qi@linaro.org>
3752 * remote-utils.c (new_thread_notify): Remove.
3753 (dead_thread_notify): Likewise.
3754 * remote-utils.h (new_thread_notify): Remove declaration.
3755 (dead_thread_notify): Likewise.
3757 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3759 * gdb.trace/pending.exp: Fix expected message on continue.
3761 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3763 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3764 it works properly on big-endian machines where sizeof (CORE_ADDR)
3767 2016-01-21 Pedro Alves <palves@redhat.com>
3769 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3770 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3771 * configure: Regenerate.
3773 2016-01-21 Yao Qi <yao.qi@linaro.org>
3775 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3776 is_thumb and set it according to CPSR saved on the stack.
3777 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3778 arm_sigreturn_next_pc.
3780 2016-01-18 Yao Qi <yao.qi@linaro.org>
3782 * linux-low.c (linux_set_pc_64bit): New function.
3783 (linux_get_pc_64bit): New function.
3784 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3786 * linux-sparc-low.c (debug_threads): Remove declaration.
3787 (sparc_get_pc): Remove.
3788 (the_low_target): Use linux_get_pc_64bit instead of
3790 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3791 (the_low_target): Use linux_get_pc_64bit and
3794 2016-01-18 Yao Qi <yao.qi@linaro.org>
3796 * linux-arm-low.c (debug_threads): Remove declaration.
3797 (arm_get_pc, arm_set_pc): Remove.
3798 (the_low_target): Use linux_get_pc_32bit and
3800 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3801 (the_low_target): Use linux_get_pc_32bit and
3803 * linux-cris-low.c (debug_threads): Remove declaration.
3804 (cris_get_pc, cris_set_pc,): Remove.
3805 (the_low_target): Use linux_get_pc_32bit and
3807 * linux-crisv32-low.c (debug_threads): Remove declaration.
3808 (cris_get_pc, cris_set_pc): Remove.
3809 (the_low_target): Use linux_get_pc_32bit and
3811 * linux-low.c: Include inttypes.h.
3812 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3813 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3814 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3815 (the_low_target): Use linux_get_pc_32bit and
3817 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3818 (the_low_target): Use linux_get_pc_32bit and
3820 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3821 (the_low_target): Use linux_get_pc_32bit and
3823 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3824 (the_low_target): Use linux_get_pc_32bit and
3826 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3827 (the_low_target): Use linux_get_pc_32bit and
3830 2016-01-18 Gary Benson <gbenson@redhat.com>
3832 * configure.ac (AC_FUNC_FORK): New check.
3833 * config.in: Regenerate.
3834 * configure: Likewise.
3836 2016-01-14 Yao Qi <yao.qi@linaro.org>
3838 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3839 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3840 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3841 arm_get_next_pcs_ctor.
3843 2016-01-12 Josh Stone <jistone@redhat.com>
3844 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3846 * inferiors.h: Include "gdb_vecs.h".
3847 (struct process_info): Add syscalls_to_catch.
3848 * inferiors.c (remove_process): Free syscalls_to_catch.
3849 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3850 syscall_return stops.
3851 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3852 * server.c (handle_general_set): Handle QCatchSyscalls.
3853 (handle_query): Report support for QCatchSyscalls.
3854 * target.h (struct target_ops): Add supports_catch_syscall.
3855 (target_supports_catch_syscall): New macro.
3856 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3857 (struct lwp_info): Add syscall_state.
3858 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3859 Maintain syscall_state and syscalls_to_catch across exec.
3860 (get_syscall_trapinfo): New function, proxy to the_low_target.
3861 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3862 (linux_low_filter_event): Toggle syscall_state entry/return for
3863 syscall traps, and set it ignored for all others.
3864 (gdb_catching_syscalls_p): New function.
3865 (gdb_catch_this_syscall_p): New function.
3866 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3867 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3868 (linux_supports_catch_syscall): New function.
3869 (linux_target_ops): Install it.
3870 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3871 (the_low_target): Install it.
3873 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3875 * acinclude.m4: Include new ../warning.m4 file.
3876 * configure: Regenerated.
3877 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3879 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3881 * ax.c (is_goto_target): Mark static.
3882 * linux-low.c (register_addr): Likewise.
3883 (linux_fetch_registers, linux_store_registers): Likewise.
3884 * mem-break.c (any_persistent_commands): Fix old prototype.
3885 (add_commands_to_breakpoint): Mark static.
3886 * regcache.c (find_register_by_name): Delete unused func.
3887 * remote-utils.c (hex_or_minus_one): Mark static.
3888 * server.c (monitor_show_help): Mark static.
3889 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3890 handle_v_requests): Likewise.
3892 2016-01-12 Pedro Alves <palves@redhat.com>
3894 Remove use of the registered trademark symbol throughout.
3896 2016-01-08 Yao Qi <yao.qi@linaro.org>
3898 * remote-utils.c (getpkt): If c is '\003', call target hook
3901 2016-01-06 Yao Qi <yao.qi@linaro.org>
3903 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3904 linux-aarch32-low.c.
3905 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3906 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3907 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3908 (thumb2_breakpoint): Declare.
3909 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3910 linux-aarch32-low.h.
3911 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3912 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3913 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3915 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3917 * gdbreplay.c (gdbreplay_version): Change copyright year in
3919 * server.c (gdbserver_version): Likewise.
3921 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3923 * server.c (crc32_table): Delete.
3924 (crc32): Use libiberty's xcrc32 function.
3926 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3928 * lynx-low.c (lynx_delete_thread_callback): New function.
3929 (lynx_mourn): Properly delete our process and all of its
3930 threads. Remove call to clear_inferiors.
3932 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3934 * target.c (thread_search_callback): Add check that
3935 the thread_stopped target callback is not NULL before
3938 2015-12-21 Yao Qi <yao.qi@linaro.org>
3940 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3943 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3945 * server.c (handle_query): Call target_supports_software_single_step.
3947 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3949 * linux-low.c (single_step): New function.
3950 (linux_resume_one_lwp_throw): Call single_step.
3951 (start_step_over): Likewise.
3953 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3955 * Makefile.in (SFILES): Append arch/arm-linux.c,
3956 arch/arm-get-next-pcs.c.
3957 (arm-linux.o): New rule.
3958 (arm-get-next-pcs.o): New rule.
3959 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3961 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3962 to linux-aarch32-low.c.
3963 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3964 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3965 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3966 (thumb2_breakpoint_len): Likewise.
3967 (arm_is_thumb_mode): Make non-static.
3968 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3969 from linux-aarch32-low.c.
3970 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3971 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3972 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3973 (thumb2_breakpoint_len): Likewise.
3974 (arm_is_thumb_mode): New declaration.
3975 * linux-arm-low.c: Include arch/arm-linux.h
3976 aarch/arm-get-next-pcs.h, sys/syscall.h.
3977 (get_next_pcs_ops): New struct.
3978 (get_next_pcs_addr_bits_remove): New function.
3979 (get_next_pcs_is_thumb): New function.
3980 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3981 (arm_sigreturn_next_pc): Likewise.
3982 (get_next_pcs_syscall_next_pc): Likewise.
3983 (arm_gdbserver_get_next_pcs): Likewise.
3984 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3986 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3987 * server.h: Include gdb_vecs.h.
3989 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3991 * Makefile.in (SFILES): Append common/common-regcache.c.
3992 (OBS): Append common-regcache.o.
3993 (common-regcache.o): New rule.
3994 * regcache.c (init_register_cache): Initialize cache to
3996 (regcache_raw_read_unsigned): New function.
3997 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3998 register_status enum.
4000 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4002 * linux-aarch64-low.c (the_low_targets): Rename
4003 breakpoint_reinsert_addr to get_next_pcs.
4004 * linux-arm-low.c (the_low_targets): Likewise.
4005 * linux-bfin-low.c (the_low_targets): Likewise.
4006 * linux-cris-low.c (the_low_targets): Likewise.
4007 * linux-crisv32-low.c (the_low_targets): Likewise.
4008 * linux-low.c (can_software_single_step): Likewise.
4009 (install_software_single_step_breakpoints): New function.
4010 (start_step_over): Use install_software_single_step_breakpoints.
4011 * linux-low.h: New CORE_ADDR vector.
4012 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4014 * linux-mips-low.c (the_low_targets): Likewise.
4015 * linux-nios2-low.c (the_low_targets): Likewise.
4016 * linux-sparc-low.c (the_low_targets): Likewise.
4018 2015-12-17 Pedro Alves <palves@redhat.com>
4020 * linux-low.c (linux_kill_one_lwp): Remove references to
4022 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4024 (linux_init_signals): Delete.
4025 (initialize_low): Adjust.
4026 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4028 2015-12-16 Pedro Alves <palves@redhat.com>
4030 * configure.ac (compiler warning flags): When testing a
4031 -Wno-foo option, check whether -Wfoo works instead.
4032 * configure: Regenerate.
4034 2015-12-11 Don Breazeal <donb@codesourcery.com>
4036 * server.c (process_serial_event): Don't exit from gdbserver
4037 in remote mode if there are still active inferiors.
4039 2015-12-11 Yao Qi <yao.qi@linaro.org>
4041 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4042 arm_breakpoint_at if the process is 32-bit.
4044 2015-12-11 Yao Qi <yao.qi@linaro.org>
4046 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4049 2015-12-07 Yao Qi <yao.qi@linaro.org>
4051 * configure.srv: Append arm.o to srv_tgtobj for
4052 aarch64*-*-linux* target.
4053 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4054 from linux-arm-low.c.
4055 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4056 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4057 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4058 (thumb2_breakpoint_len): Likewise.
4059 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4060 (arm_breakpoint_kinds): Likewise.
4061 (arm_breakpoint_kind_from_pc): Likewise.
4062 (arm_sw_breakpoint_from_kind): Likewise.
4063 (arm_breakpoint_kind_from_current_state): Likewise.
4064 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4065 (arm_sw_breakpoint_from_kind): Declare.
4066 (arm_breakpoint_kind_from_current_state): Declare.
4067 (arm_breakpoint_at): Declare.
4068 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4069 arm_sw_breakpoint_from_kind if process is 32-bit.
4070 (aarch64_breakpoint_kind_from_pc): New function.
4071 (aarch64_breakpoint_kind_from_current_state): New function.
4072 (the_low_target): Initialize fields breakpoint_kind_from_pc
4073 and breakpoint_kind_from_current_state.
4074 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4075 linux-aarch32-low.c.
4076 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4077 (arm_breakpoint, arm_breakpoint_len): Likewise.
4078 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4079 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4080 (arm_is_thumb_mode): Likewise.
4081 (arm_breakpoint_at): Likewise.
4082 (arm_breakpoint_kind_from_pc): Likewise.
4083 (arm_sw_breakpoint_from_kind): Likewise.
4084 (arm_breakpoint_kind_from_current_state): Likewise.
4087 2015-08-04 Yao Qi <yao.qi@linaro.org>
4089 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4090 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4091 * server.c (extended_protocol): Remove "static".
4092 * server.h (extended_protocol): Declare it.
4094 2015-12-04 Josh Stone <jistone@redhat.com>
4096 * target.h (struct target_ops) <arch_setup>: Rename to ...
4097 (struct target_ops) <post_create_inferior>: ... this.
4098 (target_arch_setup): Rename to ...
4099 (target_post_create_inferior): ... this, calling post_create_inferior.
4100 * server.c (start_inferior): Update target_arch_setup calls to
4101 target_post_create_inferior.
4102 * linux-low.c (linux_low_ptrace_options): Forward declare.
4103 (linux_arch_setup): Update its comment for general use.
4104 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4105 (struct linux_target_ops): Use linux_post_create_inferior.
4106 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4107 to post_create_inferior.
4108 * nto-low.c (struct nto_target_ops): Likewise.
4109 * spu-low.c (struct spu_target_ops): Likewise.
4110 * win32-low.c (struct win32_target_ops): Likewise.
4112 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4114 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4116 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4118 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4119 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4120 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4121 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4122 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4123 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4124 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4125 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4126 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4127 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4128 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4129 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4131 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4133 * linux-low.c (linux_look_up_symbols): Don't call
4134 linux_supports_traceclone.
4135 * linux-low.h (thread_db_init): Remove use_events argument.
4136 * thread-db.c (thread_db_use_event): Remove global variable.
4137 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4138 (struct thread_db) <td_create_bp>: Remove field.
4139 (thread_db_create_event): Remove function.
4140 (thread_db_enable_reporting): Likewise.
4141 (find_one_thread): Don't check for thread_db_use_events.
4142 (attach_thread): Likewise.
4143 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4144 (try_thread_db_load_1): Don't check for thread_db_use_events.
4145 (thread_db_init): Remove use_events argument and thread events
4147 (remove_thread_event_breakpoints): Remove function.
4148 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4150 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4152 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4154 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4155 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4156 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4157 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4158 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4160 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4162 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4163 * linux-low.c (can_hardware_single_step): Use
4164 supports_hardware_single_step.
4165 (can_software_single_step): New function.
4166 (start_step_over): Call can_software_single_step.
4167 (linux_supports_hardware_single_step): New function.
4168 (struct target_ops) <supports_software_single_step>: Initialize.
4169 * linux-low.h (struct linux_target_ops)
4170 <supports_hardware_single_step>: Initialize.
4171 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4172 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4173 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4174 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4175 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4176 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4177 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4178 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4179 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4180 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4182 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4183 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4185 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4186 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4187 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4189 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4190 * target.h (struct target_ops): <supports_software_single_step>:
4192 (target_supports_software_single_step): New macro.
4194 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4196 * linux-low.c (linux_wait_1): Fix pc advance condition.
4197 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4198 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4200 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4202 * linux-arm-low.c (arm_is_thumb_mode): New function.
4203 (arm_breakpoint_at): Use arm_is_thumb_mode.
4204 (arm_breakpoint_kind_from_current_state): New function.
4205 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4207 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4208 (linux_breakpoint_kind_from_current_state): New function.
4209 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4210 * linux-low.h (struct linux_target_ops)
4211 <breakpoint_kind_from_current_state>: New field.
4212 * target.h (struct target_ops): Likewise.
4213 (target_breakpoint_kind_from_current_state): New macro.
4215 2015-11-30 Pedro Alves <palves@redhat.com>
4217 * linux-low.c (linux_resume): Wake up the event loop before
4220 2015-11-30 Pedro Alves <palves@redhat.com>
4222 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4224 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4226 * target.c (struct thread_search): New structure.
4227 (thread_search_callback): New function.
4228 (prev_general_thread): New global.
4229 (prepare_to_access_memory, done_accessing_memory): New functions.
4230 * target.h (prepare_to_access_memory, done_accessing_memory):
4231 Replace macros with function declarations.
4233 2015-11-30 Pedro Alves <palves@redhat.com>
4236 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4237 report TARGET_WAITKIND_NO_RESUMED.
4238 * remote-utils.c (prepare_resume_reply): Handle
4239 TARGET_WAITKIND_NO_RESUMED.
4240 * server.c (report_no_resumed): New global.
4241 (handle_query) <qSupported>: Handle "no-resumed+". Report
4242 "no-resumed+" support.
4243 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4244 return error if the client doesn't support no-resumed events.
4245 (push_stop_notification): New function.
4246 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4247 events if the client supports them.
4249 2015-11-30 Pedro Alves <palves@redhat.com>
4251 * linux-low.c (thread_still_has_status_pending_p): Don't check
4253 (lwp_resumed): New function.
4254 (status_pending_p_callback): Return early if the LWP is not
4255 supposed to be resumed.
4257 2015-11-30 Pedro Alves <palves@redhat.com>
4259 * linux-low.c (handle_extended_wait): Assert that the LWP's
4260 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4261 thread create events, leave the new child's status pending.
4262 (linux_low_filter_event): If GDB wants to hear about thread exit
4263 events, leave the LWP marked dead and don't delete it.
4264 (linux_wait_for_event_filtered): Don't check for thread exit.
4265 (filter_exit_event): New function.
4266 (linux_wait_1): Use it, when returning an exit event.
4267 (linux_resume_one_lwp_throw): Assert that the LWP's
4268 waitstatus is TARGET_WAITKIND_IGNORE.
4269 * remote-utils.c (prepare_resume_reply): Handle
4270 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4271 * server.c (report_thread_events): New global.
4272 (handle_general_set): Handle QThreadEvents.
4273 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4274 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4275 TARGET_WAITKIND_THREAD_EXITED.
4276 * server.h (report_thread_events): Declare.
4278 2015-11-30 Pedro Alves <palves@redhat.com>
4280 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4281 the thread's last_resume_kind was resume_stop.
4283 2015-11-30 Pedro Alves <palves@redhat.com>
4285 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4288 2015-11-30 Pedro Alves <palves@redhat.com>
4290 * server.c (handle_v_requests): Handle vCtrlC.
4292 2015-11-30 Pedro Alves <palves@redhat.com>
4294 * gdbthread.h (find_any_thread_of_pid): Declare.
4295 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4297 * server.c (handle_query): If current_thread is NULL, look for
4298 another thread of the selected process.
4300 2015-11-26 Daniel Colascione <dancol@dancol.org>
4301 Simon Marchi <simon.marchi@ericsson.com>
4303 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4304 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4306 * target.h (struct target_ops) <thread_name>: New field.
4307 (target_thread_name): New macro.
4309 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4311 * regcache.h (regcache_invalidate_pid): Add declaration.
4312 * regcache.c (regcache_invalidate_pid): New function, extracted
4313 from regcache_invalidate.
4314 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4315 Add trivial documentation comment.
4316 * lynx-low.c: Use regcache_invalidate_pid instead of
4317 regcache_invalidate.
4319 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4321 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4322 and Elf64_auxv_t if the target is Android.
4324 2015-11-22 Doug Evans <xdje42@gmail.com>
4326 * target.h: #include <sys/types.h>.
4328 2015-11-19 Pedro Alves <palves@redhat.com>
4330 * linux-low.c (linux_process_qsupported): Change prototype.
4332 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4334 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4335 and adjust to loop over all features.
4336 * server.c (handle_query) <qSupported>: Adjust to call
4337 target_process_qsupported once, passing it a vector of unprocessed
4339 * target.h (struct target_ops) <process_qsupported>: Change
4341 (target_process_qsupported): Adjust.
4343 2015-11-19 Pedro Alves <palves@redhat.com>
4345 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4347 * configure: Regenerate.
4349 2015-11-19 Pedro Alves <palves@redhat.com>
4351 * configure: Regenerate.
4353 2015-11-19 Yao Qi <yao.qi@linaro.org>
4355 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4358 2015-11-19 Yao Qi <yao.qi@linaro.org>
4360 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4361 (struct aarch64_operand): Move enum out.
4363 2015-11-19 Yao Qi <yao.qi@linaro.org>
4365 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4366 struct user_fpsimd_state *.
4367 (aarch64_store_fpregset): Likewise.
4369 2015-11-19 Yao Qi <yao.qi@linaro.org>
4371 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4372 struct user_pt_regs *.
4373 (aarch64_store_gregset): Likewise.
4375 2015-11-18 Pedro Alves <palves@redhat.com>
4377 * Makefile.in (all_object_files): Add $IPA_OBJS.
4379 2015-11-17 Pedro Alves <palves@redhat.com>
4381 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4382 GDB_SIGNAL_0 and gdb_signal_to_string.
4384 2015-11-17 Pedro Alves <palves@redhat.com>
4386 * win32-low.c (handle_output_debug_string): Remove parameter.
4387 (win32_kill): Remove our_status local and adjust call to
4388 handle_output_debug_string.
4389 (get_child_debug_event): Adjust call to
4390 handle_output_debug_string.
4392 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4394 * linux-mips-low.c (mips_fill_gregset): Add cast.
4395 (mips_store_gregset): Likewise.
4396 (mips_fill_fpregset): Likewise.
4397 (mips_store_fpregset): Likewise.
4399 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4401 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4404 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4406 * linux-mips-low.c (mips_linux_new_thread): Change type of
4407 watch_type to enum target_hw_bp_type.
4409 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4411 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4412 Change return type to arm_hwbp_type.
4414 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4416 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4417 (arm_store_gregset): Likewise.
4418 * linux-arm-low.c (arm_get_hwcap): Likewise.
4419 (arm_read_description): Likewise.
4421 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4423 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4425 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4427 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4428 (ppc_fill_vsxregset): Likewise.
4429 (ppc_store_vsxregset): Likewise.
4430 (ppc_fill_vrregset): Likewise.
4431 (ppc_store_vrregset): Likewise.
4432 (ppc_fill_evrregset): Likewise.
4433 (ppc_store_evrregset): Likewise.
4435 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4437 * linux-ppc-low.c (ppc_usrregs_info): Remove
4438 forward-declaration.
4439 (ppc_arch_setup): Move lower in file.
4441 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4443 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4444 (ps_pdwrite): Likewise.
4446 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4448 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4449 to after assert checks.
4451 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4453 * proc-service.c (ps_pdread): Add/adjust casts.
4454 (ps_pdwrite): Add/adjust casts.
4456 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4458 * server.c (handle_search_memory_1): Cast return value of
4461 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4463 * server.c (write_qxfer_response): Change type of data to
4466 2015-10-29 Pedro Alves <palves@redhat.com>
4468 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4470 2015-10-29 Pedro Alves <palves@redhat.com>
4472 * tracepoint.c (clear_installed_tracepoints): Add casts.
4474 2015-10-29 Pedro Alves <palves@redhat.com>
4476 * server.c (handle_v_cont, process_serial_event): Add enum
4477 gdb_signal casts to signal parsing code.
4479 2015-10-29 Pedro Alves <palves@redhat.com>
4481 * linux-low.h (NULL_REGSET): Define.
4482 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4483 * linux-arm-low.c (arm_regsets): Likewise.
4484 * linux-crisv32-low.c (cris_regsets): Likewise.
4485 * linux-m68k-low.c (m68k_regsets): Likewise.
4486 * linux-mips-low.c (mips_regsets): Likewise.
4487 * linux-nios2-low.c (nios2_regsets): Likewise.
4488 * linux-ppc-low.c (ppc_regsets): Likewise.
4489 * linux-s390-low.c (s390_regsets): Likewise.
4490 * linux-sh-low.c (sh_regsets): Likewise.
4491 * linux-sparc-low.c (sparc_regsets): Likewise.
4492 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4493 * linux-tile-low.c (tile_regsets): Likewise.
4494 * linux-x86-low.c (x86_regsets): Likewise.
4495 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4497 2015-10-29 Pedro Alves <palves@redhat.com>
4499 * linux-low.h (NULL_REGSET): Define.
4500 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4501 * linux-arm-low.c (arm_regsets): Likewise.
4502 * linux-crisv32-low.c (cris_regsets): Likewise.
4503 * linux-m68k-low.c (m68k_regsets): Likewise.
4504 * linux-mips-low.c (mips_regsets): Likewise.
4505 * linux-nios2-low.c (nios2_regsets): Likewise.
4506 * linux-ppc-low.c (ppc_regsets): Likewise.
4507 * linux-s390-low.c (s390_regsets): Likewise.
4508 * linux-sh-low.c (sh_regsets): Likewise.
4509 * linux-sparc-low.c (sparc_regsets): Likewise.
4510 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4511 * linux-tile-low.c (tile_regsets): Likewise.
4512 * linux-x86-low.c (x86_regsets): Likewise.
4513 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4515 2015-10-26 Doug Evans <dje@google.com>
4517 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4519 2015-10-26 Doug Evans <dje@google.com>
4521 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4523 2015-10-26 Doug Evans <dje@google.com>
4525 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4527 (attach_thread, find_new_threads_callback): Ditto.
4529 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4531 * mem-break.h (set_breakpoint_data): Remove.
4533 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4535 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4536 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4537 (initialize_low): Remove set_breakpoint_data call.
4538 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4539 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4540 (initialize_low): Remove set_breakpoint_data call.
4541 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4542 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4543 (initialize_low): Remove set_breakpoint_data call.
4545 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4547 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4548 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4549 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4550 * target.h (target_breakpoint_kind_from_pc): New macro.
4552 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4554 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4555 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4556 the default breakpoint kind.
4558 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4560 * linux-arm-low.c (arm_supports_z_point_type): Add software
4563 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4565 * linux-arm-low.c: Refactor breakpoint definitions.
4566 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4567 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4569 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4571 * Makefile.in: Add arm.c/o.
4572 * configure.srv: Likewise.
4573 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4574 (arm_breakpoint_kind_from_pc): New function.
4575 (arm_sw_breakpoint_from_kind): Return proper kind.
4576 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4578 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4580 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4582 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4583 (struct raw_breakpoint) <size>: Remove.
4584 (struct raw_breakpoint) <kind>: Add.
4585 (bp_size): New function.
4586 (bp_opcode): Likewise.
4587 (find_raw_breakpoint_at): Adjust for kind.
4588 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4589 (remove_memory_breakpoint): Adjust for kind call bp_size.
4590 (set_raw_breakpoint_at): Adjust for kind.
4591 (set_breakpoint): Likewise.
4592 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4593 (delete_raw_breakpoint): Adjust for kind.
4594 (delete_breakpoint): Likewise.
4595 (find_gdb_breakpoint): Likewise.
4596 (set_gdb_breakpoint_1): Likewise.
4597 (set_gdb_breakpoint): Likewise.
4598 (delete_gdb_breakpoint_1): Likewise.
4599 (delete_gdb_breakpoint): Likewise.
4600 (uninsert_raw_breakpoint): Likewise.
4601 (reinsert_raw_breakpoint): Likewise.
4602 (set_breakpoint_data): Remove.
4603 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4604 (check_mem_read): Adjust for kind call bp_size.
4605 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4606 (clone_one_breakpoint): Adjust for kind.
4607 * mem-break.h (set_gdb_breakpoint): Likewise.
4608 (delete_gdb_breakpoint): Likewise.
4609 * server.c (process_serial_event): Likewise.
4611 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4613 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4614 (struct linux_target_ops) <breakpoint>: Remove.
4615 (struct linux_target_ops) <breakpoint_len>: Remove.
4616 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4617 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4618 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4619 (arm_sw_breakpoint_from_kind): New function.
4620 * linux-bfin-low.c (bfin_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-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4626 (struct linux_target_ops) <breakpoint>: Remove.
4627 (struct linux_target_ops) <breakpoint_len>: Remove.
4628 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4629 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4630 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4631 (struct linux_target_ops) <breakpoint>: Remove.
4632 (struct linux_target_ops) <breakpoint_len>: Remove.
4633 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4634 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4635 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4636 and sw_breakpoint_from_kind to increment the pc.
4637 (linux_breakpoint_kind_from_pc): New function.
4638 (linux_sw_breakpoint_from_kind): New function.
4639 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4640 (initialize_low): Call breakpoint_kind_from_pc and
4641 sw_breakpoint_from_kind to replace breakpoint_data/len.
4642 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4644 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4645 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_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-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4681 (struct linux_target_ops) <breakpoint>: Remove.
4682 (struct linux_target_ops) <breakpoint_len>: Remove.
4683 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4684 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4685 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4686 (struct linux_target_ops) <breakpoint>: Remove.
4687 (struct linux_target_ops) <breakpoint_len>: Remove.
4688 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4689 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4690 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4691 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4692 (struct linux_target_ops) <breakpoint>: Remove.
4693 (struct linux_target_ops) <breakpoint_len>: Remove.
4694 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4695 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4696 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4697 (struct linux_target_ops) <breakpoint>: Remove.
4698 (struct linux_target_ops) <breakpoint_len>: Remove.
4699 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4700 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4702 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4704 * linux-cris-low.c (cris_get_pc): Remove void arg.
4706 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4708 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4711 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4713 * inferiors.c (thread_pid_matches_callback): New function.
4714 (find_thread_process): New function.
4715 (remove_thread): Reset current_thread.
4716 (remove_process): Assert threads have been removed first.
4718 2015-10-15 Yao Qi <yao.qi@linaro.org>
4720 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4722 (aarch64_remove_point): Likewise.
4723 * regcache.c (regcache_register_size): New function.
4725 2015-10-12 Yao Qi <yao.qi@linaro.org>
4727 * linux-aarch64-low.c: Update all callers as emit_load_store
4728 is renamed to aarch64_emit_load_store.
4730 2015-10-12 Yao Qi <yao.qi@linaro.org>
4732 * linux-aarch64-low.c: Update all callers of function renaming
4733 from emit_insn to aarch64_emit_insn.
4735 2015-10-12 Yao Qi <yao.qi@linaro.org>
4737 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4738 arch/aarch64-insn.h.
4739 (struct aarch64_memory_operand): Likewise.
4741 (emit_insn): Move to arch/aarch64-insn.c.
4742 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4743 (emit_load_store): Move to arch/aarch64-insn.c.
4744 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4745 (can_encode_int32): Remove.
4747 2015-10-12 Yao Qi <yao.qi@linaro.org>
4749 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4750 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4751 (aarch64_relocate_instruction): Likewise.
4752 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4753 (struct aarch64_insn_visitor): Likewise.
4755 2015-10-12 Yao Qi <yao.qi@linaro.org>
4757 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4758 (struct aarch64_insn_visitor): New.
4759 (struct aarch64_insn_relocation_data): New.
4760 (aarch64_ftrace_insn_reloc_b): New function.
4761 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4762 (aarch64_ftrace_insn_reloc_cb): Likewise.
4763 (aarch64_ftrace_insn_reloc_tb): Likewise.
4764 (aarch64_ftrace_insn_reloc_adr): Likewise.
4765 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4766 (aarch64_ftrace_insn_reloc_others): Likewise.
4768 (aarch64_relocate_instruction): Use visitor.
4770 2015-10-12 Yao Qi <yao.qi@linaro.org>
4772 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4773 int. Add argument buf.
4774 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4775 aarch64_relocate_instruction.
4777 2015-10-12 Yao Qi <yao.qi@linaro.org>
4779 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4780 argument insn. Remove local variable insn. Don't call
4782 (aarch64_install_fast_tracepoint_jump_pad): Call
4785 2015-09-30 Yao Qi <yao.qi@linaro.org>
4787 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4788 (emit_load_store_pair): Likewise.
4790 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4792 * dll.c (match_dll): Add cast(s).
4793 (unloaded_dll): Likewise.
4794 * linux-low.c (second_thread_of_pid_p): Likewise.
4795 (delete_lwp_callback): Likewise.
4796 (count_events_callback): Likewise.
4797 (select_event_lwp_callback): Likewise.
4798 (linux_set_resume_request): Likewise.
4799 * server.c (accumulate_file_name_length): Likewise.
4800 (emit_dll_description): Likewise.
4801 (handle_qxfer_threads_worker): Likewise.
4802 (visit_actioned_threads): Likewise.
4803 * thread-db.c (any_thread_of): Likewise.
4804 * tracepoint.c (same_process_p): Likewise.
4805 (match_blocktype): Likewise.
4806 (build_traceframe_info_xml): Likewise.
4808 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4810 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4812 (gdb_unparse_agent_expr): Likewise.
4813 * hostio.c (require_data): Likewise.
4814 (handle_pread): Likewise.
4815 * linux-low.c (disable_regset): Likewise.
4816 (fetch_register): Likewise.
4817 (store_register): Likewise.
4818 (get_dynamic): Likewise.
4819 (linux_qxfer_libraries_svr4): Likewise.
4820 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4821 (set_fast_tracepoint_jump): Likewise.
4822 (uninsert_fast_tracepoint_jumps_at): Likewise.
4823 (reinsert_fast_tracepoint_jumps_at): Likewise.
4824 (validate_inserted_breakpoint): Likewise.
4825 (clone_agent_expr): Likewise.
4826 * regcache.c (init_register_cache): Likewise.
4827 * remote-utils.c (putpkt_binary_1): Likewise.
4828 (decode_M_packet): Likewise.
4829 (decode_X_packet): Likewise.
4830 (look_up_one_symbol): Likewise.
4831 (relocate_instruction): Likewise.
4832 (monitor_output): Likewise.
4833 * server.c (handle_search_memory): Likewise.
4834 (handle_qxfer_exec_file): Likewise.
4835 (handle_qxfer_libraries): Likewise.
4836 (handle_qxfer): Likewise.
4837 (handle_query): Likewise.
4838 (handle_v_cont): Likewise.
4839 (handle_v_run): Likewise.
4840 (captured_main): Likewise.
4841 * target.c (write_inferior_memory): Likewise.
4842 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4843 * tracepoint.c (init_trace_buffer): Likewise.
4844 (add_tracepoint_action): Likewise.
4845 (add_traceframe): Likewise.
4846 (add_traceframe_block): Likewise.
4847 (cmd_qtdpsrc): Likewise.
4848 (cmd_qtdv): Likewise.
4849 (cmd_qtstatus): Likewise.
4850 (response_source): Likewise.
4851 (response_tsv): Likewise.
4852 (cmd_qtnotes): Likewise.
4853 (gdb_collect): Likewise.
4854 (initialize_tracepoint): Likewise.
4856 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4858 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4859 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4860 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4862 (enum aarch64_condition_codes): New enum.
4863 (w0): New static global.
4866 (struct aarch64_memory_operand) <type>: New
4867 MEMORY_OPERAND_POSTINDEX type.
4868 (postindex_memory_operand): New helper function.
4869 (emit_ret): New function.
4870 (emit_load_store_pair): New function, factored out of emit_stp
4871 with support for MEMORY_OPERAND_POSTINDEX.
4872 (emit_stp): Rewrite using emit_load_store_pair.
4873 (emit_ldp): New function.
4874 (emit_load_store): Likewise.
4875 (emit_ldr): Mention post-index instruction in comment.
4876 (emit_ldrh): New function.
4877 (emit_ldrb): New function.
4878 (emit_ldrsw): Mention post-index instruction in comment.
4879 (emit_str): Likewise.
4880 (emit_subs): New function.
4881 (emit_cmp): Likewise.
4882 (emit_and): Likewise.
4883 (emit_orr): Likewise.
4884 (emit_orn): Likewise.
4885 (emit_eor): Likewise.
4886 (emit_mvn): Likewise.
4887 (emit_lslv): Likewise.
4888 (emit_lsrv): Likewise.
4889 (emit_asrv): Likewise.
4890 (emit_mul): Likewise.
4891 (emit_sbfm): Likewise.
4892 (emit_sbfx): Likewise.
4893 (emit_ubfm): Likewise.
4894 (emit_ubfx): Likewise.
4895 (emit_csinc): Likewise.
4896 (emit_cset): Likewise.
4897 (emit_nop): Likewise.
4898 (emit_ops_insns): New helper function.
4899 (emit_pop): Likewise.
4900 (emit_push): Likewise.
4901 (aarch64_emit_prologue): New function.
4902 (aarch64_emit_epilogue): Likewise.
4903 (aarch64_emit_add): Likewise.
4904 (aarch64_emit_sub): Likewise.
4905 (aarch64_emit_mul): Likewise.
4906 (aarch64_emit_lsh): Likewise.
4907 (aarch64_emit_rsh_signed): Likewise.
4908 (aarch64_emit_rsh_unsigned): Likewise.
4909 (aarch64_emit_ext): Likewise.
4910 (aarch64_emit_log_not): Likewise.
4911 (aarch64_emit_bit_and): Likewise.
4912 (aarch64_emit_bit_or): Likewise.
4913 (aarch64_emit_bit_xor): Likewise.
4914 (aarch64_emit_bit_not): Likewise.
4915 (aarch64_emit_equal): Likewise.
4916 (aarch64_emit_less_signed): Likewise.
4917 (aarch64_emit_less_unsigned): Likewise.
4918 (aarch64_emit_ref): Likewise.
4919 (aarch64_emit_if_goto): Likewise.
4920 (aarch64_emit_goto): Likewise.
4921 (aarch64_write_goto_address): Likewise.
4922 (aarch64_emit_const): Likewise.
4923 (aarch64_emit_call): Likewise.
4924 (aarch64_emit_reg): Likewise.
4925 (aarch64_emit_pop): Likewise.
4926 (aarch64_emit_stack_flush): Likewise.
4927 (aarch64_emit_zero_ext): Likewise.
4928 (aarch64_emit_swap): Likewise.
4929 (aarch64_emit_stack_adjust): Likewise.
4930 (aarch64_emit_int_call_1): Likewise.
4931 (aarch64_emit_void_call_2): Likewise.
4932 (aarch64_emit_eq_goto): Likewise.
4933 (aarch64_emit_ne_goto): Likewise.
4934 (aarch64_emit_lt_goto): Likewise.
4935 (aarch64_emit_le_goto): Likewise.
4936 (aarch64_emit_gt_goto): Likewise.
4937 (aarch64_emit_ge_got): Likewise.
4938 (aarch64_emit_ops_impl): New static global variable.
4939 (aarch64_emit_ops): New target function, return
4940 &aarch64_emit_ops_impl.
4941 (struct linux_target_ops): Install it.
4943 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4945 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4946 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4948 * linux-aarch64-ipa.c: New file.
4949 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4951 (aarch64_get_thread_area): New target method.
4952 (extract_signed_bitfield): New helper function.
4953 (aarch64_decode_ldr_literal): New function.
4954 (enum aarch64_opcodes): New enum.
4955 (struct aarch64_register): New struct.
4956 (struct aarch64_operand): New struct.
4957 (x0): New static global.
4966 (aarch64_register): New helper function.
4967 (register_operand): Likewise.
4968 (immediate_operand): Likewise.
4969 (struct aarch64_memory_operand): New struct.
4970 (offset_memory_operand): New helper function.
4971 (preindex_memory_operand): Likewise.
4972 (enum aarch64_system_control_registers): New enum.
4973 (ENCODE): New macro.
4974 (emit_insn): New helper function.
4975 (emit_b): New function.
4976 (emit_bcond): Likewise.
4977 (emit_cb): Likewise.
4978 (emit_tb): Likewise.
4979 (emit_blr): Likewise.
4980 (emit_stp): Likewise.
4981 (emit_ldp_q_offset): Likewise.
4982 (emit_stp_q_offset): Likewise.
4983 (emit_load_store): Likewise.
4984 (emit_ldr): Likewise.
4985 (emit_ldrsw): Likewise.
4986 (emit_str): Likewise.
4987 (emit_ldaxr): Likewise.
4988 (emit_stxr): Likewise.
4989 (emit_stlr): Likewise.
4990 (emit_data_processing_reg): Likewise.
4991 (emit_data_processing): Likewise.
4992 (emit_add): Likewise.
4993 (emit_sub): Likewise.
4994 (emit_mov): Likewise.
4995 (emit_movk): Likewise.
4996 (emit_mov_addr): Likewise.
4997 (emit_mrs): Likewise.
4998 (emit_msr): Likewise.
4999 (emit_sevl): Likewise.
5000 (emit_wfe): Likewise.
5001 (append_insns): Likewise.
5002 (can_encode_int32_in): New helper function.
5003 (aarch64_relocate_instruction): New function.
5004 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5005 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5006 (struct linux_target_ops): Install aarch64_get_thread_area,
5007 aarch64_install_fast_tracepoint_jump_pad and
5008 aarch64_get_min_fast_tracepoint_insn_len.
5010 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5012 * Makefile.in (aarch64-insn.o): New rule.
5013 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5015 2015-09-21 Yao Qi <yao.qi@linaro.org>
5017 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5019 2015-09-21 Yao Qi <yao.qi@linaro.org>
5021 * tracepoint.c (max_jump_pad_size): Remove.
5023 2015-09-18 Yao Qi <yao.qi@linaro.org>
5025 * linux-aarch64-low.c: Don't include sys/uio.h.
5026 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5028 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5030 * tracepoint.c (eval_result_type): Change prototype.
5031 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5033 2015-09-15 Pedro Alves <palves@redhat.com>
5035 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5036 Check whether to report exec events instead of checking whether
5037 multiprocess is enabled.
5039 2015-09-15 Pedro Alves <palves@redhat.com>
5042 * remote-utils.c (prepare_resume_reply): Merge
5043 TARGET_WAITKIND_VFORK_DONE switch case with the
5044 TARGET_WAITKIND_FORKED case.
5046 2015-09-15 Yao Qi <yao.qi@linaro.org>
5048 * server.c (handle_query): Check string comparison using
5049 "else if" instead of "if".
5051 2015-09-15 Yao Qi <yao.qi@linaro.org>
5053 * server.c (vCont_supported): New global variable.
5054 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5055 matches. Append ";vContSupported+" to own_buf.
5056 (handle_v_requests): Append ";s;S" to own_buf if target supports
5057 hardware single step or vCont_supported is false.
5058 (capture_main): Set vCont_supported to zero.
5060 2015-09-15 Yao Qi <yao.qi@linaro.org>
5062 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5064 (linux_supports_hardware_single_step): ... New function.
5065 (linux_target_ops): Update.
5066 * lynx-low.c (lynx_target_ops): Set field
5067 supports_hardware_single_step to target_can_do_hardware_single_step.
5068 * nto-low.c (nto_target_ops): Likewise.
5069 * spu-low.c (spu_target_ops): Likewise.
5070 * win32-low.c (win32_target_ops): Likewise.
5071 * target.c (target_can_do_hardware_single_step): New function.
5072 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5073 Remove. <supports_hardware_single_step>: New field.
5074 (target_supports_conditional_breakpoints): Remove.
5075 (target_supports_hardware_single_step): New macro.
5076 (target_can_do_hardware_single_step): Declare.
5077 * server.c (handle_query): Use target_supports_hardware_single_step
5078 instead of target_supports_conditional_breakpoints.
5080 2015-09-15 Yao Qi <yao.qi@linaro.org>
5082 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5084 (struct linux_target_ops the_low_target): Install
5085 aarch64_linux_siginfo_fixup.
5087 2015-09-11 Don Breazeal <donb@codesourcery.com>
5088 Luis Machado <lgustavo@codesourcery.com>
5090 * linux-low.c (linux_mourn): Static declaration.
5091 (linux_arch_setup): Move in front of
5092 handle_extended_wait.
5093 (linux_arch_setup_thread): New function.
5094 (handle_extended_wait): Handle exec events. Call
5095 linux_arch_setup_thread. Make event_lwp argument a
5096 pointer-to-a-pointer.
5097 (check_zombie_leaders): Do not check stopped threads.
5098 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5099 (linux_low_filter_event): Add lwp and thread for exec'ing
5100 non-leader thread if leader thread has been deleted.
5101 Refactor code into linux_arch_setup_thread and call it.
5102 Pass child lwp pointer by reference to handle_extended_wait.
5103 (linux_wait_for_event_filtered): Update comment.
5104 (linux_wait_1): Prevent clobbering exec event status.
5105 (linux_supports_exec_events): New function.
5106 (linux_target_ops) <supports_exec_events>: Initialize new member.
5107 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5109 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5110 * server.c (report_exec_events): New global variable.
5111 (handle_query): Handle qSupported query for exec-events feature.
5112 (captured_main): Initialize report_exec_events.
5113 * server.h (report_exec_events): Declare new global variable.
5114 * target.h (struct target_ops) <supports_exec_events>: New
5116 (target_supports_exec_events): New macro.
5117 * win32-low.c (win32_target_ops) <supports_exec_events>:
5118 Initialize new member.
5120 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5122 * linux-low.c (linux_low_enable_btrace): Remove.
5123 (linux_target_ops): Replace linux_low_enable_btrace with
5124 linux_enable_btrace.
5126 2015-09-03 Yao Qi <yao.qi@linaro.org>
5128 * linux-aarch64-low.c (aarch64_insert_point): Call
5129 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5132 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5134 * linux-low.c (check_stopped_by_breakpoint): Use
5135 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5137 2015-08-27 Pedro Alves <palves@redhat.com>
5139 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5141 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5143 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5144 the XNEW-family equivalent.
5145 (compile_bytecodes): Likewise.
5146 * dll.c (loaded_dll): Likewise.
5147 * event-loop.c (append_callback_event): Likewise.
5148 (create_file_handler): Likewise.
5149 (create_file_event): Likewise.
5150 * hostio.c (handle_open): Likewise.
5151 * inferiors.c (add_thread): Likewise.
5152 (add_process): Likewise.
5153 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5154 * linux-arm-low.c (arm_new_process): Likewise.
5155 (arm_new_thread): Likewise.
5156 * linux-low.c (add_to_pid_list): Likewise.
5157 (linux_add_process): Likewise.
5158 (handle_extended_wait): Likewise.
5159 (add_lwp): Likewise.
5160 (enqueue_one_deferred_signal): Likewise.
5161 (enqueue_pending_signal): Likewise.
5162 (linux_resume_one_lwp_throw): Likewise.
5163 (linux_resume_one_thread): Likewise.
5164 (linux_read_memory): Likewise.
5165 (linux_write_memory): Likewise.
5166 * linux-mips-low.c (mips_linux_new_process): Likewise.
5167 (mips_linux_new_thread): Likewise.
5168 (mips_add_watchpoint): Likewise.
5169 * linux-x86-low.c (initialize_low_arch): Likewise.
5170 * lynx-low.c (lynx_add_process): Likewise.
5171 * mem-break.c (set_raw_breakpoint_at): Likewise.
5172 (set_breakpoint): Likewise.
5173 (add_condition_to_breakpoint): Likewise.
5174 (add_commands_to_breakpoint): Likewise.
5175 (clone_agent_expr): Likewise.
5176 (clone_one_breakpoint): Likewise.
5177 * regcache.c (new_register_cache): Likewise.
5178 * remote-utils.c (look_up_one_symbol): Likewise.
5179 * server.c (queue_stop_reply): Likewise.
5180 (start_inferior): Likewise.
5181 (queue_stop_reply_callback): Likewise.
5182 (handle_target_event): Likewise.
5183 * spu-low.c (fetch_ppc_memory): Likewise.
5184 (store_ppc_memory): Likewise.
5185 * target.c (set_target_ops): Likewise.
5186 * thread-db.c (thread_db_load_search): Likewise.
5187 (try_thread_db_load_1): Likewise.
5188 * tracepoint.c (add_tracepoint): Likewise.
5189 (add_tracepoint_action): Likewise.
5190 (create_trace_state_variable): Likewise.
5191 (cmd_qtdpsrc): Likewise.
5192 (cmd_qtro): Likewise.
5193 (add_while_stepping_state): Likewise.
5194 * win32-low.c (child_add_thread): Likewise.
5195 (get_image_name): Likewise.
5197 2015-08-25 Yao Qi <yao.qi@linaro.org>
5199 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5201 2015-08-25 Yao Qi <yao.qi@linaro.org>
5203 * Makefile.in (aarch64-linux.o): New rule.
5204 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5206 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5207 (aarch64_init_debug_reg_state): Make it extern.
5208 (aarch64_linux_prepare_to_resume): Remove.
5210 2015-08-25 Yao Qi <yao.qi@linaro.org>
5212 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5213 lwp_arch_private_info and ptid_of_lwp.
5215 2015-08-25 Yao Qi <yao.qi@linaro.org>
5217 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5218 Find proc_info by find_process_pid. All callers updated.
5220 2015-08-25 Yao Qi <yao.qi@linaro.org>
5222 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5224 (debug_reg_change_callback): Remove.
5225 (aarch64_notify_debug_reg_change): Remove.
5227 2015-08-25 Yao Qi <yao.qi@linaro.org>
5229 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5230 Call current_lwp_ptid.
5232 2015-08-25 Yao Qi <yao.qi@linaro.org>
5234 * linux-aarch64-low.c (debug_reg_change_callback): Use
5237 2015-08-25 Yao Qi <yao.qi@linaro.org>
5239 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5241 2015-08-25 Yao Qi <yao.qi@linaro.org>
5243 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5245 2015-08-25 Yao Qi <yao.qi@linaro.org>
5247 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5250 2015-08-25 Yao Qi <yao.qi@linaro.org>
5252 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5254 (debug_reg_change_callback): Remove argument entry and add argument
5255 lwp. Remove local variable thread. Don't print thread id in the
5256 debugging output. Don't check whether pid of thread equals to pid.
5257 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5258 iterate_over_lwps instead find_inferior.
5260 2015-08-24 Pedro Alves <palves@redhat.com>
5262 * inferiors.c (get_first_process): New function.
5263 * inferiors.h (get_first_process): New declaration.
5264 * remote-utils.c (read_ptid): Default to the first process in the
5265 list, instead of to the current thread's process.
5267 2015-08-24 Pedro Alves <palves@redhat.com>
5269 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5270 * event-loop.c: Likewise.
5271 * remote-utils.c: Likewise.
5272 * tracepoint.c: Likewise.
5274 2015-08-24 Pedro Alves <palves@redhat.com>
5276 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5279 2015-08-21 Pedro Alves <palves@redhat.com>
5281 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5282 instead of literal 1.
5284 2015-08-21 Pedro Alves <palves@redhat.com>
5286 * tdesc.c (default_description): Explicitly zero-initialize.
5288 2015-08-21 Pedro Alves <palves@redhat.com>
5291 * inferiors.c (remove_thread): Discard any pending stop reply for
5293 * server.c (remove_all_on_match_pid): Rename to ...
5294 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5296 (discard_queued_stop_replies): Change parameter to a ptid. Now
5298 (handle_v_kill, kill_inferior_callback, captured_main)
5299 (process_serial_event): Adjust.
5300 * server.h (discard_queued_stop_replies): Declare.
5302 2015-08-21 Pedro Alves <palves@redhat.com>
5304 * linux-low.c (wait_for_sigstop): Always switch to no thread
5305 selected if the previously current thread dies.
5306 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5307 process instead of the current thread's.
5308 * remote-utils.c (input_interrupt): Don't check if there's no
5310 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5311 current thread to the general thread fails, error out.
5312 (handle_qxfer_auxv, handle_qxfer_libraries)
5313 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5314 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5315 (handle_query): Check if there's a thread selected instead of
5316 checking whether there's any thread in the thread list.
5317 (handle_qxfer_threads, handle_qxfer_btrace)
5318 (handle_qxfer_btrace_conf): Don't error out early if there's no
5319 thread in the thread list.
5320 (handle_v_cont, myresume): Don't set the current thread to the
5322 (process_serial_event) <Hg handling>: Also set thread_id if the
5323 previous general thread is still alive.
5324 (process_serial_event) <g/G handling>: If setting the current
5325 thread to the general thread fails, error out.
5326 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5327 thread's lwp instead of the current thread's.
5328 * target.c (set_desired_thread): If the desired thread was not
5329 found, leave the current thread pointing to NULL. Return an int
5330 (boolean) indicating success.
5331 * target.h (set_desired_thread): Change return type to int.
5333 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5335 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5336 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5338 (ps_get_thread_area): New function.
5340 2015-08-19 Gary Benson <gbenson@redhat.com>
5342 * hostio.c (handle_pread): Do not attempt to read more data
5343 than hostio_reply_with_data can fit in a packet.
5345 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5347 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5349 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5351 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5353 2015-08-06 Pedro Alves <palves@redhat.com>
5355 * tracepoint.c (expr_eval_result): Now an int.
5357 2015-08-06 Pedro Alves <palves@redhat.com>
5359 * gdbthread.h (struct regcache): Forward declare.
5360 (struct thread_info) <regcache_data>: Now a struct regcache
5362 * inferiors.c (inferior_regcache_data)
5363 (set_inferior_regcache_data): Now work with struct regcache
5365 * inferiors.h (struct regcache): Forward declare.
5366 (inferior_regcache_data, set_inferior_regcache_data): Now work
5367 with struct regcache pointers.
5368 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5369 (free_register_cache_thread): Remove struct regcache pointer
5372 2015-08-06 Pedro Alves <palves@redhat.com>
5374 * server.c (captured_main): On error, print the exception message
5375 to stderr, and if run_once is set, throw a quit.
5377 2015-08-06 Pedro Alves <palves@redhat.com>
5379 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5382 2015-08-06 Pedro Alves <palves@redhat.com>
5384 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5385 reading beyond the passed in buffer length.
5387 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5389 * tracepoint.c (symbol_list) <required>: Remove.
5391 2015-08-06 Pedro Alves <palves@redhat.com>
5393 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5394 count if stopping and suspending threads.
5395 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5396 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5397 (linux_detach): Complete an ongoing step-over.
5398 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5400 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5401 (linux_wait_1): If passing a signal to the inferior after
5402 finishing a step-over, unsuspend and re-resume all lwps. If we
5403 see a single-step event but the thread should be continuing, don't
5404 pass the trap to gdb.
5405 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5406 internal_error instead of gdb_assert.
5407 (enqueue_pending_signal): New function.
5408 (check_ptrace_stopped_lwp_gone): Add debug output.
5409 (start_step_over): Use internal_error instead of gdb_assert.
5410 (complete_ongoing_step_over): New function.
5411 (linux_resume_one_thread): Don't resume a suspended thread.
5412 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5415 2015-08-06 Pedro Alves <palves@redhat.com>
5417 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5418 (linux_thread_alive): Use lwp_is_marked_dead.
5419 (extended_event_reported): Delete.
5420 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5421 instead of extended_event_reported.
5422 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5424 (lwp_is_marked_dead): New function.
5425 (lwp_running): Use lwp_is_marked_dead.
5426 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5429 2015-08-06 Pedro Alves <palves@redhat.com>
5431 * linux-low.c (linux_wait_1): Move fork event output out of the
5432 !report_to_gdb check. Pass event_child->waitstatus to
5433 target_waitstatus_to_string instead of ourstatus.
5435 2015-08-04 Yao Qi <yao.qi@linaro.org>
5437 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5438 if current_thread is 32 bit.
5440 2015-08-04 Yao Qi <yao.qi@linaro.org>
5442 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5443 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5444 * server.c (extended_protocol): Remove "static".
5445 * server.h (extended_protocol): Declare it.
5447 2015-08-04 Yao Qi <yao.qi@linaro.org>
5449 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5450 both aarch64 and aarch32.
5451 (aarch64_set_pc): Likewise.
5453 2015-08-04 Yao Qi <yao.qi@linaro.org>
5455 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5456 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5457 arm-with-neon.xml to srv_xmlfiles.
5458 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5459 (is_64bit_tdesc): New function.
5460 (aarch64_linux_read_description): New function.
5461 (aarch64_arch_setup): Call aarch64_linux_read_description.
5462 (regs_info): Rename to regs_info_aarch64.
5463 (aarch64_regs_info): Return right regs_info.
5464 (initialize_low_arch): Call initialize_low_arch_aarch32.
5466 2015-08-04 Yao Qi <yao.qi@linaro.org>
5468 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5469 * linux-aarch32-low.c: New file.
5470 * linux-aarch32-low.h: New file.
5471 * linux-arm-low.c (arm_fill_gregset): Move it to
5472 linux-aarch32-low.c.
5473 (arm_store_gregset): Likewise.
5474 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5475 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5476 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5477 (regs_info): Rename to regs_info_arm.
5478 (arm_regs_info): Return regs_info_aarch32 if
5479 have_ptrace_getregset is 1 and target description is
5480 arm_with_neon or arm_with_vfpv3.
5481 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5482 Call initialize_low_arch_aarch32 instead.
5484 2015-08-04 Yao Qi <yao.qi@linaro.org>
5486 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5487 * linux-low.c: ... here.
5488 * linux-low.h (have_ptrace_getregset): Declare it.
5490 2015-08-04 Pedro Alves <palves@redhat.com>
5492 * thread-db.c (struct thread_db): Use new typedefs.
5493 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5495 (disable_thread_event_reporting): Cast result of dlsym to
5496 destination function pointer type.
5497 (thread_db_mourn): Use td_ta_delete_ftype.
5499 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5501 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5503 (CDX_BREAKPOINT): Define for R2.
5504 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5505 (the_low_target): Add comments.
5507 2015-07-30 Yao Qi <yao.qi@linaro.org>
5509 * linux-arm-low.c (arm_hwcap): Remove it.
5510 (arm_read_description): New local variable arm_hwcap. Don't
5511 set arm_hwcap to zero.
5513 2015-07-30 Yao Qi <yao.qi@linaro.org>
5515 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5516 Use regcache->tdesc instead.
5517 (arm_store_wmmxregset): Likewise.
5518 (arm_fill_vfpregset): Likewise.
5519 (arm_store_vfpregset): Likewise.
5521 2015-07-30 Yao Qi <yao.qi@linaro.org>
5523 * linux-arm-low.c: Include arch/arm.h.
5524 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5525 (arm_store_gregset): Likewise.
5527 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5529 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5530 ptrace's 4th parameter.
5532 2015-07-27 Yao Qi <yao.qi@linaro.org>
5534 * configure.srv (case aarch64*-*-linux*): Don't set
5537 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5539 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5541 * linux-arm-low.c: Likewise.
5542 * linux-cris-low.c: Likewise.
5543 * linux-crisv32-low.c: Likewise.
5544 * linux-low.c: Likewise.
5545 * linux-m68k-low.c: Likewise.
5546 * linux-mips-low.c: Likewise.
5547 * linux-nios2-low.c: Likewise.
5548 * linux-s390-low.c: Likewise.
5549 * linux-sparc-low.c: Likewise.
5550 * linux-tic6x-low.c: Likewise.
5551 * linux-tile-low.c: Likewise.
5552 * linux-x86-low.c: Likewise.
5554 2015-07-24 Pedro Alves <palves@redhat.com>
5556 * config.in: Regenerate.
5557 * configure: Regenerate.
5559 2015-07-24 Pedro Alves <palves@redhat.com>
5561 * acinclude.m4: Include ../ptrace.m4.
5562 * configure.ac: Call GDB_AC_PTRACE.
5563 * config.in, configure: Regenerate.
5565 2015-07-24 Yao Qi <yao.qi@linaro.org>
5567 * linux-low.c (linux_create_inferior): Remove setting to
5568 proc->priv->new_inferior.
5569 (linux_attach): Likewise.
5570 (linux_low_filter_event): Likewise.
5571 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5573 2015-07-24 Yao Qi <yao.qi@linaro.org>
5575 * linux-low.c (linux_arch_setup): New function.
5576 (linux_low_filter_event): If proc->tdesc is NULL and
5577 proc->attached is true, call the_low_target.arch_setup.
5578 Otherwise, keep status pending, and return.
5579 (linux_resume_one_lwp_throw): Don't call get_pc if
5580 thread->while_stepping isn't NULL. Don't call
5581 get_thread_regcache if proc->tdesc is NULL.
5582 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5583 (linux_target_ops): Install arch_setup.
5584 * server.c (start_inferior): Call the_target->arch_setup.
5585 * target.h (struct target_ops) <arch_setup>: New field.
5586 (target_arch_setup): New marco.
5587 * lynx-low.c (lynx_target_ops): Update.
5588 * nto-low.c (nto_target_ops): Update.
5589 * spu-low.c (spu_target_ops): Update.
5590 * win32-low.c (win32_target_ops): Update.
5592 2015-07-24 Yao Qi <yao.qi@linaro.org>
5594 * linux-low.c (linux_add_process): Don't set
5595 proc->priv->new_inferior.
5596 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5597 (linux_attach): Likewise.
5599 2015-07-24 Yao Qi <yao.qi@linaro.org>
5601 * server.c (start_inferior): Code refactor.
5603 2015-07-24 Yao Qi <yao.qi@linaro.org>
5605 * server.c (process_serial_event): Set general_thread.
5607 2015-07-21 Yao Qi <yao.qi@linaro.org>
5609 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5610 aarch64_linux_get_debug_reg_capacity.
5612 2015-07-17 Yao Qi <yao.qi@linaro.org>
5614 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5615 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5616 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5617 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5618 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5619 (AARCH64_HWP_ALIGNMENT): Likewise.
5620 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5621 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5622 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5623 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5624 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5625 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5626 (struct aarch64_debug_reg_state): Likewise.
5627 (struct arch_lwp_info): Likewise.
5628 (aarch64_align_watchpoint): Likewise.
5629 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5630 (aarch64_watchpoint_length): Likewise.
5631 (aarch64_point_encode_ctrl_reg): Likewise
5632 (aarch64_point_is_aligned): Likewise.
5633 (aarch64_align_watchpoint): Likewise.
5634 (aarch64_linux_set_debug_regs):
5635 (aarch64_dr_state_insert_one_point): Likewise.
5636 (aarch64_dr_state_remove_one_point): Likewise.
5637 (aarch64_handle_breakpoint): Likewise.
5638 (aarch64_handle_aligned_watchpoint): Likewise.
5639 (aarch64_handle_unaligned_watchpoint): Likewise.
5640 (aarch64_handle_watchpoint): Likewise.
5642 2015-07-17 Yao Qi <yao.qi@linaro.org>
5644 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5645 and don't aarch64_get_debug_reg_state. All callers update.
5646 (aarch64_handle_aligned_watchpoint): Likewise.
5647 (aarch64_handle_unaligned_watchpoint): Likewise.
5648 (aarch64_handle_watchpoint): Likewise.
5649 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5650 (aarch64_remove_point): Likewise.
5652 2015-07-17 Yao Qi <yao.qi@linaro.org>
5654 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5656 (aarch64_handle_unaligned_watchpoint): Likewise.
5658 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5660 Revert the previous 3 commits:
5661 Move gdb_regex* to common/
5662 Move linux_find_memory_regions_full & co.
5663 gdbserver build-id attribute generator
5665 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5666 Jan Kratochvil <jan.kratochvil@redhat.com>
5668 gdbserver build-id attribute generator.
5669 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5670 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5671 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5673 (get_dynamic): Use find_pdhr to traverse program headers.
5674 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5675 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5676 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5677 (get_hex_build_id): New.
5678 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5679 to reply XML document.
5681 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5682 Jan Kratochvil <jan.kratochvil@redhat.com>
5684 * target.c: Include target/target-utils.h and fcntl.h.
5685 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5686 (target_fileio_read_stralloc): New functions.
5688 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5690 * Makefile.in (OBS): Add gdb_regex.o.
5692 * config.in: Rebuilt.
5693 * configure: Rebuilt.
5695 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5696 Jan Kratochvil <jan.kratochvil@redhat.com>
5698 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5699 * Makefile.in (OBS): Add target-utils.o.
5700 (linux-maps.o, target-utils.o): New.
5701 * configure.srv (srv_linux_obj): Add linux-maps.o.
5703 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5705 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5707 (the_low_target): Install it.
5709 2015-07-14 Pedro Alves <palves@redhat.com>
5711 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5712 Instead, ignore ECHILD, and throw an error for other errnos.
5714 2015-07-10 Pedro Alves <palves@redhat.com>
5716 * event-loop.c (struct callback_event) <data>: Change type to
5717 gdb_client_data instance instead of gdb_client_data pointer.
5718 (append_callback_event): Adjust.
5720 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5722 * linux-aarch64-low.c: Add comments for each linux_target_ops
5723 method. Remove comments already covered in target_ops and
5724 linux_target_ops definitions.
5725 (the_low_target): Add comments for each unimplemented method.
5727 2015-07-09 Yao Qi <yao.qi@linaro.org>
5729 * linux-aarch64-low.c (aarch64_regmap): Remove.
5730 (aarch64_usrregs_info): Remove.
5731 (regs_info): Set field usrregs to NULL.
5733 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5735 * linux-low.c: Include "rsp-low.h"
5736 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5737 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5738 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5739 (handle_btrace_enable_pt): New.
5740 (handle_btrace_general_set): Support "pt".
5741 (handle_btrace_conf_general_set): Support "pt:size".
5743 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5745 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5748 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5750 * linux-aarch64-low.c: Remove comment about endianness.
5751 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5752 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5755 2015-06-24 Gary Benson <gbenson@redhat.com>
5757 * linux-i386-ipa.c (stdint.h): Do not include.
5758 * lynx-i386-low.c (stdint.h): Likewise.
5759 * lynx-ppc-low.c (stdint.h): Likewise.
5760 * mem-break.c (stdint.h): Likewise.
5761 * thread-db.c (stdint.h): Likewise.
5762 * tracepoint.c (stdint.h): Likewise.
5763 * win32-low.c (stdint.h): Likewise.
5765 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5767 * server.c (write_qxfer_response): Update call to
5768 remote_escape_output.
5770 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5771 Jan Kratochvil <jan.kratochvil@redhat.com>
5773 Merge multiple hex conversions.
5774 * gdbreplay.c (tohex): Rename to 'fromhex'.
5775 (logchar): Use fromhex.
5777 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5779 * server.c (handle_qxfer_libraries): Set `version' attribute for
5782 2015-06-10 Gary Benson <gbenson@redhat.com>
5784 * target.h (struct target_ops) <multifs_open>: New field.
5785 <multifs_unlink>: Likewise.
5786 <multifs_readlink>: Likewise.
5787 * linux-low.c (nat/linux-namespaces.h): New include.
5788 (linux_target_ops): Initialize the_target->multifs_open,
5789 the_target->multifs_unlink and the_target->multifs_readlink.
5790 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5791 * hostio.c (hostio_fs_pid): New static variable.
5792 (hostio_handle_new_gdb_connection): New function.
5793 (handle_setfs): Likewise.
5794 (handle_open): Use the_target->multifs_open as appropriate.
5795 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5796 (handle_readlink): Use the_target->multifs_readlink as
5798 (handle_vFile): Handle vFile:setfs packets.
5799 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5800 after target_handle_new_gdb_connection.
5802 2015-06-10 Gary Benson <gbenson@redhat.com>
5804 * configure.ac (AC_CHECK_FUNCS): Add setns.
5805 * config.in: Regenerate.
5806 * configure: Likewise.
5807 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5808 (linux-namespaces.o): New rule.
5809 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5811 2015-06-09 Gary Benson <gbenson@redhat.com>
5813 * hostio.c (handle_open): Process mode argument with
5814 fileio_to_host_mode.
5816 2015-06-01 Yao Qi <yao.qi@linaro.org>
5818 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5819 * linux-x86-low.c: Likewise.
5821 2015-05-28 Don Breazeal <donb@codesourcery.com>
5823 * linux-low.c (handle_extended_wait): Initialize
5824 thread_info.last_resume_kind for new fork children.
5826 2015-05-15 Pedro Alves <palves@redhat.com>
5828 * target.h (target_handle_new_gdb_connection): Rewrite using if
5829 wrapped in do/while.
5831 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5833 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5834 * configure, config.in: Regenerate.
5835 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5838 2015-05-12 Don Breazeal <donb@codesourcery.com>
5840 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5841 PTRACE_EVENT_VFORK_DONE.
5842 (linux_low_ptrace_options, extended_event_reported): Add vfork
5844 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5845 and "vforkdone" for RSP 'T' Stop Reply Packet.
5846 * server.h (report_vfork_events): Declare
5849 2015-05-12 Don Breazeal <donb@codesourcery.com>
5851 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5852 (the_low_target) <new_fork>: Initialize new member.
5853 * linux-arm-low.c (arm_new_fork): New function.
5854 (the_low_target) <new_fork>: Initialize new member.
5855 * linux-low.c (handle_extended_wait): Call new target function
5857 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5858 * linux-mips-low.c (mips_add_watchpoint): New function
5859 extracted from mips_insert_point.
5860 (the_low_target) <new_fork>: Initialize new member.
5861 (mips_linux_new_fork): New function.
5862 (mips_insert_point): Call mips_add_watchpoint.
5863 * linux-x86-low.c (x86_linux_new_fork): New function.
5864 (the_low_target) <new_fork>: Initialize new member.
5866 2015-05-12 Don Breazeal <donb@codesourcery.com>
5868 * linux-low.c (handle_extended_wait): Implement return value,
5869 rename argument 'event_child' to 'event_lwp', handle
5870 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5871 (linux_low_ptrace_options): New function.
5872 (linux_low_filter_event): Call linux_low_ptrace_options,
5873 use different argument fo linux_enable_event_reporting,
5874 use return value from handle_extended_wait.
5875 (extended_event_reported): New function.
5876 (linux_wait_1): Call extended_event_reported and set
5877 status to report fork events.
5878 (linux_write_memory): Add pid to debug message.
5879 (reset_lwp_ptrace_options_callback): New function.
5880 (linux_handle_new_gdb_connection): New function.
5881 (linux_target_ops): Initialize new structure member.
5882 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5883 * lynx-low.c: Initialize new structure member.
5884 * remote-utils.c (prepare_resume_reply): Implement stop reason
5885 "fork" for "T" stop message.
5886 * server.c (handle_query): Call handle_new_gdb_connection.
5887 * server.h (report_fork_events): Declare global flag.
5888 * target.h (struct target_ops) <handle_new_gdb_connection>:
5890 (target_handle_new_gdb_connection): New macro.
5891 * win32-low.c: Initialize new structure member.
5893 2015-05-12 Don Breazeal <donb@codesourcery.com>
5895 * mem-break.c (APPEND_TO_LIST): Define macro.
5896 (clone_agent_expr): New function.
5897 (clone_one_breakpoint): New function.
5898 (clone_all_breakpoints): New function.
5899 * mem-break.h: Declare new functions.
5901 2015-05-12 Don Breazeal <donb@codesourcery.com>
5903 * linux-low.c (linux_supports_fork_events): New function.
5904 (linux_supports_vfork_events): New function.
5905 (linux_target_ops): Initialize new structure members.
5906 (initialize_low): Call linux_check_ptrace_features.
5907 * lynx-low.c (lynx_target_ops): Initialize new structure
5909 * server.c (report_fork_events, report_vfork_events):
5911 (handle_query): Add new features to qSupported packet and
5913 (captured_main): Initialize new global variables.
5914 * target.h (struct target_ops) <supports_fork_events>:
5916 <supports_vfork_events>: New member.
5917 (target_supports_fork_events): New macro.
5918 (target_supports_vfork_events): New macro.
5919 * win32-low.c (win32_target_ops): Initialize new structure
5922 2015-05-12 Gary Benson <gbenson@redhat.com>
5924 * server.c (handle_qxfer_exec_file): Use current process
5927 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5929 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5930 Remove HAVE_PTRACE_GETREGS conditionals.
5931 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5932 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5934 2015-05-08 Yao Qi <yao.qi@linaro.org>
5936 * linux-low.c (linux_supports_conditional_breakpoints): New
5938 (linux_target_ops): Install new target method.
5939 * lynx-low.c (lynx_target_ops): Install NULL hook for
5940 supports_conditional_breakpoints.
5941 * nto-low.c (nto_target_ops): Likewise.
5942 * spu-low.c (spu_target_ops): Likewise.
5943 * win32-low.c (win32_target_ops): Likewise.
5944 * server.c (handle_query): Check
5945 target_supports_conditional_breakpoints.
5946 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5948 (target_supports_conditional_breakpoints): New macro.
5950 2015-05-06 Pedro Alves <palves@redhat.com>
5953 * server.c (start_inferior): If the process exits, mourn it.
5955 2015-04-21 Gary Benson <gbenson@redhat.com>
5957 * hostio.c (fileio_open_flags_to_host): Factored out to
5958 fileio_to_host_openflags in common/fileio.c. Single use
5961 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5963 * linux-xtensa-low.c (xtensa_fill_gregset)
5964 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5967 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5969 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5970 (regs_info): Replace usrregs pointer with NULL.
5972 2015-04-17 Gary Benson <gbenson@redhat.com>
5974 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5975 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5976 * server.c (handle_qxfer_exec_file): New function.
5977 (qxfer_packets): Add exec-file entry.
5978 (handle_query): Report qXfer:exec-file:read as supported packet.
5980 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5982 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5984 2015-04-09 Gary Benson <gbenson@redhat.com>
5986 * hostio-errno.c (errno_to_fileio_error): Remove function.
5987 Update caller to use remote_fileio_to_fio_error.
5989 2015-04-09 Yao Qi <yao.qi@linaro.org>
5991 * linux-low.c (linux_insert_point): Call
5992 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5993 (linux_remove_point): Call remove_memory_breakpoint if type is
5995 * linux-x86-low.c (x86_insert_point): Don't call
5996 insert_memory_breakpoint.
5997 (x86_remove_point): Don't call remove_memory_breakpoint.
5999 2015-04-01 Pedro Alves <palves@redhat.com>
6000 Cleber Rosa <crosa@redhat.com>
6002 * server.c (gdbserver_usage): Reorganize and extend the usage
6005 2015-03-24 Pedro Alves <palves@redhat.com>
6007 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6008 output. Also dump TRAP_TRACE.
6009 (linux_low_filter_event): In debug output, distinguish a
6010 resume_stop SIGSTOP from a delayed SIGSTOP.
6012 2015-03-24 Gary Benson <gbenson@redhat.com>
6014 * linux-x86-low.c (x86_linux_new_thread): Moved to
6016 (x86_linux_prepare_to_resume): Likewise.
6018 2015-03-24 Gary Benson <gbenson@redhat.com>
6020 * Makefile.in (x86-linux-dregs.o): New rule.
6021 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6022 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6023 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6024 (x86_linux_dr_get): Likewise.
6025 (x86_linux_dr_set): Likewise.
6026 (update_debug_registers_callback): Likewise.
6027 (x86_linux_dr_set_addr): Likewise.
6028 (x86_linux_dr_get_addr): Likewise.
6029 (x86_linux_dr_set_control): Likewise.
6030 (x86_linux_dr_get_control): Likewise.
6031 (x86_linux_dr_get_status): Likewise.
6032 (x86_linux_update_debug_registers): Likewise.
6034 2015-03-24 Gary Benson <gbenson@redhat.com>
6036 * linux-x86-low.c (x86_linux_update_debug_registers):
6037 New function, factored out from...
6038 (x86_linux_prepare_to_resume): ...this.
6040 2015-03-24 Gary Benson <gbenson@redhat.com>
6042 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6043 (x86_linux_dr_set): Likewise.
6044 (update_debug_registers_callback): Likewise.
6045 (x86_linux_dr_set_addr): Likewise.
6046 (x86_linux_dr_get_addr): Likewise.
6047 (x86_linux_dr_set_control): Likewise.
6048 (x86_linux_dr_get_control): Likewise.
6049 (x86_linux_dr_get_status): Likewise.
6050 (x86_linux_prepare_to_resume): Likewise.
6052 2015-03-24 Gary Benson <gbenson@redhat.com>
6054 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6055 Use perror_with_name. Pass string through gettext.
6056 (x86_linux_dr_set): Likewise.
6058 2015-03-24 Gary Benson <gbenson@redhat.com>
6060 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6061 (x86_linux_dr_set_addr): ...this.
6062 (x86_dr_low_get_addr): Rename to...
6063 (x86_linux_dr_get_addr): ...this.
6064 (x86_dr_low_set_control): Rename to...
6065 (x86_linux_dr_set_control): ...this.
6066 (x86_dr_low_get_control): Rename to...
6067 (x86_linux_dr_get_control): ...this.
6068 (x86_dr_low_get_status): Rename to...
6069 (x86_linux_dr_get_status): ...this.
6070 (x86_dr_low): Update with new function names.
6072 2015-03-24 Gary Benson <gbenson@redhat.com>
6074 * Makefile.in (x86-linux.o): New rule.
6075 * configure.srv: Add x86-linux.o to relevant targets.
6076 * linux-low.c (lwp_set_arch_private_info): New function.
6077 (lwp_arch_private_info): Likewise.
6078 * linux-x86-low.c: Include nat/x86-linux.h.
6079 (arch_lwp_info): Removed structure.
6080 (update_debug_registers_callback):
6081 Use lwp_set_debug_registers_changed.
6082 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6083 and lwp_set_debug_registers_changed.
6084 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6086 2015-03-24 Gary Benson <gbenson@redhat.com>
6088 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6089 * linux-arm-low.c (arm_new_thread): Likewise.
6090 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6091 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6092 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6093 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6095 2015-03-24 Gary Benson <gbenson@redhat.com>
6097 * linux-low.c (ptid_of_lwp): New function.
6098 (lwp_is_stopped): Likewise.
6099 (lwp_stop_reason): Likewise.
6100 * linux-x86-low.c (update_debug_registers_callback):
6102 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6105 2015-03-24 Gary Benson <gbenson@redhat.com>
6107 * linux-low.h (linux_stop_lwp): Remove declaration.
6109 2015-03-24 Gary Benson <gbenson@redhat.com>
6111 * linux-low.h: Include nat/linux-nat.h.
6112 * linux-low.c (iterate_over_lwps_args): New structure.
6113 (iterate_over_lwps_filter): New function.
6114 (iterate_over_lwps): Likewise.
6115 * linux-x86-low.c (update_debug_registers_callback):
6116 Update signature to what iterate_over_lwps expects.
6117 Remove PID check that iterate_over_lwps now performs.
6118 (x86_dr_low_set_addr): Use iterate_over_lwps.
6119 (x86_dr_low_set_control): Likewise.
6121 2015-03-24 Gary Benson <gbenson@redhat.com>
6123 * linux-x86-low.c (x86_debug_reg_state): New function.
6124 (x86_linux_prepare_to_resume): Use the above.
6126 2015-03-24 Gary Benson <gbenson@redhat.com>
6128 * linux-low.c (current_lwp_ptid): New function.
6129 * linux-x86-low.c: Include nat/linux-nat.h.
6130 (x86_dr_low_get_addr): Use current_lwp_ptid.
6131 (x86_dr_low_get_control): Likewise.
6132 (x86_dr_low_get_status): Likewise.
6134 2015-03-20 Pedro Alves <palves@redhat.com>
6136 * tracepoint.c (cmd_qtstatus): Make "str" const.
6138 2015-03-20 Pedro Alves <palves@redhat.com>
6140 * server.c (handle_general_set): Make "req_str" const.
6142 2015-03-19 Pedro Alves <palves@redhat.com>
6144 * linux-low.c (linux_resume_one_lwp): Rename to ...
6145 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6146 instead call perror_with_name.
6147 (check_ptrace_stopped_lwp_gone): New function.
6148 (linux_resume_one_lwp): Reimplement as wrapper around
6149 linux_resume_one_lwp_throw that swallows errors if the LWP is
6152 2015-03-19 Pedro Alves <palves@redhat.com>
6154 * linux-low.c (count_events_callback, select_event_lwp_callback):
6155 No longer check whether the thread has resume_stop as last resume
6158 2015-03-19 Pedro Alves <palves@redhat.com>
6160 * linux-low.c (count_events_callback, select_event_lwp_callback):
6161 Use the lwp's status_pending_p field, not the thread's.
6163 2015-03-19 Pedro Alves <palves@redhat.com>
6165 * linux-low.c (select_event_lwp_callback): Update comments to
6166 no longer mention SIGTRAP.
6168 2015-03-18 Gary Benson <gbenson@redhat.com>
6170 * server.c (handle_query): Do not report vFile:fstat as supported.
6172 2015-03-11 Gary Benson <gbenson@redhat.com>
6174 * hostio.c (sys/types.h): New include.
6175 (sys/stat.h): Likewise.
6176 (common-remote-fileio.h): Likewise.
6177 (handle_fstat): New function.
6178 (handle_vFile): Handle vFile:fstat packets.
6180 2015-03-11 Gary Benson <gbenson@redhat.com>
6182 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6183 struct stat.st_blocks and struct stat.st_blksize.
6184 * configure: Regenerate.
6185 * config.in: Likewise.
6186 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6187 (OBS): Add common-remote-fileio.o.
6188 (common-remote-fileio.o): New rule.
6190 2015-03-09 Pedro Alves <palves@redhat.com>
6192 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6193 'struct sockaddr' pointer in 'accept' call.
6195 2015-03-09 Pedro Alves <palves@redhat.com>
6198 2015-03-07 Pedro Alves <palves@redhat.com>
6199 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6200 or <winsock2.h> here. Instead include "gdb_socket.h".
6201 (remote_open): Use union gdb_sockaddr_u.
6202 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6203 or <winsock2.h> here. Instead include "gdb_socket.h".
6204 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6205 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6207 (init_named_socket, gdb_agent_helper_thread): Use union
6210 2015-03-07 Pedro Alves <palves@redhat.com>
6212 * configure.ac (build_warnings): Move
6213 -Wdeclaration-after-statement to the C-specific set.
6214 * configure: Regenerate.
6216 2015-03-07 Pedro Alves <palves@redhat.com>
6218 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6219 or <winsock2.h> here. Instead include "gdb_socket.h".
6220 (remote_open): Use union gdb_sockaddr_u.
6221 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6222 or <winsock2.h> here. Instead include "gdb_socket.h".
6223 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6224 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6226 (init_named_socket, gdb_agent_helper_thread): Use union
6229 2015-03-07 Pedro Alves <palves@redhat.com>
6231 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6234 2015-03-06 Yao Qi <yao.qi@linaro.org>
6236 * linux-aarch64-low.c (aarch64_insert_point): Use
6237 show_debug_regs as a boolean.
6238 (aarch64_remove_point): Likewise.
6240 2015-03-05 Pedro Alves <palves@redhat.com>
6242 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6243 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6244 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6245 * nto-low.c (nto_target_ops): Likewise.
6246 * spu-low.c (spu_target_ops): Likewise.
6247 * win32-low.c (win32_target_ops): Likewise.
6249 2015-03-04 Pedro Alves <palves@redhat.com>
6251 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6252 Decide whether a breakpoint triggered based on the SIGTRAP's
6254 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6255 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6256 (linux_low_filter_event): Check for breakpoints before checking
6258 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6260 (linux_stopped_by_sw_breakpoint)
6261 (linux_supports_stopped_by_sw_breakpoint)
6262 (linux_stopped_by_hw_breakpoint)
6263 (linux_supports_stopped_by_hw_breakpoint): New functions.
6264 (linux_target_ops): Install new target methods.
6266 2015-03-04 Pedro Alves <palves@redhat.com>
6268 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6269 * server.c (swbreak_feature, hwbreak_feature): New globals.
6270 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6271 (captured_main): Clear swbreak_feature and hwbreak_feature.
6272 * server.h (swbreak_feature, hwbreak_feature): Declare.
6273 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6274 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6275 supports_stopped_by_hw_breakpoint>: New fields.
6276 (target_supports_stopped_by_sw_breakpoint)
6277 (target_stopped_by_sw_breakpoint)
6278 (target_supports_stopped_by_hw_breakpoint)
6279 (target_stopped_by_hw_breakpoint): Declare.
6281 2015-03-04 Pedro Alves <palves@redhat.com>
6283 enum lwp_stop_reason -> enum target_stop_reason
6284 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6285 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6286 (linux_wait_1, stuck_in_jump_pad_callback)
6287 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6288 (linux_stopped_by_watchpoint):
6289 * linux-low.h (enum lwp_stop_reason): Delete.
6290 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6291 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6293 2015-03-04 Yao Qi <yao.qi@linaro.org>
6295 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6297 2015-03-03 Gary Benson <gbenson@redhat.com>
6299 * hostio.c (handle_vFile): Fix prefix lengths.
6301 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6303 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6306 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6308 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6309 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6310 (clean): Add "rm -f" for above C files.
6311 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6312 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6313 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6314 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6315 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6316 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6317 (init_registers_s390x_vx_linux64)
6318 (init_registers_s390x_tevx_linux64)
6319 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6320 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6322 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6323 (s390_store_vxrs_high): New functions.
6324 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6326 (s390_arch_setup): Add logic for selecting one of the new target
6327 descriptions. Activate the new vector regsets if applicable.
6328 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6329 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6330 and init_registers_s390x_tevx_linux64.
6332 2015-03-01 Pedro Alves <palves@redhat.com>
6334 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6337 2015-02-27 Pedro Alves <palves@redhat.com>
6339 * linux-x86-low.c (u_debugreg_offset): New function.
6340 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6342 2015-02-27 Pedro Alves <palves@redhat.com>
6344 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6345 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6346 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6347 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6348 (ps_lsetfpregs, ps_getpid)
6349 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6350 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6351 (ps_lsetxregs, ps_plog): Declare.
6353 2015-02-27 Pedro Alves <palves@redhat.com>
6355 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6356 IP_AGENT_EXPORT_FUNC.
6357 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6358 IP_AGENT_EXPORT_FUNC.
6359 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6360 (IP_AGENT_EXPORT): Delete.
6361 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6362 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6363 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6364 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6365 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6366 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6367 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6368 (traceframe_read_count, traceframe_write_count)
6369 (traceframes_created, trace_state_variables, get_raw_reg)
6370 (get_trace_state_variable_value, set_trace_state_variable_value)
6371 (ust_loaded, helper_thread_id, cmd_buf): Use
6372 IPA_SYM_EXPORTED_NAME.
6373 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6374 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6375 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6376 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6377 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6378 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6379 EXTERN_C_PUSH/EXTERN_C_POP.
6380 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6381 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6382 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6383 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6384 (traceframe_write_count, traceframe_read_count)
6385 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6386 (about_to_request_buffer_space, get_trace_state_variable_value)
6387 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6388 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6389 EXTERN_C_PUSH/EXTERN_C_POP.
6390 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6391 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6392 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6393 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6394 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6395 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6396 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6397 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6399 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6400 (IP_AGENT_EXPORT_VAR_DECL): Define.
6402 (gdb_agent_get_raw_reg): Declare.
6404 2015-02-27 Tom Tromey <tromey@redhat.com>
6405 Pedro Alves <palves@redhat.com>
6407 Rename symbols whose names are reserved C++ keywords throughout.
6409 2015-02-27 Pedro Alves <palves@redhat.com>
6411 * Makefile.in (COMPILER): New, get it from autoconf.
6412 (CXX): Get from autoconf instead.
6413 (COMPILE.pre): Use COMPILER.
6414 (CC-LD): Rename to ...
6415 (CC_LD): ... this. Use COMPILER.
6416 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6417 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6418 * acinclude.m4: Include build-with-cxx.m4.
6419 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6420 Disable -Werror by default if building in C++ mode.
6421 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6422 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6423 the C++ compiler. Save/restore CXXFLAGS too.
6424 * configure: Regenerate.
6426 2015-02-27 Pedro Alves <palves@redhat.com>
6428 * acinclude.m4: Include libiberty.m4.
6429 * configure.ac: Call libiberty_INIT.
6430 * config.in, configure: Regenerate.
6432 2015-02-26 Pedro Alves <palves@redhat.com>
6434 * linux-low.c (linux_wait_1): When incrementing the PC past a
6435 program breakpoint always use the_low_target.breakpoint_len as
6436 increment, rather than the maximum between that and
6437 the_low_target.decr_pc_after_break.
6439 2015-02-23 Pedro Alves <palves@redhat.com>
6441 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6442 thread was doing a step-over; always adjust the PC if
6443 we stepped over a permanent breakpoint.
6444 (linux_wait_1): If we stepped over breakpoint that was on top of a
6445 permanent breakpoint, manually advance the PC past it.
6447 2015-02-23 Pedro Alves <palves@redhat.com>
6449 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6451 (x86_fill_gregset, x86_store_gregset): Use it when handling
6454 2015-02-20 Pedro Alves <palves@redhat.com>
6456 * thread-db.c: Include "nat/linux-procfs.h".
6457 (thread_db_init): Skip listing new threads if the kernel supports
6458 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6460 2015-02-20 Pedro Alves <palves@redhat.com>
6462 * linux-low.c (status_pending_p_callback): Use ptid_match.
6464 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6466 PR breakpoints/16812
6467 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6468 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6469 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6471 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6473 PR breakpoints/15956
6474 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6476 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6478 * linux-low.c (linux_low_btrace_conf): Print size.
6479 * server.c (handle_btrace_conf_general_set): New.
6480 (hanle_general_set): Call handle_btrace_conf_general_set.
6481 (handle_query): Report Qbtrace-conf:bts:size as supported.
6483 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6485 * linux-low.c (linux_low_enable_btrace): Update parameters.
6486 (linux_low_btrace_conf): New.
6487 (linux_target_ops)<to_btrace_conf>: Initialize.
6488 * server.c (current_btrace_conf): New.
6489 (handle_btrace_enable): Rename to ...
6490 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
6491 to target_enable_btrace. Update comment. Update users.
6492 (handle_qxfer_btrace_conf): New.
6493 (qxfer_packets): Add btrace-conf entry.
6494 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6495 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6496 (target_ops)<read_btrace_conf>: New.
6497 (target_enable_btrace): Update parameters.
6498 (target_read_btrace_conf): New.
6500 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6502 * server.c (handle_btrace_general_set): Remove call to
6503 target_supports_btrace.
6504 (supported_btrace_packets): New.
6505 (handle_query): Call supported_btrace_packets.
6506 * target.h: include btrace-common.h.
6507 (btrace_target_info): Removed.
6508 (supports_btrace, target_supports_btrace): Update parameters.
6510 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6512 * Makefile.in (SFILES): Add common/btrace-common.c.
6513 (OBS): Add common/btrace-common.o.
6514 (btrace-common.o): Add build rules.
6515 * linux-low: Include btrace-common.h.
6516 (linux_low_read_btrace): Use struct btrace_data. Call
6517 btrace_data_init and btrace_data_fini.
6519 2015-02-06 Pedro Alves <palves@redhat.com>
6521 * thread-db.c (find_new_threads_callback): Add debug output.
6523 2015-02-04 Pedro Alves <palves@redhat.com>
6525 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6526 (resume_stopped_resumed_lwps): New function.
6527 (linux_wait_for_event_filtered): Use it.
6529 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6531 * Makefile.in (SFILES): Add linux-personality.c.
6532 (linux-personality.o): New rule.
6533 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6534 list of objects to be built.
6535 * linux-low.c: Include nat/linux-personality.h.
6536 (linux_create_inferior): Remove code to disable address space
6537 randomization (moved to ../nat/linux-personality.c). Create
6538 cleanup to disable address space randomization.
6540 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6542 * Makefile.in (posix-strerror.o): New rule.
6543 (mingw-strerror.o): Likewise.
6544 * configure: Regenerated.
6545 * configure.ac: Source file ../common/common.host. Initialize new
6546 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6548 2015-01-14 Yao Qi <yao@codesourcery.com>
6550 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6551 (ppc-linux.o): New rule.
6552 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6553 * configure.ac: AC_CHECK_FUNCS(getauxval).
6554 * config.in: Re-generated.
6555 * configure: Re-generated.
6556 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6557 ppc64_64bit_inferior_p
6559 2015-01-14 Yao Qi <yao@codesourcery.com>
6561 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6562 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6563 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6564 (PT_ORIG_R3, PT_TRAP): Likewise.
6565 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6566 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6567 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6569 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6571 * i387-fp.c (i387_cache_to_xsave): In look over
6572 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6573 zmmh_low_space field by use of zmmh_high_space.
6575 2015-01-09 Pedro Alves <palves@redhat.com>
6577 * linux-low.c (step_over_bkpt): Move higher up in the file.
6578 (handle_extended_wait): Don't store the stop_pc here.
6579 (get_stop_pc): Adjust comments and rename to ...
6580 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6581 stopped for a software breakpoint or hardware breakpoint.
6582 (thread_still_has_status_pending_p): New function.
6583 (status_pending_p_callback): Use
6584 thread_still_has_status_pending_p. If the event is no longer
6585 interesting, resume the LWP.
6586 (handle_tracepoints): Add assert.
6587 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6588 (wstatus_maybe_breakpoint): New function.
6589 (cancel_breakpoint): Delete function.
6590 (check_stopped_by_watchpoint): New function, factored out from
6591 linux_low_filter_event.
6592 (lp_status_maybe_breakpoint): Delete function.
6593 (linux_low_filter_event): Remove filter_ptid argument.
6594 Leave thread group exits pending here. Store the LWP's stop PC.
6595 Always leave events pending.
6596 (linux_wait_for_event_filtered): Pull all events out of the
6597 kernel, and leave them all pending.
6598 (count_events_callback, select_event_lwp_callback): Consider all
6600 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6601 (select_event_lwp): Only give preference to the stepping LWP in
6602 all-stop mode. Adjust comments.
6603 (ignore_event): New function.
6604 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6605 references to cancel_breakpoints. Adjust to renames. Also give
6606 equal priority to all LWPs that have had events in non-stop mode.
6607 If reporting a software breakpoint event, unadjust the LWP's PC.
6608 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6609 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6611 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6612 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6613 (linux_stopped_by_watchpoint): Adjust.
6614 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6615 * linux-low.h (enum lwp_stop_reason): New.
6616 (struct lwp_info) <stop_pc>: Adjust comment.
6617 <stopped_by_watchpoint>: Delete field.
6618 <stop_reason>: New field.
6619 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6620 * mem-break.c (software_breakpoint_inserted_here)
6621 (hardware_breakpoint_inserted_here): New function.
6622 * mem-break.h (software_breakpoint_inserted_here)
6623 (hardware_breakpoint_inserted_here): Declare.
6624 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6625 (cancel_breakpoints): Delete.
6626 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6627 (upload_fast_traceframes): Remove references to
6630 2015-01-09 Pedro Alves <palves@redhat.com>
6632 * thread-db.c (find_new_threads_callback): Ignore thread if the
6633 kernel thread ID is -1.
6635 2015-01-09 Pedro Alves <palves@redhat.com>
6637 * linux-low.c (linux_attach_fail_reason_string): Move to
6638 nat/linux-ptrace.c, and rename.
6639 (linux_attach_lwp): Update comment.
6640 (attach_proc_task_lwp_callback): New function.
6641 (linux_attach): Adjust to rename and use
6642 linux_proc_attach_tgid_threads.
6643 (linux_attach_fail_reason_string): Delete declaration.
6645 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6647 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6648 * server.c (gdbserver_version): Likewise.
6650 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6652 * remote-utils.c: Include ctype.h.
6653 (input_interrupt): Explicitly handle the case when the char
6654 received is the NUL byte. Improve the printing of non-ASCII
6657 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6659 * linux-low.c (linux_low_filter_event): Update call to
6660 linux_enable_event_reporting following the addition of
6661 a new parameter to that function.
6663 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6666 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6667 (AARCH64_FPCR_REGNO): Likewise.
6668 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6669 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6670 (aarch64_store_fpregset): Likewise.
6672 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6674 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6675 Remove FIXME comment about assumption about N.
6677 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6679 * configure.ac: If large-file support is disabled in GDBserver,
6680 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6681 * configure: Regenerate.
6683 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6685 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6686 warning upon ENODATA from ptrace.
6687 * linux-s390-low.c (s390_store_tdb): New.
6688 (s390_regsets): Add regset for NT_S390_TDB.
6690 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6692 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6693 without a fill_function.
6694 * linux-s390-low.c (s390_fill_last_break): Remove.
6695 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6696 (s390_arch_setup): Use regset's size instead of fill_function for
6699 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6701 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6702 the regset's store function when ptrace returned an error.
6703 * regcache.c (get_thread_regcache): Invalidate register cache
6704 before fetching inferior's registers.
6706 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6708 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6709 while-loop as for-loop.
6710 (regsets_store_inferior_registers): Likewise.
6712 2014-11-28 Yao Qi <yao@codesourcery.com>
6714 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6715 * config.in, configure: Re-generate.
6716 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6719 2014-11-21 Yao Qi <yao@codesourcery.com>
6721 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6722 (AC_CHECK_HEADERS): Remove malloc.h.
6723 * configure: Re-generated.
6724 * config.in: Re-generated.
6725 * server.h: Don't include alloca.h and malloc.h.
6726 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6727 Don't include malloc.h.
6729 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6731 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6732 corresponding ERRNO check in same block.
6734 2014-11-12 Pedro Alves <palves@redhat.com>
6736 * server.c (cont_thread): Update comment.
6737 (start_inferior, attach_inferior): No longer clear cont_thread.
6738 (handle_v_cont): No longer set cont_thread.
6739 (captured_main): Clear cont_thread each time a GDB connects.
6741 2014-11-12 Pedro Alves <palves@redhat.com>
6743 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6744 thread, and don't resume all threads if the Hc thread has exited.
6746 2014-11-12 Pedro Alves <palves@redhat.com>
6748 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6749 the process group instead of to a specific LWP.
6751 2014-10-15 Pedro Alves <palves@redhat.com>
6754 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6756 (arm_set_thread_context): Delete.
6757 (the_low_target): Adjust.
6758 * win32-i386-low.c (debug_registers_changed)
6759 (debug_registers_used): Delete.
6760 (update_debug_registers_callback): New function.
6761 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6762 needing to update their debug registers.
6763 (win32_get_current_dr): New function.
6764 (x86_dr_low_get_addr, x86_dr_low_get_control)
6765 (x86_dr_low_get_status): Fetch the debug register from the thread
6767 (i386_initial_stuff): Adjust.
6768 (i386_get_thread_context): Remove current_event parameter. Don't
6769 clear debug_registers_changed nor copy DR values to
6771 (i386_set_thread_context): Delete.
6772 (i386_prepare_to_resume): New function.
6773 (i386_thread_added): Mark the thread as needing to update irs
6775 (the_low_target): Remove i386_set_thread_context and install
6776 i386_prepare_to_resume.
6777 * win32-low.c (win32_get_thread_context): Adjust.
6778 (win32_set_thread_context): Use SetThreadContext
6780 (win32_prepare_to_resume): New function.
6781 (win32_require_context): New function, factored out from ...
6782 (thread_rec): ... this.
6783 (continue_one_thread): Call win32_prepare_to_resume on each thread
6784 we're about to continue.
6785 (win32_resume): Call win32_prepare_to_resume on the event thread.
6786 * win32-low.h (struct win32_thread_info)
6787 <debug_registers_changed>: New field.
6788 (struct win32_target_ops): Change prototype of set_thread_context,
6789 delete set_thread_context and add prepare_to_resume.
6790 (win32_require_context): New declaration.
6792 2014-10-08 Gary Benson <gbenson@redhat.com>
6794 * server.h: Do not include common-exceptions.h.
6796 2014-10-08 Gary Benson <gbenson@redhat.com>
6798 * server.h: Do not include cleanups.h.
6800 2014-09-30 James Hogan <james.hogan@imgtec.com>
6802 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6805 2014-09-23 Yao Qi <yao@codesourcery.com>
6807 * linux-low.c (lp_status_maybe_breakpoint): New function.
6808 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6809 (count_events_callback): Likewise.
6810 (select_event_lwp_callback): Likewise.
6811 (cancel_breakpoints_callback): Likewise.
6813 2014-09-19 Don Breazeal <donb@codesourcery.com>
6815 * linux-low.c (handle_extended_wait): Call
6816 linux_ptrace_get_extended_event.
6817 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6818 linux_is_extended_waitstatus.
6820 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6822 * Makefile.in (CPPFLAGS): Define.
6823 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6824 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6826 2014-09-16 Gary Benson <gbenson@redhat.com>
6828 * inferiors.h (current_inferior): Renamed as...
6829 (current_thread): New variable. All uses updated.
6830 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6831 (maybe_move_out_of_jump_pad): Likewise.
6832 (cancel_breakpoint): Likewise.
6833 (linux_low_filter_event): Likewise.
6834 (wait_for_sigstop): Likewise.
6835 (linux_resume_one_lwp): Likewise.
6836 (need_step_over_p): Likewise.
6837 (start_step_over): Likewise.
6838 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6839 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6840 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6841 and save_inferior as saved_thread.
6842 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6844 (regcache_invalidate_thread): Likewise.
6845 * remote-utils.c (prepare_resume_reply): Likewise.
6846 * thread-db.c (thread_db_get_tls_address): Likewise.
6847 (disable_thread_event_reporting): Likewise.
6848 (remove_thread_event_breakpoints): Likewise.
6849 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6851 * target.h (set_desired_inferior): Renamed as...
6852 (set_desired_thread): New declaration. All uses updated.
6853 * server.c (myresume): Updated comment to reference thread instead
6855 (handle_serial_event): Likewise.
6856 (handle_target_event): Likewise.
6858 2014-09-12 Tom Tromey <tromey@redhat.com>
6859 Gary Benson <gbenson@redhat.com>
6861 * regcache.h: Include common-regcache.h.
6862 (regcache_read_pc): Don't declare.
6863 * regcache.c (get_thread_regcache_for_ptid): New function.
6865 2014-09-11 Tom Tromey <tromey@redhat.com>
6866 Gary Benson <gbenson@redhat.com>
6868 * symbol.c: New file.
6869 * Makefile.in (SFILES): Add symbol.c.
6870 (OBS): Add symbol.o.
6872 2014-09-11 Gary Benson <gbenson@redhat.com>
6874 * target.c (target_stop_ptid, target_continue_ptid): New
6877 2014-09-11 Tom Tromey <tromey@redhat.com>
6878 Gary Benson <gbenson@redhat.com>
6880 * target.h: Include target/target.h.
6881 * target.c (target_read_memory, target_read_uint32)
6882 (target_write_memory): New functions.
6884 2014-09-11 Gary Benson <gbenson@redhat.com>
6886 * server.h (debug_hw_points): Don't declare.
6887 * server.c (debug_hw_points): Don't define. Replace all uses
6888 with show_debug_regs.
6889 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6890 all uses with show_debug_regs.
6892 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6894 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6895 endianness into account.
6896 (ppc_supply_ptrace_register): Likewise.
6898 2014-09-03 James Hogan <james.hogan@imgtec.com>
6900 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6901 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6903 2014-09-03 Gary Benson <gbenson@redhat.com>
6905 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6906 ALL_DEBUG_ADDRESS_REGISTERS.
6908 2014-09-02 Gary Benson <gbenson@redhat.com>
6910 * i386-low.h: Renamed as...
6911 * x86-low.h: New file. All type, function and variable name
6912 prefixes changed from "i386_" to "x86_". All references updated.
6913 * i386-low.c: Renamed as...
6914 * x86-low.c: New file. All type, function and variable name
6915 prefixes changed from "i386_" to "x86_". All references updated.
6917 2014-09-02 Gary Benson <gbenson@redhat.com>
6919 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6920 (x86_linux_new_thread): Likewise.
6922 2014-08-29 Gary Benson <gbenson@redhat.com>
6924 * server.h (setjmp.h): Do not include.
6925 (toplevel): Do not declare.
6926 (common-exceptions.h): Include.
6927 (cleanups.h): Likewise.
6928 * server.c (toplevel): Do not define.
6929 (exit_code): New static global.
6930 (detach_or_kill_for_exit_cleanup): New function.
6931 (main): New function. Original main renamed to...
6932 (captured_main): New function.
6933 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6935 2014-08-29 Gary Benson <gbenson@redhat.com>
6937 * Makefile.in (SFILES): Add common/common-exceptions.c.
6938 (OBS): Add common-exceptions.o.
6939 (common-exceptions.o): New rule.
6940 * utils.c (prepare_to_throw_exception): New function.
6942 2014-08-29 Gary Benson <gbenson@redhat.com>
6944 * config.in: Regenerate.
6945 * configure: Likewise.
6947 2014-08-29 Gary Benson <gbenson@redhat.com>
6949 * Makefile.in (SFILES): Add common/cleanups.c.
6951 (cleanups.o): New rule.
6953 2014-08-29 Gary Benson <gbenson@redhat.com>
6955 * utils.c (internal_vwarning): New function.
6957 2014-08-28 Gary Benson <gbenson@redhat.com>
6959 * utils.h (fatal): Remove declaration.
6960 * utils.c (fatal): Remove function.
6962 2014-08-28 Gary Benson <gbenson@redhat.com>
6964 * tracepoint.c (gdb_agent_init): Replace fatal with
6966 (initialize_tracepoint): Likewise.
6968 2014-08-28 Gary Benson <gbenson@redhat.com>
6970 * remote-utils.c (remote_prepare): Replace fatal with error.
6972 2014-08-28 Gary Benson <gbenson@redhat.com>
6974 * linux-low.c (linux_async): Replace fatal with warning.
6976 (linux_start_non_stop): Return -1 if linux_async failed.
6978 2014-08-28 Gary Benson <gbenson@redhat.com>
6980 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6982 (i386_dr_low_get_addr): Remove vague comment.
6983 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6986 2014-08-28 Gary Benson <gbenson@redhat.com>
6988 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6989 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6991 (linux_resume_one_lwp): Likewise.
6992 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6994 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6995 with internal_error.
6996 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6997 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6998 (find_register_by_name): Replace fatal with internal_error.
6999 (find_regno): Likewise.
7000 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7001 * thread-db.c (thread_db_create_event): Likewise.
7002 (thread_db_load_search): Likewise.
7003 (try_thread_db_load_1): Likewise.
7004 * tracepoint.c (get_jump_space_head): Replace fatal with
7006 (claim_trampoline_space): Likewise.
7007 (have_fast_tracepoint_trampoline_buffer): Likewise.
7008 (cmd_qtstart): Likewise.
7009 (stop_tracing): Likewise.
7010 (fast_tracepoint_collecting): Likewise.
7011 (target_malloc): Likewise.
7012 (download_tracepoint): Likewise.
7013 (download_trace_state_variables): Replace check with gdb_assert.
7014 (upload_fast_traceframes): Replace fatal with internal_error.
7016 2014-08-19 Tom Tromey <tromey@redhat.com>
7017 Gary Benson <gbenson@redhat.com>
7019 * Makefile.in (SFILES): Add common/common-debug.c.
7020 (OBS): Add common-debug.o.
7021 (common-debug.o): New rule.
7022 * debug.h (debug_printf): Don't declare.
7023 * debug.c (debug_printf): Renamed and rewritten as...
7024 (debug_vprintf): New function.
7026 2014-08-19 Gary Benson <gbenson@redhat.com>
7028 * utils.h: Do not include print-utils.h.
7030 2014-08-19 Tom Tromey <tromey@redhat.com>
7031 Gary Benson <gbenson@redhat.com>
7033 * server.h: Add static assertion.
7034 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7036 2014-08-19 Tom Tromey <tromey@redhat.com>
7037 Gary Benson <gbenson@redhat.com>
7039 * Makefile.in (SFILES): Add common/errors.c.
7040 (OBS): Add errors.o.
7041 (IPA_OBS): Add errors-ipa.o.
7042 (errors.o): New rule.
7043 (errors-ipa.o): Likewise.
7044 * utils.h (perror_with_name, error, warning): Don't declare.
7045 * utils.c (warning): Renamed and rewritten as...
7046 (vwarning): New function.
7047 (error): Renamed and rewritten as...
7048 (verror): New function.
7049 (internal_error): Renamed and rewritten as...
7050 (internal_verror): New function.
7052 2014-08-07 Gary Benson <gbenson@redhat.com>
7054 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7055 * configure: Regenerate.
7056 * config.in: Likewise.
7057 * server.h: Do not include errno.h.
7058 * event-loop.c: Likewise.
7059 * hostio-errno.c: Likewise.
7060 * linux-low.c: Likewise.
7061 * remote-utils.c: Likewise.
7062 * spu-low.c: Likewise.
7063 * utils.c: Likewise.
7064 * gdbreplay.c: Unconditionally include errno.h.
7066 2014-08-07 Gary Benson <gbenson@redhat.com>
7068 * server.h: Do not include string.h.
7069 * event-loop.c: Likewise.
7070 * linux-low.c: Likewise.
7071 * regcache.c: Likewise.
7072 * remote-utils.c: Likewise.
7073 * spu-low.c: Likewise.
7074 * utils.c: Likewise.
7076 2014-08-07 Gary Benson <gbenson@redhat.com>
7078 * server.h: Do not include gdb_assert.h.
7080 2014-08-07 Gary Benson <gbenson@redhat.com>
7082 * server.h: Do not include common-utils.h.
7084 2014-08-07 Gary Benson <gbenson@redhat.com>
7086 * server.h: Do not include ptid.h.
7087 * notif.h: Likewise.
7089 2014-08-07 Gary Benson <gbenson@redhat.com>
7091 * server.h: Do not include gdb_locale.h.
7093 2014-08-07 Gary Benson <gbenson@redhat.com>
7095 * server.h: Do not include gdb/signals.h.
7096 * win32-low.c: Likewise.
7098 2014-08-07 Gary Benson <gbenson@redhat.com>
7100 * server.h: Do not include pathmax.h.
7102 2014-08-07 Gary Benson <gbenson@redhat.com>
7104 * server.h: Do not include libiberty.h.
7105 * linux-bfin-low.c: Likewise.
7107 2014-08-07 Gary Benson <gbenson@redhat.com>
7109 * server.h: Do not include ansidecl.h.
7111 2014-08-07 Gary Benson <gbenson@redhat.com>
7113 * linux-x86-low.c: Do not include stddef.h.
7114 * lynx-ppc-low.c: Likewise.
7115 * tracepoint.c: Likewise.
7117 2014-08-07 Gary Benson <gbenson@redhat.com>
7119 * server.h: Do not include stdarg.h.
7120 * nto-low.c: Likewise.
7122 2014-08-07 Gary Benson <gbenson@redhat.com>
7124 * server.h: Do not include stdlib.h.
7125 * inferiors.c: Likewise.
7126 * linux-low.c: Likewise.
7127 * regcache.c: Likewise.
7128 * spu-low.c: Likewise.
7129 * tracepoint.c: Likewise.
7130 * utils.c: Likewise.
7132 2014-08-07 Gary Benson <gbenson@redhat.com>
7134 * server.h: Do not include stdio.h.
7135 * linux-low.c: Likewise.
7136 * remote-utils.c: Likewise.
7137 * spu-low.c: Likewise.
7138 * utils.c: Likewise.
7139 * wincecompat.c: Likewise.
7141 2014-08-06 Gary Benson <gbenson@redhat.com>
7143 * regcache.c (init_register_cache): Move conditionals inside if.
7145 2014-08-06 Gary Benson <gbenson@redhat.com>
7147 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7149 2014-07-31 Gary Benson <gbenson@redhat.com>
7151 * ax.h: Do not include server.h.
7152 * gdbthread.h: Likewise.
7153 * lynx-low.h: Likewise.
7154 * notif.h: Likewise.
7156 2014-07-30 Gary Benson <gbenson@redhat.com>
7158 * server.h: Include common-defs.h.
7159 Do not include config.h or build-gnulib-gdbserver/config.h.
7161 2014-07-30 Gary Benson <gbenson@redhat.com>
7163 * hostio-errno.c: Move server.h to top of includes list.
7164 * inferiors.c: Likewise.
7165 * linux-x86-low.c: Likewise.
7166 * notif.c: Include server.h.
7168 2014-07-24 Tom Tromey <tromey@redhat.com>
7169 Gary Benson <gbenson@redhat.com>
7171 * server.h (CORE_ADDR): Now unsigned.
7173 2014-07-16 Pedro Alves <palves@redhat.com>
7175 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7177 2014-07-15 Pedro Alves <palves@redhat.com>
7179 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7182 2014-07-11 Pedro Alves <palves@redhat.com>
7184 * linux-low.c (kill_wait_lwp): New function, based on
7185 kill_one_lwp_callback, but use my_waitpid directly.
7186 (kill_one_lwp_callback, linux_kill): Use it.
7188 2014-06-23 Pedro Alves <palves@redhat.com>
7190 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7191 before setting DR0..DR3.
7193 2014-06-20 Gary Benson <gbenson@redhat.com>
7195 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7196 * configure: Regenerated.
7197 * config.in: Likewise.
7199 2014-06-20 Gary Benson <gbenson@redhat.com>
7201 * Makefile.in (SFILES): Update locations for files moved
7203 (object file files): Reordered.
7205 2014-06-20 Gary Benson <gbenson@redhat.com>
7207 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7208 (i386_dr_low_set_addr): Likewise.
7209 (i386_dr_low_get_addr): Likewise.
7210 (i386_dr_low_can_set_control): Likewise.
7211 (i386_dr_low_set_control): Likewise.
7212 (i386_dr_low_get_control): Likewise.
7213 (i386_dr_low_get_status): Likewise.
7214 (i386_get_debug_register_length): Likewise.
7215 * linux-x86-low.c (i386_dr_low_set_addr):
7216 Changed signature. Made static.
7217 (i386_dr_low_get_addr): Likewise.
7218 (i386_dr_low_set_control): Likewise.
7219 (i386_dr_low_get_control): Likewise.
7220 (i386_dr_low_get_status): Likewise.
7221 (i386_dr_low): New global variable.
7222 * win32-i386-low.c (i386_dr_low_set_addr):
7223 Changed signature. Made static.
7224 (i386_dr_low_get_addr): Likewise.
7225 (i386_dr_low_set_control): Likewise.
7226 (i386_dr_low_get_control): Likewise.
7227 (i386_dr_low_get_status): Likewise.
7228 (i386_dr_low): New global variable.
7230 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7232 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7233 * Makefile.in (AR, AR_FLAGS): Define.
7234 * configure: Regenerate.
7236 2014-06-19 Gary Benson <gbenson@redhat.com>
7238 * Makefile.in (i386-dregs.o): New rule.
7239 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7240 * i386-low.c (target.h): Remove include.
7241 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7242 (DR_CONTROL_SHIFT): Likewise.
7243 (DR_CONTROL_SIZE): Likewise.
7244 (DR_RW_EXECUTE): Likewise.
7245 (DR_RW_WRITE): Likewise.
7246 (DR_RW_READ): Likewise.
7247 (DR_RW_IORW): Likewise.
7248 (DR_LEN_1): Likewise.
7249 (DR_LEN_2): Likewise.
7250 (DR_LEN_4): Likewise.
7251 (DR_LEN_8): Likewise.
7252 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7253 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7254 (DR_ENABLE_SIZE): Likewise.
7255 (DR_LOCAL_SLOWDOWN): Likewise.
7256 (DR_GLOBAL_SLOWDOWN): Likewise.
7257 (DR_CONTROL_RESERVED): Likewise.
7258 (I386_DR_CONTROL_MASK): Likewise.
7259 (I386_DR_VACANT): Likewise.
7260 (I386_DR_LOCAL_ENABLE): Likewise.
7261 (I386_DR_GLOBAL_ENABLE): Likewise.
7262 (I386_DR_DISABLE): Likewise.
7263 (I386_DR_SET_RW_LEN): Likewise.
7264 (I386_DR_GET_RW_LEN): Likewise.
7265 (I386_DR_WATCH_HIT): Likewise.
7266 (i386_wp_op_t): Likewise.
7267 (i386_show_dr): Likewise.
7268 (i386_length_and_rw_bits): Likewise.
7269 (i386_insert_aligned_watchpoint): Likewise.
7270 (i386_remove_aligned_watchpoint): Likewise.
7271 (i386_handle_nonaligned_watchpoint): Likewise.
7272 i386_update_inferior_debug_regs(): Likewise.
7273 (i386_dr_insert_watchpoint): Likewise.
7274 (i386_dr_remove_watchpoint): Likewise.
7275 (i386_dr_region_ok_for_watchpoint): Likewise.
7276 (i386_dr_stopped_data_address): Likewise.
7277 (i386_dr_stopped_by_watchpoint): Likewise.
7279 2014-06-19 Gary Benson <gbenson@redhat.com>
7281 * i386-low.c (i386_dr_show): Renamed to
7282 i386_show_dr and made static. All uses updated.
7283 (i386_dr_length_and_rw_bits): Renamed to
7284 i386_length_and_rw_bits and made static.
7286 (i386_dr_insert_aligned_watchpoint): Renamed to
7287 i386_insert_aligned_watchpoint and made static.
7289 (i386_dr_remove_aligned_watchpoint): Renamed to
7290 i386_remove_aligned_watchpoint and made static.
7292 (i386_dr_update_inferior_debug_regs): Renamed to
7293 i386_update_inferior_debug_regs and made static.
7296 2014-06-18 Gary Benson <gbenson@redhat.com>
7298 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7299 (i386_dr_low_can_set_control): Likewise.
7300 (i386_get_debug_register_length): Likewise.
7301 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7302 (i386_dr_low_can_set_control): Likewise.
7303 (i386_get_debug_register_length): Likewise.
7305 2014-06-17 Gary Benson <gbenson@redhat.com>
7307 * i386-low.h (i386-dregs.h): New include.
7308 (DR_FIRSTADDR): Now in i386-dregs.h.
7309 (DR_LASTADDR): Likewise.
7310 (DR_NADDR): Likewise.
7311 (DR_STATUS): Likewise.
7312 (DR_CONTROL): Likewise.
7313 (i386_debug_reg_state): Likewise.
7314 (i386_dr_insert_watchpoint): Likewise.
7315 (i386_dr_remove_watchpoint): Likewise.
7316 (i386_dr_region_ok_for_watchpoint): Likewise.
7317 (i386_dr_stopped_data_address): Likewise.
7318 (i386_dr_stopped_by_watchpoint): Likewise.
7319 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7321 2014-06-18 Gary Benson <gbenson@redhat.com>
7323 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7324 i386_dr_insert_watchpoint.
7325 (i386_low_remove_watchpoint): Renamed to
7326 i386_dr_remove_watchpoint.
7327 (i386_low_region_ok_for_watchpoint): Renamed to
7328 i386_dr_region_ok_for_watchpoint.
7329 (i386_low_stopped_data_address): Renamed to
7330 i386_dr_stopped_data_address.
7331 (i386_low_stopped_by_watchpoint): Renamed to
7332 i386_dr_stopped_by_watchpoint.
7333 * i386-low.c (i386_show_dr): Renamed to
7334 i386_dr_show and made nonstatic. All uses updated.
7335 (i386_length_and_rw_bits): Renamed to
7336 i386_dr_length_and_rw_bits and made nonstatic.
7338 (i386_insert_aligned_watchpoint): Renamed to
7339 i386_dr_insert_aligned_watchpoint and made nonstatic.
7341 (i386_remove_aligned_watchpoint): Renamed to
7342 i386_dr_remove_aligned_watchpoint and made nonstatic.
7344 (i386_update_inferior_debug_regs): Renamed to
7345 i386_dr_update_inferior_debug_regs and made nonstatic.
7347 (i386_low_insert_watchpoint): Renamed to
7348 i386_dr_insert_watchpoint. All uses updated.
7349 (i386_low_remove_watchpoint): Renamed to
7350 i386_dr_remove_watchpoint. All uses updated.
7351 (i386_low_region_ok_for_watchpoint): Renamed to
7352 i386_dr_region_ok_for_watchpoint. All uses updated.
7353 (i386_low_stopped_data_address): Renamed to
7354 i386_dr_stopped_data_address. All uses updated.
7355 (i386_low_stopped_by_watchpoint): Renamed to
7356 i386_dr_stopped_by_watchpoint. All uses updated.
7358 2014-06-18 Gary Benson <gbenson@redhat.com>
7360 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7361 (i386_dr_low_can_set_control): Likewise.
7362 (i386_insert_aligned_watchpoint): New check.
7364 2014-06-18 Gary Benson <gbenson@redhat.com>
7366 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7369 2014-06-18 Gary Benson <gbenson@redhat.com>
7371 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7372 instead of fatal and error.
7373 (i386_handle_nonaligned_watchpoint): Likewise.
7375 2014-06-18 Gary Benson <gbenson@redhat.com>
7377 * i386-low.c (i386_get_debug_register_length): New macro.
7378 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7379 (i386_show_dr): Use debug_printf instead of fprintf. Use
7380 phex to format values.
7382 2014-06-18 Gary Benson <gbenson@redhat.com>
7384 * i386-low.h: Comment changes.
7385 * i386-low.c: Likewise.
7387 2014-06-18 Gary Benson <gbenson@redhat.com>
7389 * i386-low.c: Whitespace changes.
7391 2014-06-12 Tom Tromey <tromey@redhat.com>
7393 * utils.c (freeargv): Remove.
7395 2014-06-12 Tom Tromey <tromey@redhat.com>
7397 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7398 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7399 (parse_debug_format_options): Likewise.
7400 (gdbserver_usage): Likewise.
7401 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7402 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7403 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7405 ($(LIBGNU)): Depend on libiberty.
7406 (all-lib): Recurse into all subdirs.
7407 (install-only): Invoke "install" target in subdirs.
7408 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7410 * configure: Rebuild.
7411 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7412 for vasprintf, vsnprintf, or gettimeofday.
7413 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7416 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7418 * development.sh: Delete.
7419 * Makefile.in (config.status): Adjust dependency on development.sh.
7420 * configure.ac: Adjust development.sh source call.
7421 * configure: Regenerate.
7423 2014-06-02 Pedro Alves <palves@redhat.com>
7425 * ax.c (gdb_free_agent_expr): New function.
7426 * ax.h (gdb_free_agent_expr): New declaration.
7427 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7429 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7431 (clear_breakpoint_conditions_and_commands): New function.
7432 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7433 (clear_breakpoint_conditions_and_commands): New declaration.
7435 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7437 * linux-aarch64-low.c (asm/ptrace.h): Include.
7439 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7441 Fix TLS access for -static -pthread.
7442 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7443 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7444 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7446 2014-05-20 Pedro Alves <palves@redhat.com>
7448 * linux-aarch64-low.c (aarch64_insert_point)
7449 (aarch64_remove_point): No longer check whether the type is
7450 supported here. Adjust to new interface.
7451 (the_low_target): Install aarch64_supports_z_point_type as
7452 supports_z_point_type method.
7453 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7454 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7455 instead of a Z packet char. Adjust.
7456 (arm_supports_z_point_type): New function.
7457 (arm_insert_point, arm_remove_point): Adjust to new interface.
7458 (the_low_target): Install arm_supports_z_point_type.
7459 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7460 (cris_insert_point, cris_remove_point): Adjust to new interface.
7461 Don't check whether the type is supported here.
7462 (the_low_target): Install cris_supports_z_point_type.
7463 * linux-low.c (linux_supports_z_point_type): New function.
7464 (linux_insert_point, linux_remove_point): Adjust to new interface.
7465 * linux-low.h (struct linux_target_ops) <insert_point,
7466 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7467 raw_breakpoint pointer parameter.
7468 <supports_z_point_type>: New method.
7469 * linux-mips-low.c (mips_supports_z_point_type): New function.
7470 (mips_insert_point, mips_remove_point): Adjust to new interface.
7471 Use mips_supports_z_point_type.
7472 (the_low_target): Install mips_supports_z_point_type.
7473 * linux-ppc-low.c (the_low_target): Install NULL as
7474 supports_z_point_type method.
7475 * linux-s390-low.c (the_low_target): Install NULL as
7476 supports_z_point_type method.
7477 * linux-sparc-low.c (the_low_target): Install NULL as
7478 supports_z_point_type method.
7479 * linux-x86-low.c (x86_supports_z_point_type): New function.
7480 (x86_insert_point): Adjust to new insert_point interface. Use
7481 insert_memory_breakpoint. Adjust to new
7482 i386_low_insert_watchpoint interface.
7483 (x86_remove_point): Adjust to remove_point interface. Use
7484 remove_memory_breakpoint. Adjust to new
7485 i386_low_remove_watchpoint interface.
7486 (the_low_target): Install x86_supports_z_point_type.
7487 * lynx-low.c (lynx_target_ops): Install NULL as
7488 supports_z_point_type callback.
7489 * nto-low.c (nto_supports_z_point_type): New.
7490 (nto_insert_point, nto_remove_point): Adjust to new interface.
7491 (nto_target_ops): Install nto_supports_z_point_type.
7492 * mem-break.c: Adjust intro comment.
7493 (struct raw_breakpoint) <raw_type, size>: New fields.
7494 <inserted>: Update comment.
7495 <shlib_disabled>: Delete field.
7496 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7497 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7498 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7499 (raw_bkpt_type_to_target_hw_bp_type): New function.
7500 (find_enabled_raw_code_breakpoint_at): New function.
7501 (find_raw_breakpoint_at): New type and size parameters. Use them.
7502 (insert_memory_breakpoint): New function, based off
7503 set_raw_breakpoint_at.
7504 (remove_memory_breakpoint): New function.
7505 (set_raw_breakpoint_at): Reimplement.
7506 (set_breakpoint): New, based on set_breakpoint_at.
7507 (set_breakpoint_at): Reimplement.
7508 (delete_raw_breakpoint): Go through the_target->remove_point
7509 instead of assuming memory breakpoints.
7510 (find_gdb_breakpoint_at): Delete.
7511 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7512 (find_gdb_breakpoint): New function.
7513 (set_gdb_breakpoint_at): Delete.
7514 (z_type_supported): New function.
7515 (set_gdb_breakpoint_1): New function, loosely based off
7516 set_gdb_breakpoint_at.
7517 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7518 (delete_gdb_breakpoint_at): Delete.
7519 (delete_gdb_breakpoint_1): New function, loosely based off
7520 delete_gdb_breakpoint_at.
7521 (delete_gdb_breakpoint): New function.
7522 (clear_gdb_breakpoint_conditions): Rename to ...
7523 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7525 (add_condition_to_breakpoint): Make static.
7526 (add_breakpoint_condition): Take a struct breakpoint pointer
7527 instead of an address. Adjust.
7528 (gdb_condition_true_at_breakpoint): Rename to ...
7529 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7531 (gdb_condition_true_at_breakpoint): Reimplement.
7532 (add_breakpoint_commands): Take a struct breakpoint pointer
7533 instead of an address. Adjust.
7534 (gdb_no_commands_at_breakpoint): Rename to ...
7535 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7536 parameter. Return true if no breakpoint was found. Change debug
7538 (gdb_no_commands_at_breakpoint): Reimplement.
7539 (run_breakpoint_commands): Rename to ...
7540 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7541 and change return type to boolean.
7542 (run_breakpoint_commands): New function.
7543 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7544 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7545 breakpoint. Go through the_target->remove_point instead of
7546 assuming memory breakpoint.
7547 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7548 software and hardware breakpoints.
7549 (reinsert_raw_breakpoint): Go through the_target->insert_point
7550 instead of assuming memory breakpoint.
7551 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7552 software and hardware breakpoints.
7553 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7554 Check both software and hardware breakpoints.
7555 (validate_inserted_breakpoint): Assert the breakpoint is a
7556 software breakpoint. Set the inserted flag to -1 instead of
7557 setting shlib_disabled.
7558 (delete_disabled_breakpoints): Adjust.
7559 (validate_breakpoints): Only validate software breakpoints.
7560 Adjust to inserted flag change.
7561 (check_mem_read, check_mem_write): Skip breakpoint types other
7562 than software breakpoints. Adjust to inserted flag change.
7563 * mem-break.h (enum raw_bkpt_type): New enum.
7564 (raw_breakpoint, struct process_info): Forward declare.
7565 (Z_packet_to_target_hw_bp_type): Delete declaration.
7566 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7567 (set_gdb_breakpoint, delete_gdb_breakpoint)
7568 (clear_breakpoint_conditions): New declarations.
7569 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7570 (breakpoint_inserted_here): Update comment.
7571 (add_breakpoint_condition, add_breakpoint_commands): Replace
7572 address parameter with a breakpoint pointer parameter.
7573 (gdb_breakpoint_here): Update comment.
7574 (delete_gdb_breakpoint_at): Delete.
7575 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7576 * server.c (process_point_options): Take a struct breakpoint
7577 pointer instead of an address. Adjust.
7578 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7579 delete_gdb_breakpoint.
7580 * spu-low.c (spu_target_ops): Install NULL as
7581 supports_z_point_type method.
7582 * target.h: Include mem-break.h.
7583 (struct target_ops) <prepare_to_access_memory>: Update comment.
7584 <supports_z_point_type>: New field.
7585 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7586 instead of a char. Also take a raw breakpoint pointer.
7587 * win32-arm-low.c (the_low_target): Install NULL as
7588 supports_z_point_type.
7589 * win32-i386-low.c (i386_supports_z_point_type): New function.
7590 (i386_insert_point, i386_remove_point): Adjust to new interface.
7591 (the_low_target): Install i386_supports_z_point_type.
7592 * win32-low.c (win32_supports_z_point_type): New function.
7593 (win32_insert_point, win32_remove_point): Adjust to new interface.
7594 (win32_target_ops): Install win32_supports_z_point_type.
7595 * win32-low.h (struct win32_target_ops):
7596 <supports_z_point_type>: New method.
7597 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7598 instead of a char. Also take a raw breakpoint pointer.
7600 2014-05-20 Pedro Alves <palves@redhat.com>
7602 * mem-break.h: Include break-common.h.
7603 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7604 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7605 (Z_packet_to_target_hw_bp_type): New declaration.
7606 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7607 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7608 (Z_PACKET_ACCESS_WP): Delete macros.
7609 (Z_packet_to_hw_type): Delete function.
7610 * i386-low.h: Don't include break-common.h here.
7611 (Z_packet_to_hw_type): Delete declaration.
7612 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7613 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7614 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7615 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7616 * linux-aarch64-low.c: Don't include break-common.h here.
7617 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7618 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7619 (Z_packet_to_target_hw_bp_type): Delete function.
7620 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7622 (mips_insert_point, mips_remove_point): Use
7623 Z_packet_to_target_hw_bp_type.
7625 2014-05-20 Pedro Alves <palves@redhat.com>
7627 * linux-aarch64-low.c: Include break-common.h.
7628 (enum target_point_type): Delete.
7629 (Z_packet_to_point_type): Rename to ...
7630 (Z_packet_to_target_hw_bp_type): ... this, and return a
7631 target_hw_bp_type instead.
7632 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7633 instead of an enum target_point_type.
7634 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7636 (aarch64_dr_state_insert_one_point)
7637 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7638 (aarch64_handle_aligned_watchpoint)
7639 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7640 Take an enum target_hw_bp_type instead of an enum
7642 (aarch64_supports_z_point_type): New function.
7643 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7644 use Z_packet_to_target_hw_bp_type.
7646 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7648 * configure.ac: Only use -Werror by default when DEVELOPMENT
7650 * configure: Regenerate.
7652 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7654 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7655 * linux-x86-low.c (X86_64_USER_REGS): New.
7656 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7658 2014-04-28 Yao Qi <yao@codesourcery.com>
7660 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7663 2014-04-25 Pedro Alves <palves@redhat.com>
7666 * linux-low.c (linux_attach_fail_reason_string): New function.
7667 (linux_attach_lwp): Delete.
7668 (linux_attach_lwp_1): Rename to ...
7669 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7670 argument. Remove "initial" parameter. Return int instead of
7671 void. Don't error or warn here.
7672 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7673 failure to attach to the tgid. Call warning when failing to
7675 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7676 argument. Remove "initial" parameter. Return int instead of
7677 void. Don't error or warn here.
7678 (linux_attach_fail_reason_string): New declaration.
7679 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7680 interface change. Use linux_attach_fail_reason_string.
7682 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7683 Walfred Tedeschi <walfred.tedeschi@intel.com>
7685 * Makefile.in: Added rules to handle new files
7686 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7687 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7688 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7689 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7690 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7691 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7693 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7694 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7695 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7696 i386/x32-avx512.xml.
7697 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7698 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7699 i386/x32-avx512-linux.xml.
7700 * i387-fp.c (num_avx512_k_registers): New constant for number
7702 (num_avx512_zmmh_low_registers): New constant for number of
7703 lower ZMM registers (0-15).
7704 (num_avx512_zmmh_high_registers): New constant for number of
7705 higher ZMM registers (16-31).
7706 (num_avx512_ymmh_registers): New contant for number of higher
7707 YMM registers (ymm16-31 added by avx521 on x86_64).
7708 (num_avx512_xmm_registers): New constant for number of higher
7709 XMM registers (xmm16-31 added by AVX512 on x86_64).
7710 (struct i387_xsave): Add space for AVX512 registers.
7711 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7712 Add code to handle AVX512 registers.
7713 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7714 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7715 prototypei from generated file.
7716 (tdesc_amd64_avx512_linux): Likewise.
7717 (init_registers_x32_avx512_linux): Likewise.
7718 (tdesc_x32_avx512_linux): Likewise.
7719 (init_registers_i386_avx512_linux): Likewise.
7720 (tdesc_i386_avx512_linux): Likewise.
7721 (x86_64_regmap): Add AVX512 registers.
7722 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7724 (initialize_low_arch): Add code to initialize AVX512 registers.
7726 2014-04-23 Pedro Alves <palves@redhat.com>
7728 * mem-break.c (find_gdb_breakpoint_at): Make static.
7729 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7731 2014-04-23 Pedro Alves <palves@redhat.com>
7733 * i386-low.c: Don't include break-common.h here.
7734 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7735 prototype to take target_hw_bp_type as argument instead of a Z
7737 * i386-low.h: Include break-common.h here.
7738 (Z_packet_to_hw_type): Declare.
7739 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7741 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7742 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7743 (x86_remove_point): Convert the packet number to a
7744 target_hw_bp_type before calling i386_low_remove_watchpoint.
7745 * win32-i386-low.c (i386_insert_point): Convert the packet number
7746 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7747 (i386_remove_point): Convert the packet number to a
7748 target_hw_bp_type before calling i386_low_remove_watchpoint.
7750 2014-04-23 Pedro Alves <palves@redhat.com>
7752 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7754 2014-04-10 Pedro Alves <palves@redhat.com>
7756 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7757 Check if the condition or command is NULL before checking if the
7758 breakpoint is known. On success, return true.
7759 * mem-break.h (add_breakpoint_condition): Document return.
7760 (add_breakpoint_commands): Add describing comment.
7761 * server.c (skip_to_semicolon): New function.
7762 (process_point_options): Use it.
7764 2014-04-09 Pedro Alves <palves@redhat.com>
7766 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7769 2014-02-27 Pedro Alves <palves@redhat.com>
7772 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7774 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7776 (last_thread_of_process_p): Take a PID argument instead of a
7778 (linux_wait_for_lwp): Delete.
7779 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7781 (linux_low_filter_event): New function, party factored out from
7782 linux_wait_for_event.
7783 (linux_wait_for_event): Rename to ...
7784 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7785 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7786 sigsuspend. Check for zombie leaders.
7787 (linux_wait_for_event): Reimplement as wrapper around
7788 linux_wait_for_event_filtered.
7789 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7790 a normal or signal exit is seen, it's the whole process exiting.
7791 (wait_for_sigstop): No longer a for_each_inferior callback.
7792 Rewrite on top of linux_wait_for_event_filtered.
7793 (stop_all_lwps): Call wait_for_sigstop directly.
7794 * server.c (resume, handle_target_event): Handle
7795 TARGET_WAITKIND_NO_RESUMED.
7797 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7799 * win32-low.c (psapi_get_dll_name,
7800 * win32_CreateToolhelp32Snapshot): Delete.
7801 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7802 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7804 (handle_load_dll): Add function description.
7805 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7807 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7809 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7811 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7812 base address when calling win32_add_one_solib.
7813 (handle_load_dll): Delete local variable load_addr.
7814 Remove 0x1000 offset applied to DLL base address when calling
7815 win32_add_one_solib.
7816 (handle_unload_dll): Add comment.
7818 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7820 * win32-low.c (win32_add_all_dlls): Renames
7821 win32_ensure_ntdll_loaded. Rewrite function documentation.
7822 Adjust implementation to always load all DLLs.
7823 Add 0x1000 offset to DLL base address when calling
7824 win32_add_one_solib.
7825 (child_initialization_done): New static global.
7826 (do_initial_child_stuff): Set child_initialization_done to
7827 zero during child initialization, and 1 after. Replace call
7828 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7830 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7831 (handle_unload_dll): Add function documentation.
7832 (get_child_debug_event): Ignore load and unload DLL events
7833 during child initialization.
7835 2014-02-20 Doug Evans <dje@google.com>
7837 Remove global all_lwps.
7838 * inferiors.h (ptid_of): Move here from linux-low.h.
7839 (pid_of, lwpid_of): Ditto.
7840 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7841 parameter is a struct thread_info * now.
7842 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7843 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7844 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7846 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7847 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7848 * linux-arm-low.c (update_registers_callback): Update, "entry"
7849 parameter is a struct thread_info * now.
7850 Fetch lwpid from current_inferior directly.
7851 (arm_insert_point): Pass &all_threads to find_inferior instead of
7853 (arm_remove_point): Ditto.
7854 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7855 (arm_prepare_to_resume): Fetch pid from thread.
7856 (arm_read_description): Fetch lwpid from current_inferior directly.
7857 * linux-low.c (all_lwps): Delete.
7858 (delete_lwp): Delete call to remove_inferior.
7859 (handle_extended_wait): Fetch lwpid from thread.
7860 (add_lwp): Don't set lwp->entry.id. Remove call to
7861 add_inferior_to_list.
7862 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7863 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7864 (kill_one_lwp_callback): Ditto.
7865 (linux_kill): Don't dereference NULL pointer.
7866 Fetch ptid,lwpid from thread.
7867 (get_detach_signal): Fetch ptid from thread.
7868 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7869 Simplify call to regcache_invalidate_thread.
7870 (delete_lwp_callback): Update, "entry" parameter is a
7871 struct thread_info * now. Fetch pid from thread.
7872 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7873 (status_pending_p_callback): Update, "entry" parameter is a
7874 struct thread_info * now. Fetch ptid from thread.
7875 (find_lwp_pid): Update, "entry" parameter is a
7876 struct thread_info * now.
7877 (linux_wait_for_lwp): Fetch pid from thread.
7878 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7879 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7880 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7881 (dequeue_one_deferred_signal): Ditto.
7882 (cancel_breakpoint): Fetch ptid from current_inferior.
7883 (linux_wait_for_event): Pass &all_threads to find_inferior,
7884 not &all_lwps. Fetch ptid, lwpid from thread.
7885 (count_events_callback): Update, "entry" parameter is a
7886 struct thread_info * now.
7887 (select_singlestep_lwp_callback): Ditto.
7888 (select_event_lwp_callback): Ditto.
7889 (cancel_breakpoints_callback): Ditto.
7890 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7892 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7893 (unsuspend_one_lwp): Update, "entry" parameter is a
7894 struct thread_info * now.
7895 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7897 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7898 Fetch lwpid from thread, not lwp.
7899 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7900 Pass &all_threads to find_inferior, not &all_lwps.
7901 (send_sigstop): Fetch lwpid from thread, not lwp.
7902 (send_sigstop_callback): Update, "entry" parameter is a
7903 struct thread_info * now.
7904 (suspend_and_send_sigstop_callback): Ditto.
7905 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7906 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7907 struct thread_info * now.
7908 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7910 (lwp_running): Update, "entry" parameter is a
7911 struct thread_info * now.
7912 (stop_all_lwps): Fetch ptid from thread.
7913 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7914 (linux_resume_one_lwp): Fetch lwpid from thread.
7915 (linux_set_resume_request): Update, "entry" parameter is a
7916 struct thread_info * now. Fetch pid, lwpid from thread.
7917 (resume_status_pending_p): Update, "entry" parameter is a
7918 struct thread_info * now.
7919 (need_step_over_p): Ditto. Fetch lwpid from thread.
7920 (start_step_over): Fetch lwpid from thread.
7921 (linux_resume_one_thread): Update, "entry" parameter is a
7922 struct thread_info * now. Fetch lwpid from thread.
7923 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7924 (proceed_one_lwp): Update, "entry" parameter is a
7925 struct thread_info * now. Fetch lwpid from thread.
7926 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7927 struct thread_info * now.
7928 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7929 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7930 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7932 (regsets_store_inferior_registers): Ditto.
7933 (fetch_register, store_register): Ditto.
7934 (linux_read_memory, linux_write_memory): Ditto.
7935 (linux_request_interrupt): Ditto.
7936 (linux_read_auxv): Ditto.
7937 (linux_xfer_siginfo): Ditto.
7938 (linux_qxfer_spu): Ditto.
7939 (linux_qxfer_libraries_svr4): Ditto.
7940 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7941 moved to inferiors.h.
7943 (get_thread_lwp): Update.
7944 (struct lwp_info): Delete member "entry". Simplify comment for
7947 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7948 current_inferior directly.
7949 (update_watch_registers_callback): Update, "entry" parameter is a
7950 struct thread_info * now. Fetch pid from thread.
7951 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7952 (mips_insert_point): Fetch lwpid from current_inferior.
7953 Pass &all_threads to find_inferior, not &all_lwps.
7954 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7955 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7957 (mips_stopped_data_address): Ditto.
7958 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7960 * linux-tile-low.c (tile_arch_setup): Ditto.
7961 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7962 (update_debug_registers_callback): Update, "entry" parameter is a
7963 struct thread_info * now. Fetch pid from thread.
7964 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7965 Pass &all_threads to find_inferior, not &all_lwps.
7966 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7967 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7968 Pass &all_threads to find_inferior, not &all_lwps.
7969 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7970 (i386_dr_low_get_status): Ditto.
7971 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7972 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7973 (x86_linux_read_description): Ditto.
7974 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7976 2014-02-20 Doug Evans <dje@google.com>
7978 * inferiors.c (get_first_inferior): Fix buglet.
7980 2014-02-19 Doug Evans <dje@google.com>
7982 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7983 * inferiors.c (add_thread): Change result type to struct thread_info *.
7984 All callers updated.
7985 (add_lwp): Call add_thread here instead of in callers.
7986 All callers updated.
7987 * linux-low.h (get_lwp_thread): Rewrite.
7988 (struct lwp_info): New member "thread".
7990 2014-02-19 Doug Evans <dje@google.com>
7992 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7993 All callers updated.
7995 2014-02-19 Doug Evans <dje@google.com>
7997 * inferiors.c (add_thread): Fix whitespace.
7999 2014-02-19 Doug Evans <dje@google.com>
8001 * dll.c (clear_dlls): Replace accessing list implemention details
8003 * gdbthread.h (get_first_thread): Declare.
8004 * inferiors.c (for_each_inferior_with_data): New function.
8005 (get_first_thread): New function.
8006 (find_thread_ptid): Simplify.
8007 (get_first_inferior): New function.
8008 (clear_list): Delete.
8009 (one_inferior_p): New function.
8010 (clear_inferior_list): New function.
8011 (clear_inferiors): Update.
8012 * inferiors.h (for_each_inferior_with_data): Declare.
8013 (clear_inferior_list): Declare.
8014 (one_inferior_p): Declare.
8015 (get_first_inferior): Declare.
8016 * linux-low.c (linux_wait_for_event): Replace accessing list
8017 implemention details with API function.
8018 * server.c (target_running): Ditto.
8019 (accumulate_file_name_length): New function.
8020 (emit_dll_description): New function.
8021 (handle_qxfer_libraries): Replace accessing list implemention
8022 details with API function.
8023 (handle_qxfer_threads_worker): New function.
8024 (handle_qxfer_threads_proper): Replace accessing list implemention
8025 details with API function.
8026 (handle_query): Ditto.
8027 (visit_actioned_threads_callback_ftype): New typedef.
8028 (visit_actioned_threads_data): New struct.
8029 (visit_actioned_threads): Rewrite to be find_inferior callback.
8030 (resume): Call find_inferior.
8031 (handle_status): Replace accessing list implemention
8032 details with API function.
8033 (process_serial_event): Replace accessing list implemention details
8035 * target.c (set_desired_inferior): Replace accessing list implemention
8036 details with API function.
8037 * tracepoint.c (same_process_p): New function.
8038 (gdb_agent_about_to_close): Replace accessing list implemention
8039 details with API function.
8040 * win32-low.c (child_delete_thread): Replace accessing list
8041 implemention details with API function.
8042 (match_dll_by_basename): New function.
8043 (dll_is_loaded_by_basename): New function.
8044 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8045 details call to dll_is_loaded_by_basename.
8047 2014-02-19 Doug Evans <dje@google.com>
8049 * dll.h (struct dll_info): Add comment.
8050 * gdbthread.h (struct thread_info): Add comment.
8051 (current_ptid): Simplify.
8052 * inferiors.c (add_process): Update.
8053 (remove_process): Update.
8054 * inferiors.h (struct process_info): Rename member "head" to "entry".
8055 * linux-low.c (delete_lwp): Update.
8057 (last_thread_of_process_p): Update.
8058 (kill_one_lwp_callback, linux_kill): Update.
8059 (status_pending_p_callback): Update.
8060 (wait_for_sigstop): Update. Simplify read of ptid.
8061 (start_step_over): Update.
8062 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8063 (get_lwp_thread): Update.
8064 (struct lwp_info): Rename member "head" to "entry".
8065 * regcache.h (inferior_list_entry): Delete.
8066 * server.c (kill_inferior_callback): Update.
8067 (detach_or_kill_inferior_callback): Update.
8068 (print_started_pid): Update.
8069 (print_attached_pid): Update.
8070 (process_serial_event): Simplify read of ptid.
8071 * thread-db.c (thread_db_create_event): Update.
8072 (thread_db_get_tls_address): Update.
8073 * win32-low.c (current_inferior_ptid): Simplify.
8075 2014-02-19 Tom Tromey <tromey@redhat.com>
8077 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8079 (target_supports_btrace): Update.
8081 2014-02-14 Yao Qi <yao@codesourcery.com>
8083 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8084 (rsp-low-ipa.o): New target.
8086 2014-02-12 Tom Tromey <tromey@redhat.com>
8088 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8089 convert_ascii_to_int.
8090 * regcache.c (registers_to_string): Likewise.
8091 * remote-utils.c (decode_M_packet): Likewise.
8092 * server.c (process_serial_event): Likewise.
8094 2014-02-12 Tom Tromey <tromey@redhat.com>
8096 * server.c (handle_query, handle_v_run): Use hex2bin, not
8098 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8100 2014-02-12 Tom Tromey <tromey@redhat.com>
8102 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8103 convert_int_to_ascii.
8104 * regcache.c (registers_to_string, collect_register_as_string):
8106 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8108 * server.c (process_serial_event): Likewise.
8109 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8110 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8112 2014-02-12 Tom Tromey <tromey@redhat.com>
8114 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8115 bin2hex, not hexify.
8116 * tracepoint.c (cmd_qtstatus): Likewise.
8118 2014-02-12 Tom Tromey <tromey@redhat.com>
8120 * remote-utils.c (monitor_output): Pass explicit length to
8123 2014-02-12 Tom Tromey <tromey@redhat.com>
8125 * tracepoint.c: Include rsp-low.h.
8126 * server.c: Include rsp-low.h.
8127 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8128 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8130 * remote-utils.c: Include rsp-low.h.
8131 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8132 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8133 (convert_int_to_ascii, convert_ascii_to_int): Move to
8135 * regcache.c: Include rsp-low.h.
8136 * ax.c: Include rsp-low.h.
8137 * Makefile.in (SFILES): Add common/rsp-low.c.
8138 (OBS): Add rsp-low.o.
8139 (rsp-low.o): New target.
8141 2014-02-12 Tom Tromey <tromey@redhat.com>
8143 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8144 Include print-utils.h.
8145 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8146 (plongest, thirty_two, phex_nz): Remove.
8147 * Makefile.in (SFILES): Add common/print-utils.c.
8148 (OBS): Add print-utils.o.
8149 (print-utils-ipa.o): New target.
8150 (print-utils.o): New target.
8151 (IPA_OBJS): Add print-utils-ipa.o.
8153 2014-02-06 Tom Tromey <tromey@redhat.com>
8155 * Makefile.in (SFILES): Fix indentation.
8157 2014-02-05 Doug Evans <dje@google.com>
8159 * linux-low.c (linux_wait_for_event): Improve comment.
8160 (linux_wait_1): Keep current_inferior in sync with event_child.
8162 2014-01-22 Doug Evans <dje@google.com>
8164 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8166 2014-01-22 Doug Evans <dje@google.com>
8168 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8169 * configure: Regenerate.
8170 * config.in: Regenerate.
8171 * Makefile.in (SFILES): Add debug.c.
8173 * debug.c: New file.
8174 * debug.h: New file.
8175 * linux-aarch64-low.c (*): Update all debugging printfs to use
8176 debug_printf instead of fprintf.
8177 * linux-arm-low.c (*): Ditto.
8178 * linux-cris-low.c (*): Ditto.
8179 * linux-crisv32-low.c (*): Ditto.
8180 * linux-m32r-low.c (*): Ditto.
8181 * linux-sparc-low.c (*): Ditto.
8182 * linux-x86.c (*): Ditto.
8183 * linux-low.c (*): Ditto.
8184 (linux_wait_1): Add calls to debug_enter, debug_exit.
8185 (linux_wait): Remove redundant debugging printf.
8186 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8187 (linux_resume, unstop_all_lwps): Ditto.
8188 * mem-break.c (*): Update all debugging printfs to use
8189 debug_printf instead of fprintf.
8190 * remote-utils.c (*): Ditto.
8191 * thread-db.c (*): Ditto.
8192 * server.c #include <ctype.h>, "gdb_vecs.h".
8193 (debug_threads): Moved to debug.c.
8194 (*): Update all debugging printfs to use debug_printf instead of
8196 (start_inferior): Replace call to fflush with call to debug_flush.
8197 (monitor_show_help): Mention set debug-format.
8198 (parse_debug_format_options): New function.
8199 (handle_monitor_command): Handle "monitor set debug-format".
8200 (gdbserver_usage): Mention --debug-format.
8201 (main): Parse --debug-format.
8202 * server.h (debug_threads): Declaration moved to debug.h.
8204 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8205 trace_debug_1 that uses debug_printf.
8206 (tracepoint_look_up_symbols): Update all debugging printfs to use
8207 debug_printf instead of fprintf.
8209 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8211 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8214 2014-01-17 Pedro Alves <palves@redhat.com>
8217 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8218 defined after including gdb_proc_service.h.
8220 2014-01-16 Doug Evans <dje@google.com>
8222 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8223 (match_dll): Use it.
8225 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8227 * target.h (target_ops) <read_btrace>: Change parameters and
8228 return type to allow error reporting.
8229 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8230 trace reading errors on.
8231 * linux-low.c (linux_low_read_btrace): Pass trace reading
8233 (linux_low_disable_btrace): New.
8235 2014-01-15 Doug Evans <dje@google.com>
8237 * inferiors.c (thread_id_to_gdb_id): Delete.
8238 * inferiors.h (thread_id_to_gdb_id): Delete.
8240 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8242 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8243 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8246 2014-01-08 Pedro Alves <palves@redhat.com>
8248 * server.c (handle_status): Don't discard previous queued stop
8249 replies or thread's pending status here.
8250 (main) <disconnection>: Do it here instead.
8252 2014-01-08 Pedro Alves <palves@redhat.com>
8254 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8255 * server.c (visit_actioned_threads, handle_pending_status): New
8257 (handle_v_cont): Factor out parts to ...
8258 (resume): ... this new function. If in all-stop, and a thread
8259 being resumed has a pending status, report it without actually
8261 (myresume): Adjust to use the new 'resume' function.
8262 (clear_pending_status_callback, set_pending_status_callback)
8263 (find_status_pending_thread_callback): New functions.
8264 (handle_status): Handle the case of multiple threads having
8265 interesting statuses to report. Report threads' real last signal
8266 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8267 with an interesting thread to report the status for, instead of
8268 always reporting the status of the first thread.
8270 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8272 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8273 * gdbreplay.c (gdbreplay_version): Likewise.
8275 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8277 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8278 iov.iov_len with the real length in use.
8280 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8282 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8283 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8284 for all targets that use win32-low.c.
8285 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8286 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8288 2013-12-13 Pedro Alves <palves@redhat.com>
8290 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8291 if equal to TARGET_WAITKIND_LOADED.
8292 * win32-low.c (cached_status): New static global.
8293 (win32_wait): Add declaration.
8294 (do_initial_child_stuff): Flush all initial pending debug events
8295 up to the initial breakpoint.
8296 (win32_wait): If CACHED_STATUS was set, return that instead
8297 of doing a real wait. Remove the code resuming the execution
8298 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8299 during the initial phase. Also remove the code changing
8300 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8301 TARGET_WAITKIND_STOPPED.
8303 2013-12-11 Yao Qi <yao@codesourcery.com>
8305 * notif.c (handle_notif_ack): Return 0 if no notification
8308 2013-11-20 Doug Evans <dje@google.com>
8310 * linux-low.c (linux_set_resume_request): Fix comment.
8312 2013-11-20 Doug Evans <dje@google.com>
8314 * linux-low.c (resume_status_pending_p): Tweak comment.
8316 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8318 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8319 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8320 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8321 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8322 (srv_amd64_regobj): Add amd64-mpx.o.
8323 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8324 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8325 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8326 * i387-fp.c (num_pl_bnd_register) Added constant.
8327 (num_pl_bnd_cfg_registers) Added constant.
8328 (struct i387_xsave) Added reserved area and MPX fields.
8329 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8330 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8332 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8333 (init_registers_amd64_mpx_linux): Declare new function.
8334 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8335 (x86_64_regmap): Add MPX registers.
8336 (x86_linux_read_description): Add MPX case.
8337 (initialize_low_arch): Initialize MPX targets.
8339 2013-11-18 Tom Tromey <tromey@redhat.com>
8341 * configure: Rebuild.
8342 * configure.ac: Don't check for stdlib.h.
8343 * gdbreplay.c: Unconditionally include stdlib.h.
8345 2013-11-18 Tom Tromey <tromey@redhat.com>
8347 * config.in: Rebuild.
8348 * configure: Rebuild.
8349 * configure.ac: Don't use AC_HEADER_DIRENT.
8351 2013-11-18 Tom Tromey <tromey@redhat.com>
8353 * server.h: Don't check HAVE_STRING_H.
8354 * gdbreplay.c: Don't check HAVE_STRING_H.
8355 * configure: Rebuild.
8357 2013-11-18 Tom Tromey <tromey@redhat.com>
8359 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8362 2013-11-08 Tom Tromey <tromey@redhat.com>
8364 * configure, config.in: Rebuild.
8365 * configure.ac: Remove unused configury.
8367 2013-11-08 Tom Tromey <tromey@redhat.com>
8369 * acinclude.m4: Include common.m4, codeset.m4.
8370 * configure, config.in: Rebuild.
8371 * configure.ac: Use GDB_AC_COMMON.
8373 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8375 * linux-s390-low.c (HWCAP_S390_TE): New define.
8376 (s390_arch_setup): Consider the TE field in the HWCAP for
8377 determining 'have_regset_tdb'.
8379 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8382 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8385 2013-10-02 Pedro Alves <palves@redhat.com>
8387 * server.c (process_serial_event): Don't output "GDBserver
8388 exiting" if GDB is connected through stdio.
8389 * target.c (mywait): Likewise, be silent if GDB is connected
8392 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8394 * lynx-low.c (lynx_add_threads_after_attach): New function.
8395 (lynx_attach): Remove call to add_thread. Add call to
8396 lynx_add_threads_after_attach instead.
8398 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8400 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8401 * config.in, configure: Regenerated.
8403 2013-09-18 Yao Qi <yao@codesourcery.com>
8406 * server.c (start_inferior): Clear 'resume_info'.
8408 2013-09-16 Jiong Wang <jiwang@tilera.com>
8410 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8413 2013-09-16 Jiong Wang <jiwang@tilera.com>
8415 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8416 linux-tile-low.o to srv_tgtobj.
8418 2013-09-16 Will Newton <will.newton@linaro.org>
8420 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8423 2013-09-06 Pedro Alves <palves@redhat.com>
8425 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8426 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8427 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8428 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8429 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8430 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8432 2013-09-06 Pedro Alves <palves@redhat.com>
8434 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8435 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8437 2013-09-06 Pedro Alves <palves@redhat.com>
8439 * linux-amd64-ipa.c: Include tracepoint.h.
8440 * linux-i386-ipa.c: Include tracepoint.h.
8442 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8444 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8445 (ps_get_thread_area): New function.
8447 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8449 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8450 (initialize_low_arch): Call init_registers_crisv32 rather than
8451 init_register_crisv32.
8453 2013-09-05 Pedro Alves <palves@redhat.com>
8455 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8457 * hostio.h: ... this new file.
8458 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8459 win32-low.c: Include hostio.h.
8461 2013-09-05 Pedro Alves <palves@redhat.com>
8463 * server.h (gdb_client_data, handler_func, callback_handler_func)
8464 (delete_file_handler, add_file_handler, append_callback_event)
8465 (delete_callback_event, start_event_loop, initialize_event_loop):
8466 Move to event-loop.h and include it.
8467 * event-loop.h: New file.
8469 2013-09-05 Pedro Alves <palves@redhat.com>
8471 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8472 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8473 (loaded_dll, unloaded_dll): Move to ...
8474 * dll.h: ... this new file.
8475 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8477 2013-09-05 Pedro Alves <palves@redhat.com>
8479 * server.h (current_process, get_thread_process, all_processes)
8480 (add_inferior_to_list, for_each_inferior, current_inferior)
8481 (remove_inferior, add_process, remove_process, find_process_pid)
8482 (have_started_inferiors_p, have_attached_inferiors_p)
8483 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8484 (clear_inferiors, find_inferior, find_inferior_id)
8485 (inferior_target_data, set_inferior_target_data)
8486 (inferior_regcache_data, set_inferior_regcache_data): Move to
8487 inferiors.h, and include it.
8488 * inferiors.h: New file.
8490 2013-09-05 Pedro Alves <palves@redhat.com>
8492 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8496 2013-09-05 Pedro Alves <palves@redhat.com>
8498 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8500 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8501 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8502 (handle_tracepoint_general_set, handle_tracepoint_query)
8503 (tracepoint_finished_step, tracepoint_was_hit)
8504 (release_while_stepping_state_list, current_traceframe)
8505 (in_readonly_region, traceframe_read_mem)
8506 (fetch_traceframe_registers, traceframe_read_sdata)
8507 (traceframe_read_info, struct fast_tpoint_collect_status)
8508 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8509 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8510 (supply_fast_tracepoint_registers)
8511 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8512 (ipa_tdesc, claim_trampoline_space)
8513 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8514 (agent_mem_read, agent_get_trace_state_variable_value)
8515 (agent_set_trace_state_variable_value, agent_tsv_read)
8516 (agent_mem_read_string, get_raw_reg_func_addr)
8517 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8518 * tracepoint.h: ... this new file.
8520 2013-09-05 Pedro Alves <palves@redhat.com>
8522 * server.h (perror_with_name, error, fatal, warning, paddress)
8523 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8525 * utils.h: New file.
8527 2013-09-05 Pedro Alves <palves@redhat.com>
8529 * server.h (remote_debug, noack_mode, transport_is_reliable)
8530 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8531 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8532 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8533 (write_enn, initialize_async_io, enable_async_io)
8534 (disable_async_io, check_remote_input_interrupt_request)
8535 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8536 (dead_thread_notify, prepare_resume_reply)
8537 (decode_address_to_semicolon, decode_address, decode_m_packet)
8538 (decode_M_packet, decode_X_packet, decode_xfer_write)
8539 (decode_search_memory_packet, unhexify, hexify)
8540 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8541 (look_up_one_symbol, relocate_instruction)
8542 (monitor_output): Move to remote-utils.h, and include it.
8543 * remote-utils.h: New file.
8545 2013-09-05 Pedro Alves <palves@redhat.com>
8547 * server.h (_): Delete.
8549 2013-09-02 Pedro Alves <palves@redhat.com>
8551 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8552 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8554 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8556 2013-09-02 Pierre Muller <muller@sourceware.org>
8558 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8559 or WriteProcessMemory complete successfully and handle
8560 ERROR_PARTIAL_COPY error.
8562 2013-09-02 Pedro Alves <palves@redhat.com>
8564 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8565 error instead of EIO.
8567 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8570 * linux-low.c: Include filestuff.h.
8571 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8572 * lynx-low.c: Include filestuff.h.
8573 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8574 * server.c: Include filestuff.h.
8575 (main): Call notice_open_fds.
8576 * spu-low.c: Include filestuff.h.
8577 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8579 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8581 * Makefile.in: Explain why ../target and ../nat are not
8582 listed as include file search paths.
8583 (linux-waitpid.o): New object file rule.
8584 * configure.srv (srv_native_linux_obj): New variable.
8585 Replace all occurrences of linux native object files with
8586 $srv_native_linux_obj.
8587 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8588 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8589 (linux_enable_event_reporting): Remove declaration.
8590 (my_waitpid): Moved to common/linux-waitpid.c.
8591 (linux_wait_for_event): Pass ptid when calling
8592 linux_enable_event_reporting.
8593 (linux_supports_tracefork_flag): Remove.
8594 (linux_enable_event_reporting): Likewise.
8595 (linux_tracefork_grandchild): Remove.
8596 (STACK_SIZE): Moved to common/linux-ptrace.c.
8597 (linux_tracefork_child): Remove.
8598 (linux_test_for_tracefork): Remove.
8599 (linux_look_up_symbols): Call linux_supports_traceclone.
8600 (initialize_low): Remove call to linux_test_for_tracefork.
8601 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8602 common/linux-ptrace.h.
8603 (PTRACE_TYPE_ARG4): Likewise.
8604 Include linux-ptrace.h.
8606 2013-08-21 Pedro Alves <palves@redhat.com>
8608 * config.in: Renegerate.
8610 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8612 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8613 (SFILES): Remove $(srcdir)/common/target-common.c and
8614 add $(srcdir)/target/waitstatus.c.
8615 (OBS): Remove target-common.o and add waitstatus.o.
8616 (server_h): Remove $(srcdir)/../common/target-common.h and
8617 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8618 and $(srcdir)/../target/waitstatus.h.
8619 (target-common.o): Remove.
8620 (waitstatus.o): New target object file.
8621 * target.h: Do not include target-common.h and
8622 include target/resume.h, target/wait.h and
8623 target/waitstatus.h.
8625 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8627 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8628 to PTRACE_TYPE_ARG3.
8629 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8630 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8632 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8633 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8635 2013-07-27 Jie Zhang <jie@codesourcery.com>
8636 Daniel Jacobowitz <dan@codesourcery.com>
8637 Yao Qi <yao@codesourcery.com>
8639 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8640 (mips-linux-watch.o): New rule.
8641 (mips_linux_watch_h): New variable.
8642 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8644 * linux-mips-low.c: Include mips-linux-watch.h.
8645 (struct arch_process_info, struct arch_lwp_info): New.
8646 (update_watch_registers_callback): New function.
8647 (mips_linux_new_process, mips_linux_new_thread) New functions.
8648 (mips_linux_prepare_to_resume, mips_insert_point): New
8650 (mips_remove_point, mips_stopped_by_watchpoint): New
8652 (rsp_bp_type_to_target_hw_bp_type): New function.
8653 (mips_stopped_data_address): New function.
8654 (the_low_target): Add watchpoint support functions.
8656 2013-07-27 Yao Qi <yao@codesourcery.com>
8658 * i386-low.c: Include break-common.h.
8659 (enum target_hw_bp_type): Remove.
8661 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8663 * Makefile.in (SFILES): /common/target-common.c.
8664 (OBS): Add target-common.o.
8665 (server_h): Add $(srcdir)/../common/target-common.h.
8666 (target-common.o): New target.
8667 * server.c (queue_stop_reply_callback): Free
8668 status string after use.
8669 * target.c (target_waitstatus_to_string): Remove.
8670 * target.h: Include target-common.h.
8671 (resume_kind): Likewise.
8672 (target_waitkind): Likewise.
8673 (target_waitstatus): Likewise.
8674 (TARGET_WNOHANG): Likewise.
8676 2013-07-04 Yao Qi <yao@codesourcery.com>
8678 * Makefile.in (host_alias): Use @host_noncanonical@.
8679 (target_alias): Use @target_noncanonical@.
8680 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8681 ACX_NONCANONICAL_HOST.
8682 * configure: Regenerated.
8685 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8687 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8688 * configure: Rebuild.
8689 * Makefile.in (version_host, version_target): Get from configure.
8690 (version.c): Use $(version_host) and $(version_target).
8692 2013-07-03 Pedro Alves <palves@redhat.com>
8694 * Makefile.in (config.status): Depend on development.sh.
8695 * acinclude.m4: Include libmcheck.m4.
8696 * configure: Regenerate.
8698 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8700 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8701 attribute inside the parentheses.
8702 (winapi_DebugSetProcessKillOnExit): Ditto.
8703 (winapi_DebugBreakProcess): Ditto.
8704 (winapi_GenerateConsoleCtrlEvent): Ditto.
8706 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8708 * notif.h (notif_event): Add a dummy member to avoid compiler
8711 2013-07-01 Pedro Alves <palves@redhat.com>
8713 * hostio.c (HOSTIO_PATH_MAX): Define.
8714 (require_filename, handle_open, handle_unlink, handle_readlink):
8717 2013-07-01 Pedro Alves <palves@redhat.com>
8719 * server.h: Include "pathmax.h".
8720 * linux-low.c: Don't include sys/param.h.
8721 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8723 * win32-low.c: Don't include sys/param.h.
8724 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8726 2013-07-01 Pedro Alves <palves@redhat.com>
8728 * event-loop.c: Don't check HAVE_UNISTD_H before including
8730 * gdbreplay.c: Likewise.
8731 * remote-utils.c: Likewise.
8732 * server.c: Likewise.
8733 * configure.ac: Don't check for unistd.h.
8734 * configure: Regenerate.
8736 2013-06-28 Tom Tromey <tromey@redhat.com>
8738 * Makefile.in (version.c): Use version.in, not
8741 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8743 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8744 * configure: Rebuild.
8745 * Makefile.in (version_host, version_target): Get from configure.
8746 (version.c): Use $(version_host) and $(version_target).
8748 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8750 Fix trace-status to output user name without trailing colon.
8751 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8753 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8755 Fix trace-status to output proper start-time and stop-time.
8756 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8757 output start time and stop time in hex as gdb expects.
8759 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8761 * tracepoint.c (build_traceframe_info_xml): Output trace state
8762 variables present in the trace buffer.
8764 2013-06-24 Tom Tromey <tromey@redhat.com>
8766 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8768 (version.o): Remove.
8769 * gdbreplay.c: Include version.h.
8770 (version, host_name): Don't declare.
8771 * server.h: Include version.h.
8772 (version, host_name): Don't declare.
8774 2013-06-12 Pedro Alves <palves@redhat.com>
8776 * linux-x86-low.c (linux_is_elf64): Delete global.
8777 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8778 with local linux_pid_exe_is_elf_64_file use.
8780 2013-06-11 Pedro Alves <palves@redhat.com>
8782 * linux-low.c (regset_disabled, disable_regset): New functions.
8783 (regsets_fetch_inferior_registers)
8784 (regsets_store_inferior_registers): Use them.
8785 (initialize_regsets_info); Don't allocate the disabled_regsets
8787 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8790 2013-06-11 Pedro Alves <palves@redhat.com>
8792 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8795 2013-06-11 Pedro Alves <palves@redhat.com>
8797 * linux-x86-low.c (initialize_low_arch): Call
8798 init_registers_x32_avx_linux.
8800 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8802 Fix compatibility with Android Bionic.
8803 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8806 2013-06-07 Pedro Alves <palves@redhat.com>
8809 * Makefile.in (OBS): Add tdesc.o.
8810 (IPA_OBJS): Add tdesc-ipa.o.
8811 (tdesc-ipa.o): New rule.
8812 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8814 * linux-low.c (new_inferior): Delete.
8815 (disabled_regsets, num_regsets): Delete.
8816 (linux_add_process): Adjust to set the new per-process
8818 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8819 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8820 was a stop. When calling arch_setup, switch the current inferior
8821 to the thread that got an event.
8822 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8823 (regsets_fetch_inferior_registers)
8824 (regsets_store_inferior_registers): New regsets_info parameter.
8826 (linux_register_in_regsets): New regs_info parameter. Adjust to
8828 (register_addr, fetch_register, store_register): New usrregs_info
8829 parameter. Adjust to use it.
8830 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8831 parameter regs_info. Adjust to use it.
8832 (linux_fetch_registers): Get the current inferior's regs_info, and
8834 (linux_store_registers): Ditto.
8835 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8836 (initialize_low): Don't initialize the target_regsets here. Call
8837 initialize_low_arch.
8838 * linux-low.h (target_regsets): Delete declaration.
8839 (struct regsets_info): New.
8840 (struct usrregs_info): New.
8841 (struct regs_info): New.
8842 (struct process_info_private) <new_inferior>: New field.
8843 (struct linux_target_ops): Delete the num_regs, regmap, and
8844 regset_bitmap fields. New field regs_info.
8845 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8846 * i387-fp.c (num_xmm_registers): Delete.
8847 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8848 calls to new interface.
8849 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8850 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8851 Infer the number of xmm registers from the regcache's target
8853 * i387-fp.h (num_xmm_registers): Delete.
8854 * inferiors.c (add_thread): Don't install the thread's regcache
8856 * proc-service.c (gregset_info): Fetch the current inferior's
8857 regs_info. Adjust to use it.
8858 * regcache.c: Include tdesc.h.
8859 (register_bytes, reg_defs, num_registers)
8860 (gdbserver_expedite_regs): Delete.
8861 (get_thread_regcache): If the thread doesn't have a regcache yet,
8862 create one, instead of aborting gdbserver.
8863 (regcache_invalidate_one): Rename to ...
8864 (regcache_invalidate_thread): ... this.
8865 (regcache_invalidate_one): New.
8866 (regcache_invalidate): Only invalidate registers of the current
8868 (init_register_cache): Add target_desc parameter, and use it.
8869 (new_register_cache): Ditto. Assert the target description has a
8870 non zero registers_size.
8871 (regcache_cpy): Add assertions. Adjust.
8872 (realloc_register_cache, set_register_cache): Delete.
8873 (registers_to_string, registers_from_string): Adjust.
8874 (find_register_by_name, find_regno, find_register_by_number)
8875 (register_cache_size): Add target_desc parameter, and use it.
8876 (free_register_cache_thread, free_register_cache_thread_one)
8877 (regcache_release, register_cache_size): New.
8878 (register_size): Add target_desc parameter, and use it.
8879 (register_data, supply_register, supply_register_zeroed)
8880 (supply_regblock, supply_register_by_name, collect_register)
8881 (collect_register_as_string, collect_register_by_name): Adjust.
8882 * regcache.h (struct target_desc): Forward declare.
8883 (struct regcache) <tdesc>: New field.
8884 (init_register_cache, new_register_cache): Add target_desc
8886 (regcache_invalidate_thread): Declare.
8887 (regcache_invalidate_one): Delete declaration.
8888 (regcache_release): Declare.
8889 (find_register_by_number, register_cache_size, register_size)
8890 (find_regno): Add target_desc parameter.
8891 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8893 * remote-utils.c: Include tdesc.h.
8894 (outreg, prepare_resume_reply): Adjust.
8895 * server.c: Include tdesc.h.
8896 (gdbserver_xmltarget): Delete declaration.
8897 (get_features_xml, process_serial_event): Adjust.
8898 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8900 (struct process_info) <tdesc>: New field.
8901 (ipa_tdesc): Declare.
8902 * tdesc.c: New file.
8903 * tdesc.h: New file.
8904 * tracepoint.c: Include tdesc.h.
8905 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8906 (get_context_regcache): Adjust to pass ipa_tdesc down.
8907 (do_action_at_tracepoint): Adjust to get the register cache size
8908 from the context regcache's description.
8909 (traceframe_walk_blocks): Adjust to get the register cache size
8910 from the current trace frame's description.
8911 (traceframe_get_pc): Adjust to get current trace frame's
8912 description and pass it down.
8913 (gdb_collect): Adjust to get the register cache size from the
8915 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8916 (gdbserver_xmltarget): Delete.
8917 (initialize_low_tracepoint): Set the ipa's target description.
8918 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8919 (initialize_low_tracepoint): Set the ipa's target description.
8920 * linux-x86-low.c: Include tdesc.h.
8921 [__x86_64__] (is_64bit_tdesc): New.
8922 (ps_get_thread_area, x86_get_thread_area): Use it.
8923 (i386_cannot_store_register): Rename to ...
8924 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8925 (i386_cannot_fetch_register): Rename to ...
8926 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8927 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8929 (target_regsets): Rename to ...
8930 (x86_regsets): ... this.
8931 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8933 (x86_siginfo_fixup): Use is_64bit_tdesc.
8934 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8935 (tdesc_x32_avx_linux, tdesc_x32_linux)
8936 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8938 (x86_linux_update_xmltarget): Delete.
8939 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8940 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8941 (AMD64_LINUX_USER64_CS): New.
8942 (x86_linux_read_description): New, based on
8943 x86_linux_update_xmltarget.
8944 (same_process_callback): New.
8945 (x86_arch_setup_process_callback): New.
8946 (x86_linux_update_xmltarget): New.
8947 (x86_regsets_info): New.
8948 (amd64_linux_regs_info): New.
8949 (i386_linux_usrregs_info): New.
8950 (i386_linux_regs_info): New.
8951 (x86_linux_regs_info): New.
8952 (x86_arch_setup): Reimplement.
8953 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8954 (x86_emit_ops): Ditto.
8955 (the_low_target): Adjust. Install x86_linux_regs_info,
8956 x86_cannot_fetch_register, and x86_cannot_store_register.
8957 (initialize_low_arch): New.
8958 * linux-ia64-low.c (tdesc_ia64): Declare.
8959 (ia64_fetch_register): Adjust.
8960 (ia64_usrregs_info, regs_info): New globals.
8961 (ia64_regs_info): New function.
8962 (the_low_target): Adjust.
8963 (initialize_low_arch): New function.
8964 * linux-sparc-low.c (tdesc_sparc64): Declare.
8965 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8967 (sparc_arch_setup): New function.
8968 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8969 (the_low_target): Adjust.
8970 (initialize_low_arch): New function.
8971 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8972 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8973 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8974 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8975 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8976 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8977 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8978 (tdesc_powerpc_isa205_vsx64l): Declare.
8979 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8980 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8981 (ppc_set_pc, ppc_get_hwcap): Adjust.
8982 (ppc_usrregs_info): Forward declare.
8983 (!__powerpc64__) ppc_regmap_adjusted: New global.
8984 (ppc_arch_setup): Adjust to the current process'es target
8986 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8987 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8988 (ppc_store_evrregset): Adjust.
8989 (target_regsets): Rename to ...
8990 (ppc_regsets): ... this, and make static.
8991 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8992 (ppc_regs_info): New function.
8993 (the_low_target): Adjust.
8994 (initialize_low_arch): New function.
8995 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8996 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8997 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8998 (tdesc_s390x_linux64v2): Declare.
8999 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9000 (s390_fill_gregset, s390_store_last_break): Adjust.
9001 (target_regsets): Rename to ...
9002 (s390_regsets): ... this, and make static.
9003 (s390_get_pc, s390_set_pc): Adjust.
9004 (s390_get_hwcap): New target_desc parameter, and use it.
9005 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9006 (s390_arch_setup): Adjust to set the current process'es target
9007 description. Don't adjust the regmap.
9008 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9009 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9010 (regs_info_3264): New globals.
9011 (s390_regs_info): New function.
9012 (the_low_target): Adjust.
9013 (initialize_low_arch): New function.
9014 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9015 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9016 [__mips64] (init_registers_mips_linux)
9017 (init_registers_mips_dsp_linux): Delete defines.
9018 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9019 (have_dsp): New global.
9020 (mips_read_description): New, based on mips_arch_setup.
9021 (mips_arch_setup): Reimplement.
9022 (get_usrregs_info): New function.
9023 (mips_cannot_fetch_register, mips_cannot_store_register)
9024 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9025 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9026 (target_regsets): Rename to ...
9027 (mips_regsets): ... this, and make static.
9028 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9029 (dsp_regs_info, regs_info): New globals.
9030 (mips_regs_info): New function.
9031 (the_low_target): Adjust.
9032 (initialize_low_arch): New function.
9033 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9034 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9036 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9037 (arm_read_description): New, with bits factored from
9039 (arm_arch_setup): Reimplement.
9040 (target_regsets): Rename to ...
9041 (arm_regsets): ... this, and make static.
9042 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9043 (arm_regs_info): New function.
9044 (the_low_target): Adjust.
9045 (initialize_low_arch): New function.
9046 * linux-m68k-low.c (tdesc_m68k): Declare.
9047 (target_regsets): Rename to ...
9048 (m68k_regsets): ... this, and make static.
9049 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9050 (m68k_regs_info): New function.
9051 (m68k_arch_setup): New function.
9052 (the_low_target): Adjust.
9053 (initialize_low_arch): New function.
9054 * linux-sh-low.c (tdesc_sharch): Declare.
9055 (target_regsets): Rename to ...
9056 (sh_regsets): ... this, and make static.
9057 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9058 (sh_regs_info, sh_arch_setup): New functions.
9059 (the_low_target): Adjust.
9060 (initialize_low_arch): New function.
9061 * linux-bfin-low.c (tdesc_bfin): Declare.
9062 (bfin_arch_setup): New function.
9063 (bfin_usrregs_info, regs_info): New globals.
9064 (bfin_regs_info): New function.
9065 (the_low_target): Adjust.
9066 (initialize_low_arch): New function.
9067 * linux-cris-low.c (tdesc_cris): Declare.
9068 (cris_arch_setup): New function.
9069 (cris_usrregs_info, regs_info): New globals.
9070 (cris_regs_info): New function.
9071 (the_low_target): Adjust.
9072 (initialize_low_arch): New function.
9073 * linux-cris-low.c (tdesc_crisv32): Declare.
9074 (cris_arch_setup): New function.
9075 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9076 (cris_regs_info): New function.
9077 (the_low_target): Adjust.
9078 (initialize_low_arch): New function.
9079 * linux-m32r-low.c (tdesc_m32r): Declare.
9080 (m32r_arch_setup): New function.
9081 (m32r_usrregs_info, regs_info): New globals.
9082 (m32r_regs_info): Adjust.
9083 (initialize_low_arch): New function.
9084 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9085 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9086 (tic6x_usrregs_info): Forward declare.
9087 (tic6x_read_description): New function, based on ...
9088 (tic6x_arch_setup): ... this. Reimplement.
9089 (target_regsets): Rename to ...
9090 (tic6x_regsets): ... this, and make static.
9091 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9092 (tic6x_regs_info): New function.
9093 (the_low_target): Adjust.
9094 (initialize_low_arch): New function.
9095 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9096 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9097 (target_regsets): Rename to ...
9098 (xtensa_regsets): ... this, and make static.
9099 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9101 (xtensa_arch_setup, xtensa_regs_info): New functions.
9102 (the_low_target): Adjust.
9103 (initialize_low_arch): New function.
9104 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9105 (nios2_arch_setup): Set the current process'es tdesc.
9106 (target_regsets): Rename to ...
9107 (nios2_regsets): ... this.
9108 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9109 (nios2_regs_info): New function.
9110 (the_low_target): Adjust.
9111 (initialize_low_arch): New function.
9112 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9113 (aarch64_arch_setup): Set the current process'es tdesc.
9114 (target_regsets): Rename to ...
9115 (aarch64_regsets): ... this.
9116 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9117 (aarch64_regs_info): New function.
9118 (the_low_target): Adjust.
9119 (initialize_low_arch): New function.
9120 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9122 (target_regsets): Rename to ...
9123 (tile_regsets): ... this.
9124 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9125 (tile_regs_info): New function.
9126 (tile_arch_setup): Set the current process'es tdesc.
9127 (the_low_target): Adjust.
9128 (initialize_low_arch): New function.
9129 * spu-low.c (tdesc_spu): Declare.
9130 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9131 * win32-arm-low.c (tdesc_arm): Declare.
9132 (arm_arch_setup): New function.
9133 (the_low_target): Install arm_arch_setup instead of
9135 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9136 (init_windows_x86): Rename to ...
9137 (i386_arch_setup): ... this. Set `win32_tdesc'.
9138 (the_low_target): Adjust.
9139 * win32-low.c (win32_tdesc): New global.
9140 (child_add_thread): Don't create the thread cache here.
9141 (do_initial_child_stuff): Set the new process'es tdesc.
9142 * win32-low.h (struct target_desc): Forward declare.
9143 (win32_tdesc): Declare.
9144 * lynx-i386-low.c (tdesc_i386): Declare global.
9145 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9146 * lynx-low.c (lynx_tdesc): New global.
9147 (lynx_add_process): Set the new process'es tdesc.
9148 * lynx-low.h (struct target_desc): Forward declare.
9149 (lynx_tdesc): Declare global.
9150 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9151 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9152 * nto-low.c (nto_tdesc): New global.
9153 (do_attach): Set the new process'es tdesc.
9154 * nto-low.h (struct target_desc): Forward declare.
9155 (nto_tdesc): Declare.
9156 * nto-x86-low.c (tdesc_i386): Declare.
9157 (nto_x86_arch_setup): Set `nto_tdesc'.
9159 2013-06-04 Gary Benson <gbenson@redhat.com>
9161 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9162 to qSupported response when appropriate.
9163 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9164 with nonzero-length annex.
9165 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9166 arguments supplied in annex.
9168 2013-05-31 Doug Evans <dje@google.com>
9171 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9172 64 bits in 64-cross-32 environment.
9174 2013-05-28 Pedro Alves <palves@redhat.com>
9176 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9177 (aarch64-without-fpu.c): Delete rule.
9178 * configure.srv (aarch64*-*-linux*): Remove references to
9179 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9180 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9183 2013-05-24 Pedro Alves <palves@redhat.com>
9185 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9186 instead of strchr/decode_address. Error if the range isn't split
9187 with a ','. Don't assume there's be a ':' in the action.
9189 2013-05-23 Yao Qi <yao@codesourcery.com>
9190 Pedro Alves <palves@redhat.com>
9192 * linux-low.c (lwp_in_step_range): New function.
9193 (linux_wait_1): If the thread was range stepping and stopped
9194 outside the stepping range, report the stop to GDB. Otherwise,
9195 continue stepping. Add range stepping debug output.
9196 (linux_set_resume_request): Copy the step range from the resume
9198 (linux_supports_range_stepping): New.
9199 (linux_target_ops) <supports_range_stepping>: Set to
9200 linux_supports_range_stepping.
9201 * linux-low.h (struct linux_target_ops)
9202 <supports_range_stepping>: New field.
9203 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9204 * linux-x86-low.c (x86_supports_range_stepping): New.
9205 (the_low_target) <supports_range_stepping>: Set to
9206 x86_supports_range_stepping.
9207 * server.c (handle_v_cont): Handle 'r' action.
9208 (handle_v_requests): Append ";r" if the target supports range
9210 * target.h (struct thread_resume) <step_range_start,
9211 step_range_end>: New fields.
9212 (struct target_ops) <supports_range_stepping>:
9214 (target_supports_range_stepping): New macro.
9216 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9218 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9219 confusion in comment.
9221 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9223 * lynx-low.c (struct process_info_private): New type.
9224 (lynx_add_process): New function.
9225 (lynx_create_inferior, lynx_attach): Replace calls to
9226 add_process by calls to lynx_add_process.
9227 (lynx_resume): If PTID is null, then try using
9228 current_process()->private->last_wait_event_ptid.
9230 (lynx_clear_inferiors): Delete. The contents of that function
9231 has been inlined in lynx_mourn;
9232 (lynx_wait_1): Save the ptid in the process's private data.
9233 (lynx_mourn): Free the process' private data. Replace call
9234 to lynx_clear_inferiors by call to clear_inferiors.
9236 2013-05-17 Yao Qi <yao@codesourcery.com>
9238 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9241 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9243 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9244 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9245 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9246 PT_TEXT_END_ADDR guards. Update comments.
9247 (linux_target_op) <read_offsets>: Conditionally define to
9248 linux_read_offsets if the target is UCLIBC and if it defines
9249 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9251 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9252 Andrew Jenner <andrew@codesourcery.com>
9254 * Makefile.in (SFILES): Add linux-nios2-low.c.
9255 (clean): Add action to delete nios2-linux.c.
9256 (nios2-linux.c): New rule.
9257 * configure.srv: Add nios2*-*-linux*.
9258 * linux-nios2-low.c: New.
9260 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9262 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9264 2013-04-25 Hui Zhu <hui@codesourcery.com>
9267 * ax.c (ax_printf): Add fflush.
9269 2013-04-22 Tom Tromey <tromey@redhat.com>
9271 * Makefile.in (SFILES): Add filestuff.c.
9272 (OBS): Add filestuff.o.
9273 (filestuff.o): New target.
9274 * config.in, configure: Rebuild.
9275 * configure.ac: Check for fdwalk, pipe2.
9277 2013-04-17 Pedro Alves <palves@redhat.com>
9279 * configure.ac (USE_THREAD_DB): Delete variable.
9280 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9281 Don't AC_SUBST USE_THREAD_DB.
9282 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9283 * config.in, configure: Regenerate.
9285 2013-04-16 Pedro Alves <palves@redhat.com>
9287 * linux-low.h (struct lwp_info) <thread_known>: Move under
9288 the USE_THREAD_DB #ifdef.
9290 2013-04-16 Pedro Alves <palves@redhat.com>
9292 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9293 (linux-low.o): Delete rule.
9294 * linux-low.h: Always include "gdb_thread_db.h" instead of
9295 conditionally including thread_db.h.
9296 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9299 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9301 * Makefile.in (install-only): Fix make install regression.
9303 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9305 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9306 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9308 * gdbserver.1: Remove.
9310 2013-03-22 Pedro Alves <palves@redhat.com>
9312 * linux-low.c (handle_extended_wait): Don't call
9313 linux_enable_event_reporting.
9315 2013-03-15 Tony Theodore <tonyt@logyst.com>
9318 * Makefile.in (SHELL): Use @SHELL@.
9320 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9322 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9325 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9327 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9328 Remove extraneous NULL element.
9330 2013-03-13 Yao Qi <yao@codesourcery.com>
9332 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9333 'V' block in trace frame.
9335 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9337 * target.h (struct target_ops): Add btrace ops.
9338 (target_supports_btrace): New macro.
9339 (target_enable_btrace): New macro.
9340 (target_disable_btrace): New macro.
9341 (target_read_btrace): New macro.
9342 * gdbthread.h (struct thread_info): Add btrace field.
9343 * server.c: Include btrace-common.h.
9344 (handle_btrace_general_set): New function.
9345 (handle_btrace_enable): New function.
9346 (handle_btrace_disable): New function.
9347 (handle_general_set): Call handle_btrace_general_set.
9348 (handle_qxfer_btrace): New function.
9349 (struct qxfer qxfer_packets[]): Add btrace entry.
9350 * inferiors.c (remove_thread): Disable btrace.
9351 * linux-low: Include linux-btrace.h.
9352 (linux_low_enable_btrace): New function.
9353 (linux_low_read_btrace): New function.
9354 (linux_target_ops): Add btrace ops.
9355 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9356 Add srv_linux_btrace=yes.
9357 (x86_64-*-linux*): Add linux-btrace.o.
9358 Add srv_linux_btrace=yes.
9359 * configure.ac: Define HAVE_LINUX_BTRACE.
9360 * config.in: Regenerated.
9361 * configure: Regenerated.
9363 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9365 * server.c (handle_qxfer): Preserve error message if -3 is
9367 (qxfer): Document the -3 return value.
9369 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9371 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9372 (linux_btrace_h): New variable.
9373 (linux-btrace.o): New rule.
9375 2013-03-08 Stan Shebs <stan@codesourcery.com>
9376 Hafiz Abid Qadeer <abidh@codesourcery.com>
9378 * tracepoint.c (trace_buffer_size): New global.
9379 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9380 (init_trace_buffer): Change to one-argument function. Allocate
9381 trace buffer memory.
9382 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9383 handle QTBuffer:size packet.
9384 (cmd_bigqtbuffer_size): New function.
9385 (initialize_tracepoint): Call init_trace_buffer with
9386 DEFAULT_TRACE_BUFFER_SIZE.
9387 * server.c (handle_query): Add QTBuffer:size in the
9390 2013-03-07 Yao Qi <yao@codesourcery.com>
9392 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9393 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9395 (cmd_qtsp): Adjust condition. Do post increment.
9396 Set cur_action and cur_step_action back to 0.
9398 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9401 * linux-low.c (linux_write_memory): Return early success if LEN is
9404 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9406 * configure.srv: Add x86_64-*-cygwin* as target.
9408 2013-02-28 Tom Tromey <tromey@redhat.com>
9410 * configure.ac: Invoke AC_SYS_LARGEFILE.
9411 * configure, config.in: Rebuild.
9413 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9415 * win32-low.c: Throughout, fix format strings and casts of
9416 printf-like functions to avoid type related warnings on all
9418 (get_child_debug_event): Print dwDebugEventCode as hex since
9419 that's how it's usually documented.
9421 2013-02-28 Yao Qi <yao@codesourcery.com>
9423 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9426 2013-02-27 Jiong Wang <jiwang@tilera.com>
9428 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9429 (reg-tilegx32.c): New rule.
9430 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9431 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9432 different register info initializer according to elf class.
9433 (init_registers_tilgx32): New function. The tilegx32 register info
9435 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9436 (tile_store_gregset): Likewise.
9438 2013-02-27 Yao Qi <yao@codesourcery.com>
9440 * server.c (process_point_options): Print debug message when
9441 debug_threads is true.
9443 2013-02-26 Yao Qi <yao@codesourcery.com>
9445 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9447 2013-02-19 Pedro Alves <palves@redhat.com>
9448 Kai Tietz <ktietz@redhat.com>
9452 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9453 instead of strtoul to extract address from packet.
9454 (process_serial_event) <'z'>: Likewise.
9456 2013-02-18 Yao Qi <yao@codesourcery.com>
9458 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9460 2013-02-14 Pedro Alves <palves@redhat.com>
9464 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9465 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9467 2013-02-14 Pedro Alves <palves@redhat.com>
9469 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9471 2013-02-14 Pedro Alves <palves@redhat.com>
9473 * tracepoint.c (save_string): Delete.
9474 (add_tracepoint_action): Use savestring instead of save_string.
9476 2013-02-12 Pedro Alves <palves@redhat.com>
9478 * linux-xtensa-low.c: Ditto.
9479 * xtensa-xtregs.c: Ditto.
9481 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9483 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9486 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9488 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9489 aarch64_num_wp_regs and aarch64_num_bp_regs to
9490 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9492 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9494 * linux-aarch64-low.c (ps_get_thread_area): Replace
9495 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9497 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9498 Marcus Shawcroft <marcus.shawcroft@arm.com>
9499 Nigel Stephens <nigel.stephens@arm.com>
9500 Yufeng Zhang <yufeng.zhang@arm.com>
9502 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9503 (aarch64.c, aarch64-without-fpu.c): New targets.
9504 * configure.srv (aarch64*-*-linux*): New.
9505 * linux-aarch64-low.c: New file.
9507 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9509 * linux-low.c (handle_extended_wait, linux_create_inferior)
9510 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9511 (dequeue_one_deferred_signal, linux_resume_one_thread)
9512 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9513 (linux_tracefork_grandchild, linux_test_for_tracefork)
9514 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9515 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9516 where the argument is 0.
9518 2013-01-25 Yao Qi <yao@codesourcery.com>
9520 * event-loop.c: Include "queue.h".
9521 (gdb_event_p): New typedef.
9522 (struct gdb_event) <next_event>: Remove.
9523 (event_queue): Change to QUEUE(gdb_event_p).
9524 (async_queue_event): Remove.
9525 (gdb_event_xfree): New.
9526 (initialize_event_loop): New.
9527 (process_event): Use API from QUEUE.
9528 (wait_for_event): Likewise.
9529 * server.c (main): Call initialize_event_loop.
9530 * server.h (initialize_event_loop): Declare.
9532 2013-01-18 Yao Qi <yao@codesourcery.com>
9534 * ax.h (struct eval_agent_expr_context): New.
9535 (gdb_eval_agent_expr): Update declaration.
9536 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9537 TFRAME. Add new argument CTX.
9538 * server.h (struct eval_agent_expr_context): Declare.
9539 (agent_mem_read, agent_tsv_read): Update declaration.
9540 (agent_mem_read_string): Likewise.
9541 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9542 (add_traceframe_block): Add new argument TPOINT.
9543 Increase TPOINT->traceframe_usage.
9544 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9545 eval_tracepoint_agent_expr.
9546 (condition_true_at_tracepoint): Likewise.
9547 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9548 (agent_mem_read_string, agent_tsv_read): Likewise.
9550 2013-01-16 Yao Qi <yao@codesourcery.com>
9552 * linux-low.c (linux_resume_one_lwp): Don't check
9553 'lwp->bp_reinsert != 0'.
9555 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9556 Pedro Alves <palves@redhat.com>
9558 * lynx-low.c (ptrace_request_to_str): Define a temporary
9559 macro and use it to simplify this function's implementation.
9561 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9563 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9566 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9568 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9570 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9572 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9574 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9576 * lynx-low.c (lynx_resume): Use the resume_info parameter
9577 to determine the ptid for the lynx_ptrace call, unless
9578 it is equal to minus_one_ptid, in which case we use the
9579 ptid of the current_inferior.
9580 (lynx_wait_1): After having received a thread create/exit
9581 event, resume the inferior's execution using the signaling
9582 thread's ptid, rather than the old ptid.
9584 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9586 * lynx-low.c (lynx_resume): Delete variable ret.
9588 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9590 * gdbreplay.c (gdbreplay_version): Update copyright year.
9591 * server.c (gdbserver_version): Likewise.
9593 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9595 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9598 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9600 * lynx-low.c (ptrace_request_to_str): Add handling for
9603 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9605 * lynx-low.c (lynx_attach): Delete variable new_process.
9607 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9609 * lynx-low.c (lynx_create_inferior): Delete variable
9612 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9614 * lynx-low.c (ptrace_request_to_str): Do not handle
9615 PTRACE_GETTHREADLIST if this macro does not exist.
9617 2012-12-15 Yao Qi <yao@codesourcery.com>
9619 * Makefile.in (OBS): Add notif.o.
9620 * notif.c, notif.h: New.
9621 * server.c: Include "notif.h".
9622 (struct vstop_notif) <next>: Remove.
9624 (queue_stop_reply): Update.
9625 (push_event, send_next_stop_reply): Remove.
9626 (discard_queued_stop_replies): Update.
9627 (notif_stop): New variable.
9628 (handle_v_stopped): Remove.
9629 (handle_v_requests): Don't call handle_v_stopped. Call
9630 handle_ack_notif instead.
9631 (queue_stop_reply_callback): Call notif_event_enque instead
9632 of queue_stop_reply.
9633 (handle_status): Don't call send_next_stop_reply, call
9634 notif_write_event instead.
9635 (kill_inferior_callback): Likewise.
9636 (detach_or_kill_inferior_callback): Likewise.
9637 (main): Call initialize_notif.
9638 (process_serial_event): Call QUEUE_is_empty.
9639 (handle_target_event): Call notif_push instead of push event.
9640 * server.h (push_event): Remove declaration.
9642 2012-12-10 Tom Tromey <tromey@redhat.com>
9644 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9645 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9648 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9649 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9650 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9651 (amd64-linux-ipa.o, ax.o): Rewrite.
9652 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9653 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9654 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9655 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9656 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9657 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9658 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9659 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9660 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9661 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9662 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9663 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9664 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9665 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9666 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9667 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9668 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9669 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9670 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9671 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9672 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9673 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9674 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9675 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9676 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9677 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9678 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9679 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9680 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9681 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9682 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9683 (reg-tilegx.o): Remove.
9684 (all_object_files): New macro.
9685 Include .deps files.
9686 * aclocal.m4, configure: Rebuild.
9687 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9688 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9689 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9691 2012-12-05 Tom Tromey <tromey@redhat.com>
9694 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9696 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9698 * configure.ac: Check for linux/perf_event.h.
9699 * config.in: Regenerated.
9700 * configure: Regenerated.
9702 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9704 * hostio.c (handle_readlink): Decrease buffer size
9705 parameter passed to readlink by one byte.
9707 2012-11-26 Yao Qi <yao@codesourcery.com>
9709 * configure.ac (build_warnings): Append '-Wempty-body'.
9710 * configure: Regenerated.
9711 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9714 2012-11-15 Pierre Muller <muller@sourceware.org>
9716 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9717 * config.in: Regenerate.
9718 * configure: Regenerate.
9719 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9720 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9721 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9722 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9724 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9725 instead of <sys/wait.h> header.
9726 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9728 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9730 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9731 (various make rules): Remove -DGDBSERVER
9733 2012-11-09 Yao Qi <yao@codesourcery.com>
9735 * spu-low.c (current_ptid): Move it to ..
9736 * gdbthread.h: ... here. New.
9737 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9738 * server.c (myresume, process_serial_event): Likewise.
9739 * thread-db.c (thread_db_find_new_threads): Likewise.
9740 * tracepoint.c (run_inferior_command): Likewise.
9742 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9744 * server.c (handle_search_memory_1): Include access length in
9747 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9749 * linux-crisv32-low.c: Fix compile errors.
9751 2012-09-04 Yao Qi <yao@codesourcery.com>
9753 * tracepoint.c (cmd_qtsv): Adjust debug message.
9754 Don't check CUR_TPOINT.
9756 2012-08-28 Yao Qi <yao@codesourcery.com>
9758 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9759 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9760 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9761 Remove declarations of xmalloc, xreallloc, xstrdup and
9763 * Makefile.in (libiberty_h): New.
9764 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9765 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9767 2012-08-23 Yao Qi <yao@codesourcery.com>
9769 * server.h: Remove declaration of 'xsnprintf'.
9771 2012-08-22 Keith Seitz <keiths@redhat.com>
9773 * server.h: Include build-gnulib-gbserver/config.h.
9774 * gdbreplay.c: Likewise.
9776 2012-08-08 Doug Evans <dje@google.com>
9778 * Makefile.in (SFILES): Add gdb_vecs.c.
9779 (OBS): Add gdb_vecs.o.
9780 (gdb_vecs_h, host_defs_h): New variables.
9781 (thread-db.o): Add $(gdb_vecs_h) dependency.
9782 (gdb_vecs.o): New rule.
9783 * thread-db.c: #include "gdb_vecs.h".
9784 (thread_db_load_search): Use a vector to iterate over path elements.
9785 Handle text appearing after "$pdir".
9787 * configure.ac: Add check for strstr.
9788 * config.in: Regenerate.
9789 * configure: Regenerate.
9791 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9793 * hostio.c (handle_pread): If pread fails, fall back to attempting
9795 (handle_pwrite): Likewise for pwrite.
9797 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9799 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9800 between unsupported TYPE and unimplementable ADDR/LEN combination.
9801 (arm_insert_point): Act on new return value.
9803 2012-07-31 Pedro Alves <palves@redhat.com>
9805 * server.c (process_point_options): Only skip tokens if we find
9806 one that is unrecognized. Don't treat 'X' specially while
9807 skipping unrecognized tokens.
9809 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9811 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9812 to 4-byte-align HW breakpoint addresses for Thumb.
9814 2012-07-27 Yao Qi <yao@codesourcery.com>
9818 * server.h: Declare gdb_agent_about_to_close.
9819 * target.c (kill_inferior): Include "agent.h".
9820 New. Send command 'kill'.
9821 * target.h (kill_inferior): Removed macro.
9822 * tracepoint.c (gdb_agent_about_to_close): New.
9823 (gdb_agent_helper_thread): Handle command 'close'.
9824 Wait endlessly until the inferior stops.
9825 Install gdb_agent_remove_socket to atexit hook.
9826 (agent_socket_name): New static variable.
9827 (gdb_agent_socket_init): Replace local variable 'name' with
9828 'agent_socket_name'.
9829 (gdb_agent_remove_socket): New.
9831 2012-07-27 Yao Qi <yao@codesourcery.com>
9833 * server.c (process_point_options): Stop at 'X' when parsing.
9835 2012-07-19 Michael Eager <eager@eagercon.com>
9837 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9839 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9840 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9841 hardware breakpoint.
9843 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9845 * gdbserver/linux-low.c (initialize_low): Call
9846 linux_ptrace_init_warnings.
9848 2012-07-02 Doug Evans <dje@google.com>
9850 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9853 2012-07-02 Stan Shebs <stan@codesourcery.com>
9855 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9856 (ax.o): Add it to build rule.
9858 (OBS): Add format.o.
9859 (IPA_OBS): Add format.o.
9860 * server.c (handle_query): Claim support for breakpoint commands.
9861 (process_point_options): Add command case.
9862 (process_serial_event): Leave running if there are printfs in
9864 * mem-break.h (any_persistent_commands): Declare.
9865 (add_breakpoint_commands): Declare.
9866 (gdb_no_commands_at_breakpoint): Declare.
9867 (run_breakpoint_commands): Declare.
9868 * mem-break.c (struct point_command_list): New struct.
9869 (struct breakpoint): New field command_list.
9870 (any_persistent_commands): New function.
9871 (add_commands_to_breakpoint): New function.
9872 (add_breakpoint_commands): New function.
9873 (gdb_no_commands_at_breakpoint): New function.
9874 (run_breakpoint_commands): New function.
9875 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9877 * ax.c: Include format.h.
9878 (ax_printf): New function.
9879 (gdb_eval_agent_expr): Add printf opcode.
9881 2012-06-13 Yao Qi <yao@codesourcery.com>
9883 * server.c (start_inferior): Remove duplicated writes to fields
9884 'last_resume_kind' and 'last_status' of 'current_inferior'.
9886 2012-06-12 Yao Qi <yao@codesourcery.com>
9887 Pedro Alves <palves@redhat.com>
9889 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9891 * server.c (handle_v_cont): Extend comment.
9893 2012-06-11 Yao Qi <yao@codesourcery.com>
9895 * linux-low.c (linux_attach): Add 'static'.
9897 2012-06-06 Yao Qi <yao@codesourcery.com>
9899 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9901 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9903 Fix gcc -flto compilation warning.
9904 * server.c (main): Make variable multi_mode and attach volatile.
9906 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9908 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9909 if the platform doesn't know about it.
9911 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9913 * Makefile.in (SFILES): Add linux-tile-low.c.
9914 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9915 * configure.srv: Handle tilegx-*-linux*.
9916 * linux-tile-low.c: New file.
9918 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9920 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9922 2012-05-24 Pedro Alves <palves@redhat.com>
9926 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9928 2012-05-24 Pedro Alves <palves@redhat.com>
9932 Replace target_signal with gdb_signal throughout.
9934 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9936 * linux-low.c (linux_store_registers): Avoid the copying sequence
9937 when no data has been retrieved by ptrace.
9939 2012-05-22 Will Deacon <will.deacon@arm.com>
9941 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9942 Include asm/ptrace.h.
9943 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9946 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9948 * linux-low.c (linux_store_registers): Don't re-retrieve data
9949 with ptrace that has already been obtained from /proc. Always
9950 copy any data retrieved with ptrace to the buffer supplied.
9952 2012-05-11 Yao Qi <yao@codesourcery.com>
9953 Pedro Alves <palves@redhat.com>
9955 * linux-low.c (enum stopping_threads_kind): New.
9956 (stopping_threads): Change type to `enum stopping_threads_kind'.
9957 (handle_extended_wait): If stopping and suspending threads, leave
9958 the new_lwp suspended too.
9959 (linux_wait_for_event): Adjust.
9960 (stop_all_lwps): Set `stopping_threads' to
9961 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9962 whether we're suspending threads or just stopping them. Assert no
9965 2012-04-29 Yao Qi <yao@codesourcery.com>
9967 * server.h: Move some code to ...
9968 * gdbthread.h: ... here. New.
9969 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9970 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9971 (nto-low.o, win32-low.o): Likewise.
9972 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9973 * regcache.c, remote-utils.c, server.c: Likewise.
9974 * target.c, tracepoint.c, win32-low.c: Likewise.
9976 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9978 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9979 (PTRACE_ARG4_TYPE): Likewise.
9980 (PTRACE_XFER_TYPE): Likewise.
9981 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9982 ptrace to PTRACE_ARG3_TYPE.
9983 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9984 (PTRACE_ARG4_TYPE): Likewise.
9985 (PTRACE_XFER_TYPE): Likewise.
9986 (linux_detach_one_lwp): Cast fourth argument of
9987 ptrace to long then PTRACE_ARG4_TYPE.
9988 (regsets_fetch_inferior_registers): Cast third argument of
9989 ptrace to long then PTRACE_ARG3_TYPE.
9990 (regsets_store_inferior_registers): Likewise.
9992 2012-04-20 Pedro Alves <palves@redhat.com>
9994 * configure: Regenerate.
9996 2012-04-19 Pedro Alves <palves@redhat.com>
9998 * Makefile.in (GNULIB_BUILDDIR): New.
9999 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10000 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10001 (all, install-only, uninstall, clean-info, all-lib, clean): No
10002 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10003 (maintainer-clean realclean distclean): Use subdir_do.
10005 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10006 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10007 * acinclude.m4: Include acx_configure_dir.m4.
10008 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10009 calls. Call AC_PROG_RANLIB. Configure gnulib using
10012 (GNULIB_STDINT_H): Adjust.
10013 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10014 * gdbreplay.c: Include build-gnulib/config.h.
10015 * server.h: Likewise.
10016 * aclocal.m4: Regenerate.
10017 * config.in: Regenerate.
10018 * configure: Regenerate.
10020 2012-04-19 Pedro Alves <palves@redhat.com>
10022 * Makefile.in (LIBGNU, INCGNU): Adjust.
10023 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10024 (all, install-only, uninstall, clean-info, all-lib, clean)
10025 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10026 * configure.ac: Adjust AC_OUTPUT output.
10027 * aclocal.m4: Regenerate.
10028 * configure: Regenerate.
10030 2012-04-19 Pedro Alves <palves@redhat.com>
10032 * Makefile.in (generated_files): New.
10033 (server_h): Remove the explicit dependency on config.h, and depend
10034 on $generated_files.
10036 2012-04-19 Pedro Alves <palves@redhat.com>
10038 * Makefile.in (INCGNU): Add -Ignulib.
10040 2012-04-19 Pedro Alves <palves@redhat.com>
10042 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10043 (INCGNU): ... this, and spell out -I here.
10044 (GNULIB_LIB): Rename to ...
10045 (LIBGNU): ... this.
10046 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10048 2012-04-19 Pedro Alves <palves@redhat.com>
10050 * config.in: Regenerate.
10052 2012-04-19 Pedro Alves <palves@redhat.com>
10054 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10055 * server.h (memmem): Remove declaration.
10056 * config.in: Regenerate.
10057 * configure: Regenerate.
10059 2012-04-19 Yao Qi <yao@codesourcery.com>
10061 * Makefile.in (SFILES): Add common/vec.c.
10065 2012-04-19 Yao Qi <yao@codesourcery.com>
10067 * remote-utils.c (prepare_resume_reply): Replace with macro
10068 target_core_of_thread.
10069 * server.c (handle_qxfer_threads_proper): Likewise.
10070 * target.h (traget_core_of_thread): New macro.
10072 2012-04-18 Pedro Alves <palves@redhat.com>
10074 * aclocal.m4: Regenerate.
10075 * configure: Regenerate.
10077 2012-04-16 Yao Qi <yao@codesourcery.com>
10079 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10080 duplicated on address.
10082 2012-04-16 Yao Qi <yao@codesourcery.com>
10084 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10085 (struct tracepoint_action_ops) <send>: New field.
10086 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10087 (agent_expr_send, x_tracepoint_action_send): New.
10088 (l_tracepoint_action_send): New.
10089 (cmd_qtdp): Download and install tracepoint
10090 according to `use_agent'.
10091 (run_inferior_command): Add one more parameter `len'.
10093 (tracepoint_send_agent): New.
10094 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10096 2012-04-16 Yao Qi <yao@codesourcery.com>
10098 * tracepoint.c (download_tracepoints): Moved to ...
10099 (cmd_qtstart): ... here.
10101 2012-04-14 Yao Qi <yao@codesourcery.com>
10103 * tracepoint.c: Include inttypes.h.
10104 (struct collect_memory_action): Use sized types.
10105 (struct tracepoint): Likewise.
10106 (cmd_qtdp, stop_tracing): Update print specifiers.
10107 (cmd_qtp, response_tracepoint): Likewise.
10108 (collect_data_at_tracepoint): Likewise.
10109 (collect_data_at_step): Likewise.
10111 2012-04-14 Yao Qi <yao@codesourcery.com>
10113 Import gnulib module inttypes.
10114 * aclocal.m4, config.in, configure: Regenerated.
10116 2012-04-14 Yao Qi <yao@codesourcery.com>
10118 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10119 Makefile and config.status at last.
10121 2012-04-13 Yao Qi <yao@codesourcery.com>
10123 * tracepoint.c: Include stdint.h unconditionally.
10125 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10127 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10128 on BFD_HAVE_SYS_PROCFS_TYPE.
10129 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10130 * configure: Regenerate.
10131 * config.in: Likewise.
10133 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10135 * Makefile.in (clean): Also remove x32.c x32-linux.c
10136 x32-avx.c x32-avx-linux.c.
10137 (x32.o): New target.
10139 (x32-linux.o): Likewise.
10140 (x32-linux.c): Likewise.
10141 (x32-avx.o): Likewise.
10142 (x32-avx.c): Likewise.
10143 (x32-avx-linux.o): Likewise.
10144 (x32-avx-linux.c): Likewise.
10146 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10147 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10148 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10149 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10150 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10151 i386/x32-avx-linux.xml.
10153 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10154 (init_registers_x32_avx_linux): Likwise.
10155 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10156 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10158 2012-04-13 Pedro Alves <palves@redhat.com>
10160 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10161 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10162 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10163 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10166 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10168 * linux-x86-low.c (compat_x32_clock_t): New.
10169 (compat_x32_siginfo_t): Likewise.
10170 (compat_x32_siginfo_from_siginfo): Likewise.
10171 (siginfo_from_compat_x32_siginfo): Likewise.
10172 (linux_is_elf64): Likewise.
10173 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10174 and siginfo_from_compat_x32_siginfo for x32.
10175 (x86_arch_setup): Set linux_is_elf64.
10177 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10180 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10182 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10183 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10184 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10185 compatible with process.
10187 2012-04-12 Yao Qi <yao@codesourcery.com>
10189 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10190 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10191 (install-only, install-info, clean): Handle sub dir gnulib.
10192 (all-lib, am--refresh): New targets.
10193 (memmem.o): Remove target.
10194 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10195 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10196 (AC_REPLACE_FUNCS): Remove memmem.
10197 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10198 (AC_OUTPUT): Generate Makefile in gnulib/.
10199 * aclocal.m4, config.in, configure: Regenerated.
10201 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10203 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10205 2012-04-05 Pedro Alves <palves@redhat.com>
10207 -Werror=strict-aliasing
10209 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10212 2012-04-04 Pedro Alves <palves@redhat.com>
10214 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10215 (sparc_store_gregset_from_stack, sparc_store_gregset)
10216 (sparc_breakpoint_at): Fix formatting.
10218 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10220 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10222 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10223 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10224 * config.in: Regenerate.
10225 * configure: Likewise.
10227 2012-03-29 Pedro Alves <palves@redhat.com>
10229 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10230 Correct ptrace arguments.
10232 2012-03-28 Pedro Alves <palves@redhat.com>
10234 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10235 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10236 (IA64_FR1_REGNUM): New defines.
10237 (ia64_fetch_register): New.
10238 (the_low_target): Install it.
10239 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10241 * linux-low.c (linux_fetch_registers): Try the
10242 the_low_target.fetch_register hook first.
10244 * linux-arm-low.c (the_low_target): Adjust.
10245 * linux-bfin-low.c (the_low_target): Adjust.
10246 * linux-cris-low.c (the_low_target): Adjust.
10247 * linux-crisv32-low.c (the_low_target): Adjust.
10248 * linux-m32r-low.c (the_low_target): Adjust.
10249 * linux-m68k-low.c (the_low_target): Adjust.
10250 * linux-mips-low.c (the_low_target): Adjust.
10251 * linux-ppc-low.c (the_low_target): Adjust.
10252 * linux-s390-low.c (the_low_target): Adjust.
10253 * linux-sh-low.c (the_low_target): Adjust.
10254 * linux-sparc-low.c (the_low_target): Adjust.
10255 * linux-tic6x-low.c (the_low_target): Adjust.
10256 * linux-x86-low.c (the_low_target): Adjust.
10257 * linux-xtensa-low.c (the_low_target): Adjust.
10259 2012-03-26 Pedro Alves <palves@redhat.com>
10261 * server.c (handle_qxfer_libraries): Don't bail early if
10262 the_target->qxfer_libraries_svr4 is not NULL.
10264 2012-03-26 Pedro Alves <palves@redhat.com>
10266 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10268 2012-03-23 Pedro Alves <palves@redhat.com>
10270 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10271 "library-list-svr4" element's start tag when the the DSO list is
10274 2012-03-23 Pedro Alves <palves@redhat.com>
10276 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10277 a variable whose type size is the same as the inferior's pointer
10280 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10282 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10284 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10285 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10286 * linux-low.h: Include <signal.h>.
10287 (struct siginfo): Remove forward declaration.
10288 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10291 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10293 * .gitignore: Ignore more files.
10295 2012-03-19 Pedro Alves <palves@redhat.com>
10296 Jan Kratochvil <jan.kratochvil@redhat.com>
10298 * server.c (cont_thread, general_thread): Add describing comments.
10299 (start_inferior): Clear `cont_thread'.
10300 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10303 2012-03-15 Yao Qi <yao@codesourcery.com>
10305 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10307 (cmd_qtdp): ... here.
10309 2012-03-15 Yao Qi <yao@codesourcery.com>
10311 * tracepoint.c (struct tracepoint_action_ops): New.
10312 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10313 (m_tracepoint_action_download): New.
10314 (r_tracepoint_action_download): New.
10315 (x_tracepoint_action_download): New.
10316 (l_tracepoint_action_download): New.
10317 (add_tracepoint_action): Install `action->ops' according type.
10318 (download_tracepoint_1): Move code `download' function pointer
10319 of various tracepoint_action_ops.
10321 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10323 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10324 linux_ptrace_attach_warnings.
10326 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10328 * Makefile.in (linux-ptrace.o): New.
10329 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10330 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10331 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10332 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10333 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10335 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10337 2012-03-08 Yao Qi <yao@codesourcery.com>
10338 Pedro Alves <palves@redhat.com>
10340 Fix PR server/13392.
10341 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10342 offset of JMP insn.
10343 * tracepoint.c (remove_tracepoint): New.
10344 (cmd_qtdp): Call remove_tracepoint when failed to install.
10346 2012-03-07 Pedro Alves <palves@redhat.com>
10348 * linux-low.c (get_detach_signal): New.
10349 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10350 Pass on pending signals to PTRACE_DETACH. Check the result of the
10352 * server.c (program_signals, program_signals_p): New.
10353 (handle_general_set): Handle QProgramSignals.
10354 * server.h (program_signals, program_signals_p): Declare.
10356 2012-03-05 Pedro Alves <palves@redhat.com>
10357 Jan Kratochvil <jan.kratochvil@redhat.com>
10359 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10362 2012-03-03 Yao Qi <yao@codesourcery.com>
10364 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10365 agent_look_up_symbols.
10367 2012-03-03 Yao Qi <yao@codesourcery.com>
10369 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10370 (linux-x86-low.o): Likewise.
10371 * server.h: Remove in_process_agent_loaded.
10372 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10376 2012-03-03 Yao Qi <yao@codesourcery.com>
10378 * tracepoint.c (gdb_agent_capability): New global.
10379 (in_process_agent_loaded_ust): Renamed to
10380 `in_process_agent_supports_ust'.
10382 (in_process_agent_supports_ust): Call agent_capability_check.
10383 (clear_installed_tracepoints): Assert that agent supports
10386 2012-03-03 Yao Qi <yao@codesourcery.com>
10388 * linux-low.c (linux_supports_agent): New.
10389 (linux_target_ops): Initialize field `supports_agent' with
10390 linux_supports_agent.
10391 * target.h (struct target_ops) <supports_agent>: New.
10392 (target_supports_agent): New macro.
10393 * server.c (handle_general_set): Handle packet 'QAgent'.
10394 (handle_query): Send `QAgent+'.
10395 * Makefile.in (server.o): Depends on agent.h.
10397 2012-03-03 Yao Qi <yao@codesourcery.com>
10399 * Makefile.in (OBS): Add agent.o.
10400 Add new rule for agent.o.
10401 Track dependence of tracepoint.c on agent.h.
10402 * tracepoint.c (run_inferior_command_1):
10403 (run_inferior_command): Call agent_run_command.
10404 (gdb_ust_connect_sync_socket): Deleted. Move it to
10406 (resume_thread, stop_thread): Likewise.
10407 (gdb_ust_socket_init): Renamed to ...
10408 (gdb_agent_socket_init): ... New.
10409 (gdb_ust_thread): Renamed to ...
10410 (gdb_agent_helper_thread): ... New.
10411 (gdb_ust_init): Move some code to ...
10412 (gdb_agent_init): ... here. New.
10413 [HAVE_UST]: Call gdb_ust_init.
10414 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10415 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10416 * config.in, configure: Regenerated.
10418 2012-03-02 Pedro Alves <palves@redhat.com>
10420 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10421 * linux-low.c (struct simple_pid_list): New.
10422 (stopped_pids): New a struct simple_pid_list pointer.
10423 (add_to_pid_list, pull_pid_from_list): New.
10424 (handle_extended_wait): Don't assume the first signal new children
10425 report is SIGSTOP. Adjust call to pull_pid_from_list.
10426 (linux_wait_for_lwp): Adjust.
10428 2012-03-02 Yao Qi <yao@codesourcery.com>
10430 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10433 2012-03-02 Yao Qi <yao@codesourcery.com>
10435 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10436 `stop_pc' and `tpoint'. Update caller.
10438 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10440 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10441 * linux-low.c (use_linux_regsets): New macro.
10442 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10443 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10444 (linux_register_in_regsets): New function.
10445 (usr_fetch_inferior_registers): Skip registers covered by
10447 (usr_store_inferior_registers): Likewise.
10448 (usr_fetch_inferior_registers): New macro.
10449 (usr_store_inferior_registers): Likewise.
10450 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10451 (linux_store_registers): Likewise.
10452 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10454 (init_registers_mips64_dsp_linux): Likewise.
10455 (init_registers_mips_linux): New macro.
10456 (init_registers_mips_dsp_linux): Likewise.
10457 (mips_dsp_num_regs): Likewise.
10458 (DSP_BASE, DSP_CONTROL): New fallback macros.
10459 (mips_base_regs): New macro.
10460 (mips_regmap): Use it. Fix the size.
10461 (mips_dsp_regmap): New variable.
10462 (mips_dsp_regset_bitmap): Likewise.
10463 (mips_arch_setup): New function.
10464 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10466 (mips_cannot_store_register): Likewise.
10467 (the_low_target): Update .arch_setup, .num_regs and .regmap
10468 initializers. Add .regset_bitmap initializer.
10469 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10471 * linux-bfin-low.c (the_low_target): Likewise.
10472 * linux-cris-low.c (the_low_target): Likewise.
10473 * linux-crisv32-low.c (the_low_target): Likewise.
10474 * linux-ia64-low.c (the_low_target): Likewise.
10475 * linux-m32r-low.c (the_low_target): Likewise.
10476 * linux-m68k-low.c (the_low_target): Likewise.
10477 * linux-ppc-low.c (the_low_target): Likewise.
10478 * linux-s390-low.c (the_low_target): Likewise.
10479 * linux-sh-low.c (the_low_target): Likewise.
10480 * linux-sparc-low.c (the_low_target): Likewise.
10481 * linux-tic6x-low.c (the_low_target): Likewise.
10482 * linux-x86-low.c (the_low_target): Likewise.
10483 * linux-xtensa-low.c (the_low_target): Likewise.
10484 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10485 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10486 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10488 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10489 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10491 2012-02-29 Yao Qi <yao@codesourcery.com>
10492 Pedro Alves <palves@redhat.com>
10494 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10495 `step_over_finished' is true.
10497 2012-02-27 Pedro Alves <palves@redhat.com>
10499 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10500 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10502 2012-02-27 Pedro Alves <palves@redhat.com>
10505 * linux-low.c (pid_is_stopped): New.
10506 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10508 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10510 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10513 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10515 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10517 2012-02-24 Luis Machado <lgustavo@codesourcery>
10519 * server.c (handle_query): Advertise support for target-side
10520 breakpoint condition evaluation.
10521 (process_point_options): New function.
10522 (process_serial_event): When inserting a breakpoint, check for
10523 a target-side condition that should be evaluated.
10525 * mem-break.c: Include regcache.h and ax.h.
10526 (point_cond_list_t): New data structure.
10527 (breakpoint) <cond_list>: New field.
10528 (find_gdb_breakpoint_at): Make non-static.
10529 (delete_gdb_breakpoint_at): Clear any target-side
10531 (clear_gdb_breakpoint_conditions): New function.
10532 (add_condition_to_breakpoint): Likewise.
10533 (add_breakpoint_condition): Likewise.
10534 (gdb_condition_true_at_breakpoint): Likewise.
10535 (gdb_breakpoint_here): Return result directly instead
10536 of going through a local variable.
10538 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10539 (clear_gdb_breakpoint_conditions): Likewise.
10540 (add_breakpoint_condition): Likewise.
10541 (gdb_condition_true_at_breakpoint): Likewise.
10543 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10544 (need_step_over_p): Take target-side breakpoint condition into
10547 2012-02-24 Luis Machado <lgustavo@codesourcery>
10549 * server.h: Include tracepoint.h.
10550 (agent_mem_read, agent_get_trace_state_variable_value,
10551 agent_set_trace_state_variable_value,
10552 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10553 get_set_tsv_func_addr): New prototypes.
10555 * ax.h: New include file.
10556 * ax.c: New source file.
10558 * tracepoint.c: Include ax.h.
10559 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10560 agent_expr, eval_result_type): Move to ax.h.
10561 (parse_agent_expr): Rename to ...
10562 (gdb_parse_agent_expr): ... this, make it non-static and move
10564 (unparse_agent_expr) Rename to ...
10565 (gdb_unparse_agent_expr): ... this, make it non-static and move
10567 (eval_agent_expr): Rename to ...
10568 (eval_tracepoint_agent_expr): ... this.
10569 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10570 forward declarations.
10571 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10572 (agent_get_trace_state_variable_value): New function.
10573 (agent_set_trace_state_variable_value): New function.
10574 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10575 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10576 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10577 (condition_true_at_tracepoint): Likewise.
10578 (parse_agent_expr): Rename to ...
10579 (gdb_parse_agent_expr): ... this and move to ax.c.
10580 (unparse_agent_expr): Rename to ...
10581 (gdb_unparse_agent_expr): ... this and move to ax.c.
10582 (gdb_agent_op_name): Move to ax.c.
10583 (eval_agent_expr): Rename to ...
10584 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10586 (eval_tracepoint_agent_expr): New function.
10587 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10589 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10591 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10592 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10593 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10594 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10595 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10596 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10597 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10598 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10599 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10600 (compile_bytecodes): Remove forward declaration.
10601 (is_goto_target): Move to ax.c.
10602 (compile_bytecodes): Move to ax.c and call
10603 agent_get_trace_state_variable_value (...) and
10604 agent_set_trace_state_variable_value (...).
10606 * Makefile.in: Update ax.c and IPA dependencies.
10608 2012-02-24 Pedro Alves <palves@redhat.com>
10610 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10611 (cmd_bigqtbuffer_circular): ... this. Only handle
10612 'QTBuffer:circular:'.
10613 (handle_tracepoint_general_set): Adjust.
10615 2012-02-16 Yao Qi <yao@codesourcery.com>
10617 * inferiors.c: Move code to ...
10618 * dll.c: .... here. New.
10619 * server.h: Declare clear_dlls.
10620 * Makefile.in (SFILES): Add dll.c.
10624 2012-02-11 Yao Qi <yao@codesourcery.com>
10626 * server.c: (handle_monitor_command): Add a new parameter
10628 (handle_query): Update caller.
10630 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10632 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10633 * configure, config.in: Regenerate.
10634 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10637 2012-02-02 Pedro Alves <palves@redhat.com>
10639 Try SIGKILL first, then PTRACE_KILL.
10640 * linux-low.c (linux_kill_one_lwp): New.
10641 (linux_kill_one_lwp): Rename to ...
10642 (kill_one_lwp_callback): ... this. Use the new
10643 linux_kill_one_lwp.
10645 2012-02-02 Pedro Alves <palves@redhat.com>
10647 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10650 2012-01-27 Pedro Alves <palves@redhat.com>
10652 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10653 (elf_64_file_p): Make static.
10654 (linux_pid_exe_is_elf_64_file): New.
10655 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10656 Delete declarations.
10657 (linux_pid_exe_is_elf_64_file): Declare.
10658 * linux-x86-low.c (x86_arch_setup): Use
10659 linux_pid_exe_is_elf_64_file.
10661 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10663 * linux-low.c (linux_wait_for_event_1): Rename to ...
10664 (linux_wait_for_event): ... here and merge it with former
10665 linux_wait_for_event - new variable wait_ptid, use it.
10666 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10668 2012-01-23 Pedro Alves <palves@redhat.com>
10670 * server.c (main): Avoid yet another case of infinite loop while
10671 detaching/killing after a longjmp.
10673 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10676 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10678 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10680 * hostio.c (handle_readlink): New function.
10681 (handle_vFile): Call it to handle "vFile:readlink" packets.
10683 2012-01-20 Pedro Alves <palves@redhat.com>
10684 Ulrich Weigand <ulrich.weigand@linaro.org>
10686 * server.c (handle_v_requests): Only support vAttach and vRun to
10687 start multiple processes when in extended protocol mode.
10689 2012-01-17 Pedro Alves <palves@redhat.com>
10691 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10692 memalign plus mprotect to allocate the scratch buffer.
10694 2012-01-13 Pedro Alves <palves@redhat.com>
10696 * server.c (attach_inferior): Clear `cont_thread'.
10698 2012-01-13 Pedro Alves <palves@redhat.com>
10700 * server.c (main): Avoid infinite loop while detaching/killing
10703 2012-01-09 Doug Evans <dje@google.com>
10705 * server.c (start_inferior): Set last_ptid in --wrapper case.
10707 2012-01-06 Yao Qi <yao@codesourcery.com>
10709 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10711 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10713 2012-01-04 Yao Qi <yao@codesourcery.com>
10715 * tracepoint.c (cmd_qtdp): Print debug message
10716 for static tracepoint.
10718 2012-01-04 Yao Qi <yao@codesourcery.com>
10720 * tracepoint.c (trace_vdebug): Differentiate debug message
10721 between gdbserver and IPA.
10723 2012-01-03 Yao Qi <yao@codesourcery.com>
10725 * tracepoint.c (tracepoint_was_hit): Don't collect for
10728 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10730 * terminal.h: Reformat copyright header.
10732 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10734 * server.c (gdbserver_version): Update copyright year.
10735 * gdbreplay.c (gdbreplay_version): Likewise.
10737 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10739 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10742 2011-12-18 Hui Zhu <teawater@gmail.com>
10743 * linux-low.c (linux_create_inferior): Save return value to ret.
10745 2011-12-18 Hui Zhu <teawater@gmail.com>
10747 * linux-low.c (linux_create_inferior): Save return value to ret.
10749 2011-12-16 Doug Evans <dje@google.com>
10751 * linux-low.c (linux_create_inferior): If stdio connection,
10752 redirect stdin from /dev/null, stdout to stderr.
10753 * remote-utils.c (remote_is_stdio): New static global.
10754 (remote_connection_is_stdio): New function.
10755 (remote_prepare): Handle stdio connection.
10756 (remote_open): Ditto.
10757 (remote_close): Don't close stdin for stdio connections.
10758 (read_prim,write_prim): New functions. Replace all calls to
10759 read/write to these.
10760 * server.c (main): Watch for "-" argument. Move call to
10761 remote_prepare before start_inferior.
10762 * server.h (STDIO_CONNECTION_NAME): New macro.
10763 (remote_connection_is_stdio): Declare.
10765 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10766 in debugging output.
10768 2011-12-15 Yao Qi <yao@codesourcery.com>
10770 * tracepoint.c: Include sys/syscall.h.
10771 (gdb_ust_thread): Remove preprocessor conditional.
10773 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10775 * linux-low.c (linux_detach_one_lwp): Call
10776 the_low_target.prepare_to_resume before detaching.
10778 2011-12-14 Yao Qi <yao@codesourcery.com>
10780 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10783 2011-12-14 Yao Qi <yao@codesourcery.com>
10785 * i386-low.c (i386_low_stopped_data_address): Initialize local
10786 variable `control'.
10788 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10792 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10793 DR_CONTROL unless necessary. Extend comments.
10794 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10795 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10797 2011-12-13 Yao Qi <yao@codesourcery.com>
10799 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10801 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10803 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10805 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10806 Print new debug message for such case.
10808 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10810 Fix overlapping memcpy.
10811 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10812 the read_inferior_memory transfer.
10813 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10814 write_inferior_memory transfer.
10815 (set_fast_tracepoint_jump): New variable buf. Use it for the
10816 read_inferior_memory and write_inferior_memory transfers.
10817 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10818 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10819 Use it for the write_inferior_memory transfer.
10820 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10823 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10825 * linux-low.c (fetch_register, store_register): Make code
10826 consistent, fix formatting.
10828 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10830 * linux-low.c (usr_store_inferior_registers): Factor out code
10831 to handle individual registers into...
10832 (store_register): ... this new function.
10834 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10836 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10837 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10838 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10839 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10840 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10841 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10842 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10843 (srv_xmlfiles): Add new XML files.
10845 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10847 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10848 (init_registers_s390_linux32v1): Add prototype.
10849 (init_registers_s390_linux32v2): Likewise.
10850 (init_registers_s390_linux64v1): Likewise.
10851 (init_registers_s390_linux64v2): Likewise.
10852 (init_registers_s390x_linux64v1): Likewise.
10853 (init_registers_s390x_linux64v2): Likewise.
10854 (s390_num_regs): Increment to 52.
10855 (s390_regmap): Add orig_r2 register.
10856 (s390_num_regs_3264): Increment to 68.
10857 (s390_regmap_3264): Add orig_r2 register.
10858 (s390_collect_ptrace_register): Handle orig_r2 register.
10859 (s390_supply_ptrace_register): Likewise.
10860 (s390_fill_last_break): New function.
10861 (s390_store_last_break): Likewise.
10862 (s390_fill_system_call): New function.
10863 (s390_store_system_call): Likewise.
10864 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10866 (s390_check_regset): New function.
10867 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10868 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10869 Update target_regsets for available register sets.
10871 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10872 Jan Kratochvil <jan.kratochvil@redhat.com>
10874 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10875 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10877 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10878 * linux-low.h (struct process_info_private): New member r_debug.
10879 * server.c (handle_qxfer_libraries): Call
10880 the_target->qxfer_libraries_svr4.
10881 (handle_qxfer_libraries_svr4): New function.
10882 (qxfer_packets): New entry "libraries-svr4".
10883 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10884 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10885 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10886 PACKET_qXfer_libraries_svr4.
10888 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10890 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10891 PSW address/mask between 8-byte and 16-byte formats.
10892 (s390_supply_ptrace_register): Likewise.
10893 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10894 basic addressing mode bit.
10896 2011-11-24 Stan Shebs <stan@codesourcery.com>
10898 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10900 2011-11-17 Stan Shebs <stan@codesourcery.com>
10902 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10903 (tracing_start_time): New global.
10904 (tracing_stop_time): New global.
10905 (tracing_user_name): New global.
10906 (tracing_notes): New global.
10907 (tracing_stop_note): New global.
10908 (cmd_qtstart): Set traceframe_usage, start_time.
10909 (stop_tracing): Set stop_time.
10910 (cmd_qtstatus): Report additional status.
10911 (cmd_qtp): New function.
10912 (handle_tracepoint_query): Call it.
10913 (cmd_qtnotes): New function.
10914 (handle_tracepoint_general_set): Call it.
10915 (get_timestamp): Rename from tsv_get_timestamp.
10917 2011-11-14 Stan Shebs <stan@codesourcery.com>
10918 Kwok Cheung Yeung <kcy@codesourcery.com>
10920 * linux-x86-low.c (small_jump_insn): New.
10921 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10922 trampoline and error message, build a trampoline and issue a small
10923 jump instruction to it.
10924 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10925 trampoline and error message.
10926 (x86_get_min_fast_tracepoint_insn_len): New.
10927 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10928 * linux-low.h (struct linux_target_ops): Add arguments to
10929 install_fast_tracepoint_jump_pad operation, add new operation.
10930 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10932 (linux_get_min_fast_tracepoint_insn_len): New function.
10933 (linux_target_op): Add new operation.
10934 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10935 (gdb_trampoline_buffer_end): Ditto.
10936 (gdb_trampoline_buffer_error): Ditto.
10937 (struct ipa_sym_addresses): Add fields for new IPA variables.
10938 (symbol_list): Add entries for new IPA variables.
10939 (struct tracepoint): Add fields to hold the address range of the
10940 trampoline used by the tracepoint.
10941 (trampoline_buffer_head): New static variable.
10942 (trampoline_buffer_tail): Ditto.
10943 (claim_trampoline_space): New function.
10944 (have_fast_tracepoint_trampoline_buffer): New function.
10945 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10947 (install_fast_tracepoint): Ditto, also add error buffer argument.
10948 (cmd_qtminftpilen): New function.
10949 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10950 (fast_tracepoint_from_trampoline_address): New function.
10951 (fast_tracepoint_collecting): Handle trampoline as part of jump
10953 (set_trampoline_buffer_space): New function.
10954 (initialize_tracepoint): Initialize new IPA variables.
10955 * target.h (struct target_ops): Add arguments to
10956 install_fast_tracepoint_jump_pad operation, add new
10957 get_min_fast_tracepoint_insn_len operation.
10958 (target_get_min_fast_tracepoint_insn_len): New.
10959 (install_fast_tracepoint_jump_pad): Add arguments.
10960 * server.h (IPA_BUFSIZ): Define.
10961 * linux-i386-ipa.c: Include extra header files.
10962 (initialize_fast_tracepoint_trampoline_buffer): New function.
10963 (initialize_low_tracepoint): Call it.
10964 * server.h (set_trampoline_buffer_space): Declare.
10965 (claim_trampoline_space): Ditto.
10966 (have_fast_tracepoint_trampoline_buffer): Ditto.
10968 2011-11-14 Yao Qi <yao@codesourcery.com>
10970 * server.c (handle_query): Handle InstallInTrace for qSupported.
10971 * tracepoint.c (add_tracepoint): Sort list.
10972 (install_tracepoint, download_tracepoint): New.
10973 (cmd_qtdp): Call them to install and download tracepoints.
10974 (sort_tracepoints): Removed.
10975 (cmd_qtstart): Update.
10977 2011-11-14 Yao Qi <yao@codesourcery.com>
10979 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10980 * mem-break.h: Declare.
10981 * tracepoint.c (cmd_qtstart): Move some code to ...
10982 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10984 (download_tracepoints): Move some code to ...
10985 (download_tracepoint_1): ... here. New.
10987 2011-11-08 Yao Qi <yao@codesourcery.com>
10989 * remote-utils.c (relocate_instruction): A comment fix.
10991 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10993 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10994 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10995 dr_status_mirror and dr_control_mirror from debug_reg_state.
10996 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10997 (i386_initial_stuff): Remove use of deleted globals.
10998 (i386_get_thread_context, i386_set_thread_context,
10999 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11000 from debug_reg_state.
11002 2011-11-05 Yao Qi <yao@codesourcery.com>
11004 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11005 address as TPOINT's.
11007 2011-11-02 Stan Shebs <stan@codesourcery.com>
11009 * tracepoint.c (agent_mem_read_string): New function.
11010 (eval_agent_expr): Call it for tracenz.
11011 * server.c (handle_query): Report support for tracenz.
11013 2011-11-02 Yao Qi <yao@codesourcery.com>
11015 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11017 2011-11-02 Yao Qi <yao@codesourcery.com>
11019 * target.h: Fix a typo in comment.
11021 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11023 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11024 clobber the breakpoints' shadows with fast tracepoint jumps.
11025 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11026 * target.c (write_inferior_memory): Also pass MYADDR down to
11029 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11031 * configure.ac: Check support for personality routine.
11032 * configure: Regenerate.
11033 * config.in: Likewise.
11034 * linux-low.c: Include <sys/personality.h>.
11035 Define ADDR_NO_RANDOMIZE if necessary.
11036 (linux_create_inferior): Disable address space randomization when
11037 forking inferior, if requested.
11038 (linux_supports_disable_randomization): New function.
11039 (linux_target_ops): Install it.
11040 * server.h (disable_randomization): Declare.
11041 * server.c (disable_randomization): New global variable.
11042 (handle_general_set): Handle QDisableRandomization.
11043 (handle_query): Likewise for qSupported.
11044 (main): Support --disable-randomization and --no-disable-randomization
11045 command line arguments.
11046 * target.h (struct target_ops): Add supports_disable_randomization.
11047 (target_supports_disable_randomization): New macro.
11049 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11051 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11053 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11054 [!PT_GETDSBT] (target_loadmap): New definition.
11055 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11056 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11057 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11058 and PT_GETDSBT to LINUX_LOADMAP.
11059 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11060 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11062 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11064 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11065 (arm_linux_hwbp_cap): New static variable.
11066 (arm_linux_get_hwbp_cap): Replace by ...
11067 (arm_linux_init_hwbp_cap): ... this new function.
11068 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11069 (arm_linux_get_hw_watchpoint_count): Likewise.
11070 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11071 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11072 (arm_prepare_to_resume): Use perror_with_name instead of error.
11074 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11076 * linux-arm-low.c: Include <signal.h>.
11077 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11078 (struct arm_linux_hwbp_cap): New data type.
11079 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11080 (struct arm_linux_hw_breakpoint): New data type.
11081 (MAX_BPTS, MAX_WPTS): Define.
11082 (struct arch_process_info, struct arch_lwp_info): New data types.
11083 (arm_linux_get_hwbp_cap): New function.
11084 (arm_linux_get_hw_breakpoint_count): Likewise.
11085 (arm_linux_get_hw_watchpoint_count): Likewise.
11086 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11087 (arm_hwbp_control_initialize): Likewise.
11088 (arm_hwbp_control_is_enabled): Likewise.
11089 (arm_hwbp_control_is_initialized): Likewise.
11090 (arm_hwbp_control_disable): Likewise.
11091 (arm_linux_hw_breakpoint_equal): Likewise.
11092 (arm_linux_hw_point_initialize): Likewise.
11093 (struct update_registers_data): New data structure.
11094 (update_registers_callback: New function.
11095 (arm_insert_point): Likewise.
11096 (arm_remove_point): Likewise.
11097 (arm_stopped_by_watchpoint): Likewise.
11098 (arm_stopped_data_address): Likewise.
11099 (arm_new_process): Likewise.
11100 (arm_new_thread): Likewise.
11101 (arm_prepare_to_resume): Likewise.
11102 (the_low_target): Register arm_insert_point, arm_remove_point,
11103 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11104 arm_new_thread, and arm_prepare_to_resume.
11106 2011-09-15 Stan Shebs <stan@codesourcery.com>
11108 * server.h (struct emit_ops): Add compare-goto fields.
11109 * tracepoint.c (gdb_agent_op_sizes): New table.
11110 (emit_eq_goto): New function.
11111 (emit_ne_goto): New function.
11112 (emit_lt_goto): New function.
11113 (emit_le_goto): New function.
11114 (emit_gt_goto): New function.
11115 (emit_ge_goto): New function.
11116 (is_goto_target): New function.
11117 (compile_bytecodes): Recognize special cases of compare-goto
11118 combinations and call specialized emitters for them.
11119 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11120 (amd64_emit_ne_goto): New function.
11121 (amd64_emit_lt_goto): New function.
11122 (amd64_emit_le_goto): New function.
11123 (amd64_emit_gt_goto): New function.
11124 (amd64_emit_ge_goto): New function.
11125 (amd64_emit_ops): Add the new functions.
11126 (i386_emit_eq_goto): New function.
11127 (i386_emit_ne_goto): New function.
11128 (i386_emit_lt_goto): New function.
11129 (i386_emit_le_goto): New function.
11130 (i386_emit_gt_goto): New function.
11131 (i386_emit_ge_goto): New function.
11132 (i386_emit_ops): Add the new functions.
11134 2011-09-08 Stan Shebs <stan@codesourcery.com>
11136 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11137 (i386_emit_epilogue): Restore %ebx.
11139 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11141 * server.c (step_thread): Remove definition.
11142 (process_serial_event): Don't handle Hs.
11143 * server.h (step_thread): Remove declaration.
11144 * target.c (set_desired_inferior): Remove use of step_thread.
11146 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11148 * linux-low.c: Include linux-procfs.h.
11149 (linux_attach_lwp_1): Update comments.
11150 (linux_attach): Scan for existing threads when attaching to a
11151 process that is the tgid.
11152 * Makefile.in: Update dependencies.
11154 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11156 * configure.srv: Add linux-procfs.o dependencies.
11158 2011-08-14 Yao Qi <yao@codesourcery.com>
11160 * target.h (struct target_ops): Fix indent.
11161 * win32-low.c (win32_target_ops): Fix comment.
11163 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11164 Yao Qi <yao@codesourcery.com>
11166 * Makefile.in (clean): Remove tic6x-*.c files.
11167 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11168 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11169 (tic6x-c64xp-linux.c): Likewise.
11170 * configure.srv: Add support for tic6x-*-uclinux.
11171 * linux-tic6x-low.c: New.
11172 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11174 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11175 Yao Qi <yao@codesourcery.com>
11177 * target.h (struct target_ops): Add read_loadmap.
11178 * linux-low.c (struct target_loadseg): New type.
11179 (struct target_loadmap): New type.
11180 (linux_read_loadmap): New function.
11181 (linux_target_ops): Add linux_read_loadmap.
11182 * server.c (handle_query): Support qXfer:fdpic:read packet.
11183 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11186 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11188 * win32-low.c: Include <stdint.h>.
11190 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11192 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11193 to the inferior here.
11194 (i386_remove_aligned_watchpoint): Ditto.
11195 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11196 fit part of the watchpoint in the debug registers.
11197 (i386_update_inferior_debug_regs): New.
11198 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11199 registers, and only update the inferior on success.
11200 (i386_low_remove_watchpoint): Ditto.
11202 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11204 * linux-low.c (compare_ints, unique, list_threads, show_process,
11205 linux_core_of_thread): Delete.
11206 (linux_target_ops): Change linux_core_of_thread to
11207 linux_common_core_of_thread.
11208 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11209 * utils.c (malloc_failure): Change type of argument.
11210 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11211 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11212 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11213 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11214 (IPA_OBJS): Add common-utils-ipa.o.
11215 (ptid_h, linux_osdata_h): New macros.
11216 (server_h): Add common/common-utils.h, common/xml-utils.h,
11217 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11219 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11220 ptid.o, buffer.o): New rules.
11221 (linux-low.o): Add common/linux-osdata.h as a dependency.
11222 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11223 * configure.ac: Add AC_HEADER_DIRENT check.
11224 * config.in: Regenerate.
11225 * configure: Regenerate.
11226 * remote-utils.c (xml_escape_text): Delete.
11227 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11228 buffer_xml_printf): Move to common/buffer.c.
11229 * server.c (main): Remove call to initialize_inferiors.
11230 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11231 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11232 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11233 internal_error, gdb_assert, gdb_assert_fail): Delete.
11234 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11235 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11237 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11238 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11239 initialize_inferiors): Delete.
11241 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11243 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11246 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11248 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11250 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11252 2011-05-26 Yao Qi <yao@codesourcery.com>
11254 * Makefile.in (thread-db.o): Track dependence to
11255 common/gdb_thread_db.h.
11256 * thread-db.c: include gdb_thread_db.h from right place.
11258 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11260 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11261 __FILE__ and __LINE__ to internal_error.
11263 2011-05-13 Doug Evans <dje@google.com>
11265 * thread-db.c (try_thread_db_load_from_sdir): New function.
11266 (try_thread_db_load_from_dir): New function.
11267 (thread_db_load_search): Handle $sdir, ignore $pdir.
11268 Remove trying of system directories if search of
11269 libthread-db-search-path fails, that is now done via $sdir.
11271 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11273 * server.c (handle_query): Add EnableDisableTracepoints to the list
11274 of supported features.
11275 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11277 (cmd_qtenable_disable): New.
11278 (cmd_qtstart): Install tracepoints even if disabled.
11279 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11280 receiving a QTEnable or QTDisable packet.
11281 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11282 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11284 (gdb_probe): Skip data collection if static tracepoint is disabled.
11286 2011-05-10 Doug Evans <dje@google.com>
11288 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11290 2011-05-04 Doug Evans <dje@google.com>
11292 * linux-low.c (linux_join): Skip process lookup.
11293 * spu-low.c (spu_join): Ditto.
11294 * server.c (join_inferiors_callback): Delete.
11295 (process_serial_event): For 'D' packet (detach) call join_inferior
11298 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11300 * README: Don't mention xscale*-*-linux*.
11301 * configure.srv (xscale*-*-linux*): Don't handle target.
11303 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11305 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11307 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11308 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11309 (i386_emit_void_call_2): Likewise.
11311 2011-04-26 Yao Qi <yao@codesourcery.com>
11313 * linux-low.c: Move common macros to linux-ptrace.h.
11314 Include linux-ptrace.h.
11315 * Makefile.in (linux_ptrace_h): New.
11316 (linux-low.o): Depends on linux-ptrace.h.
11318 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11320 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11321 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11322 (remote_prepare): New function with most of the TCP code from ...
11323 (remote_open): ... here. Detect PORT here unconditionally. Move also
11324 setting transport_is_reliable.
11325 * server.c (run_once): New variable.
11326 (gdbserver_usage): Document it.
11327 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11328 the first run if RUN_ONCE.
11329 * server.h (run_once, remote_prepare): New declarations.
11331 2011-04-19 Tom Tromey <tromey@redhat.com>
11333 * win32-low.c (handle_load_dll): Remove duplicate "the".
11335 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11337 Remove support for old Cygwin 1.5 versions.
11338 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11339 function to avoid warning.
11340 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11343 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11345 * gdbserver/server.h (Macro _): Define it if not available.
11347 2011-03-14 Michael Snyder <msnyder@vmware.com>
11349 * hostio.c (handle_close): Remove unnecessary null test.
11351 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11353 * Makefile.in (maintainer-clean realclean distclean): Remove
11354 "make ... subdir_do" command.
11356 2011-03-10 Michael Snyder <msnyder@vmware.com>
11358 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11360 * server.c (handle_v_run): Free alloced buffer on early return.
11362 2011-03-09 Yao Qi <yao@codesourcery.com>
11365 2011-03-04 Yao Qi <yao@codesourcery.com>
11367 * Makefile.in: Remove GNU make feature --directory.
11369 2011-03-05 Yao Qi <yao@codesourcery.com>
11371 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11372 (subdir_do): New make target. Copied from gdb/Makefile.
11373 (maintainer-clean, realclean, distclean, clean): Call corresponding
11374 make targets in common/Makefile.
11376 2011-02-11 Yao Qi <yao@codesourcery.com>
11378 * configure.ac: Call AC_PROG_RANLIB.
11379 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11380 * configure: Regenerate.
11382 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11384 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11386 2011-03-06 Yao Qi <yao@codesourcery.com>
11388 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11390 2011-03-05 Yao Qi <yao@codesourcery.com>
11392 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11393 (subdir_do): New make target. Copied from gdb/Makefile.
11394 (maintainer-clean, realclean, distclean, clean): Call corresponding
11395 make targets in common/Makefile.
11397 2011-03-04 Yao Qi <yao@codesourcery.com>
11399 * Makefile.in: Remove GNU make feature --directory.
11401 2011-03-04 Michael Snyder <msnyder@vmware.com>
11403 * server.c (queue_stop_reply): Call xmalloc not malloc.
11405 2011-03-02 Michael Snyder <msnyder@vmware.com>
11407 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11409 2011-02-28 Michael Snyder <msnyder@vmware.com>
11411 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11412 (cmd_qtframe): Ditto.
11413 (cmd_qtbuffer): Ditto.
11414 (cmd_bigqtbuffer): Ditto.
11416 * utils.c (decimal2str): Initialize 'width' to nine, then
11417 don't mess with it.
11419 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11421 * hostio.c (require_data): Free *data, not data.
11423 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11425 * hostio.c (require_data): Use free, not xfree.
11427 2011-02-27 Michael Snyder <msnyder@vmware.com>
11429 * server.c (handle_query): Discard unused value.
11431 * hostio.c (require_data): Free malloc memory before returning
11434 2011-02-26 Michael Snyder <msnyder@vmware.com>
11436 * linux-low.c (list_threads): Call closedir for dirent.
11438 2011-02-27 Michael Snyder <msnyder@vmware.com>
11440 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11441 a case statement falls through.
11443 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11445 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11448 2011-02-26 Michael Snyder <msnyder@vmware.com>
11450 * utils.c (decimal2str): Eliminate dead code and dead param.
11451 (pulongest): Drop dead param from call to decimal2str.
11454 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11456 Revert the following patch (not approved yet):
11457 2011-02-21 Hui Zhu <teawater@gmail.com>
11458 * tracepoint.c (tp_printf): New function.
11459 (eval_agent_expr): Handle gdb_agent_op_printf.
11461 2011-02-21 Hui Zhu <teawater@gmail.com>
11463 * tracepoint.c (tp_printf): New function.
11464 (eval_agent_expr): Handle gdb_agent_op_printf.
11466 2011-02-18 Tom Tromey <tromey@redhat.com>
11468 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11469 (tracepoint.o): Likewise.
11470 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11471 (gdb_agent_op_names): Likewise.
11473 2011-02-18 Tom Tromey <tromey@redhat.com>
11475 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11476 gdb_agent_op_rot>: New constants.
11477 (gdb_agent_op_names): Add pick and roll.
11478 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11481 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11483 * aclocal.m4: Regenerated with aclocal-1.11.1.
11485 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11487 * server.c (handle_qxfer_traceframe_info): New.
11488 (qxfer_packets): Register "traceframe-info".
11489 (handle_query): Report support for qXfer:traceframe-info:read+.
11490 * tracepoint.c (match_blocktype): New.
11491 (traceframe_find_block_type): Rename to ...
11492 (traceframe_walk_blocks): ... this. Add callback filter argument,
11494 (traceframe_find_block_type): New, reimplemented on top of
11495 traceframe_walk_blocks.
11496 (build_traceframe_info_xml): New.
11497 (traceframe_read_info): New.
11498 * server.h (traceframe_read_info): Declare.
11500 2011-02-11 Yao Qi <yao@codesourcery.com>
11502 * configure.ac: Call AC_PROG_RANLIB.
11503 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11504 * configure: Regenerate.
11506 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11508 * server.c (gdb_read_memory): Change return semantics to allow
11510 (handle_search_memory_1): Adjust.
11511 (process_serial_event) <'m' packet>: Handle partial transfers.
11512 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11514 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11516 * regcache.c (init_register_cache): Initialize
11517 regcache->register_status.
11518 (free_register_cache): Release regcache->register_status.
11519 (regcache_cpy): Copy register_status.
11520 (registers_to_string): Print 'x's for unavailable registers.
11521 (supply_register): Mark the register's status valid or
11522 unavailable, depending on whether a buffer was passed in or not.
11523 (supply_register_zeroed): New.
11524 (supply_regblock): Mark the registers' status valid or
11525 unavailable, depending on whether a buffer was passed in or not.
11526 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11527 (struct regcache): New `register_status' field.
11528 (supply_register_zeroed): Declare.
11529 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11530 supply_register_zeroed, rather than passing a NULL buffer to
11532 * tracepoint.c (fetch_traceframe_registers): Update comment.
11534 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11536 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11539 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11541 * server.h (decode_xfer_write): Change prototype.
11542 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11543 and don't extract the annex here.
11544 * server.c (decode_xfer_read): Remove `annex' parameter,
11545 and don't extract the annex here.
11546 (decode_xfer): New.
11547 (struct qxfer): New.
11548 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11549 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11550 (handle_qxfer_statictrace): New functions, abstracted out from
11551 handle_query, and made to use the struct qxfer interface.
11552 (handle_threads_qxfer_proper): Rename to ...
11553 (handle_qxfer_threads_proper): ... this.
11554 (handle_threads_qxfer): Rename to ...
11555 (handle_qxfer_threads): ... this. Adjust.
11556 (qxfer_packets): New array.
11557 (handle_qxfer): New function.
11558 (handle_query): Use handle_qxfer.
11560 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11562 * gdbreplay.c: Shorten lines of >= 80 columns.
11563 * linux-low.c: Ditto.
11564 * linux-ppc-low.c: Ditto.
11565 * linux-s390-low.c: Ditto.
11566 * linux-sparc-low.c: Ditto.
11567 * linux-x86-low.c: Ditto.
11568 * linux-xtensa-low.c: Ditto.
11569 * mem-break.c: Ditto.
11570 * nto-low.c: Ditto.
11571 * regcache.h: Ditto.
11572 * remote-utils.c: Ditto.
11575 * thread-db.c: Ditto.
11576 * tracepoint.c: Ditto.
11578 * win32-low.h: Ditto.
11580 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11582 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11585 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11587 * server.c (gdbserver_version): Update copyright year in version
11589 * gdbreplay.c (gdbreplay_version): Ditto.
11591 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11593 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11594 * linux-bfin-low.c: New file.
11595 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11596 PT_DATA_ADDR for BFIN targets.
11597 * Makefile.in (SFILES): Add linux-bfin-low.c.
11598 (clean): Remove reg-bfin.c.
11599 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11600 * README: Mention supported Blackfin targets.
11602 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11604 * .gitignore: New file.
11606 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11608 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11610 2010-10-22 Jie Zhang <jie@codesourcery.com>
11612 * Makefile.in: Add FLAGS_TO_PASS variable.
11613 (install): Remove dependency of install-only and recursively
11614 invoke make for install-only.
11616 2010-10-04 Doug Evans <dje@google.com>
11618 * Makefile.in (uninstall): Use $(DESTDIR).
11620 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11624 * linux-x86-low.c (compat_siginfo_from_siginfo)
11625 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11626 si_code is < 0. Check for si_code == SI_TIMER before checking for
11629 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11631 * lynx-i386-low.c: New file.
11632 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11634 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11636 * lynx-low.c (ptrace_request_to_str): Remove handling for
11637 request values that have been removed in LynxOS 5.x.
11639 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11641 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11644 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11646 * configure.ac: Add --enable-inprocess-agent option.
11647 * configure: Rebuilt.
11649 2010-09-06 Yao Qi <yao@codesourcery.com>
11651 * linux-low.c (linux_kill): Remove unused variable.
11652 (linux_stabilize_threads): Likewise.
11653 * server.c (start_inferior): Likewise.
11654 (queue_stop_reply_callback): Likewise.
11655 * tracepoint.c (do_action_at_tracepoint): Likewise.
11657 2010-09-06 Yao Qi <yao@codesourcery.com>
11659 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11662 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11664 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11666 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11668 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11671 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11673 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11674 gdbserver/lynx-ppc-low.c: New files.
11675 * Makefile.in (lynx_low_h): New variable.
11676 (lynx-low.o, lynx-ppc-low.o): New rules.
11677 * configure.ac: On LynxOS, link with -lnetinet.
11678 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11679 * configure: regenerate.
11681 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11683 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11684 * configure.ac: Add check for vasprintf and vsnprintf.
11685 * configure, config.in: Regenerate.
11686 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11688 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11690 * gdbreplay.c: Move include of alloca.h up, next to include of
11692 * server.h: Add include of malloc.h.
11693 * mem-break.c: Remove include of malloc.h.
11694 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11696 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11698 * Makefile.in (memmem.o): Build with -Wno-error.
11700 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11702 * utils.c (xsnprintf): Make non-static.
11703 * server.h: Add xsnprintf declaration.
11704 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11705 replace calls to snprintf by calls to xsnprintf throughout.
11707 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11709 * configure.ac: Add configure check for alloca.
11710 * configure, config.in: Regenerate.
11711 * server.h: Include alloca.h if it exists.
11712 * gdbreplay.c: Include alloca.h if it exists.
11714 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11716 * linux-low.c (__SIGRTMIN): Define if not already defined.
11717 (linux_create_inferior): Check for __ANDROID__ rather than
11719 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11720 are already deferred.
11721 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11722 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11723 stopped and already has a pending signal to report.
11724 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11725 a pending signal to report or is moving out of a jump pad.
11726 (linux_init_signals): Check for __ANDROID__ rather than
11729 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11731 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11732 debug_threads check. Avoid a linear search when not doing debug
11735 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11737 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11738 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11739 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11740 (process_event): Change local fd's type to gdb_fildes_t.
11741 (create_file_handler): Adjust prototype.
11742 (delete_file_handler): Adjust prototype.
11743 (handle_file_event): Adjust prototype. Use pfildes.
11744 (create_file_event): Adjsut prototype.
11745 * remote-utils.c (remote_desc, listen_desc): Change type to
11747 * server.h: New gdb_fildes_t typedef.
11748 [USE_WIN32API]: Include winsock2.h.
11749 (delete_file_handler, add_file_handler): Adjust prototypes.
11750 (pfildes): Declare.
11751 * utils.c (pfildes): New.
11753 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11755 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11756 * configure: Regenerate.
11758 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11760 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11761 (linux_done_accessing_memory): ... this.
11762 (linux_target_ops): Adjust.
11763 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11764 * nto-low.c (nto_target_ops): Adjust comment.
11765 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11766 * spu-low.c (spu_target_ops): Adjust comment.
11767 * target.h (target_ops): Rename unprepare_to_access_memory field
11768 to done_accessing_memory.
11769 (unprepare_to_access_memory): Rename to ...
11770 (done_accessing_memory): ... this.
11772 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11774 * linux-low.c (linux_prepare_to_access_memory): New.
11775 (linux_unprepare_to_access_memory): New.
11776 (linux_target_ops): Install them.
11777 * server.c (read_memory): Rename to ...
11778 (gdb_read_memory): ... this. Use
11779 prepare_to_access_memory/prepare_to_access_memory.
11780 (write_memory): Rename to ...
11781 (gdb_write_memory): ... this. Use
11782 prepare_to_access_memory/prepare_to_access_memory.
11783 (handle_search_memory_1): Adjust.
11784 (process_serial_event): Adjust.
11785 * target.h (struct target_ops): New fields
11786 prepare_to_access_memory and unprepare_to_access_memory.
11787 (prepare_to_access_memory, unprepare_to_access_memory): New.
11788 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11789 prepare_to_access_memory/prepare_to_access_memory.
11790 * nto-low.c (nto_target_ops): Adjust.
11791 * spu-low.c (spu_target_ops): Adjust.
11792 * win32-low.c (win32_target_ops): Adjust.
11794 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11796 * Makefile.in (WARN_CFLAGS): Get it from configure.
11797 (WERROR_CFLAGS): New.
11798 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11799 * configure.ac: Introduce --enable-werror, which adds -Werror to
11800 the compiler command line. Enabled by default. Disable with
11801 --disable-werror. Add -Wdeclaration-after-statement
11802 Wpointer-arith and -Wformat-nonliteral to warning flags.
11803 * configure: Regenerate.
11805 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11807 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11809 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11811 * gdbreplay.c (remote_error): New.
11813 (expect): Use gdbchar. Check for error reading from GDB.
11814 Clarify sync error output.
11815 (play): Check for errors writing to GDB.
11816 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11817 * remote-utils.c (getpkt): Check for errors writing to the remote
11820 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11822 * linux-low.c (linux_wait_1): Move non-debugging code out of
11823 `debug_threads' control.
11825 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11827 * linux-low.c (linux_wait_1): Don't set last_status here.
11828 * server.c (push_event, queue_stop_reply_callback): Assert we're
11829 not pushing a TARGET_WAITKIND_IGNORE event.
11830 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11831 (myresume, handle_target_event): Set the thread's last_resume_kind
11832 and last_status from the target returned status.
11834 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11838 * linux-x86-low.c (update_debug_registers_callback): New.
11839 (i386_dr_low_set_addr): Use it.
11840 (i386_dr_low_get_addr): New.
11841 (i386_dr_low_set_control): Use update_debug_registers_callback.
11842 (i386_dr_low_get_control): New.
11843 (i386_dr_low_get_status): Adjust.
11844 * linux-low.c (linux_stop_lwp): New.
11845 * linux-low.h (linux_stop_lwp): Declare.
11847 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11848 argument instead of a i386_debug_reg_state.
11849 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11850 a i386_debug_reg_state.
11851 (i386_insert_aligned_watchpoint): Adjust.
11852 (i386_remove_aligned_watchpoint): Adjust.
11853 (i386_low_stopped_data_address): Read the debug registers from the
11854 inferior instead of from the mirrors.
11855 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11856 (i386_dr_low_get_addr): Declare.
11857 (i386_dr_low_get_control): Declare.
11858 (i386_dr_low_get_status): Change prototype.
11860 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11861 (i386_dr_low_get_addr): New.
11862 (i386_dr_low_get_control): New.
11863 (i386_dr_low_get_status): Adjust prototype. Return
11865 (i386_initial_stuff): Clear dr_status_mirror and
11867 (i386_get_thread_context): Adjust.
11868 (i386_set_thread_context): Adjust.
11869 (i386_thread_added): Adjust.
11871 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11873 * linux-low.h (linux_thread_area): Delete declaration.
11875 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11877 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11878 after its termination.
11880 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11882 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11883 (gdb_wants_all_stopped): Delete.
11884 (linux_wait_1): Don't call them.
11885 * server.c (handle_v_cont): Tag all threads as want-stopped.
11886 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11887 stopped as "client-wants-stopped".
11889 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11891 * Makefile.in (signals_h): New.
11892 (server_h): Depend on it.
11893 (server.o): Don't depend on $(signals_def).
11894 (signals.o): Depend on $(signals_def).
11896 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11898 * Makefile.in (signals_def): New.
11899 (server_h): Append include/gdb/signals.h and signals_def.
11900 (server.o): Append signals_def.
11902 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11904 * server.c (handle_target_event): Use target_signal_to_host for
11905 resume_info.sig initialization.
11906 * target.h (struct thread_resume) <sig>: New comment.
11908 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11910 * server.c (handle_query): strcpy() the returned string from paddress()
11911 instead of sprintf().
11912 * utils.c (paddress): Return phex_nz().
11914 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11916 * server.c (handle_v_cont): Call mourn_inferior if process
11918 (myresume): Likewise.
11920 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11922 Static tracepoints, and integration with UST.
11924 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11925 * mem-break.c (uninsert_all_breakpoints)
11926 (reinsert_all_breakpoints): New.
11927 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11928 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11929 (gdb_agent_ust_loaded, helper_thread_id)
11930 (gdb_agent_helper_thread_id): New macros.
11931 (struct ipa_sym_addresses): Add addr_ust_loaded,
11932 addr_helper_thread_id, addr_cmd_buf.
11933 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11934 (in_process_agent_loaded_ust): New.
11935 (write_e_ust_not_loaded): New.
11936 (maybe_write_ipa_ust_not_loaded): New.
11937 (struct collect_static_trace_data_action): New.
11938 (enum tracepoint_type) <static_tracepoint>: New.
11939 (struct tracepoint) <handle>: Mention static tracepoints.
11940 (struct static_tracepoint_ctx): New.
11941 (CMD_BUF_SIZE): New.
11942 (add_tracepoint_action): Handle static tracepoint actions.
11943 (unprobe_marker_at): New.
11944 (clear_installed_tracepoints): Handle static tracepoints.
11945 (cmd_qtdp): Handle static tracepoints.
11946 (probe_marker_at): New.
11947 (cmd_qtstart): Handle static tracepoints.
11948 (response_tracepoint): Handle static tracepoints.
11949 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11950 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11951 (get_context_regcache): Handle static tracepoints.
11952 (do_action_at_tracepoint): Handle static tracepoint actions.
11953 (traceframe_find_block_type): Handle static trace data blocks.
11954 (traceframe_read_sdata): New.
11955 (download_tracepoints): Download static tracepoint actions.
11956 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11957 (GDB_PROBE_NAME): New.
11959 (GET_UST_SYM): New.
11962 (ust_marker_to_static_tracepoint): New.
11964 (collect_ust_data_at_tracepoint): New.
11965 (gdb_ust_probe): New.
11966 (UNIX_PATH_MAX, SOCK_DIR): New.
11967 (gdb_ust_connect_sync_socket): New.
11968 (resume_thread, stop_thread): New.
11969 (run_inferior_command): New.
11970 (init_named_socket): New.
11971 (gdb_ust_socket_init): New.
11972 (cstr_to_hexstr): New.
11974 (first_marker, next_marker): New.
11975 (response_ust_marker): New.
11976 (cmd_qtfstm, cmd_qtsstm): New.
11977 (unprobe_marker_at, probe_marker_at): New.
11978 (cmd_qtstmat, gdb_ust_thread): New.
11979 (gdb_ust_init): New.
11980 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11981 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11982 (ST_REGENTRY): New.
11983 (x86_64_st_collect_regmap): New.
11984 (X86_64_NUM_ST_COLLECT_GREGS): New.
11985 (AMD64_RIP_REGNUM): New.
11986 (supply_static_tracepoint_registers): New.
11987 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11988 (ST_REGENTRY): New.
11989 (i386_st_collect_regmap): New.
11990 (i386_NUM_ST_COLLECT_GREGS): New.
11991 (supply_static_tracepoint_registers): New.
11992 * server.c (handle_query): Handle qXfer:statictrace:read.
11993 <qSupported>: Report support for StaticTracepoints, and
11994 qXfer:statictrace:read features.
11995 * server.h (traceframe_read_sdata)
11996 (supply_static_tracepoint_registers): Declare.
11997 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11998 (unpack_varlen_hex): Include in IPA build.
11999 * Makefile.in (ustlibs, ustinc): New.
12000 (IPA_OBJS): Add remote-utils-ipa.o.
12001 ($(IPA_LIB)): Link -ldl and -lpthread.
12003 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12004 * config.in, configure: Regenerate.
12006 2010-06-20 Ian Lance Taylor <iant@google.com>
12007 Pedro Alves <pedro@codesourcery.com>
12009 * linux-x86-low.c (always_true): Delete.
12010 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12011 trying to fool the compiler with always_true.
12013 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12015 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12016 conditions in gdbserver.
12018 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12020 * spu-low.c (spu_read_memory): Wrap around local store limit.
12021 (spu_write_memory): Likewise.
12023 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12025 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12026 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12028 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12030 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12031 uses with LONGEST uses.
12033 2010-06-14 Stan Shebs <stan@codesourcery.com>
12034 Pedro Alves <pedro@codesourcery.com>
12038 * linux-x86-low.c: Include limits.h.
12040 (always_true): New.
12043 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12044 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12045 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12046 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12047 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12048 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12049 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12050 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12051 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12052 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12053 (amd64_emit_void_call_2): New.
12054 (amd64_emit_ops): New.
12055 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12056 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12057 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12058 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12059 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12060 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12061 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12062 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12063 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12064 (i386_emit_stack_adjust, i386_emit_int_call_1)
12065 (i386_emit_void_call_2): New.
12066 (i386_emit_ops): New.
12067 (x86_emit_ops): New.
12068 (the_low_target): Install x86_emit_ops.
12069 * server.h (struct emit_ops): New.
12070 (get_raw_reg_func_addr): Declare.
12071 (current_insn_ptr, emit_error): Declare.
12072 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12073 (set_trace_state_variable_value): New defines.
12074 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12075 addr_get_trace_state_variable_value and
12076 addr_set_trace_state_variable_value.
12077 (symbol_list): New fields for get_raw_reg,
12078 get_trace_state_variable_value and set_trace_state_variable_value.
12079 (condfn): New typedef.
12080 (struct tracepoint): New field `compiled_cond'.
12081 (do_action_at_tracepoint): Clear compiled_cond.
12082 (get_trace_state_variable_value, set_trace_state_variable_value):
12084 (condition_true_at_tracepoint): If there's a compiled condition,
12086 (current_insn_ptr, emit_error): New globals.
12087 (struct bytecode_address): New.
12088 (get_raw_reg_func_addr): New.
12089 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12090 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12091 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12092 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12093 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12094 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12095 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12096 (compile_tracepoint_condition, compile_bytecodes): New.
12097 * target.h (emit_ops): Forward declare.
12098 (struct target_ops): New field emit_ops.
12099 (target_emit_ops): New.
12100 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12101 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12102 * linux-low.c (linux_emit_ops): New.
12103 (linux_target_ops): Install it.
12104 * linux-low.h (struct linux_target_ops): New field emit_ops.
12106 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12108 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12109 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12111 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12112 Stan Shebs <stan@codesourcery.com>
12114 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12115 (all): Depend on $(extra_libraries).
12116 (install-only): Install the IPA.
12117 (IPA_OBJS, IPA_LIB): New.
12118 (clean): Remove the IPA lib.
12119 (IPAGENT_CFLAGS): New.
12120 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12121 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12122 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12123 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12124 * configure.ac: Check for atomic builtins support in the compiler.
12125 (IPA_DEPFILES, extra_libraries): Define.
12126 * configure.srv (ipa_obj): Add description.
12127 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12128 (i[34567]86-*-linux*): Set ipa_obj.
12129 (x86_64-*-linux*): Set ipa_obj.
12130 * linux-low.c (stabilizing_threads): New.
12131 (supports_fast_tracepoints): New.
12132 (linux_detach): Stabilize threads before detaching.
12133 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12134 the lwp is either not stabilizing, or is moving out of a jump pad.
12135 (linux_fast_tracepoint_collecting): New.
12136 (maybe_move_out_of_jump_pad): New.
12137 (enqueue_one_deferred_signal): New.
12138 (dequeue_one_deferred_signal): New.
12139 (linux_wait_for_event_1): If moving out of a jump pad, defer
12140 pending signals to later.
12141 (linux_stabilize_threads): New.
12142 (linux_wait_1): Check if threads need moving out of jump pads, and
12144 (stuck_in_jump_pad_callback): New.
12145 (move_out_of_jump_pad_callback): New.
12146 (lwp_running): New.
12147 (linux_resume_one_lwp): Handle moving out of jump pads.
12148 (linux_set_resume_request): Dequeue deferred signals.
12149 (need_step_over_p): Also step over fast tracepoint jumps.
12150 (start_step_over): Also uninsert fast tracepoint jumps.
12151 (finish_step_over): Also reinsert fast tracepoint jumps.
12152 (linux_install_fast_tracepoint_jump): New.
12153 (linux_target_ops): Install linux_stabilize_threads and
12154 linux_install_fast_tracepoint_jump_pad.
12155 * linux-low.h (linux_target_ops) <get_thread_area,
12156 install_fast_tracepoint_jump_pad>: New fields.
12157 (struct lwp_info) <collecting_fast_tracepoint,
12158 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12159 (linux_get_thread_area): Declare.
12160 * linux-x86-low.c (jump_insn): New.
12161 (x86_get_thread_area): New.
12162 (append_insns): New.
12163 (push_opcode): New.
12164 (amd64_install_fast_tracepoint_jump_pad): New.
12165 (i386_install_fast_tracepoint_jump_pad): New.
12166 (x86_install_fast_tracepoint_jump_pad): New.
12167 (the_low_target): Install x86_get_thread_area and
12168 x86_install_fast_tracepoint_jump_pad.
12169 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12170 (struct fast_tracepoint_jump): New.
12171 (fast_tracepoint_jump_insn): New.
12172 (fast_tracepoint_jump_shadow): New.
12173 (find_fast_tracepoint_jump_at): New.
12174 (fast_tracepoint_jump_here): New.
12175 (delete_fast_tracepoint_jump): New.
12176 (set_fast_tracepoint_jump): New.
12177 (uninsert_fast_tracepoint_jumps_at): New.
12178 (reinsert_fast_tracepoint_jumps_at): New.
12179 (set_breakpoint_at): Use write_inferior_memory.
12180 (uninsert_raw_breakpoint): Use write_inferior_memory.
12181 (check_mem_read): Mask out fast tracepoint jumps.
12182 (check_mem_write): Mask out fast tracepoint jumps.
12183 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12184 (set_fast_tracepoint_jump): Declare.
12185 (delete_fast_tracepoint_jump)
12186 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12187 (reinsert_fast_tracepoint_jumps_at): Declare.
12188 * regcache.c: Don't compile many functions when building the
12189 in-process agent library.
12190 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12191 the register buffer in the heap.
12192 (free_register_cache): If the register buffer isn't owned by the
12193 regcache, don't free it.
12194 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12195 pre-existing register caches.
12196 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12198 (convert_ascii_to_int): : Constify `from' parameter type.
12199 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12200 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12201 the needed buffer in-place.
12202 (relocate_instruction): New.
12203 * server.c (handle_query) <qSymbols>: If the target supports
12204 tracepoints, give it a chance of looking up symbols. Report
12205 support for fast tracepoints.
12206 (handle_status): Stabilize threads.
12207 (process_serial_event): Adjust.
12208 * server.h (struct fast_tracepoint_jump): Forward declare.
12209 (struct process_info) <fast_tracepoint_jumps>: New field.
12210 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12211 (decode_X_packet, decode_M_packet): Adjust.
12212 (relocate_instruction): Declare.
12213 (in_process_agent_loaded): Declare.
12214 (tracepoint_look_up_symbols): Declare.
12215 (struct fast_tpoint_collect_status): Declare.
12216 (fast_tracepoint_collecting): Declare.
12217 (force_unlock_trace_buffer): Declare.
12218 (handle_tracepoint_bkpts): Declare.
12219 (initialize_low_tracepoint)
12220 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12221 * target.h (struct target_ops) <stabilize_threads,
12222 install_fast_tracepoint_jump_pad>: New fields.
12223 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12224 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12225 [HAVE_STDINT_H]: Include stdint.h.
12226 (trace_debug_1): Rename to ...
12227 (trace_vdebug): ... this.
12228 (trace_debug): Rename to ...
12229 (trace_debug_1): ... this. Add `level' parameter.
12230 (trace_debug): New.
12231 (ATTR_USED, ATTR_NOINLINE): New.
12232 (IP_AGENT_EXPORT): New.
12233 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12234 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12235 (about_to_request_buffer_space, trace_buffer_is_full)
12236 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12237 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12238 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12239 (traceframe_write_count, traceframes_created)
12240 (trace_state_variables)
12241 New renaming defines.
12242 (struct ipa_sym_addresses): New.
12243 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12244 (symbol_list): New.
12245 (ipa_sym_addrs): New.
12246 (all_tracepoint_symbols_looked_up): New.
12247 (in_process_agent_loaded): New.
12248 (write_e_ipa_not_loaded): New.
12249 (maybe_write_ipa_not_loaded): New.
12250 (tracepoint_look_up_symbols): New.
12251 (debug_threads) [IN_PROCESS_AGENT]: New.
12252 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12253 (UNKNOWN_SIDE_EFFECTS): New.
12254 (stop_tracing): New.
12255 (flush_trace_buffer): New.
12256 (stop_tracing_bkpt): New.
12257 (flush_trace_buffer_bkpt): New.
12258 (read_inferior_integer): New.
12259 (read_inferior_uinteger): New.
12260 (read_inferior_data_pointer): New.
12261 (write_inferior_data_pointer): New.
12262 (write_inferior_integer): New.
12263 (write_inferior_uinteger): New.
12264 (struct collect_static_trace_data_action): Delete.
12265 (enum tracepoint_type): New.
12266 (struct tracepoint) <type>: New field `type'.
12267 <actions_str, step_actions, step_actions_str>: Only include in
12269 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12270 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12271 (tracepoints): Use IP_AGENT_EXPORT.
12272 (last_tracepoint): Don't include in the IPA.
12273 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12274 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12275 (alloced_trace_state_variables): New.
12276 (trace_state_variables): Use IP_AGENT_EXPORT.
12277 (traceframe_t): Delete unused variable.
12278 (circular_trace_buffer): Don't include in the IPA.
12279 (trace_buffer_start): Delete.
12280 (struct trace_buffer_control): New.
12281 (trace_buffer_free): Delete.
12282 (struct ipa_trace_buffer_control): New.
12283 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12284 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12286 (trace_buffer_ctrl): New.
12287 (TRACE_BUFFER_CTRL_CURR): New.
12288 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12289 Reimplement as macros.
12290 (trace_buffer_wrap): Delete.
12291 (traceframe_write_count, traceframe_read_count)
12292 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12293 (struct tracepoint_hit_ctx) <type>: New field.
12294 (struct fast_tracepoint_ctx): New.
12295 (memory_barrier): New.
12297 (record_tracepoint_error): Update atomically in the IPA.
12298 (clear_inferior_trace_buffer): New.
12299 (about_to_request_buffer_space): New.
12300 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12301 updating the same buffer.
12302 (add_tracepoint): Default the tracepoint's type to trap
12303 tracepoint, and orig_size to -1.
12304 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12305 internal variables.
12306 (create_trace_state_variable): New parameter `gdb'. Handle it.
12307 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12308 (cmd_qtdp): Handle fast tracepoints.
12309 (cmd_qtdv): Adjust.
12310 (max_jump_pad_size): New.
12311 (gdb_jump_pad_head): New.
12312 (get_jump_space_head): New.
12313 (claim_jump_space): New.
12314 (sort_tracepoints): New.
12315 (MAX_JUMP_SIZE): New.
12316 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12318 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12319 support. Upload fast traceframes, and delete internal IPA
12321 (stop_tracing_handler): New.
12322 (flush_trace_buffer_handler): New.
12323 (cmd_qtstop): Upload fast tracepoints.
12324 (response_tracepoint): Handle fast tracepoints.
12325 (tracepoint_finished_step): Upload fast traceframes. Set the
12326 tracepoint hit context's tracepoint type.
12327 (handle_tracepoint_bkpts): New.
12328 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12329 type. Add comment about fast tracepoints.
12330 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12331 non-existing action_str field.
12332 (get_context_regcache): Handle fast tracepoints.
12333 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12335 (fast_tracepoint_from_jump_pad_address): New.
12336 (fast_tracepoint_from_ipa_tpoint_address): New.
12337 (collecting_t): New.
12338 (force_unlock_trace_buffer): New.
12339 (fast_tracepoint_collecting): New.
12341 (gdb_collect): New.
12342 (write_inferior_data_ptr): New.
12343 (target_tp_heap): New.
12344 (target_malloc): New.
12345 (download_agent_expr): New.
12347 (download_tracepoints): New.
12348 (download_trace_state_variables): New.
12349 (upload_fast_traceframes): New.
12350 (IPA_FIRST_TRACEFRAME): New.
12351 (IPA_NEXT_TRACEFRAME_1): New.
12352 (IPA_NEXT_TRACEFRAME): New.
12353 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12354 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12355 (gdb_jump_pad_buffer_end): New.
12356 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12357 (initialize_tracepoint): Adjust.
12358 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12359 buffer. Initialize the low module.
12360 * utils.c (PREFIX, TOOLNAME): New.
12361 (malloc_failure): Use PREFIX.
12362 (error): In the IPA, an error causes an exit.
12363 (fatal, warning): Use PREFIX.
12364 (internal_error): Use TOOLNAME.
12365 (NUMCELLS): Increase to 10.
12366 * configure, config.in: Regenerate.
12368 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12370 * server.c (handle_query) <qSupported>: Do two passes over the
12371 qSupported string to avoid nesting strtok.
12373 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12375 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12377 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12378 -Wl,--dynamic-list.
12379 * configure: Regenerate.
12380 * proc-service.list: New.
12382 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12384 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12387 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12389 * gdbreplay.c (remote_open): Check error return from socket() call by
12390 its equality to -1 not by it being negative.
12391 * remote-utils.c (remote_open): Likewise.
12393 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12395 * config.h: Regenerate.
12397 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12399 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12400 doesn't provide PTRACE_GET_THREAD_AREA.
12402 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12404 * linux-m68k-low.c: Include <asm/ptrace.h>
12405 (ps_get_thread_area): Implement.
12407 2010-05-03 Doug Evans <dje@google.com>
12409 * event-loop.c (struct callback_event): New struct.
12410 (callback_list): New global.
12411 (append_callback_event, delete_callback_event): New functions.
12412 (process_callback): New function.
12413 (start_event_loop): Call it.
12414 * remote-utils.c (NOT_SCHEDULED): Define.
12415 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12416 moved out of readchar.
12417 (readchar): Rewrite. Call reschedule before returning.
12418 (reset_readchar): New function.
12419 (remote_close): Call it.
12420 (process_remaining, reschedule): New functions.
12421 * server.h (callback_handler_func): New typedef.
12422 (append_callback_event, delete_callback_event): Declare.
12424 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12426 * proc-service.c (ps_pglobal_lookup): Use
12427 thread_db_look_up_one_symbol.
12428 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12429 parameter. Use it instead of all_symbols_looked_up.
12430 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12432 (all_symbols_looked_up): Don't declare.
12433 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12434 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12436 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12437 Set all_symbols_looked_up here.
12438 (thread_db_look_up_one_symbol): New.
12439 (thread_db_get_tls_address): Adjust.
12440 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12441 thread_db object on the heap, and tentatively set it in the
12443 (thread_db_init): Don't set all_symbols_looked_up here.
12444 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12446 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12448 * linux-low.c (linux_kill, linux_detach): Adjust.
12449 (status_pending_p_callback): Remove redundant statement. Check
12450 for !TARGET_WAITIKIND_IGNORE, instead of
12451 TARGET_WAITKIND_STOPPED.
12452 (handle_tracepoints): Make sure LWP is locked. Adjust.
12453 (linux_wait_for_event_1): Adjust.
12454 (linux_cancel_breakpoints): New.
12455 (unsuspend_one_lwp): New.
12456 (unsuspend_all_lwps): New.
12457 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12458 (send_sigstop_callback): Change return type to int, add new
12459 `except' parameter and handle it.
12460 (suspend_and_send_sigstop_callback): New.
12461 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12462 pass them down. If SUSPEND, also increment the lwp's suspend
12464 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12465 (need_step_over_p): Don't consider suspended LWPs.
12466 (start_step_over): Adjust.
12467 (proceed_one_lwp): Change return type to int, add new `except'
12468 parameter and handle it.
12469 (unsuspend_and_proceed_one_lwp): New.
12470 (proceed_all_lwps): Use find_inferior instead of
12472 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12473 also decrement the suspend count of LWPs. Pass `except' down,
12474 instead of hacking its suspend count.
12475 (linux_pause_all): Add `freeze' parameter. Adjust.
12476 (linux_unpause_all): New.
12477 (linux_target_ops): Install linux_unpause_all.
12478 * server.c (handle_status): Adjust.
12479 * target.h (struct target_ops): New fields `unpause_all' and
12480 `cancel_breakpoints'. Add new parameter to `pause_all'.
12481 (pause_all): Add new `freeze' parameter.
12482 (unpause_all): New.
12483 (cancel_breakpoints): New.
12484 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12485 cancel breakpoints.
12486 (cmd_qtstart): Pause threads.
12487 (stop_tracing): Pause threads, and cancel breakpoints.
12488 * win32-low.c (win32_target_ops): Adjust.
12490 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12492 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12493 the inferior right away from here...
12494 (linux_wait_1): ... to here, and adjust to check the thread's
12495 last_resume_kind instead of the lwp's step or stop_expected flags.
12497 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12499 * README: Use consistent `GDB' and `GDBserver' spellings.
12501 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12503 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12504 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12505 (linux_detach_one_lwp): Assume the lwp is stopped.
12506 (any_thread_of): Delete.
12507 (linux_detach): Stop all lwps here. Don't blindly delete all
12509 (delete_lwp_callback): New.
12510 (linux_mourn): Delete all lwps of the process that is gone.
12511 (linux_wait_1): Don't delete the last lwp of the process here.
12512 * mem-break.h (mark_breakpoints_out): Declare.
12513 * mem-break.c (mark_breakpoints_out): New.
12514 (free_all_breakpoints): Use it.
12515 * server.c (handle_target_event): If the process is gone, mark
12517 * thread-db.c (struct thread_db) <create_bp>: New field.
12518 (thread_db_enable_reporting): Fix prototype. Store a thread event
12519 breakpoint reference in the thread_db struct.
12520 (thread_db_load_search): Clear the thread_db object.
12521 (try_thread_db_load_1): Ditto.
12522 (switch_to_process): New.
12523 (disable_thread_event_reporting): Use it.
12524 (remove_thread_event_breakpoints): New.
12525 (thread_db_detach, thread_db_mourn): Use it.
12527 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12529 * linux-low.c (linux_enable_event_reporting): New.
12530 (linux_wait_for_event_1, handle_extended_wait): Use it.
12532 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12534 * linux-low.c (linux_kill_one_lwp, linux_kill)
12535 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12536 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12537 SIGSTOP even if the LWP is stopped.
12538 (send_sigstop_callback): New.
12539 (stop_all_lwps): Use send_sigstop_callback instead.
12540 (linux_resume_one_thread): Adjust.
12541 (proceed_one_lwp): Still proceed an LWP that the client has
12542 requested to stop, if we haven't reported it as stopped yet. Make
12543 sure that LWPs the client want stopped, have a pending SIGSTOP.
12545 2010-04-26 Doug Evans <dje@google.com>
12547 * server.c (handle_general_set): Make static.
12549 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12550 Print received char after testing for error/eof instead of before.
12551 (input_interrupt): Tweak comment.
12553 2010-04-23 Doug Evans <dje@google.com>
12555 * server.c (start_inferior): Print inferior argv if --debug.
12557 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12559 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12560 * nto-x86-low.c: Include server.h
12562 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12564 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12565 be consistent with other sources of this directory.
12566 (init_registers_amd64): Correct name of source file of this function
12569 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12571 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12572 64-bit executables.
12574 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12576 * win32-i386-low.c: Add 64-bit support.
12577 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12578 (init_registers_amd64): Declare.
12579 (mappings): Add 64-bit version of array.
12580 (init_windows_x86): New function.
12581 (the_low_target): Change init_arch field to init_windows_x86.
12583 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12585 * win32-low.c: Adapt to support also 64-bit architecture.
12586 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12587 (get_image_name): Use SIZE_T type for local variable `done'.
12588 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12589 (toolhelp_get_dll_name): Idem.
12590 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12591 Use uintptr_t typecast to avoid warning.
12592 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12593 (handle_exception): Use phex_nz to avoid warning.
12594 (win32_wait): Remove unused local variable `process'.
12596 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12598 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12601 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12603 * configure.ac: Use `ws2_32' library for srv_mingw.
12604 * configure: Regenerate.
12605 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12606 * remote-utils.c: Likewise.
12608 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12610 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12611 if __x86_64__ is defined.
12613 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12615 * configure: Regenerate.
12617 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12619 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12620 * target.h (target_ops): New get_tib_address field.
12621 * win32-low.h (win32_thread_info): Add thread_local_base field.
12622 * win32-low.c (child_add_thread): Add tlb argument.
12623 Set thread_local_base field to TLB.
12624 (get_child_debug_event): Adapt to child_add_thread change.
12625 (win32_get_tib_address): New function.
12626 (win32_target_ops): Set get_tib_address field to
12627 win32_get_tib_address.
12628 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12630 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12632 * linux-low.c (linux_mourn): Also remove the process.
12633 * server.c (handle_target_event): Don't remove the process here.
12634 * nto-low.c (nto_mourn): New.
12635 (nto_target_ops): Install it.
12636 * spu-low.c (spu_mourn): New.
12637 (spu_target_ops): Install it.
12638 * win32-low.c (win32_mourn): New.
12639 (win32_target_ops): Install it.
12641 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12643 * server.h (buffer_xml_printf): Remove redundant `;'.
12645 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12647 * regcache.c (set_register_cache): Invalidate regcaches before
12648 changing the register cache layout.
12649 (regcache_invalidate_one): Allow a NULL regcache.
12650 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12651 regcaches before changing the register cache layout or the target
12654 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12656 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12657 variable warning on Linux/x86-64.
12659 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12661 GDBserver disconnected tracing support.
12663 * linux-low.c (linux_remove_process): Delete.
12664 (add_lwp): Don't set last_resume_kind here.
12665 (linux_kill): Use `mourn'.
12666 (linux_detach): Use `thread_db_detach', and `mourn'.
12667 (linux_mourn): New.
12668 (linux_attach_lwp_1): Adjust comment.
12669 (linux_attach): last_resume_kind moved the thread_info; adjust.
12670 (status_pending_p_callback): Adjust.
12671 (linux_wait_for_event_1): Adjust.
12672 (count_events_callback, select_singlestep_lwp_callback)
12673 (select_event_lwp_callback, cancel_breakpoints_callback)
12674 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12675 (proceed_one_lwp): Adjust.
12676 (linux_async): Add debug output.
12677 (linux_thread_stopped): New.
12678 (linux_pause_all): New.
12679 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12681 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12682 (thread_db_free): Delete declaration.
12683 (thread_db_detach, thread_db_mourn): Declare.
12684 * thread-db.c (thread_db_init): Use thread_db_mourn.
12685 (thread_db_free): Delete, split in two.
12686 (disable_thread_event_reporting): New.
12687 (thread_db_detach): New.
12688 (thread_db_mourn): New.
12690 * server.h (struct thread_info) <last_resume_kind>: New field.
12691 <attached>: Add comment.
12692 <gdb_detached>: New field.
12693 (handler_func): Change return type to int.
12694 (handle_serial_event, handle_target_event): Ditto.
12695 (gdb_connected): Declare.
12697 (disconnected_tracing): Declare.
12698 (stop_tracing): Declare.
12700 * server.c (handle_query) <qSupported>: Report support for
12701 disconnected tracing.
12702 (queue_stop_reply_callback): Account for running threads.
12703 (gdb_wants_thread_stopped): New.
12704 (gdb_wants_all_threads_stopped): New.
12705 (gdb_reattached_process): New.
12706 (handle_status): Clear the `gdb_detached' flag of all processes.
12707 In all-stop, stop all threads.
12708 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12709 (process_serial_event): If the remote connection breaks, or if an
12710 exit was forced with "monitor exit", force an event loop exit.
12711 Handle disconnected tracing on detach.
12712 (handle_serial_event): Adjust.
12713 (handle_target_event): If GDB isn't connected, forward events back
12714 to the inferior, unless the last process exited, in which case,
12715 exit gdbserver. Adjust interface.
12717 * remote-utils.c (remote_open): Don't block in accept. Instead
12718 register an event loop source on the listen socket file
12719 descriptor. Refactor bits into ...
12720 (listen_desc): ... this new global.
12721 (gdb_connected): ... this new function.
12722 (enable_async_notification): ... this new function.
12723 (handle_accept_event): ... this new function.
12724 (remote_close): Clear remote_desc.
12726 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12728 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12730 (mourn_inferior): Define.
12731 (target_process_qsupported): Avoid the dangling else problem.
12732 (thread_stopped): Define.
12733 (pause_all): Define.
12734 (target_waitstatus_to_string): Declare.
12735 * target.c (target_waitstatus_to_string): New.
12737 * tracepoint.c (tracing): Make extern.
12738 (disconnected_tracing): New.
12739 (stop_tracing): Make extern. Handle tracing stops due to GDB
12741 (cmd_qtdisconnected): New.
12742 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12743 (handle_tracepoint_general_set): Handle QTDisconnected.
12745 * event-loop.c (event_handler_func): Change return type to int.
12746 (process_event): Bail out if the event handler wants the event
12748 (handle_file_event): Ditto.
12749 (start_event_loop): Bail out if the event handler wants the event
12752 * nto-low.c (nto_target_ops): Adjust.
12753 * spu-low.c (spu_wait): Don't remove the process here.
12754 (spu_target_ops): Adjust.
12755 * win32-low.c (win32_wait): Don't remove the process here.
12756 (win32_target_ops): Adjust.
12758 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12760 * regcache.c (realloc_register_cache): Invalidate inferior's
12761 regcache before recreating it.
12763 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12765 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12767 2010-04-09 Stan Shebs <stan@codesourcery.com>
12768 Pedro Alves <pedro@codesourcery.com>
12770 * server.h (LONGEST): New.
12771 (struct thread_info) <while_stepping>: New field.
12772 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12774 (initialize_tracepoint, handle_tracepoint_general_set)
12775 (handle_tracepoint_query, tracepoint_finished_step)
12776 (tracepoint_was_hit, release_while_stepping_state_list):
12777 (current_traceframe): Declare.
12778 * server.c (handle_general_set): Handle tracepoint packets.
12779 (read_memory): New.
12780 (write_memory): New.
12781 (handle_search_memory_1): Use read_memory.
12782 (handle_query): Report support for conditional tracepoints, trace
12783 state variables, and tracepoint sources. Handle tracepoint
12785 (main): Initialize the tracepoints module.
12786 (process_serial_event): Handle traceframe reads/writes.
12788 * linux-low.c (handle_tracepoints): New.
12789 (linux_wait_1): Call it.
12790 (linux_resume_one_lwp): Handle while-stepping.
12791 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12792 (linux_target_ops): Install them.
12793 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12795 * linux-x86-low.c (x86_supports_tracepoints): New.
12796 (the_low_target). Install it.
12798 * mem-break.h (delete_breakpoint): Declare.
12799 * mem-break.c (delete_breakpoint): Make external.
12801 * target.h (struct target_ops): Add `supports_tracepoints',
12802 `read_pc', and `write_pc' fields.
12803 (target_supports_tracepoints): Define.
12804 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12807 * regcache.h (struct regcache) <registers_owned>: New field.
12808 (init_register_cache, regcache_cpy): Declare.
12809 (regcache_read_pc, regcache_write_pc): Declare.
12810 (register_cache_size): Declare.
12811 (supply_regblock): Declare.
12812 * regcache.c (init_register_cache): New.
12813 (new_register_cache): Use it.
12814 (regcache_cpy): New.
12815 (register_cache_size): New.
12816 (supply_regblock): New.
12817 (regcache_read_pc, regcache_write_pc): New.
12819 * tracepoint.c: New.
12821 * Makefile.in (OBS): Add tracepoint.o.
12822 (tracepoint.o): New rule.
12824 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12826 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12828 (i386-mmx.c): Likewise.
12829 (i386-mmx-linux.o): Likewise.
12830 (i386-mmx-linux.c): Likewise.
12832 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12833 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12834 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12835 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12837 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12838 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12839 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12841 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12843 * Makefile.in (clean): Updated.
12845 (i386-avx.c): Likewise.
12846 (i386-avx-linux.o): Likewise.
12847 (i386-avx-linux.c): Likewise.
12848 (amd64-avx.o): Likewise.
12849 (amd64-avx.c): Likewise.
12850 (amd64-avx-linux.o): Likewise.
12851 (amd64-avx-linux.c): Likewise.
12853 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12854 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12855 (srv_amd64_regobj): Add amd64-avx.o.
12856 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12857 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12858 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12859 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12860 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12861 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12862 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12864 * i387-fp.c: Include "i386-xstate.h".
12866 (i387_cache_to_xsave): Likewise.
12867 (i387_xsave_to_cache): Likewise.
12868 (x86_xcr0): Likewise.
12870 * i387-fp.h (i387_cache_to_xsave): Likewise.
12871 (i387_xsave_to_cache): Likewise.
12872 (x86_xcr0): Likewise.
12874 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12875 * linux-crisv32-low.c (target_regsets): Likewise.
12876 * linux-m68k-low.c (target_regsets): Likewise.
12877 * linux-mips-low.c (target_regsets): Likewise.
12878 * linux-ppc-low.c (target_regsets): Likewise.
12879 * linux-s390-low.c (target_regsets): Likewise.
12880 * linux-sh-low.c (target_regsets): Likewise.
12881 * linux-sparc-low.c (target_regsets): Likewise.
12882 * linux-xtensa-low.c (target_regsets): Likewise.
12884 * linux-low.c: Include <sys/uio.h>.
12885 (regsets_fetch_inferior_registers): Support nt_type.
12886 (regsets_store_inferior_registers): Likewise.
12887 (linux_process_qsupported): New.
12888 (linux_target_ops): Add linux_process_qsupported.
12890 * linux-low.h (regset_info): Add nt_type.
12891 (linux_target_ops): Add process_qsupported.
12893 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12895 (init_registers_i386_avx_linux): New.
12896 (init_registers_amd64_avx_linux): Likewise.
12897 (xmltarget_i386_linux_no_xml): Likewise.
12898 (xmltarget_amd64_linux_no_xml): Likewise.
12899 (PTRACE_GETREGSET): Likewise.
12900 (PTRACE_SETREGSET): Likewise.
12901 (x86_fill_xstateregset): Likewise.
12902 (x86_store_xstateregset): Likewise.
12903 (use_xml): Likewise.
12904 (x86_linux_update_xmltarget): Likewise.
12905 (x86_linux_process_qsupported): Likewise.
12906 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12907 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12908 init_registers_i386_linux here. Call
12909 x86_linux_update_xmltarget.
12910 (the_low_target): Add x86_linux_process_qsupported.
12912 * server.c (handle_query): Call target_process_qsupported.
12914 * target.h (target_ops): Add process_qsupported.
12915 (target_process_qsupported): New.
12917 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12919 * inferiors.c (add_thread): Set last_status kind to
12920 TARGET_WAITKIND_IGNORE.
12921 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12922 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12923 (linux_wait_1): Move `thread' local definition to block that uses
12924 it. Don't NULL initialize `event_child'.
12925 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12926 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12927 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12929 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12931 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12932 an extended waitstatus, or by a watchpoint.
12933 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12934 thread was stepping or has been stopped by a watchpoint.
12936 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12938 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12939 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12940 of another, then delete the previous, and validate all
12942 (validate_inserted_breakpoint): New.
12943 (delete_disabled_breakpoints): New.
12944 (validate_breakpoints): New.
12945 (check_mem_read): Validate breakpoints before trusting their
12946 shadow. Delete disabled breakpoints.
12947 (check_mem_write): Validate breakpoints before trusting they
12948 should be inserted. Delete disabled breakpoints.
12949 * mem-break.h (validate_breakpoints):
12950 * server.c (handle_query): Validate breakpoints when we see a
12953 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12955 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12956 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12957 if we could tell there's a GDB breakpoint at stop_pc.
12958 (need_step_over_p): Don't do a step over if we find a GDB
12959 breakpoint at the resume PC.
12961 * mem-break.c (struct raw_breakpoint): New.
12962 (enum bkpt_type): New type `gdb_breakpoint'.
12963 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12964 fields. New field `raw'.
12965 (find_raw_breakpoint_at): New.
12966 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12967 breakpoint instead.
12968 (set_breakpoint_at): Adjust.
12969 (delete_raw_breakpoint): New.
12970 (release_breakpoint): New.
12971 (delete_breakpoint): Rename to...
12972 (delete_breakpoint_1): ... this. Add proc parameter. Use
12973 release_breakpoint. Return ENOENT.
12974 (delete_breakpoint): Reimplement.
12975 (find_breakpoint_at): Delete.
12976 (find_gdb_breakpoint_at): New.
12977 (delete_breakpoint_at): Delete.
12978 (set_gdb_breakpoint_at): New.
12979 (delete_gdb_breakpoint_at): New.
12980 (gdb_breakpoint_here): New.
12981 (set_reinsert_breakpoint): Use release_breakpoint.
12982 (uninsert_breakpoint): Rename to ...
12983 (uninsert_raw_breakpoint): ... this.
12984 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12985 (reinsert_raw_breakpoint): Change parameter type to
12987 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12989 (check_breakpoints): Adjust. Use release_breakpoint.
12990 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12991 (breakpoint_inserted_here): Ditto.
12992 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12993 Don't trust the breakpoint's shadow if it is not inserted.
12994 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12995 (delete_all_breakpoints): Adjust.
12996 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12997 use delete_breakpoint_1.
12999 * mem-break.h (breakpoints_supported): Delete declaration.
13000 (set_gdb_breakpoint_at): Declare.
13001 (gdb_breakpoint_here): Declare.
13002 (delete_breakpoint_at): Delete.
13003 (delete_gdb_breakpoint_at): Declare.
13005 * server.h (struct raw_breakpoint): Forward declare.
13006 (struct process_info): New field `raw_breakpoints'.
13008 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13011 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13013 * linux-low.c (status_pending_p_callback): Fix comment.
13014 (linux_wait_for_event_1): Move most of the internal breakpoint
13015 handling from here...
13016 (linux_wait_1): ... to here.
13017 (count_events_callback): New.
13018 (select_singlestep_lwp_callback): New.
13019 (select_event_lwp_callback): New.
13020 (cancel_breakpoints_callback): New.
13021 (select_event_lwp): New.
13022 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13023 priority to all LWPs that have had events that should be reported
13024 to the client. Cancel breakpoints when about to reporting the
13025 event to the client, not while stopping lwps. No longer cancel
13026 finished single-steps here.
13027 (cancel_finished_single_step): Delete.
13028 (cancel_finished_single_steps): Delete.
13030 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13032 * mem-break.c (enum bkpt_type): New.
13033 (struct breakpoint): New field `type'.
13034 (set_breakpoint_at): Change return type to struct breakpoint
13035 pointer. Set type to `other_breakpoint' by default.
13036 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13037 in the breakpoint list.
13038 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13039 (reinsert_breakpoint): Rename to ...
13040 (reinsert_raw_breakpoint): ... this.
13041 (reinsert_breakpoints_at): Adjust.
13042 * mem-break.h (struct breakpoint): Declare.
13043 (set_breakpoint_at): Change return type to struct breakpoint
13046 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13048 * server.c (handle_query): Assign, not compare.
13050 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13052 Teach linux gdbserver to step-over-breakpoints.
13054 * linux-low.c (can_hardware_single_step): New.
13055 (supports_breakpoints): New.
13056 (handle_extended_wait): If stopping threads, read the stop pc of
13057 the new cloned LWP.
13059 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13060 low target doesn't support retrieving the PC.
13061 (add_lwp): Set last_resume_kind to resume_continue.
13062 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13063 (linux_attach): Don't clear stop_expected. Set the lwp's
13064 last_resume_kind to resume_stop.
13065 (linux_detach_one_lwp): Don't check for removed breakpoints.
13066 (check_removed_breakpoint): Delete.
13067 (status_pending_p): Rename to ...
13068 (status_pending_p_callback): ... this. Don't check for removed
13069 breakpoints. Don't consider threads that are stopped from GDB's
13071 (linux_wait_for_lwp): Always read the stop_pc here.
13072 (cancel_breakpoint): New.
13073 (step_over_bkpt): New global.
13074 (linux_wait_for_event_1): Implement stepping over breakpoints.
13075 (gdb_wants_lwp_stopped): New.
13076 (gdb_wants_all_stopped): New.
13077 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13078 single-step traps here. Store the thread's last reported target
13080 (send_sigstop): Don't clear stop_expected. Always set it,
13082 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13083 (cancel_finished_single_step): New.
13084 (cancel_finished_single_steps): New.
13085 (wait_for_sigstop): Don't cancel finished single-step traps here.
13086 (linux_resume_one_lwp): Don't check for removed breakpoints.
13087 Don't set `step' on non-hardware step archs.
13088 (linux_set_resume_request): Ignore resume_stop requests if already
13089 stopping or stopped. Set the lwp's last_resume_kind.
13090 (resume_status_pending_p): Don't check for removed breakpoints.
13091 (need_step_over_p): New.
13092 (start_step_over): New.
13093 (finish_step_over): New.
13094 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13095 requests. Clear the thread's last reported target waitstatus.
13096 Don't use the `suspended' flag. Don't consider pending breakpoints.
13097 (linux_resume): Start a step-over if necessary.
13098 (proceed_one_lwp): New.
13099 (proceed_all_lwps): New.
13100 (unstop_all_lwps): New.
13101 * linux-low.h (struct lwp_info): Rewrite comment for the
13102 `suspended' flag. Add the `stop_pc' field. Delete the
13103 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13104 Add `'last_resume_kind' and `need_step_over' fields.
13105 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13106 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13107 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13108 (set_raw_breakpoint_at): New.
13109 (set_breakpoint_at): Rewrite to use it.
13110 (reinsert_breakpoint_handler): Delete.
13111 (set_reinsert_breakpoint): New.
13112 (reinsert_breakpoint_by_bp): Delete.
13113 (delete_reinsert_breakpoints): New.
13114 (uninsert_breakpoint): Rewrite.
13115 (uninsert_breakpoints_at): New.
13116 (reinsert_breakpoint): Rewrite.
13117 (reinsert_breakpoints_at): New.
13118 (check_breakpoints): Rewrite.
13119 (breakpoint_here): New.
13120 (breakpoint_inserted_here): New.
13121 (check_mem_read): Adjust.
13122 * mem-break.h (breakpoints_supported, breakpoint_here)
13123 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13124 (reinsert_breakpoint_by_bp): Delete declaration.
13125 (delete_reinsert_breakpoints): Declare.
13126 (reinsert_breakpoint): Delete declaration.
13127 (reinsert_breakpoints_at): Declare.
13128 (uninsert_breakpoint): Delete declaration.
13129 (uninsert_breakpoints_at): Declare.
13130 (check_breakpoints): Adjust prototype.
13131 * server.h: Adjust include order.
13132 (struct thread_info): Declare here. Add a `last_status' field.
13134 2010-03-23 Michael Snyder <msnyder@vmware.com>
13136 * server.c (crc32): New function.
13137 (handle_query): Add handling for 'qCRC:' request.
13139 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13141 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13142 lwp had been stopped by a watchpoint.
13144 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13146 * server.h (internal_error): Declare.
13147 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13148 * utils.c (internal_error): New function.
13150 2010-03-15 Andreas Schwab <schwab@redhat.com>
13152 * configure.srv: Fix typo setting srv_regobj.
13154 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13156 * linux-low.c (fetch_register): Avoid passing a non string literal
13158 (usr_store_inferior_registers): Ditto.
13160 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13162 * linux-low.c (linux_write_memory): Bail out early if peeking
13165 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13167 * linux-low.h (struct lwp_info): New fields
13168 `stopped_by_watchpoint' and `stopped_data_address'.
13169 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13170 here, and cache them in the lwp object.
13171 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13173 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13175 (linux_stopped_by_watchpoint): Rewrite.
13176 (linux_stopped_data_address): Rewrite.
13178 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13180 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13181 switching the current inferior, not before.
13183 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13185 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13186 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13187 i386-linux.c and amd64-linux.c.
13188 (reg-i386.o): Removed.
13189 (reg-i386.c): Likewise.
13190 (reg-i386-linux.o): Likewise.
13191 (reg-i386-linux.c): Likewise.
13192 (reg-x86-64.o): Likewise.
13193 (reg-x86-64.c): Likewise.
13194 (reg-x86-64-linux.o): Likewise.
13195 (reg-x86-64-linux.c): Likewise.
13197 (i386.c): Likewise.
13198 (i386-linux.o): Likewise.
13199 (i386-linux.c): Likewise.
13200 (amd64.o): Likewise.
13201 (amd64.c): Likewise.
13202 (amd64-linux.o): Likewise.
13203 (amd64-linux.c): Likewise.
13205 * configure.srv (srv_i386_regobj): New.
13206 (srv_i386_linux_regobj): Likewise.
13207 (srv_amd64_regobj): Likewise.
13208 (srv_amd64_linux_regobj): Likewise.
13209 (srv_i386_32bit_xmlfiles): Likewise.
13210 (srv_i386_64bit_xmlfiles): Likewise.
13211 (srv_i386_xmlfiles): Likewise.
13212 (srv_amd64_xmlfiles): Likewise.
13213 (srv_i386_linux_xmlfiles): Likewise.
13214 (srv_amd64_linux_xmlfiles): Likewise.
13215 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13216 srv_xmlfiles to $srv_i386_xmlfiles.
13217 (i[34567]86-*-mingw32ce*): Likewise.
13218 (i[34567]86-*-mingw*): Likewise.
13219 (i[34567]86-*-nto*): Likewise.
13220 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13221 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13222 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13223 (x86_64-*-linux*): Likewise.
13225 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13226 (init_registers_amd64_linux): New.
13227 (x86_arch_setup): Replace init_registers_x86_64_linux with
13228 init_registers_amd64_linux.
13230 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13232 * configure.ac: Check for libdl. If it is not available link against
13233 static libthread_db.
13234 * configure: Regenerate.
13236 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13240 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13241 handing a read watchpoint.
13242 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13244 2010-02-12 Doug Evans <dje@google.com>
13246 * linux-low.c (linux_supports_tracefork_flag): Document.
13247 (linux_look_up_symbols): Add comment.
13249 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13251 * regcache.c (supply_register): Clear regcache if buf is NULL.
13253 2010-02-02 Nicolas Roche <roche@sourceware.org>
13254 Joel Brobecker <brobecker@adacore.com>
13256 * inferiors.c (find_inferior): Add function documentation.
13257 (unloaded_dll): Handle the case where the unloaded dll has not
13258 been previously registered in the dll list.
13260 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13262 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13263 (thumb2_breakpoint): New.
13264 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13266 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13268 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13269 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13272 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13274 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13276 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13278 * linux-s390-low.c (s390_collect_ptrace_register)
13279 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13281 2010-01-21 Doug Evans <dje@google.com>
13283 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13284 (PTRACE_ARG4_TYPE): New macro.
13285 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13286 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13287 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13288 (usr_store_inferior_registers): Ditto.
13289 (linux_read_memory, linux_write_memory): Ditto.
13290 (linux_test_for_tracefork): Ditto.
13292 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13293 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13295 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13297 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13300 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13302 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13303 prototype to take a regcache. Adjust.
13305 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13307 * regcache.h (struct thread_info): Forward declare.
13308 (struct regcache): New.
13309 (new_register_cache): Adjust prototype.
13310 (get_thread_regcache): Declare.
13311 (free_register_cache): Adjust prototype.
13312 (registers_to_string, registers_from_string): Ditto.
13313 (supply_register, supply_register_by_name, collect_register)
13314 (collect_register_as_string, collect_register_by_name): Ditto.
13315 * regcache.c (struct inferior_regcache_data): Delete.
13316 (get_regcache): Rename to ...
13317 (get_thread_regcache): ... this. Adjust. Switch inferior before
13318 fetching registers.
13319 (regcache_invalidate_one): Adjust.
13320 (regcache_invalidate): Fix prototype.
13321 (new_register_cache): Return the new register cache.
13322 (free_register_cache): Change prototype.
13323 (realloc_register_cache): Adjust.
13324 (registers_to_string): Change prototype to take a regcache. Adjust.
13325 (registers_from_string): Ditto.
13326 (register_data): Ditto.
13327 (supply_register): Ditto.
13328 (supply_register_by_name): Ditto.
13329 (collect_register): Ditto.
13330 (collect_register_as_string): Ditto.
13331 (collect_register_by_name): Ditto.
13332 * server.c (process_serial_event): Adjust.
13333 * linux-low.h (regset_fill_func, regset_store_func): Change
13335 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13337 * linux-low.c (get_stop_pc): Adjust.
13338 (check_removed_breakpoint): Adjust.
13339 (linux_wait_for_event): Adjust.
13340 (linux_resume_one_lwp): Adjust.
13341 (fetch_register): Add regcache parameter. Adjust.
13342 (usr_store_inferior_registers): Ditto.
13343 (regsets_fetch_inferior_registers): Ditto.
13344 (regsets_store_inferior_registers): Ditto.
13345 (linux_fetch_registers, linux_store_registers): Ditto.
13346 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13348 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13350 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13351 prototype to take a regcache.
13352 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13353 * remote-utils.c (convert_ascii_to_int, outreg)
13354 (prepare_resume_reply): Change prototype to take a regcache.
13356 * target.h (struct target_ops) <fetch_registers, store_registers>:
13357 Change prototype to take a regcache.
13358 (fetch_inferior_registers, store_inferior_registers): Change
13359 prototype to take a regcache. Adjust.
13360 * proc-service.c (ps_lgetregs): Adjust.
13361 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13362 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13363 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13364 take a regcache. Adjust.
13365 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13366 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13367 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13368 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13369 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13370 (cris_cannot_fetch_register):
13371 (cris_breakpoint_at): Change prototype to take a regcache.
13373 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13374 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13375 to take a regcache. Adjust.
13376 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13378 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13379 take a regcache. Adjust.
13380 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13381 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13382 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13383 * linux-mips-low.c (mips_get_pc):
13384 (mips_set_pc): Change prototype to take a regcache. Adjust.
13385 (mips_reinsert_addr): Adjust.
13386 (mips_collect_register): Change prototype to take a regcache.
13388 (mips_supply_register):
13389 (mips_collect_register_32bit, mips_supply_register_32bit)
13390 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13391 (mips_store_fpregset): Ditto.
13392 * linux-ppc-low.c (ppc_supply_ptrace_register)
13393 (ppc_supply_ptrace_register): Ditto.
13394 (parse_spufs_run): Adjust.
13395 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13396 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13397 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13398 take a regcache. Adjust.
13399 * linux-s390-low.c (s390_collect_ptrace_register)
13400 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13401 (s390_set_pc): Change prototype to take a regcache. Adjust.
13402 (s390_arch_setup): Adjust.
13403 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13404 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13405 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13406 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13407 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13409 (sparc_breakpoint_at): Adjust.
13410 * linux-xtensa-low.c (xtensa_fill_gregset):
13411 (xtensa_store_gregset):
13412 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13413 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13414 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13415 prototype to take a regcache. Adjust.
13416 * win32-arm-low.c (arm_fetch_inferior_register)
13417 (arm_store_inferior_register): Change prototype to take a
13419 * win32-i386-low.c (i386_fetch_inferior_register)
13420 (i386_store_inferior_register): Change prototype to take a
13422 * win32-low.c (child_fetch_inferior_registers)
13423 (child_store_inferior_registers): Change prototype to take a
13425 (win32_wait): Adjust.
13426 (win32_fetch_inferior_registers): Change prototype to take a
13428 (win32_store_inferior_registers): Adjust.
13429 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13430 store_inferior_register>: Change prototype to take a regcache.
13432 2010-01-20 Doug Evans <dje@google.com>
13434 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13436 (linux_wait_for_event1, linux_init_signals): Ditto.
13437 (W_STOPCODE): Provide definition if missing.
13439 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13441 * linux-low.c (linux_core_of_thread): New.
13442 (compare_ints, show_process, list_threads): New.
13443 (linux_qxfer_osdata): Report threads and cores.
13444 (linux_target_op): Register linux_core_of_thread.
13445 * remote-utils.c (prepare_resume_reply): Report the core.
13446 (buffer_xml_printf): Support %d specifier.
13447 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13449 (handle_query): Handle qXfer:threads. Announce availability
13451 * target.h (struct target_ops): New field core_of_thread.
13453 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13455 * Makefile.in (clean): Remove new generated files.
13456 (reg-s390.o, reg-s390.c): Remove rules.
13457 (reg-s390x.o, reg-s390x.c): Likewise.
13458 (s390-linux32.o, s390-linux32.c): Add rules.
13459 (s390-linux64.o, s390-linux64.c): Likewise.
13460 (s390x-linux64.o, s390x-linux64.c): Likewise.
13461 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13462 * linux-s390-low.c: Include <elf.h>.
13463 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13464 (init_registers_s390): Remove prototype.
13465 (init_registers_s390x): Likewise.
13466 (init_registers_s390_linux32): Add prototype.
13467 (init_registers_s390_linux64): Likewise.
13468 (init_registers_s390x_linux64): Likewise.
13469 (s390_num_regs_3264): New define.
13470 (s390_regmap_3264): New global variable.
13471 (s390_cannot_fetch_register): Remove obsolete check.
13472 (s390_cannot_store_register): Likewise.
13473 (s390_collect_ptrace_register): Handle upper/lower register halves.
13474 (s390_supply_ptrace_register): Likewise.
13475 (s390_fill_gregset): Update to register number changes.
13476 (s390_get_hwcap): New routine.
13477 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13478 Install appropriate regmap and register set.
13480 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13482 * server.c (gdbserver_version): Update copyright year to 2010.
13483 * gdbreplay.c (gdbreplay_version): Likewise.
13485 2009-12-28 Doug Evans <dje@google.com>
13487 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13488 elf/external.h. Include <elf.h> instead but only if necessary.
13490 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13492 * linux-low.c (linux_remove_process): Remove `detaching'
13493 parameter. Don't release/detach from thread_db here.
13494 (linux_kill): Release/detach from thread_db here, ...
13495 (linux_detach): ... and here, before actually detaching.
13496 (linux_wait_1): ... and here, when a process exits.
13497 * thread-db.c (any_thread_of): New.
13498 (thread_db_free): Switch the current inferior to a thread of the
13501 2009-12-21 Doug Evans <dje@google.com>
13503 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13505 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13506 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13507 warning ifndef __NR_tkill. Move setting of errno there too.
13508 Delete unnecessary resetting of errno after syscall.
13509 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13511 * configure.ac: Check for dladdr.
13512 * config.in: Regenerate.
13513 * configure: Regenerate.
13514 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13515 (try_thread_db_load): Update.
13517 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13519 2009-12-18 Doug Evans <dje@google.com>
13521 * event-loop.c: Include unistd.h if it exists.
13523 * linux-low.c (my_waitpid): Move definition away from being in
13524 between linux_tracefork_child/linux_test_for_tracefork.
13526 * gdb_proc_service.h (psaddr_t): Fix type.
13527 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13528 signature to match glibc.
13530 2009-12-16 Doug Evans <dje@google.com>
13532 * linux-low.c (linux_read_memory): Fix argument to read.
13534 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13536 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13537 events, don't leave current_inferior pointing at null.
13539 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13541 * win32-low.c (LOG): Delete.
13542 (OUTMSG): Output to stderr.
13543 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13544 on compile time LOG macro.
13545 (win32_wait): Fix debug output.
13547 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13549 * win32-low.c (win32_add_one_solib): If the dll name is
13550 "ntdll.dll", prepend the system directory to the dll path.
13552 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13554 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13556 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13557 Vladimir Prus <vladimir@codesourcery.com>
13559 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13560 * configure.ac: Check for __mcoldfire__ and set
13561 gdb_cv_m68k_is_coldfire.
13562 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13563 reg-cf.o and reg-m68k.o.
13564 * configure: Regenerated.
13566 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13568 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13569 Pass it to thread_db_free.
13570 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13571 proper `detaching' argument to linux_remove_process.
13572 * linux-low.h (thread_db_free): Add `detaching' parameter.
13573 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13575 (thread_db_free): Add `detaching' parameter. Only
13576 call td_ta_clear_event if detaching from process.
13578 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13580 * thread-db.c (thread_db_free): Fix typo.
13582 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13585 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13587 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13589 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13590 with an i686 compiler.
13591 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13593 * configure: Rebuilt.
13595 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13599 * server.c (handle_search_memory_1): Correct read_addr initialization
13600 in loop for searching subsequent chunks.
13602 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13604 * configure.ac: New --with-libthread-db option.
13605 * thread-db.c: Allow direct dependence on libthread_db.
13606 (thread_db_free): Adjust.
13607 * config.in: Regenerate.
13608 * configure: Likewise.
13610 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13613 * thread-db.c (attach_thread): New function.
13614 (maybe_attach_thread): Return success/failure.
13615 (find_new_threads_callback): Adjust.
13616 (thread_db_find_new_threads): Loop until no new threads.
13618 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13620 * proc-service.c (ps_lgetregs): Formatting.
13622 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13624 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13625 * configure.ac: Adjust.
13626 * linux-low.h (struct process_info_private): Move members to struct
13628 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13629 * linux-low.c (linux_remove_process): Adjust.
13630 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13631 * server.c (handle_query): Move code ...
13632 (handle_monitor_command): ... here. New function.
13633 * target.h (struct target_ops): New member.
13634 * thread-db.c (struct thread_db): New.
13635 (libthread_db_search_path): New variable.
13636 (thread_db_create_event, thread_db_enable_reporting)
13637 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13638 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13639 (try_thread_db_load_1, dladdr_to_soname): New functions.
13640 (try_thread_db_load, thread_db_load_search): New functions.
13641 (thread_db_init): Search for libthread_db.
13642 (thread_db_free): New function.
13643 (thread_db_handle_monitor_command): Likewise.
13644 * config.in: Regenerate.
13645 * configure: Regenerate.
13647 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13649 * spu-low.c (spu_kill): Wait for inferior to terminate.
13650 Call clear_inferiors.
13651 (spu_detach): Call clear_inferiors.
13653 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13655 * aclocal.m4: Regenerate.
13656 * config.in: Likewise.
13657 * configure: Likewise.
13659 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13661 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13662 (parse_spufs_run): New function.
13663 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13664 (ppc_breakpoint_at): Handle SPU breakpoints.
13666 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13668 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13669 (SPUFS_MAGIC): Define.
13670 (spu_enumerate_spu_ids): New function.
13671 (linux_qxfer_spu): New function.
13672 (linux_target_ops): Install linux_qxfer_spu.
13674 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13676 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13677 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13678 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13679 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13680 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13681 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13682 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13683 (init_registers_powerpc_cell32l): Add prototype.
13684 (init_registers_powerpc_cell64l): Likewise.
13685 (ppc_arch_setup): Detect Cell/B.E. architecture.
13687 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13689 * Makefile.in (datarootdir): New variable.
13691 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13693 * linux-low.c (linux_write_memory): Update debugging output.
13694 * Makefile.in (clean): Add new descriptions.
13695 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13696 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13697 * configure.srv: Add new files for arm*-*-linux*.
13698 * linux-arm-low.c: Add new declarations.
13699 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13700 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13701 (HWCAP_VFPv3D16): New.
13702 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13703 instead of __IWMMXT__.
13704 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13705 (arm_arch_setup): New.
13706 (target_regsets): Remove #ifdef. Add VFP regset.
13707 (the_low_target): Use arm_arch_setup.
13709 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13711 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13712 the main thread again.
13714 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13716 Adding Neutrino gdbserver.
13717 * configure: Regenerated.
13718 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13719 * configure.srv (i[34567]86-*-nto*): New target.
13720 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13721 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13722 (nto_comctrl) [__QNX__]: New function.
13723 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13725 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13727 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13730 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13731 Pedro Alves <pedro@codesourcery.com>
13733 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13734 don't support CONTEXT_EXTENDED_REGISTERS.
13735 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13736 (the_low_target): Install them.
13737 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13738 failing with ERROR_PIPE_NOT_CONNECTED.
13740 2009-06-30 Doug Evans <dje@google.com>
13741 Pierre Muller <muller@ics.u-strasbg.fr>
13743 Add h/w watchpoint support to x86-linux, win32-i386.
13744 * Makefile.in (SFILES): Add i386-low.c
13745 (i386_low_h): Define.
13746 (i386-low.o): Add dependencies.
13747 (linux-x86-low.o): Add i386-low.h dependency.
13748 (win32-i386-low.o): Ditto.
13749 * i386-low.c: New file.
13750 * i386-low.h: New file.
13751 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13752 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13753 * linux-low.c (linux_add_process): Initialize arch_private.
13754 (linux_remove_process): Free arch_private.
13755 (add_lwp): Initialize arch_private.
13756 (delete_lwp): Free arch_private.
13757 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13759 * linux-low.h (process_info_private): New member arch_private.
13760 (lwp_info): New member arch_private.
13761 (linux_target_ops): New members new_process, new_thread,
13763 (ptid_of): New macro.
13764 * linux-x86-low.c: Include stddef.h, i386-low.h.
13765 (arch_process_info): New struct.
13766 (arch_lwp_info): New struct.
13767 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13768 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13769 (i386_dr_low_get_status): New function.
13770 (x86_insert_point, x86_remove_point): New functions.
13771 (x86_stopped_by_watchpoint): New function.
13772 (x86_stopped_data_address): New function.
13773 (x86_linux_new_process, x86_linux_new_thread): New functions.
13774 (x86_linux_prepare_to_resume): New function.
13775 (the_low_target): Add entries for insert_point, remove_point,
13776 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13778 * server.c (debug_hw_points): New global.
13779 (monitor_show_help): Document set debug-hw-points.
13780 (handle_query): Process "set debug-hw-points".
13781 * server.h (debug_hw_points): Declare.
13782 (paddress): Declare.
13783 * utils.c (NUMCELLS, CELLSIZE): New macros.
13784 (get_sell, xsnprintf, paddress): New functions.
13785 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13786 remove_point, stopped_by_watchpoint, stopped_data_address.
13787 * win32-i386-low.c: Include i386-low.h.
13788 (debug_reg_state): Replaces dr.
13789 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13790 (i386_dr_low_get_status): New function.
13791 (i386_insert_point, i386_remove_point): New functions.
13792 (i386_stopped_by_watchpoint): New function.
13793 (i386_stopped_data_address): New function.
13794 (i386_initial_stuff): Update.
13795 (get_thread_context,set_thread_context,i386_thread_added): Update.
13796 (the_low_target): Add entries for insert_point,
13797 remove_point, stopped_by_watchpoint, stopped_data_address.
13798 * win32-low.c (win32_insert_watchpoint): New function.
13799 (win32_remove_watchpoint): New function.
13800 (win32_stopped_by_watchpoint): New function.
13801 (win32_stopped_data_address): New function.
13802 (win32_target_ops): Add entries for insert_watchpoint,
13803 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13804 * win32-low.h (win32_target_ops): New members insert_point,
13805 remove_point, stopped_by_watchpoint, stopped_data_address.
13807 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13809 * server.c (process_serial_event): Re-return unsupported, not
13810 error, if the type isn't recognized. Re-allow supporting only
13811 insert or remove packets. Also call require_running for
13812 breakpoints. Add missing break statement to default case. Tidy.
13813 * target.h (struct target_ops): Rename insert_watchpoint to
13814 insert_point, and remove_watchpoint to remove_point.
13816 * linux-low.h (struct linux_target_ops): Likewise.
13817 * linux-low.c (linux_insert_watchpoint): Rename to ...
13818 (linux_insert_point): ... this. Adjust.
13819 (linux_remove_watchpoint): Rename to ...
13820 (linux_remove_point): ... this. Adjust.
13821 (linux_target_ops): Adjust.
13822 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13823 (cris_insert_point): ... this.
13824 (cris_remove_watchpoint): Rename to ...
13825 (cris_remove_point): ... this.
13826 (the_low_target): Adjust.
13828 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13830 * server.c (handle_v_kill): Pass signal_pid to
13831 kill_inferior if multi_process is zero.
13833 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13835 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13836 * target.h (target_ops): Comment for *_watchpoint to make it clear
13837 the functions can get types '0' and '1'.
13839 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13841 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13842 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13843 * regcache.c (get_regcache): Likewise.
13844 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13845 * win32-low.c (child_fetch_inferior_registers): Remove check for
13848 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13849 Pedro Alves <pedro@codesourcery.com>
13851 * target.h (struct target_ops) <supports_multi_process>: New
13853 (target_supports_multi_process): New.
13854 * server.c (handle_query): Even if GDB reports support, only
13855 enable multi-process if the target also supports it. Report
13856 multi-process support only if the target backend supports it.
13857 * linux-low.c (linux_supports_multi_process): New function.
13858 (linux_target_ops): Install it as target_supports_multi_process
13861 2009-05-24 Doug Evans <dje@google.com>
13863 Global renaming of find_thread_pid to find_thread_ptid.
13864 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13865 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13866 All callers updated.
13868 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13869 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13872 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13873 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13874 (linux_resume_one_lwp): Ditto.
13876 2009-05-23 Doug Evans <dje@google.com>
13878 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13879 from struct inferior_list_entry * to struct lwp_info *.
13880 All callers updated.
13882 2009-05-13 Doug Evans <dje@google.com>
13884 * linux-x86-low.c: Don't include assert.h.
13885 (x86_siginfo_fixup): Use fatal, not assert.
13886 (x86_arch_setup): Fix comment.
13888 2009-05-12 Doug Evans <dje@google.com>
13890 Biarch support for i386/amd64 gdbserver.
13891 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13892 Add linux-x86-low.c.
13893 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13894 (linux-x86-low.o): Add.
13895 * linux-x86-64-low.c: Delete.
13896 * linux-i386-low.c: Delete.
13897 * linux-x86-low.c: New file.
13898 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13900 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13902 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13903 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13904 (linux_child_pid_to_exec_file): New function.
13905 (elf_64_header_p, elf_64_file_p): New functions.
13906 (siginfo_fixup): New function.
13907 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13908 give target a chance to convert layout.
13909 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13910 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13912 2009-05-07 Doug Evans <dje@google.com>
13914 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13915 (regsets_store_inferior_registers): Ditto.
13917 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13921 * linux-low.c (must_set_ptrace_flags): Delete.
13922 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13924 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13925 `lwp->must_set_ptrace_flags' instead.
13926 (linux_wait_for_event_1): Set ptrace options here.
13927 (linux_wait_1): ... not here.
13929 2009-04-30 Doug Evans <dje@google.com>
13931 * inferiors.c (started_inferior_callback): New function.
13932 (attached_inferior_callback): New function.
13933 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13934 * server.c (print_started_pid, print_attached_pid): New functions.
13935 (detach_or_kill_for_exit): New function.
13936 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13937 * server.h (have_started_inferiors_p): Declare.
13938 (have_attached_inferiors_p): Declare.
13940 * inferiors.c (remove_process): Fix memory leak, free process.
13941 * linux-low.c (linux_remove_process): New function.
13942 (linux_kill): Call it instead of remove_process.
13943 (linux_detach, linux_wait_1): Ditto.
13945 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13947 * configure.srv: Add x86 Windows CE target.
13949 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13951 * inferiors.c (get_thread_process): Make global.
13952 * server.h (get_thread_process): Add prototype.
13953 * thread-db.c (find_one_thread): Use get_thread_process
13954 instead of current_process.
13955 (thread_db_get_tls_address): Do not crash if called when
13956 thread layer is not yet initialized.
13958 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13960 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13961 * spu-low.c (current_tid): Rename to ...
13962 (current_ptid): ... this.
13963 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13964 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13965 ptid_get_lwp (current_ptid) instead of current_tid.
13966 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13967 instead of current_tid. Use find_process_pid to verify pid
13968 argument is valid. Pass proper argument to remove_process.
13969 (spu_thread_alive): Compare current_ptid instead of current_tid.
13970 (spu_resume): Likewise.
13972 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13974 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13977 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13979 Implement the multiprocess extensions, and add linux multiprocess
13982 * server.h (ULONGEST): Declare.
13983 (struct ptid, ptid_t): New.
13984 (minus_one_ptid, null_ptid): Declare.
13985 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13986 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13987 (struct inferior_list_entry): Change `id' type from unsigned from
13989 (struct sym_cache, struct breakpoint, struct
13990 process_info_private): Forward declare.
13991 (struct process_info): Declare.
13992 (current_process): Declare.
13993 (all_processes): Declare.
13994 (initialize_inferiors): Declare.
13995 (add_thread): Adjust to use ptid_t.
13996 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13997 (add_process, remove_process, find_thread_pid): Declare.
13998 (find_inferior_id): Adjust to use ptid_t.
13999 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14000 (multi_process): Declare.
14001 (push_event): Adjust to use ptid_t.
14002 (read_ptid, write_ptid): Declare.
14003 (prepare_resume_reply): Adjust to use ptid_t.
14004 (clear_symbol_cache): Declare.
14005 * inferiors.c (all_processes): New.
14006 (null_ptid, minus_one_ptid): New.
14007 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14008 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14009 (add_thread): Change unsigned long to ptid. Remove gdb_id
14011 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14012 (gdb_id_to_thread): Rename to ...
14013 (find_thread_pid): ... this. Change unsigned long to ptid.
14014 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14015 (loaded_dll, pull_pid_from_list): Adjust.
14016 (add_process, remove_process, find_process_pid)
14017 (get_thread_process, current_process, initialize_inferiors): New.
14018 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14019 (struct target_waitstatus) <related_pid>: Ditto.
14020 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14021 return type to int.
14022 (struct target_ops) <join>: Add `pid' argument.
14023 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14024 (struct target_ops) <wait>: Add `ptid' field. Change return type
14026 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14027 (mywait): Add `ptid' argument. Change return type to ptid_t.
14028 (target_pid_to_str): Declare.
14029 * target.c (set_desired_inferior): Adjust to use ptids.
14030 (mywait): Add new `ptid' argument. Adjust.
14031 (target_pid_to_str): New.
14032 * mem-break.h (free_all_breakpoints): Declare.
14033 * mem-break.c (breakpoints): Delelete.
14034 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14035 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14036 to use per-process breakpoint list.
14037 (free_all_breakpoints): New.
14038 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14039 (symbol_cache, all_symbols_looked_up): Delete.
14041 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14043 (prepare_resume_reply): Change ptid argument's type from unsigned
14044 long to ptid_t. Adjust. Implement W;process and X;process.
14045 (free_sym_cache, clear_symbol_cache): New.
14046 (look_up_one_symbol): Adjust to per-process symbol cache. *
14047 * server.c (cont_thread, general_thread, step_thread): Change type
14049 (attached): Delete.
14050 (multi_process): New.
14051 (last_ptid): Change type to ptid_t.
14052 (struct vstop_notif) <ptid>: Change type to ptid_t.
14053 (queue_stop_reply, push_event): Change `ptid' argument's type to
14055 (discard_queued_stop_replies): Add `pid' argument.
14056 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14057 changes. Don't reference the `attached' global.
14058 (attach_inferior): Adjust to mywait interface changes.
14059 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14060 features. Handle and report "multiprocess+". Handle
14062 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14064 (handle_v_kill): New.
14065 (handle_v_stopped): Adjust to use target_pid_to_str.
14066 (handle_v_requests): Allow multiple attaches and runs when
14067 multiprocess extensions are in effect. Handle "vKill".
14068 (myresume): Adjust to use ptids.
14069 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14070 (handle_status): Adjust to discard_queued_stop_replies interface
14072 (first_thread_of, kill_inferior_callback)
14073 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14074 (main): Call initialize_inferiors. Adjust to use ptids, killing
14075 and detaching from all inferiors. Handle multiprocess packet
14077 * linux-low.h: Include gdb_proc_service.h.
14078 (struct process_info_private): New.
14079 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14080 <lwpid_of>: Use ptid_get_lwp.
14081 (get_lwp_thread): Adjust.
14082 (struct lwp_info): Add `dead' member.
14083 (find_lwp_pid): Declare.
14084 * linux-low.c (thread_db_active): Delete.
14085 (new_inferior): Adjust comment.
14086 (inferior_pid): Delete.
14087 (linux_add_process): New.
14088 (handle_extended_wait): Adjust.
14089 (add_lwp): Change unsigned long to ptid.
14090 (linux_create_inferior): Add process to processes table. Adjust
14091 to use ptids. Don't set new_inferior here.
14092 (linux_attach_lwp): Rename to ...
14093 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14094 it. Adjust to use ptids.
14095 (linux_attach_lwp): New.
14096 (linux_attach): Add process to processes table. Don't set
14098 (struct counter): New.
14099 (second_thread_of_pid_p, last_thread_of_process_p): New.
14100 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14101 multiple processes.
14102 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14103 processes. Remove process from process table.
14104 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14105 to multiple processes.
14106 (any_thread_of): New.
14107 (linux_detach): Add `pid' argument, and handle it. Remove process
14108 from processes table.
14109 (linux_join): Add `pid' argument. Handle it.
14110 (linux_thread_alive): Change unsighed long argument to ptid_t.
14111 Consider dead lwps as not being alive.
14112 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14113 threads we're not interested in.
14114 (same_lwp, find_lwp_pid): New.
14115 (linux_wait_for_lwp): Change `pid' argument's type from int to
14117 (linux_wait_for_event): Rename to ...
14118 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14119 from int to ptid_t. Adjust.
14120 (linux_wait_for_event): New.
14121 (linux_wait_1): Add `ptid' argument. Change return type to
14122 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14123 that exit from the process table.
14124 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14126 (mark_lwp_dead): New.
14127 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14128 stopping all threads, mark its main lwp as dead.
14129 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14131 (fetch_register, usr_store_inferior_registers)
14132 (regsets_fetch_inferior_registers)
14133 (regsets_store_inferior_registers, linux_read_memory)
14134 (linux_write_memory): Inline `inferior_pid'.
14135 (linux_look_up_symbols): Adjust to use per-process
14136 `thread_db_active'.
14137 (linux_request_interrupt): Adjust to use ptids.
14138 (linux_read_auxv): Inline `inferior_pid'.
14139 (initialize_low): Don't reference thread_db_active.
14140 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14141 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14142 (ps_getpid): Return the pid of the current inferior.
14143 * thread-db.c (proc_handle, thread_agent): Delete.
14144 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14146 (find_one_thread): Change argument type to ptid_t. Adjust to
14148 (maybe_attach_thread): Adjust to per-process data and ptids.
14149 (thread_db_find_new_threads): Ditto.
14150 (thread_db_init): Ditto.
14151 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14152 processes table. Adjust to use ptids.
14153 (spu_kill, spu_detach): Adjust interface. Remove process from
14155 (spu_join, spu_thread_alive): Adjust interface.
14156 (spu_wait): Adjust interface. Remove process from processes
14157 table. Adjust to use ptids.
14158 * win32-low.c (current_inferior_tid): Delete.
14159 (current_inferior_ptid): New.
14160 (debug_event_ptid): New.
14161 (thread_rec): Take a ptid. Adjust.
14162 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14163 (child_delete_thread): Ditto.
14164 (do_initial_child_stuff): Add `attached' argument. Add process to
14166 (child_fetch_inferior_registers, child_store_inferior_registers):
14168 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14169 (win32_attach): Pass 1 to do_initial_child_stuff.
14170 (win32_kill): Adjust interface. Remove process from processes
14172 (win32_detach): Ditto.
14173 (win32_join): Adjust interface.
14174 (win32_thread_alive): Take a ptid.
14175 (win32_resume): Adjust to use ptids.
14176 (get_child_debug_event): Ditto.
14177 (win32_wait): Adjust interface. Remove exiting process from
14180 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14182 Non-stop mode support.
14184 * server.h (non_stop): Declare.
14185 (gdb_client_data, handler_func): Declare.
14186 (delete_file_handler, add_file_handler, start_event_loop):
14188 (handle_serial_event, handle_target_event, push_event)
14189 (putpkt_notif): Declare.
14190 * target.h (enum resume_kind): New.
14191 (struct thread_resume): Replace `step' field by `kind' field.
14192 (TARGET_WNOHANG): Define.
14193 (struct target_ops) <wait>: Add `options' argument.
14194 <supports_non_stop, async, start_non_stop>: New fields.
14195 (target_supports_non_stop, target_async): New.
14196 (start_non_stop): Declare.
14197 (mywait): Add `options' argument.
14198 * target.c (mywait): Add `options' argument. Print child exit
14199 notifications here.
14200 (start_non_stop): New.
14201 * server.c (non_stop, own_buf, mem_buf): New globals.
14202 (struct vstop_notif): New.
14203 (notif_queue): New global.
14204 (queue_stop_reply, push_event, discard_queued_stop_replies)
14205 (send_next_stop_reply): New.
14206 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14208 (attach_inferior): In non-stop mode, don't wait for the target
14210 (handle_general_set): Handle QNonStop.
14211 (handle_query): When handling qC, return the current general
14212 thread, instead of the first thread of the list.
14213 (handle_query): If the backend supports non-stop mode, include
14214 QNonStop+ in the qSupported query response.
14215 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14217 (handle_v_attach, handle_v_run): Handle non-stop mode.
14218 (handle_v_stopped): New.
14219 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14220 (myresume): Adjust to use resume_kind. Handle non-stop.
14221 (queue_stop_reply_callback): New.
14222 (handle_status): Handle non-stop mode.
14223 (main): Clear non_stop flag on reconnection. Use the event-loop.
14224 Refactor serial protocol handling from here ...
14225 (process_serial_event): ... to this new function. When GDB
14226 selects any thread, select one here. In non-stop mode, wait until
14227 GDB acks all pending events before exiting.
14228 (handle_serial_event, handle_target_event): New.
14229 * remote-utils.c (remote_open): Install remote_desc in the event
14231 (remote_close): Remove remote_desc from the event loop.
14232 (putpkt_binary): Rename to...
14233 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14234 (putpkt_binary): New as wrapper around putpkt_binary_1.
14235 (putpkt_notif): New.
14236 (prepare_resume_reply): In non-stop mode, don't change the
14238 * event-loop.c: New.
14239 * Makefile.in (OBJ): Add event-loop.o.
14240 (event-loop.o): New rule.
14242 * linux-low.h (pid_of): Moved here.
14244 (get_lwp_thread): Use lwpid_of.
14245 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14246 * linux-low.c (pid_of): Delete.
14247 (inferior_pid): Use lwpid_of.
14248 (linux_event_pipe): New.
14249 (target_is_async_p): New.
14251 (handle_extended_wait): Use lwpid_of.
14252 (add_lwp): Don't set lwpid field.
14253 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14254 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14255 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14256 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14257 first. Adjust to linux_wait_for_event interface changes. Use
14259 (linux_detach): Don't delete the main lwp here.
14260 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14261 (status_pending_p): Don't consider explicitly suspended lwps.
14262 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14263 pointer. Add OPTIONS argument. Change return type to int. Use
14264 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14265 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14266 pointer. Add status pointer argument. Return a pid instead of a
14267 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14268 changes. In non-stop mode, don't switch to a random thread.
14269 (linux_wait): Rename to...
14270 (linux_wait_1): ... this. Add target_options argument, and handle
14271 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14272 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14273 clean exit and signal exit code. Don't stop all threads in
14274 non-stop mode. In all-stop mode, only stop all threads when
14275 reporting a stop to GDB. Handle explicit thread stop requests.
14276 (async_file_flush, async_file_mark): New.
14278 (send_sigstop): Use lwpid_of.
14279 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14280 interface changes. In non-stop mode, don't switch to a random
14282 (linux_resume_one_lwp): Use lwpid_of.
14283 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14284 (linux_resume_one_thread): ... this. Handle resume_stop. In
14285 non-stop mode, don't look for pending flag in all threads.
14286 (resume_status_pending_p): Don't consider explicitly suspended
14288 (my_waitpid): Reimplement. Emulate __WALL.
14289 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14291 (sigchld_handler, linux_supports_non_stop, linux_async)
14292 (linux_start_non_stop): New.
14293 (linux_target_ops): Register linux_supports_non_stop, linux_async
14294 and linux_start_non_stop.
14295 (initialize_low): Install SIGCHLD handler.
14296 * thread-db.c (thread_db_create_event, find_one_thread)
14297 (thread_db_get_tls_address): Use lwpid_of.
14298 * win32-low.c (win32_detach): Adjust to use resume_kind.
14299 (win32_wait): Add `options' argument.
14300 * spu-low.c (spu_resume): Adjust to use resume_kind.
14301 (spu_wait): Add `options' argument.
14303 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14305 Decouple target code from remote protocol.
14307 * target.h (enum target_waitkind): New.
14308 (struct target_waitstatus): New.
14309 (struct target_ops) <wait>: Return an unsigned long. Take a
14310 target_waitstatus pointer instead of a char pointer.
14311 (mywait): Likewise.
14312 * target.c (mywait): Change prototype to return an unsigned long.
14313 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14314 * server.h (thread_from_wait, old_thread_from_wait): Delete
14316 (prepare_resume_reply): Change prototype to take a
14318 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14319 (last_status, last_ptid): New.
14320 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14321 pid instead of a signal.
14322 (attach_inferior): Remove "status" and "signal" parameters.
14324 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14326 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14327 (handle_v_requests, myresume): Remove "status" and "signal"
14328 parameters. Adjust.
14329 (handle_status): New.
14330 (main): Delete local `status'. Adjust.
14331 * remote-utils.c: Include target.h.
14332 (prepare_resume_reply): Change prototype to take a
14333 target_waitstatus. Adjust.
14335 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14337 * spu-low.c (spu_wait): Adjust.
14338 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14340 (win32_wait): Adjust.
14342 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14344 * target.h (struct thread_resume): Delete leave_stopped member.
14345 (struct target_ops): Add a `n' argument to the `resume' callback.
14346 * server.c (start_inferior): Adjust.
14347 (handle_v_cont, myresume): Adjust.
14348 * linux-low.c (check_removed_breakpoint): Adjust to resume
14349 interface change, and to removed leave_stopped field.
14350 (resume_ptr): Delete.
14351 (struct thread_resume_array): New.
14352 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14353 resume interface change.
14354 (linux_continue_one_thread, linux_queue_one_thread)
14355 (resume_status_pending_p): Check if the resume field is NULL
14356 instead of checking the leave_stopped member.
14357 (linux_resume): Adjust to the target resume interface change.
14358 * spu-low.c (spu_resume): Adjust to the target resume interface
14360 * win32-low.c (win32_detach, win32_resume): Ditto.
14362 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14364 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14366 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14368 (linux_continue_one_thread): Only preserve the stepping flag if
14369 there's a pending breakpoint.
14371 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14373 * server.c (main): After the inferior having exited, call
14374 remote_close before exiting gdbserver.
14376 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14378 Fix size of FPSCR in Power 7 processors.
14379 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14380 (PPC_FEATURE_HAS_DFP): New #define.
14381 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14384 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14386 * server.c (handle_query) Whitespace and formatting.
14388 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14390 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14391 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14392 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14393 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14394 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14395 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14396 Makefile.in, configure.ac: Fix whitespace throughout.
14397 * configure: Regenerate.
14399 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14401 * inferiors.c (find_inferior): Make it safe for the callback
14402 function to delete the currently iterated inferior.
14404 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14406 * Makefile.in (linuw_low_h): Move higher.
14407 (thread-db.o): Depend on $(linux_low_h).
14409 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14411 Rename "process" to "lwp" throughout.
14413 * linux-low.c (all_processes): Rename to...
14414 (all_lwps): ... this.
14415 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14416 (add_process): Rename to ...
14417 (add_lwp): ... this. Adjust.
14418 (linux_create_inferior): Adjust.
14419 (linux_attach_lwp): Adjust.
14420 (linux_attach): Adjust.
14421 (linux_kill_one_process): Rename to ...
14422 (linux_kill_one_lwp): ... this. Adjust.
14423 (linux_kill): Adjust.
14424 (linux_detach_one_process): Rename to ...
14425 (linux_detach_one_lwp): ... this. Adjust.
14426 (linux_detach): Adjust.
14427 (check_removed_breakpoint): Adjust.
14428 (status_pending_p): Adjust.
14429 (linux_wait_for_process): Rename to ...
14430 (linux_wait_for_lwp): ... this. Adjust.
14431 (linux_wait_for_event): Adjust.
14432 (send_sigstop): Adjust.
14433 (wait_for_sigstop): Adjust.
14434 (stop_all_processes): Rename to ...
14435 (stop_all_lwps): ... this.
14436 (linux_resume_one_process): Rename to ...
14437 (linux_resume_one_lwp): ... this. Adjust.
14438 (linux_set_resume_request, linux_continue_one_thread)
14439 (linux_queue_one_thread, resume_status_pending_p)
14440 (usr_store_inferior_registers, regsets_store_inferior_registers)
14441 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14443 * linux-low.h (get_process): Rename to ...
14444 (get_lwp): ... this. Adjust.
14445 (get_thread_process): Rename to ...
14446 (get_thread_lwp): ... this. Adjust.
14447 (get_process_thread): Rename to ...
14448 (get_lwp_thread): ... this. Adjust.
14449 (struct process_info): Rename to ...
14450 (struct lwp_info): ... this.
14451 (all_processes): Rename to ...
14452 (all_lwps): ... this.
14453 * proc-service.c (ps_lgetregs): Adjust.
14454 * thread-db.c (thread_db_create_event, find_one_thread)
14455 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14457 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14459 * server.c (handle_query): Handle "qAttached".
14461 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14463 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14464 GPLv3, update license URL.
14466 2009-03-01 Doug Evans <dje@google.com>
14468 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14469 (server_h): Add gdb_signals.h.
14470 (signals.o): Update.
14471 * server.h (target_signal_from_host,target_signal_to_host_p)
14472 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14474 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14476 * remote-utils.c (getpkt): Also generate remote-debug
14477 information if noack_mode is set.
14479 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14481 * server.c (handle_query): Report qXfer:siginfo:read and
14482 qXfer:siginfo:write as supported and handle them.
14483 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14484 * linux-low.c (linux_xfer_siginfo): New.
14485 (linux_target_ops): Set it.
14487 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14489 * server.c (gdbserver_usage): Mention --remote-debug.
14490 (main): Accept '--remote-debug' switch.
14492 2009-01-18 Doug Evans <dje@google.com>
14494 * regcache.c (new_register_cache): No need to check result of xcalloc.
14495 * server.c (handle_search_memory): Back out calls to xmalloc,
14496 result is checked and error is returned to user upon failure.
14497 (handle_query): Ditto. Add more checks for result of malloc.
14498 (handle_v_cont): Check result of malloc, report error back to
14500 (handle_v_run): Ditto. Call freeargv.
14501 * server.h (freeargv): Declare.
14502 * utils.c (freeargv): New fn.
14504 2009-01-15 Doug Evans <dje@google.com>
14506 * gdbreplay.c (perror_with_name): Make arg const char *.
14507 * server.h (target_signal_to_name): Make return type const char *.
14508 * thread-db.c (thread_db_err_str): Make return type const char *.
14509 * utils.c (perror_with_name): Make arg const char *.
14511 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14513 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14514 when handling a EXIT_PROCESS_DEBUG_EVENT.
14516 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14518 * gdbreplay.c (gdbreplay_version): Update copyright year.
14519 * server.c (gdbserver_version): Likewise.
14521 2009-01-05 Doug Evans <dje@google.com>
14523 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14524 (handle_extended_wait): Improve comment.
14526 2008-12-13 Doug Evans <dje@google.com>
14528 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14529 * server.h (ATTR_MALLOC): New macro.
14530 (xmalloc,xcalloc,xstrdup): Declare.
14531 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14532 * inferiors.c: Ditto.
14533 * linux-low.c: Ditto.
14534 * mem-break.c: Ditto.
14535 * regcache.c: Ditto.
14536 * remote-utils.c: Ditto.
14539 * win32-low.c: Ditto.
14541 2008-12-12 Doug Evans <dje@google.com>
14543 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14544 in debugging printf.
14546 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14548 2008-12-09 Doug Evans <dje@google.com>
14550 * linux-low.h (struct process_info): Delete member tid, unused.
14551 * thread-db.c (find_one_thread): Update.
14552 (maybe_attach_thread): Update.
14554 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14556 * target.h (struct target_ops): Add qxfer_osdata member.
14557 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14559 (linux_qxfer_osdata): New functions.
14560 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14562 * server.c (handle_query): Handle "qXfer:osdata:read:".
14563 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14564 (buffer_xml_printf): New functions.
14565 * server.h (struct buffer): New.
14566 (buffer_grow_str, buffer_grow_str0): New macros.
14567 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14568 (buffer_xml_printf): Declare.
14570 2008-11-24 Doug Evans <dje@google.com>
14572 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14574 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14576 * server.c (handle_v_run): Always use the supplied argument list.
14578 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14580 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14581 (xtensa_regmap_table): Add entry for scompare1.
14583 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14585 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14586 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14587 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14588 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14589 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14590 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14591 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14592 XML target descriptions.
14593 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14594 when inferior is running on an ISA 2.05 or later processor. Add
14595 special case to return offset for full 64-bit slot of FPSCR when
14598 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14600 * Makefile.in (SFILES, clean): Added sparc64 files.
14601 (reg-sparc64.o, reg-sparc64.c): New.
14602 * configure.srv (sparc*-*-linux*): New configuration.
14603 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14604 syscall arguments for SPARC.
14605 (regsets_store_inferior_registers): Likewise.
14606 * linux-sparc-low.c: New file.
14608 2008-10-21 Doug Evans <dje@google.com>
14610 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14611 (READLINE_DIR,READLINE_DEP): Delete.
14612 (INTERNAL_CFLAGS): Update.
14613 (LINTFLAGS): Update.
14615 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14617 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14618 whole argv from the last run, not just argv[0].
14620 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14622 * regcache.c (new_register_cache): Return NULL if the register
14623 cache size isn't known yet.
14624 (free_register_cache): Avoid dereferencing a NULL regcache.
14626 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14628 * configure.srv: Merge MIPS and MIPS64.
14630 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14632 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14634 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14636 * Makefile.in: Add required vsx dependencies.
14638 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14639 Declare init_registers_powerpc_vsx32l.
14640 Declare init_registers_powerpc_vsx64l.
14641 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14642 (ppc_arch_setup): Check for VSX in hwcap.
14643 (ppc_fill_vsxregset): New function.
14644 (ppc_store_vsxregset): New function.
14645 Add new VSX entry in regset_info target_regsets.
14647 * configure.srv: Add new VSX dependencies.
14649 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14651 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14652 (remote_open): Set or clear transport_is_reliable.
14653 (putpkt_binary): Don't expect acks in noack mode.
14654 (getpkt): Don't send ack/nac in noack mode.
14655 * server.c (handle_general_set): Handle QStartNoAckMode.
14656 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14658 (main): Reset noack_mode on every connection.
14659 * server.h (noack_mode): Declare.
14661 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14663 * Makefile.in (GDBREPLAY_OBS): New variable.
14664 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14666 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14667 Daniel Jacobowitz <dan@codesourcery.com>
14669 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14670 (usr_store_inferior_registers): Likewise.
14671 (regsets_store_inferior_registers): Likewise.
14673 2008-07-31 Rolf Jansen <rj@surtec.com>
14674 Pedro Alves <pedro@codesourcery.com>
14676 * configure.ac: Check for memmem declaration.
14677 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14678 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14679 (disable_packet_qfThreadInfo): Unconditionally compile.
14680 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14681 * configure, config.in: Regenerate.
14683 2008-07-28 Doug Kwan <dougkwan@google.com>
14685 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14686 (linux_write_memory): Remove declaration of errno.
14688 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14690 * linux-low.c (handle_extended_wait): Do not use "status"
14691 variable uninitialized.
14693 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14695 * server.c (handle_v_attach): Inhibit reporting dll changes.
14697 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14699 * remote-utils.c (prepare_resume_reply): If requested, don't
14700 output "thread:TID" in the T stop reply.
14702 * server.c (disable_packet_vCont, disable_packet_Tthread)
14703 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14704 (handle_query): If requested, disable support for qC, qfThreadInfo
14706 (handle_v_requests): If requested, disable support for vCont.
14707 (gdbserver_show_disableable): New.
14708 (main): Handle --disable-packet and --disable-packet=LIST.
14710 * server.h (disable_packet_vCont, disable_packet_Tthread)
14711 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14713 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14715 * server.c (gdbserver_usage): Mention --version.
14717 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14719 * Makefile.in (gdbreplay.o): New rule.
14721 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14723 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14724 message, not gdbserver.
14726 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14727 Nathan Sidwell <nathan@codesourcery.com>
14728 Joseph Myers <joseph@codesourcery.com>
14730 * acinclude.m4: Include ../../config/acx.m4.
14731 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14732 * configure, config.in: Regenerate.
14733 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14734 * server.c (gdbserver_version): Print PKGVERSION.
14735 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14736 (main): Adjust gdbserver_usage calls.
14737 * gdbreplay.c (version, host_name): Add declarations.
14738 (gdbreplay_version, gdbreplay_usage): New.
14739 (main): Accept --version and --help options.
14741 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14743 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14744 (arm_breakpoint_at): Handle Thumb.
14745 (the_low_target): Add comment.
14747 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14749 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14751 2008-05-09 Doug Evans <dje@google.com>
14753 * server.h (decode_search_memory_packet): Declare.
14754 * remote-utils.c (decode_search_memory_packet): New fn.
14755 * server.c (handle_search_memory_1): New fn.
14756 (handle_search_memory): New fn.
14757 (handle_query): Process qSearch:memory packets.
14759 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14761 * regcache.c (registers_length): Remove.
14762 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14763 full register packet.
14764 * regcache.h (registers_length): Remove prototype.
14765 * server.h (PBUFSIZ): Define to 16384.
14767 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14769 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14770 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14771 powerpc-64l.o, and powerpc-altivec64l.o.
14772 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14773 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14774 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14775 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14776 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14779 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14780 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14781 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14782 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14783 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14784 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14785 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14786 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14787 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14788 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14791 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14792 (init_registers_powerpc_32l): ... this new prototype.
14793 (init_registers_powerpc_32): Remove, replace by ...
14794 (init_registers_powerpc_altivec32l): ... this new prototype.
14795 (init_registers_powerpc_e500): Remove, replace by ...
14796 (init_registers_powerpc_e500l): ... this new prototype.
14797 (init_registers_ppc64): Remove, replace by ...
14798 (init_registers_powerpc_64l): ... this new prototype.
14799 (init_registers_powerpc_64): Remove, replace by ...
14800 (init_registers_powerpc_altivec64l): ... this new prototype.
14801 (ppc_num_regs): Set to 73.
14802 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14803 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14804 (ppc_cannot_store_register): Handle orig_r3 and trap.
14805 (ppc_arch_setup): Update init_registers_... calls.
14806 (ppc_fill_gregset): Handle orig_r3 and trap.
14808 * inferiors.c (clear_inferiors): Reset current_inferior.
14810 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14812 * acinclude.m4: Add override.m4.
14813 * configure: Regenerate.
14815 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14817 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14818 initial call to init_register_ppc64.
14820 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14822 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14823 single powerpc*-*-linux* case.
14824 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14826 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14828 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14829 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14831 * linux-ppc-low.c: Include <elf.h>.
14832 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14833 (ppc_hwcap): New global variable.
14834 (ppc_regmap): Remove __SPE__ #ifdef sections.
14835 (ppc_regmap_e500): New global variable.
14836 (ppc_cannot_store_register): Update __SPE__ special case.
14837 (ppc_get_hwcap): New function.
14838 (ppc_arch_setup): Use it to determine whether inferior supports
14839 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14840 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14841 Do not access registers if target does not support AltiVec.
14842 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14843 Do not access registers if target does not support SPE.
14844 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14846 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14848 * linux-low.c (disabled_regsets, num_regsets): New.
14849 (use_regsets_p): Delete.
14850 (linux_wait_for_process): Clear disabled_regsets.
14851 (regsets_fetch_inferior_registers): Check and set it.
14852 (regsets_store_inferior_registers): Likewise.
14853 (linux_fetch_registers, linux_store_registers): Do not use
14855 (initialize_low): Allocate disabled_regsets.
14857 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14859 * Makefile.in (LIBOBJS): New.
14860 (OBS): Use LIBOBJS.
14861 (memmem.o): New rule.
14862 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14863 * configure: Regenerated.
14865 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14867 * server.c (handle_query): Never return "unsupported" for
14868 qXfer:features:read queries.
14870 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14872 * server.c (get_features_xml): Fix inverted condition.
14873 (handle_query): Always support qXfer:feature:read.
14875 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14877 * server.c (wrapper_argv): New.
14878 (start_inferior): Handle wrapper_argv. If set, expect an extra
14880 (gdbserver_usage): Document --wrapper.
14881 (main): Parse --wrapper.
14883 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14885 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14886 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14887 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14888 (ppc_set_pc): Likewise.
14889 (ppc_arch_setup): New function.
14890 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14891 of collect_register.
14892 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14894 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14896 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14897 instead of linux-ppc64-low.o.
14898 * linux-ppc64-low.c: Remove file.
14899 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14900 (linux-ppc64-low.o): Remove rule.
14902 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14903 (init_registers_powerpc_64): Likewise.
14904 (ppc_regmap): Conditionally define depending on __powerpc64__.
14905 (ppc_cannot_store_register): Do not special-case "fpscr" when
14906 compiled on __powerpc64__.
14907 (ppc_collect_ptrace_register): New function.
14908 (ppc_supply_ptrace_register): New function.
14909 (ppc_breakpoint): Change type to "unsigned int".
14910 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14911 (the_low_target): Conditionally provide initializers for the
14912 arch_setup member depending on __powerpc64__. Install
14913 collect_ptrace_register and supply_ptrace_register members.
14915 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14917 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14918 * server.c (gdbserver_xmltarget): Define.
14919 (get_features_xml): Use it to replace "target.xml" and arch_string.
14921 * configure.srv: Remove srv_xmltarget. Add XML files that were
14922 mentioned there to srv_xmlfiles instead. Remove conditional tests
14923 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14924 srv_xmlfiles and srv_regobj to include all possible choices.
14925 * configure.ac (srv_xmltarget): Remove.
14926 (srv_xmlfiles): Do not add "target.xml".
14927 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14928 checks for supplementary target information.
14929 * configure: Regenerate.
14930 * Makefile.in (XML_TARGET): Remove.
14931 (target.xml): Remove rule.
14932 (clean): Do not clean up target.xml.
14933 (.PRECIOUS): Do not mention target.xml.
14935 * target.h (struct target_ops): Remove arch_string member.
14936 * linux-low.c (linux_arch_string): Remove.
14937 (linux_target_ops): Remove arch_string initializer.
14938 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14939 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14940 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14941 * spu-low.c (spu_arch_string): Remove.
14942 (spu_target_ops): Remove arch_string initializer.
14943 * win32-low.c (win32_arch_string): Remove.
14944 (win32_target_ops): Remove arch_string initializer.
14945 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14946 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14947 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14949 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14951 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14952 by collect_ptrace_register and supply_ptrace_register hooks.
14953 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14954 instead of checking for the_low_target.left_pad_xfer.
14955 (usr_store_inferior_registers): Use collect_ptrace_register callback
14956 instead of checking for the_low_target.left_pad_xfer.
14958 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14959 (s390_supply_ptrace_register): Likewise.
14960 (s390_fill_gregset): Call s390_collect_ptrace_register.
14961 (the_low_target): Update.
14963 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14964 (ppc_supply_ptrace_register): Likewise.
14965 (the_low_target): Update.
14967 * linux-i386-low.c (the_low_target): Update.
14968 * linux-x86-64-low.c (the_low_target): Update.
14970 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14972 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14973 reg-s390.o and reg-s390x.o.
14975 * linux-low.c (new_inferior): New global variable.
14976 (linux_create_inferior, linux_attach): Set it.
14977 (linux_wait_for_process): Call the_low_target.arch_setup after the
14978 target has stopped for the first time.
14979 (initialize_low): Do not call the_low_target.arch_setup.
14981 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14982 (s390_set_pc): Likewise.
14983 (s390_arch_setup): New function.
14984 (the_low_target): Use s390_arch_setup as arch_setup routine.
14986 * regcache.c (realloc_register_cache): New function.
14987 (set_register_cache): Call it for each existing regcache.
14989 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14991 * server.h (init_registers): Remove prototype.
14993 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14994 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14995 instead of init_registers ().
14996 * linux-arm-low.c (init_registers_arm): Add prototype.
14997 (init_registers_arm_with_iwmmxt): Likewise.
14998 (the_low_target): Add initializer for arch_setup field.
14999 * linux-cris-low.c (init_registers_cris): Add prototype.
15000 (the_low_target): Add initializer for arch_setup field.
15001 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15002 (the_low_target): Add initializer for arch_setup field.
15003 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15004 (the_low_target): Add initializer for arch_setup field.
15005 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15006 (the_low_target): Add initializer for arch_setup field.
15007 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15008 (the_low_target): Add initializer for arch_setup field.
15009 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15010 (the_low_target): Add initializer for arch_setup field.
15011 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15012 (init_registers_mips64_linux): Likewise.
15013 (the_low_target): Add initializer for arch_setup field.
15014 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15015 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15016 (the_low_target): Add initializer for arch_setup field.
15017 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15018 (init_registers_powerpc_64): Likewise.
15019 (the_low_target): Add initializer for arch_setup field.
15020 * linux-s390-low.c (init_registers_s390): Add prototype.
15021 (init_registers_s390x): Likewise.
15022 (the_low_target): Add initializer for arch_setup field.
15023 * linux-sh-low.c (init_registers_sh): Add prototype.
15024 (the_low_target): Add initializer for arch_setup field.
15025 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15026 (the_low_target): Add initializer for arch_setup field.
15027 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15028 (the_low_target): Add initializer for arch_setup field.
15030 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15031 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15032 instead of init_registers ().
15033 * win32-arm-low.c (init_registers_arm): Add prototype.
15034 (the_low_target): Add initializer for arch_setup field.
15035 * win32-i386-low.c (init_registers_i386): Add prototype.
15036 (the_low_target): Add initializer for arch_setup field.
15038 * spu-low.c (init_registers_spu): Add prototype.
15039 (initialize_low): Call initialie_registers_spu () instead of
15040 initialize_registers ().
15042 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15044 * server.c (handle_v_requests): When handling the vRun and vAttach
15045 packets, if already debugging a process, don't kill it. Return an
15048 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15050 * server.c (handle_query): Correct length check.
15052 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15054 * win32-low.c (do_initial_child_stuff): Add process handle
15055 parameter. Set current_process_handle and current_process_id from the
15056 parameters. Clear globals.
15057 (win32_create_inferior): Don't set current_process_handle and
15058 current_process_id here. Instead pass them on the call to
15059 do_initial_child_stuff.
15060 (win32_attach): Likewise.
15061 (win32_clear_inferiors): New.
15062 (win32_kill): Don't close the current process handle or the
15063 current thread handle here. Instead call win32_clear_inferiors.
15064 (win32_detach): Don't open a new handle to the process. Call
15065 win32_clear_inferiors.
15066 (win32_join): Don't rely on current_process_handle; open a new
15067 handle using the process id.
15068 (win32_wait): Call win32_clear_inferiors when the inferior process
15071 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15073 * server.c (monitor_show_help): Add "exit".
15075 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15077 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15078 (clean): Add reg-xtensa.c.
15079 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15080 * configure.srv (xtensa*-*-linux*) New target.
15081 * linux-xtensa-low.c: New.
15082 * xtensa-xtregs.c: New.
15084 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15086 * hostio.c: Don't include errno.h.
15087 (errno_to_fileio_errno): Move to hostio-errno.
15088 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15089 error number outputting to the target->hostio_last_error callback.
15090 (hostio_packet_error): Use FILEIO_EINVAL directly.
15091 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15092 calls to hostio_error.
15093 * hostio-errno.c: New.
15094 * server.h (hostio_last_error_from_errno): Declare.
15095 * target.h (target_ops): Add hostio_last_error member.
15096 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15097 as hostio_last_error handler.
15098 * spu-low.c (spu_target_ops): Likewise.
15099 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15100 (wince_hostio_last_error): New functions.
15101 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15102 as hostio_last_error handler.
15103 (win32_target_ops) [!_WIN32_WCE]: Register
15104 hostio_last_error_from_errno as hostio_last_error handler.
15105 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15106 (hostio-errno.o): New rule.
15107 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15108 * configure.srv (srv_hostio_err_objs): New variable. Default to
15110 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15111 * configure: Regenerate.
15113 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15115 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15116 (linux_kill, linux_detach): Clean up the process list.
15117 * remote-utils.c (remote_open): Improve port number parsing.
15118 (putpkt_binary, input_interrupt): Only send interrupts if the target
15120 * server.c (extended_protocol): Make static.
15121 (attached): Define earlier.
15122 (exit_requested, response_needed, program_argv): New variables.
15123 (target_running): New.
15124 (start_inferior): Clear attached here.
15125 (attach_inferior): Set attached here.
15126 (require_running): Define.
15127 (handle_query): Use require_running and target_running. Implement
15129 (handle_v_attach, handle_v_run): New.
15130 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15131 (gdbserver_usage): Update.
15132 (main): Redo argument parsing. Handle --debug and --multi. Handle
15133 --attach along with other options or after the port. Save
15134 program_argv. Support no initial program. Resynchronize
15135 communication with GDB after an error. Handle "monitor exit".
15136 Use require_running and target_running. Always allow the extended
15137 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15138 restart in extended mode.
15139 * README: Refer to the GDB manual. Update --attach usage.
15141 2007-12-20 Andreas Schwab <schwab@suse.de>
15143 * linux-low.c (STACK_SIZE): Define.
15144 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15145 (linux_test_for_tracefork): Likewise.
15147 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15149 * linux-low.c (linux_wait_for_event): Update messages. Do not
15150 reinsert auto-delete breakpoints.
15151 * mem-break.c (struct breakpoint): Change return type of handler to
15153 (set_breakpoint_at): Update handler type.
15154 (reinsert_breakpoint_handler): Return 1 instead of calling
15156 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15158 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15159 * mem-break.h (set_breakpoint_at): Update handler type.
15160 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15161 * win32-low.c (auto_delete_breakpoint): New.
15162 (get_child_debug_event): Use it.
15164 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15166 * configure.ac: Check for pread and pwrite.
15167 * hostio.c (handle_pread): Fall back to lseek and read.
15168 (handle_pwrite): Fall back to lseek and write.
15169 * config.in, configure: Regenerated.
15171 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15173 * server.c (myresume): Add own_buf argument.
15174 (main): Update calls.
15176 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15178 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15179 * remote-utils.c (remote_open): Do not call disable_async_io.
15180 (block_async_io): Delete.
15181 (unblock_async_io): Make static.
15182 (initialize_async_io): New.
15183 * server.c (handle_v_cont): Handle async I/O here.
15184 (myresume): Likewise. Move other common resume tasks here...
15185 (main): ... from here. Call initialize_async_io. Disable async
15186 I/O before the main loop.
15187 * server.h (initialize_async_io): Declare.
15188 (block_async_io, unblock_async_io): Delete prototypes.
15189 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15191 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15193 * remote-utils.c (readchar): Allow binary data in received messages.
15195 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15197 * win32-low.c (attaching): New global.
15198 (win32_create_inferior): Clear the `attaching' global.
15199 (win32_attach): Set the `attaching' global.
15200 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15201 attaching. Only set a breakpoint at the entry point if not
15204 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15206 * server.c (main): Don't report dll events on the initial
15207 connection on attaches.
15209 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15211 * server.c (main): Relax numerical bases supported for the pid of
15212 the --attach command line argument.
15214 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15216 * win32-low.c (win32_attach): Call OpenProcess before
15217 DebugActiveProcess, not after. Add last error output to error
15220 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15222 * win32-low.c (win32_get_thread_context)
15223 (win32_set_thread_context): New functions.
15224 (thread_rec): Use win32_get_thread_context.
15225 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15226 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15229 2007-12-03 Leo Zayas
15230 Pedro Alves <pedro_alves@portugalmail.pt>
15232 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15234 (child_add_thread): Minor cleanup.
15235 (child_continue): Resume artificially suspended threads before
15236 calling ContinueDebugEvent.
15237 (suspend_one_thread): New.
15238 (fake_breakpoint_event): New.
15239 (get_child_debug_event): Change return type to int. Check here if
15240 gdb sent an interrupt request. If a soft interrupt was requested,
15241 fake a breakpoint event. Return 0 if there is no event to handle,
15243 (win32_wait): Don't check here if gdb sent an interrupt request.
15244 Ensure there is a valid event to handle.
15245 (win32_request_interrupt): Add soft interruption method as last
15248 2007-12-03 Leo Zayas
15249 Pedro Alves <pedro_alves@portugalmail.pt>
15251 * win32-low.h (win32_thread_info): Add descriptions to the
15252 structure members. Replace `suspend_count' counter by a
15254 * win32-low.c (thread_rec): Update condition of when to get the
15255 context from the inferior. Rely on ContextFlags being set if it
15256 has already been retrieved. Only suspend the inferior thread if
15257 we haven't already. Warn if that fails.
15258 (continue_one_thread): s/suspend_count/suspended/. Only call
15259 ResumeThread once. Warn if that fails.
15261 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15263 * win32-low.c (win32_wait): Don't read from the inferior when it
15264 has already exited.
15266 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15268 * Makefile.in (win32_low_h): New variable.
15269 (win32-low.o): Add dependency on $(win32_low_h).
15270 (win32-arm-low.o, win32-i386-low.o): New rules.
15272 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15274 * hostio.c: Correct copyright year.
15276 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15278 * Makefile.in (OBS): Add hostio.o.
15279 (hostio.o): New rule.
15280 * server.h (handle_vFile): Declare.
15281 * hostio.c: New file.
15282 * server.c (handle_v_requests): Take packet_len and new_packet_len
15283 for binary packets. Call handle_vFile.
15284 (main): Update call to handle_v_requests.
15286 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15288 * linux-low.c: Include <sched.h>.
15290 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15292 * linux-low.c (linux_tracefork_grandchild): New.
15293 (linux_tracefork_child): Use clone.
15294 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15296 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15298 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15300 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15302 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15304 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15306 * inferiors.c (change_inferior_id): Delete.
15307 (add_pid_to_list, pull_pid_from_list): New.
15308 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15309 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15310 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15311 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15312 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15313 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15314 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15315 (using_threads): Always set to 1.
15316 (handle_extended_wait): New.
15317 (add_process): Do not set TID.
15318 (linux_create_inferior): Set must_set_ptrace_flags.
15319 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15320 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15321 (linux_thread_alive): Rename TID argument to LWPID.
15322 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15323 (linux_wait_for_event): Do not use TID or check using_threads. Update
15324 call to dead_thread_notify. Call handle_extended_wait.
15325 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15326 (send_sigstop): Delete sigstop_sent.
15327 (wait_for_sigstop): Avoid TID.
15328 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15329 (linux_test_for_tracefork): New.
15330 (linux_lookup_signals): Use thread_db_active and
15331 linux_supports_tracefork_flag.
15332 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15333 * linux-low.h (get_process_thread): Avoid TID.
15334 (struct process_ifo): Move thread_known and tid to the end. Remove
15336 (linux_attach_lwp, thread_db_init): Update prototypes.
15337 * server.h (change_inferior_id): Delete prototype.
15338 (add_pid_to_list, pull_pid_from_list): New prototypes.
15339 * thread-db.c (thread_db_use_events): New.
15340 (find_first_thread): Rename to...
15341 (find_one_thread): ...this. Update callers and messages. Do not
15342 call fatal. Check thread_db_use_events. Do not call
15343 change_inferior_id or new_thread_notify.
15344 (maybe_attach_thread): Update. Do not call new_thread_notify.
15345 (thread_db_init): Set thread_db_use_events. Check use_events.
15346 * utils.c (fatal, warning): Correct message prefix.
15348 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15350 * Makefile.in (clean): Remove new files.
15351 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15352 (powerpc-64.o, powerpc-64.c): New rules.
15353 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15354 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15356 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15358 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15359 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15360 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15361 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15362 (target_regsets): Add AltiVec and SPE register sets.
15363 * configure.ac: Check for AltiVec and SPE.
15364 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15365 (ppc_fill_vrregset, ppc_store_vrregset): New.
15366 (target_regsets): Add AltiVec register set.
15367 * configure: Regenerated.
15369 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15371 * linux-low.c (O_LARGEFILE): Define.
15372 (linux_read_memory): Use /proc/PID/mem.
15373 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15374 * configure, config.in: Regenerated.
15376 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15378 * linux-low.c (linux_wait_for_event): Do not pass signals while
15381 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15383 * win32-low.c (create_process): New.
15384 (win32_create_inferior): Use create_process instead of
15385 CreateProcess. If create_process failed retry appending an ".exe"
15386 suffix. Store the GetLastError result immediatelly after
15387 create_process calls and use it on the call to error.
15389 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15391 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15393 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15395 * configure.ac: Switch license to GPLv3.
15397 2007-08-01 Michael Snyder <msnyder@access-company.com>
15399 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15401 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15403 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15405 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15406 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15407 CloseToolhelp32Snapshot.
15408 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15409 CloseToolhelp32Snapshot.
15411 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15413 * server.c (main): Check for inferior exit before main loop.
15415 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15417 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15418 instead of on tmp_desc.
15420 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15421 Daniel Jacobowitz <dan@codesourcery.com>
15423 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15424 (add_thread): Minor cleanups.
15425 (clear_inferiors): Move lower in the file. Clear the DLL
15427 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15428 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15429 (xml_escape_text): New.
15430 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15432 (handle_v_cont): Report errors.
15433 (gdbserver_version): Update.
15434 (main): Correct size of own_buf. Do not report initial DLL events.
15435 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15436 (unloaded_dll, xml_escape_text): New.
15437 * win32-low.c (enum target_waitkind): Update comments.
15438 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15439 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15440 (win32_EnumProcessModules, win32_GetModuleInformation)
15441 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15442 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15443 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15444 (win32_Module32First, win32_Module32Next, load_toolhelp)
15445 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15446 (get_child_debug_event): Handle DLL events.
15447 (win32_wait): Likewise.
15449 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15451 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15452 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15454 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15456 * win32-low.c (handle_output_debug_string): Ignore event if not
15459 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15461 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15463 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15465 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15467 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15469 * inferiors.c (change_inferior_id): Add comment.
15470 * linux-low.c (check_removed_breakpoint): Add an early
15471 prototype. Improve debug output.
15472 (linux_attach): Doc update.
15473 (linux_detach_one_process, linux_detach): Clean up before releasing
15475 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15476 * linux-low.h (struct process_info): Doc improvement.
15477 * mem-break.c (delete_all_breakpoints): New.
15478 * mem-break.h (delete_all_breakpoints): New prototype.
15479 * thread-db.c (find_first_thread): New.
15480 (thread_db_create_event): Call it instead of
15481 thread_db_find_new_threads. Clean up unused variables.
15482 (maybe_attach_thread): Remove first thread handling.
15483 (thread_db_find_new_threads): Use find_first_thread.
15484 (thread_db_get_tls_address): Likewise.
15486 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15488 * thread-db.c (thread_db_find_new_threads): Add prototype.
15489 (thread_db_create_event): Check for the main thread before adding
15491 (maybe_attach_thread): Only enable event reporting if TID == 0.
15492 (thread_db_get_tls_address): Check for new threads.
15494 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15496 * linux-low.c (linux_create_inferior): Try execv before execvp.
15497 * spu-low.c (spu_create_inferior): Likewise.
15499 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15501 * linux-low.c (linux_create_inferior): Change execv to execvp.
15502 * spu-low.c (spu_create_inferior): Likewies.
15504 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15506 * Makefile.in (clean): Clean new files instead of deleted ones.
15507 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15508 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15510 * configure.srv: Specify XML files and new regformats for MIPS and
15512 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15513 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15514 an entry for the restart register.
15515 (mips_cannot_fetch_register, mips_cannot_store_register)
15516 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15517 register names to match the XML descriptions.
15518 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15519 restart register instead of $0.
15521 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15522 Markus Deuling <deuling@de.ibm.com>
15524 * remote-utils.c (decode_xfer_write): New function.
15525 * server.h (decode_xfer_write): Add prototype.
15526 * server.c (handle_query): Add PACKET_LEN argument. Support
15527 qXfer:spu:read and qXfer:spu:write packets.
15528 (main): Pass packet_len to handle_query.
15529 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15530 * target.h (target_ops): Add qxfer_spu.
15532 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15534 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15535 accessing non-seekable spufs files.
15537 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15539 * server.c (handle_query): Add reply for qC packet.
15541 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15542 Leo Zayas <lerele@champenstudios@com>
15544 * server.h (check_remote_input_interrupt_request): New function.
15545 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15546 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15547 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15548 (check_remote_input_interrupt_request): New function.
15549 * server.h (check_remote_input_interrupt_request): Declare.
15550 * win32-low.c (winapi_DebugBreakProcess,
15551 winapi_GenerateConsoleCtrlEvent): New typedefs.
15552 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15554 (win32_wait): Check for remote interrupt request
15555 with check_remote_input_interrupt_request.
15556 (win32_request_interrupt): New function.
15557 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15559 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15561 * win32-low.c (debug_registers_changed,
15562 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15563 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15564 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15565 (thread_rec): Get context using the low target.
15566 (child_add_thread): Call thread_added on the low target,
15567 which does the same thing.
15569 (do_initial_child_stuff): Remove debug registers references.
15570 Set context using the low target. Resume threads after
15571 setting the contexts.
15572 (child_continue): Remove dead variable. Remove debug
15573 registers references.
15574 (child_fetch_inferior_registers): Go through the low target.
15575 (do_child_store_inferior_registers): Remove.
15576 (child_store_inferior_registers): Go through the low target.
15577 (win32_resume): Remove debug registers references.
15578 Set context using the low target.
15579 (handle_exception): Change return type to void. Don't record
15580 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15581 first chance exception.
15582 (get_child_debug_event): Change return type to void. Remove
15583 goto loop. Always return after waiting for debug event.
15584 (win32_wait): Convert to switch statement. Handle spurious
15587 * win32-i386-low.c (debug_registers_changed,
15588 debug_registers_used): New.
15589 (initial_stuff): Rename to ...
15590 (i386_initial_stuff): ... this. Clear debug registers
15592 (store_debug_registers): Delete.
15593 (i386_get_thread_context): New.
15594 (load_debug_registers): Delete.
15595 (i386_set_thread_context): New.
15596 (i386_thread_added): New.
15597 (single_step): Rename to ...
15598 (i386_single_step): ... this.
15599 (do_fetch_inferior_registers): Rename to ...
15600 (i386_fetch_inferior_register): ... this.
15601 (i386_store_inferior_register): New.
15602 (the_low_target): Adapt to new interface.
15604 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15605 (arm_get_thread_context): New.
15606 (arm_set_thread_context): New.
15608 (do_fetch_inferior_registers): Rename to ...
15609 (arm_fetch_inferior_register): ... this.
15610 (arm_store_inferior_register): New.
15611 (arm_wince_breakpoint): Reimplement as unsigned long.
15612 (arm_wince_breakpoint_len): Define.
15613 (the_low_target): Adapt to new interface.
15615 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15616 load_debug_registers. Add get_thread_context, set_thread_context,
15617 thread_added and store_inferior_register. Rename
15618 fetch_inferior_registers to fetch_inferior_register.
15619 (regptr): Remove declaration.
15621 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15623 * linux-low.c (linux_detach): Change return type to int. Return 0.
15624 * spu-low.c (spu_detach): Likewise.
15626 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15628 * target.h (target_ops): Change return type of detach to int.
15630 (join_inferior): New.
15631 * server.c (main): Don't skip detach support on mingw32.
15632 If the inferior doesn't support detaching return error.
15633 Call join_inferior instead of using waitpid.
15634 * linux-low.c (linux_join): New.
15635 (linux_target_op): Add linux_join.
15636 * spu-low.c (spu_join): New.
15637 (spu_target_ops): Add spu_join.
15638 * win32-low.c (win32_detach): Adapt to new interface.
15639 Reopen current_process_handle before detaching. Issue a child
15640 resume before detaching.
15642 (win32_target_op): Add win32_join.
15644 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15646 * win32-low.c (win32-attach): Fix return value.
15647 * target.h (target_ops): Describe ATTACH return values.
15649 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15651 * win32-low.c (GETPROCADDRESS): Define.
15652 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15653 (winapi_DebugSetProcessKillOnExit): Likewise.
15654 (win32_create_inferior): Force usage of ansi CreateProcessA.
15655 (win32_attach): Use GETPROCADDRESS.
15656 (win32_detach): Likewise.
15658 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15660 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15662 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15664 * win32-low.c: Commit leftover changes from 2007-03-29.
15666 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15668 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15669 fields short instead of int. Add explicit padding.
15670 (i387_cache_to_fsave): Remove unnecessary casts.
15671 (i387_fsave_to_cache): Doc fix.
15672 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15674 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15676 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15677 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15679 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15681 * configure.srv (arm*-*-mingw32ce*): Move near the other
15684 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15686 * configure.ac: Add errno checking.
15687 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15688 sys/file.h and malloc.h.
15689 (AC_CHECK_DECLS): Add perror.
15690 (srv_mingwce): Handle.
15691 * configure.srv (i[34567]86-*-cygwin*): Add
15692 win32-i386-low.o to srv_tgtobj.
15693 (i[34567]86-*-mingw*): Likewise.
15694 (arm*-*-mingw32ce*): Add case.
15695 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15696 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15697 [__MINGW32CE__] (strerror): New function.
15698 [__MINGW32CE__] (errno): Define to GetLastError.
15699 [__MINGW32CE__] (COUNTOF): New macro.
15700 (remote_open): Remove extra close call.
15701 * mem-break.c (delete_breakpoint_at): New function.
15702 * mem-break.h (delete_breakpoint_at): Declare.
15703 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15704 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15705 [USE_WIN32API] (read, write): Add char* casts.
15706 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15707 * server.h: Include wincecompat.h on Windows CE.
15708 [HAVE_ERRNO_H]: Check.
15709 (perror): Declare if not declared.
15710 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15711 (perror_with_name): Remove errno declaration.
15712 * wincecompat.h: New.
15713 * wincecompat.c: New.
15714 * win32-low.h: New.
15715 * win32-arm-low.c: New.
15716 * win32-i386-low.c: New.
15717 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15718 (OUTMSG2): Make it safe.
15720 (COUNTOF): New macro.
15721 (NUM_REGS): Get it from the low target.
15722 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15723 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15724 (thread_rec): Let low target handle debug registers.
15725 (child_add_thread): Likewise.
15726 (child_init_thread_list): Likewise.
15727 (continue_one_thread): Likewise.
15729 (do_child_fetch_inferior_registers): Move to ...
15730 * win32-i386-low.c: ... here, and rename to ...
15731 (do_fetch_inferior_registers): ... this.
15732 * win32-low.c (child_fetch_inferior_registers):
15733 Go through the low target.
15734 (do_child_store_inferior_registers): Use regptr.
15735 (strwinerror): New function.
15736 (win32_create_inferior): Handle Windows CE.
15737 Use strwinerror instead of strerror on Windows error
15738 codes. Add program to the error output.
15739 Don't close the main thread handle on Windows CE.
15740 (win32_attach): Use coredll.dll on Windows CE.
15741 (win32_kill): Close current process and current
15743 (win32_detach): Use coredll.dll on Windows CE.
15744 (win32_resume): Let low target handle debug registers, and
15746 (handle_exception): Add/Remove initial breakpoint. Avoid
15747 non-existant WSTOPSIG on Windows CE.
15748 (win32_read_inferior_memory): Cast to remove warning.
15749 (win32_arch_string): Go through the low target.
15750 (initialize_low): Call set_breakpoint_data with the low
15751 target's breakpoint.
15752 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15753 FOP_REGNUM, mappings): Move to ...
15754 * win32-i386-low.c: ... here.
15755 * win32-low.c (win32_thread_info): Move to ...
15756 * win32-low.h: ... here.
15757 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15758 win32-arm-low.c and wincecompat.c.
15759 (all:): Add $EXEEXT.
15760 (install-only:): Likewise.
15761 (gdbserver:): Likewise.
15762 (gdbreplay:): Likewise.
15763 * config.in: Regenerate.
15764 * configure: Regenerate.
15766 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15768 * win32-low.c: Rename typedef thread_info to
15769 win32_thread_info throughout.
15771 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15773 * win32-i386-low.c: Rename to ...
15774 * win32-low.c: ... this.
15775 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15776 * Makefile.in: Likewise.
15778 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15780 * remote-utils.c (monitor_output): Constify msg parameter.
15781 * server.h (monitor_output): Likewise.
15782 * win32-i386-low.c (handle_output_debug_string): New.
15783 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15784 handle_output_debug_string.
15785 (get_child_debug_event): Likewise.
15787 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15789 * server.c (main): Correct strtoul check.
15791 2007-03-27 Jon Ringle <jon@ringle.org>
15793 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15795 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15797 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15799 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15801 * terminal.h: Check HAVE_SGTTY_H.
15803 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15805 * remote-utils.c (remote_open): Print out the assigned port number.
15807 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15809 * remote-utils.c (monitor_output): New function.
15810 * server.c (debug_threads): Define here.
15811 (monitor_show_help): New function.
15812 (handle_query): Handle qRcmd.
15813 (main): Do not handle 'd' packet.
15814 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15815 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15818 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15820 * Makefile.in (EXEEXT): New.
15821 (clean): Use $(EXEEXT).
15823 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15825 * target.h (target_ops): Rename send_signal to request_interrupt,
15826 and remove enum target_signal parameter.
15827 * linux-low.c (linux_request_interrupt): Rename from
15828 linux_send_signal, and always send SIGINT.
15829 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15830 and always send SIGINT.
15831 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15833 (input_interrupt): Likewise.
15835 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15837 * server.c (get_features_xml): Check if target implemented
15839 * win32-i386-low.c (win32_arch_string): New.
15840 (win32_target_ops): Add win32_arch_string as arch_string member.
15842 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15844 * spu-low.c (spu_arch_string): New.
15845 (spu_target_ops): Add spu_arch_string.
15847 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15849 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15850 * configure.ac: Do not check for terminal.h.
15851 * configure, config.in: Regenerated.
15853 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15855 * Makefile.in (OBS): Add $(XML_BUILTIN).
15856 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15858 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15859 (arm-with-iwmmxt.c): New.
15860 * config.in, configure: Regenerate.
15861 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15862 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15863 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15864 (arm*-*-linux*): Add iWMMXt and regset support.
15865 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15866 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15867 (arm_store_wmmxregset, target_regsets): New.
15868 * server.c (get_features_xml): Take annex argument. Check builtin
15870 (handle_query): Handle multiple annexes.
15872 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15874 * remote-utils.c [USE_WIN32API] (read, write): Define.
15875 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15878 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15880 * linux-i386-low.c (the_low_target): Set arch_string.
15881 * linux-x86-64-low.c (the_low_target): Likewise.
15882 * linux-low.c (linux_arch_string): New.
15883 (linux_target_ops): Add it.
15884 * linux-low.h (struct linux_target_ops): Add arch_string.
15885 * server.c (write_qxfer_response): Use const void * for DATA.
15886 (get_features_xml): New.
15887 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15888 * target.h (struct target_ops): Add arch_string method.
15890 2007-01-03 Denis Pilat <denis.pilat@st.com>
15891 Daniel Jacobowitz <dan@codesourcery.com>
15893 * linux-low.c (linux_kill): Handle being called with no threads.
15894 * win32-i386-low.c (win32_kill): Likewise.
15895 (get_child_debug_event): Clear current_process_handle.
15897 2006-12-30 Denis PILAT <denis.pilat@st.com>
15898 Daniel Jacobowitz <dan@codesourcery.com>
15900 * remote-utils.c (remote_open): Check the type of specified
15901 serial port devices before opening them.
15902 * server.c (main): Kill the inferior if an error occurs during
15903 the first remote_open.
15905 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15907 * README: Update supported targets.
15909 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15911 * Makefile.in (clean): Remove reg-mips64.c.
15912 (reg-mips64.c, reg-mips64.o): New rules.
15913 * configure.srv: Handle mips64. Include regset support for mips.
15914 * linux-mips-low.c (union mips_register): New.
15915 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15916 (mips_breakpoint, mips_breakpoint_at): Use int.
15917 (mips_collect_register, mips_supply_register)
15918 (mips_collect_register_32bit, mips_supply_register_32bit)
15919 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15920 (mips_store_fpregset, target_regsets): New.
15921 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15923 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15925 * configure.srv: Add target "spu*-*-*".
15926 * Makefile.in (clean): Remove reg-spu.c.
15927 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15928 * spu-low.c: New file.
15930 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15932 * configure.ac: Correct td_thr_tls_get_addr test.
15933 * configure: Regenerated.
15935 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15937 * linux-low.c (linux_wait_for_event): Reformat. Use the
15938 pass_signals array.
15939 * remote-utils.c (decode_address_to_semicolon): New.
15940 * server.c (pass_signals, handle_general_set): New.
15941 (handle_query): Mention QPassSignals for qSupported.
15942 (main): Call handle_general_set.
15943 * server.h (pass_signals, decode_address_to_semicolon): New.
15945 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15947 * server.c (handle_query): Correct error handling for read_auxv.
15949 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15951 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15952 and srv_linux_thread_db to yes.
15953 * linux-s390-low.c (s390_fill_gregset): New function.
15954 (target_regsets): Define data structure.
15956 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15958 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15959 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15960 * config.in, configure: Regenerated.
15961 * inferiors.c (gdb_id_to_thread): New function.
15962 (gdb_id_to_thread_id): Use it.
15963 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15964 * linux-low.h (struct process_info): Add th member.
15965 (thread_db_get_tls_address): New prototype.
15966 * remote-utils.c (decode_address): Make non-static.
15967 * server.c (handle_query): Handle qGetTLSAddr.
15968 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15969 * target.h (struct target_ops): Add get_tls_address.
15970 * thread-db.c (maybe_attach_thread): Save the thread handle.
15971 (thread_db_get_tls_address): New.
15973 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15975 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15976 (linux_resume_one_process): Take a siginfo_t *. Update all
15977 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15978 (struct pending_signals): Add a siginfo_t.
15979 (linux_wait_for_process): Always set last_status.
15980 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15981 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15982 * linux-low.h (struct process_info): Add last_status.
15984 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15986 * remote-utils.c (try_rle): New function.
15987 (putpkt_binary): Use it.
15989 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15991 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15992 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15993 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15994 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15995 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15998 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16000 * server.c (terminal_fd): New variable.
16001 (old_foreground_pgrp): Likewise.
16002 (restore_old_foreground_pgrp): New function.
16003 (start_inferior): Record the terminal file descriptor in terminal_fd
16004 and its original foreground group in old_foreground_pgrp. Register
16005 restore_old_foreground_pgrp with atexit().
16007 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16009 * server.c (handle_query): Correct qPart to qXfer.
16011 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16013 * configure.ac: Check for more headers which are missing on
16014 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16015 * configure.srv: Add Cygwin and mingw32.
16016 * remote-utils.c: Don't include headers unconditionally which
16017 are missing on mingw32. Include <winsock.h> for mingw32.
16018 (remote_open): Adjust for mingw32 support. Flush
16019 standard error after writing to it.
16020 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16021 (unblock_async_io, enable_async_io, disable_async_io)
16022 (readchar, getpkt): Update for Winsock support.
16023 (prepare_resume_reply): Expect a protocol signal number.
16024 * server.c: Disable <sys/wait.h> on mingw32.
16025 (start_inferior): Adjust for mingw32 support. Flush
16026 standard error after writing to it.
16027 (attach_inferior): Likewise. Use protocol signal
16029 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16031 * win32-i386-low.c: New file.
16032 * Makefile.in (XM_CLIBS): Set.
16033 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16034 (win32-i386-low.o): New dependency rule.
16035 * linux-low.c (linux_wait): Use target signal numbers.
16036 * target.h (struct target_ops): Doc fix.
16037 * server.h (target_signal_to_name): New prototype.
16038 * gdbreplay.c: Don't include headers unconditionally which
16039 are missing on mingw32. Include <winsock.h> for mingw32.
16040 (remote_close, remote_open): Adjust for Winsock support.
16041 * configure, config.in: Regenerated.
16043 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16045 * server.c (decode_xfer_read, write_qxfer_response): New.
16046 (handle_query): Take a packet length argument. Handle
16047 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16048 the qSupported response.
16049 (main): Update call to handle_query.
16051 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16053 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16054 (putpkt_binary): Renamed from putpkt and adjusted for binary
16056 (putpkt): New wrapper for putpkt_binary.
16057 (readchar): Don't mask off the high bit.
16058 (decode_X_packet): New function.
16059 * server.c (main): Call putpkt_binary if a handler sets the packet
16060 length. Save the length of the incoming packet. Handle 'X'.
16061 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16063 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16065 * server.c (handle_query): Handle qSupported.
16067 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16069 * remote-utils.c (all_symbols_looked_up): New variable.
16070 (look_up_one_symbol): Check it.
16071 * server.h (look_up_one_symbol): New declaration.
16072 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16074 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16076 * Makefile.in (linux-arm-low.o): Update dependencies.
16077 * linux-arm-low.c: Include "gdb_proc_service.h".
16078 (PTRACE_GET_THREAD_AREA): Define.
16079 (ps_get_thread_area): New function.
16081 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16083 * configure.srv (m68k*-*-uclinux*): New target.
16084 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16085 (linux_resume_one_process): Remove extraneous cast.
16086 (linux_read_offsets): New.
16087 (linux_target_op): Add linux_read_offsets on mmuless systems.
16088 * server.c (handle_query): Add qOffsets logic.
16089 * target.h (struct target_ops): Add read_offsets.
16091 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16093 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16094 (PTRACE_GET_THREAD_AREA): Define.
16095 (ps_get_thread_area): New function.
16096 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16097 (linux-x86-64-low.o): Update.
16099 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16101 * configure.ac: Remove checks for prfpregset_t.
16102 * gdb_proc_service.h: New file.
16103 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16104 new "gdb_proc_service.h".
16105 * proc-service.c: Likewise.
16106 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16107 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16108 * Makefile.in (gdb_proc_service_h): Updated.
16109 * configure, config.in: Regenerated.
16111 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16113 * remote-utils.c (prepare_resume_reply): Move declaration
16114 of gdb_id_from_wait to the top of the block.
16116 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16118 * linux-low.c (regsets_store_inferior_registers): Read the regset
16119 from the target before filling it.
16121 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16123 * server.c (attach_inferior): Return SIGTRAP for a successful
16126 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16128 * Makefile.in (OBS): Add version.o.
16129 (STAGESTUFF): Delete.
16130 (version.o): Add dependencies.
16131 (version.c): Replace rule.
16132 (clean): Remove version.c.
16133 * server.c (gdbserver_version): New.
16134 (gdbserver_usage): Use printf.
16135 (main): Handle --version and --help.
16136 * server.h (version, host_name): Add declarations.
16138 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16150 * linux-x86-64-low.c:
16152 * linux-s390-low.c:
16153 * linux-ppc64-low.c:
16155 * linux-mips-low.c:
16156 * linux-m68k-low.c:
16157 * linux-m32r-low.c:
16160 * linux-ia64-low.c:
16161 * linux-i386-low.c:
16162 * linux-crisv32-low.c:
16174 * gdbserver.1: Add (C) after Copyright. Update the FSF
16177 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16179 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16180 (arm_breakpoint_at): Recognize both breakpoints.
16181 (the_low_target): Use the correct breakpoint instruction.
16183 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16185 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16186 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16187 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16188 (the_low_target): Update.
16190 2005-10-25 Andreas Schwab <schwab@suse.de>
16192 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16194 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16195 (ia64_num_regs): Reduce to 462.
16197 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16199 * acinclude.m4: Correct quoting.
16200 * aclocal.m4: Regenerated.
16202 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16203 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16204 (thread_db_init): Call thread_db_err_str.
16205 * configure.ac: Check for TD_VERSION.
16206 * config.in, configure: Regenerated.
16208 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16210 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16212 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16214 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16215 is not available. Define HAVE_PTRACE_GETREGS if it is.
16216 * config.in, configure: Regenerated.
16217 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16218 * linux-i386-low.c, linux-m68k-low.c: Update to use
16219 HAVE_PTRACE_GETREGS.
16220 * linux-low.c (regsets_fetch_inferior_registers)
16221 (regsets_store_inferior_registers): Only return 0 if we processed
16223 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16224 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16226 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16228 * inferiors.c (struct thread_info): Add gdb_id.
16229 (add_thread): Add gdb_id argument.
16230 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16231 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16232 calls to add_thread.
16233 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16234 * server.c (handle_query): Use thread_to_gdb_id.
16235 (handle_v_cont, main): Use gdb_id_to_thread_id.
16236 * server.h (add_thread): Update prototype.
16237 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16240 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16242 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16243 left-padded registers.
16244 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16245 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16247 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16249 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16250 * configure: Regenerate.
16251 * config.in: Regenerate.
16252 * server.h (NEED_DECLARATION_STRERROR):
16253 Replace with !HAVE_DECL_STRERROR.
16255 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16257 * linux-low.c (linux_wait, linux_send_signal): Don't test
16258 an unsigned long variable for > 0 if it could be MAX_ULONG.
16259 * server.c (myresume): Likewise.
16260 * target.c (set_desired_inferior): Likewise.
16262 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16264 * configure.ac: Simplify and improve check for socklen_t.
16265 * configure, config.in: Regenerate.
16267 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16269 * acconfig.h: Remove.
16270 * configure.ac: Add a test for socklen_t. Use three-argument
16271 AC_DEFINE throughout.
16272 * config.in: Regenerated using autoheader 2.59.
16273 * configure: Regenerated.
16275 * gdbreplay.c (socklen_t): Provide a default.
16276 (remote_open): Use socklen_t.
16277 * remote-utils.c (socklen_t): Provide a default.
16278 (remote_open): Use socklen_t.
16279 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16282 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16284 * linux-low.c (linux_read_memory, linux_write_memory)
16285 (linux_read_auxv): Likewise.
16286 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16287 (check_mem_write): Likewise.
16288 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16290 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16291 (registers_from_string, register_data): Likewise.
16292 * server.c (handle_query, main): Likewise.
16293 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16294 (decode_M_packet): Likewise.
16295 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16296 * target.h (struct target_ops): Update read_memory, write_memory,
16298 (read_inferior_memory, write_inferior_memory): Update.
16299 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16300 to unsigned char *.
16301 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16302 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16303 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16304 linux-s390-low.c, linux-sh-low.c: Update for changes in
16305 read_inferior_memory and the_low_target->breakpoint.
16307 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16309 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16310 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16311 * configure.srv: Add powerpc64-*-linux*.
16312 * linux-ppc64-low.c: New file.
16314 2005-05-23 Orjan Friberg <orjanf@axis.com>
16316 * linux-cris-low.c: New file with support for CRIS.
16317 * linux-crisv32-low.c: Ditto for CRISv32.
16318 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16319 (clean): Add reg-cris.c and reg-crisv32.c.
16320 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16321 reg-crisv32.o, and reg-crisv32.c to make rules.
16322 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16323 recognized targets.
16325 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16327 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16328 of sizeof (PTRACE_XFER_TYPE).
16329 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16331 2005-05-12 Orjan Friberg <orjanf@axis.com>
16333 * target.h (struct target_ops): Add insert_watchpoint,
16334 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16335 pointers for hardware watchpoint support.
16336 * linux-low.h (struct linux_target_ops): Ditto.
16337 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16338 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16339 to linux_target_ops.
16340 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16342 * server.c (main): Recognize 'Z' and 'z' packets.
16344 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16346 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16347 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16348 (the_low_target): Add new members.
16350 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16352 * proc-service.c (ps_lgetregs): Search all_processes instead of
16355 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16357 * server.c (start_inferior): Change return type to int.
16358 (attach_inferior): Change sigptr to int *.
16359 (handle_v_cont, handle_v_requests): Change signal to int *.
16360 (main): Change signal to int.
16362 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16364 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16365 * configure.srv: Add m32r*-*-linux*.
16366 * linux-m32r-low.c: New file.
16368 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16370 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16372 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16374 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16375 Take unsigned long arguments for PIDs.
16376 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16377 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16378 (wait_for_sigstop, linux_resume_one_process)
16379 (regsets_fetch_inferior_registers, linux_send_signal)
16380 (linux_read_auxv): Likewise. Update the types of variables holding
16381 PIDs. Update format string specifiers.
16382 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16383 * remote-utils.c (prepare_resume_reply): Likewise.
16384 * server.c (cont_thread, general_thread, step_thread)
16385 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16387 (handle_query): Update format specifiers.
16388 (handle_v_cont, main): Use strtoul for thread IDs.
16389 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16390 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16391 (general_thread, step_thread, thread_from_wait)
16392 (old_thread_from_wait): Update.
16393 * target.h (struct thread_resume): Use unsigned long for THREAD.
16394 (struct target_ops): Use unsigned long for arguments to attach and
16397 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16399 * acinclude.m4: Include bfd/bfd.m4 directly.
16400 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16401 <agriffis@toolchain.org>.
16402 * aclocal.m4, configure: Regenerated.
16404 2005-01-07 Andrew Cagney <cagney@gnu.org>
16406 * configure.ac: Rename configure.in, require autoconf 2.59.
16407 * configure: Re-generate.
16409 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16411 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16412 LIBS when finished.
16413 * aclocal.m4: Regenerated.
16414 * configure: Regenerated.
16416 2004-11-21 Andreas Schwab <schwab@suse.de>
16418 * linux-m68k-low.c (m68k_num_gregs): Define.
16419 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16420 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16421 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16422 (m68k_breakpoint_at): New. Add to the_low_target.
16424 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16425 srv_linux_thread_db to yes.
16427 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16429 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16430 (ARCH_SET_FS): Likewise.
16431 (ARCH_GET_FS): Likewise.
16432 (ARCH_GET_GS): Likewise.
16434 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16436 * linux-i386-low.c (ps_get_thread_area): New.
16437 * linux-x86-64-low.c (ps_get_thread_area): New.
16438 * linux-low.c: Include <sys/syscall.h>.
16439 (linux_kill_one_process): Don't kill the first thread here.
16440 (linux_kill): Kill the first thread here.
16441 (kill_lwp): New function.
16442 (send_sigstop, linux_send_signal): Use it.
16443 * proc-service.c: Clean up #ifdefs.
16444 (fpregset_info): Delete.
16445 (ps_lgetregs): Update and enable implementation.
16446 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16448 * remote-utils.c (struct sym_cache, symbol_cache): New.
16449 (input_interrupt): Print a clearer message.
16450 (async_io_enabled): New variable.
16451 (enable_async_io, disable_async_io): Use it. Update comments.
16452 (look_up_one_symbol): Use the symbol cache.
16453 * thread-db.c (thread_db_look_up_symbols): New function.
16454 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16456 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16458 * configure.in: Test for -rdynamic.
16459 * configure: Regenerated.
16460 * Makefile (INTERNAL_LDFLAGS): New.
16461 (gdbserver, gdbreplay): Use it.
16463 2004-09-02 Andrew Cagney <cagney@gnu.org>
16465 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16467 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16469 * linux-low.c (linux_wait): Clear all_processes list also.
16471 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16473 * linux-low.c: Include <errno.h>. Remove extern declaration of
16476 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16478 * gdbreplay.c, server.h, utils.c: Update copyright years.
16480 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16482 * server.c (main): Print child status or termination signal from
16483 variable 'signal', not 'sig'.
16485 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16487 * linux-low.c (linux_read_memory): Change return type to
16488 int. Check for and return error from ptrace().
16489 * target.c (read_inferior_memory): Change return type to int. Pass
16490 back return status from the_target->read_memory().
16491 * target.h (struct target_ops): Adapt *read_memory() prototype.
16493 (read_inferior_memory): Adapt prototype.
16494 * server.c (main): Return an error packet if
16495 read_inferior_memory() returns an error.
16497 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16499 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16500 Unify with other clean targets.
16502 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16504 * server.c (handle_v_cont): Call set_desired_inferior.
16506 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16508 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16510 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16512 * linux-low.c (linux_wait): Unblock async I/O.
16513 (linux_resume): Block and enable async I/O.
16514 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16515 * server.h (block_async_io, unblock_async_io): Add prototypes.
16517 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16519 * remote-utils.c (remote_open): Print a status notice after
16520 opening a TCP port.
16521 * server.c (attach_inferior): Print a status notice after
16524 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16526 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16528 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16530 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16532 * server.c, target.h: Update copyright years.
16534 2004-02-25 Roland McGrath <roland@redhat.com>
16536 * target.h (struct target_ops): New member `read_auxv'.
16537 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16538 * linux-low.c (linux_read_auxv): New function.
16539 (linux_target_ops): Initialize `read_auxv' member to that.
16541 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16543 Committed by Jim Blandy <jimb@redhat.com>.
16545 * linux-s390-low.c (s390_num_regs): Update.
16546 (s390_regmap): Remove control registers. Use __s390x__ predefine
16547 instead of GPR_SIZE to distiguish s390 and s390x targets.
16549 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16551 * linux-low.c: Update copyright year.
16552 (check_removed_breakpoint): Clear pending_is_breakpoint.
16553 (linux_set_resume_request, linux_queue_one_thread)
16554 (resume_status_pending_p): New functions.
16555 (linux_continue_one_thread): Use process->resume.
16556 (linux_resume): Only resume threads if there are no pending events.
16557 * linux-low.h (struct process_info): Add resume request
16560 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16562 * regcache.c (new_register_cache): Clear the allocated register
16563 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16565 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16567 * linux-low.c (linux_resume): Take a struct thread_resume *
16569 (linux_wait): Update call.
16570 (resume_ptr): New static variable.
16571 (linux_continue_one_thread): Renamed from
16572 linux_continue_one_process. Use resume_ptr.
16573 (linux_resume): Use linux_continue_one_thread.
16574 * server.c (handle_v_cont, handle_v_requests): New functions.
16575 (myresume): New function.
16576 (main): Handle 'v' case.
16577 * target.h (struct thread_resume): New type.
16578 (struct target_ops): Change argument of "resume" to struct
16580 (myresume): Delete macro.
16582 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16584 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16585 (uninstall): Support DESTDIR.
16587 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16589 * configure.srv: Add xscale*linux copy of arm*linux entry.
16591 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16593 * linux-arm-low.c (arm_reinsert_addr): New function.
16594 (the_low_target): Add arm_reinsert_addr.
16596 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16598 * mem-break.c: Remove whitespace at end of file.
16600 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16602 * configure.in: Check whether we need to prototype strerror.
16603 * server.h: Optionally prototype strerror.
16604 * gdbreplay.c (perror_with_name): Use strerror.
16605 * linux-low.c (linux_attach_lwp): Use strerror.
16606 * utils.c (perror_with_name): Use strerror.
16607 * config.in, configure: Regenerated.
16609 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16611 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16612 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16614 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16616 * Makefile.in (SFILES): Update.
16617 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16618 low-sun3.c: Remove files.
16620 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16622 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16623 (linux_detach_one_process, linux_detach): New functions.
16624 (linux_target_ops): Add linux_detach.
16625 * server.c (main): Handle 'D' packet.
16626 * target.h (struct target_ops): Add "detach" member.
16627 (detach_inferior): Define.
16629 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16631 From Kelley Cook <kelleycook@wideopenwest.com>:
16632 * configure.srv: Accept i[34567]86 variants.
16634 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16636 * linux-low.c (linux_wait_for_event): Correct comment typos.
16637 (linux_resume_one_process): Call check_removed_breakpoint.
16638 (linux_send_signal): New function.
16639 (linux_target_ops): Add linux_send_signal.
16640 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16642 * target.h (struct target_ops): Add send_signal.
16644 2003-05-29 Jim Blandy <jimb@redhat.com>
16646 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16647 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16648 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16649 away part of the register's value.
16651 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16653 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16654 (linux_wait_for_event, linux_init_signals): Likewise.
16656 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16658 * configure.in: Check for stdlib.h.
16659 * configure: Regenerated.
16660 * config.in: Regenerated.
16662 2003-01-04 Andreas Schwab <schwab@suse.de>
16664 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16666 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16668 * Makefile.in: Remove obsolete code.
16670 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16672 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16673 defined(PT_FPR0_HI).
16675 2002-11-17 Stuart Hughes <seh@zee2.com>
16677 * linux-arm-low.c (arm_num_regs): Increase.
16678 (arm_regmap): Include status register.
16680 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16682 * linux-low.c (register_addr): Remove incorrect -1 check.
16684 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16686 * linux-low.c (linux_create_inferior): Call setpgid. Return
16688 (unstopped_p, linux_signal_pid): Remove.
16689 (linux_target_ops): Remove linux_signal_pid.
16690 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16691 global instead of target method.
16692 * target.h (struct target_ops): Remove signal_pid. Update comment
16693 for create_inferior.
16694 * server.c (signal_pid): New variable.
16695 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16696 gdbserver. Set the child to be the foreground process group.
16697 (attach_inferior): Set signal_pid.
16699 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16701 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16703 2002-08-20 Jim Blandy <jimb@redhat.com>
16705 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16708 2002-08-01 Andrew Cagney <cagney@redhat.com>
16710 * Makefile.in: Make chill references obsolete.
16712 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16714 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16715 * configure: Regenerate.
16716 * config.in: Regenerate.
16718 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16720 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16721 (perror_with_name, remote_close, remote_open, expect, play): Static.
16723 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16725 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16726 byte offsets instead of an array of indexes.
16727 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16729 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16731 * regcache.c: Add comment.
16733 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16735 * thread-db.c: New file.
16736 * proc-service.c: New file.
16737 * acinclude.m4: New file.
16738 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16739 proc-service.o, and thread-db.o.
16740 (linux-low.o): Add USE_THREAD_DB.
16741 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16742 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16743 * aclocal.m4: Regenerated.
16744 * config.in: Regenerated.
16745 * configure: Regenerated.
16746 * configure.in: Check for proc_service.h, sys/procfs.h,
16747 thread_db.h, and linux/elf.h headrs.
16748 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16749 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16750 Check for -lthread_db and thread support.
16751 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16752 PowerPC, and SuperH.
16753 * i387-fp.c: Constify arguments.
16754 * i387-fp.h: Likewise.
16755 * inferiors.c: (struct thread_info): Renamed from
16756 `struct inferior_info'. Remove PID member. Use generic inferior
16757 list header. All uses updated.
16758 (inferiors, signal_pid): Removed.
16759 (all_threads): New variable.
16760 (get_thread): Define.
16761 (add_inferior_to_list): New function.
16762 (for_each_inferior): New function.
16763 (change_inferior_id): New function.
16764 (add_inferior): Removed.
16765 (remove_inferior): New function.
16766 (add_thread): New function.
16767 (free_one_thread): New function.
16768 (remove_thread): New function.
16769 (clear_inferiors): Use for_each_inferior and free_one_thread.
16770 (find_inferior): New function.
16771 (find_inferior_id): New function.
16772 (inferior_target_data): Update argument type.
16773 (set_inferior_target_data): Likewise.
16774 (inferior_regcache_data): Likewise.
16775 (set_inferior_regcache_data): Likewise.
16776 * linux-low.c (linux_bp_reinsert): Remove.
16777 (all_processes, stopping_threads, using_thrads)
16778 (struct pending_signals, debug_threads, pid_of): New.
16779 (inferior_pid): Replace with macro.
16780 (struct inferior_linux_data): Remove.
16781 (get_stop_pc, add_process): New functions.
16782 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16783 Use add_process and add_thread.
16784 (linux_attach_lwp): New function, based on old linux_attach. Use
16785 add_process and add_thread. Set stop_expected for new threads.
16786 (linux_attach): New function.
16787 (linux_kill_one_process): New function.
16788 (linux_kill): Kill all LWPs.
16789 (linux_thread_alive): Use find_inferior_id.
16790 (check_removed_breakpoints, status_pending_p): New functions.
16791 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16792 Update. Use WNOHANG. Wait for cloned processes also. Update process
16793 struct for the found process.
16794 (linux_wait_for_event): New function.
16795 (linux_wait): Use it. Support LWPs.
16796 (send_sigstop, wait_for_sigstop, stop_all_processes)
16797 (linux_resume_one_process, linux_continue_one_process): New functions.
16798 (linux_resume): Support LWPs.
16799 (REGISTER_RAW_SIZE): Remove.
16800 (fetch_register): Use register_size instead. Call supply_register.
16801 (usr_store_inferior_registers): Likewise. Call collect_register.
16802 Fix recursive case.
16803 (regsets_fetch_inferior_registers): Improve error message.
16804 (regsets_store_inferior_registers): Add debugging.
16805 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16806 (unstopped_p, linux_signal_pid): New functions.
16807 (linux_target_ops): Add linux_signal_pid.
16808 (linux_init_signals): New function.
16809 (initialize_low): Call it. Initialize using_threads.
16810 * regcache.c (inferior_regcache_data): Add valid
16812 (get_regcache): Fetch registers lazily. Add fetch argument
16813 and update all callers.
16814 (regcache_invalidate_one, regcache_invalidate): New
16816 (new_register_cache): Renamed from create_register_cache.
16817 Return the new regcache.
16818 (free_register_cache): Change argument to a void *.
16819 (registers_to_string, registers_from_string): Call get_regcache
16820 with fetch flag set.
16821 (register_data): Make static. Pass fetch flag to get_regcache.
16822 (supply_register): Call get_regcache with fetch flag clear.
16823 (collect_register): Call get_regcache with fetch flag set.
16824 (collect_register_as_string): New function.
16825 * regcache.h: Update.
16826 * remote-utils.c (putpkt): Flush after debug output and use
16828 Handle input interrupts while waiting for an ACK.
16829 (input_interrupt): Use signal_pid method.
16830 (getpkt): Flush after debug output and use stderr.
16831 (outreg): Use collect_register_as_string.
16832 (new_thread_notify, dead_thread_notify): New functions.
16833 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16834 and general_thread.
16835 (look_up_one_symbol): Flush after debug output.
16836 * server.c (step_thread, server_waiting): New variables.
16837 (start_inferior): Don't use signal_pid. Update call to mywait.
16838 (attach_inferior): Update call to mywait.
16839 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16840 (main): Don't fetch/store registers explicitly. Use
16841 set_desired_inferior. Support proposed ``Hs'' packet. Update
16843 * server.h: Update.
16844 (struct inferior_list, struct_inferior_list_entry): New.
16845 * target.c (set_desired_inferior): New.
16846 (write_inferior_memory): Constify.
16847 (mywait): New function.
16848 * target.h: Update.
16849 (struct target_ops): New signal_pid method.
16850 (mywait): Removed macro, added prototype.
16852 * linux-low.h (regset_func): Removed.
16853 (regset_fill_func, regset_store_func): New.
16854 (enum regset_type): New.
16855 (struct regset_info): Add type field. Use new operation types.
16856 (struct linux_target_ops): stop_pc renamed to get_pc.
16857 Add decr_pc_after_break and breakpoint_at.
16858 (get_process, get_thread_proess, get_process_thread)
16859 (strut process_info, all_processes, linux_attach_lwp)
16860 (thread_db_init): New.
16862 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16863 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16864 (the_low_target): Add new members.
16865 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16866 (i386_store_fpxregset): Constify.
16867 (target_regsets): Add new kind identifier.
16868 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16869 (i386_set_pc): Add debugging.
16870 (i386_breakpoint_at): New function.
16871 (the_low_target): Add new members.
16872 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16873 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16874 (mips_breakpoint_at): New.
16875 (the_low_target): Add new members.
16876 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16877 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16878 (the_low_target): Add new members.
16879 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16880 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16881 (the_low_target): Add new members.
16882 * linux-x86-64-low.c (target_regsets): Add new kind
16885 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16887 From Martin Pool <mbp@samba.org>:
16888 * server.c (gdbserver_usage): New function.
16891 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16893 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16894 stop_at -> stop_pc.
16896 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16898 * Makefile.in: Remove obsolete code.
16900 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16902 * linux-low.c (regsets_fetch_inferior_registers),
16903 (regsets_store_inferior_registers): Removed cast to int from
16905 * regcache.h: Added declaration of struct inferior_info.
16907 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16909 * inferiors.c (struct inferior_info): Add regcache_data.
16910 (add_inferior): Call create_register_cache.
16911 (clear_inferiors): Call free_register_cache.
16912 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16913 * regcache.c (struct inferior_regcache_data): New.
16914 (registers): Remove.
16915 (get_regcache): New function.
16916 (create_register_cache, free_register_cache): New functions.
16917 (set_register_cache): Don't initialize the register cache here.
16918 (registers_to_string, registers_from_string, register_data): Call
16920 * regcache.h: Add prototypes.
16921 * server.h: Likewise.
16923 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16925 * mem-break.c: New file.
16926 * mem-break.h: New file.
16927 * Makefile.in: Add mem-break.o rule; update server.h
16929 * inferiors.c (struct inferior_info): Add target_data
16931 (clear_inferiors): Free target_data member if set.
16932 (inferior_target_data, set_inferior_target_data): New functions.
16933 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16934 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16935 * linux-low.c (linux_bp_reinsert): New variable.
16936 (struct inferior_linux_data): New.
16937 (linux_create_inferior): Use set_inferior_target_data.
16938 (linux_attach): Likewise. Call add_inferior.
16939 (linux_wait_for_one_inferior): New function.
16940 (linux_wait): Call it.
16941 (linux_write_memory): Add const.
16942 (initialize_low): Call set_breakpoint_data.
16943 * linux-low.h (struct linux_target_ops): Add breakpoint
16945 * server.c (attach_inferior): Remove extra add_inferior
16947 * server.h: Include mem-break.h. Update inferior.c
16949 * target.c (read_inferior_memory)
16950 (write_inferior_memory): New functions.
16951 * target.h (read_inferior_memory)
16952 (write_inferior_memory): Change macros to prototypes.
16953 (struct target_ops): Update comments. Add const to write_memory
16956 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16958 * linux-low.c (usr_store_inferior_registers): Support
16959 registers which are allowed to fail to store.
16960 * linux-low.h (linux_target_ops): Likewise.
16961 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16962 (ppc_cannot_store_register): FPSCR may not be storable.
16964 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16966 * server.h: Include <string.h> if HAVE_STRING_H.
16967 * ChangeLog: Correct paths in last ChangeLog entry.
16969 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16971 * linux-low.h: Remove obsolete prototypes.
16972 (struct linux_target_ops): New.
16973 (extern the_low_target): New.
16974 * linux-low.c (num_regs, regmap): Remove declarations.
16975 (register_addr): Use the_low_target explicitly.
16976 (fetch_register): Likewise.
16977 (usr_fetch_inferior_registers): Likewise.
16978 (usr_store_inferior_registers): Likewise.
16979 * linux-arm-low.c (num_regs): Remove.
16980 (arm_num_regs): Define.
16981 (arm_regmap): Renamed from regmap, made static.
16982 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16984 (arm_cannot_store_register): Renamed from cannot_store_register,
16986 (the_low_target): New.
16987 * linux-i386-low.c (num_regs): Remove.
16988 (i386_num_regs): Define.
16989 (i386_regmap): Renamed from regmap, made static.
16990 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16992 (i386_cannot_store_register): Renamed from cannot_store_register,
16994 (the_low_target): New.
16995 * linux-ia64-low.c (num_regs): Remove.
16996 (ia64_num_regs): Define.
16997 (ia64_regmap): Renamed from regmap, made static.
16998 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17000 (ia64_cannot_store_register): Renamed from cannot_store_register,
17002 (the_low_target): New.
17003 * linux-m68k-low.c (num_regs): Remove.
17004 (m68k_num_regs): Define.
17005 (m68k_regmap): Renamed from regmap, made static.
17006 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17008 (m68k_cannot_store_register): Renamed from cannot_store_register,
17010 (the_low_target): New.
17011 * linux-mips-low.c (num_regs): Remove.
17012 (mips_num_regs): Define.
17013 (mips_regmap): Renamed from regmap, made static.
17014 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17016 (mips_cannot_store_register): Renamed from cannot_store_register,
17018 (the_low_target): New.
17019 * linux-ppc-low.c (num_regs): Remove.
17020 (ppc_num_regs): Define.
17021 (ppc_regmap): Renamed from regmap, made static.
17022 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17024 (ppc_cannot_store_register): Renamed from cannot_store_register,
17026 (the_low_target): New.
17027 * linux-s390-low.c (num_regs): Remove.
17028 (s390_num_regs): Define.
17029 (s390_regmap): Renamed from regmap, made static.
17030 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17032 (s390_cannot_store_register): Renamed from cannot_store_register,
17034 (the_low_target): New.
17035 * linux-sh-low.c (num_regs): Remove.
17036 (sh_num_regs): Define.
17037 (sh_regmap): Renamed from regmap, made static.
17038 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17040 (sh_cannot_store_register): Renamed from cannot_store_register,
17042 (the_low_target): New.
17043 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17044 (the_low_target): New.
17046 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17048 * Makefile.in: Add stamp-h target.
17049 * configure.in: Create stamp-h.
17050 * configure: Regenerated.
17052 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17054 * inferiors.c: New file.
17055 * target.c: New file.
17056 * target.h: New file.
17057 * Makefile.in: Add target.o and inferiors.o. Update
17059 * linux-low.c (inferior_pid): New static variable,
17060 moved from server.c.
17061 (linux_create_inferior): Renamed from create_inferior.
17062 Call add_inferior. Return 0 on success instead of a PID.
17063 (linux_attach): Renamed from myattach.
17064 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17065 (linux_thread_alive): Renamed from mythread_alive.
17066 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17068 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17069 (regsets_store_inferior_registers): Correct error message.
17070 Add missing ``return 0''.
17071 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17072 (linux_store_registers): Renamed from store_inferior_registers.
17073 (linux_read_memory): Renamed from read_inferior_memory.
17074 (linux_write_memory): Renamed from write_inferior_memory.
17075 (linux_target_ops): New structure.
17076 (initialize_low): Call set_target_ops ().
17077 * remote-utils.c (unhexify): New function.
17078 (hexify): New function.
17079 (input_interrupt): Send signals to ``signal_pid''.
17080 * server.c (inferior_pid): Remove.
17081 (start_inferior): Update create_inferior call.
17082 (attach_inferior): Call add_inferior.
17083 (handle_query): New function.
17084 (main): Call handle_query for `q' packets.
17085 * server.h: Include "target.h". Remove obsolete prototypes.
17086 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17088 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17090 * Makefile.in: Add WARN_CFLAGS. Update configury
17092 * configure.in: Check for <string.h>
17093 * configure: Regenerate.
17094 * config.in: Regenerate.
17095 * gdbreplay.c: Include needed system headers.
17096 (remote_open): Remove strchr prototype.
17097 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17098 * regcache.c (supply_register): Change buf argument to const void *.
17099 (supply_register_by_name): Likewise.
17100 (collect_register): Change buf argument to void *.
17101 (collect_register_by_name): Likewise.
17102 * regcache.h: Add missing prototypes.
17103 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17104 * server.c (handle_query): New function.
17105 (attached): New static variable, moved out of main.
17106 (main): Quiet longjmp clobber warnings.
17107 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17108 * utils.c (error): Remove NORETURN.