1 2019-02-07 Alan Hayward <alan.hayward@arm.com>
3 * linux-low.c (linux_attach): Add process before lwp.
4 * server.c (attach_inferior): Check if already attached.
6 2019-02-07 Tom Tromey <tom@tromey.com>
8 * x86-tdesc.h: Rename include guard.
9 * x86-low.h: Add include guard.
10 * wincecompat.h: Rename include guard.
11 * win32-low.h: Add include guard.
12 * utils.h: Rename include guard.
13 * tracepoint.h: Rename include guard.
14 * tdesc.h: Rename include guard.
15 * target.h: Rename include guard.
16 * server.h: Rename include guard.
17 * remote-utils.h: Rename include guard.
18 * regcache.h: Rename include guard.
19 * nto-low.h: Rename include guard.
20 * notif.h: Add include guard.
21 * mem-break.h: Rename include guard.
22 * lynx-low.h: Add include guard.
23 * linux-x86-tdesc.h: Add include guard.
24 * linux-s390-tdesc.h: Add include guard.
25 * linux-ppc-tdesc-init.h: Add include guard.
26 * linux-low.h: Add include guard.
27 * linux-aarch64-tdesc.h: Add include guard.
28 * linux-aarch32-low.h: Add include guard.
29 * inferiors.h: Rename include guard.
30 * i387-fp.h: Rename include guard.
31 * hostio.h: Rename include guard.
32 * gdbthread.h: Rename include guard.
33 * gdb_proc_service.h: Rename include guard.
34 * event-loop.h: Rename include guard.
35 * dll.h: Rename include guard.
36 * debug.h: Rename include guard.
37 * ax.h: Rename include guard.
39 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
42 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
43 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
45 2019-01-25 Tom Tromey <tom@tromey.com>
47 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
49 2019-01-25 Tom Tromey <tom@tromey.com>
51 * win32-low.c: Fix common/ includes.
52 * win32-i386-low.c: Fix common/ includes.
53 * tracepoint.c: Fix common/ includes.
54 * thread-db.c: Fix common/ includes.
55 * target.h: Fix common/ includes.
56 * symbol.c: Fix common/ includes.
57 * spu-low.c: Fix common/ includes.
58 * server.h: Fix common/ includes.
59 * server.c: Fix common/ includes.
60 * remote-utils.c: Fix common/ includes.
61 * regcache.h: Fix common/ includes.
62 * regcache.c: Fix common/ includes.
63 * nto-x86-low.c: Fix common/ includes.
64 * notif.h: Fix common/ includes.
65 * mem-break.h: Fix common/ includes.
66 * lynx-low.c: Fix common/ includes.
67 * lynx-i386-low.c: Fix common/ includes.
68 * linux-x86-tdesc-selftest.c: Fix common/ includes.
69 * linux-x86-low.c: Fix common/ includes.
70 * linux-low.c: Fix common/ includes.
71 * inferiors.h: Fix common/ includes.
72 * i387-fp.c: Fix common/ includes.
73 * hostio.c: Fix common/ includes.
74 * hostio-errno.c: Fix common/ includes.
75 * gdbthread.h: Fix common/ includes.
76 * gdbreplay.c: Fix common/ includes.
77 * fork-child.c: Fix common/ includes.
78 * event-loop.c: Fix common/ includes.
80 (enum gdb_agent_op): Fix common/ includes.
82 2019-01-21 Tom Tromey <tom@tromey.com>
84 * tracepoint.c: Fix includes.
85 * remote-utils.c: Fix includes.
86 * linux-x86-low.c: Fix includes.
88 2019-01-01 Joel Brobecker <brobecker@adacore.com>
90 * gdbreplay.c (gdbreplay_version): Update copyright year in
92 * server.c (gdbserver_version): Likewise.
94 2018-12-05 Alan Hayward <alan.hayward@arm.com>
96 * linux-low.c (add_lwp): Switch ordering.
98 2018-11-29 Tom Tromey <tom@tromey.com>
100 * win32-low.c (win32_join): Take pid, not process.
101 * target.h (struct target_ops) <join>: Change argument type.
102 (join_inferior): Change argument name.
103 * spu-low.c (spu_join): Take pid, not process.
104 * server.c (handle_detach): Preserve pid before destroying
106 * lynx-low.c (lynx_join): Take pid, not process.
107 * linux-low.c (linux_join): Take pid, not process.
109 2018-11-23 Alan Hayward <alan.hayward@arm.com>
111 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
112 (aarch64_cannot_fetch_register): Likewise.
113 (struct linux_target_ops): Update references.
115 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
117 * linux-ppc-low.c: Include nat/linux-ptrace.h.
119 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
121 * configure.srv (ipa_ppc_linux_regobj): Add
122 powerpc-isa207-htm-vsx32l-ipa.o and
123 powerpc-isa207-htm-vsx64l-ipa.o.
124 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
125 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
126 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
127 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
128 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
129 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
130 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
131 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
132 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
133 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
134 (init_registers_powerpc_isa207_htm_vsx32l)
135 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
136 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
137 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
138 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
139 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
140 (ppc_store_tm_ctarregset): New functions.
141 (ppc_regsets): Add entries for HTM regsets.
142 (ppc_arch_setup): Set htm in features struct when needed. Set
143 sizes for the HTM regsets.
144 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
145 (initialize_low_arch): Call
146 init_registers_powerpc_isa207_htm_vsx32l and
147 init_registers_powerpc_isa207_htm_vsx64l.
148 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
149 PPC_TDESC_ISA207_HTM_VSX.
150 (initialize_low_tracepoint): Call
151 init_registers_powerpc_isa207_htm_vsx32l and
152 init_registers_powerpc_isa207_htm_vsx64l.
154 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
156 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
157 rs6000/power-linux-pmu.xml to srv_xmlfiles.
158 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
159 (ppc_store_pmuregset): New functions.
160 (ppc_regsets): Add entries for ebb and pmu regsets.
161 (ppc_arch_setup): Set isa207 in features struct if the ebb and
162 pmu regsets are available. Set sizes for these regsets.
164 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
166 * configure.srv (ipa_ppc_linux_regobj): Add
167 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
168 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
169 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
170 rs6000/powerpc-isa207-vsx32l.xml, and
171 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
172 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
173 <PPC_TDESC_ISA207_VSX>: New enum value.
174 (init_registers_powerpc_isa207_vsx32l): Declare.
175 (init_registers_powerpc_isa207_vsx64l): Declare.
176 * linux-ppc-low.c (ppc_fill_tarregset): New function.
177 (ppc_store_tarregset): New function.
178 (ppc_regsets): Add entry for the TAR regset.
179 (ppc_arch_setup): Set isa207 in features struct when needed. Set
180 size for the TAR regsets.
181 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
182 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
183 and init_registers_powerpc_isa207_vsx64l.
184 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
185 (initialize_low_tracepoint): Call
186 init_registers_powerpc_isa207_vsx32l and
187 init_registers_powerpc_isa207_vsx64l.
189 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
190 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
192 * configure.srv (ipa_ppc_linux_regobj): Add
193 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
194 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
195 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
196 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
197 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
198 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
199 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
200 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
201 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
202 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
203 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
204 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
205 (ppc_hwcap): Add comment.
206 (ppc_hwcap2): New global.
207 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
208 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
209 (ppc_regsets): Add entries for the DSCR and PPR regsets.
210 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
211 when needed. Set sizes for the the DSCR and PPR regsets.
212 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
213 (initialize_low_arch): Call
214 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
215 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
216 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
217 PPC_TDESC_ISA205_PPR_DSCR_VSX.
218 (initialize_low_tracepoint): Call
219 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
220 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
222 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
224 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
226 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
227 Simon Marchi <simark@simark.ca>
229 * acinclude.m4: Include "../selftest.m4".
230 * configure: Regenerate.
231 * configure.ac: Use "GDB_AC_SELFTEST".
232 * configure.srv: Use "$enable_unittests" instead of
233 "$development" when checking whether unit tests have been
235 * server.c (captured_main): Update message informing that
236 selftests have been disabled.
238 2018-10-04 Tom Tromey <tom@tromey.com>
240 * configure: Rebuild.
242 2018-10-04 Tom Tromey <tom@tromey.com>
244 * server.c (handle_status): Rename inner "thread".
245 (process_serial_event): Declare "res" in 'm' case.
246 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
247 (iterate_over_lwps): Rename inner "thread".
248 (linux_qxfer_libraries_svr4): Rename inner "len".
249 * gdbthread.h (find_thread_in_random): Rename inner "thread".
251 2018-10-01 Gary Benson <gbenson@redhat.com>
253 * gdb_proc_service.h: Moved common code to
254 common/gdb_proc_service.h.
256 2018-10-01 Gary Benson <gbenson@redhat.com>
258 * gdb_proc_service.h: Synchronize comments and whitespace with
259 GDB's version of this file.
261 2018-09-25 Tom Tromey <tom@tromey.com>
263 * configure: Rebuild.
264 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
266 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
268 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
269 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
270 ($(IPA_LIB)): Sort IPA_OBJS.
272 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
274 * Makefile.in: Remove references to $(ADD_DEPS).
276 2018-09-16 Tom Tromey <tom@tromey.com>
278 * remote-utils.c (remote_open): Use GNU style for metasyntactic
280 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
283 2018-09-05 Tom Tromey <tom@tromey.com>
285 * configure: Rebuild.
287 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
290 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
292 2018-08-27 Tom Tromey <tom@tromey.com>
295 * configure: Rebuild.
297 2018-08-27 Tom Tromey <tom@tromey.com>
299 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
300 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
301 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
302 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
303 (s390x_emit_stack_adjust): Add casts to unsigned char.
305 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
309 * server.h (struct client_state) <disable_randomization>:
312 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
314 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
316 (mips_supply_ptrace_register): Likewise.
318 2018-07-22 Tom Tromey <tom@tromey.com>
320 * configure: Rebuild.
322 2018-07-22 Tom Tromey <tom@tromey.com>
324 * win32-low.c (win32_create_inferior): Remove unused variables.
325 * gdbreplay.c (remote_open): Remove unused variable.
326 * remote-utils.c (remote_prepare): Remove unused variable.
327 * x86-tdesc.h (X86_TDESC_H): Define.
328 (amd64_expedite_regs): Define conditionally.
329 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
330 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
331 * remote-utils.c (readchar): Remove unused variable.
333 2018-07-13 Pedro Alves <palves@redhat.com>
335 * linux-low.c (linux_kill): Change parameter to process_info
336 pointer instead of pid. Adjust.
337 * lynx-low.c (lynx_kill): Likewise.
338 * nto-low.c (nto_kill): Likewise.
339 * spu-low.c (spu_kill): Likewise.
340 * win32-low.c (win32_kill): Likewise.
341 * server.c (handle_v_kill, kill_inferior_callback)
342 (detach_or_kill_for_exit): Adjust.
343 * target.c (kill_inferior): Change parameter to process_info
344 pointer instead of pid. Adjust.
345 * target.h (struct target_ops) <kill>: Change parameter to
346 process_info pointer instead of pid. Adjust all implementations
348 (kill_inferior): Likewise.
350 2018-07-13 Pedro Alves <palves@redhat.com>
352 * linux-low.c (linux_detach, linux_join): Change parameter to
353 process_info pointer instead of pid. Adjust.
354 * lynx-low.c (lynx_detach, lynx_join): Likewise.
355 * nto-low.c (nto_detach): Likewise.
356 * spu-low.c (spu_detach, spu_join): Likewise.
357 * win32-low.c (win32_detach, win32_join): Likewise.
358 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
359 * target.h (struct target_ops) <detach, join>: Change parameter to
360 process_info pointer instead of pid. Adjust all implementations
362 (detach_inferior, join_inferior): Rename 'pid' parameter to
365 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
366 Jan Kratochvil <jan.kratochvil@redhat.com>
367 Paul Fertser <fercerpav@gmail.com>
368 Tsutomu Seki <sekiriki@gmail.com>
370 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
371 (OBS): Add 'common/netstuff.o'.
372 (GDBREPLAY_OBS): Likewise.
373 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
374 (remote_open): Implement support for IPv6
376 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
378 (handle_accept_event): Accept connections from IPv6 sources.
379 (remote_prepare): Handle IPv6-style hostnames; implement
380 support for IPv6 connections.
381 (remote_open): Implement support for printing connections from
384 2018-07-11 Pedro Alves <palves@redhat.com>
387 * mem-break.c (any_persistent_commands): Add process_info
388 parameter and use it instead of relying on the current process.
389 Change return type to bool.
390 * mem-break.h (any_persistent_commands): Add process_info
391 parameter and change return type to bool.
392 * server.c (handle_detach): Remove require_running_or_return call.
393 Look up the process_info for the process we're about to detach.
394 If not found, return back error to GDB. Adjust
395 any_persistent_commands call to pass down a process pointer.
397 2018-07-11 Pedro Alves <palves@redhat.com>
399 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
400 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
401 instead of collect_register_by_name.
402 * regcache.c (regcache_raw_get_unsigned_by_name): New.
403 * regcache.h (regcache_raw_get_unsigned_by_name): New.
405 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
406 Pedro Alves <palves@redhat.com>
408 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
410 2018-07-03 Tom Tromey <tom@tromey.com>
412 * linux-low.c: Update.
413 * lynx-low.c: Update.
414 * mem-break.c: Update.
416 * remote-utils.c: Update.
420 * win32-low.c: Update.
422 2018-07-03 Tom Tromey <tom@tromey.com>
426 2018-07-03 Tom Tromey <tom@tromey.com>
428 * linux-low.c: Update.
430 2018-07-03 Tom Tromey <tom@tromey.com>
434 2018-07-03 Tom Tromey <tom@tromey.com>
436 * linux-low.c: Update.
437 * linux-mips-low.c: Update.
438 * lynx-low.c: Update.
440 * remote-utils.c: Update.
444 * thread-db.c: Update.
446 2018-07-03 Tom Tromey <tom@tromey.com>
448 * linux-low.c: Update.
449 * linux-mips-low.c: Update.
450 * lynx-low.c: Update.
451 * mem-break.c: Update.
453 * remote-utils.c: Update.
457 * tracepoint.c: Update.
459 2018-07-03 Tom Tromey <tom@tromey.com>
461 * linux-low.c: Update.
462 * linux-ppc-low.c: Update.
463 * linux-x86-low.c: Update.
464 * proc-service.c: Update.
467 * thread-db.c: Update.
468 * win32-low.c: Update.
470 2018-07-03 Tom Tromey <tom@tromey.com>
472 * linux-low.c: Update.
473 * lynx-low.c: Update.
475 * remote-utils.c: Update.
477 * thread-db.c: Update.
478 * win32-low.c: Update.
480 2018-06-29 Joel Brobecker <brobecker@adacore.com>
482 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
483 parameter in call to 'amd64_create_target_description'.
485 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
487 * x86-tdesc.h: Remove executable permission flag.
489 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
491 * configure.ac: Remove AC_PREREQ, add missing quoting.
492 * configure: Re-generate.
493 * config.in: Re-generate.
494 * aclocal.m4: Re-generate.
496 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
498 * tracepoint.h (current_traceframe): Remove declaration.
500 2018-06-18 Alan Hayward <alan.hayward@arm.com>
502 * linux-aarch64-low.c (is_sve_tdesc): New function.
503 (aarch64_sve_regs_copy_to_regcache): Likewise.
504 (aarch64_sve_regs_copy_from_regcache): Likewise.
505 (aarch64_regs_info): Add SVE checks.
506 (initialize_low_arch): Initialize SVE.
508 2018-06-18 Alan Hayward <alan.hayward@arm.com>
510 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
512 2018-06-11 Alan Hayward <alan.hayward@arm.com>
514 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
515 (initialize_low_tracepoint): Likewise
516 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
517 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
519 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
521 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
523 2018-06-11 Alan Hayward <alan.hayward@arm.com>
525 * server.h (PBUFSIZ): Increase size
527 2018-06-11 Alan Hayward <alan.hayward@arm.com>
529 * regcache.c (regcache::raw_compare): New function.
530 * regcache.h (regcache::raw_compare): New declaration.
532 2018-06-11 Alan Hayward <alan.hayward@arm.com>
534 * regcache.c (new_register_cache): Use new.
535 (free_register_cache): Use delete.
536 (register_data): Use const.
537 (supply_register): Move body inside regcache.
538 (regcache::raw_supply): New override function.
539 (collect_register): Move body inside regcache.
540 (regcache::raw_collect): New override function.
541 (regcache::get_register_status): New override function.
542 * regcache.h (struct regcache): Inherit from reg_buffer_common.
544 2018-06-09 Tom Tromey <tom@tromey.com>
546 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
548 (event_queue): Use std::queue.
549 (gdb_event_xfree): Remove.
550 (initialize_event_loop, process_event, wait_for_event): Update.
552 2018-06-08 Stan Cox <scox@redhat.com>
554 * win32-low.c (win32_create_inferior): last_ptid and last_status
555 moved to client_state.
557 2018-06-08 Pedro Alves <palves@redhat.com>
559 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
560 common/common-exceptions.o, common/common-utils.o,
561 common/errors.o, common/print-utils.o and utils.o.
562 * gdbreplay.c: Include "common-defs.h" instead of the two
563 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
564 string.h or alloca.h.
565 (perror_with_name): Delete.
566 (remote_open): Use xstrdup instead of strdup.
567 (main): Rename to ...
568 (captured_main): ... this.
571 2018-06-08 Tom Tromey <tom@tromey.com>
573 * linux-low.c (linux_low_read_btrace): Update.
575 2018-06-04 Stan Cox <scox@redhat.com>
577 * server.h (struct client_state): New.
578 * server.c (cont_thread, general_thread, multi_process)
579 (report_fork_events, report_vfork_events, report_exec_events)
580 (report_thread_events, swbreak_feature, hwbreak_feature)
581 (vCont_supported, disable_randomization, pass_signals)
582 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
583 Moved to client_state.
584 * remote-utils.c (remote_debug, noack_mode)
585 (transport_is_reliable): Moved to client_state.
586 * tracepoint.c (current_traceframe): Moved to client_state.
589 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
590 linux-low.c, remote-utils.h, target.c: Use client_state.
592 2018-05-31 Alan Hayward <alan.hayward@arm.com>
594 * configure.srv: Add new c/h file.
596 2018-05-31 Alan Hayward <alan.hayward@arm.com>
598 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
601 2018-05-25 Maciej W. Rozycki <macro@mips.com>
603 * gdb.arch/mips-fpregset-core.exp: New test.
604 * gdb.arch/mips-fpregset-core.c: New test source.
606 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
609 * hostio.c (require_int): Do not report overflow for integers
610 between 0xfffffff and 0x7fffffff.
612 2018-05-22 Maciej W. Rozycki <macro@mips.com>
614 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
615 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
616 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
618 (the_low_target): Wire them.
620 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
622 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
623 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
624 mode. Call collect_register_by_name with vscr using
625 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
626 (ppc_store_vrregset): Add and set vscr_offset variable as in
627 ppc_fill_vrregset. Call supply_register_by_name with vscr using
630 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
632 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
633 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
634 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
636 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
638 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
639 (ppc_store_vsxregset): Likewise.
640 (ppc_fill_vrregset): Likewise.
641 (ppc_store_vrregset): Likewise.
642 (ppc_fill_evrregset): Likewise.
643 (ppc_store_evrregset): Likewise.
644 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
645 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
648 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
650 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
651 wordsize of the inferior. Call ppc_linux_target_wordsize.
653 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
655 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
656 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
657 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
658 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
659 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
660 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
661 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
662 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
663 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
664 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
665 (tdesc_powerpc_e500l): Remove.
666 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
667 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
668 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
669 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
671 (ppc_arch_setup): Remove target description matching code. Fill a
672 ppc_linux_features struct and call ppc_linux_match_description
675 2018-05-22 Maciej W. Rozycki <macro@mips.com>
677 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
678 width of the requested register exceeds the width of the
680 (mips_cannot_store_register): Likewise.
682 2018-05-21 Maciej W. Rozycki <macro@mips.com>
684 * linux-mips-low.c (mips_fetch_register): New function. Update
686 (mips_store_gregset): Supply 0 rather than $restart for $zero.
687 (the_low_target): Wire `mips_fetch_register'.
689 2018-05-10 Joel Brobecker <brobecker@adacore.com>
691 * lynx-i386-low.c (LYNXOS_178): New macro.
692 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
693 the layout on LynxOS-178.
694 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
695 handle floating point registers that are not supported by
698 2018-05-10 Tom Tromey <tom@tromey.com>
700 * configure: Rebuild.
702 2018-05-10 Joel Brobecker <brobecker@adacore.com>
705 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
706 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
707 Use it to set the expedite_regs field in the given tdesc.
708 * x86-tdesc.h: New file.
709 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
710 Adjust following the addition of the new expedite_regs parameter
712 * linux-tic6x-low.c (tic6x_read_description): Likewise.
713 * linux-x86-tdesc.c: #include "x86-tdesc.h".
714 (i386_linux_read_description, amd64_linux_read_description):
715 Adjust following the addition of the new expedite_regs parameter
717 * lynx-i386-low.c: #include "x86-tdesc.h".
718 (lynx_i386_arch_setup): Adjust following the addition of the new
719 expedite_regs parameter to init_target_desc.
720 * nto-x86-low.c: #include "x86-tdesc.h".
721 (nto_x86_arch_setup): Adjust following the addition of the new
722 expedite_regs parameter to init_target_desc.
723 * win32-i386-low.c: #include "x86-tdesc.h".
724 (i386_arch_setup): Adjust following the addition of the new
725 expedite_regs parameter to init_target_desc.
727 2018-05-10 Joel Brobecker <brobecker@adacore.com>
730 * win32-low.c (win32_create_inferior): Add call to my_wait
731 setting last_status global.
733 2018-05-10 Joel Brobecker <brobecker@adacore.com>
736 * win32-low.c (create_process): Only call gdb_tilde_expand if
737 inferior_cwd is not NULL.
739 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
741 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
742 registers to the cache if their values have changed.
743 (i387_xsave_to_cache): Provide default values for x87 control
744 registers when these features are available, but disabled.
745 * regcache.c (supply_register_by_name_zeroed): New function.
746 * regcache.h (supply_register_by_name_zeroed): Declare new
749 2018-05-07 Tom Tromey <tom@tromey.com>
751 * configure: Rebuild.
753 2018-05-04 Tom Tromey <tom@tromey.com>
755 * configure: Rebuild.
757 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
758 Pedro Alves <palves@redhat.com>
760 * linux-aarch64-low.c (aarch64_stopped_data_address):
763 2018-04-27 Tom Tromey <tom@tromey.com>
765 * configure: Rebuild.
767 2018-04-23 Tom Tromey <tom@tromey.com>
769 * configure: Rebuild.
771 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
773 * Makefile.in (depcomp): Add "..".
774 (all_deps_files): New and use it.
776 2018-04-18 Alan Hayward <alan.hayward@arm.com>
778 * configure.srv (aarch64*-*-linux*): Don't include xml.
779 (i[34567]86-*-cygwin*): Likewise.
780 (i[34567]86-*-linux*): Likewise.
781 (i[34567]86-*-lynxos*): Likewise.
782 (i[34567]86-*-mingw32ce*): Likewise.
783 (i[34567]86-*-mingw*): Likewise.
784 (i[34567]86-*-nto*): Likewise.
785 (tic6x-*-uclinux): Likewise.
786 (x86_64-*-linux*): Likewise.
787 (x86_64-*-mingw*): Likewise.
788 (x86_64-*-cygwin*): Likewise.
790 2018-04-18 Alan Hayward <alan.hayward@arm.com>
792 * tdesc.c: Remove xml parameter.
794 2018-04-18 Alan Hayward <alan.hayward@arm.com>
796 * server.c (get_features_xml): Remove cast.
797 * tdesc.c (void target_desc::accept): Fill in function.
798 (tdesc_get_features_xml): Remove old xml creation.
799 (print_xml_feature::visit_pre): Add xml vistor.
800 * tdesc.h (struct target_desc): Make xmltarget mutable.
801 (tdesc_get_features_xml): Remove declaration.
803 2018-04-18 Alan Hayward <alan.hayward@arm.com>
805 * tdesc.c (tdesc_architecture_name): Add new function.
806 (tdesc_osabi_name): Likewise.
807 (tdesc_get_features_xml): Use new functions.
809 2018-04-18 Alan Hayward <alan.hayward@arm.com>
811 * tdesc.c (tdesc_create_flags): Remove.
812 (tdesc_add_flag): Likewise.
813 (tdesc_named_type): Likewise.
814 (tdesc_create_union): Likewise.
815 (tdesc_create_struct): Likewise.
816 (tdesc_create_vector): Likewise.
817 (tdesc_add_bitfield): Likewise.
818 (tdesc_add_field): Likewise.
819 (tdesc_set_struct_size): Likewise.
821 2018-04-18 Alan Hayward <alan.hayward@arm.com>
823 * tdesc.c (~target_desc): Remove implictly deleted items.
824 (init_target_desc): Iterate all features.
825 (tdesc_get_features_xml): Use vector.
826 (tdesc_create_feature): Create feature.
827 * tdesc.h (tdesc_feature) Remove
828 (target_desc): Add features.
830 2018-04-18 Alan Hayward <alan.hayward@arm.com>
832 * Makefile.in: Add common/tdesc.c
833 * tdesc.c (init_target_desc): init all reg_defs from register
835 (tdesc_create_reg): Create tdesc_reg.
836 * tdesc.h (tdesc_feature): Add register vector.
838 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
840 * tdesc.h (struct target_desc) <features>: Change type to
841 std::vector<std::string>.
842 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
844 (tdesc_get_features_xml): Likewise.
845 (tdesc_create_feature): Likewise.
847 2018-03-26 Alan Hayward <alan.hayward@arm.com>
849 * regcache.c (find_register_by_number): Return a ref.
850 (find_regno): Use references.
851 (register_size): Likewise.
852 (register_data): Likewise.
853 * tdesc.c (target_desc::~target_desc): Remove free calls.
854 (target_desc::operator==): Use std::vector compare.
855 (init_target_desc): Use reference.
856 (tdesc_create_reg): Use reg constructors.
857 * tdesc.h (struct target_desc): Replace pointer with object.
859 2018-03-23 Alan Hayward <alan.hayward@arm.com>
861 * regcache.c (find_register_by_number): Make static.
862 (find_regno): Use find_register_by_number
863 * regcache.h (struct reg): Remove declaration.
865 2018-03-23 Alan Hayward <alan.hayward@arm.com>
867 * tdesc.c (target_desc::~target_desc): Move to here.
868 (target_desc::operator==): Likewise.
869 * tdesc.h (target_desc::~target_desc): Move from here.
870 (target_desc::operator==): Likewise.
872 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
874 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
876 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
878 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
880 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
881 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
882 and init_registers_s390_gs_linux64.
884 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
886 * linux-s390-low.c (s390_fill_gs): Remove function.
887 (s390_fill_gsbc): Remove function.
888 (s390_regsets): Set fill functions for the guarded storage regsets
891 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
893 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
894 the word size. Add comment.
895 (s390_get_wordsize): New function.
896 (s390_arch_setup): No longer select a temporary tdesc to fetch the
897 pswm with it. Instead, use s390_get_wordsize to determine the
898 word size first and derive the correct tdesc from that directly.
900 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
902 * Makefile.in: Include silent-rules.mk.
903 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
904 (COMPILE): Add ECHO_CXX.
905 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
906 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
907 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
908 (version-generated.c): Add ECHO_GEN.
909 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
910 (IPAGENT_COMPILE): Add ECHO_CXX.
911 (%-generated.c): Add ECHO_REGDAT.
913 2018-03-14 Tom Tromey <tom@tromey.com>
916 * ax.c (ax_printf): Special case for NULL.
918 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
920 * linux-low.c (linux_qxfer_libraries_svr4): Use
921 xml_escape_text_append.
923 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
925 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
927 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
929 * server.c (handle_general_set): Remove unnecessary xstrdup.
931 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
933 * server.c (parse_debug_format_options): Adjust to
934 delim_string_to_char_ptr_vec changes.
935 * thread-db.c (thread_db_load_search): Adjust to
936 dirnames_to_char_ptr_vec changes.
938 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
940 * target.h (target_enable_btrace, target_disable_btrace)
941 (target_read_btrace, target_read_btrace_conf): Turn macro into
942 inline function. Throw error if target method is not defined.
943 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
944 check for btrace target method. Be prepared to handle exceptions
945 from btrace target methods.
947 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
949 * server.c (captured_main): Change order of error message printed
950 when the current working directory cannot be found.
952 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
954 * server.c: Include "filenames.h" and "pathstuff.h".
955 (program_name): Delete variable.
956 (program_path): New anonymous class.
957 (get_exec_wrapper): Use "program_path" instead of
959 (handle_v_run): Likewise.
960 (captured_main): Likewise.
961 (process_serial_event): Likewise.
963 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
965 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
966 (OBJS): Add "pathstuff.o".
967 * server.c (current_directory): New global variable.
968 (captured_main): Initialize "current_directory".
970 2018-02-26 Alan Hayward <alan.hayward@arm.com>
972 * tdesc.c: Use common/tdesc.h.
975 2018-02-20 Alan Hayward <alan.hayward@arm.com>
976 Simon Marchi <simon.marchi@ericsson.com>
978 * Makefile.in: Switch order of make rules.
980 2018-02-19 Alan Hayward <alan.hayward@arm.com>
982 * Makefile.in: Add common directory in build.
983 * configure.ac: Add common reference.
984 * configure: Regenerate.
986 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
988 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
989 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
990 * spu-low.c (spu_target_ops): Likewise.
991 * win32-low.c (win32_target_ops): Likewise.
992 * server.c (supported_btrace_packets): Report packets unconditionally.
993 * target.h (target_ops) <supports_btrace>: Remove.
994 (target_supports_btrace): Remove.
996 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
998 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
999 (handle_btrace_disable): Change return type to void. Use exceptions
1001 (handle_btrace_general_set): Catch exception and copy message to
1004 2018-02-08 Tom Tromey <tom@tromey.com>
1006 * linux-low.c (install_software_single_step_breakpoints): Use
1007 make_scoped_restore.
1008 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1009 (do_restore_current_thread_cleanup): Remove.
1010 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1013 2018-02-08 Tom Tromey <tom@tromey.com>
1015 * mem-break.c (set_raw_breakpoint_at): Use
1016 gdb::unique_xmalloc_ptr.
1018 2018-01-30 Pedro Alves <palves@redhat.com>
1021 * target.c (target_terminal::terminal_state): Rename to ...
1022 (target_terminal::m_terminal_state): ... this.
1024 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1026 * linux-low.c (handle_extended_wait): Surround call to
1027 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1029 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1031 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1032 linux_ptrace_attach_fail_reason_string now returning an
1034 (linux_attach): Likewise.
1035 * thread-db.c (attach_thread): Likewise.
1037 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1040 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1041 checking for fs_base/gs_base fields in struct user_regs_struct.
1042 * configure: Regenerate.
1044 2018-01-16 Yao Qi <yao.qi@linaro.org>
1047 * linux-low.c (fetch_register): Call supply_register instead of
1050 2018-01-08 Yao Qi <yao.qi@linaro.org>
1051 Simon Marchi <simon.marchi@ericsson.com>
1053 * Makefile.in (OBS): Remove selftest.o.
1054 * configure.ac: Set srv_selftest_objs if $development is true.
1055 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1056 * configure: Re-generated.
1057 * server.c (captured_main): Wrap variable selftest_filter with
1060 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1062 * server.c (parse_debug_format_options): Return std::string.
1063 (handle_monitor_command, captured_main): Adjust.
1065 2018-01-05 Pedro Alves <palves@redhat.com>
1068 * server.c (captured_main): Pass quiet=false to
1069 save_original_signals_state.
1071 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1073 * gdbreplay.c (gdbreplay_version): Update copyright year in
1075 * server.c (gdbserver_version): Likewise.
1077 2017-12-08 Tom Tromey <tom@tromey.com>
1079 * ax.c (ax_printf): Update.
1081 2017-12-07 Yao Qi <yao.qi@linaro.org>
1083 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1084 aarch64_linux_read_description.
1085 * linux-amd64-ipa.c (idx2mask): New array.
1086 (get_ipa_tdesc): Move idx2mask out.
1087 (initialize_low_tracepoint): Initialize target descriptions.
1088 * linux-i386-ipa.c (idx2mask): New array.
1089 (get_ipa_tdesc): Move idx2mask out.
1090 (initialize_low_tracepoint): Initialize target descriptions.
1092 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1094 * tdesc.c (struct tdesc_type): Change return type.
1095 (tdesc_add_flag): Change parameter type.
1096 (tdesc_add_bitfield): Likewise.
1097 (tdesc_add_field): Likewise.
1098 (tdesc_set_struct_size): Likewise.
1100 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1102 * regcache.c (registers_to_string): Remove unused variable.
1104 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1106 * inferiors.c (for_each_inferior_with_data): Remove.
1107 * inferiors.h (for_each_inferior_with_data): Remove.
1108 * server.c (handle_qxfer_threads_worker): Change parameter type.
1109 (handle_qxfer_threads_proper): Use for_each_thread.
1111 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1113 * inferiors.c (for_each_inferior): Remove.
1114 (clear_inferiors): Use for_each_thread.
1115 * inferiors.h (for_each_inferior): Remove.
1116 * linux-low.c (linux_wait_for_event_filtered): Use
1118 (linux_stabilize_threads): Likewise.
1119 * regcache.c (regcache_release): Likewise.
1120 * server.c (gdb_wants_all_threads_stopped): Likewise.
1121 (clear_pending_status_callback): Remove.
1122 (handle_status): Use for_each_thread.
1123 (captured_main): Likewise.
1124 * win32-low.c (child_init_thread_list): Likewise.
1125 (win32_clear_inferiors): Likewise.
1126 (fake_breakpoint_event): Likewise.
1128 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1130 * inferiors.h (find_inferior): Remove.
1131 * inferiors.c (find_inferior): Remove.
1133 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1135 * linux-low.c (resume_status_pending_p): Update comment.
1136 (need_step_over_p): Update comment.
1138 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1140 * linux-low.c (proceed_one_lwp): Return void, change parameter
1142 (unsuspend_and_proceed_one_lwp): Likewise.
1143 (proceed_all_lwps): Use for_each_thread.
1144 (unstop_all_lwps): Likewise.
1146 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1148 * linux-low.c (linux_resume_one_thread): Return void, take
1150 (linux_resume): Use for_each_thread.
1152 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1154 * linux-low.c (send_sigstop_callback): Return void, change
1155 parameter type. Rename to...
1156 (send_sigstop): ... this.
1157 (suspend_and_send_sigstop_callback): Return void, change parameter
1159 (suspend_and_send_sigstop): ... this.
1160 (stop_all_lwps): Use for_each_thread.
1162 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1164 * linux-low.c (lwp_running): Return bool, remove unused
1166 (linux_stabilize_threads): Use find_thread.
1168 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1170 * linux-low.c (select_singlestep_lwp_callback): Remove.
1171 (count_events_callback): Remove.
1172 (select_event_lwp_callback): Remove.
1173 (select_event_lwp): Use find_thread/for_each_thread.
1175 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1177 * linux-low.c (not_stopped_callback): Return bool, take filter
1179 (linux_wait_for_event_filtered): Use find_thread.
1180 (linux_wait_1): Likewise.
1182 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1184 * linux-low.c (same_lwp): Remove.
1185 (find_lwp_pid): Use find_thread.
1187 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1189 * linux-low.c (delete_lwp_callback): Remove.
1190 (linux_mourn): Use for_each_thread.
1192 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1194 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1195 args parameter, don't check for pid.
1196 (linux_detach): Use for_each_thread.
1198 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1200 * linux-low.c (struct counter): Remove.
1201 (second_thread_of_pid_p): Remove.
1202 (last_thread_of_process_p): Use find_thread.
1204 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1206 * inferiors.c (find_inferior_in_random): Remove.
1207 * inferiors.h (find_inferior_in_random): Remove.
1208 * linux-low.c (status_pending_p_callback): Return bool, accept
1209 parameter ptid directly.
1210 (linux_wait_for_event_filtered): Use find_thread_in_random.
1211 (linux_wait_1): Likewise.
1213 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1215 * inferiors.c (find_inferior_id): Remove.
1216 (find_thread_ptid): Move implemention from find_inferior_id to
1218 * inferiors.h (find_inferior_id): Remove.
1219 * server.c (handle_status): Use find_thread_ptid.
1220 (process_serial_event): Likewise.
1221 * thread-db.c (find_one_thread): Likewise.
1222 (thread_db_thread_handle): Likewise.
1223 * win32-low.c (thread_rec): Likewise.
1224 (child_delete_thread): Likewise.
1225 (win32_thread_alive): Likewise.
1226 (get_child_debug_event): Likewise.
1228 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1230 * linux-mips-low.c (update_watch_registers_callback): Return
1231 void, remove pid_p parameter, don't check for pid.
1232 (mips_insert_point, mips_remove_point): Use for_each_thread.
1234 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1236 * lynx.low (lynx_delete_thread_callback): Remove.
1237 (lynx_mourn): Use for_each_thread.
1239 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1241 * regcache.c (regcache_invalidate_one): Remove.
1242 (regcache_invalidate_pid): use for_each_thread.
1244 2017-11-26 Tom Tromey <tom@tromey.com>
1246 * linux-low.c (linux_create_inferior): Update.
1248 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1250 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1252 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1254 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1255 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1256 * linux-aarch64-tdesc-selftest.c: New file.
1257 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1259 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1261 * configure.srv: Add new file.
1262 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1263 * linux-aarch64-tdesc-selftest.c: New file.
1264 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1266 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1268 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1269 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1270 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1272 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1274 * configure.srv: Add new files.
1275 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1276 aarch64_linux_read_description.
1277 * linux-aarch64-low.c (aarch64_linux_read_description):
1278 Merge with aarch64_arch_setup.
1279 (aarch64_arch_setup): Call aarch64_linux_read_description.
1280 * linux-aarch64-tdesc.c: New file.
1281 * linux-aarch64-tdesc.h: New file.
1283 2017-11-24 Yao Qi <yao.qi@linaro.org>
1285 * configure.srv: Set $srv_regobj for tic6x-linux.
1286 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1287 (tic6x_read_description): Move some code to tic6x_arch_setup.
1288 (tic6x_tdesc_test): New function.
1289 (initialize_low_arch): Call selftests::register_test.
1291 2017-11-22 Yao Qi <yao.qi@linaro.org>
1293 * remote-utils.c (prepare_resume_reply): Use memcpy.
1295 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1297 * linux-low.c (kill_one_lwp_callback): Return void, take
1298 argument directly, don't filter on pid.
1299 (linux_kill): Use for_each_thread.
1301 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1303 * linux-low.c (need_step_over_p): Return bool, remove dummy
1305 (linux_resume, proceed_all_lwps): Use find_thread.
1307 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1309 * linux-low.c (resume_status_pending_p): Return bool, remove
1311 (linux_resume): Use find_thread.
1313 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1315 * linux-low.c (struct thread_resume_array): Remove.
1316 (linux_set_resume_request): Return void, take arguments
1318 (linux_resume): Use for_each_thread.
1320 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1322 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1323 return bool, remove data argument.
1324 (linux_stabilize_threads): Use find_thread.
1326 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1328 * linux-low.c (unsuspend_one_lwp): Remove.
1329 (unsuspend_all_lwps): Use for_each_thread, inline code from
1332 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1334 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1335 * linux-low.c (struct iterate_over_lwps_args): Remove.
1336 (iterate_over_lwps_filter): Remove.
1337 (iterate_over_lwps): Use find_thread.
1339 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1341 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1342 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1343 code from reset_lwp_ptrace_options_callback.
1345 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1347 * linux-arm-low.c (struct update_registers_data): Remove.
1348 (update_registers_callback): Return void, take arguments
1349 directly, don't check thread's pid.
1350 (arm_insert_point, arm_remove_point): Use for_each_thread.
1352 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1354 * win32-low.c (continue_one_thread): Return void, take argument
1356 (child_continue): Use for_each_thread.
1358 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1360 * win32-i386-low.c (update_debug_registers_callback): Rename
1362 (update_debug_registers): ... this, return void, remove pid_p arg.
1363 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1365 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1367 * inferiors.h (struct process_info): Add constructor, initialize
1369 <syscalls_to_catch>: Change type to std::vector<int>.
1370 * inferiors.c (add_process): Allocate process_info with new.
1371 (remove_process): Free process_info with delete.
1372 * linux-low.c (handle_extended_wait): Adjust.
1373 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1374 * server.c (handle_general_set): Adjust.
1376 2017-11-16 Pedro Alves <palves@redhat.com>
1378 * remote-utils.c (remote_close): Block SIGIO signals instead of
1379 uninstalling the SIGIO handler.
1381 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1383 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1385 2017-11-16 Yao Qi <yao.qi@linaro.org>
1387 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1388 (tic6x_store_gregset): Likewise.
1389 (tic6x_usrregs_info): Move it up.
1391 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1393 * Makefile.in: Update arch rules.
1394 * configure.srv: Explicitly mark arch/ files.
1396 2017-11-13 Andreas Schwab <schwab@suse.de>
1398 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1400 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1402 2017-11-06 Pedro Alves <palves@redhat.com>
1404 * config.in, configure: Regenerate.
1406 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1408 * target.c (struct thread_search): Remove.
1409 (thread_search_callback): Remove.
1410 (prepare_to_access_memory): Use for_each_thread instead of
1411 find_inferior. Inline code from thread_search_callback.
1413 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1415 * server.c (struct visit_actioned_threads_data): Remove.
1416 (visit_actioned_threads): Change prototype to take arguments
1418 (resume): Use find_thread instead of find_inferior.
1420 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1422 * server.c (queue_stop_reply_callback): Change prototype, return
1424 (find_status_pending_thread_callback): Remove.
1425 (handle_status): Replace find_inferior with find_thread and
1428 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1430 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1432 (aarch64_store_gregset): Likewise.
1433 (aarch64_fill_fpregset): Likewise.
1434 (aarch64_store_fpregset): Likewise.
1436 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1438 * gdbthread.h (find_thread, for_each_thread): New functions.
1439 * inferiors.c (thread_of_pid): Remove.
1440 (find_any_thread_of_pid): Use find_thread.
1441 * linux-low.c (num_lwps): Use for_each_thread.
1443 2017-10-17 Yao Qi <yao.qi@linaro.org>
1445 * Makefile.in: Remove one rule.
1446 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1448 2017-10-17 Yao Qi <yao.qi@linaro.org>
1450 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1451 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1453 2017-10-17 Yao Qi <yao.qi@linaro.org>
1455 * configure.srv: Rename arm.o with arch/arm.o.
1457 2017-10-17 Yao Qi <yao.qi@linaro.org>
1459 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1460 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1461 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1462 (arch-i386.o, arch-amd64.o): Remove rules.
1463 (arch/%.o): New rule.
1464 Update POSTCOMPILE and COMPILE.pre.
1465 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1466 * configure: Re-generated.
1467 * configure.srv: Replace arch-i386.o with arch/i386.o.
1468 Replace arch-amd64.o with arch/amd64.o.
1470 2017-10-16 Yao Qi <yao.qi@linaro.org>
1472 * configure: Regenerated.
1474 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1476 * inferiors.h: (struct inferior_list): Remove.
1477 (struct inferior_list_entry); Remove.
1478 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1479 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1480 get_first_inferior): Remove.
1481 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1482 find_inferior_id, find_inferior_in_random): Change signature.
1483 * inferiors.c (all_threads): Change type to
1484 std::list<thread_info *>.
1485 (get_thread): Remove macro.
1486 (find_inferior, find_inferior_id): Change signature, implement
1488 (find_inferior_in_random): Change signature, implement using
1489 find_thread_in_random.
1490 (for_each_inferior, for_each_inferior_with_data): Change
1491 signature, implement using for_each_thread.
1492 (add_inferior_to_list, remove_inferior): Remove.
1493 (add_thread, get_first_thread, thread_of_pid,
1494 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1495 (get_first_inferior, one_inferior_p, clear_inferior_list):
1497 (clear_inferiors, get_thread_process): Update.
1498 * gdbthread.h: Include <list>.
1499 (struct thread_info) <entry>: Remove field.
1501 (all_threads): Change type to std::list<thread_info *>.
1502 (get_first_inferior): Add doc.
1503 (find_thread, for_each_thread, find_thread_in_random): New
1505 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1506 * linux-arm-low.c (update_registers_callback): Update.
1507 * linux-low.c (second_thread_of_pid_p): Update.
1508 (kill_one_lwp_callback, linux_detach_lwp_callback,
1509 delete_lwp_callback, status_pending_p_callback, same_lwp,
1510 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1511 iterate_over_lwps, not_stopped_callback,
1512 resume_stopped_resumed_lwps, count_events_callback,
1513 select_singlestep_lwp_callback, select_event_lwp_callback,
1514 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1515 suspend_and_send_sigstop_callback, wait_for_sigstop,
1516 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1517 lwp_running, linux_set_resume_request, resume_status_pending_p,
1518 need_step_over_p, start_step_over, linux_resume_one_thread,
1519 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1520 reset_lwp_ptrace_options_callback): Update.
1521 * linux-mips-low.c (update_watch_registers_callback): Update.
1522 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1524 (free_register_cache_thread_one): Remove.
1525 (regcache_release): Update.
1526 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1527 handle_qxfer_threads_worker): Update.
1528 (handle_query): Update, use list iterator.
1529 (visit_actioned_threads, handle_pending_status,
1530 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1531 clear_pending_status_callback, set_pending_status_callback,
1532 find_status_pending_thread_callback, handle_status,
1533 process_serial_event): Update.
1534 * target.c (thread_search_callback): Update.
1535 * thread-db.c (thread_db_get_tls_address): Update.
1536 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1538 * win32-i386-low.c (update_debug_registers_callback): Update.
1539 * win32-low.c (delete_thread_info, child_delete_thread,
1540 continue_one_thread, suspend_one_thread,
1541 get_child_debug_event): Adjust.
1543 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1545 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1546 * inferiors.h: Include <list>.
1547 (struct process_info) <entry>: Remove field.
1549 (pid_of): Change macro to function.
1550 (ptid_of, lwpid_of): Remove macro.
1551 (all_processes): Change type to std::list<process_info *>.
1552 (ALL_PROCESSES): Remove macro.
1553 (for_each_process, find_process): New function.
1554 * inferiors.c (all_processes): Change type to
1555 std::list<process_info *>.
1556 (find_thread_process): Adjust.
1557 (add_process): Likewise.
1558 (remove_process): Likewise.
1559 (find_process_pid): Likewise.
1560 (get_first_process): Likewise.
1561 (started_inferior_callback): Remove.
1562 (have_started_inferiors_p): Adjust.
1563 (attached_inferior_callback): Remove.
1564 (have_attached_inferiors_p): Adjust.
1565 * linux-low.c (check_zombie_leaders): Likewise.
1566 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1567 (x86_linux_update_xmltarget): Adjust.
1568 * server.c (handle_query): Likewise.
1569 (gdb_reattached_process): Remove.
1570 (handle_status): Adjust.
1571 (kill_inferior_callback): Likewise.
1572 (detach_or_kill_inferior): Remove.
1573 (print_started_pid): Likewise.
1574 (print_attached_pid): Likewise.
1575 (detach_or_kill_for_exit): Update.
1576 (process_serial_event): Likewise.
1577 * linux-arm-low.c (arm_new_fork): Likewise.
1579 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1581 * dll.h: Include <list>.
1582 (struct dll_info): Add constructor.
1583 <entry>: Remove field.
1584 (all_dlls): Change type to std::list<dll_info>.
1585 * dll.c: Include <algorithm>.
1586 (get_dll): Remove macro.
1587 (all_dlls): Change type to std::list<dll_info *>.
1588 (free_one_dll): Remove.
1589 (match_dll): Likewise.
1590 (loaded_dll): Adjust.
1591 (unloaded_dll): Adjust to all_dlls type change, use
1592 std::find_if. Inline code from match_dll.
1593 (clear_dlls): Adjust to all_dlls type change.
1594 * server.c (emit_dll_description): Remove.
1595 (handle_qxfer_libraries): Adjust to all_dlls type change,
1596 integrate emit_dll_description's functionality.
1598 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1600 * linux-low.h (struct linux_target_ops) <delete_process>: New
1602 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1603 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1604 (struct linux_target_ops): Add delete_process callback.
1605 * linux-arm-low.c (arm_delete_process): New.
1606 (struct linux_target_ops): Add delete_process callback.
1607 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1608 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1609 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1610 * linux-mips-low.c (mips_linux_delete_process): New.
1611 (struct linux_target_ops): Add delete_process callback.
1612 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1613 * linux-s390-low.c (struct linux_target_ops): Likewise.
1614 * linux-sh-low.c (struct linux_target_ops): Likewise.
1615 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1616 * linux-tile-low.c (struct linux_target_ops): Likewise.
1617 * linux-x86-low.c (x86_linux_delete_process): New.
1618 (struct linux_target_ops): Add delete_process callback.
1619 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1621 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1623 * linux-aarch64-low.c (the_low_target): Add thread delete
1625 * linux-arm-low.c (arm_delete_thread): New function.
1626 (the_low_target): Add thread delete callback.
1627 * linux-bfin-low.c (the_low_target): Likewise.
1628 * linux-crisv32-low.c (the_low_target): Likewise.
1629 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1631 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1633 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1634 * linux-mips-low.c (mips_linux_delete_thread): New function.
1635 (the_low_target): Add thread delete callback.
1636 * linux-ppc-low.c (the_low_target): Likewise.
1637 * linux-s390-low.c (the_low_target): Likewise.
1638 * linux-sh-low.c (the_low_target): Likewise.
1639 * linux-tic6x-low.c (the_low_target): Likewise.
1640 * linux-tile-low.c (the_low_target): Likewise.
1641 * linux-x86-low.c (the_low_target): Likewise.
1642 * linux-xtensa-low.c (the_low_target): Likewise.
1644 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1646 * win32-low.c: Include "common-inferior.h".
1648 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1650 * inferiors.c (set_inferior_cwd): New function.
1651 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1652 (handle_query): Inform that QSetWorkingDir is supported.
1653 * win32-low.c (create_process): Pass the inferior's cwd to
1656 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1658 * inferiors.c (current_inferior_cwd): New global variable.
1659 (get_inferior_cwd): New function.
1660 * inferiors.h (struct process_info) <cwd>: New field.
1662 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1664 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1665 (OBS): Add gdb_tilde_expand.o.
1667 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1669 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1670 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1672 2017-09-29 Pedro Alves <palves@redhat.com>
1674 * ax.c (gdb_parse_agent_expr): Constify.
1675 * ax.h (gdb_parse_agent_expr): Constify.
1676 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1678 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1679 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1680 * remote-utils.h (read_ptid): Constify.
1681 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1682 (process_point_options, process_serial_event): Constify.
1683 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1684 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1685 (cmd_qtbuffer): Constify.
1687 2017-09-29 Pedro Alves <palves@redhat.com>
1689 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1692 2017-09-29 Pedro Alves <palves@redhat.com>
1694 * linux-low.c (handle_extended_wait): Pass parent thread instead
1695 of process to thread_db_notice_clone.
1696 * linux-low.h (thread_db_notice_clone): Replace parent process
1697 parameter with parent thread parameter.
1698 * thread-db.c (find_one_thread): Add comment.
1699 (thread_db_notice_clone): Replace parent process parameter with
1700 parent thread parameter. Temporarily switch to the parent thread.
1702 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1704 * gdbthread.h: Include "common-gdbthread.h".
1705 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1706 "if" when validating the ptid.
1707 * remote-utils.c: Include "gdbthread.h".
1708 (prepare_resume_reply): Use "switch_to_thread".
1709 * target.c (done_accessing_memory): Likewise.
1711 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1713 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1714 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1715 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1716 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1717 s390x-gs-linux64-ipa.o to ipa_obj.
1718 * linux-s390-low.c (HWCAP_S390_GS): New define.
1719 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1721 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1722 (s390_arch_setup): Check for guarded-storage support and choose
1724 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1725 init_registers_s390x_gs_linux64.
1726 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1728 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1729 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1731 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1733 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1735 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1737 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1738 (thread_db_thread_handle): Declare.
1739 * linux-low.c (linux_target_ops): Initialize thread_handle.
1740 * server.c (handle_qxfer_threads_worker): Add support for
1742 * target.h (struct target_ops): Add new function pointer,
1744 (target_thread_handle): Define.
1745 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1747 (thread_db_thread_handle): New function.
1749 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1751 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1752 * linux-low.h (thread_db_notice_clone): Declare.
1753 * thread-db.c (thread_db_notice_clone): New function.
1755 2017-09-21 Pedro Alves <palves@redhat.com>
1757 * server.c (gdb_read_memory, handle_status, process_serial_event)
1758 (handle_serial_event, handle_target_event): Adjust to
1759 set_desired_thread prototype change.
1760 * target.c (set_desired_thread): Remove 'use_general' parameter
1762 * target.h (set_desired_thread): Remove 'use_general' parameter.
1764 2017-09-20 Tom Tromey <tom@tromey.com>
1766 * target.c (target_terminal::terminal_state): Define.
1767 (target_terminal::init): Rename from target_terminal_init.
1768 (target_terminal::inferior): Rename from
1769 target_terminal_inferior.
1770 (target_terminal::ours): Rename from target_terminal_ours.
1771 (target_terminal::ours_for_output, target_terminal::info): New.
1773 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1775 * server.c (accumulate_file_name_length): Remove.
1776 (emit_dll_description): Adjust to std::string change.
1777 (handle_qxfer_libraries): Use std::string to hold document.
1779 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1781 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1782 return type of xml_escape_text.
1783 * server.c (emit_dll_description): Likewise.
1785 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1787 * server.c (captured_main): Accept argument for --selftest.
1788 Update run_tests call.
1789 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1790 when registering selftests.
1792 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1794 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1795 instead of "VEC" for "target_desc.reg_defs".
1796 (regcache_cpy): Likewise.
1797 (registers_to_string): Likewise.
1798 (registers_from_string): Likewise.
1799 (find_regno): Likewise.
1800 (supply_regblock): Likewise.
1801 (regcache_raw_read_unsigned): Likewise.
1802 * tdesc.c (init_target_desc): Likewise.
1803 (tdesc_create_reg): Likewise.
1804 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1805 (struct target_desc) <reg_defs>: Convert to "std::vector".
1806 (target_desc): Do not initialize "reg_defs".
1807 (~target_desc): Update code to use "std::vector" instead of "VEC"
1808 for "target_desc.reg_defs".
1809 (operator==): Likewise.
1811 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1813 * inferiors.h (thread_to_gdb_id): Remove.
1814 * inferiors.c (thread_to_gdb_id): Remove.
1815 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1816 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1817 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1819 * nto-low.c (nto_fetch_registers, nto_store_registers,
1820 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1822 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1824 * inferiors.h (gdb_id_to_thread_id): Remove.
1825 * inferiors.c (gdb_id_to_thread_id): Remove.
1826 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1827 removal. Move pid declaration closer to where it's used.
1829 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1831 * server.c (handle_detach): New function.
1832 (process_serial_event): Move code out, call handle_detach.
1834 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1836 * server.c (require_running): Rename to ...
1837 (require_running_or_return): ... this ...
1838 (require_running_or_break): ... and this.
1839 (handle_query, process_serial_event): Adjust.
1841 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1843 * linux-low.c (linux_set_resume_request): Remove unused
1846 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1848 * server.c (first_thread_of): Remove.
1849 (process_serial_event): Replace usage of first_thread_of with
1850 find_any_thread_of_pid.
1851 * tracepoint.c (same_process_p): Remove.
1852 (gdb_agent_about_to_close): Replace usage of same_process_p with
1853 find_any_thread_of_pid.
1854 * linux-x86-low.c (same_process_callback): Remove.
1855 (x86_arch_setup_process_callback): Replace usage of
1856 same_process_callback with find_any_thread_of_pid.
1857 * thread-db.c (any_thread_of): Remove.
1858 (switch_to_process): Replace usage of any_thread_of with
1859 find_any_thread_of_pid.
1860 * inferiors.c (thread_pid_matches_callback): Remove.
1861 (find_thread_process): Adjust to use find_any_thread_of_pid.
1863 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1865 * regcache.c (get_thread_regcache): Guard calls to "memset"
1868 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1870 * linux-low.c (handle_extended_wait): Use
1871 "allocate_target_description" instead of "XNEW".
1872 * linux-x86-low.c (initialize_low_arch): Likewise.
1874 2017-09-05 Yao Qi <yao.qi@linaro.org>
1876 * configure.srv (srv_i386_regobj): Remove.
1877 (srv_amd64_regobj): Remove.
1878 (srv_regobj): Set it to "" for x86 non-linux targets.
1879 * linux-x86-tdesc.c (i386_linux_read_description):
1880 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1881 (init_registers_i386): Remove the declaration.
1882 (tdesc_i386): Remove the declaration.
1883 (lynx_i386_arch_setup): Call i386_create_target_description.
1884 * nto-x86-low.c: Likewise.
1885 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1886 [!__x86_64__]: include arch/i386.h.
1887 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1889 2017-09-05 Yao Qi <yao.qi@linaro.org>
1891 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1892 i386/amd64-XXX-linux from it.
1894 2017-09-05 Yao Qi <yao.qi@linaro.org>
1896 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1898 (ipa_amd64_linux_regobj): Remove.
1899 (ipa_x32_linux_regobj): Remove.
1901 2017-09-05 Yao Qi <yao.qi@linaro.org>
1903 * Makefile.in (arch-amd64.o): New rule.
1904 * configure.srv: Append arch-amd64.o.
1905 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1906 (get_ipa_tdesc): Call amd64_linux_read_description.
1907 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1908 and init_registers_amd64_XXX.
1909 * linux-x86-low.c (x86_linux_read_description): Call
1910 amd64_linux_read_description.
1911 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1912 (initialize_low_arch): Don't call init_registers_x32_XXX and
1913 init_registers_amd64_XXX.
1914 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1915 and tdesc_amd64_XXX.
1916 [__x86_64__] (amd64_tdesc_test): New function.
1917 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1918 and init_registers_amd64_XXX.
1919 * linux-x86-tdesc.c: Include arch/amd64.h.
1920 (xcr0_to_tdesc_idx): New function.
1921 (i386_linux_read_description): New function.
1922 (amd64_get_ipa_tdesc_idx): New function.
1923 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1924 (amd64_get_ipa_tdesc): Declare.
1926 2017-09-05 Yao Qi <yao.qi@linaro.org>
1928 * configure.srv (srv_i386_linux_xmlfiles): Remove
1929 i386/i386-XXX-linux.xml from it.
1931 2017-09-05 Yao Qi <yao.qi@linaro.org>
1933 * configure.srv: Set srv_i386_linux_regobj empty if $development
1935 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1936 initialize_low_tdesc.
1937 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1938 with #if initialize_low_tdesc.
1939 * linux-x86-tdesc-selftest.c: New file.
1940 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1942 2017-09-05 Yao Qi <yao.qi@linaro.org>
1944 * Makefile.in (arch-i386.o): New rule.
1945 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1946 (x86_64-*-linux*): Likewise.
1947 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1948 include arch/i386.h.
1949 (i386_linux_read_description): Remove code and call
1950 i386_create_target_description.
1951 * tdesc.c (allocate_target_description): New function.
1952 * tdesc.h (set_tdesc_architecture): Remove declaration.
1953 (set_tdesc_osabi): Likewise.
1955 2017-09-05 Yao Qi <yao.qi@linaro.org>
1957 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1958 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1959 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1961 * server.c (get_features_xml): Call tdesc_get_features_xml.
1962 * tdesc.c (set_tdesc_architecture): New function.
1963 (set_tdesc_osabi): New function.
1964 (tdesc_get_features_xml): New function.
1965 (tdesc_create_feature): Add an argument.
1966 * tdesc.h (struct target_desc) <features>: New field.
1967 <arch, osabi>: New field.
1968 (~target_desc): xfree features, arch, and osabi.
1969 (target_desc::oerator==): Don't compare .xmltarget.
1970 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1971 (set_tdesc_osabi): Likewise.
1972 (tdesc_get_features_xml): Likewise.
1974 2017-09-05 Yao Qi <yao.qi@linaro.org>
1976 * linux-x86-tdesc.c: Include selftest.h.
1977 (i386_tdesc_test): New function.
1978 (initialize_low_tdesc): Call selftests::register_test.
1979 * tdesc.h: Include regdef.h.
1980 (target_desc): Override operator == and !=.
1982 2017-09-05 Yao Qi <yao.qi@linaro.org>
1984 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1985 (ipa_obj): Likewise.
1986 * linux-i386-ipa.c: Include common/x86-xstate.h
1987 (get_ipa_tdesc): Call i386_linux_read_description.
1988 (initialize_low_tracepoint): Don't call init_registers_XXX
1989 functions, call initialize_low_tdesc instead.
1990 * linux-x86-low.c (x86_linux_read_description): Call
1991 i386_linux_read_description.
1992 (initialize_low_arch): Don't call init_registers_i386_XXX
1993 functions, call initialize_low_tdesc.
1994 * linux-x86-tdesc.c: New file.
1995 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1996 (i386_get_ipa_tdesc_idx): Declare.
1997 (i386_get_ipa_tdesc): Declare.
1998 (initialize_low_tdesc): Declare.
2000 2017-09-05 Yao Qi <yao.qi@linaro.org>
2002 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2005 2017-09-05 Yao Qi <yao.qi@linaro.org>
2007 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2008 * regcache.c (get_thread_regcache): Use VEC_length.
2009 (init_register_cache): Likewise.
2010 (regcache_cpy): Likewise.
2011 (registers_to_string): Iterate reg_defs via VEC_iterate.
2012 (find_regno): Likewise.
2013 (find_register_by_number): Use VEC_index.
2014 (register_size): Call find_register_by_number.
2015 (register_data): Call find_register_by_number.
2016 (supply_regblock): Use VEC_length.
2017 (regcache_raw_read_unsigned): Likewise.
2018 * tdesc.c (init_target_desc): Iterate reg_defs via
2020 (default_description): Update initializer.
2021 (copy_target_description): Don't update field num_registers.
2022 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2023 <num_registers>: Remove.
2025 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2027 * Makefile.in (.SECONDARY): Define target.
2029 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2031 * linux-low.c (linux_wait_1): Adjust.
2032 * server.c (queue_stop_reply_callback): Adjust.
2034 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2036 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2037 QEnvironmentUnset and QEnvironmentReset packets.
2038 (handle_query): Inform remote that QEnvironmentHexEncoded,
2039 QEnvironmentUnset and QEnvironmentReset are supported.
2041 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2043 * inferiors.h (inferior_target_data): Rename to ...
2044 (thread_target_data): ... this.
2045 (inferior_regcache_data): Rename to ...
2046 (thread_regcache_data): ... this.
2047 (set_inferior_regcache_data): Rename to ...
2048 (set_thread_regcache_data): ... this.
2049 * inferiors.c (inferior_target_data): Rename to ...
2050 (thread_target_data): ... this.
2051 (inferior_regcache_data): Rename to ...
2052 (thread_regcache_data): ... this.
2053 (set_inferior_regcache_data): Rename to ...
2054 (set_thread_regcache_data): ... this.
2055 (free_one_thread): Update.
2056 * linux-low.h (get_thread_lwp): Update.
2057 * regcache.c (get_thread_regcache): Update.
2058 (regcache_invalidate_thread): Update.
2059 (free_register_cache_thread): Update.
2060 * win32-i386-low.c (update_debug_registers_callback): Update.
2061 (win32_get_current_dr): Update.
2062 * win32-low.c (thread_rec): Update.
2063 (delete_thread_info): Update.
2064 (continue_one_thread): Update.
2065 (suspend_one_thread): Update.
2067 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2069 * inferiors.c (set_inferior_target_data): Remove.
2070 * inferiors.h (set_inferior_target_data): Remove.
2072 2017-08-18 Yao Qi <yao.qi@linaro.org>
2074 * Makefile.in (OBS): Add selftest.o.
2075 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2076 * configure, config.in: Re-generated.
2077 * server.c: Include common/sefltest.h.
2078 (captured_main): Handle option --selftest.
2080 2017-08-09 Yao Qi <yao.qi@linaro.org>
2082 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2083 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2084 i386-avx-mpx.o and i386-mmx.o.
2085 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2086 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2087 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2088 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2089 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2090 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2091 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2092 i386/amd64-avx-mpx.xml.
2094 2017-08-09 Yao Qi <yao.qi@linaro.org>
2096 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2097 and x32-avx-avx512.o.
2098 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2099 i386/x32-avx-avx512.xml.
2101 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2103 * tracepoint.h (enum class fast_tpoint_collect_result): New
2105 (fast_tracepoint_collecting): Change return type to
2106 fast_tpoint_collect_result.
2107 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2108 * linux-low.h: Include tracepoint.h.
2109 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2110 fast_tpoint_collect_result.
2111 * linux-low.c (handle_tracepoints): Adjust.
2112 (linux_fast_tracepoint_collecting): Change return type to
2113 fast_tpoint_collect_result.
2114 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2115 linux_wait_1, stuck_in_jump_pad_callback,
2116 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2117 proceed_one_lwp): Adjust to type change.
2119 2017-07-10 Yao Qi <yao.qi@linaro.org>
2121 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2123 2017-06-29 Yao Qi <yao.qi@linaro.org>
2125 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2127 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2129 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2131 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2133 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2135 * linux-low.c (linux_create_inferior): Adjust code to access the
2136 environment information via 'gdb_environ' class.
2137 * lynx-low.c (lynx_create_inferior): Likewise.
2138 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2139 (get_environ): Return a pointer to 'our_environ'.
2140 (captured_main): Initialize 'our_environ'.
2141 * server.h (get_environ): Adjust prototype.
2142 * spu-low.c (spu_create_inferior): Adjust code to access the
2143 environment information via 'gdb_environ' class.
2145 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2147 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2148 usage of "register" keyword.
2150 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2152 * configure: Re-generate.
2154 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2156 * configure: Re-generate.
2158 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2160 * Makefile.in (COMPILE.pre): Add "-x c++".
2162 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2164 * fork-child.c: Conditionally include <signal.h>.
2166 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2168 * server.c (handle_general_set): Handle new packet
2169 "QStartupWithShell".
2170 (handle_query): Add "QStartupWithShell" to the list of supported
2172 (gdbserver_usage): Add help text explaining the
2173 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2175 (captured_main): Recognize and act upon the presence of the new
2178 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2179 Pedro Alves <palves@redhat.com>
2181 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2182 * configure: Regenerate.
2183 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2185 (i[34567]86-*-lynxos*): Likewise.
2186 (spu*-*-*): Likewise.
2187 * fork-child.c: New file.
2188 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2190 (linux_ptrace_fun): New function.
2191 (linux_create_inferior): Adjust function prototype to reflect
2192 change on "target.h". Adjust function code to use
2194 (linux_request_interrupt): Delete "signal_pid".
2195 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2196 (lynx_ptrace_fun): New function.
2197 (lynx_create_inferior): Adjust function prototype to reflect
2198 change on "target.h". Adjust function code to use
2200 * nto-low.c (nto_create_inferior): Adjust function prototype and
2201 code to reflect change on "target.h". Update comments.
2202 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2203 "common-terminal.h" and "environ.h".
2204 (terminal_fd): Moved to fork-child.c.
2205 (old_foreground_pgrp): Likewise.
2206 (restore_old_foreground_pgrp): Likewise.
2207 (last_status): Make it global.
2208 (last_ptid): Likewise.
2209 (our_environ): New variable.
2210 (startup_with_shell): Likewise.
2211 (program_name): Likewise.
2212 (program_argv): Rename to...
2213 (program_args): ...this.
2214 (wrapper_argv): New variable.
2215 (start_inferior): Delete function.
2216 (get_exec_wrapper): New function.
2217 (get_exec_file): Likewise.
2218 (get_environ): Likewise.
2219 (prefork_hook): Likewise.
2220 (post_fork_inferior): Likewise.
2221 (postfork_hook): Likewise.
2222 (postfork_child_hook): Likewise.
2223 (handle_v_run): Update code to deal with arguments coming from the
2224 remote host. Update calls from "start_inferior" to
2226 (captured_main): Likewise. Initialize environment variable. Call
2228 * server.h (post_fork_inferior): New prototype.
2229 (get_environ): Likewise.
2230 (last_status): Declare.
2231 (last_ptid): Likewise.
2232 (signal_pid): Likewise.
2233 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2234 (spu_ptrace_fun): New function.
2235 (spu_create_inferior): Adjust function prototype to reflect change
2236 on "target.h". Adjust function code to use "fork_inferior".
2237 * target.c (target_terminal_init): New function.
2238 (target_terminal_inferior): Likewise.
2239 (target_terminal_ours): Likewise.
2240 * target.h: Include <vector>.
2241 (struct target_ops) <create_inferior>: Update prototype.
2242 (create_inferior): Update macro.
2243 * utils.c (gdb_flush_out_err): New function.
2244 * win32-low.c (win32_create_inferior): Adjust function prototype
2245 and code to reflect change on "target.h".
2247 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2249 * inferiors.c (switch_to_thread): New function.
2251 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2253 * Makefile.in (SFILE): Add "common/job-control.c".
2254 (OBS): Add "job-control.o".
2256 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2258 * Makefile: Remove "@host_makefile_frag@".
2260 2017-05-05 Pedro Alves <palves@redhat.com>
2262 * configure: Regenerate.
2264 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2266 * configure: Regenerate.
2268 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2270 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2271 software_single_step change of return type to
2272 std::vector<CORE_ADDR>.
2273 * linux-low.c (install_software_single_step_breakpoints):
2275 * linux-low.h (install_software_single_step_breakpoints):
2278 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2280 * remote-utils.c: Include "gdb_termios.h" instead of
2282 * terminal.h: Delete file.
2284 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2286 * server.c: Include <vector>.
2287 <program_argv, wrapper_argv>: Convert to std::vector.
2288 (start_inferior): Rewrite function to use C++.
2289 (handle_v_run): Likewise. Update code that calculates the argv
2290 based on the vRun packet; use C++.
2291 (captured_main): Likewise.
2293 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2295 * server.c (handle_v_cont): Initialize thread_resume::thread
2298 2017-04-05 Pedro Alves <palves@redhat.com>
2300 * configure: Regenerate.
2302 2017-04-05 Pedro Alves <palves@redhat.com>
2304 * gdbreplay.c (sync_error): Constify.
2305 * linux-x86-low.c (push_opcode): Constify.
2307 2017-04-05 Pedro Alves <palves@redhat.com>
2309 * win32-low.c (get_child_debug_event)
2310 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2311 Report TARGET_WAITKIND_SPURIOUS instead.
2313 2017-04-05 Pedro Alves <palves@redhat.com>
2315 * remote-utils.c (remote_prepare, remote_open): Constify.
2316 * remote-utils.h (remote_prepare, remote_open): Constify.
2317 * server.c (captured_main): Constify 'port' handling.
2319 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2321 * Makefile.in (clean): Clear .deps.
2323 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2325 * .gitignore: Remove generated files, replace with wildcard.
2326 * (clean): Replace removal of generated files with wildcard.
2327 (version.c): Replace with...
2328 (version-generated.c): ...this.
2329 (xml-builtin.c): Replace with...
2330 (xml-builtin-generated.c): ...this.
2331 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2332 (%.c: *regformats*): Replace with...
2333 (%-generated.c: *regformats*): ...this.
2335 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2337 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2338 (xtensa_fill_gregset): Call collect_register_by_name for
2340 (xtensa_store_gregset): Call supply_register_by_name for
2343 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2345 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2346 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2347 (xtensa_store_gregset): Call supply_register for all registers in
2348 a0_regnum..a0_regnum + C0_NREGS range.
2350 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2352 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2353 (ax-ipa.o: ax.c): Remove.
2354 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2355 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2356 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2357 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2358 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2360 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2362 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2363 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2364 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2365 (errors-ipa.o: ../common/errors.c): Remove.
2366 (format-ipa.o: ../common/format.c): Remove.
2367 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2369 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2371 * Makefile.in (%-ipa.o: %.c): New rule.
2372 (tracepoint-ipa.o: tracepoint.c): Remove.
2373 (utils-ipa.o: utils.c): Remove.
2374 (remote-utils-ipa.o: remote-utils.c): Remove.
2375 (regcache-ipa.o: regcache.c): Remove.
2376 (i386-linux-ipa.o: i386-linux.c): Remove.
2377 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2378 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2379 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2380 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2381 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2382 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2383 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2384 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2385 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2386 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2387 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2388 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2389 (aarch64-ipa.o: aarch64.c): Remove.
2390 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2391 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2392 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2393 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2394 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2395 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2396 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2397 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2398 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2399 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2400 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2401 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2402 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2403 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2404 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2405 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2406 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2407 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2408 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2409 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2410 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2411 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2412 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2413 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2414 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2415 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2416 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2417 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2418 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2419 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2420 (tdesc-ipa.o: tdesc.c): Remove.
2421 (x32-linux-ipa.o: x32-linux.c): Remove.
2422 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2423 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2425 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2427 * Makefile.in (%.o: ../arch/%.c): New rule.
2428 (arm.o: ../arch/arm.c): Remove.
2429 (arm-linux.o: ../arch/arm-linux.c): Remove.
2430 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2431 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2433 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2435 * Makefile.in (%.o: ../nat/%.c): New rule.
2436 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2437 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2438 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2439 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2440 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2441 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2442 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2443 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2444 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2445 (linux-personality.o: ../nat/linux-personality.c): Remove.
2446 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2447 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2448 (x86-linux.o: ../nat/x86-linux.c): Remove.
2449 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2450 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2452 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2454 * Makefile.in (%.o: ../common/%.c): New rule.
2455 (signals.o: ../common/signals.c): Remove.
2456 (print-utils.o: ../common/print-utils.c): Remove.
2457 (rsp-low.o: ../common/rsp-low.c): Remove.
2458 (common-utils.o: ../common/common-utils.c): Remove.
2459 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2460 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2461 (vec.o: ../common/vec.c): Remove.
2462 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2463 (xml-utils.o: ../common/xml-utils.c): Remove.
2464 (ptid.o: ../common/ptid.c): Remove.
2465 (buffer.o: ../common/buffer.c): Remove.
2466 (format.o: ../common/format.c): Remove.
2467 (filestuff.o: ../common/filestuff.c): Remove.
2468 (agent.o: ../common/agent.c): Remove.
2469 (errors.o: ../common/errors.c): Remove.
2470 (environ.o: ../common/environ.c): Remove.
2471 (common-debug.o: ../common/common-debug.c): Remove.
2472 (cleanups.o: ../common/cleanups.c): Remove.
2473 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2474 (fileio.o: ../common/fileio.c): Remove.
2475 (common-regcache.o: ../common/common-regcache.c): Remove.
2476 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2477 (new-op.o: ../common/new-op.c): Remove.
2478 (btrace-common.o: ../common/btrace-common.c): Remove.
2480 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2482 * Makefile.in (%.o: ../target/%.c): New rule.
2483 (waitstatus.o: ../target/waitstatus.c): Remove.
2485 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2488 (%.c: ../regformats/%.dat,
2489 (%.c: ../regformats/arm/%.dat,
2490 (%.c: ../regformats/i386/%.dat,
2491 (%.c: ../regformats/rs6000/%.dat): New rules.
2492 (aarch64.c): Remove.
2493 (reg-arm.c): Remove.
2494 (arm-with-iwmmxt.c): Remove.
2495 (arm-with-vfpv2.c): Remove.
2496 (arm-with-vfpv3.c): Remove.
2497 (arm-with-neon.c): Remove.
2498 (reg-bfin.c): Remove.
2499 (reg-cris.c): Remove.
2500 (reg-crisv32.c): Remove.
2502 (i386-linux.c): Remove.
2503 (i386-avx.c): Remove.
2504 (i386-avx-linux.c): Remove.
2505 (i386-avx-avx512.c): Remove.
2506 (i386-avx-avx512-linux.c): Remove.
2507 (i386-mpx.c): Remove.
2508 (i386-mpx-linux.c): Remove.
2509 (i386-avx-mpx-avx512-pku.c): Remove.
2510 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2511 (i386-avx-mpx.c): Remove.
2512 (i386-avx-mpx-linux.c): Remove.
2513 (i386-mmx.c): Remove.
2514 (i386-mmx-linux.c): Remove.
2515 (reg-ia64.c): Remove.
2516 (reg-m32r.c): Remove.
2517 (reg-m68k.c): Remove.
2519 (mips-linux.c): Remove.
2520 (mips-dsp-linux.c): Remove.
2521 (mips64-linux.c): Remove.
2522 (mips64-dsp-linux.c): Remove.
2523 (nios2-linux.c): Remove.
2524 (powerpc-32.c): Remove.
2525 (powerpc-32l.c): Remove.
2526 (powerpc-altivec32l.c): Remove.
2527 (powerpc-cell32l.c): Remove.
2528 (powerpc-vsx32l.c): Remove.
2529 (powerpc-isa205-32l.c): Remove.
2530 (powerpc-isa205-altivec32l.c): Remove.
2531 (powerpc-isa205-vsx32l.c): Remove.
2532 (powerpc-e500l.c): Remove.
2533 (powerpc-64l.c): Remove.
2534 (powerpc-altivec64l.c): Remove.
2535 (powerpc-cell64l.c): Remove.
2536 (powerpc-vsx64l.c): Remove.
2537 (powerpc-isa205-64l.c): Remove.
2538 (powerpc-isa205-altivec64l.c): Remove.
2539 (powerpc-isa205-vsx64l.c): Remove.
2540 (s390-linux32.c): Remove.
2541 (s390-linux32v1.c): Remove.
2542 (s390-linux32v2.c): Remove.
2543 (s390-linux64.c): Remove.
2544 (s390-linux64v1.c): Remove.
2545 (s390-linux64v2.c): Remove.
2546 (s390-te-linux64.c): Remove.
2547 (s390-vx-linux64.c): Remove.
2548 (s390-tevx-linux64.c): Remove.
2549 (s390x-linux64.c): Remove.
2550 (s390x-linux64v1.c): Remove.
2551 (s390x-linux64v2.c): Remove.
2552 (s390x-te-linux64.c): Remove.
2553 (s390x-vx-linux64.c): Remove.
2554 (s390x-tevx-linux64.c): Remove.
2555 (tic6x-c64xp-linux.c): Remove.
2556 (tic6x-c64x-linux.c): Remove.
2557 (tic6x-c62x-linux.c): Remove.
2559 (reg-sparc64.c): Remove.
2560 (reg-spu.c): Remove.
2562 (amd64-linux.c): Remove.
2563 (amd64-avx.c): Remove.
2564 (amd64-avx-linux.c): Remove.
2565 (amd64-avx-avx512.c): Remove.
2566 (amd64-avx-avx512-linux.c): Remove.
2567 (amd64-mpx.c): Remove.
2568 (amd64-mpx-linux.c): Remove.
2569 (amd64-avx-mpx-avx512-pku.c): Remove.
2570 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2571 (amd64-avx-mpx.c): Remove.
2572 (amd64-avx-mpx-linux.c): Remove.
2574 (x32-linux.c): Remove.
2575 (x32-avx.c): Remove.
2576 (x32-avx-linux.c): Remove.
2577 (x32-avx-avx512.c): Remove.
2578 (x32-avx-avx512-linux.c): Remove.
2579 (reg-xtensa.c): Remove.
2580 (reg-tilegx.c): Remove.
2581 (reg-tilegx32.c): Remove.
2583 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2585 * Makefile.in (SFILES): Add "common/environ.c".
2586 (OBJS): Add "common/environ.h".
2588 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2590 * configure.ac: Check if the fs_base and gs_base members of
2591 `struct user_regs_struct' exist.
2592 * config.in: Regenerated.
2593 * configure: Likewise.
2595 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2597 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2599 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2600 (get_next_pcs_syscall_next_pc): Likewise.
2602 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2604 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2605 * nto-x86-low.c: Likewise.
2607 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2609 * Makefile.in: Include disable-implicit-rules.mk.
2611 2016-11-23 Pedro Alves <palves@redhat.com>
2613 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2614 (debug_vprintf): Use std::chrono::steady_clock instead of
2615 gettimeofday. Use '.' instead of ':'.
2616 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2617 (get_timestamp): Use std::chrono::steady_clock instead of
2620 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2622 * Makefile.in: Fix whitespace formatting.
2624 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2626 * Makefile.in (SFILES, OBS): Flatten list and order
2629 2016-11-23 Pedro Alves <palves@redhat.com>
2631 * event-loop.c (handle_file_event): Use warning.
2632 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2633 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2636 2016-11-23 Pedro Alves <palves@redhat.com>
2638 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2640 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2641 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2642 debug_printf and debug_flush for debug output.
2643 * server.c (handle_general_set): Likewise.
2644 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2647 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2649 * Makefile.in (.c.o): Replace rule with ...
2650 (%.o: %.c): ... this one.
2652 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2654 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2655 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2657 * configure.ac: Remove checks for the make program.
2658 * configure: Re-generate.
2660 2016-10-28 Pedro Alves <palves@redhat.com>
2662 * Makefile.in (CXX_DIALECT): Get from configure.
2663 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2664 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2665 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2666 * config.in: Regenerate.
2667 * configure: Regenerate.
2669 2016-10-27 Yao Qi <yao.qi@linaro.org>
2671 * linux-low.c (linux_supports_range_stepping): Return true if
2672 can_software_single_step return true.
2674 2016-10-27 Yao Qi <yao.qi@linaro.org>
2676 * inferiors.c (find_inferior_in_random): New function.
2677 * inferiors.h (find_inferior_in_random): Declare.
2678 * linux-low.c (linux_wait_for_event_filtered): Call
2679 find_inferior_in_random instead of find_inferior.
2681 2016-10-27 Yao Qi <yao.qi@linaro.org>
2683 * linux-low.c (linux_wait_1): If single-step breakpoints are
2684 inserted, remove them.
2686 2016-10-26 Pedro Alves <palves@redhat.com>
2688 * linux-low.c (handle_extended_wait): Link parent/child fork
2690 (linux_wait_1): Unlink them.
2691 (linux_set_resume_request): Ignore resume requests for
2692 already-resumed and unhandled fork child threads.
2693 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2694 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2696 (handle_v_requests) <vCont>: Don't call require_running.
2697 * server.h (in_queued_stop_replies): New declaration.
2699 2016-10-24 Yao Qi <yao.qi@linaro.org>
2702 * linux-aarch64-low.c (append_insns): Cast the return value to
2705 2016-10-10 Yao Qi <yao.qi@linaro.org>
2707 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2709 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2711 * target.c (target_supports_multi_process): New function, moved
2713 * target.h (target_supports_multi_process): ... here. Remove
2716 2016-10-05 Tom Tromey <tom@tromey.com>
2719 * tracepoint.c (handle_tracepoint_bkpts): Check
2720 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2722 2016-10-05 Yao Qi <yao.qi@linaro.org>
2724 * configure.srv: Update the path of arm-*.xml files.
2726 2016-10-05 Terry Guo <terry.guo@arm.com>
2727 Yao Qi <yao.qi@linaro.org>
2729 * Makefile.in: Adjust the path of rules.
2730 * configure.srv: Update the path of xml files.
2731 * regformats/arm-with-iwmmxt.dat: Regenerated.
2732 * regformats/arm-with-neon.dat: Likewise.
2733 * regformats/arm-with-vfpv2.dat: Likewise.
2734 * regformats/arm-with-vfpv3.dat Likewise.
2736 2016-09-30 Yao Qi <yao.qi@linaro.org>
2739 * target.c (target_stop_and_wait): Don't call
2740 target_continue_no_signal, use resume_stop instead.
2742 2016-09-26 Yao Qi <yao.qi@linaro.org>
2744 * linux-low.c (linux_wait_1): Call debug_exit.
2746 2016-09-23 Pedro Alves <palves@redhat.com>
2748 * Makefile.in (SFILES): Add common/new-op.c.
2749 (OBS): Add common/new-op.o.
2750 (new-op.o): New rule.
2752 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2754 * .gitinore: Ignore more files.
2756 2016-09-21 Yao Qi <yao.qi@linaro.org>
2758 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2761 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2763 * server.c (start_inferior): Call target_mourn_inferior instead of
2764 mourn_inferior; pass ptid_t argument to it.
2766 (handle_target_event): Likewise.
2767 * target.c (target_mourn_inferior): New function.
2768 * target.h (mourn_inferior): Delete macro.
2770 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2772 * linux-low.c (lwp_is_stepping): New function.
2774 2016-09-06 Carl Love <cel@us.ibm.com>
2776 * server.c (start_inferior): Fixed comment, requested comment change
2777 didn't get updated correctly. Removed reference to ptrace () call as
2778 it is only true on Linux systems.
2780 2016-09-06 Carl Love <cel@us.ibm.com>
2782 * server.c (start_inferior): Do not call
2783 function target_post_create_inferior () if the
2784 inferior process has already exited.
2786 2016-09-05 Pedro Alves <palves@redhat.com>
2788 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2789 (COMPILE.pre, CC_LD): Use CXX directly.
2790 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2791 * acinclude.m4: Don't include build-with-cxx.m4.
2792 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2793 * configure: Regenerate.
2795 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2798 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2799 call writing data to own_buf.
2801 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2803 * target.c (mywait): Call target_wait instead of
2805 (target_wait): New function.
2807 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2809 * server.c (start_inferior): New variable 'ptid'. Replace calls
2810 to the_target->resume by target_continue{,_no_signal}, depending
2812 * target.c (target_stop_and_wait): Call target_continue_no_signal
2813 instead of the_target->resume.
2814 (target_continue): New function.
2816 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2818 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2820 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2823 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2825 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2826 * linux-arm-low.c (ps_get_thread_area): Likewise.
2827 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2828 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2829 * linux-mips-low.c (ps_get_thread_area): Likewise.
2830 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2831 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2832 * linux-x86-low.c (ps_get_thread_area): Likewise.
2833 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2835 2016-08-19 Pedro Alves <palves@redhat.com>
2837 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2839 2016-08-19 Pedro Alves <palves@redhat.com>
2841 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2842 comment. Use memcpy instead of casting through unsigned long.
2844 2016-08-19 Pedro Alves <palves@redhat.com>
2846 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2847 allocating around 0x80000000.
2849 2016-08-19 Pedro Alves <palves@redhat.com>
2852 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2853 (x32-avx512-linux-ipa.o): New rules.
2854 * configure.ac (x86_64-*-linux*): New x32 check.
2855 * configure.srv (ipa_x32_linux_regobj): New.
2856 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2857 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2859 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2861 * configure: Regenerate.
2863 2016-08-09 Pedro Alves <palves@redhat.com>
2866 * Makefile.in (OBS): Add signals-state-save-restore.o.
2867 (signals-state-save-restore.o): New rule.
2868 * config.in: Regenerate.
2869 * configure: Regenerate.
2870 * linux-low.c: Include "signals-state-save-restore.h".
2871 (linux_create_inferior): Call
2872 restore_original_signals_state.
2873 * server.c: Include "dispositions-save-restore.h".
2874 (captured_main): Call save_original_signals_state.
2876 2016-08-05 Pedro Alves <palves@redhat.com>
2878 * configure: Regenerate.
2880 2016-08-04 Yao Qi <yao.qi@linaro.org>
2882 * linux-low.c (regsets_fetch_inferior_registers): Check
2883 errno is ESRCH or not.
2885 2016-08-02 Yao Qi <yao.qi@linaro.org>
2887 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2888 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2889 (thread_db_load_search): Update.
2890 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2891 td_ta_set_event and td_ta_event_getmsg.
2893 2016-07-26 Pedro Alves <palves@redhat.com>
2896 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2897 of unsigned long for 64-bit registers and use uint32_t instead of
2898 unsigned int for 32-bit registers.
2900 2016-07-26 Pedro Alves <palves@redhat.com>
2902 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2905 2016-07-21 Tom Tromey <tom@tromey.com>
2907 * configure: Rebuild.
2909 2016-07-21 Yao Qi <yao.qi@linaro.org>
2911 * mem-break.c (find_gdb_breakpoint): Cast bp to
2912 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2914 2016-07-21 Yao Qi <yao.qi@linaro.org>
2916 * server.c (handle_v_requests): Support s and S actions
2917 if target_supports_software_single_step return true.
2919 2016-07-21 Yao Qi <yao.qi@linaro.org>
2921 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2922 is resume_step, call maybe_hw_step.
2923 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2925 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2927 (proceed_one_lwp): If resume request is resume_step, install
2928 reinsert breakpoints and call maybe_hw_step.
2930 2016-07-21 Yao Qi <yao.qi@linaro.org>
2932 * linux-low.c (proceed_one_lwp): Declare.
2933 (linux_resume_one_thread): Remove local variable 'step'.
2934 Lift code enqueue signal. Call proceed_one_lwp instead of
2935 linux_resume_one_lwp.
2937 2016-07-21 Yao Qi <yao.qi@linaro.org>
2939 * linux-low.c (linux_resume_one_thread): Call
2940 enqueue_pending_signal.
2942 2016-07-21 Yao Qi <yao.qi@linaro.org>
2944 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2945 * inferiors.c (do_restore_current_thread_cleanup): New function.
2946 (make_cleanup_restore_current_thread): Likewise.
2947 * linux-low.c (install_software_single_step_breakpoints): Call
2948 make_cleanup_restore_current_thread. Switch current_thread to
2951 2016-07-21 Yao Qi <yao.qi@linaro.org>
2953 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2954 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2955 (clone_one_breakpoint): Likewise.
2956 (delete_reinsert_breakpoints): Change parameter to thread.
2958 (has_reinsert_breakpoints): Likewise.
2959 (uninsert_reinsert_breakpoints): Likewise.
2960 (reinsert_reinsert_breakpoints): Likewise.
2961 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2962 (delete_reinsert_breakpoints): Likewise.
2963 (reinsert_reinsert_breakpoints): Likewise.
2964 (uninsert_reinsert_breakpoints): Likewise.
2965 (has_reinsert_breakpoints): Likewise.
2967 2016-07-21 Yao Qi <yao.qi@linaro.org>
2969 * inferiors.c (get_thread_process): Make parameter const.
2970 * inferiors.h (get_thread_process): Update declaration.
2971 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2972 Add new parameters child_thread and parent_thread. Callers
2974 * mem-break.h (clone_all_breakpoints): Update declaration.
2976 2016-07-21 Yao Qi <yao.qi@linaro.org>
2978 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2979 <command_list, handler>: Remove.
2980 (struct gdb_breakpoint): New.
2981 (struct other_breakpoint): New.
2982 (struct reinsert_breakpoint): New.
2983 (is_gdb_breakpoint): New function.
2984 (any_persistent_commands): Update command_list if
2985 is_gdb_breakpoint returns true.
2986 (set_breakpoint): Create breakpoints according to their types.
2987 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2988 (set_gdb_breakpoint_1): Likewise.
2989 (set_gdb_breakpoint): Likewise.
2990 (clear_breakpoint_conditions): Change parameter type to
2991 'struct gdb_breakpoint *'.
2992 (clear_breakpoint_commands): Likewise.
2993 (clear_breakpoint_conditions_and_commands): Likewise.
2994 (add_condition_to_breakpoint): Likewise.
2995 (add_breakpoint_condition): Likewise.
2996 (add_commands_to_breakpoint): Likewise.
2997 (check_breakpoints): Check other_breakpoint.
2998 (clone_one_breakpoint): Clone breakpopint according to its type.
2999 * mem-break.h (struct gdb_breakpoint): Declare.
3000 (set_gdb_breakpoint): Update declaration.
3001 (clear_breakpoint_conditions_and_commands): Likewise.
3002 (add_breakpoint_condition): Likewise.
3003 (add_breakpoint_commands): Likewise.
3004 * server.c (process_point_options): Change parameter type to
3005 'struct gdb_breakpoint *'.
3007 2016-07-21 Yao Qi <yao.qi@linaro.org>
3009 * mem-break.c (set_breakpoint_at): Rename it to ...
3010 (set_breakpoint_type_at): ... it.
3011 (set_breakpoint_at): Call set_breakpoint_type_at.
3012 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3013 * mem-break.h (set_breakpoint_at): Update comments.
3015 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3017 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3019 (nios2_store_gregset): Likewise.
3021 2016-07-01 Pedro Alves <palves@redhat.com>
3022 Antoine Tremblay <antoine.tremblay@ericsson.com>
3024 * linux-low.c: Change interface to take the target lwp_info
3025 pointer directly and return void. Handle detaching from a zombie
3027 (linux_detach_lwp_callback): New function.
3028 (linux_detach): Detach from the leader thread after detaching from
3031 2016-06-28 Yao Qi <yao.qi@linaro.org>
3033 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3034 for variable new_offset.
3035 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3036 (aarch64_ftrace_insn_reloc_cb): Likewise.
3037 (aarch64_ftrace_insn_reloc_tb): Likewise.
3038 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3039 PRIx64 instead of PRIx32.
3041 2016-06-28 Yao Qi <yao.qi@linaro.org>
3043 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3044 (the_low_target): Install arm_get_syscall_trapinfo.
3046 2016-06-28 Yao Qi <yao.qi@linaro.org>
3048 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3050 (the_low_target): Install aarch64_get_syscall_trapinfo.
3052 2016-06-28 Yao Qi <yao.qi@linaro.org>
3054 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3056 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3057 Remove parameter sysno.
3058 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3061 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3063 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3064 (s390_emit_ne_goto): Likewise.
3065 (s390_emit_lt_goto): Likewise.
3066 (s390_emit_le_goto): Likewise.
3067 (s390_emit_gt_goto): Likewise.
3068 (s390_emit_ge_goto): Likewise.
3069 (s390x_emit_eq_goto): Likewise.
3070 (s390x_emit_ne_goto): Likewise.
3071 (s390x_emit_lt_goto): Likewise.
3072 (s390x_emit_le_goto): Likewise.
3073 (s390x_emit_gt_goto): Likewise.
3074 (s390x_emit_ge_goto): Likewise.
3075 (s390_emit_ops_impl): Mark variable static.
3076 (s390x_emit_ops): Likewise.
3078 2016-06-17 Yao Qi <yao.qi@linaro.org>
3080 * linux-low.c (handle_extended_wait): Call
3081 uninsert_reinsert_breakpoints for the parent process. Remove
3082 reinsert breakpoints from the child process. Reinsert them to
3083 the parent process when vfork is done.
3084 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3085 (reinsert_reinsert_breakpoints): New function.
3086 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3087 (reinsert_reinsert_breakpoints): Declare.
3089 2016-06-17 Yao Qi <yao.qi@linaro.org>
3091 * linux-low.c (handle_extended_wait): If the parent is doing
3092 step-over, remove the reinsert breakpoints from the forked child.
3094 2016-06-17 Yao Qi <yao.qi@linaro.org>
3096 * linux-low.c (unsuspend_all_lwps): Declare.
3097 (linux_low_filter_event): If thread exited, call finish_step_over.
3098 If step-over is finished, unsuspend other threads.
3100 2016-06-17 Yao Qi <yao.qi@linaro.org>
3102 * linux-low.c (linux_resume_one_lwp_throw): Assert
3103 has_reinsert_breakpoints returns false.
3104 * mem-break.c (delete_disabled_breakpoints): Assert
3105 bp type isn't reinsert_breakpoint.
3107 2016-06-17 Yao Qi <yao.qi@linaro.org>
3109 * linux-low.c (maybe_hw_step): New function.
3110 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3111 (finish_step_over): Switch current_thread to lwp temporarily,
3112 and assert has_reinsert_breakpoints returns true.
3113 (proceed_one_lwp): Call maybe_hw_step.
3114 * mem-break.c (has_reinsert_breakpoints): New function.
3115 * mem-break.h (has_reinsert_breakpoints): Declare.
3117 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3119 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3121 2016-05-17 Yao Qi <yao.qi@linaro.org>
3123 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3124 instead of find_inferior.
3126 2016-05-05 Yao Qi <yao.qi@linaro.org>
3128 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3129 Initialize res to zero.
3131 2016-05-05 Yao Qi <yao.qi@linaro.org>
3133 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3136 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3138 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3139 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3140 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3142 2016-04-28 Par Olsson <par.olsson@windriver.com>
3143 Simon Marchi <simon.marchi@ericsson.com>
3145 * tracepoint.c (write_inferior_int8): New function.
3146 (cmd_qtenable_disable): Write enable flag using
3147 write_inferior_int8.
3149 2016-04-25 Yao Qi <yao.qi@linaro.org>
3151 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3152 (need_step_over_p): Return zero if the LWP has pending signals
3153 can be delivered on software single step target.
3155 2016-04-25 Yao Qi <yao.qi@linaro.org>
3157 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3158 return instead of error.
3160 2016-04-22 Yao Qi <yao.qi@linaro.org>
3162 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3165 2016-04-22 Yao Qi <yao.qi@linaro.org>
3167 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3168 signal when stepping over breakpoint with software single
3171 2016-04-21 Pedro Alves <palves@redhat.com>
3173 * linux-s390-low.c (s390_collect_ptrace_register)
3174 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3176 (s390_check_regset): Use void * instead of gdb_byte *.
3178 2016-04-20 Pedro Alves <palves@redhat.com>
3180 * configure: Renegerate.
3182 2016-04-20 Yao Qi <yao.qi@linaro.org>
3184 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3185 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3187 (arm_store_gregset): Likewise.
3189 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3191 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3192 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3193 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3194 (amd64-avx-mpx-linux.c): New rules.
3195 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3196 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3197 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3198 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3199 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3200 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3201 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3202 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3203 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3204 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3205 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3206 * linux-x86-low.c (x86_linux_read_description): Add case for
3207 X86_XSTATE_AVX_MPX_MASK.
3208 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3209 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3210 init_registers_i386_avx_mpx_linux.
3211 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3212 (initialize_low_tracepoint): Call
3213 init_registers_i386_avx_mpx_linux.
3214 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3215 (initialize_low_tracepoint): Call
3216 init_registers_amd64_avx_mpx_linux.
3217 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3218 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3219 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3222 2016-04-18 Pedro Alves <palves@redhat.com>
3224 * configure: Regenerate.
3226 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3228 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3229 (aarch64_emit_sub): Likewise.
3231 2016-04-12 Pedro Alves <palves@redhat.com>
3233 * utils.c (prepare_to_throw_exception): Delete.
3235 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3237 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3239 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3241 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3243 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3245 * linux-aarch64-ipa.c: Add <elf.h> include.
3246 * linux-ppc-ipa.c: Add <elf.h> include.
3247 * linux-s390-ipa.c: Add <elf.h> include.
3249 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3251 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3252 (get_raw_reg_ptr): Likewise.
3253 (get_trace_state_variable_value_ptr): Likewise.
3254 (set_trace_state_variable_value_ptr): Likewise.
3255 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3258 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3259 Marcin Kościelnicki <koriakin@0x04.net>
3262 * linux-ppc-low.c (emit_insns): New function.
3263 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3264 (ppc_emit_prologue): New function.
3265 (ppc_emit_epilogue): New function.
3266 (ppc_emit_add): New function.
3267 (ppc_emit_sub): New function.
3268 (ppc_emit_mul): New function.
3269 (ppc_emit_lsh): New function.
3270 (ppc_emit_rsh_signed): New function.
3271 (ppc_emit_rsh_unsigned): New function.
3272 (ppc_emit_ext): New function.
3273 (ppc_emit_zero_ext): New function.
3274 (ppc_emit_log_not): New function.
3275 (ppc_emit_bit_and): New function.
3276 (ppc_emit_bit_or): New function.
3277 (ppc_emit_bit_xor): New function.
3278 (ppc_emit_bit_not): New function.
3279 (ppc_emit_equal): New function.
3280 (ppc_emit_less_signed): New function.
3281 (ppc_emit_less_unsigned): New function.
3282 (ppc_emit_ref): New function.
3283 (ppc_emit_const): New function.
3284 (ppc_emit_reg): New function.
3285 (ppc_emit_pop): New function.
3286 (ppc_emit_stack_flush): New function.
3287 (ppc_emit_swap): New function.
3288 (ppc_emit_stack_adjust): New function.
3289 (ppc_emit_call): New function.
3290 (ppc_emit_int_call_1): New function.
3291 (ppc_emit_void_call_2): New function.
3292 (ppc_emit_if_goto): New function.
3293 (ppc_emit_goto): New function.
3294 (ppc_emit_eq_goto): New function.
3295 (ppc_emit_ne_goto): New function.
3296 (ppc_emit_lt_goto): New function.
3297 (ppc_emit_le_goto): New function.
3298 (ppc_emit_gt_goto): New function.
3299 (ppc_emit_ge_goto): New function.
3300 (ppc_write_goto_address): New function.
3301 (ppc_emit_ops_impl): New static variable.
3302 (ppc64v1_emit_prologue): New function.
3303 (ppc64v2_emit_prologue): New function.
3304 (ppc64_emit_epilogue): New function.
3305 (ppc64_emit_add): New function.
3306 (ppc64_emit_sub): New function.
3307 (ppc64_emit_mul): New function.
3308 (ppc64_emit_lsh): New function.
3309 (ppc64_emit_rsh_signed): New function.
3310 (ppc64_emit_rsh_unsigned): New function.
3311 (ppc64_emit_ext): New function.
3312 (ppc64_emit_zero_ext): New function.
3313 (ppc64_emit_log_not): New function.
3314 (ppc64_emit_bit_and): New function.
3315 (ppc64_emit_bit_or): New function.
3316 (ppc64_emit_bit_xor): New function.
3317 (ppc64_emit_bit_not): New function.
3318 (ppc64_emit_equal): New function.
3319 (ppc64_emit_less_signed): New function.
3320 (ppc64_emit_less_unsigned): New function.
3321 (ppc64_emit_ref): New function.
3322 (ppc64_emit_const): New function.
3323 (ppc64v1_emit_reg): New function.
3324 (ppc64v2_emit_reg): New function.
3325 (ppc64_emit_pop): New function.
3326 (ppc64_emit_stack_flush): New function.
3327 (ppc64_emit_swap): New function.
3328 (ppc64v1_emit_call): New function.
3329 (ppc64v2_emit_call): New function.
3330 (ppc64v1_emit_int_call_1): New function.
3331 (ppc64v2_emit_int_call_1): New function.
3332 (ppc64v1_emit_void_call_2): New function.
3333 (ppc64v2_emit_void_call_2): New function.
3334 (ppc64_emit_if_goto): New function.
3335 (ppc64_emit_eq_goto): New function.
3336 (ppc64_emit_ne_goto): New function.
3337 (ppc64_emit_lt_goto): New function.
3338 (ppc64_emit_le_goto): New function.
3339 (ppc64_emit_gt_goto): New function.
3340 (ppc64_emit_ge_goto): New function.
3341 (ppc64v1_emit_ops_impl): New static variable.
3342 (ppc64v2_emit_ops_impl): New static variable.
3343 (ppc_emit_ops): New function.
3344 (linux_low_target): Wire in ppc_emit_ops.
3346 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3347 Marcin Kościelnicki <koriakin@0x04.net>
3350 * Makefile.in: Add powerpc-*-ipa.o
3351 * configure.srv: Add ipa_obj for powerpc*-linux.
3352 * linux-ppc-ipa.c: New file.
3353 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3355 (PPC_FIELD): New macro.
3356 (PPC_SEXT): New macro.
3357 (PPC_OP6): New macro.
3358 (PPC_BO): New macro.
3359 (PPC_LI): New macro.
3360 (PPC_BD): New macro.
3361 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3362 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3363 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3364 (ppc_get_thread_area): New function.
3365 (is_elfv2_inferior): New function.
3366 (gen_ds_form): New function.
3367 (GEN_STD): New macro.
3368 (GEN_STDU): New macro.
3369 (GEN_LD): New macro.
3370 (GEN_LDU): New macro.
3371 (gen_d_form): New function.
3372 (GEN_ADDI): New macro.
3373 (GEN_ADDIS): New macro.
3374 (GEN_LI): New macro.
3375 (GEN_LIS): New macro.
3376 (GEN_ORI): New macro.
3377 (GEN_ORIS): New macro.
3378 (GEN_LWZ): New macro.
3379 (GEN_STW): New macro.
3380 (GEN_STWU): New macro.
3381 (gen_xfx_form): New function.
3382 (GEN_MFSPR): New macro.
3383 (GEN_MTSPR): New macro.
3384 (GEN_MFCR): New macro.
3385 (GEN_MTCR): New macro.
3386 (GEN_SYNC): New macro.
3387 (GEN_LWSYNC): New macro.
3388 (gen_x_form): New function.
3389 (GEN_OR): New macro.
3390 (GEN_MR): New macro.
3391 (GEN_LWARX): New macro.
3392 (GEN_STWCX): New macro.
3393 (GEN_CMPW): New macro.
3394 (gen_md_form): New function.
3395 (GEN_RLDICL): New macro.
3396 (GEN_RLDICR): New macro.
3397 (gen_i_form): New function.
3399 (GEN_BL): New macro.
3400 (gen_b_form): New function.
3401 (GEN_BNE): New macro.
3402 (GEN_LOAD): New macro.
3403 (GEN_STORE): New macro.
3404 (gen_limm): New function.
3405 (gen_atomic_xchg): New function.
3406 (gen_call): New function.
3407 (ppc_relocate_instruction): New function.
3408 (ppc_install_fast_tracepoint_jump_pad): New function.
3409 (ppc_get_min_fast_tracepoint_insn_len): New function.
3410 (ppc_get_ipa_tdesc_idx): New function.
3411 (the_low_target): Wire in the new functions.
3412 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3414 * linux-ppc-tdesc.h: New file.
3416 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3418 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3419 (alloc_jump_pad_buffer): New function.
3420 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3421 (alloc_jump_pad_buffer): New function.
3422 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3423 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3424 (alloc_jump_pad_buffer): New function.
3425 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3426 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3427 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3428 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3430 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3432 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3433 * linux-amd64-ipa.c: Likewise.
3434 * linux-i386-ipa.c: Likewise.
3435 * linux-s390-ipa.c: Likewise.
3436 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3437 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3438 set_trace_state_variable_value_ptr.
3439 (struct ipa_sym_addresses): Likewise.
3440 (symbol_list): Likewise.
3441 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3442 accessing gdb_collect directly.
3443 (gdb_collect_ptr_type): New typedef.
3444 (get_raw_reg_ptr_type): New typedef.
3445 (get_trace_state_variable_value_ptr_type): New typedef.
3446 (set_trace_state_variable_value_ptr_type): New typedef.
3447 (gdb_collect_ptr): New global.
3448 (get_raw_reg_ptr): New global.
3449 (get_trace_state_variable_value_ptr): New global.
3450 (set_trace_state_variable_value_ptr): New global.
3451 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3452 accessing get_raw_reg directly.
3453 (get_get_tsv_func_addr): Likewise for
3454 get_trace_state_variable_value_ptr.
3455 (get_set_tsv_func_addr): Likewise for
3456 set_trace_state_variable_value_ptr.
3457 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3459 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3461 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3463 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3465 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3467 (relocate_instruction): Remove own_buf.
3468 * server.c (own_buf): Make global.
3469 (handle_v_requests): Make global.
3470 * server.h (own_buf): New declaration.
3471 (handle_v_requests): New prototype.
3473 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3476 * linux-s390-low.c (add_insns): New function.
3477 (s390_emit_prologue): New function.
3478 (s390_emit_epilogue): New function.
3479 (s390_emit_add): New function.
3480 (s390_emit_sub): New function.
3481 (s390_emit_mul): New function.
3482 (s390_emit_lsh): New function.
3483 (s390_emit_rsh_signed): New function.
3484 (s390_emit_rsh_unsigned): New function.
3485 (s390_emit_ext): New function.
3486 (s390_emit_log_not): New function.
3487 (s390_emit_bit_and): New function.
3488 (s390_emit_bit_or): New function.
3489 (s390_emit_bit_xor): New function.
3490 (s390_emit_bit_not): New function.
3491 (s390_emit_equal): New function.
3492 (s390_emit_less_signed): New function.
3493 (s390_emit_less_unsigned): New function.
3494 (s390_emit_ref): New function.
3495 (s390_emit_if_goto): New function.
3496 (s390_emit_goto): New function.
3497 (s390_write_goto_address): New function.
3498 (s390_emit_litpool): New function.
3499 (s390_emit_const): New function.
3500 (s390_emit_call): New function.
3501 (s390_emit_reg): New function.
3502 (s390_emit_pop): New function.
3503 (s390_emit_stack_flush): New function.
3504 (s390_emit_zero_ext): New function.
3505 (s390_emit_swap): New function.
3506 (s390_emit_stack_adjust): New function.
3507 (s390_emit_set_r2): New function.
3508 (s390_emit_int_call_1): New function.
3509 (s390_emit_void_call_2): New function.
3510 (s390_emit_eq_goto): New function.
3511 (s390_emit_ne_goto): New function.
3512 (s390_emit_lt_goto): New function.
3513 (s390_emit_le_goto): New function.
3514 (s390_emit_gt_goto): New function.
3515 (s390_emit_ge_goto): New function.
3516 (s390x_emit_prologue): New function.
3517 (s390x_emit_epilogue): New function.
3518 (s390x_emit_add): New function.
3519 (s390x_emit_sub): New function.
3520 (s390x_emit_mul): New function.
3521 (s390x_emit_lsh): New function.
3522 (s390x_emit_rsh_signed): New function.
3523 (s390x_emit_rsh_unsigned): New function.
3524 (s390x_emit_ext): New function.
3525 (s390x_emit_log_not): New function.
3526 (s390x_emit_bit_and): New function.
3527 (s390x_emit_bit_or): New function.
3528 (s390x_emit_bit_xor): New function.
3529 (s390x_emit_bit_not): New function.
3530 (s390x_emit_equal): New function.
3531 (s390x_emit_less_signed): New function.
3532 (s390x_emit_less_unsigned): New function.
3533 (s390x_emit_ref): New function.
3534 (s390x_emit_if_goto): New function.
3535 (s390x_emit_const): New function.
3536 (s390x_emit_call): New function.
3537 (s390x_emit_reg): New function.
3538 (s390x_emit_pop): New function.
3539 (s390x_emit_stack_flush): New function.
3540 (s390x_emit_zero_ext): New function.
3541 (s390x_emit_swap): New function.
3542 (s390x_emit_stack_adjust): New function.
3543 (s390x_emit_int_call_1): New function.
3544 (s390x_emit_void_call_2): New function.
3545 (s390x_emit_eq_goto): New function.
3546 (s390x_emit_ne_goto): New function.
3547 (s390x_emit_lt_goto): New function.
3548 (s390x_emit_le_goto): New function.
3549 (s390x_emit_gt_goto): New function.
3550 (s390x_emit_ge_goto): New function.
3551 (s390_emit_ops): New function.
3552 (struct linux_target_ops): Fill in emit_ops hook.
3554 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3557 * Makefile.in: Add s390 IPA files.
3558 * configure.srv: Build IPA for s390.
3559 * linux-s390-ipa.c: New file.
3560 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3561 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3562 (tdesc_s390_linux32): Likewise.
3563 (init_registers_s390_linux32v1): Likewise.
3564 (tdesc_s390_linux32v1): Likewise.
3565 (init_registers_s390_linux32v2): Likewise.
3566 (tdesc_s390_linux32v2): Likewise.
3567 (init_registers_s390_linux64): Likewise.
3568 (tdesc_s390_linux64): Likewise.
3569 (init_registers_s390_linux64v1): Likewise.
3570 (tdesc_s390_linux64v1): Likewise.
3571 (init_registers_s390_linux64v2): Likewise.
3572 (tdesc_s390_linux64v2): Likewise.
3573 (init_registers_s390_te_linux64): Likewise.
3574 (tdesc_s390_te_linux64): Likewise.
3575 (init_registers_s390_vx_linux64): Likewise.
3576 (tdesc_s390_vx_linux64): Likewise.
3577 (init_registers_s390_tevx_linux64): Likewise.
3578 (tdesc_s390_tevx_linux64): Likewise.
3579 (init_registers_s390x_linux64): Likewise.
3580 (tdesc_s390x_linux64): Likewise.
3581 (init_registers_s390x_linux64v1): Likewise.
3582 (tdesc_s390x_linux64v1): Likewise.
3583 (init_registers_s390x_linux64v2): Likewise.
3584 (tdesc_s390x_linux64v2): Likewise.
3585 (init_registers_s390x_te_linux64): Likewise.
3586 (tdesc_s390x_te_linux64): Likewise.
3587 (init_registers_s390x_vx_linux64): Likewise.
3588 (tdesc_s390x_vx_linux64): Likewise.
3589 (init_registers_s390x_tevx_linux64): Likewise.
3590 (tdesc_s390x_tevx_linux64): Likewise.
3591 (have_hwcap_s390_vx): New static variable.
3592 (s390_arch_setup): Fill have_hwcap_s390_vx.
3593 (s390_get_thread_area): New function.
3594 (s390_ft_entry_gpr_esa): New const.
3595 (s390_ft_entry_gpr_zarch): New const.
3596 (s390_ft_entry_misc): New const.
3597 (s390_ft_entry_fr): New const.
3598 (s390_ft_entry_vr): New const.
3599 (s390_ft_main_31): New const.
3600 (s390_ft_main_64): New const.
3601 (s390_ft_exit_fr): New const.
3602 (s390_ft_exit_vr): New const.
3603 (s390_ft_exit_misc): New const.
3604 (s390_ft_exit_gpr_esa): New const.
3605 (s390_ft_exit_gpr_zarch): New const.
3606 (append_insns): New function.
3607 (s390_relocate_instruction): New function.
3608 (s390_install_fast_tracepoint_jump_pad): New function.
3609 (s390_get_min_fast_tracepoint_insn_len): New function.
3610 (s390_get_ipa_tdesc_idx): New function.
3611 (struct linux_target_ops): Wire in the above functions.
3612 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3613 * linux-s390-tdesc.h: New file.
3615 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3617 * linux-s390-low.c (s390_supports_tracepoints): New function.
3618 (struct linux_target_ops): Fill supports_tracepoints hook.
3620 2016-03-18 Yao Qi <yao.qi@linaro.org>
3622 * linux-low.c (lwp_signal_can_be_delivered): New function.
3623 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3625 2016-03-18 Yao Qi <yao.qi@linaro.org>
3627 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3628 0 if signal is enqueued. Remove 'signal' from one debugging
3629 message. Move one debugging message to some lines below.
3630 Remove code setting 'signal' to 0.
3632 2016-03-18 Yao Qi <yao.qi@linaro.org>
3634 * linux-low.c (linux_low_filter_event): Remove redundant
3635 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3637 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3639 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3640 (struct linux_target_ops): Wire in the above.
3642 2016-03-03 Yao Qi <yao.qi@linaro.org>
3644 * linux-low.c: Update comments to start_step_over.
3646 2016-03-03 Yao Qi <yao.qi@linaro.org>
3649 * linux-low.c (handle_extended_wait): Set child suspended
3650 if event_lwp->bp_reinsert isn't zero.
3652 2016-03-02 Yao Qi <yao.qi@linaro.org>
3654 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3655 enqueue_pending_signal.
3657 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3659 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3662 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3664 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3665 (s390_regmap_3264) [!__s390x__]: New global.
3666 (s390_collect_ptrace_register): Skip map entries containing -1.
3667 (s390_supply_ptrace_register): Ditto.
3668 (s390_fill_gprs_high): New function.
3669 (s390_store_gprs_high): New function.
3670 (s390_regsets): Add NT_S390_HIGH_GPRS.
3671 (s390_get_hwcap): Enable on 31-bit.
3672 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3673 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3674 Detect NT_S390_HIGH_GPRS.
3675 (s390_usrregs_info_3264): Enable on 31-bit.
3676 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3677 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3679 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3682 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3683 * configure.srv: Ditto.
3684 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3685 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3686 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3687 (init_registers_amd64_linux): Remove prototype.
3688 (tdesc_amd64_linux): Remove declaration.
3689 (get_ipa_tdesc): New function.
3690 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3691 initialize remaining tdescs.
3692 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3693 (init_registers_i386_linux): Remove prototype.
3694 (tdesc_i386_linux): Remove declaration.
3695 (get_ipa_tdesc): New function.
3696 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3697 initialize remaining tdescs.
3698 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3699 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3700 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3701 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3702 (x86_get_ipa_tdesc_idx): New function.
3703 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3704 * linux-x86-tdesc.h: New file.
3705 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3706 (target_get_ipa_tdesc_idx): New macro.
3707 * tracepoint.c (ipa_tdesc_idx): New macro.
3708 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3709 (symbol_list): Add ipa_tdesc_idx.
3710 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3711 (ipa_tdesc): Remove.
3712 (ipa_tdesc_idx): New variable.
3713 (get_context_regcache): Use get_ipa_tdesc.
3714 (gdb_collect): Ditto.
3716 * tracepoint.h (get_ipa_tdesc): New prototype.
3717 (ipa_tdesc): Remove.
3719 2016-02-24 Pedro Alves <palves@redhat.com>
3721 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3722 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3723 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3724 Factor out common code between the USE_SIGTRAP_SIGINFO and
3725 !USE_SIGTRAP_SIGINFO blocks.
3726 (linux_low_filter_event): Call save_stop_reason instead of
3727 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3729 (linux_wait_1): Update comments.
3731 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3733 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3734 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3735 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3736 ppc_insert_point, ppc_remove_point.
3738 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3740 * linux-s390-low.c (s390_supports_z_point_type): New function.
3741 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3743 2016-02-16 Yao Qi <yao.qi@linaro.org>
3745 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3746 PC. Get pc from regcache_read_pc.
3748 2016-02-12 Yao Qi <yao.qi@linaro.org>
3750 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3751 or linux_get_pc_32bit.
3752 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3754 2016-02-12 Yao Qi <yao.qi@linaro.org>
3756 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3757 arm_linux_get_next_pcs_fixup.
3759 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3761 * tracepoint.c (x_tracepoint_action_download): Change
3762 write_inferior_data_ptr to write_inferior_data_pointer.
3763 (cmd_qtstart): Likewise.
3764 (write_inferior_data_ptr): Remove.
3765 (download_agent_expr): Change write_inferior_data_ptr to
3766 write_inferior_data_pointer.
3767 (download_tracepoint_1): Likewise.
3768 (download_tracepoint): Likewise.
3769 (download_trace_state_variables): Likewise.
3771 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3772 Marcin Kościelnicki <koriakin@0x04.net>
3774 * tracepoint.c (struct tracepoint_action_ops): Remove.
3775 (struct tracepoint_action): Remove ops.
3776 (m_tracepoint_action_download, r_tracepoint_action_download)
3777 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3778 size and offset accordingly.
3779 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3780 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3781 (tracepoint_action_send, tracepoint_action_download): New functions.
3782 Helpers for trace action handlers.
3783 (add_tracepoint_action): Remove setup actions ops.
3784 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3786 2016-02-10 Yao Qi <yao.qi@linaro.org>
3788 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3790 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3792 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3794 * configure: Regenerate.
3796 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3798 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3799 void * to gdb_byte *.
3800 * linux-low.c (siginfo_fixup): Likewise.
3801 (linux_xfer_siginfo): Likewise.
3802 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3804 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3806 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3808 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3810 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3812 * linux-x86-low.c [__x86_64__]: Include
3813 "nat/amd64-linux-siginfo.h".
3814 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3815 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3816 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3817 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3818 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3819 (cpt_si_fd, si_timerid, si_overrun): Move from
3820 nat/amd64-linux-siginfo.c.
3821 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3823 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3825 * server.c (skip_to_semicolon): Remove.
3826 (process_point_options): Use strchrnul instead of
3829 2016-01-26 Yao Qi <yao.qi@linaro.org>
3831 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3832 * linux-low.c (install_software_single_step_breakpoints): Don't
3833 call regcache_read_pc.
3834 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3837 2016-01-26 Yao Qi <yao.qi@linaro.org>
3839 * linux-low.c (install_software_single_step_breakpoints): Call
3840 regcache_read_pc instead of get_pc.
3842 2016-01-26 Yao Qi <yao.qi@linaro.org>
3844 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3845 (unblock_async_io): Rename to ...
3846 (block_unblock_async_io): ... it. New function.
3847 (enable_async_io): Don't install SIGIO handler. Unblock it
3849 (disable_async_io): Don't ignore SIGIO. Block it instead.
3850 (initialize_async_io): Install SIGIO handler. Don't call
3853 2016-01-26 Yao Qi <yao.qi@linaro.org>
3855 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3856 first character is '\003', call *the_target->request_interrupt.
3858 2016-01-25 Yao Qi <yao.qi@linaro.org>
3860 * remote-utils.c (new_thread_notify): Remove.
3861 (dead_thread_notify): Likewise.
3862 * remote-utils.h (new_thread_notify): Remove declaration.
3863 (dead_thread_notify): Likewise.
3865 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3867 * gdb.trace/pending.exp: Fix expected message on continue.
3869 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3871 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3872 it works properly on big-endian machines where sizeof (CORE_ADDR)
3875 2016-01-21 Pedro Alves <palves@redhat.com>
3877 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3878 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3879 * configure: Regenerate.
3881 2016-01-21 Yao Qi <yao.qi@linaro.org>
3883 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3884 is_thumb and set it according to CPSR saved on the stack.
3885 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3886 arm_sigreturn_next_pc.
3888 2016-01-18 Yao Qi <yao.qi@linaro.org>
3890 * linux-low.c (linux_set_pc_64bit): New function.
3891 (linux_get_pc_64bit): New function.
3892 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3894 * linux-sparc-low.c (debug_threads): Remove declaration.
3895 (sparc_get_pc): Remove.
3896 (the_low_target): Use linux_get_pc_64bit instead of
3898 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3899 (the_low_target): Use linux_get_pc_64bit and
3902 2016-01-18 Yao Qi <yao.qi@linaro.org>
3904 * linux-arm-low.c (debug_threads): Remove declaration.
3905 (arm_get_pc, arm_set_pc): Remove.
3906 (the_low_target): Use linux_get_pc_32bit and
3908 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3909 (the_low_target): Use linux_get_pc_32bit and
3911 * linux-cris-low.c (debug_threads): Remove declaration.
3912 (cris_get_pc, cris_set_pc,): Remove.
3913 (the_low_target): Use linux_get_pc_32bit and
3915 * linux-crisv32-low.c (debug_threads): Remove declaration.
3916 (cris_get_pc, cris_set_pc): Remove.
3917 (the_low_target): Use linux_get_pc_32bit and
3919 * linux-low.c: Include inttypes.h.
3920 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3921 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3922 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3923 (the_low_target): Use linux_get_pc_32bit and
3925 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3926 (the_low_target): Use linux_get_pc_32bit and
3928 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3929 (the_low_target): Use linux_get_pc_32bit and
3931 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3932 (the_low_target): Use linux_get_pc_32bit and
3934 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3935 (the_low_target): Use linux_get_pc_32bit and
3938 2016-01-18 Gary Benson <gbenson@redhat.com>
3940 * configure.ac (AC_FUNC_FORK): New check.
3941 * config.in: Regenerate.
3942 * configure: Likewise.
3944 2016-01-14 Yao Qi <yao.qi@linaro.org>
3946 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3947 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3948 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3949 arm_get_next_pcs_ctor.
3951 2016-01-12 Josh Stone <jistone@redhat.com>
3952 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3954 * inferiors.h: Include "gdb_vecs.h".
3955 (struct process_info): Add syscalls_to_catch.
3956 * inferiors.c (remove_process): Free syscalls_to_catch.
3957 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3958 syscall_return stops.
3959 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3960 * server.c (handle_general_set): Handle QCatchSyscalls.
3961 (handle_query): Report support for QCatchSyscalls.
3962 * target.h (struct target_ops): Add supports_catch_syscall.
3963 (target_supports_catch_syscall): New macro.
3964 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3965 (struct lwp_info): Add syscall_state.
3966 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3967 Maintain syscall_state and syscalls_to_catch across exec.
3968 (get_syscall_trapinfo): New function, proxy to the_low_target.
3969 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3970 (linux_low_filter_event): Toggle syscall_state entry/return for
3971 syscall traps, and set it ignored for all others.
3972 (gdb_catching_syscalls_p): New function.
3973 (gdb_catch_this_syscall_p): New function.
3974 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3975 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3976 (linux_supports_catch_syscall): New function.
3977 (linux_target_ops): Install it.
3978 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3979 (the_low_target): Install it.
3981 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3983 * acinclude.m4: Include new ../warning.m4 file.
3984 * configure: Regenerated.
3985 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3987 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3989 * ax.c (is_goto_target): Mark static.
3990 * linux-low.c (register_addr): Likewise.
3991 (linux_fetch_registers, linux_store_registers): Likewise.
3992 * mem-break.c (any_persistent_commands): Fix old prototype.
3993 (add_commands_to_breakpoint): Mark static.
3994 * regcache.c (find_register_by_name): Delete unused func.
3995 * remote-utils.c (hex_or_minus_one): Mark static.
3996 * server.c (monitor_show_help): Mark static.
3997 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3998 handle_v_requests): Likewise.
4000 2016-01-12 Pedro Alves <palves@redhat.com>
4002 Remove use of the registered trademark symbol throughout.
4004 2016-01-08 Yao Qi <yao.qi@linaro.org>
4006 * remote-utils.c (getpkt): If c is '\003', call target hook
4009 2016-01-06 Yao Qi <yao.qi@linaro.org>
4011 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4012 linux-aarch32-low.c.
4013 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4014 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4015 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4016 (thumb2_breakpoint): Declare.
4017 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4018 linux-aarch32-low.h.
4019 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4020 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4021 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4023 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4025 * gdbreplay.c (gdbreplay_version): Change copyright year in
4027 * server.c (gdbserver_version): Likewise.
4029 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4031 * server.c (crc32_table): Delete.
4032 (crc32): Use libiberty's xcrc32 function.
4034 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4036 * lynx-low.c (lynx_delete_thread_callback): New function.
4037 (lynx_mourn): Properly delete our process and all of its
4038 threads. Remove call to clear_inferiors.
4040 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4042 * target.c (thread_search_callback): Add check that
4043 the thread_stopped target callback is not NULL before
4046 2015-12-21 Yao Qi <yao.qi@linaro.org>
4048 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4051 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4053 * server.c (handle_query): Call target_supports_software_single_step.
4055 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4057 * linux-low.c (single_step): New function.
4058 (linux_resume_one_lwp_throw): Call single_step.
4059 (start_step_over): Likewise.
4061 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4063 * Makefile.in (SFILES): Append arch/arm-linux.c,
4064 arch/arm-get-next-pcs.c.
4065 (arm-linux.o): New rule.
4066 (arm-get-next-pcs.o): New rule.
4067 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4069 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4070 to linux-aarch32-low.c.
4071 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4072 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4073 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4074 (thumb2_breakpoint_len): Likewise.
4075 (arm_is_thumb_mode): Make non-static.
4076 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4077 from linux-aarch32-low.c.
4078 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4079 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4080 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4081 (thumb2_breakpoint_len): Likewise.
4082 (arm_is_thumb_mode): New declaration.
4083 * linux-arm-low.c: Include arch/arm-linux.h
4084 aarch/arm-get-next-pcs.h, sys/syscall.h.
4085 (get_next_pcs_ops): New struct.
4086 (get_next_pcs_addr_bits_remove): New function.
4087 (get_next_pcs_is_thumb): New function.
4088 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4089 (arm_sigreturn_next_pc): Likewise.
4090 (get_next_pcs_syscall_next_pc): Likewise.
4091 (arm_gdbserver_get_next_pcs): Likewise.
4092 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4094 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4095 * server.h: Include gdb_vecs.h.
4097 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4099 * Makefile.in (SFILES): Append common/common-regcache.c.
4100 (OBS): Append common-regcache.o.
4101 (common-regcache.o): New rule.
4102 * regcache.c (init_register_cache): Initialize cache to
4104 (regcache_raw_read_unsigned): New function.
4105 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4106 register_status enum.
4108 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4110 * linux-aarch64-low.c (the_low_targets): Rename
4111 breakpoint_reinsert_addr to get_next_pcs.
4112 * linux-arm-low.c (the_low_targets): Likewise.
4113 * linux-bfin-low.c (the_low_targets): Likewise.
4114 * linux-cris-low.c (the_low_targets): Likewise.
4115 * linux-crisv32-low.c (the_low_targets): Likewise.
4116 * linux-low.c (can_software_single_step): Likewise.
4117 (install_software_single_step_breakpoints): New function.
4118 (start_step_over): Use install_software_single_step_breakpoints.
4119 * linux-low.h: New CORE_ADDR vector.
4120 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4122 * linux-mips-low.c (the_low_targets): Likewise.
4123 * linux-nios2-low.c (the_low_targets): Likewise.
4124 * linux-sparc-low.c (the_low_targets): Likewise.
4126 2015-12-17 Pedro Alves <palves@redhat.com>
4128 * linux-low.c (linux_kill_one_lwp): Remove references to
4130 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4132 (linux_init_signals): Delete.
4133 (initialize_low): Adjust.
4134 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4136 2015-12-16 Pedro Alves <palves@redhat.com>
4138 * configure.ac (compiler warning flags): When testing a
4139 -Wno-foo option, check whether -Wfoo works instead.
4140 * configure: Regenerate.
4142 2015-12-11 Don Breazeal <donb@codesourcery.com>
4144 * server.c (process_serial_event): Don't exit from gdbserver
4145 in remote mode if there are still active inferiors.
4147 2015-12-11 Yao Qi <yao.qi@linaro.org>
4149 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4150 arm_breakpoint_at if the process is 32-bit.
4152 2015-12-11 Yao Qi <yao.qi@linaro.org>
4154 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4157 2015-12-07 Yao Qi <yao.qi@linaro.org>
4159 * configure.srv: Append arm.o to srv_tgtobj for
4160 aarch64*-*-linux* target.
4161 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4162 from linux-arm-low.c.
4163 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4164 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4165 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4166 (thumb2_breakpoint_len): Likewise.
4167 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4168 (arm_breakpoint_kinds): Likewise.
4169 (arm_breakpoint_kind_from_pc): Likewise.
4170 (arm_sw_breakpoint_from_kind): Likewise.
4171 (arm_breakpoint_kind_from_current_state): Likewise.
4172 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4173 (arm_sw_breakpoint_from_kind): Declare.
4174 (arm_breakpoint_kind_from_current_state): Declare.
4175 (arm_breakpoint_at): Declare.
4176 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4177 arm_sw_breakpoint_from_kind if process is 32-bit.
4178 (aarch64_breakpoint_kind_from_pc): New function.
4179 (aarch64_breakpoint_kind_from_current_state): New function.
4180 (the_low_target): Initialize fields breakpoint_kind_from_pc
4181 and breakpoint_kind_from_current_state.
4182 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4183 linux-aarch32-low.c.
4184 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4185 (arm_breakpoint, arm_breakpoint_len): Likewise.
4186 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4187 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4188 (arm_is_thumb_mode): Likewise.
4189 (arm_breakpoint_at): Likewise.
4190 (arm_breakpoint_kind_from_pc): Likewise.
4191 (arm_sw_breakpoint_from_kind): Likewise.
4192 (arm_breakpoint_kind_from_current_state): Likewise.
4195 2015-08-04 Yao Qi <yao.qi@linaro.org>
4197 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4198 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4199 * server.c (extended_protocol): Remove "static".
4200 * server.h (extended_protocol): Declare it.
4202 2015-12-04 Josh Stone <jistone@redhat.com>
4204 * target.h (struct target_ops) <arch_setup>: Rename to ...
4205 (struct target_ops) <post_create_inferior>: ... this.
4206 (target_arch_setup): Rename to ...
4207 (target_post_create_inferior): ... this, calling post_create_inferior.
4208 * server.c (start_inferior): Update target_arch_setup calls to
4209 target_post_create_inferior.
4210 * linux-low.c (linux_low_ptrace_options): Forward declare.
4211 (linux_arch_setup): Update its comment for general use.
4212 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4213 (struct linux_target_ops): Use linux_post_create_inferior.
4214 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4215 to post_create_inferior.
4216 * nto-low.c (struct nto_target_ops): Likewise.
4217 * spu-low.c (struct spu_target_ops): Likewise.
4218 * win32-low.c (struct win32_target_ops): Likewise.
4220 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4222 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4224 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4226 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4227 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4228 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4229 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4230 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4231 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4232 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4233 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4234 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4235 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4236 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4237 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4239 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4241 * linux-low.c (linux_look_up_symbols): Don't call
4242 linux_supports_traceclone.
4243 * linux-low.h (thread_db_init): Remove use_events argument.
4244 * thread-db.c (thread_db_use_event): Remove global variable.
4245 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4246 (struct thread_db) <td_create_bp>: Remove field.
4247 (thread_db_create_event): Remove function.
4248 (thread_db_enable_reporting): Likewise.
4249 (find_one_thread): Don't check for thread_db_use_events.
4250 (attach_thread): Likewise.
4251 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4252 (try_thread_db_load_1): Don't check for thread_db_use_events.
4253 (thread_db_init): Remove use_events argument and thread events
4255 (remove_thread_event_breakpoints): Remove function.
4256 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4258 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4260 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4262 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4263 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4264 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4265 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4266 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4268 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4270 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4271 * linux-low.c (can_hardware_single_step): Use
4272 supports_hardware_single_step.
4273 (can_software_single_step): New function.
4274 (start_step_over): Call can_software_single_step.
4275 (linux_supports_hardware_single_step): New function.
4276 (struct target_ops) <supports_software_single_step>: Initialize.
4277 * linux-low.h (struct linux_target_ops)
4278 <supports_hardware_single_step>: Initialize.
4279 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4280 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4281 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4282 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4283 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4284 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4285 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4286 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4287 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4288 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4290 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4291 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4293 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4294 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4295 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4297 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4298 * target.h (struct target_ops): <supports_software_single_step>:
4300 (target_supports_software_single_step): New macro.
4302 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4304 * linux-low.c (linux_wait_1): Fix pc advance condition.
4305 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4306 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4308 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4310 * linux-arm-low.c (arm_is_thumb_mode): New function.
4311 (arm_breakpoint_at): Use arm_is_thumb_mode.
4312 (arm_breakpoint_kind_from_current_state): New function.
4313 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4315 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4316 (linux_breakpoint_kind_from_current_state): New function.
4317 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4318 * linux-low.h (struct linux_target_ops)
4319 <breakpoint_kind_from_current_state>: New field.
4320 * target.h (struct target_ops): Likewise.
4321 (target_breakpoint_kind_from_current_state): New macro.
4323 2015-11-30 Pedro Alves <palves@redhat.com>
4325 * linux-low.c (linux_resume): Wake up the event loop before
4328 2015-11-30 Pedro Alves <palves@redhat.com>
4330 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4332 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4334 * target.c (struct thread_search): New structure.
4335 (thread_search_callback): New function.
4336 (prev_general_thread): New global.
4337 (prepare_to_access_memory, done_accessing_memory): New functions.
4338 * target.h (prepare_to_access_memory, done_accessing_memory):
4339 Replace macros with function declarations.
4341 2015-11-30 Pedro Alves <palves@redhat.com>
4344 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4345 report TARGET_WAITKIND_NO_RESUMED.
4346 * remote-utils.c (prepare_resume_reply): Handle
4347 TARGET_WAITKIND_NO_RESUMED.
4348 * server.c (report_no_resumed): New global.
4349 (handle_query) <qSupported>: Handle "no-resumed+". Report
4350 "no-resumed+" support.
4351 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4352 return error if the client doesn't support no-resumed events.
4353 (push_stop_notification): New function.
4354 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4355 events if the client supports them.
4357 2015-11-30 Pedro Alves <palves@redhat.com>
4359 * linux-low.c (thread_still_has_status_pending_p): Don't check
4361 (lwp_resumed): New function.
4362 (status_pending_p_callback): Return early if the LWP is not
4363 supposed to be resumed.
4365 2015-11-30 Pedro Alves <palves@redhat.com>
4367 * linux-low.c (handle_extended_wait): Assert that the LWP's
4368 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4369 thread create events, leave the new child's status pending.
4370 (linux_low_filter_event): If GDB wants to hear about thread exit
4371 events, leave the LWP marked dead and don't delete it.
4372 (linux_wait_for_event_filtered): Don't check for thread exit.
4373 (filter_exit_event): New function.
4374 (linux_wait_1): Use it, when returning an exit event.
4375 (linux_resume_one_lwp_throw): Assert that the LWP's
4376 waitstatus is TARGET_WAITKIND_IGNORE.
4377 * remote-utils.c (prepare_resume_reply): Handle
4378 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4379 * server.c (report_thread_events): New global.
4380 (handle_general_set): Handle QThreadEvents.
4381 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4382 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4383 TARGET_WAITKIND_THREAD_EXITED.
4384 * server.h (report_thread_events): Declare.
4386 2015-11-30 Pedro Alves <palves@redhat.com>
4388 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4389 the thread's last_resume_kind was resume_stop.
4391 2015-11-30 Pedro Alves <palves@redhat.com>
4393 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4396 2015-11-30 Pedro Alves <palves@redhat.com>
4398 * server.c (handle_v_requests): Handle vCtrlC.
4400 2015-11-30 Pedro Alves <palves@redhat.com>
4402 * gdbthread.h (find_any_thread_of_pid): Declare.
4403 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4405 * server.c (handle_query): If current_thread is NULL, look for
4406 another thread of the selected process.
4408 2015-11-26 Daniel Colascione <dancol@dancol.org>
4409 Simon Marchi <simon.marchi@ericsson.com>
4411 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4412 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4414 * target.h (struct target_ops) <thread_name>: New field.
4415 (target_thread_name): New macro.
4417 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4419 * regcache.h (regcache_invalidate_pid): Add declaration.
4420 * regcache.c (regcache_invalidate_pid): New function, extracted
4421 from regcache_invalidate.
4422 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4423 Add trivial documentation comment.
4424 * lynx-low.c: Use regcache_invalidate_pid instead of
4425 regcache_invalidate.
4427 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4429 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4430 and Elf64_auxv_t if the target is Android.
4432 2015-11-22 Doug Evans <xdje42@gmail.com>
4434 * target.h: #include <sys/types.h>.
4436 2015-11-19 Pedro Alves <palves@redhat.com>
4438 * linux-low.c (linux_process_qsupported): Change prototype.
4440 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4442 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4443 and adjust to loop over all features.
4444 * server.c (handle_query) <qSupported>: Adjust to call
4445 target_process_qsupported once, passing it a vector of unprocessed
4447 * target.h (struct target_ops) <process_qsupported>: Change
4449 (target_process_qsupported): Adjust.
4451 2015-11-19 Pedro Alves <palves@redhat.com>
4453 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4455 * configure: Regenerate.
4457 2015-11-19 Pedro Alves <palves@redhat.com>
4459 * configure: Regenerate.
4461 2015-11-19 Yao Qi <yao.qi@linaro.org>
4463 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4466 2015-11-19 Yao Qi <yao.qi@linaro.org>
4468 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4469 (struct aarch64_operand): Move enum out.
4471 2015-11-19 Yao Qi <yao.qi@linaro.org>
4473 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4474 struct user_fpsimd_state *.
4475 (aarch64_store_fpregset): Likewise.
4477 2015-11-19 Yao Qi <yao.qi@linaro.org>
4479 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4480 struct user_pt_regs *.
4481 (aarch64_store_gregset): Likewise.
4483 2015-11-18 Pedro Alves <palves@redhat.com>
4485 * Makefile.in (all_object_files): Add $IPA_OBJS.
4487 2015-11-17 Pedro Alves <palves@redhat.com>
4489 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4490 GDB_SIGNAL_0 and gdb_signal_to_string.
4492 2015-11-17 Pedro Alves <palves@redhat.com>
4494 * win32-low.c (handle_output_debug_string): Remove parameter.
4495 (win32_kill): Remove our_status local and adjust call to
4496 handle_output_debug_string.
4497 (get_child_debug_event): Adjust call to
4498 handle_output_debug_string.
4500 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4502 * linux-mips-low.c (mips_fill_gregset): Add cast.
4503 (mips_store_gregset): Likewise.
4504 (mips_fill_fpregset): Likewise.
4505 (mips_store_fpregset): Likewise.
4507 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4509 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4512 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4514 * linux-mips-low.c (mips_linux_new_thread): Change type of
4515 watch_type to enum target_hw_bp_type.
4517 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4519 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4520 Change return type to arm_hwbp_type.
4522 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4524 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4525 (arm_store_gregset): Likewise.
4526 * linux-arm-low.c (arm_get_hwcap): Likewise.
4527 (arm_read_description): Likewise.
4529 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4531 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4533 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4535 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4536 (ppc_fill_vsxregset): Likewise.
4537 (ppc_store_vsxregset): Likewise.
4538 (ppc_fill_vrregset): Likewise.
4539 (ppc_store_vrregset): Likewise.
4540 (ppc_fill_evrregset): Likewise.
4541 (ppc_store_evrregset): Likewise.
4543 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4545 * linux-ppc-low.c (ppc_usrregs_info): Remove
4546 forward-declaration.
4547 (ppc_arch_setup): Move lower in file.
4549 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4551 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4552 (ps_pdwrite): Likewise.
4554 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4556 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4557 to after assert checks.
4559 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4561 * proc-service.c (ps_pdread): Add/adjust casts.
4562 (ps_pdwrite): Add/adjust casts.
4564 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4566 * server.c (handle_search_memory_1): Cast return value of
4569 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4571 * server.c (write_qxfer_response): Change type of data to
4574 2015-10-29 Pedro Alves <palves@redhat.com>
4576 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4578 2015-10-29 Pedro Alves <palves@redhat.com>
4580 * tracepoint.c (clear_installed_tracepoints): Add casts.
4582 2015-10-29 Pedro Alves <palves@redhat.com>
4584 * server.c (handle_v_cont, process_serial_event): Add enum
4585 gdb_signal casts to signal parsing code.
4587 2015-10-29 Pedro Alves <palves@redhat.com>
4589 * linux-low.h (NULL_REGSET): Define.
4590 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4591 * linux-arm-low.c (arm_regsets): Likewise.
4592 * linux-crisv32-low.c (cris_regsets): Likewise.
4593 * linux-m68k-low.c (m68k_regsets): Likewise.
4594 * linux-mips-low.c (mips_regsets): Likewise.
4595 * linux-nios2-low.c (nios2_regsets): Likewise.
4596 * linux-ppc-low.c (ppc_regsets): Likewise.
4597 * linux-s390-low.c (s390_regsets): Likewise.
4598 * linux-sh-low.c (sh_regsets): Likewise.
4599 * linux-sparc-low.c (sparc_regsets): Likewise.
4600 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4601 * linux-tile-low.c (tile_regsets): Likewise.
4602 * linux-x86-low.c (x86_regsets): Likewise.
4603 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4605 2015-10-29 Pedro Alves <palves@redhat.com>
4607 * linux-low.h (NULL_REGSET): Define.
4608 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4609 * linux-arm-low.c (arm_regsets): Likewise.
4610 * linux-crisv32-low.c (cris_regsets): Likewise.
4611 * linux-m68k-low.c (m68k_regsets): Likewise.
4612 * linux-mips-low.c (mips_regsets): Likewise.
4613 * linux-nios2-low.c (nios2_regsets): Likewise.
4614 * linux-ppc-low.c (ppc_regsets): Likewise.
4615 * linux-s390-low.c (s390_regsets): Likewise.
4616 * linux-sh-low.c (sh_regsets): Likewise.
4617 * linux-sparc-low.c (sparc_regsets): Likewise.
4618 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4619 * linux-tile-low.c (tile_regsets): Likewise.
4620 * linux-x86-low.c (x86_regsets): Likewise.
4621 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4623 2015-10-26 Doug Evans <dje@google.com>
4625 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4627 2015-10-26 Doug Evans <dje@google.com>
4629 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4631 2015-10-26 Doug Evans <dje@google.com>
4633 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4635 (attach_thread, find_new_threads_callback): Ditto.
4637 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4639 * mem-break.h (set_breakpoint_data): Remove.
4641 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4643 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4644 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4645 (initialize_low): Remove set_breakpoint_data call.
4646 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4647 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4648 (initialize_low): Remove set_breakpoint_data call.
4649 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4650 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4651 (initialize_low): Remove set_breakpoint_data call.
4653 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4655 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4656 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4657 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4658 * target.h (target_breakpoint_kind_from_pc): New macro.
4660 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4662 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4663 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4664 the default breakpoint kind.
4666 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4668 * linux-arm-low.c (arm_supports_z_point_type): Add software
4671 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4673 * linux-arm-low.c: Refactor breakpoint definitions.
4674 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4675 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4677 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4679 * Makefile.in: Add arm.c/o.
4680 * configure.srv: Likewise.
4681 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4682 (arm_breakpoint_kind_from_pc): New function.
4683 (arm_sw_breakpoint_from_kind): Return proper kind.
4684 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4686 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4688 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4690 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4691 (struct raw_breakpoint) <size>: Remove.
4692 (struct raw_breakpoint) <kind>: Add.
4693 (bp_size): New function.
4694 (bp_opcode): Likewise.
4695 (find_raw_breakpoint_at): Adjust for kind.
4696 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4697 (remove_memory_breakpoint): Adjust for kind call bp_size.
4698 (set_raw_breakpoint_at): Adjust for kind.
4699 (set_breakpoint): Likewise.
4700 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4701 (delete_raw_breakpoint): Adjust for kind.
4702 (delete_breakpoint): Likewise.
4703 (find_gdb_breakpoint): Likewise.
4704 (set_gdb_breakpoint_1): Likewise.
4705 (set_gdb_breakpoint): Likewise.
4706 (delete_gdb_breakpoint_1): Likewise.
4707 (delete_gdb_breakpoint): Likewise.
4708 (uninsert_raw_breakpoint): Likewise.
4709 (reinsert_raw_breakpoint): Likewise.
4710 (set_breakpoint_data): Remove.
4711 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4712 (check_mem_read): Adjust for kind call bp_size.
4713 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4714 (clone_one_breakpoint): Adjust for kind.
4715 * mem-break.h (set_gdb_breakpoint): Likewise.
4716 (delete_gdb_breakpoint): Likewise.
4717 * server.c (process_serial_event): Likewise.
4719 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4721 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4722 (struct linux_target_ops) <breakpoint>: Remove.
4723 (struct linux_target_ops) <breakpoint_len>: Remove.
4724 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4725 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4726 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4727 (arm_sw_breakpoint_from_kind): New function.
4728 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4729 (struct linux_target_ops) <breakpoint>: Remove.
4730 (struct linux_target_ops) <breakpoint_len>: Remove.
4731 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4732 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4733 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4734 (struct linux_target_ops) <breakpoint>: Remove.
4735 (struct linux_target_ops) <breakpoint_len>: Remove.
4736 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4737 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4738 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4739 (struct linux_target_ops) <breakpoint>: Remove.
4740 (struct linux_target_ops) <breakpoint_len>: Remove.
4741 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4742 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4743 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4744 and sw_breakpoint_from_kind to increment the pc.
4745 (linux_breakpoint_kind_from_pc): New function.
4746 (linux_sw_breakpoint_from_kind): New function.
4747 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4748 (initialize_low): Call breakpoint_kind_from_pc and
4749 sw_breakpoint_from_kind to replace breakpoint_data/len.
4750 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4752 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4753 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4754 (struct linux_target_ops) <breakpoint>: Remove.
4755 (struct linux_target_ops) <breakpoint_len>: Remove.
4756 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4757 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4758 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4759 (struct linux_target_ops) <breakpoint>: Remove.
4760 (struct linux_target_ops) <breakpoint_len>: Remove.
4761 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4762 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4763 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4764 (struct linux_target_ops) <breakpoint>: Remove.
4765 (struct linux_target_ops) <breakpoint_len>: Remove.
4766 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4767 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4768 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4769 (struct linux_target_ops) <breakpoint>: Remove.
4770 (struct linux_target_ops) <breakpoint_len>: Remove.
4771 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4772 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4773 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4774 (struct linux_target_ops) <breakpoint>: Remove.
4775 (struct linux_target_ops) <breakpoint_len>: Remove.
4776 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4777 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4778 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4779 (struct linux_target_ops) <breakpoint>: Remove.
4780 (struct linux_target_ops) <breakpoint_len>: Remove.
4781 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4782 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4783 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4784 (struct linux_target_ops) <breakpoint>: Remove.
4785 (struct linux_target_ops) <breakpoint_len>: Remove.
4786 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4787 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4788 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4789 (struct linux_target_ops) <breakpoint>: Remove.
4790 (struct linux_target_ops) <breakpoint_len>: Remove.
4791 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4792 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4793 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4794 (struct linux_target_ops) <breakpoint>: Remove.
4795 (struct linux_target_ops) <breakpoint_len>: Remove.
4796 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4797 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4798 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4799 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4800 (struct linux_target_ops) <breakpoint>: Remove.
4801 (struct linux_target_ops) <breakpoint_len>: Remove.
4802 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4803 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4804 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4805 (struct linux_target_ops) <breakpoint>: Remove.
4806 (struct linux_target_ops) <breakpoint_len>: Remove.
4807 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4808 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4810 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4812 * linux-cris-low.c (cris_get_pc): Remove void arg.
4814 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4816 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4819 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4821 * inferiors.c (thread_pid_matches_callback): New function.
4822 (find_thread_process): New function.
4823 (remove_thread): Reset current_thread.
4824 (remove_process): Assert threads have been removed first.
4826 2015-10-15 Yao Qi <yao.qi@linaro.org>
4828 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4830 (aarch64_remove_point): Likewise.
4831 * regcache.c (regcache_register_size): New function.
4833 2015-10-12 Yao Qi <yao.qi@linaro.org>
4835 * linux-aarch64-low.c: Update all callers as emit_load_store
4836 is renamed to aarch64_emit_load_store.
4838 2015-10-12 Yao Qi <yao.qi@linaro.org>
4840 * linux-aarch64-low.c: Update all callers of function renaming
4841 from emit_insn to aarch64_emit_insn.
4843 2015-10-12 Yao Qi <yao.qi@linaro.org>
4845 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4846 arch/aarch64-insn.h.
4847 (struct aarch64_memory_operand): Likewise.
4849 (emit_insn): Move to arch/aarch64-insn.c.
4850 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4851 (emit_load_store): Move to arch/aarch64-insn.c.
4852 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4853 (can_encode_int32): Remove.
4855 2015-10-12 Yao Qi <yao.qi@linaro.org>
4857 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4858 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4859 (aarch64_relocate_instruction): Likewise.
4860 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4861 (struct aarch64_insn_visitor): Likewise.
4863 2015-10-12 Yao Qi <yao.qi@linaro.org>
4865 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4866 (struct aarch64_insn_visitor): New.
4867 (struct aarch64_insn_relocation_data): New.
4868 (aarch64_ftrace_insn_reloc_b): New function.
4869 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4870 (aarch64_ftrace_insn_reloc_cb): Likewise.
4871 (aarch64_ftrace_insn_reloc_tb): Likewise.
4872 (aarch64_ftrace_insn_reloc_adr): Likewise.
4873 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4874 (aarch64_ftrace_insn_reloc_others): Likewise.
4876 (aarch64_relocate_instruction): Use visitor.
4878 2015-10-12 Yao Qi <yao.qi@linaro.org>
4880 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4881 int. Add argument buf.
4882 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4883 aarch64_relocate_instruction.
4885 2015-10-12 Yao Qi <yao.qi@linaro.org>
4887 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4888 argument insn. Remove local variable insn. Don't call
4890 (aarch64_install_fast_tracepoint_jump_pad): Call
4893 2015-09-30 Yao Qi <yao.qi@linaro.org>
4895 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4896 (emit_load_store_pair): Likewise.
4898 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4900 * dll.c (match_dll): Add cast(s).
4901 (unloaded_dll): Likewise.
4902 * linux-low.c (second_thread_of_pid_p): Likewise.
4903 (delete_lwp_callback): Likewise.
4904 (count_events_callback): Likewise.
4905 (select_event_lwp_callback): Likewise.
4906 (linux_set_resume_request): Likewise.
4907 * server.c (accumulate_file_name_length): Likewise.
4908 (emit_dll_description): Likewise.
4909 (handle_qxfer_threads_worker): Likewise.
4910 (visit_actioned_threads): Likewise.
4911 * thread-db.c (any_thread_of): Likewise.
4912 * tracepoint.c (same_process_p): Likewise.
4913 (match_blocktype): Likewise.
4914 (build_traceframe_info_xml): Likewise.
4916 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4918 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4920 (gdb_unparse_agent_expr): Likewise.
4921 * hostio.c (require_data): Likewise.
4922 (handle_pread): Likewise.
4923 * linux-low.c (disable_regset): Likewise.
4924 (fetch_register): Likewise.
4925 (store_register): Likewise.
4926 (get_dynamic): Likewise.
4927 (linux_qxfer_libraries_svr4): Likewise.
4928 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4929 (set_fast_tracepoint_jump): Likewise.
4930 (uninsert_fast_tracepoint_jumps_at): Likewise.
4931 (reinsert_fast_tracepoint_jumps_at): Likewise.
4932 (validate_inserted_breakpoint): Likewise.
4933 (clone_agent_expr): Likewise.
4934 * regcache.c (init_register_cache): Likewise.
4935 * remote-utils.c (putpkt_binary_1): Likewise.
4936 (decode_M_packet): Likewise.
4937 (decode_X_packet): Likewise.
4938 (look_up_one_symbol): Likewise.
4939 (relocate_instruction): Likewise.
4940 (monitor_output): Likewise.
4941 * server.c (handle_search_memory): Likewise.
4942 (handle_qxfer_exec_file): Likewise.
4943 (handle_qxfer_libraries): Likewise.
4944 (handle_qxfer): Likewise.
4945 (handle_query): Likewise.
4946 (handle_v_cont): Likewise.
4947 (handle_v_run): Likewise.
4948 (captured_main): Likewise.
4949 * target.c (write_inferior_memory): Likewise.
4950 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4951 * tracepoint.c (init_trace_buffer): Likewise.
4952 (add_tracepoint_action): Likewise.
4953 (add_traceframe): Likewise.
4954 (add_traceframe_block): Likewise.
4955 (cmd_qtdpsrc): Likewise.
4956 (cmd_qtdv): Likewise.
4957 (cmd_qtstatus): Likewise.
4958 (response_source): Likewise.
4959 (response_tsv): Likewise.
4960 (cmd_qtnotes): Likewise.
4961 (gdb_collect): Likewise.
4962 (initialize_tracepoint): Likewise.
4964 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4966 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4967 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4968 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4970 (enum aarch64_condition_codes): New enum.
4971 (w0): New static global.
4974 (struct aarch64_memory_operand) <type>: New
4975 MEMORY_OPERAND_POSTINDEX type.
4976 (postindex_memory_operand): New helper function.
4977 (emit_ret): New function.
4978 (emit_load_store_pair): New function, factored out of emit_stp
4979 with support for MEMORY_OPERAND_POSTINDEX.
4980 (emit_stp): Rewrite using emit_load_store_pair.
4981 (emit_ldp): New function.
4982 (emit_load_store): Likewise.
4983 (emit_ldr): Mention post-index instruction in comment.
4984 (emit_ldrh): New function.
4985 (emit_ldrb): New function.
4986 (emit_ldrsw): Mention post-index instruction in comment.
4987 (emit_str): Likewise.
4988 (emit_subs): New function.
4989 (emit_cmp): Likewise.
4990 (emit_and): Likewise.
4991 (emit_orr): Likewise.
4992 (emit_orn): Likewise.
4993 (emit_eor): Likewise.
4994 (emit_mvn): Likewise.
4995 (emit_lslv): Likewise.
4996 (emit_lsrv): Likewise.
4997 (emit_asrv): Likewise.
4998 (emit_mul): Likewise.
4999 (emit_sbfm): Likewise.
5000 (emit_sbfx): Likewise.
5001 (emit_ubfm): Likewise.
5002 (emit_ubfx): Likewise.
5003 (emit_csinc): Likewise.
5004 (emit_cset): Likewise.
5005 (emit_nop): Likewise.
5006 (emit_ops_insns): New helper function.
5007 (emit_pop): Likewise.
5008 (emit_push): Likewise.
5009 (aarch64_emit_prologue): New function.
5010 (aarch64_emit_epilogue): Likewise.
5011 (aarch64_emit_add): Likewise.
5012 (aarch64_emit_sub): Likewise.
5013 (aarch64_emit_mul): Likewise.
5014 (aarch64_emit_lsh): Likewise.
5015 (aarch64_emit_rsh_signed): Likewise.
5016 (aarch64_emit_rsh_unsigned): Likewise.
5017 (aarch64_emit_ext): Likewise.
5018 (aarch64_emit_log_not): Likewise.
5019 (aarch64_emit_bit_and): Likewise.
5020 (aarch64_emit_bit_or): Likewise.
5021 (aarch64_emit_bit_xor): Likewise.
5022 (aarch64_emit_bit_not): Likewise.
5023 (aarch64_emit_equal): Likewise.
5024 (aarch64_emit_less_signed): Likewise.
5025 (aarch64_emit_less_unsigned): Likewise.
5026 (aarch64_emit_ref): Likewise.
5027 (aarch64_emit_if_goto): Likewise.
5028 (aarch64_emit_goto): Likewise.
5029 (aarch64_write_goto_address): Likewise.
5030 (aarch64_emit_const): Likewise.
5031 (aarch64_emit_call): Likewise.
5032 (aarch64_emit_reg): Likewise.
5033 (aarch64_emit_pop): Likewise.
5034 (aarch64_emit_stack_flush): Likewise.
5035 (aarch64_emit_zero_ext): Likewise.
5036 (aarch64_emit_swap): Likewise.
5037 (aarch64_emit_stack_adjust): Likewise.
5038 (aarch64_emit_int_call_1): Likewise.
5039 (aarch64_emit_void_call_2): Likewise.
5040 (aarch64_emit_eq_goto): Likewise.
5041 (aarch64_emit_ne_goto): Likewise.
5042 (aarch64_emit_lt_goto): Likewise.
5043 (aarch64_emit_le_goto): Likewise.
5044 (aarch64_emit_gt_goto): Likewise.
5045 (aarch64_emit_ge_got): Likewise.
5046 (aarch64_emit_ops_impl): New static global variable.
5047 (aarch64_emit_ops): New target function, return
5048 &aarch64_emit_ops_impl.
5049 (struct linux_target_ops): Install it.
5051 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5053 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5054 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5056 * linux-aarch64-ipa.c: New file.
5057 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5059 (aarch64_get_thread_area): New target method.
5060 (extract_signed_bitfield): New helper function.
5061 (aarch64_decode_ldr_literal): New function.
5062 (enum aarch64_opcodes): New enum.
5063 (struct aarch64_register): New struct.
5064 (struct aarch64_operand): New struct.
5065 (x0): New static global.
5074 (aarch64_register): New helper function.
5075 (register_operand): Likewise.
5076 (immediate_operand): Likewise.
5077 (struct aarch64_memory_operand): New struct.
5078 (offset_memory_operand): New helper function.
5079 (preindex_memory_operand): Likewise.
5080 (enum aarch64_system_control_registers): New enum.
5081 (ENCODE): New macro.
5082 (emit_insn): New helper function.
5083 (emit_b): New function.
5084 (emit_bcond): Likewise.
5085 (emit_cb): Likewise.
5086 (emit_tb): Likewise.
5087 (emit_blr): Likewise.
5088 (emit_stp): Likewise.
5089 (emit_ldp_q_offset): Likewise.
5090 (emit_stp_q_offset): Likewise.
5091 (emit_load_store): Likewise.
5092 (emit_ldr): Likewise.
5093 (emit_ldrsw): Likewise.
5094 (emit_str): Likewise.
5095 (emit_ldaxr): Likewise.
5096 (emit_stxr): Likewise.
5097 (emit_stlr): Likewise.
5098 (emit_data_processing_reg): Likewise.
5099 (emit_data_processing): Likewise.
5100 (emit_add): Likewise.
5101 (emit_sub): Likewise.
5102 (emit_mov): Likewise.
5103 (emit_movk): Likewise.
5104 (emit_mov_addr): Likewise.
5105 (emit_mrs): Likewise.
5106 (emit_msr): Likewise.
5107 (emit_sevl): Likewise.
5108 (emit_wfe): Likewise.
5109 (append_insns): Likewise.
5110 (can_encode_int32_in): New helper function.
5111 (aarch64_relocate_instruction): New function.
5112 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5113 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5114 (struct linux_target_ops): Install aarch64_get_thread_area,
5115 aarch64_install_fast_tracepoint_jump_pad and
5116 aarch64_get_min_fast_tracepoint_insn_len.
5118 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5120 * Makefile.in (aarch64-insn.o): New rule.
5121 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5123 2015-09-21 Yao Qi <yao.qi@linaro.org>
5125 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5127 2015-09-21 Yao Qi <yao.qi@linaro.org>
5129 * tracepoint.c (max_jump_pad_size): Remove.
5131 2015-09-18 Yao Qi <yao.qi@linaro.org>
5133 * linux-aarch64-low.c: Don't include sys/uio.h.
5134 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5136 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5138 * tracepoint.c (eval_result_type): Change prototype.
5139 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5141 2015-09-15 Pedro Alves <palves@redhat.com>
5143 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5144 Check whether to report exec events instead of checking whether
5145 multiprocess is enabled.
5147 2015-09-15 Pedro Alves <palves@redhat.com>
5150 * remote-utils.c (prepare_resume_reply): Merge
5151 TARGET_WAITKIND_VFORK_DONE switch case with the
5152 TARGET_WAITKIND_FORKED case.
5154 2015-09-15 Yao Qi <yao.qi@linaro.org>
5156 * server.c (handle_query): Check string comparison using
5157 "else if" instead of "if".
5159 2015-09-15 Yao Qi <yao.qi@linaro.org>
5161 * server.c (vCont_supported): New global variable.
5162 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5163 matches. Append ";vContSupported+" to own_buf.
5164 (handle_v_requests): Append ";s;S" to own_buf if target supports
5165 hardware single step or vCont_supported is false.
5166 (capture_main): Set vCont_supported to zero.
5168 2015-09-15 Yao Qi <yao.qi@linaro.org>
5170 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5172 (linux_supports_hardware_single_step): ... New function.
5173 (linux_target_ops): Update.
5174 * lynx-low.c (lynx_target_ops): Set field
5175 supports_hardware_single_step to target_can_do_hardware_single_step.
5176 * nto-low.c (nto_target_ops): Likewise.
5177 * spu-low.c (spu_target_ops): Likewise.
5178 * win32-low.c (win32_target_ops): Likewise.
5179 * target.c (target_can_do_hardware_single_step): New function.
5180 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5181 Remove. <supports_hardware_single_step>: New field.
5182 (target_supports_conditional_breakpoints): Remove.
5183 (target_supports_hardware_single_step): New macro.
5184 (target_can_do_hardware_single_step): Declare.
5185 * server.c (handle_query): Use target_supports_hardware_single_step
5186 instead of target_supports_conditional_breakpoints.
5188 2015-09-15 Yao Qi <yao.qi@linaro.org>
5190 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5192 (struct linux_target_ops the_low_target): Install
5193 aarch64_linux_siginfo_fixup.
5195 2015-09-11 Don Breazeal <donb@codesourcery.com>
5196 Luis Machado <lgustavo@codesourcery.com>
5198 * linux-low.c (linux_mourn): Static declaration.
5199 (linux_arch_setup): Move in front of
5200 handle_extended_wait.
5201 (linux_arch_setup_thread): New function.
5202 (handle_extended_wait): Handle exec events. Call
5203 linux_arch_setup_thread. Make event_lwp argument a
5204 pointer-to-a-pointer.
5205 (check_zombie_leaders): Do not check stopped threads.
5206 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5207 (linux_low_filter_event): Add lwp and thread for exec'ing
5208 non-leader thread if leader thread has been deleted.
5209 Refactor code into linux_arch_setup_thread and call it.
5210 Pass child lwp pointer by reference to handle_extended_wait.
5211 (linux_wait_for_event_filtered): Update comment.
5212 (linux_wait_1): Prevent clobbering exec event status.
5213 (linux_supports_exec_events): New function.
5214 (linux_target_ops) <supports_exec_events>: Initialize new member.
5215 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5217 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5218 * server.c (report_exec_events): New global variable.
5219 (handle_query): Handle qSupported query for exec-events feature.
5220 (captured_main): Initialize report_exec_events.
5221 * server.h (report_exec_events): Declare new global variable.
5222 * target.h (struct target_ops) <supports_exec_events>: New
5224 (target_supports_exec_events): New macro.
5225 * win32-low.c (win32_target_ops) <supports_exec_events>:
5226 Initialize new member.
5228 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5230 * linux-low.c (linux_low_enable_btrace): Remove.
5231 (linux_target_ops): Replace linux_low_enable_btrace with
5232 linux_enable_btrace.
5234 2015-09-03 Yao Qi <yao.qi@linaro.org>
5236 * linux-aarch64-low.c (aarch64_insert_point): Call
5237 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5240 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5242 * linux-low.c (check_stopped_by_breakpoint): Use
5243 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5245 2015-08-27 Pedro Alves <palves@redhat.com>
5247 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5249 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5251 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5252 the XNEW-family equivalent.
5253 (compile_bytecodes): Likewise.
5254 * dll.c (loaded_dll): Likewise.
5255 * event-loop.c (append_callback_event): Likewise.
5256 (create_file_handler): Likewise.
5257 (create_file_event): Likewise.
5258 * hostio.c (handle_open): Likewise.
5259 * inferiors.c (add_thread): Likewise.
5260 (add_process): Likewise.
5261 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5262 * linux-arm-low.c (arm_new_process): Likewise.
5263 (arm_new_thread): Likewise.
5264 * linux-low.c (add_to_pid_list): Likewise.
5265 (linux_add_process): Likewise.
5266 (handle_extended_wait): Likewise.
5267 (add_lwp): Likewise.
5268 (enqueue_one_deferred_signal): Likewise.
5269 (enqueue_pending_signal): Likewise.
5270 (linux_resume_one_lwp_throw): Likewise.
5271 (linux_resume_one_thread): Likewise.
5272 (linux_read_memory): Likewise.
5273 (linux_write_memory): Likewise.
5274 * linux-mips-low.c (mips_linux_new_process): Likewise.
5275 (mips_linux_new_thread): Likewise.
5276 (mips_add_watchpoint): Likewise.
5277 * linux-x86-low.c (initialize_low_arch): Likewise.
5278 * lynx-low.c (lynx_add_process): Likewise.
5279 * mem-break.c (set_raw_breakpoint_at): Likewise.
5280 (set_breakpoint): Likewise.
5281 (add_condition_to_breakpoint): Likewise.
5282 (add_commands_to_breakpoint): Likewise.
5283 (clone_agent_expr): Likewise.
5284 (clone_one_breakpoint): Likewise.
5285 * regcache.c (new_register_cache): Likewise.
5286 * remote-utils.c (look_up_one_symbol): Likewise.
5287 * server.c (queue_stop_reply): Likewise.
5288 (start_inferior): Likewise.
5289 (queue_stop_reply_callback): Likewise.
5290 (handle_target_event): Likewise.
5291 * spu-low.c (fetch_ppc_memory): Likewise.
5292 (store_ppc_memory): Likewise.
5293 * target.c (set_target_ops): Likewise.
5294 * thread-db.c (thread_db_load_search): Likewise.
5295 (try_thread_db_load_1): Likewise.
5296 * tracepoint.c (add_tracepoint): Likewise.
5297 (add_tracepoint_action): Likewise.
5298 (create_trace_state_variable): Likewise.
5299 (cmd_qtdpsrc): Likewise.
5300 (cmd_qtro): Likewise.
5301 (add_while_stepping_state): Likewise.
5302 * win32-low.c (child_add_thread): Likewise.
5303 (get_image_name): Likewise.
5305 2015-08-25 Yao Qi <yao.qi@linaro.org>
5307 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5309 2015-08-25 Yao Qi <yao.qi@linaro.org>
5311 * Makefile.in (aarch64-linux.o): New rule.
5312 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5314 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5315 (aarch64_init_debug_reg_state): Make it extern.
5316 (aarch64_linux_prepare_to_resume): Remove.
5318 2015-08-25 Yao Qi <yao.qi@linaro.org>
5320 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5321 lwp_arch_private_info and ptid_of_lwp.
5323 2015-08-25 Yao Qi <yao.qi@linaro.org>
5325 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5326 Find proc_info by find_process_pid. All callers updated.
5328 2015-08-25 Yao Qi <yao.qi@linaro.org>
5330 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5332 (debug_reg_change_callback): Remove.
5333 (aarch64_notify_debug_reg_change): Remove.
5335 2015-08-25 Yao Qi <yao.qi@linaro.org>
5337 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5338 Call current_lwp_ptid.
5340 2015-08-25 Yao Qi <yao.qi@linaro.org>
5342 * linux-aarch64-low.c (debug_reg_change_callback): Use
5345 2015-08-25 Yao Qi <yao.qi@linaro.org>
5347 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5349 2015-08-25 Yao Qi <yao.qi@linaro.org>
5351 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5353 2015-08-25 Yao Qi <yao.qi@linaro.org>
5355 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5358 2015-08-25 Yao Qi <yao.qi@linaro.org>
5360 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5362 (debug_reg_change_callback): Remove argument entry and add argument
5363 lwp. Remove local variable thread. Don't print thread id in the
5364 debugging output. Don't check whether pid of thread equals to pid.
5365 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5366 iterate_over_lwps instead find_inferior.
5368 2015-08-24 Pedro Alves <palves@redhat.com>
5370 * inferiors.c (get_first_process): New function.
5371 * inferiors.h (get_first_process): New declaration.
5372 * remote-utils.c (read_ptid): Default to the first process in the
5373 list, instead of to the current thread's process.
5375 2015-08-24 Pedro Alves <palves@redhat.com>
5377 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5378 * event-loop.c: Likewise.
5379 * remote-utils.c: Likewise.
5380 * tracepoint.c: Likewise.
5382 2015-08-24 Pedro Alves <palves@redhat.com>
5384 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5387 2015-08-21 Pedro Alves <palves@redhat.com>
5389 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5390 instead of literal 1.
5392 2015-08-21 Pedro Alves <palves@redhat.com>
5394 * tdesc.c (default_description): Explicitly zero-initialize.
5396 2015-08-21 Pedro Alves <palves@redhat.com>
5399 * inferiors.c (remove_thread): Discard any pending stop reply for
5401 * server.c (remove_all_on_match_pid): Rename to ...
5402 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5404 (discard_queued_stop_replies): Change parameter to a ptid. Now
5406 (handle_v_kill, kill_inferior_callback, captured_main)
5407 (process_serial_event): Adjust.
5408 * server.h (discard_queued_stop_replies): Declare.
5410 2015-08-21 Pedro Alves <palves@redhat.com>
5412 * linux-low.c (wait_for_sigstop): Always switch to no thread
5413 selected if the previously current thread dies.
5414 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5415 process instead of the current thread's.
5416 * remote-utils.c (input_interrupt): Don't check if there's no
5418 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5419 current thread to the general thread fails, error out.
5420 (handle_qxfer_auxv, handle_qxfer_libraries)
5421 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5422 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5423 (handle_query): Check if there's a thread selected instead of
5424 checking whether there's any thread in the thread list.
5425 (handle_qxfer_threads, handle_qxfer_btrace)
5426 (handle_qxfer_btrace_conf): Don't error out early if there's no
5427 thread in the thread list.
5428 (handle_v_cont, myresume): Don't set the current thread to the
5430 (process_serial_event) <Hg handling>: Also set thread_id if the
5431 previous general thread is still alive.
5432 (process_serial_event) <g/G handling>: If setting the current
5433 thread to the general thread fails, error out.
5434 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5435 thread's lwp instead of the current thread's.
5436 * target.c (set_desired_thread): If the desired thread was not
5437 found, leave the current thread pointing to NULL. Return an int
5438 (boolean) indicating success.
5439 * target.h (set_desired_thread): Change return type to int.
5441 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5443 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5444 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5446 (ps_get_thread_area): New function.
5448 2015-08-19 Gary Benson <gbenson@redhat.com>
5450 * hostio.c (handle_pread): Do not attempt to read more data
5451 than hostio_reply_with_data can fit in a packet.
5453 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5455 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5457 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5459 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5461 2015-08-06 Pedro Alves <palves@redhat.com>
5463 * tracepoint.c (expr_eval_result): Now an int.
5465 2015-08-06 Pedro Alves <palves@redhat.com>
5467 * gdbthread.h (struct regcache): Forward declare.
5468 (struct thread_info) <regcache_data>: Now a struct regcache
5470 * inferiors.c (inferior_regcache_data)
5471 (set_inferior_regcache_data): Now work with struct regcache
5473 * inferiors.h (struct regcache): Forward declare.
5474 (inferior_regcache_data, set_inferior_regcache_data): Now work
5475 with struct regcache pointers.
5476 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5477 (free_register_cache_thread): Remove struct regcache pointer
5480 2015-08-06 Pedro Alves <palves@redhat.com>
5482 * server.c (captured_main): On error, print the exception message
5483 to stderr, and if run_once is set, throw a quit.
5485 2015-08-06 Pedro Alves <palves@redhat.com>
5487 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5490 2015-08-06 Pedro Alves <palves@redhat.com>
5492 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5493 reading beyond the passed in buffer length.
5495 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5497 * tracepoint.c (symbol_list) <required>: Remove.
5499 2015-08-06 Pedro Alves <palves@redhat.com>
5501 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5502 count if stopping and suspending threads.
5503 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5504 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5505 (linux_detach): Complete an ongoing step-over.
5506 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5508 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5509 (linux_wait_1): If passing a signal to the inferior after
5510 finishing a step-over, unsuspend and re-resume all lwps. If we
5511 see a single-step event but the thread should be continuing, don't
5512 pass the trap to gdb.
5513 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5514 internal_error instead of gdb_assert.
5515 (enqueue_pending_signal): New function.
5516 (check_ptrace_stopped_lwp_gone): Add debug output.
5517 (start_step_over): Use internal_error instead of gdb_assert.
5518 (complete_ongoing_step_over): New function.
5519 (linux_resume_one_thread): Don't resume a suspended thread.
5520 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5523 2015-08-06 Pedro Alves <palves@redhat.com>
5525 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5526 (linux_thread_alive): Use lwp_is_marked_dead.
5527 (extended_event_reported): Delete.
5528 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5529 instead of extended_event_reported.
5530 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5532 (lwp_is_marked_dead): New function.
5533 (lwp_running): Use lwp_is_marked_dead.
5534 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5537 2015-08-06 Pedro Alves <palves@redhat.com>
5539 * linux-low.c (linux_wait_1): Move fork event output out of the
5540 !report_to_gdb check. Pass event_child->waitstatus to
5541 target_waitstatus_to_string instead of ourstatus.
5543 2015-08-04 Yao Qi <yao.qi@linaro.org>
5545 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5546 if current_thread is 32 bit.
5548 2015-08-04 Yao Qi <yao.qi@linaro.org>
5550 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5551 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5552 * server.c (extended_protocol): Remove "static".
5553 * server.h (extended_protocol): Declare it.
5555 2015-08-04 Yao Qi <yao.qi@linaro.org>
5557 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5558 both aarch64 and aarch32.
5559 (aarch64_set_pc): Likewise.
5561 2015-08-04 Yao Qi <yao.qi@linaro.org>
5563 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5564 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5565 arm-with-neon.xml to srv_xmlfiles.
5566 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5567 (is_64bit_tdesc): New function.
5568 (aarch64_linux_read_description): New function.
5569 (aarch64_arch_setup): Call aarch64_linux_read_description.
5570 (regs_info): Rename to regs_info_aarch64.
5571 (aarch64_regs_info): Return right regs_info.
5572 (initialize_low_arch): Call initialize_low_arch_aarch32.
5574 2015-08-04 Yao Qi <yao.qi@linaro.org>
5576 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5577 * linux-aarch32-low.c: New file.
5578 * linux-aarch32-low.h: New file.
5579 * linux-arm-low.c (arm_fill_gregset): Move it to
5580 linux-aarch32-low.c.
5581 (arm_store_gregset): Likewise.
5582 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5583 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5584 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5585 (regs_info): Rename to regs_info_arm.
5586 (arm_regs_info): Return regs_info_aarch32 if
5587 have_ptrace_getregset is 1 and target description is
5588 arm_with_neon or arm_with_vfpv3.
5589 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5590 Call initialize_low_arch_aarch32 instead.
5592 2015-08-04 Yao Qi <yao.qi@linaro.org>
5594 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5595 * linux-low.c: ... here.
5596 * linux-low.h (have_ptrace_getregset): Declare it.
5598 2015-08-04 Pedro Alves <palves@redhat.com>
5600 * thread-db.c (struct thread_db): Use new typedefs.
5601 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5603 (disable_thread_event_reporting): Cast result of dlsym to
5604 destination function pointer type.
5605 (thread_db_mourn): Use td_ta_delete_ftype.
5607 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5609 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5611 (CDX_BREAKPOINT): Define for R2.
5612 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5613 (the_low_target): Add comments.
5615 2015-07-30 Yao Qi <yao.qi@linaro.org>
5617 * linux-arm-low.c (arm_hwcap): Remove it.
5618 (arm_read_description): New local variable arm_hwcap. Don't
5619 set arm_hwcap to zero.
5621 2015-07-30 Yao Qi <yao.qi@linaro.org>
5623 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5624 Use regcache->tdesc instead.
5625 (arm_store_wmmxregset): Likewise.
5626 (arm_fill_vfpregset): Likewise.
5627 (arm_store_vfpregset): Likewise.
5629 2015-07-30 Yao Qi <yao.qi@linaro.org>
5631 * linux-arm-low.c: Include arch/arm.h.
5632 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5633 (arm_store_gregset): Likewise.
5635 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5637 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5638 ptrace's 4th parameter.
5640 2015-07-27 Yao Qi <yao.qi@linaro.org>
5642 * configure.srv (case aarch64*-*-linux*): Don't set
5645 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5647 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5649 * linux-arm-low.c: Likewise.
5650 * linux-cris-low.c: Likewise.
5651 * linux-crisv32-low.c: Likewise.
5652 * linux-low.c: Likewise.
5653 * linux-m68k-low.c: Likewise.
5654 * linux-mips-low.c: Likewise.
5655 * linux-nios2-low.c: Likewise.
5656 * linux-s390-low.c: Likewise.
5657 * linux-sparc-low.c: Likewise.
5658 * linux-tic6x-low.c: Likewise.
5659 * linux-tile-low.c: Likewise.
5660 * linux-x86-low.c: Likewise.
5662 2015-07-24 Pedro Alves <palves@redhat.com>
5664 * config.in: Regenerate.
5665 * configure: Regenerate.
5667 2015-07-24 Pedro Alves <palves@redhat.com>
5669 * acinclude.m4: Include ../ptrace.m4.
5670 * configure.ac: Call GDB_AC_PTRACE.
5671 * config.in, configure: Regenerate.
5673 2015-07-24 Yao Qi <yao.qi@linaro.org>
5675 * linux-low.c (linux_create_inferior): Remove setting to
5676 proc->priv->new_inferior.
5677 (linux_attach): Likewise.
5678 (linux_low_filter_event): Likewise.
5679 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5681 2015-07-24 Yao Qi <yao.qi@linaro.org>
5683 * linux-low.c (linux_arch_setup): New function.
5684 (linux_low_filter_event): If proc->tdesc is NULL and
5685 proc->attached is true, call the_low_target.arch_setup.
5686 Otherwise, keep status pending, and return.
5687 (linux_resume_one_lwp_throw): Don't call get_pc if
5688 thread->while_stepping isn't NULL. Don't call
5689 get_thread_regcache if proc->tdesc is NULL.
5690 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5691 (linux_target_ops): Install arch_setup.
5692 * server.c (start_inferior): Call the_target->arch_setup.
5693 * target.h (struct target_ops) <arch_setup>: New field.
5694 (target_arch_setup): New marco.
5695 * lynx-low.c (lynx_target_ops): Update.
5696 * nto-low.c (nto_target_ops): Update.
5697 * spu-low.c (spu_target_ops): Update.
5698 * win32-low.c (win32_target_ops): Update.
5700 2015-07-24 Yao Qi <yao.qi@linaro.org>
5702 * linux-low.c (linux_add_process): Don't set
5703 proc->priv->new_inferior.
5704 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5705 (linux_attach): Likewise.
5707 2015-07-24 Yao Qi <yao.qi@linaro.org>
5709 * server.c (start_inferior): Code refactor.
5711 2015-07-24 Yao Qi <yao.qi@linaro.org>
5713 * server.c (process_serial_event): Set general_thread.
5715 2015-07-21 Yao Qi <yao.qi@linaro.org>
5717 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5718 aarch64_linux_get_debug_reg_capacity.
5720 2015-07-17 Yao Qi <yao.qi@linaro.org>
5722 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5723 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5724 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5725 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5726 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5727 (AARCH64_HWP_ALIGNMENT): Likewise.
5728 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5729 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5730 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5731 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5732 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5733 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5734 (struct aarch64_debug_reg_state): Likewise.
5735 (struct arch_lwp_info): Likewise.
5736 (aarch64_align_watchpoint): Likewise.
5737 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5738 (aarch64_watchpoint_length): Likewise.
5739 (aarch64_point_encode_ctrl_reg): Likewise
5740 (aarch64_point_is_aligned): Likewise.
5741 (aarch64_align_watchpoint): Likewise.
5742 (aarch64_linux_set_debug_regs):
5743 (aarch64_dr_state_insert_one_point): Likewise.
5744 (aarch64_dr_state_remove_one_point): Likewise.
5745 (aarch64_handle_breakpoint): Likewise.
5746 (aarch64_handle_aligned_watchpoint): Likewise.
5747 (aarch64_handle_unaligned_watchpoint): Likewise.
5748 (aarch64_handle_watchpoint): Likewise.
5750 2015-07-17 Yao Qi <yao.qi@linaro.org>
5752 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5753 and don't aarch64_get_debug_reg_state. All callers update.
5754 (aarch64_handle_aligned_watchpoint): Likewise.
5755 (aarch64_handle_unaligned_watchpoint): Likewise.
5756 (aarch64_handle_watchpoint): Likewise.
5757 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5758 (aarch64_remove_point): Likewise.
5760 2015-07-17 Yao Qi <yao.qi@linaro.org>
5762 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5764 (aarch64_handle_unaligned_watchpoint): Likewise.
5766 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5768 Revert the previous 3 commits:
5769 Move gdb_regex* to common/
5770 Move linux_find_memory_regions_full & co.
5771 gdbserver build-id attribute generator
5773 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5774 Jan Kratochvil <jan.kratochvil@redhat.com>
5776 gdbserver build-id attribute generator.
5777 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5778 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5779 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5781 (get_dynamic): Use find_pdhr to traverse program headers.
5782 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5783 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5784 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5785 (get_hex_build_id): New.
5786 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5787 to reply XML document.
5789 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5790 Jan Kratochvil <jan.kratochvil@redhat.com>
5792 * target.c: Include target/target-utils.h and fcntl.h.
5793 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5794 (target_fileio_read_stralloc): New functions.
5796 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5798 * Makefile.in (OBS): Add gdb_regex.o.
5800 * config.in: Rebuilt.
5801 * configure: Rebuilt.
5803 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5804 Jan Kratochvil <jan.kratochvil@redhat.com>
5806 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5807 * Makefile.in (OBS): Add target-utils.o.
5808 (linux-maps.o, target-utils.o): New.
5809 * configure.srv (srv_linux_obj): Add linux-maps.o.
5811 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5813 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5815 (the_low_target): Install it.
5817 2015-07-14 Pedro Alves <palves@redhat.com>
5819 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5820 Instead, ignore ECHILD, and throw an error for other errnos.
5822 2015-07-10 Pedro Alves <palves@redhat.com>
5824 * event-loop.c (struct callback_event) <data>: Change type to
5825 gdb_client_data instance instead of gdb_client_data pointer.
5826 (append_callback_event): Adjust.
5828 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5830 * linux-aarch64-low.c: Add comments for each linux_target_ops
5831 method. Remove comments already covered in target_ops and
5832 linux_target_ops definitions.
5833 (the_low_target): Add comments for each unimplemented method.
5835 2015-07-09 Yao Qi <yao.qi@linaro.org>
5837 * linux-aarch64-low.c (aarch64_regmap): Remove.
5838 (aarch64_usrregs_info): Remove.
5839 (regs_info): Set field usrregs to NULL.
5841 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5843 * linux-low.c: Include "rsp-low.h"
5844 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5845 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5846 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5847 (handle_btrace_enable_pt): New.
5848 (handle_btrace_general_set): Support "pt".
5849 (handle_btrace_conf_general_set): Support "pt:size".
5851 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5853 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5856 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5858 * linux-aarch64-low.c: Remove comment about endianness.
5859 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5860 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5863 2015-06-24 Gary Benson <gbenson@redhat.com>
5865 * linux-i386-ipa.c (stdint.h): Do not include.
5866 * lynx-i386-low.c (stdint.h): Likewise.
5867 * lynx-ppc-low.c (stdint.h): Likewise.
5868 * mem-break.c (stdint.h): Likewise.
5869 * thread-db.c (stdint.h): Likewise.
5870 * tracepoint.c (stdint.h): Likewise.
5871 * win32-low.c (stdint.h): Likewise.
5873 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5875 * server.c (write_qxfer_response): Update call to
5876 remote_escape_output.
5878 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5879 Jan Kratochvil <jan.kratochvil@redhat.com>
5881 Merge multiple hex conversions.
5882 * gdbreplay.c (tohex): Rename to 'fromhex'.
5883 (logchar): Use fromhex.
5885 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5887 * server.c (handle_qxfer_libraries): Set `version' attribute for
5890 2015-06-10 Gary Benson <gbenson@redhat.com>
5892 * target.h (struct target_ops) <multifs_open>: New field.
5893 <multifs_unlink>: Likewise.
5894 <multifs_readlink>: Likewise.
5895 * linux-low.c (nat/linux-namespaces.h): New include.
5896 (linux_target_ops): Initialize the_target->multifs_open,
5897 the_target->multifs_unlink and the_target->multifs_readlink.
5898 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5899 * hostio.c (hostio_fs_pid): New static variable.
5900 (hostio_handle_new_gdb_connection): New function.
5901 (handle_setfs): Likewise.
5902 (handle_open): Use the_target->multifs_open as appropriate.
5903 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5904 (handle_readlink): Use the_target->multifs_readlink as
5906 (handle_vFile): Handle vFile:setfs packets.
5907 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5908 after target_handle_new_gdb_connection.
5910 2015-06-10 Gary Benson <gbenson@redhat.com>
5912 * configure.ac (AC_CHECK_FUNCS): Add setns.
5913 * config.in: Regenerate.
5914 * configure: Likewise.
5915 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5916 (linux-namespaces.o): New rule.
5917 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5919 2015-06-09 Gary Benson <gbenson@redhat.com>
5921 * hostio.c (handle_open): Process mode argument with
5922 fileio_to_host_mode.
5924 2015-06-01 Yao Qi <yao.qi@linaro.org>
5926 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5927 * linux-x86-low.c: Likewise.
5929 2015-05-28 Don Breazeal <donb@codesourcery.com>
5931 * linux-low.c (handle_extended_wait): Initialize
5932 thread_info.last_resume_kind for new fork children.
5934 2015-05-15 Pedro Alves <palves@redhat.com>
5936 * target.h (target_handle_new_gdb_connection): Rewrite using if
5937 wrapped in do/while.
5939 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5941 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5942 * configure, config.in: Regenerate.
5943 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5946 2015-05-12 Don Breazeal <donb@codesourcery.com>
5948 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5949 PTRACE_EVENT_VFORK_DONE.
5950 (linux_low_ptrace_options, extended_event_reported): Add vfork
5952 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5953 and "vforkdone" for RSP 'T' Stop Reply Packet.
5954 * server.h (report_vfork_events): Declare
5957 2015-05-12 Don Breazeal <donb@codesourcery.com>
5959 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5960 (the_low_target) <new_fork>: Initialize new member.
5961 * linux-arm-low.c (arm_new_fork): New function.
5962 (the_low_target) <new_fork>: Initialize new member.
5963 * linux-low.c (handle_extended_wait): Call new target function
5965 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5966 * linux-mips-low.c (mips_add_watchpoint): New function
5967 extracted from mips_insert_point.
5968 (the_low_target) <new_fork>: Initialize new member.
5969 (mips_linux_new_fork): New function.
5970 (mips_insert_point): Call mips_add_watchpoint.
5971 * linux-x86-low.c (x86_linux_new_fork): New function.
5972 (the_low_target) <new_fork>: Initialize new member.
5974 2015-05-12 Don Breazeal <donb@codesourcery.com>
5976 * linux-low.c (handle_extended_wait): Implement return value,
5977 rename argument 'event_child' to 'event_lwp', handle
5978 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5979 (linux_low_ptrace_options): New function.
5980 (linux_low_filter_event): Call linux_low_ptrace_options,
5981 use different argument fo linux_enable_event_reporting,
5982 use return value from handle_extended_wait.
5983 (extended_event_reported): New function.
5984 (linux_wait_1): Call extended_event_reported and set
5985 status to report fork events.
5986 (linux_write_memory): Add pid to debug message.
5987 (reset_lwp_ptrace_options_callback): New function.
5988 (linux_handle_new_gdb_connection): New function.
5989 (linux_target_ops): Initialize new structure member.
5990 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5991 * lynx-low.c: Initialize new structure member.
5992 * remote-utils.c (prepare_resume_reply): Implement stop reason
5993 "fork" for "T" stop message.
5994 * server.c (handle_query): Call handle_new_gdb_connection.
5995 * server.h (report_fork_events): Declare global flag.
5996 * target.h (struct target_ops) <handle_new_gdb_connection>:
5998 (target_handle_new_gdb_connection): New macro.
5999 * win32-low.c: Initialize new structure member.
6001 2015-05-12 Don Breazeal <donb@codesourcery.com>
6003 * mem-break.c (APPEND_TO_LIST): Define macro.
6004 (clone_agent_expr): New function.
6005 (clone_one_breakpoint): New function.
6006 (clone_all_breakpoints): New function.
6007 * mem-break.h: Declare new functions.
6009 2015-05-12 Don Breazeal <donb@codesourcery.com>
6011 * linux-low.c (linux_supports_fork_events): New function.
6012 (linux_supports_vfork_events): New function.
6013 (linux_target_ops): Initialize new structure members.
6014 (initialize_low): Call linux_check_ptrace_features.
6015 * lynx-low.c (lynx_target_ops): Initialize new structure
6017 * server.c (report_fork_events, report_vfork_events):
6019 (handle_query): Add new features to qSupported packet and
6021 (captured_main): Initialize new global variables.
6022 * target.h (struct target_ops) <supports_fork_events>:
6024 <supports_vfork_events>: New member.
6025 (target_supports_fork_events): New macro.
6026 (target_supports_vfork_events): New macro.
6027 * win32-low.c (win32_target_ops): Initialize new structure
6030 2015-05-12 Gary Benson <gbenson@redhat.com>
6032 * server.c (handle_qxfer_exec_file): Use current process
6035 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6037 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6038 Remove HAVE_PTRACE_GETREGS conditionals.
6039 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6040 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6042 2015-05-08 Yao Qi <yao.qi@linaro.org>
6044 * linux-low.c (linux_supports_conditional_breakpoints): New
6046 (linux_target_ops): Install new target method.
6047 * lynx-low.c (lynx_target_ops): Install NULL hook for
6048 supports_conditional_breakpoints.
6049 * nto-low.c (nto_target_ops): Likewise.
6050 * spu-low.c (spu_target_ops): Likewise.
6051 * win32-low.c (win32_target_ops): Likewise.
6052 * server.c (handle_query): Check
6053 target_supports_conditional_breakpoints.
6054 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6056 (target_supports_conditional_breakpoints): New macro.
6058 2015-05-06 Pedro Alves <palves@redhat.com>
6061 * server.c (start_inferior): If the process exits, mourn it.
6063 2015-04-21 Gary Benson <gbenson@redhat.com>
6065 * hostio.c (fileio_open_flags_to_host): Factored out to
6066 fileio_to_host_openflags in common/fileio.c. Single use
6069 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6071 * linux-xtensa-low.c (xtensa_fill_gregset)
6072 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6075 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6077 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6078 (regs_info): Replace usrregs pointer with NULL.
6080 2015-04-17 Gary Benson <gbenson@redhat.com>
6082 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6083 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6084 * server.c (handle_qxfer_exec_file): New function.
6085 (qxfer_packets): Add exec-file entry.
6086 (handle_query): Report qXfer:exec-file:read as supported packet.
6088 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6090 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6092 2015-04-09 Gary Benson <gbenson@redhat.com>
6094 * hostio-errno.c (errno_to_fileio_error): Remove function.
6095 Update caller to use remote_fileio_to_fio_error.
6097 2015-04-09 Yao Qi <yao.qi@linaro.org>
6099 * linux-low.c (linux_insert_point): Call
6100 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6101 (linux_remove_point): Call remove_memory_breakpoint if type is
6103 * linux-x86-low.c (x86_insert_point): Don't call
6104 insert_memory_breakpoint.
6105 (x86_remove_point): Don't call remove_memory_breakpoint.
6107 2015-04-01 Pedro Alves <palves@redhat.com>
6108 Cleber Rosa <crosa@redhat.com>
6110 * server.c (gdbserver_usage): Reorganize and extend the usage
6113 2015-03-24 Pedro Alves <palves@redhat.com>
6115 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6116 output. Also dump TRAP_TRACE.
6117 (linux_low_filter_event): In debug output, distinguish a
6118 resume_stop SIGSTOP from a delayed SIGSTOP.
6120 2015-03-24 Gary Benson <gbenson@redhat.com>
6122 * linux-x86-low.c (x86_linux_new_thread): Moved to
6124 (x86_linux_prepare_to_resume): Likewise.
6126 2015-03-24 Gary Benson <gbenson@redhat.com>
6128 * Makefile.in (x86-linux-dregs.o): New rule.
6129 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6130 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6131 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6132 (x86_linux_dr_get): Likewise.
6133 (x86_linux_dr_set): Likewise.
6134 (update_debug_registers_callback): Likewise.
6135 (x86_linux_dr_set_addr): Likewise.
6136 (x86_linux_dr_get_addr): Likewise.
6137 (x86_linux_dr_set_control): Likewise.
6138 (x86_linux_dr_get_control): Likewise.
6139 (x86_linux_dr_get_status): Likewise.
6140 (x86_linux_update_debug_registers): Likewise.
6142 2015-03-24 Gary Benson <gbenson@redhat.com>
6144 * linux-x86-low.c (x86_linux_update_debug_registers):
6145 New function, factored out from...
6146 (x86_linux_prepare_to_resume): ...this.
6148 2015-03-24 Gary Benson <gbenson@redhat.com>
6150 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6151 (x86_linux_dr_set): Likewise.
6152 (update_debug_registers_callback): Likewise.
6153 (x86_linux_dr_set_addr): Likewise.
6154 (x86_linux_dr_get_addr): Likewise.
6155 (x86_linux_dr_set_control): Likewise.
6156 (x86_linux_dr_get_control): Likewise.
6157 (x86_linux_dr_get_status): Likewise.
6158 (x86_linux_prepare_to_resume): Likewise.
6160 2015-03-24 Gary Benson <gbenson@redhat.com>
6162 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6163 Use perror_with_name. Pass string through gettext.
6164 (x86_linux_dr_set): Likewise.
6166 2015-03-24 Gary Benson <gbenson@redhat.com>
6168 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6169 (x86_linux_dr_set_addr): ...this.
6170 (x86_dr_low_get_addr): Rename to...
6171 (x86_linux_dr_get_addr): ...this.
6172 (x86_dr_low_set_control): Rename to...
6173 (x86_linux_dr_set_control): ...this.
6174 (x86_dr_low_get_control): Rename to...
6175 (x86_linux_dr_get_control): ...this.
6176 (x86_dr_low_get_status): Rename to...
6177 (x86_linux_dr_get_status): ...this.
6178 (x86_dr_low): Update with new function names.
6180 2015-03-24 Gary Benson <gbenson@redhat.com>
6182 * Makefile.in (x86-linux.o): New rule.
6183 * configure.srv: Add x86-linux.o to relevant targets.
6184 * linux-low.c (lwp_set_arch_private_info): New function.
6185 (lwp_arch_private_info): Likewise.
6186 * linux-x86-low.c: Include nat/x86-linux.h.
6187 (arch_lwp_info): Removed structure.
6188 (update_debug_registers_callback):
6189 Use lwp_set_debug_registers_changed.
6190 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6191 and lwp_set_debug_registers_changed.
6192 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6194 2015-03-24 Gary Benson <gbenson@redhat.com>
6196 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6197 * linux-arm-low.c (arm_new_thread): Likewise.
6198 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6199 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6200 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6201 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6203 2015-03-24 Gary Benson <gbenson@redhat.com>
6205 * linux-low.c (ptid_of_lwp): New function.
6206 (lwp_is_stopped): Likewise.
6207 (lwp_stop_reason): Likewise.
6208 * linux-x86-low.c (update_debug_registers_callback):
6210 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6213 2015-03-24 Gary Benson <gbenson@redhat.com>
6215 * linux-low.h (linux_stop_lwp): Remove declaration.
6217 2015-03-24 Gary Benson <gbenson@redhat.com>
6219 * linux-low.h: Include nat/linux-nat.h.
6220 * linux-low.c (iterate_over_lwps_args): New structure.
6221 (iterate_over_lwps_filter): New function.
6222 (iterate_over_lwps): Likewise.
6223 * linux-x86-low.c (update_debug_registers_callback):
6224 Update signature to what iterate_over_lwps expects.
6225 Remove PID check that iterate_over_lwps now performs.
6226 (x86_dr_low_set_addr): Use iterate_over_lwps.
6227 (x86_dr_low_set_control): Likewise.
6229 2015-03-24 Gary Benson <gbenson@redhat.com>
6231 * linux-x86-low.c (x86_debug_reg_state): New function.
6232 (x86_linux_prepare_to_resume): Use the above.
6234 2015-03-24 Gary Benson <gbenson@redhat.com>
6236 * linux-low.c (current_lwp_ptid): New function.
6237 * linux-x86-low.c: Include nat/linux-nat.h.
6238 (x86_dr_low_get_addr): Use current_lwp_ptid.
6239 (x86_dr_low_get_control): Likewise.
6240 (x86_dr_low_get_status): Likewise.
6242 2015-03-20 Pedro Alves <palves@redhat.com>
6244 * tracepoint.c (cmd_qtstatus): Make "str" const.
6246 2015-03-20 Pedro Alves <palves@redhat.com>
6248 * server.c (handle_general_set): Make "req_str" const.
6250 2015-03-19 Pedro Alves <palves@redhat.com>
6252 * linux-low.c (linux_resume_one_lwp): Rename to ...
6253 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6254 instead call perror_with_name.
6255 (check_ptrace_stopped_lwp_gone): New function.
6256 (linux_resume_one_lwp): Reimplement as wrapper around
6257 linux_resume_one_lwp_throw that swallows errors if the LWP is
6260 2015-03-19 Pedro Alves <palves@redhat.com>
6262 * linux-low.c (count_events_callback, select_event_lwp_callback):
6263 No longer check whether the thread has resume_stop as last resume
6266 2015-03-19 Pedro Alves <palves@redhat.com>
6268 * linux-low.c (count_events_callback, select_event_lwp_callback):
6269 Use the lwp's status_pending_p field, not the thread's.
6271 2015-03-19 Pedro Alves <palves@redhat.com>
6273 * linux-low.c (select_event_lwp_callback): Update comments to
6274 no longer mention SIGTRAP.
6276 2015-03-18 Gary Benson <gbenson@redhat.com>
6278 * server.c (handle_query): Do not report vFile:fstat as supported.
6280 2015-03-11 Gary Benson <gbenson@redhat.com>
6282 * hostio.c (sys/types.h): New include.
6283 (sys/stat.h): Likewise.
6284 (common-remote-fileio.h): Likewise.
6285 (handle_fstat): New function.
6286 (handle_vFile): Handle vFile:fstat packets.
6288 2015-03-11 Gary Benson <gbenson@redhat.com>
6290 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6291 struct stat.st_blocks and struct stat.st_blksize.
6292 * configure: Regenerate.
6293 * config.in: Likewise.
6294 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6295 (OBS): Add common-remote-fileio.o.
6296 (common-remote-fileio.o): New rule.
6298 2015-03-09 Pedro Alves <palves@redhat.com>
6300 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6301 'struct sockaddr' pointer in 'accept' call.
6303 2015-03-09 Pedro Alves <palves@redhat.com>
6306 2015-03-07 Pedro Alves <palves@redhat.com>
6307 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6308 or <winsock2.h> here. Instead include "gdb_socket.h".
6309 (remote_open): Use union gdb_sockaddr_u.
6310 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6311 or <winsock2.h> here. Instead include "gdb_socket.h".
6312 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6313 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6315 (init_named_socket, gdb_agent_helper_thread): Use union
6318 2015-03-07 Pedro Alves <palves@redhat.com>
6320 * configure.ac (build_warnings): Move
6321 -Wdeclaration-after-statement to the C-specific set.
6322 * configure: Regenerate.
6324 2015-03-07 Pedro Alves <palves@redhat.com>
6326 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6327 or <winsock2.h> here. Instead include "gdb_socket.h".
6328 (remote_open): Use union gdb_sockaddr_u.
6329 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6330 or <winsock2.h> here. Instead include "gdb_socket.h".
6331 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6332 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6334 (init_named_socket, gdb_agent_helper_thread): Use union
6337 2015-03-07 Pedro Alves <palves@redhat.com>
6339 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6342 2015-03-06 Yao Qi <yao.qi@linaro.org>
6344 * linux-aarch64-low.c (aarch64_insert_point): Use
6345 show_debug_regs as a boolean.
6346 (aarch64_remove_point): Likewise.
6348 2015-03-05 Pedro Alves <palves@redhat.com>
6350 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6351 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6352 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6353 * nto-low.c (nto_target_ops): Likewise.
6354 * spu-low.c (spu_target_ops): Likewise.
6355 * win32-low.c (win32_target_ops): Likewise.
6357 2015-03-04 Pedro Alves <palves@redhat.com>
6359 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6360 Decide whether a breakpoint triggered based on the SIGTRAP's
6362 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6363 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6364 (linux_low_filter_event): Check for breakpoints before checking
6366 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6368 (linux_stopped_by_sw_breakpoint)
6369 (linux_supports_stopped_by_sw_breakpoint)
6370 (linux_stopped_by_hw_breakpoint)
6371 (linux_supports_stopped_by_hw_breakpoint): New functions.
6372 (linux_target_ops): Install new target methods.
6374 2015-03-04 Pedro Alves <palves@redhat.com>
6376 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6377 * server.c (swbreak_feature, hwbreak_feature): New globals.
6378 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6379 (captured_main): Clear swbreak_feature and hwbreak_feature.
6380 * server.h (swbreak_feature, hwbreak_feature): Declare.
6381 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6382 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6383 supports_stopped_by_hw_breakpoint>: New fields.
6384 (target_supports_stopped_by_sw_breakpoint)
6385 (target_stopped_by_sw_breakpoint)
6386 (target_supports_stopped_by_hw_breakpoint)
6387 (target_stopped_by_hw_breakpoint): Declare.
6389 2015-03-04 Pedro Alves <palves@redhat.com>
6391 enum lwp_stop_reason -> enum target_stop_reason
6392 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6393 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6394 (linux_wait_1, stuck_in_jump_pad_callback)
6395 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6396 (linux_stopped_by_watchpoint):
6397 * linux-low.h (enum lwp_stop_reason): Delete.
6398 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6399 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6401 2015-03-04 Yao Qi <yao.qi@linaro.org>
6403 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6405 2015-03-03 Gary Benson <gbenson@redhat.com>
6407 * hostio.c (handle_vFile): Fix prefix lengths.
6409 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6411 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6414 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6416 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6417 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6418 (clean): Add "rm -f" for above C files.
6419 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6420 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6421 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6422 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6423 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6424 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6425 (init_registers_s390x_vx_linux64)
6426 (init_registers_s390x_tevx_linux64)
6427 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6428 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6430 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6431 (s390_store_vxrs_high): New functions.
6432 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6434 (s390_arch_setup): Add logic for selecting one of the new target
6435 descriptions. Activate the new vector regsets if applicable.
6436 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6437 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6438 and init_registers_s390x_tevx_linux64.
6440 2015-03-01 Pedro Alves <palves@redhat.com>
6442 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6445 2015-02-27 Pedro Alves <palves@redhat.com>
6447 * linux-x86-low.c (u_debugreg_offset): New function.
6448 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6450 2015-02-27 Pedro Alves <palves@redhat.com>
6452 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6453 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6454 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6455 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6456 (ps_lsetfpregs, ps_getpid)
6457 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6458 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6459 (ps_lsetxregs, ps_plog): Declare.
6461 2015-02-27 Pedro Alves <palves@redhat.com>
6463 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6464 IP_AGENT_EXPORT_FUNC.
6465 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6466 IP_AGENT_EXPORT_FUNC.
6467 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6468 (IP_AGENT_EXPORT): Delete.
6469 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6470 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6471 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6472 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6473 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6474 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6475 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6476 (traceframe_read_count, traceframe_write_count)
6477 (traceframes_created, trace_state_variables, get_raw_reg)
6478 (get_trace_state_variable_value, set_trace_state_variable_value)
6479 (ust_loaded, helper_thread_id, cmd_buf): Use
6480 IPA_SYM_EXPORTED_NAME.
6481 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6482 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6483 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6484 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6485 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6486 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6487 EXTERN_C_PUSH/EXTERN_C_POP.
6488 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6489 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6490 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6491 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6492 (traceframe_write_count, traceframe_read_count)
6493 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6494 (about_to_request_buffer_space, get_trace_state_variable_value)
6495 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6496 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6497 EXTERN_C_PUSH/EXTERN_C_POP.
6498 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6499 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6500 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6501 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6502 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6503 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6504 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6505 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6507 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6508 (IP_AGENT_EXPORT_VAR_DECL): Define.
6510 (gdb_agent_get_raw_reg): Declare.
6512 2015-02-27 Tom Tromey <tromey@redhat.com>
6513 Pedro Alves <palves@redhat.com>
6515 Rename symbols whose names are reserved C++ keywords throughout.
6517 2015-02-27 Pedro Alves <palves@redhat.com>
6519 * Makefile.in (COMPILER): New, get it from autoconf.
6520 (CXX): Get from autoconf instead.
6521 (COMPILE.pre): Use COMPILER.
6522 (CC-LD): Rename to ...
6523 (CC_LD): ... this. Use COMPILER.
6524 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6525 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6526 * acinclude.m4: Include build-with-cxx.m4.
6527 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6528 Disable -Werror by default if building in C++ mode.
6529 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6530 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6531 the C++ compiler. Save/restore CXXFLAGS too.
6532 * configure: Regenerate.
6534 2015-02-27 Pedro Alves <palves@redhat.com>
6536 * acinclude.m4: Include libiberty.m4.
6537 * configure.ac: Call libiberty_INIT.
6538 * config.in, configure: Regenerate.
6540 2015-02-26 Pedro Alves <palves@redhat.com>
6542 * linux-low.c (linux_wait_1): When incrementing the PC past a
6543 program breakpoint always use the_low_target.breakpoint_len as
6544 increment, rather than the maximum between that and
6545 the_low_target.decr_pc_after_break.
6547 2015-02-23 Pedro Alves <palves@redhat.com>
6549 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6550 thread was doing a step-over; always adjust the PC if
6551 we stepped over a permanent breakpoint.
6552 (linux_wait_1): If we stepped over breakpoint that was on top of a
6553 permanent breakpoint, manually advance the PC past it.
6555 2015-02-23 Pedro Alves <palves@redhat.com>
6557 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6559 (x86_fill_gregset, x86_store_gregset): Use it when handling
6562 2015-02-20 Pedro Alves <palves@redhat.com>
6564 * thread-db.c: Include "nat/linux-procfs.h".
6565 (thread_db_init): Skip listing new threads if the kernel supports
6566 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6568 2015-02-20 Pedro Alves <palves@redhat.com>
6570 * linux-low.c (status_pending_p_callback): Use ptid_match.
6572 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6574 PR breakpoints/16812
6575 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6576 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6577 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6579 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6581 PR breakpoints/15956
6582 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6584 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6586 * linux-low.c (linux_low_btrace_conf): Print size.
6587 * server.c (handle_btrace_conf_general_set): New.
6588 (hanle_general_set): Call handle_btrace_conf_general_set.
6589 (handle_query): Report Qbtrace-conf:bts:size as supported.
6591 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6593 * linux-low.c (linux_low_enable_btrace): Update parameters.
6594 (linux_low_btrace_conf): New.
6595 (linux_target_ops)<to_btrace_conf>: Initialize.
6596 * server.c (current_btrace_conf): New.
6597 (handle_btrace_enable): Rename to ...
6598 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
6599 to target_enable_btrace. Update comment. Update users.
6600 (handle_qxfer_btrace_conf): New.
6601 (qxfer_packets): Add btrace-conf entry.
6602 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6603 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6604 (target_ops)<read_btrace_conf>: New.
6605 (target_enable_btrace): Update parameters.
6606 (target_read_btrace_conf): New.
6608 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6610 * server.c (handle_btrace_general_set): Remove call to
6611 target_supports_btrace.
6612 (supported_btrace_packets): New.
6613 (handle_query): Call supported_btrace_packets.
6614 * target.h: include btrace-common.h.
6615 (btrace_target_info): Removed.
6616 (supports_btrace, target_supports_btrace): Update parameters.
6618 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6620 * Makefile.in (SFILES): Add common/btrace-common.c.
6621 (OBS): Add common/btrace-common.o.
6622 (btrace-common.o): Add build rules.
6623 * linux-low: Include btrace-common.h.
6624 (linux_low_read_btrace): Use struct btrace_data. Call
6625 btrace_data_init and btrace_data_fini.
6627 2015-02-06 Pedro Alves <palves@redhat.com>
6629 * thread-db.c (find_new_threads_callback): Add debug output.
6631 2015-02-04 Pedro Alves <palves@redhat.com>
6633 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6634 (resume_stopped_resumed_lwps): New function.
6635 (linux_wait_for_event_filtered): Use it.
6637 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6639 * Makefile.in (SFILES): Add linux-personality.c.
6640 (linux-personality.o): New rule.
6641 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6642 list of objects to be built.
6643 * linux-low.c: Include nat/linux-personality.h.
6644 (linux_create_inferior): Remove code to disable address space
6645 randomization (moved to ../nat/linux-personality.c). Create
6646 cleanup to disable address space randomization.
6648 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6650 * Makefile.in (posix-strerror.o): New rule.
6651 (mingw-strerror.o): Likewise.
6652 * configure: Regenerated.
6653 * configure.ac: Source file ../common/common.host. Initialize new
6654 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6656 2015-01-14 Yao Qi <yao@codesourcery.com>
6658 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6659 (ppc-linux.o): New rule.
6660 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6661 * configure.ac: AC_CHECK_FUNCS(getauxval).
6662 * config.in: Re-generated.
6663 * configure: Re-generated.
6664 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6665 ppc64_64bit_inferior_p
6667 2015-01-14 Yao Qi <yao@codesourcery.com>
6669 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6670 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6671 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6672 (PT_ORIG_R3, PT_TRAP): Likewise.
6673 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6674 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6675 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6677 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6679 * i387-fp.c (i387_cache_to_xsave): In look over
6680 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6681 zmmh_low_space field by use of zmmh_high_space.
6683 2015-01-09 Pedro Alves <palves@redhat.com>
6685 * linux-low.c (step_over_bkpt): Move higher up in the file.
6686 (handle_extended_wait): Don't store the stop_pc here.
6687 (get_stop_pc): Adjust comments and rename to ...
6688 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6689 stopped for a software breakpoint or hardware breakpoint.
6690 (thread_still_has_status_pending_p): New function.
6691 (status_pending_p_callback): Use
6692 thread_still_has_status_pending_p. If the event is no longer
6693 interesting, resume the LWP.
6694 (handle_tracepoints): Add assert.
6695 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6696 (wstatus_maybe_breakpoint): New function.
6697 (cancel_breakpoint): Delete function.
6698 (check_stopped_by_watchpoint): New function, factored out from
6699 linux_low_filter_event.
6700 (lp_status_maybe_breakpoint): Delete function.
6701 (linux_low_filter_event): Remove filter_ptid argument.
6702 Leave thread group exits pending here. Store the LWP's stop PC.
6703 Always leave events pending.
6704 (linux_wait_for_event_filtered): Pull all events out of the
6705 kernel, and leave them all pending.
6706 (count_events_callback, select_event_lwp_callback): Consider all
6708 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6709 (select_event_lwp): Only give preference to the stepping LWP in
6710 all-stop mode. Adjust comments.
6711 (ignore_event): New function.
6712 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6713 references to cancel_breakpoints. Adjust to renames. Also give
6714 equal priority to all LWPs that have had events in non-stop mode.
6715 If reporting a software breakpoint event, unadjust the LWP's PC.
6716 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6717 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6719 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6720 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6721 (linux_stopped_by_watchpoint): Adjust.
6722 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6723 * linux-low.h (enum lwp_stop_reason): New.
6724 (struct lwp_info) <stop_pc>: Adjust comment.
6725 <stopped_by_watchpoint>: Delete field.
6726 <stop_reason>: New field.
6727 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6728 * mem-break.c (software_breakpoint_inserted_here)
6729 (hardware_breakpoint_inserted_here): New function.
6730 * mem-break.h (software_breakpoint_inserted_here)
6731 (hardware_breakpoint_inserted_here): Declare.
6732 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6733 (cancel_breakpoints): Delete.
6734 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6735 (upload_fast_traceframes): Remove references to
6738 2015-01-09 Pedro Alves <palves@redhat.com>
6740 * thread-db.c (find_new_threads_callback): Ignore thread if the
6741 kernel thread ID is -1.
6743 2015-01-09 Pedro Alves <palves@redhat.com>
6745 * linux-low.c (linux_attach_fail_reason_string): Move to
6746 nat/linux-ptrace.c, and rename.
6747 (linux_attach_lwp): Update comment.
6748 (attach_proc_task_lwp_callback): New function.
6749 (linux_attach): Adjust to rename and use
6750 linux_proc_attach_tgid_threads.
6751 (linux_attach_fail_reason_string): Delete declaration.
6753 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6755 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6756 * server.c (gdbserver_version): Likewise.
6758 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6760 * remote-utils.c: Include ctype.h.
6761 (input_interrupt): Explicitly handle the case when the char
6762 received is the NUL byte. Improve the printing of non-ASCII
6765 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6767 * linux-low.c (linux_low_filter_event): Update call to
6768 linux_enable_event_reporting following the addition of
6769 a new parameter to that function.
6771 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6774 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6775 (AARCH64_FPCR_REGNO): Likewise.
6776 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6777 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6778 (aarch64_store_fpregset): Likewise.
6780 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6782 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6783 Remove FIXME comment about assumption about N.
6785 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6787 * configure.ac: If large-file support is disabled in GDBserver,
6788 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6789 * configure: Regenerate.
6791 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6793 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6794 warning upon ENODATA from ptrace.
6795 * linux-s390-low.c (s390_store_tdb): New.
6796 (s390_regsets): Add regset for NT_S390_TDB.
6798 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6800 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6801 without a fill_function.
6802 * linux-s390-low.c (s390_fill_last_break): Remove.
6803 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6804 (s390_arch_setup): Use regset's size instead of fill_function for
6807 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6809 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6810 the regset's store function when ptrace returned an error.
6811 * regcache.c (get_thread_regcache): Invalidate register cache
6812 before fetching inferior's registers.
6814 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6816 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6817 while-loop as for-loop.
6818 (regsets_store_inferior_registers): Likewise.
6820 2014-11-28 Yao Qi <yao@codesourcery.com>
6822 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6823 * config.in, configure: Re-generate.
6824 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6827 2014-11-21 Yao Qi <yao@codesourcery.com>
6829 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6830 (AC_CHECK_HEADERS): Remove malloc.h.
6831 * configure: Re-generated.
6832 * config.in: Re-generated.
6833 * server.h: Don't include alloca.h and malloc.h.
6834 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6835 Don't include malloc.h.
6837 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6839 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6840 corresponding ERRNO check in same block.
6842 2014-11-12 Pedro Alves <palves@redhat.com>
6844 * server.c (cont_thread): Update comment.
6845 (start_inferior, attach_inferior): No longer clear cont_thread.
6846 (handle_v_cont): No longer set cont_thread.
6847 (captured_main): Clear cont_thread each time a GDB connects.
6849 2014-11-12 Pedro Alves <palves@redhat.com>
6851 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6852 thread, and don't resume all threads if the Hc thread has exited.
6854 2014-11-12 Pedro Alves <palves@redhat.com>
6856 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6857 the process group instead of to a specific LWP.
6859 2014-10-15 Pedro Alves <palves@redhat.com>
6862 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6864 (arm_set_thread_context): Delete.
6865 (the_low_target): Adjust.
6866 * win32-i386-low.c (debug_registers_changed)
6867 (debug_registers_used): Delete.
6868 (update_debug_registers_callback): New function.
6869 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6870 needing to update their debug registers.
6871 (win32_get_current_dr): New function.
6872 (x86_dr_low_get_addr, x86_dr_low_get_control)
6873 (x86_dr_low_get_status): Fetch the debug register from the thread
6875 (i386_initial_stuff): Adjust.
6876 (i386_get_thread_context): Remove current_event parameter. Don't
6877 clear debug_registers_changed nor copy DR values to
6879 (i386_set_thread_context): Delete.
6880 (i386_prepare_to_resume): New function.
6881 (i386_thread_added): Mark the thread as needing to update irs
6883 (the_low_target): Remove i386_set_thread_context and install
6884 i386_prepare_to_resume.
6885 * win32-low.c (win32_get_thread_context): Adjust.
6886 (win32_set_thread_context): Use SetThreadContext
6888 (win32_prepare_to_resume): New function.
6889 (win32_require_context): New function, factored out from ...
6890 (thread_rec): ... this.
6891 (continue_one_thread): Call win32_prepare_to_resume on each thread
6892 we're about to continue.
6893 (win32_resume): Call win32_prepare_to_resume on the event thread.
6894 * win32-low.h (struct win32_thread_info)
6895 <debug_registers_changed>: New field.
6896 (struct win32_target_ops): Change prototype of set_thread_context,
6897 delete set_thread_context and add prepare_to_resume.
6898 (win32_require_context): New declaration.
6900 2014-10-08 Gary Benson <gbenson@redhat.com>
6902 * server.h: Do not include common-exceptions.h.
6904 2014-10-08 Gary Benson <gbenson@redhat.com>
6906 * server.h: Do not include cleanups.h.
6908 2014-09-30 James Hogan <james.hogan@imgtec.com>
6910 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6913 2014-09-23 Yao Qi <yao@codesourcery.com>
6915 * linux-low.c (lp_status_maybe_breakpoint): New function.
6916 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6917 (count_events_callback): Likewise.
6918 (select_event_lwp_callback): Likewise.
6919 (cancel_breakpoints_callback): Likewise.
6921 2014-09-19 Don Breazeal <donb@codesourcery.com>
6923 * linux-low.c (handle_extended_wait): Call
6924 linux_ptrace_get_extended_event.
6925 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6926 linux_is_extended_waitstatus.
6928 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6930 * Makefile.in (CPPFLAGS): Define.
6931 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6932 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6934 2014-09-16 Gary Benson <gbenson@redhat.com>
6936 * inferiors.h (current_inferior): Renamed as...
6937 (current_thread): New variable. All uses updated.
6938 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6939 (maybe_move_out_of_jump_pad): Likewise.
6940 (cancel_breakpoint): Likewise.
6941 (linux_low_filter_event): Likewise.
6942 (wait_for_sigstop): Likewise.
6943 (linux_resume_one_lwp): Likewise.
6944 (need_step_over_p): Likewise.
6945 (start_step_over): Likewise.
6946 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6947 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6948 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6949 and save_inferior as saved_thread.
6950 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6952 (regcache_invalidate_thread): Likewise.
6953 * remote-utils.c (prepare_resume_reply): Likewise.
6954 * thread-db.c (thread_db_get_tls_address): Likewise.
6955 (disable_thread_event_reporting): Likewise.
6956 (remove_thread_event_breakpoints): Likewise.
6957 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6959 * target.h (set_desired_inferior): Renamed as...
6960 (set_desired_thread): New declaration. All uses updated.
6961 * server.c (myresume): Updated comment to reference thread instead
6963 (handle_serial_event): Likewise.
6964 (handle_target_event): Likewise.
6966 2014-09-12 Tom Tromey <tromey@redhat.com>
6967 Gary Benson <gbenson@redhat.com>
6969 * regcache.h: Include common-regcache.h.
6970 (regcache_read_pc): Don't declare.
6971 * regcache.c (get_thread_regcache_for_ptid): New function.
6973 2014-09-11 Tom Tromey <tromey@redhat.com>
6974 Gary Benson <gbenson@redhat.com>
6976 * symbol.c: New file.
6977 * Makefile.in (SFILES): Add symbol.c.
6978 (OBS): Add symbol.o.
6980 2014-09-11 Gary Benson <gbenson@redhat.com>
6982 * target.c (target_stop_ptid, target_continue_ptid): New
6985 2014-09-11 Tom Tromey <tromey@redhat.com>
6986 Gary Benson <gbenson@redhat.com>
6988 * target.h: Include target/target.h.
6989 * target.c (target_read_memory, target_read_uint32)
6990 (target_write_memory): New functions.
6992 2014-09-11 Gary Benson <gbenson@redhat.com>
6994 * server.h (debug_hw_points): Don't declare.
6995 * server.c (debug_hw_points): Don't define. Replace all uses
6996 with show_debug_regs.
6997 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6998 all uses with show_debug_regs.
7000 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7002 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7003 endianness into account.
7004 (ppc_supply_ptrace_register): Likewise.
7006 2014-09-03 James Hogan <james.hogan@imgtec.com>
7008 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7009 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7011 2014-09-03 Gary Benson <gbenson@redhat.com>
7013 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7014 ALL_DEBUG_ADDRESS_REGISTERS.
7016 2014-09-02 Gary Benson <gbenson@redhat.com>
7018 * i386-low.h: Renamed as...
7019 * x86-low.h: New file. All type, function and variable name
7020 prefixes changed from "i386_" to "x86_". All references updated.
7021 * i386-low.c: Renamed as...
7022 * x86-low.c: New file. All type, function and variable name
7023 prefixes changed from "i386_" to "x86_". All references updated.
7025 2014-09-02 Gary Benson <gbenson@redhat.com>
7027 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7028 (x86_linux_new_thread): Likewise.
7030 2014-08-29 Gary Benson <gbenson@redhat.com>
7032 * server.h (setjmp.h): Do not include.
7033 (toplevel): Do not declare.
7034 (common-exceptions.h): Include.
7035 (cleanups.h): Likewise.
7036 * server.c (toplevel): Do not define.
7037 (exit_code): New static global.
7038 (detach_or_kill_for_exit_cleanup): New function.
7039 (main): New function. Original main renamed to...
7040 (captured_main): New function.
7041 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7043 2014-08-29 Gary Benson <gbenson@redhat.com>
7045 * Makefile.in (SFILES): Add common/common-exceptions.c.
7046 (OBS): Add common-exceptions.o.
7047 (common-exceptions.o): New rule.
7048 * utils.c (prepare_to_throw_exception): New function.
7050 2014-08-29 Gary Benson <gbenson@redhat.com>
7052 * config.in: Regenerate.
7053 * configure: Likewise.
7055 2014-08-29 Gary Benson <gbenson@redhat.com>
7057 * Makefile.in (SFILES): Add common/cleanups.c.
7059 (cleanups.o): New rule.
7061 2014-08-29 Gary Benson <gbenson@redhat.com>
7063 * utils.c (internal_vwarning): New function.
7065 2014-08-28 Gary Benson <gbenson@redhat.com>
7067 * utils.h (fatal): Remove declaration.
7068 * utils.c (fatal): Remove function.
7070 2014-08-28 Gary Benson <gbenson@redhat.com>
7072 * tracepoint.c (gdb_agent_init): Replace fatal with
7074 (initialize_tracepoint): Likewise.
7076 2014-08-28 Gary Benson <gbenson@redhat.com>
7078 * remote-utils.c (remote_prepare): Replace fatal with error.
7080 2014-08-28 Gary Benson <gbenson@redhat.com>
7082 * linux-low.c (linux_async): Replace fatal with warning.
7084 (linux_start_non_stop): Return -1 if linux_async failed.
7086 2014-08-28 Gary Benson <gbenson@redhat.com>
7088 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7090 (i386_dr_low_get_addr): Remove vague comment.
7091 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7094 2014-08-28 Gary Benson <gbenson@redhat.com>
7096 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7097 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7099 (linux_resume_one_lwp): Likewise.
7100 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7102 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7103 with internal_error.
7104 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7105 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7106 (find_register_by_name): Replace fatal with internal_error.
7107 (find_regno): Likewise.
7108 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7109 * thread-db.c (thread_db_create_event): Likewise.
7110 (thread_db_load_search): Likewise.
7111 (try_thread_db_load_1): Likewise.
7112 * tracepoint.c (get_jump_space_head): Replace fatal with
7114 (claim_trampoline_space): Likewise.
7115 (have_fast_tracepoint_trampoline_buffer): Likewise.
7116 (cmd_qtstart): Likewise.
7117 (stop_tracing): Likewise.
7118 (fast_tracepoint_collecting): Likewise.
7119 (target_malloc): Likewise.
7120 (download_tracepoint): Likewise.
7121 (download_trace_state_variables): Replace check with gdb_assert.
7122 (upload_fast_traceframes): Replace fatal with internal_error.
7124 2014-08-19 Tom Tromey <tromey@redhat.com>
7125 Gary Benson <gbenson@redhat.com>
7127 * Makefile.in (SFILES): Add common/common-debug.c.
7128 (OBS): Add common-debug.o.
7129 (common-debug.o): New rule.
7130 * debug.h (debug_printf): Don't declare.
7131 * debug.c (debug_printf): Renamed and rewritten as...
7132 (debug_vprintf): New function.
7134 2014-08-19 Gary Benson <gbenson@redhat.com>
7136 * utils.h: Do not include print-utils.h.
7138 2014-08-19 Tom Tromey <tromey@redhat.com>
7139 Gary Benson <gbenson@redhat.com>
7141 * server.h: Add static assertion.
7142 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7144 2014-08-19 Tom Tromey <tromey@redhat.com>
7145 Gary Benson <gbenson@redhat.com>
7147 * Makefile.in (SFILES): Add common/errors.c.
7148 (OBS): Add errors.o.
7149 (IPA_OBS): Add errors-ipa.o.
7150 (errors.o): New rule.
7151 (errors-ipa.o): Likewise.
7152 * utils.h (perror_with_name, error, warning): Don't declare.
7153 * utils.c (warning): Renamed and rewritten as...
7154 (vwarning): New function.
7155 (error): Renamed and rewritten as...
7156 (verror): New function.
7157 (internal_error): Renamed and rewritten as...
7158 (internal_verror): New function.
7160 2014-08-07 Gary Benson <gbenson@redhat.com>
7162 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7163 * configure: Regenerate.
7164 * config.in: Likewise.
7165 * server.h: Do not include errno.h.
7166 * event-loop.c: Likewise.
7167 * hostio-errno.c: Likewise.
7168 * linux-low.c: Likewise.
7169 * remote-utils.c: Likewise.
7170 * spu-low.c: Likewise.
7171 * utils.c: Likewise.
7172 * gdbreplay.c: Unconditionally include errno.h.
7174 2014-08-07 Gary Benson <gbenson@redhat.com>
7176 * server.h: Do not include string.h.
7177 * event-loop.c: Likewise.
7178 * linux-low.c: Likewise.
7179 * regcache.c: Likewise.
7180 * remote-utils.c: Likewise.
7181 * spu-low.c: Likewise.
7182 * utils.c: Likewise.
7184 2014-08-07 Gary Benson <gbenson@redhat.com>
7186 * server.h: Do not include gdb_assert.h.
7188 2014-08-07 Gary Benson <gbenson@redhat.com>
7190 * server.h: Do not include common-utils.h.
7192 2014-08-07 Gary Benson <gbenson@redhat.com>
7194 * server.h: Do not include ptid.h.
7195 * notif.h: Likewise.
7197 2014-08-07 Gary Benson <gbenson@redhat.com>
7199 * server.h: Do not include gdb_locale.h.
7201 2014-08-07 Gary Benson <gbenson@redhat.com>
7203 * server.h: Do not include gdb/signals.h.
7204 * win32-low.c: Likewise.
7206 2014-08-07 Gary Benson <gbenson@redhat.com>
7208 * server.h: Do not include pathmax.h.
7210 2014-08-07 Gary Benson <gbenson@redhat.com>
7212 * server.h: Do not include libiberty.h.
7213 * linux-bfin-low.c: Likewise.
7215 2014-08-07 Gary Benson <gbenson@redhat.com>
7217 * server.h: Do not include ansidecl.h.
7219 2014-08-07 Gary Benson <gbenson@redhat.com>
7221 * linux-x86-low.c: Do not include stddef.h.
7222 * lynx-ppc-low.c: Likewise.
7223 * tracepoint.c: Likewise.
7225 2014-08-07 Gary Benson <gbenson@redhat.com>
7227 * server.h: Do not include stdarg.h.
7228 * nto-low.c: Likewise.
7230 2014-08-07 Gary Benson <gbenson@redhat.com>
7232 * server.h: Do not include stdlib.h.
7233 * inferiors.c: Likewise.
7234 * linux-low.c: Likewise.
7235 * regcache.c: Likewise.
7236 * spu-low.c: Likewise.
7237 * tracepoint.c: Likewise.
7238 * utils.c: Likewise.
7240 2014-08-07 Gary Benson <gbenson@redhat.com>
7242 * server.h: Do not include stdio.h.
7243 * linux-low.c: Likewise.
7244 * remote-utils.c: Likewise.
7245 * spu-low.c: Likewise.
7246 * utils.c: Likewise.
7247 * wincecompat.c: Likewise.
7249 2014-08-06 Gary Benson <gbenson@redhat.com>
7251 * regcache.c (init_register_cache): Move conditionals inside if.
7253 2014-08-06 Gary Benson <gbenson@redhat.com>
7255 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7257 2014-07-31 Gary Benson <gbenson@redhat.com>
7259 * ax.h: Do not include server.h.
7260 * gdbthread.h: Likewise.
7261 * lynx-low.h: Likewise.
7262 * notif.h: Likewise.
7264 2014-07-30 Gary Benson <gbenson@redhat.com>
7266 * server.h: Include common-defs.h.
7267 Do not include config.h or build-gnulib-gdbserver/config.h.
7269 2014-07-30 Gary Benson <gbenson@redhat.com>
7271 * hostio-errno.c: Move server.h to top of includes list.
7272 * inferiors.c: Likewise.
7273 * linux-x86-low.c: Likewise.
7274 * notif.c: Include server.h.
7276 2014-07-24 Tom Tromey <tromey@redhat.com>
7277 Gary Benson <gbenson@redhat.com>
7279 * server.h (CORE_ADDR): Now unsigned.
7281 2014-07-16 Pedro Alves <palves@redhat.com>
7283 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7285 2014-07-15 Pedro Alves <palves@redhat.com>
7287 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7290 2014-07-11 Pedro Alves <palves@redhat.com>
7292 * linux-low.c (kill_wait_lwp): New function, based on
7293 kill_one_lwp_callback, but use my_waitpid directly.
7294 (kill_one_lwp_callback, linux_kill): Use it.
7296 2014-06-23 Pedro Alves <palves@redhat.com>
7298 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7299 before setting DR0..DR3.
7301 2014-06-20 Gary Benson <gbenson@redhat.com>
7303 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7304 * configure: Regenerated.
7305 * config.in: Likewise.
7307 2014-06-20 Gary Benson <gbenson@redhat.com>
7309 * Makefile.in (SFILES): Update locations for files moved
7311 (object file files): Reordered.
7313 2014-06-20 Gary Benson <gbenson@redhat.com>
7315 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7316 (i386_dr_low_set_addr): Likewise.
7317 (i386_dr_low_get_addr): Likewise.
7318 (i386_dr_low_can_set_control): Likewise.
7319 (i386_dr_low_set_control): Likewise.
7320 (i386_dr_low_get_control): Likewise.
7321 (i386_dr_low_get_status): Likewise.
7322 (i386_get_debug_register_length): Likewise.
7323 * linux-x86-low.c (i386_dr_low_set_addr):
7324 Changed signature. Made static.
7325 (i386_dr_low_get_addr): Likewise.
7326 (i386_dr_low_set_control): Likewise.
7327 (i386_dr_low_get_control): Likewise.
7328 (i386_dr_low_get_status): Likewise.
7329 (i386_dr_low): New global variable.
7330 * win32-i386-low.c (i386_dr_low_set_addr):
7331 Changed signature. Made static.
7332 (i386_dr_low_get_addr): Likewise.
7333 (i386_dr_low_set_control): Likewise.
7334 (i386_dr_low_get_control): Likewise.
7335 (i386_dr_low_get_status): Likewise.
7336 (i386_dr_low): New global variable.
7338 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7340 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7341 * Makefile.in (AR, AR_FLAGS): Define.
7342 * configure: Regenerate.
7344 2014-06-19 Gary Benson <gbenson@redhat.com>
7346 * Makefile.in (i386-dregs.o): New rule.
7347 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7348 * i386-low.c (target.h): Remove include.
7349 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7350 (DR_CONTROL_SHIFT): Likewise.
7351 (DR_CONTROL_SIZE): Likewise.
7352 (DR_RW_EXECUTE): Likewise.
7353 (DR_RW_WRITE): Likewise.
7354 (DR_RW_READ): Likewise.
7355 (DR_RW_IORW): Likewise.
7356 (DR_LEN_1): Likewise.
7357 (DR_LEN_2): Likewise.
7358 (DR_LEN_4): Likewise.
7359 (DR_LEN_8): Likewise.
7360 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7361 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7362 (DR_ENABLE_SIZE): Likewise.
7363 (DR_LOCAL_SLOWDOWN): Likewise.
7364 (DR_GLOBAL_SLOWDOWN): Likewise.
7365 (DR_CONTROL_RESERVED): Likewise.
7366 (I386_DR_CONTROL_MASK): Likewise.
7367 (I386_DR_VACANT): Likewise.
7368 (I386_DR_LOCAL_ENABLE): Likewise.
7369 (I386_DR_GLOBAL_ENABLE): Likewise.
7370 (I386_DR_DISABLE): Likewise.
7371 (I386_DR_SET_RW_LEN): Likewise.
7372 (I386_DR_GET_RW_LEN): Likewise.
7373 (I386_DR_WATCH_HIT): Likewise.
7374 (i386_wp_op_t): Likewise.
7375 (i386_show_dr): Likewise.
7376 (i386_length_and_rw_bits): Likewise.
7377 (i386_insert_aligned_watchpoint): Likewise.
7378 (i386_remove_aligned_watchpoint): Likewise.
7379 (i386_handle_nonaligned_watchpoint): Likewise.
7380 i386_update_inferior_debug_regs(): Likewise.
7381 (i386_dr_insert_watchpoint): Likewise.
7382 (i386_dr_remove_watchpoint): Likewise.
7383 (i386_dr_region_ok_for_watchpoint): Likewise.
7384 (i386_dr_stopped_data_address): Likewise.
7385 (i386_dr_stopped_by_watchpoint): Likewise.
7387 2014-06-19 Gary Benson <gbenson@redhat.com>
7389 * i386-low.c (i386_dr_show): Renamed to
7390 i386_show_dr and made static. All uses updated.
7391 (i386_dr_length_and_rw_bits): Renamed to
7392 i386_length_and_rw_bits and made static.
7394 (i386_dr_insert_aligned_watchpoint): Renamed to
7395 i386_insert_aligned_watchpoint and made static.
7397 (i386_dr_remove_aligned_watchpoint): Renamed to
7398 i386_remove_aligned_watchpoint and made static.
7400 (i386_dr_update_inferior_debug_regs): Renamed to
7401 i386_update_inferior_debug_regs and made static.
7404 2014-06-18 Gary Benson <gbenson@redhat.com>
7406 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7407 (i386_dr_low_can_set_control): Likewise.
7408 (i386_get_debug_register_length): Likewise.
7409 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7410 (i386_dr_low_can_set_control): Likewise.
7411 (i386_get_debug_register_length): Likewise.
7413 2014-06-17 Gary Benson <gbenson@redhat.com>
7415 * i386-low.h (i386-dregs.h): New include.
7416 (DR_FIRSTADDR): Now in i386-dregs.h.
7417 (DR_LASTADDR): Likewise.
7418 (DR_NADDR): Likewise.
7419 (DR_STATUS): Likewise.
7420 (DR_CONTROL): Likewise.
7421 (i386_debug_reg_state): Likewise.
7422 (i386_dr_insert_watchpoint): Likewise.
7423 (i386_dr_remove_watchpoint): Likewise.
7424 (i386_dr_region_ok_for_watchpoint): Likewise.
7425 (i386_dr_stopped_data_address): Likewise.
7426 (i386_dr_stopped_by_watchpoint): Likewise.
7427 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7429 2014-06-18 Gary Benson <gbenson@redhat.com>
7431 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7432 i386_dr_insert_watchpoint.
7433 (i386_low_remove_watchpoint): Renamed to
7434 i386_dr_remove_watchpoint.
7435 (i386_low_region_ok_for_watchpoint): Renamed to
7436 i386_dr_region_ok_for_watchpoint.
7437 (i386_low_stopped_data_address): Renamed to
7438 i386_dr_stopped_data_address.
7439 (i386_low_stopped_by_watchpoint): Renamed to
7440 i386_dr_stopped_by_watchpoint.
7441 * i386-low.c (i386_show_dr): Renamed to
7442 i386_dr_show and made nonstatic. All uses updated.
7443 (i386_length_and_rw_bits): Renamed to
7444 i386_dr_length_and_rw_bits and made nonstatic.
7446 (i386_insert_aligned_watchpoint): Renamed to
7447 i386_dr_insert_aligned_watchpoint and made nonstatic.
7449 (i386_remove_aligned_watchpoint): Renamed to
7450 i386_dr_remove_aligned_watchpoint and made nonstatic.
7452 (i386_update_inferior_debug_regs): Renamed to
7453 i386_dr_update_inferior_debug_regs and made nonstatic.
7455 (i386_low_insert_watchpoint): Renamed to
7456 i386_dr_insert_watchpoint. All uses updated.
7457 (i386_low_remove_watchpoint): Renamed to
7458 i386_dr_remove_watchpoint. All uses updated.
7459 (i386_low_region_ok_for_watchpoint): Renamed to
7460 i386_dr_region_ok_for_watchpoint. All uses updated.
7461 (i386_low_stopped_data_address): Renamed to
7462 i386_dr_stopped_data_address. All uses updated.
7463 (i386_low_stopped_by_watchpoint): Renamed to
7464 i386_dr_stopped_by_watchpoint. All uses updated.
7466 2014-06-18 Gary Benson <gbenson@redhat.com>
7468 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7469 (i386_dr_low_can_set_control): Likewise.
7470 (i386_insert_aligned_watchpoint): New check.
7472 2014-06-18 Gary Benson <gbenson@redhat.com>
7474 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7477 2014-06-18 Gary Benson <gbenson@redhat.com>
7479 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7480 instead of fatal and error.
7481 (i386_handle_nonaligned_watchpoint): Likewise.
7483 2014-06-18 Gary Benson <gbenson@redhat.com>
7485 * i386-low.c (i386_get_debug_register_length): New macro.
7486 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7487 (i386_show_dr): Use debug_printf instead of fprintf. Use
7488 phex to format values.
7490 2014-06-18 Gary Benson <gbenson@redhat.com>
7492 * i386-low.h: Comment changes.
7493 * i386-low.c: Likewise.
7495 2014-06-18 Gary Benson <gbenson@redhat.com>
7497 * i386-low.c: Whitespace changes.
7499 2014-06-12 Tom Tromey <tromey@redhat.com>
7501 * utils.c (freeargv): Remove.
7503 2014-06-12 Tom Tromey <tromey@redhat.com>
7505 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7506 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7507 (parse_debug_format_options): Likewise.
7508 (gdbserver_usage): Likewise.
7509 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7510 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7511 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7513 ($(LIBGNU)): Depend on libiberty.
7514 (all-lib): Recurse into all subdirs.
7515 (install-only): Invoke "install" target in subdirs.
7516 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7518 * configure: Rebuild.
7519 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7520 for vasprintf, vsnprintf, or gettimeofday.
7521 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7524 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7526 * development.sh: Delete.
7527 * Makefile.in (config.status): Adjust dependency on development.sh.
7528 * configure.ac: Adjust development.sh source call.
7529 * configure: Regenerate.
7531 2014-06-02 Pedro Alves <palves@redhat.com>
7533 * ax.c (gdb_free_agent_expr): New function.
7534 * ax.h (gdb_free_agent_expr): New declaration.
7535 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7537 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7539 (clear_breakpoint_conditions_and_commands): New function.
7540 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7541 (clear_breakpoint_conditions_and_commands): New declaration.
7543 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7545 * linux-aarch64-low.c (asm/ptrace.h): Include.
7547 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7549 Fix TLS access for -static -pthread.
7550 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7551 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7552 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7554 2014-05-20 Pedro Alves <palves@redhat.com>
7556 * linux-aarch64-low.c (aarch64_insert_point)
7557 (aarch64_remove_point): No longer check whether the type is
7558 supported here. Adjust to new interface.
7559 (the_low_target): Install aarch64_supports_z_point_type as
7560 supports_z_point_type method.
7561 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7562 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7563 instead of a Z packet char. Adjust.
7564 (arm_supports_z_point_type): New function.
7565 (arm_insert_point, arm_remove_point): Adjust to new interface.
7566 (the_low_target): Install arm_supports_z_point_type.
7567 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7568 (cris_insert_point, cris_remove_point): Adjust to new interface.
7569 Don't check whether the type is supported here.
7570 (the_low_target): Install cris_supports_z_point_type.
7571 * linux-low.c (linux_supports_z_point_type): New function.
7572 (linux_insert_point, linux_remove_point): Adjust to new interface.
7573 * linux-low.h (struct linux_target_ops) <insert_point,
7574 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7575 raw_breakpoint pointer parameter.
7576 <supports_z_point_type>: New method.
7577 * linux-mips-low.c (mips_supports_z_point_type): New function.
7578 (mips_insert_point, mips_remove_point): Adjust to new interface.
7579 Use mips_supports_z_point_type.
7580 (the_low_target): Install mips_supports_z_point_type.
7581 * linux-ppc-low.c (the_low_target): Install NULL as
7582 supports_z_point_type method.
7583 * linux-s390-low.c (the_low_target): Install NULL as
7584 supports_z_point_type method.
7585 * linux-sparc-low.c (the_low_target): Install NULL as
7586 supports_z_point_type method.
7587 * linux-x86-low.c (x86_supports_z_point_type): New function.
7588 (x86_insert_point): Adjust to new insert_point interface. Use
7589 insert_memory_breakpoint. Adjust to new
7590 i386_low_insert_watchpoint interface.
7591 (x86_remove_point): Adjust to remove_point interface. Use
7592 remove_memory_breakpoint. Adjust to new
7593 i386_low_remove_watchpoint interface.
7594 (the_low_target): Install x86_supports_z_point_type.
7595 * lynx-low.c (lynx_target_ops): Install NULL as
7596 supports_z_point_type callback.
7597 * nto-low.c (nto_supports_z_point_type): New.
7598 (nto_insert_point, nto_remove_point): Adjust to new interface.
7599 (nto_target_ops): Install nto_supports_z_point_type.
7600 * mem-break.c: Adjust intro comment.
7601 (struct raw_breakpoint) <raw_type, size>: New fields.
7602 <inserted>: Update comment.
7603 <shlib_disabled>: Delete field.
7604 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7605 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7606 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7607 (raw_bkpt_type_to_target_hw_bp_type): New function.
7608 (find_enabled_raw_code_breakpoint_at): New function.
7609 (find_raw_breakpoint_at): New type and size parameters. Use them.
7610 (insert_memory_breakpoint): New function, based off
7611 set_raw_breakpoint_at.
7612 (remove_memory_breakpoint): New function.
7613 (set_raw_breakpoint_at): Reimplement.
7614 (set_breakpoint): New, based on set_breakpoint_at.
7615 (set_breakpoint_at): Reimplement.
7616 (delete_raw_breakpoint): Go through the_target->remove_point
7617 instead of assuming memory breakpoints.
7618 (find_gdb_breakpoint_at): Delete.
7619 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7620 (find_gdb_breakpoint): New function.
7621 (set_gdb_breakpoint_at): Delete.
7622 (z_type_supported): New function.
7623 (set_gdb_breakpoint_1): New function, loosely based off
7624 set_gdb_breakpoint_at.
7625 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7626 (delete_gdb_breakpoint_at): Delete.
7627 (delete_gdb_breakpoint_1): New function, loosely based off
7628 delete_gdb_breakpoint_at.
7629 (delete_gdb_breakpoint): New function.
7630 (clear_gdb_breakpoint_conditions): Rename to ...
7631 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7633 (add_condition_to_breakpoint): Make static.
7634 (add_breakpoint_condition): Take a struct breakpoint pointer
7635 instead of an address. Adjust.
7636 (gdb_condition_true_at_breakpoint): Rename to ...
7637 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7639 (gdb_condition_true_at_breakpoint): Reimplement.
7640 (add_breakpoint_commands): Take a struct breakpoint pointer
7641 instead of an address. Adjust.
7642 (gdb_no_commands_at_breakpoint): Rename to ...
7643 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7644 parameter. Return true if no breakpoint was found. Change debug
7646 (gdb_no_commands_at_breakpoint): Reimplement.
7647 (run_breakpoint_commands): Rename to ...
7648 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7649 and change return type to boolean.
7650 (run_breakpoint_commands): New function.
7651 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7652 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7653 breakpoint. Go through the_target->remove_point instead of
7654 assuming memory breakpoint.
7655 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7656 software and hardware breakpoints.
7657 (reinsert_raw_breakpoint): Go through the_target->insert_point
7658 instead of assuming memory breakpoint.
7659 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7660 software and hardware breakpoints.
7661 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7662 Check both software and hardware breakpoints.
7663 (validate_inserted_breakpoint): Assert the breakpoint is a
7664 software breakpoint. Set the inserted flag to -1 instead of
7665 setting shlib_disabled.
7666 (delete_disabled_breakpoints): Adjust.
7667 (validate_breakpoints): Only validate software breakpoints.
7668 Adjust to inserted flag change.
7669 (check_mem_read, check_mem_write): Skip breakpoint types other
7670 than software breakpoints. Adjust to inserted flag change.
7671 * mem-break.h (enum raw_bkpt_type): New enum.
7672 (raw_breakpoint, struct process_info): Forward declare.
7673 (Z_packet_to_target_hw_bp_type): Delete declaration.
7674 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7675 (set_gdb_breakpoint, delete_gdb_breakpoint)
7676 (clear_breakpoint_conditions): New declarations.
7677 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7678 (breakpoint_inserted_here): Update comment.
7679 (add_breakpoint_condition, add_breakpoint_commands): Replace
7680 address parameter with a breakpoint pointer parameter.
7681 (gdb_breakpoint_here): Update comment.
7682 (delete_gdb_breakpoint_at): Delete.
7683 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7684 * server.c (process_point_options): Take a struct breakpoint
7685 pointer instead of an address. Adjust.
7686 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7687 delete_gdb_breakpoint.
7688 * spu-low.c (spu_target_ops): Install NULL as
7689 supports_z_point_type method.
7690 * target.h: Include mem-break.h.
7691 (struct target_ops) <prepare_to_access_memory>: Update comment.
7692 <supports_z_point_type>: New field.
7693 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7694 instead of a char. Also take a raw breakpoint pointer.
7695 * win32-arm-low.c (the_low_target): Install NULL as
7696 supports_z_point_type.
7697 * win32-i386-low.c (i386_supports_z_point_type): New function.
7698 (i386_insert_point, i386_remove_point): Adjust to new interface.
7699 (the_low_target): Install i386_supports_z_point_type.
7700 * win32-low.c (win32_supports_z_point_type): New function.
7701 (win32_insert_point, win32_remove_point): Adjust to new interface.
7702 (win32_target_ops): Install win32_supports_z_point_type.
7703 * win32-low.h (struct win32_target_ops):
7704 <supports_z_point_type>: New method.
7705 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7706 instead of a char. Also take a raw breakpoint pointer.
7708 2014-05-20 Pedro Alves <palves@redhat.com>
7710 * mem-break.h: Include break-common.h.
7711 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7712 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7713 (Z_packet_to_target_hw_bp_type): New declaration.
7714 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7715 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7716 (Z_PACKET_ACCESS_WP): Delete macros.
7717 (Z_packet_to_hw_type): Delete function.
7718 * i386-low.h: Don't include break-common.h here.
7719 (Z_packet_to_hw_type): Delete declaration.
7720 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7721 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7722 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7723 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7724 * linux-aarch64-low.c: Don't include break-common.h here.
7725 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7726 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7727 (Z_packet_to_target_hw_bp_type): Delete function.
7728 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7730 (mips_insert_point, mips_remove_point): Use
7731 Z_packet_to_target_hw_bp_type.
7733 2014-05-20 Pedro Alves <palves@redhat.com>
7735 * linux-aarch64-low.c: Include break-common.h.
7736 (enum target_point_type): Delete.
7737 (Z_packet_to_point_type): Rename to ...
7738 (Z_packet_to_target_hw_bp_type): ... this, and return a
7739 target_hw_bp_type instead.
7740 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7741 instead of an enum target_point_type.
7742 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7744 (aarch64_dr_state_insert_one_point)
7745 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7746 (aarch64_handle_aligned_watchpoint)
7747 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7748 Take an enum target_hw_bp_type instead of an enum
7750 (aarch64_supports_z_point_type): New function.
7751 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7752 use Z_packet_to_target_hw_bp_type.
7754 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7756 * configure.ac: Only use -Werror by default when DEVELOPMENT
7758 * configure: Regenerate.
7760 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7762 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7763 * linux-x86-low.c (X86_64_USER_REGS): New.
7764 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7766 2014-04-28 Yao Qi <yao@codesourcery.com>
7768 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7771 2014-04-25 Pedro Alves <palves@redhat.com>
7774 * linux-low.c (linux_attach_fail_reason_string): New function.
7775 (linux_attach_lwp): Delete.
7776 (linux_attach_lwp_1): Rename to ...
7777 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7778 argument. Remove "initial" parameter. Return int instead of
7779 void. Don't error or warn here.
7780 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7781 failure to attach to the tgid. Call warning when failing to
7783 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7784 argument. Remove "initial" parameter. Return int instead of
7785 void. Don't error or warn here.
7786 (linux_attach_fail_reason_string): New declaration.
7787 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7788 interface change. Use linux_attach_fail_reason_string.
7790 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7791 Walfred Tedeschi <walfred.tedeschi@intel.com>
7793 * Makefile.in: Added rules to handle new files
7794 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7795 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7796 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7797 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7798 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7799 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7801 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7802 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7803 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7804 i386/x32-avx512.xml.
7805 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7806 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7807 i386/x32-avx512-linux.xml.
7808 * i387-fp.c (num_avx512_k_registers): New constant for number
7810 (num_avx512_zmmh_low_registers): New constant for number of
7811 lower ZMM registers (0-15).
7812 (num_avx512_zmmh_high_registers): New constant for number of
7813 higher ZMM registers (16-31).
7814 (num_avx512_ymmh_registers): New contant for number of higher
7815 YMM registers (ymm16-31 added by avx521 on x86_64).
7816 (num_avx512_xmm_registers): New constant for number of higher
7817 XMM registers (xmm16-31 added by AVX512 on x86_64).
7818 (struct i387_xsave): Add space for AVX512 registers.
7819 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7820 Add code to handle AVX512 registers.
7821 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7822 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7823 prototypei from generated file.
7824 (tdesc_amd64_avx512_linux): Likewise.
7825 (init_registers_x32_avx512_linux): Likewise.
7826 (tdesc_x32_avx512_linux): Likewise.
7827 (init_registers_i386_avx512_linux): Likewise.
7828 (tdesc_i386_avx512_linux): Likewise.
7829 (x86_64_regmap): Add AVX512 registers.
7830 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7832 (initialize_low_arch): Add code to initialize AVX512 registers.
7834 2014-04-23 Pedro Alves <palves@redhat.com>
7836 * mem-break.c (find_gdb_breakpoint_at): Make static.
7837 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7839 2014-04-23 Pedro Alves <palves@redhat.com>
7841 * i386-low.c: Don't include break-common.h here.
7842 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7843 prototype to take target_hw_bp_type as argument instead of a Z
7845 * i386-low.h: Include break-common.h here.
7846 (Z_packet_to_hw_type): Declare.
7847 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7849 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7850 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7851 (x86_remove_point): Convert the packet number to a
7852 target_hw_bp_type before calling i386_low_remove_watchpoint.
7853 * win32-i386-low.c (i386_insert_point): Convert the packet number
7854 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7855 (i386_remove_point): Convert the packet number to a
7856 target_hw_bp_type before calling i386_low_remove_watchpoint.
7858 2014-04-23 Pedro Alves <palves@redhat.com>
7860 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7862 2014-04-10 Pedro Alves <palves@redhat.com>
7864 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7865 Check if the condition or command is NULL before checking if the
7866 breakpoint is known. On success, return true.
7867 * mem-break.h (add_breakpoint_condition): Document return.
7868 (add_breakpoint_commands): Add describing comment.
7869 * server.c (skip_to_semicolon): New function.
7870 (process_point_options): Use it.
7872 2014-04-09 Pedro Alves <palves@redhat.com>
7874 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7877 2014-02-27 Pedro Alves <palves@redhat.com>
7880 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7882 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7884 (last_thread_of_process_p): Take a PID argument instead of a
7886 (linux_wait_for_lwp): Delete.
7887 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7889 (linux_low_filter_event): New function, party factored out from
7890 linux_wait_for_event.
7891 (linux_wait_for_event): Rename to ...
7892 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7893 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7894 sigsuspend. Check for zombie leaders.
7895 (linux_wait_for_event): Reimplement as wrapper around
7896 linux_wait_for_event_filtered.
7897 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7898 a normal or signal exit is seen, it's the whole process exiting.
7899 (wait_for_sigstop): No longer a for_each_inferior callback.
7900 Rewrite on top of linux_wait_for_event_filtered.
7901 (stop_all_lwps): Call wait_for_sigstop directly.
7902 * server.c (resume, handle_target_event): Handle
7903 TARGET_WAITKIND_NO_RESUMED.
7905 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7907 * win32-low.c (psapi_get_dll_name,
7908 * win32_CreateToolhelp32Snapshot): Delete.
7909 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7910 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7912 (handle_load_dll): Add function description.
7913 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7915 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7917 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7919 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7920 base address when calling win32_add_one_solib.
7921 (handle_load_dll): Delete local variable load_addr.
7922 Remove 0x1000 offset applied to DLL base address when calling
7923 win32_add_one_solib.
7924 (handle_unload_dll): Add comment.
7926 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7928 * win32-low.c (win32_add_all_dlls): Renames
7929 win32_ensure_ntdll_loaded. Rewrite function documentation.
7930 Adjust implementation to always load all DLLs.
7931 Add 0x1000 offset to DLL base address when calling
7932 win32_add_one_solib.
7933 (child_initialization_done): New static global.
7934 (do_initial_child_stuff): Set child_initialization_done to
7935 zero during child initialization, and 1 after. Replace call
7936 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7938 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7939 (handle_unload_dll): Add function documentation.
7940 (get_child_debug_event): Ignore load and unload DLL events
7941 during child initialization.
7943 2014-02-20 Doug Evans <dje@google.com>
7945 Remove global all_lwps.
7946 * inferiors.h (ptid_of): Move here from linux-low.h.
7947 (pid_of, lwpid_of): Ditto.
7948 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7949 parameter is a struct thread_info * now.
7950 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7951 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7952 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7954 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7955 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7956 * linux-arm-low.c (update_registers_callback): Update, "entry"
7957 parameter is a struct thread_info * now.
7958 Fetch lwpid from current_inferior directly.
7959 (arm_insert_point): Pass &all_threads to find_inferior instead of
7961 (arm_remove_point): Ditto.
7962 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7963 (arm_prepare_to_resume): Fetch pid from thread.
7964 (arm_read_description): Fetch lwpid from current_inferior directly.
7965 * linux-low.c (all_lwps): Delete.
7966 (delete_lwp): Delete call to remove_inferior.
7967 (handle_extended_wait): Fetch lwpid from thread.
7968 (add_lwp): Don't set lwp->entry.id. Remove call to
7969 add_inferior_to_list.
7970 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7971 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7972 (kill_one_lwp_callback): Ditto.
7973 (linux_kill): Don't dereference NULL pointer.
7974 Fetch ptid,lwpid from thread.
7975 (get_detach_signal): Fetch ptid from thread.
7976 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7977 Simplify call to regcache_invalidate_thread.
7978 (delete_lwp_callback): Update, "entry" parameter is a
7979 struct thread_info * now. Fetch pid from thread.
7980 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7981 (status_pending_p_callback): Update, "entry" parameter is a
7982 struct thread_info * now. Fetch ptid from thread.
7983 (find_lwp_pid): Update, "entry" parameter is a
7984 struct thread_info * now.
7985 (linux_wait_for_lwp): Fetch pid from thread.
7986 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7987 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7988 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7989 (dequeue_one_deferred_signal): Ditto.
7990 (cancel_breakpoint): Fetch ptid from current_inferior.
7991 (linux_wait_for_event): Pass &all_threads to find_inferior,
7992 not &all_lwps. Fetch ptid, lwpid from thread.
7993 (count_events_callback): Update, "entry" parameter is a
7994 struct thread_info * now.
7995 (select_singlestep_lwp_callback): Ditto.
7996 (select_event_lwp_callback): Ditto.
7997 (cancel_breakpoints_callback): Ditto.
7998 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8000 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8001 (unsuspend_one_lwp): Update, "entry" parameter is a
8002 struct thread_info * now.
8003 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8005 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8006 Fetch lwpid from thread, not lwp.
8007 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8008 Pass &all_threads to find_inferior, not &all_lwps.
8009 (send_sigstop): Fetch lwpid from thread, not lwp.
8010 (send_sigstop_callback): Update, "entry" parameter is a
8011 struct thread_info * now.
8012 (suspend_and_send_sigstop_callback): Ditto.
8013 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8014 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8015 struct thread_info * now.
8016 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8018 (lwp_running): Update, "entry" parameter is a
8019 struct thread_info * now.
8020 (stop_all_lwps): Fetch ptid from thread.
8021 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8022 (linux_resume_one_lwp): Fetch lwpid from thread.
8023 (linux_set_resume_request): Update, "entry" parameter is a
8024 struct thread_info * now. Fetch pid, lwpid from thread.
8025 (resume_status_pending_p): Update, "entry" parameter is a
8026 struct thread_info * now.
8027 (need_step_over_p): Ditto. Fetch lwpid from thread.
8028 (start_step_over): Fetch lwpid from thread.
8029 (linux_resume_one_thread): Update, "entry" parameter is a
8030 struct thread_info * now. Fetch lwpid from thread.
8031 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8032 (proceed_one_lwp): Update, "entry" parameter is a
8033 struct thread_info * now. Fetch lwpid from thread.
8034 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8035 struct thread_info * now.
8036 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8037 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8038 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8040 (regsets_store_inferior_registers): Ditto.
8041 (fetch_register, store_register): Ditto.
8042 (linux_read_memory, linux_write_memory): Ditto.
8043 (linux_request_interrupt): Ditto.
8044 (linux_read_auxv): Ditto.
8045 (linux_xfer_siginfo): Ditto.
8046 (linux_qxfer_spu): Ditto.
8047 (linux_qxfer_libraries_svr4): Ditto.
8048 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8049 moved to inferiors.h.
8051 (get_thread_lwp): Update.
8052 (struct lwp_info): Delete member "entry". Simplify comment for
8055 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8056 current_inferior directly.
8057 (update_watch_registers_callback): Update, "entry" parameter is a
8058 struct thread_info * now. Fetch pid from thread.
8059 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8060 (mips_insert_point): Fetch lwpid from current_inferior.
8061 Pass &all_threads to find_inferior, not &all_lwps.
8062 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8063 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8065 (mips_stopped_data_address): Ditto.
8066 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8068 * linux-tile-low.c (tile_arch_setup): Ditto.
8069 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8070 (update_debug_registers_callback): Update, "entry" parameter is a
8071 struct thread_info * now. Fetch pid from thread.
8072 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8073 Pass &all_threads to find_inferior, not &all_lwps.
8074 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8075 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8076 Pass &all_threads to find_inferior, not &all_lwps.
8077 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8078 (i386_dr_low_get_status): Ditto.
8079 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8080 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8081 (x86_linux_read_description): Ditto.
8082 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8084 2014-02-20 Doug Evans <dje@google.com>
8086 * inferiors.c (get_first_inferior): Fix buglet.
8088 2014-02-19 Doug Evans <dje@google.com>
8090 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8091 * inferiors.c (add_thread): Change result type to struct thread_info *.
8092 All callers updated.
8093 (add_lwp): Call add_thread here instead of in callers.
8094 All callers updated.
8095 * linux-low.h (get_lwp_thread): Rewrite.
8096 (struct lwp_info): New member "thread".
8098 2014-02-19 Doug Evans <dje@google.com>
8100 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8101 All callers updated.
8103 2014-02-19 Doug Evans <dje@google.com>
8105 * inferiors.c (add_thread): Fix whitespace.
8107 2014-02-19 Doug Evans <dje@google.com>
8109 * dll.c (clear_dlls): Replace accessing list implemention details
8111 * gdbthread.h (get_first_thread): Declare.
8112 * inferiors.c (for_each_inferior_with_data): New function.
8113 (get_first_thread): New function.
8114 (find_thread_ptid): Simplify.
8115 (get_first_inferior): New function.
8116 (clear_list): Delete.
8117 (one_inferior_p): New function.
8118 (clear_inferior_list): New function.
8119 (clear_inferiors): Update.
8120 * inferiors.h (for_each_inferior_with_data): Declare.
8121 (clear_inferior_list): Declare.
8122 (one_inferior_p): Declare.
8123 (get_first_inferior): Declare.
8124 * linux-low.c (linux_wait_for_event): Replace accessing list
8125 implemention details with API function.
8126 * server.c (target_running): Ditto.
8127 (accumulate_file_name_length): New function.
8128 (emit_dll_description): New function.
8129 (handle_qxfer_libraries): Replace accessing list implemention
8130 details with API function.
8131 (handle_qxfer_threads_worker): New function.
8132 (handle_qxfer_threads_proper): Replace accessing list implemention
8133 details with API function.
8134 (handle_query): Ditto.
8135 (visit_actioned_threads_callback_ftype): New typedef.
8136 (visit_actioned_threads_data): New struct.
8137 (visit_actioned_threads): Rewrite to be find_inferior callback.
8138 (resume): Call find_inferior.
8139 (handle_status): Replace accessing list implemention
8140 details with API function.
8141 (process_serial_event): Replace accessing list implemention details
8143 * target.c (set_desired_inferior): Replace accessing list implemention
8144 details with API function.
8145 * tracepoint.c (same_process_p): New function.
8146 (gdb_agent_about_to_close): Replace accessing list implemention
8147 details with API function.
8148 * win32-low.c (child_delete_thread): Replace accessing list
8149 implemention details with API function.
8150 (match_dll_by_basename): New function.
8151 (dll_is_loaded_by_basename): New function.
8152 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8153 details call to dll_is_loaded_by_basename.
8155 2014-02-19 Doug Evans <dje@google.com>
8157 * dll.h (struct dll_info): Add comment.
8158 * gdbthread.h (struct thread_info): Add comment.
8159 (current_ptid): Simplify.
8160 * inferiors.c (add_process): Update.
8161 (remove_process): Update.
8162 * inferiors.h (struct process_info): Rename member "head" to "entry".
8163 * linux-low.c (delete_lwp): Update.
8165 (last_thread_of_process_p): Update.
8166 (kill_one_lwp_callback, linux_kill): Update.
8167 (status_pending_p_callback): Update.
8168 (wait_for_sigstop): Update. Simplify read of ptid.
8169 (start_step_over): Update.
8170 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8171 (get_lwp_thread): Update.
8172 (struct lwp_info): Rename member "head" to "entry".
8173 * regcache.h (inferior_list_entry): Delete.
8174 * server.c (kill_inferior_callback): Update.
8175 (detach_or_kill_inferior_callback): Update.
8176 (print_started_pid): Update.
8177 (print_attached_pid): Update.
8178 (process_serial_event): Simplify read of ptid.
8179 * thread-db.c (thread_db_create_event): Update.
8180 (thread_db_get_tls_address): Update.
8181 * win32-low.c (current_inferior_ptid): Simplify.
8183 2014-02-19 Tom Tromey <tromey@redhat.com>
8185 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8187 (target_supports_btrace): Update.
8189 2014-02-14 Yao Qi <yao@codesourcery.com>
8191 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8192 (rsp-low-ipa.o): New target.
8194 2014-02-12 Tom Tromey <tromey@redhat.com>
8196 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8197 convert_ascii_to_int.
8198 * regcache.c (registers_to_string): Likewise.
8199 * remote-utils.c (decode_M_packet): Likewise.
8200 * server.c (process_serial_event): Likewise.
8202 2014-02-12 Tom Tromey <tromey@redhat.com>
8204 * server.c (handle_query, handle_v_run): Use hex2bin, not
8206 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8208 2014-02-12 Tom Tromey <tromey@redhat.com>
8210 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8211 convert_int_to_ascii.
8212 * regcache.c (registers_to_string, collect_register_as_string):
8214 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8216 * server.c (process_serial_event): Likewise.
8217 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8218 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8220 2014-02-12 Tom Tromey <tromey@redhat.com>
8222 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8223 bin2hex, not hexify.
8224 * tracepoint.c (cmd_qtstatus): Likewise.
8226 2014-02-12 Tom Tromey <tromey@redhat.com>
8228 * remote-utils.c (monitor_output): Pass explicit length to
8231 2014-02-12 Tom Tromey <tromey@redhat.com>
8233 * tracepoint.c: Include rsp-low.h.
8234 * server.c: Include rsp-low.h.
8235 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8236 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8238 * remote-utils.c: Include rsp-low.h.
8239 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8240 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8241 (convert_int_to_ascii, convert_ascii_to_int): Move to
8243 * regcache.c: Include rsp-low.h.
8244 * ax.c: Include rsp-low.h.
8245 * Makefile.in (SFILES): Add common/rsp-low.c.
8246 (OBS): Add rsp-low.o.
8247 (rsp-low.o): New target.
8249 2014-02-12 Tom Tromey <tromey@redhat.com>
8251 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8252 Include print-utils.h.
8253 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8254 (plongest, thirty_two, phex_nz): Remove.
8255 * Makefile.in (SFILES): Add common/print-utils.c.
8256 (OBS): Add print-utils.o.
8257 (print-utils-ipa.o): New target.
8258 (print-utils.o): New target.
8259 (IPA_OBJS): Add print-utils-ipa.o.
8261 2014-02-06 Tom Tromey <tromey@redhat.com>
8263 * Makefile.in (SFILES): Fix indentation.
8265 2014-02-05 Doug Evans <dje@google.com>
8267 * linux-low.c (linux_wait_for_event): Improve comment.
8268 (linux_wait_1): Keep current_inferior in sync with event_child.
8270 2014-01-22 Doug Evans <dje@google.com>
8272 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8274 2014-01-22 Doug Evans <dje@google.com>
8276 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8277 * configure: Regenerate.
8278 * config.in: Regenerate.
8279 * Makefile.in (SFILES): Add debug.c.
8281 * debug.c: New file.
8282 * debug.h: New file.
8283 * linux-aarch64-low.c (*): Update all debugging printfs to use
8284 debug_printf instead of fprintf.
8285 * linux-arm-low.c (*): Ditto.
8286 * linux-cris-low.c (*): Ditto.
8287 * linux-crisv32-low.c (*): Ditto.
8288 * linux-m32r-low.c (*): Ditto.
8289 * linux-sparc-low.c (*): Ditto.
8290 * linux-x86.c (*): Ditto.
8291 * linux-low.c (*): Ditto.
8292 (linux_wait_1): Add calls to debug_enter, debug_exit.
8293 (linux_wait): Remove redundant debugging printf.
8294 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8295 (linux_resume, unstop_all_lwps): Ditto.
8296 * mem-break.c (*): Update all debugging printfs to use
8297 debug_printf instead of fprintf.
8298 * remote-utils.c (*): Ditto.
8299 * thread-db.c (*): Ditto.
8300 * server.c #include <ctype.h>, "gdb_vecs.h".
8301 (debug_threads): Moved to debug.c.
8302 (*): Update all debugging printfs to use debug_printf instead of
8304 (start_inferior): Replace call to fflush with call to debug_flush.
8305 (monitor_show_help): Mention set debug-format.
8306 (parse_debug_format_options): New function.
8307 (handle_monitor_command): Handle "monitor set debug-format".
8308 (gdbserver_usage): Mention --debug-format.
8309 (main): Parse --debug-format.
8310 * server.h (debug_threads): Declaration moved to debug.h.
8312 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8313 trace_debug_1 that uses debug_printf.
8314 (tracepoint_look_up_symbols): Update all debugging printfs to use
8315 debug_printf instead of fprintf.
8317 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8319 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8322 2014-01-17 Pedro Alves <palves@redhat.com>
8325 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8326 defined after including gdb_proc_service.h.
8328 2014-01-16 Doug Evans <dje@google.com>
8330 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8331 (match_dll): Use it.
8333 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8335 * target.h (target_ops) <read_btrace>: Change parameters and
8336 return type to allow error reporting.
8337 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8338 trace reading errors on.
8339 * linux-low.c (linux_low_read_btrace): Pass trace reading
8341 (linux_low_disable_btrace): New.
8343 2014-01-15 Doug Evans <dje@google.com>
8345 * inferiors.c (thread_id_to_gdb_id): Delete.
8346 * inferiors.h (thread_id_to_gdb_id): Delete.
8348 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8350 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8351 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8354 2014-01-08 Pedro Alves <palves@redhat.com>
8356 * server.c (handle_status): Don't discard previous queued stop
8357 replies or thread's pending status here.
8358 (main) <disconnection>: Do it here instead.
8360 2014-01-08 Pedro Alves <palves@redhat.com>
8362 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8363 * server.c (visit_actioned_threads, handle_pending_status): New
8365 (handle_v_cont): Factor out parts to ...
8366 (resume): ... this new function. If in all-stop, and a thread
8367 being resumed has a pending status, report it without actually
8369 (myresume): Adjust to use the new 'resume' function.
8370 (clear_pending_status_callback, set_pending_status_callback)
8371 (find_status_pending_thread_callback): New functions.
8372 (handle_status): Handle the case of multiple threads having
8373 interesting statuses to report. Report threads' real last signal
8374 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8375 with an interesting thread to report the status for, instead of
8376 always reporting the status of the first thread.
8378 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8380 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8381 * gdbreplay.c (gdbreplay_version): Likewise.
8383 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8385 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8386 iov.iov_len with the real length in use.
8388 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8390 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8391 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8392 for all targets that use win32-low.c.
8393 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8394 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8396 2013-12-13 Pedro Alves <palves@redhat.com>
8398 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8399 if equal to TARGET_WAITKIND_LOADED.
8400 * win32-low.c (cached_status): New static global.
8401 (win32_wait): Add declaration.
8402 (do_initial_child_stuff): Flush all initial pending debug events
8403 up to the initial breakpoint.
8404 (win32_wait): If CACHED_STATUS was set, return that instead
8405 of doing a real wait. Remove the code resuming the execution
8406 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8407 during the initial phase. Also remove the code changing
8408 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8409 TARGET_WAITKIND_STOPPED.
8411 2013-12-11 Yao Qi <yao@codesourcery.com>
8413 * notif.c (handle_notif_ack): Return 0 if no notification
8416 2013-11-20 Doug Evans <dje@google.com>
8418 * linux-low.c (linux_set_resume_request): Fix comment.
8420 2013-11-20 Doug Evans <dje@google.com>
8422 * linux-low.c (resume_status_pending_p): Tweak comment.
8424 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8426 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8427 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8428 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8429 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8430 (srv_amd64_regobj): Add amd64-mpx.o.
8431 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8432 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8433 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8434 * i387-fp.c (num_pl_bnd_register) Added constant.
8435 (num_pl_bnd_cfg_registers) Added constant.
8436 (struct i387_xsave) Added reserved area and MPX fields.
8437 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8438 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8440 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8441 (init_registers_amd64_mpx_linux): Declare new function.
8442 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8443 (x86_64_regmap): Add MPX registers.
8444 (x86_linux_read_description): Add MPX case.
8445 (initialize_low_arch): Initialize MPX targets.
8447 2013-11-18 Tom Tromey <tromey@redhat.com>
8449 * configure: Rebuild.
8450 * configure.ac: Don't check for stdlib.h.
8451 * gdbreplay.c: Unconditionally include stdlib.h.
8453 2013-11-18 Tom Tromey <tromey@redhat.com>
8455 * config.in: Rebuild.
8456 * configure: Rebuild.
8457 * configure.ac: Don't use AC_HEADER_DIRENT.
8459 2013-11-18 Tom Tromey <tromey@redhat.com>
8461 * server.h: Don't check HAVE_STRING_H.
8462 * gdbreplay.c: Don't check HAVE_STRING_H.
8463 * configure: Rebuild.
8465 2013-11-18 Tom Tromey <tromey@redhat.com>
8467 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8470 2013-11-08 Tom Tromey <tromey@redhat.com>
8472 * configure, config.in: Rebuild.
8473 * configure.ac: Remove unused configury.
8475 2013-11-08 Tom Tromey <tromey@redhat.com>
8477 * acinclude.m4: Include common.m4, codeset.m4.
8478 * configure, config.in: Rebuild.
8479 * configure.ac: Use GDB_AC_COMMON.
8481 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8483 * linux-s390-low.c (HWCAP_S390_TE): New define.
8484 (s390_arch_setup): Consider the TE field in the HWCAP for
8485 determining 'have_regset_tdb'.
8487 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8490 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8493 2013-10-02 Pedro Alves <palves@redhat.com>
8495 * server.c (process_serial_event): Don't output "GDBserver
8496 exiting" if GDB is connected through stdio.
8497 * target.c (mywait): Likewise, be silent if GDB is connected
8500 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8502 * lynx-low.c (lynx_add_threads_after_attach): New function.
8503 (lynx_attach): Remove call to add_thread. Add call to
8504 lynx_add_threads_after_attach instead.
8506 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8508 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8509 * config.in, configure: Regenerated.
8511 2013-09-18 Yao Qi <yao@codesourcery.com>
8514 * server.c (start_inferior): Clear 'resume_info'.
8516 2013-09-16 Jiong Wang <jiwang@tilera.com>
8518 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8521 2013-09-16 Jiong Wang <jiwang@tilera.com>
8523 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8524 linux-tile-low.o to srv_tgtobj.
8526 2013-09-16 Will Newton <will.newton@linaro.org>
8528 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8531 2013-09-06 Pedro Alves <palves@redhat.com>
8533 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8534 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8535 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8536 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8537 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8538 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8540 2013-09-06 Pedro Alves <palves@redhat.com>
8542 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8543 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8545 2013-09-06 Pedro Alves <palves@redhat.com>
8547 * linux-amd64-ipa.c: Include tracepoint.h.
8548 * linux-i386-ipa.c: Include tracepoint.h.
8550 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8552 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8553 (ps_get_thread_area): New function.
8555 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8557 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8558 (initialize_low_arch): Call init_registers_crisv32 rather than
8559 init_register_crisv32.
8561 2013-09-05 Pedro Alves <palves@redhat.com>
8563 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8565 * hostio.h: ... this new file.
8566 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8567 win32-low.c: Include hostio.h.
8569 2013-09-05 Pedro Alves <palves@redhat.com>
8571 * server.h (gdb_client_data, handler_func, callback_handler_func)
8572 (delete_file_handler, add_file_handler, append_callback_event)
8573 (delete_callback_event, start_event_loop, initialize_event_loop):
8574 Move to event-loop.h and include it.
8575 * event-loop.h: New file.
8577 2013-09-05 Pedro Alves <palves@redhat.com>
8579 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8580 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8581 (loaded_dll, unloaded_dll): Move to ...
8582 * dll.h: ... this new file.
8583 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8585 2013-09-05 Pedro Alves <palves@redhat.com>
8587 * server.h (current_process, get_thread_process, all_processes)
8588 (add_inferior_to_list, for_each_inferior, current_inferior)
8589 (remove_inferior, add_process, remove_process, find_process_pid)
8590 (have_started_inferiors_p, have_attached_inferiors_p)
8591 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8592 (clear_inferiors, find_inferior, find_inferior_id)
8593 (inferior_target_data, set_inferior_target_data)
8594 (inferior_regcache_data, set_inferior_regcache_data): Move to
8595 inferiors.h, and include it.
8596 * inferiors.h: New file.
8598 2013-09-05 Pedro Alves <palves@redhat.com>
8600 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8604 2013-09-05 Pedro Alves <palves@redhat.com>
8606 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8608 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8609 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8610 (handle_tracepoint_general_set, handle_tracepoint_query)
8611 (tracepoint_finished_step, tracepoint_was_hit)
8612 (release_while_stepping_state_list, current_traceframe)
8613 (in_readonly_region, traceframe_read_mem)
8614 (fetch_traceframe_registers, traceframe_read_sdata)
8615 (traceframe_read_info, struct fast_tpoint_collect_status)
8616 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8617 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8618 (supply_fast_tracepoint_registers)
8619 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8620 (ipa_tdesc, claim_trampoline_space)
8621 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8622 (agent_mem_read, agent_get_trace_state_variable_value)
8623 (agent_set_trace_state_variable_value, agent_tsv_read)
8624 (agent_mem_read_string, get_raw_reg_func_addr)
8625 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8626 * tracepoint.h: ... this new file.
8628 2013-09-05 Pedro Alves <palves@redhat.com>
8630 * server.h (perror_with_name, error, fatal, warning, paddress)
8631 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8633 * utils.h: New file.
8635 2013-09-05 Pedro Alves <palves@redhat.com>
8637 * server.h (remote_debug, noack_mode, transport_is_reliable)
8638 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8639 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8640 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8641 (write_enn, initialize_async_io, enable_async_io)
8642 (disable_async_io, check_remote_input_interrupt_request)
8643 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8644 (dead_thread_notify, prepare_resume_reply)
8645 (decode_address_to_semicolon, decode_address, decode_m_packet)
8646 (decode_M_packet, decode_X_packet, decode_xfer_write)
8647 (decode_search_memory_packet, unhexify, hexify)
8648 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8649 (look_up_one_symbol, relocate_instruction)
8650 (monitor_output): Move to remote-utils.h, and include it.
8651 * remote-utils.h: New file.
8653 2013-09-05 Pedro Alves <palves@redhat.com>
8655 * server.h (_): Delete.
8657 2013-09-02 Pedro Alves <palves@redhat.com>
8659 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8660 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8662 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8664 2013-09-02 Pierre Muller <muller@sourceware.org>
8666 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8667 or WriteProcessMemory complete successfully and handle
8668 ERROR_PARTIAL_COPY error.
8670 2013-09-02 Pedro Alves <palves@redhat.com>
8672 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8673 error instead of EIO.
8675 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8678 * linux-low.c: Include filestuff.h.
8679 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8680 * lynx-low.c: Include filestuff.h.
8681 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8682 * server.c: Include filestuff.h.
8683 (main): Call notice_open_fds.
8684 * spu-low.c: Include filestuff.h.
8685 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8687 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8689 * Makefile.in: Explain why ../target and ../nat are not
8690 listed as include file search paths.
8691 (linux-waitpid.o): New object file rule.
8692 * configure.srv (srv_native_linux_obj): New variable.
8693 Replace all occurrences of linux native object files with
8694 $srv_native_linux_obj.
8695 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8696 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8697 (linux_enable_event_reporting): Remove declaration.
8698 (my_waitpid): Moved to common/linux-waitpid.c.
8699 (linux_wait_for_event): Pass ptid when calling
8700 linux_enable_event_reporting.
8701 (linux_supports_tracefork_flag): Remove.
8702 (linux_enable_event_reporting): Likewise.
8703 (linux_tracefork_grandchild): Remove.
8704 (STACK_SIZE): Moved to common/linux-ptrace.c.
8705 (linux_tracefork_child): Remove.
8706 (linux_test_for_tracefork): Remove.
8707 (linux_look_up_symbols): Call linux_supports_traceclone.
8708 (initialize_low): Remove call to linux_test_for_tracefork.
8709 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8710 common/linux-ptrace.h.
8711 (PTRACE_TYPE_ARG4): Likewise.
8712 Include linux-ptrace.h.
8714 2013-08-21 Pedro Alves <palves@redhat.com>
8716 * config.in: Renegerate.
8718 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8720 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8721 (SFILES): Remove $(srcdir)/common/target-common.c and
8722 add $(srcdir)/target/waitstatus.c.
8723 (OBS): Remove target-common.o and add waitstatus.o.
8724 (server_h): Remove $(srcdir)/../common/target-common.h and
8725 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8726 and $(srcdir)/../target/waitstatus.h.
8727 (target-common.o): Remove.
8728 (waitstatus.o): New target object file.
8729 * target.h: Do not include target-common.h and
8730 include target/resume.h, target/wait.h and
8731 target/waitstatus.h.
8733 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8735 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8736 to PTRACE_TYPE_ARG3.
8737 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8738 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8740 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8741 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8743 2013-07-27 Jie Zhang <jie@codesourcery.com>
8744 Daniel Jacobowitz <dan@codesourcery.com>
8745 Yao Qi <yao@codesourcery.com>
8747 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8748 (mips-linux-watch.o): New rule.
8749 (mips_linux_watch_h): New variable.
8750 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8752 * linux-mips-low.c: Include mips-linux-watch.h.
8753 (struct arch_process_info, struct arch_lwp_info): New.
8754 (update_watch_registers_callback): New function.
8755 (mips_linux_new_process, mips_linux_new_thread) New functions.
8756 (mips_linux_prepare_to_resume, mips_insert_point): New
8758 (mips_remove_point, mips_stopped_by_watchpoint): New
8760 (rsp_bp_type_to_target_hw_bp_type): New function.
8761 (mips_stopped_data_address): New function.
8762 (the_low_target): Add watchpoint support functions.
8764 2013-07-27 Yao Qi <yao@codesourcery.com>
8766 * i386-low.c: Include break-common.h.
8767 (enum target_hw_bp_type): Remove.
8769 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8771 * Makefile.in (SFILES): /common/target-common.c.
8772 (OBS): Add target-common.o.
8773 (server_h): Add $(srcdir)/../common/target-common.h.
8774 (target-common.o): New target.
8775 * server.c (queue_stop_reply_callback): Free
8776 status string after use.
8777 * target.c (target_waitstatus_to_string): Remove.
8778 * target.h: Include target-common.h.
8779 (resume_kind): Likewise.
8780 (target_waitkind): Likewise.
8781 (target_waitstatus): Likewise.
8782 (TARGET_WNOHANG): Likewise.
8784 2013-07-04 Yao Qi <yao@codesourcery.com>
8786 * Makefile.in (host_alias): Use @host_noncanonical@.
8787 (target_alias): Use @target_noncanonical@.
8788 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8789 ACX_NONCANONICAL_HOST.
8790 * configure: Regenerated.
8793 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8795 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8796 * configure: Rebuild.
8797 * Makefile.in (version_host, version_target): Get from configure.
8798 (version.c): Use $(version_host) and $(version_target).
8800 2013-07-03 Pedro Alves <palves@redhat.com>
8802 * Makefile.in (config.status): Depend on development.sh.
8803 * acinclude.m4: Include libmcheck.m4.
8804 * configure: Regenerate.
8806 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8808 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8809 attribute inside the parentheses.
8810 (winapi_DebugSetProcessKillOnExit): Ditto.
8811 (winapi_DebugBreakProcess): Ditto.
8812 (winapi_GenerateConsoleCtrlEvent): Ditto.
8814 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8816 * notif.h (notif_event): Add a dummy member to avoid compiler
8819 2013-07-01 Pedro Alves <palves@redhat.com>
8821 * hostio.c (HOSTIO_PATH_MAX): Define.
8822 (require_filename, handle_open, handle_unlink, handle_readlink):
8825 2013-07-01 Pedro Alves <palves@redhat.com>
8827 * server.h: Include "pathmax.h".
8828 * linux-low.c: Don't include sys/param.h.
8829 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8831 * win32-low.c: Don't include sys/param.h.
8832 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8834 2013-07-01 Pedro Alves <palves@redhat.com>
8836 * event-loop.c: Don't check HAVE_UNISTD_H before including
8838 * gdbreplay.c: Likewise.
8839 * remote-utils.c: Likewise.
8840 * server.c: Likewise.
8841 * configure.ac: Don't check for unistd.h.
8842 * configure: Regenerate.
8844 2013-06-28 Tom Tromey <tromey@redhat.com>
8846 * Makefile.in (version.c): Use version.in, not
8849 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8851 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8852 * configure: Rebuild.
8853 * Makefile.in (version_host, version_target): Get from configure.
8854 (version.c): Use $(version_host) and $(version_target).
8856 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8858 Fix trace-status to output user name without trailing colon.
8859 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8861 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8863 Fix trace-status to output proper start-time and stop-time.
8864 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8865 output start time and stop time in hex as gdb expects.
8867 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8869 * tracepoint.c (build_traceframe_info_xml): Output trace state
8870 variables present in the trace buffer.
8872 2013-06-24 Tom Tromey <tromey@redhat.com>
8874 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8876 (version.o): Remove.
8877 * gdbreplay.c: Include version.h.
8878 (version, host_name): Don't declare.
8879 * server.h: Include version.h.
8880 (version, host_name): Don't declare.
8882 2013-06-12 Pedro Alves <palves@redhat.com>
8884 * linux-x86-low.c (linux_is_elf64): Delete global.
8885 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8886 with local linux_pid_exe_is_elf_64_file use.
8888 2013-06-11 Pedro Alves <palves@redhat.com>
8890 * linux-low.c (regset_disabled, disable_regset): New functions.
8891 (regsets_fetch_inferior_registers)
8892 (regsets_store_inferior_registers): Use them.
8893 (initialize_regsets_info); Don't allocate the disabled_regsets
8895 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8898 2013-06-11 Pedro Alves <palves@redhat.com>
8900 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8903 2013-06-11 Pedro Alves <palves@redhat.com>
8905 * linux-x86-low.c (initialize_low_arch): Call
8906 init_registers_x32_avx_linux.
8908 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8910 Fix compatibility with Android Bionic.
8911 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8914 2013-06-07 Pedro Alves <palves@redhat.com>
8917 * Makefile.in (OBS): Add tdesc.o.
8918 (IPA_OBJS): Add tdesc-ipa.o.
8919 (tdesc-ipa.o): New rule.
8920 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8922 * linux-low.c (new_inferior): Delete.
8923 (disabled_regsets, num_regsets): Delete.
8924 (linux_add_process): Adjust to set the new per-process
8926 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8927 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8928 was a stop. When calling arch_setup, switch the current inferior
8929 to the thread that got an event.
8930 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8931 (regsets_fetch_inferior_registers)
8932 (regsets_store_inferior_registers): New regsets_info parameter.
8934 (linux_register_in_regsets): New regs_info parameter. Adjust to
8936 (register_addr, fetch_register, store_register): New usrregs_info
8937 parameter. Adjust to use it.
8938 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8939 parameter regs_info. Adjust to use it.
8940 (linux_fetch_registers): Get the current inferior's regs_info, and
8942 (linux_store_registers): Ditto.
8943 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8944 (initialize_low): Don't initialize the target_regsets here. Call
8945 initialize_low_arch.
8946 * linux-low.h (target_regsets): Delete declaration.
8947 (struct regsets_info): New.
8948 (struct usrregs_info): New.
8949 (struct regs_info): New.
8950 (struct process_info_private) <new_inferior>: New field.
8951 (struct linux_target_ops): Delete the num_regs, regmap, and
8952 regset_bitmap fields. New field regs_info.
8953 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8954 * i387-fp.c (num_xmm_registers): Delete.
8955 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8956 calls to new interface.
8957 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8958 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8959 Infer the number of xmm registers from the regcache's target
8961 * i387-fp.h (num_xmm_registers): Delete.
8962 * inferiors.c (add_thread): Don't install the thread's regcache
8964 * proc-service.c (gregset_info): Fetch the current inferior's
8965 regs_info. Adjust to use it.
8966 * regcache.c: Include tdesc.h.
8967 (register_bytes, reg_defs, num_registers)
8968 (gdbserver_expedite_regs): Delete.
8969 (get_thread_regcache): If the thread doesn't have a regcache yet,
8970 create one, instead of aborting gdbserver.
8971 (regcache_invalidate_one): Rename to ...
8972 (regcache_invalidate_thread): ... this.
8973 (regcache_invalidate_one): New.
8974 (regcache_invalidate): Only invalidate registers of the current
8976 (init_register_cache): Add target_desc parameter, and use it.
8977 (new_register_cache): Ditto. Assert the target description has a
8978 non zero registers_size.
8979 (regcache_cpy): Add assertions. Adjust.
8980 (realloc_register_cache, set_register_cache): Delete.
8981 (registers_to_string, registers_from_string): Adjust.
8982 (find_register_by_name, find_regno, find_register_by_number)
8983 (register_cache_size): Add target_desc parameter, and use it.
8984 (free_register_cache_thread, free_register_cache_thread_one)
8985 (regcache_release, register_cache_size): New.
8986 (register_size): Add target_desc parameter, and use it.
8987 (register_data, supply_register, supply_register_zeroed)
8988 (supply_regblock, supply_register_by_name, collect_register)
8989 (collect_register_as_string, collect_register_by_name): Adjust.
8990 * regcache.h (struct target_desc): Forward declare.
8991 (struct regcache) <tdesc>: New field.
8992 (init_register_cache, new_register_cache): Add target_desc
8994 (regcache_invalidate_thread): Declare.
8995 (regcache_invalidate_one): Delete declaration.
8996 (regcache_release): Declare.
8997 (find_register_by_number, register_cache_size, register_size)
8998 (find_regno): Add target_desc parameter.
8999 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9001 * remote-utils.c: Include tdesc.h.
9002 (outreg, prepare_resume_reply): Adjust.
9003 * server.c: Include tdesc.h.
9004 (gdbserver_xmltarget): Delete declaration.
9005 (get_features_xml, process_serial_event): Adjust.
9006 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9008 (struct process_info) <tdesc>: New field.
9009 (ipa_tdesc): Declare.
9010 * tdesc.c: New file.
9011 * tdesc.h: New file.
9012 * tracepoint.c: Include tdesc.h.
9013 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9014 (get_context_regcache): Adjust to pass ipa_tdesc down.
9015 (do_action_at_tracepoint): Adjust to get the register cache size
9016 from the context regcache's description.
9017 (traceframe_walk_blocks): Adjust to get the register cache size
9018 from the current trace frame's description.
9019 (traceframe_get_pc): Adjust to get current trace frame's
9020 description and pass it down.
9021 (gdb_collect): Adjust to get the register cache size from the
9023 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9024 (gdbserver_xmltarget): Delete.
9025 (initialize_low_tracepoint): Set the ipa's target description.
9026 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9027 (initialize_low_tracepoint): Set the ipa's target description.
9028 * linux-x86-low.c: Include tdesc.h.
9029 [__x86_64__] (is_64bit_tdesc): New.
9030 (ps_get_thread_area, x86_get_thread_area): Use it.
9031 (i386_cannot_store_register): Rename to ...
9032 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9033 (i386_cannot_fetch_register): Rename to ...
9034 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9035 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9037 (target_regsets): Rename to ...
9038 (x86_regsets): ... this.
9039 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9041 (x86_siginfo_fixup): Use is_64bit_tdesc.
9042 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9043 (tdesc_x32_avx_linux, tdesc_x32_linux)
9044 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9046 (x86_linux_update_xmltarget): Delete.
9047 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9048 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9049 (AMD64_LINUX_USER64_CS): New.
9050 (x86_linux_read_description): New, based on
9051 x86_linux_update_xmltarget.
9052 (same_process_callback): New.
9053 (x86_arch_setup_process_callback): New.
9054 (x86_linux_update_xmltarget): New.
9055 (x86_regsets_info): New.
9056 (amd64_linux_regs_info): New.
9057 (i386_linux_usrregs_info): New.
9058 (i386_linux_regs_info): New.
9059 (x86_linux_regs_info): New.
9060 (x86_arch_setup): Reimplement.
9061 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9062 (x86_emit_ops): Ditto.
9063 (the_low_target): Adjust. Install x86_linux_regs_info,
9064 x86_cannot_fetch_register, and x86_cannot_store_register.
9065 (initialize_low_arch): New.
9066 * linux-ia64-low.c (tdesc_ia64): Declare.
9067 (ia64_fetch_register): Adjust.
9068 (ia64_usrregs_info, regs_info): New globals.
9069 (ia64_regs_info): New function.
9070 (the_low_target): Adjust.
9071 (initialize_low_arch): New function.
9072 * linux-sparc-low.c (tdesc_sparc64): Declare.
9073 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9075 (sparc_arch_setup): New function.
9076 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9077 (the_low_target): Adjust.
9078 (initialize_low_arch): New function.
9079 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9080 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9081 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9082 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9083 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9084 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9085 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9086 (tdesc_powerpc_isa205_vsx64l): Declare.
9087 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9088 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9089 (ppc_set_pc, ppc_get_hwcap): Adjust.
9090 (ppc_usrregs_info): Forward declare.
9091 (!__powerpc64__) ppc_regmap_adjusted: New global.
9092 (ppc_arch_setup): Adjust to the current process'es target
9094 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9095 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9096 (ppc_store_evrregset): Adjust.
9097 (target_regsets): Rename to ...
9098 (ppc_regsets): ... this, and make static.
9099 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9100 (ppc_regs_info): New function.
9101 (the_low_target): Adjust.
9102 (initialize_low_arch): New function.
9103 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9104 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9105 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9106 (tdesc_s390x_linux64v2): Declare.
9107 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9108 (s390_fill_gregset, s390_store_last_break): Adjust.
9109 (target_regsets): Rename to ...
9110 (s390_regsets): ... this, and make static.
9111 (s390_get_pc, s390_set_pc): Adjust.
9112 (s390_get_hwcap): New target_desc parameter, and use it.
9113 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9114 (s390_arch_setup): Adjust to set the current process'es target
9115 description. Don't adjust the regmap.
9116 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9117 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9118 (regs_info_3264): New globals.
9119 (s390_regs_info): New function.
9120 (the_low_target): Adjust.
9121 (initialize_low_arch): New function.
9122 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9123 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9124 [__mips64] (init_registers_mips_linux)
9125 (init_registers_mips_dsp_linux): Delete defines.
9126 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9127 (have_dsp): New global.
9128 (mips_read_description): New, based on mips_arch_setup.
9129 (mips_arch_setup): Reimplement.
9130 (get_usrregs_info): New function.
9131 (mips_cannot_fetch_register, mips_cannot_store_register)
9132 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9133 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9134 (target_regsets): Rename to ...
9135 (mips_regsets): ... this, and make static.
9136 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9137 (dsp_regs_info, regs_info): New globals.
9138 (mips_regs_info): New function.
9139 (the_low_target): Adjust.
9140 (initialize_low_arch): New function.
9141 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9142 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9144 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9145 (arm_read_description): New, with bits factored from
9147 (arm_arch_setup): Reimplement.
9148 (target_regsets): Rename to ...
9149 (arm_regsets): ... this, and make static.
9150 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9151 (arm_regs_info): New function.
9152 (the_low_target): Adjust.
9153 (initialize_low_arch): New function.
9154 * linux-m68k-low.c (tdesc_m68k): Declare.
9155 (target_regsets): Rename to ...
9156 (m68k_regsets): ... this, and make static.
9157 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9158 (m68k_regs_info): New function.
9159 (m68k_arch_setup): New function.
9160 (the_low_target): Adjust.
9161 (initialize_low_arch): New function.
9162 * linux-sh-low.c (tdesc_sharch): Declare.
9163 (target_regsets): Rename to ...
9164 (sh_regsets): ... this, and make static.
9165 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9166 (sh_regs_info, sh_arch_setup): New functions.
9167 (the_low_target): Adjust.
9168 (initialize_low_arch): New function.
9169 * linux-bfin-low.c (tdesc_bfin): Declare.
9170 (bfin_arch_setup): New function.
9171 (bfin_usrregs_info, regs_info): New globals.
9172 (bfin_regs_info): New function.
9173 (the_low_target): Adjust.
9174 (initialize_low_arch): New function.
9175 * linux-cris-low.c (tdesc_cris): Declare.
9176 (cris_arch_setup): New function.
9177 (cris_usrregs_info, regs_info): New globals.
9178 (cris_regs_info): New function.
9179 (the_low_target): Adjust.
9180 (initialize_low_arch): New function.
9181 * linux-cris-low.c (tdesc_crisv32): Declare.
9182 (cris_arch_setup): New function.
9183 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9184 (cris_regs_info): New function.
9185 (the_low_target): Adjust.
9186 (initialize_low_arch): New function.
9187 * linux-m32r-low.c (tdesc_m32r): Declare.
9188 (m32r_arch_setup): New function.
9189 (m32r_usrregs_info, regs_info): New globals.
9190 (m32r_regs_info): Adjust.
9191 (initialize_low_arch): New function.
9192 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9193 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9194 (tic6x_usrregs_info): Forward declare.
9195 (tic6x_read_description): New function, based on ...
9196 (tic6x_arch_setup): ... this. Reimplement.
9197 (target_regsets): Rename to ...
9198 (tic6x_regsets): ... this, and make static.
9199 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9200 (tic6x_regs_info): New function.
9201 (the_low_target): Adjust.
9202 (initialize_low_arch): New function.
9203 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9204 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9205 (target_regsets): Rename to ...
9206 (xtensa_regsets): ... this, and make static.
9207 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9209 (xtensa_arch_setup, xtensa_regs_info): New functions.
9210 (the_low_target): Adjust.
9211 (initialize_low_arch): New function.
9212 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9213 (nios2_arch_setup): Set the current process'es tdesc.
9214 (target_regsets): Rename to ...
9215 (nios2_regsets): ... this.
9216 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9217 (nios2_regs_info): New function.
9218 (the_low_target): Adjust.
9219 (initialize_low_arch): New function.
9220 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9221 (aarch64_arch_setup): Set the current process'es tdesc.
9222 (target_regsets): Rename to ...
9223 (aarch64_regsets): ... this.
9224 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9225 (aarch64_regs_info): New function.
9226 (the_low_target): Adjust.
9227 (initialize_low_arch): New function.
9228 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9230 (target_regsets): Rename to ...
9231 (tile_regsets): ... this.
9232 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9233 (tile_regs_info): New function.
9234 (tile_arch_setup): Set the current process'es tdesc.
9235 (the_low_target): Adjust.
9236 (initialize_low_arch): New function.
9237 * spu-low.c (tdesc_spu): Declare.
9238 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9239 * win32-arm-low.c (tdesc_arm): Declare.
9240 (arm_arch_setup): New function.
9241 (the_low_target): Install arm_arch_setup instead of
9243 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9244 (init_windows_x86): Rename to ...
9245 (i386_arch_setup): ... this. Set `win32_tdesc'.
9246 (the_low_target): Adjust.
9247 * win32-low.c (win32_tdesc): New global.
9248 (child_add_thread): Don't create the thread cache here.
9249 (do_initial_child_stuff): Set the new process'es tdesc.
9250 * win32-low.h (struct target_desc): Forward declare.
9251 (win32_tdesc): Declare.
9252 * lynx-i386-low.c (tdesc_i386): Declare global.
9253 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9254 * lynx-low.c (lynx_tdesc): New global.
9255 (lynx_add_process): Set the new process'es tdesc.
9256 * lynx-low.h (struct target_desc): Forward declare.
9257 (lynx_tdesc): Declare global.
9258 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9259 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9260 * nto-low.c (nto_tdesc): New global.
9261 (do_attach): Set the new process'es tdesc.
9262 * nto-low.h (struct target_desc): Forward declare.
9263 (nto_tdesc): Declare.
9264 * nto-x86-low.c (tdesc_i386): Declare.
9265 (nto_x86_arch_setup): Set `nto_tdesc'.
9267 2013-06-04 Gary Benson <gbenson@redhat.com>
9269 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9270 to qSupported response when appropriate.
9271 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9272 with nonzero-length annex.
9273 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9274 arguments supplied in annex.
9276 2013-05-31 Doug Evans <dje@google.com>
9279 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9280 64 bits in 64-cross-32 environment.
9282 2013-05-28 Pedro Alves <palves@redhat.com>
9284 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9285 (aarch64-without-fpu.c): Delete rule.
9286 * configure.srv (aarch64*-*-linux*): Remove references to
9287 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9288 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9291 2013-05-24 Pedro Alves <palves@redhat.com>
9293 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9294 instead of strchr/decode_address. Error if the range isn't split
9295 with a ','. Don't assume there's be a ':' in the action.
9297 2013-05-23 Yao Qi <yao@codesourcery.com>
9298 Pedro Alves <palves@redhat.com>
9300 * linux-low.c (lwp_in_step_range): New function.
9301 (linux_wait_1): If the thread was range stepping and stopped
9302 outside the stepping range, report the stop to GDB. Otherwise,
9303 continue stepping. Add range stepping debug output.
9304 (linux_set_resume_request): Copy the step range from the resume
9306 (linux_supports_range_stepping): New.
9307 (linux_target_ops) <supports_range_stepping>: Set to
9308 linux_supports_range_stepping.
9309 * linux-low.h (struct linux_target_ops)
9310 <supports_range_stepping>: New field.
9311 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9312 * linux-x86-low.c (x86_supports_range_stepping): New.
9313 (the_low_target) <supports_range_stepping>: Set to
9314 x86_supports_range_stepping.
9315 * server.c (handle_v_cont): Handle 'r' action.
9316 (handle_v_requests): Append ";r" if the target supports range
9318 * target.h (struct thread_resume) <step_range_start,
9319 step_range_end>: New fields.
9320 (struct target_ops) <supports_range_stepping>:
9322 (target_supports_range_stepping): New macro.
9324 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9326 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9327 confusion in comment.
9329 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9331 * lynx-low.c (struct process_info_private): New type.
9332 (lynx_add_process): New function.
9333 (lynx_create_inferior, lynx_attach): Replace calls to
9334 add_process by calls to lynx_add_process.
9335 (lynx_resume): If PTID is null, then try using
9336 current_process()->private->last_wait_event_ptid.
9338 (lynx_clear_inferiors): Delete. The contents of that function
9339 has been inlined in lynx_mourn;
9340 (lynx_wait_1): Save the ptid in the process's private data.
9341 (lynx_mourn): Free the process' private data. Replace call
9342 to lynx_clear_inferiors by call to clear_inferiors.
9344 2013-05-17 Yao Qi <yao@codesourcery.com>
9346 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9349 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9351 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9352 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9353 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9354 PT_TEXT_END_ADDR guards. Update comments.
9355 (linux_target_op) <read_offsets>: Conditionally define to
9356 linux_read_offsets if the target is UCLIBC and if it defines
9357 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9359 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9360 Andrew Jenner <andrew@codesourcery.com>
9362 * Makefile.in (SFILES): Add linux-nios2-low.c.
9363 (clean): Add action to delete nios2-linux.c.
9364 (nios2-linux.c): New rule.
9365 * configure.srv: Add nios2*-*-linux*.
9366 * linux-nios2-low.c: New.
9368 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9370 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9372 2013-04-25 Hui Zhu <hui@codesourcery.com>
9375 * ax.c (ax_printf): Add fflush.
9377 2013-04-22 Tom Tromey <tromey@redhat.com>
9379 * Makefile.in (SFILES): Add filestuff.c.
9380 (OBS): Add filestuff.o.
9381 (filestuff.o): New target.
9382 * config.in, configure: Rebuild.
9383 * configure.ac: Check for fdwalk, pipe2.
9385 2013-04-17 Pedro Alves <palves@redhat.com>
9387 * configure.ac (USE_THREAD_DB): Delete variable.
9388 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9389 Don't AC_SUBST USE_THREAD_DB.
9390 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9391 * config.in, configure: Regenerate.
9393 2013-04-16 Pedro Alves <palves@redhat.com>
9395 * linux-low.h (struct lwp_info) <thread_known>: Move under
9396 the USE_THREAD_DB #ifdef.
9398 2013-04-16 Pedro Alves <palves@redhat.com>
9400 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9401 (linux-low.o): Delete rule.
9402 * linux-low.h: Always include "gdb_thread_db.h" instead of
9403 conditionally including thread_db.h.
9404 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9407 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9409 * Makefile.in (install-only): Fix make install regression.
9411 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9413 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9414 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9416 * gdbserver.1: Remove.
9418 2013-03-22 Pedro Alves <palves@redhat.com>
9420 * linux-low.c (handle_extended_wait): Don't call
9421 linux_enable_event_reporting.
9423 2013-03-15 Tony Theodore <tonyt@logyst.com>
9426 * Makefile.in (SHELL): Use @SHELL@.
9428 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9430 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9433 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9435 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9436 Remove extraneous NULL element.
9438 2013-03-13 Yao Qi <yao@codesourcery.com>
9440 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9441 'V' block in trace frame.
9443 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9445 * target.h (struct target_ops): Add btrace ops.
9446 (target_supports_btrace): New macro.
9447 (target_enable_btrace): New macro.
9448 (target_disable_btrace): New macro.
9449 (target_read_btrace): New macro.
9450 * gdbthread.h (struct thread_info): Add btrace field.
9451 * server.c: Include btrace-common.h.
9452 (handle_btrace_general_set): New function.
9453 (handle_btrace_enable): New function.
9454 (handle_btrace_disable): New function.
9455 (handle_general_set): Call handle_btrace_general_set.
9456 (handle_qxfer_btrace): New function.
9457 (struct qxfer qxfer_packets[]): Add btrace entry.
9458 * inferiors.c (remove_thread): Disable btrace.
9459 * linux-low: Include linux-btrace.h.
9460 (linux_low_enable_btrace): New function.
9461 (linux_low_read_btrace): New function.
9462 (linux_target_ops): Add btrace ops.
9463 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9464 Add srv_linux_btrace=yes.
9465 (x86_64-*-linux*): Add linux-btrace.o.
9466 Add srv_linux_btrace=yes.
9467 * configure.ac: Define HAVE_LINUX_BTRACE.
9468 * config.in: Regenerated.
9469 * configure: Regenerated.
9471 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9473 * server.c (handle_qxfer): Preserve error message if -3 is
9475 (qxfer): Document the -3 return value.
9477 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9479 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9480 (linux_btrace_h): New variable.
9481 (linux-btrace.o): New rule.
9483 2013-03-08 Stan Shebs <stan@codesourcery.com>
9484 Hafiz Abid Qadeer <abidh@codesourcery.com>
9486 * tracepoint.c (trace_buffer_size): New global.
9487 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9488 (init_trace_buffer): Change to one-argument function. Allocate
9489 trace buffer memory.
9490 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9491 handle QTBuffer:size packet.
9492 (cmd_bigqtbuffer_size): New function.
9493 (initialize_tracepoint): Call init_trace_buffer with
9494 DEFAULT_TRACE_BUFFER_SIZE.
9495 * server.c (handle_query): Add QTBuffer:size in the
9498 2013-03-07 Yao Qi <yao@codesourcery.com>
9500 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9501 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9503 (cmd_qtsp): Adjust condition. Do post increment.
9504 Set cur_action and cur_step_action back to 0.
9506 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9509 * linux-low.c (linux_write_memory): Return early success if LEN is
9512 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9514 * configure.srv: Add x86_64-*-cygwin* as target.
9516 2013-02-28 Tom Tromey <tromey@redhat.com>
9518 * configure.ac: Invoke AC_SYS_LARGEFILE.
9519 * configure, config.in: Rebuild.
9521 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9523 * win32-low.c: Throughout, fix format strings and casts of
9524 printf-like functions to avoid type related warnings on all
9526 (get_child_debug_event): Print dwDebugEventCode as hex since
9527 that's how it's usually documented.
9529 2013-02-28 Yao Qi <yao@codesourcery.com>
9531 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9534 2013-02-27 Jiong Wang <jiwang@tilera.com>
9536 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9537 (reg-tilegx32.c): New rule.
9538 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9539 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9540 different register info initializer according to elf class.
9541 (init_registers_tilgx32): New function. The tilegx32 register info
9543 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9544 (tile_store_gregset): Likewise.
9546 2013-02-27 Yao Qi <yao@codesourcery.com>
9548 * server.c (process_point_options): Print debug message when
9549 debug_threads is true.
9551 2013-02-26 Yao Qi <yao@codesourcery.com>
9553 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9555 2013-02-19 Pedro Alves <palves@redhat.com>
9556 Kai Tietz <ktietz@redhat.com>
9560 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9561 instead of strtoul to extract address from packet.
9562 (process_serial_event) <'z'>: Likewise.
9564 2013-02-18 Yao Qi <yao@codesourcery.com>
9566 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9568 2013-02-14 Pedro Alves <palves@redhat.com>
9572 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9573 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9575 2013-02-14 Pedro Alves <palves@redhat.com>
9577 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9579 2013-02-14 Pedro Alves <palves@redhat.com>
9581 * tracepoint.c (save_string): Delete.
9582 (add_tracepoint_action): Use savestring instead of save_string.
9584 2013-02-12 Pedro Alves <palves@redhat.com>
9586 * linux-xtensa-low.c: Ditto.
9587 * xtensa-xtregs.c: Ditto.
9589 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9591 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9594 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9596 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9597 aarch64_num_wp_regs and aarch64_num_bp_regs to
9598 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9600 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9602 * linux-aarch64-low.c (ps_get_thread_area): Replace
9603 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9605 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9606 Marcus Shawcroft <marcus.shawcroft@arm.com>
9607 Nigel Stephens <nigel.stephens@arm.com>
9608 Yufeng Zhang <yufeng.zhang@arm.com>
9610 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9611 (aarch64.c, aarch64-without-fpu.c): New targets.
9612 * configure.srv (aarch64*-*-linux*): New.
9613 * linux-aarch64-low.c: New file.
9615 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9617 * linux-low.c (handle_extended_wait, linux_create_inferior)
9618 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9619 (dequeue_one_deferred_signal, linux_resume_one_thread)
9620 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9621 (linux_tracefork_grandchild, linux_test_for_tracefork)
9622 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9623 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9624 where the argument is 0.
9626 2013-01-25 Yao Qi <yao@codesourcery.com>
9628 * event-loop.c: Include "queue.h".
9629 (gdb_event_p): New typedef.
9630 (struct gdb_event) <next_event>: Remove.
9631 (event_queue): Change to QUEUE(gdb_event_p).
9632 (async_queue_event): Remove.
9633 (gdb_event_xfree): New.
9634 (initialize_event_loop): New.
9635 (process_event): Use API from QUEUE.
9636 (wait_for_event): Likewise.
9637 * server.c (main): Call initialize_event_loop.
9638 * server.h (initialize_event_loop): Declare.
9640 2013-01-18 Yao Qi <yao@codesourcery.com>
9642 * ax.h (struct eval_agent_expr_context): New.
9643 (gdb_eval_agent_expr): Update declaration.
9644 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9645 TFRAME. Add new argument CTX.
9646 * server.h (struct eval_agent_expr_context): Declare.
9647 (agent_mem_read, agent_tsv_read): Update declaration.
9648 (agent_mem_read_string): Likewise.
9649 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9650 (add_traceframe_block): Add new argument TPOINT.
9651 Increase TPOINT->traceframe_usage.
9652 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9653 eval_tracepoint_agent_expr.
9654 (condition_true_at_tracepoint): Likewise.
9655 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9656 (agent_mem_read_string, agent_tsv_read): Likewise.
9658 2013-01-16 Yao Qi <yao@codesourcery.com>
9660 * linux-low.c (linux_resume_one_lwp): Don't check
9661 'lwp->bp_reinsert != 0'.
9663 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9664 Pedro Alves <palves@redhat.com>
9666 * lynx-low.c (ptrace_request_to_str): Define a temporary
9667 macro and use it to simplify this function's implementation.
9669 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9671 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9674 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9676 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9678 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9680 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9682 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9684 * lynx-low.c (lynx_resume): Use the resume_info parameter
9685 to determine the ptid for the lynx_ptrace call, unless
9686 it is equal to minus_one_ptid, in which case we use the
9687 ptid of the current_inferior.
9688 (lynx_wait_1): After having received a thread create/exit
9689 event, resume the inferior's execution using the signaling
9690 thread's ptid, rather than the old ptid.
9692 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9694 * lynx-low.c (lynx_resume): Delete variable ret.
9696 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9698 * gdbreplay.c (gdbreplay_version): Update copyright year.
9699 * server.c (gdbserver_version): Likewise.
9701 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9703 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9706 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9708 * lynx-low.c (ptrace_request_to_str): Add handling for
9711 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9713 * lynx-low.c (lynx_attach): Delete variable new_process.
9715 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9717 * lynx-low.c (lynx_create_inferior): Delete variable
9720 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9722 * lynx-low.c (ptrace_request_to_str): Do not handle
9723 PTRACE_GETTHREADLIST if this macro does not exist.
9725 2012-12-15 Yao Qi <yao@codesourcery.com>
9727 * Makefile.in (OBS): Add notif.o.
9728 * notif.c, notif.h: New.
9729 * server.c: Include "notif.h".
9730 (struct vstop_notif) <next>: Remove.
9732 (queue_stop_reply): Update.
9733 (push_event, send_next_stop_reply): Remove.
9734 (discard_queued_stop_replies): Update.
9735 (notif_stop): New variable.
9736 (handle_v_stopped): Remove.
9737 (handle_v_requests): Don't call handle_v_stopped. Call
9738 handle_ack_notif instead.
9739 (queue_stop_reply_callback): Call notif_event_enque instead
9740 of queue_stop_reply.
9741 (handle_status): Don't call send_next_stop_reply, call
9742 notif_write_event instead.
9743 (kill_inferior_callback): Likewise.
9744 (detach_or_kill_inferior_callback): Likewise.
9745 (main): Call initialize_notif.
9746 (process_serial_event): Call QUEUE_is_empty.
9747 (handle_target_event): Call notif_push instead of push event.
9748 * server.h (push_event): Remove declaration.
9750 2012-12-10 Tom Tromey <tromey@redhat.com>
9752 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9753 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9756 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9757 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9758 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9759 (amd64-linux-ipa.o, ax.o): Rewrite.
9760 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9761 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9762 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9763 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9764 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9765 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9766 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9767 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9768 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9769 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9770 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9771 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9772 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9773 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9774 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9775 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9776 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9777 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9778 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9779 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9780 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9781 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9782 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9783 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9784 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9785 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9786 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9787 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9788 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9789 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9790 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9791 (reg-tilegx.o): Remove.
9792 (all_object_files): New macro.
9793 Include .deps files.
9794 * aclocal.m4, configure: Rebuild.
9795 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9796 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9797 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9799 2012-12-05 Tom Tromey <tromey@redhat.com>
9802 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9804 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9806 * configure.ac: Check for linux/perf_event.h.
9807 * config.in: Regenerated.
9808 * configure: Regenerated.
9810 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9812 * hostio.c (handle_readlink): Decrease buffer size
9813 parameter passed to readlink by one byte.
9815 2012-11-26 Yao Qi <yao@codesourcery.com>
9817 * configure.ac (build_warnings): Append '-Wempty-body'.
9818 * configure: Regenerated.
9819 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9822 2012-11-15 Pierre Muller <muller@sourceware.org>
9824 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9825 * config.in: Regenerate.
9826 * configure: Regenerate.
9827 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9828 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9829 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9830 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9832 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9833 instead of <sys/wait.h> header.
9834 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9836 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9838 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9839 (various make rules): Remove -DGDBSERVER
9841 2012-11-09 Yao Qi <yao@codesourcery.com>
9843 * spu-low.c (current_ptid): Move it to ..
9844 * gdbthread.h: ... here. New.
9845 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9846 * server.c (myresume, process_serial_event): Likewise.
9847 * thread-db.c (thread_db_find_new_threads): Likewise.
9848 * tracepoint.c (run_inferior_command): Likewise.
9850 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9852 * server.c (handle_search_memory_1): Include access length in
9855 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9857 * linux-crisv32-low.c: Fix compile errors.
9859 2012-09-04 Yao Qi <yao@codesourcery.com>
9861 * tracepoint.c (cmd_qtsv): Adjust debug message.
9862 Don't check CUR_TPOINT.
9864 2012-08-28 Yao Qi <yao@codesourcery.com>
9866 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9867 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9868 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9869 Remove declarations of xmalloc, xreallloc, xstrdup and
9871 * Makefile.in (libiberty_h): New.
9872 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9873 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9875 2012-08-23 Yao Qi <yao@codesourcery.com>
9877 * server.h: Remove declaration of 'xsnprintf'.
9879 2012-08-22 Keith Seitz <keiths@redhat.com>
9881 * server.h: Include build-gnulib-gbserver/config.h.
9882 * gdbreplay.c: Likewise.
9884 2012-08-08 Doug Evans <dje@google.com>
9886 * Makefile.in (SFILES): Add gdb_vecs.c.
9887 (OBS): Add gdb_vecs.o.
9888 (gdb_vecs_h, host_defs_h): New variables.
9889 (thread-db.o): Add $(gdb_vecs_h) dependency.
9890 (gdb_vecs.o): New rule.
9891 * thread-db.c: #include "gdb_vecs.h".
9892 (thread_db_load_search): Use a vector to iterate over path elements.
9893 Handle text appearing after "$pdir".
9895 * configure.ac: Add check for strstr.
9896 * config.in: Regenerate.
9897 * configure: Regenerate.
9899 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9901 * hostio.c (handle_pread): If pread fails, fall back to attempting
9903 (handle_pwrite): Likewise for pwrite.
9905 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9907 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9908 between unsupported TYPE and unimplementable ADDR/LEN combination.
9909 (arm_insert_point): Act on new return value.
9911 2012-07-31 Pedro Alves <palves@redhat.com>
9913 * server.c (process_point_options): Only skip tokens if we find
9914 one that is unrecognized. Don't treat 'X' specially while
9915 skipping unrecognized tokens.
9917 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9919 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9920 to 4-byte-align HW breakpoint addresses for Thumb.
9922 2012-07-27 Yao Qi <yao@codesourcery.com>
9926 * server.h: Declare gdb_agent_about_to_close.
9927 * target.c (kill_inferior): Include "agent.h".
9928 New. Send command 'kill'.
9929 * target.h (kill_inferior): Removed macro.
9930 * tracepoint.c (gdb_agent_about_to_close): New.
9931 (gdb_agent_helper_thread): Handle command 'close'.
9932 Wait endlessly until the inferior stops.
9933 Install gdb_agent_remove_socket to atexit hook.
9934 (agent_socket_name): New static variable.
9935 (gdb_agent_socket_init): Replace local variable 'name' with
9936 'agent_socket_name'.
9937 (gdb_agent_remove_socket): New.
9939 2012-07-27 Yao Qi <yao@codesourcery.com>
9941 * server.c (process_point_options): Stop at 'X' when parsing.
9943 2012-07-19 Michael Eager <eager@eagercon.com>
9945 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9947 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9948 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9949 hardware breakpoint.
9951 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9953 * gdbserver/linux-low.c (initialize_low): Call
9954 linux_ptrace_init_warnings.
9956 2012-07-02 Doug Evans <dje@google.com>
9958 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9961 2012-07-02 Stan Shebs <stan@codesourcery.com>
9963 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9964 (ax.o): Add it to build rule.
9966 (OBS): Add format.o.
9967 (IPA_OBS): Add format.o.
9968 * server.c (handle_query): Claim support for breakpoint commands.
9969 (process_point_options): Add command case.
9970 (process_serial_event): Leave running if there are printfs in
9972 * mem-break.h (any_persistent_commands): Declare.
9973 (add_breakpoint_commands): Declare.
9974 (gdb_no_commands_at_breakpoint): Declare.
9975 (run_breakpoint_commands): Declare.
9976 * mem-break.c (struct point_command_list): New struct.
9977 (struct breakpoint): New field command_list.
9978 (any_persistent_commands): New function.
9979 (add_commands_to_breakpoint): New function.
9980 (add_breakpoint_commands): New function.
9981 (gdb_no_commands_at_breakpoint): New function.
9982 (run_breakpoint_commands): New function.
9983 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9985 * ax.c: Include format.h.
9986 (ax_printf): New function.
9987 (gdb_eval_agent_expr): Add printf opcode.
9989 2012-06-13 Yao Qi <yao@codesourcery.com>
9991 * server.c (start_inferior): Remove duplicated writes to fields
9992 'last_resume_kind' and 'last_status' of 'current_inferior'.
9994 2012-06-12 Yao Qi <yao@codesourcery.com>
9995 Pedro Alves <palves@redhat.com>
9997 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9999 * server.c (handle_v_cont): Extend comment.
10001 2012-06-11 Yao Qi <yao@codesourcery.com>
10003 * linux-low.c (linux_attach): Add 'static'.
10005 2012-06-06 Yao Qi <yao@codesourcery.com>
10007 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10009 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10011 Fix gcc -flto compilation warning.
10012 * server.c (main): Make variable multi_mode and attach volatile.
10014 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10016 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10017 if the platform doesn't know about it.
10019 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10021 * Makefile.in (SFILES): Add linux-tile-low.c.
10022 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10023 * configure.srv: Handle tilegx-*-linux*.
10024 * linux-tile-low.c: New file.
10026 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10028 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10030 2012-05-24 Pedro Alves <palves@redhat.com>
10034 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10036 2012-05-24 Pedro Alves <palves@redhat.com>
10040 Replace target_signal with gdb_signal throughout.
10042 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10044 * linux-low.c (linux_store_registers): Avoid the copying sequence
10045 when no data has been retrieved by ptrace.
10047 2012-05-22 Will Deacon <will.deacon@arm.com>
10049 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10050 Include asm/ptrace.h.
10051 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10054 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10056 * linux-low.c (linux_store_registers): Don't re-retrieve data
10057 with ptrace that has already been obtained from /proc. Always
10058 copy any data retrieved with ptrace to the buffer supplied.
10060 2012-05-11 Yao Qi <yao@codesourcery.com>
10061 Pedro Alves <palves@redhat.com>
10063 * linux-low.c (enum stopping_threads_kind): New.
10064 (stopping_threads): Change type to `enum stopping_threads_kind'.
10065 (handle_extended_wait): If stopping and suspending threads, leave
10066 the new_lwp suspended too.
10067 (linux_wait_for_event): Adjust.
10068 (stop_all_lwps): Set `stopping_threads' to
10069 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10070 whether we're suspending threads or just stopping them. Assert no
10073 2012-04-29 Yao Qi <yao@codesourcery.com>
10075 * server.h: Move some code to ...
10076 * gdbthread.h: ... here. New.
10077 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10078 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10079 (nto-low.o, win32-low.o): Likewise.
10080 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10081 * regcache.c, remote-utils.c, server.c: Likewise.
10082 * target.c, tracepoint.c, win32-low.c: Likewise.
10084 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10086 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10087 (PTRACE_ARG4_TYPE): Likewise.
10088 (PTRACE_XFER_TYPE): Likewise.
10089 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10090 ptrace to PTRACE_ARG3_TYPE.
10091 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10092 (PTRACE_ARG4_TYPE): Likewise.
10093 (PTRACE_XFER_TYPE): Likewise.
10094 (linux_detach_one_lwp): Cast fourth argument of
10095 ptrace to long then PTRACE_ARG4_TYPE.
10096 (regsets_fetch_inferior_registers): Cast third argument of
10097 ptrace to long then PTRACE_ARG3_TYPE.
10098 (regsets_store_inferior_registers): Likewise.
10100 2012-04-20 Pedro Alves <palves@redhat.com>
10102 * configure: Regenerate.
10104 2012-04-19 Pedro Alves <palves@redhat.com>
10106 * Makefile.in (GNULIB_BUILDDIR): New.
10107 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10108 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10109 (all, install-only, uninstall, clean-info, all-lib, clean): No
10110 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10111 (maintainer-clean realclean distclean): Use subdir_do.
10113 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10114 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10115 * acinclude.m4: Include acx_configure_dir.m4.
10116 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10117 calls. Call AC_PROG_RANLIB. Configure gnulib using
10120 (GNULIB_STDINT_H): Adjust.
10121 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10122 * gdbreplay.c: Include build-gnulib/config.h.
10123 * server.h: Likewise.
10124 * aclocal.m4: Regenerate.
10125 * config.in: Regenerate.
10126 * configure: Regenerate.
10128 2012-04-19 Pedro Alves <palves@redhat.com>
10130 * Makefile.in (LIBGNU, INCGNU): Adjust.
10131 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10132 (all, install-only, uninstall, clean-info, all-lib, clean)
10133 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10134 * configure.ac: Adjust AC_OUTPUT output.
10135 * aclocal.m4: Regenerate.
10136 * configure: Regenerate.
10138 2012-04-19 Pedro Alves <palves@redhat.com>
10140 * Makefile.in (generated_files): New.
10141 (server_h): Remove the explicit dependency on config.h, and depend
10142 on $generated_files.
10144 2012-04-19 Pedro Alves <palves@redhat.com>
10146 * Makefile.in (INCGNU): Add -Ignulib.
10148 2012-04-19 Pedro Alves <palves@redhat.com>
10150 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10151 (INCGNU): ... this, and spell out -I here.
10152 (GNULIB_LIB): Rename to ...
10153 (LIBGNU): ... this.
10154 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10156 2012-04-19 Pedro Alves <palves@redhat.com>
10158 * config.in: Regenerate.
10160 2012-04-19 Pedro Alves <palves@redhat.com>
10162 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10163 * server.h (memmem): Remove declaration.
10164 * config.in: Regenerate.
10165 * configure: Regenerate.
10167 2012-04-19 Yao Qi <yao@codesourcery.com>
10169 * Makefile.in (SFILES): Add common/vec.c.
10173 2012-04-19 Yao Qi <yao@codesourcery.com>
10175 * remote-utils.c (prepare_resume_reply): Replace with macro
10176 target_core_of_thread.
10177 * server.c (handle_qxfer_threads_proper): Likewise.
10178 * target.h (traget_core_of_thread): New macro.
10180 2012-04-18 Pedro Alves <palves@redhat.com>
10182 * aclocal.m4: Regenerate.
10183 * configure: Regenerate.
10185 2012-04-16 Yao Qi <yao@codesourcery.com>
10187 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10188 duplicated on address.
10190 2012-04-16 Yao Qi <yao@codesourcery.com>
10192 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10193 (struct tracepoint_action_ops) <send>: New field.
10194 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10195 (agent_expr_send, x_tracepoint_action_send): New.
10196 (l_tracepoint_action_send): New.
10197 (cmd_qtdp): Download and install tracepoint
10198 according to `use_agent'.
10199 (run_inferior_command): Add one more parameter `len'.
10201 (tracepoint_send_agent): New.
10202 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10204 2012-04-16 Yao Qi <yao@codesourcery.com>
10206 * tracepoint.c (download_tracepoints): Moved to ...
10207 (cmd_qtstart): ... here.
10209 2012-04-14 Yao Qi <yao@codesourcery.com>
10211 * tracepoint.c: Include inttypes.h.
10212 (struct collect_memory_action): Use sized types.
10213 (struct tracepoint): Likewise.
10214 (cmd_qtdp, stop_tracing): Update print specifiers.
10215 (cmd_qtp, response_tracepoint): Likewise.
10216 (collect_data_at_tracepoint): Likewise.
10217 (collect_data_at_step): Likewise.
10219 2012-04-14 Yao Qi <yao@codesourcery.com>
10221 Import gnulib module inttypes.
10222 * aclocal.m4, config.in, configure: Regenerated.
10224 2012-04-14 Yao Qi <yao@codesourcery.com>
10226 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10227 Makefile and config.status at last.
10229 2012-04-13 Yao Qi <yao@codesourcery.com>
10231 * tracepoint.c: Include stdint.h unconditionally.
10233 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10235 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10236 on BFD_HAVE_SYS_PROCFS_TYPE.
10237 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10238 * configure: Regenerate.
10239 * config.in: Likewise.
10241 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10243 * Makefile.in (clean): Also remove x32.c x32-linux.c
10244 x32-avx.c x32-avx-linux.c.
10245 (x32.o): New target.
10247 (x32-linux.o): Likewise.
10248 (x32-linux.c): Likewise.
10249 (x32-avx.o): Likewise.
10250 (x32-avx.c): Likewise.
10251 (x32-avx-linux.o): Likewise.
10252 (x32-avx-linux.c): Likewise.
10254 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10255 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10256 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10257 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10258 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10259 i386/x32-avx-linux.xml.
10261 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10262 (init_registers_x32_avx_linux): Likwise.
10263 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10264 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10266 2012-04-13 Pedro Alves <palves@redhat.com>
10268 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10269 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10270 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10271 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10274 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10276 * linux-x86-low.c (compat_x32_clock_t): New.
10277 (compat_x32_siginfo_t): Likewise.
10278 (compat_x32_siginfo_from_siginfo): Likewise.
10279 (siginfo_from_compat_x32_siginfo): Likewise.
10280 (linux_is_elf64): Likewise.
10281 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10282 and siginfo_from_compat_x32_siginfo for x32.
10283 (x86_arch_setup): Set linux_is_elf64.
10285 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10288 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10290 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10291 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10292 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10293 compatible with process.
10295 2012-04-12 Yao Qi <yao@codesourcery.com>
10297 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10298 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10299 (install-only, install-info, clean): Handle sub dir gnulib.
10300 (all-lib, am--refresh): New targets.
10301 (memmem.o): Remove target.
10302 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10303 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10304 (AC_REPLACE_FUNCS): Remove memmem.
10305 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10306 (AC_OUTPUT): Generate Makefile in gnulib/.
10307 * aclocal.m4, config.in, configure: Regenerated.
10309 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10311 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10313 2012-04-05 Pedro Alves <palves@redhat.com>
10315 -Werror=strict-aliasing
10317 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10320 2012-04-04 Pedro Alves <palves@redhat.com>
10322 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10323 (sparc_store_gregset_from_stack, sparc_store_gregset)
10324 (sparc_breakpoint_at): Fix formatting.
10326 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10328 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10330 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10331 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10332 * config.in: Regenerate.
10333 * configure: Likewise.
10335 2012-03-29 Pedro Alves <palves@redhat.com>
10337 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10338 Correct ptrace arguments.
10340 2012-03-28 Pedro Alves <palves@redhat.com>
10342 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10343 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10344 (IA64_FR1_REGNUM): New defines.
10345 (ia64_fetch_register): New.
10346 (the_low_target): Install it.
10347 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10349 * linux-low.c (linux_fetch_registers): Try the
10350 the_low_target.fetch_register hook first.
10352 * linux-arm-low.c (the_low_target): Adjust.
10353 * linux-bfin-low.c (the_low_target): Adjust.
10354 * linux-cris-low.c (the_low_target): Adjust.
10355 * linux-crisv32-low.c (the_low_target): Adjust.
10356 * linux-m32r-low.c (the_low_target): Adjust.
10357 * linux-m68k-low.c (the_low_target): Adjust.
10358 * linux-mips-low.c (the_low_target): Adjust.
10359 * linux-ppc-low.c (the_low_target): Adjust.
10360 * linux-s390-low.c (the_low_target): Adjust.
10361 * linux-sh-low.c (the_low_target): Adjust.
10362 * linux-sparc-low.c (the_low_target): Adjust.
10363 * linux-tic6x-low.c (the_low_target): Adjust.
10364 * linux-x86-low.c (the_low_target): Adjust.
10365 * linux-xtensa-low.c (the_low_target): Adjust.
10367 2012-03-26 Pedro Alves <palves@redhat.com>
10369 * server.c (handle_qxfer_libraries): Don't bail early if
10370 the_target->qxfer_libraries_svr4 is not NULL.
10372 2012-03-26 Pedro Alves <palves@redhat.com>
10374 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10376 2012-03-23 Pedro Alves <palves@redhat.com>
10378 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10379 "library-list-svr4" element's start tag when the the DSO list is
10382 2012-03-23 Pedro Alves <palves@redhat.com>
10384 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10385 a variable whose type size is the same as the inferior's pointer
10388 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10390 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10392 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10393 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10394 * linux-low.h: Include <signal.h>.
10395 (struct siginfo): Remove forward declaration.
10396 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10399 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10401 * .gitignore: Ignore more files.
10403 2012-03-19 Pedro Alves <palves@redhat.com>
10404 Jan Kratochvil <jan.kratochvil@redhat.com>
10406 * server.c (cont_thread, general_thread): Add describing comments.
10407 (start_inferior): Clear `cont_thread'.
10408 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10411 2012-03-15 Yao Qi <yao@codesourcery.com>
10413 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10415 (cmd_qtdp): ... here.
10417 2012-03-15 Yao Qi <yao@codesourcery.com>
10419 * tracepoint.c (struct tracepoint_action_ops): New.
10420 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10421 (m_tracepoint_action_download): New.
10422 (r_tracepoint_action_download): New.
10423 (x_tracepoint_action_download): New.
10424 (l_tracepoint_action_download): New.
10425 (add_tracepoint_action): Install `action->ops' according type.
10426 (download_tracepoint_1): Move code `download' function pointer
10427 of various tracepoint_action_ops.
10429 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10431 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10432 linux_ptrace_attach_warnings.
10434 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10436 * Makefile.in (linux-ptrace.o): New.
10437 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10438 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10439 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10440 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10441 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10443 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10445 2012-03-08 Yao Qi <yao@codesourcery.com>
10446 Pedro Alves <palves@redhat.com>
10448 Fix PR server/13392.
10449 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10450 offset of JMP insn.
10451 * tracepoint.c (remove_tracepoint): New.
10452 (cmd_qtdp): Call remove_tracepoint when failed to install.
10454 2012-03-07 Pedro Alves <palves@redhat.com>
10456 * linux-low.c (get_detach_signal): New.
10457 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10458 Pass on pending signals to PTRACE_DETACH. Check the result of the
10460 * server.c (program_signals, program_signals_p): New.
10461 (handle_general_set): Handle QProgramSignals.
10462 * server.h (program_signals, program_signals_p): Declare.
10464 2012-03-05 Pedro Alves <palves@redhat.com>
10465 Jan Kratochvil <jan.kratochvil@redhat.com>
10467 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10470 2012-03-03 Yao Qi <yao@codesourcery.com>
10472 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10473 agent_look_up_symbols.
10475 2012-03-03 Yao Qi <yao@codesourcery.com>
10477 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10478 (linux-x86-low.o): Likewise.
10479 * server.h: Remove in_process_agent_loaded.
10480 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10484 2012-03-03 Yao Qi <yao@codesourcery.com>
10486 * tracepoint.c (gdb_agent_capability): New global.
10487 (in_process_agent_loaded_ust): Renamed to
10488 `in_process_agent_supports_ust'.
10490 (in_process_agent_supports_ust): Call agent_capability_check.
10491 (clear_installed_tracepoints): Assert that agent supports
10494 2012-03-03 Yao Qi <yao@codesourcery.com>
10496 * linux-low.c (linux_supports_agent): New.
10497 (linux_target_ops): Initialize field `supports_agent' with
10498 linux_supports_agent.
10499 * target.h (struct target_ops) <supports_agent>: New.
10500 (target_supports_agent): New macro.
10501 * server.c (handle_general_set): Handle packet 'QAgent'.
10502 (handle_query): Send `QAgent+'.
10503 * Makefile.in (server.o): Depends on agent.h.
10505 2012-03-03 Yao Qi <yao@codesourcery.com>
10507 * Makefile.in (OBS): Add agent.o.
10508 Add new rule for agent.o.
10509 Track dependence of tracepoint.c on agent.h.
10510 * tracepoint.c (run_inferior_command_1):
10511 (run_inferior_command): Call agent_run_command.
10512 (gdb_ust_connect_sync_socket): Deleted. Move it to
10514 (resume_thread, stop_thread): Likewise.
10515 (gdb_ust_socket_init): Renamed to ...
10516 (gdb_agent_socket_init): ... New.
10517 (gdb_ust_thread): Renamed to ...
10518 (gdb_agent_helper_thread): ... New.
10519 (gdb_ust_init): Move some code to ...
10520 (gdb_agent_init): ... here. New.
10521 [HAVE_UST]: Call gdb_ust_init.
10522 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10523 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10524 * config.in, configure: Regenerated.
10526 2012-03-02 Pedro Alves <palves@redhat.com>
10528 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10529 * linux-low.c (struct simple_pid_list): New.
10530 (stopped_pids): New a struct simple_pid_list pointer.
10531 (add_to_pid_list, pull_pid_from_list): New.
10532 (handle_extended_wait): Don't assume the first signal new children
10533 report is SIGSTOP. Adjust call to pull_pid_from_list.
10534 (linux_wait_for_lwp): Adjust.
10536 2012-03-02 Yao Qi <yao@codesourcery.com>
10538 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10541 2012-03-02 Yao Qi <yao@codesourcery.com>
10543 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10544 `stop_pc' and `tpoint'. Update caller.
10546 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10548 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10549 * linux-low.c (use_linux_regsets): New macro.
10550 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10551 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10552 (linux_register_in_regsets): New function.
10553 (usr_fetch_inferior_registers): Skip registers covered by
10555 (usr_store_inferior_registers): Likewise.
10556 (usr_fetch_inferior_registers): New macro.
10557 (usr_store_inferior_registers): Likewise.
10558 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10559 (linux_store_registers): Likewise.
10560 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10562 (init_registers_mips64_dsp_linux): Likewise.
10563 (init_registers_mips_linux): New macro.
10564 (init_registers_mips_dsp_linux): Likewise.
10565 (mips_dsp_num_regs): Likewise.
10566 (DSP_BASE, DSP_CONTROL): New fallback macros.
10567 (mips_base_regs): New macro.
10568 (mips_regmap): Use it. Fix the size.
10569 (mips_dsp_regmap): New variable.
10570 (mips_dsp_regset_bitmap): Likewise.
10571 (mips_arch_setup): New function.
10572 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10574 (mips_cannot_store_register): Likewise.
10575 (the_low_target): Update .arch_setup, .num_regs and .regmap
10576 initializers. Add .regset_bitmap initializer.
10577 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10579 * linux-bfin-low.c (the_low_target): Likewise.
10580 * linux-cris-low.c (the_low_target): Likewise.
10581 * linux-crisv32-low.c (the_low_target): Likewise.
10582 * linux-ia64-low.c (the_low_target): Likewise.
10583 * linux-m32r-low.c (the_low_target): Likewise.
10584 * linux-m68k-low.c (the_low_target): Likewise.
10585 * linux-ppc-low.c (the_low_target): Likewise.
10586 * linux-s390-low.c (the_low_target): Likewise.
10587 * linux-sh-low.c (the_low_target): Likewise.
10588 * linux-sparc-low.c (the_low_target): Likewise.
10589 * linux-tic6x-low.c (the_low_target): Likewise.
10590 * linux-x86-low.c (the_low_target): Likewise.
10591 * linux-xtensa-low.c (the_low_target): Likewise.
10592 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10593 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10594 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10596 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10597 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10599 2012-02-29 Yao Qi <yao@codesourcery.com>
10600 Pedro Alves <palves@redhat.com>
10602 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10603 `step_over_finished' is true.
10605 2012-02-27 Pedro Alves <palves@redhat.com>
10607 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10608 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10610 2012-02-27 Pedro Alves <palves@redhat.com>
10613 * linux-low.c (pid_is_stopped): New.
10614 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10616 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10618 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10621 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10623 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10625 2012-02-24 Luis Machado <lgustavo@codesourcery>
10627 * server.c (handle_query): Advertise support for target-side
10628 breakpoint condition evaluation.
10629 (process_point_options): New function.
10630 (process_serial_event): When inserting a breakpoint, check for
10631 a target-side condition that should be evaluated.
10633 * mem-break.c: Include regcache.h and ax.h.
10634 (point_cond_list_t): New data structure.
10635 (breakpoint) <cond_list>: New field.
10636 (find_gdb_breakpoint_at): Make non-static.
10637 (delete_gdb_breakpoint_at): Clear any target-side
10639 (clear_gdb_breakpoint_conditions): New function.
10640 (add_condition_to_breakpoint): Likewise.
10641 (add_breakpoint_condition): Likewise.
10642 (gdb_condition_true_at_breakpoint): Likewise.
10643 (gdb_breakpoint_here): Return result directly instead
10644 of going through a local variable.
10646 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10647 (clear_gdb_breakpoint_conditions): Likewise.
10648 (add_breakpoint_condition): Likewise.
10649 (gdb_condition_true_at_breakpoint): Likewise.
10651 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10652 (need_step_over_p): Take target-side breakpoint condition into
10655 2012-02-24 Luis Machado <lgustavo@codesourcery>
10657 * server.h: Include tracepoint.h.
10658 (agent_mem_read, agent_get_trace_state_variable_value,
10659 agent_set_trace_state_variable_value,
10660 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10661 get_set_tsv_func_addr): New prototypes.
10663 * ax.h: New include file.
10664 * ax.c: New source file.
10666 * tracepoint.c: Include ax.h.
10667 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10668 agent_expr, eval_result_type): Move to ax.h.
10669 (parse_agent_expr): Rename to ...
10670 (gdb_parse_agent_expr): ... this, make it non-static and move
10672 (unparse_agent_expr) Rename to ...
10673 (gdb_unparse_agent_expr): ... this, make it non-static and move
10675 (eval_agent_expr): Rename to ...
10676 (eval_tracepoint_agent_expr): ... this.
10677 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10678 forward declarations.
10679 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10680 (agent_get_trace_state_variable_value): New function.
10681 (agent_set_trace_state_variable_value): New function.
10682 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10683 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10684 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10685 (condition_true_at_tracepoint): Likewise.
10686 (parse_agent_expr): Rename to ...
10687 (gdb_parse_agent_expr): ... this and move to ax.c.
10688 (unparse_agent_expr): Rename to ...
10689 (gdb_unparse_agent_expr): ... this and move to ax.c.
10690 (gdb_agent_op_name): Move to ax.c.
10691 (eval_agent_expr): Rename to ...
10692 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10694 (eval_tracepoint_agent_expr): New function.
10695 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10697 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10699 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10700 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10701 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10702 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10703 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10704 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10705 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10706 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10707 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10708 (compile_bytecodes): Remove forward declaration.
10709 (is_goto_target): Move to ax.c.
10710 (compile_bytecodes): Move to ax.c and call
10711 agent_get_trace_state_variable_value (...) and
10712 agent_set_trace_state_variable_value (...).
10714 * Makefile.in: Update ax.c and IPA dependencies.
10716 2012-02-24 Pedro Alves <palves@redhat.com>
10718 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10719 (cmd_bigqtbuffer_circular): ... this. Only handle
10720 'QTBuffer:circular:'.
10721 (handle_tracepoint_general_set): Adjust.
10723 2012-02-16 Yao Qi <yao@codesourcery.com>
10725 * inferiors.c: Move code to ...
10726 * dll.c: .... here. New.
10727 * server.h: Declare clear_dlls.
10728 * Makefile.in (SFILES): Add dll.c.
10732 2012-02-11 Yao Qi <yao@codesourcery.com>
10734 * server.c: (handle_monitor_command): Add a new parameter
10736 (handle_query): Update caller.
10738 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10740 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10741 * configure, config.in: Regenerate.
10742 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10745 2012-02-02 Pedro Alves <palves@redhat.com>
10747 Try SIGKILL first, then PTRACE_KILL.
10748 * linux-low.c (linux_kill_one_lwp): New.
10749 (linux_kill_one_lwp): Rename to ...
10750 (kill_one_lwp_callback): ... this. Use the new
10751 linux_kill_one_lwp.
10753 2012-02-02 Pedro Alves <palves@redhat.com>
10755 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10758 2012-01-27 Pedro Alves <palves@redhat.com>
10760 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10761 (elf_64_file_p): Make static.
10762 (linux_pid_exe_is_elf_64_file): New.
10763 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10764 Delete declarations.
10765 (linux_pid_exe_is_elf_64_file): Declare.
10766 * linux-x86-low.c (x86_arch_setup): Use
10767 linux_pid_exe_is_elf_64_file.
10769 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10771 * linux-low.c (linux_wait_for_event_1): Rename to ...
10772 (linux_wait_for_event): ... here and merge it with former
10773 linux_wait_for_event - new variable wait_ptid, use it.
10774 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10776 2012-01-23 Pedro Alves <palves@redhat.com>
10778 * server.c (main): Avoid yet another case of infinite loop while
10779 detaching/killing after a longjmp.
10781 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10784 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10786 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10788 * hostio.c (handle_readlink): New function.
10789 (handle_vFile): Call it to handle "vFile:readlink" packets.
10791 2012-01-20 Pedro Alves <palves@redhat.com>
10792 Ulrich Weigand <ulrich.weigand@linaro.org>
10794 * server.c (handle_v_requests): Only support vAttach and vRun to
10795 start multiple processes when in extended protocol mode.
10797 2012-01-17 Pedro Alves <palves@redhat.com>
10799 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10800 memalign plus mprotect to allocate the scratch buffer.
10802 2012-01-13 Pedro Alves <palves@redhat.com>
10804 * server.c (attach_inferior): Clear `cont_thread'.
10806 2012-01-13 Pedro Alves <palves@redhat.com>
10808 * server.c (main): Avoid infinite loop while detaching/killing
10811 2012-01-09 Doug Evans <dje@google.com>
10813 * server.c (start_inferior): Set last_ptid in --wrapper case.
10815 2012-01-06 Yao Qi <yao@codesourcery.com>
10817 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10819 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10821 2012-01-04 Yao Qi <yao@codesourcery.com>
10823 * tracepoint.c (cmd_qtdp): Print debug message
10824 for static tracepoint.
10826 2012-01-04 Yao Qi <yao@codesourcery.com>
10828 * tracepoint.c (trace_vdebug): Differentiate debug message
10829 between gdbserver and IPA.
10831 2012-01-03 Yao Qi <yao@codesourcery.com>
10833 * tracepoint.c (tracepoint_was_hit): Don't collect for
10836 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10838 * terminal.h: Reformat copyright header.
10840 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10842 * server.c (gdbserver_version): Update copyright year.
10843 * gdbreplay.c (gdbreplay_version): Likewise.
10845 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10847 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10850 2011-12-18 Hui Zhu <teawater@gmail.com>
10851 * linux-low.c (linux_create_inferior): Save return value to ret.
10853 2011-12-18 Hui Zhu <teawater@gmail.com>
10855 * linux-low.c (linux_create_inferior): Save return value to ret.
10857 2011-12-16 Doug Evans <dje@google.com>
10859 * linux-low.c (linux_create_inferior): If stdio connection,
10860 redirect stdin from /dev/null, stdout to stderr.
10861 * remote-utils.c (remote_is_stdio): New static global.
10862 (remote_connection_is_stdio): New function.
10863 (remote_prepare): Handle stdio connection.
10864 (remote_open): Ditto.
10865 (remote_close): Don't close stdin for stdio connections.
10866 (read_prim,write_prim): New functions. Replace all calls to
10867 read/write to these.
10868 * server.c (main): Watch for "-" argument. Move call to
10869 remote_prepare before start_inferior.
10870 * server.h (STDIO_CONNECTION_NAME): New macro.
10871 (remote_connection_is_stdio): Declare.
10873 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10874 in debugging output.
10876 2011-12-15 Yao Qi <yao@codesourcery.com>
10878 * tracepoint.c: Include sys/syscall.h.
10879 (gdb_ust_thread): Remove preprocessor conditional.
10881 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10883 * linux-low.c (linux_detach_one_lwp): Call
10884 the_low_target.prepare_to_resume before detaching.
10886 2011-12-14 Yao Qi <yao@codesourcery.com>
10888 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10891 2011-12-14 Yao Qi <yao@codesourcery.com>
10893 * i386-low.c (i386_low_stopped_data_address): Initialize local
10894 variable `control'.
10896 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10900 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10901 DR_CONTROL unless necessary. Extend comments.
10902 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10903 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10905 2011-12-13 Yao Qi <yao@codesourcery.com>
10907 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10909 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10911 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10913 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10914 Print new debug message for such case.
10916 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10918 Fix overlapping memcpy.
10919 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10920 the read_inferior_memory transfer.
10921 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10922 write_inferior_memory transfer.
10923 (set_fast_tracepoint_jump): New variable buf. Use it for the
10924 read_inferior_memory and write_inferior_memory transfers.
10925 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10926 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10927 Use it for the write_inferior_memory transfer.
10928 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10931 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10933 * linux-low.c (fetch_register, store_register): Make code
10934 consistent, fix formatting.
10936 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10938 * linux-low.c (usr_store_inferior_registers): Factor out code
10939 to handle individual registers into...
10940 (store_register): ... this new function.
10942 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10944 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10945 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10946 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10947 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10948 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10949 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10950 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10951 (srv_xmlfiles): Add new XML files.
10953 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10955 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10956 (init_registers_s390_linux32v1): Add prototype.
10957 (init_registers_s390_linux32v2): Likewise.
10958 (init_registers_s390_linux64v1): Likewise.
10959 (init_registers_s390_linux64v2): Likewise.
10960 (init_registers_s390x_linux64v1): Likewise.
10961 (init_registers_s390x_linux64v2): Likewise.
10962 (s390_num_regs): Increment to 52.
10963 (s390_regmap): Add orig_r2 register.
10964 (s390_num_regs_3264): Increment to 68.
10965 (s390_regmap_3264): Add orig_r2 register.
10966 (s390_collect_ptrace_register): Handle orig_r2 register.
10967 (s390_supply_ptrace_register): Likewise.
10968 (s390_fill_last_break): New function.
10969 (s390_store_last_break): Likewise.
10970 (s390_fill_system_call): New function.
10971 (s390_store_system_call): Likewise.
10972 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10974 (s390_check_regset): New function.
10975 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10976 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10977 Update target_regsets for available register sets.
10979 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10980 Jan Kratochvil <jan.kratochvil@redhat.com>
10982 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10983 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10985 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10986 * linux-low.h (struct process_info_private): New member r_debug.
10987 * server.c (handle_qxfer_libraries): Call
10988 the_target->qxfer_libraries_svr4.
10989 (handle_qxfer_libraries_svr4): New function.
10990 (qxfer_packets): New entry "libraries-svr4".
10991 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10992 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10993 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10994 PACKET_qXfer_libraries_svr4.
10996 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10998 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10999 PSW address/mask between 8-byte and 16-byte formats.
11000 (s390_supply_ptrace_register): Likewise.
11001 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11002 basic addressing mode bit.
11004 2011-11-24 Stan Shebs <stan@codesourcery.com>
11006 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11008 2011-11-17 Stan Shebs <stan@codesourcery.com>
11010 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11011 (tracing_start_time): New global.
11012 (tracing_stop_time): New global.
11013 (tracing_user_name): New global.
11014 (tracing_notes): New global.
11015 (tracing_stop_note): New global.
11016 (cmd_qtstart): Set traceframe_usage, start_time.
11017 (stop_tracing): Set stop_time.
11018 (cmd_qtstatus): Report additional status.
11019 (cmd_qtp): New function.
11020 (handle_tracepoint_query): Call it.
11021 (cmd_qtnotes): New function.
11022 (handle_tracepoint_general_set): Call it.
11023 (get_timestamp): Rename from tsv_get_timestamp.
11025 2011-11-14 Stan Shebs <stan@codesourcery.com>
11026 Kwok Cheung Yeung <kcy@codesourcery.com>
11028 * linux-x86-low.c (small_jump_insn): New.
11029 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11030 trampoline and error message, build a trampoline and issue a small
11031 jump instruction to it.
11032 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11033 trampoline and error message.
11034 (x86_get_min_fast_tracepoint_insn_len): New.
11035 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11036 * linux-low.h (struct linux_target_ops): Add arguments to
11037 install_fast_tracepoint_jump_pad operation, add new operation.
11038 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11040 (linux_get_min_fast_tracepoint_insn_len): New function.
11041 (linux_target_op): Add new operation.
11042 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11043 (gdb_trampoline_buffer_end): Ditto.
11044 (gdb_trampoline_buffer_error): Ditto.
11045 (struct ipa_sym_addresses): Add fields for new IPA variables.
11046 (symbol_list): Add entries for new IPA variables.
11047 (struct tracepoint): Add fields to hold the address range of the
11048 trampoline used by the tracepoint.
11049 (trampoline_buffer_head): New static variable.
11050 (trampoline_buffer_tail): Ditto.
11051 (claim_trampoline_space): New function.
11052 (have_fast_tracepoint_trampoline_buffer): New function.
11053 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11055 (install_fast_tracepoint): Ditto, also add error buffer argument.
11056 (cmd_qtminftpilen): New function.
11057 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11058 (fast_tracepoint_from_trampoline_address): New function.
11059 (fast_tracepoint_collecting): Handle trampoline as part of jump
11061 (set_trampoline_buffer_space): New function.
11062 (initialize_tracepoint): Initialize new IPA variables.
11063 * target.h (struct target_ops): Add arguments to
11064 install_fast_tracepoint_jump_pad operation, add new
11065 get_min_fast_tracepoint_insn_len operation.
11066 (target_get_min_fast_tracepoint_insn_len): New.
11067 (install_fast_tracepoint_jump_pad): Add arguments.
11068 * server.h (IPA_BUFSIZ): Define.
11069 * linux-i386-ipa.c: Include extra header files.
11070 (initialize_fast_tracepoint_trampoline_buffer): New function.
11071 (initialize_low_tracepoint): Call it.
11072 * server.h (set_trampoline_buffer_space): Declare.
11073 (claim_trampoline_space): Ditto.
11074 (have_fast_tracepoint_trampoline_buffer): Ditto.
11076 2011-11-14 Yao Qi <yao@codesourcery.com>
11078 * server.c (handle_query): Handle InstallInTrace for qSupported.
11079 * tracepoint.c (add_tracepoint): Sort list.
11080 (install_tracepoint, download_tracepoint): New.
11081 (cmd_qtdp): Call them to install and download tracepoints.
11082 (sort_tracepoints): Removed.
11083 (cmd_qtstart): Update.
11085 2011-11-14 Yao Qi <yao@codesourcery.com>
11087 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11088 * mem-break.h: Declare.
11089 * tracepoint.c (cmd_qtstart): Move some code to ...
11090 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11092 (download_tracepoints): Move some code to ...
11093 (download_tracepoint_1): ... here. New.
11095 2011-11-08 Yao Qi <yao@codesourcery.com>
11097 * remote-utils.c (relocate_instruction): A comment fix.
11099 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11101 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11102 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11103 dr_status_mirror and dr_control_mirror from debug_reg_state.
11104 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11105 (i386_initial_stuff): Remove use of deleted globals.
11106 (i386_get_thread_context, i386_set_thread_context,
11107 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11108 from debug_reg_state.
11110 2011-11-05 Yao Qi <yao@codesourcery.com>
11112 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11113 address as TPOINT's.
11115 2011-11-02 Stan Shebs <stan@codesourcery.com>
11117 * tracepoint.c (agent_mem_read_string): New function.
11118 (eval_agent_expr): Call it for tracenz.
11119 * server.c (handle_query): Report support for tracenz.
11121 2011-11-02 Yao Qi <yao@codesourcery.com>
11123 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11125 2011-11-02 Yao Qi <yao@codesourcery.com>
11127 * target.h: Fix a typo in comment.
11129 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11131 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11132 clobber the breakpoints' shadows with fast tracepoint jumps.
11133 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11134 * target.c (write_inferior_memory): Also pass MYADDR down to
11137 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11139 * configure.ac: Check support for personality routine.
11140 * configure: Regenerate.
11141 * config.in: Likewise.
11142 * linux-low.c: Include <sys/personality.h>.
11143 Define ADDR_NO_RANDOMIZE if necessary.
11144 (linux_create_inferior): Disable address space randomization when
11145 forking inferior, if requested.
11146 (linux_supports_disable_randomization): New function.
11147 (linux_target_ops): Install it.
11148 * server.h (disable_randomization): Declare.
11149 * server.c (disable_randomization): New global variable.
11150 (handle_general_set): Handle QDisableRandomization.
11151 (handle_query): Likewise for qSupported.
11152 (main): Support --disable-randomization and --no-disable-randomization
11153 command line arguments.
11154 * target.h (struct target_ops): Add supports_disable_randomization.
11155 (target_supports_disable_randomization): New macro.
11157 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11159 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11161 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11162 [!PT_GETDSBT] (target_loadmap): New definition.
11163 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11164 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11165 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11166 and PT_GETDSBT to LINUX_LOADMAP.
11167 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11168 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11170 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11172 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11173 (arm_linux_hwbp_cap): New static variable.
11174 (arm_linux_get_hwbp_cap): Replace by ...
11175 (arm_linux_init_hwbp_cap): ... this new function.
11176 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11177 (arm_linux_get_hw_watchpoint_count): Likewise.
11178 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11179 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11180 (arm_prepare_to_resume): Use perror_with_name instead of error.
11182 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11184 * linux-arm-low.c: Include <signal.h>.
11185 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11186 (struct arm_linux_hwbp_cap): New data type.
11187 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11188 (struct arm_linux_hw_breakpoint): New data type.
11189 (MAX_BPTS, MAX_WPTS): Define.
11190 (struct arch_process_info, struct arch_lwp_info): New data types.
11191 (arm_linux_get_hwbp_cap): New function.
11192 (arm_linux_get_hw_breakpoint_count): Likewise.
11193 (arm_linux_get_hw_watchpoint_count): Likewise.
11194 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11195 (arm_hwbp_control_initialize): Likewise.
11196 (arm_hwbp_control_is_enabled): Likewise.
11197 (arm_hwbp_control_is_initialized): Likewise.
11198 (arm_hwbp_control_disable): Likewise.
11199 (arm_linux_hw_breakpoint_equal): Likewise.
11200 (arm_linux_hw_point_initialize): Likewise.
11201 (struct update_registers_data): New data structure.
11202 (update_registers_callback: New function.
11203 (arm_insert_point): Likewise.
11204 (arm_remove_point): Likewise.
11205 (arm_stopped_by_watchpoint): Likewise.
11206 (arm_stopped_data_address): Likewise.
11207 (arm_new_process): Likewise.
11208 (arm_new_thread): Likewise.
11209 (arm_prepare_to_resume): Likewise.
11210 (the_low_target): Register arm_insert_point, arm_remove_point,
11211 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11212 arm_new_thread, and arm_prepare_to_resume.
11214 2011-09-15 Stan Shebs <stan@codesourcery.com>
11216 * server.h (struct emit_ops): Add compare-goto fields.
11217 * tracepoint.c (gdb_agent_op_sizes): New table.
11218 (emit_eq_goto): New function.
11219 (emit_ne_goto): New function.
11220 (emit_lt_goto): New function.
11221 (emit_le_goto): New function.
11222 (emit_gt_goto): New function.
11223 (emit_ge_goto): New function.
11224 (is_goto_target): New function.
11225 (compile_bytecodes): Recognize special cases of compare-goto
11226 combinations and call specialized emitters for them.
11227 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11228 (amd64_emit_ne_goto): New function.
11229 (amd64_emit_lt_goto): New function.
11230 (amd64_emit_le_goto): New function.
11231 (amd64_emit_gt_goto): New function.
11232 (amd64_emit_ge_goto): New function.
11233 (amd64_emit_ops): Add the new functions.
11234 (i386_emit_eq_goto): New function.
11235 (i386_emit_ne_goto): New function.
11236 (i386_emit_lt_goto): New function.
11237 (i386_emit_le_goto): New function.
11238 (i386_emit_gt_goto): New function.
11239 (i386_emit_ge_goto): New function.
11240 (i386_emit_ops): Add the new functions.
11242 2011-09-08 Stan Shebs <stan@codesourcery.com>
11244 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11245 (i386_emit_epilogue): Restore %ebx.
11247 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11249 * server.c (step_thread): Remove definition.
11250 (process_serial_event): Don't handle Hs.
11251 * server.h (step_thread): Remove declaration.
11252 * target.c (set_desired_inferior): Remove use of step_thread.
11254 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11256 * linux-low.c: Include linux-procfs.h.
11257 (linux_attach_lwp_1): Update comments.
11258 (linux_attach): Scan for existing threads when attaching to a
11259 process that is the tgid.
11260 * Makefile.in: Update dependencies.
11262 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11264 * configure.srv: Add linux-procfs.o dependencies.
11266 2011-08-14 Yao Qi <yao@codesourcery.com>
11268 * target.h (struct target_ops): Fix indent.
11269 * win32-low.c (win32_target_ops): Fix comment.
11271 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11272 Yao Qi <yao@codesourcery.com>
11274 * Makefile.in (clean): Remove tic6x-*.c files.
11275 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11276 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11277 (tic6x-c64xp-linux.c): Likewise.
11278 * configure.srv: Add support for tic6x-*-uclinux.
11279 * linux-tic6x-low.c: New.
11280 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11282 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11283 Yao Qi <yao@codesourcery.com>
11285 * target.h (struct target_ops): Add read_loadmap.
11286 * linux-low.c (struct target_loadseg): New type.
11287 (struct target_loadmap): New type.
11288 (linux_read_loadmap): New function.
11289 (linux_target_ops): Add linux_read_loadmap.
11290 * server.c (handle_query): Support qXfer:fdpic:read packet.
11291 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11294 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11296 * win32-low.c: Include <stdint.h>.
11298 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11300 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11301 to the inferior here.
11302 (i386_remove_aligned_watchpoint): Ditto.
11303 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11304 fit part of the watchpoint in the debug registers.
11305 (i386_update_inferior_debug_regs): New.
11306 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11307 registers, and only update the inferior on success.
11308 (i386_low_remove_watchpoint): Ditto.
11310 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11312 * linux-low.c (compare_ints, unique, list_threads, show_process,
11313 linux_core_of_thread): Delete.
11314 (linux_target_ops): Change linux_core_of_thread to
11315 linux_common_core_of_thread.
11316 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11317 * utils.c (malloc_failure): Change type of argument.
11318 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11319 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11320 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11321 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11322 (IPA_OBJS): Add common-utils-ipa.o.
11323 (ptid_h, linux_osdata_h): New macros.
11324 (server_h): Add common/common-utils.h, common/xml-utils.h,
11325 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11327 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11328 ptid.o, buffer.o): New rules.
11329 (linux-low.o): Add common/linux-osdata.h as a dependency.
11330 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11331 * configure.ac: Add AC_HEADER_DIRENT check.
11332 * config.in: Regenerate.
11333 * configure: Regenerate.
11334 * remote-utils.c (xml_escape_text): Delete.
11335 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11336 buffer_xml_printf): Move to common/buffer.c.
11337 * server.c (main): Remove call to initialize_inferiors.
11338 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11339 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11340 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11341 internal_error, gdb_assert, gdb_assert_fail): Delete.
11342 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11343 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11345 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11346 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11347 initialize_inferiors): Delete.
11349 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11351 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11354 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11356 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11358 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11360 2011-05-26 Yao Qi <yao@codesourcery.com>
11362 * Makefile.in (thread-db.o): Track dependence to
11363 common/gdb_thread_db.h.
11364 * thread-db.c: include gdb_thread_db.h from right place.
11366 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11368 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11369 __FILE__ and __LINE__ to internal_error.
11371 2011-05-13 Doug Evans <dje@google.com>
11373 * thread-db.c (try_thread_db_load_from_sdir): New function.
11374 (try_thread_db_load_from_dir): New function.
11375 (thread_db_load_search): Handle $sdir, ignore $pdir.
11376 Remove trying of system directories if search of
11377 libthread-db-search-path fails, that is now done via $sdir.
11379 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11381 * server.c (handle_query): Add EnableDisableTracepoints to the list
11382 of supported features.
11383 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11385 (cmd_qtenable_disable): New.
11386 (cmd_qtstart): Install tracepoints even if disabled.
11387 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11388 receiving a QTEnable or QTDisable packet.
11389 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11390 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11392 (gdb_probe): Skip data collection if static tracepoint is disabled.
11394 2011-05-10 Doug Evans <dje@google.com>
11396 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11398 2011-05-04 Doug Evans <dje@google.com>
11400 * linux-low.c (linux_join): Skip process lookup.
11401 * spu-low.c (spu_join): Ditto.
11402 * server.c (join_inferiors_callback): Delete.
11403 (process_serial_event): For 'D' packet (detach) call join_inferior
11406 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11408 * README: Don't mention xscale*-*-linux*.
11409 * configure.srv (xscale*-*-linux*): Don't handle target.
11411 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11413 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11415 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11416 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11417 (i386_emit_void_call_2): Likewise.
11419 2011-04-26 Yao Qi <yao@codesourcery.com>
11421 * linux-low.c: Move common macros to linux-ptrace.h.
11422 Include linux-ptrace.h.
11423 * Makefile.in (linux_ptrace_h): New.
11424 (linux-low.o): Depends on linux-ptrace.h.
11426 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11428 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11429 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11430 (remote_prepare): New function with most of the TCP code from ...
11431 (remote_open): ... here. Detect PORT here unconditionally. Move also
11432 setting transport_is_reliable.
11433 * server.c (run_once): New variable.
11434 (gdbserver_usage): Document it.
11435 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11436 the first run if RUN_ONCE.
11437 * server.h (run_once, remote_prepare): New declarations.
11439 2011-04-19 Tom Tromey <tromey@redhat.com>
11441 * win32-low.c (handle_load_dll): Remove duplicate "the".
11443 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11445 Remove support for old Cygwin 1.5 versions.
11446 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11447 function to avoid warning.
11448 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11451 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11453 * gdbserver/server.h (Macro _): Define it if not available.
11455 2011-03-14 Michael Snyder <msnyder@vmware.com>
11457 * hostio.c (handle_close): Remove unnecessary null test.
11459 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11461 * Makefile.in (maintainer-clean realclean distclean): Remove
11462 "make ... subdir_do" command.
11464 2011-03-10 Michael Snyder <msnyder@vmware.com>
11466 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11468 * server.c (handle_v_run): Free alloced buffer on early return.
11470 2011-03-09 Yao Qi <yao@codesourcery.com>
11473 2011-03-04 Yao Qi <yao@codesourcery.com>
11475 * Makefile.in: Remove GNU make feature --directory.
11477 2011-03-05 Yao Qi <yao@codesourcery.com>
11479 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11480 (subdir_do): New make target. Copied from gdb/Makefile.
11481 (maintainer-clean, realclean, distclean, clean): Call corresponding
11482 make targets in common/Makefile.
11484 2011-02-11 Yao Qi <yao@codesourcery.com>
11486 * configure.ac: Call AC_PROG_RANLIB.
11487 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11488 * configure: Regenerate.
11490 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11492 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11494 2011-03-06 Yao Qi <yao@codesourcery.com>
11496 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11498 2011-03-05 Yao Qi <yao@codesourcery.com>
11500 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11501 (subdir_do): New make target. Copied from gdb/Makefile.
11502 (maintainer-clean, realclean, distclean, clean): Call corresponding
11503 make targets in common/Makefile.
11505 2011-03-04 Yao Qi <yao@codesourcery.com>
11507 * Makefile.in: Remove GNU make feature --directory.
11509 2011-03-04 Michael Snyder <msnyder@vmware.com>
11511 * server.c (queue_stop_reply): Call xmalloc not malloc.
11513 2011-03-02 Michael Snyder <msnyder@vmware.com>
11515 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11517 2011-02-28 Michael Snyder <msnyder@vmware.com>
11519 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11520 (cmd_qtframe): Ditto.
11521 (cmd_qtbuffer): Ditto.
11522 (cmd_bigqtbuffer): Ditto.
11524 * utils.c (decimal2str): Initialize 'width' to nine, then
11525 don't mess with it.
11527 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11529 * hostio.c (require_data): Free *data, not data.
11531 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11533 * hostio.c (require_data): Use free, not xfree.
11535 2011-02-27 Michael Snyder <msnyder@vmware.com>
11537 * server.c (handle_query): Discard unused value.
11539 * hostio.c (require_data): Free malloc memory before returning
11542 2011-02-26 Michael Snyder <msnyder@vmware.com>
11544 * linux-low.c (list_threads): Call closedir for dirent.
11546 2011-02-27 Michael Snyder <msnyder@vmware.com>
11548 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11549 a case statement falls through.
11551 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11553 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11556 2011-02-26 Michael Snyder <msnyder@vmware.com>
11558 * utils.c (decimal2str): Eliminate dead code and dead param.
11559 (pulongest): Drop dead param from call to decimal2str.
11562 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11564 Revert the following patch (not approved yet):
11565 2011-02-21 Hui Zhu <teawater@gmail.com>
11566 * tracepoint.c (tp_printf): New function.
11567 (eval_agent_expr): Handle gdb_agent_op_printf.
11569 2011-02-21 Hui Zhu <teawater@gmail.com>
11571 * tracepoint.c (tp_printf): New function.
11572 (eval_agent_expr): Handle gdb_agent_op_printf.
11574 2011-02-18 Tom Tromey <tromey@redhat.com>
11576 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11577 (tracepoint.o): Likewise.
11578 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11579 (gdb_agent_op_names): Likewise.
11581 2011-02-18 Tom Tromey <tromey@redhat.com>
11583 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11584 gdb_agent_op_rot>: New constants.
11585 (gdb_agent_op_names): Add pick and roll.
11586 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11589 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11591 * aclocal.m4: Regenerated with aclocal-1.11.1.
11593 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11595 * server.c (handle_qxfer_traceframe_info): New.
11596 (qxfer_packets): Register "traceframe-info".
11597 (handle_query): Report support for qXfer:traceframe-info:read+.
11598 * tracepoint.c (match_blocktype): New.
11599 (traceframe_find_block_type): Rename to ...
11600 (traceframe_walk_blocks): ... this. Add callback filter argument,
11602 (traceframe_find_block_type): New, reimplemented on top of
11603 traceframe_walk_blocks.
11604 (build_traceframe_info_xml): New.
11605 (traceframe_read_info): New.
11606 * server.h (traceframe_read_info): Declare.
11608 2011-02-11 Yao Qi <yao@codesourcery.com>
11610 * configure.ac: Call AC_PROG_RANLIB.
11611 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11612 * configure: Regenerate.
11614 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11616 * server.c (gdb_read_memory): Change return semantics to allow
11618 (handle_search_memory_1): Adjust.
11619 (process_serial_event) <'m' packet>: Handle partial transfers.
11620 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11622 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11624 * regcache.c (init_register_cache): Initialize
11625 regcache->register_status.
11626 (free_register_cache): Release regcache->register_status.
11627 (regcache_cpy): Copy register_status.
11628 (registers_to_string): Print 'x's for unavailable registers.
11629 (supply_register): Mark the register's status valid or
11630 unavailable, depending on whether a buffer was passed in or not.
11631 (supply_register_zeroed): New.
11632 (supply_regblock): Mark the registers' status valid or
11633 unavailable, depending on whether a buffer was passed in or not.
11634 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11635 (struct regcache): New `register_status' field.
11636 (supply_register_zeroed): Declare.
11637 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11638 supply_register_zeroed, rather than passing a NULL buffer to
11640 * tracepoint.c (fetch_traceframe_registers): Update comment.
11642 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11644 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11647 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11649 * server.h (decode_xfer_write): Change prototype.
11650 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11651 and don't extract the annex here.
11652 * server.c (decode_xfer_read): Remove `annex' parameter,
11653 and don't extract the annex here.
11654 (decode_xfer): New.
11655 (struct qxfer): New.
11656 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11657 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11658 (handle_qxfer_statictrace): New functions, abstracted out from
11659 handle_query, and made to use the struct qxfer interface.
11660 (handle_threads_qxfer_proper): Rename to ...
11661 (handle_qxfer_threads_proper): ... this.
11662 (handle_threads_qxfer): Rename to ...
11663 (handle_qxfer_threads): ... this. Adjust.
11664 (qxfer_packets): New array.
11665 (handle_qxfer): New function.
11666 (handle_query): Use handle_qxfer.
11668 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11670 * gdbreplay.c: Shorten lines of >= 80 columns.
11671 * linux-low.c: Ditto.
11672 * linux-ppc-low.c: Ditto.
11673 * linux-s390-low.c: Ditto.
11674 * linux-sparc-low.c: Ditto.
11675 * linux-x86-low.c: Ditto.
11676 * linux-xtensa-low.c: Ditto.
11677 * mem-break.c: Ditto.
11678 * nto-low.c: Ditto.
11679 * regcache.h: Ditto.
11680 * remote-utils.c: Ditto.
11683 * thread-db.c: Ditto.
11684 * tracepoint.c: Ditto.
11686 * win32-low.h: Ditto.
11688 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11690 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11693 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11695 * server.c (gdbserver_version): Update copyright year in version
11697 * gdbreplay.c (gdbreplay_version): Ditto.
11699 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11701 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11702 * linux-bfin-low.c: New file.
11703 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11704 PT_DATA_ADDR for BFIN targets.
11705 * Makefile.in (SFILES): Add linux-bfin-low.c.
11706 (clean): Remove reg-bfin.c.
11707 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11708 * README: Mention supported Blackfin targets.
11710 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11712 * .gitignore: New file.
11714 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11716 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11718 2010-10-22 Jie Zhang <jie@codesourcery.com>
11720 * Makefile.in: Add FLAGS_TO_PASS variable.
11721 (install): Remove dependency of install-only and recursively
11722 invoke make for install-only.
11724 2010-10-04 Doug Evans <dje@google.com>
11726 * Makefile.in (uninstall): Use $(DESTDIR).
11728 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11732 * linux-x86-low.c (compat_siginfo_from_siginfo)
11733 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11734 si_code is < 0. Check for si_code == SI_TIMER before checking for
11737 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11739 * lynx-i386-low.c: New file.
11740 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11742 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11744 * lynx-low.c (ptrace_request_to_str): Remove handling for
11745 request values that have been removed in LynxOS 5.x.
11747 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11749 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11752 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11754 * configure.ac: Add --enable-inprocess-agent option.
11755 * configure: Rebuilt.
11757 2010-09-06 Yao Qi <yao@codesourcery.com>
11759 * linux-low.c (linux_kill): Remove unused variable.
11760 (linux_stabilize_threads): Likewise.
11761 * server.c (start_inferior): Likewise.
11762 (queue_stop_reply_callback): Likewise.
11763 * tracepoint.c (do_action_at_tracepoint): Likewise.
11765 2010-09-06 Yao Qi <yao@codesourcery.com>
11767 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11770 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11772 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11774 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11776 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11779 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11781 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11782 gdbserver/lynx-ppc-low.c: New files.
11783 * Makefile.in (lynx_low_h): New variable.
11784 (lynx-low.o, lynx-ppc-low.o): New rules.
11785 * configure.ac: On LynxOS, link with -lnetinet.
11786 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11787 * configure: regenerate.
11789 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11791 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11792 * configure.ac: Add check for vasprintf and vsnprintf.
11793 * configure, config.in: Regenerate.
11794 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11796 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11798 * gdbreplay.c: Move include of alloca.h up, next to include of
11800 * server.h: Add include of malloc.h.
11801 * mem-break.c: Remove include of malloc.h.
11802 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11804 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11806 * Makefile.in (memmem.o): Build with -Wno-error.
11808 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11810 * utils.c (xsnprintf): Make non-static.
11811 * server.h: Add xsnprintf declaration.
11812 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11813 replace calls to snprintf by calls to xsnprintf throughout.
11815 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11817 * configure.ac: Add configure check for alloca.
11818 * configure, config.in: Regenerate.
11819 * server.h: Include alloca.h if it exists.
11820 * gdbreplay.c: Include alloca.h if it exists.
11822 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11824 * linux-low.c (__SIGRTMIN): Define if not already defined.
11825 (linux_create_inferior): Check for __ANDROID__ rather than
11827 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11828 are already deferred.
11829 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11830 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11831 stopped and already has a pending signal to report.
11832 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11833 a pending signal to report or is moving out of a jump pad.
11834 (linux_init_signals): Check for __ANDROID__ rather than
11837 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11839 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11840 debug_threads check. Avoid a linear search when not doing debug
11843 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11845 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11846 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11847 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11848 (process_event): Change local fd's type to gdb_fildes_t.
11849 (create_file_handler): Adjust prototype.
11850 (delete_file_handler): Adjust prototype.
11851 (handle_file_event): Adjust prototype. Use pfildes.
11852 (create_file_event): Adjsut prototype.
11853 * remote-utils.c (remote_desc, listen_desc): Change type to
11855 * server.h: New gdb_fildes_t typedef.
11856 [USE_WIN32API]: Include winsock2.h.
11857 (delete_file_handler, add_file_handler): Adjust prototypes.
11858 (pfildes): Declare.
11859 * utils.c (pfildes): New.
11861 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11863 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11864 * configure: Regenerate.
11866 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11868 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11869 (linux_done_accessing_memory): ... this.
11870 (linux_target_ops): Adjust.
11871 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11872 * nto-low.c (nto_target_ops): Adjust comment.
11873 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11874 * spu-low.c (spu_target_ops): Adjust comment.
11875 * target.h (target_ops): Rename unprepare_to_access_memory field
11876 to done_accessing_memory.
11877 (unprepare_to_access_memory): Rename to ...
11878 (done_accessing_memory): ... this.
11880 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11882 * linux-low.c (linux_prepare_to_access_memory): New.
11883 (linux_unprepare_to_access_memory): New.
11884 (linux_target_ops): Install them.
11885 * server.c (read_memory): Rename to ...
11886 (gdb_read_memory): ... this. Use
11887 prepare_to_access_memory/prepare_to_access_memory.
11888 (write_memory): Rename to ...
11889 (gdb_write_memory): ... this. Use
11890 prepare_to_access_memory/prepare_to_access_memory.
11891 (handle_search_memory_1): Adjust.
11892 (process_serial_event): Adjust.
11893 * target.h (struct target_ops): New fields
11894 prepare_to_access_memory and unprepare_to_access_memory.
11895 (prepare_to_access_memory, unprepare_to_access_memory): New.
11896 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11897 prepare_to_access_memory/prepare_to_access_memory.
11898 * nto-low.c (nto_target_ops): Adjust.
11899 * spu-low.c (spu_target_ops): Adjust.
11900 * win32-low.c (win32_target_ops): Adjust.
11902 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11904 * Makefile.in (WARN_CFLAGS): Get it from configure.
11905 (WERROR_CFLAGS): New.
11906 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11907 * configure.ac: Introduce --enable-werror, which adds -Werror to
11908 the compiler command line. Enabled by default. Disable with
11909 --disable-werror. Add -Wdeclaration-after-statement
11910 Wpointer-arith and -Wformat-nonliteral to warning flags.
11911 * configure: Regenerate.
11913 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11915 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11917 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11919 * gdbreplay.c (remote_error): New.
11921 (expect): Use gdbchar. Check for error reading from GDB.
11922 Clarify sync error output.
11923 (play): Check for errors writing to GDB.
11924 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11925 * remote-utils.c (getpkt): Check for errors writing to the remote
11928 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11930 * linux-low.c (linux_wait_1): Move non-debugging code out of
11931 `debug_threads' control.
11933 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11935 * linux-low.c (linux_wait_1): Don't set last_status here.
11936 * server.c (push_event, queue_stop_reply_callback): Assert we're
11937 not pushing a TARGET_WAITKIND_IGNORE event.
11938 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11939 (myresume, handle_target_event): Set the thread's last_resume_kind
11940 and last_status from the target returned status.
11942 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11946 * linux-x86-low.c (update_debug_registers_callback): New.
11947 (i386_dr_low_set_addr): Use it.
11948 (i386_dr_low_get_addr): New.
11949 (i386_dr_low_set_control): Use update_debug_registers_callback.
11950 (i386_dr_low_get_control): New.
11951 (i386_dr_low_get_status): Adjust.
11952 * linux-low.c (linux_stop_lwp): New.
11953 * linux-low.h (linux_stop_lwp): Declare.
11955 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11956 argument instead of a i386_debug_reg_state.
11957 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11958 a i386_debug_reg_state.
11959 (i386_insert_aligned_watchpoint): Adjust.
11960 (i386_remove_aligned_watchpoint): Adjust.
11961 (i386_low_stopped_data_address): Read the debug registers from the
11962 inferior instead of from the mirrors.
11963 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11964 (i386_dr_low_get_addr): Declare.
11965 (i386_dr_low_get_control): Declare.
11966 (i386_dr_low_get_status): Change prototype.
11968 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11969 (i386_dr_low_get_addr): New.
11970 (i386_dr_low_get_control): New.
11971 (i386_dr_low_get_status): Adjust prototype. Return
11973 (i386_initial_stuff): Clear dr_status_mirror and
11975 (i386_get_thread_context): Adjust.
11976 (i386_set_thread_context): Adjust.
11977 (i386_thread_added): Adjust.
11979 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11981 * linux-low.h (linux_thread_area): Delete declaration.
11983 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11985 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11986 after its termination.
11988 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11990 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11991 (gdb_wants_all_stopped): Delete.
11992 (linux_wait_1): Don't call them.
11993 * server.c (handle_v_cont): Tag all threads as want-stopped.
11994 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11995 stopped as "client-wants-stopped".
11997 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11999 * Makefile.in (signals_h): New.
12000 (server_h): Depend on it.
12001 (server.o): Don't depend on $(signals_def).
12002 (signals.o): Depend on $(signals_def).
12004 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12006 * Makefile.in (signals_def): New.
12007 (server_h): Append include/gdb/signals.h and signals_def.
12008 (server.o): Append signals_def.
12010 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12012 * server.c (handle_target_event): Use target_signal_to_host for
12013 resume_info.sig initialization.
12014 * target.h (struct thread_resume) <sig>: New comment.
12016 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12018 * server.c (handle_query): strcpy() the returned string from paddress()
12019 instead of sprintf().
12020 * utils.c (paddress): Return phex_nz().
12022 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12024 * server.c (handle_v_cont): Call mourn_inferior if process
12026 (myresume): Likewise.
12028 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12030 Static tracepoints, and integration with UST.
12032 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12033 * mem-break.c (uninsert_all_breakpoints)
12034 (reinsert_all_breakpoints): New.
12035 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12036 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12037 (gdb_agent_ust_loaded, helper_thread_id)
12038 (gdb_agent_helper_thread_id): New macros.
12039 (struct ipa_sym_addresses): Add addr_ust_loaded,
12040 addr_helper_thread_id, addr_cmd_buf.
12041 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12042 (in_process_agent_loaded_ust): New.
12043 (write_e_ust_not_loaded): New.
12044 (maybe_write_ipa_ust_not_loaded): New.
12045 (struct collect_static_trace_data_action): New.
12046 (enum tracepoint_type) <static_tracepoint>: New.
12047 (struct tracepoint) <handle>: Mention static tracepoints.
12048 (struct static_tracepoint_ctx): New.
12049 (CMD_BUF_SIZE): New.
12050 (add_tracepoint_action): Handle static tracepoint actions.
12051 (unprobe_marker_at): New.
12052 (clear_installed_tracepoints): Handle static tracepoints.
12053 (cmd_qtdp): Handle static tracepoints.
12054 (probe_marker_at): New.
12055 (cmd_qtstart): Handle static tracepoints.
12056 (response_tracepoint): Handle static tracepoints.
12057 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12058 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12059 (get_context_regcache): Handle static tracepoints.
12060 (do_action_at_tracepoint): Handle static tracepoint actions.
12061 (traceframe_find_block_type): Handle static trace data blocks.
12062 (traceframe_read_sdata): New.
12063 (download_tracepoints): Download static tracepoint actions.
12064 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12065 (GDB_PROBE_NAME): New.
12067 (GET_UST_SYM): New.
12070 (ust_marker_to_static_tracepoint): New.
12072 (collect_ust_data_at_tracepoint): New.
12073 (gdb_ust_probe): New.
12074 (UNIX_PATH_MAX, SOCK_DIR): New.
12075 (gdb_ust_connect_sync_socket): New.
12076 (resume_thread, stop_thread): New.
12077 (run_inferior_command): New.
12078 (init_named_socket): New.
12079 (gdb_ust_socket_init): New.
12080 (cstr_to_hexstr): New.
12082 (first_marker, next_marker): New.
12083 (response_ust_marker): New.
12084 (cmd_qtfstm, cmd_qtsstm): New.
12085 (unprobe_marker_at, probe_marker_at): New.
12086 (cmd_qtstmat, gdb_ust_thread): New.
12087 (gdb_ust_init): New.
12088 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12089 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12090 (ST_REGENTRY): New.
12091 (x86_64_st_collect_regmap): New.
12092 (X86_64_NUM_ST_COLLECT_GREGS): New.
12093 (AMD64_RIP_REGNUM): New.
12094 (supply_static_tracepoint_registers): New.
12095 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12096 (ST_REGENTRY): New.
12097 (i386_st_collect_regmap): New.
12098 (i386_NUM_ST_COLLECT_GREGS): New.
12099 (supply_static_tracepoint_registers): New.
12100 * server.c (handle_query): Handle qXfer:statictrace:read.
12101 <qSupported>: Report support for StaticTracepoints, and
12102 qXfer:statictrace:read features.
12103 * server.h (traceframe_read_sdata)
12104 (supply_static_tracepoint_registers): Declare.
12105 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12106 (unpack_varlen_hex): Include in IPA build.
12107 * Makefile.in (ustlibs, ustinc): New.
12108 (IPA_OBJS): Add remote-utils-ipa.o.
12109 ($(IPA_LIB)): Link -ldl and -lpthread.
12111 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12112 * config.in, configure: Regenerate.
12114 2010-06-20 Ian Lance Taylor <iant@google.com>
12115 Pedro Alves <pedro@codesourcery.com>
12117 * linux-x86-low.c (always_true): Delete.
12118 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12119 trying to fool the compiler with always_true.
12121 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12123 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12124 conditions in gdbserver.
12126 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12128 * spu-low.c (spu_read_memory): Wrap around local store limit.
12129 (spu_write_memory): Likewise.
12131 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12133 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12134 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12136 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12138 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12139 uses with LONGEST uses.
12141 2010-06-14 Stan Shebs <stan@codesourcery.com>
12142 Pedro Alves <pedro@codesourcery.com>
12146 * linux-x86-low.c: Include limits.h.
12148 (always_true): New.
12151 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12152 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12153 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12154 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12155 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12156 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12157 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12158 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12159 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12160 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12161 (amd64_emit_void_call_2): New.
12162 (amd64_emit_ops): New.
12163 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12164 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12165 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12166 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12167 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12168 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12169 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12170 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12171 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12172 (i386_emit_stack_adjust, i386_emit_int_call_1)
12173 (i386_emit_void_call_2): New.
12174 (i386_emit_ops): New.
12175 (x86_emit_ops): New.
12176 (the_low_target): Install x86_emit_ops.
12177 * server.h (struct emit_ops): New.
12178 (get_raw_reg_func_addr): Declare.
12179 (current_insn_ptr, emit_error): Declare.
12180 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12181 (set_trace_state_variable_value): New defines.
12182 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12183 addr_get_trace_state_variable_value and
12184 addr_set_trace_state_variable_value.
12185 (symbol_list): New fields for get_raw_reg,
12186 get_trace_state_variable_value and set_trace_state_variable_value.
12187 (condfn): New typedef.
12188 (struct tracepoint): New field `compiled_cond'.
12189 (do_action_at_tracepoint): Clear compiled_cond.
12190 (get_trace_state_variable_value, set_trace_state_variable_value):
12192 (condition_true_at_tracepoint): If there's a compiled condition,
12194 (current_insn_ptr, emit_error): New globals.
12195 (struct bytecode_address): New.
12196 (get_raw_reg_func_addr): New.
12197 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12198 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12199 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12200 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12201 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12202 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12203 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12204 (compile_tracepoint_condition, compile_bytecodes): New.
12205 * target.h (emit_ops): Forward declare.
12206 (struct target_ops): New field emit_ops.
12207 (target_emit_ops): New.
12208 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12209 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12210 * linux-low.c (linux_emit_ops): New.
12211 (linux_target_ops): Install it.
12212 * linux-low.h (struct linux_target_ops): New field emit_ops.
12214 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12216 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12217 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12219 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12220 Stan Shebs <stan@codesourcery.com>
12222 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12223 (all): Depend on $(extra_libraries).
12224 (install-only): Install the IPA.
12225 (IPA_OBJS, IPA_LIB): New.
12226 (clean): Remove the IPA lib.
12227 (IPAGENT_CFLAGS): New.
12228 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12229 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12230 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12231 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12232 * configure.ac: Check for atomic builtins support in the compiler.
12233 (IPA_DEPFILES, extra_libraries): Define.
12234 * configure.srv (ipa_obj): Add description.
12235 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12236 (i[34567]86-*-linux*): Set ipa_obj.
12237 (x86_64-*-linux*): Set ipa_obj.
12238 * linux-low.c (stabilizing_threads): New.
12239 (supports_fast_tracepoints): New.
12240 (linux_detach): Stabilize threads before detaching.
12241 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12242 the lwp is either not stabilizing, or is moving out of a jump pad.
12243 (linux_fast_tracepoint_collecting): New.
12244 (maybe_move_out_of_jump_pad): New.
12245 (enqueue_one_deferred_signal): New.
12246 (dequeue_one_deferred_signal): New.
12247 (linux_wait_for_event_1): If moving out of a jump pad, defer
12248 pending signals to later.
12249 (linux_stabilize_threads): New.
12250 (linux_wait_1): Check if threads need moving out of jump pads, and
12252 (stuck_in_jump_pad_callback): New.
12253 (move_out_of_jump_pad_callback): New.
12254 (lwp_running): New.
12255 (linux_resume_one_lwp): Handle moving out of jump pads.
12256 (linux_set_resume_request): Dequeue deferred signals.
12257 (need_step_over_p): Also step over fast tracepoint jumps.
12258 (start_step_over): Also uninsert fast tracepoint jumps.
12259 (finish_step_over): Also reinsert fast tracepoint jumps.
12260 (linux_install_fast_tracepoint_jump): New.
12261 (linux_target_ops): Install linux_stabilize_threads and
12262 linux_install_fast_tracepoint_jump_pad.
12263 * linux-low.h (linux_target_ops) <get_thread_area,
12264 install_fast_tracepoint_jump_pad>: New fields.
12265 (struct lwp_info) <collecting_fast_tracepoint,
12266 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12267 (linux_get_thread_area): Declare.
12268 * linux-x86-low.c (jump_insn): New.
12269 (x86_get_thread_area): New.
12270 (append_insns): New.
12271 (push_opcode): New.
12272 (amd64_install_fast_tracepoint_jump_pad): New.
12273 (i386_install_fast_tracepoint_jump_pad): New.
12274 (x86_install_fast_tracepoint_jump_pad): New.
12275 (the_low_target): Install x86_get_thread_area and
12276 x86_install_fast_tracepoint_jump_pad.
12277 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12278 (struct fast_tracepoint_jump): New.
12279 (fast_tracepoint_jump_insn): New.
12280 (fast_tracepoint_jump_shadow): New.
12281 (find_fast_tracepoint_jump_at): New.
12282 (fast_tracepoint_jump_here): New.
12283 (delete_fast_tracepoint_jump): New.
12284 (set_fast_tracepoint_jump): New.
12285 (uninsert_fast_tracepoint_jumps_at): New.
12286 (reinsert_fast_tracepoint_jumps_at): New.
12287 (set_breakpoint_at): Use write_inferior_memory.
12288 (uninsert_raw_breakpoint): Use write_inferior_memory.
12289 (check_mem_read): Mask out fast tracepoint jumps.
12290 (check_mem_write): Mask out fast tracepoint jumps.
12291 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12292 (set_fast_tracepoint_jump): Declare.
12293 (delete_fast_tracepoint_jump)
12294 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12295 (reinsert_fast_tracepoint_jumps_at): Declare.
12296 * regcache.c: Don't compile many functions when building the
12297 in-process agent library.
12298 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12299 the register buffer in the heap.
12300 (free_register_cache): If the register buffer isn't owned by the
12301 regcache, don't free it.
12302 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12303 pre-existing register caches.
12304 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12306 (convert_ascii_to_int): : Constify `from' parameter type.
12307 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12308 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12309 the needed buffer in-place.
12310 (relocate_instruction): New.
12311 * server.c (handle_query) <qSymbols>: If the target supports
12312 tracepoints, give it a chance of looking up symbols. Report
12313 support for fast tracepoints.
12314 (handle_status): Stabilize threads.
12315 (process_serial_event): Adjust.
12316 * server.h (struct fast_tracepoint_jump): Forward declare.
12317 (struct process_info) <fast_tracepoint_jumps>: New field.
12318 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12319 (decode_X_packet, decode_M_packet): Adjust.
12320 (relocate_instruction): Declare.
12321 (in_process_agent_loaded): Declare.
12322 (tracepoint_look_up_symbols): Declare.
12323 (struct fast_tpoint_collect_status): Declare.
12324 (fast_tracepoint_collecting): Declare.
12325 (force_unlock_trace_buffer): Declare.
12326 (handle_tracepoint_bkpts): Declare.
12327 (initialize_low_tracepoint)
12328 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12329 * target.h (struct target_ops) <stabilize_threads,
12330 install_fast_tracepoint_jump_pad>: New fields.
12331 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12332 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12333 [HAVE_STDINT_H]: Include stdint.h.
12334 (trace_debug_1): Rename to ...
12335 (trace_vdebug): ... this.
12336 (trace_debug): Rename to ...
12337 (trace_debug_1): ... this. Add `level' parameter.
12338 (trace_debug): New.
12339 (ATTR_USED, ATTR_NOINLINE): New.
12340 (IP_AGENT_EXPORT): New.
12341 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12342 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12343 (about_to_request_buffer_space, trace_buffer_is_full)
12344 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12345 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12346 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12347 (traceframe_write_count, traceframes_created)
12348 (trace_state_variables)
12349 New renaming defines.
12350 (struct ipa_sym_addresses): New.
12351 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12352 (symbol_list): New.
12353 (ipa_sym_addrs): New.
12354 (all_tracepoint_symbols_looked_up): New.
12355 (in_process_agent_loaded): New.
12356 (write_e_ipa_not_loaded): New.
12357 (maybe_write_ipa_not_loaded): New.
12358 (tracepoint_look_up_symbols): New.
12359 (debug_threads) [IN_PROCESS_AGENT]: New.
12360 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12361 (UNKNOWN_SIDE_EFFECTS): New.
12362 (stop_tracing): New.
12363 (flush_trace_buffer): New.
12364 (stop_tracing_bkpt): New.
12365 (flush_trace_buffer_bkpt): New.
12366 (read_inferior_integer): New.
12367 (read_inferior_uinteger): New.
12368 (read_inferior_data_pointer): New.
12369 (write_inferior_data_pointer): New.
12370 (write_inferior_integer): New.
12371 (write_inferior_uinteger): New.
12372 (struct collect_static_trace_data_action): Delete.
12373 (enum tracepoint_type): New.
12374 (struct tracepoint) <type>: New field `type'.
12375 <actions_str, step_actions, step_actions_str>: Only include in
12377 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12378 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12379 (tracepoints): Use IP_AGENT_EXPORT.
12380 (last_tracepoint): Don't include in the IPA.
12381 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12382 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12383 (alloced_trace_state_variables): New.
12384 (trace_state_variables): Use IP_AGENT_EXPORT.
12385 (traceframe_t): Delete unused variable.
12386 (circular_trace_buffer): Don't include in the IPA.
12387 (trace_buffer_start): Delete.
12388 (struct trace_buffer_control): New.
12389 (trace_buffer_free): Delete.
12390 (struct ipa_trace_buffer_control): New.
12391 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12392 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12394 (trace_buffer_ctrl): New.
12395 (TRACE_BUFFER_CTRL_CURR): New.
12396 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12397 Reimplement as macros.
12398 (trace_buffer_wrap): Delete.
12399 (traceframe_write_count, traceframe_read_count)
12400 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12401 (struct tracepoint_hit_ctx) <type>: New field.
12402 (struct fast_tracepoint_ctx): New.
12403 (memory_barrier): New.
12405 (record_tracepoint_error): Update atomically in the IPA.
12406 (clear_inferior_trace_buffer): New.
12407 (about_to_request_buffer_space): New.
12408 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12409 updating the same buffer.
12410 (add_tracepoint): Default the tracepoint's type to trap
12411 tracepoint, and orig_size to -1.
12412 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12413 internal variables.
12414 (create_trace_state_variable): New parameter `gdb'. Handle it.
12415 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12416 (cmd_qtdp): Handle fast tracepoints.
12417 (cmd_qtdv): Adjust.
12418 (max_jump_pad_size): New.
12419 (gdb_jump_pad_head): New.
12420 (get_jump_space_head): New.
12421 (claim_jump_space): New.
12422 (sort_tracepoints): New.
12423 (MAX_JUMP_SIZE): New.
12424 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12426 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12427 support. Upload fast traceframes, and delete internal IPA
12429 (stop_tracing_handler): New.
12430 (flush_trace_buffer_handler): New.
12431 (cmd_qtstop): Upload fast tracepoints.
12432 (response_tracepoint): Handle fast tracepoints.
12433 (tracepoint_finished_step): Upload fast traceframes. Set the
12434 tracepoint hit context's tracepoint type.
12435 (handle_tracepoint_bkpts): New.
12436 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12437 type. Add comment about fast tracepoints.
12438 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12439 non-existing action_str field.
12440 (get_context_regcache): Handle fast tracepoints.
12441 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12443 (fast_tracepoint_from_jump_pad_address): New.
12444 (fast_tracepoint_from_ipa_tpoint_address): New.
12445 (collecting_t): New.
12446 (force_unlock_trace_buffer): New.
12447 (fast_tracepoint_collecting): New.
12449 (gdb_collect): New.
12450 (write_inferior_data_ptr): New.
12451 (target_tp_heap): New.
12452 (target_malloc): New.
12453 (download_agent_expr): New.
12455 (download_tracepoints): New.
12456 (download_trace_state_variables): New.
12457 (upload_fast_traceframes): New.
12458 (IPA_FIRST_TRACEFRAME): New.
12459 (IPA_NEXT_TRACEFRAME_1): New.
12460 (IPA_NEXT_TRACEFRAME): New.
12461 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12462 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12463 (gdb_jump_pad_buffer_end): New.
12464 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12465 (initialize_tracepoint): Adjust.
12466 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12467 buffer. Initialize the low module.
12468 * utils.c (PREFIX, TOOLNAME): New.
12469 (malloc_failure): Use PREFIX.
12470 (error): In the IPA, an error causes an exit.
12471 (fatal, warning): Use PREFIX.
12472 (internal_error): Use TOOLNAME.
12473 (NUMCELLS): Increase to 10.
12474 * configure, config.in: Regenerate.
12476 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12478 * server.c (handle_query) <qSupported>: Do two passes over the
12479 qSupported string to avoid nesting strtok.
12481 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12483 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12485 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12486 -Wl,--dynamic-list.
12487 * configure: Regenerate.
12488 * proc-service.list: New.
12490 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12492 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12495 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12497 * gdbreplay.c (remote_open): Check error return from socket() call by
12498 its equality to -1 not by it being negative.
12499 * remote-utils.c (remote_open): Likewise.
12501 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12503 * config.h: Regenerate.
12505 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12507 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12508 doesn't provide PTRACE_GET_THREAD_AREA.
12510 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12512 * linux-m68k-low.c: Include <asm/ptrace.h>
12513 (ps_get_thread_area): Implement.
12515 2010-05-03 Doug Evans <dje@google.com>
12517 * event-loop.c (struct callback_event): New struct.
12518 (callback_list): New global.
12519 (append_callback_event, delete_callback_event): New functions.
12520 (process_callback): New function.
12521 (start_event_loop): Call it.
12522 * remote-utils.c (NOT_SCHEDULED): Define.
12523 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12524 moved out of readchar.
12525 (readchar): Rewrite. Call reschedule before returning.
12526 (reset_readchar): New function.
12527 (remote_close): Call it.
12528 (process_remaining, reschedule): New functions.
12529 * server.h (callback_handler_func): New typedef.
12530 (append_callback_event, delete_callback_event): Declare.
12532 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12534 * proc-service.c (ps_pglobal_lookup): Use
12535 thread_db_look_up_one_symbol.
12536 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12537 parameter. Use it instead of all_symbols_looked_up.
12538 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12540 (all_symbols_looked_up): Don't declare.
12541 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12542 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12544 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12545 Set all_symbols_looked_up here.
12546 (thread_db_look_up_one_symbol): New.
12547 (thread_db_get_tls_address): Adjust.
12548 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12549 thread_db object on the heap, and tentatively set it in the
12551 (thread_db_init): Don't set all_symbols_looked_up here.
12552 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12554 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12556 * linux-low.c (linux_kill, linux_detach): Adjust.
12557 (status_pending_p_callback): Remove redundant statement. Check
12558 for !TARGET_WAITIKIND_IGNORE, instead of
12559 TARGET_WAITKIND_STOPPED.
12560 (handle_tracepoints): Make sure LWP is locked. Adjust.
12561 (linux_wait_for_event_1): Adjust.
12562 (linux_cancel_breakpoints): New.
12563 (unsuspend_one_lwp): New.
12564 (unsuspend_all_lwps): New.
12565 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12566 (send_sigstop_callback): Change return type to int, add new
12567 `except' parameter and handle it.
12568 (suspend_and_send_sigstop_callback): New.
12569 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12570 pass them down. If SUSPEND, also increment the lwp's suspend
12572 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12573 (need_step_over_p): Don't consider suspended LWPs.
12574 (start_step_over): Adjust.
12575 (proceed_one_lwp): Change return type to int, add new `except'
12576 parameter and handle it.
12577 (unsuspend_and_proceed_one_lwp): New.
12578 (proceed_all_lwps): Use find_inferior instead of
12580 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12581 also decrement the suspend count of LWPs. Pass `except' down,
12582 instead of hacking its suspend count.
12583 (linux_pause_all): Add `freeze' parameter. Adjust.
12584 (linux_unpause_all): New.
12585 (linux_target_ops): Install linux_unpause_all.
12586 * server.c (handle_status): Adjust.
12587 * target.h (struct target_ops): New fields `unpause_all' and
12588 `cancel_breakpoints'. Add new parameter to `pause_all'.
12589 (pause_all): Add new `freeze' parameter.
12590 (unpause_all): New.
12591 (cancel_breakpoints): New.
12592 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12593 cancel breakpoints.
12594 (cmd_qtstart): Pause threads.
12595 (stop_tracing): Pause threads, and cancel breakpoints.
12596 * win32-low.c (win32_target_ops): Adjust.
12598 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12600 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12601 the inferior right away from here...
12602 (linux_wait_1): ... to here, and adjust to check the thread's
12603 last_resume_kind instead of the lwp's step or stop_expected flags.
12605 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12607 * README: Use consistent `GDB' and `GDBserver' spellings.
12609 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12611 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12612 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12613 (linux_detach_one_lwp): Assume the lwp is stopped.
12614 (any_thread_of): Delete.
12615 (linux_detach): Stop all lwps here. Don't blindly delete all
12617 (delete_lwp_callback): New.
12618 (linux_mourn): Delete all lwps of the process that is gone.
12619 (linux_wait_1): Don't delete the last lwp of the process here.
12620 * mem-break.h (mark_breakpoints_out): Declare.
12621 * mem-break.c (mark_breakpoints_out): New.
12622 (free_all_breakpoints): Use it.
12623 * server.c (handle_target_event): If the process is gone, mark
12625 * thread-db.c (struct thread_db) <create_bp>: New field.
12626 (thread_db_enable_reporting): Fix prototype. Store a thread event
12627 breakpoint reference in the thread_db struct.
12628 (thread_db_load_search): Clear the thread_db object.
12629 (try_thread_db_load_1): Ditto.
12630 (switch_to_process): New.
12631 (disable_thread_event_reporting): Use it.
12632 (remove_thread_event_breakpoints): New.
12633 (thread_db_detach, thread_db_mourn): Use it.
12635 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12637 * linux-low.c (linux_enable_event_reporting): New.
12638 (linux_wait_for_event_1, handle_extended_wait): Use it.
12640 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12642 * linux-low.c (linux_kill_one_lwp, linux_kill)
12643 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12644 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12645 SIGSTOP even if the LWP is stopped.
12646 (send_sigstop_callback): New.
12647 (stop_all_lwps): Use send_sigstop_callback instead.
12648 (linux_resume_one_thread): Adjust.
12649 (proceed_one_lwp): Still proceed an LWP that the client has
12650 requested to stop, if we haven't reported it as stopped yet. Make
12651 sure that LWPs the client want stopped, have a pending SIGSTOP.
12653 2010-04-26 Doug Evans <dje@google.com>
12655 * server.c (handle_general_set): Make static.
12657 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12658 Print received char after testing for error/eof instead of before.
12659 (input_interrupt): Tweak comment.
12661 2010-04-23 Doug Evans <dje@google.com>
12663 * server.c (start_inferior): Print inferior argv if --debug.
12665 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12667 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12668 * nto-x86-low.c: Include server.h
12670 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12672 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12673 be consistent with other sources of this directory.
12674 (init_registers_amd64): Correct name of source file of this function
12677 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12679 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12680 64-bit executables.
12682 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12684 * win32-i386-low.c: Add 64-bit support.
12685 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12686 (init_registers_amd64): Declare.
12687 (mappings): Add 64-bit version of array.
12688 (init_windows_x86): New function.
12689 (the_low_target): Change init_arch field to init_windows_x86.
12691 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12693 * win32-low.c: Adapt to support also 64-bit architecture.
12694 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12695 (get_image_name): Use SIZE_T type for local variable `done'.
12696 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12697 (toolhelp_get_dll_name): Idem.
12698 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12699 Use uintptr_t typecast to avoid warning.
12700 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12701 (handle_exception): Use phex_nz to avoid warning.
12702 (win32_wait): Remove unused local variable `process'.
12704 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12706 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12709 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12711 * configure.ac: Use `ws2_32' library for srv_mingw.
12712 * configure: Regenerate.
12713 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12714 * remote-utils.c: Likewise.
12716 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12718 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12719 if __x86_64__ is defined.
12721 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12723 * configure: Regenerate.
12725 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12727 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12728 * target.h (target_ops): New get_tib_address field.
12729 * win32-low.h (win32_thread_info): Add thread_local_base field.
12730 * win32-low.c (child_add_thread): Add tlb argument.
12731 Set thread_local_base field to TLB.
12732 (get_child_debug_event): Adapt to child_add_thread change.
12733 (win32_get_tib_address): New function.
12734 (win32_target_ops): Set get_tib_address field to
12735 win32_get_tib_address.
12736 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12738 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12740 * linux-low.c (linux_mourn): Also remove the process.
12741 * server.c (handle_target_event): Don't remove the process here.
12742 * nto-low.c (nto_mourn): New.
12743 (nto_target_ops): Install it.
12744 * spu-low.c (spu_mourn): New.
12745 (spu_target_ops): Install it.
12746 * win32-low.c (win32_mourn): New.
12747 (win32_target_ops): Install it.
12749 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12751 * server.h (buffer_xml_printf): Remove redundant `;'.
12753 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12755 * regcache.c (set_register_cache): Invalidate regcaches before
12756 changing the register cache layout.
12757 (regcache_invalidate_one): Allow a NULL regcache.
12758 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12759 regcaches before changing the register cache layout or the target
12762 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12764 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12765 variable warning on Linux/x86-64.
12767 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12769 GDBserver disconnected tracing support.
12771 * linux-low.c (linux_remove_process): Delete.
12772 (add_lwp): Don't set last_resume_kind here.
12773 (linux_kill): Use `mourn'.
12774 (linux_detach): Use `thread_db_detach', and `mourn'.
12775 (linux_mourn): New.
12776 (linux_attach_lwp_1): Adjust comment.
12777 (linux_attach): last_resume_kind moved the thread_info; adjust.
12778 (status_pending_p_callback): Adjust.
12779 (linux_wait_for_event_1): Adjust.
12780 (count_events_callback, select_singlestep_lwp_callback)
12781 (select_event_lwp_callback, cancel_breakpoints_callback)
12782 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12783 (proceed_one_lwp): Adjust.
12784 (linux_async): Add debug output.
12785 (linux_thread_stopped): New.
12786 (linux_pause_all): New.
12787 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12789 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12790 (thread_db_free): Delete declaration.
12791 (thread_db_detach, thread_db_mourn): Declare.
12792 * thread-db.c (thread_db_init): Use thread_db_mourn.
12793 (thread_db_free): Delete, split in two.
12794 (disable_thread_event_reporting): New.
12795 (thread_db_detach): New.
12796 (thread_db_mourn): New.
12798 * server.h (struct thread_info) <last_resume_kind>: New field.
12799 <attached>: Add comment.
12800 <gdb_detached>: New field.
12801 (handler_func): Change return type to int.
12802 (handle_serial_event, handle_target_event): Ditto.
12803 (gdb_connected): Declare.
12805 (disconnected_tracing): Declare.
12806 (stop_tracing): Declare.
12808 * server.c (handle_query) <qSupported>: Report support for
12809 disconnected tracing.
12810 (queue_stop_reply_callback): Account for running threads.
12811 (gdb_wants_thread_stopped): New.
12812 (gdb_wants_all_threads_stopped): New.
12813 (gdb_reattached_process): New.
12814 (handle_status): Clear the `gdb_detached' flag of all processes.
12815 In all-stop, stop all threads.
12816 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12817 (process_serial_event): If the remote connection breaks, or if an
12818 exit was forced with "monitor exit", force an event loop exit.
12819 Handle disconnected tracing on detach.
12820 (handle_serial_event): Adjust.
12821 (handle_target_event): If GDB isn't connected, forward events back
12822 to the inferior, unless the last process exited, in which case,
12823 exit gdbserver. Adjust interface.
12825 * remote-utils.c (remote_open): Don't block in accept. Instead
12826 register an event loop source on the listen socket file
12827 descriptor. Refactor bits into ...
12828 (listen_desc): ... this new global.
12829 (gdb_connected): ... this new function.
12830 (enable_async_notification): ... this new function.
12831 (handle_accept_event): ... this new function.
12832 (remote_close): Clear remote_desc.
12834 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12836 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12838 (mourn_inferior): Define.
12839 (target_process_qsupported): Avoid the dangling else problem.
12840 (thread_stopped): Define.
12841 (pause_all): Define.
12842 (target_waitstatus_to_string): Declare.
12843 * target.c (target_waitstatus_to_string): New.
12845 * tracepoint.c (tracing): Make extern.
12846 (disconnected_tracing): New.
12847 (stop_tracing): Make extern. Handle tracing stops due to GDB
12849 (cmd_qtdisconnected): New.
12850 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12851 (handle_tracepoint_general_set): Handle QTDisconnected.
12853 * event-loop.c (event_handler_func): Change return type to int.
12854 (process_event): Bail out if the event handler wants the event
12856 (handle_file_event): Ditto.
12857 (start_event_loop): Bail out if the event handler wants the event
12860 * nto-low.c (nto_target_ops): Adjust.
12861 * spu-low.c (spu_wait): Don't remove the process here.
12862 (spu_target_ops): Adjust.
12863 * win32-low.c (win32_wait): Don't remove the process here.
12864 (win32_target_ops): Adjust.
12866 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12868 * regcache.c (realloc_register_cache): Invalidate inferior's
12869 regcache before recreating it.
12871 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12873 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12875 2010-04-09 Stan Shebs <stan@codesourcery.com>
12876 Pedro Alves <pedro@codesourcery.com>
12878 * server.h (LONGEST): New.
12879 (struct thread_info) <while_stepping>: New field.
12880 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12882 (initialize_tracepoint, handle_tracepoint_general_set)
12883 (handle_tracepoint_query, tracepoint_finished_step)
12884 (tracepoint_was_hit, release_while_stepping_state_list):
12885 (current_traceframe): Declare.
12886 * server.c (handle_general_set): Handle tracepoint packets.
12887 (read_memory): New.
12888 (write_memory): New.
12889 (handle_search_memory_1): Use read_memory.
12890 (handle_query): Report support for conditional tracepoints, trace
12891 state variables, and tracepoint sources. Handle tracepoint
12893 (main): Initialize the tracepoints module.
12894 (process_serial_event): Handle traceframe reads/writes.
12896 * linux-low.c (handle_tracepoints): New.
12897 (linux_wait_1): Call it.
12898 (linux_resume_one_lwp): Handle while-stepping.
12899 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12900 (linux_target_ops): Install them.
12901 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12903 * linux-x86-low.c (x86_supports_tracepoints): New.
12904 (the_low_target). Install it.
12906 * mem-break.h (delete_breakpoint): Declare.
12907 * mem-break.c (delete_breakpoint): Make external.
12909 * target.h (struct target_ops): Add `supports_tracepoints',
12910 `read_pc', and `write_pc' fields.
12911 (target_supports_tracepoints): Define.
12912 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12915 * regcache.h (struct regcache) <registers_owned>: New field.
12916 (init_register_cache, regcache_cpy): Declare.
12917 (regcache_read_pc, regcache_write_pc): Declare.
12918 (register_cache_size): Declare.
12919 (supply_regblock): Declare.
12920 * regcache.c (init_register_cache): New.
12921 (new_register_cache): Use it.
12922 (regcache_cpy): New.
12923 (register_cache_size): New.
12924 (supply_regblock): New.
12925 (regcache_read_pc, regcache_write_pc): New.
12927 * tracepoint.c: New.
12929 * Makefile.in (OBS): Add tracepoint.o.
12930 (tracepoint.o): New rule.
12932 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12934 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12936 (i386-mmx.c): Likewise.
12937 (i386-mmx-linux.o): Likewise.
12938 (i386-mmx-linux.c): Likewise.
12940 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12941 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12942 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12943 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12945 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12946 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12947 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12949 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12951 * Makefile.in (clean): Updated.
12953 (i386-avx.c): Likewise.
12954 (i386-avx-linux.o): Likewise.
12955 (i386-avx-linux.c): Likewise.
12956 (amd64-avx.o): Likewise.
12957 (amd64-avx.c): Likewise.
12958 (amd64-avx-linux.o): Likewise.
12959 (amd64-avx-linux.c): Likewise.
12961 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12962 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12963 (srv_amd64_regobj): Add amd64-avx.o.
12964 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12965 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12966 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12967 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12968 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12969 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12970 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12972 * i387-fp.c: Include "i386-xstate.h".
12974 (i387_cache_to_xsave): Likewise.
12975 (i387_xsave_to_cache): Likewise.
12976 (x86_xcr0): Likewise.
12978 * i387-fp.h (i387_cache_to_xsave): Likewise.
12979 (i387_xsave_to_cache): Likewise.
12980 (x86_xcr0): Likewise.
12982 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12983 * linux-crisv32-low.c (target_regsets): Likewise.
12984 * linux-m68k-low.c (target_regsets): Likewise.
12985 * linux-mips-low.c (target_regsets): Likewise.
12986 * linux-ppc-low.c (target_regsets): Likewise.
12987 * linux-s390-low.c (target_regsets): Likewise.
12988 * linux-sh-low.c (target_regsets): Likewise.
12989 * linux-sparc-low.c (target_regsets): Likewise.
12990 * linux-xtensa-low.c (target_regsets): Likewise.
12992 * linux-low.c: Include <sys/uio.h>.
12993 (regsets_fetch_inferior_registers): Support nt_type.
12994 (regsets_store_inferior_registers): Likewise.
12995 (linux_process_qsupported): New.
12996 (linux_target_ops): Add linux_process_qsupported.
12998 * linux-low.h (regset_info): Add nt_type.
12999 (linux_target_ops): Add process_qsupported.
13001 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13003 (init_registers_i386_avx_linux): New.
13004 (init_registers_amd64_avx_linux): Likewise.
13005 (xmltarget_i386_linux_no_xml): Likewise.
13006 (xmltarget_amd64_linux_no_xml): Likewise.
13007 (PTRACE_GETREGSET): Likewise.
13008 (PTRACE_SETREGSET): Likewise.
13009 (x86_fill_xstateregset): Likewise.
13010 (x86_store_xstateregset): Likewise.
13011 (use_xml): Likewise.
13012 (x86_linux_update_xmltarget): Likewise.
13013 (x86_linux_process_qsupported): Likewise.
13014 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13015 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13016 init_registers_i386_linux here. Call
13017 x86_linux_update_xmltarget.
13018 (the_low_target): Add x86_linux_process_qsupported.
13020 * server.c (handle_query): Call target_process_qsupported.
13022 * target.h (target_ops): Add process_qsupported.
13023 (target_process_qsupported): New.
13025 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13027 * inferiors.c (add_thread): Set last_status kind to
13028 TARGET_WAITKIND_IGNORE.
13029 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13030 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13031 (linux_wait_1): Move `thread' local definition to block that uses
13032 it. Don't NULL initialize `event_child'.
13033 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13034 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13035 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13037 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13039 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13040 an extended waitstatus, or by a watchpoint.
13041 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13042 thread was stepping or has been stopped by a watchpoint.
13044 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13046 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13047 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13048 of another, then delete the previous, and validate all
13050 (validate_inserted_breakpoint): New.
13051 (delete_disabled_breakpoints): New.
13052 (validate_breakpoints): New.
13053 (check_mem_read): Validate breakpoints before trusting their
13054 shadow. Delete disabled breakpoints.
13055 (check_mem_write): Validate breakpoints before trusting they
13056 should be inserted. Delete disabled breakpoints.
13057 * mem-break.h (validate_breakpoints):
13058 * server.c (handle_query): Validate breakpoints when we see a
13061 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13063 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13064 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13065 if we could tell there's a GDB breakpoint at stop_pc.
13066 (need_step_over_p): Don't do a step over if we find a GDB
13067 breakpoint at the resume PC.
13069 * mem-break.c (struct raw_breakpoint): New.
13070 (enum bkpt_type): New type `gdb_breakpoint'.
13071 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13072 fields. New field `raw'.
13073 (find_raw_breakpoint_at): New.
13074 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13075 breakpoint instead.
13076 (set_breakpoint_at): Adjust.
13077 (delete_raw_breakpoint): New.
13078 (release_breakpoint): New.
13079 (delete_breakpoint): Rename to...
13080 (delete_breakpoint_1): ... this. Add proc parameter. Use
13081 release_breakpoint. Return ENOENT.
13082 (delete_breakpoint): Reimplement.
13083 (find_breakpoint_at): Delete.
13084 (find_gdb_breakpoint_at): New.
13085 (delete_breakpoint_at): Delete.
13086 (set_gdb_breakpoint_at): New.
13087 (delete_gdb_breakpoint_at): New.
13088 (gdb_breakpoint_here): New.
13089 (set_reinsert_breakpoint): Use release_breakpoint.
13090 (uninsert_breakpoint): Rename to ...
13091 (uninsert_raw_breakpoint): ... this.
13092 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13093 (reinsert_raw_breakpoint): Change parameter type to
13095 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13097 (check_breakpoints): Adjust. Use release_breakpoint.
13098 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13099 (breakpoint_inserted_here): Ditto.
13100 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13101 Don't trust the breakpoint's shadow if it is not inserted.
13102 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13103 (delete_all_breakpoints): Adjust.
13104 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13105 use delete_breakpoint_1.
13107 * mem-break.h (breakpoints_supported): Delete declaration.
13108 (set_gdb_breakpoint_at): Declare.
13109 (gdb_breakpoint_here): Declare.
13110 (delete_breakpoint_at): Delete.
13111 (delete_gdb_breakpoint_at): Declare.
13113 * server.h (struct raw_breakpoint): Forward declare.
13114 (struct process_info): New field `raw_breakpoints'.
13116 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13119 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13121 * linux-low.c (status_pending_p_callback): Fix comment.
13122 (linux_wait_for_event_1): Move most of the internal breakpoint
13123 handling from here...
13124 (linux_wait_1): ... to here.
13125 (count_events_callback): New.
13126 (select_singlestep_lwp_callback): New.
13127 (select_event_lwp_callback): New.
13128 (cancel_breakpoints_callback): New.
13129 (select_event_lwp): New.
13130 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13131 priority to all LWPs that have had events that should be reported
13132 to the client. Cancel breakpoints when about to reporting the
13133 event to the client, not while stopping lwps. No longer cancel
13134 finished single-steps here.
13135 (cancel_finished_single_step): Delete.
13136 (cancel_finished_single_steps): Delete.
13138 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13140 * mem-break.c (enum bkpt_type): New.
13141 (struct breakpoint): New field `type'.
13142 (set_breakpoint_at): Change return type to struct breakpoint
13143 pointer. Set type to `other_breakpoint' by default.
13144 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13145 in the breakpoint list.
13146 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13147 (reinsert_breakpoint): Rename to ...
13148 (reinsert_raw_breakpoint): ... this.
13149 (reinsert_breakpoints_at): Adjust.
13150 * mem-break.h (struct breakpoint): Declare.
13151 (set_breakpoint_at): Change return type to struct breakpoint
13154 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13156 * server.c (handle_query): Assign, not compare.
13158 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13160 Teach linux gdbserver to step-over-breakpoints.
13162 * linux-low.c (can_hardware_single_step): New.
13163 (supports_breakpoints): New.
13164 (handle_extended_wait): If stopping threads, read the stop pc of
13165 the new cloned LWP.
13167 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13168 low target doesn't support retrieving the PC.
13169 (add_lwp): Set last_resume_kind to resume_continue.
13170 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13171 (linux_attach): Don't clear stop_expected. Set the lwp's
13172 last_resume_kind to resume_stop.
13173 (linux_detach_one_lwp): Don't check for removed breakpoints.
13174 (check_removed_breakpoint): Delete.
13175 (status_pending_p): Rename to ...
13176 (status_pending_p_callback): ... this. Don't check for removed
13177 breakpoints. Don't consider threads that are stopped from GDB's
13179 (linux_wait_for_lwp): Always read the stop_pc here.
13180 (cancel_breakpoint): New.
13181 (step_over_bkpt): New global.
13182 (linux_wait_for_event_1): Implement stepping over breakpoints.
13183 (gdb_wants_lwp_stopped): New.
13184 (gdb_wants_all_stopped): New.
13185 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13186 single-step traps here. Store the thread's last reported target
13188 (send_sigstop): Don't clear stop_expected. Always set it,
13190 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13191 (cancel_finished_single_step): New.
13192 (cancel_finished_single_steps): New.
13193 (wait_for_sigstop): Don't cancel finished single-step traps here.
13194 (linux_resume_one_lwp): Don't check for removed breakpoints.
13195 Don't set `step' on non-hardware step archs.
13196 (linux_set_resume_request): Ignore resume_stop requests if already
13197 stopping or stopped. Set the lwp's last_resume_kind.
13198 (resume_status_pending_p): Don't check for removed breakpoints.
13199 (need_step_over_p): New.
13200 (start_step_over): New.
13201 (finish_step_over): New.
13202 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13203 requests. Clear the thread's last reported target waitstatus.
13204 Don't use the `suspended' flag. Don't consider pending breakpoints.
13205 (linux_resume): Start a step-over if necessary.
13206 (proceed_one_lwp): New.
13207 (proceed_all_lwps): New.
13208 (unstop_all_lwps): New.
13209 * linux-low.h (struct lwp_info): Rewrite comment for the
13210 `suspended' flag. Add the `stop_pc' field. Delete the
13211 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13212 Add `'last_resume_kind' and `need_step_over' fields.
13213 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13214 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13215 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13216 (set_raw_breakpoint_at): New.
13217 (set_breakpoint_at): Rewrite to use it.
13218 (reinsert_breakpoint_handler): Delete.
13219 (set_reinsert_breakpoint): New.
13220 (reinsert_breakpoint_by_bp): Delete.
13221 (delete_reinsert_breakpoints): New.
13222 (uninsert_breakpoint): Rewrite.
13223 (uninsert_breakpoints_at): New.
13224 (reinsert_breakpoint): Rewrite.
13225 (reinsert_breakpoints_at): New.
13226 (check_breakpoints): Rewrite.
13227 (breakpoint_here): New.
13228 (breakpoint_inserted_here): New.
13229 (check_mem_read): Adjust.
13230 * mem-break.h (breakpoints_supported, breakpoint_here)
13231 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13232 (reinsert_breakpoint_by_bp): Delete declaration.
13233 (delete_reinsert_breakpoints): Declare.
13234 (reinsert_breakpoint): Delete declaration.
13235 (reinsert_breakpoints_at): Declare.
13236 (uninsert_breakpoint): Delete declaration.
13237 (uninsert_breakpoints_at): Declare.
13238 (check_breakpoints): Adjust prototype.
13239 * server.h: Adjust include order.
13240 (struct thread_info): Declare here. Add a `last_status' field.
13242 2010-03-23 Michael Snyder <msnyder@vmware.com>
13244 * server.c (crc32): New function.
13245 (handle_query): Add handling for 'qCRC:' request.
13247 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13249 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13250 lwp had been stopped by a watchpoint.
13252 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13254 * server.h (internal_error): Declare.
13255 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13256 * utils.c (internal_error): New function.
13258 2010-03-15 Andreas Schwab <schwab@redhat.com>
13260 * configure.srv: Fix typo setting srv_regobj.
13262 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13264 * linux-low.c (fetch_register): Avoid passing a non string literal
13266 (usr_store_inferior_registers): Ditto.
13268 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13270 * linux-low.c (linux_write_memory): Bail out early if peeking
13273 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13275 * linux-low.h (struct lwp_info): New fields
13276 `stopped_by_watchpoint' and `stopped_data_address'.
13277 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13278 here, and cache them in the lwp object.
13279 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13281 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13283 (linux_stopped_by_watchpoint): Rewrite.
13284 (linux_stopped_data_address): Rewrite.
13286 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13288 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13289 switching the current inferior, not before.
13291 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13293 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13294 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13295 i386-linux.c and amd64-linux.c.
13296 (reg-i386.o): Removed.
13297 (reg-i386.c): Likewise.
13298 (reg-i386-linux.o): Likewise.
13299 (reg-i386-linux.c): Likewise.
13300 (reg-x86-64.o): Likewise.
13301 (reg-x86-64.c): Likewise.
13302 (reg-x86-64-linux.o): Likewise.
13303 (reg-x86-64-linux.c): Likewise.
13305 (i386.c): Likewise.
13306 (i386-linux.o): Likewise.
13307 (i386-linux.c): Likewise.
13308 (amd64.o): Likewise.
13309 (amd64.c): Likewise.
13310 (amd64-linux.o): Likewise.
13311 (amd64-linux.c): Likewise.
13313 * configure.srv (srv_i386_regobj): New.
13314 (srv_i386_linux_regobj): Likewise.
13315 (srv_amd64_regobj): Likewise.
13316 (srv_amd64_linux_regobj): Likewise.
13317 (srv_i386_32bit_xmlfiles): Likewise.
13318 (srv_i386_64bit_xmlfiles): Likewise.
13319 (srv_i386_xmlfiles): Likewise.
13320 (srv_amd64_xmlfiles): Likewise.
13321 (srv_i386_linux_xmlfiles): Likewise.
13322 (srv_amd64_linux_xmlfiles): Likewise.
13323 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13324 srv_xmlfiles to $srv_i386_xmlfiles.
13325 (i[34567]86-*-mingw32ce*): Likewise.
13326 (i[34567]86-*-mingw*): Likewise.
13327 (i[34567]86-*-nto*): Likewise.
13328 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13329 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13330 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13331 (x86_64-*-linux*): Likewise.
13333 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13334 (init_registers_amd64_linux): New.
13335 (x86_arch_setup): Replace init_registers_x86_64_linux with
13336 init_registers_amd64_linux.
13338 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13340 * configure.ac: Check for libdl. If it is not available link against
13341 static libthread_db.
13342 * configure: Regenerate.
13344 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13348 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13349 handing a read watchpoint.
13350 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13352 2010-02-12 Doug Evans <dje@google.com>
13354 * linux-low.c (linux_supports_tracefork_flag): Document.
13355 (linux_look_up_symbols): Add comment.
13357 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13359 * regcache.c (supply_register): Clear regcache if buf is NULL.
13361 2010-02-02 Nicolas Roche <roche@sourceware.org>
13362 Joel Brobecker <brobecker@adacore.com>
13364 * inferiors.c (find_inferior): Add function documentation.
13365 (unloaded_dll): Handle the case where the unloaded dll has not
13366 been previously registered in the dll list.
13368 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13370 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13371 (thumb2_breakpoint): New.
13372 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13374 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13376 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13377 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13380 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13382 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13384 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13386 * linux-s390-low.c (s390_collect_ptrace_register)
13387 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13389 2010-01-21 Doug Evans <dje@google.com>
13391 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13392 (PTRACE_ARG4_TYPE): New macro.
13393 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13394 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13395 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13396 (usr_store_inferior_registers): Ditto.
13397 (linux_read_memory, linux_write_memory): Ditto.
13398 (linux_test_for_tracefork): Ditto.
13400 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13401 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13403 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13405 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13408 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13410 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13411 prototype to take a regcache. Adjust.
13413 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13415 * regcache.h (struct thread_info): Forward declare.
13416 (struct regcache): New.
13417 (new_register_cache): Adjust prototype.
13418 (get_thread_regcache): Declare.
13419 (free_register_cache): Adjust prototype.
13420 (registers_to_string, registers_from_string): Ditto.
13421 (supply_register, supply_register_by_name, collect_register)
13422 (collect_register_as_string, collect_register_by_name): Ditto.
13423 * regcache.c (struct inferior_regcache_data): Delete.
13424 (get_regcache): Rename to ...
13425 (get_thread_regcache): ... this. Adjust. Switch inferior before
13426 fetching registers.
13427 (regcache_invalidate_one): Adjust.
13428 (regcache_invalidate): Fix prototype.
13429 (new_register_cache): Return the new register cache.
13430 (free_register_cache): Change prototype.
13431 (realloc_register_cache): Adjust.
13432 (registers_to_string): Change prototype to take a regcache. Adjust.
13433 (registers_from_string): Ditto.
13434 (register_data): Ditto.
13435 (supply_register): Ditto.
13436 (supply_register_by_name): Ditto.
13437 (collect_register): Ditto.
13438 (collect_register_as_string): Ditto.
13439 (collect_register_by_name): Ditto.
13440 * server.c (process_serial_event): Adjust.
13441 * linux-low.h (regset_fill_func, regset_store_func): Change
13443 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13445 * linux-low.c (get_stop_pc): Adjust.
13446 (check_removed_breakpoint): Adjust.
13447 (linux_wait_for_event): Adjust.
13448 (linux_resume_one_lwp): Adjust.
13449 (fetch_register): Add regcache parameter. Adjust.
13450 (usr_store_inferior_registers): Ditto.
13451 (regsets_fetch_inferior_registers): Ditto.
13452 (regsets_store_inferior_registers): Ditto.
13453 (linux_fetch_registers, linux_store_registers): Ditto.
13454 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13456 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13458 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13459 prototype to take a regcache.
13460 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13461 * remote-utils.c (convert_ascii_to_int, outreg)
13462 (prepare_resume_reply): Change prototype to take a regcache.
13464 * target.h (struct target_ops) <fetch_registers, store_registers>:
13465 Change prototype to take a regcache.
13466 (fetch_inferior_registers, store_inferior_registers): Change
13467 prototype to take a regcache. Adjust.
13468 * proc-service.c (ps_lgetregs): Adjust.
13469 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13470 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13471 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13472 take a regcache. Adjust.
13473 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13474 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13475 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13476 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13477 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13478 (cris_cannot_fetch_register):
13479 (cris_breakpoint_at): Change prototype to take a regcache.
13481 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13482 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13483 to take a regcache. Adjust.
13484 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13486 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13487 take a regcache. Adjust.
13488 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13489 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13490 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13491 * linux-mips-low.c (mips_get_pc):
13492 (mips_set_pc): Change prototype to take a regcache. Adjust.
13493 (mips_reinsert_addr): Adjust.
13494 (mips_collect_register): Change prototype to take a regcache.
13496 (mips_supply_register):
13497 (mips_collect_register_32bit, mips_supply_register_32bit)
13498 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13499 (mips_store_fpregset): Ditto.
13500 * linux-ppc-low.c (ppc_supply_ptrace_register)
13501 (ppc_supply_ptrace_register): Ditto.
13502 (parse_spufs_run): Adjust.
13503 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13504 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13505 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13506 take a regcache. Adjust.
13507 * linux-s390-low.c (s390_collect_ptrace_register)
13508 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13509 (s390_set_pc): Change prototype to take a regcache. Adjust.
13510 (s390_arch_setup): Adjust.
13511 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13512 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13513 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13514 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13515 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13517 (sparc_breakpoint_at): Adjust.
13518 * linux-xtensa-low.c (xtensa_fill_gregset):
13519 (xtensa_store_gregset):
13520 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13521 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13522 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13523 prototype to take a regcache. Adjust.
13524 * win32-arm-low.c (arm_fetch_inferior_register)
13525 (arm_store_inferior_register): Change prototype to take a
13527 * win32-i386-low.c (i386_fetch_inferior_register)
13528 (i386_store_inferior_register): Change prototype to take a
13530 * win32-low.c (child_fetch_inferior_registers)
13531 (child_store_inferior_registers): Change prototype to take a
13533 (win32_wait): Adjust.
13534 (win32_fetch_inferior_registers): Change prototype to take a
13536 (win32_store_inferior_registers): Adjust.
13537 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13538 store_inferior_register>: Change prototype to take a regcache.
13540 2010-01-20 Doug Evans <dje@google.com>
13542 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13544 (linux_wait_for_event1, linux_init_signals): Ditto.
13545 (W_STOPCODE): Provide definition if missing.
13547 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13549 * linux-low.c (linux_core_of_thread): New.
13550 (compare_ints, show_process, list_threads): New.
13551 (linux_qxfer_osdata): Report threads and cores.
13552 (linux_target_op): Register linux_core_of_thread.
13553 * remote-utils.c (prepare_resume_reply): Report the core.
13554 (buffer_xml_printf): Support %d specifier.
13555 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13557 (handle_query): Handle qXfer:threads. Announce availability
13559 * target.h (struct target_ops): New field core_of_thread.
13561 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13563 * Makefile.in (clean): Remove new generated files.
13564 (reg-s390.o, reg-s390.c): Remove rules.
13565 (reg-s390x.o, reg-s390x.c): Likewise.
13566 (s390-linux32.o, s390-linux32.c): Add rules.
13567 (s390-linux64.o, s390-linux64.c): Likewise.
13568 (s390x-linux64.o, s390x-linux64.c): Likewise.
13569 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13570 * linux-s390-low.c: Include <elf.h>.
13571 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13572 (init_registers_s390): Remove prototype.
13573 (init_registers_s390x): Likewise.
13574 (init_registers_s390_linux32): Add prototype.
13575 (init_registers_s390_linux64): Likewise.
13576 (init_registers_s390x_linux64): Likewise.
13577 (s390_num_regs_3264): New define.
13578 (s390_regmap_3264): New global variable.
13579 (s390_cannot_fetch_register): Remove obsolete check.
13580 (s390_cannot_store_register): Likewise.
13581 (s390_collect_ptrace_register): Handle upper/lower register halves.
13582 (s390_supply_ptrace_register): Likewise.
13583 (s390_fill_gregset): Update to register number changes.
13584 (s390_get_hwcap): New routine.
13585 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13586 Install appropriate regmap and register set.
13588 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13590 * server.c (gdbserver_version): Update copyright year to 2010.
13591 * gdbreplay.c (gdbreplay_version): Likewise.
13593 2009-12-28 Doug Evans <dje@google.com>
13595 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13596 elf/external.h. Include <elf.h> instead but only if necessary.
13598 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13600 * linux-low.c (linux_remove_process): Remove `detaching'
13601 parameter. Don't release/detach from thread_db here.
13602 (linux_kill): Release/detach from thread_db here, ...
13603 (linux_detach): ... and here, before actually detaching.
13604 (linux_wait_1): ... and here, when a process exits.
13605 * thread-db.c (any_thread_of): New.
13606 (thread_db_free): Switch the current inferior to a thread of the
13609 2009-12-21 Doug Evans <dje@google.com>
13611 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13613 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13614 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13615 warning ifndef __NR_tkill. Move setting of errno there too.
13616 Delete unnecessary resetting of errno after syscall.
13617 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13619 * configure.ac: Check for dladdr.
13620 * config.in: Regenerate.
13621 * configure: Regenerate.
13622 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13623 (try_thread_db_load): Update.
13625 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13627 2009-12-18 Doug Evans <dje@google.com>
13629 * event-loop.c: Include unistd.h if it exists.
13631 * linux-low.c (my_waitpid): Move definition away from being in
13632 between linux_tracefork_child/linux_test_for_tracefork.
13634 * gdb_proc_service.h (psaddr_t): Fix type.
13635 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13636 signature to match glibc.
13638 2009-12-16 Doug Evans <dje@google.com>
13640 * linux-low.c (linux_read_memory): Fix argument to read.
13642 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13644 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13645 events, don't leave current_inferior pointing at null.
13647 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13649 * win32-low.c (LOG): Delete.
13650 (OUTMSG): Output to stderr.
13651 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13652 on compile time LOG macro.
13653 (win32_wait): Fix debug output.
13655 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13657 * win32-low.c (win32_add_one_solib): If the dll name is
13658 "ntdll.dll", prepend the system directory to the dll path.
13660 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13662 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13664 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13665 Vladimir Prus <vladimir@codesourcery.com>
13667 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13668 * configure.ac: Check for __mcoldfire__ and set
13669 gdb_cv_m68k_is_coldfire.
13670 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13671 reg-cf.o and reg-m68k.o.
13672 * configure: Regenerated.
13674 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13676 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13677 Pass it to thread_db_free.
13678 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13679 proper `detaching' argument to linux_remove_process.
13680 * linux-low.h (thread_db_free): Add `detaching' parameter.
13681 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13683 (thread_db_free): Add `detaching' parameter. Only
13684 call td_ta_clear_event if detaching from process.
13686 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13688 * thread-db.c (thread_db_free): Fix typo.
13690 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13693 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13695 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13697 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13698 with an i686 compiler.
13699 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13701 * configure: Rebuilt.
13703 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13707 * server.c (handle_search_memory_1): Correct read_addr initialization
13708 in loop for searching subsequent chunks.
13710 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13712 * configure.ac: New --with-libthread-db option.
13713 * thread-db.c: Allow direct dependence on libthread_db.
13714 (thread_db_free): Adjust.
13715 * config.in: Regenerate.
13716 * configure: Likewise.
13718 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13721 * thread-db.c (attach_thread): New function.
13722 (maybe_attach_thread): Return success/failure.
13723 (find_new_threads_callback): Adjust.
13724 (thread_db_find_new_threads): Loop until no new threads.
13726 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13728 * proc-service.c (ps_lgetregs): Formatting.
13730 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13732 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13733 * configure.ac: Adjust.
13734 * linux-low.h (struct process_info_private): Move members to struct
13736 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13737 * linux-low.c (linux_remove_process): Adjust.
13738 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13739 * server.c (handle_query): Move code ...
13740 (handle_monitor_command): ... here. New function.
13741 * target.h (struct target_ops): New member.
13742 * thread-db.c (struct thread_db): New.
13743 (libthread_db_search_path): New variable.
13744 (thread_db_create_event, thread_db_enable_reporting)
13745 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13746 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13747 (try_thread_db_load_1, dladdr_to_soname): New functions.
13748 (try_thread_db_load, thread_db_load_search): New functions.
13749 (thread_db_init): Search for libthread_db.
13750 (thread_db_free): New function.
13751 (thread_db_handle_monitor_command): Likewise.
13752 * config.in: Regenerate.
13753 * configure: Regenerate.
13755 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13757 * spu-low.c (spu_kill): Wait for inferior to terminate.
13758 Call clear_inferiors.
13759 (spu_detach): Call clear_inferiors.
13761 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13763 * aclocal.m4: Regenerate.
13764 * config.in: Likewise.
13765 * configure: Likewise.
13767 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13769 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13770 (parse_spufs_run): New function.
13771 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13772 (ppc_breakpoint_at): Handle SPU breakpoints.
13774 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13776 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13777 (SPUFS_MAGIC): Define.
13778 (spu_enumerate_spu_ids): New function.
13779 (linux_qxfer_spu): New function.
13780 (linux_target_ops): Install linux_qxfer_spu.
13782 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13784 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13785 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13786 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13787 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13788 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13789 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13790 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13791 (init_registers_powerpc_cell32l): Add prototype.
13792 (init_registers_powerpc_cell64l): Likewise.
13793 (ppc_arch_setup): Detect Cell/B.E. architecture.
13795 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13797 * Makefile.in (datarootdir): New variable.
13799 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13801 * linux-low.c (linux_write_memory): Update debugging output.
13802 * Makefile.in (clean): Add new descriptions.
13803 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13804 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13805 * configure.srv: Add new files for arm*-*-linux*.
13806 * linux-arm-low.c: Add new declarations.
13807 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13808 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13809 (HWCAP_VFPv3D16): New.
13810 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13811 instead of __IWMMXT__.
13812 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13813 (arm_arch_setup): New.
13814 (target_regsets): Remove #ifdef. Add VFP regset.
13815 (the_low_target): Use arm_arch_setup.
13817 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13819 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13820 the main thread again.
13822 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13824 Adding Neutrino gdbserver.
13825 * configure: Regenerated.
13826 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13827 * configure.srv (i[34567]86-*-nto*): New target.
13828 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13829 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13830 (nto_comctrl) [__QNX__]: New function.
13831 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13833 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13835 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13838 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13839 Pedro Alves <pedro@codesourcery.com>
13841 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13842 don't support CONTEXT_EXTENDED_REGISTERS.
13843 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13844 (the_low_target): Install them.
13845 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13846 failing with ERROR_PIPE_NOT_CONNECTED.
13848 2009-06-30 Doug Evans <dje@google.com>
13849 Pierre Muller <muller@ics.u-strasbg.fr>
13851 Add h/w watchpoint support to x86-linux, win32-i386.
13852 * Makefile.in (SFILES): Add i386-low.c
13853 (i386_low_h): Define.
13854 (i386-low.o): Add dependencies.
13855 (linux-x86-low.o): Add i386-low.h dependency.
13856 (win32-i386-low.o): Ditto.
13857 * i386-low.c: New file.
13858 * i386-low.h: New file.
13859 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13860 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13861 * linux-low.c (linux_add_process): Initialize arch_private.
13862 (linux_remove_process): Free arch_private.
13863 (add_lwp): Initialize arch_private.
13864 (delete_lwp): Free arch_private.
13865 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13867 * linux-low.h (process_info_private): New member arch_private.
13868 (lwp_info): New member arch_private.
13869 (linux_target_ops): New members new_process, new_thread,
13871 (ptid_of): New macro.
13872 * linux-x86-low.c: Include stddef.h, i386-low.h.
13873 (arch_process_info): New struct.
13874 (arch_lwp_info): New struct.
13875 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13876 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13877 (i386_dr_low_get_status): New function.
13878 (x86_insert_point, x86_remove_point): New functions.
13879 (x86_stopped_by_watchpoint): New function.
13880 (x86_stopped_data_address): New function.
13881 (x86_linux_new_process, x86_linux_new_thread): New functions.
13882 (x86_linux_prepare_to_resume): New function.
13883 (the_low_target): Add entries for insert_point, remove_point,
13884 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13886 * server.c (debug_hw_points): New global.
13887 (monitor_show_help): Document set debug-hw-points.
13888 (handle_query): Process "set debug-hw-points".
13889 * server.h (debug_hw_points): Declare.
13890 (paddress): Declare.
13891 * utils.c (NUMCELLS, CELLSIZE): New macros.
13892 (get_sell, xsnprintf, paddress): New functions.
13893 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13894 remove_point, stopped_by_watchpoint, stopped_data_address.
13895 * win32-i386-low.c: Include i386-low.h.
13896 (debug_reg_state): Replaces dr.
13897 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13898 (i386_dr_low_get_status): New function.
13899 (i386_insert_point, i386_remove_point): New functions.
13900 (i386_stopped_by_watchpoint): New function.
13901 (i386_stopped_data_address): New function.
13902 (i386_initial_stuff): Update.
13903 (get_thread_context,set_thread_context,i386_thread_added): Update.
13904 (the_low_target): Add entries for insert_point,
13905 remove_point, stopped_by_watchpoint, stopped_data_address.
13906 * win32-low.c (win32_insert_watchpoint): New function.
13907 (win32_remove_watchpoint): New function.
13908 (win32_stopped_by_watchpoint): New function.
13909 (win32_stopped_data_address): New function.
13910 (win32_target_ops): Add entries for insert_watchpoint,
13911 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13912 * win32-low.h (win32_target_ops): New members insert_point,
13913 remove_point, stopped_by_watchpoint, stopped_data_address.
13915 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13917 * server.c (process_serial_event): Re-return unsupported, not
13918 error, if the type isn't recognized. Re-allow supporting only
13919 insert or remove packets. Also call require_running for
13920 breakpoints. Add missing break statement to default case. Tidy.
13921 * target.h (struct target_ops): Rename insert_watchpoint to
13922 insert_point, and remove_watchpoint to remove_point.
13924 * linux-low.h (struct linux_target_ops): Likewise.
13925 * linux-low.c (linux_insert_watchpoint): Rename to ...
13926 (linux_insert_point): ... this. Adjust.
13927 (linux_remove_watchpoint): Rename to ...
13928 (linux_remove_point): ... this. Adjust.
13929 (linux_target_ops): Adjust.
13930 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13931 (cris_insert_point): ... this.
13932 (cris_remove_watchpoint): Rename to ...
13933 (cris_remove_point): ... this.
13934 (the_low_target): Adjust.
13936 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13938 * server.c (handle_v_kill): Pass signal_pid to
13939 kill_inferior if multi_process is zero.
13941 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13943 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13944 * target.h (target_ops): Comment for *_watchpoint to make it clear
13945 the functions can get types '0' and '1'.
13947 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13949 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13950 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13951 * regcache.c (get_regcache): Likewise.
13952 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13953 * win32-low.c (child_fetch_inferior_registers): Remove check for
13956 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13957 Pedro Alves <pedro@codesourcery.com>
13959 * target.h (struct target_ops) <supports_multi_process>: New
13961 (target_supports_multi_process): New.
13962 * server.c (handle_query): Even if GDB reports support, only
13963 enable multi-process if the target also supports it. Report
13964 multi-process support only if the target backend supports it.
13965 * linux-low.c (linux_supports_multi_process): New function.
13966 (linux_target_ops): Install it as target_supports_multi_process
13969 2009-05-24 Doug Evans <dje@google.com>
13971 Global renaming of find_thread_pid to find_thread_ptid.
13972 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13973 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13974 All callers updated.
13976 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13977 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13980 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13981 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13982 (linux_resume_one_lwp): Ditto.
13984 2009-05-23 Doug Evans <dje@google.com>
13986 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13987 from struct inferior_list_entry * to struct lwp_info *.
13988 All callers updated.
13990 2009-05-13 Doug Evans <dje@google.com>
13992 * linux-x86-low.c: Don't include assert.h.
13993 (x86_siginfo_fixup): Use fatal, not assert.
13994 (x86_arch_setup): Fix comment.
13996 2009-05-12 Doug Evans <dje@google.com>
13998 Biarch support for i386/amd64 gdbserver.
13999 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14000 Add linux-x86-low.c.
14001 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14002 (linux-x86-low.o): Add.
14003 * linux-x86-64-low.c: Delete.
14004 * linux-i386-low.c: Delete.
14005 * linux-x86-low.c: New file.
14006 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14008 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14010 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14011 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14012 (linux_child_pid_to_exec_file): New function.
14013 (elf_64_header_p, elf_64_file_p): New functions.
14014 (siginfo_fixup): New function.
14015 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14016 give target a chance to convert layout.
14017 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14018 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14020 2009-05-07 Doug Evans <dje@google.com>
14022 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14023 (regsets_store_inferior_registers): Ditto.
14025 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14029 * linux-low.c (must_set_ptrace_flags): Delete.
14030 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14032 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14033 `lwp->must_set_ptrace_flags' instead.
14034 (linux_wait_for_event_1): Set ptrace options here.
14035 (linux_wait_1): ... not here.
14037 2009-04-30 Doug Evans <dje@google.com>
14039 * inferiors.c (started_inferior_callback): New function.
14040 (attached_inferior_callback): New function.
14041 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14042 * server.c (print_started_pid, print_attached_pid): New functions.
14043 (detach_or_kill_for_exit): New function.
14044 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14045 * server.h (have_started_inferiors_p): Declare.
14046 (have_attached_inferiors_p): Declare.
14048 * inferiors.c (remove_process): Fix memory leak, free process.
14049 * linux-low.c (linux_remove_process): New function.
14050 (linux_kill): Call it instead of remove_process.
14051 (linux_detach, linux_wait_1): Ditto.
14053 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14055 * configure.srv: Add x86 Windows CE target.
14057 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14059 * inferiors.c (get_thread_process): Make global.
14060 * server.h (get_thread_process): Add prototype.
14061 * thread-db.c (find_one_thread): Use get_thread_process
14062 instead of current_process.
14063 (thread_db_get_tls_address): Do not crash if called when
14064 thread layer is not yet initialized.
14066 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14068 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14069 * spu-low.c (current_tid): Rename to ...
14070 (current_ptid): ... this.
14071 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14072 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14073 ptid_get_lwp (current_ptid) instead of current_tid.
14074 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14075 instead of current_tid. Use find_process_pid to verify pid
14076 argument is valid. Pass proper argument to remove_process.
14077 (spu_thread_alive): Compare current_ptid instead of current_tid.
14078 (spu_resume): Likewise.
14080 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14082 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14085 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14087 Implement the multiprocess extensions, and add linux multiprocess
14090 * server.h (ULONGEST): Declare.
14091 (struct ptid, ptid_t): New.
14092 (minus_one_ptid, null_ptid): Declare.
14093 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14094 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14095 (struct inferior_list_entry): Change `id' type from unsigned from
14097 (struct sym_cache, struct breakpoint, struct
14098 process_info_private): Forward declare.
14099 (struct process_info): Declare.
14100 (current_process): Declare.
14101 (all_processes): Declare.
14102 (initialize_inferiors): Declare.
14103 (add_thread): Adjust to use ptid_t.
14104 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14105 (add_process, remove_process, find_thread_pid): Declare.
14106 (find_inferior_id): Adjust to use ptid_t.
14107 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14108 (multi_process): Declare.
14109 (push_event): Adjust to use ptid_t.
14110 (read_ptid, write_ptid): Declare.
14111 (prepare_resume_reply): Adjust to use ptid_t.
14112 (clear_symbol_cache): Declare.
14113 * inferiors.c (all_processes): New.
14114 (null_ptid, minus_one_ptid): New.
14115 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14116 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14117 (add_thread): Change unsigned long to ptid. Remove gdb_id
14119 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14120 (gdb_id_to_thread): Rename to ...
14121 (find_thread_pid): ... this. Change unsigned long to ptid.
14122 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14123 (loaded_dll, pull_pid_from_list): Adjust.
14124 (add_process, remove_process, find_process_pid)
14125 (get_thread_process, current_process, initialize_inferiors): New.
14126 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14127 (struct target_waitstatus) <related_pid>: Ditto.
14128 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14129 return type to int.
14130 (struct target_ops) <join>: Add `pid' argument.
14131 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14132 (struct target_ops) <wait>: Add `ptid' field. Change return type
14134 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14135 (mywait): Add `ptid' argument. Change return type to ptid_t.
14136 (target_pid_to_str): Declare.
14137 * target.c (set_desired_inferior): Adjust to use ptids.
14138 (mywait): Add new `ptid' argument. Adjust.
14139 (target_pid_to_str): New.
14140 * mem-break.h (free_all_breakpoints): Declare.
14141 * mem-break.c (breakpoints): Delelete.
14142 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14143 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14144 to use per-process breakpoint list.
14145 (free_all_breakpoints): New.
14146 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14147 (symbol_cache, all_symbols_looked_up): Delete.
14149 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14151 (prepare_resume_reply): Change ptid argument's type from unsigned
14152 long to ptid_t. Adjust. Implement W;process and X;process.
14153 (free_sym_cache, clear_symbol_cache): New.
14154 (look_up_one_symbol): Adjust to per-process symbol cache. *
14155 * server.c (cont_thread, general_thread, step_thread): Change type
14157 (attached): Delete.
14158 (multi_process): New.
14159 (last_ptid): Change type to ptid_t.
14160 (struct vstop_notif) <ptid>: Change type to ptid_t.
14161 (queue_stop_reply, push_event): Change `ptid' argument's type to
14163 (discard_queued_stop_replies): Add `pid' argument.
14164 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14165 changes. Don't reference the `attached' global.
14166 (attach_inferior): Adjust to mywait interface changes.
14167 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14168 features. Handle and report "multiprocess+". Handle
14170 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14172 (handle_v_kill): New.
14173 (handle_v_stopped): Adjust to use target_pid_to_str.
14174 (handle_v_requests): Allow multiple attaches and runs when
14175 multiprocess extensions are in effect. Handle "vKill".
14176 (myresume): Adjust to use ptids.
14177 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14178 (handle_status): Adjust to discard_queued_stop_replies interface
14180 (first_thread_of, kill_inferior_callback)
14181 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14182 (main): Call initialize_inferiors. Adjust to use ptids, killing
14183 and detaching from all inferiors. Handle multiprocess packet
14185 * linux-low.h: Include gdb_proc_service.h.
14186 (struct process_info_private): New.
14187 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14188 <lwpid_of>: Use ptid_get_lwp.
14189 (get_lwp_thread): Adjust.
14190 (struct lwp_info): Add `dead' member.
14191 (find_lwp_pid): Declare.
14192 * linux-low.c (thread_db_active): Delete.
14193 (new_inferior): Adjust comment.
14194 (inferior_pid): Delete.
14195 (linux_add_process): New.
14196 (handle_extended_wait): Adjust.
14197 (add_lwp): Change unsigned long to ptid.
14198 (linux_create_inferior): Add process to processes table. Adjust
14199 to use ptids. Don't set new_inferior here.
14200 (linux_attach_lwp): Rename to ...
14201 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14202 it. Adjust to use ptids.
14203 (linux_attach_lwp): New.
14204 (linux_attach): Add process to processes table. Don't set
14206 (struct counter): New.
14207 (second_thread_of_pid_p, last_thread_of_process_p): New.
14208 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14209 multiple processes.
14210 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14211 processes. Remove process from process table.
14212 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14213 to multiple processes.
14214 (any_thread_of): New.
14215 (linux_detach): Add `pid' argument, and handle it. Remove process
14216 from processes table.
14217 (linux_join): Add `pid' argument. Handle it.
14218 (linux_thread_alive): Change unsighed long argument to ptid_t.
14219 Consider dead lwps as not being alive.
14220 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14221 threads we're not interested in.
14222 (same_lwp, find_lwp_pid): New.
14223 (linux_wait_for_lwp): Change `pid' argument's type from int to
14225 (linux_wait_for_event): Rename to ...
14226 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14227 from int to ptid_t. Adjust.
14228 (linux_wait_for_event): New.
14229 (linux_wait_1): Add `ptid' argument. Change return type to
14230 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14231 that exit from the process table.
14232 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14234 (mark_lwp_dead): New.
14235 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14236 stopping all threads, mark its main lwp as dead.
14237 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14239 (fetch_register, usr_store_inferior_registers)
14240 (regsets_fetch_inferior_registers)
14241 (regsets_store_inferior_registers, linux_read_memory)
14242 (linux_write_memory): Inline `inferior_pid'.
14243 (linux_look_up_symbols): Adjust to use per-process
14244 `thread_db_active'.
14245 (linux_request_interrupt): Adjust to use ptids.
14246 (linux_read_auxv): Inline `inferior_pid'.
14247 (initialize_low): Don't reference thread_db_active.
14248 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14249 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14250 (ps_getpid): Return the pid of the current inferior.
14251 * thread-db.c (proc_handle, thread_agent): Delete.
14252 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14254 (find_one_thread): Change argument type to ptid_t. Adjust to
14256 (maybe_attach_thread): Adjust to per-process data and ptids.
14257 (thread_db_find_new_threads): Ditto.
14258 (thread_db_init): Ditto.
14259 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14260 processes table. Adjust to use ptids.
14261 (spu_kill, spu_detach): Adjust interface. Remove process from
14263 (spu_join, spu_thread_alive): Adjust interface.
14264 (spu_wait): Adjust interface. Remove process from processes
14265 table. Adjust to use ptids.
14266 * win32-low.c (current_inferior_tid): Delete.
14267 (current_inferior_ptid): New.
14268 (debug_event_ptid): New.
14269 (thread_rec): Take a ptid. Adjust.
14270 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14271 (child_delete_thread): Ditto.
14272 (do_initial_child_stuff): Add `attached' argument. Add process to
14274 (child_fetch_inferior_registers, child_store_inferior_registers):
14276 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14277 (win32_attach): Pass 1 to do_initial_child_stuff.
14278 (win32_kill): Adjust interface. Remove process from processes
14280 (win32_detach): Ditto.
14281 (win32_join): Adjust interface.
14282 (win32_thread_alive): Take a ptid.
14283 (win32_resume): Adjust to use ptids.
14284 (get_child_debug_event): Ditto.
14285 (win32_wait): Adjust interface. Remove exiting process from
14288 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14290 Non-stop mode support.
14292 * server.h (non_stop): Declare.
14293 (gdb_client_data, handler_func): Declare.
14294 (delete_file_handler, add_file_handler, start_event_loop):
14296 (handle_serial_event, handle_target_event, push_event)
14297 (putpkt_notif): Declare.
14298 * target.h (enum resume_kind): New.
14299 (struct thread_resume): Replace `step' field by `kind' field.
14300 (TARGET_WNOHANG): Define.
14301 (struct target_ops) <wait>: Add `options' argument.
14302 <supports_non_stop, async, start_non_stop>: New fields.
14303 (target_supports_non_stop, target_async): New.
14304 (start_non_stop): Declare.
14305 (mywait): Add `options' argument.
14306 * target.c (mywait): Add `options' argument. Print child exit
14307 notifications here.
14308 (start_non_stop): New.
14309 * server.c (non_stop, own_buf, mem_buf): New globals.
14310 (struct vstop_notif): New.
14311 (notif_queue): New global.
14312 (queue_stop_reply, push_event, discard_queued_stop_replies)
14313 (send_next_stop_reply): New.
14314 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14316 (attach_inferior): In non-stop mode, don't wait for the target
14318 (handle_general_set): Handle QNonStop.
14319 (handle_query): When handling qC, return the current general
14320 thread, instead of the first thread of the list.
14321 (handle_query): If the backend supports non-stop mode, include
14322 QNonStop+ in the qSupported query response.
14323 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14325 (handle_v_attach, handle_v_run): Handle non-stop mode.
14326 (handle_v_stopped): New.
14327 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14328 (myresume): Adjust to use resume_kind. Handle non-stop.
14329 (queue_stop_reply_callback): New.
14330 (handle_status): Handle non-stop mode.
14331 (main): Clear non_stop flag on reconnection. Use the event-loop.
14332 Refactor serial protocol handling from here ...
14333 (process_serial_event): ... to this new function. When GDB
14334 selects any thread, select one here. In non-stop mode, wait until
14335 GDB acks all pending events before exiting.
14336 (handle_serial_event, handle_target_event): New.
14337 * remote-utils.c (remote_open): Install remote_desc in the event
14339 (remote_close): Remove remote_desc from the event loop.
14340 (putpkt_binary): Rename to...
14341 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14342 (putpkt_binary): New as wrapper around putpkt_binary_1.
14343 (putpkt_notif): New.
14344 (prepare_resume_reply): In non-stop mode, don't change the
14346 * event-loop.c: New.
14347 * Makefile.in (OBJ): Add event-loop.o.
14348 (event-loop.o): New rule.
14350 * linux-low.h (pid_of): Moved here.
14352 (get_lwp_thread): Use lwpid_of.
14353 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14354 * linux-low.c (pid_of): Delete.
14355 (inferior_pid): Use lwpid_of.
14356 (linux_event_pipe): New.
14357 (target_is_async_p): New.
14359 (handle_extended_wait): Use lwpid_of.
14360 (add_lwp): Don't set lwpid field.
14361 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14362 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14363 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14364 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14365 first. Adjust to linux_wait_for_event interface changes. Use
14367 (linux_detach): Don't delete the main lwp here.
14368 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14369 (status_pending_p): Don't consider explicitly suspended lwps.
14370 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14371 pointer. Add OPTIONS argument. Change return type to int. Use
14372 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14373 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14374 pointer. Add status pointer argument. Return a pid instead of a
14375 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14376 changes. In non-stop mode, don't switch to a random thread.
14377 (linux_wait): Rename to...
14378 (linux_wait_1): ... this. Add target_options argument, and handle
14379 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14380 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14381 clean exit and signal exit code. Don't stop all threads in
14382 non-stop mode. In all-stop mode, only stop all threads when
14383 reporting a stop to GDB. Handle explicit thread stop requests.
14384 (async_file_flush, async_file_mark): New.
14386 (send_sigstop): Use lwpid_of.
14387 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14388 interface changes. In non-stop mode, don't switch to a random
14390 (linux_resume_one_lwp): Use lwpid_of.
14391 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14392 (linux_resume_one_thread): ... this. Handle resume_stop. In
14393 non-stop mode, don't look for pending flag in all threads.
14394 (resume_status_pending_p): Don't consider explicitly suspended
14396 (my_waitpid): Reimplement. Emulate __WALL.
14397 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14399 (sigchld_handler, linux_supports_non_stop, linux_async)
14400 (linux_start_non_stop): New.
14401 (linux_target_ops): Register linux_supports_non_stop, linux_async
14402 and linux_start_non_stop.
14403 (initialize_low): Install SIGCHLD handler.
14404 * thread-db.c (thread_db_create_event, find_one_thread)
14405 (thread_db_get_tls_address): Use lwpid_of.
14406 * win32-low.c (win32_detach): Adjust to use resume_kind.
14407 (win32_wait): Add `options' argument.
14408 * spu-low.c (spu_resume): Adjust to use resume_kind.
14409 (spu_wait): Add `options' argument.
14411 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14413 Decouple target code from remote protocol.
14415 * target.h (enum target_waitkind): New.
14416 (struct target_waitstatus): New.
14417 (struct target_ops) <wait>: Return an unsigned long. Take a
14418 target_waitstatus pointer instead of a char pointer.
14419 (mywait): Likewise.
14420 * target.c (mywait): Change prototype to return an unsigned long.
14421 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14422 * server.h (thread_from_wait, old_thread_from_wait): Delete
14424 (prepare_resume_reply): Change prototype to take a
14426 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14427 (last_status, last_ptid): New.
14428 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14429 pid instead of a signal.
14430 (attach_inferior): Remove "status" and "signal" parameters.
14432 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14434 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14435 (handle_v_requests, myresume): Remove "status" and "signal"
14436 parameters. Adjust.
14437 (handle_status): New.
14438 (main): Delete local `status'. Adjust.
14439 * remote-utils.c: Include target.h.
14440 (prepare_resume_reply): Change prototype to take a
14441 target_waitstatus. Adjust.
14443 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14445 * spu-low.c (spu_wait): Adjust.
14446 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14448 (win32_wait): Adjust.
14450 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14452 * target.h (struct thread_resume): Delete leave_stopped member.
14453 (struct target_ops): Add a `n' argument to the `resume' callback.
14454 * server.c (start_inferior): Adjust.
14455 (handle_v_cont, myresume): Adjust.
14456 * linux-low.c (check_removed_breakpoint): Adjust to resume
14457 interface change, and to removed leave_stopped field.
14458 (resume_ptr): Delete.
14459 (struct thread_resume_array): New.
14460 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14461 resume interface change.
14462 (linux_continue_one_thread, linux_queue_one_thread)
14463 (resume_status_pending_p): Check if the resume field is NULL
14464 instead of checking the leave_stopped member.
14465 (linux_resume): Adjust to the target resume interface change.
14466 * spu-low.c (spu_resume): Adjust to the target resume interface
14468 * win32-low.c (win32_detach, win32_resume): Ditto.
14470 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14472 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14474 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14476 (linux_continue_one_thread): Only preserve the stepping flag if
14477 there's a pending breakpoint.
14479 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14481 * server.c (main): After the inferior having exited, call
14482 remote_close before exiting gdbserver.
14484 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14486 Fix size of FPSCR in Power 7 processors.
14487 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14488 (PPC_FEATURE_HAS_DFP): New #define.
14489 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14492 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14494 * server.c (handle_query) Whitespace and formatting.
14496 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14498 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14499 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14500 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14501 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14502 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14503 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14504 Makefile.in, configure.ac: Fix whitespace throughout.
14505 * configure: Regenerate.
14507 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14509 * inferiors.c (find_inferior): Make it safe for the callback
14510 function to delete the currently iterated inferior.
14512 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14514 * Makefile.in (linuw_low_h): Move higher.
14515 (thread-db.o): Depend on $(linux_low_h).
14517 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14519 Rename "process" to "lwp" throughout.
14521 * linux-low.c (all_processes): Rename to...
14522 (all_lwps): ... this.
14523 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14524 (add_process): Rename to ...
14525 (add_lwp): ... this. Adjust.
14526 (linux_create_inferior): Adjust.
14527 (linux_attach_lwp): Adjust.
14528 (linux_attach): Adjust.
14529 (linux_kill_one_process): Rename to ...
14530 (linux_kill_one_lwp): ... this. Adjust.
14531 (linux_kill): Adjust.
14532 (linux_detach_one_process): Rename to ...
14533 (linux_detach_one_lwp): ... this. Adjust.
14534 (linux_detach): Adjust.
14535 (check_removed_breakpoint): Adjust.
14536 (status_pending_p): Adjust.
14537 (linux_wait_for_process): Rename to ...
14538 (linux_wait_for_lwp): ... this. Adjust.
14539 (linux_wait_for_event): Adjust.
14540 (send_sigstop): Adjust.
14541 (wait_for_sigstop): Adjust.
14542 (stop_all_processes): Rename to ...
14543 (stop_all_lwps): ... this.
14544 (linux_resume_one_process): Rename to ...
14545 (linux_resume_one_lwp): ... this. Adjust.
14546 (linux_set_resume_request, linux_continue_one_thread)
14547 (linux_queue_one_thread, resume_status_pending_p)
14548 (usr_store_inferior_registers, regsets_store_inferior_registers)
14549 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14551 * linux-low.h (get_process): Rename to ...
14552 (get_lwp): ... this. Adjust.
14553 (get_thread_process): Rename to ...
14554 (get_thread_lwp): ... this. Adjust.
14555 (get_process_thread): Rename to ...
14556 (get_lwp_thread): ... this. Adjust.
14557 (struct process_info): Rename to ...
14558 (struct lwp_info): ... this.
14559 (all_processes): Rename to ...
14560 (all_lwps): ... this.
14561 * proc-service.c (ps_lgetregs): Adjust.
14562 * thread-db.c (thread_db_create_event, find_one_thread)
14563 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14565 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14567 * server.c (handle_query): Handle "qAttached".
14569 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14571 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14572 GPLv3, update license URL.
14574 2009-03-01 Doug Evans <dje@google.com>
14576 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14577 (server_h): Add gdb_signals.h.
14578 (signals.o): Update.
14579 * server.h (target_signal_from_host,target_signal_to_host_p)
14580 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14582 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14584 * remote-utils.c (getpkt): Also generate remote-debug
14585 information if noack_mode is set.
14587 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14589 * server.c (handle_query): Report qXfer:siginfo:read and
14590 qXfer:siginfo:write as supported and handle them.
14591 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14592 * linux-low.c (linux_xfer_siginfo): New.
14593 (linux_target_ops): Set it.
14595 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14597 * server.c (gdbserver_usage): Mention --remote-debug.
14598 (main): Accept '--remote-debug' switch.
14600 2009-01-18 Doug Evans <dje@google.com>
14602 * regcache.c (new_register_cache): No need to check result of xcalloc.
14603 * server.c (handle_search_memory): Back out calls to xmalloc,
14604 result is checked and error is returned to user upon failure.
14605 (handle_query): Ditto. Add more checks for result of malloc.
14606 (handle_v_cont): Check result of malloc, report error back to
14608 (handle_v_run): Ditto. Call freeargv.
14609 * server.h (freeargv): Declare.
14610 * utils.c (freeargv): New fn.
14612 2009-01-15 Doug Evans <dje@google.com>
14614 * gdbreplay.c (perror_with_name): Make arg const char *.
14615 * server.h (target_signal_to_name): Make return type const char *.
14616 * thread-db.c (thread_db_err_str): Make return type const char *.
14617 * utils.c (perror_with_name): Make arg const char *.
14619 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14621 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14622 when handling a EXIT_PROCESS_DEBUG_EVENT.
14624 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14626 * gdbreplay.c (gdbreplay_version): Update copyright year.
14627 * server.c (gdbserver_version): Likewise.
14629 2009-01-05 Doug Evans <dje@google.com>
14631 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14632 (handle_extended_wait): Improve comment.
14634 2008-12-13 Doug Evans <dje@google.com>
14636 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14637 * server.h (ATTR_MALLOC): New macro.
14638 (xmalloc,xcalloc,xstrdup): Declare.
14639 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14640 * inferiors.c: Ditto.
14641 * linux-low.c: Ditto.
14642 * mem-break.c: Ditto.
14643 * regcache.c: Ditto.
14644 * remote-utils.c: Ditto.
14647 * win32-low.c: Ditto.
14649 2008-12-12 Doug Evans <dje@google.com>
14651 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14652 in debugging printf.
14654 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14656 2008-12-09 Doug Evans <dje@google.com>
14658 * linux-low.h (struct process_info): Delete member tid, unused.
14659 * thread-db.c (find_one_thread): Update.
14660 (maybe_attach_thread): Update.
14662 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14664 * target.h (struct target_ops): Add qxfer_osdata member.
14665 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14667 (linux_qxfer_osdata): New functions.
14668 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14670 * server.c (handle_query): Handle "qXfer:osdata:read:".
14671 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14672 (buffer_xml_printf): New functions.
14673 * server.h (struct buffer): New.
14674 (buffer_grow_str, buffer_grow_str0): New macros.
14675 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14676 (buffer_xml_printf): Declare.
14678 2008-11-24 Doug Evans <dje@google.com>
14680 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14682 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14684 * server.c (handle_v_run): Always use the supplied argument list.
14686 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14688 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14689 (xtensa_regmap_table): Add entry for scompare1.
14691 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14693 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14694 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14695 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14696 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14697 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14698 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14699 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14700 XML target descriptions.
14701 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14702 when inferior is running on an ISA 2.05 or later processor. Add
14703 special case to return offset for full 64-bit slot of FPSCR when
14706 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14708 * Makefile.in (SFILES, clean): Added sparc64 files.
14709 (reg-sparc64.o, reg-sparc64.c): New.
14710 * configure.srv (sparc*-*-linux*): New configuration.
14711 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14712 syscall arguments for SPARC.
14713 (regsets_store_inferior_registers): Likewise.
14714 * linux-sparc-low.c: New file.
14716 2008-10-21 Doug Evans <dje@google.com>
14718 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14719 (READLINE_DIR,READLINE_DEP): Delete.
14720 (INTERNAL_CFLAGS): Update.
14721 (LINTFLAGS): Update.
14723 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14725 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14726 whole argv from the last run, not just argv[0].
14728 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14730 * regcache.c (new_register_cache): Return NULL if the register
14731 cache size isn't known yet.
14732 (free_register_cache): Avoid dereferencing a NULL regcache.
14734 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14736 * configure.srv: Merge MIPS and MIPS64.
14738 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14740 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14742 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14744 * Makefile.in: Add required vsx dependencies.
14746 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14747 Declare init_registers_powerpc_vsx32l.
14748 Declare init_registers_powerpc_vsx64l.
14749 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14750 (ppc_arch_setup): Check for VSX in hwcap.
14751 (ppc_fill_vsxregset): New function.
14752 (ppc_store_vsxregset): New function.
14753 Add new VSX entry in regset_info target_regsets.
14755 * configure.srv: Add new VSX dependencies.
14757 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14759 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14760 (remote_open): Set or clear transport_is_reliable.
14761 (putpkt_binary): Don't expect acks in noack mode.
14762 (getpkt): Don't send ack/nac in noack mode.
14763 * server.c (handle_general_set): Handle QStartNoAckMode.
14764 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14766 (main): Reset noack_mode on every connection.
14767 * server.h (noack_mode): Declare.
14769 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14771 * Makefile.in (GDBREPLAY_OBS): New variable.
14772 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14774 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14775 Daniel Jacobowitz <dan@codesourcery.com>
14777 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14778 (usr_store_inferior_registers): Likewise.
14779 (regsets_store_inferior_registers): Likewise.
14781 2008-07-31 Rolf Jansen <rj@surtec.com>
14782 Pedro Alves <pedro@codesourcery.com>
14784 * configure.ac: Check for memmem declaration.
14785 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14786 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14787 (disable_packet_qfThreadInfo): Unconditionally compile.
14788 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14789 * configure, config.in: Regenerate.
14791 2008-07-28 Doug Kwan <dougkwan@google.com>
14793 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14794 (linux_write_memory): Remove declaration of errno.
14796 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14798 * linux-low.c (handle_extended_wait): Do not use "status"
14799 variable uninitialized.
14801 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14803 * server.c (handle_v_attach): Inhibit reporting dll changes.
14805 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14807 * remote-utils.c (prepare_resume_reply): If requested, don't
14808 output "thread:TID" in the T stop reply.
14810 * server.c (disable_packet_vCont, disable_packet_Tthread)
14811 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14812 (handle_query): If requested, disable support for qC, qfThreadInfo
14814 (handle_v_requests): If requested, disable support for vCont.
14815 (gdbserver_show_disableable): New.
14816 (main): Handle --disable-packet and --disable-packet=LIST.
14818 * server.h (disable_packet_vCont, disable_packet_Tthread)
14819 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14821 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14823 * server.c (gdbserver_usage): Mention --version.
14825 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14827 * Makefile.in (gdbreplay.o): New rule.
14829 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14831 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14832 message, not gdbserver.
14834 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14835 Nathan Sidwell <nathan@codesourcery.com>
14836 Joseph Myers <joseph@codesourcery.com>
14838 * acinclude.m4: Include ../../config/acx.m4.
14839 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14840 * configure, config.in: Regenerate.
14841 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14842 * server.c (gdbserver_version): Print PKGVERSION.
14843 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14844 (main): Adjust gdbserver_usage calls.
14845 * gdbreplay.c (version, host_name): Add declarations.
14846 (gdbreplay_version, gdbreplay_usage): New.
14847 (main): Accept --version and --help options.
14849 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14851 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14852 (arm_breakpoint_at): Handle Thumb.
14853 (the_low_target): Add comment.
14855 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14857 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14859 2008-05-09 Doug Evans <dje@google.com>
14861 * server.h (decode_search_memory_packet): Declare.
14862 * remote-utils.c (decode_search_memory_packet): New fn.
14863 * server.c (handle_search_memory_1): New fn.
14864 (handle_search_memory): New fn.
14865 (handle_query): Process qSearch:memory packets.
14867 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14869 * regcache.c (registers_length): Remove.
14870 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14871 full register packet.
14872 * regcache.h (registers_length): Remove prototype.
14873 * server.h (PBUFSIZ): Define to 16384.
14875 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14877 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14878 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14879 powerpc-64l.o, and powerpc-altivec64l.o.
14880 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14881 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14882 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14883 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14884 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14887 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14888 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14889 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14890 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14891 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14892 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14893 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14894 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14895 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14896 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14899 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14900 (init_registers_powerpc_32l): ... this new prototype.
14901 (init_registers_powerpc_32): Remove, replace by ...
14902 (init_registers_powerpc_altivec32l): ... this new prototype.
14903 (init_registers_powerpc_e500): Remove, replace by ...
14904 (init_registers_powerpc_e500l): ... this new prototype.
14905 (init_registers_ppc64): Remove, replace by ...
14906 (init_registers_powerpc_64l): ... this new prototype.
14907 (init_registers_powerpc_64): Remove, replace by ...
14908 (init_registers_powerpc_altivec64l): ... this new prototype.
14909 (ppc_num_regs): Set to 73.
14910 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14911 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14912 (ppc_cannot_store_register): Handle orig_r3 and trap.
14913 (ppc_arch_setup): Update init_registers_... calls.
14914 (ppc_fill_gregset): Handle orig_r3 and trap.
14916 * inferiors.c (clear_inferiors): Reset current_inferior.
14918 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14920 * acinclude.m4: Add override.m4.
14921 * configure: Regenerate.
14923 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14925 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14926 initial call to init_register_ppc64.
14928 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14930 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14931 single powerpc*-*-linux* case.
14932 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14934 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14936 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14937 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14939 * linux-ppc-low.c: Include <elf.h>.
14940 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14941 (ppc_hwcap): New global variable.
14942 (ppc_regmap): Remove __SPE__ #ifdef sections.
14943 (ppc_regmap_e500): New global variable.
14944 (ppc_cannot_store_register): Update __SPE__ special case.
14945 (ppc_get_hwcap): New function.
14946 (ppc_arch_setup): Use it to determine whether inferior supports
14947 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14948 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14949 Do not access registers if target does not support AltiVec.
14950 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14951 Do not access registers if target does not support SPE.
14952 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14954 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14956 * linux-low.c (disabled_regsets, num_regsets): New.
14957 (use_regsets_p): Delete.
14958 (linux_wait_for_process): Clear disabled_regsets.
14959 (regsets_fetch_inferior_registers): Check and set it.
14960 (regsets_store_inferior_registers): Likewise.
14961 (linux_fetch_registers, linux_store_registers): Do not use
14963 (initialize_low): Allocate disabled_regsets.
14965 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14967 * Makefile.in (LIBOBJS): New.
14968 (OBS): Use LIBOBJS.
14969 (memmem.o): New rule.
14970 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14971 * configure: Regenerated.
14973 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14975 * server.c (handle_query): Never return "unsupported" for
14976 qXfer:features:read queries.
14978 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14980 * server.c (get_features_xml): Fix inverted condition.
14981 (handle_query): Always support qXfer:feature:read.
14983 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14985 * server.c (wrapper_argv): New.
14986 (start_inferior): Handle wrapper_argv. If set, expect an extra
14988 (gdbserver_usage): Document --wrapper.
14989 (main): Parse --wrapper.
14991 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14993 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14994 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14995 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14996 (ppc_set_pc): Likewise.
14997 (ppc_arch_setup): New function.
14998 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14999 of collect_register.
15000 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15002 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15004 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15005 instead of linux-ppc64-low.o.
15006 * linux-ppc64-low.c: Remove file.
15007 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15008 (linux-ppc64-low.o): Remove rule.
15010 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15011 (init_registers_powerpc_64): Likewise.
15012 (ppc_regmap): Conditionally define depending on __powerpc64__.
15013 (ppc_cannot_store_register): Do not special-case "fpscr" when
15014 compiled on __powerpc64__.
15015 (ppc_collect_ptrace_register): New function.
15016 (ppc_supply_ptrace_register): New function.
15017 (ppc_breakpoint): Change type to "unsigned int".
15018 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15019 (the_low_target): Conditionally provide initializers for the
15020 arch_setup member depending on __powerpc64__. Install
15021 collect_ptrace_register and supply_ptrace_register members.
15023 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15025 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15026 * server.c (gdbserver_xmltarget): Define.
15027 (get_features_xml): Use it to replace "target.xml" and arch_string.
15029 * configure.srv: Remove srv_xmltarget. Add XML files that were
15030 mentioned there to srv_xmlfiles instead. Remove conditional tests
15031 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15032 srv_xmlfiles and srv_regobj to include all possible choices.
15033 * configure.ac (srv_xmltarget): Remove.
15034 (srv_xmlfiles): Do not add "target.xml".
15035 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15036 checks for supplementary target information.
15037 * configure: Regenerate.
15038 * Makefile.in (XML_TARGET): Remove.
15039 (target.xml): Remove rule.
15040 (clean): Do not clean up target.xml.
15041 (.PRECIOUS): Do not mention target.xml.
15043 * target.h (struct target_ops): Remove arch_string member.
15044 * linux-low.c (linux_arch_string): Remove.
15045 (linux_target_ops): Remove arch_string initializer.
15046 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15047 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15048 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15049 * spu-low.c (spu_arch_string): Remove.
15050 (spu_target_ops): Remove arch_string initializer.
15051 * win32-low.c (win32_arch_string): Remove.
15052 (win32_target_ops): Remove arch_string initializer.
15053 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15054 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15055 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15057 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15059 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15060 by collect_ptrace_register and supply_ptrace_register hooks.
15061 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15062 instead of checking for the_low_target.left_pad_xfer.
15063 (usr_store_inferior_registers): Use collect_ptrace_register callback
15064 instead of checking for the_low_target.left_pad_xfer.
15066 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15067 (s390_supply_ptrace_register): Likewise.
15068 (s390_fill_gregset): Call s390_collect_ptrace_register.
15069 (the_low_target): Update.
15071 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15072 (ppc_supply_ptrace_register): Likewise.
15073 (the_low_target): Update.
15075 * linux-i386-low.c (the_low_target): Update.
15076 * linux-x86-64-low.c (the_low_target): Update.
15078 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15080 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15081 reg-s390.o and reg-s390x.o.
15083 * linux-low.c (new_inferior): New global variable.
15084 (linux_create_inferior, linux_attach): Set it.
15085 (linux_wait_for_process): Call the_low_target.arch_setup after the
15086 target has stopped for the first time.
15087 (initialize_low): Do not call the_low_target.arch_setup.
15089 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15090 (s390_set_pc): Likewise.
15091 (s390_arch_setup): New function.
15092 (the_low_target): Use s390_arch_setup as arch_setup routine.
15094 * regcache.c (realloc_register_cache): New function.
15095 (set_register_cache): Call it for each existing regcache.
15097 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15099 * server.h (init_registers): Remove prototype.
15101 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15102 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15103 instead of init_registers ().
15104 * linux-arm-low.c (init_registers_arm): Add prototype.
15105 (init_registers_arm_with_iwmmxt): Likewise.
15106 (the_low_target): Add initializer for arch_setup field.
15107 * linux-cris-low.c (init_registers_cris): Add prototype.
15108 (the_low_target): Add initializer for arch_setup field.
15109 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15110 (the_low_target): Add initializer for arch_setup field.
15111 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15112 (the_low_target): Add initializer for arch_setup field.
15113 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15114 (the_low_target): Add initializer for arch_setup field.
15115 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15116 (the_low_target): Add initializer for arch_setup field.
15117 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15118 (the_low_target): Add initializer for arch_setup field.
15119 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15120 (init_registers_mips64_linux): Likewise.
15121 (the_low_target): Add initializer for arch_setup field.
15122 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15123 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15124 (the_low_target): Add initializer for arch_setup field.
15125 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15126 (init_registers_powerpc_64): Likewise.
15127 (the_low_target): Add initializer for arch_setup field.
15128 * linux-s390-low.c (init_registers_s390): Add prototype.
15129 (init_registers_s390x): Likewise.
15130 (the_low_target): Add initializer for arch_setup field.
15131 * linux-sh-low.c (init_registers_sh): Add prototype.
15132 (the_low_target): Add initializer for arch_setup field.
15133 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15134 (the_low_target): Add initializer for arch_setup field.
15135 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15136 (the_low_target): Add initializer for arch_setup field.
15138 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15139 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15140 instead of init_registers ().
15141 * win32-arm-low.c (init_registers_arm): Add prototype.
15142 (the_low_target): Add initializer for arch_setup field.
15143 * win32-i386-low.c (init_registers_i386): Add prototype.
15144 (the_low_target): Add initializer for arch_setup field.
15146 * spu-low.c (init_registers_spu): Add prototype.
15147 (initialize_low): Call initialie_registers_spu () instead of
15148 initialize_registers ().
15150 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15152 * server.c (handle_v_requests): When handling the vRun and vAttach
15153 packets, if already debugging a process, don't kill it. Return an
15156 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15158 * server.c (handle_query): Correct length check.
15160 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15162 * win32-low.c (do_initial_child_stuff): Add process handle
15163 parameter. Set current_process_handle and current_process_id from the
15164 parameters. Clear globals.
15165 (win32_create_inferior): Don't set current_process_handle and
15166 current_process_id here. Instead pass them on the call to
15167 do_initial_child_stuff.
15168 (win32_attach): Likewise.
15169 (win32_clear_inferiors): New.
15170 (win32_kill): Don't close the current process handle or the
15171 current thread handle here. Instead call win32_clear_inferiors.
15172 (win32_detach): Don't open a new handle to the process. Call
15173 win32_clear_inferiors.
15174 (win32_join): Don't rely on current_process_handle; open a new
15175 handle using the process id.
15176 (win32_wait): Call win32_clear_inferiors when the inferior process
15179 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15181 * server.c (monitor_show_help): Add "exit".
15183 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15185 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15186 (clean): Add reg-xtensa.c.
15187 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15188 * configure.srv (xtensa*-*-linux*) New target.
15189 * linux-xtensa-low.c: New.
15190 * xtensa-xtregs.c: New.
15192 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15194 * hostio.c: Don't include errno.h.
15195 (errno_to_fileio_errno): Move to hostio-errno.
15196 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15197 error number outputting to the target->hostio_last_error callback.
15198 (hostio_packet_error): Use FILEIO_EINVAL directly.
15199 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15200 calls to hostio_error.
15201 * hostio-errno.c: New.
15202 * server.h (hostio_last_error_from_errno): Declare.
15203 * target.h (target_ops): Add hostio_last_error member.
15204 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15205 as hostio_last_error handler.
15206 * spu-low.c (spu_target_ops): Likewise.
15207 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15208 (wince_hostio_last_error): New functions.
15209 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15210 as hostio_last_error handler.
15211 (win32_target_ops) [!_WIN32_WCE]: Register
15212 hostio_last_error_from_errno as hostio_last_error handler.
15213 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15214 (hostio-errno.o): New rule.
15215 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15216 * configure.srv (srv_hostio_err_objs): New variable. Default to
15218 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15219 * configure: Regenerate.
15221 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15223 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15224 (linux_kill, linux_detach): Clean up the process list.
15225 * remote-utils.c (remote_open): Improve port number parsing.
15226 (putpkt_binary, input_interrupt): Only send interrupts if the target
15228 * server.c (extended_protocol): Make static.
15229 (attached): Define earlier.
15230 (exit_requested, response_needed, program_argv): New variables.
15231 (target_running): New.
15232 (start_inferior): Clear attached here.
15233 (attach_inferior): Set attached here.
15234 (require_running): Define.
15235 (handle_query): Use require_running and target_running. Implement
15237 (handle_v_attach, handle_v_run): New.
15238 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15239 (gdbserver_usage): Update.
15240 (main): Redo argument parsing. Handle --debug and --multi. Handle
15241 --attach along with other options or after the port. Save
15242 program_argv. Support no initial program. Resynchronize
15243 communication with GDB after an error. Handle "monitor exit".
15244 Use require_running and target_running. Always allow the extended
15245 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15246 restart in extended mode.
15247 * README: Refer to the GDB manual. Update --attach usage.
15249 2007-12-20 Andreas Schwab <schwab@suse.de>
15251 * linux-low.c (STACK_SIZE): Define.
15252 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15253 (linux_test_for_tracefork): Likewise.
15255 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15257 * linux-low.c (linux_wait_for_event): Update messages. Do not
15258 reinsert auto-delete breakpoints.
15259 * mem-break.c (struct breakpoint): Change return type of handler to
15261 (set_breakpoint_at): Update handler type.
15262 (reinsert_breakpoint_handler): Return 1 instead of calling
15264 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15266 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15267 * mem-break.h (set_breakpoint_at): Update handler type.
15268 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15269 * win32-low.c (auto_delete_breakpoint): New.
15270 (get_child_debug_event): Use it.
15272 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15274 * configure.ac: Check for pread and pwrite.
15275 * hostio.c (handle_pread): Fall back to lseek and read.
15276 (handle_pwrite): Fall back to lseek and write.
15277 * config.in, configure: Regenerated.
15279 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15281 * server.c (myresume): Add own_buf argument.
15282 (main): Update calls.
15284 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15286 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15287 * remote-utils.c (remote_open): Do not call disable_async_io.
15288 (block_async_io): Delete.
15289 (unblock_async_io): Make static.
15290 (initialize_async_io): New.
15291 * server.c (handle_v_cont): Handle async I/O here.
15292 (myresume): Likewise. Move other common resume tasks here...
15293 (main): ... from here. Call initialize_async_io. Disable async
15294 I/O before the main loop.
15295 * server.h (initialize_async_io): Declare.
15296 (block_async_io, unblock_async_io): Delete prototypes.
15297 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15299 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15301 * remote-utils.c (readchar): Allow binary data in received messages.
15303 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15305 * win32-low.c (attaching): New global.
15306 (win32_create_inferior): Clear the `attaching' global.
15307 (win32_attach): Set the `attaching' global.
15308 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15309 attaching. Only set a breakpoint at the entry point if not
15312 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15314 * server.c (main): Don't report dll events on the initial
15315 connection on attaches.
15317 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15319 * server.c (main): Relax numerical bases supported for the pid of
15320 the --attach command line argument.
15322 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15324 * win32-low.c (win32_attach): Call OpenProcess before
15325 DebugActiveProcess, not after. Add last error output to error
15328 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15330 * win32-low.c (win32_get_thread_context)
15331 (win32_set_thread_context): New functions.
15332 (thread_rec): Use win32_get_thread_context.
15333 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15334 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15337 2007-12-03 Leo Zayas
15338 Pedro Alves <pedro_alves@portugalmail.pt>
15340 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15342 (child_add_thread): Minor cleanup.
15343 (child_continue): Resume artificially suspended threads before
15344 calling ContinueDebugEvent.
15345 (suspend_one_thread): New.
15346 (fake_breakpoint_event): New.
15347 (get_child_debug_event): Change return type to int. Check here if
15348 gdb sent an interrupt request. If a soft interrupt was requested,
15349 fake a breakpoint event. Return 0 if there is no event to handle,
15351 (win32_wait): Don't check here if gdb sent an interrupt request.
15352 Ensure there is a valid event to handle.
15353 (win32_request_interrupt): Add soft interruption method as last
15356 2007-12-03 Leo Zayas
15357 Pedro Alves <pedro_alves@portugalmail.pt>
15359 * win32-low.h (win32_thread_info): Add descriptions to the
15360 structure members. Replace `suspend_count' counter by a
15362 * win32-low.c (thread_rec): Update condition of when to get the
15363 context from the inferior. Rely on ContextFlags being set if it
15364 has already been retrieved. Only suspend the inferior thread if
15365 we haven't already. Warn if that fails.
15366 (continue_one_thread): s/suspend_count/suspended/. Only call
15367 ResumeThread once. Warn if that fails.
15369 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15371 * win32-low.c (win32_wait): Don't read from the inferior when it
15372 has already exited.
15374 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15376 * Makefile.in (win32_low_h): New variable.
15377 (win32-low.o): Add dependency on $(win32_low_h).
15378 (win32-arm-low.o, win32-i386-low.o): New rules.
15380 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15382 * hostio.c: Correct copyright year.
15384 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15386 * Makefile.in (OBS): Add hostio.o.
15387 (hostio.o): New rule.
15388 * server.h (handle_vFile): Declare.
15389 * hostio.c: New file.
15390 * server.c (handle_v_requests): Take packet_len and new_packet_len
15391 for binary packets. Call handle_vFile.
15392 (main): Update call to handle_v_requests.
15394 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15396 * linux-low.c: Include <sched.h>.
15398 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15400 * linux-low.c (linux_tracefork_grandchild): New.
15401 (linux_tracefork_child): Use clone.
15402 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15404 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15406 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15408 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15410 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15412 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15414 * inferiors.c (change_inferior_id): Delete.
15415 (add_pid_to_list, pull_pid_from_list): New.
15416 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15417 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15418 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15419 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15420 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15421 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15422 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15423 (using_threads): Always set to 1.
15424 (handle_extended_wait): New.
15425 (add_process): Do not set TID.
15426 (linux_create_inferior): Set must_set_ptrace_flags.
15427 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15428 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15429 (linux_thread_alive): Rename TID argument to LWPID.
15430 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15431 (linux_wait_for_event): Do not use TID or check using_threads. Update
15432 call to dead_thread_notify. Call handle_extended_wait.
15433 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15434 (send_sigstop): Delete sigstop_sent.
15435 (wait_for_sigstop): Avoid TID.
15436 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15437 (linux_test_for_tracefork): New.
15438 (linux_lookup_signals): Use thread_db_active and
15439 linux_supports_tracefork_flag.
15440 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15441 * linux-low.h (get_process_thread): Avoid TID.
15442 (struct process_ifo): Move thread_known and tid to the end. Remove
15444 (linux_attach_lwp, thread_db_init): Update prototypes.
15445 * server.h (change_inferior_id): Delete prototype.
15446 (add_pid_to_list, pull_pid_from_list): New prototypes.
15447 * thread-db.c (thread_db_use_events): New.
15448 (find_first_thread): Rename to...
15449 (find_one_thread): ...this. Update callers and messages. Do not
15450 call fatal. Check thread_db_use_events. Do not call
15451 change_inferior_id or new_thread_notify.
15452 (maybe_attach_thread): Update. Do not call new_thread_notify.
15453 (thread_db_init): Set thread_db_use_events. Check use_events.
15454 * utils.c (fatal, warning): Correct message prefix.
15456 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15458 * Makefile.in (clean): Remove new files.
15459 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15460 (powerpc-64.o, powerpc-64.c): New rules.
15461 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15462 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15464 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15466 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15467 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15468 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15469 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15470 (target_regsets): Add AltiVec and SPE register sets.
15471 * configure.ac: Check for AltiVec and SPE.
15472 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15473 (ppc_fill_vrregset, ppc_store_vrregset): New.
15474 (target_regsets): Add AltiVec register set.
15475 * configure: Regenerated.
15477 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15479 * linux-low.c (O_LARGEFILE): Define.
15480 (linux_read_memory): Use /proc/PID/mem.
15481 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15482 * configure, config.in: Regenerated.
15484 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15486 * linux-low.c (linux_wait_for_event): Do not pass signals while
15489 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15491 * win32-low.c (create_process): New.
15492 (win32_create_inferior): Use create_process instead of
15493 CreateProcess. If create_process failed retry appending an ".exe"
15494 suffix. Store the GetLastError result immediatelly after
15495 create_process calls and use it on the call to error.
15497 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15499 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15501 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15503 * configure.ac: Switch license to GPLv3.
15505 2007-08-01 Michael Snyder <msnyder@access-company.com>
15507 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15509 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15511 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15513 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15514 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15515 CloseToolhelp32Snapshot.
15516 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15517 CloseToolhelp32Snapshot.
15519 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15521 * server.c (main): Check for inferior exit before main loop.
15523 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15525 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15526 instead of on tmp_desc.
15528 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15529 Daniel Jacobowitz <dan@codesourcery.com>
15531 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15532 (add_thread): Minor cleanups.
15533 (clear_inferiors): Move lower in the file. Clear the DLL
15535 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15536 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15537 (xml_escape_text): New.
15538 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15540 (handle_v_cont): Report errors.
15541 (gdbserver_version): Update.
15542 (main): Correct size of own_buf. Do not report initial DLL events.
15543 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15544 (unloaded_dll, xml_escape_text): New.
15545 * win32-low.c (enum target_waitkind): Update comments.
15546 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15547 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15548 (win32_EnumProcessModules, win32_GetModuleInformation)
15549 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15550 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15551 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15552 (win32_Module32First, win32_Module32Next, load_toolhelp)
15553 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15554 (get_child_debug_event): Handle DLL events.
15555 (win32_wait): Likewise.
15557 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15559 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15560 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15562 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15564 * win32-low.c (handle_output_debug_string): Ignore event if not
15567 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15569 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15571 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15573 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15575 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15577 * inferiors.c (change_inferior_id): Add comment.
15578 * linux-low.c (check_removed_breakpoint): Add an early
15579 prototype. Improve debug output.
15580 (linux_attach): Doc update.
15581 (linux_detach_one_process, linux_detach): Clean up before releasing
15583 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15584 * linux-low.h (struct process_info): Doc improvement.
15585 * mem-break.c (delete_all_breakpoints): New.
15586 * mem-break.h (delete_all_breakpoints): New prototype.
15587 * thread-db.c (find_first_thread): New.
15588 (thread_db_create_event): Call it instead of
15589 thread_db_find_new_threads. Clean up unused variables.
15590 (maybe_attach_thread): Remove first thread handling.
15591 (thread_db_find_new_threads): Use find_first_thread.
15592 (thread_db_get_tls_address): Likewise.
15594 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15596 * thread-db.c (thread_db_find_new_threads): Add prototype.
15597 (thread_db_create_event): Check for the main thread before adding
15599 (maybe_attach_thread): Only enable event reporting if TID == 0.
15600 (thread_db_get_tls_address): Check for new threads.
15602 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15604 * linux-low.c (linux_create_inferior): Try execv before execvp.
15605 * spu-low.c (spu_create_inferior): Likewise.
15607 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15609 * linux-low.c (linux_create_inferior): Change execv to execvp.
15610 * spu-low.c (spu_create_inferior): Likewies.
15612 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15614 * Makefile.in (clean): Clean new files instead of deleted ones.
15615 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15616 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15618 * configure.srv: Specify XML files and new regformats for MIPS and
15620 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15621 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15622 an entry for the restart register.
15623 (mips_cannot_fetch_register, mips_cannot_store_register)
15624 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15625 register names to match the XML descriptions.
15626 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15627 restart register instead of $0.
15629 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15630 Markus Deuling <deuling@de.ibm.com>
15632 * remote-utils.c (decode_xfer_write): New function.
15633 * server.h (decode_xfer_write): Add prototype.
15634 * server.c (handle_query): Add PACKET_LEN argument. Support
15635 qXfer:spu:read and qXfer:spu:write packets.
15636 (main): Pass packet_len to handle_query.
15637 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15638 * target.h (target_ops): Add qxfer_spu.
15640 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15642 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15643 accessing non-seekable spufs files.
15645 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15647 * server.c (handle_query): Add reply for qC packet.
15649 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15650 Leo Zayas <lerele@champenstudios@com>
15652 * server.h (check_remote_input_interrupt_request): New function.
15653 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15654 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15655 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15656 (check_remote_input_interrupt_request): New function.
15657 * server.h (check_remote_input_interrupt_request): Declare.
15658 * win32-low.c (winapi_DebugBreakProcess,
15659 winapi_GenerateConsoleCtrlEvent): New typedefs.
15660 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15662 (win32_wait): Check for remote interrupt request
15663 with check_remote_input_interrupt_request.
15664 (win32_request_interrupt): New function.
15665 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15667 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15669 * win32-low.c (debug_registers_changed,
15670 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15671 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15672 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15673 (thread_rec): Get context using the low target.
15674 (child_add_thread): Call thread_added on the low target,
15675 which does the same thing.
15677 (do_initial_child_stuff): Remove debug registers references.
15678 Set context using the low target. Resume threads after
15679 setting the contexts.
15680 (child_continue): Remove dead variable. Remove debug
15681 registers references.
15682 (child_fetch_inferior_registers): Go through the low target.
15683 (do_child_store_inferior_registers): Remove.
15684 (child_store_inferior_registers): Go through the low target.
15685 (win32_resume): Remove debug registers references.
15686 Set context using the low target.
15687 (handle_exception): Change return type to void. Don't record
15688 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15689 first chance exception.
15690 (get_child_debug_event): Change return type to void. Remove
15691 goto loop. Always return after waiting for debug event.
15692 (win32_wait): Convert to switch statement. Handle spurious
15695 * win32-i386-low.c (debug_registers_changed,
15696 debug_registers_used): New.
15697 (initial_stuff): Rename to ...
15698 (i386_initial_stuff): ... this. Clear debug registers
15700 (store_debug_registers): Delete.
15701 (i386_get_thread_context): New.
15702 (load_debug_registers): Delete.
15703 (i386_set_thread_context): New.
15704 (i386_thread_added): New.
15705 (single_step): Rename to ...
15706 (i386_single_step): ... this.
15707 (do_fetch_inferior_registers): Rename to ...
15708 (i386_fetch_inferior_register): ... this.
15709 (i386_store_inferior_register): New.
15710 (the_low_target): Adapt to new interface.
15712 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15713 (arm_get_thread_context): New.
15714 (arm_set_thread_context): New.
15716 (do_fetch_inferior_registers): Rename to ...
15717 (arm_fetch_inferior_register): ... this.
15718 (arm_store_inferior_register): New.
15719 (arm_wince_breakpoint): Reimplement as unsigned long.
15720 (arm_wince_breakpoint_len): Define.
15721 (the_low_target): Adapt to new interface.
15723 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15724 load_debug_registers. Add get_thread_context, set_thread_context,
15725 thread_added and store_inferior_register. Rename
15726 fetch_inferior_registers to fetch_inferior_register.
15727 (regptr): Remove declaration.
15729 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15731 * linux-low.c (linux_detach): Change return type to int. Return 0.
15732 * spu-low.c (spu_detach): Likewise.
15734 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15736 * target.h (target_ops): Change return type of detach to int.
15738 (join_inferior): New.
15739 * server.c (main): Don't skip detach support on mingw32.
15740 If the inferior doesn't support detaching return error.
15741 Call join_inferior instead of using waitpid.
15742 * linux-low.c (linux_join): New.
15743 (linux_target_op): Add linux_join.
15744 * spu-low.c (spu_join): New.
15745 (spu_target_ops): Add spu_join.
15746 * win32-low.c (win32_detach): Adapt to new interface.
15747 Reopen current_process_handle before detaching. Issue a child
15748 resume before detaching.
15750 (win32_target_op): Add win32_join.
15752 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15754 * win32-low.c (win32-attach): Fix return value.
15755 * target.h (target_ops): Describe ATTACH return values.
15757 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15759 * win32-low.c (GETPROCADDRESS): Define.
15760 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15761 (winapi_DebugSetProcessKillOnExit): Likewise.
15762 (win32_create_inferior): Force usage of ansi CreateProcessA.
15763 (win32_attach): Use GETPROCADDRESS.
15764 (win32_detach): Likewise.
15766 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15768 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15770 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15772 * win32-low.c: Commit leftover changes from 2007-03-29.
15774 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15776 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15777 fields short instead of int. Add explicit padding.
15778 (i387_cache_to_fsave): Remove unnecessary casts.
15779 (i387_fsave_to_cache): Doc fix.
15780 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15782 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15784 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15785 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15787 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15789 * configure.srv (arm*-*-mingw32ce*): Move near the other
15792 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15794 * configure.ac: Add errno checking.
15795 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15796 sys/file.h and malloc.h.
15797 (AC_CHECK_DECLS): Add perror.
15798 (srv_mingwce): Handle.
15799 * configure.srv (i[34567]86-*-cygwin*): Add
15800 win32-i386-low.o to srv_tgtobj.
15801 (i[34567]86-*-mingw*): Likewise.
15802 (arm*-*-mingw32ce*): Add case.
15803 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15804 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15805 [__MINGW32CE__] (strerror): New function.
15806 [__MINGW32CE__] (errno): Define to GetLastError.
15807 [__MINGW32CE__] (COUNTOF): New macro.
15808 (remote_open): Remove extra close call.
15809 * mem-break.c (delete_breakpoint_at): New function.
15810 * mem-break.h (delete_breakpoint_at): Declare.
15811 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15812 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15813 [USE_WIN32API] (read, write): Add char* casts.
15814 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15815 * server.h: Include wincecompat.h on Windows CE.
15816 [HAVE_ERRNO_H]: Check.
15817 (perror): Declare if not declared.
15818 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15819 (perror_with_name): Remove errno declaration.
15820 * wincecompat.h: New.
15821 * wincecompat.c: New.
15822 * win32-low.h: New.
15823 * win32-arm-low.c: New.
15824 * win32-i386-low.c: New.
15825 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15826 (OUTMSG2): Make it safe.
15828 (COUNTOF): New macro.
15829 (NUM_REGS): Get it from the low target.
15830 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15831 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15832 (thread_rec): Let low target handle debug registers.
15833 (child_add_thread): Likewise.
15834 (child_init_thread_list): Likewise.
15835 (continue_one_thread): Likewise.
15837 (do_child_fetch_inferior_registers): Move to ...
15838 * win32-i386-low.c: ... here, and rename to ...
15839 (do_fetch_inferior_registers): ... this.
15840 * win32-low.c (child_fetch_inferior_registers):
15841 Go through the low target.
15842 (do_child_store_inferior_registers): Use regptr.
15843 (strwinerror): New function.
15844 (win32_create_inferior): Handle Windows CE.
15845 Use strwinerror instead of strerror on Windows error
15846 codes. Add program to the error output.
15847 Don't close the main thread handle on Windows CE.
15848 (win32_attach): Use coredll.dll on Windows CE.
15849 (win32_kill): Close current process and current
15851 (win32_detach): Use coredll.dll on Windows CE.
15852 (win32_resume): Let low target handle debug registers, and
15854 (handle_exception): Add/Remove initial breakpoint. Avoid
15855 non-existant WSTOPSIG on Windows CE.
15856 (win32_read_inferior_memory): Cast to remove warning.
15857 (win32_arch_string): Go through the low target.
15858 (initialize_low): Call set_breakpoint_data with the low
15859 target's breakpoint.
15860 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15861 FOP_REGNUM, mappings): Move to ...
15862 * win32-i386-low.c: ... here.
15863 * win32-low.c (win32_thread_info): Move to ...
15864 * win32-low.h: ... here.
15865 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15866 win32-arm-low.c and wincecompat.c.
15867 (all:): Add $EXEEXT.
15868 (install-only:): Likewise.
15869 (gdbserver:): Likewise.
15870 (gdbreplay:): Likewise.
15871 * config.in: Regenerate.
15872 * configure: Regenerate.
15874 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15876 * win32-low.c: Rename typedef thread_info to
15877 win32_thread_info throughout.
15879 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15881 * win32-i386-low.c: Rename to ...
15882 * win32-low.c: ... this.
15883 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15884 * Makefile.in: Likewise.
15886 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15888 * remote-utils.c (monitor_output): Constify msg parameter.
15889 * server.h (monitor_output): Likewise.
15890 * win32-i386-low.c (handle_output_debug_string): New.
15891 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15892 handle_output_debug_string.
15893 (get_child_debug_event): Likewise.
15895 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15897 * server.c (main): Correct strtoul check.
15899 2007-03-27 Jon Ringle <jon@ringle.org>
15901 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15903 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15905 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15907 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15909 * terminal.h: Check HAVE_SGTTY_H.
15911 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15913 * remote-utils.c (remote_open): Print out the assigned port number.
15915 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15917 * remote-utils.c (monitor_output): New function.
15918 * server.c (debug_threads): Define here.
15919 (monitor_show_help): New function.
15920 (handle_query): Handle qRcmd.
15921 (main): Do not handle 'd' packet.
15922 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15923 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15926 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15928 * Makefile.in (EXEEXT): New.
15929 (clean): Use $(EXEEXT).
15931 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15933 * target.h (target_ops): Rename send_signal to request_interrupt,
15934 and remove enum target_signal parameter.
15935 * linux-low.c (linux_request_interrupt): Rename from
15936 linux_send_signal, and always send SIGINT.
15937 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15938 and always send SIGINT.
15939 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15941 (input_interrupt): Likewise.
15943 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15945 * server.c (get_features_xml): Check if target implemented
15947 * win32-i386-low.c (win32_arch_string): New.
15948 (win32_target_ops): Add win32_arch_string as arch_string member.
15950 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15952 * spu-low.c (spu_arch_string): New.
15953 (spu_target_ops): Add spu_arch_string.
15955 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15957 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15958 * configure.ac: Do not check for terminal.h.
15959 * configure, config.in: Regenerated.
15961 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15963 * Makefile.in (OBS): Add $(XML_BUILTIN).
15964 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15966 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15967 (arm-with-iwmmxt.c): New.
15968 * config.in, configure: Regenerate.
15969 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15970 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15971 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15972 (arm*-*-linux*): Add iWMMXt and regset support.
15973 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15974 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15975 (arm_store_wmmxregset, target_regsets): New.
15976 * server.c (get_features_xml): Take annex argument. Check builtin
15978 (handle_query): Handle multiple annexes.
15980 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15982 * remote-utils.c [USE_WIN32API] (read, write): Define.
15983 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15986 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15988 * linux-i386-low.c (the_low_target): Set arch_string.
15989 * linux-x86-64-low.c (the_low_target): Likewise.
15990 * linux-low.c (linux_arch_string): New.
15991 (linux_target_ops): Add it.
15992 * linux-low.h (struct linux_target_ops): Add arch_string.
15993 * server.c (write_qxfer_response): Use const void * for DATA.
15994 (get_features_xml): New.
15995 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15996 * target.h (struct target_ops): Add arch_string method.
15998 2007-01-03 Denis Pilat <denis.pilat@st.com>
15999 Daniel Jacobowitz <dan@codesourcery.com>
16001 * linux-low.c (linux_kill): Handle being called with no threads.
16002 * win32-i386-low.c (win32_kill): Likewise.
16003 (get_child_debug_event): Clear current_process_handle.
16005 2006-12-30 Denis PILAT <denis.pilat@st.com>
16006 Daniel Jacobowitz <dan@codesourcery.com>
16008 * remote-utils.c (remote_open): Check the type of specified
16009 serial port devices before opening them.
16010 * server.c (main): Kill the inferior if an error occurs during
16011 the first remote_open.
16013 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16015 * README: Update supported targets.
16017 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16019 * Makefile.in (clean): Remove reg-mips64.c.
16020 (reg-mips64.c, reg-mips64.o): New rules.
16021 * configure.srv: Handle mips64. Include regset support for mips.
16022 * linux-mips-low.c (union mips_register): New.
16023 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16024 (mips_breakpoint, mips_breakpoint_at): Use int.
16025 (mips_collect_register, mips_supply_register)
16026 (mips_collect_register_32bit, mips_supply_register_32bit)
16027 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16028 (mips_store_fpregset, target_regsets): New.
16029 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16031 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16033 * configure.srv: Add target "spu*-*-*".
16034 * Makefile.in (clean): Remove reg-spu.c.
16035 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16036 * spu-low.c: New file.
16038 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16040 * configure.ac: Correct td_thr_tls_get_addr test.
16041 * configure: Regenerated.
16043 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16045 * linux-low.c (linux_wait_for_event): Reformat. Use the
16046 pass_signals array.
16047 * remote-utils.c (decode_address_to_semicolon): New.
16048 * server.c (pass_signals, handle_general_set): New.
16049 (handle_query): Mention QPassSignals for qSupported.
16050 (main): Call handle_general_set.
16051 * server.h (pass_signals, decode_address_to_semicolon): New.
16053 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16055 * server.c (handle_query): Correct error handling for read_auxv.
16057 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16059 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16060 and srv_linux_thread_db to yes.
16061 * linux-s390-low.c (s390_fill_gregset): New function.
16062 (target_regsets): Define data structure.
16064 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16066 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16067 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16068 * config.in, configure: Regenerated.
16069 * inferiors.c (gdb_id_to_thread): New function.
16070 (gdb_id_to_thread_id): Use it.
16071 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16072 * linux-low.h (struct process_info): Add th member.
16073 (thread_db_get_tls_address): New prototype.
16074 * remote-utils.c (decode_address): Make non-static.
16075 * server.c (handle_query): Handle qGetTLSAddr.
16076 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16077 * target.h (struct target_ops): Add get_tls_address.
16078 * thread-db.c (maybe_attach_thread): Save the thread handle.
16079 (thread_db_get_tls_address): New.
16081 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16083 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16084 (linux_resume_one_process): Take a siginfo_t *. Update all
16085 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16086 (struct pending_signals): Add a siginfo_t.
16087 (linux_wait_for_process): Always set last_status.
16088 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16089 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16090 * linux-low.h (struct process_info): Add last_status.
16092 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16094 * remote-utils.c (try_rle): New function.
16095 (putpkt_binary): Use it.
16097 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16099 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16100 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16101 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16102 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16103 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16106 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16108 * server.c (terminal_fd): New variable.
16109 (old_foreground_pgrp): Likewise.
16110 (restore_old_foreground_pgrp): New function.
16111 (start_inferior): Record the terminal file descriptor in terminal_fd
16112 and its original foreground group in old_foreground_pgrp. Register
16113 restore_old_foreground_pgrp with atexit().
16115 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16117 * server.c (handle_query): Correct qPart to qXfer.
16119 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16121 * configure.ac: Check for more headers which are missing on
16122 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16123 * configure.srv: Add Cygwin and mingw32.
16124 * remote-utils.c: Don't include headers unconditionally which
16125 are missing on mingw32. Include <winsock.h> for mingw32.
16126 (remote_open): Adjust for mingw32 support. Flush
16127 standard error after writing to it.
16128 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16129 (unblock_async_io, enable_async_io, disable_async_io)
16130 (readchar, getpkt): Update for Winsock support.
16131 (prepare_resume_reply): Expect a protocol signal number.
16132 * server.c: Disable <sys/wait.h> on mingw32.
16133 (start_inferior): Adjust for mingw32 support. Flush
16134 standard error after writing to it.
16135 (attach_inferior): Likewise. Use protocol signal
16137 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16139 * win32-i386-low.c: New file.
16140 * Makefile.in (XM_CLIBS): Set.
16141 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16142 (win32-i386-low.o): New dependency rule.
16143 * linux-low.c (linux_wait): Use target signal numbers.
16144 * target.h (struct target_ops): Doc fix.
16145 * server.h (target_signal_to_name): New prototype.
16146 * gdbreplay.c: Don't include headers unconditionally which
16147 are missing on mingw32. Include <winsock.h> for mingw32.
16148 (remote_close, remote_open): Adjust for Winsock support.
16149 * configure, config.in: Regenerated.
16151 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16153 * server.c (decode_xfer_read, write_qxfer_response): New.
16154 (handle_query): Take a packet length argument. Handle
16155 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16156 the qSupported response.
16157 (main): Update call to handle_query.
16159 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16161 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16162 (putpkt_binary): Renamed from putpkt and adjusted for binary
16164 (putpkt): New wrapper for putpkt_binary.
16165 (readchar): Don't mask off the high bit.
16166 (decode_X_packet): New function.
16167 * server.c (main): Call putpkt_binary if a handler sets the packet
16168 length. Save the length of the incoming packet. Handle 'X'.
16169 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16171 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16173 * server.c (handle_query): Handle qSupported.
16175 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16177 * remote-utils.c (all_symbols_looked_up): New variable.
16178 (look_up_one_symbol): Check it.
16179 * server.h (look_up_one_symbol): New declaration.
16180 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16182 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16184 * Makefile.in (linux-arm-low.o): Update dependencies.
16185 * linux-arm-low.c: Include "gdb_proc_service.h".
16186 (PTRACE_GET_THREAD_AREA): Define.
16187 (ps_get_thread_area): New function.
16189 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16191 * configure.srv (m68k*-*-uclinux*): New target.
16192 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16193 (linux_resume_one_process): Remove extraneous cast.
16194 (linux_read_offsets): New.
16195 (linux_target_op): Add linux_read_offsets on mmuless systems.
16196 * server.c (handle_query): Add qOffsets logic.
16197 * target.h (struct target_ops): Add read_offsets.
16199 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16201 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16202 (PTRACE_GET_THREAD_AREA): Define.
16203 (ps_get_thread_area): New function.
16204 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16205 (linux-x86-64-low.o): Update.
16207 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16209 * configure.ac: Remove checks for prfpregset_t.
16210 * gdb_proc_service.h: New file.
16211 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16212 new "gdb_proc_service.h".
16213 * proc-service.c: Likewise.
16214 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16215 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16216 * Makefile.in (gdb_proc_service_h): Updated.
16217 * configure, config.in: Regenerated.
16219 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16221 * remote-utils.c (prepare_resume_reply): Move declaration
16222 of gdb_id_from_wait to the top of the block.
16224 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16226 * linux-low.c (regsets_store_inferior_registers): Read the regset
16227 from the target before filling it.
16229 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16231 * server.c (attach_inferior): Return SIGTRAP for a successful
16234 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16236 * Makefile.in (OBS): Add version.o.
16237 (STAGESTUFF): Delete.
16238 (version.o): Add dependencies.
16239 (version.c): Replace rule.
16240 (clean): Remove version.c.
16241 * server.c (gdbserver_version): New.
16242 (gdbserver_usage): Use printf.
16243 (main): Handle --version and --help.
16244 * server.h (version, host_name): Add declarations.
16246 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16258 * linux-x86-64-low.c:
16260 * linux-s390-low.c:
16261 * linux-ppc64-low.c:
16263 * linux-mips-low.c:
16264 * linux-m68k-low.c:
16265 * linux-m32r-low.c:
16268 * linux-ia64-low.c:
16269 * linux-i386-low.c:
16270 * linux-crisv32-low.c:
16282 * gdbserver.1: Add (C) after Copyright. Update the FSF
16285 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16287 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16288 (arm_breakpoint_at): Recognize both breakpoints.
16289 (the_low_target): Use the correct breakpoint instruction.
16291 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16293 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16294 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16295 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16296 (the_low_target): Update.
16298 2005-10-25 Andreas Schwab <schwab@suse.de>
16300 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16302 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16303 (ia64_num_regs): Reduce to 462.
16305 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16307 * acinclude.m4: Correct quoting.
16308 * aclocal.m4: Regenerated.
16310 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16311 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16312 (thread_db_init): Call thread_db_err_str.
16313 * configure.ac: Check for TD_VERSION.
16314 * config.in, configure: Regenerated.
16316 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16318 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16320 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16322 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16323 is not available. Define HAVE_PTRACE_GETREGS if it is.
16324 * config.in, configure: Regenerated.
16325 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16326 * linux-i386-low.c, linux-m68k-low.c: Update to use
16327 HAVE_PTRACE_GETREGS.
16328 * linux-low.c (regsets_fetch_inferior_registers)
16329 (regsets_store_inferior_registers): Only return 0 if we processed
16331 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16332 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16334 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16336 * inferiors.c (struct thread_info): Add gdb_id.
16337 (add_thread): Add gdb_id argument.
16338 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16339 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16340 calls to add_thread.
16341 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16342 * server.c (handle_query): Use thread_to_gdb_id.
16343 (handle_v_cont, main): Use gdb_id_to_thread_id.
16344 * server.h (add_thread): Update prototype.
16345 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16348 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16350 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16351 left-padded registers.
16352 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16353 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16355 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16357 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16358 * configure: Regenerate.
16359 * config.in: Regenerate.
16360 * server.h (NEED_DECLARATION_STRERROR):
16361 Replace with !HAVE_DECL_STRERROR.
16363 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16365 * linux-low.c (linux_wait, linux_send_signal): Don't test
16366 an unsigned long variable for > 0 if it could be MAX_ULONG.
16367 * server.c (myresume): Likewise.
16368 * target.c (set_desired_inferior): Likewise.
16370 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16372 * configure.ac: Simplify and improve check for socklen_t.
16373 * configure, config.in: Regenerate.
16375 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16377 * acconfig.h: Remove.
16378 * configure.ac: Add a test for socklen_t. Use three-argument
16379 AC_DEFINE throughout.
16380 * config.in: Regenerated using autoheader 2.59.
16381 * configure: Regenerated.
16383 * gdbreplay.c (socklen_t): Provide a default.
16384 (remote_open): Use socklen_t.
16385 * remote-utils.c (socklen_t): Provide a default.
16386 (remote_open): Use socklen_t.
16387 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16390 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16392 * linux-low.c (linux_read_memory, linux_write_memory)
16393 (linux_read_auxv): Likewise.
16394 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16395 (check_mem_write): Likewise.
16396 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16398 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16399 (registers_from_string, register_data): Likewise.
16400 * server.c (handle_query, main): Likewise.
16401 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16402 (decode_M_packet): Likewise.
16403 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16404 * target.h (struct target_ops): Update read_memory, write_memory,
16406 (read_inferior_memory, write_inferior_memory): Update.
16407 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16408 to unsigned char *.
16409 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16410 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16411 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16412 linux-s390-low.c, linux-sh-low.c: Update for changes in
16413 read_inferior_memory and the_low_target->breakpoint.
16415 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16417 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16418 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16419 * configure.srv: Add powerpc64-*-linux*.
16420 * linux-ppc64-low.c: New file.
16422 2005-05-23 Orjan Friberg <orjanf@axis.com>
16424 * linux-cris-low.c: New file with support for CRIS.
16425 * linux-crisv32-low.c: Ditto for CRISv32.
16426 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16427 (clean): Add reg-cris.c and reg-crisv32.c.
16428 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16429 reg-crisv32.o, and reg-crisv32.c to make rules.
16430 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16431 recognized targets.
16433 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16435 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16436 of sizeof (PTRACE_XFER_TYPE).
16437 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16439 2005-05-12 Orjan Friberg <orjanf@axis.com>
16441 * target.h (struct target_ops): Add insert_watchpoint,
16442 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16443 pointers for hardware watchpoint support.
16444 * linux-low.h (struct linux_target_ops): Ditto.
16445 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16446 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16447 to linux_target_ops.
16448 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16450 * server.c (main): Recognize 'Z' and 'z' packets.
16452 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16454 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16455 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16456 (the_low_target): Add new members.
16458 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16460 * proc-service.c (ps_lgetregs): Search all_processes instead of
16463 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16465 * server.c (start_inferior): Change return type to int.
16466 (attach_inferior): Change sigptr to int *.
16467 (handle_v_cont, handle_v_requests): Change signal to int *.
16468 (main): Change signal to int.
16470 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16472 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16473 * configure.srv: Add m32r*-*-linux*.
16474 * linux-m32r-low.c: New file.
16476 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16478 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16480 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16482 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16483 Take unsigned long arguments for PIDs.
16484 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16485 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16486 (wait_for_sigstop, linux_resume_one_process)
16487 (regsets_fetch_inferior_registers, linux_send_signal)
16488 (linux_read_auxv): Likewise. Update the types of variables holding
16489 PIDs. Update format string specifiers.
16490 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16491 * remote-utils.c (prepare_resume_reply): Likewise.
16492 * server.c (cont_thread, general_thread, step_thread)
16493 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16495 (handle_query): Update format specifiers.
16496 (handle_v_cont, main): Use strtoul for thread IDs.
16497 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16498 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16499 (general_thread, step_thread, thread_from_wait)
16500 (old_thread_from_wait): Update.
16501 * target.h (struct thread_resume): Use unsigned long for THREAD.
16502 (struct target_ops): Use unsigned long for arguments to attach and
16505 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16507 * acinclude.m4: Include bfd/bfd.m4 directly.
16508 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16509 <agriffis@toolchain.org>.
16510 * aclocal.m4, configure: Regenerated.
16512 2005-01-07 Andrew Cagney <cagney@gnu.org>
16514 * configure.ac: Rename configure.in, require autoconf 2.59.
16515 * configure: Re-generate.
16517 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16519 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16520 LIBS when finished.
16521 * aclocal.m4: Regenerated.
16522 * configure: Regenerated.
16524 2004-11-21 Andreas Schwab <schwab@suse.de>
16526 * linux-m68k-low.c (m68k_num_gregs): Define.
16527 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16528 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16529 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16530 (m68k_breakpoint_at): New. Add to the_low_target.
16532 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16533 srv_linux_thread_db to yes.
16535 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16537 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16538 (ARCH_SET_FS): Likewise.
16539 (ARCH_GET_FS): Likewise.
16540 (ARCH_GET_GS): Likewise.
16542 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16544 * linux-i386-low.c (ps_get_thread_area): New.
16545 * linux-x86-64-low.c (ps_get_thread_area): New.
16546 * linux-low.c: Include <sys/syscall.h>.
16547 (linux_kill_one_process): Don't kill the first thread here.
16548 (linux_kill): Kill the first thread here.
16549 (kill_lwp): New function.
16550 (send_sigstop, linux_send_signal): Use it.
16551 * proc-service.c: Clean up #ifdefs.
16552 (fpregset_info): Delete.
16553 (ps_lgetregs): Update and enable implementation.
16554 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16556 * remote-utils.c (struct sym_cache, symbol_cache): New.
16557 (input_interrupt): Print a clearer message.
16558 (async_io_enabled): New variable.
16559 (enable_async_io, disable_async_io): Use it. Update comments.
16560 (look_up_one_symbol): Use the symbol cache.
16561 * thread-db.c (thread_db_look_up_symbols): New function.
16562 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16564 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16566 * configure.in: Test for -rdynamic.
16567 * configure: Regenerated.
16568 * Makefile (INTERNAL_LDFLAGS): New.
16569 (gdbserver, gdbreplay): Use it.
16571 2004-09-02 Andrew Cagney <cagney@gnu.org>
16573 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16575 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16577 * linux-low.c (linux_wait): Clear all_processes list also.
16579 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16581 * linux-low.c: Include <errno.h>. Remove extern declaration of
16584 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16586 * gdbreplay.c, server.h, utils.c: Update copyright years.
16588 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16590 * server.c (main): Print child status or termination signal from
16591 variable 'signal', not 'sig'.
16593 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16595 * linux-low.c (linux_read_memory): Change return type to
16596 int. Check for and return error from ptrace().
16597 * target.c (read_inferior_memory): Change return type to int. Pass
16598 back return status from the_target->read_memory().
16599 * target.h (struct target_ops): Adapt *read_memory() prototype.
16601 (read_inferior_memory): Adapt prototype.
16602 * server.c (main): Return an error packet if
16603 read_inferior_memory() returns an error.
16605 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16607 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16608 Unify with other clean targets.
16610 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16612 * server.c (handle_v_cont): Call set_desired_inferior.
16614 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16616 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16618 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16620 * linux-low.c (linux_wait): Unblock async I/O.
16621 (linux_resume): Block and enable async I/O.
16622 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16623 * server.h (block_async_io, unblock_async_io): Add prototypes.
16625 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16627 * remote-utils.c (remote_open): Print a status notice after
16628 opening a TCP port.
16629 * server.c (attach_inferior): Print a status notice after
16632 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16634 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16636 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16638 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16640 * server.c, target.h: Update copyright years.
16642 2004-02-25 Roland McGrath <roland@redhat.com>
16644 * target.h (struct target_ops): New member `read_auxv'.
16645 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16646 * linux-low.c (linux_read_auxv): New function.
16647 (linux_target_ops): Initialize `read_auxv' member to that.
16649 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16651 Committed by Jim Blandy <jimb@redhat.com>.
16653 * linux-s390-low.c (s390_num_regs): Update.
16654 (s390_regmap): Remove control registers. Use __s390x__ predefine
16655 instead of GPR_SIZE to distiguish s390 and s390x targets.
16657 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16659 * linux-low.c: Update copyright year.
16660 (check_removed_breakpoint): Clear pending_is_breakpoint.
16661 (linux_set_resume_request, linux_queue_one_thread)
16662 (resume_status_pending_p): New functions.
16663 (linux_continue_one_thread): Use process->resume.
16664 (linux_resume): Only resume threads if there are no pending events.
16665 * linux-low.h (struct process_info): Add resume request
16668 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16670 * regcache.c (new_register_cache): Clear the allocated register
16671 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16673 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16675 * linux-low.c (linux_resume): Take a struct thread_resume *
16677 (linux_wait): Update call.
16678 (resume_ptr): New static variable.
16679 (linux_continue_one_thread): Renamed from
16680 linux_continue_one_process. Use resume_ptr.
16681 (linux_resume): Use linux_continue_one_thread.
16682 * server.c (handle_v_cont, handle_v_requests): New functions.
16683 (myresume): New function.
16684 (main): Handle 'v' case.
16685 * target.h (struct thread_resume): New type.
16686 (struct target_ops): Change argument of "resume" to struct
16688 (myresume): Delete macro.
16690 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16692 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16693 (uninstall): Support DESTDIR.
16695 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16697 * configure.srv: Add xscale*linux copy of arm*linux entry.
16699 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16701 * linux-arm-low.c (arm_reinsert_addr): New function.
16702 (the_low_target): Add arm_reinsert_addr.
16704 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16706 * mem-break.c: Remove whitespace at end of file.
16708 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16710 * configure.in: Check whether we need to prototype strerror.
16711 * server.h: Optionally prototype strerror.
16712 * gdbreplay.c (perror_with_name): Use strerror.
16713 * linux-low.c (linux_attach_lwp): Use strerror.
16714 * utils.c (perror_with_name): Use strerror.
16715 * config.in, configure: Regenerated.
16717 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16719 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16720 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16722 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16724 * Makefile.in (SFILES): Update.
16725 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16726 low-sun3.c: Remove files.
16728 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16730 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16731 (linux_detach_one_process, linux_detach): New functions.
16732 (linux_target_ops): Add linux_detach.
16733 * server.c (main): Handle 'D' packet.
16734 * target.h (struct target_ops): Add "detach" member.
16735 (detach_inferior): Define.
16737 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16739 From Kelley Cook <kelleycook@wideopenwest.com>:
16740 * configure.srv: Accept i[34567]86 variants.
16742 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16744 * linux-low.c (linux_wait_for_event): Correct comment typos.
16745 (linux_resume_one_process): Call check_removed_breakpoint.
16746 (linux_send_signal): New function.
16747 (linux_target_ops): Add linux_send_signal.
16748 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16750 * target.h (struct target_ops): Add send_signal.
16752 2003-05-29 Jim Blandy <jimb@redhat.com>
16754 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16755 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16756 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16757 away part of the register's value.
16759 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16761 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16762 (linux_wait_for_event, linux_init_signals): Likewise.
16764 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16766 * configure.in: Check for stdlib.h.
16767 * configure: Regenerated.
16768 * config.in: Regenerated.
16770 2003-01-04 Andreas Schwab <schwab@suse.de>
16772 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16774 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16776 * Makefile.in: Remove obsolete code.
16778 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16780 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16781 defined(PT_FPR0_HI).
16783 2002-11-17 Stuart Hughes <seh@zee2.com>
16785 * linux-arm-low.c (arm_num_regs): Increase.
16786 (arm_regmap): Include status register.
16788 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16790 * linux-low.c (register_addr): Remove incorrect -1 check.
16792 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16794 * linux-low.c (linux_create_inferior): Call setpgid. Return
16796 (unstopped_p, linux_signal_pid): Remove.
16797 (linux_target_ops): Remove linux_signal_pid.
16798 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16799 global instead of target method.
16800 * target.h (struct target_ops): Remove signal_pid. Update comment
16801 for create_inferior.
16802 * server.c (signal_pid): New variable.
16803 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16804 gdbserver. Set the child to be the foreground process group.
16805 (attach_inferior): Set signal_pid.
16807 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16809 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16811 2002-08-20 Jim Blandy <jimb@redhat.com>
16813 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16816 2002-08-01 Andrew Cagney <cagney@redhat.com>
16818 * Makefile.in: Make chill references obsolete.
16820 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16822 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16823 * configure: Regenerate.
16824 * config.in: Regenerate.
16826 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16828 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16829 (perror_with_name, remote_close, remote_open, expect, play): Static.
16831 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16833 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16834 byte offsets instead of an array of indexes.
16835 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16837 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16839 * regcache.c: Add comment.
16841 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16843 * thread-db.c: New file.
16844 * proc-service.c: New file.
16845 * acinclude.m4: New file.
16846 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16847 proc-service.o, and thread-db.o.
16848 (linux-low.o): Add USE_THREAD_DB.
16849 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16850 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16851 * aclocal.m4: Regenerated.
16852 * config.in: Regenerated.
16853 * configure: Regenerated.
16854 * configure.in: Check for proc_service.h, sys/procfs.h,
16855 thread_db.h, and linux/elf.h headrs.
16856 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16857 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16858 Check for -lthread_db and thread support.
16859 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16860 PowerPC, and SuperH.
16861 * i387-fp.c: Constify arguments.
16862 * i387-fp.h: Likewise.
16863 * inferiors.c: (struct thread_info): Renamed from
16864 `struct inferior_info'. Remove PID member. Use generic inferior
16865 list header. All uses updated.
16866 (inferiors, signal_pid): Removed.
16867 (all_threads): New variable.
16868 (get_thread): Define.
16869 (add_inferior_to_list): New function.
16870 (for_each_inferior): New function.
16871 (change_inferior_id): New function.
16872 (add_inferior): Removed.
16873 (remove_inferior): New function.
16874 (add_thread): New function.
16875 (free_one_thread): New function.
16876 (remove_thread): New function.
16877 (clear_inferiors): Use for_each_inferior and free_one_thread.
16878 (find_inferior): New function.
16879 (find_inferior_id): New function.
16880 (inferior_target_data): Update argument type.
16881 (set_inferior_target_data): Likewise.
16882 (inferior_regcache_data): Likewise.
16883 (set_inferior_regcache_data): Likewise.
16884 * linux-low.c (linux_bp_reinsert): Remove.
16885 (all_processes, stopping_threads, using_thrads)
16886 (struct pending_signals, debug_threads, pid_of): New.
16887 (inferior_pid): Replace with macro.
16888 (struct inferior_linux_data): Remove.
16889 (get_stop_pc, add_process): New functions.
16890 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16891 Use add_process and add_thread.
16892 (linux_attach_lwp): New function, based on old linux_attach. Use
16893 add_process and add_thread. Set stop_expected for new threads.
16894 (linux_attach): New function.
16895 (linux_kill_one_process): New function.
16896 (linux_kill): Kill all LWPs.
16897 (linux_thread_alive): Use find_inferior_id.
16898 (check_removed_breakpoints, status_pending_p): New functions.
16899 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16900 Update. Use WNOHANG. Wait for cloned processes also. Update process
16901 struct for the found process.
16902 (linux_wait_for_event): New function.
16903 (linux_wait): Use it. Support LWPs.
16904 (send_sigstop, wait_for_sigstop, stop_all_processes)
16905 (linux_resume_one_process, linux_continue_one_process): New functions.
16906 (linux_resume): Support LWPs.
16907 (REGISTER_RAW_SIZE): Remove.
16908 (fetch_register): Use register_size instead. Call supply_register.
16909 (usr_store_inferior_registers): Likewise. Call collect_register.
16910 Fix recursive case.
16911 (regsets_fetch_inferior_registers): Improve error message.
16912 (regsets_store_inferior_registers): Add debugging.
16913 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16914 (unstopped_p, linux_signal_pid): New functions.
16915 (linux_target_ops): Add linux_signal_pid.
16916 (linux_init_signals): New function.
16917 (initialize_low): Call it. Initialize using_threads.
16918 * regcache.c (inferior_regcache_data): Add valid
16920 (get_regcache): Fetch registers lazily. Add fetch argument
16921 and update all callers.
16922 (regcache_invalidate_one, regcache_invalidate): New
16924 (new_register_cache): Renamed from create_register_cache.
16925 Return the new regcache.
16926 (free_register_cache): Change argument to a void *.
16927 (registers_to_string, registers_from_string): Call get_regcache
16928 with fetch flag set.
16929 (register_data): Make static. Pass fetch flag to get_regcache.
16930 (supply_register): Call get_regcache with fetch flag clear.
16931 (collect_register): Call get_regcache with fetch flag set.
16932 (collect_register_as_string): New function.
16933 * regcache.h: Update.
16934 * remote-utils.c (putpkt): Flush after debug output and use
16936 Handle input interrupts while waiting for an ACK.
16937 (input_interrupt): Use signal_pid method.
16938 (getpkt): Flush after debug output and use stderr.
16939 (outreg): Use collect_register_as_string.
16940 (new_thread_notify, dead_thread_notify): New functions.
16941 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16942 and general_thread.
16943 (look_up_one_symbol): Flush after debug output.
16944 * server.c (step_thread, server_waiting): New variables.
16945 (start_inferior): Don't use signal_pid. Update call to mywait.
16946 (attach_inferior): Update call to mywait.
16947 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16948 (main): Don't fetch/store registers explicitly. Use
16949 set_desired_inferior. Support proposed ``Hs'' packet. Update
16951 * server.h: Update.
16952 (struct inferior_list, struct_inferior_list_entry): New.
16953 * target.c (set_desired_inferior): New.
16954 (write_inferior_memory): Constify.
16955 (mywait): New function.
16956 * target.h: Update.
16957 (struct target_ops): New signal_pid method.
16958 (mywait): Removed macro, added prototype.
16960 * linux-low.h (regset_func): Removed.
16961 (regset_fill_func, regset_store_func): New.
16962 (enum regset_type): New.
16963 (struct regset_info): Add type field. Use new operation types.
16964 (struct linux_target_ops): stop_pc renamed to get_pc.
16965 Add decr_pc_after_break and breakpoint_at.
16966 (get_process, get_thread_proess, get_process_thread)
16967 (strut process_info, all_processes, linux_attach_lwp)
16968 (thread_db_init): New.
16970 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16971 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16972 (the_low_target): Add new members.
16973 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16974 (i386_store_fpxregset): Constify.
16975 (target_regsets): Add new kind identifier.
16976 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16977 (i386_set_pc): Add debugging.
16978 (i386_breakpoint_at): New function.
16979 (the_low_target): Add new members.
16980 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16981 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16982 (mips_breakpoint_at): New.
16983 (the_low_target): Add new members.
16984 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16985 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16986 (the_low_target): Add new members.
16987 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16988 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16989 (the_low_target): Add new members.
16990 * linux-x86-64-low.c (target_regsets): Add new kind
16993 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16995 From Martin Pool <mbp@samba.org>:
16996 * server.c (gdbserver_usage): New function.
16999 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17001 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17002 stop_at -> stop_pc.
17004 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17006 * Makefile.in: Remove obsolete code.
17008 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17010 * linux-low.c (regsets_fetch_inferior_registers),
17011 (regsets_store_inferior_registers): Removed cast to int from
17013 * regcache.h: Added declaration of struct inferior_info.
17015 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17017 * inferiors.c (struct inferior_info): Add regcache_data.
17018 (add_inferior): Call create_register_cache.
17019 (clear_inferiors): Call free_register_cache.
17020 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17021 * regcache.c (struct inferior_regcache_data): New.
17022 (registers): Remove.
17023 (get_regcache): New function.
17024 (create_register_cache, free_register_cache): New functions.
17025 (set_register_cache): Don't initialize the register cache here.
17026 (registers_to_string, registers_from_string, register_data): Call
17028 * regcache.h: Add prototypes.
17029 * server.h: Likewise.
17031 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17033 * mem-break.c: New file.
17034 * mem-break.h: New file.
17035 * Makefile.in: Add mem-break.o rule; update server.h
17037 * inferiors.c (struct inferior_info): Add target_data
17039 (clear_inferiors): Free target_data member if set.
17040 (inferior_target_data, set_inferior_target_data): New functions.
17041 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17042 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17043 * linux-low.c (linux_bp_reinsert): New variable.
17044 (struct inferior_linux_data): New.
17045 (linux_create_inferior): Use set_inferior_target_data.
17046 (linux_attach): Likewise. Call add_inferior.
17047 (linux_wait_for_one_inferior): New function.
17048 (linux_wait): Call it.
17049 (linux_write_memory): Add const.
17050 (initialize_low): Call set_breakpoint_data.
17051 * linux-low.h (struct linux_target_ops): Add breakpoint
17053 * server.c (attach_inferior): Remove extra add_inferior
17055 * server.h: Include mem-break.h. Update inferior.c
17057 * target.c (read_inferior_memory)
17058 (write_inferior_memory): New functions.
17059 * target.h (read_inferior_memory)
17060 (write_inferior_memory): Change macros to prototypes.
17061 (struct target_ops): Update comments. Add const to write_memory
17064 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17066 * linux-low.c (usr_store_inferior_registers): Support
17067 registers which are allowed to fail to store.
17068 * linux-low.h (linux_target_ops): Likewise.
17069 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17070 (ppc_cannot_store_register): FPSCR may not be storable.
17072 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17074 * server.h: Include <string.h> if HAVE_STRING_H.
17075 * ChangeLog: Correct paths in last ChangeLog entry.
17077 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17079 * linux-low.h: Remove obsolete prototypes.
17080 (struct linux_target_ops): New.
17081 (extern the_low_target): New.
17082 * linux-low.c (num_regs, regmap): Remove declarations.
17083 (register_addr): Use the_low_target explicitly.
17084 (fetch_register): Likewise.
17085 (usr_fetch_inferior_registers): Likewise.
17086 (usr_store_inferior_registers): Likewise.
17087 * linux-arm-low.c (num_regs): Remove.
17088 (arm_num_regs): Define.
17089 (arm_regmap): Renamed from regmap, made static.
17090 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17092 (arm_cannot_store_register): Renamed from cannot_store_register,
17094 (the_low_target): New.
17095 * linux-i386-low.c (num_regs): Remove.
17096 (i386_num_regs): Define.
17097 (i386_regmap): Renamed from regmap, made static.
17098 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17100 (i386_cannot_store_register): Renamed from cannot_store_register,
17102 (the_low_target): New.
17103 * linux-ia64-low.c (num_regs): Remove.
17104 (ia64_num_regs): Define.
17105 (ia64_regmap): Renamed from regmap, made static.
17106 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17108 (ia64_cannot_store_register): Renamed from cannot_store_register,
17110 (the_low_target): New.
17111 * linux-m68k-low.c (num_regs): Remove.
17112 (m68k_num_regs): Define.
17113 (m68k_regmap): Renamed from regmap, made static.
17114 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17116 (m68k_cannot_store_register): Renamed from cannot_store_register,
17118 (the_low_target): New.
17119 * linux-mips-low.c (num_regs): Remove.
17120 (mips_num_regs): Define.
17121 (mips_regmap): Renamed from regmap, made static.
17122 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17124 (mips_cannot_store_register): Renamed from cannot_store_register,
17126 (the_low_target): New.
17127 * linux-ppc-low.c (num_regs): Remove.
17128 (ppc_num_regs): Define.
17129 (ppc_regmap): Renamed from regmap, made static.
17130 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17132 (ppc_cannot_store_register): Renamed from cannot_store_register,
17134 (the_low_target): New.
17135 * linux-s390-low.c (num_regs): Remove.
17136 (s390_num_regs): Define.
17137 (s390_regmap): Renamed from regmap, made static.
17138 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17140 (s390_cannot_store_register): Renamed from cannot_store_register,
17142 (the_low_target): New.
17143 * linux-sh-low.c (num_regs): Remove.
17144 (sh_num_regs): Define.
17145 (sh_regmap): Renamed from regmap, made static.
17146 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17148 (sh_cannot_store_register): Renamed from cannot_store_register,
17150 (the_low_target): New.
17151 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17152 (the_low_target): New.
17154 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17156 * Makefile.in: Add stamp-h target.
17157 * configure.in: Create stamp-h.
17158 * configure: Regenerated.
17160 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17162 * inferiors.c: New file.
17163 * target.c: New file.
17164 * target.h: New file.
17165 * Makefile.in: Add target.o and inferiors.o. Update
17167 * linux-low.c (inferior_pid): New static variable,
17168 moved from server.c.
17169 (linux_create_inferior): Renamed from create_inferior.
17170 Call add_inferior. Return 0 on success instead of a PID.
17171 (linux_attach): Renamed from myattach.
17172 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17173 (linux_thread_alive): Renamed from mythread_alive.
17174 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17176 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17177 (regsets_store_inferior_registers): Correct error message.
17178 Add missing ``return 0''.
17179 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17180 (linux_store_registers): Renamed from store_inferior_registers.
17181 (linux_read_memory): Renamed from read_inferior_memory.
17182 (linux_write_memory): Renamed from write_inferior_memory.
17183 (linux_target_ops): New structure.
17184 (initialize_low): Call set_target_ops ().
17185 * remote-utils.c (unhexify): New function.
17186 (hexify): New function.
17187 (input_interrupt): Send signals to ``signal_pid''.
17188 * server.c (inferior_pid): Remove.
17189 (start_inferior): Update create_inferior call.
17190 (attach_inferior): Call add_inferior.
17191 (handle_query): New function.
17192 (main): Call handle_query for `q' packets.
17193 * server.h: Include "target.h". Remove obsolete prototypes.
17194 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17196 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17198 * Makefile.in: Add WARN_CFLAGS. Update configury
17200 * configure.in: Check for <string.h>
17201 * configure: Regenerate.
17202 * config.in: Regenerate.
17203 * gdbreplay.c: Include needed system headers.
17204 (remote_open): Remove strchr prototype.
17205 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17206 * regcache.c (supply_register): Change buf argument to const void *.
17207 (supply_register_by_name): Likewise.
17208 (collect_register): Change buf argument to void *.
17209 (collect_register_by_name): Likewise.
17210 * regcache.h: Add missing prototypes.
17211 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17212 * server.c (handle_query): New function.
17213 (attached): New static variable, moved out of main.
17214 (main): Quiet longjmp clobber warnings.
17215 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17216 * utils.c (error): Remove NORETURN.